*version6.txt* For Vim version 7.4. Last change: 2014 Aug 29 VIM REFERENCE MANUAL by Bram Moolenaar Welcome to Vim Version 6.0! A large number of features has been added. This file mentions all the new items that have been added, changes to existing features and bug fixes compared to Vim 5.x. See |vi_diff.txt| for an overview of differences between Vi and Vim 6.0. See |version4.txt| for differences between Vim 3.0 and Vim 4.0. See |version5.txt| for differences between Vim 4.0 and Vim 5.0. INCOMPATIBLE CHANGES |incompatible-6| Cursor position in Visual mode |curpos-visual| substitute command Vi compatible |substitute-CR| global option values introduced |new-global-values| 'fileencoding' changed |fileencoding-changed| Digraphs changed |digraphs-changed| Filetype detection changed |filetypedetect-changed| Unlisted buffers introduced |new-unlisted-buffers| CTRL-U in Command-line mode changed |CTRL-U-changed| Ctags gone |ctags-gone| Documentation reorganized |documentation-6| Modeless selection and clipboard |modeless-and-clipboard| Small incompatibilities |incomp-small-6| NEW FEATURES |new-6| Folding |new-folding| Vertically split windows |new-vertsplit| Diff mode |new-diff-mode| Easy Vim: click-and-type |new-evim| User manual |new-user-manual| Flexible indenting |new-indent-flex| Extended search patterns |new-searchpat| UTF-8 support |new-utf-8| Multi-language support |new-multi-lang| Plugin support |new-plugins| Filetype plugins |new-filetype-plugins| File browser |new-file-browser| Editing files over a network |new-network-files| Window for command-line editing |new-cmdwin| Debugging mode |new-debug-mode| Cursor in virtual position |new-virtedit| Debugger interface |new-debug-itf| Communication between Vims |new-vim-server| Buffer type options |new-buftype| Printing |new-printing| Ports |ports-6| Quickfix extended |quickfix-6| Operator modifiers |new-operator-mod| Search Path |new-search-path| Writing files improved |new-file-writing| Argument list |new-argument-list| Restore a View |new-View| Color schemes |new-color-schemes| Various new items |new-items-6| IMPROVEMENTS |improvements-6| COMPILE TIME CHANGES |compile-changes-6| BUG FIXES |bug-fixes-6| VERSION 6.1 |version-6.1| Changed |changed-6.1| Added |added-6.1| Fixed |fixed-6.1| VERSION 6.2 |version-6.2| Changed |changed-6.2| Added |added-6.2| Fixed |fixed-6.2| VERSION 6.3 |version-6.3| Changed |changed-6.3| Added |added-6.3| Fixed |fixed-6.3| VERSION 6.4 |version-6.4| Changed |changed-6.4| Added |added-6.4| Fixed |fixed-6.4| ============================================================================== INCOMPATIBLE CHANGES *incompatible-6* These changes are incompatible with previous releases. Check this list if you run into a problem when upgrading from Vim 5.x to 6.0 Cursor position in Visual mode *curpos-visual* ------------------------------ When going from one window to another window on the same buffer while in Visual mode, the cursor position of the other window is adjusted to keep the same Visual area. This can be used to set the start of the Visual area in one window and the end in another. In vim 5.x the cursor position of the other window would be used, which could be anywhere and was not very useful. Substitute command Vi compatible *substitute-CR* -------------------------------- The substitute string (the "to" part of the substitute command) has been made Vi compatible. Previously a CTRL-V had a special meaning and could be used to prevent a to insert a line break. This made it impossible to insert a CTRL-V before a line break. Now a backslash is used to prevent a to cause a line break. Since the number of backslashes is halved, it is still possible to insert a line break at the end of the line. This now works just like Vi, but it's not compatible with Vim versions before 6.0. When a ":s" command doesn't make any substitutions, it no longer sets the '[ and '] marks. This is not related to Vi, since it doesn't have these marks. Global option values introduced *new-global-values* ------------------------------- There are now global values for options which are local to a buffer or window. Previously the local options were copied from one buffer to another. When editing another file this could cause option values from a modeline to be used for the wrong file. Now the global values are used when entering a buffer that has not been used before. Also, when editing another buffer in a window, the local window options are reset to their global values. The ":set" command sets both the local and global values, this is still compatible. But a modeline only sets the local value, this is not backwards compatible. ":let &opt = val" now sets the local and global values, like ":set". New commands have been added to set the global or local value: :let &opt = val like ":set" :let &g:opt = val like ":setglobal" :let &l:opt = val like ":setlocal" 'fileencoding' changed *fileencoding-changed* ---------------------- 'fileencoding' was used in Vim 5.x to set the encoding used inside all of Vim. This was a bit strange, because it was local to a buffer and worked for all buffers. It could never be different between buffers, because it changed the way text in all buffers was interpreted. It is now used for the encoding of the file related to the buffer. If you still set 'fileencoding' it is likely to be overwritten by the detected encoding from 'fileencodings', thus it is "mostly harmless". The old FileEncoding autocommand now does the same as the new EncodingChanged event. Digraphs changed *digraphs-changed* ---------------- The default digraphs now correspond to RFC1345. This is very different from what was used in Vim 5.x. |digraphs| Filetype detection changed *filetypedetect-changed* -------------------------- The filetype detection previously was using the "filetype" autocommand group. This caused confusion with the FileType event name (case is ignored). The group is now called "filetypedetect". It still works, but if the "filetype" group is used the autocommands will not be removed by ":filetype off". The support for 'runtimepath' has made the "myfiletypefile" and "mysyntaxfile" mechanism obsolete. They are still used for backwards compatibility. The connection between the FileType event and setting the 'syntax' option was previously in the "syntax" autocommand group. That caused confusion with the Syntax event name. The group is now called "syntaxset". The distributed syntax files no longer contain "syntax clear". That makes it possible to include one in the other without tricks. The syntax is now cleared when the 'syntax' option is set (by an autocommand added from synload.vim). This makes the syntax cleared when the value of 'syntax' does not correspond to a syntax file. Previously the existing highlighting was kept. Unlisted buffers introduced *new-unlisted-buffers* --------------------------- There is now a difference between buffers which don't appear in the buffer list and buffers which are really not in the buffer list. Commands like ":ls", ":bnext", ":blast" and the Buffers menu will skip buffers not in the buffer list. |unlisted-buffer| The 'buflisted' option can be used to make a buffer appear in the buffer list or not. Several commands that previously added a buffer to the buffer list now create an unlisted buffer. This means that a ":bnext" and ":ball" will not find these files until they have actually been edited. For example, buffers used for the alternative file by ":write file" and ":read file". Other commands previously completely deleted a buffer and now only remove the buffer from the buffer list. Commands relying on a buffer not to be present might fail. For example, a ":bdelete" command in an autocommand that relied on something following to fail (was used in the automatic tests). |:bwipeout| can be used for the old meaning of ":bdelete". The BufDelete autocommand event is now triggered when a buffer is removed from the buffer list. The BufCreate event is only triggered when a buffer is created that is added to the buffer list, or when an existing buffer is added to the buffer list. BufAdd is a new name for BufCreate. The new BufNew event is for creating any buffer and BufWipeout for really deleting a buffer. When doing Insert mode completion, only buffers in the buffer list are scanned. Added the 'U' flag to 'complete' to do completion from unlisted buffers. Unlisted buffers are not stored in a viminfo file. CTRL-U in Command-line mode changed *CTRL-U-changed* ----------------------------------- Using CTRL-U when editing the command line cleared the whole line. Most shells only delete the characters before the cursor. Made it work like that. (Steve Wall) You can get the old behavior with CTRL-E CTRL-U: > :cnoremap Ctags gone *ctags-gone* ---------- Ctags is no longer part of the Vim distribution. It's now a grown-up program by itself, it deserves to be distributed separately. Ctags can be found here: http://ctags.sf.net/. Documentation reorganized *documentation-6* ------------------------- The documentation has been reorganized, an item may not be where you found it in Vim 5.x. - The user manual was added, some items have been moved to it from the reference manual. - The quick reference is now in a separate file (so that it can be printed). The examples in the documentation were previously marked with a ">" in the first column. This made it difficult to copy/paste them. There is now a single ">" before the example and it ends at a "<" or a non-blank in the first column. This also looks better without highlighting. 'helpfile' is no longer used to find the help tags file. This allows a user to add its own help files (e.g., for plugins). Modeless selection and clipboard *modeless-and-clipboard* -------------------------------- The modeless selection is used to select text when Visual mode can't be used, for example when editing the command line or at the more prompt. In Vim 5.x the modeless selection was always used. On MS-Windows this caused the clipboard to be overwritten, with no way to avoid that. The modeless selection now obeys the 'a' and 'A' flags in 'guioptions' and "autoselect" and "autoselectml" in 'clipboard'. By default there is no automatic copy on MS-Windows. Use the |c_CTRL-Y| command to manually copy the selection. To get the old behavior back, do this: > :set clipboard^=autoselectml guioptions+=A Small incompatibilities *incomp-small-6* ----------------------- 'backupdir', 'cdpath', 'directory', 'equalprg', 'errorfile', 'formatprg', 'grepprg', 'helpfile', 'makeef', 'makeprg', 'keywordprg', 'cscopeprg', 'viminfo' and 'runtimepath' can no longer be set from a modeline, for better security. Removed '_' from the 'breakat' default: It's commonly used in keywords. The default for 'mousehide' is on, because this works well for most people. The Amiga binary is now always compiled with "big" features. The "big" binary archive no longer exists. The items "[RO]", "[+]", "[help]", "[Preview]" and "[filetype]" in 'statusline' no longer have a leading space. Non-Unix systems: When expanding wildcards for the Vim arguments, don't use 'suffixes'. It now works as if the shell had expanded the arguments. The 'lisp', 'smartindent' and 'cindent' options are not switched off when 'paste' is set. The auto-indenting is disabled when 'paste' is set, but manual indenting with "=" still works. When formatting with "=" uses 'cindent' or 'indentexpr' indenting, and there is no change in indent, this is not counted as a change ('modified' isn't set and there is nothing to undo). Report 'modified' as changed when 'fileencoding' or 'fileformat' was set. Thus it reflects the possibility to abandon the buffer without losing changes. The "Save As" menu entry now edits the saved file. Most people expect it to work like this. A buffer for a directory is no longer added to the Buffers menu. Renamed to , since that's what it's called on most keyboards. Thus it's now the hit-enter prompt instead of the hit-return prompt. Can map just like or . The default for the 'viminfo' option is now '20,"50,h when 'compatible' isn't set. Most people will want to use it, including beginners, but it required setting the option, which isn't that easy. After using ":colder" the newer error lists are overwritten. This makes it possible to use ":grep" to browse in a tree-like way. Must use ":cnewer 99" to get the old behavior. The patterns in 'errorformat' would sometimes ignore case (MS-Windows) and sometimes not (Unix). Now case is always ignored. Add "\C" to the pattern to match case. The 16 bit MS-DOS version is now compiled without the +listcmds feature (buffer list manipulation commands). They are not often needed and this executable needs to be smaller. 'sessionoptions' now includes "curdir" by default. This means that restoring a session will result in the current directory being restored, instead of going to the directory where the session file is located. A session deleted all buffers, deleting all marks. Now keep the buffer list, it shouldn't hurt for some existing buffers to remain present. When the argument list is empty ":argdel *" caused an error message. No longer put the search pattern from a tag jump in the history. Use "SpecialKey" highlighting for unprintable characters instead of "NonText". The idea is that unprintable text or any text that's displayed differently from the characters in the file is using "SpecialKey", and "NonText" is used for text that doesn't really exist in the file. Motif now uses the system default colors for the menu and scrollbar. Used to be grey. It's still possible to set the colors with ":highlight" commands and resources. Formatting text with "gq" breaks a paragraph at a non-empty blank line. Previously the line would be removed, which wasn't very useful. ":normal" does no longer hang when the argument ends in half a command. Previously Vim would wait for more characters to be typed, without updating the screen. Now it pretends an was typed. Bitmaps for the toolbar are no longer searched for in "$VIM/bitmaps" but in the "bitmaps" directories in 'runtimepath'. Now use the Cmdline-mode menus for the hit-enter prompt instead of the Normal mode menus. This generally works better and allows using the "Copy" menu to produce CTRL-Y to copy the modeless selection. Moved the font selection from the Window to the Edit menu, together with the other settings. The default values for 'isfname' include more characters to make "gf" work better. Changed the license for the documentation to the Open Publication License. This seemed fair, considering the inclusion of parts of the Vim book, which is also published under the OPL. The downside is that we can't force someone who would sell copies of the manual to contribute to Uganda. After "ayy don't let ""yy or :let @" = val overwrite the "a register. Use the unnamed register instead. MSDOS: A pattern "*.*" previously also matched a file name without a dot. This was inconsistent with other versions. In Insert mode, CTRL-O CTRL-\ CTRL-N {cmd} remains in Normal mode. Previously it would go back to Insert mode, thus confusing the meaning of CTRL-\ CTRL-N, which is supposed to take us to Normal mode (especially in ":amenu"). Allow using ":" commands after an operator. Could be used to implement a new movement command. Thus it no longer aborts a pending operator. For the Amiga the "-d {device}" argument was possible. When compiled with the diff feature, this no longer works. Use "-dev {device}" instead. |-dev| Made the default mappings for in Insert mode insert the text literally, avoids that special characters like BS cause side effects. Using ":confirm" applied to the rest of the line. Now it applies only to the command right after it. Thus ":confirm if x | edit | endif" no longer works, use ":if x | confirm edit | endif". This was the original intention, that it worked differently was a bug. ============================================================================== NEW FEATURES *new-6* Folding *new-folding* ------- Vim can now display a buffer with text folded. This allows overviewing the structure of a file quickly. It is also possible to yank, delete and put folded text, for example to move a function to another position. There is a whole bunch of new commands and options related to folding. See |folding|. Vertically split windows *new-vertsplit* ------------------------ Windows can also be split vertically. This makes it possible to have windows side by side. One nice use for this is to compare two similar files (see |new-diff-mode|). The 'scrollbind' option can be used to synchronize scrolling. A vertical split can be created with the commands: :vsplit or CTRL-W v or CTRL-W CTRL-V |:vsplit| :vnew |:vnew| :vertical {cmd} |:vertical| The last one is a modifier, which has a meaning for any command that splits a window. For example: > :vertical stag main Will vertically split the window and jump to the tag "main" in the new window. Moving from window to window horizontally can be done with the |CTRL-W_h| and |CTRL-W_l| commands. The |CTRL-W_k| and |CTRL-W_j| commands have been changed to jump to the window above or below the cursor position. The vertical and horizontal splits can be mixed as you like. Resizing windows is easy when using the mouse, just position the pointer on a status line or vertical separator and drag it. In the GUI a special mouse pointer shape indicates where you can drag a status or separator line. To resize vertically split windows use the |CTRL-W_<| and |CTRL-W_>| commands. To make a window the maximum width use the CTRL-W | command |CTRL-W_bar|. To force a new window to use the full width or height of the Vim window, these two modifiers are available: :topleft {cmd} New window appears at the top with full width or at the left with full height. :botright {cmd} New window appears at the bottom with full width or at the right with full height. This can be combined with ":vertical" to force a vertical split: > :vert bot dsplit DEBUG This will open a window at the far right, occupying the full height of the Vim window, with the cursor on the first definition of "DEBUG". The help window is opened at the top, like ":topleft" was used, if the current window is fewer than 80 characters wide. A few options can be used to set the preferences for vertically split windows. They work similar to their existing horizontal equivalents: horizontal vertical ~ 'splitbelow' 'splitright' 'winheight' 'winwidth' 'winminheight' 'winminwidth' It's possible to set 'winminwidth' to zero, so that temporarily unused windows hardly take up space without closing them. The new 'eadirection' option tells where 'equalalways' applies: :set eadirection=both both directions :set eadirection=ver equalize window heights :set eadirection=hor equalize windows widths This can be used to avoid changing window sizes when you want to keep them. Since windows can become quite narrow with vertical splits, text lines will often not fit. The 'sidescrolloff' has been added to keep some context left and right of the cursor. The 'listchars' option has been extended with the "precedes" item, to show a "<" for example, when there is text left off the screen. (Utz-Uwe Haus) "-O" command line argument: Like "-o" but split windows vertically. (Scott Urban) Added commands to move the current window to the very top (CTRL-W K), bottom (CTRL-W J), left (CTRL-W H) and right (CTRL-W L). In the new position the window uses the full width/height of the screen. When there is not enough room in the status line for both the file name and the ruler, use up to half the width for the ruler. Useful for narrow windows. Diff mode *new-diff-mode* --------- In diff mode Vim shows the differences between two, three or four files. Folding is used to hide the parts of the file that are equal. Highlighting is used to show deleted and changed lines. See |diff-mode|. An easy way to start in diff mode is to start Vim as "vimdiff file1 file2". Added the vimdiff manpage. In a running Vim the |:diffsplit| command starts diff mode for the current file and another file. The |:diffpatch| command starts diff mode using the current file and a patch file. The |:diffthis| command starts diff mode for the current window. Differences can be removed with the |:diffget| and |:diffput| commands. - The 'diff' option switches diff mode on in a window. - The |:diffupdate| command refreshes the diffs. - The 'diffopt' option changes how diffs are displayed. - The 'diffexpr' option can be set how a diff is to be created. - The 'patchexpr' option can be set how patch is applied to a file. - Added the "diff" folding method. When opening a window for diff-mode, set 'foldlevel' to zero and 'foldenable' on, to close the folds. - Added the DiffAdd, DiffChange, DiffDelete and DiffText highlight groups to specify the highlighting for differences. The defaults are ugly... - Unix: make a vimdiff symbolic link for "make install". - Removed the now obsolete "vimdiff.vim" script from the distribution. - Added the "[c" and "]c" commands to move to the next/previous change in diff mode. Easy Vim: click-and-type *new-evim* ------------------------ eVim stands for "Easy Vim". This is a separate program, but can also be started as "vim -y". This starts Vim with 'insertmode' set to allow click-and-type editing. The $VIMRUNTIME/evim.vim script is used to add mappings and set options to be able to do most things like Notepad. This is only for people who can't stand two modes. eView does the same but in readonly mode. In the GUI a CTRL-C now only interrupts when busy with something, not when waiting for a character. Allows using CTRL-C to copy text to the clipboard. User manual *new-user-manual* ----------- The user manual has been added. It is organised around editing tasks. It reads like a book, from start to end. It should allow beginners to start learning Vim. It helps everybody to learn using the most useful Vim features. It is much easier to read than the reference manual, but omits details. See |user-manual|. The user manual includes parts of the Vim book by Steve Oualline |frombook|. It is published under the OPL |manual-copyright|. When syntax highlighting is not enabled, the characters in the help file which mark examples ('>' and '<') and header lines ('~') are replaced with a space. When closing the help window, the window layout is restored from before opening it, if the window layout didn't change since then. When opening the help window, put it at the top of the Vim window if the current window is fewer than 80 characters and not full width. Flexible indenting *new-indent-flex* ------------------ Automatic indenting is now possible for any language. It works with a Vim script, which makes it very flexible to compute the indent. The ":filetype indent on" command enables using the provided indent scripts. This is explained in the user manual: |30.3|. The 'indentexpr' option is evaluated to get the indent for a line. The 'indentkeys' option tells when to trigger re-indenting. Normally these options are set from an indent script. Like Syntax files, indent scripts will be created and maintained by many people. Extended search patterns *new-searchpat* ------------------------ Added the possibility to match more than one line with a pattern. (partly by Loic Grenie) New items in a search pattern for multi-line matches: \n match end-of-line, also in [] \_[] match characters in range and end-of-line \_x match character class and end-of-line \_. match any character or end-of-line \_^ match start-of-line, can be used anywhere in the regexp \_$ match end-of-line, can be used anywhere in the regexp Various other new items in search patterns: \c ignore case for the whole pattern \C match case for the whole pattern \m magic on for the following \M magic off for the following \v make following characters "very magic" \V make following characters "very nomagic" \@! don't match atom before this. Example: "foo\(bar\)\@!" matches "foo " but not "foobar". \@= match atom, resulting in zero-width match Example: "foo\(bar\)\@=" matches "foo" in "foobar". \@ match preceding atom as a subexpression \& match only when branch before and after it match \%[] optionally match a list of atoms; "end\%[if]" matches "end", "endi" and "endif" \%(\) like \(\), but without creating a back-reference; there can be any number of these, overcomes the limit of nine \( \) pairs \%^ match start-of-file (Chase Tingley) \%$ match end-of-file (Chase Tingley) \%# Match with the cursor position. (Chase Tingley) \? Just like "\=" but can't be used in a "?" command. \%23l match in line 23 \%<23l match before line 23 \%>23l match after line 23 \%23c, \%<23c, \%>23c match in/before/after column 23 \%23v, \%<23v, \%>23v match in/before/after virtual column 23 For syntax items: \z(...\) external reference match set (in region start pattern) \z1 - \z9 external reference match use (in region skip or end pattern) (Scott Bigham) \zs use position as start of match \ze use position as end of match Removed limit of matching only up to 32767 times with *, \+, etc. Added support to match multi-byte characters. (partly by Muraoka Taro) Made "\<" and "\>" work for UTF-8. (Muraoka Taro) UTF-8 support *new-utf-8* ------------- Vim can now edit files in UTF-8 encoding. Up to 31 bit characters can be used, but only 16 bit characters are displayed. Up to two combining characters are supported, they overprint the preceding character. Double-wide characters are also supported. See |UTF-8|. UCS-2, UCS-4 and UTF-16 encodings are supported too, they are converted to UTF-8 internally. There is also support for editing Unicode files in a Latin1 environment. Other encodings are converted with iconv() or an external converter specified with 'charconvert'. Many new items for Multi-byte support: - Added 'encoding' option: specifies character encoding used inside Vim. It can be any 8-bit encoding, some double-byte encodings or Unicode. It is initialized from the environment when a supported value is found. - Added 'fileencoding' and 'fileencodings': specify character coding in a file, similar to 'fileformat' and 'fileformats'. When 'encoding' is "utf-8" and 'fileencodings' is "utf-8,latin1" this will automatically switch to latin1 if a file does not contain valid UTF-8. - Added 'bomb' option and detection of a BOM at the start of a file. Can be used with "ucs-bom" in 'fileencodings' to automatically detect a Unicode file if it starts with a BOM. Especially useful on MS-Windows (NT and 2000), which uses ucs-2le files with a BOM (e.g., when exporting the registry). - Added the 'termencoding' option: Specifies the encoding used for the terminal. Useful to put Vim in utf-8 mode while in a non-Unicode locale: > :let &termencoding = &encoding :set encoding=utf-8 - When 'viminfo' contains the 'c' flag, the viminfo file is converted from the 'encoding' it was written with to the current 'encoding'. - Added ":scriptencoding" command: convert lines in a sourced script to 'encoding'. Useful for menu files. - Added 'guifontwide' to specify a font for double-wide characters. - Added Korean support for character class detection. Also fix cls() in search.c. (Chong-Dae Park) - Win32: Typing multi-byte characters without IME. (Alexander Smishlajev) - Win32 with Mingw: compile with iconv library. (Ron Aaron) - Win32 with MSVC: dynamically load iconv.dll library. (Muraoka Taro) - Make it possible to build a version with multi-byte and iconv support with Borland 5.5. (Yasuhiro Matsumoto) - Added 'delcombine' option: Delete combining character separately. (Ron Aaron) - The "xfontset" feature isn't required for "xim". These are now two independent features. - XIM: enable XIM when typing a language character (Insert mode, Search pattern, "f" or "r" command). Disable XIM when typing a Normal mode command. - When the XIM is active, show "XIM" in the 'showmode' message. (Nam SungHyun) - Support "CursorIM" for XIM. (Nam SungHyun) - Added 'm' flag to 'formatoptions': When wrapping words, allow splitting at each multibyte character, not only at a space. - Made ":syntax keyword" work with multi-byte characters. - Added support for Unicode upper/lowercase flipping and comparing. (based on patch by Raphael Finkel) Let "~" on multi-byte characters that have a third case ("title case") switch between the three cases. (Raphael Finkel) Allow defining digraphs for multi-byte characters. Added RFC1345 digraphs for Unicode. Most Normal mode commands that accept a character argument, like "r", "t" and "f" now accept a digraph. The 'D' flag in 'cpoptions' disables this to remain Vi compatible. Added Language mapping and 'keymap' to be able to type multi-byte characters: - Added the ":lmap" command and friends: Define mappings that are used when typing characters in the language of the text. Also for "r", "t", etc. In Insert and Command-line mode CTRL-^ switches the use of the mappings on/off. CTRL-^ also toggles the use of an input method when no language mappings are present. Allows switching the IM back on halfway typing. - "" argument to ":map", allows to specify the decimal, octal or hexadecimal value of a character. - Implemented the 'keymap' option: Load a keymap file. Uses ":lnoremap" to define mappings for the keymap. The new ":loadkeymap" command is used in the keymap file. - Added 'k' flag in 'statusline': Value of "b:keymap_name" or 'keymap' when it's being used. Uses "" when no keymap is loaded and ":lmap"s are active. Show this text in the default statusline too. - Added the 'iminsert' and 'imsearch' options: Specify use of langmap mappings and Input Method with an option. (Muraoka Taro) Added 'imcmdline' option: When set the input method is always enabled when starting to edit a command line. Useful for a XIM that uses dead keys to type accented characters. Added 'imactivatekey' option to better control XIM. (Muraoka Taro) - When typing a mapping that's not finished yet, display the last character under the cursor in Insert mode and Command-line mode. Looks good for dead characters. - Made the 'langmap' option recognize multi-byte characters. But mapping only works for 8-bit characters. Helps when using UTF-8. - Use a different cursor for when ":lmap" mappings are active. Can specify two highlight groups for an item in 'guicursor'. By default "lCursor" and "Cursor" are equal, the user must set a color he likes. Use the cursor color for hangul input as well. (Sung-Hyun Nam) - Show "(lang)" for 'showmode' when language mapping is enabled. - UTF-8: Made "r" work with a ":lmap" that includes a composing character. Also works for "f", which now works to find a character that includes a composing character. Other multi-byte character additions: - Support double-byte single-width characters for euc-jp: Characters starting with 0x8E. Added ScreenLines2[] to store the second byte. Multi-language support *new-multi-lang* ---------------------- The messages used in Vim can be translated. Several translations are available. This uses the gettext mechanism. It allows adding a translation without recompiling Vim. |multi-lang| (partly by Marcin Dalecki) The translation files are in the src/po directory. The src/po/README.txt file explains a few things about doing a translation. Menu translations are available as well. This uses the new |:menutranslate| command. The translations are found in the runtime directory "lang". This allows a user to add a translation. Added |:language| command to set the language (locale) for messages, time and character type. This allows switching languages in Vim without changing the locale outside of Vim. Made it possible to have vimtutor use different languages. (Eduardo Fernandez) Spanish (Eduardo Fernandez), Italian (Antonio Colombo), Japanese (Yasuhiro Matsumoto) and French (Adrien Beau) translations are included. Added "vimtutor.bat": script to start Vim on a copy of the tutor file for MS-Windows. (Dan Sharp) - Added v:lang variable to be able to get current language setting. (Marcin Dalecki) Also v:lc_time and v:ctype. - Make it possible to translate the dialogs used by the menus. Uses global "menutrans_" variables. ":menutrans clear" deletes them. - removed "broken locale" (Marcin Dalecki). - Don't use color names in icons, use RGB values. The names could be translated. - Win32: Added global IME support (Muraoka) - Win32: Added dynamic loading of IME support. - ":messages" prints a message about who maintains the messages or the translations. Useful to find out where to make a remark about a wrong translation. - --disable-nls argument for configure: Disable use of gettext(). (Sung-Hyun Nam) - Added NLS support for Win32 with the MingW compiler. (Eduardo Fernandez) - When available, call bind_textdomain_codeset() to have gettext() translate messages to 'encoding'. This requires GNU gettext 0.10.36 or later. - Added gettext support for Win32. This means messages will be translated when the locale is set and libintl.dll can be found. (Muraoka Taro) Also made it work with MingW compiler. (Eduardo Fernandez) Detect the language and set $LANG to get the appropriate translated messages (if supported). Also use $LANG to select a language, v:lang is a very different kind of name. - Made gvimext.dll use translated messages, if possible. (Yasuhiro Matsumoto) Plugin support *new-plugins* -------------- To make it really easy to load a Vim script when starting Vim, the "plugin" runtime directory can be used. All "*.vim" files in it will be automatically loaded. For Unix, the directory "~/.vim/plugin" is used by default. The 'runtimepath' option can be set to look in other directories for plugins. |load-plugins| |add-plugin| The |:runtime| command has been added to load one or more files in 'runtimepath'. Standard plugins: netrw.vim - Edit files over a network |new-network-files| gzip.vim - Edit compressed files explorer.vim - Browse directories |new-file-browser| Added support for local help files. |add-local-help|. When searching for help tags, all "doc/tags" files in 'runtimepath' are used. Added the ":helptags" command: Generate a tags file for a help directory. The first line of each help file is automagically added to the "LOCAL ADDITIONS" section in doc/help.txt. Added the argument to ":map": only add a mapping when it wasn't defined before. When displaying an option value with 'verbose' set will give a message about where the option was last set. Very useful to find out which script did set the value. The new |:scriptnames| command displays a list of all scripts that have been sourced. GUI: For Athena, Motif and GTK look for a toolbar bitmap in the "bitmaps" directories in 'runtimepath'. Allows adding your own bitmaps. Filetype plugins *new-filetype-plugins* ----------------- A new group of files has been added to do settings for specific file types. These can be options and mappings which are specifically used for one value of 'filetype'. The files are located in "$VIMRUNTIME/ftplugin". The 'runtimepath' option makes it possible to use several sets of plugins: Your own, system-wide, included in the Vim distribution, etc. To be able to make this work, several features were added: - Added the "s:" variables, local to a script. Avoids name conflicts with global variables. They can be used in the script and in functions, autocommands and user commands defined in the script. They are kept between invocations of the same script. |s:var| - Added the global value for local options. This value is used when opening a new buffer or editing another file. The option value specified in a modeline or filetype setting is not carried over to another buffer. ":set" sets both the local and the global value. ":setlocal" sets the local option value only. ":setglobal" sets or displays the global value for a local option. ":setlocal name<" sets a local option to its global value. - Added the buffer-local value for some global options: 'equalprg', 'makeprg', 'errorformat', 'grepprg', 'path', 'dictionary', 'thesaurus', 'tags', 'include' and 'define'. This allows setting a local value for these global options, without making it incompatible. - Added mappings and abbreviations local to a buffer: ":map ". - In a mapping "" can be used to get the value of the "mapleader" variable. This simplifies mappings that use "mapleader". "" defaults to "\". "" does the same with "maplocalleader". This is to be used for mappings local to a buffer. - Added Script ID to define functions and mappings local to a script. - Added