1 To: vim_dev@googlegroups.com
4 From: Bram Moolenaar <Bram@moolenaar.net>
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
11 Problem: For some compilers the error file is not easily readable.
12 Solution: Use QuickFixCmdPre for more commands. (Marcin Szamotulski)
13 Files: runtime/doc/autocmd.txt, src/quickfix.c
16 *** ../vim-7.3.467/runtime/doc/autocmd.txt 2012-02-12 20:13:55.000000000 +0100
17 --- runtime/doc/autocmd.txt 2012-03-07 20:07:23.000000000 +0100
20 QuickFixCmdPre Before a quickfix command is run (|:make|,
21 |:lmake|, |:grep|, |:lgrep|, |:grepadd|,
22 |:lgrepadd|, |:vimgrep|, |:lvimgrep|,
23 ! |:vimgrepadd|, |:lvimgrepadd|, |:cscope|).
24 The pattern is matched against the command
25 being run. When |:grep| is used but 'grepprg'
26 is set to "internal" it still matches "grep".
28 QuickFixCmdPre Before a quickfix command is run (|:make|,
29 |:lmake|, |:grep|, |:lgrep|, |:grepadd|,
30 |:lgrepadd|, |:vimgrep|, |:lvimgrep|,
31 ! |:vimgrepadd|, |:lvimgrepadd|, |:cscope|,
32 ! |:cfile|, |:cgetfile|, |:caddfile|, |:lfile|,
33 ! |:lgetfile|, |:laddfile|, |:helpgrep|,
35 The pattern is matched against the command
36 being run. When |:grep| is used but 'grepprg'
37 is set to "internal" it still matches "grep".
41 QuickFixCmdPost Like QuickFixCmdPre, but after a quickfix
42 command is run, before jumping to the first
43 ! location. See |QuickFixCmdPost-example|.
45 RemoteReply When a reply from a Vim that functions as
46 server was received |server2client()|. The
49 QuickFixCmdPost Like QuickFixCmdPre, but after a quickfix
50 command is run, before jumping to the first
51 ! location. For |:cfile| and |:lfile| commands
52 ! it is run after error file is read and before
53 ! moving to the first error.
54 ! See |QuickFixCmdPost-example|.
56 RemoteReply When a reply from a Vim that functions as
57 server was received |server2client()|. The
58 *** ../vim-7.3.467/src/quickfix.c 2012-02-22 14:58:24.000000000 +0100
59 --- src/quickfix.c 2012-03-07 20:10:07.000000000 +0100
64 qf_info_T *qi = &ql_info;
66 if (eap->cmdidx == CMD_lfile || eap->cmdidx == CMD_lgetfile
67 ! || eap->cmdidx == CMD_laddfile)
76 qf_info_T *qi = &ql_info;
78 + char_u *au_name = NULL;
81 if (eap->cmdidx == CMD_lfile || eap->cmdidx == CMD_lgetfile
82 ! || eap->cmdidx == CMD_laddfile)
86 + switch (eap->cmdidx)
88 + case CMD_cfile: au_name = (char_u *)"cfile"; break;
89 + case CMD_cgetfile: au_name = (char_u *)"cgetfile"; break;
90 + case CMD_caddfile: au_name = (char_u *)"caddfile"; break;
91 + case CMD_lfile: au_name = (char_u *)"lfile"; break;
92 + case CMD_lgetfile: au_name = (char_u *)"lgetfile"; break;
93 + case CMD_laddfile: au_name = (char_u *)"laddfile"; break;
96 + if (au_name != NULL)
97 + apply_autocmds(EVENT_QUICKFIXCMDPRE, au_name, NULL, FALSE, curbuf);
105 && (eap->cmdidx == CMD_cfile
106 || eap->cmdidx == CMD_lfile))
108 + #ifdef FEAT_AUTOCMD
109 + if (au_name != NULL)
110 + apply_autocmds(EVENT_QUICKFIXCMDPOST, au_name, NULL, FALSE, curbuf);
113 qi = GET_LOC_LIST(wp);
114 qf_jump(qi, 0, 0, eap->forceit); /* display first error */
119 + #ifdef FEAT_AUTOCMD
120 + if (au_name != NULL)
121 + apply_autocmds(EVENT_QUICKFIXCMDPOST, au_name, NULL, FALSE, curbuf);
127 *** ../vim-7.3.467/src/version.c 2012-03-07 19:38:52.000000000 +0100
128 --- src/version.c 2012-03-07 20:11:54.000000000 +0100
132 { /* Add new patch number below this line */
138 hundred-and-one symptoms of being an internet addict:
139 155. You forget to eat because you're too busy surfing the net.
141 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
142 /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
143 \\\ an exciting new programming language -- http://www.Zimbu.org ///
144 \\\ help me help AIDS victims -- http://ICCF-Holland.org ///