1*version7.txt* For Vim version 7.0aa. Last change: 2004 Jul 18 2 3 4 VIM REFERENCE MANUAL by Bram Moolenaar 5 6 7Welcome to Vim 7! A large number of features has been added. This file 8mentions all the new items, changes to existing features and bug fixes 9compared to Vim 6.x. 10 11See |vi_diff.txt| for an overview of differences between Vi and Vim 7.0. 12See |version4.txt| for differences between Vim 3.x and Vim 4.x. 13See |version5.txt| for differences between Vim 4.x and Vim 5.x. 14See |version6.txt| for differences between Vim 5.x and Vim 6.x. 15 16INCOMPATIBLE CHANGES |incompatible-7| 17 18NEW FEATURES |new-7| 19 20New data types |new-data-types| 21KDE support |new-KDE| 22Various new items |new-items-7| 23 24IMPROVEMENTS |improvements-7| 25 26COMPILE TIME CHANGES |compile-changes-7| 27 28BUG FIXES |bug-fixes-7| 29 30============================================================================== 31INCOMPATIBLE CHANGES *incompatible-7* 32 33These changes are incompatible with previous releases. Check this list if you 34run into a problem when upgrading from Vim 6.x to 7.0 35 36":helpgrep" now uses a help window to display a match. 37 38 39Minor incompatibilities: 40 41For filetype detection: For many types, instead of ~/.dir/filename use 42*/.dir/filename, so that it also works for other user's files. 43 44":0verbose" now sets 'verbose' to zero instead of one. 45 46Removed the old and incomplete "VimBuddy" code. 47 48Buffers without a name report "No Name" instead of "No File". It was 49confusing for buffers with a name and 'buftype' set to "nofile". 50 51============================================================================== 52NEW FEATURES *new-7* 53 54New data types *new-data-types* 55-------------- 56 57In Vim scripts the following types have been added: 58 59 list ordered list of items 60 dictionary associative array of items 61 function reference to a function 62 63Many functions and commands have been added to support the new types. 64 65NOT IMPLEMENTED YET! 66 67 68KDE support *new-KDE* 69----------- 70 71Kvim is the KDE version of Vim. It uses the Qt toolkit. See |KVim|. 72(Thomas Capricelli, Philippe Fremy, Mickael Marchand, Mark Westcott, et al.) 73 74 75MzScheme interface *new-MzScheme* 76------------------ 77 78The MzScheme interpreter is supported. |MzScheme| 79The |:mzscheme| command can be used to execute MzScheme commands. 80The |:mzfile| command can be used to execute an MzScheme script file. 81 82Printing multi-byte text *new-print-multi-byte* 83------------------ 84 85The |:hardcopy| command now supports printing multi-byte characters. 86The 'printmbcharset' and 'printmbfont' options are used for this. 87Also see |postscript-cjk-printing|. (Mike Williams) 88 89 90Various new items *new-items-7* 91----------------- 92 93Normal mode commands: ~ 94 95a", a' and a` New text objects to select quoted strings. |a'| 96i", i' and i' (Taro Muraoka) 97 98Options: ~ 99 100'completefunc' The name of a function used for user-specified Insert 101 mode completion. CTRL-X CTRL-U can be used in Insert 102 mode to do any kind of completion. (Taro Muraoka) 103'quoteescape' Characters used to escape quotes inside a string. 104 Used for the a", a' and a` text objects. |a'| 105'numberwidth' Minimal width of the space used for the 'number' 106 option. (Emmanuel Renieris) 107'mzquantum' Time in msec to schedule MzScheme threads. 108'printmbcharset' CJK character set to be used for :hardcopy 109'printmbfont' font names to be used for CJK output of :hardcopy 110 111 112Ex commands: ~ 113 114Win32: The ":winpos" command now also works in the console. (Vipin Aravind) 115 116|:startreplace| Start Replace mode. (Charles Campbell) 117 118|:0file| Removes the name of the buffer. (Charles Campbell) 119 120|:diffoff| Switch off diff mode in the current window or in all 121 windows. 122 123 124New functions: ~ 125 126repeat(expr, count) |repeat()| Repeat "expr" "count" times. 127 (Christophe Poucet) 128tr(expr, from, to) |tr()| Translate characters. (Ron Aaron) 129byteidx(expr, nr) |byteidx()| Index of a character. (Ilya Sher) 130 131 132New autocommand events: ~ 133 134|InsertEnter| starting Insert or Replace mode 135|InsertChange| going from Insert to Replace mode or back 136|InsertLeave| leaving Insert or Replace mode 137 138|ColorScheme| after loading a color scheme 139 140 141New Syntax/Indent/FTplugin files: ~ 142 143MuPAD source syntax, indent and ftplugin. (Dave Silvia) 144 145 146Others: ~ 147 148Mac: Add the selection type to the clipboard, so that Block, line and 149character selections can be used between two Vims. (Eckehard Berns) 150Also fixes the problem that setting 'clipboard' to "unnamed" breaks using 151"yyp". 152 153Mac: GUI font selector. (Peter "Rain Dog" Cucka) 154 155The netrw plugin now also supports viewing a directory, when "scp://" is used. 156Deleting and renaming files is possible. (Charles Campbell) 157 158============================================================================== 159IMPROVEMENTS *improvements-7* 160 161":helpgrep" accepts a language specifier after the pattern: "pat@it". 162 163Move the help for printing to a separate help file. It's quite a lot now. 164 165":breakadd here" and ":breakdel here" can be used to set or delete a 166breakpoint at the cursor. 167 168The tutor was updated to make it simpler to use and added text to explain a 169few more important commands. Used ideas from Gabriel Zachmann. 170 171Unix: When libcall() fails obtain an error message with dlerror() and display 172it. (Johannes Zellner) 173 174Added "nbsp" in 'listchars'. (David Blanchet) 175 176Added the "acwrite" value for the 'buftype' option. This is for a buffer that 177doesn not have a name that refers to a file and is written with BufWriteCmd 178autocommands. 179 180For lisp indenting and matching parenthesis: (Sergey Khorev) 181- square brackets are recognized properly 182- #\(, #\), #\[ and #\] are recognized as character literals 183- Lisp line comments (delimited by semicolon) are recognized 184 185============================================================================== 186COMPILE TIME CHANGES *compile-changes-7* 187 188Mac: "make" now creates the Vim.app directory and "make install" copies it to 189its final destination. (Raf) 190 191Mac: Made it possible to compile with Motif, Athena or GTK without tricks and 192still being able to use the MacRoman conversion. Added the os_mac_conv.c 193file. 194 195============================================================================== 196BUG FIXES *bug-fixes-7* 197 198When using PostScript printing on MS-DOS the default 'printexpr' used "lpr" 199instead of "copy". When 'printdevice' was empty the copy command did not 200work. Use "LPT1" then. 201 202The GTK font dialog uses a font size zero when the font name doesn't include a 203size. Use a default size of 10. 204 205This example in the documentation didn't work: 206 :e `=foo . ".c" ` 207Skip over the expression in `=expr` when looking for comments, |, % and #. 208 209When ":helpgrep" doesn't find anything there is no error message. 210 211"L" and "H" did not take closed folds into account. 212 213Win32: The "-P title" argument stopped at the first title that matched, even 214when it doesn't support MDI. 215 216Mac GUI: CTRL-^ and CTRL-@ did not work. 217 218"2daw" on "word." at the end of a line didn't include the preceding white 219space. 220 221Win32: Using FindExecutable() doesn't work to find a program. Use 222SearchPath() instead. For executable() use $PATHEXT when the program searched 223for doesn't have an extension. 224 225When 'virtualedit' is set, moving the cursor up after appending a character 226may move it to a different column. Was caused by auto-formatting moving the 227cursor and not putting it back where it was. 228 229When indent was added automatically and then moving the cursor, the indent was 230not deleted (like when pressing ESC). The "I" flag in 'cpoptions' can be used 231to make it work the old way. 232 233When <Space> is mapped to something that starts with a space, typing <Space> 234does not expand abbreviations. Only disable expanding abbreviations when a 235mapping is not remapped, not when the RHS starts with the LHS. 236 237When opening a command-line window, 'textwidth' gets set to 78 by the Vim 238filetype plugin. Reset 'textwidth' to 0 to avoid lines are broken. 239 240After using cursor(line, col) moving up/down doesn't keep the same column. 241 242Win32: Borland C before 5.5 requires using ".u." for LowPart and HighPart 243fields. (Walter Briscoe) 244 245On Sinix SYS_NMLN isn't always defined. Define it ourselves. (Cristiano De 246Michele) 247 248Printing with PostScript may keep the printer waiting for more. Append a 249CTRL-D to the printer output. (Mike Williams) 250 251When converting a string with a hex or octal number the leading '-' was 252ignored. ":echo '-05' + 0" resulted in 5 instead of -5. 253 254Using "@:" to repeat a command line didn't work when it contains control 255characters. 256 257When using file completion for a user command, it would not expand environment 258variables like for a regular command with a file argument. 259 260'cindent': When the argument of a #define looks like a C++ class the next line 261is indented too much. 262 263When 'comments' includes multi-byte characters inserting the middle part and 264alignment may go wrong. 'cindent' also suffers from this for right-aligned 265items. 266 267The default for 'helplang' was "zh" for both "zh_cn" and "zh_tw". Now use 268"cn" or "tw" as intended. 269 270 vim:tw=78:ts=8:ft=help:norl: 271