blob: 42f6628e508ef299194742d34b81c3a2675f3ddb [file] [log] [blame]
Bram Moolenaar15d0a8c2004-09-06 17:44:46 +00001*version7.txt* For Vim version 7.0aa. Last change: 2004 Sep 06
Bram Moolenaar071d4272004-06-13 20:20:40 +00002
3
4 VIM REFERENCE MANUAL by Bram Moolenaar
5
6
7Welcome to Vim 7! A large number of features has been added. This file
8mentions all the new items, changes to existing features and bug fixes
9compared to Vim 6.x.
10
11See |vi_diff.txt| for an overview of differences between Vi and Vim 7.0.
12See |version4.txt| for differences between Vim 3.x and Vim 4.x.
13See |version5.txt| for differences between Vim 4.x and Vim 5.x.
14See |version6.txt| for differences between Vim 5.x and Vim 6.x.
15
16INCOMPATIBLE CHANGES |incompatible-7|
17
18NEW FEATURES |new-7|
19
20New data types |new-data-types|
Bram Moolenaar325b7a22004-07-05 15:58:32 +000021KDE support |new-KDE|
Bram Moolenaar071d4272004-06-13 20:20:40 +000022Various new items |new-items-7|
23
24IMPROVEMENTS |improvements-7|
25
26COMPILE TIME CHANGES |compile-changes-7|
27
28BUG FIXES |bug-fixes-7|
29
30==============================================================================
31INCOMPATIBLE CHANGES *incompatible-7*
32
33These changes are incompatible with previous releases. Check this list if you
34run into a problem when upgrading from Vim 6.x to 7.0
35
Bram Moolenaarf4b8e572004-06-24 15:53:16 +000036":helpgrep" now uses a help window to display a match.
37
38
39Minor incompatibilities:
40
41For filetype detection: For many types, instead of ~/.dir/filename use
42*/.dir/filename, so that it also works for other user's files.
43
44":0verbose" now sets 'verbose' to zero instead of one.
45
46Removed the old and incomplete "VimBuddy" code.
47
48Buffers without a name report "No Name" instead of "No File". It was
49confusing for buffers with a name and 'buftype' set to "nofile".
Bram Moolenaar071d4272004-06-13 20:20:40 +000050
51==============================================================================
52NEW FEATURES *new-7*
53
54New data types *new-data-types*
55--------------
56
57In Vim scripts the following types have been added:
58
59 list ordered list of items
60 dictionary associative array of items
61 function reference to a function
62
63Many functions and commands have been added to support the new types.
64
Bram Moolenaar843ee412004-06-30 16:16:41 +000065NOT IMPLEMENTED YET!
66
67
Bram Moolenaar325b7a22004-07-05 15:58:32 +000068KDE support *new-KDE*
Bram Moolenaar843ee412004-06-30 16:16:41 +000069-----------
70
71Kvim is the KDE version of Vim. It uses the Qt toolkit. See |KVim|.
72(Thomas Capricelli, Philippe Fremy, Mickael Marchand, Mark Westcott, et al.)
73
Bram Moolenaar071d4272004-06-13 20:20:40 +000074
Bram Moolenaar325b7a22004-07-05 15:58:32 +000075MzScheme interface *new-MzScheme*
76------------------
77
78The MzScheme interpreter is supported. |MzScheme|
79The |:mzscheme| command can be used to execute MzScheme commands.
80The |:mzfile| command can be used to execute an MzScheme script file.
81
Bram Moolenaar8299df92004-07-10 09:47:34 +000082Printing multi-byte text *new-print-multi-byte*
83------------------
84
85The |:hardcopy| command now supports printing multi-byte characters.
86The 'printmbcharset' and 'printmbfont' options are used for this.
87Also see |postscript-cjk-printing|. (Mike Williams)
88
Bram Moolenaar325b7a22004-07-05 15:58:32 +000089
Bram Moolenaar071d4272004-06-13 20:20:40 +000090Various new items *new-items-7*
91-----------------
92
93Normal mode commands: ~
94
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +000095a", a' and a` New text objects to select quoted strings. |a'|
96i", i' and i' (Taro Muraoka)
Bram Moolenaar071d4272004-06-13 20:20:40 +000097
98Options: ~
99
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000100'completefunc' The name of a function used for user-specified Insert
101 mode completion. CTRL-X CTRL-U can be used in Insert
102 mode to do any kind of completion. (Taro Muraoka)
103'quoteescape' Characters used to escape quotes inside a string.
104 Used for the a", a' and a` text objects. |a'|
Bram Moolenaar592e0a22004-07-03 16:05:59 +0000105'numberwidth' Minimal width of the space used for the 'number'
106 option. (Emmanuel Renieris)
Bram Moolenaar325b7a22004-07-05 15:58:32 +0000107'mzquantum' Time in msec to schedule MzScheme threads.
Bram Moolenaar8299df92004-07-10 09:47:34 +0000108'printmbcharset' CJK character set to be used for :hardcopy
109'printmbfont' font names to be used for CJK output of :hardcopy
Bram Moolenaar325b7a22004-07-05 15:58:32 +0000110
Bram Moolenaar071d4272004-06-13 20:20:40 +0000111
112Ex commands: ~
113
Bram Moolenaar843ee412004-06-30 16:16:41 +0000114Win32: The ":winpos" command now also works in the console. (Vipin Aravind)
115
Bram Moolenaar8299df92004-07-10 09:47:34 +0000116|:startreplace| Start Replace mode. (Charles Campbell)
Bram Moolenaar325b7a22004-07-05 15:58:32 +0000117
Bram Moolenaar8299df92004-07-10 09:47:34 +0000118|:0file| Removes the name of the buffer. (Charles Campbell)
Bram Moolenaar325b7a22004-07-05 15:58:32 +0000119
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +0000120|:diffoff| Switch off diff mode in the current window or in all
121 windows.
122
Bram Moolenaard4755bb2004-09-02 19:12:26 +0000123|:keepalt| Do not change the alternate file.
124
Bram Moolenaar071d4272004-06-13 20:20:40 +0000125
126New functions: ~
127
Bram Moolenaar89cb5e02004-07-19 20:55:54 +0000128byteidx(expr, nr) |byteidx()| Index of a character. (Ilya Sher)
129finddir(name) |finddir()| Find a directory in 'path'.
130findfile(name) |findfile()| Find a file in 'path'. (Johannes
131 Zellner)
Bram Moolenaar5eb86f92004-07-26 12:53:41 +0000132getfperm(fname) |getfperm()| Get file permission string. (Nikolai
133 Weibull)
134getftype(fname) |getftype()| Get type of file. (Nikolai Weibull)
Bram Moolenaarab79bcb2004-07-18 21:34:53 +0000135repeat(expr, count) |repeat()| Repeat "expr" "count" times.
136 (Christophe Poucet)
137tr(expr, from, to) |tr()| Translate characters. (Ron Aaron)
Bram Moolenaar8299df92004-07-10 09:47:34 +0000138
Bram Moolenaar071d4272004-06-13 20:20:40 +0000139
140New autocommand events: ~
141
Bram Moolenaar8299df92004-07-10 09:47:34 +0000142|InsertEnter| starting Insert or Replace mode
143|InsertChange| going from Insert to Replace mode or back
144|InsertLeave| leaving Insert or Replace mode
Bram Moolenaar843ee412004-06-30 16:16:41 +0000145
Bram Moolenaar8299df92004-07-10 09:47:34 +0000146|ColorScheme| after loading a color scheme
Bram Moolenaar071d4272004-06-13 20:20:40 +0000147
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000148
149New Syntax/Indent/FTplugin files: ~
150
151MuPAD source syntax, indent and ftplugin. (Dave Silvia)
152
Bram Moolenaard4755bb2004-09-02 19:12:26 +0000153ABAB/4 syntax file. (Marius van Wyk)
154
155SQL-Informix syntax file. (Dean L Hill)
156
Bram Moolenaar15d0a8c2004-09-06 17:44:46 +0000157PHP compiler plugin. (Doug Kearns)
158
159
160New message translations: ~
161
162The Ukranian messages are now also available in cp1251.
163
Bram Moolenaar071d4272004-06-13 20:20:40 +0000164
Bram Moolenaarf4b8e572004-06-24 15:53:16 +0000165Others: ~
166
167Mac: Add the selection type to the clipboard, so that Block, line and
168character selections can be used between two Vims. (Eckehard Berns)
169Also fixes the problem that setting 'clipboard' to "unnamed" breaks using
170"yyp".
Bram Moolenaar071d4272004-06-13 20:20:40 +0000171
Bram Moolenaar592e0a22004-07-03 16:05:59 +0000172Mac: GUI font selector. (Peter "Rain Dog" Cucka)
173
Bram Moolenaar843ee412004-06-30 16:16:41 +0000174The netrw plugin now also supports viewing a directory, when "scp://" is used.
175Deleting and renaming files is possible. (Charles Campbell)
176
Bram Moolenaar071d4272004-06-13 20:20:40 +0000177==============================================================================
178IMPROVEMENTS *improvements-7*
179
Bram Moolenaarf4b8e572004-06-24 15:53:16 +0000180":helpgrep" accepts a language specifier after the pattern: "pat@it".
181
Bram Moolenaar8299df92004-07-10 09:47:34 +0000182Move the help for printing to a separate help file. It's quite a lot now.
183
Bram Moolenaarf4b8e572004-06-24 15:53:16 +0000184":breakadd here" and ":breakdel here" can be used to set or delete a
185breakpoint at the cursor.
186
Bram Moolenaar843ee412004-06-30 16:16:41 +0000187The tutor was updated to make it simpler to use and added text to explain a
188few more important commands. Used ideas from Gabriel Zachmann.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000189
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000190Unix: When libcall() fails obtain an error message with dlerror() and display
191it. (Johannes Zellner)
192
Bram Moolenaar592e0a22004-07-03 16:05:59 +0000193Added "nbsp" in 'listchars'. (David Blanchet)
194
Bram Moolenaar21cf8232004-07-16 20:18:37 +0000195Added the "acwrite" value for the 'buftype' option. This is for a buffer that
196doesn not have a name that refers to a file and is written with BufWriteCmd
197autocommands.
198
Bram Moolenaar325b7a22004-07-05 15:58:32 +0000199For lisp indenting and matching parenthesis: (Sergey Khorev)
200- square brackets are recognized properly
201- #\(, #\), #\[ and #\] are recognized as character literals
202- Lisp line comments (delimited by semicolon) are recognized
203
Bram Moolenaar89cb5e02004-07-19 20:55:54 +0000204Added the "count" argument to match(), matchend() and matchstr(). (Ilya Sher)
205
Bram Moolenaar5eb86f92004-07-26 12:53:41 +0000206winnr() takes an optional "$" and "#" arguments. (Nikolai Weibull, Yegappan
207Lakshmanan)
208
209Added 'n' flag to search(): don't move the cursor. (Nikolai Weibull)
210
Bram Moolenaard4755bb2004-09-02 19:12:26 +0000211When uncompressing fails in the gzip plugin, give an error message but don't
212delete the raw text. Helps if the file has a .gz extension but is not
213actually compressed. (Andrew Pimlott)
214
215When C, C++ or IDL syntax is used, may additionally load doxygen syntax.
216Also support setting the filetype to "cdoxygen" for C plus doxygen syntax.
217(Michael Geddes)
218
219The ":registers" command now displays multi-byte characters properly.
220
221VMS: In the usage message mention that a slash can be used to make a flag
222upper case. Add color support to the builtin vt320 terminal codes.
223(Zoltan Arpadffy)
224
Bram Moolenaar15d0a8c2004-09-06 17:44:46 +0000225For the '%' item in 'viminfo', allow a number to set a maximum for the number
226of buffers.
227
Bram Moolenaar071d4272004-06-13 20:20:40 +0000228==============================================================================
229COMPILE TIME CHANGES *compile-changes-7*
230
Bram Moolenaarab79bcb2004-07-18 21:34:53 +0000231Mac: "make" now creates the Vim.app directory and "make install" copies it to
232its final destination. (Raf)
233
234Mac: Made it possible to compile with Motif, Athena or GTK without tricks and
235still being able to use the MacRoman conversion. Added the os_mac_conv.c
236file.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000237
238==============================================================================
239BUG FIXES *bug-fixes-7*
240
Bram Moolenaarf4b8e572004-06-24 15:53:16 +0000241When using PostScript printing on MS-DOS the default 'printexpr' used "lpr"
242instead of "copy". When 'printdevice' was empty the copy command did not
243work. Use "LPT1" then.
244
245The GTK font dialog uses a font size zero when the font name doesn't include a
246size. Use a default size of 10.
247
248This example in the documentation didn't work:
249 :e `=foo . ".c" `
250Skip over the expression in `=expr` when looking for comments, |, % and #.
251
252When ":helpgrep" doesn't find anything there is no error message.
253
254"L" and "H" did not take closed folds into account.
255
256Win32: The "-P title" argument stopped at the first title that matched, even
257when it doesn't support MDI.
258
259Mac GUI: CTRL-^ and CTRL-@ did not work.
260
261"2daw" on "word." at the end of a line didn't include the preceding white
262space.
263
264Win32: Using FindExecutable() doesn't work to find a program. Use
265SearchPath() instead. For executable() use $PATHEXT when the program searched
266for doesn't have an extension.
267
268When 'virtualedit' is set, moving the cursor up after appending a character
269may move it to a different column. Was caused by auto-formatting moving the
270cursor and not putting it back where it was.
271
272When indent was added automatically and then moving the cursor, the indent was
273not deleted (like when pressing ESC). The "I" flag in 'cpoptions' can be used
274to make it work the old way.
275
Bram Moolenaarf4b8e572004-06-24 15:53:16 +0000276When opening a command-line window, 'textwidth' gets set to 78 by the Vim
277filetype plugin. Reset 'textwidth' to 0 to avoid lines are broken.
278
279After using cursor(line, col) moving up/down doesn't keep the same column.
280
281Win32: Borland C before 5.5 requires using ".u." for LowPart and HighPart
282fields. (Walter Briscoe)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000283
Bram Moolenaar843ee412004-06-30 16:16:41 +0000284On Sinix SYS_NMLN isn't always defined. Define it ourselves. (Cristiano De
285Michele)
286
Bram Moolenaar325b7a22004-07-05 15:58:32 +0000287Printing with PostScript may keep the printer waiting for more. Append a
288CTRL-D to the printer output. (Mike Williams)
289
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +0000290When converting a string with a hex or octal number the leading '-' was
291ignored. ":echo '-05' + 0" resulted in 5 instead of -5.
292
293Using "@:" to repeat a command line didn't work when it contains control
294characters.
295
Bram Moolenaar21cf8232004-07-16 20:18:37 +0000296When using file completion for a user command, it would not expand environment
297variables like for a regular command with a file argument.
298
299'cindent': When the argument of a #define looks like a C++ class the next line
300is indented too much.
301
302When 'comments' includes multi-byte characters inserting the middle part and
303alignment may go wrong. 'cindent' also suffers from this for right-aligned
304items.
305
Bram Moolenaarab79bcb2004-07-18 21:34:53 +0000306The default for 'helplang' was "zh" for both "zh_cn" and "zh_tw". Now use
307"cn" or "tw" as intended.
308
Bram Moolenaar5eb86f92004-07-26 12:53:41 +0000309When 'bin' is set and 'eol' is not set then line2byte() added the line break
310after the last line while it's not there.
311
312Using foldlevel() in a WinEnter autocommand may not work. Noticed when
313resizing the GUI shell upon startup.
314
315Python: Using buffer.append(f.readlines()) didn't work. Allow appending a
316string with a trailing newline. The newline is ignored.
317
Bram Moolenaar269ec652004-07-29 08:43:53 +0000318When using the ":saveas f2" command for buffer "f1", the Buffers menu would
319contain "f2" twice, one of them leading to "f1". Also trigger the BufFilePre
320and BufFilePost events for the alternate buffer that gets the old name.
321
Bram Moolenaard4755bb2004-09-02 19:12:26 +0000322strridx() did not work well when the needle is empty. (Ciaran McCreesh)
323
324GTK: Avoid a potential hang in gui_mch_wait_for_chars() when input arrives
325just before it is invoked
326
327VMS: Occasionally CR characters were inserted in the file. Expansion of
328environment variables was not correct. (Zoltan Arpadffy)
329
330UTF-8: When 'delcombine' is set "dw" only deleted the last combining character
331from the first character of the word.
332
333When using ":sball" in an autocommand only the filetype in one buffer was
334detected. Reset did_filetype in enter_buffer().
335
336When using ":argdo" and the window already was at the first argument index,
337but not actually editing it, the current buffer would be used instead.
338
Bram Moolenaar15d0a8c2004-09-06 17:44:46 +0000339When ":next dir/*" includes many matches, adding the names to the argument
340list may take an awful lot of time and can't be interrupted. Allow
341interrupting this.
342
343When editing a file that was already loaded in a buffer, modelines were not
344used. Now window-local options in the modeline are set. Buffer-local options
345and global options remain unmodified.
346
347Win32: When 'encoding' is set to "utf-8" in the vimrc file, files from the
348command line with non-ASCII characters are not used correctly. Recode the
349file names when 'encoding' is set, using the Unicode command line.
350
Bram Moolenaar071d4272004-06-13 20:20:40 +0000351 vim:tw=78:ts=8:ft=help:norl: