blob: 49fae2473beda1ddaf97fff74c729db3d9a085d2 [file] [log] [blame]
Bram Moolenaarbee0c5b2005-02-07 22:03:36 +00001*version7.txt* For Vim version 7.0aa. Last change: 2005 Feb 07
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
Bram Moolenaarb2956cd2005-01-27 14:42:53 +00009compared to Vim 6.x. Use this command to see the version you are using: >
10 :version
Bram Moolenaar071d4272004-06-13 20:20:40 +000011
12See |vi_diff.txt| for an overview of differences between Vi and Vim 7.0.
13See |version4.txt| for differences between Vim 3.x and Vim 4.x.
14See |version5.txt| for differences between Vim 4.x and Vim 5.x.
15See |version6.txt| for differences between Vim 5.x and Vim 6.x.
16
17INCOMPATIBLE CHANGES |incompatible-7|
18
19NEW FEATURES |new-7|
20
Bram Moolenaarbac234e2005-01-17 22:21:07 +000021Vim script enhancements |new-vim-script|
Bram Moolenaar325b7a22004-07-05 15:58:32 +000022KDE support |new-KDE|
Bram Moolenaar293ee4d2004-12-09 21:34:53 +000023Translated manual pages |new-manpage-trans|
Bram Moolenaar8fc061c2004-12-29 21:03:02 +000024Internal grep |new-vimgrep|
Bram Moolenaar071d4272004-06-13 20:20:40 +000025Various new items |new-items-7|
26
27IMPROVEMENTS |improvements-7|
28
29COMPILE TIME CHANGES |compile-changes-7|
30
31BUG FIXES |bug-fixes-7|
32
33==============================================================================
34INCOMPATIBLE CHANGES *incompatible-7*
35
36These changes are incompatible with previous releases. Check this list if you
Bram Moolenaarb2956cd2005-01-27 14:42:53 +000037run into a problem when upgrading from Vim 6.x to 7.0.
38
39A ":write file" command no longer resets the 'modified' flag of the buffer,
40unless the '+' flag is in 'cpoptions' |cpo-+|. This was illogical, since the
41buffer is still modified compared to the original file. And when undoing
42all changes the file would actually be marked modified. It does mean that
43":quit" fails now.
Bram Moolenaar071d4272004-06-13 20:20:40 +000044
Bram Moolenaarf4b8e572004-06-24 15:53:16 +000045":helpgrep" now uses a help window to display a match.
46
Bram Moolenaar1cd871b2004-12-19 22:46:22 +000047In an argument list double quotes could be used to include spaces in a file
48name. This caused a difference between ":edit" and ":next" for escaping
49double quotes and it is incompatible with some versions of Vi.
50 Command Vim 6.x file name Vim 7.x file name ~
51 :edit foo\"888 'foo"888' 'foo"888'
52 :next foo\"888 'foo888' 'foo"888'
53 :next a\"b c\"d 'ab cd' 'a"b' and 'c"d'
54
Bram Moolenaar8c711452005-01-14 21:53:12 +000055In a |literal-string| a single quote can be doubled to get one.
56":echo 'a''b'" would result in "a b", but now that two quotes stand for one it
57results in "a'b".
58
Bram Moolenaarf4b8e572004-06-24 15:53:16 +000059
60Minor incompatibilities:
61
62For filetype detection: For many types, instead of ~/.dir/filename use
63*/.dir/filename, so that it also works for other user's files.
64
65":0verbose" now sets 'verbose' to zero instead of one.
66
67Removed the old and incomplete "VimBuddy" code.
68
69Buffers without a name report "No Name" instead of "No File". It was
70confusing for buffers with a name and 'buftype' set to "nofile".
Bram Moolenaar071d4272004-06-13 20:20:40 +000071
Bram Moolenaar7b0294c2004-10-11 10:16:09 +000072When ":file xxx" is used in a buffer without a name, the alternate file name
73isn't set. This avoids creating buffers without a name that are not useful.
74
75The "2html.vim" script now converts closed folds to HTML. This means the HTML
76looks like its displayed, with the same folds open and closed. Use "zR" if no
77folds should appear in the HTML. (partly by Carl Osterwisch)
Bram Moolenaar47136d72004-10-12 20:02:24 +000078Diff mode now is also converted as it is displayed.
Bram Moolenaar7b0294c2004-10-11 10:16:09 +000079
Bram Moolenaar293ee4d2004-12-09 21:34:53 +000080Win32: The effect of the <F10> key depended on 'winaltkeys'. Now it depends
81on whether <F10> has been mapped or not. This allows mapping <F10> without
82changing 'winaltkeys'.
83
Bram Moolenaar8c711452005-01-14 21:53:12 +000084When 'octal' is in 'nrformats' and using CTRL-A on "08" it became "018", which
85is illogical. Now it becomes "9". The leading zero(s) is(are) removed to
86avoid the number becoming octal after incrementing "009" to "010".
Bram Moolenaar1cd871b2004-12-19 22:46:22 +000087
88When 'encoding' is set to a Unicode encoding, the value for 'fileencodings'
89now includes "default" before "latin1". This means that for files with 8-bit
90encodings the default is to use the encoding specified by the environment, if
91possible. Previously latin1 would always be used, which is wrong in a
92non-latin1 environment, such as Russian.
93
Bram Moolenaard438e912005-01-31 19:21:46 +000094Previously Vim would exit when there are two windows, both of them displaying
95a help file, and using ":quit". Now only the window is closed.
96
Bram Moolenaar071d4272004-06-13 20:20:40 +000097==============================================================================
98NEW FEATURES *new-7*
99
Bram Moolenaarbac234e2005-01-17 22:21:07 +0000100Vim script enhancements *new-vim-script*
101-----------------------
Bram Moolenaar071d4272004-06-13 20:20:40 +0000102
103In Vim scripts the following types have been added:
104
Bram Moolenaar31c67ef2005-01-11 21:34:41 +0000105 List ordered list of items |List|
106 Dictionary associative array of items |Dictionary|
107 Funcref reference to a function |Funcref|
Bram Moolenaar071d4272004-06-13 20:20:40 +0000108
109Many functions and commands have been added to support the new types.
110
Bram Moolenaar31c67ef2005-01-11 21:34:41 +0000111The |string()| function can be used to get a string representation of a
112variable. Works for Numbers, Strings and composites of them. Then |eval()|
113can be used to turn the string back into the variable value.
114
Bram Moolenaarbac234e2005-01-17 22:21:07 +0000115The |:let| command can now use ":let var += expr" like using ":let var = var +
116expr". "-=" and ".=" works in a similar way.
117
Bram Moolenaar843ee412004-06-30 16:16:41 +0000118
Bram Moolenaar325b7a22004-07-05 15:58:32 +0000119KDE support *new-KDE*
Bram Moolenaar843ee412004-06-30 16:16:41 +0000120-----------
121
122Kvim is the KDE version of Vim. It uses the Qt toolkit. See |KVim|.
123(Thomas Capricelli, Philippe Fremy, Mickael Marchand, Mark Westcott, et al.)
124
Bram Moolenaar071d4272004-06-13 20:20:40 +0000125
Bram Moolenaar325b7a22004-07-05 15:58:32 +0000126MzScheme interface *new-MzScheme*
127------------------
128
129The MzScheme interpreter is supported. |MzScheme|
130The |:mzscheme| command can be used to execute MzScheme commands.
131The |:mzfile| command can be used to execute an MzScheme script file.
132
Bram Moolenaar31c67ef2005-01-11 21:34:41 +0000133
Bram Moolenaar8299df92004-07-10 09:47:34 +0000134Printing multi-byte text *new-print-multi-byte*
135------------------
136
137The |:hardcopy| command now supports printing multi-byte characters.
138The 'printmbcharset' and 'printmbfont' options are used for this.
139Also see |postscript-cjk-printing|. (Mike Williams)
140
Bram Moolenaar325b7a22004-07-05 15:58:32 +0000141
Bram Moolenaar293ee4d2004-12-09 21:34:53 +0000142Translated manual pages *new-manpage-trans*
143-----------------------
144
145The manual page of Vim and associated programs is now also available in
146Italian (translated by Antonio Colombo). More languages will follow.
147
Bram Moolenaarb5bf5b82004-12-24 14:35:23 +0000148The Unix Makefile installs the Italian manual pages in .../man/it/man1/.
149
Bram Moolenaar293ee4d2004-12-09 21:34:53 +0000150
Bram Moolenaar8fc061c2004-12-29 21:03:02 +0000151Internal grep *new-vimgrep*
152-------------
153
154The ":vimgrep" command can be used to search for a pattern in a list of files.
155This is like the ":grep" command, but no external program is used. Besides
156better portability, handling of different file encodings and using multi-line
157patterns, this also allows grepping in compressed and remote files.
158|:vimgrep|.
159
160
Bram Moolenaar071d4272004-06-13 20:20:40 +0000161Various new items *new-items-7*
162-----------------
163
164Normal mode commands: ~
165
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000166a", a' and a` New text objects to select quoted strings. |a'|
167i", i' and i' (Taro Muraoka)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000168
169Options: ~
170
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000171'completefunc' The name of a function used for user-specified Insert
172 mode completion. CTRL-X CTRL-U can be used in Insert
173 mode to do any kind of completion. (Taro Muraoka)
174'quoteescape' Characters used to escape quotes inside a string.
175 Used for the a", a' and a` text objects. |a'|
Bram Moolenaar592e0a22004-07-03 16:05:59 +0000176'numberwidth' Minimal width of the space used for the 'number'
177 option. (Emmanuel Renieris)
Bram Moolenaar325b7a22004-07-05 15:58:32 +0000178'mzquantum' Time in msec to schedule MzScheme threads.
Bram Moolenaar8299df92004-07-10 09:47:34 +0000179'printmbcharset' CJK character set to be used for :hardcopy
180'printmbfont' font names to be used for CJK output of :hardcopy
Bram Moolenaar293ee4d2004-12-09 21:34:53 +0000181'fsync' Whether fsync() is called after writing a file.
182 (Ciaran McCreesh)
Bram Moolenaarb5bf5b82004-12-24 14:35:23 +0000183'wildoptions' "tagfile" value enables listing the file name of
184 matching tags for CTRL-D command line completion.
185 (based on an idea from Yegappan Lakshmanan)
Bram Moolenaar86b68352004-12-27 21:59:20 +0000186'formatlistpat' pattern to recognize a numbered list for formatting.
187 (idea by Hugo Haas)
188
Bram Moolenaar071d4272004-06-13 20:20:40 +0000189
190Ex commands: ~
191
Bram Moolenaar843ee412004-06-30 16:16:41 +0000192Win32: The ":winpos" command now also works in the console. (Vipin Aravind)
193
Bram Moolenaar8299df92004-07-10 09:47:34 +0000194|:startreplace| Start Replace mode. (Charles Campbell)
Bram Moolenaar325b7a22004-07-05 15:58:32 +0000195
Bram Moolenaar8299df92004-07-10 09:47:34 +0000196|:0file| Removes the name of the buffer. (Charles Campbell)
Bram Moolenaar325b7a22004-07-05 15:58:32 +0000197
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +0000198|:diffoff| Switch off diff mode in the current window or in all
199 windows.
200
Bram Moolenaard4755bb2004-09-02 19:12:26 +0000201|:keepalt| Do not change the alternate file.
202
Bram Moolenaarc0197e22004-09-13 20:26:32 +0000203|:delmarks| Delete marks.
204
Bram Moolenaar7b0294c2004-10-11 10:16:09 +0000205|:sandbox| Command modifier: execute the argument in the sandbox.
206
Bram Moolenaarb5bf5b82004-12-24 14:35:23 +0000207|:exusage| Help for Ex commands (Nvi command).
208
209|:viusage| Help for Vi commands (Nvi command).
210
Bram Moolenaar86b68352004-12-27 21:59:20 +0000211|:cbuffer| Read error lines from a buffer. (partly by Yegappan
212 Lakshmanan)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000213
214New functions: ~
215
Bram Moolenaarbac234e2005-01-17 22:21:07 +0000216|add()| append an item to a List
217|append()| append List of lines to the buffer
218|browsedir()| Dialog to select a directory.
219|byteidx()| Index of a character. (Ilya Sher)
220|call()| call a function with List as arguments
221|copy()| make a shallow copy of a List or Dictionary
222|count()| count nr of times a value is in a List or Dictionary
223|deepcopy()| make a full copy of a List or Dictionary
224|empty()| check if List or Dictionary is empty
225|extend()| append one List to another or add items from one
226 Dictionary to another
227|filter()| remove selected items from a List or Dictionary
228|finddir()| Find a directory in 'path'.
229|findfile()| Find a file in 'path'. (Johannes Zellner)
230|foldtextresult()| The text displayed for a closed fold at line "lnum".
231|function()| make a Funcref out of a function name
232|get()| get an item from a List or Dictionary
233|getfontname()| Get actual font name being used.
234|getfperm()| Get file permission string. (Nikolai Weibull)
235|getftype()| Get type of file. (Nikolai Weibull)
236|getline()| get List with buffer lines
237|has_key()| check whether a key appears in a Dictionary
238|insert()| insert an item somewhere in a List
239|items()| get List of Dictionary key-value pairs
240|join()| join List items into a String
241|keys()| get List of Dictionary keys
242|len()| number of items in a List or Dictionary
243|map()| change each List or Dictionary item
Bram Moolenaar2a8d1f82005-02-05 21:43:56 +0000244|matchlist()| list with match and submatches of a pattern in a string
Bram Moolenaarbac234e2005-01-17 22:21:07 +0000245|max()| maximum value in a List or Dictionary
246|min()| minimum value in a List or Dictionary
Bram Moolenaar2a8d1f82005-02-05 21:43:56 +0000247|readfile()| read a file into a list of lines
Bram Moolenaarbac234e2005-01-17 22:21:07 +0000248|remove()| remove one or more items from a List or Dictionary
249|repeat()| Repeat "expr" "count" times. (Christophe Poucet)
250|reverse()| reverse the order of a List
251|sort()| sort a List
252|split()| split a String into a List
253|string()| String representation of a List or Dictionary
254|system()| Filters {input} through a shell command.
255|tr()| Translate characters. (Ron Aaron)
256|values()| get List of Dictionary values
Bram Moolenaar2a8d1f82005-02-05 21:43:56 +0000257|writefile()| write a list of lines into a file
Bram Moolenaar8299df92004-07-10 09:47:34 +0000258
Bram Moolenaarbee0c5b2005-02-07 22:03:36 +0000259User defined functions can now be loaded automatically from the "autoload"
260directory in 'runtimepath'. See |autoload-functions|.
261
Bram Moolenaar071d4272004-06-13 20:20:40 +0000262
263New autocommand events: ~
264
Bram Moolenaar8299df92004-07-10 09:47:34 +0000265|InsertEnter| starting Insert or Replace mode
266|InsertChange| going from Insert to Replace mode or back
267|InsertLeave| leaving Insert or Replace mode
Bram Moolenaar843ee412004-06-30 16:16:41 +0000268
Bram Moolenaar8299df92004-07-10 09:47:34 +0000269|ColorScheme| after loading a color scheme
Bram Moolenaarbee0c5b2005-02-07 22:03:36 +0000270|QuickFixCmdPre| before :make, :grep et al. (Ciaran McCreesh)
271|QuickFixCmdPost| after :make, :grep et al. (Ciaran McCreesh)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000272
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000273
Bram Moolenaarc0197e22004-09-13 20:26:32 +0000274New items in search patterns: ~
275|/\%d| \%d123 search for character with decimal number
276|/\]| [\d123] idem, in a colletion
277|/\%o| \%o103 search for character with octal number
278|/\]| [\o1o3] idem, in a colletion
279|/\%x| \%x1a search for character with 2 pos. hex number
280|/\]| [\x1a] idem, in a colletion
281|/\%u| \%u12ab search for character with 4 pos. hex number
282|/\]| [\u12ab] idem, in a colletion
283|/\%U| \%U1234abcd search for character with 8 pos. hex number
284|/\]| [\U1234abcd] idem, in a colletion
285 (The above partly by Ciaran McCreesh)
286
287
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000288New Syntax/Indent/FTplugin files: ~
289
290MuPAD source syntax, indent and ftplugin. (Dave Silvia)
291
Bram Moolenaard4755bb2004-09-02 19:12:26 +0000292ABAB/4 syntax file. (Marius van Wyk)
293
294SQL-Informix syntax file. (Dean L Hill)
295
Bram Moolenaar15d0a8c2004-09-06 17:44:46 +0000296PHP compiler plugin. (Doug Kearns)
297
Bram Moolenaar293ee4d2004-12-09 21:34:53 +0000298Sive syntax file. (Nikolai Weibull)
299
Bram Moolenaar15d0a8c2004-09-06 17:44:46 +0000300
Bram Moolenaar47136d72004-10-12 20:02:24 +0000301New Keymaps: ~
302
303Sinhala (Sri Lanka) (Harshula Jayasuriya)
304
305
Bram Moolenaar15d0a8c2004-09-06 17:44:46 +0000306New message translations: ~
307
308The Ukranian messages are now also available in cp1251.
309
Bram Moolenaar071d4272004-06-13 20:20:40 +0000310
Bram Moolenaarf4b8e572004-06-24 15:53:16 +0000311Others: ~
312
313Mac: Add the selection type to the clipboard, so that Block, line and
314character selections can be used between two Vims. (Eckehard Berns)
315Also fixes the problem that setting 'clipboard' to "unnamed" breaks using
316"yyp".
Bram Moolenaar071d4272004-06-13 20:20:40 +0000317
Bram Moolenaar592e0a22004-07-03 16:05:59 +0000318Mac: GUI font selector. (Peter "Rain Dog" Cucka)
319
Bram Moolenaar2079a602005-01-04 21:43:22 +0000320GUI font selector for Motif. (Marcin Dalecki)
Bram Moolenaar567e4de2004-12-31 21:01:02 +0000321
Bram Moolenaarbee0c5b2005-02-07 22:03:36 +0000322Nicer toolbar buttons for Motif. (Marcin Dalecki)
323
Bram Moolenaar2079a602005-01-04 21:43:22 +0000324Mnemonics for the Motif find/replace dialog. (Marcin Dalecki)
Bram Moolenaar567e4de2004-12-31 21:01:02 +0000325
Bram Moolenaar46c9c732004-12-12 11:37:09 +0000326Mac: better integration with Xcode. Post a fake mouse-up event after the odoc
327event and the drag receive handler to work around a stall after Vim loads a
328file. Fixed an off-by-one line number error. (Da Woon Jung)
329
Bram Moolenaar843ee412004-06-30 16:16:41 +0000330The netrw plugin now also supports viewing a directory, when "scp://" is used.
331Deleting and renaming files is possible. (Charles Campbell)
332
Bram Moolenaar293ee4d2004-12-09 21:34:53 +0000333Added the t_SI and t_EI escape sequences for starting and ending Insert mode.
334To be used to set the cursor shape to a bar or a block. No default values,
335they are not supported by termcap/terminfo.
336
Bram Moolenaarb5bf5b82004-12-24 14:35:23 +0000337Autocommands can be defined local to a buffer. This means they will also work
338when the buffer does not have a name or no specific name. See
339|autocmd-buflocal|. (Yakov Lerner)
340
Bram Moolenaar071d4272004-06-13 20:20:40 +0000341==============================================================================
342IMPROVEMENTS *improvements-7*
343
Bram Moolenaarf4b8e572004-06-24 15:53:16 +0000344":helpgrep" accepts a language specifier after the pattern: "pat@it".
345
Bram Moolenaar8299df92004-07-10 09:47:34 +0000346Move the help for printing to a separate help file. It's quite a lot now.
347
Bram Moolenaarf4b8e572004-06-24 15:53:16 +0000348":breakadd here" and ":breakdel here" can be used to set or delete a
349breakpoint at the cursor.
350
Bram Moolenaar843ee412004-06-30 16:16:41 +0000351The tutor was updated to make it simpler to use and added text to explain a
352few more important commands. Used ideas from Gabriel Zachmann.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000353
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000354Unix: When libcall() fails obtain an error message with dlerror() and display
355it. (Johannes Zellner)
356
Bram Moolenaar592e0a22004-07-03 16:05:59 +0000357Added "nbsp" in 'listchars'. (David Blanchet)
358
Bram Moolenaar21cf8232004-07-16 20:18:37 +0000359Added the "acwrite" value for the 'buftype' option. This is for a buffer that
360doesn not have a name that refers to a file and is written with BufWriteCmd
361autocommands.
362
Bram Moolenaar325b7a22004-07-05 15:58:32 +0000363For lisp indenting and matching parenthesis: (Sergey Khorev)
364- square brackets are recognized properly
365- #\(, #\), #\[ and #\] are recognized as character literals
366- Lisp line comments (delimited by semicolon) are recognized
367
Bram Moolenaar89cb5e02004-07-19 20:55:54 +0000368Added the "count" argument to match(), matchend() and matchstr(). (Ilya Sher)
369
Bram Moolenaar5eb86f92004-07-26 12:53:41 +0000370winnr() takes an optional "$" and "#" arguments. (Nikolai Weibull, Yegappan
371Lakshmanan)
372
373Added 'n' flag to search(): don't move the cursor. (Nikolai Weibull)
374
Bram Moolenaard4755bb2004-09-02 19:12:26 +0000375When uncompressing fails in the gzip plugin, give an error message but don't
376delete the raw text. Helps if the file has a .gz extension but is not
377actually compressed. (Andrew Pimlott)
378
379When C, C++ or IDL syntax is used, may additionally load doxygen syntax.
380Also support setting the filetype to "cdoxygen" for C plus doxygen syntax.
381(Michael Geddes)
382
383The ":registers" command now displays multi-byte characters properly.
384
385VMS: In the usage message mention that a slash can be used to make a flag
386upper case. Add color support to the builtin vt320 terminal codes.
387(Zoltan Arpadffy)
388
Bram Moolenaar15d0a8c2004-09-06 17:44:46 +0000389For the '%' item in 'viminfo', allow a number to set a maximum for the number
390of buffers.
391
Bram Moolenaarb5bf5b82004-12-24 14:35:23 +0000392The 'statusline' option can be local to the window, so that each window can
393have a different value. (partly by Yegappan Lakshmanan)
394
Bram Moolenaar3fdfa4a2004-10-07 21:02:47 +0000395When a file looks like a shell script, check for an "exec" command that starts
396the tcl interpreter. (suggested by Alexios Zavras)
397
398Support conversion between utf-8 and latin9 (iso-8859-15) internally, so that
399digraphs still work when iconv is not available.
400
Bram Moolenaar293ee4d2004-12-09 21:34:53 +0000401When a session file is loaded while editing an unnamed, empty buffer that
402buffer is wiped out. Avoids that there is an unused buffer in the buffer
403list.
404
405Win32: When libintl.dll supports bind_textdomain_codeset(), use it.
406(NAKADAIRA Yukihiro)
407
408When foldtext() finds no text after removing the comment leader, use the
409second line of the fold. Helps for C-style /* */ comments where the first
410line is just "/*".
411
Bram Moolenaar1cd871b2004-12-19 22:46:22 +0000412When editing the same file from two systems (e.g., Unix and MS-Windows) there
413mostly was no warning for an existing swap file, because the name of the
414edited file differs (e.g., y:\dir\file vs /home/me/dir/file). Added a flag to
415the swap file to indicate it is in the same directory as the edited file. The
416used path then doesn't matter and the check for editing the same file is much
417more reliable.
418
419Client-server communication now supports 'encoding'. When setting 'encoding'
420in a Vim server to "utf-8", and using "vim --remote fname" in a console,
421"fname" is converted from the console encoding to utf-8. Also allows Vims
422with different 'encoding' settings to exchange messages.
423
Bram Moolenaar86b68352004-12-27 21:59:20 +0000424Internal: Changed ga_room into ga_maxlen, so that it doesn't need to be
425incremented/decremented each time.
426
Bram Moolenaar2079a602005-01-04 21:43:22 +0000427Included a few improvements for Motif from Marcin Dalecki. Draw label
Bram Moolenaar567e4de2004-12-31 21:01:02 +0000428contents ourselves to make them handle fonts in a way configurable by Vim and
429a bit less dependent on the X11 font management.
430
Bram Moolenaar49cd9572005-01-03 21:06:01 +0000431When a register is empty it is not stored in the viminfo file.
432
Bram Moolenaar8c711452005-01-14 21:53:12 +0000433Removed the tcltags script, it's obsolete.
434
Bram Moolenaardcaf10e2005-01-21 11:55:25 +0000435":redir @*>" and ":redir @+>" append to the clipboard. Better check for
436invalid characters after the register name.
437
438":let g:" lists global variables.
439":let b:" lists buffer-local variables.
440":let w:" lists window-local variables.
441":let v:" lists Vim variables.
442
Bram Moolenaard438e912005-01-31 19:21:46 +0000443The stridx() and strridx() functions take a third argument, where to start
444searching. (Yegappan Lakshmanan)
Bram Moolenaarb71ec9f2005-01-25 22:22:02 +0000445
Bram Moolenaarbee0c5b2005-02-07 22:03:36 +0000446g CTRL-G also shows the number of characters if it differs from the number of
447bytes.
448
Bram Moolenaar071d4272004-06-13 20:20:40 +0000449==============================================================================
450COMPILE TIME CHANGES *compile-changes-7*
451
Bram Moolenaar2079a602005-01-04 21:43:22 +0000452Dropped the support for the BeOS and Amiga GUI. They were not maintained and
453probably didn't work. If you want to work on this: get the Vim 6.x version
454and merge it back in.
455
Bram Moolenaarab79bcb2004-07-18 21:34:53 +0000456Mac: "make" now creates the Vim.app directory and "make install" copies it to
457its final destination. (Raf)
458
459Mac: Made it possible to compile with Motif, Athena or GTK without tricks and
460still being able to use the MacRoman conversion. Added the os_mac_conv.c
461file.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000462
463==============================================================================
464BUG FIXES *bug-fixes-7*
465
Bram Moolenaarf4b8e572004-06-24 15:53:16 +0000466When using PostScript printing on MS-DOS the default 'printexpr' used "lpr"
467instead of "copy". When 'printdevice' was empty the copy command did not
468work. Use "LPT1" then.
469
470The GTK font dialog uses a font size zero when the font name doesn't include a
471size. Use a default size of 10.
472
473This example in the documentation didn't work:
474 :e `=foo . ".c" `
475Skip over the expression in `=expr` when looking for comments, |, % and #.
476
477When ":helpgrep" doesn't find anything there is no error message.
478
479"L" and "H" did not take closed folds into account.
480
481Win32: The "-P title" argument stopped at the first title that matched, even
482when it doesn't support MDI.
483
484Mac GUI: CTRL-^ and CTRL-@ did not work.
485
486"2daw" on "word." at the end of a line didn't include the preceding white
487space.
488
489Win32: Using FindExecutable() doesn't work to find a program. Use
490SearchPath() instead. For executable() use $PATHEXT when the program searched
491for doesn't have an extension.
492
493When 'virtualedit' is set, moving the cursor up after appending a character
494may move it to a different column. Was caused by auto-formatting moving the
495cursor and not putting it back where it was.
496
497When indent was added automatically and then moving the cursor, the indent was
498not deleted (like when pressing ESC). The "I" flag in 'cpoptions' can be used
499to make it work the old way.
500
Bram Moolenaarf4b8e572004-06-24 15:53:16 +0000501When opening a command-line window, 'textwidth' gets set to 78 by the Vim
502filetype plugin. Reset 'textwidth' to 0 to avoid lines are broken.
503
504After using cursor(line, col) moving up/down doesn't keep the same column.
505
506Win32: Borland C before 5.5 requires using ".u." for LowPart and HighPart
507fields. (Walter Briscoe)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000508
Bram Moolenaar843ee412004-06-30 16:16:41 +0000509On Sinix SYS_NMLN isn't always defined. Define it ourselves. (Cristiano De
510Michele)
511
Bram Moolenaar325b7a22004-07-05 15:58:32 +0000512Printing with PostScript may keep the printer waiting for more. Append a
513CTRL-D to the printer output. (Mike Williams)
514
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +0000515When converting a string with a hex or octal number the leading '-' was
516ignored. ":echo '-05' + 0" resulted in 5 instead of -5.
517
518Using "@:" to repeat a command line didn't work when it contains control
519characters.
520
Bram Moolenaar21cf8232004-07-16 20:18:37 +0000521When using file completion for a user command, it would not expand environment
522variables like for a regular command with a file argument.
523
524'cindent': When the argument of a #define looks like a C++ class the next line
525is indented too much.
526
527When 'comments' includes multi-byte characters inserting the middle part and
528alignment may go wrong. 'cindent' also suffers from this for right-aligned
529items.
530
Bram Moolenaarab79bcb2004-07-18 21:34:53 +0000531The default for 'helplang' was "zh" for both "zh_cn" and "zh_tw". Now use
532"cn" or "tw" as intended.
533
Bram Moolenaar5eb86f92004-07-26 12:53:41 +0000534When 'bin' is set and 'eol' is not set then line2byte() added the line break
535after the last line while it's not there.
536
537Using foldlevel() in a WinEnter autocommand may not work. Noticed when
538resizing the GUI shell upon startup.
539
540Python: Using buffer.append(f.readlines()) didn't work. Allow appending a
541string with a trailing newline. The newline is ignored.
542
Bram Moolenaar269ec652004-07-29 08:43:53 +0000543When using the ":saveas f2" command for buffer "f1", the Buffers menu would
544contain "f2" twice, one of them leading to "f1". Also trigger the BufFilePre
545and BufFilePost events for the alternate buffer that gets the old name.
546
Bram Moolenaard4755bb2004-09-02 19:12:26 +0000547strridx() did not work well when the needle is empty. (Ciaran McCreesh)
548
549GTK: Avoid a potential hang in gui_mch_wait_for_chars() when input arrives
550just before it is invoked
551
552VMS: Occasionally CR characters were inserted in the file. Expansion of
553environment variables was not correct. (Zoltan Arpadffy)
554
555UTF-8: When 'delcombine' is set "dw" only deleted the last combining character
556from the first character of the word.
557
558When using ":sball" in an autocommand only the filetype in one buffer was
559detected. Reset did_filetype in enter_buffer().
560
561When using ":argdo" and the window already was at the first argument index,
562but not actually editing it, the current buffer would be used instead.
563
Bram Moolenaar15d0a8c2004-09-06 17:44:46 +0000564When ":next dir/*" includes many matches, adding the names to the argument
565list may take an awful lot of time and can't be interrupted. Allow
566interrupting this.
567
568When editing a file that was already loaded in a buffer, modelines were not
569used. Now window-local options in the modeline are set. Buffer-local options
570and global options remain unmodified.
571
572Win32: When 'encoding' is set to "utf-8" in the vimrc file, files from the
573command line with non-ASCII characters are not used correctly. Recode the
574file names when 'encoding' is set, using the Unicode command line.
575
Bram Moolenaarc0197e22004-09-13 20:26:32 +0000576Win32 console: When the default for 'encoding' ends up to be "latin1", the
577default value of 'isprint' was wrong.
578
579When an error message is given while waiting for a character (e.g., when an
580xterm reports the number of colors), the hit-enter prompt overwrote the last
581line. Don't reset msg_didout in normal_cmd() for K_IGNORE.
582
Bram Moolenaar3fdfa4a2004-10-07 21:02:47 +0000583Mac GUI: Shift-Tab didn't work.
584
585When defining tooltip text, don't translate terminal codes, since it's not
586going to be used like a command.
587
588GTK 2: Check the tooltip text for valid utf-8 characters to avoid getting a
589GTK error. Invalid characters may appear when 'encoding' is changed.
590
591GTK 2: Add a safety check for invalid utf-8 sequences, they can crash pango.
592
593Win32: When 'encoding' is changed while starting up, use the Unicode command
594line to convert the file arguments to 'encoding'. Both for the GUI and the
595console version.
596
597Win32 GUI: latin9 text (iso-8859-15) was not displayed correctly, because
598there is no codepage for latin9. Do our own conversion from latin9 to UCS2.
599
Bram Moolenaar7b0294c2004-10-11 10:16:09 +0000600When two versions of GTK+ 2 are installed it was possible to use the header
601files from one and the library from the other. Use GTK_LIBDIR to put the
602directory for the library early in the link flags.
603
604With the GUI find/replace dialog a replace only worked if the pattern was
605literal text. Now it works for any pattern.
606
Bram Moolenaar293ee4d2004-12-09 21:34:53 +0000607When 'equalalways' is set and 'eadirection' is "hor", ":quit" would still
608cause equalizing window heights in the vertical direction.
609
610When ":emenu" is used in a startup script the command was put in the typeahead
611buffer, causing a prompt for the crypt key to be messed up.
612
613Mac OS/X: The default for 'isprint' included characters 128-160, causes
614problems for Terminal.app.
615
616When a syntax item with "containedin" is used, it may match in the start or
617end of a region with a matchgroup, while this doesn't happen for a "contains"
618argument.
619
620When a transparent syntax items matches in another item where the highlighting
621has already stopped (because of a he= argument), the highlighting would come
622back.
623
624When cscope is used to set the quickfix error list, it didn't get set if there
625was only one match. (Sergey Khorev)
626
627When 'confirm' is set and using ":bdel" in a modified buffer, then selecting
628"cancel", would still give an error message.
629
630The PopUp menu items that started Visual mode didn't work when not in Normal
631mode. Switching between selecting a word and a line was not possible.
632
633Win32: The keypad decimal point always resulted in a '.', while on some
634keyboards it's a ','. Use MapVirtualKey(VK_DECIMAL, 2).
635
636Removed unused function DisplayCompStringOpaque() from gui_w32.c
637
638In Visual mode there is not always an indication whether the line break is
639selected or not. Highlight the character after the line when the line break
640is included, e.g., after "v$o".
641
642GTK: The <F10> key can't be mapped, it selects the menu. Disable that with a
643GTK setting and do select the menu when <F10> isn't mapped. (David Necas)
644
645After "Y" '[ and '] were not at start/end of the yanked text.
646
647When a telnet connection is dropped Vim preserves files and exits. While
648doing that a SIGHUP may arrive and disturbe us, thus ignore it. (Scott
Bram Moolenaar46c9c732004-12-12 11:37:09 +0000649Anderson) Also postpone SIGHUP, SIGQUIT and SIGTERM until it's safe to
650handle. Added handle_signal().
651
652When using "set laststatus=2 cmdheight=2" in the .gvimrc you may only get one
653line for the cmdline. (Christian Robinson) Invoke command_height() after the
654GUI has started up.
Bram Moolenaar293ee4d2004-12-09 21:34:53 +0000655
Bram Moolenaar1cd871b2004-12-19 22:46:22 +0000656When completing a file name on the command line backslashes are required for
657white space. Was only done for a space, not for a Tab.
658
659When configure could not find a terminal library, compiling continued for a
660long time before reporting the problem. Added a configure check for tgetent()
661being found in a library.
662
663When the cursor is on the first char of the last line a ":g/pat/s///" command
664may cause the cursor to be displayed below the text.
665
666Win32: Editing a file with non-ASCII characters doesn't work when 'encoding'
667is "utf-8". use _wfullpath() instead of _fullpath(). (Yu-sung Moon)
668
669When recovering the 'fileformat' and 'fileencoding' were taken from the
670original file instead of from the swapfile. When the file didn't exist, was
671empty or the option was changed (e.g., with ":e ++fenc=cp123 file") it could
672be wrong. Now store 'fileformat' and 'fileencoding' in the swapfile and use
673the values when recovering.
674
675":bufdo g/something/p" overwrites each last printed text line with the file
676message for the next buffer. Temporarily clear 'shortmess' to avoid that.
677
Bram Moolenaarb5bf5b82004-12-24 14:35:23 +0000678Win32: Cannot edit a file starting with # with --remote. Do escape % and #
679when building the ":drop" command.
680
Bram Moolenaar86b68352004-12-27 21:59:20 +0000681A comment or | just after a expresion-backtick argument was not recognized.
682E.g. in :e `="foo"`"comment.
683
Bram Moolenaar567e4de2004-12-31 21:01:02 +0000684"(" does not stop at an empty sentence (single dot and white space) while ")"
685does. Also breaks "das" on that dot.
686
687When doing "yy" with the cursor on a TAB the ruler could be wrong and "k"
688moved the cursor to another column.
689
690When 'commentstring' is '"%s' and there is a double quote in the line a double
691quote before the fold marker isn't removed in the text displayed for a closed
692fold.
693
694In Visual mode, when 'bin' and 'eol' set, g CTRL-G counted the last line
695break, resulting in "selected 202 of 201 bytes".
696
Bram Moolenaar2079a602005-01-04 21:43:22 +0000697Motif: fonts were not used for dialog components. (Marcin Dalecki)
Bram Moolenaar567e4de2004-12-31 21:01:02 +0000698
Bram Moolenaar49cd9572005-01-03 21:06:01 +0000699Motif: After using a toolbar button the keyboard focus would be on the toolbar
Bram Moolenaar2079a602005-01-04 21:43:22 +0000700(Lesstif problem). (Marcin Dalecki)
Bram Moolenaar49cd9572005-01-03 21:06:01 +0000701
Bram Moolenaar1c2fda22005-01-02 11:43:19 +0000702When using "y<C-V>`x" where mark x is in the first column, the last line was
703not included.
704
705Not all test scripts work properly on MS-Windows when checked out from CVS.
706Use a Vim command to fix all fileformats to dos before executing the tests.
707
708When using ":new" and the file fits in the window, lines could still be above
709the window. Now remove empty lines instead of keeping the relative position.
710
Bram Moolenaar3d60ec22005-01-05 22:19:46 +0000711Cmdline completion didn't work after ":let var1 var<Tab>".
712
Bram Moolenaarb7d6e722005-01-09 21:22:45 +0000713When using ":startinsert" or ":startreplace" when already in Insert mode
714(possible when using CTRL-R =), pressing Esc would directly restart Insert
715mode. (Peter Winters)
716
Bram Moolenaar31c67ef2005-01-11 21:34:41 +0000717"2daw" didn't work at end of file if the last word is a single character.
718
Bram Moolenaar8c711452005-01-14 21:53:12 +0000719Completion for ":next a'<Tab>" put a backslash before single quote, but it was
720not removed when editing a file. Now halve backslashes in save_patterns().
Bram Moolenaar798c5a72005-01-16 22:06:30 +0000721Also fix expanding a file name with the shell that contains "\'".
Bram Moolenaar8c711452005-01-14 21:53:12 +0000722
Bram Moolenaarb71ec9f2005-01-25 22:22:02 +0000723When doing "1,6d|put" only "fewer lines" was reported. Now a following "more
724lines" overwrites the message.
725
726Configure could not handle "-Dfoo=long\ long" in the TCL config output.
727
Bram Moolenaarb2956cd2005-01-27 14:42:53 +0000728When searching backwards, using a pattern that matches a newline and uses \zs
729after that, didn't find a match. Could also get a hang or end up in the right
730column in the wrong line.
731
Bram Moolenaard438e912005-01-31 19:21:46 +0000732When $LANG is "sl" for slovenian, the slovak menu was used, since "slovak"
733starts with "sl".
734
735When 'paste' is set in the GUI the Paste toolbar button doesn't work. Clear
736'paste' when starting the GUI.
737
Bram Moolenaarf5836682005-02-02 23:09:45 +0000738A message about a wrong viminfo line included the trailing NL.
739
Bram Moolenaar2a8d1f82005-02-05 21:43:56 +0000740When 'paste' is set in the GUI the toolbar button doesn't work in Insert mode.
741Use ":exe" in menu.vim to avoid duplicating the commands, instead of using a
742mapping.
743
744Treat "mlterm" as an xterm-like terminal. (Seiichi Sato)
745
746":z.4" and ":z=4" didn't work Vi compatible.
747
Bram Moolenaarbee0c5b2005-02-07 22:03:36 +0000748When sourcing a file, editing it and sourcing it again, it could appear twice
749in ":scriptnames" and get a new <SID>, because the inode has changed.
750
751When $SHELL is set but empty the 'shell' option would be empty. Don't use an
752empty $SHELL value.
753
754A command "w! file" in .vimrc or $EXINIT didn't work. Now it writes an empty
755file.
756
757When a CTRL-F command at the end of the file failed, the cursor was still
758moved to the start of the line. Now it remains where it is.
759
760When using ":s" or "&" to repeat the last substitute and "$" was used to put
761the cursor in the last column, put the cursor in the last column again. This
762is Vi compatible.
763
Bram Moolenaar071d4272004-06-13 20:20:40 +0000764 vim:tw=78:ts=8:ft=help:norl: