blob: 5743a797101b246a4be13f8cefc504f68e9df185 [file] [log] [blame]
Bram Moolenaar8ada17c2006-01-19 22:16:24 +00001*version7.txt* For Vim version 7.0aa. Last change: 2006 Jan 19
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 Moolenaar60c78922005-03-20 22:40:14 +000022Spell checking |new-spell|
Bram Moolenaarf75a9632005-09-13 21:20:47 +000023Omni completion |new-omni-completion|
Bram Moolenaarfb670262005-06-05 22:06:27 +000024MzScheme interface |new-MzScheme|
25Printing multi-byte text |new-print-multi-byte|
Bram Moolenaar293ee4d2004-12-09 21:34:53 +000026Translated manual pages |new-manpage-trans|
Bram Moolenaar8fc061c2004-12-29 21:03:02 +000027Internal grep |new-vimgrep|
Bram Moolenaar87e25fd2005-07-27 21:13:01 +000028Scroll back in messages |new-scroll-back|
Bram Moolenaar4399ef42005-02-12 14:29:27 +000029POSIX compatibility |new-posix|
Bram Moolenaare2ac10d2005-03-07 23:26:06 +000030Debugger support |new-debug-support|
Bram Moolenaar0be6e642005-08-04 21:32:22 +000031Remote file explorer |new-netrw-explore|
Bram Moolenaar900b4d72005-12-12 22:05:50 +000032Define an operator |new-define-operator|
Bram Moolenaar071d4272004-06-13 20:20:40 +000033Various new items |new-items-7|
34
35IMPROVEMENTS |improvements-7|
36
37COMPILE TIME CHANGES |compile-changes-7|
38
39BUG FIXES |bug-fixes-7|
40
41==============================================================================
42INCOMPATIBLE CHANGES *incompatible-7*
43
44These changes are incompatible with previous releases. Check this list if you
Bram Moolenaarb2956cd2005-01-27 14:42:53 +000045run into a problem when upgrading from Vim 6.x to 7.0.
46
47A ":write file" command no longer resets the 'modified' flag of the buffer,
48unless the '+' flag is in 'cpoptions' |cpo-+|. This was illogical, since the
49buffer is still modified compared to the original file. And when undoing
50all changes the file would actually be marked modified. It does mean that
51":quit" fails now.
Bram Moolenaar071d4272004-06-13 20:20:40 +000052
Bram Moolenaarf4b8e572004-06-24 15:53:16 +000053":helpgrep" now uses a help window to display a match.
54
Bram Moolenaar1cd871b2004-12-19 22:46:22 +000055In an argument list double quotes could be used to include spaces in a file
56name. This caused a difference between ":edit" and ":next" for escaping
57double quotes and it is incompatible with some versions of Vi.
58 Command Vim 6.x file name Vim 7.x file name ~
59 :edit foo\"888 'foo"888' 'foo"888'
60 :next foo\"888 'foo888' 'foo"888'
61 :next a\"b c\"d 'ab cd' 'a"b' and 'c"d'
62
Bram Moolenaar8c711452005-01-14 21:53:12 +000063In a |literal-string| a single quote can be doubled to get one.
64":echo 'a''b'" would result in "a b", but now that two quotes stand for one it
65results in "a'b".
66
Bram Moolenaar04a09c12005-08-01 22:02:32 +000067When overwriting a file with ":w! fname" there was no warning for when "fname"
68was being edited by another Vim. Vim now gives an error message |E768|.
69
Bram Moolenaar241a8aa2005-12-06 20:04:44 +000070The support for Mac OS 9 has been removed.
71
Bram Moolenaarf4b8e572004-06-24 15:53:16 +000072
73Minor incompatibilities:
74
75For filetype detection: For many types, instead of ~/.dir/filename use
76*/.dir/filename, so that it also works for other user's files.
77
78":0verbose" now sets 'verbose' to zero instead of one.
79
80Removed the old and incomplete "VimBuddy" code.
81
82Buffers without a name report "No Name" instead of "No File". It was
83confusing for buffers with a name and 'buftype' set to "nofile".
Bram Moolenaar071d4272004-06-13 20:20:40 +000084
Bram Moolenaar7b0294c2004-10-11 10:16:09 +000085When ":file xxx" is used in a buffer without a name, the alternate file name
86isn't set. This avoids creating buffers without a name that are not useful.
87
88The "2html.vim" script now converts closed folds to HTML. This means the HTML
Bram Moolenaarf4630b62005-05-20 21:31:17 +000089looks like its displayed, with the same folds open and closed. Use "zR", or
90"let html_ignore_folding=1", if no folds should appear in the HTML. (partly by
91Carl Osterwisch)
Bram Moolenaar47136d72004-10-12 20:02:24 +000092Diff mode now is also converted as it is displayed.
Bram Moolenaar7b0294c2004-10-11 10:16:09 +000093
Bram Moolenaar293ee4d2004-12-09 21:34:53 +000094Win32: The effect of the <F10> key depended on 'winaltkeys'. Now it depends
95on whether <F10> has been mapped or not. This allows mapping <F10> without
96changing 'winaltkeys'.
97
Bram Moolenaar8c711452005-01-14 21:53:12 +000098When 'octal' is in 'nrformats' and using CTRL-A on "08" it became "018", which
99is illogical. Now it becomes "9". The leading zero(s) is(are) removed to
100avoid the number becoming octal after incrementing "009" to "010".
Bram Moolenaar1cd871b2004-12-19 22:46:22 +0000101
102When 'encoding' is set to a Unicode encoding, the value for 'fileencodings'
103now includes "default" before "latin1". This means that for files with 8-bit
104encodings the default is to use the encoding specified by the environment, if
105possible. Previously latin1 would always be used, which is wrong in a
106non-latin1 environment, such as Russian.
107
Bram Moolenaard438e912005-01-31 19:21:46 +0000108Previously Vim would exit when there are two windows, both of them displaying
109a help file, and using ":quit". Now only the window is closed.
110
Bram Moolenaar4399ef42005-02-12 14:29:27 +0000111"-w {scriptout}" only works when {scriptout} doesn't start with a digit.
112Otherwise it's used to set the 'window' option.
113
Bram Moolenaar8bf59b92005-03-06 23:40:56 +0000114Previously <Home> and <xHome> could be mapped separately. This had the
115disadvantage that all mappings (with modifiers) had to be duplicated, since
116you can't be sure what the keyboard generates. Now all <xHome> are internally
117translated to <Home>, both for the keys and for mappings. Also for <xEnd>,
118<xF1>, etc.
119
Bram Moolenaar13fcaaf2005-04-15 21:13:42 +0000120":put" now leaves the cursor on the last inserted line.
121
Bram Moolenaar7fae6362005-06-30 22:06:41 +0000122When a .gvimrc file exists then 'compatible' is off, just like when a ".vimrc"
123file exists.
124
Bram Moolenaara2036d22005-08-23 21:04:20 +0000125When making a string upper-case with "vlllU" or similar then the German sharp
126s is replaced with "SS". This does not happen with "~" to avoid backwards
127compatibility problems and because "SS" can't be changed back to a sharp s.
128
Bram Moolenaardd2436f2005-09-05 22:14:46 +0000129"gd" previously found the very first occurrence of a variable in a function,
130that could be the function argument without type. Now it finds the position
131where the type is given.
132
Bram Moolenaar071d4272004-06-13 20:20:40 +0000133==============================================================================
134NEW FEATURES *new-7*
135
Bram Moolenaarbac234e2005-01-17 22:21:07 +0000136Vim script enhancements *new-vim-script*
137-----------------------
Bram Moolenaar071d4272004-06-13 20:20:40 +0000138
139In Vim scripts the following types have been added:
140
Bram Moolenaar31c67ef2005-01-11 21:34:41 +0000141 List ordered list of items |List|
142 Dictionary associative array of items |Dictionary|
143 Funcref reference to a function |Funcref|
Bram Moolenaar071d4272004-06-13 20:20:40 +0000144
145Many functions and commands have been added to support the new types.
146
Bram Moolenaar31c67ef2005-01-11 21:34:41 +0000147The |string()| function can be used to get a string representation of a
148variable. Works for Numbers, Strings and composites of them. Then |eval()|
149can be used to turn the string back into the variable value.
150
Bram Moolenaarbac234e2005-01-17 22:21:07 +0000151The |:let| command can now use ":let var += expr" like using ":let var = var +
152expr". "-=" and ".=" works in a similar way.
153
Bram Moolenaar038eb0e2005-02-27 22:43:26 +0000154With the |:profile| command you can find out where your function or script
155wastes its time.
156
Bram Moolenaar843ee412004-06-30 16:16:41 +0000157
Bram Moolenaar60c78922005-03-20 22:40:14 +0000158Spell checking *new-spell*
159--------------
160
161Spell checking has been integrated in Vim. There were a few implementations
162with scripts, but they were slow and/or required an external program.
163
164The 'spell' option is used to switch spell checking on or off.
165The 'spelllang' option is used to specify the languages that are accepted.
Bram Moolenaar9ba0eb82005-06-13 22:28:56 +0000166The 'spellfile' option specifies where new words are added.
Bram Moolenaar7fae6362005-06-30 22:06:41 +0000167The 'spellsuggest' option specifies the methods used for making suggestions
Bram Moolenaar9ba0eb82005-06-13 22:28:56 +0000168
169The |[s| and |]s| commands can be used to move to the next or previous error.
170The |zg| and |zw| commands can be used to add good and wrong words.
Bram Moolenaar900b4d72005-12-12 22:05:50 +0000171The |z=| command can be used to correct the word.
Bram Moolenaar7fae6362005-06-30 22:06:41 +0000172The |:mkspell| command is used to generate a Vim spell file from word lists.
Bram Moolenaar60c78922005-03-20 22:40:14 +0000173
174The "undercurl" highlighting attribute was added to nicely point out spelling
175mistakes in the GUI (based on patch from Marcin Dalecki).
176The "guisp" color can be used to give it a color different from foreground and
177background.
178The number of possible different highlight attributes was raised from about
179220 to over 30000. This allows for the attributes of spelling to be combined
Bram Moolenaar75c50c42005-06-04 22:06:24 +0000180with syntax highlighting attributes. This is also used for syntax
181highlighting.
Bram Moolenaar60c78922005-03-20 22:40:14 +0000182
183Much more info here: |spell|.
184
185
Bram Moolenaarf75a9632005-09-13 21:20:47 +0000186Omni completion *new-omni-completion*
187-----------------
188
189This could also be called "intellisense", but that is a trademark. It is a
190smart kind of completion. The text in front of the cursor is inspected to
191figure out what could be following. This considers struct and class members,
192unions, etc.
193
194Use CTRL-X CTRL-O in Insert mode to start the completion. |i_CTRL-X_CTRL-O|
195
196The 'omnifunc' option is set by filetype plugins to define the function that
197figures out the completion.
198
Bram Moolenaar07d4d732005-10-03 22:04:08 +0000199Currently supported languages:
200 C |ft-c-omni|
201 XHTML |ft-html-omni|
202
203When the 'completeopt' option contains "menu" then matches for Insert mode
204completion are displayed in a popup menu.
Bram Moolenaarf75a9632005-09-13 21:20:47 +0000205
206
Bram Moolenaar325b7a22004-07-05 15:58:32 +0000207MzScheme interface *new-MzScheme*
208------------------
209
210The MzScheme interpreter is supported. |MzScheme|
211The |:mzscheme| command can be used to execute MzScheme commands.
212The |:mzfile| command can be used to execute an MzScheme script file.
213
Bram Moolenaar31c67ef2005-01-11 21:34:41 +0000214
Bram Moolenaar8299df92004-07-10 09:47:34 +0000215Printing multi-byte text *new-print-multi-byte*
216------------------
217
218The |:hardcopy| command now supports printing multi-byte characters.
219The 'printmbcharset' and 'printmbfont' options are used for this.
220Also see |postscript-cjk-printing|. (Mike Williams)
221
Bram Moolenaar325b7a22004-07-05 15:58:32 +0000222
Bram Moolenaar293ee4d2004-12-09 21:34:53 +0000223Translated manual pages *new-manpage-trans*
224-----------------------
225
226The manual page of Vim and associated programs is now also available in
Bram Moolenaar4ad237d2005-03-11 22:49:40 +0000227several other languages.
228
Bram Moolenaar13fcaaf2005-04-15 21:13:42 +0000229French - translated by David Blanchet
Bram Moolenaar4ad237d2005-03-11 22:49:40 +0000230Italian - translated by Antonio Colombo
231Russian - translated by Vassily Ragosin
Bram Moolenaar293ee4d2004-12-09 21:34:53 +0000232
Bram Moolenaar13fcaaf2005-04-15 21:13:42 +0000233The Unix Makefile installs the Italian manual pages in .../man/it/man1/,
234.../man/it.ISO8859-1/man1/ and .../man/it.UTF-8/man1/. There appears to be no
235standard for what encoding goes in the "it" directory, the 8-bit encoded file
236is used there as a best guess.
237Other languages are installed in similar places.
Bram Moolenaar67fe1a12005-05-22 22:12:58 +0000238The translated pages are not automatically installed when Vim was configured
239with "--disable-nls", but "make install-languages install-tool-languages" will
240do it anyway.
Bram Moolenaarb5bf5b82004-12-24 14:35:23 +0000241
Bram Moolenaar293ee4d2004-12-09 21:34:53 +0000242
Bram Moolenaar8fc061c2004-12-29 21:03:02 +0000243Internal grep *new-vimgrep*
244-------------
245
246The ":vimgrep" command can be used to search for a pattern in a list of files.
247This is like the ":grep" command, but no external program is used. Besides
248better portability, handling of different file encodings and using multi-line
249patterns, this also allows grepping in compressed and remote files.
250|:vimgrep|.
251
Bram Moolenaar05159a02005-02-26 23:04:13 +0000252If you want to use the search results in a script you can use the
Bram Moolenaar2641f772005-03-25 21:58:17 +0000253|getqflist()| function.
Bram Moolenaar05159a02005-02-26 23:04:13 +0000254
Bram Moolenaar231334e2005-07-25 20:46:57 +0000255To search in files in various directories the "**" pattern can be used. It
256expands into an arbitrary depth of directories. "**" can be used in all
257places where file names are expanded, thus also with |:next| and |:args|.
258
Bram Moolenaar8fc061c2004-12-29 21:03:02 +0000259
Bram Moolenaar87e25fd2005-07-27 21:13:01 +0000260Scroll back in messages *new-scroll-back*
261-----------------------
262
263When displaying messages, at the |more-prompt| and the |hit-enter-prompt|, The
264'k', 'u' and 'b' keys can be used to scroll back to previous messages. This
265is especially useful for commands such as ":syntax", ":autocommand" and
266":highlight". This is implemented in a generic way thus it works for all
267commands and highlighting is kept. Only works when the 'more' option is set.
268Previously it only partly worked for ":clist".
269
Bram Moolenaar661b1822005-07-28 22:36:45 +0000270The |g<| command can be used to see the last page of messages after you have
271hit <Enter> at the |hit-enter-prompt|. Then you can scroll further back.
272
Bram Moolenaar87e25fd2005-07-27 21:13:01 +0000273
Bram Moolenaar4399ef42005-02-12 14:29:27 +0000274POSIX compatibility *new-posix*
275-------------------
276
277The POSIX test suite was used to verify POSIX compatibility. A number of
278problems have been fixed to make Vim more POSIX compatible. Some of them
279conflict with traditional Vi or expected behavior. The $VIM_POSIX environment
280variable can be set to get POSIX compatibility. See |posix|.
281
282Items that were fixed for both Vi and POSIX compatibilty:
283- repeating "R" with a count only overwrites text once; added the 'X' flag to
284 'cpoptions' |cpo-X|
285- a vertical movement command that moves to a non-existing line fails; added
286 the '-' flag to 'cpoptions' |cpo--|
287- when preserving a file and doing ":q!" the file can be recovered; added the
288 '&' flag to 'cpoptions' |cpo-&|
289- The 'window' option is partly implemented. It specifies how much CTRL-F and
290 CTRL-B scroll when there is one window. The "-w {number}" argument is now
291 accepted. "-w {scriptout}" only works when {scriptout} doesn't start with a
292 digit.
293- Allow "-c{command}" argument, no space between "-c" and {command}.
294- When writing a file with ":w!" don't reset 'readonly' when 'Z' is present in
295 'cpoptions'.
Bram Moolenaar5313dcb2005-02-22 08:56:13 +0000296- Allow 'l' and '#' flags for ":list", ":print" and ":number".
297- Added the '.' flag to 'cpoptions': ":cd" fails when the buffer is modified.
298- In Ex mode with an empty buffer ":read file" doesn't keep an empty line
299 above or below the new lines.
300- Remove a backslash before a NL for the ":global" command.
301- When ":append", ":insert" or ":change" is used with ":global", get the
302 inserted lines from the command. Can use backslash-NL to separate lines.
303- Can use ":global /pat/ visual" to execute Normal mode commands at each
304 matched line. Use "Q" to continue and go to the next line.
305- The |:open| command has been partially implemented. It stops Ex mode, but
306 redraws the whole screen, not just one line as open mode is supposed to do.
307- Support using a pipe to read the output from and write input to an external
308 command. Added the 'shelltemp' option and has("filterpipe").
309- In ex silent mode the ":set" command output is displayed.
310- The ":@@" and ":**" give an error message when no register was used before.
311- The search pattern "[]-`]" matches ']', '^', '_' and '`'.
312- Autoindent for ":insert" is using the line below the insert.
313- Autoindent for ":change" is using the first changed line.
314- Editing Ex command lines is not done in cooked mode, because CTRL-D and
315 CTRL-T cannot be handled then.
Bram Moolenaar45eeb132005-06-06 21:59:07 +0000316- In Ex mode, "1,3" prints three lines. "%" prints all lines.
317- In Ex mode "undo" would undo all changes since Ex mode was started.
Bram Moolenaar5313dcb2005-02-22 08:56:13 +0000318- Implemented the 'prompt' option.
Bram Moolenaar4399ef42005-02-12 14:29:27 +0000319
320
Bram Moolenaare2ac10d2005-03-07 23:26:06 +0000321Debugger support *new-debug-support*
322----------------
323
324The 'balloonexpr' option has been added. This is a generic way to implement
325balloon functionality. You can use it to show info for the word under the
326mouse pointer.
327
328
Bram Moolenaar0be6e642005-08-04 21:32:22 +0000329Remote file explorer *new-netrw-explore*
330--------------------
331
332The netrw plugin now also supports viewing a directory, when "scp://" is used.
333Deleting and renaming files is possible.
334
335To avoid duplicating a lot of code, the previous file explorer plugin has been
336integrated in the netrw plugin. This means browsing local and remote files
337works the same way.
338
339":browse edit" and ":browse split" use the netrw plugin when it's available
340and a GUI dialog is not possible.
341
342The netrw plugin is maintained by Charles Campbell.
343
344
Bram Moolenaar900b4d72005-12-12 22:05:50 +0000345Define an operator *new-define-operator*
346------------------
347
348Previously it was not possible to define your own operator; a command that is
349followed by a {motion}. Vim 7 introduces the 'operatorfunc' option and the
350|g@| operator. This makes it possible to define a mapping that works like an
351operator. The actual work is then done by a function, which is invoked
352through the |g@| operator.
353
354See |:map-operator| for the explanation and an example.
355
356
Bram Moolenaar071d4272004-06-13 20:20:40 +0000357Various new items *new-items-7*
358-----------------
359
360Normal mode commands: ~
361
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000362a", a' and a` New text objects to select quoted strings. |a'|
Bram Moolenaarac6e65f2005-08-29 22:25:38 +0000363i", i' and i` (Taro Muraoka)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000364
Bram Moolenaar05159a02005-02-26 23:04:13 +0000365CTRL-W <Enter> In the quickfix window: opens a new window to show the
366 location of the error under the cursor.
367
Bram Moolenaarff6f0612005-07-19 22:21:12 +0000368|at| and |it| text objects select a block of text between HTML or XML tags.
369
Bram Moolenaarbca84a12005-12-14 22:08:35 +0000370<A-LeftMouse> ('mousemodel' "popup" or "popup-setpos")
371<A-RightMouse> ('mousemodel' "extend")
372 Make a blockwise selection. |<A-LeftMouse>|
Bram Moolenaarff6f0612005-07-19 22:21:12 +0000373
Bram Moolenaar488c6512005-08-11 20:09:58 +0000374Insert mode commands: ~
375
376CTRL-\ CTRL-O Execute a Normal mode command. Like CTRL-O but
377 without moving the cursor.
378
Bram Moolenaar071d4272004-06-13 20:20:40 +0000379Options: ~
380
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000381'completefunc' The name of a function used for user-specified Insert
382 mode completion. CTRL-X CTRL-U can be used in Insert
383 mode to do any kind of completion. (Taro Muraoka)
Bram Moolenaar07d4d732005-10-03 22:04:08 +0000384'completeopt' Enable popup menu for Insert mode completion.
Bram Moolenaarf75a9632005-09-13 21:20:47 +0000385'omnifunc' The name of a function used for omni completion.
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000386'quoteescape' Characters used to escape quotes inside a string.
387 Used for the a", a' and a` text objects. |a'|
Bram Moolenaar592e0a22004-07-03 16:05:59 +0000388'numberwidth' Minimal width of the space used for the 'number'
389 option. (Emmanuel Renieris)
Bram Moolenaar325b7a22004-07-05 15:58:32 +0000390'mzquantum' Time in msec to schedule MzScheme threads.
Bram Moolenaar8299df92004-07-10 09:47:34 +0000391'printmbcharset' CJK character set to be used for :hardcopy
392'printmbfont' font names to be used for CJK output of :hardcopy
Bram Moolenaar293ee4d2004-12-09 21:34:53 +0000393'fsync' Whether fsync() is called after writing a file.
394 (Ciaran McCreesh)
Bram Moolenaarb5bf5b82004-12-24 14:35:23 +0000395'wildoptions' "tagfile" value enables listing the file name of
396 matching tags for CTRL-D command line completion.
397 (based on an idea from Yegappan Lakshmanan)
Bram Moolenaar86b68352004-12-27 21:59:20 +0000398'formatlistpat' pattern to recognize a numbered list for formatting.
399 (idea by Hugo Haas)
Bram Moolenaar60c78922005-03-20 22:40:14 +0000400'spell' switch spell checking on/off
401'spelllang' languages to check spelling for
Bram Moolenaar42eeac32005-06-29 22:40:58 +0000402'spellsuggest' methods for spell suggestions
Bram Moolenaar3b56eb32005-07-11 22:40:32 +0000403'synmaxcol' maximum column to look for syntax items; avoids very
404 slow redrawing when there are very long lines
Bram Moolenaar54ee7752005-05-31 22:22:17 +0000405'verbosefile' Log messages in a file.
Bram Moolenaar86b68352004-12-27 21:59:20 +0000406
Bram Moolenaar071d4272004-06-13 20:20:40 +0000407
408Ex commands: ~
409
Bram Moolenaar843ee412004-06-30 16:16:41 +0000410Win32: The ":winpos" command now also works in the console. (Vipin Aravind)
411
Bram Moolenaar8299df92004-07-10 09:47:34 +0000412|:startreplace| Start Replace mode. (Charles Campbell)
Bram Moolenaarbca84a12005-12-14 22:08:35 +0000413|:startgreplace| Start Virtual Replace mode.
Bram Moolenaar325b7a22004-07-05 15:58:32 +0000414
Bram Moolenaar8299df92004-07-10 09:47:34 +0000415|:0file| Removes the name of the buffer. (Charles Campbell)
Bram Moolenaar325b7a22004-07-05 15:58:32 +0000416
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +0000417|:diffoff| Switch off diff mode in the current window or in all
418 windows.
419
Bram Moolenaarc0197e22004-09-13 20:26:32 +0000420|:delmarks| Delete marks.
421
Bram Moolenaarb5bf5b82004-12-24 14:35:23 +0000422|:exusage| Help for Ex commands (Nvi command).
423
424|:viusage| Help for Vi commands (Nvi command).
425
Bram Moolenaar86b68352004-12-27 21:59:20 +0000426|:cbuffer| Read error lines from a buffer. (partly by Yegappan
427 Lakshmanan)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000428
Bram Moolenaar67fe1a12005-05-22 22:12:58 +0000429|:sort| Sort lines in the buffer without depending on an
430 external command.
431
Bram Moolenaar87e25fd2005-07-27 21:13:01 +0000432|:caddfile| Add error messages to an existing quickfix list
433 (Yegappan Lakshmanan).
434
435|:cexpr| Read error messages from a Vim expression (Yegappan
436 Lakshmanan).
437
Bram Moolenaar4770d092006-01-12 23:22:24 +0000438|:caddexpr| Add error messages from a Vim expression to an
439 existing quickfix list. (Yegappan Lakshmanan).
440
Bram Moolenaarbca84a12005-12-14 22:08:35 +0000441
Bram Moolenaar63a121b2005-12-11 21:36:39 +0000442Ex command modifiers: ~
443
444|:keepalt| Do not change the alternate file.
445
446|:noautocmd| Do not trigger autocommand events.
447
448|:sandbox| Execute a command in the sandbox.
449
Bram Moolenaar67fe1a12005-05-22 22:12:58 +0000450
Bram Moolenaarb2c2efa2005-12-13 20:09:08 +0000451Ex command arguments: ~
452
453|++bad| Specify what happens with characters that can't be
454 converted and illegal bytes. (code example by Yasuhiro
455 Matsumoto)
456 Also, when a conversion error occurs or illegal bytes
457 are found include the line number in the error
458 message.
459
460
Bram Moolenaara5792f52005-11-23 21:25:05 +0000461New and extended functions: ~
Bram Moolenaar071d4272004-06-13 20:20:40 +0000462
Bram Moolenaarbac234e2005-01-17 22:21:07 +0000463|add()| append an item to a List
464|append()| append List of lines to the buffer
Bram Moolenaar87b774d2005-07-20 22:04:36 +0000465|browsedir()| dialog to select a directory
466|byteidx()| index of a character (Ilya Sher)
Bram Moolenaarbac234e2005-01-17 22:21:07 +0000467|call()| call a function with List as arguments
Bram Moolenaar572cb562005-08-05 21:35:02 +0000468|complete_add()| add match for 'completefunc'
469|complete_check()| check for key pressed, for 'completefunc'
Bram Moolenaarbac234e2005-01-17 22:21:07 +0000470|copy()| make a shallow copy of a List or Dictionary
471|count()| count nr of times a value is in a List or Dictionary
472|deepcopy()| make a full copy of a List or Dictionary
473|empty()| check if List or Dictionary is empty
Bram Moolenaarb982ca52005-03-28 21:02:15 +0000474|getqflist()| list of quickfix errors (Yegappan Lakshmanan)
Bram Moolenaarbac234e2005-01-17 22:21:07 +0000475|extend()| append one List to another or add items from one
476 Dictionary to another
477|filter()| remove selected items from a List or Dictionary
Bram Moolenaar87b774d2005-07-20 22:04:36 +0000478|finddir()| find a directory in 'path'
479|findfile()| find a file in 'path' (Johannes Zellner)
480|foldtextresult()| the text displayed for a closed fold at line "lnum"
Bram Moolenaarbac234e2005-01-17 22:21:07 +0000481|function()| make a Funcref out of a function name
482|get()| get an item from a List or Dictionary
Bram Moolenaar342337a2005-07-21 21:11:17 +0000483|getbufline()| get a list of lines from a specified buffer
Bram Moolenaar87b774d2005-07-20 22:04:36 +0000484 (Yegappan Lakshmanan)
Bram Moolenaarbfd8fc02005-09-20 23:22:24 +0000485|getcmdtype()| return the current command-line type
486 (Yegappan Lakshmanan)
Bram Moolenaar87b774d2005-07-20 22:04:36 +0000487|getfontname()| get actual font name being used
488|getfperm()| get file permission string (Nikolai Weibull)
489|getftype()| get type of file (Nikolai Weibull)
490|getline()| with second argument: get List with buffer lines
Bram Moolenaarbac234e2005-01-17 22:21:07 +0000491|has_key()| check whether a key appears in a Dictionary
Bram Moolenaardcca87b2005-09-10 19:24:59 +0000492|inputlist()| select an entry from a list
Bram Moolenaarbac234e2005-01-17 22:21:07 +0000493|insert()| insert an item somewhere in a List
494|items()| get List of Dictionary key-value pairs
495|join()| join List items into a String
496|keys()| get List of Dictionary keys
497|len()| number of items in a List or Dictionary
498|map()| change each List or Dictionary item
Bram Moolenaar2a8d1f82005-02-05 21:43:56 +0000499|matchlist()| list with match and submatches of a pattern in a string
Bram Moolenaarbac234e2005-01-17 22:21:07 +0000500|max()| maximum value in a List or Dictionary
501|min()| minimum value in a List or Dictionary
Bram Moolenaar5313dcb2005-02-22 08:56:13 +0000502|mkdir()| create a directory
Bram Moolenaar4be06f92005-07-29 22:36:03 +0000503|printf()| format text
Bram Moolenaar2a8d1f82005-02-05 21:43:56 +0000504|readfile()| read a file into a list of lines
Bram Moolenaarbac234e2005-01-17 22:21:07 +0000505|remove()| remove one or more items from a List or Dictionary
Bram Moolenaar87b774d2005-07-20 22:04:36 +0000506|repeat()| repeat "expr" "count" times (Christophe Poucet)
Bram Moolenaarbac234e2005-01-17 22:21:07 +0000507|reverse()| reverse the order of a List
Bram Moolenaarf75a9632005-09-13 21:20:47 +0000508|searchdecl()| search for declaration of variable
Bram Moolenaarb982ca52005-03-28 21:02:15 +0000509|setqflist()| create a quickfix list (Yegappan Lakshmanan)
Bram Moolenaarbac234e2005-01-17 22:21:07 +0000510|sort()| sort a List
Bram Moolenaar42eeac32005-06-29 22:40:58 +0000511|soundfold()| get the sound-a-like equivalent of a word
Bram Moolenaarbac234e2005-01-17 22:21:07 +0000512|split()| split a String into a List
Bram Moolenaar42eeac32005-06-29 22:40:58 +0000513|spellbadword()| get a badly spelled word
514|spellsuggest()| get suggestions for correct spelling
Bram Moolenaar87b774d2005-07-20 22:04:36 +0000515|string()| string representation of a List or Dictionary
516|system()| filters {input} through a shell command
517|taglist()| get list of matching tags (Yegappan Lakshmanan)
518|tr()| translate characters (Ron Aaron)
Bram Moolenaarbac234e2005-01-17 22:21:07 +0000519|values()| get List of Dictionary values
Bram Moolenaar2a8d1f82005-02-05 21:43:56 +0000520|writefile()| write a list of lines into a file
Bram Moolenaar8299df92004-07-10 09:47:34 +0000521
Bram Moolenaarbee0c5b2005-02-07 22:03:36 +0000522User defined functions can now be loaded automatically from the "autoload"
523directory in 'runtimepath'. See |autoload-functions|.
524
Bram Moolenaar071d4272004-06-13 20:20:40 +0000525
526New autocommand events: ~
527
Bram Moolenaar8299df92004-07-10 09:47:34 +0000528|InsertEnter| starting Insert or Replace mode
529|InsertChange| going from Insert to Replace mode or back
530|InsertLeave| leaving Insert or Replace mode
Bram Moolenaar843ee412004-06-30 16:16:41 +0000531
Bram Moolenaar8299df92004-07-10 09:47:34 +0000532|ColorScheme| after loading a color scheme
Bram Moolenaarbee0c5b2005-02-07 22:03:36 +0000533|QuickFixCmdPre| before :make, :grep et al. (Ciaran McCreesh)
534|QuickFixCmdPost| after :make, :grep et al. (Ciaran McCreesh)
Bram Moolenaar241a8aa2005-12-06 20:04:44 +0000535|SessionLoadPost| after loading a session file. (Yegappan Lakshmanan)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000536
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000537
Bram Moolenaarc0197e22004-09-13 20:26:32 +0000538New items in search patterns: ~
539|/\%d| \%d123 search for character with decimal number
540|/\]| [\d123] idem, in a colletion
541|/\%o| \%o103 search for character with octal number
542|/\]| [\o1o3] idem, in a colletion
543|/\%x| \%x1a search for character with 2 pos. hex number
544|/\]| [\x1a] idem, in a colletion
545|/\%u| \%u12ab search for character with 4 pos. hex number
546|/\]| [\u12ab] idem, in a colletion
547|/\%U| \%U1234abcd search for character with 8 pos. hex number
548|/\]| [\U1234abcd] idem, in a colletion
549 (The above partly by Ciaran McCreesh)
Bram Moolenaar13fcaaf2005-04-15 21:13:42 +0000550|/[[=| [[=a=]] an equivalence class (only for latin1 characters)
551|/[[.| [[.a.]] a collation element (only works with single char)
Bram Moolenaar5313dcb2005-02-22 08:56:13 +0000552
553Nesting |/multi| items no longer is an error when an empty match is possible.
554
555It is now possible to use \{0}, it matches the preceding atom zero times. Not
556useful, just for compatibility.
Bram Moolenaarc0197e22004-09-13 20:26:32 +0000557
558
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000559New Syntax/Indent/FTplugin files: ~
560
561MuPAD source syntax, indent and ftplugin. (Dave Silvia)
562
Bram Moolenaard4755bb2004-09-02 19:12:26 +0000563ABAB/4 syntax file. (Marius van Wyk)
564
565SQL-Informix syntax file. (Dean L Hill)
566
Bram Moolenaar15d0a8c2004-09-06 17:44:46 +0000567PHP compiler plugin. (Doug Kearns)
568
Bram Moolenaar293ee4d2004-12-09 21:34:53 +0000569Sive syntax file. (Nikolai Weibull)
570
Bram Moolenaar0e4d8772005-06-07 21:12:49 +0000571Pascal indent file. (Neil Carter)
572
Bram Moolenaar42eeac32005-06-29 22:40:58 +0000573Many filetype plugins and others from Nikolai Weibull.
574
Bram Moolenaarce0842a2005-07-18 21:58:11 +0000575Xquery syntax file. (Jean-Marc Vanel)
576
Bram Moolenaarb982ca52005-03-28 21:02:15 +0000577Moved all the indent settings from the filetype plugin to the indent file.
578Implemented b:undo_indent to undo indent settings when setting 'filetype' to a
579different value.
580
Bram Moolenaar15d0a8c2004-09-06 17:44:46 +0000581
Bram Moolenaar47136d72004-10-12 20:02:24 +0000582New Keymaps: ~
583
584Sinhala (Sri Lanka) (Harshula Jayasuriya)
585
586
Bram Moolenaar15d0a8c2004-09-06 17:44:46 +0000587New message translations: ~
588
589The Ukranian messages are now also available in cp1251.
590
Bram Moolenaar5313dcb2005-02-22 08:56:13 +0000591Irish message translations. (Kevin Patrick Scannell)
592
Bram Moolenaar05159a02005-02-26 23:04:13 +0000593Vietnamese message translations and menu. (Phan Vinh Thinh)
594
Bram Moolenaar071d4272004-06-13 20:20:40 +0000595
Bram Moolenaarf4b8e572004-06-24 15:53:16 +0000596Others: ~
597
598Mac: Add the selection type to the clipboard, so that Block, line and
599character selections can be used between two Vims. (Eckehard Berns)
600Also fixes the problem that setting 'clipboard' to "unnamed" breaks using
601"yyp".
Bram Moolenaar071d4272004-06-13 20:20:40 +0000602
Bram Moolenaara5792f52005-11-23 21:25:05 +0000603Mac: GUI font selector. (Peter Cucka)
Bram Moolenaar592e0a22004-07-03 16:05:59 +0000604
Bram Moolenaar5313dcb2005-02-22 08:56:13 +0000605Mac: support for multi-byte characters. (Da Woon Jung)
606
Bram Moolenaar900b4d72005-12-12 22:05:50 +0000607Mac: Support the xterm mouse in the non-GUI version.
Bram Moolenaar567e4de2004-12-31 21:01:02 +0000608
Bram Moolenaar46c9c732004-12-12 11:37:09 +0000609Mac: better integration with Xcode. Post a fake mouse-up event after the odoc
610event and the drag receive handler to work around a stall after Vim loads a
611file. Fixed an off-by-one line number error. (Da Woon Jung)
612
Bram Moolenaar293ee4d2004-12-09 21:34:53 +0000613Added the t_SI and t_EI escape sequences for starting and ending Insert mode.
Bram Moolenaar900b4d72005-12-12 22:05:50 +0000614GUI font selector for Motif. (Marcin Dalecki)
615
616Nicer toolbar buttons for Motif. (Marcin Dalecki)
617
618Mnemonics for the Motif find/replace dialog. (Marcin Dalecki)
619
Bram Moolenaar293ee4d2004-12-09 21:34:53 +0000620To be used to set the cursor shape to a bar or a block. No default values,
621they are not supported by termcap/terminfo.
622
Bram Moolenaarb5bf5b82004-12-24 14:35:23 +0000623Autocommands can be defined local to a buffer. This means they will also work
624when the buffer does not have a name or no specific name. See
625|autocmd-buflocal|. (Yakov Lerner)
626
Bram Moolenaar19a09a12005-03-04 23:39:37 +0000627For xterm most combinations of modifiers with function keys are recognized.
628|xterm-modifier-keys|
629
Bram Moolenaarae5bce12005-08-15 21:41:48 +0000630When 'verbose' is set the output of ":highlight" will show where a highlight
631item was last set.
Bram Moolenaare344bea2005-09-01 20:46:49 +0000632When 'verbose' is set the output of the ":map", ":abbreviate", ":command",
633":function" and ":autocmd" commands will show where it was last defined.
634(Yegappan Lakshmanan)
Bram Moolenaarae5bce12005-08-15 21:41:48 +0000635
Bram Moolenaardd2436f2005-09-05 22:14:46 +0000636":function /pattern" lists functions matching the pattern.
637
Bram Moolenaarf75a9632005-09-13 21:20:47 +0000638"1gd" can be used like "gd" but ignores matches in a {} block that ends before
639the cursor position. Likewise for "1gD" and "gD".
640
Bram Moolenaar4463f292005-09-25 22:20:24 +0000641'scrolljump' can be set to a negative number to scroll a percentage of the
642window height.
643
Bram Moolenaar07d4d732005-10-03 22:04:08 +0000644The |v:scrollstart| variable has been added to help finding the location in
645your script that causes the hit-enter prompt.
646
Bram Moolenaar63a121b2005-12-11 21:36:39 +0000647To make it possible to handle the situation that a file is being edited that
648is already being edited by another Vim instance, the |SwapExists| event has
649been added. The |v:swapname|, |v:swapchoice| and |v:swapcommand| variables
650can be used, for example to use the |client-server| functionality to bring the
651other Vim to the foreground.
Bram Moolenaar146522e2005-12-16 21:55:46 +0000652When starting Vim with a "-t tag" argument, there is an existing swapfile and
653the user selects "quit" or "abort" then exit Vim.
Bram Moolenaar63a121b2005-12-11 21:36:39 +0000654
Bram Moolenaar071d4272004-06-13 20:20:40 +0000655==============================================================================
656IMPROVEMENTS *improvements-7*
657
Bram Moolenaarf4b8e572004-06-24 15:53:16 +0000658":helpgrep" accepts a language specifier after the pattern: "pat@it".
659
Bram Moolenaar8299df92004-07-10 09:47:34 +0000660Move the help for printing to a separate help file. It's quite a lot now.
661
Bram Moolenaara5792f52005-11-23 21:25:05 +0000662When ":silent" is used and a backwards range is given for an Ex command the
663range is swapped automatically instead of asking if that is OK.
664
Bram Moolenaar8bf59b92005-03-06 23:40:56 +0000665The pattern matching code was changed from a recursive function to an
666iterative mechanism. This avoids out-of-stack errors. State is stored in
667allocated memory, running out of memory can always be detected. Allows
668matching more complex things, but Vim may seem to hang while doing that.
669
Bram Moolenaarf4b8e572004-06-24 15:53:16 +0000670":breakadd here" and ":breakdel here" can be used to set or delete a
671breakpoint at the cursor.
672
Bram Moolenaar843ee412004-06-30 16:16:41 +0000673The tutor was updated to make it simpler to use and added text to explain a
674few more important commands. Used ideas from Gabriel Zachmann.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000675
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000676Unix: When libcall() fails obtain an error message with dlerror() and display
677it. (Johannes Zellner)
678
Bram Moolenaarcc016f52005-12-10 20:23:46 +0000679Mac and Cygwin: When editing an existing file make the file name the same case
680of the edited file. Thus when typing ":e os_UNIX.c" the file name becomes
681"os_unix.c".
682
Bram Moolenaar592e0a22004-07-03 16:05:59 +0000683Added "nbsp" in 'listchars'. (David Blanchet)
684
Bram Moolenaar21cf8232004-07-16 20:18:37 +0000685Added the "acwrite" value for the 'buftype' option. This is for a buffer that
Bram Moolenaara5792f52005-11-23 21:25:05 +0000686does not have a name that refers to a file and is written with BufWriteCmd
Bram Moolenaar21cf8232004-07-16 20:18:37 +0000687autocommands.
688
Bram Moolenaar325b7a22004-07-05 15:58:32 +0000689For lisp indenting and matching parenthesis: (Sergey Khorev)
690- square brackets are recognized properly
691- #\(, #\), #\[ and #\] are recognized as character literals
692- Lisp line comments (delimited by semicolon) are recognized
693
Bram Moolenaar89cb5e02004-07-19 20:55:54 +0000694Added the "count" argument to match(), matchend() and matchstr(). (Ilya Sher)
695
Bram Moolenaar5eb86f92004-07-26 12:53:41 +0000696winnr() takes an optional "$" and "#" arguments. (Nikolai Weibull, Yegappan
697Lakshmanan)
698
699Added 'n' flag to search(): don't move the cursor. (Nikolai Weibull)
700
Bram Moolenaard4755bb2004-09-02 19:12:26 +0000701When uncompressing fails in the gzip plugin, give an error message but don't
702delete the raw text. Helps if the file has a .gz extension but is not
703actually compressed. (Andrew Pimlott)
704
705When C, C++ or IDL syntax is used, may additionally load doxygen syntax.
706Also support setting the filetype to "cdoxygen" for C plus doxygen syntax.
707(Michael Geddes)
708
709The ":registers" command now displays multi-byte characters properly.
710
711VMS: In the usage message mention that a slash can be used to make a flag
712upper case. Add color support to the builtin vt320 terminal codes.
713(Zoltan Arpadffy)
714
Bram Moolenaar15d0a8c2004-09-06 17:44:46 +0000715For the '%' item in 'viminfo', allow a number to set a maximum for the number
716of buffers.
717
Bram Moolenaarb5bf5b82004-12-24 14:35:23 +0000718The 'statusline' option can be local to the window, so that each window can
719have a different value. (partly by Yegappan Lakshmanan)
720
Bram Moolenaar3fdfa4a2004-10-07 21:02:47 +0000721When a file looks like a shell script, check for an "exec" command that starts
722the tcl interpreter. (suggested by Alexios Zavras)
723
724Support conversion between utf-8 and latin9 (iso-8859-15) internally, so that
725digraphs still work when iconv is not available.
726
Bram Moolenaar293ee4d2004-12-09 21:34:53 +0000727When a session file is loaded while editing an unnamed, empty buffer that
728buffer is wiped out. Avoids that there is an unused buffer in the buffer
729list.
730
731Win32: When libintl.dll supports bind_textdomain_codeset(), use it.
732(NAKADAIRA Yukihiro)
733
734When foldtext() finds no text after removing the comment leader, use the
735second line of the fold. Helps for C-style /* */ comments where the first
736line is just "/*".
737
Bram Moolenaar1cd871b2004-12-19 22:46:22 +0000738When editing the same file from two systems (e.g., Unix and MS-Windows) there
739mostly was no warning for an existing swap file, because the name of the
740edited file differs (e.g., y:\dir\file vs /home/me/dir/file). Added a flag to
741the swap file to indicate it is in the same directory as the edited file. The
742used path then doesn't matter and the check for editing the same file is much
743more reliable.
744
Bram Moolenaar900b4d72005-12-12 22:05:50 +0000745Unix: When editing a file through a symlink the swap file would use the name
746of the symlink. Now use the name of the actual file, so that editing the same
747file twice is detected. (suggestions by Stefano Zacchiroli and James Vega)
748
Bram Moolenaar1cd871b2004-12-19 22:46:22 +0000749Client-server communication now supports 'encoding'. When setting 'encoding'
750in a Vim server to "utf-8", and using "vim --remote fname" in a console,
751"fname" is converted from the console encoding to utf-8. Also allows Vims
752with different 'encoding' settings to exchange messages.
753
Bram Moolenaar86b68352004-12-27 21:59:20 +0000754Internal: Changed ga_room into ga_maxlen, so that it doesn't need to be
755incremented/decremented each time.
756
Bram Moolenaar2079a602005-01-04 21:43:22 +0000757Included a few improvements for Motif from Marcin Dalecki. Draw label
Bram Moolenaar567e4de2004-12-31 21:01:02 +0000758contents ourselves to make them handle fonts in a way configurable by Vim and
759a bit less dependent on the X11 font management.
760
Bram Moolenaar49cd9572005-01-03 21:06:01 +0000761When a register is empty it is not stored in the viminfo file.
762
Bram Moolenaar8c711452005-01-14 21:53:12 +0000763Removed the tcltags script, it's obsolete.
764
Bram Moolenaar67fe1a12005-05-22 22:12:58 +0000765":redir @*>>" and ":redir @+>>" append to the clipboard. Better check for
Bram Moolenaar5313dcb2005-02-22 08:56:13 +0000766invalid characters after the register name. |:redir|
767
768":redir => variable" and ":redir =>> variable" write or append to a variable.
769(Yegappan Lakshmanan) |:redir|
Bram Moolenaardcaf10e2005-01-21 11:55:25 +0000770
Bram Moolenaar231334e2005-07-25 20:46:57 +0000771":redir @{a-z}>>" appends to register a to z. (Yegappan Lakshmanan)
Bram Moolenaar67fe1a12005-05-22 22:12:58 +0000772
Bram Moolenaar54ee7752005-05-31 22:22:17 +0000773The 'verbosefile' option can be used to log messages in a file. Verbose
774messages are not displayed then. The "-V{filename}" argument can be used to
775log startup messages.
776
Bram Moolenaardcaf10e2005-01-21 11:55:25 +0000777":let g:" lists global variables.
778":let b:" lists buffer-local variables.
779":let w:" lists window-local variables.
780":let v:" lists Vim variables.
781
Bram Moolenaard438e912005-01-31 19:21:46 +0000782The stridx() and strridx() functions take a third argument, where to start
783searching. (Yegappan Lakshmanan)
Bram Moolenaarb71ec9f2005-01-25 22:22:02 +0000784
Bram Moolenaar67fe1a12005-05-22 22:12:58 +0000785The getreg() function takes an extra argument to be able to get the expression
786for the '=' register instead of the result of evaluating it.
787
788The setline() function can take a List argument to set multiple lines. When
789the line number is just below the last line the line is appended.
790
Bram Moolenaarbee0c5b2005-02-07 22:03:36 +0000791g CTRL-G also shows the number of characters if it differs from the number of
792bytes.
793
Bram Moolenaar5313dcb2005-02-22 08:56:13 +0000794Completion for ":debug" and entering an expression for the '=' register. Skip
795":" between range and command name. (Peter winters)
796
797CTRL-Q in Insert mode now works like CTRL-V by default. Previously it was
798ignored.
799
800When "beep" is included in 'debug' a function or script that causes a beep
801will result in a message with the source of the error.
802
Bram Moolenaar05159a02005-02-26 23:04:13 +0000803When completing buffer names, match with "\(^\|[\/]\)" instead of "^", so that
804":buf stor<Tab>" finds both "include/storage.h" and "storage/main.c".
805
806To count items (pattern matches) without changing the buffer the 'n' flag has
807been added to |:substitute|. See |count-items|.
808
Bram Moolenaar038eb0e2005-02-27 22:43:26 +0000809The "screen.linux" $TERM name is recognized to set the default for
Bram Moolenaar482aaeb2005-09-29 18:26:07 +0000810'background' to "dark". (Ciaran McCreesh) Also for "cygwin" and "putty".
Bram Moolenaar19a09a12005-03-04 23:39:37 +0000811
812The |FileChangedShell| autocommand event can now use the |v:fcs_reason|
813variable that specifies what triggered the event. |v:fcs_choice| can be used
814to reload the buffer or ask the user what to do.
Bram Moolenaar038eb0e2005-02-27 22:43:26 +0000815
Bram Moolenaar8bf59b92005-03-06 23:40:56 +0000816Not all modifiers were recognized for xterm function keys. Added the
817possibility in term codes to end in ";*X" or "O*X", where X is any character
818and the * stands for the modifier code.
819Added the <xUp>, <xDown>, <xLeft> and <xRight> keys, to be able to recognize
820the two forms that xterm can send their codes in and still handle all possible
821modifiers.
822
Bram Moolenaarc0761132005-03-18 20:30:32 +0000823getwinvar() now also works to obtain a buffer-local option from the specified
824window.
825
Bram Moolenaarb982ca52005-03-28 21:02:15 +0000826Added the "%s" item to 'errorformat'. (Yegappan Lakshmanan)
827
Bram Moolenaar34cdc3e2005-05-18 22:24:46 +0000828GTK GUI: use the GTK file dialog when it's available. Mix from patches by
829Grahame Bowland and Evan Webb.
830
Bram Moolenaar9ba0eb82005-06-13 22:28:56 +0000831Added ":scriptnames" to bugreport.vim, so that we can see what plugins were
832used.
833
Bram Moolenaar520470a2005-06-16 21:59:56 +0000834Win32: If the user changes the setting for the number of lines a scroll wheel
835click scrolls it is now used immediately. Previously Vim would need to be
836restarted.
837
Bram Moolenaarb2ec3072005-06-17 22:02:20 +0000838When using @= in an expression the value is expression @= contains. ":let @=
839= value" can be used to set the register contents.
840
Bram Moolenaar51bab742005-07-08 22:31:03 +0000841A ! can be added to ":popup" to have the popup menu appear at the mouse
842pointer position instead of the text cursor.
843
Bram Moolenaard8e9bb22005-07-09 21:14:46 +0000844The table with encodings has been expanded with many MS-Windows codepages,
845such as cp1250 and cp737, so that these can also be used on Unix without
846prepending "8bit-".
Bram Moolenaarae5bce12005-08-15 21:41:48 +0000847When an encoding name starts with "microsoft-cp" ignore the "microsoft-" part.
Bram Moolenaard8e9bb22005-07-09 21:14:46 +0000848
849Added the "customlist" completion argument to a user-defined command. The
850user-defined completion function should return the completion candidates as a
Bram Moolenaar231334e2005-07-25 20:46:57 +0000851Vim List and the returned results are not filtered by Vim. (Yegappan
852Lakshmanan)
Bram Moolenaard8e9bb22005-07-09 21:14:46 +0000853
Bram Moolenaar342337a2005-07-21 21:11:17 +0000854Win32: Balloons can have multiple lines if common controls supports it.
855(Sergey Khorev)
856
Bram Moolenaar231334e2005-07-25 20:46:57 +0000857The 's' flag is added to the search() and searchpair() function to set the
858' mark if the cursor is moved. (Yegappan Lakshmanan)
859
Bram Moolenaar0be6e642005-08-04 21:32:22 +0000860For 'errorformat' it was not possible to have a file name that contains the
861character that follows after "%f". For example, in "%f:%l:%m" the file name
862could not contain ":". Now include the first ":" where the rest of the
863pattern matches. In the example a ":" not followed by a line number is
864included in the file name. (suggested by Emanuele Giaquinta)
865
Bram Moolenaar90cfdbe2005-08-12 19:59:19 +0000866For command-line completion the matches for various types of arguments are now
867sorted: user commands, variables, syntax names, etc.
868
Bram Moolenaara2036d22005-08-23 21:04:20 +0000869When no locale is set, thus using the "C" locale, Vim will work with latin1
Bram Moolenaara5792f52005-11-23 21:25:05 +0000870characters, using its own isupper()/toupper()/etc. functions.
Bram Moolenaara2036d22005-08-23 21:04:20 +0000871
Bram Moolenaarac6e65f2005-08-29 22:25:38 +0000872When using an rxvt terminal emulator guess the value of 'background' using the
873COLORFGBG environment variable. (Ciaran McCreesh)
874
875Also support t_SI and t_EI on Unix with normal features. (Ciaran McCreesh)
876
Bram Moolenaardcca87b2005-09-10 19:24:59 +0000877When 'foldcolumn' is one then put as much info in it as possible. This allows
878closing a fold with the mouse by clicking on the '-'.
879
Bram Moolenaarbfd8fc02005-09-20 23:22:24 +0000880input() takes an optional completion argument to specify the type of
881completion supported for the input. (Yegappan Lakshmanan)
882
Bram Moolenaar4463f292005-09-25 22:20:24 +0000883"dp" works with more than two buffers in diff mode if there is only one where
884'modifiable' is set.
885
Bram Moolenaar69e0ff92005-09-30 21:23:56 +0000886When the 'include' option contains \zs the file name found is what is being
887matched from \zs to the end or \ze. Useful to pass more to 'includeexpr'.
888
Bram Moolenaar07d4d732005-10-03 22:04:08 +0000889Loading plugins on startup now supports subdirectories in the plugin
890directory. |load-plugins|
891
Bram Moolenaard5cdbeb2005-10-10 20:59:28 +0000892In the foldcolumn always show the '+' for a closed fold, so that it can be
893opened easily. It may overwrite another character, esp. if 'foldcolumn' is 1.
894
895It is now possible to get the W10 message again by setting 'readonly'. Useful
896in the FileChangedRO autocommand when checking out the file fails.
897
Bram Moolenaar784c6142005-10-11 20:34:58 +0000898Unix: When open() returns EFBIG give an appropriate message.
899
Bram Moolenaar241a8aa2005-12-06 20:04:44 +0000900":mksession" sets the SessionLoad variable to notify plugins. A modeline is
901added to the session file to set 'filetype' to "vim".
902
Bram Moolenaard5bc83f2005-12-07 21:07:59 +0000903In the ATTENTION prompt put the "Delete it" choice before "Quit" to make it
904more logical. (Robert Webb)
905
Bram Moolenaar63a121b2005-12-11 21:36:39 +0000906When appending to a file while the buffer has no name the name of the appended
907file would be used for the current buffer. But the buffer contents is
908actually different from the file content. Don't set the file name, unless the
909'P' flag is present in 'cpoptions'.
910
Bram Moolenaar900b4d72005-12-12 22:05:50 +0000911When starting to edit a new file and the directory for the file doesn't exist
912then Vim will report "[New DIRECTORY]" instead of "[New File] to give the user
913a hint that something might be wrong.
914
Bram Moolenaarbca84a12005-12-14 22:08:35 +0000915Win32: Preserve the hidden attribute of the viminfo file.
916
Bram Moolenaar146522e2005-12-16 21:55:46 +0000917In Insert mode CTRL-A didn't keep the last inserted text when using CTRL-O and
918then a cursor key. Now keep the previously inserted text if nothing is
919inserted after the CTRL-O. Allows using CTRL-O commands to move the cursor
920without losing the last inserted text.
Bram Moolenaarbca84a12005-12-14 22:08:35 +0000921
Bram Moolenaarf4cd3e82005-12-22 22:47:02 +0000922The exists() function now supports checking for autocmd group definition
Bram Moolenaarcc984262005-12-23 22:19:46 +0000923and for supported autocommand events. (Yegappan Lakshmanan)
Bram Moolenaara9b1e742005-12-19 22:14:58 +0000924
Bram Moolenaar4770d092006-01-12 23:22:24 +0000925Allow using ":global" in the sandbox, it doesn't do anything harmful by
926itself.
927
Bram Moolenaar071d4272004-06-13 20:20:40 +0000928==============================================================================
929COMPILE TIME CHANGES *compile-changes-7*
930
Bram Moolenaar2079a602005-01-04 21:43:22 +0000931Dropped the support for the BeOS and Amiga GUI. They were not maintained and
932probably didn't work. If you want to work on this: get the Vim 6.x version
933and merge it back in.
934
Bram Moolenaarab79bcb2004-07-18 21:34:53 +0000935Mac: "make" now creates the Vim.app directory and "make install" copies it to
936its final destination. (Raf)
937
938Mac: Made it possible to compile with Motif, Athena or GTK without tricks and
939still being able to use the MacRoman conversion. Added the os_mac_conv.c
940file.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000941
Bram Moolenaar5313dcb2005-02-22 08:56:13 +0000942When running the tests and one of them fails to produce "test.out" the
943following tests are still executed. This helps when running out of memory.
944
Bram Moolenaarf461c8e2005-06-25 23:04:51 +0000945When compiling with EXITFREE defined and the ccmalloc library it is possible
946to detect memory leaks. Some memory will always reported as leaked, such as
947allocated by X11 library functions and the memory allocated in alloc_cmdbuff()
948to store the ":quit" command.
949
Bram Moolenaar231334e2005-07-25 20:46:57 +0000950Moved the code for printing to src/hardcopy.c.
951
952Moved some code from main() to separate functions to make it easier to see
953what is being done. Use a structure to avoid a lot of arguments to the
954functions.
955
956Moved unix_expandpath() to misc1.c, so that it can also be used by os_mac.c
957without copying the code.
958
Bram Moolenaare344bea2005-09-01 20:46:49 +0000959Mac: When running "make install" the runtime files are installed as for Unix.
960Avoids that too many files are copied. When running "make" a link to the
961runtime files is created to avoid a recursive copy that takes much time.
962
Bram Moolenaar071d4272004-06-13 20:20:40 +0000963==============================================================================
964BUG FIXES *bug-fixes-7*
965
Bram Moolenaarf4b8e572004-06-24 15:53:16 +0000966When using PostScript printing on MS-DOS the default 'printexpr' used "lpr"
967instead of "copy". When 'printdevice' was empty the copy command did not
968work. Use "LPT1" then.
969
970The GTK font dialog uses a font size zero when the font name doesn't include a
971size. Use a default size of 10.
972
973This example in the documentation didn't work:
974 :e `=foo . ".c" `
975Skip over the expression in `=expr` when looking for comments, |, % and #.
976
977When ":helpgrep" doesn't find anything there is no error message.
978
979"L" and "H" did not take closed folds into account.
980
981Win32: The "-P title" argument stopped at the first title that matched, even
982when it doesn't support MDI.
983
984Mac GUI: CTRL-^ and CTRL-@ did not work.
985
986"2daw" on "word." at the end of a line didn't include the preceding white
987space.
988
989Win32: Using FindExecutable() doesn't work to find a program. Use
990SearchPath() instead. For executable() use $PATHEXT when the program searched
991for doesn't have an extension.
992
993When 'virtualedit' is set, moving the cursor up after appending a character
994may move it to a different column. Was caused by auto-formatting moving the
995cursor and not putting it back where it was.
996
997When indent was added automatically and then moving the cursor, the indent was
998not deleted (like when pressing ESC). The "I" flag in 'cpoptions' can be used
999to make it work the old way.
1000
Bram Moolenaarf4b8e572004-06-24 15:53:16 +00001001When opening a command-line window, 'textwidth' gets set to 78 by the Vim
1002filetype plugin. Reset 'textwidth' to 0 to avoid lines are broken.
1003
1004After using cursor(line, col) moving up/down doesn't keep the same column.
1005
1006Win32: Borland C before 5.5 requires using ".u." for LowPart and HighPart
1007fields. (Walter Briscoe)
Bram Moolenaar071d4272004-06-13 20:20:40 +00001008
Bram Moolenaar843ee412004-06-30 16:16:41 +00001009On Sinix SYS_NMLN isn't always defined. Define it ourselves. (Cristiano De
1010Michele)
1011
Bram Moolenaar325b7a22004-07-05 15:58:32 +00001012Printing with PostScript may keep the printer waiting for more. Append a
1013CTRL-D to the printer output. (Mike Williams)
1014
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00001015When converting a string with a hex or octal number the leading '-' was
1016ignored. ":echo '-05' + 0" resulted in 5 instead of -5.
1017
1018Using "@:" to repeat a command line didn't work when it contains control
Bram Moolenaar90cfdbe2005-08-12 19:59:19 +00001019characters. Also remove "'<,'>" when in Visual mode to avoid that it appears
1020twice.
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00001021
Bram Moolenaar21cf8232004-07-16 20:18:37 +00001022When using file completion for a user command, it would not expand environment
1023variables like for a regular command with a file argument.
1024
1025'cindent': When the argument of a #define looks like a C++ class the next line
1026is indented too much.
1027
1028When 'comments' includes multi-byte characters inserting the middle part and
1029alignment may go wrong. 'cindent' also suffers from this for right-aligned
1030items.
1031
Bram Moolenaar05159a02005-02-26 23:04:13 +00001032Win32: when 'encoding' is set to "utf-8" getenv() still returns strings in the
1033active codepage. Convert to utf-8. Also for $HOME.
1034
Bram Moolenaarab79bcb2004-07-18 21:34:53 +00001035The default for 'helplang' was "zh" for both "zh_cn" and "zh_tw". Now use
1036"cn" or "tw" as intended.
1037
Bram Moolenaar5eb86f92004-07-26 12:53:41 +00001038When 'bin' is set and 'eol' is not set then line2byte() added the line break
1039after the last line while it's not there.
1040
1041Using foldlevel() in a WinEnter autocommand may not work. Noticed when
1042resizing the GUI shell upon startup.
1043
1044Python: Using buffer.append(f.readlines()) didn't work. Allow appending a
1045string with a trailing newline. The newline is ignored.
1046
Bram Moolenaar269ec652004-07-29 08:43:53 +00001047When using the ":saveas f2" command for buffer "f1", the Buffers menu would
1048contain "f2" twice, one of them leading to "f1". Also trigger the BufFilePre
1049and BufFilePost events for the alternate buffer that gets the old name.
1050
Bram Moolenaard4755bb2004-09-02 19:12:26 +00001051strridx() did not work well when the needle is empty. (Ciaran McCreesh)
1052
1053GTK: Avoid a potential hang in gui_mch_wait_for_chars() when input arrives
1054just before it is invoked
1055
1056VMS: Occasionally CR characters were inserted in the file. Expansion of
1057environment variables was not correct. (Zoltan Arpadffy)
1058
1059UTF-8: When 'delcombine' is set "dw" only deleted the last combining character
1060from the first character of the word.
1061
1062When using ":sball" in an autocommand only the filetype in one buffer was
1063detected. Reset did_filetype in enter_buffer().
1064
1065When using ":argdo" and the window already was at the first argument index,
1066but not actually editing it, the current buffer would be used instead.
1067
Bram Moolenaar15d0a8c2004-09-06 17:44:46 +00001068When ":next dir/*" includes many matches, adding the names to the argument
1069list may take an awful lot of time and can't be interrupted. Allow
1070interrupting this.
1071
1072When editing a file that was already loaded in a buffer, modelines were not
1073used. Now window-local options in the modeline are set. Buffer-local options
1074and global options remain unmodified.
1075
1076Win32: When 'encoding' is set to "utf-8" in the vimrc file, files from the
1077command line with non-ASCII characters are not used correctly. Recode the
1078file names when 'encoding' is set, using the Unicode command line.
1079
Bram Moolenaarc0197e22004-09-13 20:26:32 +00001080Win32 console: When the default for 'encoding' ends up to be "latin1", the
1081default value of 'isprint' was wrong.
1082
1083When an error message is given while waiting for a character (e.g., when an
1084xterm reports the number of colors), the hit-enter prompt overwrote the last
1085line. Don't reset msg_didout in normal_cmd() for K_IGNORE.
1086
Bram Moolenaar3fdfa4a2004-10-07 21:02:47 +00001087Mac GUI: Shift-Tab didn't work.
1088
1089When defining tooltip text, don't translate terminal codes, since it's not
1090going to be used like a command.
1091
1092GTK 2: Check the tooltip text for valid utf-8 characters to avoid getting a
1093GTK error. Invalid characters may appear when 'encoding' is changed.
1094
1095GTK 2: Add a safety check for invalid utf-8 sequences, they can crash pango.
1096
1097Win32: When 'encoding' is changed while starting up, use the Unicode command
1098line to convert the file arguments to 'encoding'. Both for the GUI and the
1099console version.
1100
1101Win32 GUI: latin9 text (iso-8859-15) was not displayed correctly, because
1102there is no codepage for latin9. Do our own conversion from latin9 to UCS2.
1103
Bram Moolenaar7b0294c2004-10-11 10:16:09 +00001104When two versions of GTK+ 2 are installed it was possible to use the header
1105files from one and the library from the other. Use GTK_LIBDIR to put the
1106directory for the library early in the link flags.
1107
1108With the GUI find/replace dialog a replace only worked if the pattern was
1109literal text. Now it works for any pattern.
1110
Bram Moolenaar293ee4d2004-12-09 21:34:53 +00001111When 'equalalways' is set and 'eadirection' is "hor", ":quit" would still
1112cause equalizing window heights in the vertical direction.
1113
1114When ":emenu" is used in a startup script the command was put in the typeahead
1115buffer, causing a prompt for the crypt key to be messed up.
1116
1117Mac OS/X: The default for 'isprint' included characters 128-160, causes
1118problems for Terminal.app.
1119
1120When a syntax item with "containedin" is used, it may match in the start or
1121end of a region with a matchgroup, while this doesn't happen for a "contains"
1122argument.
1123
1124When a transparent syntax items matches in another item where the highlighting
1125has already stopped (because of a he= argument), the highlighting would come
1126back.
1127
1128When cscope is used to set the quickfix error list, it didn't get set if there
1129was only one match. (Sergey Khorev)
1130
1131When 'confirm' is set and using ":bdel" in a modified buffer, then selecting
1132"cancel", would still give an error message.
1133
1134The PopUp menu items that started Visual mode didn't work when not in Normal
1135mode. Switching between selecting a word and a line was not possible.
1136
1137Win32: The keypad decimal point always resulted in a '.', while on some
1138keyboards it's a ','. Use MapVirtualKey(VK_DECIMAL, 2).
1139
1140Removed unused function DisplayCompStringOpaque() from gui_w32.c
1141
1142In Visual mode there is not always an indication whether the line break is
1143selected or not. Highlight the character after the line when the line break
1144is included, e.g., after "v$o".
1145
1146GTK: The <F10> key can't be mapped, it selects the menu. Disable that with a
1147GTK setting and do select the menu when <F10> isn't mapped. (David Necas)
1148
1149After "Y" '[ and '] were not at start/end of the yanked text.
1150
1151When a telnet connection is dropped Vim preserves files and exits. While
1152doing that a SIGHUP may arrive and disturbe us, thus ignore it. (Scott
Bram Moolenaar46c9c732004-12-12 11:37:09 +00001153Anderson) Also postpone SIGHUP, SIGQUIT and SIGTERM until it's safe to
1154handle. Added handle_signal().
1155
Bram Moolenaar1cd871b2004-12-19 22:46:22 +00001156When completing a file name on the command line backslashes are required for
1157white space. Was only done for a space, not for a Tab.
1158
1159When configure could not find a terminal library, compiling continued for a
1160long time before reporting the problem. Added a configure check for tgetent()
1161being found in a library.
1162
1163When the cursor is on the first char of the last line a ":g/pat/s///" command
1164may cause the cursor to be displayed below the text.
1165
1166Win32: Editing a file with non-ASCII characters doesn't work when 'encoding'
1167is "utf-8". use _wfullpath() instead of _fullpath(). (Yu-sung Moon)
1168
1169When recovering the 'fileformat' and 'fileencoding' were taken from the
1170original file instead of from the swapfile. When the file didn't exist, was
1171empty or the option was changed (e.g., with ":e ++fenc=cp123 file") it could
1172be wrong. Now store 'fileformat' and 'fileencoding' in the swapfile and use
1173the values when recovering.
1174
1175":bufdo g/something/p" overwrites each last printed text line with the file
1176message for the next buffer. Temporarily clear 'shortmess' to avoid that.
1177
Bram Moolenaarb5bf5b82004-12-24 14:35:23 +00001178Win32: Cannot edit a file starting with # with --remote. Do escape % and #
1179when building the ":drop" command.
1180
Bram Moolenaar86b68352004-12-27 21:59:20 +00001181A comment or | just after a expresion-backtick argument was not recognized.
1182E.g. in :e `="foo"`"comment.
1183
Bram Moolenaar567e4de2004-12-31 21:01:02 +00001184"(" does not stop at an empty sentence (single dot and white space) while ")"
1185does. Also breaks "das" on that dot.
1186
1187When doing "yy" with the cursor on a TAB the ruler could be wrong and "k"
1188moved the cursor to another column.
1189
1190When 'commentstring' is '"%s' and there is a double quote in the line a double
1191quote before the fold marker isn't removed in the text displayed for a closed
1192fold.
1193
1194In Visual mode, when 'bin' and 'eol' set, g CTRL-G counted the last line
1195break, resulting in "selected 202 of 201 bytes".
1196
Bram Moolenaar2079a602005-01-04 21:43:22 +00001197Motif: fonts were not used for dialog components. (Marcin Dalecki)
Bram Moolenaar567e4de2004-12-31 21:01:02 +00001198
Bram Moolenaar49cd9572005-01-03 21:06:01 +00001199Motif: After using a toolbar button the keyboard focus would be on the toolbar
Bram Moolenaar2079a602005-01-04 21:43:22 +00001200(Lesstif problem). (Marcin Dalecki)
Bram Moolenaar49cd9572005-01-03 21:06:01 +00001201
Bram Moolenaar1c2fda22005-01-02 11:43:19 +00001202When using "y<C-V>`x" where mark x is in the first column, the last line was
1203not included.
1204
1205Not all test scripts work properly on MS-Windows when checked out from CVS.
1206Use a Vim command to fix all fileformats to dos before executing the tests.
1207
1208When using ":new" and the file fits in the window, lines could still be above
1209the window. Now remove empty lines instead of keeping the relative position.
1210
Bram Moolenaar3d60ec22005-01-05 22:19:46 +00001211Cmdline completion didn't work after ":let var1 var<Tab>".
1212
Bram Moolenaarb7d6e722005-01-09 21:22:45 +00001213When using ":startinsert" or ":startreplace" when already in Insert mode
1214(possible when using CTRL-R =), pressing Esc would directly restart Insert
1215mode. (Peter Winters)
1216
Bram Moolenaar31c67ef2005-01-11 21:34:41 +00001217"2daw" didn't work at end of file if the last word is a single character.
1218
Bram Moolenaar8c711452005-01-14 21:53:12 +00001219Completion for ":next a'<Tab>" put a backslash before single quote, but it was
1220not removed when editing a file. Now halve backslashes in save_patterns().
Bram Moolenaar798c5a72005-01-16 22:06:30 +00001221Also fix expanding a file name with the shell that contains "\'".
Bram Moolenaar8c711452005-01-14 21:53:12 +00001222
Bram Moolenaarb71ec9f2005-01-25 22:22:02 +00001223When doing "1,6d|put" only "fewer lines" was reported. Now a following "more
1224lines" overwrites the message.
1225
1226Configure could not handle "-Dfoo=long\ long" in the TCL config output.
1227
Bram Moolenaarb2956cd2005-01-27 14:42:53 +00001228When searching backwards, using a pattern that matches a newline and uses \zs
1229after that, didn't find a match. Could also get a hang or end up in the right
1230column in the wrong line.
1231
Bram Moolenaard438e912005-01-31 19:21:46 +00001232When $LANG is "sl" for slovenian, the slovak menu was used, since "slovak"
1233starts with "sl".
1234
1235When 'paste' is set in the GUI the Paste toolbar button doesn't work. Clear
1236'paste' when starting the GUI.
1237
Bram Moolenaarf5836682005-02-02 23:09:45 +00001238A message about a wrong viminfo line included the trailing NL.
1239
Bram Moolenaar2a8d1f82005-02-05 21:43:56 +00001240When 'paste' is set in the GUI the toolbar button doesn't work in Insert mode.
1241Use ":exe" in menu.vim to avoid duplicating the commands, instead of using a
1242mapping.
1243
1244Treat "mlterm" as an xterm-like terminal. (Seiichi Sato)
1245
1246":z.4" and ":z=4" didn't work Vi compatible.
1247
Bram Moolenaarbee0c5b2005-02-07 22:03:36 +00001248When sourcing a file, editing it and sourcing it again, it could appear twice
1249in ":scriptnames" and get a new <SID>, because the inode has changed.
1250
1251When $SHELL is set but empty the 'shell' option would be empty. Don't use an
1252empty $SHELL value.
1253
1254A command "w! file" in .vimrc or $EXINIT didn't work. Now it writes an empty
1255file.
1256
1257When a CTRL-F command at the end of the file failed, the cursor was still
1258moved to the start of the line. Now it remains where it is.
1259
1260When using ":s" or "&" to repeat the last substitute and "$" was used to put
1261the cursor in the last column, put the cursor in the last column again. This
1262is Vi compatible.
1263
Bram Moolenaar4399ef42005-02-12 14:29:27 +00001264Vim is not fully POSIX compliant but sticks with traditional Vi behavior.
1265Added a few flags in 'cpoptions' to behave the POSIX way when wanted. The
1266$VIM_POSIX environment variable is checked to set the default.
1267
1268Appending to a register didn't insert a line break like Vi. Added the '>'
1269flag to 'cpoptions' for this.
1270
1271Using "I" in a line with only blanks appended to the line. This is not Vi
1272compatible. Added the 'H' flag in 'coptions' for this.
1273
1274When joining multiple lines the cursor would be at the last joint, but Vi
1275leaves it at the position where "J" would put it. Added the 'q' flag in
1276'cpoptions' for this.
1277
1278Autoindent didn't work for ":insert" and ":append".
1279
1280Using ":append" in an empty buffer kept the dummy line. Now it's deleted to
1281be Vi compatible.
1282
1283When reading commands from a file and stdout goes to a terminal, would still
1284request the xterm version. Vim can't read it, thus the output went to the
1285shell and caused trouble there.
1286
Bram Moolenaar5313dcb2005-02-22 08:56:13 +00001287When redirecting to a register with an invalid name the redirection would
1288still be done (after an error message). Now reset "redir_reg". (Yegappan
1289Lakshmanan)
1290
1291It was not possible to use a NL after a backslash in Ex mode. This is
1292sometimes used to feed multiple lines to a shell command.
1293
Bram Moolenaar05159a02005-02-26 23:04:13 +00001294When 'cmdheight' is set to 2 in .vimrc and the GUI uses the number of lines
1295from the terminal we actually get 3 lines for the cmdline in gvim.
1296
1297When setting $HOME allocated memory would leak.
1298
Bram Moolenaar19a09a12005-03-04 23:39:37 +00001299Win32: bold characters may sometimes write in another character cell. Use
1300unicodepdy[] as for UTF-8. (Taro Muraoka)
1301
1302":w fname" didn't work for files with 'buftype' set to "nofile".
1303
Bram Moolenaare2ac10d2005-03-07 23:26:06 +00001304The method used to locate user commands for completion differed from when they
1305are executed. Abiguous command names were not completed properly.
1306
Bram Moolenaar9062a9d2005-03-08 22:46:26 +00001307Incremental search may cause a crash when there is a custom statusline that
1308indirectly invokes ":normal".
1309
1310Diff mode failed when $DIFF_OPTIONS was set in the environment. Unset it
1311before invoking "diff".
1312
Bram Moolenaar4ad237d2005-03-11 22:49:40 +00001313Completion didn't work after ":argdo", ":windo" and ":bufdo". Also for ":set
1314&l:opt" and ":set &g:opt". (Peter Winters)
1315
1316When setting 'ttymouse' to "dec" in an xterm that supports the DEC mouse
1317locator it doesn't work. Now switch off the mouse before selecting another
1318mouse model.
1319
Bram Moolenaarfb269802005-03-15 22:46:30 +00001320When the CursorHold event is triggered and the commands peek for typed
1321characters the typeahead buffer may be messed up, e.g., when a mouse-up event
1322is received. Avoid invoking the autocommands from the function waiting for a
1323character, let it put K_CURSORHOLD in the input buffer.
1324
1325Removed the "COUNT" flag from ":argadd", to avoid ":argadd 1*" to be used like
Bram Moolenaarc0761132005-03-18 20:30:32 +00001326":1argadd *". Same for ":argdelete" and ":argedit".
Bram Moolenaarfb269802005-03-15 22:46:30 +00001327
1328Avoid that $LANG is used for the menus when LC_MESSAGES is "en_US".
1329
Bram Moolenaarc0761132005-03-18 20:30:32 +00001330Added backslashes before dashes in the vim.1 manual page to make the appear as
1331real dashes. (Pierr Habouzit)
1332
1333Where "gq" left the cursor depended on the value of 'formatprg'. Now "gq"
1334always leaves the cursor at the last line of the formatted text.
1335
1336When editing a compressed file, such as "changelog.Debian.gz" file, filetype
1337detection may try to check the contents of the file while it's still
1338compressed. Skip setting 'filetype' for compressed files until they have been
1339decompressed. Required for patterns that end in a "*".
1340
1341Starting with an argument "+cmd" or "-S script" causes the cursor the be moved
1342to the first line. That breaks a BufReadPost autocommand that uses g`".
1343Don't move the cursor if it's somewhere past the first line.
1344
1345"gg=G" while 'modifiable' is off was uninterruptable.
1346
Bram Moolenaar60c78922005-03-20 22:40:14 +00001347When 'encoding' is "sjis" inserting CTRL-V u d800 a few times causes a crash.
1348Don't insert a DBCS character with a NUL second byte.
1349
Bram Moolenaar2641f772005-03-25 21:58:17 +00001350In Insert mode CTRL-O <Home> didn't move the cursor. Made "ins_at_eol" global
1351and reset it in nv_home().
1352
Bram Moolenaarb982ca52005-03-28 21:02:15 +00001353Wildcard expansion failed: ":w /tmp/$$.`echo test`". Don't put quotes around
1354spaces inside backticks.
1355
Bram Moolenaar13fcaaf2005-04-15 21:13:42 +00001356After this sequence of commands: Y V p gv: the wrong line is selected. Now
1357let "gv" select the text that was put, since the original text is deleted.
1358This should be the most useful thing to do.
1359
1360":sleep 100u" sleeps for 100 seconds, not 100 usec as one might expect. Give
1361an error message when the argument isn't recognized.
1362
1363In gui_mch_draw_string() in gui_w32.c "unibuflen" wasn't static, resulting in
1364reallocating the buffer every time. (Alexei Alexandrov)
1365
Bram Moolenaar0e21a3f2005-04-17 20:28:32 +00001366When using a Python "atexit" function it was not invoked when Vim exits. Now
1367call Py_Finalize() for that. (Ugo Di Girolamo)
Bram Moolenaar9ba0eb82005-06-13 22:28:56 +00001368This breaks the thread stuff though, fixed by Ugo.
Bram Moolenaar0e21a3f2005-04-17 20:28:32 +00001369
Bram Moolenaardba8a912005-04-24 22:08:39 +00001370GTK GUI: using a .vimrc with "set cmdheight=2 lines=43" and ":split" right
1371after startup, the window layout is messed up. (Michael Schaap) Added
1372win_new_shellsize() call in gui_init() to fix the topframe size.
1373
1374Trick to get ...MOUSE_NM not used when there are vertical splits. Now pass
1375column -1 for the left most window and add MOUSE_COLOFF for others. Limits
1376mouse column to 10000.
1377
1378searchpair() may hang when the end pattern has "\zs" at the end. Check that
1379we find the same position again and advance one character.
1380
1381When in diff mode and making a change that causes the "changed" highlighting
1382to disappear or reappear, it was still highlighted in another window.
1383
Bram Moolenaar34cdc3e2005-05-18 22:24:46 +00001384When a ":next" command fails because the user selects "Abort" at the ATTENTION
1385prompt the argument index was advanced anyway.
1386
1387When "~" is in 'iskeyword' the "gd" doesn't work, it's used for the previous
1388substitute pattern. Put "\V" in the pattern to avoid that.
1389
Bram Moolenaar555b2802005-05-19 21:08:39 +00001390Use of sprintf() sometimes didn't check properly for buffer overflow. Also
1391when using smsg(). Included code for snprintf() to avoid having to do size
1392checks where invoking them
1393
Bram Moolenaarf4630b62005-05-20 21:31:17 +00001394":help \=<Tab>" didn't find "sub-replace-\=". Wild menu for help tags didn't
1395show backslashes. ":he :s\=" didn't work.
1396
1397When reading an errorfile "~/" in a file name was not expanded.
1398
1399GTK GUI: When adding a scrollbar (e.g. when using ":vsplit") in a script or
1400removing it the window size may change. GTK sends us resize events when we
1401change the window size ourselves, but they may come at an unexpected moment.
1402Peek for a character to get any window resize events and fix 'columns' and
1403'lines' to undo this.
1404
Bram Moolenaar67fe1a12005-05-22 22:12:58 +00001405After deleting files from the argument list a session file generated with
1406":mksession" may contain invalid ":next" commands.
1407
1408When 'shortmess' is empty and 'keymap' set to accents, in Insert mode CTRL-N
1409may cause the hit-enter prompt. Typing 'a then didn't result in the accented
1410character. Put the character typed at the prompt back in the typeahead buffer
1411so that mapping is done in the right mode.
1412
Bram Moolenaarb2ec3072005-06-17 22:02:20 +00001413setbufvar() and setwinvar() did not give error messages.
1414
1415It was possible to set a variable with an illegal name, e.g. with setbufvar().
Bram Moolenaard857f0e2005-06-21 22:37:39 +00001416It was possible to define a function with illegal name, e.t. ":func F{-1}()"
1417
1418CTRL-W F and "gf" didn't use the same method to get the file name.
Bram Moolenaarb2ec3072005-06-17 22:02:20 +00001419
Bram Moolenaar42eeac32005-06-29 22:40:58 +00001420When reporting a conversion error the line number of the last error could be
1421given. Now report the first encountered error.
1422
1423When using ":e ++enc=name file" and iconv() was used for conversion an error
Bram Moolenaar63a121b2005-12-11 21:36:39 +00001424caused a fall-back to no conversion. Now replace a character with '?' and
Bram Moolenaar42eeac32005-06-29 22:40:58 +00001425continue.
1426
Bram Moolenaar51bab742005-07-08 22:31:03 +00001427When opening a new buffer the local value of 'bomb' was not initialized from
1428the global value.
1429
Bram Moolenaare759a7a2005-07-12 22:50:18 +00001430Win32: When using the "Edit with Vim" entry the file name was limited to about
1431200 characters.
1432
Bram Moolenaar342337a2005-07-21 21:11:17 +00001433When using command line completion for ":e *foo" and the file "+foo" exists
1434the resulting command ":e +foo" doesn't work. Now insert a backslash: ":e
1435\+foo".
1436
Bram Moolenaar87e25fd2005-07-27 21:13:01 +00001437When the translation of "-- More --" was not 10 characters long the following
1438message would be in the wrong position.
1439
1440At the more-prompt the last character in the last line wasn't drawn.
1441
1442When deleting non-existing text while 'virtualedit' is set the '[ and '] marks
1443were not set.
1444
Bram Moolenaar0be6e642005-08-04 21:32:22 +00001445Win32: Could not use "**/" in 'path', it had to be "**\".
1446
Bram Moolenaarae5bce12005-08-15 21:41:48 +00001447The search pattern "\n" did not match at the end of the last line.
1448
1449Searching for a pattern backwards, starting on the NUL at the end of the line
1450and 'encoding' is "utf-8" would match the pattern just before it incorrectly.
1451Affected searchpair('/\*', '', '\*/').
1452
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +00001453For the Find/Replace dialog it was possible that not finding the text resulted
1454in an error message while redrawing, which cleared the syntax highlighting
1455while it was being used, resulting in a crash. Now don't clear syntax
1456highlighting, disable it with b_syn_error.
1457
Bram Moolenaar6e7c7f32005-08-24 22:16:11 +00001458Win32: Combining UTF-8 characters were drawn on the previous character.
1459Could be noticed with a Thai font.
1460
Bram Moolenaarcafda4f2005-09-06 19:25:11 +00001461Output of ":function" could leave some of the typed text behind. (Yegappan
1462Lakshmanan)
1463
Bram Moolenaarcaa0fcf2005-09-07 21:21:14 +00001464When the command line history has only a few lines the command line window
1465would be opened with these lines above the first window line.
1466
1467When using a command line window for search strings ":qa" would result in
1468searching for "qa" instead of quitting all windows.
1469
Bram Moolenaardcca87b2005-09-10 19:24:59 +00001470GUI: When scrolling with the scrollbar and there is a line that doesn't fit
1471redrawing may fail. Make sure w_skipcol is valid before redrawing.
1472
Bram Moolenaar482aaeb2005-09-29 18:26:07 +00001473Limit the values of 'columns' and 'lines' to avoid an overflow in Rows *
1474Columns. Fixed bad effects when running out of memory (command line would be
1475reversed, ":qa!" resulted in ":!aq").
1476
Bram Moolenaara5792f52005-11-23 21:25:05 +00001477Motif: "gvim -iconic" opened the window anyway. (David Harrison)
1478
1479There is a tiny chance that a symlink gets created between checking for an
1480existing file and creating a file. Use the O_NOFOLLOW for open() if it's
1481available.
1482
1483In an empty line "ix<CTRL-O>0" moved the cursor to after the line instead of
1484sticking to the first column.
1485
Bram Moolenaar943d2b52005-12-02 00:50:49 +00001486When using ":wq" and a BufWriteCmd autocmd uses inputsecret() the text was
1487echoed anyway. Set terminal to raw mode in getcmdline().
1488
Bram Moolenaard5bc83f2005-12-07 21:07:59 +00001489Unix: ":w a;b~c" caused an error in expanding wildcards.
1490
Bram Moolenaar63a121b2005-12-11 21:36:39 +00001491When appending to a file with ":w >>fname" in a buffer without a name, causing
1492the buffer to use "fname", the modified flag was reset.
1493
1494When appending to to current file the "not edited" flag would be reset.
1495":w" would overwrite the file accidentally.
1496
Bram Moolenaar900b4d72005-12-12 22:05:50 +00001497Unix: When filtering text with an external command Vim would still read input,
1498causing text typed for the command (e.g., a password) to be eaten and echoed.
1499Don't read input when the terminal is in cooked mode.
1500
Bram Moolenaar146522e2005-12-16 21:55:46 +00001501The Cygwin version of xxd used CR/LF line separators. (Corinna Vinschen)
1502
1503Unix: When filtering text through a shell command some resulting text may be
1504dropped. Now after detecting that the child has exited try reading some more
1505of its output.
1506
Bram Moolenaar3b181812005-12-17 22:10:02 +00001507When inside input(), using "CTRL-R =" and the expression throws an exception
1508the command line was not abandoned but it wasn't used either. Now abandon
1509typing the command line.
1510
Bram Moolenaare3226be2005-12-18 22:10:00 +00001511'delcombine' was also used in Visual and Select mode and for commands like
1512"cl". That was illogical and has been disabled.
1513
1514When recording while a CursorHold autocommand was defined special keys would
1515appear in the register. Now the CursorHold event is not triggered while
1516recording.
1517
Bram Moolenaarf4cd3e82005-12-22 22:47:02 +00001518Unix: the src/configure script used ${srcdir-.}, not all shells understand
1519that. Use ${srcdir:-.} instead.
1520
Bram Moolenaarcc984262005-12-23 22:19:46 +00001521When editing file "a" which is a symlink to file "b" that doesn't exist,
1522writing file "a" to create "b" and then ":split b" resulted in two buffers on
1523the same file with two different swapfile names. Now set the inode in the
1524buffer when creating a new file.
1525
Bram Moolenaarebefac62005-12-28 22:39:57 +00001526When 'esckeys' is not set don't send the xterm code to request the version
1527string, because it may cause trouble in Insert mode.
1528
1529When evaluating an expression for CTRL-R = on the command line it was possible
Bram Moolenaar8ada17c2006-01-19 22:16:24 +00001530to call a function that opens a new window, resulting in errors for
1531incremental search, and many other nasty things were possible. Now set
1532"cmdline_busy" and disallow changing the buffer or jumpting to another window
Bram Moolenaar4770d092006-01-12 23:22:24 +00001533to protect from unexpected behavior. Same for CTRL-\ e.
Bram Moolenaarebefac62005-12-28 22:39:57 +00001534
1535"d(" deleted the character under the cursor, while the documentation specified
1536an exclusive motion. Vi also doesn't delete the character under the cursor.
1537
1538Shift-Insert in Insert mode could put the cursor before the last character
1539when it just fits in the window. In coladvance() don't stop at the window
1540edge when filling with spaces and when in Insert mode. In mswin.vim avoid
1541getting a beep from the "l" command.
1542
Bram Moolenaar4770d092006-01-12 23:22:24 +00001543Win32 GUI: When Alt-F4 is used to close the window and Cancel is selected in
1544the dialog then Vim would insert <M-F4> in the text. Now it's ignored.
1545
1546When ":silent! {cmd}" caused the swap file dialog, which isn't displayed,
1547there would still be a hit-enter prompt.
1548
Bram Moolenaara40ceaf2006-01-13 22:35:40 +00001549Requesting the termresponse (|t_RV|) early may cause problems with "-c"
1550arguments that invoke an external command or even "-c quit". Postpone it
1551until after executing "-c" arguments.
1552
1553When typing in Insert mode so that a new line is started, using CTRL-G u to
1554break undo and start a new change, then joining the lines with <BS> caused
1555undo info to be missing. Now reset the insertion start point.
1556
1557Syntax HL: When a region start match has a matchgroup and an offset that
1558happens to be after the end of the line then it continued in the next line and
1559stopped at the region end match, making the region continue after that.
1560Now check for the column being past the end of the line in syn_add_end_off().
1561
Bram Moolenaarc32840f2006-01-14 21:23:38 +00001562When changing a file, setting 'swapfile' off and then on again, making another
1563change and killing Vim, then some blocks may be missing from the swapfile.
1564When 'swapfile' is switched back on mark all blocks in the swapfile as dirty.
1565Added mf_set_dirty().
1566
1567Expanding wildcards in a command like ":e aap;<>!" didn't work. Put
1568backslashes before characters that are special to the shell. (Adri Verhoef)
1569
Bram Moolenaar8ada17c2006-01-19 22:16:24 +00001570A CursorHold autocommand would cause a message to be cleared. Don't show the
1571special key for the event for 'showcmd'.
1572
1573When expanding a file name for a shell command, as in "!cmd foo<Tab>" or ":r
1574!cmd foo<Tab>" also escape characters that are special for the shell:
1575"!;&()<>".
1576
Bram Moolenaar071d4272004-06-13 20:20:40 +00001577 vim:tw=78:ts=8:ft=help:norl: