From 7f99d210fd6bf92619f295a439ee4ac7e1a8f353 Mon Sep 17 00:00:00 2001 From: Florian Walch Date: Thu, 3 Dec 2015 20:14:51 +0100 Subject: vim-patch:7.4.858 Problem: It's a bit clumsy to execute a command on a list of matches. Solution: Add the ":ldo", ":lfdo", ":cdo" and ":cfdo" commands. (Yegappan Lakshmanan) https://github.com/vim/vim/commit/aa23b379421aa214e6543b06c974594a25799b09 --- runtime/doc/quickfix.txt | 94 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 94 insertions(+) (limited to 'runtime/doc/quickfix.txt') diff --git a/runtime/doc/quickfix.txt b/runtime/doc/quickfix.txt index 8c428e44ef..399933b512 100644 --- a/runtime/doc/quickfix.txt +++ b/runtime/doc/quickfix.txt @@ -291,6 +291,100 @@ use this code: > au QuickfixCmdPost make call QfMakeConv() +EXECUTE A COMMAND IN ALL THE BUFFERS IN QUICKFIX OR LOCATION LIST: + *:cdo* +:cdo[!] {cmd} Execute {cmd} in each valid entry in the quickfix list. + It works like doing this: > + :cfirst + :{cmd} + :cnext + :{cmd} + etc. +< When the current file can't be |abandon|ed and the [!] + is not present, the command fails. + When an error is detected on one buffer, further + buffers will not be visited. + The last buffer (or where an error occurred) becomes + the current buffer. + {cmd} can contain '|' to concatenate several commands. + Only valid entries in the quickfix list are used. + Note: While this command is executing, the Syntax + autocommand event is disabled by adding it to + 'eventignore'. This considerably speeds up editing + each buffer. + Also see |:bufdo|, |:tabdo|, |:argdo|, |:windo|, + |:ldo|, |:cfdo| and |:lfdo|. + + *:cfdo* +:cfdo[!] {cmd} Execute {cmd} in each file in the quickfix list. + It works like doing this: > + :cfirst + :{cmd} + :cnfile + :{cmd} + etc. +< When the current file can't be |abandon|ed and the [!] + is not present, the command fails. + When an error is detected on one buffer, further + buffers will not be visited. + The last buffer (or where an error occurred) becomes + the current buffer. + {cmd} can contain '|' to concatenate several commands. + Only valid entries in the quickfix list are used. + Note: While this command is executing, the Syntax + autocommand event is disabled by adding it to + 'eventignore'. This considerably speeds up editing + each buffer. + Also see |:bufdo|, |:tabdo|, |:argdo|, |:windo|, + |:cdo|, |:ldo| and |:lfdo|. + + *:ldo* +:ld[o][!] {cmd} Execute {cmd} in each valid entry in the location list + for the current window. + It works like doing this: > + :lfirst + :{cmd} + :lnext + :{cmd} + etc. +< When the current file can't be |abandon|ed and the [!] + is not present, the command fails. + When an error is detected on one buffer, further + buffers will not be visited. + The last buffer (or where an error occurred) becomes + the current buffer. + {cmd} can contain '|' to concatenate several commands. + Only valid entries in the location list are used. + Note: While this command is executing, the Syntax + autocommand event is disabled by adding it to + 'eventignore'. This considerably speeds up editing + each buffer. + Also see |:bufdo|, |:tabdo|, |:argdo|, |:windo|, + |:cdo|, |:cfdo| and |:lfdo|. + + *:lfdo* +:lfdo[!] {cmd} Execute {cmd} in each file in the location list for + the current window. + It works like doing this: > + :lfirst + :{cmd} + :lnfile + :{cmd} + etc. +< When the current file can't be |abandon|ed and the [!] + is not present, the command fails. + When an error is detected on one buffer, further + buffers will not be visited. + The last buffer (or where an error occurred) becomes + the current buffer. + {cmd} can contain '|' to concatenate several commands. + Only valid entries in the location list are used. + Note: While this command is executing, the Syntax + autocommand event is disabled by adding it to + 'eventignore'. This considerably speeds up editing + each buffer. + Also see |:bufdo|, |:tabdo|, |:argdo|, |:windo|, + |:cdo|, |:ldo| and |:cfdo|. ============================================================================= 2. The error window *quickfix-window* -- cgit