codekingpro/portable-devtools
114k
1*version7.txt* For Vim version 9.2. Last change: 2026 Feb 142 3 4 VIM REFERENCE MANUAL by Bram Moolenaar5 6 7 *vim7* *version-7.0* *version7.0*8Welcome to Vim 7! A large number of features has been added. This file9mentions all the new items, changes to existing features and bug fixes10since Vim 6.x. Use this command to see the version you are using: >11 :version12 13See |vi_diff.txt| for an overview of differences between Vi and Vim 7.0.14See |version4.txt| for differences between Vim 3.x and Vim 4.x.15See |version5.txt| for differences between Vim 4.x and Vim 5.x.16See |version6.txt| for differences between Vim 5.x and Vim 6.x.17 18INCOMPATIBLE CHANGES |incompatible-7|19 20NEW FEATURES |new-7|21 22Vim script enhancements |new-vim-script|23Spell checking |new-spell|24Omni completion |new-omni-completion|25MzScheme interface |new-MzScheme|26Printing multibyte text |new-print-multibyte|27Tab pages |new-tab-pages|28Undo branches |new-undo-branches|29Extended Unicode support |new-more-unicode|30More highlighting |new-more-highlighting|31Translated manual pages |new-manpage-trans|32Internal grep |new-vimgrep|33Scroll back in messages |new-scroll-back|34Cursor past end of the line |new-onemore|35POSIX compatibility |new-posix|36Debugger support |new-debug-support|37Remote file explorer |new-netrw-explore|38Define an operator |new-define-operator|39Mapping to an expression |new-map-expression|40Visual and Select mode mappings |new-map-select|41Location list |new-location-list|42Various new items |new-items-7|43 44IMPROVEMENTS |improvements-7|45 46COMPILE TIME CHANGES |compile-changes-7|47 48BUG FIXES |bug-fixes-7|49 50VERSION 7.1 |version-7.1|51Changed |changed-7.1|52Added |added-7.1|53Fixed |fixed-7.1|54 55VERSION 7.2 |version-7.2|56Changed |changed-7.2|57Added |added-7.2|58Fixed |fixed-7.2|59 60VERSION 7.3 |version-7.3|61 62Persistent undo |new-persistent-undo|63More encryption |new-more-encryption|64Conceal text |new-conceal|65Lua interface |new-lua|66Python3 interface |new-python3|67 68Changed |changed-7.3|69Added |added-7.3|70Fixed |fixed-7.3|71 72VERSION 7.4 |version-7.4|73New regexp engine |new-regexp-engine|74Better Python interface |better-python-interface|75Changed |changed-7.4|76Added |added-7.4|77Fixed |fixed-7.4|78 79 80==============================================================================81INCOMPATIBLE CHANGES *incompatible-7*82 83These changes are incompatible with previous releases. Check this list if you84run into a problem when upgrading from Vim 6.x to 7.0.85 86A ":write file" command no longer resets the 'modified' flag of the buffer,87unless the '+' flag is in 'cpoptions' |cpo-+|. This was illogical, since the88buffer is still modified compared to the original file. And when undoing89all changes the file would actually be marked modified. It does mean that90":quit" fails now.91 92":helpgrep" now uses a help window to display a match.93 94In an argument list double quotes could be used to include spaces in a file95name. This caused a difference between ":edit" and ":next" for escaping96double quotes and it is incompatible with some versions of Vi.97 Command Vim 6.x file name Vim 7.x file name ~98 :edit foo\"888 foo"888 foo"88899 :next foo\"888 foo888 foo"888100 :next a\"b c\"d ab cd a"b and c"d101 102In a |literal-string| a single quote can be doubled to get one.103":echo 'a''b'" would result in "a b", but now that two quotes stand for one it104results in "a'b".105 106When overwriting a file with ":w! fname" there was no warning for when "fname"107was being edited by another Vim. Vim now gives an error message |E768|.108 109The support for Mac OS 9 has been removed.110 111Files ending in .tex now have 'filetype' set to "context", "plaintex", or112"tex". |ft-tex-plugin|113 114 115Minor incompatibilities:116 117For filetype detection: For many types, use */.dir/filename instead of118~/.dir/filename, so that it also works for other user's files.119 120For quite a few filetypes the indent settings have been moved from the121filetype plugin to the indent plugin. If you used: >122 :filetype plugin on123Then some indent settings may be missing. You need to use: >124 :filetype plugin indent on125 126":0verbose" now sets 'verbose' to zero instead of one.127 128Removed the old and incomplete "VimBuddy" code.129 130Buffers without a name report "No Name" instead of "No File". It was131confusing for buffers with a name and 'buftype' set to "nofile".132 133When ":file xxx" is used in a buffer without a name, the alternate file name134isn't set. This avoids creating buffers without a name, they are not useful.135 136The "2html.vim" script now converts closed folds to HTML. This means the HTML137looks like it's displayed, with the same folds open and closed. Use "zR", or138"let html_ignore_folding=1", if no folds should appear in the HTML. (partly by139Carl Osterwisch)140Diff mode is now also converted to HTML as it is displayed.141 142Win32: The effect of the <F10> key depended on 'winaltkeys'. Now it depends143on whether <F10> has been mapped or not. This allows mapping <F10> without144changing 'winaltkeys'.145 146When 'octal' is in 'nrformats' and using CTRL-A on "08" it became "018", which147is illogical. Now it becomes "9". The leading zero(s) is(are) removed to148avoid the number becoming octal after incrementing "009" to "010".149 150When 'encoding' is set to a Unicode encoding, the value for 'fileencodings'151now includes "default" before "latin1". This means that for files with 8-bit152encodings the default is to use the encoding specified by the environment, if153possible. Previously latin1 would always be used, which is wrong in a154non-latin1 environment, such as Russian.155 156Previously Vim would exit when there are two windows, both of them displaying157a help file, and using ":quit". Now only the window is closed.158 159"-w {scriptout}" only works when {scriptout} doesn't start with a digit.160Otherwise it's used to set the 'window' option.161 162Previously <Home> and <xHome> could be mapped separately. This had the163disadvantage that all mappings (with modifiers) had to be duplicated, since164you can't be sure what the keyboard generates. Now all <xHome> are internally165translated to <Home>, both for the keys and for mappings. Also for <xEnd>,166<xF1>, etc.167 168":put" now leaves the cursor on the last inserted line.169 170When a .gvimrc file exists then 'compatible' is off, just like when a ".vimrc"171file exists.172 173When making a string upper-case with "vlllU" or similar then the German sharp174s is replaced with "SS". This does not happen with "~" to avoid backwards175compatibility problems and because "SS" can't be changed back to a sharp s.176 177"gd" previously found the very first occurrence of a variable in a function,178that could be the function argument without type. Now it finds the position179where the type is given.180 181The line continuation in functions was not taken into account, line numbers in182errors were logical lines, not lines in the sourced file. That made it183difficult to locate errors. Now the line number in the sourced file is184reported, relative to the function start. This also means that line numbers185for ":breakadd func" are different.186 187When defining a user command with |:command| the special items could be188abbreviated. This caused unexpected behavior, such as <li> being recognized189as <line1>. The items can no longer be abbreviated.190 191When executing a FileChangedRO autocommand it is no longer allowed to switch192to another buffer or edit another file. This is to prevent crashes (the event193is triggered deep down in the code where changing buffers is not anticipated).194It is still possible to reload the buffer.195 196At the |more-prompt| and the |hit-enter-prompt|, when the 'more' option is197set, the 'k', 'u', 'g' and 'b' keys are now used to scroll back to previous198messages. Thus they are no longer used as typeahead.199 200==============================================================================201NEW FEATURES *new-7*202 203Vim script enhancements *new-vim-script*204-----------------------205 206In Vim scripts the following types have been added:207 208 |List| ordered list of items209 |Dictionary| associative array of items210 |Funcref| reference to a function211 212Many functions and commands have been added to support the new types.213 214The |string()| function can be used to get a string representation of a215variable. Works for Numbers, Strings and composites of them. Then |eval()|216can be used to turn the string back into the variable value.217 218The |:let| command can now use "+=", "-=" and ".=": >219 :let var += expr " works like :let var = var + expr220 :let var -= expr " works like :let var = var - expr221 :let var .= string " works like :let var = var . string222 223With the |:profile| command you can find out where your function or script224is wasting time.225 226In the Python interface vim.eval() also handles Dictionaries and Lists.227|python-eval| (G. Sumner Hayes)228 229The |getscript| plugin was added as a convenient way to update scripts from230www.vim.org automatically. (Charles Campbell)231 232The |vimball| plugin was added as a convenient way to distribute a set of233files for a plugin (plugin file, autoload script, documentation). (Charles234Campbell)235 236 237Spell checking *new-spell*238--------------239 240Spell checking has been integrated in Vim. There were a few implementations241with scripts, but they were slow and/or required an external program.242 243The 'spell' option is used to switch spell checking on or off244The 'spelllang' option is used to specify the accepted language(s)245The 'spellfile' option specifies where new words are added246The 'spellsuggest' option specifies the methods used for making suggestions247 248The |]s| and |[s| commands can be used to move to the next or previous error249The |zg| and |zw| commands can be used to add good and wrong words250The |z=| command can be used to list suggestions and correct the word251The |:mkspell| command is used to generate a Vim spell file from word lists252 253The "undercurl" highlighting attribute was added to nicely point out spelling254mistakes in the GUI (based on patch from Marcin Dalecki).255The "guisp" color can be used to give it a color different from foreground and256background.257The number of possible different highlight attributes was raised from about258220 to over 30000. This allows for the attributes of spelling to be combined259with syntax highlighting attributes. This is also used for syntax260highlighting and marking the Visual area.261 262Much more info here: |spell|.263 264 265Omni completion *new-omni-completion*266---------------267 268This could also be called "intellisense", but that is a trademark. It is a269smart kind of completion. The text in front of the cursor is inspected to270figure out what could be following. This may suggest struct and class271members, system functions, etc.272 273Use CTRL-X CTRL-O in Insert mode to start the completion. |i_CTRL-X_CTRL-O|274 275The 'omnifunc' option is set by filetype plugins to define the function that276figures out the completion.277 278Currently supported languages:279 C |ft-c-omni|280 (X)HTML with CSS |ft-html-omni|281 JavaScript |ft-javascript-omni|282 PHP |ft-php-omni|283 Python284 Ruby |ft-ruby-omni|285 SQL |ft-sql-omni|286 XML |ft-xml-omni|287 any language with syntax highlighting |ft-syntax-omni|288 289You can add your own omni completion scripts.290 291When the 'completeopt' option contains "menu" then matches for Insert mode292completion are displayed in a (rather primitive) popup menu.293 294 295MzScheme interface *new-MzScheme*296------------------297 298The MzScheme interpreter is supported. |MzScheme|299 300The |:mzscheme| command can be used to execute MzScheme commands301The |:mzfile| command can be used to execute an MzScheme script file302 303This depends on Vim being compiled with the |+mzscheme| feature.304 305 306Printing multibyte text *new-print-multibyte*307------------------------308 309The |:hardcopy| command now supports printing multibyte characters when using310PostScript.311 312The 'printmbcharset' and 'printmbfont' options are used for this.313Also see |postscript-cjk-printing|. (Mike Williams)314 315 316Tab pages *new-tab-pages*317---------318 319A tab page is a page with one or more windows with a label (aka tab) at the top.320By clicking on the label you can quickly switch between the tab pages. And321with the keyboard, using the |gt| (Goto Tab) command. This is a convenient322way to work with many windows.323 324To start Vim with each file argument in a separate tab page use the |-p|325argument. The maximum number of pages can be set with 'tabpagemax'.326 327The line with tab labels is either made with plain text and highlighting or328with a GUI mechanism. The GUI labels look better but are only available on a329few systems. The line can be customized with 'tabline', 'guitablabel' and330'guitabtooltip'. Whether it is displayed is set with 'showtabline'. Whether331to use the GUI labels is set with the "e" flag in 'guioptions'.332 333The |:tab| command modifier can be used to have most commands that open a new334window open a new tab page instead.335 336The |--remote-tab| argument can be used to edit a file in a new tab page in an337already running Vim server.338 339Variables starting with "t:" are local to a tab page.340 341More info here: |tabpage|342Most of the GUI stuff was implemented by Yegappan Lakshmanan.343 344 345Undo branches *new-undo-branches*346-------------347 348Previously there was only one line of undo-redo. If, after undoing a number349of changes, a new change was made all the undone changes were lost. This350could lead to accidentally losing work.351 352Vim now makes an undo branch in this situation. Thus you can go back to the353text after any change, even if they were undone. So long as you do not run354into 'undolevels', when undo information is freed up to limit the memory used.355 356To be able to navigate the undo branches each change is numbered sequentially.357The commands |g-| and |:earlier| go back in time, to older changes. The358commands |g+| and |:later| go forward in time, to newer changes.359 360The changes are also timestamped. Use ":earlier 10m" to go to the text as it361was about ten minutes earlier.362 363The |:undolist| command can be used to get an idea of which undo branches364exist. The |:undo| command now takes an argument to directly jump to a365specific position in this list. The |changenr()| function can be used to366obtain the change number.367 368There is no graphical display of the tree with changes, navigation can be369quite confusing.370 371 372Extended Unicode support *new-more-unicode*373------------------------374 375Previously only two combining characters were displayed. The limit is now376raised to 6. This can be set with the 'maxcombine' option. The default is377still 2.378 379|ga| now shows all combining characters, not just the first two.380 381Previously only 16 bit Unicode characters were supported for displaying. Now382the full 32 bit character set can be used. Unless manually disabled at383compile time to save a bit of memory.384 385For pattern matching it is now possible to search for individual composing386characters. |patterns-composing|387 388The |8g8| command searches for an illegal UTF-8 byte sequence.389 390 391More highlighting *new-more-highlighting*392-----------------393 394Highlighting matching parens:395 396When moving the cursor through the text and it is on a paren, then the397matching paren can be highlighted. This uses the new |CursorMoved|398autocommand event.399 400This means some commands are executed every time you move the cursor. If this401slows you down too much switch it off with: >402 :NoMatchParen403 404See |matchparen| for more information.405 406The plugin uses the |:match| command. It now supports three match patterns.407The plugin uses the third one. The first one is for the user and the second408one can be used by another plugin.409 410Highlighting the cursor line and column:411 412The 'cursorline' and 'cursorcolumn' options have been added. These highlight413the screen line and screen column of the cursor. This makes the cursor414position easier to spot. 'cursorcolumn' is also useful to align text. This415may make screen updating quite slow. The CursorColumn and CursorLine416highlight groups allow changing the colors used. |hl-CursorColumn|417|hl-CursorLine|418 419The number of possible different highlight attributes was raised from about420220 to over 30000. This allows for the attributes of spelling to be combined421with syntax highlighting attributes. This is also used for syntax422highlighting, marking the Visual area, CursorColumn, etc.423 424 425Translated manual pages *new-manpage-trans*426-----------------------427 428The manual page of Vim and associated programs is now also available in429several other languages.430 431French - translated by David Blanchet432Italian - translated by Antonio Colombo433Russian - translated by Vassily Ragosin434Polish - translated by Mikolaj Machowski435 436The Unix Makefile installs the Italian manual pages in .../man/it/man1/,437.../man/it.ISO8859-1/man1/ and .../man/it.UTF-8/man1/. There appears to be no438standard for what encoding goes in the "it" directory, the 8-bit encoded file439is used there as a best guess.440Other languages are installed in similar places.441The translated pages are not automatically installed when Vim was configured442with "--disable-nls", but "make install-languages install-tool-languages" will443do it anyway.444 445 446Internal grep *new-vimgrep*447-------------448 449The ":vimgrep" command can be used to search for a pattern in a list of files.450This is like the ":grep" command, but no external program is used. Besides451better portability, handling of different file encodings and using multi-line452patterns, this also allows grepping in compressed and remote files.453|:vimgrep|.454 455If you want to use the search results in a script you can use the456|getqflist()| function.457 458To grep files in various directories the "**" pattern can be used. It expands459into an arbitrary depth of directories. "**" can be used in all places where460file names are expanded, thus also with |:next| and |:args|.461 462 463Scroll back in messages *new-scroll-back*464-----------------------465 466When displaying messages, at the |more-prompt| and the |hit-enter-prompt|, The467'k', 'u', 'g' and 'b' keys can be used to scroll back to previous messages.468This is especially useful for commands such as ":syntax", ":autocommand" and469":highlight". This is implemented in a generic way thus it works for all470commands and highlighting is kept. Only works when the 'more' option is set.471Previously it only partly worked for ":clist".472 473The |g<| command can be used to see the last page of messages after you have474hit <Enter> at the |hit-enter-prompt|. Then you can scroll further back.475 476 477Cursor past end of the line *new-onemore*478---------------------------479 480When the 'virtualedit' option contains "onemore" the cursor can move just past481the end of the line. As if it's on top of the line break.482 483This makes some commands more consistent. Previously the cursor was always484past the end of the line if the line was empty. But it is far from Vi485compatible. It may also break some plugins or Vim scripts. Use with care!486 487The patch was provided by Mattias Flodin.488 489 490POSIX compatibility *new-posix*491-------------------492 493The POSIX test suite was used to verify POSIX compatibility. A number of494problems have been fixed to make Vim more POSIX compatible. Some of them495conflict with traditional Vi or expected behavior. The $VIM_POSIX environment496variable can be set to get POSIX compatibility. See |posix|.497 498Items that were fixed for both Vi and POSIX compatibility:499- repeating "R" with a count only overwrites text once; added the 'X' flag to500 'cpoptions' |cpo-X|501- a vertical movement command that moves to a non-existing line fails; added502 the '-' flag to 'cpoptions' |cpo--|503- when preserving a file and doing ":q!" the file can be recovered; added the504 '&' flag to 'cpoptions' |cpo-&|505- The 'window' option is partly implemented. It specifies how much CTRL-F and506 CTRL-B scroll when there is one window. The "-w {number}" argument is now507 accepted. "-w {scriptout}" only works when {scriptout} doesn't start with a508 digit.509- Allow "-c{command}" argument, no space between "-c" and {command}.510- When writing a file with ":w!" don't reset 'readonly' when 'Z' is present in511 'cpoptions'.512- Allow 'l' and '#' flags for ":list", ":print" and ":number".513- Added the '.' flag to 'cpoptions': ":cd" fails when the buffer is modified.514- In Ex mode with an empty buffer ":read file" doesn't keep an empty line515 above or below the new lines.516- Remove a backslash before a NL for the ":global" command.517- When ":append", ":insert" or ":change" is used with ":global", get the518 inserted lines from the command. Can use backslash-NL to separate lines.519- Can use ":global /pat/ visual" to execute Normal mode commands at each520 matched line. Use "Q" to continue and go to the next line.521- The |:open| command has been partially implemented. It stops Ex mode, but522 redraws the whole screen, not just one line as open mode is supposed to do.523- Support using a pipe to read the output from and write input to an external524 command. Added the 'shelltemp' option and has("filterpipe").525- In ex silent mode the ":set" command output is displayed.526- The ":@@" and ":**" give an error message when no register was used before.527- The search pattern "[]-`]" matches ']', '^', '_' and '`'.528- Autoindent for ":insert" is using the line below the insert.529- Autoindent for ":change" is using the first changed line.530- Editing Ex command lines is not done in cooked mode, because CTRL-D and531 CTRL-T cannot be handled then.532- In Ex mode, "1,3" prints three lines. "%" prints all lines.533- In Ex mode "undo" would undo all changes since Ex mode was started.534- Implemented the 'prompt' option.535 536 537Debugger support *new-debug-support*538----------------539 540The 'balloonexpr' option has been added. This is a generic way to implement541balloon functionality. You can use it to show info for the word under the542mouse pointer.543 544 545Remote file explorer *new-netrw-explore*546--------------------547 548The netrw plugin now also supports viewing a directory, when "scp://" is used.549Deleting and renaming files is possible.550 551To avoid duplicating a lot of code, the previous file explorer plugin has been552integrated in the netrw plugin. This means browsing local and remote files553works the same way.554 555":browse edit" and ":browse split" use the netrw plugin when it's available556and a GUI dialog is not possible.557 558The netrw plugin is maintained by Charles Campbell.559 560 561Define an operator *new-define-operator*562------------------563 564Previously it was not possible to define your own operator; a command that is565followed by a {motion}. Vim 7 introduces the 'operatorfunc' option and the566|g@| operator. This makes it possible to define a mapping that works like an567operator. The actual work is then done by a function, which is invoked568through the |g@| operator.569 570See |:map-operator| for the explanation and an example.571 572 573Mapping to an expression *new-map-expression*574------------------------575 576The {rhs} argument of a mapping can be an expression. That means the577resulting characters can depend on the context. Example: >578 :inoremap <expr> . InsertDot()579Here the dot will be mapped to whatever InsertDot() returns.580 581This also works for abbreviations. See |:map-<expr>| for the details.582 583 584Visual and Select mode mappings *new-map-select*585-------------------------------586 587Previously Visual mode mappings applied both to Visual and Select mode. With588a trick to have the mappings work in Select mode like they would in Visual589mode.590 591Commands have been added to define mappings for Visual and Select mode592separately: |:xmap| and |:smap|. With the associated "noremap" and "unmap"593commands.594 595The same is done for menus: |:xmenu|, |:smenu|, etc.596 597 598Location list *new-location-list*599-------------600 601The support for a per-window quickfix list (location list) is added. The602location list can be displayed in a location window (similar to the quickfix603window). You can open more than one location list window. A set of commands604similar to the quickfix commands are added to browse the location list.605(Yegappan Lakshmanan)606 607 608Various new items *new-items-7*609-----------------610 611Normal mode commands: ~612 613a", a' and a` New text objects to select quoted strings. |a'|614i", i' and i` (Taro Muraoka)615 616CTRL-W <Enter> In the quickfix window: opens a new window to show the617 location of the error under the cursor.618 619|at| and |it| text objects select a block of text between HTML or XML tags.620 621<A-LeftMouse> ('mousemodel' "popup" or "popup-setpos")622<A-RightMouse> ('mousemodel' "extend")623 Make a blockwise selection. |<A-LeftMouse>|624 625gF Start editing the filename under the cursor and jump626 to the line number following the file name.627 (Yegappan Lakshmanan)628 629CTRL-W F Start editing the filename under the cursor in a new630 window and jump to the line number following the file631 name. (Yegappan Lakshmanan)632 633Insert mode commands: ~634 635CTRL-\ CTRL-O Execute a Normal mode command. Like CTRL-O but636 without moving the cursor. |i_CTRL-\_CTRL-O|637 638Options: ~639 640'balloonexpr' expression for text to show in evaluation balloon641'completefunc' The name of the function used for user-specified642 Insert mode completion. CTRL-X CTRL-U can be used in643 Insert mode to do any kind of completion. (Taro644 Muraoka)645'completeopt' Enable popup menu and other settings for Insert mode646 completion.647'cursorcolumn' highlight column of the cursor648'cursorline' highlight line of the cursor649'formatexpr' expression for formatting text with |gq| and when text650 goes over 'textwidth' in Insert mode.651'formatlistpat' pattern to recognize a numbered list for formatting.652 (idea by Hugo Haas)653'fsync' Whether fsync() is called after writing a file.654 (Ciaran McCreesh)655'guitablabel' expression for text to display in GUI tab page label656'guitabtooltip' expression for text to display in GUI tab page tooltip657'macatsui' Mac: use ATSUI text display functions658'maxcombine' maximum number of combining characters displayed659'maxmempattern' maximum amount of memory to use for pattern matching660'mkspellmem' parameters for |:mkspell| memory use661'mzquantum' Time in msec to schedule MzScheme threads.662'numberwidth' Minimal width of the space used for the 'number' and663 'relativenumber' option. (Emmanuel Renieris)664'omnifunc' The name of the function used for omni completion.665'operatorfunc' function to be called for |g@| operator666'printmbcharset' CJK character set to be used for :hardcopy667'printmbfont' font names to be used for CJK output of :hardcopy668'pumheight' maximum number of items to show in the popup menu669'quoteescape' Characters used to escape quotes inside a string.670 Used for the a", a' and a` text objects. |a'|671'shelltemp' whether to use a temp file or pipes for shell commands672'showtabline' whether to show the tab pages line673'spell' switch spell checking on/off674'spellcapcheck' pattern to locate the end of a sentence675'spellfile' file where good and wrong words are added676'spelllang' languages to check spelling for677'spellsuggest' methods for spell suggestions678'synmaxcol' maximum column to look for syntax items; avoids very679 slow redrawing when there are very long lines680'tabline' expression for text to display in the tab pages line681'tabpagemax' maximum number of tab pages to open for |-p|682'verbosefile' Log messages in a file.683'wildoptions' "tagfile" value enables listing the file name of684 matching tags for CTRL-D command line completion.685 (based on an idea from Yegappan Lakshmanan)686'winfixwidth' window with fixed width, similar to 'winfixheight'687 688 689Ex commands: ~690 691Win32: The ":winpos" command now also works in the console. (Vipin Aravind)692 693|:startreplace| Start Replace mode. (Charles Campbell)694|:startgreplace| Start Virtual Replace mode.695 696|:0file| Removes the name of the buffer. (Charles Campbell)697 698|:diffoff| Switch off diff mode in the current window or in all699 windows.700 701|:delmarks| Delete marks.702 703|:exusage| Help for Ex commands (Nvi command).704|:viusage| Help for Vi commands (Nvi command).705 706|:sort| Sort lines in the buffer without depending on an707 external command. (partly by Bryce Wagner)708 709|:vimgrep| Internal grep command, search for a pattern in files.710|:vimgrepadd| Like |:vimgrep| but don't make a new list.711 712|:caddfile| Add error messages to an existing quickfix list713 (Yegappan Lakshmanan).714|:cbuffer| Read error lines from a buffer. (partly by Yegappan715 Lakshmanan)716|:cgetbuffer| Create a quickfix list from a buffer but don't jump to717 the first error.718|:caddbuffer| Add errors from the current buffer to the quickfix719 list.720|:cexpr| Read error messages from a Vim expression (Yegappan721 Lakshmanan).722|:caddexpr| Add error messages from a Vim expression to an723 existing quickfix list. (Yegappan Lakshmanan).724|:cgetexpr| Create a quickfix list from a Vim expression, but725 don't jump to the first error. (Yegappan Lakshmanan).726 727|:lfile| Like |:cfile| but use the location list.728|:lgetfile| Like |:cgetfile| but use the location list.729|:laddfile| Like |:caddfile| but use the location list.730|:lbuffer| Like |:cbuffer| but use the location list.731|:lgetbuffer| Like |:cgetbuffer| but use the location list.732|:laddbuffer| Like |:caddbuffer| but use the location list.733|:lexpr| Like |:cexpr| but use the location list.734|:lgetexpr| Like |:cgetexpr| but use the location list.735|:laddexpr| Like |:caddexpr| but use the location list.736|:ll| Like |:cc| but use the location list.737|:llist| Like |:clist| but use the location list.738|:lnext| Like |:cnext| but use the location list.739|:lprevious| Like |:cprevious| but use the location list.740|:lNext| Like |:cNext| but use the location list.741|:lfirst| Like |:cfirst| but use the location list.742|:lrewind| Like |:crewind| but use the location list.743|:llast| Like |:clast| but use the location list.744|:lnfile| Like |:cnfile| but use the location list.745|:lpfile| Like |:cpfile| but use the location list.746|:lNfile| Like |:cNfile| but use the location list.747|:lolder| Like |:colder| but use the location list.748|:lnewer| Like |:cnewer| but use the location list.749|:lwindow| Like |:cwindow| but use the location list.750|:lopen| Like |:copen| but use the location list.751|:lclose| Like |:cclose| but use the location list.752|:lmake| Like |:make| but use the location list.753|:lgrep| Like |:grep| but use the location list.754|:lgrepadd| Like |:grepadd| but use the location list.755|:lvimgrep| Like |:vimgrep| but use the location list.756|:lvimgrepadd| Like |:vimgrepadd| but use the location list.757|:lhelpgrep| Like |:helpgrep| but use the location list.758|:lcscope| Like |:cscope| but use the location list.759|:ltag| Jump to a tag and add matching tags to a location list.760 761|:undojoin| Join a change with the previous undo block.762|:undolist| List the leafs of the undo tree.763 764|:earlier| Go back in time for changes in the text.765|:later| Go forward in time for changes in the text.766 767|:for| Loop over a |List|.768|:endfor|769 770|:lockvar| Lock a variable, prevents it from being changed.771|:unlockvar| Unlock a locked variable.772 773|:mkspell| Create a Vim spell file.774|:spellgood| Add a word to the list of good words.775|:spellwrong| Add a word to the list of bad words776|:spelldump| Dump list of good words.777|:spellinfo| Show information about the spell files used.778|:spellrepall| Repeat a spelling correction for the whole buffer.779|:spellundo| Remove a word from list of good and bad words.780 781|:mzscheme| Execute MzScheme commands.782|:mzfile| Execute an MzScheme script file.783 784|:nbkey| Pass a key to NetBeans for processing.785 786|:profile| Commands for Vim script profiling.787|:profdel| Stop profiling for specified items.788 789|:smap| Select mode mapping.790|:smapclear|791|:snoremap|792|:sunmap|793 794|:xmap| Visual mode mapping, not used for Select mode.795|:xmapclear|796|:xnoremap|797|:xunmap|798 799|:smenu| Select mode menu.800|:snoremenu|801|:sunmenu|802 803|:xmenu| Visual mode menu, not used for Select mode.804|:xnoremenu|805|:xunmenu|806 807|:tabclose| Close the current tab page.808|:tabdo| Perform a command in every tab page.809|:tabedit| Edit a file in a new tab page.810|:tabnew| Open a new tab page.811|:tabfind| Search for a file and open it in a new tab page.812|:tabnext| Go to the next tab page.813|:tabprevious| Go to the previous tab page.814|:tabNext| Go to the previous tab page.815|:tabfirst| Go to the first tab page.816|:tabrewind| Go to the first tab page.817|:tablast| Go to the last tab page.818|:tabmove| Move the current tab page elsewhere.819|:tabonly| Close all other tab pages.820|:tabs| List the tab pages and the windows they contain.821 822Ex command modifiers: ~823 824|:keepalt| Do not change the alternate file.825 826|:noautocmd| Do not trigger autocommand events.827 828|:sandbox| Execute a command in the sandbox.829 830|:tab| When opening a new window create a new tab page.831 832 833Ex command arguments: ~834 835|++bad| Specify what happens with characters that can't be836 converted and illegal bytes. (code example by Yasuhiro837 Matsumoto)838 Also, when a conversion error occurs or illegal bytes839 are found include the line number in the error840 message.841 842 843New and extended functions: ~844 845|add()| append an item to a List846|append()| append List of lines to the buffer847|argv()| without an argument return the whole argument list848|browsedir()| dialog to select a directory849|bufnr()| takes an extra argument: create buffer850|byteidx()| index of a character (Ilya Sher)851|call()| call a function with List as arguments852|changenr()| number of current change853|complete()| set matches for Insert mode completion854|complete_add()| add match for 'completefunc'855|complete_check()| check for key pressed, for 'completefunc'856|copy()| make a shallow copy of a List or Dictionary857|count()| count nr of times a value is in a List or Dictionary858|cursor()| also accepts an offset for 'virtualedit', and859 the first argument can be a list: [lnum, col, off]860|deepcopy()| make a full copy of a List or Dictionary861|diff_filler()| returns number of filler lines above line {lnum}.862|diff_hlID()| returns the highlight ID for diff mode863|empty()| check if List or Dictionary is empty864|eval()| evaluate {string} and return the result865|extend()| append one List to another or add items from one866 Dictionary to another867|feedkeys()| put characters in the typeahead buffer868|filter()| remove selected items from a List or Dictionary869|finddir()| find a directory in 'path'870|findfile()| find a file in 'path' (Johannes Zellner)871|foldtextresult()| the text displayed for a closed fold at line "lnum"872|function()| make a Funcref out of a function name873|garbagecollect()| cleanup unused |Lists| and |Dictionaries| with circular874 references875|get()| get an item from a List or Dictionary876|getbufline()| get a list of lines from a specified buffer877 (Yegappan Lakshmanan)878|getcmdtype()| return the current command-line type879 (Yegappan Lakshmanan)880|getfontname()| get actual font name being used881|getfperm()| get file permission string (Nikolai Weibull)882|getftype()| get type of file (Nikolai Weibull)883|getline()| with second argument: get List with buffer lines884|getloclist()| list of location list items (Yegappan Lakshmanan)885|getpos()| return a list with the position of cursor, mark, etc.886|getqflist()| list of quickfix errors (Yegappan Lakshmanan)887|getreg()| get contents of a register888|gettabwinvar()| get variable from window in specified tab page.889|has_key()| check whether a key appears in a Dictionary890|haslocaldir()| check if current window used |:lcd|891|hasmapto()| check for a mapping to a string892|index()| index of item in List893|inputlist()| prompt the user to make a selection from a list894|insert()| insert an item somewhere in a List895|islocked()| check if a variable is locked896|items()| get List of Dictionary key-value pairs897|join()| join List items into a String898|keys()| get List of Dictionary keys899|len()| number of items in a List or Dictionary900|map()| change each List or Dictionary item901|maparg()| extra argument: use abbreviation902|mapcheck()| extra argument: use abbreviation903|match()| extra argument: count904|matcharg()| return arguments of |:match| command905|matchend()| extra argument: count906|matchlist()| list with match and submatches of a pattern in a string907|matchstr()| extra argument: count908|max()| maximum value in a List or Dictionary909|min()| minimum value in a List or Dictionary910|mkdir()| create a directory911|pathshorten()| reduce directory names to a single character912|printf()| format text913|pumvisible()| check whether the popup menu is displayed914|range()| generate a List with numbers915|readfile()| read a file into a list of lines916|reltime()| get time value, possibly relative917|reltimestr()| turn a time value into a string918|remove()| remove one or more items from a List or Dictionary919|repeat()| repeat "expr" "count" times (Christophe Poucet)920|reverse()| reverse the order of a List921|search()| extra argument:922|searchdecl()| search for declaration of variable923|searchpair()| extra argument: line to stop searching924|searchpairpos()| return a List with the position of the match925|searchpos()| return a List with the position of the match926|setloclist()| modify a location list (Yegappan Lakshmanan)927|setpos()| set cursor or mark to a position928|setqflist()| modify a quickfix list (Yegappan Lakshmanan)929|settabwinvar()| set variable in window of specified tab page930|sort()| sort a List931|soundfold()| get the sound-a-like equivalent of a word932|spellbadword()| get a badly spelled word933|spellsuggest()| get suggestions for correct spelling934|split()| split a String into a List935|str2nr()| convert a string to a number, base 2, 8, 10 or 16936|stridx()| extra argument: start position937|strridx()| extra argument: start position938|string()| string representation of a List or Dictionary939|system()| extra argument: filters {input} through a shell command940|tabpagebuflist()| List of buffers in a tab page941|tabpagenr()| number of current or last tab page942|tabpagewinnr()| window number in a tab page943|tagfiles()| List with tags file names944|taglist()| get list of matching tags (Yegappan Lakshmanan)945|tr()| translate characters (Ron Aaron)946|uniq()| remove copies of repeated adjacent list items947|values()| get List of Dictionary values948|winnr()| takes an argument: what window to use949|winrestview()| restore the view of the current window950|winsaveview()| save the view of the current window951|writefile()| write a list of lines into a file952 953User defined functions can now be loaded automatically from the "autoload"954directory in 'runtimepath'. See |autoload-functions|.955 956 957New Vim variables: ~958 959|v:insertmode| used for |InsertEnter| and |InsertChange| autocommands960|v:val| item value in a |map()| or |filter()| function961|v:key| item key in a |map()| or |filter()| function962|v:profiling| non-zero after a ":profile start" command963|v:fcs_reason| the reason why |FileChangedShell| was triggered964|v:fcs_choice| what should happen after |FileChangedShell|965|v:beval_bufnr| buffer number for 'balloonexpr'966|v:beval_winnr| window number for 'balloonexpr'967|v:beval_lnum| line number for 'balloonexpr'968|v:beval_col| column number for 'balloonexpr'969|v:beval_text| text under the mouse pointer for 'balloonexpr'970|v:scrollstart| what caused the screen to be scrolled up971|v:swapname| name of the swap file for the |SwapExists| event972|v:swapchoice| what to do for an existing swap file973|v:swapcommand| command to be executed after handling |SwapExists|974|v:char| argument for evaluating 'formatexpr'975 976 977New autocommand events: ~978 979|ColorScheme| after loading a color scheme980 981|CursorHoldI| the user doesn't press a key for a while in Insert mode982|CursorMoved| the cursor was moved in Normal mode983|CursorMovedI| the cursor was moved in Insert mode984 985|FileChangedShellPost| after handling a file changed outside of Vim986 987|InsertEnter| starting Insert or Replace mode988|InsertChange| going from Insert to Replace mode or back989|InsertLeave| leaving Insert or Replace mode990 991|MenuPopup| just before showing popup menu992 993|QuickFixCmdPre| before :make, :grep et al. (Ciaran McCreesh)994|QuickFixCmdPost| after :make, :grep et al. (Ciaran McCreesh)995 996|SessionLoadPost| after loading a session file. (Yegappan Lakshmanan)997 998|ShellCmdPost| after executing a shell command999|ShellFilterPost| after filtering with a shell command1000 1001|SourcePre| before sourcing a Vim script1002 1003|SpellFileMissing| when a spell file can't be found1004 1005|SwapExists| found existing swap file when editing a file1006 1007|TabEnter| just after entering a tab page1008|TabLeave| just before leaving a tab page1009 1010|VimResized| after the Vim window size changed (Yakov Lerner)1011 1012 1013New highlight groups: ~1014 1015Pmenu Popup menu: normal item |hl-Pmenu|1016PmenuSel Popup menu: selected item |hl-PmenuSel|1017PmenuThumb Popup menu: scrollbar |hl-PmenuThumb|1018PmenuSbar Popup menu: Thumb of the scrollbar |hl-PmenuSbar|1019 1020TabLine tab pages line, inactive label |hl-TabLine|1021TabLineSel tab pages line, selected label |hl-TabLineSel|1022TabLineFill tab pages line, filler |hl-TabLineFill|1023 1024SpellBad badly spelled word |hl-SpellBad|1025SpellCap word with wrong caps |hl-SpellCap|1026SpellRare rare word |hl-SpellRare|1027SpellLocal word only exists in other region |hl-SpellLocal|1028 1029CursorColumn 'cursorcolumn' |hl-CursorColumn|1030CursorLine 'cursorline' |hl-CursorLine|1031 1032MatchParen matching parens |pi_paren.txt| |hl-MatchParen|1033 1034 1035New items in search patterns: ~1036|/\%d| \%d123 search for character with decimal number1037|/\]| [\d123] idem, in a collection1038|/\%o| \%o103 search for character with octal number1039|/\]| [\o1o3] idem, in a collection1040|/\%x| \%x1a search for character with 2 pos. hex number1041|/\]| [\x1a] idem, in a collection1042|/\%u| \%u12ab search for character with 4 pos. hex number1043|/\]| [\u12ab] idem, in a collection1044|/\%U| \%U1234abcd search for character with 8 pos. hex number1045|/\]| [\U1234abcd] idem, in a collection1046 (The above partly by Ciaran McCreesh)1047 1048|/[[=| [[=a=]] an equivalence class (only for latin1 characters)1049|/[[.| [[.a.]] a collation element (only works with single char)1050 1051|/\%'m| \%'m match at mark m1052|/\%<'m| \%<'m match before mark m1053|/\%>'m| \%>'m match after mark m1054|/\%V| \%V match in Visual area1055 1056Nesting |/multi| items no longer is an error when an empty match is possible.1057 1058It is now possible to use \{0}, it matches the preceding atom zero times. Not1059useful, just for compatibility.1060 1061 1062New Syntax/Indent/FTplugin files: ~1063 1064Moved all the indent settings from the filetype plugin to the indent file.1065Implemented b:undo_indent to undo indent settings when setting 'filetype' to a1066different value.1067 1068a2ps syntax and ftplugin file. (Nikolai Weibull)1069ABAB/4 syntax file. (Marius van Wyk)1070alsaconf ftplugin file. (Nikolai Weibull)1071AppendMatchGroup ftplugin file. (Dave Silvia)1072arch ftplugin file. (Nikolai Weibull)1073asterisk and asteriskvm syntax file. (Tilghman Lesher)1074BDF ftplugin file. (Nikolai Weibull)1075BibTeX indent file. (Dorai Sitaram)1076BibTeX Bibliography Style syntax file. (Tim Pope)1077BTM ftplugin file. (Bram Moolenaar)1078calendar ftplugin file. (Nikolai Weibull)1079Changelog indent file. (Nikolai Weibull)1080ChordPro syntax file. (Niels Bo Andersen)1081Cmake indent and syntax file. (Andy Cedilnik)1082conf ftplugin file. (Nikolai Weibull)1083context syntax and ftplugin file. (Nikolai Weibull)1084CRM114 ftplugin file. (Nikolai Weibull)1085cvs RC ftplugin file. (Nikolai Weibull)1086D indent file. (Jason Mills)1087Debian Sources.list syntax file. (Matthijs Mohlmann)1088dictconf and dictdconf syntax, indent and ftplugin files. (Nikolai Weibull)1089diff ftplugin file. (Bram Moolenaar)1090dircolors ftplugin file. (Nikolai Weibull)1091django and htmldjango syntax file. (Dave Hodder)1092doxygen syntax file. (Michael Geddes)1093elinks ftplugin file. (Nikolai Weibull)1094eterm ftplugin file. (Nikolai Weibull)1095eviews syntax file. (Vaidotas Zemlys)1096fetchmail RC ftplugin file. (Nikolai Weibull)1097FlexWiki syntax and ftplugin file. (George Reilly)1098Generic indent file. (Dave Silvia)1099gpg ftplugin file. (Nikolai Weibull)1100gretl syntax file. (Vaidotas Zemlys)1101groovy syntax file. (Alessio Pace)1102group syntax and ftplugin file. (Nikolai Weibull)1103grub ftplugin file. (Nikolai Weibull)1104Haskell ftplugin file. (Nikolai Weibull)1105help ftplugin file. (Nikolai Weibull)1106indent ftplugin file. (Nikolai Weibull)1107Javascript ftplugin file. (Bram Moolenaar)1108Kconfig ftplugin and syntax file. (Nikolai Weibull)1109ld syntax, indent and ftplugin file. (Nikolai Weibull)1110lftp ftplugin file. (Nikolai Weibull)1111libao config ftplugin file. (Nikolai Weibull)1112limits syntax and ftplugin file. (Nikolai Weibull)1113Lisp indent file. (Sergey Khorev)1114loginaccess and logindefs syntax and ftplugin file. (Nikolai Weibull)1115m4 ftplugin file. (Nikolai Weibull)1116mailaliases syntax file. (Nikolai Weibull)1117mailcap ftplugin file. (Nikolai Weibull)1118manconf syntax and ftplugin file. (Nikolai Weibull)1119matlab ftplugin file. (Jake Wasserman)1120Maxima syntax file. (Robert Dodier)1121MGL syntax file. (Gero Kuhlmann)1122modconf ftplugin file. (Nikolai Weibull)1123mplayer config ftplugin file. (Nikolai Weibull)1124Mrxvtrc syntax and ftplugin file. (Gautam Iyer)1125MuPAD source syntax, indent and ftplugin. (Dave Silvia)1126mutt RC ftplugin file. (Nikolai Weibull)1127nanorc syntax and ftplugin file. (Nikolai Weibull)1128netrc ftplugin file. (Nikolai Weibull)1129pamconf syntax and ftplugin file. (Nikolai Weibull)1130Pascal indent file. (Neil Carter)1131passwd syntax and ftplugin file. (Nikolai Weibull)1132PHP compiler plugin. (Doug Kearns)1133pinfo ftplugin file. (Nikolai Weibull)1134plaintex syntax and ftplugin files. (Nikolai Weibull, Benji Fisher)1135procmail ftplugin file. (Nikolai Weibull)1136prolog ftplugin file. (Nikolai Weibull)1137protocols syntax and ftplugin file. (Nikolai Weibull)1138quake ftplugin file. (Nikolai Weibull)1139racc syntax and ftplugin file. (Nikolai Weibull)1140readline ftplugin file. (Nikolai Weibull)1141rhelp syntax file. (Johannes Ranke)1142rnoweb syntax file. (Johannes Ranke)1143Relax NG compact ftplugin file. (Nikolai Weibull)1144Scheme indent file. (Sergey Khorev)1145screen ftplugin file. (Nikolai Weibull)1146sensors syntax and ftplugin file. (Nikolai Weibull)1147services syntax and ftplugin file. (Nikolai Weibull)1148setserial syntax and ftplugin file. (Nikolai Weibull)1149sieve syntax and ftplugin file. (Nikolai Weibull)1150SiSU syntax file (Ralph Amissah)1151Sive syntax file. (Nikolai Weibull)1152slp config, reg and spi syntax and ftplugin files. (Nikolai Weibull)1153SML indent file. (Saikat Guha)1154SQL anywhere syntax and indent file. (David Fishburn)1155SQL indent file.1156SQL-Informix syntax file. (Dean L Hill)1157SQL: Handling of various variants. (David Fishburn)1158sshconfig ftplugin file. (Nikolai Weibull)1159Stata and SMCL syntax files. (Jeff Pitblado)1160sudoers ftplugin file. (Nikolai Weibull)1161sysctl syntax and ftplugin file. (Nikolai Weibull)1162terminfo ftplugin file. (Nikolai Weibull)1163trustees syntax file. (Nima Talebi)1164Vera syntax file. (David Eggum)1165udev config, permissions and rules syntax and ftplugin files. (Nikolai Weibull)1166updatedb syntax and ftplugin file. (Nikolai Weibull)1167VHDL indent file (Gerald Lai)1168WSML syntax file. (Thomas Haselwanter)1169Xdefaults ftplugin file. (Nikolai Weibull)1170XFree86 config ftplugin file. (Nikolai Weibull)1171xinetd syntax, indent and ftplugin file. (Nikolai Weibull)1172xmodmap ftplugin file. (Nikolai Weibull)1173Xquery syntax file. (Jean-Marc Vanel)1174xsd (XML schema) indent file.1175YAML ftplugin file. (Nikolai Weibull)1176Zsh ftplugin file. (Nikolai Weibull)1177 1178 1179New Keymaps: ~1180 1181Sinhala (Sri Lanka) (Harshula Jayasuriya)1182Tamil in TSCII encoding (Yegappan Lakshmanan)1183Greek in cp737 (Panagiotis Louridas)1184Polish-slash (HS6_06)1185Ukrainian-jcuken (Anatoli Sakhnik)1186Kana (Edward L. Fox)1187 1188 1189New message translations: ~1190 1191The Ukrainian messages are now also available in cp1251.1192Vietnamese message translations and menu. (Phan Vinh Thinh)1193 1194 1195Others: ~1196 1197The |:read| command has the |++edit| argument. This means it will use the1198detected 'fileformat', 'fileencoding' and other options for the buffer. This1199also fixes the problem that editing a compressed file didn't set these1200options.