tea-test-dao
Version:
[C[CHello Tea
1,249 lines (973 loc) • 675 kB
Plain Text
*version7.txt* For Vim version 9.1. Last change: 2021 May 17
VIM REFERENCE MANUAL by Bram Moolenaar
*vim7* *version-7.0* *version7.0*
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 multibyte text |new-print-multibyte|
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|
VERSION 7.2 |version-7.2|
Changed |changed-7.2|
Added |added-7.2|
Fixed |fixed-7.2|
VERSION 7.3 |version-7.3|
Persistent undo |new-persistent-undo|
More encryption |new-more-encryption|
Conceal text |new-conceal|
Lua interface |new-lua|
Python3 interface |new-python3|
Changed |changed-7.3|
Added |added-7.3|
Fixed |fixed-7.3|
VERSION 7.4 |version-7.4|
New regexp engine |new-regexp-engine|
Better Python interface |better-python-interface|
Changed |changed-7.4|
Added |added-7.4|
Fixed |fixed-7.4|
==============================================================================
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 with syntax highlighting |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 multibyte text *new-print-multibyte*
------------------------
The |:hardcopy| command now supports printing multibyte 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 a 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' and
'relativenumber' 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 2, 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)
|uniq()| remove copies of repeated adjacent list items
|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|
CursorColumn 'cursorcolumn' |hl-CursorColumn|
CursorLine 'cursorline' |hl-CursorLine|
MatchParen matching parens |pi_paren.txt| |hl-MatchParen|
New items in search patterns: ~
|/\%d| \%d123 search for character with decimal number
|/\]| [\d123] idem, in a collection
|/\%o| \%o103 search for character with octal number
|/\]| [\o1o3] idem, in a collection
|/\%x| \%x1a search for character with 2 pos. hex number
|/\]| [\x1a] idem, in a collection
|/\%u| \%u12ab search for character with 4 pos. hex number
|/\]| [\u12ab] idem, in a collection
|/\%U| \%U1234abcd search for character with 8 pos. hex number
|/\]| [\U1234abcd] idem, in a collection
(The above partly by Ciaran McCreesh)
|/[[=| [[=a=]] an equivalence class (only for latin1 characters)
|/[[.| [[.a.]] a collation element (only works with single char)
|/\%'m| \%'m match at mark m
|/\%<'m| \%<'m match before mark m
|/\%>'m| \%>'m match after mark m
|/\%V| \%V match in Visual area
Nesting |/multi| items no longer is an error when an empty match is possible.
It is now possible to use \{0}, it matches the preceding atom zero times. Not
useful, just for compatibility.
New Syntax/Indent/FTplugin files: ~
Moved all the indent settings from the filetype plugin to the indent file.
Implemented b:undo_indent to undo indent settings when setting 'filetype' to a
different value.
a2ps syntax and ftplugin file. (Nikolai Weibull)
ABAB/4 syntax file. (Marius van Wyk)
alsaconf ftplugin file. (Nikolai Weibull)
AppendMatchGroup ftplugin file. (Dave Silvia)
arch ftplugin file. (Nikolai Weibull)
asterisk and asteriskvm syntax file. (Tilghman Lesher)
BDF ftplugin file. (Nikolai Weibull)
BibTeX indent file. (Dorai Sitaram)
BibTeX Bibliography Style syntax file. (Tim Pope)
BTM ftplugin file. (Bram Moolenaar)
calendar ftplugin file. (Nikolai Weibull)
Changelog indent file. (Nikolai Weibull)
ChordPro syntax file. (Niels Bo Andersen)
Cmake indent and syntax file. (Andy Cedilnik)
conf ftplugin file. (Nikolai Weibull)
context syntax and ftplugin file. (Nikolai Weibull)
CRM114 ftplugin file. (Nikolai Weibull)
cvs RC ftplugin file. (Nikolai Weibull)
D indent file. (Jason Mills)
Debian Sources.list syntax file. (Matthijs Mohlmann)
dictconf and dictdconf syntax, indent and ftplugin files. (Nikolai Weibull)
diff ftplugin file. (Bram Moolenaar)
dircolors ftplugin file. (Nikolai Weibull)
django and htmldjango syntax file. (Dave Hodder)
doxygen syntax file. (Michael Geddes)
elinks ftplugin file. (Nikolai Weibull)
eterm ftplugin file. (Nikolai Weibull)
eviews syntax file. (Vaidotas Zemlys)
fetchmail RC ftplugin file. (Nikolai Weibull)
FlexWiki syntax and ftplugin file. (George Reilly)
Generic indent file. (Dave Silvia)
gpg ftplugin file. (Nikolai Weibull)
gretl syntax file. (Vaidotas Zemlys)
groovy syntax file. (Alessio Pace)
group syntax and ftplugin file. (Nikolai Weibull)
grub ftplugin file. (Nikolai Weibull)
Haskell ftplugin file. (Nikolai Weibull)
help ftplugin file. (Nikolai Weibull)
indent ftplugin file. (Nikolai Weibull)
Javascript ftplugin file. (Bram Moolenaar)
Kconfig ftplugin and syntax file. (Nikolai Weibull)
ld syntax, indent and ftplugin file. (Nikolai Weibull)
lftp ftplugin file. (Nikolai Weibull)
libao config ftplugin file. (Nikolai Weibull)
limits syntax and ftplugin file. (Nikolai Weibull)
Lisp indent file. (Sergey Khorev)
loginaccess and logindefs syntax and ftplugin file. (Nikolai Weibull)
m4 ftplugin file. (Nikolai Weibull)
mailaliases syntax file. (Nikolai Weibull)
mailcap ftplugin file. (Nikolai Weibull)
manconf syntax and ftplugin file. (Nikolai Weibull)
matlab ftplugin file. (Jake Wasserman)
Maxima syntax file. (Robert Dodier)
MGL syntax file. (Gero Kuhlmann)
modconf ftplugin file. (Nikolai Weibull)
mplayer config ftplugin file. (Nikolai Weibull)
Mrxvtrc syntax and ftplugin file. (Gautam Iyer)
MuPAD source syntax, indent and ftplugin. (Dave Silvia)
mutt RC ftplugin file. (Nikolai Weibull)
nanorc syntax and ftplugin file. (Nikolai Weibull)
netrc ftplugin file. (Nikolai Weibull)
pamconf syntax and ftplugin file. (Nikolai Weibull)
Pascal indent file. (Neil Carter)
passwd syntax and ftplugin file. (Nikolai Weibull)
PHP compiler plugin. (Doug Kearns)
pinfo ftplugin file. (Nikolai Weibull)
plaintex syntax and ftplugin files. (Nikolai Weibull, Benji Fisher)
procmail ftplugin file. (Nikolai Weibull)
prolog ftplugin file. (Nikolai Weibull)
protocols syntax and ftplugin file. (Nikolai Weibull)
quake ftplugin file. (Nikolai Weibull)
racc syntax and ftplugin file. (Nikolai Weibull)
readline ftplugin file. (Nikolai Weibull)
rhelp syntax file. (Johannes Ranke)
rnoweb syntax file. (Johannes Ranke)
Relax NG compact ftplugin file. (Nikolai Weibull)
Scheme indent file. (Sergey Khorev)
screen ftplugin file. (Nikolai Weibull)
sensors syntax and ftplugin file. (Nikolai Weibull)
services syntax and ftplugin file. (Nikolai Weibull)
setserial syntax and ftplugin file. (Nikolai Weibull)
sieve syntax and ftplugin file. (Nikolai Weibull)
SiSU syntax file (Ralph Amissah)
Sive syntax file. (Nikolai Weibull)
slp config, reg and spi syntax and ftplugin files. (Nikolai Weibull)
SML indent file. (Saikat Guha)
SQL anywhere syntax and indent file. (David Fishburn)
SQL indent file.
SQL-Informix syntax file. (Dean L Hill)
SQL: Handling of various variants. (David Fishburn)
sshconfig ftplugin file. (Nikolai Weibull)
Stata and SMCL syntax files. (Jeff Pitblado)
sudoers ftplugin file. (Nikolai Weibull)
sysctl syntax and ftplugin file. (Nikolai Weibull)
terminfo ftplugin file. (Nikolai Weibull)
trustees syntax file. (Nima Talebi)
Vera syntax file. (David Eggum)
udev config, permissions and rules syntax and ftplugin files. (Nikolai Weibull)
updatedb syntax and ftplugin file. (Nikolai Weibull)
VHDL indent file (Gerald Lai)
WSML syntax file. (Thomas Haselwanter)
Xdefaults ftplugin file. (Nikolai Weibull)
XFree86 config ftplugin file. (Nikolai Weibull)
xinetd syntax, indent and ftplugin file. (Nikolai Weibull)
xmodmap ftplugin file. (Nikolai Weibull)
Xquery syntax file. (Jean-Marc Vanel)
xsd (XML schema) indent file.
YAML ftplugin file. (Nikolai Weibull)
Zsh ftplugin file. (Nikolai Weibull)
New Keymaps: ~
Sinhala (Sri Lanka) (Harshula Jayasuriya)
Tamil in TSCII encoding (Yegappan Lakshmanan)
Greek in cp737 (Panagiotis Louridas)
Polish-slash (HS6_06)
Ukrainian-jcuken (Anatoli Sakhnik)
Kana (Edward L. Fox)
New message translations: ~
The Ukrainian messages are now also available in cp1251.
Vietnamese message translations and menu. (Phan Vinh Thinh)
Others: ~
The |:read| command has the |++edit| argument. This means it will use the
detected 'fileformat', 'fileencoding' and other options for the buffer. This
also fixes the problem that editing a compressed file didn't set these
options.
The Netbeans interface was updated for Sun Studio 10. The protocol number
goes from 2.2 to 2.3. (Gordon Prieur)
Mac: When starting up Vim will load the $VIMRUNTIME/macmap.vim script to
define default command-key mappings. (mostly by Benji Fisher)
Mac: Add the selection type to the clipboard, so that Block, line and
character selections can be used between two Vims. (Eckehard Berns)
Also fixes the problem that setting 'clipboard' to "unnamed" breaks using
"yyp".
Mac: GUI font selector. (Peter Cucka)
Mac: support for multibyte characters. (Da Woon Jung)
This doesn't always work properly. If you see text drawing problems try
switching the 'macatsui' option off.
Mac: Support the xterm mouse in the non-GUI version.
Mac: better integration with Xcode. Post a fake mouse-up event after the odoc
event and the drag receive handler to work around a stall after Vim loads a
file. Fixed an off-by-one line number error. (Da Woon Jung)
Mac: When started from Finder change directory to the file being edited or the
user home directory.
Added the t_SI and t_EI escape sequences for starting and ending Insert mode.
To be used to set the cursor shape to a bar or a block. No default values,
they are not supported by termcap/terminfo.
GUI font selector for Motif. (Marcin Dalecki)
Nicer toolbar buttons for Motif. (Marcin Dalecki)
Mnemonics for the Motif find/replace dialog. (Marcin Dalecki)
Included a few improvements for Motif from Marcin Dalecki. Draw label
contents ourselves to make them handle fonts in a way configurable by Vim and
a bit less dependent on the X11 font management.
Autocommands can be defined local to a buffer. This means they will also work
when the buffer does not have a name or no specific name. See
|autocmd-buflocal|. (Yakov Lerner)
For xterm most combinations of modifiers with function keys are recognized.
|xterm-modifier-keys|
When 'verbose' is set the output of ":highlight" will show where a highlight
item was