From 1cd871b5341bf43ee99e136844e3131014880f92 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Sun, 19 Dec 2004 22:46:22 +0000 Subject: updated for version 7.0023 --- runtime/doc/autocmd.txt | 8 +- runtime/doc/change.txt | 11 +- runtime/doc/editing.txt | 553 +++++++++++++++++++++++---------------------- runtime/doc/intro.txt | 4 +- runtime/doc/mbyte.txt | 4 +- runtime/doc/options.txt | 17 +- runtime/doc/os_mac.txt | 8 +- runtime/doc/pattern.txt | 3 +- runtime/doc/tags | 3 + runtime/doc/todo.txt | 83 ++----- runtime/doc/version7.txt | 60 ++++- runtime/filetype.vim | 8 +- runtime/ftplugin/make.vim | 5 +- runtime/makemenu.vim | 3 +- runtime/syntax/2html.vim | 24 +- runtime/syntax/iss.vim | 102 +++++---- runtime/syntax/netrc.vim | 55 +++++ runtime/syntax/sudoers.vim | 290 ++++++++++++++++++++++++ src/INSTALLpc.txt | 8 +- src/Make_bc5.mak | 3 + src/Make_cyg.mak | 16 +- src/Make_ming.mak | 10 +- src/Make_mvc.mak | 2 +- src/Make_vms.mms | 284 ++++++++++++++++++++++- src/auto/configure | 386 +++++++++++++++++-------------- src/buffer.c | 13 +- src/charset.c | 58 ++--- src/configure.in | 28 ++- src/eval.c | 35 +-- src/ex_cmds.c | 11 +- src/ex_cmds2.c | 64 +++--- src/ex_docmd.c | 21 +- src/ex_getln.c | 13 +- src/fileio.c | 23 +- src/fold.c | 7 +- src/getchar.c | 2 +- src/gui.c | 7 +- src/gui_gtk.c | 6 +- src/gui_gtk_x11.c | 8 +- src/gui_kde.cc | 464 ++++++++++++++++++++----------------- src/gui_w32.c | 2 +- src/gui_x11.c | 1 + src/if_xcmdsrv.c | 90 ++++++-- src/macros.h | 18 ++ src/main.c | 45 +++- src/mark.c | 6 +- src/mbyte.c | 15 +- src/memline.c | 211 ++++++++++++++--- src/menu.c | 19 +- src/message.c | 19 +- src/misc1.c | 79 ++++--- src/misc2.c | 94 +++++--- src/ops.c | 24 +- src/option.c | 63 +++--- src/option.h | 3 +- src/os_amiga.c | 14 +- src/os_mac.c | 15 +- src/os_msdos.c | 28 +-- src/os_mswin.c | 144 ++++++++---- src/os_unix.c | 25 +- src/os_win32.c | 16 +- src/proto/ex_cmds2.pro | 1 - src/proto/main.pro | 1 + src/proto/memline.pro | 2 +- src/proto/misc1.pro | 1 + src/proto/misc2.pro | 4 +- src/proto/option.pro | 1 + src/proto/os_mswin.pro | 2 +- src/regexp.c | 72 ++---- src/screen.c | 26 +-- src/tag.c | 8 +- src/term.c | 2 + src/ui.c | 7 +- src/version.h | 4 +- src/vim.h | 6 +- src/vim.rc | 18 +- 76 files changed, 2401 insertions(+), 1395 deletions(-) create mode 100644 runtime/syntax/netrc.vim create mode 100644 runtime/syntax/sudoers.vim diff --git a/runtime/doc/autocmd.txt b/runtime/doc/autocmd.txt index eddfead8a0..1c7b73c181 100644 --- a/runtime/doc/autocmd.txt +++ b/runtime/doc/autocmd.txt @@ -1,4 +1,4 @@ -*autocmd.txt* For Vim version 7.0aa. Last change: 2004 Sep 17 +*autocmd.txt* For Vim version 7.0aa. Last change: 2004 Dec 16 VIM REFERENCE MANUAL by Bram Moolenaar @@ -230,8 +230,10 @@ BufWritePost After writing the whole buffer to a file *BufWriteCmd* BufWriteCmd Before writing the whole buffer to a file. Should do the writing of the file and reset - 'modified' if successful. The buffer contents - should not be changed. |Cmd-event| + 'modified' if successful, unless '+' is in + 'cpo' and writing to another file |cpo-+|. + The buffer contents should not be changed. + |Cmd-event| *FileWritePre* FileWritePre Before writing to a file, when not writing the whole buffer. Use the '[ and '] marks for the diff --git a/runtime/doc/change.txt b/runtime/doc/change.txt index 5e45ec7ac9..08fdc1d544 100644 --- a/runtime/doc/change.txt +++ b/runtime/doc/change.txt @@ -1,4 +1,4 @@ -*change.txt* For Vim version 7.0aa. Last change: 2004 Nov 30 +*change.txt* For Vim version 7.0aa. Last change: 2004 Dec 17 VIM REFERENCE MANUAL by Bram Moolenaar @@ -351,7 +351,8 @@ The CTRL-A and CTRL-X commands work for (signed) decimal numbers, unsigned octal and hexadecimal numbers and alphabetic characters. This depends on the 'nrformats' option. - When 'nrformats' includes "octal", Vim considers numbers starting with a '0' - to be octal. Other numbers are decimal and may have a preceding minus sign. + to be octal, unless the number includes a '8' or '9'. Other numbers are + decimal and may have a preceding minus sign. If the cursor is on a number, the commands apply to that number; otherwise Vim uses the number to the right of the cursor. - When 'nrformats' includes "hex", Vim assumes numbers starting with '0x' or @@ -365,9 +366,13 @@ octal and hexadecimal numbers and alphabetic characters. This depends on the For numbers with leading zeros (including all octal and hexadecimal numbers), Vim preserves the number of characters in the number when possible. CTRL-A on "0077" results in "0100", CTRL-X on "0x100" results in "0x0ff". +There is one exception: When a number that starts with a zero is found not to +be octal (it contains a '8' or '9'), but 'nrformats' does include "octal", +leading zeros are removed to avoid that the result may be recognized as an +octal number. Note that when 'nrformats' includes "octal", decimal numbers with leading -zeros are impossible because they are indistinguishable from octal numbers. +zeros cause mistakes, because they can be confused with octal numbers. The CTRL-A command is very useful in a macro. Example: Use the following steps to make a numbered list. diff --git a/runtime/doc/editing.txt b/runtime/doc/editing.txt index 4462515775..753e2ac235 100644 --- a/runtime/doc/editing.txt +++ b/runtime/doc/editing.txt @@ -1,4 +1,4 @@ -*editing.txt* For Vim version 7.0aa. Last change: 2004 Oct 12 +*editing.txt* For Vim version 7.0aa. Last change: 2004 Dec 16 VIM REFERENCE MANUAL by Bram Moolenaar @@ -8,21 +8,22 @@ Editing files *edit-files* 1. Introduction |edit-intro| 2. Editing a file |edit-a-file| -3. Dialogs |edit-dialogs| -4. The current directory |current-directory| -5. The argument list |argument-list| -6. Writing |writing| -7. Writing and quitting |write-quit| +3. The argument list |argument-list| +4. Writing |writing| +5. Writing and quitting |write-quit| +6. Dialogs |edit-dialogs| +7. The current directory |current-directory| 8. Editing binary files |edit-binary| 9. Encryption |encryption| 10. Timestamps |timestamps| +11. File Searching |file-searching| ============================================================================== 1. Introduction *edit-intro* Editing a file with Vim means: -1. reading the file into the internal buffer +1. reading the file into a buffer 2. changing the buffer with editor commands 3. writing the buffer into a file @@ -30,12 +31,13 @@ Editing a file with Vim means: As long as you don't write the buffer, the original file remains unchanged. If you start editing a file (read a file into the buffer), the file name is remembered as the "current file name". This is also known as the name of the -current buffer. +current buffer. It can be used with "%" on the command line |:_%|. *alternate-file* If there already was a current file name, then that one becomes the alternate -file name. It can later be used with "#" on the command line |:_#|. However, -the alternate file name is not changed when |:keepalt| is used. +file name. It can be used with "#" on the command line |:_#| and you can use +the |CTRL-^| command to toggle between the current and the alternate file. +However, the alternate file name is not changed when |:keepalt| is used. *:keepalt* *:keepa* :keepalt {cmd} Execute {cmd} while keeping the current alternate file @@ -43,12 +45,13 @@ the alternate file name is not changed when |:keepalt| is used. with a function) may still set the alternate file name. {not in Vi} -All file names are remembered in the file list. When you enter a file name, +All file names are remembered in the buffer list. When you enter a file name, for editing (e.g., with ":e filename") or writing (e.g., with (:w file name"), -the file name is added to the list. You can use this list to remember which -files you edited and to quickly switch from one file to another with the -CTRL-^ command (e.g., to copy text). First type the number of the file and -then hit CTRL-^. {Vi: only one alternate file name} +the file name is added to the list. You can use the buffer list to remember +which files you edited and to quickly switch from one file to another (e.g., +to copy text) with the |CTRL-^| command. First type the number of the file +and then hit CTRL-^. {Vi: only one alternate file name is remembered} + CTRL-G or *CTRL-G* *:f* *:fi* *:file* :f[ile] Prints the current file name (as typed), the @@ -215,11 +218,10 @@ If you want to keep the changed buffer without saving it, switch on the {Vi: no ++opt} :e[dit] [++opt] [+cmd] #[count] - Edit the [count]th alternate file name (as shown by - :files). This command does the same as - [count] CTRL-^. But ":e #" doesn't work if the - alternate buffer doesn't have a file name, while - CTRL-^ still works then. + Edit the [count]th buffer (as shown by |:files|). + This command does the same as [count] CTRL-^. But ":e + #" doesn't work if the alternate buffer doesn't have a + file name, while CTRL-^ still works then. Also see |++opt| and |+cmd|. {Vi: no ++opt} @@ -268,10 +270,10 @@ If you want to keep the changed buffer without saving it, switch on the 'readonly' option for this buffer. {not in Vi} *CTRL-^* *CTRL-6* -[count]CTRL-^ Edit [count]th alternate file (equivalent to ":e - #[count]"). Without count this gets you to the - previously edited file. This is a quick way to toggle - between two (or more) files. +CTRL-^ Edit the alternate file (equivalent to ":e #"). + Mostly the alternate file is the previously edited + file. This is a quick way to toggle between two + files. If the 'autowrite' or 'autowriteall' option is on and the buffer was changed, write it. Mostly the ^ character is positioned on the 6 key, @@ -279,6 +281,12 @@ If you want to keep the changed buffer without saving it, switch on the But on some non-US keyboards CTRL-^ is produced in another way. +{count}CTRL-^ Edit [count]th file in the buffer list (equivalent to + ":e #[count]"). This is a quick way to switch between + files. + See |CTRL-^| above for further details. + {not in Vi} + [count]]f *]f* *[f* [count][f Same as "gf". Deprecated. @@ -335,11 +343,12 @@ current file name. Note for systems other than Unix and MS-DOS: When using a command that accepts a single file name (like ":edit file") spaces in the file name are allowed, but trailing spaces are ignored. This is useful on systems that -allow file names with embedded spaces (like the Amiga). Example: The command -":e Long File Name " will edit the file "Long File Name". When using a -command that accepts more than one file name (like ":next file1 file2") -embedded spaces must be escaped with a backslash. +allow file names with embedded spaces (like MS-Windows and the Amiga). +Example: The command ":e Long File Name " will edit the file "Long File +Name". When using a command that accepts more than one file name (like ":next +file1 file2") embedded spaces must be escaped with a backslash. + *wildcard* Wildcards in {file} are expanded. Which wildcards are supported depends on the system. These are the common ones: * matches anything, including nothing @@ -351,7 +360,8 @@ as a wildcard when "[" is in the 'isfname' option. A simple way to avoid this is to use "path\[[]abc]". Then the file "path[abc]" literally. *backtick-expansion* *`-expansion* -On Unix you can also use backticks in the file name, for example: > +On Unix and a few other systems you can also use backticks in the file name, +for example: > :e `find . -name ver\\*.c -print` The backslashes before the star are required to prevent "ver*.c" to be expanded by the shell before executing the find program. @@ -360,12 +370,11 @@ backticks must be around the whole item. It is not possible to have text directly before the first or just after the last backtick. *`=* -You can have the backticks expanded as a Vim expression, instead of -an external command, by using the syntax `={expr}` e.g.: > - :let foo='bar' - :e `=foo . ".c" ` -This will edit "bar.c". The expression can contain just about anything, thus -this can also be used to avoid the special meaning of '"', '|', '%' and '#'. +You can have the backticks expanded as a Vim expression, instead of an +external command, by using the syntax `={expr}` e.g.: > + :e `=tempname()` +The expression can contain just about anything, thus this can also be used to +avoid the special meaning of '"', '|', '%' and '#'. *++opt* *[++opt]* The [++opt] argument can be used to force the value of 'fileformat' or @@ -470,241 +479,17 @@ You can encrypt files that are written by setting the 'key' option. This provides some security against others reading your files. |encryption| -File Searching *file-searching* - -{not available when compiled without the |+path_extra| feature} - -The file searching is currently used for the 'path', 'cdpath' and 'tags' -options. There are three different types of searching: - -1) Downward search: - Downward search uses the wildcards '*', '**' and possibly others - supported by your operating system. '*' and '**' are handled inside Vim, so - they work on all operating systems. - - The usage of '*' is quite simple: It matches 0 or more characters. - - '**' is more sophisticated: - - It ONLY matches directories. - - It matches up to 30 directories deep, so you can use it to search an - entire directory tree - - The maximum number of levels matched can be given by appending a number - to '**'. - Thus '/usr/**2' can match: > - /usr - /usr/include - /usr/include/sys - /usr/include/g++ - /usr/lib - /usr/lib/X11 - .... -< It does NOT match '/usr/include/g++/std' as this would be three - levels. - The allowed number range is 0 ('**0' is removed) to 255. - If the given number is smaller than 0 it defaults to 30, if it's - bigger than 255 it defaults to 255. - - '**' can only be at the end of the path or be followed by a path - separator or by a number and a path separator. - - You can combine '*' and '**' in any order: > - /usr/**/sys/* - /usr/*/sys/** - /usr/**2/sys/* - -2) Upward search: - Here you can give a directory and then search the directory tree upward for - a file. You could give stop-directories to limit the upward search. The - stop-directories are appended to the path (for the 'path' option) or to - the filename (for the 'tags' option) with a ';'. If you want several - stop-directories separate them with ';'. If you want no stop-directory - ("search upward till the root directory) just use ';'. > - /usr/include/sys;/usr -< will search in: > - /usr/include/sys - /usr/include - /usr -< - If you use a relative path the upward search is started in Vim's current - directory or in the directory of the current file (if the relative path - starts with './' and 'd' is not included in 'cpoptions'). - - If Vim's current path is /u/user_x/work/release and you do > - :set path=include;/u/user_x -< and then search for a file with |gf| the file is searched in: > - /u/user_x/work/release/include - /u/user_x/work/include - /u/user_x/include - -3) Combined up/downward search - If Vim's current path is /u/user_x/work/release and you do > - set path=**;/u/user_x -< and then search for a file with |gf| the file is searched in: > - /u/user_x/work/release/** - /u/user_x/work/** - /u/user_x/** -< - BE CAREFUL! This might consume a lot of time, as the search of - '/u/user_x/**' includes '/u/user_x/work/**' and - '/u/user_x/work/release/**'. So '/u/user_x/work/release/**' is searched - three and '/u/user_x/work/**' is searched two times. - - In the above example you might want to set path to: > - :set path=**,/u/user_x/** -< This searches: > - /u/user_x/work/release/** - /u/user_x/** -< This searches the same directories, but in a different order. - -============================================================================== -3. Dialogs *edit-dialogs* - - *:confirm* *:conf* -:conf[irm] {command} Execute {command}, and use a dialog when an - operation has to be confirmed. Can be used on the - ":q", ":qa" and ":w" commands (the latter to over-ride - a read-only setting). - -Examples: > - :confirm w foo -< Will ask for confirmation when "foo" already exists. > - :confirm q -< Will ask for confirmation when there are changes. > - :confirm qa -< If any modified, unsaved buffers exist, you will be prompted to save - or abandon each one. There are also choices to "save all" or "abandon - all". - -If you want to always use ":confirm", set the 'confirm' option. - - *:browse* *:bro* *E338* *E614* *E615* *E616* *E578* -:bro[wse] {command} Open a file selection dialog for an argument to - {command}. At present this works for |:e|, |:w|, - |:r|, |:saveas|, |:sp|, |:mkexrc|, |:mkvimrc| and - |:mksession|. - {only in Win32, Athena, Motif, GTK and Mac GUI} - When ":browse" is not possible you get an error - message. If the |+browse| feature is missing or the - {command} doesn't support browsing, the {command} is - executed without a dialog. - ":browse set" works like |:options|. - -The syntax is best shown via some examples: > - :browse e $vim/foo -< Open the browser in the $vim/foo directory, and edit the - file chosen. > - :browse e -< Open the browser in the directory specified with 'browsedir', - and edit the file chosen. > - :browse w -< Open the browser in the directory of the current buffer, - with the current buffer filename as default, and save the - buffer under the filename chosen. > - :browse w C:/bar -< Open the browser in the C:/bar directory, with the current - buffer filename as default, and save the buffer under the - filename chosen. -Also see the |'browsedir'| option. -For versions of Vim where browsing is not supported, the command is executed -unmodified. - - *browsefilter* -For MS Windows, you can modify the filters that are used in the browse dialog. -By setting the g:browsefilter or b:browsefilter variables, you can change the -filters globally or locally to the buffer. The variable is set to a string in -the format "{filter label}\t{pattern};{pattern}\n" where {filter label} is the -text that appears in the "Files of Type" comboBox, and {pattern} is the -pattern which filters the filenames. Several patterns can be given, separated -by ';'. - -For Motif the same format is used, but only the very first pattern is actually -used (Motif only offers one pattern, but you can edit it). - -For example, to have only Vim files in the dialog, you could use the following -command: > - - let g:browsefilter="Vim Scripts\t*.vim\nVim Startup Files\t*vimrc\n" - -You can override the filter setting on a per-buffer basis by setting the -b:browsefilter variable. You would most likely set b:browsefilter in a -filetype plugin, so that the browse dialog would contain entries related to -the type of file you are currently editing. Disadvantage: This makes it -difficult to start editing a file of a different type. To overcome this, you -may want to add "All Files\t*.*\n" as the final filter, so that the user can -still access any desired file. - -============================================================================== -4. The current directory *current-directory* - -You may use the |:cd| and |:lcd| commands to change to another directory, so -you will not have to type that directory name in front of the file names. It -also makes a difference for executing external commands, e.g. ":!ls". - - *:cd* *E472* -:cd On non-Unix systems: Print the current directory - name. On Unix systems: Change the current directory - to the home directory. Use |:pwd| to print the - current directory on all systems. - -:cd {path} Change the current directory to {path}. - If {path} is relative, it is searched for in the - directories listed in |'cdpath'|. - Does not change the meaning of an already opened file, - because its full path name is remembered. Files from - the |arglist| may change though! - On MS-DOS this also changes the active drive. - To change to the directory of the current file: > - :cd %:h -< - *:cd-* *E186* -:cd - Change to the previous current directory (before the - previous ":cd {path}" command). {not in Vi} - - *:chd* *:chdir* -:chd[ir] [path] Same as |:cd|. - - *:lc* *:lcd* -:lc[d] {path} Like |:cd|, but only set the current directory for the - current window. The current directory for other - windows is not changed. {not in Vi} - - *:lch* *:lchdir* -:lch[dir] Same as |:lcd|. {not in Vi} - - *:pw* *:pwd* *E187* -:pw[d] Print the current directory name. {Vi: no pwd} - Also see |getcwd()|. - -So long as no |:lcd| command has been used, all windows share the same current -directory. Using a command to jump to another window doesn't change anything -for the current directory. -When a |:lcd| command has been used for a window, the specified directory -becomes the current directory for that window. Windows where the |:lcd| -command has not been used stick to the global current directory. When jumping -to another window the current directory will become the last specified local -current directory. If none was specified, the global current directory is -used. -When a |:cd| command is used, the current window will lose his local current -directory and will use the global current directory from now on. - -After using |:cd| the full path name will be used for reading and writing -files. On some networked file systems this may cause problems. The result of -using the full path name is that the file names currently in use will remain -referring to the same file. Example: If you have a file a:test and a -directory a:vim the commands ":e test" ":cd vim" ":w" will overwrite the file -a:test and not write a:vim/test. But if you do ":w test" the file a:vim/test -will be written, because you gave a new file name and did not refer to a -filename before the ":cd". - ============================================================================== -5. The argument list *argument-list* *arglist* +3. The argument list *argument-list* *arglist* If you give more than one file name when starting Vim, this list is remembered as the argument list. You can jump to each file in this list. Do not confuse this with the buffer list, which you can see with the |:buffers| command. The argument list was already present in Vi, the buffer -list is new in Vim. A file name in the argument list will also be present in -the buffer list (unless it was deleted with ":bdel"). +list is new in Vim. Every file name in the argument list will also be present +in the buffer list (unless it was deleted with |:bdel| or |:bwipe|). But it's +common that names in the buffer list are not in the argument list. This subject is introduced in section |07.2| of the user manual. @@ -894,11 +679,17 @@ positioned at the first non-blank in the line, otherwise the last know column is used. If there is no last known cursor position the cursor will be in the first line (the last line in Ex mode). + *{arglist}* The wildcards in the argument list are expanded and the file names are sorted. Thus you can use the command "vim *.c" to edit all the C files. From within -Vim the command ":n *.c" does the same. On Unix you can also use backticks, -for example: > - :n `find . -name \\*.c -print` +Vim the command ":n *.c" does the same. + +White space is used to separate file names. Put a backslash before a space or +Tab to include it in a file name. E.g., to edit the single file "foo bar": > + :next foo\ bar + +On Unix and a few other systems you can also use backticks, for example: > + :next `find . -name \\*.c -print` The backslashes before the star are required to prevent "*.c" to be expanded by the shell before executing the find program. @@ -988,7 +779,7 @@ flag is used for the ":substitute" command to avoid an error for files where "my_foo" isn't used. ":update" writes the file only if changes were made. ============================================================================== -6. Writing *writing* *save-file* +4. Writing *writing* *save-file* Note: When the 'write' option is off, you are not able to write any file. @@ -1173,7 +964,7 @@ For MS-DOS and MS-Windows the device is detected by its name: The names can be in upper- or lowercase. ============================================================================== -7. Writing and quitting *write-quit* +5. Writing and quitting *write-quit* *:q* *:quit* :q[uit] Quit the current window. Quit Vim if this is the last @@ -1265,6 +1056,146 @@ MULTIPLE WINDOWS AND BUFFERS *window-exit* which cannot be written for another reason, Vim will not quit. {not in Vi} +============================================================================== +6. Dialogs *edit-dialogs* + + *:confirm* *:conf* +:conf[irm] {command} Execute {command}, and use a dialog when an + operation has to be confirmed. Can be used on the + ":q", ":qa" and ":w" commands (the latter to over-ride + a read-only setting). + +Examples: > + :confirm w foo +< Will ask for confirmation when "foo" already exists. > + :confirm q +< Will ask for confirmation when there are changes. > + :confirm qa +< If any modified, unsaved buffers exist, you will be prompted to save + or abandon each one. There are also choices to "save all" or "abandon + all". + +If you want to always use ":confirm", set the 'confirm' option. + + *:browse* *:bro* *E338* *E614* *E615* *E616* *E578* +:bro[wse] {command} Open a file selection dialog for an argument to + {command}. At present this works for |:e|, |:w|, + |:r|, |:saveas|, |:sp|, |:mkexrc|, |:mkvimrc| and + |:mksession|. + {only in Win32, Athena, Motif, GTK and Mac GUI} + When ":browse" is not possible you get an error + message. If the |+browse| feature is missing or the + {command} doesn't support browsing, the {command} is + executed without a dialog. + ":browse set" works like |:options|. + +The syntax is best shown via some examples: > + :browse e $vim/foo +< Open the browser in the $vim/foo directory, and edit the + file chosen. > + :browse e +< Open the browser in the directory specified with 'browsedir', + and edit the file chosen. > + :browse w +< Open the browser in the directory of the current buffer, + with the current buffer filename as default, and save the + buffer under the filename chosen. > + :browse w C:/bar +< Open the browser in the C:/bar directory, with the current + buffer filename as default, and save the buffer under the + filename chosen. +Also see the |'browsedir'| option. +For versions of Vim where browsing is not supported, the command is executed +unmodified. + + *browsefilter* +For MS Windows, you can modify the filters that are used in the browse dialog. +By setting the g:browsefilter or b:browsefilter variables, you can change the +filters globally or locally to the buffer. The variable is set to a string in +the format "{filter label}\t{pattern};{pattern}\n" where {filter label} is the +text that appears in the "Files of Type" comboBox, and {pattern} is the +pattern which filters the filenames. Several patterns can be given, separated +by ';'. + +For Motif the same format is used, but only the very first pattern is actually +used (Motif only offers one pattern, but you can edit it). + +For example, to have only Vim files in the dialog, you could use the following +command: > + + let g:browsefilter="Vim Scripts\t*.vim\nVim Startup Files\t*vimrc\n" + +You can override the filter setting on a per-buffer basis by setting the +b:browsefilter variable. You would most likely set b:browsefilter in a +filetype plugin, so that the browse dialog would contain entries related to +the type of file you are currently editing. Disadvantage: This makes it +difficult to start editing a file of a different type. To overcome this, you +may want to add "All Files\t*.*\n" as the final filter, so that the user can +still access any desired file. + +============================================================================== +7. The current directory *current-directory* + +You may use the |:cd| and |:lcd| commands to change to another directory, so +you will not have to type that directory name in front of the file names. It +also makes a difference for executing external commands, e.g. ":!ls". + + *:cd* *E472* +:cd On non-Unix systems: Print the current directory + name. On Unix systems: Change the current directory + to the home directory. Use |:pwd| to print the + current directory on all systems. + +:cd {path} Change the current directory to {path}. + If {path} is relative, it is searched for in the + directories listed in |'cdpath'|. + Does not change the meaning of an already opened file, + because its full path name is remembered. Files from + the |arglist| may change though! + On MS-DOS this also changes the active drive. + To change to the directory of the current file: > + :cd %:h +< + *:cd-* *E186* +:cd - Change to the previous current directory (before the + previous ":cd {path}" command). {not in Vi} + + *:chd* *:chdir* +:chd[ir] [path] Same as |:cd|. + + *:lc* *:lcd* +:lc[d] {path} Like |:cd|, but only set the current directory for the + current window. The current directory for other + windows is not changed. {not in Vi} + + *:lch* *:lchdir* +:lch[dir] Same as |:lcd|. {not in Vi} + + *:pw* *:pwd* *E187* +:pw[d] Print the current directory name. {Vi: no pwd} + Also see |getcwd()|. + +So long as no |:lcd| command has been used, all windows share the same current +directory. Using a command to jump to another window doesn't change anything +for the current directory. +When a |:lcd| command has been used for a window, the specified directory +becomes the current directory for that window. Windows where the |:lcd| +command has not been used stick to the global current directory. When jumping +to another window the current directory will become the last specified local +current directory. If none was specified, the global current directory is +used. +When a |:cd| command is used, the current window will lose his local current +directory and will use the global current directory from now on. + +After using |:cd| the full path name will be used for reading and writing +files. On some networked file systems this may cause problems. The result of +using the full path name is that the file names currently in use will remain +referring to the same file. Example: If you have a file a:test and a +directory a:vim the commands ":e test" ":cd vim" ":w" will overwrite the file +a:test and not write a:vim/test. But if you do ":w test" the file a:vim/test +will be written, because you gave a new file name and did not refer to a +filename before the ":cd". + ============================================================================== 8. Editing binary files *edit-binary* @@ -1454,5 +1385,91 @@ It is also possible that you modified the file yourself, from another edit session or with another command (e.g., a filter command). Then you will know which version of the file you want to keep. +============================================================================== +11. File Searching *file-searching* + +{not available when compiled without the |+path_extra| feature} + +The file searching is currently used for the 'path', 'cdpath' and 'tags' +options. There are three different types of searching: + +1) Downward search: + Downward search uses the wildcards '*', '**' and possibly others + supported by your operating system. '*' and '**' are handled inside Vim, so + they work on all operating systems. + + The usage of '*' is quite simple: It matches 0 or more characters. + + '**' is more sophisticated: + - It ONLY matches directories. + - It matches up to 30 directories deep, so you can use it to search an + entire directory tree + - The maximum number of levels matched can be given by appending a number + to '**'. + Thus '/usr/**2' can match: > + /usr + /usr/include + /usr/include/sys + /usr/include/g++ + /usr/lib + /usr/lib/X11 + .... +< It does NOT match '/usr/include/g++/std' as this would be three + levels. + The allowed number range is 0 ('**0' is removed) to 255. + If the given number is smaller than 0 it defaults to 30, if it's + bigger than 255 it defaults to 255. + - '**' can only be at the end of the path or be followed by a path + separator or by a number and a path separator. + + You can combine '*' and '**' in any order: > + /usr/**/sys/* + /usr/*/sys/** + /usr/**2/sys/* + +2) Upward search: + Here you can give a directory and then search the directory tree upward for + a file. You could give stop-directories to limit the upward search. The + stop-directories are appended to the path (for the 'path' option) or to + the filename (for the 'tags' option) with a ';'. If you want several + stop-directories separate them with ';'. If you want no stop-directory + ("search upward till the root directory) just use ';'. > + /usr/include/sys;/usr +< will search in: > + /usr/include/sys + /usr/include + /usr +< + If you use a relative path the upward search is started in Vim's current + directory or in the directory of the current file (if the relative path + starts with './' and 'd' is not included in 'cpoptions'). + + If Vim's current path is /u/user_x/work/release and you do > + :set path=include;/u/user_x +< and then search for a file with |gf| the file is searched in: > + /u/user_x/work/release/include + /u/user_x/work/include + /u/user_x/include + +3) Combined up/downward search + If Vim's current path is /u/user_x/work/release and you do > + set path=**;/u/user_x +< and then search for a file with |gf| the file is searched in: > + /u/user_x/work/release/** + /u/user_x/work/** + /u/user_x/** +< + BE CAREFUL! This might consume a lot of time, as the search of + '/u/user_x/**' includes '/u/user_x/work/**' and + '/u/user_x/work/release/**'. So '/u/user_x/work/release/**' is searched + three and '/u/user_x/work/**' is searched two times. + + In the above example you might want to set path to: > + :set path=**,/u/user_x/** +< This searches: > + /u/user_x/work/release/** + /u/user_x/** +< This searches the same directories, but in a different order. + vim:tw=78:ts=8:ft=help:norl: diff --git a/runtime/doc/intro.txt b/runtime/doc/intro.txt index 0d3627c2f7..d984ce2594 100644 --- a/runtime/doc/intro.txt +++ b/runtime/doc/intro.txt @@ -1,4 +1,4 @@ -*intro.txt* For Vim version 7.0aa. Last change: 2004 Nov 18 +*intro.txt* For Vim version 7.0aa. Last change: 2004 Dec 16 VIM REFERENCE MANUAL by Bram Moolenaar @@ -278,7 +278,7 @@ the ideas from all these people: They keep Vim alive! In this documentation there are several references to other versions of Vi: - *Vi* + *Vi* *vi* Vi "the original". Without further remarks this is the version of Vi that appeared in Sun OS 4.x. ":version" returns "Version 3.7, 6/7/85". Sometimes other versions are referred diff --git a/runtime/doc/mbyte.txt b/runtime/doc/mbyte.txt index 41723de2aa..1e13bcf615 100644 --- a/runtime/doc/mbyte.txt +++ b/runtime/doc/mbyte.txt @@ -1,4 +1,4 @@ -*mbyte.txt* For Vim version 7.0aa. Last change: 2004 Jul 05 +*mbyte.txt* For Vim version 7.0aa. Last change: 2004 Dec 19 VIM REFERENCE MANUAL by Bram Moolenaar et al. @@ -328,6 +328,8 @@ u unicode same as ucs-2 u ucs2be same as ucs-2 (big endian) u ucs-2be same as ucs-2 (big endian) u ucs-4be same as ucs-4 (big endian) + default stands for the default value of 'encoding', depends on the + environment For the UCS codes the byte order matters. This is tricky, use UTF-8 whenever you can. The default is to use big-endian (most significant byte comes diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt index a888d92ae0..6d72604e87 100644 --- a/runtime/doc/options.txt +++ b/runtime/doc/options.txt @@ -1,4 +1,4 @@ -*options.txt* For Vim version 7.0aa. Last change: 2004 Dec 09 +*options.txt* For Vim version 7.0aa. Last change: 2004 Dec 19 VIM REFERENCE MANUAL by Bram Moolenaar @@ -1841,6 +1841,10 @@ A jump table for the options with a short description can be found at |Q_op|. there is one). This works very well for C programs. This flag is also used for other features, such as C-indenting. + *cpo-+* + + When included, a ":write file" command will reset the + 'modified' flag of the buffer, even though the buffer + itself may still be different from its file. cpo-star* * Use ":*" in the same way as ":@". When not included, ":*" is an alias for ":'<,'>", select the Visual area. @@ -2127,7 +2131,7 @@ A jump table for the options with a short description can be found at |Q_op|. with. See |encoding-names| for the possible values. NOTE: Changing this option will not change the encoding of the - existing text in Vim. It may cause multi-byte text to become invalid. + existing text in Vim. It may cause non-ASCII text to become invalid. It should normally be kept at its default value, or set when Vim starts up. See |multibyte|. @@ -2338,8 +2342,9 @@ A jump table for the options with a short description can be found at |Q_op|. old short name was 'fe', which is no longer used. *'fileencodings'* *'fencs'* -'fileencodings' 'fencs' string (default: "ucs-bom", "ucs-bom,utf-8,latin1" - when 'encoding' is set to a Unicode value) +'fileencodings' 'fencs' string (default: "ucs-bom", + "ucs-bom,utf-8,default,latin1" when + 'encoding' is set to a Unicode value) global {only available when compiled with the |+multi_byte| feature} @@ -2373,6 +2378,10 @@ A jump table for the options with a short description can be found at |Q_op|. An entry for an 8-bit encoding (e.g., "latin1") should be the last, because Vim cannot detect an error, thus the encoding is always accepted. + The special value "default" can be used for the encoding from the + environment. This is the default value for 'encoding'. It is useful + when 'encoding' is set to "utf-8" and your environment uses a + non-latin1 encoding, such as Russian. WRONG VALUES: WHAT'S WRONG: latin1,utf-8 "latin1" will always be used utf-8,ucs-bom,latin1 BOM won't be recognized in an utf-8 diff --git a/runtime/doc/os_mac.txt b/runtime/doc/os_mac.txt index 91eb64109a..10fd08503b 100644 --- a/runtime/doc/os_mac.txt +++ b/runtime/doc/os_mac.txt @@ -1,4 +1,4 @@ -*os_mac.txt* For Vim version 7.0aa. Last change: 2004 Jul 19 +*os_mac.txt* For Vim version 7.0aa. Last change: 2004 Dec 13 VIM REFERENCE MANUAL by Bram Moolenaar et al. @@ -71,6 +71,12 @@ Q: I can't enter non-ASCII character in Apple Terminal. A: Under Window Settings, Emulation, make sure that "Escape non-ASCII characters" is not checked. +Q: How do I start the GUI from the command line? +A: Assuming that Vim.app is located in /Applications: + open /Applications/Vim.app + Or: + /Applications/Vim.app/Contents/MacOS/Vim -g {arguments} + ============================================================================== 4. Mac Lack *mac-lack* diff --git a/runtime/doc/pattern.txt b/runtime/doc/pattern.txt index 9f215d700b..16e8890110 100644 --- a/runtime/doc/pattern.txt +++ b/runtime/doc/pattern.txt @@ -1,4 +1,4 @@ -*pattern.txt* For Vim version 7.0aa. Last change: 2004 Sep 07 +*pattern.txt* For Vim version 7.0aa. Last change: 2004 Dec 18 VIM REFERENCE MANUAL by Bram Moolenaar @@ -153,6 +153,7 @@ The offset gives the cursor position relative to the found match: s[-num] [num] characters to the left of the start of the match b[+num] [num] identical to s[+num] above (mnemonic: begin) b[-num] [num] identical to s[-num] above (mnemonic: begin) + ;{pattern} perform another searcn, see |//;| If a '-' or '+' is given but [num] is omitted, a count of one will be used. When including an offset with 'e', the search becomes inclusive (the diff --git a/runtime/doc/tags b/runtime/doc/tags index eb84af453a..64749f567e 100644 --- a/runtime/doc/tags +++ b/runtime/doc/tags @@ -6579,6 +6579,7 @@ version4.txt version4.txt /*version4.txt* version5.txt version5.txt /*version5.txt* version6.txt version6.txt /*version6.txt* version7.txt version7.txt /*version7.txt* +vi intro.txt /*vi* vi-differences vi_diff.txt /*vi-differences* vi: options.txt /*vi:* vi_diff.txt vi_diff.txt /*vi_diff.txt* @@ -6655,6 +6656,7 @@ w:var eval.txt /*w:var* warningmsg-variable eval.txt /*warningmsg-variable* white-space pattern.txt /*white-space* whitespace pattern.txt /*whitespace* +wildcard editing.txt /*wildcard* win16-!start gui_w16.txt /*win16-!start* win16-clipboard gui_w16.txt /*win16-clipboard* win16-colors gui_w16.txt /*win16-colors* @@ -6828,6 +6830,7 @@ zz scroll.txt /*zz* { motion.txt /*{* {Visual} intro.txt /*{Visual}* {address} cmdline.txt /*{address}* +{arglist} editing.txt /*{arglist}* {char1-char2} intro.txt /*{char1-char2}* {event} autocmd.txt /*{event}* {file} editing.txt /*{file}* diff --git a/runtime/doc/todo.txt b/runtime/doc/todo.txt index cd4868791e..86ff1a4a22 100644 --- a/runtime/doc/todo.txt +++ b/runtime/doc/todo.txt @@ -1,4 +1,4 @@ -*todo.txt* For Vim version 7.0aa. Last change: 2004 Dec 11 +*todo.txt* For Vim version 7.0aa. Last change: 2004 Dec 19 VIM REFERENCE MANUAL by Bram Moolenaar @@ -30,21 +30,18 @@ be worked on, but only if you sponsor Vim development. See |sponsor|. *known-bugs* -------------------- Known bugs and current work ----------------------- -":e " does not expand ~/file, very confusing compared to ":e ~/file". - -When no termcap/termlib library is found, check that compiling Vim works in -configure. Give an clear error message ("install termcap or ncurses-dev -package") when it doesn't. - -When doing ":w file" 'modified' is reset, but "u" sets it, while the file is -actually unchanged. Don't reset 'modified' when 'nocp' is set. +Win32: Cannot edit a file starting with # with --remote. (Giuseppe Bilotta, +Oct 6 2004) -Win32: "gvim -V100" should use dialog with scrollbar. +Add Makefile code to install *-it.1 manual pages in .../man/it/man1/*.1 -Using CTRL-A on "08" should not work like octal. (Matthew Duggan) +Win32: "gvim -V100" should use dialog with scrollbar. Using +gui_mch_dialog() would be good, but need to move display_errors() to after +creating the window, so that s_hwnd is valid. +How to add a scrollbar to the dialog? -Cursor onder laatste regel na ":g/pat/s//>" commando waardoor regels niet meer -wrappen. (Adri Verhoef, Dec 1) +Win32: tearoff menu window should have a scrollbar when it's taller than the +screen. Included NetBeans patches (Gordon Prieur, Oct 20) See two messages for list of changed files. Additionally: @@ -57,6 +54,8 @@ Included NetBeans patches (Gordon Prieur, Oct 20) For version 7.0: - Include many PATCHES: + - Patch for 'breakindent' option: repeat indent for wrapped line. (Vaclav + Smilauer, 2004 Sep 13, fix Oct 31) 7 Add 'taglistfiles' option, show file name and type when listing matching tags name with CTRL-D completion. Patch from Yegappan Lakshmanan. 2004 Jul 11 @@ -189,16 +188,19 @@ For version 7.0: Also see the "minigrep.vim" script on www.vim.org. -- Edit same file on Unix and from MS-Windows: no warning for swap file. - Drop the kvim support? There is no maintenance and "yzis" is supposed to replace it. - In the kvim/KDE source files fix the formatting. - KDE version is called "kvim". Make it "gvim", like the others? - Better configure check for KDE include files from Dan Sharp. - KDE GUI Input method patch. (Yasuhiro Matsumoto) (upd. Oct 25 2004) + +After including patches: - Change ga_room into ga_maxlen, so that it doesn't need to be incremented/decremented each time. -- For string variables, use length instead of NUL termination. +- For string variables, use length instead of NUL termination? + + can include NUL characters + - setline() will have problems with NL vs NUL. - new DATA TYPES: lists, dictionaries and function references. Check old patch from Robert Webb for array support. Add type checking? See ~/vim/ideas.txt. @@ -258,11 +260,6 @@ For version 7.0: before some time/date can be flushed. 'undopersist' gives maximum time to keep undo: "3h", "1d", "2w", "1y", etc. For the file use dot and extension: ".filename.un~" (like swapfile but "un~" instead of "swp"). -7 SWAP FILE CHANGE: When a dos format file was edited with ":e ++ff=unix", - Vim is killed and trying to recover the file, 'ff' will be dos. Same for - non-default fileencoding. (Miroslaw Dobrzanski-Neumann, Jul 17) - Should store the values in block 0 of the swap file, but that is an - incompatible change. 7 Support WINDOW TABS. Works like several pages, each with their own split windows. Patch for GTK 1.2 passed on by Christian Michon, 2004 Jan 6. Also for the console! @@ -285,6 +282,10 @@ For version 7.0: - make it possible to have 'defineAnnoType' also handle terminal colors. - send 'balloonText' events for the cursor position (using CursorHold ?) in terminal mode. +- ECLIPSE plugin. Problem is: the interface is very complicated. Need to + implement part in Java and then connect to Vim. Some hints from Alexandru + Roman, 2004 Dec 15. Should then also work with Oracle Jdeveloper, see JSR + 198 standard http://www.jcp.org/en/jsr/detail?id=198. - STICKY CURSOR: Add a way of scrolling that leaves the cursor where it is. Especially when using the scrollbar. Typing a cursor-movement command scrolls back to where the cursor is. @@ -324,25 +325,9 @@ For version 7.0: - "onemore" flag in 'virtualedit': move cursor past end of line. Patch by Mattias Flodin (2004 Jul 30) -Win32: When setting 'encoding' in a Vim server to "utf-8", and using "vim ---remote russian" in a console, "russian" should be converted from the console -encoding to utf-8. Send all remote messages in utf-8? Only on Win32? - Support ":set syntax=cpp.doxygen"? Suggested patch by Michael Geddes (9 Aug 2004). Should also work for 'filetype'. -Patch for 'breakindent' option: repeat indent for wrapped line. (Vaclav -Smilauer, 2004 Sep 13, fix Oct 31) - -":bufdo g/something/p" has the last match overwritten by the file info. -Example by Cesar Andalou (Nov 3). - -Win32: In 'fileencodings' allow using "acp" for the active codepage. Useful -value: "ucs-bom,utf-8,acp,latin1" - -Win32: Cannot edit a file starting with # with --remote. (Giuseppe Bilotta, -Oct 6 2004) - For manipulating buffers without opening a new window, support Virtual windows. Example: :virtwin let l = GetBufLine(4, 10) @@ -360,19 +345,13 @@ Win32: In the generated batch files, use $VIMRUNTIME if it's set. Examples by Mathias Michaelis (2004 Sep 6) Also place vimtutor.bat in %windir%? -Support ":enew filename" to edit a new buffer with a name. It's like "enew | -file filename" but without setting the alternate file to a buffer without a -name. (Charles Campbell) - Add gui_mch_browsedir() for Motif, KDE and Mac OS/X. -Add Makefile code to install *-it.1 manual pages in .../man/it/man1/*.1 - HTML indenting can be slow, find out why. Any way to do some kind of profiling for Vim script? Mac: problem with Xcode, Vim doesn't continue until the next click. -Apparently hanges in handle_drop(). A PostEvent() avoids it. (Da Woon Jung) +Apparently hangs in handle_drop(). A PostEvent() avoids it. (Da Woon Jung) Vi incompatibility: @@ -943,11 +922,6 @@ Macintosh: swap file. Then using ":write" (without making any changes) doesn't give a warning either. Should check for an existing swap file without creating one. -7 On MS-DOS or MS-Windows, when editing the same file over a network, the - drive letter is different, thus an existing swap file doesn't generate a - warning. Use some flag to indicate the swap file is in the same directory - as the original file? Could make b0_fname[] start with a special - character like ">". 7 When 'showbreak' is set, the amount of space a Tab occupies changes. Should work like 'showbreak' is inserted without changing the Tabs. 7 When there is a "help.txt" window in a session file, restoring that @@ -977,10 +951,6 @@ Macintosh: 9 dosinst.c: The DJGPP version can't uninstall the Uninstall registry key on Windows NT. How to install a .inf file on Windows NT and how to detect that Windows NT is being used? -8 When opening the same file on Unix and on MS-Windows, there is no - ATTENTION message, because the path in the swap file is different. Using - a relative path name will cause no ATTENTION for Vim 5.8. - Somehow add a flag that the swap file is in the same dir as the file? 8 When 'virtualedit' is "block,insert" and encoding is "utf-8", selecting a block of one double-wide character, then "d" deletes only half of it. 8 When 'virtualedit' is set, should "I" in blockwise visual mode also insert @@ -2658,12 +2628,14 @@ Incsearch: Searching: 8 Add a mechanism for recursiveness: "\(([^()]*\@@[^()]*)\)\@r". \@@ stands for "go recursive here" and \@r marks the recursive atom. -item stack to allow matching (). One side is "push X on +7 Add an item stack to allow matching (). One side is "push X on the stack if previous atom matched". Other side is "match with top of stack, pop it when it matches". Use "\@pX" and "\@m"? Example: \((\@p).\{-}\@m\)* 7 Add an option to accept a match at the cursor position. Also for search(). (Brett) +7 Add a flag to "/pat/" to discard an error. Useful to continue a mapping + when a search fails. Could be "/pat/E" (e is already used for an offset). 7 Add pattern item to use properties of Unicode characters. In Perl it's "\p{L}" for a letter. See Regular Expression Pocket Reference. 8 Would it be possible to allow ":23,45/pat/flags" to search for "pat" in @@ -2828,9 +2800,6 @@ Swap (.swp) files: twice (e.g. when using quickfix). Also try to make the name of the backup file the same as the actual file? Use the code for resolve()? -7 Store the options 'fileencoding', 'fileformat', etc. in the swapfile, - because they change what will be written to the file. Requires adding - another block to the swapfile. 7 When using 64 bit inode numbers, also store the top 32 bits. Add another field for this, using part of bo_fname[], to keep it compatible. 7 When editing a file on removable media, should put swap file somewhere @@ -3153,8 +3122,6 @@ Various improvements: 7 Add ModeMsgVisual, ModeMsgInsert, etc. so that each mode message can be highlighted differently. 8 Allow using "**" as a wildcard in commands like ":next" and ":args". -8 Provide a way to avoid wildcard expansion. Use double quotes, like in the - shell? :edit "my[file].txt" (currently works if there is no "myf.txt") 7 Add a message area for the user. Set some option to reserve space (above the command line?). Use an ":echouser" command to display the message (truncated to fit in the space). diff --git a/runtime/doc/version7.txt b/runtime/doc/version7.txt index 814752ba43..e5746fe54c 100644 --- a/runtime/doc/version7.txt +++ b/runtime/doc/version7.txt @@ -1,4 +1,4 @@ -*version7.txt* For Vim version 7.0aa. Last change: 2004 Dec 11 +*version7.txt* For Vim version 7.0aa. Last change: 2004 Dec 19 VIM REFERENCE MANUAL by Bram Moolenaar @@ -36,6 +36,20 @@ run into a problem when upgrading from Vim 6.x to 7.0 ":helpgrep" now uses a help window to display a match. +In an argument list double quotes could be used to include spaces in a file +name. This caused a difference between ":edit" and ":next" for escaping +double quotes and it is incompatible with some versions of Vi. + Command Vim 6.x file name Vim 7.x file name ~ + :edit foo\"888 'foo"888' 'foo"888' + :next foo\"888 'foo888' 'foo"888' + :next a\"b c\"d 'ab cd' 'a"b' and 'c"d' + +A ":write file" command no longer resets the 'modified' flag of the buffer, +unless the '+' flag is in 'cpoptions' |cpo-+|. This was illogical, since the +buffer is still modified compared to the original file. And when undoing +all changes the file would actually be marked modified. It does mean that +":quit" fails now. + Minor incompatibilities: @@ -61,6 +75,16 @@ Win32: The effect of the key depended on 'winaltkeys'. Now it depends on whether has been mapped or not. This allows mapping without changing 'winaltkeys'. +When using CTRL-A on "08" it became "018", which is illogical. Now it becomes +"9". The leading zero(s) is(are) removed to avoid the number becoming octal +after incrementing "009" to "010". + +When 'encoding' is set to a Unicode encoding, the value for 'fileencodings' +now includes "default" before "latin1". This means that for files with 8-bit +encodings the default is to use the encoding specified by the environment, if +possible. Previously latin1 would always be used, which is wrong in a +non-latin1 environment, such as Russian. + ============================================================================== NEW FEATURES *new-7* @@ -303,6 +327,18 @@ When foldtext() finds no text after removing the comment leader, use the second line of the fold. Helps for C-style /* */ comments where the first line is just "/*". +When editing the same file from two systems (e.g., Unix and MS-Windows) there +mostly was no warning for an existing swap file, because the name of the +edited file differs (e.g., y:\dir\file vs /home/me/dir/file). Added a flag to +the swap file to indicate it is in the same directory as the edited file. The +used path then doesn't matter and the check for editing the same file is much +more reliable. + +Client-server communication now supports 'encoding'. When setting 'encoding' +in a Vim server to "utf-8", and using "vim --remote fname" in a console, +"fname" is converted from the console encoding to utf-8. Also allows Vims +with different 'encoding' settings to exchange messages. + ============================================================================== COMPILE TIME CHANGES *compile-changes-7* @@ -506,4 +542,26 @@ When using "set laststatus=2 cmdheight=2" in the .gvimrc you may only get one line for the cmdline. (Christian Robinson) Invoke command_height() after the GUI has started up. +When completing a file name on the command line backslashes are required for +white space. Was only done for a space, not for a Tab. + +When configure could not find a terminal library, compiling continued for a +long time before reporting the problem. Added a configure check for tgetent() +being found in a library. + +When the cursor is on the first char of the last line a ":g/pat/s///" command +may cause the cursor to be displayed below the text. + +Win32: Editing a file with non-ASCII characters doesn't work when 'encoding' +is "utf-8". use _wfullpath() instead of _fullpath(). (Yu-sung Moon) + +When recovering the 'fileformat' and 'fileencoding' were taken from the +original file instead of from the swapfile. When the file didn't exist, was +empty or the option was changed (e.g., with ":e ++fenc=cp123 file") it could +be wrong. Now store 'fileformat' and 'fileencoding' in the swapfile and use +the values when recovering. + +":bufdo g/something/p" overwrites each last printed text line with the file +message for the next buffer. Temporarily clear 'shortmess' to avoid that. + vim:tw=78:ts=8:ft=help:norl: diff --git a/runtime/filetype.vim b/runtime/filetype.vim index 9465026374..66e6208e65 100644 --- a/runtime/filetype.vim +++ b/runtime/filetype.vim @@ -1,7 +1,7 @@ " Vim support file to detect file types " " Maintainer: Bram Moolenaar -" Last Change: 2004 Nov 18 +" Last Change: 2004 Dec 17 " Listen very carefully, I will say this only once if exists("did_load_filetypes") @@ -893,6 +893,9 @@ au BufNewFile,BufRead .muttrc*,*/.mutt/muttrc*,Muttrc setf muttrc " Natural au BufNewFile,BufRead *.NS[ACGLMNPS] setf natural +" Netrc +au BufNewFile,BufRead .netrc setf netrc + " Novell netware batch files au BufNewFile,BufRead *.ncf setf ncf @@ -1486,6 +1489,9 @@ au BufNewFile,BufRead *.stp setf stp " Standard ML au BufNewFile,BufRead *.sml setf sml +" Sudoers +au BufNewFile,BufRead /etc/sudoers,sudoers.tmp setf sudoers + " Tads (or Nroff) au BufNewFile,BufRead *.t \ if !FTnroff() | setf tads | endif diff --git a/runtime/ftplugin/make.vim b/runtime/ftplugin/make.vim index c7397da7a6..a947be1ad9 100644 --- a/runtime/ftplugin/make.vim +++ b/runtime/ftplugin/make.vim @@ -1,7 +1,7 @@ " Vim filetype plugin file " Language: Make " Maintainer: Bram Moolenaar -" Last Change: 2003 May 04 +" Last Change: 2004 Dec 17 " Only do this when not done yet for this buffer if exists("b:did_ftplugin") @@ -23,3 +23,6 @@ setlocal com=sO:#\ -,mO:#\ \ ,b:# " Set 'commentstring' to put the marker after a #. setlocal commentstring=#\ %s + +" Including files. +let &l:include = '^\s*include' diff --git a/runtime/makemenu.vim b/runtime/makemenu.vim index c9890074db..f866594a8d 100644 --- a/runtime/makemenu.vim +++ b/runtime/makemenu.vim @@ -1,6 +1,6 @@ " Script to define the syntax menu in synmenu.vim " Maintainer: Bram Moolenaar -" Last Change: 2004 Nov 20 +" Last Change: 2004 Dec 17 " This is used by "make menu" in the src directory. edit :p:h/synmenu.vim @@ -407,6 +407,7 @@ SynMenu Sh-S.Standard\ ML:sml SynMenu Sh-S.Stored\ Procedures:stp SynMenu Sh-S.Strace:strace SynMenu Sh-S.Subversion\ commit:svn +SynMenu Sh-S.Sudoers:sudoers SynMenu TUV.TADS:tads SynMenu TUV.Tags:tags diff --git a/runtime/syntax/2html.vim b/runtime/syntax/2html.vim index 008221400d..2a7a2b133f 100644 --- a/runtime/syntax/2html.vim +++ b/runtime/syntax/2html.vim @@ -1,6 +1,6 @@ " Vim syntax support file " Maintainer: Bram Moolenaar -" Last Change: 2004 Oct 15 +" Last Change: 2004 Dec 14 " (modified by David Ne\v{c}as (Yeti) ) " (XHTML support by Panagiotis Issaris ) @@ -211,7 +211,11 @@ let s:old_magic = &magic set magic if exists("use_xhtml") - exe "normal! a\n\e" + if s:html_encoding != "" + exe "normal! a\n\e" + else + exe "normal! a\n\e" + endif let s:tag_close = '/>' else let s:tag_close = '>' @@ -230,8 +234,8 @@ endif " HTML header, with the title and generator ;-). Left free space for the CSS, " to be filled at the end. -exe "normal! a\n\n\e" -exe "normal! a" . expand("%:p:~") . "\n\e" +exe "normal! a\n\e" +exe "normal! a\n" . expand("%:p:~") . "\n\e" exe "normal! a]\|>\|<\|"\)+\1\2+ge +%s+\(https\=://\S\{-}\)\(\([.,;:}]\=\(\s\|$\)\)\|[\\"'<>]\|>\|<\|"\)+\1\2+ge " The DTD if exists("html_use_css") - exe "normal! gg0i\n\e" + if exists("use_xhtml") + exe "normal! gg$a\n\e" + else + exe "normal! gg0i\n\e" + endif +endif + +if exists("use_xhtml") + exe "normal! gg/