/
version7.txt
4597 lines (3491 loc) · 177 KB
/
version7.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
*version7.txt* For Vim version 7.1b. Last change: 2007 May 10
VIM REFERENCE MANUAL by Bram Moolenaar
*vim7*
Welcome to Vim 7! A large number of features has been added. This file
mentions all the new items, changes to existing features and bug fixes
since Vim 6.x. Use this command to see the version you are using: >
:version
See |vi_diff.txt| for an overview of differences between Vi and Vim 7.0.
See |version4.txt| for differences between Vim 3.x and Vim 4.x.
See |version5.txt| for differences between Vim 4.x and Vim 5.x.
See |version6.txt| for differences between Vim 5.x and Vim 6.x.
INCOMPATIBLE CHANGES |incompatible-7|
NEW FEATURES |new-7|
Vim script enhancements |new-vim-script|
Spell checking |new-spell|
Omni completion |new-omni-completion|
MzScheme interface |new-MzScheme|
Printing multi-byte text |new-print-multi-byte|
Tab pages |new-tab-pages|
Undo branches |new-undo-branches|
Extended Unicode support |new-more-unicode|
More highlighting |new-more-highlighting|
Translated manual pages |new-manpage-trans|
Internal grep |new-vimgrep|
Scroll back in messages |new-scroll-back|
Cursor past end of the line |new-onemore|
POSIX compatibility |new-posix|
Debugger support |new-debug-support|
Remote file explorer |new-netrw-explore|
Define an operator |new-define-operator|
Mapping to an expression |new-map-expression|
Visual and Select mode mappings |new-map-select|
Location list |new-location-list|
Various new items |new-items-7|
IMPROVEMENTS |improvements-7|
COMPILE TIME CHANGES |compile-changes-7|
BUG FIXES |bug-fixes-7|
VERSION 7.1 |version-7.1|
Changed |changed-7.1|
Added |added-7.1|
Fixed |fixed-7.1|
==============================================================================
INCOMPATIBLE CHANGES *incompatible-7*
These changes are incompatible with previous releases. Check this list if you
run into a problem when upgrading from Vim 6.x to 7.0.
A ":write file" command no longer resets the 'modified' flag of the buffer,
unless the '+' flag is in 'cpoptions' |cpo-+|. This was illogical, since the
buffer is still modified compared to the original file. And when undoing
all changes the file would actually be marked modified. It does mean that
":quit" fails now.
":helpgrep" now uses a help window to display a match.
In an argument list double quotes could be used to include spaces in a file
name. This caused a difference between ":edit" and ":next" for escaping
double quotes and it is incompatible with some versions of Vi.
Command Vim 6.x file name Vim 7.x file name ~
:edit foo\"888 foo"888 foo"888
:next foo\"888 foo888 foo"888
:next a\"b c\"d ab cd a"b and c"d
In a |literal-string| a single quote can be doubled to get one.
":echo 'a''b'" would result in "a b", but now that two quotes stand for one it
results in "a'b".
When overwriting a file with ":w! fname" there was no warning for when "fname"
was being edited by another Vim. Vim now gives an error message |E768|.
The support for Mac OS 9 has been removed.
Files ending in .tex now have 'filetype' set to "context", "plaintex", or
"tex". |ft-tex-plugin|
Minor incompatibilities:
For filetype detection: For many types, use */.dir/filename instead of
~/.dir/filename, so that it also works for other user's files.
For quite a few filetypes the indent settings have been moved from the
filetype plugin to the indent plugin. If you used: >
:filetype plugin on
Then some indent settings may be missing. You need to use: >
:filetype plugin indent on
":0verbose" now sets 'verbose' to zero instead of one.
Removed the old and incomplete "VimBuddy" code.
Buffers without a name report "No Name" instead of "No File". It was
confusing for buffers with a name and 'buftype' set to "nofile".
When ":file xxx" is used in a buffer without a name, the alternate file name
isn't set. This avoids creating buffers without a name, they are not useful.
The "2html.vim" script now converts closed folds to HTML. This means the HTML
looks like it's displayed, with the same folds open and closed. Use "zR", or
"let html_ignore_folding=1", if no folds should appear in the HTML. (partly by
Carl Osterwisch)
Diff mode is now also converted to HTML as it is displayed.
Win32: The effect of the <F10> key depended on 'winaltkeys'. Now it depends
on whether <F10> has been mapped or not. This allows mapping <F10> without
changing 'winaltkeys'.
When 'octal' is in 'nrformats' and using CTRL-A on "08" it became "018", which
is illogical. Now it becomes "9". The leading zero(s) is(are) removed to
avoid the number becoming octal after incrementing "009" to "010".
When 'encoding' is set to a Unicode encoding, the value for 'fileencodings'
now includes "default" before "latin1". This means that for files with 8-bit
encodings the default is to use the encoding specified by the environment, if
possible. Previously latin1 would always be used, which is wrong in a
non-latin1 environment, such as Russian.
Previously Vim would exit when there are two windows, both of them displaying
a help file, and using ":quit". Now only the window is closed.
"-w {scriptout}" only works when {scriptout} doesn't start with a digit.
Otherwise it's used to set the 'window' option.
Previously <Home> and <xHome> could be mapped separately. This had the
disadvantage that all mappings (with modifiers) had to be duplicated, since
you can't be sure what the keyboard generates. Now all <xHome> are internally
translated to <Home>, both for the keys and for mappings. Also for <xEnd>,
<xF1>, etc.
":put" now leaves the cursor on the last inserted line.
When a .gvimrc file exists then 'compatible' is off, just like when a ".vimrc"
file exists.
When making a string upper-case with "vlllU" or similar then the German sharp
s is replaced with "SS". This does not happen with "~" to avoid backwards
compatibility problems and because "SS" can't be changed back to a sharp s.
"gd" previously found the very first occurrence of a variable in a function,
that could be the function argument without type. Now it finds the position
where the type is given.
The line continuation in functions was not taken into account, line numbers in
errors were logical lines, not lines in the sourced file. That made it
difficult to locate errors. Now the line number in the sourced file is
reported, relative to the function start. This also means that line numbers
for ":breakadd func" are different.
When defining a user command with |:command| the special items could be
abbreviated. This caused unexpected behavior, such as <li> being recognized
as <line1>. The items can no longer be abbreviated.
When executing a FileChangedRO autocommand it is no longer allowed to switch
to another buffer or edit another file. This is to prevent crashes (the event
is triggered deep down in the code where changing buffers is not anticipated).
It is still possible to reload the buffer.
At the |more-prompt| and the |hit-enter-prompt|, when the 'more' option is
set, the 'k', 'u', 'g' and 'b' keys are now used to scroll back to previous
messages. Thus they are no longer used as typeahead.
==============================================================================
NEW FEATURES *new-7*
Vim script enhancements *new-vim-script*
-----------------------
In Vim scripts the following types have been added:
|List| ordered list of items
|Dictionary| associative array of items
|Funcref| reference to a function
Many functions and commands have been added to support the new types.
The |string()| function can be used to get a string representation of a
variable. Works for Numbers, Strings and composites of them. Then |eval()|
can be used to turn the string back into the variable value.
The |:let| command can now use "+=", "-=" and ".=": >
:let var += expr " works like :let var = var + expr
:let var -= expr " works like :let var = var - expr
:let var .= string " works like :let var = var . string
With the |:profile| command you can find out where your function or script
is wasting time.
In the Python interface vim.eval() also handles Dictionaries and Lists.
|python-eval| (G. Sumner Hayes)
The |getscript| plugin was added as a convenient way to update scripts from
www.vim.org automatically. (Charles Campbell)
The |vimball| plugin was added as a convenient way to distribute a set of
files for a plugin (plugin file, autoload script, documentation). (Charles
Campbell)
Spell checking *new-spell*
--------------
Spell checking has been integrated in Vim. There were a few implementations
with scripts, but they were slow and/or required an external program.
The 'spell' option is used to switch spell checking on or off
The 'spelllang' option is used to specify the accepted language(s)
The 'spellfile' option specifies where new words are added
The 'spellsuggest' option specifies the methods used for making suggestions
The |[s| and |]s| commands can be used to move to the next or previous error
The |zg| and |zw| commands can be used to add good and wrong words
The |z=| command can be used to list suggestions and correct the word
The |:mkspell| command is used to generate a Vim spell file from word lists
The "undercurl" highlighting attribute was added to nicely point out spelling
mistakes in the GUI (based on patch from Marcin Dalecki).
The "guisp" color can be used to give it a color different from foreground and
background.
The number of possible different highlight attributes was raised from about
220 to over 30000. This allows for the attributes of spelling to be combined
with syntax highlighting attributes. This is also used for syntax
highlighting and marking the Visual area.
Much more info here: |spell|.
Omni completion *new-omni-completion*
---------------
This could also be called "intellisense", but that is a trademark. It is a
smart kind of completion. The text in front of the cursor is inspected to
figure out what could be following. This may suggest struct and class
members, system functions, etc.
Use CTRL-X CTRL-O in Insert mode to start the completion. |i_CTRL-X_CTRL-O|
The 'omnifunc' option is set by filetype plugins to define the function that
figures out the completion.
Currently supported languages:
C |ft-c-omni|
(X)HTML with CSS |ft-html-omni|
JavaScript |ft-javascript-omni|
PHP |ft-php-omni|
Python
Ruby |ft-ruby-omni|
SQL |ft-sql-omni|
XML |ft-xml-omni|
any language wih syntax highligting |ft-syntax-omni|
You can add your own omni completion scripts.
When the 'completeopt' option contains "menu" then matches for Insert mode
completion are displayed in a (rather primitive) popup menu.
MzScheme interface *new-MzScheme*
------------------
The MzScheme interpreter is supported. |MzScheme|
The |:mzscheme| command can be used to execute MzScheme commands
The |:mzfile| command can be used to execute an MzScheme script file
This depends on Vim being compiled with the |+mzscheme| feature.
Printing multi-byte text *new-print-multi-byte*
------------------------
The |:hardcopy| command now supports printing multi-byte characters when using
PostScript.
The 'printmbcharset' and 'printmbfont' options are used for this.
Also see |postscript-cjk-printing|. (Mike Williams)
Tab pages *new-tab-pages*
---------
A tab page is page with one or more windows with a label (aka tab) at the top.
By clicking on the label you can quickly switch between the tab pages. And
with the keyboard, using the |gt| (Goto Tab) command. This is a convenient
way to work with many windows.
To start Vim with each file argument in a separate tab page use the |-p|
argument. The maximum number of pages can be set with 'tabpagemax'.
The line with tab labels is either made with plain text and highlighting or
with a GUI mechanism. The GUI labels look better but are only available on a
few systems. The line can be customized with 'tabline', 'guitablabel' and
'guitabtooltip'. Whether it is displayed is set with 'showtabline'. Whether
to use the GUI labels is set with the "e" flag in 'guioptions'.
The |:tab| command modifier can be used to have most commands that open a new
window open a new tab page instead.
The |--remote-tab| argument can be used to edit a file in a new tab page in an
already running Vim server.
Variables starting with "t:" are local to a tab page.
More info here: |tabpage|
Most of the GUI stuff was implemented by Yegappan Lakshmanan.
Undo branches *new-undo-branches*
-------------
Previously there was only one line of undo-redo. If, after undoing a number
of changes, a new change was made all the undone changes were lost. This
could lead to accidentally losing work.
Vim now makes an undo branch in this situation. Thus you can go back to the
text after any change, even if they were undone. So long as you do not run
into 'undolevels', when undo information is freed up to limit the memory used.
To be able to navigate the undo branches each change is numbered sequentially.
The commands |g-| and |:earlier| go back in time, to older changes. The
commands |g+| and |:later| go forward in time, to newer changes.
The changes are also timestamped. Use ":earlier 10m" to go to the text as it
was about ten minutes earlier.
The |:undolist| command can be used to get an idea of which undo branches
exist. The |:undo| command now takes an argument to directly jump to a
specific position in this list. The |changenr()| function can be used to
obtain the change number.
There is no graphical display of the tree with changes, navigation can be
quite confusing.
Extended Unicode support *new-more-unicode*
------------------------
Previously only two combining characters were displayed. The limit is now
raised to 6. This can be set with the 'maxcombine' option. The default is
still 2.
|ga| now shows all combining characters, not just the first two.
Previously only 16 bit Unicode characters were supported for displaying. Now
the full 32 bit character set can be used. Unless manually disabled at
compile time to save a bit of memory.
For pattern matching it is now possible to search for individual composing
characters. |patterns-composing|
The |8g8| command searches for an illegal UTF-8 byte sequence.
More highlighting *new-more-highlighting*
-----------------
Highlighting matching parens:
When moving the cursor through the text and it is on a paren, then the
matching paren can be highlighted. This uses the new |CursorMoved|
autocommand event.
This means some commands are executed every time you move the cursor. If this
slows you down too much switch it off with: >
:NoMatchParen
See |matchparen| for more information.
The plugin uses the |:match| command. It now supports three match patterns.
The plugin uses the third one. The first one is for the user and the second
one can be used by another plugin.
Highlighting the cursor line and column:
The 'cursorline' and 'cursorcolumn' options have been added. These highlight
the screen line and screen column of the cursor. This makes the cursor
position easier to spot. 'cursorcolumn' is also useful to align text. This
may make screen updating quite slow. The CursorColumn and CursorLine
highlight groups allow changing the colors used. |hl-CursorColumn|
|hl-CursorLine|
The number of possible different highlight attributes was raised from about
220 to over 30000. This allows for the attributes of spelling to be combined
with syntax highlighting attributes. This is also used for syntax
highlighting, marking the Visual area, CursorColumn, etc.
Translated manual pages *new-manpage-trans*
-----------------------
The manual page of Vim and associated programs is now also available in
several other languages.
French - translated by David Blanchet
Italian - translated by Antonio Colombo
Russian - translated by Vassily Ragosin
Polish - translated by Mikolaj Machowski
The Unix Makefile installs the Italian manual pages in .../man/it/man1/,
.../man/it.ISO8859-1/man1/ and .../man/it.UTF-8/man1/. There appears to be no
standard for what encoding goes in the "it" directory, the 8-bit encoded file
is used there as a best guess.
Other languages are installed in similar places.
The translated pages are not automatically installed when Vim was configured
with "--disable-nls", but "make install-languages install-tool-languages" will
do it anyway.
Internal grep *new-vimgrep*
-------------
The ":vimgrep" command can be used to search for a pattern in a list of files.
This is like the ":grep" command, but no external program is used. Besides
better portability, handling of different file encodings and using multi-line
patterns, this also allows grepping in compressed and remote files.
|:vimgrep|.
If you want to use the search results in a script you can use the
|getqflist()| function.
To grep files in various directories the "**" pattern can be used. It expands
into an arbitrary depth of directories. "**" can be used in all places where
file names are expanded, thus also with |:next| and |:args|.
Scroll back in messages *new-scroll-back*
-----------------------
When displaying messages, at the |more-prompt| and the |hit-enter-prompt|, The
'k', 'u', 'g' and 'b' keys can be used to scroll back to previous messages.
This is especially useful for commands such as ":syntax", ":autocommand" and
":highlight". This is implemented in a generic way thus it works for all
commands and highlighting is kept. Only works when the 'more' option is set.
Previously it only partly worked for ":clist".
The |g<| command can be used to see the last page of messages after you have
hit <Enter> at the |hit-enter-prompt|. Then you can scroll further back.
Cursor past end of the line *new-onemore*
---------------------------
When the 'virtualedit' option contains "onemore" the cursor can move just past
the end of the line. As if it's on top of the line break.
This makes some commands more consistent. Previously the cursor was always
past the end of the line if the line was empty. But it is far from Vi
compatible. It may also break some plugins or Vim scripts. Use with care!
The patch was provided by Mattias Flodin.
POSIX compatibility *new-posix*
-------------------
The POSIX test suite was used to verify POSIX compatibility. A number of
problems have been fixed to make Vim more POSIX compatible. Some of them
conflict with traditional Vi or expected behavior. The $VIM_POSIX environment
variable can be set to get POSIX compatibility. See |posix|.
Items that were fixed for both Vi and POSIX compatibility:
- repeating "R" with a count only overwrites text once; added the 'X' flag to
'cpoptions' |cpo-X|
- a vertical movement command that moves to a non-existing line fails; added
the '-' flag to 'cpoptions' |cpo--|
- when preserving a file and doing ":q!" the file can be recovered; added the
'&' flag to 'cpoptions' |cpo-&|
- The 'window' option is partly implemented. It specifies how much CTRL-F and
CTRL-B scroll when there is one window. The "-w {number}" argument is now
accepted. "-w {scriptout}" only works when {scriptout} doesn't start with a
digit.
- Allow "-c{command}" argument, no space between "-c" and {command}.
- When writing a file with ":w!" don't reset 'readonly' when 'Z' is present in
'cpoptions'.
- Allow 'l' and '#' flags for ":list", ":print" and ":number".
- Added the '.' flag to 'cpoptions': ":cd" fails when the buffer is modified.
- In Ex mode with an empty buffer ":read file" doesn't keep an empty line
above or below the new lines.
- Remove a backslash before a NL for the ":global" command.
- When ":append", ":insert" or ":change" is used with ":global", get the
inserted lines from the command. Can use backslash-NL to separate lines.
- Can use ":global /pat/ visual" to execute Normal mode commands at each
matched line. Use "Q" to continue and go to the next line.
- The |:open| command has been partially implemented. It stops Ex mode, but
redraws the whole screen, not just one line as open mode is supposed to do.
- Support using a pipe to read the output from and write input to an external
command. Added the 'shelltemp' option and has("filterpipe").
- In ex silent mode the ":set" command output is displayed.
- The ":@@" and ":**" give an error message when no register was used before.
- The search pattern "[]-`]" matches ']', '^', '_' and '`'.
- Autoindent for ":insert" is using the line below the insert.
- Autoindent for ":change" is using the first changed line.
- Editing Ex command lines is not done in cooked mode, because CTRL-D and
CTRL-T cannot be handled then.
- In Ex mode, "1,3" prints three lines. "%" prints all lines.
- In Ex mode "undo" would undo all changes since Ex mode was started.
- Implemented the 'prompt' option.
Debugger support *new-debug-support*
----------------
The 'balloonexpr' option has been added. This is a generic way to implement
balloon functionality. You can use it to show info for the word under the
mouse pointer.
Remote file explorer *new-netrw-explore*
--------------------
The netrw plugin now also supports viewing a directory, when "scp://" is used.
Deleting and renaming files is possible.
To avoid duplicating a lot of code, the previous file explorer plugin has been
integrated in the netrw plugin. This means browsing local and remote files
works the same way.
":browse edit" and ":browse split" use the netrw plugin when it's available
and a GUI dialog is not possible.
The netrw plugin is maintained by Charles Campbell.
Define an operator *new-define-operator*
------------------
Previously it was not possible to define your own operator; a command that is
followed by a {motion}. Vim 7 introduces the 'operatorfunc' option and the
|g@| operator. This makes it possible to define a mapping that works like an
operator. The actual work is then done by a function, which is invoked
through the |g@| operator.
See |:map-operator| for the explanation and an example.
Mapping to an expression *new-map-expression*
------------------------
The {rhs} argument of a mapping can be an expression. That means the
resulting characters can depend on the context. Example: >
:inoremap <expr> . InsertDot()
Here the dot will be mapped to whatever InsertDot() returns.
This also works for abbreviations. See |:map-<expr>| for the details.
Visual and Select mode mappings *new-map-select*
-------------------------------
Previously Visual mode mappings applied both to Visual and Select mode. With
a trick to have the mappings work in Select mode like they would in Visual
mode.
Commands have been added to define mappings for Visual and Select mode
separately: |:xmap| and |:smap|. With the associated "noremap" and "unmap"
commands.
The same is done for menus: |:xmenu|, |:smenu|, etc.
Location list *new-location-list*
-------------
The support for a per-window quickfix list (location list) is added. The
location list can be displayed in a location window (similar to the quickfix
window). You can open more than one location list window. A set of commands
similar to the quickfix commands are added to browse the location list.
(Yegappan Lakshmanan)
Various new items *new-items-7*
-----------------
Normal mode commands: ~
a", a' and a` New text objects to select quoted strings. |a'|
i", i' and i` (Taro Muraoka)
CTRL-W <Enter> In the quickfix window: opens a new window to show the
location of the error under the cursor.
|at| and |it| text objects select a block of text between HTML or XML tags.
<A-LeftMouse> ('mousemodel' "popup" or "popup-setpos")
<A-RightMouse> ('mousemodel' "extend")
Make a blockwise selection. |<A-LeftMouse>|
gF Start editing the filename under the cursor and jump
to the line number following the file name.
(Yegappan Lakshmanan)
CTRL-W F Start editing the filename under the cursor in a new
window and jump to the line number following the file
name. (Yegappan Lakshmanan)
Insert mode commands: ~
CTRL-\ CTRL-O Execute a Normal mode command. Like CTRL-O but
without moving the cursor. |i_CTRL-\_CTRL-O|
Options: ~
'balloonexpr' expression for text to show in evaluation balloon
'completefunc' The name of the function used for user-specified
Insert mode completion. CTRL-X CTRL-U can be used in
Insert mode to do any kind of completion. (Taro
Muraoka)
'completeopt' Enable popup menu and other settings for Insert mode
completion.
'cursorcolumn' highlight column of the cursor
'cursorline' highlight line of the cursor
'formatexpr' expression for formatting text with |gq| and when text
goes over 'textwidth' in Insert mode.
'formatlistpat' pattern to recognize a numbered list for formatting.
(idea by Hugo Haas)
'fsync' Whether fsync() is called after writing a file.
(Ciaran McCreesh)
'guitablabel' expression for text to display in GUI tab page label
'guitabtooltip' expression for text to display in GUI tab page tooltip
'macatsui' Mac: use ATSUI text display functions
'maxcombine' maximum number of combining characters displayed
'maxmempattern' maximum amount of memory to use for pattern matching
'mkspellmem' parameters for |:mkspell| memory use
'mzquantum' Time in msec to schedule MzScheme threads.
'numberwidth' Minimal width of the space used for the 'number'
option. (Emmanuel Renieris)
'omnifunc' The name of the function used for omni completion.
'operatorfunc' function to be called for |g@| operator
'printmbcharset' CJK character set to be used for :hardcopy
'printmbfont' font names to be used for CJK output of :hardcopy
'pumheight' maximum number of items to show in the popup menu
'quoteescape' Characters used to escape quotes inside a string.
Used for the a", a' and a` text objects. |a'|
'shelltemp' whether to use a temp file or pipes for shell commands
'showtabline' whether to show the tab pages line
'spell' switch spell checking on/off
'spellcapcheck' pattern to locate the end of a sentence
'spellfile' file where good and wrong words are added
'spelllang' languages to check spelling for
'spellsuggest' methods for spell suggestions
'synmaxcol' maximum column to look for syntax items; avoids very
slow redrawing when there are very long lines
'tabline' expression for text to display in the tab pages line
'tabpagemax' maximum number of tab pages to open for |-p|
'verbosefile' Log messages in a file.
'wildoptions' "tagfile" value enables listing the file name of
matching tags for CTRL-D command line completion.
(based on an idea from Yegappan Lakshmanan)
'winfixwidth' window with fixed width, similar to 'winfixheight'
Ex commands: ~
Win32: The ":winpos" command now also works in the console. (Vipin Aravind)
|:startreplace| Start Replace mode. (Charles Campbell)
|:startgreplace| Start Virtual Replace mode.
|:0file| Removes the name of the buffer. (Charles Campbell)
|:diffoff| Switch off diff mode in the current window or in all
windows.
|:delmarks| Delete marks.
|:exusage| Help for Ex commands (Nvi command).
|:viusage| Help for Vi commands (Nvi command).
|:sort| Sort lines in the buffer without depending on an
external command. (partly by Bryce Wagner)
|:vimgrep| Internal grep command, search for a pattern in files.
|:vimgrepadd| Like |:vimgrep| but don't make a new list.
|:caddfile| Add error messages to an existing quickfix list
(Yegappan Lakshmanan).
|:cbuffer| Read error lines from a buffer. (partly by Yegappan
Lakshmanan)
|:cgetbuffer| Create a quickfix list from a buffer but don't jump to
the first error.
|:caddbuffer| Add errors from the current buffer to the quickfix
list.
|:cexpr| Read error messages from a Vim expression (Yegappan
Lakshmanan).
|:caddexpr| Add error messages from a Vim expression to an
existing quickfix list. (Yegappan Lakshmanan).
|:cgetexpr| Create a quickfix list from a Vim expression, but
don't jump to the first error. (Yegappan Lakshmanan).
|:lfile| Like |:cfile| but use the location list.
|:lgetfile| Like |:cgetfile| but use the location list.
|:laddfile| Like |:caddfile| but use the location list.
|:lbuffer| Like |:cbuffer| but use the location list.
|:lgetbuffer| Like |:cgetbuffer| but use the location list.
|:laddbuffer| Like |:caddbuffer| but use the location list.
|:lexpr| Like |:cexpr| but use the location list.
|:lgetexpr| Like |:cgetexpr| but use the location list.
|:laddexpr| Like |:caddexpr| but use the location list.
|:ll| Like |:cc| but use the location list.
|:llist| Like |:clist| but use the location list.
|:lnext| Like |:cnext| but use the location list.
|:lprevious| Like |:cprevious| but use the location list.
|:lNext| Like |:cNext| but use the location list.
|:lfirst| Like |:cfirst| but use the location list.
|:lrewind| Like |:crewind| but use the location list.
|:llast| Like |:clast| but use the location list.
|:lnfile| Like |:cnfile| but use the location list.
|:lpfile| Like |:cpfile| but use the location list.
|:lNfile| Like |:cNfile| but use the location list.
|:lolder| Like |:colder| but use the location list.
|:lnewer| Like |:cnewer| but use the location list.
|:lwindow| Like |:cwindow| but use the location list.
|:lopen| Like |:copen| but use the location list.
|:lclose| Like |:cclose| but use the location list.
|:lmake| Like |:make| but use the location list.
|:lgrep| Like |:grep| but use the location list.
|:lgrepadd| Like |:grepadd| but use the location list.
|:lvimgrep| Like |:vimgrep| but use the location list.
|:lvimgrepadd| Like |:vimgrepadd| but use the location list.
|:lhelpgrep| Like |:helpgrep| but use the location list.
|:lcscope| Like |:cscope| but use the location list.
|:ltag| Jump to a tag and add matching tags to a location list.
|:undojoin| Join a change with the previous undo block.
|:undolist| List the leafs of the undo tree.
|:earlier| Go back in time for changes in the text.
|:later| Go forward in time for changes in the text.
|:for| Loop over a |List|.
|:endfor|
|:lockvar| Lock a variable, prevents it from being changed.
|:unlockvar| Unlock a locked variable.
|:mkspell| Create a Vim spell file.
|:spellgood| Add a word to the list of good words.
|:spellwrong| Add a word to the list of bad words
|:spelldump| Dump list of good words.
|:spellinfo| Show information about the spell files used.
|:spellrepall| Repeat a spelling correction for the whole buffer.
|:spellundo| Remove a word from list of good and bad words.
|:mzscheme| Execute MzScheme commands.
|:mzfile| Execute an MzScheme script file.
|:nbkey| Pass a key to NetBeans for processing.
|:profile| Commands for Vim script profiling.
|:profdel| Stop profiling for specified items.
|:smap| Select mode mapping.
|:smapclear|
|:snoremap|
|:sunmap|
|:xmap| Visual mode mapping, not used for Select mode.
|:xmapclear|
|:xnoremap|
|:xunmap|
|:smenu| Select mode menu.
|:snoremenu|
|:sunmenu|
|:xmenu| Visual mode menu, not used for Select mode.
|:xnoremenu|
|:xunmenu|
|:tabclose| Close the current tab page.
|:tabdo| Perform a command in every tab page.
|:tabedit| Edit a file in a new tab page.
|:tabnew| Open a new tab page.
|:tabfind| Search for a file and open it in a new tab page.
|:tabnext| Go to the next tab page.
|:tabprevious| Go to the previous tab page.
|:tabNext| Go to the previous tab page.
|:tabfirst| Go to the first tab page.
|:tabrewind| Go to the first tab page.
|:tablast| Go to the last tab page.
|:tabmove| Move the current tab page elsewhere.
|:tabonly| Close all other tab pages.
|:tabs| List the tab pages and the windows they contain.
Ex command modifiers: ~
|:keepalt| Do not change the alternate file.
|:noautocmd| Do not trigger autocommand events.
|:sandbox| Execute a command in the sandbox.
|:tab| When opening a new window create a new tab page.
Ex command arguments: ~
|++bad| Specify what happens with characters that can't be
converted and illegal bytes. (code example by Yasuhiro
Matsumoto)
Also, when a conversion error occurs or illegal bytes
are found include the line number in the error
message.
New and extended functions: ~
|add()| append an item to a List
|append()| append List of lines to the buffer
|argv()| without an argument return the whole argument list
|browsedir()| dialog to select a directory
|bufnr()| takes an extra argument: create buffer
|byteidx()| index of a character (Ilya Sher)
|call()| call a function with List as arguments
|changenr()| number of current change
|complete()| set matches for Insert mode completion
|complete_add()| add match for 'completefunc'
|complete_check()| check for key pressed, for 'completefunc'
|copy()| make a shallow copy of a List or Dictionary
|count()| count nr of times a value is in a List or Dictionary
|cursor()| also accepts an offset for 'virtualedit', and
the first argument can be a list: [lnum, col, off]
|deepcopy()| make a full copy of a List or Dictionary
|diff_filler()| returns number of filler lines above line {lnum}.
|diff_hlID()| returns the highlight ID for diff mode
|empty()| check if List or Dictionary is empty
|eval()| evaluate {string} and return the result
|extend()| append one List to another or add items from one
Dictionary to another
|feedkeys()| put characters in the typeahead buffer
|filter()| remove selected items from a List or Dictionary
|finddir()| find a directory in 'path'
|findfile()| find a file in 'path' (Johannes Zellner)
|foldtextresult()| the text displayed for a closed fold at line "lnum"
|function()| make a Funcref out of a function name
|garbagecollect()| cleanup unused |Lists| and |Dictionaries| with circular
references
|get()| get an item from a List or Dictionary
|getbufline()| get a list of lines from a specified buffer
(Yegappan Lakshmanan)
|getcmdtype()| return the current command-line type
(Yegappan Lakshmanan)
|getfontname()| get actual font name being used
|getfperm()| get file permission string (Nikolai Weibull)
|getftype()| get type of file (Nikolai Weibull)
|getline()| with second argument: get List with buffer lines
|getloclist()| list of location list items (Yegappan Lakshmanan)
|getpos()| return a list with the position of cursor, mark, etc.
|getqflist()| list of quickfix errors (Yegappan Lakshmanan)
|getreg()| get contents of a register
|gettabwinvar()| get variable from window in specified tab page.
|has_key()| check whether a key appears in a Dictionary
|haslocaldir()| check if current window used |:lcd|
|hasmapto()| check for a mapping to a string
|index()| index of item in List
|inputlist()| prompt the user to make a selection from a list
|insert()| insert an item somewhere in a List
|islocked()| check if a variable is locked
|items()| get List of Dictionary key-value pairs
|join()| join List items into a String
|keys()| get List of Dictionary keys
|len()| number of items in a List or Dictionary
|map()| change each List or Dictionary item
|maparg()| extra argument: use abbreviation
|mapcheck()| extra argument: use abbreviation
|match()| extra argument: count
|matcharg()| return arguments of |:match| command
|matchend()| extra argument: count
|matchlist()| list with match and submatches of a pattern in a string
|matchstr()| extra argument: count
|max()| maximum value in a List or Dictionary
|min()| minimum value in a List or Dictionary
|mkdir()| create a directory
|pathshorten()| reduce directory names to a single character
|printf()| format text
|pumvisible()| check whether the popup menu is displayed
|range()| generate a List with numbers
|readfile()| read a file into a list of lines
|reltime()| get time value, possibly relative
|reltimestr()| turn a time value into a string
|remove()| remove one or more items from a List or Dictionary
|repeat()| repeat "expr" "count" times (Christophe Poucet)
|reverse()| reverse the order of a List
|search()| extra argument:
|searchdecl()| search for declaration of variable
|searchpair()| extra argument: line to stop searching
|searchpairpos()| return a List with the position of the match
|searchpos()| return a List with the position of the match
|setloclist()| modify a location list (Yegappan Lakshmanan)
|setpos()| set cursor or mark to a position
|setqflist()| modify a quickfix list (Yegappan Lakshmanan)
|settabwinvar()| set variable in window of specified tab page
|sort()| sort a List
|soundfold()| get the sound-a-like equivalent of a word
|spellbadword()| get a badly spelled word
|spellsuggest()| get suggestions for correct spelling
|split()| split a String into a List
|str2nr()| convert a string to a number, base 8, 10 or 16
|stridx()| extra argument: start position
|strridx()| extra argument: start position
|string()| string representation of a List or Dictionary
|system()| extra argument: filters {input} through a shell command
|tabpagebuflist()| List of buffers in a tab page
|tabpagenr()| number of current or last tab page
|tabpagewinnr()| window number in a tab page
|tagfiles()| List with tags file names
|taglist()| get list of matching tags (Yegappan Lakshmanan)
|tr()| translate characters (Ron Aaron)
|values()| get List of Dictionary values
|winnr()| takes an argument: what window to use
|winrestview()| restore the view of the current window
|winsaveview()| save the view of the current window
|writefile()| write a list of lines into a file
User defined functions can now be loaded automatically from the "autoload"
directory in 'runtimepath'. See |autoload-functions|.
New Vim variables: ~
|v:insertmode| used for |InsertEnter| and |InsertChange| autocommands
|v:val| item value in a |map()| or |filter()| function
|v:key| item key in a |map()| or |filter()| function
|v:profiling| non-zero after a ":profile start" command
|v:fcs_reason| the reason why |FileChangedShell| was triggered
|v:fcs_choice| what should happen after |FileChangedShell|
|v:beval_bufnr| buffer number for 'balloonexpr'
|v:beval_winnr| window number for 'balloonexpr'
|v:beval_lnum| line number for 'balloonexpr'
|v:beval_col| column number for 'balloonexpr'
|v:beval_text| text under the mouse pointer for 'balloonexpr'
|v:scrollstart| what caused the screen to be scrolled up
|v:swapname| name of the swap file for the |SwapExists| event
|v:swapchoice| what to do for an existing swap file
|v:swapcommand| command to be executed after handling |SwapExists|
|v:char| argument for evaluating 'formatexpr'
New autocommand events: ~
|ColorScheme| after loading a color scheme
|CursorHoldI| the user doesn't press a key for a while in Insert mode
|CursorMoved| the cursor was moved in Normal mode
|CursorMovedI| the cursor was moved in Insert mode
|FileChangedShellPost| after handling a file changed outside of Vim
|InsertEnter| starting Insert or Replace mode
|InsertChange| going from Insert to Replace mode or back
|InsertLeave| leaving Insert or Replace mode
|MenuPopup| just before showing popup menu
|QuickFixCmdPre| before :make, :grep et al. (Ciaran McCreesh)
|QuickFixCmdPost| after :make, :grep et al. (Ciaran McCreesh)
|SessionLoadPost| after loading a session file. (Yegappan Lakshmanan)
|ShellCmdPost| after executing a shell command
|ShellFilterPost| after filtering with a shell command
|SourcePre| before sourcing a Vim script
|SpellFileMissing| when a spell file can't be found
|SwapExists| found existing swap file when editing a file
|TabEnter| just after entering a tab page
|TabLeave| just before leaving a tab page
|VimResized| after the Vim window size changed (Yakov Lerner)
New highlight groups: ~
Pmenu Popup menu: normal item |hl-Pmenu|
PmenuSel Popup menu: selected item |hl-PmenuSel|
PmenuThumb Popup menu: scrollbar |hl-PmenuThumb|
PmenuSbar Popup menu: Thumb of the scrollbar |hl-PmenuSbar|
TabLine tab pages line, inactive label |hl-TabLine|
TabLineSel tab pages line, selected label |hl-TabLineSel|
TabLineFill tab pages line, filler |hl-TabLineFill|
SpellBad badly spelled word |hl-SpellBad|
SpellCap word with wrong caps |hl-SpellCap|
SpellRare rare word |hl-SpellRare|
SpellLocal word only exists in other region |hl-SpellLocal|