*version7.txt* For Vim version 7.4. Last change: 2013 Aug 10
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 multi-byte text |new-print-multi-byte|
Tab pages |new-tab-pages|
Undo branches |new-undo-branches|
Extended Unicode support |new-more-unicode|
More highlighting |new-more-highlighting|
Translated manual pages |new-manpage-trans|
Internal grep |new-vimgrep|
Scroll back in messages |new-scroll-back|
Cursor past end of the line |new-onemore|
POSIX compatibility |new-posix|
Debugger support |new-debug-support|
Remote file explorer |new-netrw-explore|
Define an operator |new-define-operator|
Mapping to an expression |new-map-expression|
Visual and Select mode mappings |new-map-select|
Location list |new-location-list|
Various new items |new-items-7|
IMPROVEMENTS |improvements-7|
COMPILE TIME CHANGES |compile-changes-7|
BUG FIXES |bug-fixes-7|
VERSION 7.1 |version-7.1|
Changed |changed-7.1|
Added |added-7.1|
Fixed |fixed-7.1|
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.