1
- *editing.txt* For Vim version 8.0 . Last change: 2017 Aug 21
1
+ *editing.txt* For Vim version 8.1 . Last change: 2018 Mar 29
2
2
3
3
4
4
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -424,6 +424,15 @@ On Unix and a few other systems you can also use backticks for the file name
424
424
argument, for example: >
425
425
:next `find . -name ver\\*.c -print`
426
426
:view `ls -t *.patch \| head -n1`
427
+ Vim will run the command in backticks using the 'shell' and use the standard
428
+ output as argument for the given Vim command (error messages from the shell
429
+ command will be discarded).
430
+ To see what shell command Vim is running, set the 'verbose' option to 4. When
431
+ the shell command returns a non-zero exit code, an error message will be
432
+ displayed and the Vim command will be aborted. To avoid this make the shell
433
+ always return zero like so: >
434
+ :next `find . -name ver\\*.c -print \|\| true`
435
+
427
436
The backslashes before the star are required to prevent the shell from
428
437
expanding "ver*.c" prior to execution of the find program. The backslash
429
438
before the shell pipe symbol "|" prevents Vim from parsing it as command
@@ -650,8 +659,7 @@ list of the current window.
650
659
There is no check for duplicates, it is possible to
651
660
add a file to the argument list twice.
652
661
The currently edited file is not changed.
653
- {not in Vi} {not available when compiled without the
654
- | +listcmds | feature}
662
+ {not in Vi}
655
663
Note: you can also use this method: >
656
664
:args ## x
657
665
< This will add the "x" item and sort the new list.
@@ -665,8 +673,7 @@ list of the current window.
665
673
when it's deleted from the argument list.
666
674
Example: >
667
675
:argdel *.obj
668
- < {not in Vi} {not available when compiled without the
669
- | +listcmds | feature}
676
+ < {not in Vi}
670
677
671
678
:[range] argd[elete] Delete the {range} files from the argument list.
672
679
Example: >
@@ -681,8 +688,7 @@ list of the current window.
681
688
< Removes all the files from the arglist.
682
689
When the last number in the range is too high, up to
683
690
the last argument is deleted.
684
- {not in Vi} {not available when compiled without the
685
- | +listcmds | feature}
691
+ {not in Vi}
686
692
687
693
*:argu* *:argument*
688
694
:[count] argu[ment] [count] [++opt] [+cmd]
@@ -691,16 +697,14 @@ list of the current window.
691
697
when changes have been made and Vim does not want to
692
698
| abandon | the current buffer.
693
699
Also see | ++opt | and | +cmd | .
694
- {not in Vi} {not available when compiled without the
695
- | +listcmds | feature}
700
+ {not in Vi}
696
701
697
702
:[count] argu[ment]! [count] [++opt] [+cmd]
698
703
Edit file [count] in the argument list, discard any
699
704
changes to the current buffer. When [count] is
700
705
omitted the current entry is used.
701
706
Also see | ++opt | and | +cmd | .
702
- {not in Vi} {not available when compiled without the
703
- | +listcmds | feature}
707
+ {not in Vi}
704
708
705
709
:[count] n[ext] [++opt] [+cmd] *:n* *:ne* *:next* *E165* *E163*
706
710
Edit [count] next file. This fails when changes have
@@ -823,7 +827,6 @@ fourth file in the argument list. This happens when you do ":e file".
823
827
LOCAL ARGUMENT LIST
824
828
825
829
{not in Vi}
826
- {not available when compiled without the | +windows | or | +listcmds | features}
827
830
828
831
*:arglocal*
829
832
:argl[ocal] Make a local copy of the global argument list.
@@ -875,8 +878,7 @@ USING THE ARGUMENT LIST
875
878
autocommand event is disabled by adding it to
876
879
'eventignore' . This considerably speeds up editing
877
880
each file.
878
- {not in Vi} {not available when compiled without the
879
- | +listcmds | feature}
881
+ {not in Vi}
880
882
Also see | :windo | , | :tabdo | , | :bufdo | , | :cdo | , | :ldo | ,
881
883
| :cfdo | and | :lfdo |
882
884
@@ -900,7 +902,7 @@ Note: When the 'write' option is off, you are not able to write any file.
900
902
901
903
*:w* *:write*
902
904
*E502* *E503* *E504* *E505*
903
- *E512* *E514* *E667* *E796*
905
+ *E512* *E514* *E667* *E796* *E949*
904
906
:w[rite] [++opt] Write the whole buffer to the current file. This is
905
907
the normal way to save changes to a file. It fails
906
908
when the 'readonly' option is set or when there is
@@ -956,6 +958,9 @@ used, for example, when the write fails and you want to try again later with
956
958
":w #". This can be switched off by removing the 'A' flag from the
957
959
'cpoptions' option.
958
960
961
+ Note that the 'fsync' option matters here. If it's set it may make writes
962
+ slower (but safer).
963
+
959
964
*:sav* *:saveas*
960
965
:sav[eas][!] [++opt] {file}
961
966
Save the current buffer under the name {file} and set
@@ -1199,7 +1204,8 @@ MULTIPLE WINDOWS AND BUFFERS *window-exit*
1199
1204
:wqa[ll]! [++opt]
1200
1205
:xa[ll]! Write all changed buffers, even the ones that are readonly,
1201
1206
and exit Vim. If there are buffers without a file name or
1202
- which cannot be written for another reason, Vim will not quit.
1207
+ which cannot be written for another reason, or there is a
1208
+ terminal with a running job, Vim will not quit.
1203
1209
{not in Vi}
1204
1210
1205
1211
==============================================================================
0 commit comments