/runtime/doc/quickfix.txt

https://bitbucket.org/ultra_iter/vim-qt
Plain Text | 1456 lines | 1171 code | 285 blank | 0 comment | 0 complexity | fc0278a9d7688eb379d66715fac85ded MD5 | raw file

Large files are truncated, but you can click here to view the full file

  1. *quickfix.txt* For Vim version 7.3. Last change: 2011 May 10
  2. VIM REFERENCE MANUAL by Bram Moolenaar
  3. This subject is introduced in section |30.1| of the user manual.
  4. 1. Using QuickFix commands |quickfix|
  5. 2. The error window |quickfix-window|
  6. 3. Using more than one list of errors |quickfix-error-lists|
  7. 4. Using :make |:make_makeprg|
  8. 5. Using :grep |grep|
  9. 6. Selecting a compiler |compiler-select|
  10. 7. The error format |error-file-format|
  11. 8. The directory stack |quickfix-directory-stack|
  12. 9. Specific error file formats |errorformats|
  13. {Vi does not have any of these commands}
  14. The quickfix commands are not available when the |+quickfix| feature was
  15. disabled at compile time.
  16. =============================================================================
  17. 1. Using QuickFix commands *quickfix* *Quickfix* *E42*
  18. Vim has a special mode to speedup the edit-compile-edit cycle. This is
  19. inspired by the quickfix option of the Manx's Aztec C compiler on the Amiga.
  20. The idea is to save the error messages from the compiler in a file and use Vim
  21. to jump to the errors one by one. You can examine each problem and fix it,
  22. without having to remember all the error messages.
  23. In Vim the quickfix commands are used more generally to find a list of
  24. positions in files. For example, |:vimgrep| finds pattern matches. You can
  25. use the positions in a script with the |getqflist()| function. Thus you can
  26. do a lot more than the edit/compile/fix cycle!
  27. If you are using Manx's Aztec C compiler on the Amiga look here for how to use
  28. it with Vim: |quickfix-manx|. If you are using another compiler you should
  29. save the error messages in a file and start Vim with "vim -q filename". An
  30. easy way to do this is with the |:make| command (see below). The
  31. 'errorformat' option should be set to match the error messages from your
  32. compiler (see |errorformat| below).
  33. *location-list* *E776*
  34. A location list is similar to a quickfix list and contains a list of positions
  35. in files. A location list is associated with a window and each window can
  36. have a separate location list. A location list can be associated with only
  37. one window. The location list is independent of the quickfix list.
  38. When a window with a location list is split, the new window gets a copy of the
  39. location list. When there are no references to a location list, the location
  40. list is destroyed.
  41. The following quickfix commands can be used. The location list commands are
  42. similar to the quickfix commands, replacing the 'c' prefix in the quickfix
  43. command with 'l'.
  44. *:cc*
  45. :cc[!] [nr] Display error [nr]. If [nr] is omitted, the same
  46. error is displayed again. Without [!] this doesn't
  47. work when jumping to another buffer, the current buffer
  48. has been changed, there is the only window for the
  49. buffer and both 'hidden' and 'autowrite' are off.
  50. When jumping to another buffer with [!] any changes to
  51. the current buffer are lost, unless 'hidden' is set or
  52. there is another window for this buffer.
  53. The 'switchbuf' settings are respected when jumping
  54. to a buffer.
  55. *:ll*
  56. :ll[!] [nr] Same as ":cc", except the location list for the
  57. current window is used instead of the quickfix list.
  58. *:cn* *:cnext* *E553*
  59. :[count]cn[ext][!] Display the [count] next error in the list that
  60. includes a file name. If there are no file names at
  61. all, go to the [count] next error. See |:cc| for
  62. [!] and 'switchbuf'.
  63. *:lne* *:lnext*
  64. :[count]lne[xt][!] Same as ":cnext", except the location list for the
  65. current window is used instead of the quickfix list.
  66. :[count]cN[ext][!] *:cp* *:cprevious* *:cN* *:cNext*
  67. :[count]cp[revious][!] Display the [count] previous error in the list that
  68. includes a file name. If there are no file names at
  69. all, go to the [count] previous error. See |:cc| for
  70. [!] and 'switchbuf'.
  71. :[count]lN[ext][!] *:lp* *:lprevious* *:lN* *:lNext*
  72. :[count]lp[revious][!] Same as ":cNext" and ":cprevious", except the location
  73. list for the current window is used instead of the
  74. quickfix list.
  75. *:cnf* *:cnfile*
  76. :[count]cnf[ile][!] Display the first error in the [count] next file in
  77. the list that includes a file name. If there are no
  78. file names at all or if there is no next file, go to
  79. the [count] next error. See |:cc| for [!] and
  80. 'switchbuf'.
  81. *:lnf* *:lnfile*
  82. :[count]lnf[ile][!] Same as ":cnfile", except the location list for the
  83. current window is used instead of the quickfix list.
  84. :[count]cNf[ile][!] *:cpf* *:cpfile* *:cNf* *:cNfile*
  85. :[count]cpf[ile][!] Display the last error in the [count] previous file in
  86. the list that includes a file name. If there are no
  87. file names at all or if there is no next file, go to
  88. the [count] previous error. See |:cc| for [!] and
  89. 'switchbuf'.
  90. :[count]lNf[ile][!] *:lpf* *:lpfile* *:lNf* *:lNfile*
  91. :[count]lpf[ile][!] Same as ":cNfile" and ":cpfile", except the location
  92. list for the current window is used instead of the
  93. quickfix list.
  94. *:crewind* *:cr*
  95. :cr[ewind][!] [nr] Display error [nr]. If [nr] is omitted, the FIRST
  96. error is displayed. See |:cc|.
  97. *:lrewind* *:lr*
  98. :lr[ewind][!] [nr] Same as ":crewind", except the location list for the
  99. current window is used instead of the quickfix list.
  100. *:cfirst* *:cfir*
  101. :cfir[st][!] [nr] Same as ":crewind".
  102. *:lfirst* *:lfir*
  103. :lfir[st][!] [nr] Same as ":lrewind".
  104. *:clast* *:cla*
  105. :cla[st][!] [nr] Display error [nr]. If [nr] is omitted, the LAST
  106. error is displayed. See |:cc|.
  107. *:llast* *:lla*
  108. :lla[st][!] [nr] Same as ":clast", except the location list for the
  109. current window is used instead of the quickfix list.
  110. *:cq* *:cquit*
  111. :cq[uit][!] Quit Vim with an error code, so that the compiler
  112. will not compile the same file again.
  113. WARNING: All changes in files are lost! Also when the
  114. [!] is not used. It works like ":qall!" |:qall|,
  115. except that Vim returns a non-zero exit code.
  116. *:cf* *:cfile*
  117. :cf[ile][!] [errorfile] Read the error file and jump to the first error.
  118. This is done automatically when Vim is started with
  119. the -q option. You can use this command when you
  120. keep Vim running while compiling. If you give the
  121. name of the errorfile, the 'errorfile' option will
  122. be set to [errorfile]. See |:cc| for [!].
  123. *:lf* *:lfile*
  124. :lf[ile][!] [errorfile] Same as ":cfile", except the location list for the
  125. current window is used instead of the quickfix list.
  126. You can not use the -q command-line option to set
  127. the location list.
  128. :cg[etfile] [errorfile] *:cg* *:cgetfile*
  129. Read the error file. Just like ":cfile" but don't
  130. jump to the first error.
  131. :lg[etfile] [errorfile] *:lg* *:lgetfile*
  132. Same as ":cgetfile", except the location list for the
  133. current window is used instead of the quickfix list.
  134. *:caddf* *:caddfile*
  135. :caddf[ile] [errorfile] Read the error file and add the errors from the
  136. errorfile to the current quickfix list. If a quickfix
  137. list is not present, then a new list is created.
  138. *:laddf* *:laddfile*
  139. :laddf[ile] [errorfile] Same as ":caddfile", except the location list for the
  140. current window is used instead of the quickfix list.
  141. *:cb* *:cbuffer* *E681*
  142. :cb[uffer][!] [bufnr] Read the error list from the current buffer.
  143. When [bufnr] is given it must be the number of a
  144. loaded buffer. That buffer will then be used instead
  145. of the current buffer.
  146. A range can be specified for the lines to be used.
  147. Otherwise all lines in the buffer are used.
  148. See |:cc| for [!].
  149. *:lb* *:lbuffer*
  150. :lb[uffer][!] [bufnr] Same as ":cbuffer", except the location list for the
  151. current window is used instead of the quickfix list.
  152. *:cgetb* *:cgetbuffer*
  153. :cgetb[uffer] [bufnr] Read the error list from the current buffer. Just
  154. like ":cbuffer" but don't jump to the first error.
  155. *:lgetb* *:lgetbuffer*
  156. :lgetb[uffer] [bufnr] Same as ":cgetbuffer", except the location list for
  157. the current window is used instead of the quickfix
  158. list.
  159. *:caddb* *:caddbuffer*
  160. :caddb[uffer] [bufnr] Read the error list from the current buffer and add
  161. the errors to the current quickfix list. If a
  162. quickfix list is not present, then a new list is
  163. created. Otherwise, same as ":cbuffer".
  164. *:laddb* *:laddbuffer*
  165. :laddb[uffer] [bufnr] Same as ":caddbuffer", except the location list for
  166. the current window is used instead of the quickfix
  167. list.
  168. *:cex* *:cexpr* *E777*
  169. :cex[pr][!] {expr} Create a quickfix list using the result of {expr} and
  170. jump to the first error.
  171. If {expr} is a String, then each new-line terminated
  172. line in the String is processed using the global value
  173. of 'errorformat' and the result is added to the
  174. quickfix list.
  175. If {expr} is a List, then each String item in the list
  176. is processed and added to the quickfix list. Non
  177. String items in the List are ignored.
  178. See |:cc| for [!].
  179. Examples: >
  180. :cexpr system('grep -n xyz *')
  181. :cexpr getline(1, '$')
  182. <
  183. *:lex* *:lexpr*
  184. :lex[pr][!] {expr} Same as |:cexpr|, except the location list for the
  185. current window is used instead of the quickfix list.
  186. *:cgete* *:cgetexpr*
  187. :cgete[xpr] {expr} Create a quickfix list using the result of {expr}.
  188. Just like |:cexpr|, but don't jump to the first error.
  189. *:lgete* *:lgetexpr*
  190. :lgete[xpr] {expr} Same as |:cgetexpr|, except the location list for the
  191. current window is used instead of the quickfix list.
  192. *:cad* *:caddexpr*
  193. :cad[dexpr] {expr} Evaluate {expr} and add the resulting lines to the
  194. current quickfix list. If a quickfix list is not
  195. present, then a new list is created. The current
  196. cursor position will not be changed. See |:cexpr| for
  197. more information.
  198. Example: >
  199. :g/mypattern/caddexpr expand("%") . ":" . line(".") . ":" . getline(".")
  200. <
  201. *:lad* *:laddexpr*
  202. :lad[dexpr] {expr} Same as ":caddexpr", except the location list for the
  203. current window is used instead of the quickfix list.
  204. *:cl* *:clist*
  205. :cl[ist] [from] [, [to]]
  206. List all errors that are valid |quickfix-valid|.
  207. If numbers [from] and/or [to] are given, the respective
  208. range of errors is listed. A negative number counts
  209. from the last error backwards, -1 being the last error.
  210. The 'switchbuf' settings are respected when jumping
  211. to a buffer.
  212. :cl[ist]! [from] [, [to]]
  213. List all errors.
  214. *:lli* *:llist*
  215. :lli[st] [from] [, [to]]
  216. Same as ":clist", except the location list for the
  217. current window is used instead of the quickfix list.
  218. :lli[st]! [from] [, [to]]
  219. List all the entries in the location list for the
  220. current window.
  221. If you insert or delete lines, mostly the correct error location is still
  222. found because hidden marks are used. Sometimes, when the mark has been
  223. deleted for some reason, the message "line changed" is shown to warn you that
  224. the error location may not be correct. If you quit Vim and start again the
  225. marks are lost and the error locations may not be correct anymore.
  226. If vim is built with |+autocmd| support, two autocommands are available for
  227. running commands before and after a quickfix command (':make', ':grep' and so
  228. on) is executed. See |QuickFixCmdPre| and |QuickFixCmdPost| for details.
  229. *QuickFixCmdPost-example*
  230. When 'encoding' differs from the locale, the error messages may have a
  231. different encoding from what Vim is using. To convert the messages you can
  232. use this code: >
  233. function QfMakeConv()
  234. let qflist = getqflist()
  235. for i in qflist
  236. let i.text = iconv(i.text, "cp936", "utf-8")
  237. endfor
  238. call setqflist(qflist)
  239. endfunction
  240. au QuickfixCmdPost make call QfMakeConv()
  241. =============================================================================
  242. 2. The error window *quickfix-window*
  243. *:cope* *:copen* *w:quickfix_title*
  244. :cope[n] [height] Open a window to show the current list of errors.
  245. When [height] is given, the window becomes that high
  246. (if there is room). Otherwise the window is made ten
  247. lines high.
  248. The window will contain a special buffer, with
  249. 'buftype' equal to "quickfix". Don't change this!
  250. If there already is a quickfix window, it will be made
  251. the current window. It is not possible to open a
  252. second quickfix window. The window will have the
  253. w:quickfix_title variable set which will indicate the
  254. command that produced the quickfix list. This can be
  255. used to compose a custom status line if the value of
  256. 'statusline' is adjusted properly.
  257. *:lop* *:lopen*
  258. :lop[en] [height] Open a window to show the location list for the
  259. current window. Works only when the location list for
  260. the current window is present. You can have more than
  261. one location window opened at a time. Otherwise, it
  262. acts the same as ":copen".
  263. *:ccl* *:cclose*
  264. :ccl[ose] Close the quickfix window.
  265. *:lcl* *:lclose*
  266. :lcl[ose] Close the window showing the location list for the
  267. current window.
  268. *:cw* *:cwindow*
  269. :cw[indow] [height] Open the quickfix window when there are recognized
  270. errors. If the window is already open and there are
  271. no recognized errors, close the window.
  272. *:lw* *:lwindow*
  273. :lw[indow] [height] Same as ":cwindow", except use the window showing the
  274. location list for the current window.
  275. Normally the quickfix window is at the bottom of the screen. If there are
  276. vertical splits, it's at the bottom of the rightmost column of windows. To
  277. make it always occupy the full width: >
  278. :botright cwindow
  279. You can move the window around with |window-moving| commands.
  280. For example, to move it to the top: CTRL-W K
  281. The 'winfixheight' option will be set, which means that the window will mostly
  282. keep its height, ignoring 'winheight' and 'equalalways'. You can change the
  283. height manually (e.g., by dragging the status line above it with the mouse).
  284. In the quickfix window, each line is one error. The line number is equal to
  285. the error number. You can use ":.cc" to jump to the error under the cursor.
  286. Hitting the <Enter> key or double-clicking the mouse on a line has the same
  287. effect. The file containing the error is opened in the window above the
  288. quickfix window. If there already is a window for that file, it is used
  289. instead. If the buffer in the used window has changed, and the error is in
  290. another file, jumping to the error will fail. You will first have to make
  291. sure the window contains a buffer which can be abandoned.
  292. *CTRL-W_<Enter>* *CTRL-W_<CR>*
  293. You can use CTRL-W <Enter> to open a new window and jump to the error there.
  294. When the quickfix window has been filled, two autocommand events are
  295. triggered. First the 'filetype' option is set to "qf", which triggers the
  296. FileType event. Then the BufReadPost event is triggered, using "quickfix" for
  297. the buffer name. This can be used to perform some action on the listed
  298. errors. Example: >
  299. au BufReadPost quickfix setlocal modifiable
  300. \ | silent exe 'g/^/s//\=line(".")." "/'
  301. \ | setlocal nomodifiable
  302. This prepends the line number to each line. Note the use of "\=" in the
  303. substitute string of the ":s" command, which is used to evaluate an
  304. expression.
  305. The BufWinEnter event is also triggered, again using "quickfix" for the buffer
  306. name.
  307. Note: Making changes in the quickfix window has no effect on the list of
  308. errors. 'modifiable' is off to avoid making changes. If you delete or insert
  309. lines anyway, the relation between the text and the error number is messed up.
  310. If you really want to do this, you could write the contents of the quickfix
  311. window to a file and use ":cfile" to have it parsed and used as the new error
  312. list.
  313. *location-list-window*
  314. The location list window displays the entries in a location list. When you
  315. open a location list window, it is created below the current window and
  316. displays the location list for the current window. The location list window
  317. is similar to the quickfix window, except that you can have more than one
  318. location list window open at a time. When you use a location list command in
  319. this window, the displayed location list is used.
  320. When you select a file from the location list window, the following steps are
  321. used to find a window to edit the file:
  322. 1. If a window with the location list displayed in the location list window is
  323. present, then the file is opened in that window.
  324. 2. If the above step fails and if the file is already opened in another
  325. window, then that window is used.
  326. 3. If the above step fails then an existing window showing a buffer with
  327. 'buftype' not set is used.
  328. 4. If the above step fails, then the file is edited in a new window.
  329. In all of the above cases, if the location list for the selected window is not
  330. yet set, then it is set to the location list displayed in the location list
  331. window.
  332. =============================================================================
  333. 3. Using more than one list of errors *quickfix-error-lists*
  334. So far has been assumed that there is only one list of errors. Actually the
  335. ten last used lists are remembered. When starting a new list, the previous
  336. ones are automatically kept. Two commands can be used to access older error
  337. lists. They set one of the existing error lists as the current one.
  338. *:colder* *:col* *E380*
  339. :col[der] [count] Go to older error list. When [count] is given, do
  340. this [count] times. When already at the oldest error
  341. list, an error message is given.
  342. *:lolder* *:lol*
  343. :lol[der] [count] Same as ":colder", except use the location list for
  344. the current window instead of the quickfix list.
  345. *:cnewer* *:cnew* *E381*
  346. :cnew[er] [count] Go to newer error list. When [count] is given, do
  347. this [count] times. When already at the newest error
  348. list, an error message is given.
  349. *:lnewer* *:lnew*
  350. :lnew[er] [count] Same as ":cnewer", except use the location list for
  351. the current window instead of the quickfix list.
  352. When adding a new error list, it becomes the current list.
  353. When ":colder" has been used and ":make" or ":grep" is used to add a new error
  354. list, one newer list is overwritten. This is especially useful if you are
  355. browsing with ":grep" |grep|. If you want to keep the more recent error
  356. lists, use ":cnewer 99" first.
  357. =============================================================================
  358. 4. Using :make *:make_makeprg*
  359. *:mak* *:make*
  360. :mak[e][!] [arguments] 1. If vim was built with |+autocmd|, all relevant
  361. |QuickFixCmdPre| autocommands are executed.
  362. 2. If the 'autowrite' option is on, write any changed
  363. buffers
  364. 3. An errorfile name is made from 'makeef'. If
  365. 'makeef' doesn't contain "##", and a file with this
  366. name already exists, it is deleted.
  367. 4. The program given with the 'makeprg' option is
  368. started (default "make") with the optional
  369. [arguments] and the output is saved in the
  370. errorfile (for Unix it is also echoed on the
  371. screen).
  372. 5. The errorfile is read using 'errorformat'.
  373. 6. If vim was built with |+autocmd|, all relevant
  374. |QuickFixCmdPost| autocommands are executed.
  375. See example below.
  376. 7. If [!] is not given the first error is jumped to.
  377. 8. The errorfile is deleted.
  378. 9. You can now move through the errors with commands
  379. like |:cnext| and |:cprevious|, see above.
  380. This command does not accept a comment, any "
  381. characters are considered part of the arguments.
  382. *:lmak* *:lmake*
  383. :lmak[e][!] [arguments]
  384. Same as ":make", except the location list for the
  385. current window is used instead of the quickfix list.
  386. The ":make" command executes the command given with the 'makeprg' option.
  387. This is done by passing the command to the shell given with the 'shell'
  388. option. This works almost like typing
  389. ":!{makeprg} [arguments] {shellpipe} {errorfile}".
  390. {makeprg} is the string given with the 'makeprg' option. Any command can be
  391. used, not just "make". Characters '%' and '#' are expanded as usual on a
  392. command-line. You can use "%<" to insert the current file name without
  393. extension, or "#<" to insert the alternate file name without extension, for
  394. example: >
  395. :set makeprg=make\ #<.o
  396. [arguments] is anything that is typed after ":make".
  397. {shellpipe} is the 'shellpipe' option.
  398. {errorfile} is the 'makeef' option, with ## replaced to make it unique.
  399. The placeholder "$*" can be used for the argument list in {makeprg} if the
  400. command needs some additional characters after its arguments. The $* is
  401. replaced then by all arguments. Example: >
  402. :set makeprg=latex\ \\\\nonstopmode\ \\\\input\\{$*}
  403. or simpler >
  404. :let &mp = 'latex \\nonstopmode \\input\{$*}'
  405. "$*" can be given multiple times, for example: >
  406. :set makeprg=gcc\ -o\ $*\ $*
  407. The 'shellpipe' option defaults to ">" for the Amiga, MS-DOS and Win32. This
  408. means that the output of the compiler is saved in a file and not shown on the
  409. screen directly. For Unix "| tee" is used. The compiler output is shown on
  410. the screen and saved in a file the same time. Depending on the shell used
  411. "|& tee" or "2>&1| tee" is the default, so stderr output will be included.
  412. If 'shellpipe' is empty, the {errorfile} part will be omitted. This is useful
  413. for compilers that write to an errorfile themselves (e.g., Manx's Amiga C).
  414. Using QuickFixCmdPost to fix the encoding ~
  415. It may be that 'encoding' is set to an encoding that differs from the messages
  416. your build program produces. This example shows how to fix this after Vim has
  417. read the error messages: >
  418. function QfMakeConv()
  419. let qflist = getqflist()
  420. for i in qflist
  421. let i.text = iconv(i.text, "cp936", "utf-8")
  422. endfor
  423. call setqflist(qflist)
  424. endfunction
  425. au QuickfixCmdPost make call QfMakeConv()
  426. (Example by Faque Cheng)
  427. ==============================================================================
  428. 5. Using :vimgrep and :grep *grep* *lid*
  429. Vim has two ways to find matches for a pattern: Internal and external. The
  430. advantage of the internal grep is that it works on all systems and uses the
  431. powerful Vim search patterns. An external grep program can be used when the
  432. Vim grep does not do what you want.
  433. The internal method will be slower, because files are read into memory. The
  434. advantages are:
  435. - Line separators and encoding are automatically recognized, as if a file is
  436. being edited.
  437. - Uses Vim search patterns. Multi-line patterns can be used.
  438. - When plugins are enabled: compressed and remote files can be searched.
  439. |gzip| |netrw|
  440. To be able to do this Vim loads each file as if it is being edited. When
  441. there is no match in the file the associated buffer is wiped out again. The
  442. 'hidden' option is ignored here to avoid running out of memory or file
  443. descriptors when searching many files. However, when the |:hide| command
  444. modifier is used the buffers are kept loaded. This makes following searches
  445. in the same files a lot faster.
  446. Note that |:copen| (or |:lopen| for |:lgrep|) may be used to open a buffer
  447. containing the search results in linked form. The |:silent| command may be
  448. used to suppress the default full screen grep output. The ":grep!" form of
  449. the |:grep| command doesn't jump to the first match automatically. These
  450. commands can be combined to create a NewGrep command: >
  451. command! -nargs=+ NewGrep execute 'silent grep! <args>' | copen 42
  452. 5.1 using Vim's internal grep
  453. *:vim* *:vimgrep* *E682* *E683*
  454. :vim[grep][!] /{pattern}/[g][j] {file} ...
  455. Search for {pattern} in the files {file} ... and set
  456. the error list to the matches.
  457. Without the 'g' flag each line is added only once.
  458. With 'g' every match is added.
  459. {pattern} is a Vim search pattern. Instead of
  460. enclosing it in / any non-ID character (see
  461. |'isident'|) can be used, so long as it does not
  462. appear in {pattern}.
  463. 'ignorecase' applies. To overrule it put |/\c| in the
  464. pattern to ignore case or |/\C| to match case.
  465. 'smartcase' is not used.
  466. When a number is put before the command this is used
  467. as the maximum number of matches to find. Use
  468. ":1vimgrep pattern file" to find only the first.
  469. Useful if you only want to check if there is a match
  470. and quit quickly when it's found.
  471. Without the 'j' flag Vim jumps to the first match.
  472. With 'j' only the quickfix list is updated.
  473. With the [!] any changes in the current buffer are
  474. abandoned.
  475. Every second or so the searched file name is displayed
  476. to give you an idea of the progress made.
  477. Examples: >
  478. :vimgrep /an error/ *.c
  479. :vimgrep /\<FileName\>/ *.h include/*
  480. :vimgrep /myfunc/ **/*.c
  481. < For the use of "**" see |starstar-wildcard|.
  482. :vim[grep][!] {pattern} {file} ...
  483. Like above, but instead of enclosing the pattern in a
  484. non-ID character use a white-separated pattern. The
  485. pattern must start with an ID character.
  486. Example: >
  487. :vimgrep Error *.c
  488. <
  489. *:lv* *:lvimgrep*
  490. :lv[imgrep][!] /{pattern}/[g][j] {file} ...
  491. :lv[imgrep][!] {pattern} {file} ...
  492. Same as ":vimgrep", except the location list for the
  493. current window is used instead of the quickfix list.
  494. *:vimgrepa* *:vimgrepadd*
  495. :vimgrepa[dd][!] /{pattern}/[g][j] {file} ...
  496. :vimgrepa[dd][!] {pattern} {file} ...
  497. Just like ":vimgrep", but instead of making a new list
  498. of errors the matches are appended to the current
  499. list.
  500. *:lvimgrepa* *:lvimgrepadd*
  501. :lvimgrepa[dd][!] /{pattern}/[g][j] {file} ...
  502. :lvimgrepa[dd][!] {pattern} {file} ...
  503. Same as ":vimgrepadd", except the location list for
  504. the current window is used instead of the quickfix
  505. list.
  506. 5.2 External grep
  507. Vim can interface with "grep" and grep-like programs (such as the GNU
  508. id-utils) in a similar way to its compiler integration (see |:make| above).
  509. [Unix trivia: The name for the Unix "grep" command comes from ":g/re/p", where
  510. "re" stands for Regular Expression.]
  511. *:gr* *:grep*
  512. :gr[ep][!] [arguments] Just like ":make", but use 'grepprg' instead of
  513. 'makeprg' and 'grepformat' instead of 'errorformat'.
  514. When 'grepprg' is "internal" this works like
  515. |:vimgrep|. Note that the pattern needs to be
  516. enclosed in separator characters then.
  517. *:lgr* *:lgrep*
  518. :lgr[ep][!] [arguments] Same as ":grep", except the location list for the
  519. current window is used instead of the quickfix list.
  520. *:grepa* *:grepadd*
  521. :grepa[dd][!] [arguments]
  522. Just like ":grep", but instead of making a new list of
  523. errors the matches are appended to the current list.
  524. Example: >
  525. :call setqflist([])
  526. :bufdo grepadd! something %
  527. < The first command makes a new error list which is
  528. empty. The second command executes "grepadd" for each
  529. listed buffer. Note the use of ! to avoid that
  530. ":grepadd" jumps to the first error, which is not
  531. allowed with |:bufdo|.
  532. An example that uses the argument list and avoids
  533. errors for files without matches: >
  534. :silent argdo try
  535. \ | grepadd! something %
  536. \ | catch /E480:/
  537. \ | endtry"
  538. <
  539. *:lgrepa* *:lgrepadd*
  540. :lgrepa[dd][!] [arguments]
  541. Same as ":grepadd", except the location list for the
  542. current window is used instead of the quickfix list.
  543. 5.3 Setting up external grep
  544. If you have a standard "grep" program installed, the :grep command may work
  545. well with the defaults. The syntax is very similar to the standard command: >
  546. :grep foo *.c
  547. Will search all files with the .c extension for the substring "foo". The
  548. arguments to :grep are passed straight to the "grep" program, so you can use
  549. whatever options your "grep" supports.
  550. By default, :grep invokes grep with the -n option (show file and line
  551. numbers). You can change this with the 'grepprg' option. You will need to set
  552. 'grepprg' if:
  553. a) You are using a program that isn't called "grep"
  554. b) You have to call grep with a full path
  555. c) You want to pass other options automatically (e.g. case insensitive
  556. search.)
  557. Once "grep" has executed, Vim parses the results using the 'grepformat'
  558. option. This option works in the same way as the 'errorformat' option - see
  559. that for details. You may need to change 'grepformat' from the default if
  560. your grep outputs in a non-standard format, or you are using some other
  561. program with a special format.
  562. Once the results are parsed, Vim loads the first file containing a match and
  563. jumps to the appropriate line, in the same way that it jumps to a compiler
  564. error in |quickfix| mode. You can then use the |:cnext|, |:clist|, etc.
  565. commands to see the other matches.
  566. 5.4 Using :grep with id-utils
  567. You can set up :grep to work with the GNU id-utils like this: >
  568. :set grepprg=lid\ -Rgrep\ -s
  569. :set grepformat=%f:%l:%m
  570. then >
  571. :grep (regexp)
  572. works just as you'd expect.
  573. (provided you remembered to mkid first :)
  574. 5.5 Browsing source code with :vimgrep or :grep
  575. Using the stack of error lists that Vim keeps, you can browse your files to
  576. look for functions and the functions they call. For example, suppose that you
  577. have to add an argument to the read_file() function. You enter this command: >
  578. :vimgrep /\<read_file\>/ *.c
  579. You use ":cn" to go along the list of matches and add the argument. At one
  580. place you have to get the new argument from a higher level function msg(), and
  581. need to change that one too. Thus you use: >
  582. :vimgrep /\<msg\>/ *.c
  583. While changing the msg() functions, you find another function that needs to
  584. get the argument from a higher level. You can again use ":vimgrep" to find
  585. these functions. Once you are finished with one function, you can use >
  586. :colder
  587. to go back to the previous one.
  588. This works like browsing a tree: ":vimgrep" goes one level deeper, creating a
  589. list of branches. ":colder" goes back to the previous level. You can mix
  590. this use of ":vimgrep" and "colder" to browse all the locations in a tree-like
  591. way. If you do this consistently, you will find all locations without the
  592. need to write down a "todo" list.
  593. =============================================================================
  594. 6. Selecting a compiler *compiler-select*
  595. *:comp* *:compiler* *E666*
  596. :comp[iler][!] {name} Set options to work with compiler {name}.
  597. Without the "!" options are set for the
  598. current buffer. With "!" global options are
  599. set.
  600. If you use ":compiler foo" in "file.foo" and
  601. then ":compiler! bar" in another buffer, Vim
  602. will keep on using "foo" in "file.foo".
  603. {not available when compiled without the
  604. |+eval| feature}
  605. The Vim plugins in the "compiler" directory will set options to use the
  606. selected compiler. For ":compiler" local options are set, for ":compiler!"
  607. global options.
  608. *current_compiler*
  609. To support older Vim versions, the plugins always use "current_compiler" and
  610. not "b:current_compiler". What the command actually does is the following:
  611. - Delete the "current_compiler" and "b:current_compiler" variables.
  612. - Define the "CompilerSet" user command. With "!" it does ":set", without "!"
  613. it does ":setlocal".
  614. - Execute ":runtime! compiler/{name}.vim". The plugins are expected to set
  615. options with "CompilerSet" and set the "current_compiler" variable to the
  616. name of the compiler.
  617. - Delete the "CompilerSet" user command.
  618. - Set "b:current_compiler" to the value of "current_compiler".
  619. - Without "!" the old value of "current_compiler" is restored.
  620. For writing a compiler plugin, see |write-compiler-plugin|.
  621. GCC *quickfix-gcc* *compiler-gcc*
  622. There's one variable you can set for the GCC compiler:
  623. g:compiler_gcc_ignore_unmatched_lines
  624. Ignore lines that don't match any patterns
  625. defined for GCC. Useful if output from
  626. commands run from make are generating false
  627. positives.
  628. MANX AZTEC C *quickfix-manx* *compiler-manx*
  629. To use Vim with Manx's Aztec C compiler on the Amiga you should do the
  630. following:
  631. - Set the CCEDIT environment variable with the command: >
  632. mset "CCEDIT=vim -q"
  633. - Compile with the -qf option. If the compiler finds any errors, Vim is
  634. started and the cursor is positioned on the first error. The error message
  635. will be displayed on the last line. You can go to other errors with the
  636. commands mentioned above. You can fix the errors and write the file(s).
  637. - If you exit Vim normally the compiler will re-compile the same file. If you
  638. exit with the :cq command, the compiler will terminate. Do this if you
  639. cannot fix the error, or if another file needs to be compiled first.
  640. There are some restrictions to the Quickfix mode on the Amiga. The
  641. compiler only writes the first 25 errors to the errorfile (Manx's
  642. documentation does not say how to get more). If you want to find the others,
  643. you will have to fix a few errors and exit the editor. After recompiling,
  644. up to 25 remaining errors will be found.
  645. If Vim was started from the compiler, the :sh and some :! commands will not
  646. work, because Vim is then running in the same process as the compiler and
  647. stdin (standard input) will not be interactive.
  648. PERL *quickfix-perl* *compiler-perl*
  649. The Perl compiler plugin doesn't actually compile, but invokes Perl's internal
  650. syntax checking feature and parses the output for possible errors so you can
  651. correct them in quick-fix mode.
  652. Warnings are forced regardless of "no warnings" or "$^W = 0" within the file
  653. being checked. To disable this set g:perl_compiler_force_warnings to a zero
  654. value. For example: >
  655. let g:perl_compiler_force_warnings = 0
  656. PYUNIT COMPILER *compiler-pyunit*
  657. This is not actually a compiler, but a unit testing framework for the
  658. Python language. It is included into standard Python distribution
  659. starting from version 2.0. For older versions, you can get it from
  660. http://pyunit.sourceforge.net.
  661. When you run your tests with the help of the framework, possible errors
  662. are parsed by Vim and presented for you in quick-fix mode.
  663. Unfortunately, there is no standard way to run the tests.
  664. The alltests.py script seems to be used quite often, that's all.
  665. Useful values for the 'makeprg' options therefore are:
  666. setlocal makeprg=./alltests.py " Run a testsuite
  667. setlocal makeprg=python % " Run a single testcase
  668. Also see http://vim.sourceforge.net/tip_view.php?tip_id=280.
  669. TEX COMPILER *compiler-tex*
  670. Included in the distribution compiler for TeX ($VIMRUNTIME/compiler/tex.vim)
  671. uses make command if possible. If the compiler finds a file named "Makefile"
  672. or "makefile" in the current directory, it supposes that you want to process
  673. your *TeX files with make, and the makefile does the right work. In this case
  674. compiler sets 'errorformat' for *TeX output and leaves 'makeprg' untouched. If
  675. neither "Makefile" nor "makefile" is found, the compiler will not use make.
  676. You can force the compiler to ignore makefiles by defining
  677. b:tex_ignore_makefile or g:tex_ignore_makefile variable (they are checked for
  678. existence only).
  679. If the compiler chose not to use make, it need to choose a right program for
  680. processing your input. If b:tex_flavor or g:tex_flavor (in this precedence)
  681. variable exists, it defines TeX flavor for :make (actually, this is the name
  682. of executed command), and if both variables do not exist, it defaults to
  683. "latex". For example, while editing chapter2.tex \input-ed from mypaper.tex
  684. written in AMS-TeX: >
  685. :let b:tex_flavor = 'amstex'
  686. :compiler tex
  687. < [editing...] >
  688. :make mypaper
  689. Note that you must specify a name of the file to process as an argument (to
  690. process the right file when editing \input-ed or \include-ed file; portable
  691. solution for substituting % for no arguments is welcome). This is not in the
  692. semantics of make, where you specify a target, not source, but you may specify
  693. filename without extension ".tex" and mean this as "make filename.dvi or
  694. filename.pdf or filename.some_result_extension according to compiler".
  695. Note: tex command line syntax is set to usable both for MikTeX (suggestion
  696. by Srinath Avadhanula) and teTeX (checked by Artem Chuprina). Suggestion
  697. from |errorformat-LaTeX| is too complex to keep it working for different
  698. shells and OSes and also does not allow to use other available TeX options,
  699. if any. If your TeX doesn't support "-interaction=nonstopmode", please
  700. report it with different means to express \nonstopmode from the command line.
  701. =============================================================================
  702. 7. The error format *error-file-format*
  703. *errorformat* *E372* *E373* *E374*
  704. *E375* *E376* *E377* *E378*
  705. The 'errorformat' option specifies a list of formats that are recognized. The
  706. first format that matches with an error message is used. You can add several
  707. formats for different messages your compiler produces, or even entries for
  708. multiple compilers. See |efm-entries|.
  709. Each entry in 'errorformat' is a scanf-like string that describes the format.
  710. First, you need to know how scanf works. Look in the documentation of your
  711. C compiler. Below you find the % items that Vim understands. Others are
  712. invalid.
  713. Special characters in 'errorformat' are comma and backslash. See
  714. |efm-entries| for how to deal with them. Note that a literal "%" is matched
  715. by "%%", thus it is not escaped with a backslash.
  716. Note: By default the difference between upper and lowercase is ignored. If
  717. you want to match case, add "\C" to the pattern |/\C|.
  718. Basic items
  719. %f file name (finds a string)
  720. %l line number (finds a number)
  721. %c column number (finds a number representing character
  722. column of the error, (1 <tab> == 1 character column))
  723. %v virtual column number (finds a number representing
  724. screen column of the error (1 <tab> == 8 screen
  725. columns))
  726. %t error type (finds a single character)
  727. %n error number (finds a number)
  728. %m error message (finds a string)
  729. %r matches the "rest" of a single-line file message %O/P/Q
  730. %p pointer line (finds a sequence of '-', '.', ' ' or
  731. tabs and uses the length for the column number)
  732. %*{conv} any scanf non-assignable conversion
  733. %% the single '%' character
  734. %s search text (finds a string)
  735. The "%f" conversion may depend on the current 'isfname' setting. "~/" is
  736. expanded to the home directory and environment variables are expanded.
  737. The "%f" and "%m" conversions have to detect the end of the string. This
  738. normally happens by matching following characters and items. When nothing is
  739. following the rest of the line is matched. If "%f" is followed by a '%' or a
  740. backslash, it will look for a sequence of 'isfname' characters.
  741. On MS-DOS, MS-Windows and OS/2 a leading "C:" will be included in "%f", even
  742. when using "%f:". This means that a file name which is a single alphabetical
  743. letter will not be detected.
  744. The "%p" conversion is normally followed by a "^". It's used for compilers
  745. that output a line like: >
  746. ^
  747. or >
  748. ---------^
  749. to indicate the column of the error. This is to be used in a multi-line error
  750. message. See |errorformat-javac| for a useful example.
  751. The "%s" conversion specifies the text to search for to locate the error line.
  752. The text is used as a literal string. The anchors "^" and "$" are added to
  753. the text to locate the error line exactly matching the search text and the
  754. text is prefixed with the "\V" atom to make it "very nomagic". The "%s"
  755. conversion can be used to locate lines without a line number in the error
  756. output. Like the output of the "grep" shell command.
  757. When the pattern is present the line number will not be used.
  758. Changing directory
  759. The following uppercase conversion characters specify the type of special
  760. format strings. At most one of them may be given as a prefix at the begin
  761. of a single comma-separated format pattern.
  762. Some compilers produce messages that consist of directory names that have to
  763. be prepended to each file name read by %f (example: GNU make). The following
  764. codes can be used to scan these directory names; they will be stored in an
  765. internal directory stack. *E379*
  766. %D "enter directory" format string; expects a following
  767. %f that finds the directory name
  768. %X "leave directory" format string; expects following %f
  769. When defining an "enter directory" or "leave directory" format, the "%D" or
  770. "%X" has to be given at the start of that substring. Vim tracks the directory
  771. changes and prepends the current directory to each erroneous file found with a
  772. relative path. See |quickfix-directory-stack| for details, tips and
  773. limitations.
  774. Multi-line messages *errorformat-multi-line*
  775. It is possible to read the output of programs that produce multi-line
  776. messages, i.e. error strings that consume more than one line. Possible
  777. prefixes are:
  778. %E start of a multi-line error message
  779. %W start of a multi-line warning message
  780. %I start of a multi-line informational message
  781. %A start of a multi-line message (unspecified type)
  782. %> for next line start with current pattern again |efm-%>|
  783. %C continuation of a multi-line message
  784. %Z end of a multi-line message
  785. These can be used with '+' and '-', see |efm-ignore| below.
  786. Using "\n" in the pattern won't work to match multi-line messages.
  787. Example: Your compiler happens to write out errors in the following format
  788. (leading line numbers not being part of the actual output):
  789. 1 Error 275 ~
  790. 2 line 42 ~
  791. 3 column 3 ~
  792. 4 ' ' expected after '--' ~
  793. The appropriate error format string has to look like this: >
  794. :set efm=%EError\ %n,%Cline\ %l,%Ccolumn\ %c,%Z%m
  795. And the |:clist| error message generated for this error is:
  796. 1:42 col 3 error 275: ' ' expected after '--'
  797. Another example: Think of a Python interpreter that produces the following
  798. error message (line numbers are not part of the actual output):
  799. 1 ==============================================================
  800. 2 FAIL: testGetTypeIdCachesResult (dbfacadeTest.DjsDBFacadeTest)
  801. 3 --------------------------------------------------------------
  802. 4 Traceback (most recent call last):
  803. 5 File "unittests/dbfacadeTest.py", line 89, in testFoo
  804. 6 self.assertEquals(34, dtid)
  805. 7 File "/usr/lib/python2.2/unittest.py", line 286, in
  806. 8 failUnlessEqual
  807. 9 raise self.failureException, \
  808. 10 AssertionError: 34 != 33
  809. 11
  810. 12 --------------------------------------------------------------
  811. 13 Ran 27 tests in 0.063s
  812. Say you want |:clist| write the relevant information of this message only,
  813. namely:
  814. 5 unittests/dbfacadeTest.py:89: AssertionError: 34 != 33
  815. Then the error format string could be defined as follows: >
  816. :set efm=%C\ %.%#,%A\ \ File\ \"%f\"\\,\ line\ %l%.%#,%Z%[%^\ ]%\\@=%m
  817. Note that the %C string is given before the %A here: since the expression
  818. ' %.%#' (which stands for the regular expression ' .*') matches every line
  819. starting with a space, followed by any characters to the end of the line,
  820. it also hides line 7 which would trigger a separate error message otherwise.
  821. Error format strings are always parsed pattern by pattern until the first
  822. match occurs.
  823. *efm-%>*
  824. The %> item can be used to avoid trying patterns that appear earlier in
  825. 'errorformat'. This is useful for patterns that match just about anything.
  826. For example, if the error looks like this:
  827. Error in line 123 of foo.c: ~
  828. unknown variable "i" ~
  829. This can be found with: >
  830. :set efm=xxx,%E%>Error in line %l of %f:,%Z%m
  831. Where "xxx" has a pattern that would also match the second line.
  832. Important: There is no memory of what part of the errorformat matched before;
  833. every line in the error file gets a complete new run through the error format
  834. lines. For example, if one has: >
  835. setlocal efm=aa,bb,cc,dd,ee
  836. Where aa, bb, etc. are error format strings. Each line of the error file will
  837. be matched to the pattern aa, then bb, then cc, etc. Just because cc matched
  838. the previous error line does _not_ mean that dd will be tried first on the
  839. current line, even if cc and dd are multi-line errorformat strings.
  840. Separate file name *errorformat-separate-filename*
  841. These prefixes are useful if the file name is given once and multiple messages
  842. follow that refer to this file name.
  843. %O single-line file message: overread the matched part
  844. %P single-line file message: push file %f onto the stack
  845. %Q single-line file message: pop the last file from stack
  846. Example: Given a compiler that produces the following error logfile (without
  847. leading line numbers):
  848. 1 [a1.tt]
  849. 2 (1,17) error: ';' missing
  850. 3 (21,2) warning: variable 'z' not defined
  851. 4 (67,3) error: end of file found before string ended
  852. 5
  853. 6 [a2.tt]
  854. 7
  855. 8 [a3.tt]
  856. 9 NEW compiler v1.1
  857. 10 (2,2) warning: variable 'x' not defined
  858. 11 (67,3) warning: 's' already defined
  859. This logfile lists several messages for each file enclosed in [...] which are
  860. properly parsed by an error format like this: >
  861. :set efm=%+P[%f],(%l\\,%c)%*[\ ]%t%*[^:]:\ %m,%-Q
  862. A call of |:clist| writes them accordingly with their correct filenames:
  863. 2 a1.tt:1 col 17 error: ';' missing
  864. 3 a1.tt:21 col 2 warning: variable 'z' not defined
  865. 4 a1.tt:67 col 3 error: end of file found before string ended
  866. 8 a3.tt:2 col 2 warning: variable 'x' not defined
  867. 9 a3.tt:67 col 3 warning: 's' already defined
  868. Unlike the other prefixes that all match against whole lines, %P, %Q and %O
  869. can be used to match several patterns in the same line. Thus it is possible
  870. to parse even nested files like in the following line:
  871. {"file1" {"file2" error1} error2 {"file3" error3 {"file4" error4 error5}}}
  872. The %O then parses over strings that do not contain any push/pop file name
  873. information. See |errorformat-LaTeX| for an extended example.
  874. Ignoring and using whole messages *efm-ignore*
  875. The codes '+' or '-' can be combined with the uppercase codes above; in that
  876. case they have to precede the letter, e.g. '%+A' or '%-G':
  877. %- do not include the matching multi-line in any output
  878. %+ include the whole matching line in the %m error string
  879. One prefix is only useful in combination with '+' or '-', namely %G. It parses
  880. over lines containing general information like compiler version strings or
  881. other headers that can be skipped.
  882. %-G ignore this message
  883. %+G general message
  884. Pattern matching
  885. The scanf()-like "%*[]" notation is supported for backward-compatibility
  886. with previous versions of Vim. However, it is also possible to specify
  887. (nearly) any Vim supported regular expression in format strings.
  888. Since meta characters of the regular expression language can be part of
  889. ordinary matching strings or file names (and therefore internally have to
  890. be escaped), meta symbols have to be written with leading '%':
  891. %\ The single '\' character. Note that this has to be
  892. escaped ("%\\") in ":set errorformat=" definitions.
  893. %. The single '.' character.
  894. %# The single '*'(!) character.
  895. %^ The single '^' character. Note that this is not
  896. useful, the pattern already matches start of line.
  897. %$ The single '$' character. Note that this is not
  898. useful, the pattern already matches end of line.
  899. %[ The single '[' character for a [] character range.
  900. %~ The single '~' character.
  901. When using character classes in expressions (see |/\i| for an overview),
  902. terms containing the "\+" quantifier can be written in the scanf() "%*"
  903. notation. Example: "%\\d%\\+" ("\d\+", "any number") is equivalent to "%*\\d".
  904. Important note: The \(...\) grouping of sub-matches can not be used in format
  905. specifications because it is reserved for internal conversions.
  906. Multiple entries in 'errorformat' *efm-entries*
  907. To be able to detect output from several compilers, several format patterns
  908. may be put in 'errorformat', separated by commas (note: blanks after the comma
  909. are ignored). The first pattern that has a complete match is used. If no
  910. match is found, matching parts from the last one will be used, although the
  911. file name is removed and the error message is set to the whole message. If
  912. there is a pattern that may match output from several compilers (but not in a
  913. right way), put it after one that is more restrictive.
  914. To include a comma in a pattern precede it with a backslash (you have to type
  915. two in a ":set" command). To include a backslash itself give two backslashes
  916. (you have to type four in a ":set" command). You also need to put a backslash
  917. before a space for ":set".
  918. Valid matches *quickfix-valid*
  919. If a line does not completely match one of the entries in 'errorformat', the
  920. whole line is put in the error message and the entry is marked "not valid"
  921. These lines are skipped with the ":cn" and ":cp" commands (unless there is
  922. no valid line at all). You can use ":cl!" to display all the error messages.
  923. If the error format does not contain a file name Vim cannot switch to the
  924. correct file. You will have to do this by hand.
  925. Examples
  926. The format of the file from the Amiga Aztec compiler is:
  927. filename>linenumber:columnnumber:errortype:errornumber:errormessage
  928. filename name of the file in which the error was detected
  929. linenumber line number where the error was detected
  930. columnnumber column number where the error was detected
  931. errortype type of the error, normally a single 'E' or 'W'
  932. errornumber number of the error (for lookup in the manual)
  933. errormessage description of the error
  934. This can be matched with this 'errorformat' entry:
  935. %f>%l:%c:%t:%n:%m
  936. Some examples for C compilers that produce single-line error outputs:
  937. %f:%l:\ %t%*[^0123456789]%n:\ %m for Manx/Aztec C error messages
  938. (scanf() doesn't understand [0-9])
  939. %f\ %l\ %t%*[^0-9]%n:\ %m for SAS C
  940. \"%f\"\\,%*[^0-9]%l:\ %m for generic C compilers
  941. %f:%l:\ %m for GCC
  942. %f:%l:\ %m,%Dgmake[%*\\d]:\ Entering\ directory\ `%f',
  943. %Dgmake[%*\\d]:\ Leaving\ directory\ `%f'
  944. for GCC with gmake (concat the lines!)
  945. %f(%l)\ :\ %*[^:]:\ %m old SCO C compiler (pre-OS5)
  946. %f(%l)\ :\ %t%*[^0-9]%n:\ %m idem, with error type and number
  947. %f:%l:\ %m,In\ file\ included\ from\ %f:%l:,\^I\^Ifrom\ %f:%l%m
  948. for GCC, with some extras
  949. Extended examples for the handling of multi-line messages are given below,
  950. see |errorformat-Jikes| and |errorformat-LaTeX|.
  951. Note the backslash in front of a space and double quote. It is required for
  952. the :set command. There are two backslashes in front of a comma, one for the
  953. :set command and one to avoid recognizing the comma as a separator of

Large files are truncated, but you can click here to view the full file