home *** CD-ROM | disk | FTP | other *** search
/ vim.ftp.fu-berlin.de / 2015-02-03.vim.ftp.fu-berlin.de.tar / vim.ftp.fu-berlin.de / patches / 6.1.130 < prev    next >
Encoding:
Internet Message Format  |  2002-07-20  |  37.7 KB

  1. To: vim-dev@vim.org
  2. Subject: Patch 6.1.130
  3. Fcc: outbox
  4. From: Bram Moolenaar <Bram@moolenaar.net>
  5. Mime-Version: 1.0
  6. Content-Type: text/plain; charset=ISO-8859-1
  7. Content-Transfer-Encoding: 8bit
  8. ------------
  9.  
  10. Patch 6.1.130
  11. Problem:    The documentation for some of the 'errorformat' items is unclear.
  12. Solution:   Add more examples and explain hard to understand items. (Stefan
  13.         Roemer)
  14. Files:        runtime/doc/quickfix.txt
  15.  
  16.  
  17. *** ../vim61.129/runtime/doc/quickfix.txt    Tue Apr 23 22:43:00 2002
  18. --- runtime/doc/quickfix.txt    Mon Jul 15 21:39:54 2002
  19. ***************
  20. *** 1,52 ****
  21. ! *quickfix.txt*  For Vim version 6.1.  Last change: 2002 Apr 23
  22.   
  23.   
  24.             VIM REFERENCE MANUAL    by Bram Moolenaar
  25.   
  26.   
  27. - {Vi does not have any of these commands}
  28. - The quickfix commands are not available when the |+quickfix| feature was
  29. - disabled at compile time.
  30.   This subject is introduced in section |30.1| of the user manual.
  31.   
  32.   1. Using QuickFix commands        |quickfix|
  33.   2. The error window            |quickfix-window|
  34. ! 3. Selecting a compiler            |compiler-select|
  35. ! 4. Using more than one list of errors    |quickfix-error-lists|
  36. ! 5. Using :make                |:make_makeprg|
  37. ! 6. The error file format        |error-file-format|
  38. ! 7. The directory stack            |quickfix-directory-stack|
  39. ! 8. Specific error file formats        |errorformats|
  40.   
  41.   =============================================================================
  42.   1. Using QuickFix commands            *quickfix* *Quickfix* *E42*
  43.   
  44.   Vim has a special mode to speedup the edit-compile-edit cycle.  This is
  45.   inspired by the quickfix option of the Manx's Aztec C compiler on the Amiga.
  46. ! The idea is to save the error messages from the compiler in a file and use
  47. ! Vim to jump to the errors one by one.  You can then examine each problem and
  48. ! fix it, without having to remember all the error messages.
  49. ! If you are using Manx's Aztec C compiler on the Amiga you should do the
  50. ! following:
  51. ! - Set the CCEDIT environment variable with the command
  52. !     mset "CCEDIT=vim -q"
  53. ! - Compile with the -qf option.  If the compiler finds any errors, Vim is
  54. !   started and the cursor is positioned on the first error.  The error message
  55. !   will be displayed on the last line.  You can go to other errors with the
  56. !   commands mentioned below.  You can fix the errors and write the file(s).
  57. ! - If you exit Vim normally the compiler will re-compile the same file.  If you
  58. !   exit with the :cq command, the compiler will terminate.  Do this if you
  59. !   cannot fix the error, or if another file needs to be compiled first.
  60.   
  61. ! If you are using another compiler you should save the error messages in a
  62. ! file and start Vim with "vim -q filename".  An easy way to do this is with
  63. ! the ":make" command (see below).  The 'errorformat' option should be set to
  64. ! match the error messages from your compiler (see below).
  65. ! The following commands can be used if you are in QuickFix mode:
  66.   
  67.                               *:cc*
  68.   :cc[!] [nr]        Display error [nr].  If [nr] is omitted, the same
  69. --- 1,43 ----
  70. ! *quickfix.txt*  For Vim version 6.1.  Last change: 2002 Jul 15
  71.   
  72.   
  73.             VIM REFERENCE MANUAL    by Bram Moolenaar
  74.   
  75.   
  76.   This subject is introduced in section |30.1| of the user manual.
  77.   
  78.   1. Using QuickFix commands        |quickfix|
  79.   2. The error window            |quickfix-window|
  80. ! 3. Using more than one list of errors    |quickfix-error-lists|
  81. ! 4. Using :make                |:make_makeprg|
  82. ! 5. Using :grep                |grep|
  83. ! 6. Selecting a compiler            |compiler-select|
  84. ! 7. The error format            |error-file-format|
  85. ! 8. The directory stack            |quickfix-directory-stack|
  86. ! 9. Specific error file formats        |errorformats|
  87. ! {Vi does not have any of these commands}
  88. ! The quickfix commands are not available when the |+quickfix| feature was
  89. ! disabled at compile time.
  90.   
  91.   =============================================================================
  92.   1. Using QuickFix commands            *quickfix* *Quickfix* *E42*
  93.   
  94.   Vim has a special mode to speedup the edit-compile-edit cycle.  This is
  95.   inspired by the quickfix option of the Manx's Aztec C compiler on the Amiga.
  96. ! The idea is to save the error messages from the compiler in a file and use Vim
  97. ! to jump to the errors one by one.  You can examine each problem and fix it,
  98. ! without having to remember all the error messages.
  99. ! If you are using Manx's Aztec C compiler on the Amiga look here for how to use
  100. ! it with Vim: |quickfix-manx|.  If you are using another compiler you should
  101. ! save the error messages in a file and start Vim with "vim -q filename".  An
  102. ! easy way to do this is with the |:make| command (see below).  The
  103. ! 'errorformat' option should be set to match the error messages from your
  104. ! compiler (see |errorformat| below).
  105.   
  106. ! The following quickfix commands can be used:
  107.   
  108.                               *:cc*
  109.   :cc[!] [nr]        Display error [nr].  If [nr] is omitted, the same
  110. ***************
  111. *** 119,162 ****
  112.   :cl[ist]! [from] [, [to]]
  113.               List all errors.
  114.   
  115. !                             *:mak* *:make*
  116. ! :mak[e][!] [arguments]    1. If the 'autowrite' option is on, write any changed
  117. !                buffers
  118. !             2. An errorfile name is made from 'makeef'.  If
  119. !                'makeef' doesn't contain "##", and a file with this
  120. !                name already exists, it is deleted.
  121. !             3. The program given with the 'makeprg' option is
  122. !                started (default "make") with the optional
  123. !                [arguments] and the output is saved in the
  124. !                errorfile (for Unix it is also echoed on the
  125. !                screen).
  126. !             4. The errorfile is read
  127. !             5. If [!] is not given the first error is jumped to.
  128. !             6. The errorfile is deleted.
  129. !             7. You can now move through the errors with commands
  130. !                like |:cnext| and |:cprevious|, see above.
  131. !             This command does not accept a comment, any "
  132. !             characters are considered part of the arguments.
  133. !                                 *:gr* *:grep*
  134. ! :gr[ep][!] [arguments]    Just like ":make", but use 'grepprg' instead of
  135. !             'makeprg' and 'grepformat' instead of 'errorformat'.
  136. !             See |grep|.
  137. !             [Unix trivia: The name for the Unix "grep" command
  138. !             comes from ":g/re/p", where "re" stands for Regular
  139. !             Expression.]
  140. !                             *:grepa* *:grepadd*
  141. ! :grepa[dd][!] [arguments]
  142. !             Just like ":grep", but instead of making a new list of
  143. !             errors the matches are appended to the current list.
  144. !             Example: >
  145. !                 :grep nothing %
  146. !                 :bufdo grepadd! something %
  147. ! <            The first command makes a new error list which is
  148. !             empty.  The second command executes "grepadd" for each
  149. !             listed buffer.  Note the use of ! to avoid that
  150. !             ":grepadd" jumps to the first error, which is not
  151. !             allowed with |:bufdo|.
  152.   
  153.   =============================================================================
  154.   2. The error window                    *quickfix-window*
  155. --- 110,120 ----
  156.   :cl[ist]! [from] [, [to]]
  157.               List all errors.
  158.   
  159. ! If you insert or delete lines, mostly the correct error location is still
  160. ! found because hidden marks are used.  Sometimes, when the mark has been
  161. ! deleted for some reason, the message "line changed" is shown to warn you that
  162. ! the error location may not be correct.  If you quit Vim and start again the
  163. ! marks are lost and the error locations may not be correct anymore.
  164.   
  165.   =============================================================================
  166.   2. The error window                    *quickfix-window*
  167. ***************
  168. *** 187,195 ****
  169.       :botright cwindow
  170.   You can move the window around with |window-moving| commands.
  171.   For example, to move it to the top: CTRL-W K
  172. ! The window will mostly keep its height, ignoring 'winheight' and
  173. ! 'equalalways'.  You can change the height manually (e.g., by dragging the
  174. ! status line above it with the mouse).
  175.   
  176.   In the quickfix window, each line is one error.  The line number is equal to
  177.   the error number.  You can use ":.cc" to jump to the error under the cursor.
  178. --- 145,153 ----
  179.       :botright cwindow
  180.   You can move the window around with |window-moving| commands.
  181.   For example, to move it to the top: CTRL-W K
  182. ! The 'winfixheight' option will be set, which means that the window will mostly
  183. ! keep its height, ignoring 'winheight' and 'equalalways'.  You can change the
  184. ! height manually (e.g., by dragging the status line above it with the mouse).
  185.   
  186.   In the quickfix window, each line is one error.  The line number is equal to
  187.   the error number.  You can use ":.cc" to jump to the error under the cursor.
  188. ***************
  189. *** 217,260 ****
  190.   list.
  191.   
  192.   =============================================================================
  193. ! 3. Selecting a compiler                    *compiler-select*
  194. !                             *:comp* *:compiler*
  195. ! :compiler {name}        Set options to work with compiler {name}.
  196. !                 {not available when compiled without the
  197. !                 |+eval| feature}
  198. ! What this command actually does is:
  199. ! - delete the "current_compiler" variable
  200. ! - execute ":runtime! compiler/{name}.vim"
  201. ! For writing a compiler plugin, see |write-compiler-plugin|.
  202. ! TEX COMPILER                        *compiler-tex*
  203. ! Included in the distribution compiler for TeX ($VIMRUNTIME/compiler/tex.vim)
  204. ! is intended to handle all flavors of TeX formats. If b:tex_flavor or
  205. ! g:tex_flavor (in this precedence) variable exists, it defines TeX flavor for
  206. ! :make (actually, this is the name of executed command), and if both variables
  207. ! do not exist, it defaults to "latex". For example, while editing chapter2.tex
  208. ! \input-ed from mypaper.tex written in AMS-TeX: >
  209. !     :let b:tex_flavor = 'amstex'
  210. !     :compiler tex
  211. ! <    [editing...] >
  212. !     :make mypaper
  213. ! Note that you must specify a name of the file to process as an argument (to
  214. ! process the right file when editing \input-ed or \include-ed file; portable
  215. ! solution for substituting % for no arguments is welcome). This is not in the
  216. ! semantics of make, but you may specify filename without extension ".tex" and
  217. ! mean this as "make filename.dvi or filename.pdf or
  218. ! filename.some_result_extension according to compiler"
  219. ! =============================================================================
  220. ! 4. Using more than one list of errors            *quickfix-error-lists*
  221.   
  222.   So far has been assumed that there is only one list of errors.  Actually the
  223.   ten last used lists are remembered.  When starting a new list, the previous
  224. --- 175,181 ----
  225.   list.
  226.   
  227.   =============================================================================
  228. ! 3. Using more than one list of errors            *quickfix-error-lists*
  229.   
  230.   So far has been assumed that there is only one list of errors.  Actually the
  231.   ten last used lists are remembered.  When starting a new list, the previous
  232. ***************
  233. *** 279,285 ****
  234.   lists, use ":cnewer 99" first.
  235.   
  236.   =============================================================================
  237. ! 5. Using :make                        *:make_makeprg*
  238.   
  239.   The ":make" command executes the command given with the 'makeprg' option.
  240.   This is done by passing the command to the shell given with the 'shell'
  241. --- 200,225 ----
  242.   lists, use ":cnewer 99" first.
  243.   
  244.   =============================================================================
  245. ! 4. Using :make                        *:make_makeprg*
  246. !                             *:mak* *:make*
  247. ! :mak[e][!] [arguments]    1. If the 'autowrite' option is on, write any changed
  248. !                buffers
  249. !             2. An errorfile name is made from 'makeef'.  If
  250. !                'makeef' doesn't contain "##", and a file with this
  251. !                name already exists, it is deleted.
  252. !             3. The program given with the 'makeprg' option is
  253. !                started (default "make") with the optional
  254. !                [arguments] and the output is saved in the
  255. !                errorfile (for Unix it is also echoed on the
  256. !                screen).
  257. !             4. The errorfile is read using 'errorformat'.
  258. !             5. If [!] is not given the first error is jumped to.
  259. !             6. The errorfile is deleted.
  260. !             7. You can now move through the errors with commands
  261. !                like |:cnext| and |:cprevious|, see above.
  262. !             This command does not accept a comment, any "
  263. !             characters are considered part of the arguments.
  264.   
  265.   The ":make" command executes the command given with the 'makeprg' option.
  266.   This is done by passing the command to the shell given with the 'shell'
  267. ***************
  268. *** 313,319 ****
  269.   "|& tee" or "2>&1| tee" is the default, so stderr output will be included.
  270.   
  271.   If 'shellpipe' is empty, the {errorfile} part will be omitted.  This is useful
  272. ! for compilers that write to an errorfile themselves (Manx's Amiga C).
  273.   
  274.   There are some restrictions to the Quickfix mode on the Amiga.  The
  275.   compiler only writes the first 25 errors to the errorfile (Manx's
  276. --- 253,388 ----
  277.   "|& tee" or "2>&1| tee" is the default, so stderr output will be included.
  278.   
  279.   If 'shellpipe' is empty, the {errorfile} part will be omitted.  This is useful
  280. ! for compilers that write to an errorfile themselves (e.g., Manx's Amiga C).
  281. ! ==============================================================================
  282. ! 5. Using :grep                        *grep* *lid*
  283. ! Vim can interface with "grep" and grep-like programs (such as the GNU
  284. ! id-utils) in a similar way to its compiler integration (see |:make| above).
  285. ! [Unix trivia: The name for the Unix "grep" command comes from ":g/re/p", where
  286. ! "re" stands for Regular Expression.]
  287. !                                 *:gr* *:grep*
  288. ! :gr[ep][!] [arguments]    Just like ":make", but use 'grepprg' instead of
  289. !             'makeprg' and 'grepformat' instead of 'errorformat'.
  290. !                             *:grepa* *:grepadd*
  291. ! :grepa[dd][!] [arguments]
  292. !             Just like ":grep", but instead of making a new list of
  293. !             errors the matches are appended to the current list.
  294. !             Example: >
  295. !                 :grep nothing %
  296. !                 :bufdo grepadd! something %
  297. ! <            The first command makes a new error list which is
  298. !             empty.  The second command executes "grepadd" for each
  299. !             listed buffer.  Note the use of ! to avoid that
  300. !             ":grepadd" jumps to the first error, which is not
  301. !             allowed with |:bufdo|.
  302. ! 5.1 Setting up grep
  303. ! If you have a standard "grep" program installed, the :grep command may work
  304. ! well with the defaults. The syntax is very similar to the standard command: >
  305. !     :grep foo *.c
  306. ! Will search all files with the .c extension for the substring "foo". The
  307. ! arguments to :grep are passed straight to the "grep" program, so you can use
  308. ! whatever options your "grep" supports.
  309. ! By default, :grep invokes grep with the -n option (show file and line
  310. ! numbers). You can change this with the 'grepprg' option. You will need to set
  311. ! 'grepprg' if:
  312. ! a)    You are using a program that isn't called "grep"
  313. ! b)    You have to call grep with a full path
  314. ! c)    You want to pass other options automatically (e.g. case insensitive
  315. !     search.)
  316. ! Once "grep" has executed, Vim parses the results using the 'grepformat'
  317. ! option.  This option works in the same way as the 'errorformat' option - see
  318. ! that for details.  You may need to change 'grepformat' from the default if
  319. ! your grep outputs in a non-standard format, or you are using some other
  320. ! program with a special format.
  321. ! Once the results are parsed, Vim loads the first file containing a match and
  322. ! jumps to the appropriate line, in the same way that it jumps to a compiler
  323. ! error in |quickfix| mode.  You can then use the |:cnext|, |:clist|, etc.
  324. ! commands to see the other matches.
  325. ! 5.2 Using :grep with id-utils
  326. ! You can set up :grep to work with the GNU id-utils like this: >
  327. !     :set grepprg=lid\ -Rgrep\ -s
  328. !     :set grepformat=%f:%l:%m
  329. ! then >
  330. !     :grep (regexp)
  331. ! works just as you'd expect.
  332. ! (provided you remembered to mkid first :)
  333. ! 5.3 Browsing source code with :grep
  334. ! Using the stack of error lists that Vim keeps, you can browse your files to
  335. ! look for functions and the functions they call.  For example, suppose that you
  336. ! have to add an argument to the read_file() function.  You enter this command: >
  337. !     :grep read_file *.c
  338. ! You use ":cn" to go along the list of matches and add the argument.  At one
  339. ! place you have to get the new argument from a higher level function msg(), and
  340. ! need to change that one too.  Thus you use: >
  341. !     :grep msg *.c
  342. ! While changing the msg() functions, you find another function that needs to
  343. ! get the argument from a higher level.  You can again use ":grep" to find these
  344. ! functions.  Once you are finished with one function, you can use >
  345. !     :colder
  346. ! to go back to the previous one.
  347. ! This works like browsing a tree: ":grep" goes one level deeper, creating a
  348. ! list of branches.  ":colder" goes back to the previous level.  You can mix
  349. ! this use of ":grep" and "colder" to browse all the locations in a tree-like
  350. ! way.  If you do this consistently, you will find all locations without the
  351. ! need to write down a "todo" list.
  352. ! =============================================================================
  353. ! 6. Selecting a compiler                    *compiler-select*
  354. !                             *:comp* *:compiler*
  355. ! :compiler {name}        Set options to work with compiler {name}.
  356. !                 {not available when compiled without the
  357. !                 |+eval| feature}
  358. ! What this command actually does is:
  359. ! - delete the "current_compiler" variable
  360. ! - execute ":runtime! compiler/{name}.vim"
  361. ! For writing a compiler plugin, see |write-compiler-plugin|.
  362. ! MANX AZTEC C                        *quickfix-manx*
  363. ! To use Vim with Manx's Aztec C compiler on the Amiga you should do the
  364. ! following:
  365. ! - Set the CCEDIT environment variable with the command
  366. !     mset "CCEDIT=vim -q"
  367. ! - Compile with the -qf option.  If the compiler finds any errors, Vim is
  368. !   started and the cursor is positioned on the first error.  The error message
  369. !   will be displayed on the last line.  You can go to other errors with the
  370. !   commands mentioned below.  You can fix the errors and write the file(s).
  371. ! - If you exit Vim normally the compiler will re-compile the same file.  If you
  372. !   exit with the :cq command, the compiler will terminate.  Do this if you
  373. !   cannot fix the error, or if another file needs to be compiled first.
  374.   
  375.   There are some restrictions to the Quickfix mode on the Amiga.  The
  376.   compiler only writes the first 25 errors to the errorfile (Manx's
  377. ***************
  378. *** 321,361 ****
  379.   you will have to fix a few errors and exit the editor.  After recompiling,
  380.   up to 25 remaining errors will be found.
  381.   
  382. ! On the Amiga, if Vim was started from the compiler, the :sh and some :!
  383. ! commands will not work, because Vim is then running in the same process as the
  384. ! compiler and stdin (standard input) will not be interactive.
  385.   
  386. - If you insert or delete lines, mostly the correct error location is still
  387. - found because hidden marks are used (Manx's Z editor does not do this).
  388. - Sometimes, when the mark has been deleted for some reason, the message "line
  389. - changed" is shown to warn you that the error location may not be correct.  If
  390. - you quit Vim and start again the marks are lost and the error locations may
  391. - not be correct anymore.
  392.   
  393. ! =============================================================================
  394. ! 6. The error file format                *error-file-format*
  395.   
  396. ! A template for the errorfile name can be set with the 'makeef' option.  If it
  397. ! includes "##", Vim will replace this with a number to make it a unique name.
  398.   
  399. ! The format of the file from the Aztec compiler is:
  400.   
  401. !     filename>linenumber:columnnumber:errortype:errornumber:errormessage
  402.   
  403. !     filename    name of the file in which the error was detected
  404. !     linenumber    line number where the error was detected
  405. !     columnnumber    column number where the error was detected
  406. !     errortype    type of the error, normally a single 'E' or 'W'
  407. !     errornumber    number of the error (for lookup in the manual)
  408. !     errormessage    description of the error
  409.   
  410.                       *errorformat* *E372* *E373* *E374*
  411.                           *E375* *E376* *E377* *E378*
  412. ! Another compiler is likely to use a different format.  You should set the
  413. ! 'errorformat' option to a scanf-like string that describes the format.
  414.   First, you need to know how scanf works.  Look in the documentation of your
  415. ! C compiler.  Vim will understand the following conversion characters.
  416. ! Others are invalid.
  417.       %f        file name (finds a string)
  418.       %l        line number (finds a number)
  419.       %c        column number (finds a number representing character
  420. --- 390,446 ----
  421.   you will have to fix a few errors and exit the editor.  After recompiling,
  422.   up to 25 remaining errors will be found.
  423.   
  424. ! If Vim was started from the compiler, the :sh and some :!  commands will not
  425. ! work, because Vim is then running in the same process as the compiler and
  426. ! stdin (standard input) will not be interactive.
  427.   
  428.   
  429. ! TEX COMPILER                        *compiler-tex*
  430.   
  431. ! Included in the distribution compiler for TeX ($VIMRUNTIME/compiler/tex.vim)
  432. ! is intended to handle all flavors of TeX formats. If b:tex_flavor or
  433. ! g:tex_flavor (in this precedence) variable exists, it defines TeX flavor for
  434. ! :make (actually, this is the name of executed command), and if both variables
  435. ! do not exist, it defaults to "latex". For example, while editing chapter2.tex
  436. ! \input-ed from mypaper.tex written in AMS-TeX: >
  437.   
  438. !     :let b:tex_flavor = 'amstex'
  439. !     :compiler tex
  440. ! <    [editing...] >
  441. !     :make mypaper
  442.   
  443. ! Note that you must specify a name of the file to process as an argument (to
  444. ! process the right file when editing \input-ed or \include-ed file; portable
  445. ! solution for substituting % for no arguments is welcome). This is not in the
  446. ! semantics of make, but you may specify filename without extension ".tex" and
  447. ! mean this as "make filename.dvi or filename.pdf or
  448. ! filename.some_result_extension according to compiler"
  449.   
  450. ! =============================================================================
  451. ! 7. The error format                    *error-file-format*
  452.   
  453.                       *errorformat* *E372* *E373* *E374*
  454.                           *E375* *E376* *E377* *E378*
  455. ! The 'errorformat' option specifies a list of formats that are recognized.  The
  456. ! first format that matches with an error message is used.  You can add several
  457. ! formats for different messages your compiler produces, or even entries for
  458. ! multiple compilers.  See |efm-entries|.
  459. ! Each entry in 'errorformat' is a scanf-like string that describes the format.
  460.   First, you need to know how scanf works.  Look in the documentation of your
  461. ! C compiler.  Below you find the % items that Vim understands.  Others are
  462. ! invalid.
  463. ! Special characters in 'errorformat' are comma and backslash.  See
  464. ! |efm-entries| for how to deal with them.  Note that a literal "%" is matched
  465. ! by "%%", thus it is not escaped with a backslash.
  466. ! Note: By default the difference between upper and lowercase is ignored.  If
  467. ! you want to match case, add "\C" to the pattern |/\C|.
  468. ! Basic items
  469.       %f        file name (finds a string)
  470.       %l        line number (finds a number)
  471.       %c        column number (finds a number representing character
  472. ***************
  473. *** 372,377 ****
  474. --- 457,486 ----
  475.       %*{conv}    any scanf non-assignable conversion
  476.       %%        the single '%' character
  477.   
  478. + The "%f" conversion depends on the current 'isfname' setting.
  479. + The "%f" and "%m" conversions have to detect the end of the string.  They
  480. + should be followed by a character that cannot be in the string.  Everything
  481. + up to that character is included in the string.  But when the next character
  482. + is a '%' or a backslash, "%f" will look for any 'isfname' character and "%m"
  483. + finds anything.  If the "%f" or "%m" is at the end, everything up to the end
  484. + of the line is included.
  485. + On MS-DOS, MS-Windows and OS/2 a leading "C:" will be included in "%f", even
  486. + when using "%f:".  This means that a file name which is a single alphabetical
  487. + letter will not be detected.
  488. + The "%p" conversion is normally followed by a "^".  It's used for compilers
  489. + that output a line like: >
  490. +             ^
  491. + or >
  492. +    ---------^
  493. + to indicate the column of the error.  This is to be used in a multi-line error
  494. + message.  See |errorformat-javac| for a  useful example.
  495. + Changing directory
  496.   The following uppercase conversion characters specify the type of special
  497.   format strings.  At most one of them may be given as a prefix at the begin
  498.   of a single comma-separated format pattern.
  499. ***************
  500. *** 383,406 ****
  501.                 %f that finds the directory name
  502.       %X        "leave directory" format string; expects following %f
  503.   
  504. !                         *errorformat-multi-line*
  505. ! It is possible to read the output of programs that produce multi-line messages,
  506. ! ie. error strings that consume more than one line. Possible prefixes are:
  507. !     %A        start of a multi-line message (unspecified type)
  508.       %E        start of a multi-line error message
  509.       %W        start of a multi-line warning message
  510.       %I        start of a multi-line informational message
  511.       %C        continuation of a multi-line message
  512.       %Z        end of a multi-line message
  513. !     %G        global; useful only in conjunction with '+' or '-'
  514.       %O        single-line file message: overread the matched part
  515.       %P        single-line file message: push file %f onto the stack
  516.       %Q        single-line file message: pop the last file from stack
  517.   The codes '+' or '-' can be combined with the uppercase codes above; in that
  518.   case they have to precede the letter, eg. '%+A' or '%-G':
  519.       %-        do not include the matching multi-line in any output
  520.       %+        include the whole matching line in the %m error string
  521.   
  522.   The scanf()-like "%*[]" notation is supported for backward-compatibility
  523.   with previous versions of Vim.  However, it is also possible to specify
  524.   (nearly) any Vim supported regular expression in format strings.
  525. --- 492,623 ----
  526.                 %f that finds the directory name
  527.       %X        "leave directory" format string; expects following %f
  528.   
  529. ! When defining an "enter directory" or "leave directory" format, the "%D" or
  530. ! "%X" has to be given at the start of that substring. Vim tracks the directory
  531. ! changes and prepends the current directory to each erroneous file found with a
  532. ! relative path.  See |quickfix-directory-stack| for details, tips and
  533. ! limitations.
  534. ! Multi-line messages                *errorformat-multi-line*
  535. ! It is possible to read the output of programs that produce multi-line
  536. ! messages, ie. error strings that consume more than one line.  Possible
  537. ! prefixes are:
  538.       %E        start of a multi-line error message
  539.       %W        start of a multi-line warning message
  540.       %I        start of a multi-line informational message
  541. +     %A        start of a multi-line message (unspecified type)
  542.       %C        continuation of a multi-line message
  543.       %Z        end of a multi-line message
  544. ! These can be used with '+' and '-', see |efm-ignore| below.
  545. ! Example: Your compiler happens to write out errors in the following format
  546. ! (leading line numbers not being part of the actual output):
  547. !      1    Error 275
  548. !      2    line 42
  549. !      3    column 3
  550. !      4    ' ' expected after '--'
  551. ! The appropriate error format string has to look like this: >
  552. !    :set efm=%EError\ %n,%Cline\ %l,%Ccolumn\ %c,%Z%m
  553. ! And the |:clist| error message generated for this error is:
  554. !  1:42 col 3 error 275:  ' ' expected after '--'
  555. ! Another example: Think of a Python interpreter that produces the following
  556. ! error message (line numbers are not part of the actual output):
  557. !      1    ==============================================================
  558. !      2    FAIL: testGetTypeIdCachesResult (dbfacadeTest.DjsDBFacadeTest)
  559. !      3    --------------------------------------------------------------
  560. !      4    Traceback (most recent call last):
  561. !      5      File "unittests/dbfacadeTest.py", line 89, in testFoo
  562. !      6        self.assertEquals(34, dtid)
  563. !      7      File "/usr/lib/python2.2/unittest.py", line 286, in
  564. !      8     failUnlessEqual
  565. !      9        raise self.failureException, \
  566. !     10    AssertionError: 34 != 33
  567. !     11    
  568. !     12    --------------------------------------------------------------
  569. !     13    Ran 27 tests in 0.063s
  570. ! Say you want |:clist| write the relevant information of this message only,
  571. ! namely:
  572. !  5 unittests/dbfacadeTest.py:89:  AssertionError: 34 != 33
  573. ! Then the error format string could be defined as follows: >
  574. !   :set efm=%C\ %.%#,%A\ \ File\ \"%f\"\\,\ line\ %l%.%#,%Z%[%^\ ]%\\@=%m
  575. ! Note that the %C string is given before the %A here: since the expression
  576. ! ' %.%#' (which stands for the regular expression ' .*') matches every line
  577. ! starting with a space, followed by any characters to the end of the line,
  578. ! it also hides line 7 which would trigger a separate error message otherwise.
  579. ! Error format strings are always parsed pattern by pattern until the first
  580. ! match occurs.
  581. ! Separate file name            *errorformat-separate-filename*
  582. ! These prefixes are useful if the file name is given once and multiple messages
  583. ! follow that refer to this file name.
  584.       %O        single-line file message: overread the matched part
  585.       %P        single-line file message: push file %f onto the stack
  586.       %Q        single-line file message: pop the last file from stack
  587. + Example: Given a compiler that produces the following error logfile (without
  588. + leading line numbers):
  589. +      1    [a1.tt]
  590. +      2    (1,17)  error: ';' missing
  591. +      3    (21,2)  warning: variable 'z' not defined
  592. +      4    (67,3)  error: end of file found before string ended
  593. +      5    
  594. +      6    [a2.tt]
  595. +      7    
  596. +      8    [a3.tt]
  597. +      9    NEW compiler v1.1
  598. +     10    (2,2)   warning: variable 'x' not defined
  599. +     11    (67,3)  warning: 's' already defined
  600. + This logfile lists several messages for each file enclosed in [...] which are
  601. + properly parsed by an error format like this: >
  602. +   :set efm=%+P[%f],(%l\\,%c)%*[\ ]%t%*[^:]:\ %m,%-Q
  603. + A call of |:clist| writes them accordingly with their correct filenames:
  604. +   2 a1.tt:1 col 17 error: ';' missing
  605. +   3 a1.tt:21 col 2 warning: variable 'z' not defined
  606. +   4 a1.tt:67 col 3 error: end of file found before string ended
  607. +   8 a3.tt:2 col 2 warning: variable 'x' not defined
  608. +   9 a3.tt:67 col 3 warning: 's' already defined
  609. + Unlike the other prefixes that all match against whole lines, %P, %Q and %O
  610. + can be used to match several patterns in the same line. Thus it is possible
  611. + to parse even nested files like in the following line:
  612. +   {"file1" {"file2" error1} error2 {"file3" error3 {"file4" error4 error5}}}
  613. + The %O then parses over strings that do not contain any push/pop file name
  614. + information.  See |errorformat-LaTeX| for an extended example.
  615. + Ignoring and using whole messages            *efm-ignore*
  616.   The codes '+' or '-' can be combined with the uppercase codes above; in that
  617.   case they have to precede the letter, eg. '%+A' or '%-G':
  618.       %-        do not include the matching multi-line in any output
  619.       %+        include the whole matching line in the %m error string
  620.   
  621. + One prefix is only useful in combination with '+' or '-', namely %G. It parses
  622. + over lines containing general information like compiler version strings or
  623. + other headers that can be skipped.
  624. +     %-G        ignore this message
  625. +     %+G        general message
  626. + Pattern matching
  627.   The scanf()-like "%*[]" notation is supported for backward-compatibility
  628.   with previous versions of Vim.  However, it is also possible to specify
  629.   (nearly) any Vim supported regular expression in format strings.
  630. ***************
  631. *** 421,431 ****
  632.   Important note: The \(...\) grouping of sub-matches can not be used in format
  633.   specifications because it is reserved for internal conversions.
  634.   
  635. ! note: By default the difference between upper and lowercase is ignored.  If
  636. ! you want to match case, add "\C" to the pattern |/\C|.
  637.   
  638.   Some examples for C compilers that produce single-line error outputs:
  639. - %f>%l:%c:%t:%n:%m"            for the AztecC.Err file
  640.   %f:%l:\ %t%*[^0123456789]%n:\ %m    for Manx/Aztec C error messages
  641.                       (scanf() doesn't understand [0-9])
  642.   %f\ %l\ %t%*[^0-9]%n:\ %m        for SAS C
  643. --- 638,688 ----
  644.   Important note: The \(...\) grouping of sub-matches can not be used in format
  645.   specifications because it is reserved for internal conversions.
  646.   
  647. ! Multiple entries in 'errorformat'            *efm-entries*
  648. ! To be able to detect output from several compilers, several format patterns
  649. ! may be put in 'errorformat', separated by commas (note: blanks after the comma
  650. ! are ignored).  The first pattern that has a complete match is used.  If no
  651. ! match is found, matching parts from the last one will be used, although the
  652. ! file name is removed and the error message is set to the whole message.  If
  653. ! there is a pattern that may match output from several compilers (but not in a
  654. ! right way), put it after one that is more restrictive.
  655. ! To include a comma in a pattern precede it with a backslash (you have to type
  656. ! two in a ":set" command).  To include a backslash itself give two backslashes
  657. ! (you have to type four in a ":set" command).  You also need to put a backslash
  658. ! before a space for ":set".
  659. ! Valid matches                        *quickfix-valid*
  660. ! If a line does not completely match one of the entries in 'errorformat', the
  661. ! whole line is put in the error message and the entry is marked "not valid"
  662. ! These lines are skipped with the ":cn" and ":cp" commands (unless there is
  663. ! no valid line at all).  You can use ":cl!" to display all the error messages.
  664. ! If the error format does not contain a file name Vim cannot switch to the
  665. ! correct file.  You will have to do this by hand.
  666. ! Examples
  667. ! The format of the file from the Amiga Aztec compiler is:
  668. !     filename>linenumber:columnnumber:errortype:errornumber:errormessage
  669. !     filename    name of the file in which the error was detected
  670. !     linenumber    line number where the error was detected
  671. !     columnnumber    column number where the error was detected
  672. !     errortype    type of the error, normally a single 'E' or 'W'
  673. !     errornumber    number of the error (for lookup in the manual)
  674. !     errormessage    description of the error
  675. ! This can be matched with this 'errorformat' entry:
  676. !     %f>%l:%c:%t:%n:%m"
  677.   
  678.   Some examples for C compilers that produce single-line error outputs:
  679.   %f:%l:\ %t%*[^0123456789]%n:\ %m    for Manx/Aztec C error messages
  680.                       (scanf() doesn't understand [0-9])
  681.   %f\ %l\ %t%*[^0-9]%n:\ %m        for SAS C
  682. ***************
  683. *** 447,499 ****
  684.   :set command and one to avoid recognizing the comma as a separator of error
  685.   formats.
  686.   
  687. - The "%f" conversion depends on the current 'isfname' setting.
  688. - The "%f" and "%m" conversions have to detect the end of the string.  They
  689. - should be followed by a character that cannot be in the string.  Everything
  690. - up to that character is included in the string.  But when the next character
  691. - is '%' or a backslash, "%f" will look for any 'isfname' character and "%m"
  692. - finds anything.  If the "%f" or "%m" is at the end, everything up to the end
  693. - of the line is included.
  694. - On MS-DOS, MS-Windows and OS/2 a leading "C:" will be included in "%f", even
  695. - when using "%f:".  This means that a file name which is a single alphabetical
  696. - letter will not be detected.
  697. - The "%p" conversion is normally followed by a "^".  It's used for compilers
  698. - that output a line like: >
  699. -             ^
  700. - or >
  701. -    ---------^
  702. - to indicate the column of the error.  This is to be used in a multi-line error
  703. - message.  See |errorformat-javac| for a  useful example.
  704.   
  705. ! When defining an "enter directory" or "leave directory" format, the "%D" or
  706. ! "%X" has to be given at the start of that substring. Vim tracks the directory
  707. ! changes and prepends the current directory to each erroneous file found with a
  708. ! relative path.  See |quickfix-directory-stack| for details, tips and
  709. ! limitations.
  710. ! To be able to detect output from several compilers, several format patterns
  711. ! may be put in 'errorformat', separated by commas (note: blanks after the comma
  712. ! are ignored).  The first pattern that has a complete match is used.  If no
  713. ! match is found, matching parts from the last one will be used, although the
  714. ! file name is removed and the error message is set to the whole message.  If
  715. ! there is a pattern that may match output from several compilers (but not in a
  716. ! right way), put it after one that is more restrictive.  To include a comma in
  717. ! a pattern precede it with a backslash (you have to type two in a set command).
  718. ! To include a backslash itself give two backslashes (you have to type four in a
  719. ! set command).
  720. !                             *quickfix-valid*
  721. ! If a line is detected that does not completely match the 'errorformat', the
  722. ! whole line is put in the error message and the entry is marked "not valid"
  723. ! These lines are skipped with the ":cn" and ":cp" commands (unless there is
  724. ! no valid line at all).  You can use ":cl!" to display all the error messages.
  725. ! If the error format does not contain a file name Vim cannot switch to the
  726. ! correct file.  You will have to do this by hand.
  727.   
  728.   If you have a compiler that produces error messages that do not fit in the
  729.   format string, you could write a program that translates the error messages
  730. --- 704,711 ----
  731.   :set command and one to avoid recognizing the comma as a separator of error
  732.   formats.
  733.   
  734.   
  735. ! Filtering messages
  736.   
  737.   If you have a compiler that produces error messages that do not fit in the
  738.   format string, you could write a program that translates the error messages
  739. ***************
  740. *** 505,511 ****
  741.   required for the set command.
  742.   
  743.   =============================================================================
  744. ! 7. The directory stack                *quickfix-directory-stack*
  745.   
  746.   Quickfix maintains a stack for saving all used directories parsed from the
  747.   make output. For GNU-make this is rather simple, as it always prints the
  748. --- 717,723 ----
  749.   required for the set command.
  750.   
  751.   =============================================================================
  752. ! 8. The directory stack                *quickfix-directory-stack*
  753.   
  754.   Quickfix maintains a stack for saving all used directories parsed from the
  755.   make output. For GNU-make this is rather simple, as it always prints the
  756. ***************
  757. *** 588,594 ****
  758.   "Leaving dir".
  759.   
  760.   =============================================================================
  761. ! 8. Specific error file formats            *errorformats*
  762.   
  763.                           *errorformat-Jikes*
  764.   Jikes(TM), a source-to-bytecode Java compiler published by IBM Research,
  765. --- 800,806 ----
  766.   "Leaving dir".
  767.   
  768.   =============================================================================
  769. ! 9. Specific error file formats            *errorformats*
  770.   
  771.                           *errorformat-Jikes*
  772.   Jikes(TM), a source-to-bytecode Java compiler published by IBM Research,
  773. *** ../vim61.129/src/version.c    Sun Jul 21 20:30:31 2002
  774. --- src/version.c    Sun Jul 21 20:33:37 2002
  775. ***************
  776. *** 608,609 ****
  777. --- 608,611 ----
  778.   {   /* Add new patch number below this line */
  779. + /**/
  780. +     130,
  781.   /**/
  782.  
  783. -- 
  784. Me?  A skeptic?  I trust you have proof.
  785.  
  786.  ///  Bram Moolenaar -- Bram@moolenaar.net -- http://www.moolenaar.net  \\\
  787. ///   Creator of Vim -- http://vim.sf.net -- ftp://ftp.vim.org/pub/vim   \\\
  788. \\\           Project leader for A-A-P -- http://www.a-a-p.org           ///
  789.  \\\ Lord Of The Rings helps Uganda - http://iccf-holland.org/lotr.html ///
  790.