vimrc and finding errors in latex document

by David Epstein   Last Updated April 16, 2019 06:12 AM

To find errors in a latex document, I open vim on the .log file. Then I type manually

/^l\.\|[Ee]rr\|[Ww]ar followed by RETURN

This extended regular expression works well. It matches a line starting with ell followed by a fullstop (period) OR the word "error", possibly capitalized OR the word "warning", possibly capitalized.

I would like to put this command into my .vimrc with the line

:map % "what should I put here?"

I made various attempts, including doubling some of the backslashes, but couldn't get it to work. I want vim to look for a match for my extended regular expression when I type "%"

Tags : vi latex

Related Questions

Updated February 26, 2016 01:05 AM

Updated May 11, 2018 11:12 AM

Updated March 26, 2017 11:12 AM

Updated January 31, 2019 01:12 AM

Updated August 23, 2017 13:12 PM