File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- *change.txt* For Vim version 9.1. Last change: 2024 Oct 07
1+ *change.txt* For Vim version 9.1. Last change: 2024 Nov 12
22
33
44 VIM REFERENCE MANUAL by Bram Moolenaar
@@ -586,6 +586,8 @@ comment (starting with '"') after the `:!` command.
586586 program {filter} (for {Visual} see | Visual-mode | ).
587587
588588:{range} ![!]{filter} [!][arg] *:range!*
589+ For executing external commands see | :! |
590+
589591 Filter {range} lines through the external program
590592 {filter} . Vim replaces the optional bangs with the
591593 latest given command and appends the optional [arg] .
Original file line number Diff line number Diff line change 1- *usr_10.txt* For Vim version 9.1. Last change: 2019 Nov 22
1+ *usr_10.txt* For Vim version 9.1. Last change: 2024 Nov 12
22
33 VIM USER MANUAL - by Bram Moolenaar
44
@@ -736,6 +736,11 @@ The "!!" command filters the current line through a filter. In Unix the "date"
736736command prints the current time and date. "!!date<Enter> " replaces the current
737737line with the output of "date". This is useful to add a timestamp to a file.
738738
739+ Note: There is a difference between "!cmd" (e.g. using it without any file
740+ range) and "{range} !cmd". While the former will simply execute the external
741+ command and Vim will show the output, the latter will filter {range} lines
742+ through the filter and replace that range by the result of the filter command.
743+ See | :! | and | :range! | for details.
739744
740745WHEN IT DOESN'T WORK
741746
Original file line number Diff line number Diff line change 1- *various.txt* For Vim version 9.1. Last change: 2024 Oct 05
1+ *various.txt* For Vim version 9.1. Last change: 2024 Nov 12
22
33
44 VIM REFERENCE MANUAL by Bram Moolenaar
@@ -254,7 +254,8 @@ g8 Print the hex values of the bytes used in the
254254
255255 *:!cmd* *:!*
256256:!{cmd} Execute {cmd} with the shell. See also the 'shell'
257- and 'shelltype' option.
257+ and 'shelltype' option. For the filter command, see
258+ | :range! | .
258259 *E34*
259260 Any '!' in {cmd} is replaced with the previous
260261 external command (see also 'cpoptions' ). But not when
You can’t perform that action at this time.
0 commit comments