diff --git a/Contents b/Contents index 97dc1b5545..127768e7e0 100644 --- a/Contents +++ b/Contents @@ -9,10 +9,10 @@ Vim Vi IMproved. A clone of the UNIX text editor Vi. Very useful messages, shows current file name in window title, on-line help, rectangular cut/paste, etc., etc., etc... - Version 7.2a. Also runs under UNIX, MSDOS and other systems. - vim72art.tgz contains the documentation and syntax files. - vim72abin.tgz contains the binaries. - vim72asrc.tgz contains the sources. + Version 7.2. Also runs under UNIX, MSDOS and other systems. + vim72rt.tgz contains the documentation and syntax files. + vim72bin.tgz contains the binaries. + vim72src.tgz contains the sources. Author: Bram Moolenaar et al. diff --git a/Filelist b/Filelist index aa423d9982..f5bb36b34a 100644 --- a/Filelist +++ b/Filelist @@ -516,6 +516,7 @@ RT_SCRIPTS = \ runtime/indent/*.vim \ runtime/indent/README.txt \ runtime/ftplugin/*.vim \ + runtime/ftplugin/logtalk.dict \ runtime/ftplugin/README.txt \ runtime/plugin/*.vim \ runtime/plugin/README.txt \ diff --git a/Makefile b/Makefile index 45568a9ebc..e7b63be9a8 100644 --- a/Makefile +++ b/Makefile @@ -69,7 +69,7 @@ all install uninstall tools config configure reconfig proto depend lint tags typ # Before creating an archive first delete all backup files, *.orig, etc. MAJOR = 7 -MINOR = 2a +MINOR = 2 # Uncomment this line if the Win32s version is to be included. DOSBIN_S = dosbin_s @@ -133,7 +133,7 @@ DOSBIN_S = dosbin_s # Win32 console version: # - Set environment for Visual C++ 2008 Express Edition: "msvc2008.bat". Or, # when using the Visual C++ Toolkit 2003: "msvcsetup.bat" (adjust the paths -# when necessary). +# when necessary). For Windows 98 the 2003 version is required. # - "nmake -f Make_mvc.mak" # - "rm testdir/*.out", "nmake -f Make_mvc.mak test" and check the output. # - Rename the executables to "vimw32.exe", "xxdw32.exe". diff --git a/README.txt b/README.txt index 6eece41973..19e59c61ea 100644 --- a/README.txt +++ b/README.txt @@ -1,4 +1,4 @@ -README.txt for version 7.2a of Vim: Vi IMproved. +README.txt for version 7.2 of Vim: Vi IMproved. WHAT IS VIM diff --git a/README_ami.txt b/README_ami.txt index 13fa67d626..e8c4f28454 100644 --- a/README_ami.txt +++ b/README_ami.txt @@ -1,4 +1,4 @@ -README_ami.txt for version 7.2a of Vim: Vi IMproved. +README_ami.txt for version 7.2 of Vim: Vi IMproved. This file explains the installation of Vim on Amiga systems. See README.txt for general information about Vim. diff --git a/README_amibin.txt b/README_amibin.txt index 24b9ef2e1c..8c3ce0be51 100644 --- a/README_amibin.txt +++ b/README_amibin.txt @@ -1,4 +1,4 @@ -README_amibin.txt for version 7.2a of Vim: Vi IMproved. +README_amibin.txt for version 7.2 of Vim: Vi IMproved. See "README.txt" for general information about Vim. See "README_ami.txt" for installation instructions for the Amiga. diff --git a/README_amisrc.txt b/README_amisrc.txt index 8732efb66e..21c614c197 100644 --- a/README_amisrc.txt +++ b/README_amisrc.txt @@ -1,4 +1,4 @@ -README_amisrc.txt for version 7.2a of Vim: Vi IMproved. +README_amisrc.txt for version 7.2 of Vim: Vi IMproved. See "README.txt" for general information about Vim. See "README_ami.txt" for installation instructions for the Amiga. diff --git a/README_bindos.txt b/README_bindos.txt index 593a925548..bc83328f1b 100644 --- a/README_bindos.txt +++ b/README_bindos.txt @@ -1,19 +1,19 @@ -README_bindos.txt for version 7.2a of Vim: Vi IMproved. +README_bindos.txt for version 7.2 of Vim: Vi IMproved. See "README.txt" for general information about Vim. See "README_dos.txt" for installation instructions for MS-DOS and MS-Windows. -These files are in the runtime archive (vim70rt.zip). +These files are in the runtime archive (vim72rt.zip). There are several binary distributions of Vim for the PC. You would normally pick only one of them, but it's also possible to install several. These ones are available (the version number may differ): - vim70d16.zip 16 bit DOS version - vim70d32.zip 32 bit DOS version - vim70w32.zip Windows 95/98/NT/etc. console version - gvim70.zip Windows 95/98/NT/etc. GUI version - gvim70ole.zip Windows 95/98/NT/etc. GUI version with OLE - gvim70_s.zip Windows 3.1 GUI version + vim72d16.zip 16 bit DOS version + vim72d32.zip 32 bit DOS version + vim72w32.zip Windows 95/98/NT/etc. console version + gvim72.zip Windows 95/98/NT/etc. GUI version + gvim72ole.zip Windows 95/98/NT/etc. GUI version with OLE + gvim72_s.zip Windows 3.1 GUI version -You MUST also get the runtime archive (vim70rt.zip). -The sources are also available (vim70src.zip). +You MUST also get the runtime archive (vim72rt.zip). +The sources are also available (vim72src.zip). diff --git a/README_dos.txt b/README_dos.txt index f4818b8a21..1f37cbb42b 100644 --- a/README_dos.txt +++ b/README_dos.txt @@ -1,4 +1,4 @@ -README_dos.txt for version 7.2a of Vim: Vi IMproved. +README_dos.txt for version 7.2 of Vim: Vi IMproved. This file explains the installation of Vim on MS-DOS and MS-Windows systems. See "README.txt" for general information about Vim. @@ -47,13 +47,13 @@ These are the normal steps to install Vim from the .zip archives: Binary and runtime Vim archives are normally unpacked in the same location, on top of each other. -2. Unpack the zip archives. This will create a new directory "vim\vim70", +2. Unpack the zip archives. This will create a new directory "vim\vim72", in which all the distributed Vim files are placed. Since the directory name includes the version number, it is unlikely that you overwrite existing files. Examples: - pkunzip -d gvim70.zip - unzip vim70w32.zip + pkunzip -d gvim72.zip + unzip vim72w32.zip You need to unpack the runtime archive and at least one of the binary archives. When using more than one binary version, be careful not to @@ -69,7 +69,7 @@ These are the normal steps to install Vim from the .zip archives: archive and follow the instructions in the documentation. 3. Change to the new directory: - cd vim\vim70 + cd vim\vim72 Run the "install.exe" program. It will ask you a number of questions about how you would like to have your Vim setup. Among these are: - You can tell it to write a "_vimrc" file with your preferences in the @@ -80,8 +80,8 @@ These are the normal steps to install Vim from the .zip archives: console or in a shell. You can select one of the directories in your $PATH. If you skip this, you can add Vim to the search path manually: The simplest is to add a line to your autoexec.bat. Examples: - set path=%path%;C:\vim\vim70 - set path=%path%;D:\editors\vim\vim70 + set path=%path%;C:\vim\vim72 + set path=%path%;D:\editors\vim\vim72 - Create entries for Vim on the desktop and in the Start menu. That's it! @@ -94,7 +94,7 @@ Remarks: point to the top directory of your Vim files. Example: set VIM=C:\editors\vim Vim version 6.0 will look for your vimrc file in $VIM, and for the runtime - files in $VIM/vim70. See ":help $VIM" for more information. + files in $VIM/vim72. See ":help $VIM" for more information. - To avoid confusion between distributed files of different versions and your own modified vim scripts, it is recommended to use this directory layout: @@ -105,14 +105,14 @@ Remarks: C:\vim\vimfiles\ftplugin\*.vim Filetype plugins C:\vim\... Other files you made. Distributed files: - C:\vim\vim70\vim.exe The Vim version 6.0 executable. - C:\vim\vim70\doc\*.txt The version 6.0 documentation files. - C:\vim\vim70\bugreport.vim A Vim version 6.0 script. - C:\vim\vim70\... Other version 6.0 distributed files. + C:\vim\vim72\vim.exe The Vim version 6.0 executable. + C:\vim\vim72\doc\*.txt The version 6.0 documentation files. + C:\vim\vim72\bugreport.vim A Vim version 6.0 script. + C:\vim\vim72\... Other version 6.0 distributed files. In this case the $VIM environment variable would be set like this: set VIM=C:\vim - Then $VIMRUNTIME will automatically be set to "$VIM\vim70". Don't add - "vim70" to $VIM, that won't work. + Then $VIMRUNTIME will automatically be set to "$VIM\vim72". Don't add + "vim72" to $VIM, that won't work. - You can put your Vim executable anywhere else. If the executable is not with the other Vim files, you should set $VIM. The simplest is to add a line @@ -136,8 +136,8 @@ Remarks: Select Properties. 5. In the Program tab, change the "Cmdline" to add "/c" and the name of the Vim executable. Examples: - C:\command.com /c C:\vim\vim70\vim.exe - C:\command.com /c D:\editors\vim\vim70\vim.exe + C:\command.com /c C:\vim\vim72\vim.exe + C:\command.com /c D:\editors\vim\vim72\vim.exe 6. Select the font, window size, etc. that you like. If this isn't possible, select "Advanced" in the Program tab, and deselect "MS-DOS mode". diff --git a/README_extra.txt b/README_extra.txt index 660b502daf..ef3c412d9d 100644 --- a/README_extra.txt +++ b/README_extra.txt @@ -1,4 +1,4 @@ -README_extra.txt for version 7.2a of Vim: Vi IMproved. +README_extra.txt for version 7.2 of Vim: Vi IMproved. The extra archive of Vim is to be used in combination with the source archive (vim-7.0-src.tar.gz). The extra archive is useless without it. diff --git a/README_lang.txt b/README_lang.txt index 9df9f7609e..825bedb163 100644 --- a/README_lang.txt +++ b/README_lang.txt @@ -1,4 +1,4 @@ -README_lang.txt for version 7.2a of Vim: Vi IMproved. +README_lang.txt for version 7.2 of Vim: Vi IMproved. This file contains files for non-English languages: - Translated messages. diff --git a/README_mac.txt b/README_mac.txt index 796ad01622..f61f8318b1 100644 --- a/README_mac.txt +++ b/README_mac.txt @@ -1,4 +1,4 @@ -README_mac.txt for version 7.2a of Vim: Vi IMproved. +README_mac.txt for version 7.2 of Vim: Vi IMproved. This file explains the installation of Vim on Macintosh systems. See "README.txt" for general information about Vim. diff --git a/README_ole.txt b/README_ole.txt index 8112136c5b..b8edafbe42 100644 --- a/README_ole.txt +++ b/README_ole.txt @@ -1,4 +1,4 @@ -README_ole.txt for version 7.2a of Vim: Vi IMproved. +README_ole.txt for version 7.2 of Vim: Vi IMproved. This archive contains gvim.exe with OLE interface and VisVim. This version of gvim.exe can also load a number of interface dynamically (you diff --git a/README_os2.txt b/README_os2.txt index a9e0a4299f..a8822c39d8 100644 --- a/README_os2.txt +++ b/README_os2.txt @@ -1,32 +1,32 @@ -README_os2.txt for version 7.2a of Vim: Vi IMproved. +README_os2.txt for version 7.2 of Vim: Vi IMproved. This file explains the installation of Vim on OS/2 systems. See "README.txt" for general information about Vim. NOTE: You will need two archives: - vim71rt.zip contains the runtime files (same as for the PC version) - vim71os2.zip contains the OS/2 executables + vim72rt.zip contains the runtime files (same as for the PC version) + vim72os2.zip contains the OS/2 executables 1. Go to the directory where you want to put the Vim files. Examples: cd C:\ cd D:\editors -2. Unpack the zip archives. This will create a new directory "vim/vim71", +2. Unpack the zip archives. This will create a new directory "vim/vim72", in which all the distributed Vim files are placed. Since the directory name includes the version number, it is unlikely that you overwrite existing files. Examples: - pkunzip -d vim71os2.zip - unzip vim71os2.zip + pkunzip -d vim72os2.zip + unzip vim72os2.zip After you unpacked the files, you can still move the whole directory tree to another location. 3. Add the directory where vim.exe is to your path. The simplest is to add a line to your autoexec.bat. Examples: - set path=%path%;C:\vim\vim71 - set path=%path%;D:\editors\vim\vim71 + set path=%path%;C:\vim\vim72 + set path=%path%;D:\editors\vim\vim72 That's it! @@ -41,10 +41,10 @@ Extra remarks: C:\vim\_viminfo Dynamic info for 'viminfo'. C:\vim\... Other files you made. Distributed files: - C:\vim\vim71\vim.exe The Vim version 7.1 executable. - C:\vim\vim71\doc\*.txt The version 7.1 documentation files. - C:\vim\vim71\bugreport.vim A Vim version 7.1 script. - C:\vim\vim71\... Other version 7.1 distributed files. + C:\vim\vim72\vim.exe The Vim version 7.1 executable. + C:\vim\vim72\doc\*.txt The version 7.1 documentation files. + C:\vim\vim72\bugreport.vim A Vim version 7.1 script. + C:\vim\vim72\... Other version 7.1 distributed files. In this case the $VIM environment variable would be set like this: set VIM=C:\vim diff --git a/README_os390.txt b/README_os390.txt index 0ce9dd8798..3cd10d146d 100644 --- a/README_os390.txt +++ b/README_os390.txt @@ -1,4 +1,4 @@ -README_os_390.txt for version 7.2a of Vim: Vi IMproved. +README_os_390.txt for version 7.2 of Vim: Vi IMproved. Welcome to the OS/390 Unix port of VIM. diff --git a/README_src.txt b/README_src.txt index 7079f3e06c..0e732c062d 100644 --- a/README_src.txt +++ b/README_src.txt @@ -1,4 +1,4 @@ -README_src.txt for version 7.2a of Vim: Vi IMproved. +README_src.txt for version 7.2 of Vim: Vi IMproved. The source archive contains the files needed to compile Vim on Unix systems. It is packed for Unix systems (NL line separator). It is also used for other diff --git a/README_srcdos.txt b/README_srcdos.txt index ef78029c66..d525619b93 100644 --- a/README_srcdos.txt +++ b/README_srcdos.txt @@ -1,8 +1,8 @@ -README_srcdos.txt for version 7.2a of Vim: Vi IMproved. +README_srcdos.txt for version 7.2 of Vim: Vi IMproved. See "README.txt" for general information about Vim. See "README_dos.txt" for installation instructions for MS-DOS and MS-Windows. -These files are in the runtime archive (vim70rt.zip). +These files are in the runtime archive (vim72rt.zip). The DOS source archive contains the files needed to compile Vim on MS-DOS or diff --git a/README_unix.txt b/README_unix.txt index 5338cb16e0..fb1d691def 100644 --- a/README_unix.txt +++ b/README_unix.txt @@ -1,4 +1,4 @@ -README_unix.txt for version 7.2a of Vim: Vi IMproved. +README_unix.txt for version 7.2 of Vim: Vi IMproved. This file explains the installation of Vim on Unix systems. See "README.txt" for general information about Vim. diff --git a/README_vms.txt b/README_vms.txt index d51339e9fb..95a0859792 100644 --- a/README_vms.txt +++ b/README_vms.txt @@ -1,4 +1,4 @@ -README_vms.txt for version 7.2a of Vim: Vi IMproved. +README_vms.txt for version 7.2 of Vim: Vi IMproved. This file explains the installation of Vim on VMS systems. See "README.txt" in the runtime archive for information about Vim. diff --git a/README_w32s.txt b/README_w32s.txt index 1b9774d366..3ba37b381f 100644 --- a/README_w32s.txt +++ b/README_w32s.txt @@ -1,4 +1,4 @@ -README_w32s.txt for version 7.2a of Vim: Vi IMproved. +README_w32s.txt for version 7.2 of Vim: Vi IMproved. This archive contains the gvim.exe that was specifically compiled for use in the Win32s subsystem in MS-Windows 3.1 and 3.11. diff --git a/nsis/gvim.nsi b/nsis/gvim.nsi index 8e247a3fe7..ab859e63c5 100644 --- a/nsis/gvim.nsi +++ b/nsis/gvim.nsi @@ -22,7 +22,7 @@ !define HAVE_NLS !define VER_MAJOR 7 -!define VER_MINOR 2a +!define VER_MINOR 2 # ----------- No configurable settings below this line ----------- diff --git a/runtime/autoload/ada.vim b/runtime/autoload/ada.vim index 46257010d0..ffd0ff84cc 100644 --- a/runtime/autoload/ada.vim +++ b/runtime/autoload/ada.vim @@ -2,13 +2,15 @@ " Description: Perform Ada specific completion & tagging. " Language: Ada (2005) " $Id$ -" Maintainer: Martin Krischik +" Maintainer: Martin Krischik +" Taylor Venable " Neil Bird +" Ned Okie " $Author$ " $Date$ -" Version: 4.2 +" Version: 4.6 " $Revision$ -" $HeadURL: https://svn.sourceforge.net/svnroot/gnuada/trunk/tools/vim/autoload/ada.vim $ +" $HeadURL: https://gnuada.svn.sourceforge.net/svnroot/gnuada/trunk/tools/vim/autoload/ada.vim $ " History: 24.05.2006 MK Unified Headers " 26.05.2006 MK ' should not be in iskeyword. " 16.07.2006 MK Ada-Mode as vim-ball @@ -17,6 +19,10 @@ " 05.11.2006 MK Bram suggested not to use include protection for " autoload " 05.11.2006 MK Bram suggested to save on spaces +" 08.07.2007 TV fix mapleader problems. +" 09.05.2007 MK Session just won't work no matter how much +" tweaking is done +" 19.09.2007 NO still some mapleader problems " Help Page: ft-ada-functions "------------------------------------------------------------------------------ @@ -425,30 +431,49 @@ function ada#Create_Tags (option) execute '!ctags --excmd=number ' . l:Filename endfunction ada#Create_Tags -function ada#Switch_Session (New_Session) "{{{1 - if a:New_Session != v:this_session - " - " We actualy got a new session - otherwise there - " is nothing to do. - " - if strlen (v:this_session) > 0 - execute 'mksession! ' . v:this_session +" Section: ada#Switch_Session {{{1 +" +function ada#Switch_Session (New_Session) + " + " you should not save to much date into the seession since they will + " be sourced + " + let l:sessionoptions=&sessionoptions + + try + set sessionoptions=buffers,curdir,folds,globals,resize,slash,tabpages,tabpages,unix,winpos,winsize + + if a:New_Session != v:this_session + " + " We actualy got a new session - otherwise there + " is nothing to do. + " + if strlen (v:this_session) > 0 + execute 'mksession! ' . v:this_session + endif + + let v:this_session = a:New_Session + + "if filereadable (v:this_session) + "execute 'source ' . v:this_session + "endif + + augroup ada_session + autocmd! + autocmd VimLeavePre * execute 'mksession! ' . v:this_session + augroup END + + "if exists ("g:Tlist_Auto_Open") && g:Tlist_Auto_Open + "TlistOpen + "endif + endif - - let v:this_session = a:New_Session - - if filereadable (v:this_session) - execute 'source ' . v:this_session - endif - - augroup ada_session - autocmd! - autocmd VimLeavePre * execute 'mksession! ' . v:this_session - augroup END - endif + finally + let &sessionoptions=l:sessionoptions + endtry return -endfunction ada#Switch_Session "}}}1 +endfunction ada#Switch_Session " Section: GNAT Pretty Printer folding {{{1 " @@ -546,18 +571,23 @@ function ada#Map_Menu (Text, Keys, Command) \ a:Keys . \" :" . a:Command . "" else + if exists("g:mapleader") + let l:leader = g:mapleader + else + let l:leader = '\' + endif execute \ "50amenu " . \ "Ada." . escape(a:Text, ' ') . - \ "" . escape(g:mapleader . "a" . a:Keys , '\') . + \ "" . escape(l:leader . "a" . a:Keys , '\') . \ " :" . a:Command . "" execute \ "nnoremap " . - \ escape(g:mapleader . "a" . a:Keys , '\') . + \ escape(l:leader . "a" . a:Keys , '\') . \" :" . a:Command execute \ "inoremap " . - \ escape(g:mapleader . "a" . a:Keys , '\') . + \ escape(l:leader . "a" . a:Keys , '\') . \" :" . a:Command endif return @@ -566,10 +596,15 @@ endfunction " Section: ada#Map_Popup {{{2 " function ada#Map_Popup (Text, Keys, Command) + if exists("g:mapleader") + let l:leader = g:mapleader + else + let l:leader = '\' + endif execute \ "50amenu " . \ "PopUp." . escape(a:Text, ' ') . - \ "" . escape(g:mapleader . "a" . a:Keys , '\') . + \ "" . escape(l:leader . "a" . a:Keys , '\') . \ " :" . a:Command . "" call ada#Map_Menu (a:Text, a:Keys, a:Command) diff --git a/runtime/autoload/adacomplete.vim b/runtime/autoload/adacomplete.vim index 28d68f63dc..8db4351ffd 100644 --- a/runtime/autoload/adacomplete.vim +++ b/runtime/autoload/adacomplete.vim @@ -5,9 +5,9 @@ " Maintainer: Martin Krischik " $Author$ " $Date$ -" Version: 4.2 +" Version: 4.6 " $Revision$ -" $HeadURL: https://svn.sourceforge.net/svnroot/gnuada/trunk/tools/vim/autoload/adacomplete.vim $ +" $HeadURL: https://gnuada.svn.sourceforge.net/svnroot/gnuada/trunk/tools/vim/autoload/adacomplete.vim $ " History: 24.05.2006 MK Unified Headers " 26.05.2006 MK improved search for begin of word. " 16.07.2006 MK Ada-Mode as vim-ball diff --git a/runtime/autoload/decada.vim b/runtime/autoload/decada.vim index 9f8aaf260d..fb5400e179 100644 --- a/runtime/autoload/decada.vim +++ b/runtime/autoload/decada.vim @@ -3,12 +3,12 @@ " Language: Ada (Dec Ada) " $Id$ " Copyright: Copyright (C) 2006 Martin Krischik -" Maintainer: Martin Krischik +" Maintainer: Martin Krischik " $Author$ " $Date$ -" Version: 4.2 +" Version: 4.6 " $Revision$ -" $HeadURL: https://svn.sourceforge.net/svnroot/gnuada/trunk/tools/vim/autoload/decada.vim $ +" $HeadURL: https://gnuada.svn.sourceforge.net/svnroot/gnuada/trunk/tools/vim/autoload/decada.vim $ " History: 21.07.2006 MK New Dec Ada " 15.10.2006 MK Bram's suggestion for runtime integration " 05.11.2006 MK Bram suggested not to use include protection for @@ -45,7 +45,7 @@ function decada#Set_Session (...) dict " {{{1 call ada#Switch_Session (a:1) elseif argc() == 0 && strlen (v:servername) > 0 call ada#Switch_Session ( - \ expand('~')[0:-2] . ".vimfiles.session]" . + \ expand('~')[0:-2] . ".vimfiles.session]decada_" . \ v:servername . ".vim") endif return diff --git a/runtime/autoload/getscript.vim b/runtime/autoload/getscript.vim index c1e1aa34a5..5a466cb88b 100644 --- a/runtime/autoload/getscript.vim +++ b/runtime/autoload/getscript.vim @@ -1,8 +1,8 @@ " --------------------------------------------------------------------- " getscript.vim " Author: Charles E. Campbell, Jr. -" Date: May 30, 2008 -" Version: 30 +" Date: Jul 10, 2008 +" Version: 31 " Installing: :help glvs-install " Usage: :help glvs " @@ -23,7 +23,7 @@ set cpo&vim if exists("g:loaded_getscript") finish endif -let g:loaded_getscript= "v30" +let g:loaded_getscript= "v31" " --------------------------- " Global Variables: {{{1 @@ -140,6 +140,12 @@ fun! getscript#GetLatestVimScripts() return endif + " insure that fnameescape() is available + if !exists("*fnameescape") + echoerr "GetLatestVimScripts needs fnameescape() (provided by 7.1.299 or later)" + return + endif + " Find the .../GetLatest subdirectory under the runtimepath for datadir in split(&rtp,',') + [''] if isdirectory(datadir."/GetLatest") @@ -181,7 +187,8 @@ fun! getscript#GetLatestVimScripts() " don't let any events interfere (like winmanager's, taglist's, etc) let eikeep= &ei - set ei=all + let hlskeep= &hls + set ei=all hls&vim " record current directory, change to datadir, open split window with " datafile @@ -316,6 +323,7 @@ fun! getscript#GetLatestVimScripts() " restore events and current directory exe "cd ".fnameescape(substitute(origdir,'\','/','ge')) let &ei= eikeep + let &hls= hlskeep setlocal nolz " call Dredir("BUFFER TEST (GetLatestVimScripts 2)","ls!") " call Dret("GetLatestVimScripts : did ".s:downloads." downloads") @@ -506,14 +514,14 @@ fun! s:GetOneScript(...) new|exe "silent r!".g:GetLatestVimScripts_wget." ".g:GetLatestVimScripts_options." ".s:Escape(sname)." ".s:Escape('http://vim.sf.net/scripts/download_script.php?src_id='.latestsrcid)|q else " call Decho("exe silent !".g:GetLatestVimScripts_wget." ".g:GetLatestVimScripts_options." ".s:Escape(sname)." ".s:Escape('http://vim.sf.net/scripts/download_script.php?src_id=')) - exe "silent !".g:GetLatestVimScripts_wget." ".g:GetLatestVimScripts_options." ".s:Escape(sname)." ".s:Escape('http://vim.sf.net/scripts/download_script.php?src_id=') + exe "silent !".g:GetLatestVimScripts_wget." ".g:GetLatestVimScripts_options." ".s:Escape(sname)." ".s:Escape('http://vim.sf.net/scripts/download_script.php?src_id=').latestsrcid endif " AutoInstall: only if doautoinstall has been requested by the plugin itself if doautoinstall " call Decho("attempting to do autoinstall: getcwd<".getcwd()."> filereadable(".sname.")=".filereadable(sname)) if filereadable(sname) - call Decho("exe silent !".g:GetLatestVimScripts_mv." ".s:Escape(sname)." ".s:Escape(s:autoinstall)) +" call Decho("exe silent !".g:GetLatestVimScripts_mv." ".s:Escape(sname)." ".s:Escape(s:autoinstall)) exe "silent !".g:GetLatestVimScripts_mv." ".s:Escape(sname)." ".s:Escape(s:autoinstall) let curdir = escape(substitute(getcwd(),'\','/','ge'),"|[]*'\" #") let installdir= curdir."/Installed" diff --git a/runtime/autoload/gnat.vim b/runtime/autoload/gnat.vim index 5f99450ef1..cebde8e1a4 100644 --- a/runtime/autoload/gnat.vim +++ b/runtime/autoload/gnat.vim @@ -3,12 +3,13 @@ " Language: Ada (GNAT) " $Id$ " Copyright: Copyright (C) 2006 Martin Krischik -" Maintainer: Martin Krischik +" Maintainer: Martin Krischi k +" Ned Okie " $Author$ " $Date$ -" Version: 4.2 +" Version: 4.6 " $Revision$ -" $HeadURL: https://svn.sourceforge.net/svnroot/gnuada/trunk/tools/vim/autoload/gnat.vim $ +" $HeadURL: https://gnuada.svn.sourceforge.net/svnroot/gnuada/trunk/tools/vim/autoload/gnat.vim $ " History: 24.05.2006 MK Unified Headers " 16.07.2006 MK Ada-Mode as vim-ball " 05.08.2006 MK Add session support @@ -16,6 +17,7 @@ " 05.11.2006 MK Bram suggested not to use include protection for " autoload " 05.11.2006 MK Bram suggested to save on spaces +" 19.09.2007 NO use project file only when there is a project " Help Page: compiler-gnat "------------------------------------------------------------------------------ @@ -71,13 +73,19 @@ function gnat#Set_Project_File (...) dict " {{{1 execute 'mksession! ' . v:this_session endif - if strlen (self.Project_File) > 0 - call ada#Switch_Session ( - \ expand('~') . "/vimfiles/session/" . - \ fnamemodify (self.Project_File, ":t:r") . ".vim") - else - call ada#Switch_Session ('') - endif + "if strlen (self.Project_File) > 0 + "if has("vms") + "call ada#Switch_Session ( + "\ expand('~')[0:-2] . ".vimfiles.session]gnat_" . + "\ fnamemodify (self.Project_File, ":t:r") . ".vim") + "else + "call ada#Switch_Session ( + "\ expand('~') . "/vimfiles/session/gnat_" . + "\ fnamemodify (self.Project_File, ":t:r") . ".vim") + "endif + "else + "call ada#Switch_Session ('') + "endif return endfunction gnat#Set_Project_File " }}}1 diff --git a/runtime/autoload/gzip.vim b/runtime/autoload/gzip.vim index 1ad29eaaa3..1245fdddc9 100644 --- a/runtime/autoload/gzip.vim +++ b/runtime/autoload/gzip.vim @@ -1,6 +1,6 @@ " Vim autoload file for editing compressed files. " Maintainer: Bram Moolenaar -" Last Change: 2008 May 29 +" Last Change: 2008 Jul 04 " These functions are used by the gzip plugin. @@ -153,9 +153,9 @@ fun gzip#write(cmd) let nmt = s:tempname(nm) if rename(nm, nmt) == 0 if exists("b:gzip_comp_arg") - call system(a:cmd . " " . b:gzip_comp_arg . " " . s:escape(nmt)) + call system(a:cmd . " " . b:gzip_comp_arg . " -- " . s:escape(nmt)) else - call system(a:cmd . " " . s:escape(nmt)) + call system(a:cmd . " -- " . s:escape(nmt)) endif call rename(nmt . "." . expand(":e"), nm) endif @@ -180,10 +180,10 @@ fun gzip#appre(cmd) if rename(nm, nmte) == 0 if &patchmode != "" && getfsize(nm . &patchmode) == -1 " Create patchmode file by creating the decompressed file new - call system(a:cmd . " -c " . s:escape(nmte) . " > " . s:escape(nmt)) + call system(a:cmd . " -c -- " . s:escape(nmte) . " > " . s:escape(nmt)) call rename(nmte, nm . &patchmode) else - call system(a:cmd . " " . s:escape(nmte)) + call system(a:cmd . " -- " . s:escape(nmte)) endif call rename(nmt, nm) endif diff --git a/runtime/autoload/netrw.vim b/runtime/autoload/netrw.vim index 6064a6570d..1e181d05d1 100644 --- a/runtime/autoload/netrw.vim +++ b/runtime/autoload/netrw.vim @@ -1,7 +1,7 @@ " netrw.vim: Handles file transfer and remote directory listing across " AUTOLOAD SECTION -" Date: Jun 12, 2008 -" Version: 125 +" Date: Aug 08, 2008 +" Version: 132 " Maintainer: Charles E Campbell, Jr " GetLatestVimScripts: 1075 1 :AutoInstall: netrw.vim " Copyright: Copyright (C) 1999-2008 Charles E. Campbell, Jr. {{{1 @@ -27,19 +27,13 @@ if !exists("s:NOTE") let s:WARNING = 1 let s:ERROR = 2 endif -let g:loaded_netrw = "v125" +let g:loaded_netrw = "v132" " sanity checks if v:version < 700 call netrw#ErrorMsg(s:WARNING,"you need vim version 7.0 or later for version ".g:loaded_netrw." of netrw",1) finish endif -if !exists("*shellescape") - call netrw#ErrorMsg(s:ERROR,"you need to upgade your vim so that it has shellescape()",64) -endif -if !exists("*fnameescape") - call netrw#ErrorMsg(s:ERROR,"you need to upgade your vim so that it has fnameescape()",65) -endif let s:keepcpo= &cpo setlocal cpo&vim @@ -82,7 +76,13 @@ if !exists("g:netrw_ftp_cmd") let g:netrw_ftp_cmd = "ftp" endif if !exists("g:netrw_http_cmd") - if executable("curl") + if executable("elinks") + let g:netrw_http_cmd = "elinks" + let g:netrw_http_xcmd= "-dump >" + elseif executable("links") + let g:netrw_http_cmd = "links" + let g:netrw_http_xcmd= "-dump >" + elseif executable("curl") let g:netrw_http_cmd = "curl -o" elseif executable("wget") let g:netrw_http_cmd = "wget -q -O" @@ -312,6 +312,9 @@ if !exists("g:netrw_sort_by") " alternatives: date size let g:netrw_sort_by= "name" endif +if !exists("g:netrw_sort_options") + let g:netrw_sort_options= "" +endif if !exists("g:netrw_sort_direction") " alternative: reverse (z y x ...) let g:netrw_sort_direction= "normal" @@ -362,6 +365,7 @@ endif if !exists("g:netrw_tmpfile_escape") let g:netrw_tmpfile_escape= ' &;' endif +let s:netrw_map_escape = "<|\n\r\\\\"" " BufEnter event ignored by decho when following variable is true " Has a side effect that doau BufReadPost doesn't work, so @@ -415,7 +419,7 @@ fun! s:NetrwOptionSave(vt) let {a:vt}netrw_twkeep = &l:tw " textwidth let {a:vt}netrw_wigkeep = &l:wig " wildignore if has("win32") && !has("win95") - let {a:vt}netrw_swfkeep= &l:swf " swapfile + let {a:vt}netrw_swfkeep = &l:swf " swapfile endif if &go =~ 'a' | silent! let {a:vt}netrw_regstar = @* | endif silent! let {a:vt}netrw_regslash= @/ @@ -428,7 +432,7 @@ endfun fun! s:NetrwOptionRestore(vt) " call Dfunc("s:NetrwOptionRestore(vt<".a:vt.">) win#".winnr()." buf#".bufnr("%")) if !exists("{a:vt}netrw_optionsave") -" call Decho("ro=".&ro." ma=".&ma." mod=".&mod." wrap=".&wrap) +" call Decho("ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap) " call Dret("s:NetrwOptionRestore : ".a:vt."netrw_optionsave doesn't exist") return endif @@ -492,7 +496,7 @@ fun! s:NetrwOptionRestore(vt) " call Decho("g:netrw_keepdir=".g:netrw_keepdir.": getcwd<".getcwd()."> acd=".&acd) " call Decho("fo=".&fo.(exists("&acd")? " acd=".&acd : " acd doesn't exist")) -" call Decho("ro=".&ro." ma=".&ma." mod=".&mod." wrap=".&wrap) +" call Decho("ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap) " call Dret("s:NetrwOptionRestore : win#".winnr()." buf#".bufnr("%")) endfun @@ -536,12 +540,12 @@ fun! netrw#NetrwClean(sys) for dir in split(&rtp,',') if filereadable(dir."/plugin/netrwPlugin.vim") " call Decho("removing netrw-related files from ".dir) - if s:System("delete",dir."/plugin/netrwPlugin.vim") |call netrw#ErrorMsg(1,"unable to remove ".dir."/plugin/netrwPlugin.vim",55) |endif - if s:System("delete",dir."/autoload/netrwFileHandlers.vim")|call netrw#ErrorMsg(1,"unable to remove ".dir."/autoload/netrwFileHandlers.vim",55)|endif - if s:System("delete",dir."/autoload/netrwSettings.vim") |call netrw#ErrorMsg(1,"unable to remove ".dir."/autoload/netrwSettings.vim",55) |endif - if s:System("delete",dir."/autoload/netrw.vim") |call netrw#ErrorMsg(1,"unable to remove ".dir."/autoload/netrw.vim",55) |endif - if s:System("delete",dir."/syntax/netrw.vim") |call netrw#ErrorMsg(1,"unable to remove ".dir."/syntax/netrw.vim",55) |endif - if s:System("delete",dir."/syntax/netrwlist.vim") |call netrw#ErrorMsg(1,"unable to remove ".dir."/syntax/netrwlist.vim",55) |endif + if s:NetrwDelete(dir."/plugin/netrwPlugin.vim") |call netrw#ErrorMsg(1,"unable to remove ".dir."/plugin/netrwPlugin.vim",55) |endif + if s:NetrwDelete(dir."/autoload/netrwFileHandlers.vim")|call netrw#ErrorMsg(1,"unable to remove ".dir."/autoload/netrwFileHandlers.vim",55)|endif + if s:NetrwDelete(dir."/autoload/netrwSettings.vim") |call netrw#ErrorMsg(1,"unable to remove ".dir."/autoload/netrwSettings.vim",55) |endif + if s:NetrwDelete(dir."/autoload/netrw.vim") |call netrw#ErrorMsg(1,"unable to remove ".dir."/autoload/netrw.vim",55) |endif + if s:NetrwDelete(dir."/syntax/netrw.vim") |call netrw#ErrorMsg(1,"unable to remove ".dir."/syntax/netrw.vim",55) |endif + if s:NetrwDelete(dir."/syntax/netrwlist.vim") |call netrw#ErrorMsg(1,"unable to remove ".dir."/syntax/netrwlist.vim",55) |endif let diddir= dir let diddel= diddel + 1 if !a:sys|break|endif @@ -704,8 +708,8 @@ fun! netrw#NetRead(mode,...) let uid_machine = g:netrw_machine endif endif -" call Decho("executing: !".g:netrw_rcp_cmd." ".s:netrw_rcpmode." ".shellescape(uid_machine.":".escape(b:netrw_fname,' ?&;')." ".tmpfile) - exe s:netrw_silentxfer."!".g:netrw_rcp_cmd." ".s:netrw_rcpmode." ".shellescape(uid_machine.":".escape(b:netrw_fname,' ?&;')." ".tmpfile) +" call Decho("executing: !".g:netrw_rcp_cmd." ".s:netrw_rcpmode." ".shellescape(uid_machine.":".b:netrw_fname,1)." ".shellescape(tmpfile,1)) + exe s:netrw_silentxfer."!".g:netrw_rcp_cmd." ".s:netrw_rcpmode." ".shellescape(uid_machine.":".b:netrw_fname,1)." ".shellescape(tmpfile,1)) let result = s:NetrwGetFile(readcmd, tmpfile, b:netrw_method) let b:netrw_lastfile = choice @@ -715,30 +719,36 @@ fun! netrw#NetRead(mode,...) " call Decho("read via ftp+.netrc (method #2)") let netrw_fname= b:netrw_fname call s:SaveBufVars()|new|call s:RestoreBufVars() + let filtbuf= bufnr("%") setlocal ff=unix - exe "put ='".g:netrw_ftpmode."'" -" call Decho("filter input: ".getline('.')) + put =g:netrw_ftpmode +" call Decho("filter input: ".getline(line("$"))) if exists("g:netrw_ftpextracmd") - exe "put ='".g:netrw_ftpextracmd."'" -" call Decho("filter input: ".getline('.')) + put =g:netrw_ftpextracmd +" call Decho("filter input: ".getline(line("$"))) endif - exe "put ='".'get \"'.netrw_fname.'\" '.tmpfile."'" -" call Decho("filter input: ".getline('.')) + call setline(line("$")+1,'get "'.netrw_fname.'" '.tmpfile) +" call Decho("filter input: ".getline(line("$"))) if exists("g:netrw_port") && g:netrw_port != "" -" call Decho("executing: %!".g:netrw_ftp_cmd." -i ".g:netrw_machine." ".g:netrw_port) - exe s:netrw_silentxfer."%!".g:netrw_ftp_cmd." -i ".g:netrw_machine." ".g:netrw_port +" call Decho("executing: %!".g:netrw_ftp_cmd." -i ".shellescape(g:netrw_machine." ".g:netrw_port,1)) + exe s:netrw_silentxfer."%!".g:netrw_ftp_cmd." -i ".shellescape(g:netrw_machine." ".g:netrw_port,1) else -" call Decho("executing: %!".g:netrw_ftp_cmd." -i ".g:netrw_machine) - exe s:netrw_silentxfer."%!".g:netrw_ftp_cmd." -i ".g:netrw_machine +" call Decho("executing: %!".g:netrw_ftp_cmd." -i ".shellescape(g:netrw_machine,1)) + exe s:netrw_silentxfer."%!".g:netrw_ftp_cmd." -i ".shellescape(g:netrw_machine,1) endif " If the result of the ftp operation isn't blank, show an error message (tnx to Doug Claar) if getline(1) !~ "^$" && !exists("g:netrw_quiet") && getline(1) !~ '^Trying ' - let debugkeep= &debug + let debugkeep = &debug setlocal debug=msg call netrw#ErrorMsg(s:ERROR,getline(1),4) - let &debug= debugkeep + let &debug = debugkeep endif - call s:SaveBufVars()|bd!|call s:RestoreBufVars() + call s:SaveBufVars() + bd! + if bufname("%") == "" && line("$") == 1 && getline("$") == "" + q! + endif + call s:RestoreBufVars() let result = s:NetrwGetFile(readcmd, tmpfile, b:netrw_method) let b:netrw_lastfile = choice @@ -749,6 +759,7 @@ fun! netrw#NetRead(mode,...) " call Decho("read via ftp+mipf (method #3)") let netrw_fname= escape(b:netrw_fname,g:netrw_fname_escape) call s:SaveBufVars()|new|call s:RestoreBufVars() + let filtbuf= bufnr("%") setlocal ff=unix if exists("g:netrw_port") && g:netrw_port != "" put ='open '.g:netrw_machine.' '.g:netrw_port @@ -773,7 +784,7 @@ fun! netrw#NetRead(mode,...) " call Decho("filter input: ".getline('.')) endif if exists("g:netrw_ftpextracmd") - exe "put ='".g:netrw_ftpextracmd."'" + put =g:netrw_ftpextracmd " call Decho("filter input: ".getline('.')) endif put ='get \"'.netrw_fname.'\" '.tmpfile @@ -806,8 +817,8 @@ fun! netrw#NetRead(mode,...) else let useport= "" endif -" call Decho("exe s:netrw_silentxfer.!".g:netrw_scp_cmd.useport." ".shellescape(g:netrw_machine.":".escape(b:netrw_fname,g:netrw_fname_escape))." ".tmpfile) - exe s:netrw_silentxfer."!".g:netrw_scp_cmd.useport." ".shellescape(g:netrw_machine.":".escape(b:netrw_fname,g:netrw_fname_escape))." ".tmpfile +" call Decho("exe s:netrw_silentxfer.!".g:netrw_scp_cmd.useport." ".shellescape(g:netrw_machine.":".b:netrw_fname,1)." ".shellescape(tmpfile,1)) + exe s:netrw_silentxfer."!".g:netrw_scp_cmd.useport." ".shellescape(g:netrw_machine.":".b:netrw_fname,1)." ".shellescape(tmpfile,1) let result = s:NetrwGetFile(readcmd, tmpfile, b:netrw_method) let b:netrw_lastfile = choice @@ -823,23 +834,27 @@ fun! netrw#NetRead(mode,...) return endif - let netrw_fname= escape(b:netrw_fname,g:netrw_fname_escape) - if match(b:netrw_fname,"#") == -1 - " simple wget -" call Decho('using simple wget (# not in b:netrw_fname<'.b:netrw_fname.">)") -" call Decho("exe ".s:netrw_silentxfer."!".g:netrw_http_cmd." ".shellescape(tmpfile)." ".shellescape("http://".g:netrw_machine.netrw_fname)) - exe s:netrw_silentxfer."!".g:netrw_http_cmd." ".shellescape(tmpfile)." ".shellescape("http://".g:netrw_machine.netrw_fname) + if match(b:netrw_fname,"#") == -1 || exists("g:netrw_http_xcmd") + " using g:netrw_http_cmd (usually elinks, links, curl, wget, or fetch) +" call Decho('using '.g:netrw_http_cmd.' (# not in b:netrw_fname<'.b:netrw_fname.">)") + if exists("g:netrw_http_xcmd") +" call Decho("exe ".s:netrw_silentxfer."!".g:netrw_http_cmd." ".shellescape("http://".g:netrw_machine.b:netrw_fname,1)." ".g:netrw_http_xcmd." ".shellescape(tmpfile,1)) + exe s:netrw_silentxfer."!".g:netrw_http_cmd." ".shellescape("http://".g:netrw_machine.b:netrw_fname,1)." ".g:netrw_http_xcmd." ".shellescape(tmpfile,1) + else +" call Decho("exe ".s:netrw_silentxfer."!".g:netrw_http_cmd." ".shellescape(tmpfile,1)." ".shellescape("http://".g:netrw_machine.b:netrw_fname,1)) + exe s:netrw_silentxfer."!".g:netrw_http_cmd." ".shellescape(tmpfile,1)." ".shellescape("http://".g:netrw_machine.b:netrw_fname,1) + endif let result = s:NetrwGetFile(readcmd, tmpfile, b:netrw_method) else - " wget plus a jump to an in-page marker (ie. http://abc/def.html#aMarker) + " wget/curl/fetch plus a jump to an in-page marker (ie. http://abc/def.html#aMarker) " call Decho(("wget/curl plus jump (# in b:netrw_fname<".b:netrw_fname.">)") - let netrw_html= substitute(netrw_fname,"#.*$","","") - let netrw_tag = substitute(netrw_fname,"^.*#","","") + let netrw_html= substitute(b:netrw_fname,"#.*$","","") + let netrw_tag = substitute(b:netrw_fname,"^.*#","","") " call Decho("netrw_html<".netrw_html.">") " call Decho("netrw_tag <".netrw_tag.">") -" call Decho("exe ".s:netrw_silentxfer."!".g:netrw_http_cmd." ".shellescape(tmpfile)." ".shellescape("http://".g:netrw_machine.netrw_html)) - exe s:netrw_silentxfer."!".g:netrw_http_cmd." ".shellescape(tmpfile)." ".shellescape("http://".g:netrw_machine.netrw_html) +" call Decho("exe ".s:netrw_silentxfer."!".g:netrw_http_cmd." ".shellescape(tmpfile,1)." ".shellescape("http://".g:netrw_machine.netrw_html,1)) + exe s:netrw_silentxfer."!".g:netrw_http_cmd." ".shellescape(tmpfile,1)." ".shellescape("http://".g:netrw_machine.netrw_html,1) let result = s:NetrwGetFile(readcmd, tmpfile, b:netrw_method) " call Decho('<\s*a\s*name=\s*"'.netrw_tag.'"/') exe 'norm! 1G/<\s*a\s*name=\s*"'.netrw_tag.'"/'."\" @@ -877,9 +892,8 @@ fun! netrw#NetRead(mode,...) " rsync: NetRead Method #7 {{{3 elseif b:netrw_method == 7 " call Decho("read via rsync (method #7)") - let netrw_fname= escape(b:netrw_fname,g:netrw_fname_escape) -" call Decho("exe ".s:netrw_silentxfer."!".g:netrw_rsync_cmd." ".shellescape(g:netrw_machine.":".netrw_fname)." ".tmpfile) - exe s:netrw_silentxfer."!".g:netrw_rsync_cmd." ".shellescape(g:netrw_machine.":".netrw_fname)." ".tmpfile +" call Decho("exe ".s:netrw_silentxfer."!".g:netrw_rsync_cmd." ".shellescape(g:netrw_machine.":".b:netrw_fname,1)." ".shellescape(tmpfile,1)) + exe s:netrw_silentxfer."!".g:netrw_rsync_cmd." ".shellescape(g:netrw_machine.":".b:netrw_fname,1)." ".shellescape(tmpfile,1) let result = s:NetrwGetFile(readcmd,tmpfile, b:netrw_method) let b:netrw_lastfile = choice @@ -888,7 +902,6 @@ fun! netrw#NetRead(mode,...) " fetch://[user@]host[:http]/path elseif b:netrw_method == 8 " call Decho("read via fetch (method #8)") - let netrw_fname= escape(b:netrw_fname,g:netrw_fname_escape) if g:netrw_fetch_cmd == "" if !exists("g:netrw_quiet") call netrw#ErrorMsg(s:ERROR,"fetch command not available",7) @@ -903,11 +916,11 @@ fun! netrw#NetRead(mode,...) " call Decho("read via fetch for ".netrw_option) if exists("g:netrw_uid") && g:netrw_uid != "" && exists("s:netrw_passwd") && s:netrw_passwd != "" -" call Decho("exe ".s:netrw_silentxfer."!".g:netrw_fetch_cmd." ".tmpfile." ".shellescape(netrw_option."://".g:netrw_uid.':'.s:netrw_passwd.'@'.g:netrw_machine."/".netrw_fname)) - exe s:netrw_silentxfer."!".g:netrw_fetch_cmd." ".tmpfile." ".shellescape(netrw_option."://".g:netrw_uid.':'.s:netrw_passwd.'@'.g:netrw_machine."/".netrw_fname) +" call Decho("exe ".s:netrw_silentxfer."!".g:netrw_fetch_cmd." ".shellescape(tmpfile,1)." ".shellescape(netrw_option."://".g:netrw_uid.':'.s:netrw_passwd.'@'.g:netrw_machine."/".b:netrw_fname,1)) + exe s:netrw_silentxfer."!".g:netrw_fetch_cmd." ".shellescape(tmpfile,1)." ".shellescape(netrw_option."://".g:netrw_uid.':'.s:netrw_passwd.'@'.g:netrw_machine."/".b:netrw_fname,1) else -" call Decho("exe ".s:netrw_silentxfer."!".g:netrw_fetch_cmd." ".tmpfile." ".shellescape(netrw_option."://".g:netrw_machine."/".netrw_fname)) - exe s:netrw_silentxfer."!".g:netrw_fetch_cmd." ".tmpfile." ".shellescape(netrw_option."://".g:netrw_machine."/".netrw_fname) +" call Decho("exe ".s:netrw_silentxfer."!".g:netrw_fetch_cmd." ".shellescape(tmpfile,1)." ".shellescape(netrw_option."://".g:netrw_machine."/".b:netrw_fname,1)) + exe s:netrw_silentxfer."!".g:netrw_fetch_cmd." ".shellescape(tmpfile,1)." ".shellescape(netrw_option."://".g:netrw_machine."/".b:netrw_fname,1) endif let result = s:NetrwGetFile(readcmd,tmpfile, b:netrw_method) @@ -918,9 +931,8 @@ fun! netrw#NetRead(mode,...) " sftp: NetRead Method #9 {{{3 elseif b:netrw_method == 9 " call Decho("read via sftp (method #9)") - let netrw_fname= escape(b:netrw_fname,g:netrw_fname_escape) -" call Decho("exe ".s:netrw_silentxfer."!".g:netrw_sftp_cmd." ".shellescape(g:netrw_machine.":".netrw_fname)." ".tmpfile) - exe s:netrw_silentxfer."!".g:netrw_sftp_cmd." ".shellescape(g:netrw_machine.":".netrw_fname)." ".tmpfile +" call Decho("exe ".s:netrw_silentxfer."!".g:netrw_sftp_cmd." ".shellescape(g:netrw_machine.":".b:netrw_fname,1)." ".tmpfile) + exe s:netrw_silentxfer."!".g:netrw_sftp_cmd." ".shellescape(g:netrw_machine.":".b:netrw_fname,1)." ".tmpfile let result = s:NetrwGetFile(readcmd, tmpfile, b:netrw_method) let b:netrw_lastfile = choice @@ -939,7 +951,7 @@ fun! netrw#NetRead(mode,...) endif if s:FileReadable(tmpfile) && tmpfile !~ '.tar.bz2$' && tmpfile !~ '.tar.gz$' && tmpfile !~ '.zip' && tmpfile !~ '.tar' && readcmd != 't' " call Decho("cleanup by deleting tmpfile<".tmpfile.">") - call s:System("delete",fnameescape(tmpfile)) + call s:NetrwDelete(fnameescape(tmpfile)) endif call s:NetrwOptionRestore("w:") @@ -975,17 +987,17 @@ fun! netrw#NetWrite(...) range " For binary writes, always write entire file. " (line numbers don't really make sense for that). " Also supports the writing of tar and zip files. -" call Decho("(write entire file) silent exe w! ".v:cmdarg." ".tmpfile) - silent exe "w! ".v:cmdarg." ".tmpfile +" call Decho("(write entire file) silent exe w! ".fnameescape(v:cmdarg)." ".fnameescape(tmpfile)) + silent exe "w! ".fnameescape(v:cmdarg)." ".fnameescape(tmpfile) elseif g:netrw_cygwin " write (selected portion of) file to temporary let cygtmpfile= substitute(tmpfile,'/cygdrive/\(.\)','\1:','') -" call Decho("(write selected portion) silent exe ".a:firstline."," . a:lastline . "w! ".v:cmdarg." ".cygtmpfile) - silent exe a:firstline."," . a:lastline . "w! ".v:cmdarg." ".cygtmpfile +" call Decho("(write selected portion) silent exe ".a:firstline."," . a:lastline . "w! ".fnameescape(v:cmdarg)." ".fnameescape(cygtmpfile)) + silent exe a:firstline."," . a:lastline . "w! ".fnameescape(v:cmdarg)." ".fnameescape(cygtmpfile) else " write (selected portion of) file to temporary -" call Decho("(write selected portion) silent exe ".a:firstline."," . a:lastline . "w! ".v:cmdarg." ".tmpfile) - silent exe a:firstline."," . a:lastline . "w! ".v:cmdarg." ".tmpfile +" call Decho("(write selected portion) silent exe ".a:firstline."," . a:lastline . "w! ".fnameescape(v:cmdarg)." ".fnameescape(tmpfile)) + silent exe a:firstline."," . a:lastline . "w! ".fnameescape(v:cmdarg)." ".fnameescape(tmpfile) endif if curbufname == "" @@ -1079,9 +1091,8 @@ fun! netrw#NetWrite(...) range let uid_machine = g:netrw_machine endif endif - let netrw_fname= escape(b:netrw_fname,g:netrw_fname_escape) -" call Decho("executing: !".g:netrw_rcp_cmd." ".s:netrw_rcpmode." ".shellescape(tmpfile)." ".shellescape(uid_machine.":".netrw_fname)) - exe s:netrw_silentxfer."!".g:netrw_rcp_cmd." ".s:netrw_rcpmode." ".shellescape(tmpfile)." ".shellescape(uid_machine.":".netrw_fname) +" call Decho("executing: !".g:netrw_rcp_cmd." ".s:netrw_rcpmode." ".shellescape(tmpfile,1)." ".shellescape(uid_machine.":".b:netrw_fname,1)) + exe s:netrw_silentxfer."!".g:netrw_rcp_cmd." ".s:netrw_rcpmode." ".shellescape(tmpfile,1)." ".shellescape(uid_machine.":".b:netrw_fname,1) let b:netrw_lastfile = choice "......................................... @@ -1092,21 +1103,21 @@ fun! netrw#NetWrite(...) range new " call Decho("filter input window#".winnr()) setlocal ff=unix - exe "put ='".g:netrw_ftpmode."'" -" call Decho("filter input: ".getline('.')) + put =g:netrw_ftpmode +" call Decho("filter input: ".getline('$')) if exists("g:netrw_ftpextracmd") - exe "put ='".g:netrw_ftpextracmd."'" -" call Decho("filter input: ".getline('.')) + put =g:netrw_ftpextracmd +" call Decho("filter input: ".getline("$")) endif - exe "put ='".'put \"'.tmpfile.'\" \"'.netrw_fname.'\"'."'" -" call Decho("filter input: ".getline('.')) + call setline(line("$")+1,'put "'.tmpfile.'" "'.netrw_fname.'"') +" call Decho("filter input: ".getline("$")) if exists("g:netrw_port") && g:netrw_port != "" -" call Decho("executing: %!".g:netrw_ftp_cmd." -i ".g:netrw_machine." ".g:netrw_port) - exe s:netrw_silentxfer."%!".g:netrw_ftp_cmd." -i ".g:netrw_machine." ".g:netrw_port +" call Decho("executing: %!".g:netrw_ftp_cmd." -i ".shellescape(g:netrw_machine,1)." ".shellescape(g:netrw_port,1)) + exe s:netrw_silentxfer."%!".g:netrw_ftp_cmd." -i ".shellescape(g:netrw_machine,1)." ".shellescape(g:netrw_port,1) else " call Decho("filter input window#".winnr()) -" call Decho("executing: %!".g:netrw_ftp_cmd." -i ".g:netrw_machine) - exe s:netrw_silentxfer."%!".g:netrw_ftp_cmd." -i ".g:netrw_machine +" call Decho("executing: %!".g:netrw_ftp_cmd." -i ".shellescape(g:netrw_machine,1)) + exe s:netrw_silentxfer."%!".g:netrw_ftp_cmd." -i ".shellescape(g:netrw_machine,1) endif " If the result of the ftp operation isn't blank, show an error message (tnx to Doug Claar) if getline(1) !~ "^$" @@ -1167,14 +1178,13 @@ fun! netrw#NetWrite(...) range " scp: NetWrite Method #4 {{{4 elseif b:netrw_method == 4 " call Decho("write via scp (method #4)") - let netrw_fname= escape(b:netrw_fname,g:netrw_fname_escape) if exists("g:netrw_port") && g:netrw_port != "" - let useport= " ".g:netrw_scpport." ".g:netrw_port + let useport= " ".g:netrw_scpport." ".fnameescape(g:netrw_port) else let useport= "" endif -" call Decho("exe ".s:netrw_silentxfer."!".g:netrw_scp_cmd.useport." ".shellescape(tmpfile)." ".shellescape(g:netrw_machine.":".netrw_fname)) - exe s:netrw_silentxfer."!".g:netrw_scp_cmd.useport." ".shellescape(tmpfile)." ".shellescape(g:netrw_machine.":".netrw_fname) +" call Decho("exe ".s:netrw_silentxfer."!".g:netrw_scp_cmd.useport." ".shellescape(tmpfile,1)." ".shellescape(g:netrw_machine.":".b:netrw_fname,1)) + exe s:netrw_silentxfer."!".g:netrw_scp_cmd.useport." ".shellescape(tmpfile,1)." ".shellescape(g:netrw_machine.":".b:netrw_fname,1) let b:netrw_lastfile = choice "......................................... @@ -1215,9 +1225,8 @@ fun! netrw#NetWrite(...) range " rsync: NetWrite Method #7 {{{4 elseif b:netrw_method == 7 " call Decho("write via rsync (method #7)") - let netrw_fname= escape(b:netrw_fname,g:netrw_fname_escape) -" call Decho("executing: !".g:netrw_rsync_cmd." ".tmpfile." ".g:netrw_machine.":".netrw_fname) - exe s:netrw_silentxfer."!".g:netrw_rsync_cmd." ".tmpfile." ".g:netrw_machine.":".netrw_fname +" call Decho("executing: !".g:netrw_rsync_cmd." ".shellescape(tmpfile,1)." ".shellescape(g:netrw_machine.":".b:netrw_fname,1)) + exe s:netrw_silentxfer."!".g:netrw_rsync_cmd." ".shellescape(tmpfile,1)." ".shellescape(g:netrw_machine.":".b:netrw_fname,1) let b:netrw_lastfile = choice "......................................... @@ -1235,8 +1244,8 @@ fun! netrw#NetWrite(...) range put ='put \"'.escape(tmpfile,'\').'\" '.netrw_fname " call Decho("filter input: ".getline('.')) norm! 1Gdd -" call Decho("executing: %!".g:netrw_sftp_cmd.' '.uid_machine) - exe s:netrw_silentxfer."%!".g:netrw_sftp_cmd.' '.uid_machine +" call Decho("executing: %!".g:netrw_sftp_cmd.' '.shellescape(uid_machine,1)) + exe s:netrw_silentxfer."%!".g:netrw_sftp_cmd.' '.shellescape(uid_machine,1) bd! let b:netrw_lastfile= choice @@ -1251,7 +1260,7 @@ fun! netrw#NetWrite(...) range " call Decho("cleanup") if s:FileReadable(tmpfile) " call Decho("tmpfile<".tmpfile."> readable, will now delete it") - call s:System("delete",tmpfile) + call s:NetrwDelete(tmpfile) endif call s:NetrwOptionRestore("w:") @@ -1286,10 +1295,11 @@ fun! netrw#NetSource(...) let i= 1 while i <= a:0 call netrw#NetRead(3,a:{i}) -" call Decho("s:netread_tmpfile<".s:netrw_tmpfile.">") +" call Decho("(netrw#NetSource) s:netread_tmpfile<".s:netrw_tmpfile.">") if s:FileReadable(s:netrw_tmpfile) -" call Decho("exe so ".s:netrw_tmpfile) - exe "so ".s:netrw_tmpfile +" call Decho("(netrw#NetSource) exe so ".fnameescape(s:netrw_tmpfile)) + exe "so ".fnameescape(s:netrw_tmpfile) +" call Decho("(netrw#NetSource) delete(".s:netrw_tmpfile.")") call delete(s:netrw_tmpfile) unlet s:netrw_tmpfile else @@ -1312,7 +1322,7 @@ fun! s:NetrwGetFile(readcmd, tfile, method) " readcmd=='t': simply do nothing if a:readcmd == 't' -" call Decho("ro=".&ro." ma=".&ma." mod=".&mod." wrap=".&wrap) +" call Decho("ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap) " call Dret("NetrwGetFile : skip read of <".a:tfile.">") return endif @@ -1336,8 +1346,8 @@ fun! s:NetrwGetFile(readcmd, tfile, method) else let tfile= a:tfile endif -" " call Decho("exe silent! keepalt file ".tfile) - exe "silent! keepalt file ".tfile +" call Decho("exe silent! keepalt file ".fnameescape(tfile)) + exe "silent! keepalt file ".fnameescape(tfile) " edit temporary file (ie. read the temporary file in) if rfile =~ '\.zip$' @@ -1358,8 +1368,8 @@ fun! s:NetrwGetFile(readcmd, tfile, method) endif " rename buffer back to remote filename -" call Decho("exe silent! keepalt file ".escape(rfile,' ')) - exe "silent! keepalt file ".escape(rfile,' ') +" call Decho("exe silent! keepalt file ".fnameescape(rfile)) + exe "silent! keepalt file ".fnameescape(rfile) if a:method == 5 set ft=html else @@ -1374,14 +1384,14 @@ fun! s:NetrwGetFile(readcmd, tfile, method) " call Decho("read file<".a:tfile."> after current line") let curline = line(".") let lastline= line("$") -" call Decho("exe<".a:readcmd." ".v:cmdarg." ".a:tfile."> line#".curline) - exe a:readcmd." ".v:cmdarg." ".a:tfile +" call Decho("exe<".a:readcmd." ".fnameescape(v:cmdarg)." ".fnameescape(a:tfile)."> line#".curline) + exe a:readcmd." ".fnameescape(v:cmdarg)." ".fnameescape(a:tfile) let line1= curline + 1 let line2= line("$") - lastline + 1 else " not readable -" call Decho("ro=".&ro." ma=".&ma." mod=".&mod." wrap=".&wrap) +" call Decho("ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap) " call Decho("tfile<".a:tfile."> not readable") call netrw#ErrorMsg(s:WARNING,"file <".a:tfile."> not readable",9) " call Dret("NetrwGetFile : tfile<".a:tfile."> not readable") @@ -1406,7 +1416,7 @@ fun! s:NetrwGetFile(readcmd, tfile, method) " make sure file is being displayed " redraw! -" call Decho("ro=".&ro." ma=".&ma." mod=".&mod." wrap=".&wrap) +" call Decho("ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap) " call Dret("NetrwGetFile") endfun @@ -1664,6 +1674,7 @@ endfun fun! s:BrowserMaps(islocal) " call Dfunc("s:BrowserMaps(islocal=".a:islocal.") b:netrw_curdir<".b:netrw_curdir.">") if a:islocal +" call Decho("make local maps") nnoremap :call netrw#LocalBrowseCheck(NetrwBrowseChgDir(1,NetrwGetWord())) nnoremap - :exe "norm! 0"call netrw#LocalBrowseCheck(NetrwBrowseChgDir(1,'../')) nnoremap a :call NetrwHide(1) @@ -1704,6 +1715,7 @@ fun! s:BrowserMaps(islocal) nnoremap U :call NetrwBookmarkDir(5,expand("%")) nnoremap v :call NetrwSplit(5) nnoremap x :call netrw#NetrwBrowseX(NetrwBrowseChgDir(1,NetrwGetWord(),0),0)" + nnoremap % :call NetrwOpenFile(1) if !hasmapto('NetrwHideEdit') nmap NetrwHideEdit endif @@ -1718,23 +1730,25 @@ fun! s:BrowserMaps(islocal) if s:didstarstar || !mapcheck("","n") nnoremap :Pexplore endif + let mapsafecurdir = escape(b:netrw_curdir, s:netrw_map_escape) if g:netrw_mousemaps == 1 nnoremap :call NetrwLeftmouse(1) nnoremap :call NetrwPrevWinOpen(1) nnoremap :call NetrwMarkFile(1,NetrwGetWord()) - exe 'nnoremap :call NetrwLocalRm("'.b:netrw_curdir.'")' - exe 'vnoremap :call NetrwLocalRm("'.b:netrw_curdir.'")' + exe 'nnoremap :call NetrwLocalRm("'.mapsafecurdir.'")' + exe 'vnoremap :call NetrwLocalRm("'.mapsafecurdir.'")' endif - exe 'nnoremap :call NetrwLocalRm("'.b:netrw_curdir.'")' - exe 'vnoremap :call NetrwLocalRm("'.b:netrw_curdir.'")' - exe 'nnoremap D :call NetrwLocalRm("'.b:netrw_curdir.'")' - exe 'vnoremap D :call NetrwLocalRm("'.b:netrw_curdir.'")' - exe 'nnoremap R :call NetrwLocalRename("'.b:netrw_curdir.'")' - exe 'vnoremap R :call NetrwLocalRename("'.b:netrw_curdir.'")' + exe 'nnoremap :call NetrwLocalRm("'.mapsafecurdir.'")' + exe 'vnoremap :call NetrwLocalRm("'.mapsafecurdir.'")' + exe 'nnoremap D :call NetrwLocalRm("'.mapsafecurdir.'")' + exe 'vnoremap D :call NetrwLocalRm("'.mapsafecurdir.'")' + exe 'nnoremap R :call NetrwLocalRename("'.mapsafecurdir.'")' + exe 'vnoremap R :call NetrwLocalRename("'.mapsafecurdir.'")' exe 'nnoremap m :call NetrwMakeDir("")' nnoremap :he netrw-quickhelp else " remote +" call Decho("make remote maps") call s:RemotePathAnalysis(b:netrw_curdir) nnoremap :call NetrwBrowse(0,NetrwBrowseChgDir(0,NetrwGetWord())) nnoremap :call NetrwRefresh(0,NetrwBrowseChgDir(0,'./')) @@ -1775,6 +1789,7 @@ fun! s:BrowserMaps(islocal) nnoremap U :call NetrwBookmarkDir(5,b:netrw_curdir) nnoremap v :call NetrwSplit(2) nnoremap x :call netrw#NetrwBrowseX(NetrwBrowseChgDir(0,NetrwGetWord()),1) + nnoremap % :call NetrwOpenFile(0) if !hasmapto('NetrwHideEdit') nmap NetrwHideEdit endif @@ -1782,22 +1797,26 @@ fun! s:BrowserMaps(islocal) if !hasmapto('NetrwRefresh') nmap NetrwRefresh endif + + let mapsafepath = escape(s:path, s:netrw_map_escape) + let mapsafeusermach = escape(s:user.s:machine, s:netrw_map_escape) + nnoremap NetrwRefresh :call NetrwRefresh(0,NetrwBrowseChgDir(0,'./')) if g:netrw_mousemaps == 1 nnoremap :call NetrwLeftmouse(0) nnoremap :call NetrwPrevWinOpen(0) nnoremap :call NetrwMarkFile(0,NetrwGetWord()) - exe 'nnoremap :call NetrwRemoteRm("'.s:user.s:machine.'","'.s:path.'")' - exe 'vnoremap :call NetrwRemoteRm("'.s:user.s:machine.'","'.s:path.'")' + exe 'nnoremap :call NetrwRemoteRm("'.mapsafeusermach.'","'.mapsafepath.'")' + exe 'vnoremap :call NetrwRemoteRm("'.mapsafeusermach.'","'.mapsafepath.'")' endif - exe 'nnoremap :call NetrwRemoteRm("'.s:user.s:machine.'","'.s:path.'")' - exe 'vnoremap :call NetrwRemoteRm("'.s:user.s:machine.'","'.s:path.'")' - exe 'nnoremap d :call NetrwMakeDir("'.s:user.s:machine.'")' - exe 'nnoremap D :call NetrwRemoteRm("'.s:user.s:machine.'","'.s:path.'")' - exe 'vnoremap D :call NetrwRemoteRm("'.s:user.s:machine.'","'.s:path.'")' - exe 'nnoremap R :call NetrwRemoteRename("'.s:user.s:machine.'","'.s:path.'")' - exe 'vnoremap R :call NetrwRemoteRename("'.s:user.s:machine.'","'.s:path.'")' - nnoremap :he netrw-browse-cmds + exe 'nnoremap :call NetrwRemoteRm("'.mapsafeusermach.'","'.mapsafepath.'")' + exe 'vnoremap :call NetrwRemoteRm("'.mapsafeusermach.'","'.mapsafepath.'")' + exe 'nnoremap d :call NetrwMakeDir("'.mapsafeusermach.'")' + exe 'nnoremap D :call NetrwRemoteRm("'.mapsafeusermach.'","'.mapsafepath.'")' + exe 'vnoremap D :call NetrwRemoteRm("'.mapsafeusermach.'","'.mapsafepath.'")' + exe 'nnoremap R :call NetrwRemoteRename("'.mapsafeusermach.'","'.mapsafepath.'")' + exe 'vnoremap R :call NetrwRemoteRename("'.mapsafeusermach.'","'.mapsafepath.'")' + nnoremap :he netrw-quickhelp endif call s:SetRexDir(a:islocal,b:netrw_curdir) " call Dret("s:BrowserMaps") @@ -1850,7 +1869,7 @@ fun! s:NetrwBookmarkDir(chg,curdir) " change to the bookmarked directory " call Decho("(user: ) change to the bookmarked directory") if exists("g:NETRW_BOOKMARKDIR_{v:count}") - exe "e ".g:NETRW_BOOKMARKDIR_{v:count} + exe "e ".fnameescape(g:NETRW_BOOKMARKDIR_{v:count}) else echomsg "Sorry, bookmark#".v:count." doesn't exist!" endif @@ -1921,8 +1940,8 @@ fun! s:NetrwBookmarkDir(chg,curdir) setlocal nomod " call Decho("setlocal nomod") endif -" call Decho("exe e! ".g:NETRW_DIRHIST_{g:NETRW_DIRHIST_CNT}) - exe "e! ".g:NETRW_DIRHIST_{g:NETRW_DIRHIST_CNT} +" " call Decho("exe e! ".fnameescape(g:NETRW_DIRHIST_{g:NETRW_DIRHIST_CNT})) + exe "e! ".fnameescape(g:NETRW_DIRHIST_{g:NETRW_DIRHIST_CNT}) else let g:NETRW_DIRHIST_CNT= ( g:NETRW_DIRHIST_CNT + 1 ) % g:netrw_dirhistmax echo "Sorry, no predecessor directory exists yet" @@ -1942,8 +1961,8 @@ fun! s:NetrwBookmarkDir(chg,curdir) setlocal nomod " call Decho("setlocal nomod") endif -" call Decho("exe e! ".g:NETRW_DIRHIST_{g:NETRW_DIRHIST_CNT}) - exe "e! ".g:NETRW_DIRHIST_{g:NETRW_DIRHIST_CNT} +" call Decho("exe e! ".fnameescape(g:NETRW_DIRHIST_{g:NETRW_DIRHIST_CNT})) + exe "e! ".fnameescape(g:NETRW_DIRHIST_{g:NETRW_DIRHIST_CNT}) else let g:NETRW_DIRHIST_CNT= ( g:NETRW_DIRHIST_CNT - 1 ) % g:netrw_dirhistmax if g:NETRW_DIRHIST_CNT < 0 @@ -2008,7 +2027,7 @@ fun! s:NetrwBrowse(islocal,dirname) if exists("s:netrw_skipbrowse") unlet s:netrw_skipbrowse -" call Decho("ro=".&ro." ma=".&ma." mod=".&mod." wrap=".&wrap) +" call Decho("ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap) " call Dret("s:NetrwBrowse : s:netrw_skipbrowse=".s:netrw_skipbrowse) return endif @@ -2055,13 +2074,13 @@ fun! s:NetrwBrowse(islocal,dirname) setlocal ma noro " call Decho("setlocal ma noro") let b:netrw_curdir= a:dirname -" call Decho("exe silent! keepalt file ".s:method."://".s:user.s:machine."/".fnameescape(s:path)." (bt=".&bt.")") - exe "silent! keepalt file ".s:method."://".s:user.s:machine."/".fnameescape(s:path) - exe "silent keepalt doau BufReadPre ".s:fname +" call Decho("exe silent! keepalt file ".fnameescape(s:method."://".s:user.s:machine."/".s:path)." (bt=".&bt.")") + exe "silent! keepalt file ".fnameescape(s:method."://".s:user.s:machine."/".s:path) + exe "silent keepalt doau BufReadPre ".fnameescape(s:fname) silent call netrw#NetRead(2,s:method."://".s:user.s:machine."/".s:path) if s:path !~ '.tar.bz2$' && s:path !~ '.tar.gz' " netrw.vim and tar.vim have already handled decompression of the tarball; avoiding gzip.vim error - exe "silent keepalt doau BufReadPost ".s:fname + exe "silent keepalt doau BufReadPost ".fnameescape(s:fname) endif " save certain window-oriented variables into buffer-oriented variables {{{3 @@ -2069,7 +2088,7 @@ fun! s:NetrwBrowse(islocal,dirname) call s:NetrwOptionRestore("w:") setlocal ma nomod -" call Decho("ro=".&ro." ma=".&ma." mod=".&mod." wrap=".&wrap) +" call Decho("ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap) " call Dret("s:NetrwBrowse : file<".s:fname.">") return endif @@ -2099,7 +2118,7 @@ fun! s:NetrwBrowse(islocal,dirname) if reusing call s:NetrwOptionRestore("w:") setlocal noma nomod nowrap -" call Decho("ro=".&ro." ma=".&ma." mod=".&mod." wrap=".&wrap) +" call Decho("ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap) " call Dret("s:NetrwBrowse : re-using buffer") return endif @@ -2150,7 +2169,7 @@ fun! s:NetrwBrowse(islocal,dirname) call s:NetrwOptionRestore("w:") setlocal noma nomod nowrap let b:netrw_curdir= dirname -" call Decho("ro=".&ro." ma=".&ma." mod=".&mod." wrap=".&wrap) +" call Decho("ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap) " call Dret("s:NetrwBrowse : reusing buffer#".(exists("bufnum")? bufnum : 'N/A')."<".dirname."> getcwd<".getcwd().">") return endif @@ -2188,7 +2207,7 @@ fun! s:NetrwBrowse(islocal,dirname) endif call s:NetrwOptionRestore("w:") setlocal noma nomod nowrap -" call Decho("ro=".&ro." ma=".&ma." mod=".&mod." wrap=".&wrap) +" call Decho("ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap) " call Dret("s:NetrwBrowse : badly formatted dirname<".dirname.">") return endif @@ -2202,7 +2221,7 @@ fun! s:NetrwBrowse(islocal,dirname) call s:BrowserMaps(a:islocal) call s:PerformListing(a:islocal) -" call Decho("ro=".&ro." ma=".&ma." mod=".&mod." wrap=".&wrap) +" call Decho("ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap) " call Dret("s:NetrwBrowse : did PerformListing") return endfun @@ -2299,14 +2318,15 @@ fun! s:NetrwGetBuffer(islocal,dirname) " note: !~ was used just below, but that means using ../ to go back would match (ie. abc/def/ and abc/ matches) if bufnum > 0 && bufname(bufnum) != dirname && bufname(bufnum) != '.' " handle approximate matches -" call Decho(" handling approx match: bufnum#%d<".bufname(bufnum)."> approx= dirname<".dirname.">") +" call Decho(" handling approx match: bufnum#%d<".bufname(bufnum)."> approx=dirname<".dirname.">") let ibuf = 1 let buflast = bufnr("$") " call Decho(" findbuf2: buflast=".buflast) while ibuf <= buflast let bname= substitute(bufname(ibuf),'\\','/','g') + let bname= substitute(bname,'.\zs/$','','') " call Decho(" findbuf3: dirname<".dirname."> bufname(".ibuf.")<".bname.">") - if bname != '' && bname !~ '/' && dirname =~ '/'.bname.'/\=$' | break | endif + if bname != '' && dirname =~ '/'.bname.'/\=$' | break | endif if bname =~ '^'.dirname.'/\=$' | break | endif if dirname =~ '^'.bname.'/$' | break | endif let ibuf= ibuf + 1 @@ -2336,8 +2356,8 @@ fun! s:NetrwGetBuffer(islocal,dirname) let s:netrw_treelistnum= s:netrw_treelistnum + 1 endif let w:netrw_treebufnr= bufnr("%") -" call Decho(" exe silent! keepalt file NetrwTreeListing ".s:netrw_treelistnum) - exe 'silent! keepalt file NetrwTreeListing\ '.s:netrw_treelistnum +" call Decho(" exe silent! keepalt file NetrwTreeListing ".fnameescape(s:netrw_treelistnum)) + exe 'silent! keepalt file NetrwTreeListing\ '.fnameescape(s:netrw_treelistnum) nnoremap [ :silent call TreeListMove('[') nnoremap ] :silent call TreeListMove(']') nnoremap [[ :silent call TreeListMove('[') @@ -2365,7 +2385,8 @@ fun! s:NetrwGetBuffer(islocal,dirname) exe "b ".bufnum endif if bufname("%") == '.' - exe "silent! keepalt file ".escape(getcwd(),' ') +" call Decho("exe silent! keepalt file ".fnameescape(getcwd())) + exe "silent! keepalt file ".fnameescape(getcwd()) endif let &ei= eikeep if line("$") <= 1 @@ -2393,7 +2414,8 @@ fun! s:NetrwGetBuffer(islocal,dirname) " call Decho("--do netrw settings: make this buffer not-a-file, modifiable, not line-numbered, etc--") let fname= expand("%") call s:NetrwListSettings(a:islocal) - exe "keepalt file ".escape(fname,' ') +" call Decho("exe keepalt file ".fnameescape(fname)) + exe "keepalt file ".fnameescape(fname) " delete all lines from buffer {{{3 " call Decho("--delete all lines from buffer--") @@ -2502,8 +2524,13 @@ fun! s:NetrwGetWord() norm! ma endif let rega= @a - call cursor(line("."),filestart+b:netrw_cpf+1) - norm! "ay`a + let eofname= filestart + b:netrw_cpf + 1 + if eofname <= col("$") + call cursor(line("."),filestart+b:netrw_cpf+1) + norm! "ay`a + else + norm! "ay$ + endif let dirname = @a let @a = rega " call Decho("2: dirname<".dirname.">") @@ -2526,9 +2553,10 @@ endfun fun! s:NetrwListSettings(islocal) " call Dfunc("s:NetrwListSettings(islocal=".a:islocal.")") let fname= bufname("%") - setlocal bt=nofile nobl ma nonu nowrap noro " call Decho("setlocal bt=nofile nobl ma nonu nowrap noro") - exe "keepalt file ".escape(fname,' ') + setlocal bt=nofile nobl ma nonu nowrap noro +" call Decho("exe keepalt file ".fnameescape(fname)) + exe "keepalt file ".fnameescape(fname) if g:netrw_use_noswf setlocal noswf endif @@ -2642,7 +2670,7 @@ fun! s:NetrwBookmarkMenu() let histcnt = histcnt + 1 let priority = g:NETRW_DIRHIST_CNT + histcnt if exists("g:NETRW_DIRHIST_{cnt}") - let bmdir= escape(g:NETRW_DIRHIST_{cnt},'. ') + let bmdir= escape(g:NETRW_DIRHIST_{cnt},'/&? ') " call Decho('silent! menu '.g:NetrwMenuPriority.".3.".priority." ".g:NetrwTopLvlMenu.'History.'.bmdir.' :e '.bmdir) exe 'silent! menu '.g:NetrwMenuPriority.".3.".priority." ".g:NetrwTopLvlMenu.'History.'.bmdir.' :e '.bmdir."\" endif @@ -2718,7 +2746,6 @@ fun! s:NetrwBrowseChgDir(islocal,newdir,...) " call Decho("handling a file: dirname<".dirname."> (a:0=".a:0.")") " this lets NetrwBrowseX avoid the edit if a:0 < 1 -" call Decho("dirname<".dirname."> netrw_cd_escape<".g:netrw_cd_escape."> browse_split=".g:netrw_browse_split) " call Decho("set up windows for editing<".fnameescape(dirname)."> didsplit=".(exists("s:didsplit")? s:didsplit : "doesn't exist")) call s:NetrwOptionRestore("s:") if !exists("s:didsplit") @@ -2900,15 +2927,13 @@ fun! netrw#NetrwBrowseX(fname,remote) if has("win32") || has("win95") || has("win64") || has("win16") let exten= substitute(exten,'^.*$','\L&\E','') endif - let fname= escape(a:fname,"%#") -" call Decho("fname<".fname."> after escape()") " seems kde systems often have gnome-open due to dependencies, even though " gnome-open's subsidiary display tools are largely absent. Kde systems " usually have "kdeinit" running, though... (tnx Mikolaj Machowski) if !exists("s:haskdeinit") if has("unix") - let s:haskdeinit= s:System("system",'ps -e') =~ 'kdeinit' + let s:haskdeinit= system("ps -e") =~ 'kdeinit' if v:shell_error let s:haskdeinit = 0 endif @@ -2921,12 +2946,14 @@ fun! netrw#NetrwBrowseX(fname,remote) if a:remote == 1 " create a local copy let fname= fnamemodify(tempname(),":r").".".exten -" call Decho("a:remote=".a:remote.": create a local copy of <".a:fname."> as <".fname.">") - exe "silent keepjumps bot 1new ".a:fname +" call Decho("a:remote=".a:remote.": create a local copy of <".fname."> as <".fname.">") + exe "silent keepjumps bot 1new ".fnameescape(fname) setlocal bh=delete -" call Decho("read <".fname.">, now writing: exe w! ".fname) - exe "silent! w! ".fname +" call Decho("read <".fnameescape(fname).">, now writing: exe w! ".fnameescape(fname)) + exe "silent! w! ".fnameescape(fname) q + else + let fname= a:fname endif " call Decho("exten<".exten."> "."netrwFileHandlers#NFH_".exten."():exists=".exists("*netrwFileHandlers#NFH_".exten)) @@ -2972,29 +2999,29 @@ fun! netrw#NetrwBrowseX(fname,remote) elseif exists("g:netrw_browsex_viewer") && executable(viewer) " call Decho("g:netrw_browsex_viewer<".g:netrw_browsex_viewer.">") -" call Decho("exe silent !".viewer." ".viewopt.shellescape(fname).redir) - exe "silent !".viewer." ".viewopt.shellescape(fname).redir +" call Decho("exe silent !".viewer." ".viewopt.shellescape(fname,1).redir) + exe "silent !".viewer." ".viewopt.shellescape(fname,1).redir let ret= v:shell_error elseif has("win32") || has("win64") -" call Decho('exe silent !start rundll32 url.dll,FileProtocolHandler '.shellescape(fname)) - exe 'silent !start rundll32 url.dll,FileProtocolHandler '.shellescape(fname) +" call Decho('exe silent !start rundll32 url.dll,FileProtocolHandler '.shellescape(fname,1)) + exe 'silent !start rundll32 url.dll,FileProtocolHandler '.shellescape(fname,1) call inputsave()|call input("Press to continue")|call inputrestore() let ret= v:shell_error elseif has("unix") && executable("gnome-open") && !s:haskdeinit -" call Decho("exe silent !gnome-open ".shellescape(fname)." ".redir) - exe "silent !gnome-open ".shellescape(fname).redir +" call Decho("exe silent !gnome-open ".shellescape(fname,1)." ".redir) + exe "silent !gnome-open ".shellescape(fname,1).redir let ret= v:shell_error elseif has("unix") && executable("kfmclient") && s:haskdeinit -" call Decho("exe silent !kfmclient exec ".shellescape(fname)." ".redir) - exe "silent !kfmclient exec ".shellescape(fname)." ".redir +" call Decho("exe silent !kfmclient exec ".shellescape(fname,1)." ".redir) + exe "silent !kfmclient exec ".shellescape(fname,1)." ".redir let ret= v:shell_error elseif has("macunix") && executable("open") -" call Decho("exe silent !open ".shellescape(fname)." ".redir) - exe "silent !open ".shellescape(fname)." ".redir +" call Decho("exe silent !open ".shellescape(fname,1)." ".redir) + exe "silent !open ".shellescape(fname,1)." ".redir let ret= v:shell_error else @@ -3007,7 +3034,8 @@ fun! netrw#NetrwBrowseX(fname,remote) let ret= netrwFileHandlers#Invoke(exten,fname) endif -" redraw! + " restoring redraw! after external file handlers + redraw! " cleanup: remove temporary file, " delete current buffer if success with handler, @@ -3016,7 +3044,7 @@ fun! netrw#NetrwBrowseX(fname,remote) " temporary file because it wasn't getting seen. " if a:remote == 1 && fname != a:fname " call Decho("deleting temporary file<".fname.">") -" call s:System("delete",fname) +" call s:NetrwDelete(fname) " endif if a:remote == 1 @@ -3272,7 +3300,7 @@ fun! netrw#Explore(indx,dosplit,style,...) if starpat == 1 " starpat=1: Explore *//pattern (current directory only search for files containing pattern) " call Decho("starpat=".starpat.": build *//pattern list") - exe "vimgrep /".pattern."/gj ".b:netrw_curdir."/*" + exe "vimgrep /".pattern."/gj ".fnameescape(b:netrw_curdir)."/*" let w:netrw_explore_list = map(getqflist(),'bufname(v:val.bufnr)') if &hls | let keepregslash= s:ExplorePatHls(pattern) | endif @@ -3652,8 +3680,8 @@ fun! s:NetrwMakeDir(usrhost) let netrw_origdir= s:NetrwGetcwd(1) exe 'keepjumps lcd '.fnameescape(b:netrw_curdir) " call Decho("netrw_origdir<".netrw_origdir.">: lcd b:netrw_curdir<".fnameescape(b:netrw_curdir).">") -" call Decho("exe silent! !".g:netrw_local_mkdir.' '.shellescape(newdirname)) - exe "silent! !".g:netrw_local_mkdir.' '.shellescape(newdirname) +" call Decho("exe silent! !".g:netrw_local_mkdir.' '.shellescape(newdirname,1)) + exe "silent! !".g:netrw_local_mkdir.' '.shellescape(newdirname,1) if !g:netrw_keepdir exe 'keepjumps lcd '.fnameescape(netrw_origdir) " call Decho("netrw_keepdir=".g:netrw_keepdir.": keepjumps lcd ".fnameescape(netrw_origdir)." getcwd<".getcwd().">") @@ -3676,8 +3704,8 @@ fun! s:NetrwMakeDir(usrhost) " call Decho("remote mkdir") let mkdircmd = s:MakeSshCmd(g:netrw_mkdir_cmd) let newdirname= substitute(b:netrw_curdir,'^\%(.\{-}/\)\{3}\(.*\)$','\1','').newdirname -" call Decho("exe silent! !".mkdircmd." ".shellescape(newdirname)) - exe "silent! !".mkdircmd." ".shellescape(newdirname) +" call Decho("exe silent! !".mkdircmd." ".shellescape(newdirname,1)) + exe "silent! !".mkdircmd." ".shellescape(newdirname,1) if v:shell_error == 0 " refresh listing let svpos= netrw#NetrwSavePosn() @@ -3706,6 +3734,17 @@ endfun " of whatever may happen to be under the cursor at that " moment. When the mouse and gui are available, " shift-leftmouse may also be used to mark files. +" +" Creates two lists +" s:netrwmarkfilelist -- holds complete paths to all marked files +" s:netrwmarkfilelist_# -- holds list of marked files in current-buffer's directory (#==bufnr()) +" +" Creates a marked file match string +" s:netrwmarfilemtch_# -- used with 2match to display marked files +" +" Creates a buffer version of islocal +" b:netrw_islocal +" fun! s:NetrwMarkFile(islocal,fname) " call Dfunc("s:NetrwMarkFile(islocal=".a:islocal." fname<".a:fname.">)") let curbufnr= bufnr("%") @@ -3714,15 +3753,16 @@ fun! s:NetrwMarkFile(islocal,fname) " markfile list exists " call Decho("starting s:netrwmarkfilelist_{curbufnr}<".string(s:netrwmarkfilelist_{curbufnr}).">") " call Decho("starting s:netrwmarkfilemtch_{curbufnr}<".s:netrwmarkfilemtch_{curbufnr}.">") + let b:netrw_islocal= a:islocal if index(s:netrwmarkfilelist_{curbufnr},a:fname) == -1 - " append filename to local-directory markfilelist + " append filename to buffer's markfilelist " call Decho("append filename<".a:fname."> to local markfilelist_".curbufnr."<".string(s:netrwmarkfilelist_{curbufnr}).">") call add(s:netrwmarkfilelist_{curbufnr},a:fname) let s:netrwmarkfilemtch_{curbufnr}= s:netrwmarkfilemtch_{curbufnr}.'\|\<'.escape(a:fname,g:netrw_markfileesc."'".g:netrw_markfileesc."'").'\>' else - " remove filename from local markfilelist + " remove filename from buffer's markfilelist " call Decho("remove filename<".a:fname."> from local markfilelist_".curbufnr."<".string(s:netrwmarkfilelist_{curbufnr}).">") call filter(s:netrwmarkfilelist_{curbufnr},'v:val != a:fname') if s:netrwmarkfilelist_{curbufnr} == [] @@ -3818,14 +3858,14 @@ fun! s:NetrwMarkFileCompress(islocal) for sfx in sort(keys(g:netrw_decompress)) if fname =~ '\'.sfx.'$' " fname has a suffix indicating that its compressed; apply associated decompression routine - let exe= g:netrw_decompress[sfx] + let exe= s:WinPath(g:netrw_decompress[sfx]) " call Decho("fname<".fname."> is compressed so decompress with <".exe.">") if a:islocal if g:netrw_keepdir - let fname= s:ComposePath(curdir,fname) + let fname= shellescape(s:ComposePath(curdir,fname)) endif else - let fname= b:netrw_curdir.fname + let fname= shellescape(b:netrw_curdir.fname,1) endif if executable(exe) if a:islocal @@ -3843,10 +3883,10 @@ fun! s:NetrwMarkFileCompress(islocal) unlet exe elseif a:islocal " fname not a compressed file, so compress it - call system(g:netrw_compress." ".s:ComposePath(b:netrw_curdir,fname)) + call system(s:WinPath(g:netrw_compress)." ".shellescape(s:ComposePath(b:netrw_curdir,fname))) else " fname not a compressed file, so compress it - call s:RemoteSystem(g:netrw_compress." ".fname) + call s:RemoteSystem(s:WinPath(g:netrw_compress)." ".shellescape(fname)) endif endfor call s:NetrwUnmarkList(curbufnr,curdir) @@ -3885,9 +3925,9 @@ fun! s:NetrwMarkFileCopy(islocal) if a:islocal && s:netrwmftgt_islocal " Copy marked files, local directory to local directory " call Decho("copy from local to local") - let args= join(map(copy(s:netrwmarkfilelist_{bufnr('%')}),"b:netrw_curdir.\"/\".shellescape(v:val)")) + let args= join(map(deepcopy(s:netrwmarkfilelist_{bufnr('%')}),"shellescape(b:netrw_curdir.\"/\".v:val)")) " call Decho("system(".g:netrw_localcopycmd." ".args." ".shellescape(s:netrwmftgt).")") - call system(g:netrw_localcopycmd." ".args." ".shellescape(s:netrwmftgt)) + call system(s:WinPath(g:netrw_localcopycmd)." ".args." ".shellescape(s:netrwmftgt)) elseif a:islocal && !s:netrwmftgt_islocal " Copy marked files, local directory to remote directory @@ -3908,19 +3948,19 @@ fun! s:NetrwMarkFileCopy(islocal) if exists("*mkdir") call mkdir(tmpdir) else - exe "silent! !".g:netrw_local_mkdir.' '.shellescape(tmpdir) + exe "silent! !".g:netrw_local_mkdir.' '.shellescape(tmpdir,1) endif if isdirectory(tmpdir) exe "keepjumps lcd ".fnameescape(tmpdir) call netrw#NetrwObtain(a:islocal,s:netrwmarkfilelist_{bufnr('%')},tmpdir) - let localfiles= map(copy(s:netrwmarkfilelist_{bufnr('%')}),'substitute(v:val,"^.*/","","")') + let localfiles= map(deepcopy(s:netrwmarkfilelist_{bufnr('%')}),'substitute(v:val,"^.*/","","")') call s:NetrwUpload(localfiles,s:netrwmftgt) if getcwd() == tmpdir for fname in s:netrwmarkfilelist_{bufnr('%')} - call s:System("delete",fname) + call s:NetrwDelete(fname) endfor exe "keepjumps lcd ".fnameescape(curdir) - exe "silent !".g:netrw_local_rmdir." ".fnameescape(tmpdir) + exe "silent !".g:netrw_local_rmdir." ".shellescape(tmpdir,1) else exe "keepjumps lcd ".fnameescape(curdir) endif @@ -3956,24 +3996,21 @@ endfun fun! s:NetrwMarkFileDiff(islocal) " call Dfunc("s:NetrwMarkFileDiff(islocal=".a:islocal.") b:netrw_curdir<".b:netrw_curdir.">") let curbufnr= bufnr("%") - if exists("s:netrwmarkfilelist_{curbufnr}") + if exists("s:netrwmarkfilelist_{curbufnr}") let cnt = 0 let curdir = b:netrw_curdir for fname in s:netrwmarkfilelist let cnt= cnt + 1 - if !a:islocal - let fname= curdir.fname - endif if cnt == 1 -" call Decho("diffthis: ".fname) - exe "e ".fname +" call Decho("diffthis: fname<".fname.">") + exe "e ".fnameescape(fname) diffthis elseif cnt == 2 || cnt == 3 vsplit wincmd l " call Decho("diffthis: ".fname) - exe "e ".fname + exe "e ".fnameescape(fname) diffthis else break @@ -3981,6 +4018,7 @@ fun! s:NetrwMarkFileDiff(islocal) endfor call s:NetrwUnmarkList(curbufnr,curdir) endif + " call Dret("s:NetrwMarkFileDiff") endfun @@ -3994,17 +4032,7 @@ fun! s:NetrwMarkFileEdit(islocal) let curbufnr = bufnr("%") if exists("s:netrwmarkfilelist_{curbufnr}") call s:SetRexDir(a:islocal,curdir) - if a:islocal && g:netrw_keepdir - " use complete paths if its local and keepdir enabled - let flist= "" - for fname in s:netrwmarkfilelist -" let flist= flist." ".s:ComposePath(curdir,fname) - let flist= flist." ".fname - endfor - else -" let flist= substitute(escape(join(s:netrwmarkfilelist_{curbufnr},"\t"),' '),"\t",' ','g') - let flist= substitute(escape(join(s:netrwmarkfilelist,"\t"),' '),"\t",' ','g') - endif + let flist= join(map(deepcopy(s:netrwmarkfilelist), "fnameescape(v:val)")) " unmark markedfile list " call s:NetrwUnmarkList(curbufnr,curdir) call s:NetrwUnmarkAll() @@ -4036,10 +4064,10 @@ fun! s:NetrwMarkFileExe(islocal) for fname in s:netrwmarkfilelist_{curbufnr} if a:islocal if g:netrw_keepdir - let fname= s:ComposePath(curdir,fname) + let fname= shellescape(s:WinPath(s:ComposePath(curdir,fname))) endif else - let fname= b:netrw_curdir.fname + let fname= shellescape(s:WinPath(b:netrw_curdir.fname)) endif if cmd =~ '%' let xcmd= substitute(cmd,'%',fname,'g') @@ -4137,17 +4165,11 @@ endfun fun! s:NetrwMarkFileGrep(islocal) " call Dfunc("s:NetrwMarkFileGrep(islocal=".a:islocal.")") let svpos = netrw#NetrwSavePosn() - let curdir = b:netrw_curdir let curbufnr = bufnr("%") if exists("s:netrwmarkfilelist") " call Decho("s:netrwmarkfilelist".string(s:netrwmarkfilelist).">") - let netrwmarkfilelist= "" - for fname in s:netrwmarkfilelist -" call Decho("fname<".fname.">") - let fname = escape(substitute(fname,"[\"']","","g")," ") - let netrwmarkfilelist = netrwmarkfilelist." ".fname - endfor + let netrwmarkfilelist= join(map(deepcopy(s:netrwmarkfilelist), "fnameescape(v:val)")) call s:NetrwUnmarkAll() " ask user for pattern @@ -4294,7 +4316,7 @@ fun! s:NetrwMarkFilePrint(islocal) 1split " the autocmds will handle both local and remote files " call Decho("exe silent e ".escape(fname,' ')) - exe "silent e ".escape(fname,' ') + exe "silent e ".fnameescape(fname) " call Decho("hardcopy") hardcopy q @@ -4399,8 +4421,8 @@ fun! s:NetrwMarkFileSource(islocal) let fname= curdir.fname endif " the autocmds will handle sourcing both local and remote files -" call Decho("exe so ".escape(fname,' ')) - exe "so ".escape(fname,' ') +" call Decho("exe so ".fnameescape(fname)) + exe "so ".fnameescape(fname) endfor 2match none endif @@ -4418,35 +4440,25 @@ fun! s:NetrwMarkFileTag(islocal) if exists("s:netrwmarkfilelist") " call Decho("s:netrwmarkfilelist".string(s:netrwmarkfilelist).">") - if a:islocal && g:netrw_keepdir - let netrwmarkfilelist= "" - for fname in s:netrwmarkfilelist -" let netrwmarkfilelist= netrwmarkfilelist." ".s:ComposePath(curdir,fname) - let netrwmarkfilelist= netrwmarkfilelist." ".fname - endfor - else - let netrwmarkfilelist= string(s:netrwmarkfilelist) - let netrwmarkfilelist= substitute(netrwmarkfilelist,'[[\],]','','g') - endif + let netrwmarkfilelist= join(map(deepcopy(s:netrwmarkfilelist), "shellescape(v:val,".!a:islocal.")")) call s:NetrwUnmarkAll() if a:islocal if executable(g:netrw_ctags) - call map(netrwmarkfilelist,"shellescape(v:val)") " call Decho("call system(".g:netrw_ctags." ".netrwmarkfilelist.")") call system(g:netrw_ctags." ".netrwmarkfilelist) else call netrw#ErrorMsg(s:ERROR,"g:netrw_ctags<".g:netrw_ctags."> is not executable!",51) endif else - let cmd= s:RemoteSystem(g:netrw_ctags." ".netrwmarkfilelist) + let cmd = s:RemoteSystem(g:netrw_ctags." ".netrwmarkfilelist) call netrw#NetrwObtain(a:islocal,"tags") let curdir= b:netrw_curdir 1split e tags let path= substitute(curdir,'^\(.*\)/[^/]*$','\1/','') " call Decho("curdir<".curdir."> path<".path.">") - exe '%s/\t\(\S\+\)\t/\t'.escape(path,'/').'\1\t/e' + exe '%s/\t\(\S\+\)\t/\t'.escape(path,"/\n\r\\").'\1\t/e' wq! endif 2match none @@ -4518,6 +4530,36 @@ fun! s:NetrwMarkFileTgt(islocal) " call Dret("s:NetrwMarkFileTgt : netrwmftgt<".(exists("s:netrwmftgt")? s:netrwmftgt : "").">") endfun +" --------------------------------------------------------------------- +" s:NetrwOpenFile: query user for a filename and open it {{{2 +fun! s:NetrwOpenFile(islocal) +" call Dfunc("s:NetrwOpenFile(islocal=".a:islocal.")") + call inputsave() + let fname= input("Enter filename: ") + call inputrestore() + if fname !~ '[/\\]' + if exists("b:netrw_curdir") + if exists("g:netrw_quiet") + let netrw_quiet_keep = g:netrw_quiet + endif + let g:netrw_quiet = 1 + if b:netrw_curdir =~ '/$' + exe "e ".fnameescape(b:netrw_curdir.fname) + else + exe "e ".fnameescape(b:netrw_curdir."/".fname) + endif + if exists("netrw_quiet_keep") + let g:netrw_quiet= netrw_quiet_keep + else + unlet g:netrw_quiet + endif + endif + else + exe "e ".fnameescape(fname) + endif +" call Dret("s:NetrwOpenFile") +endfun + " --------------------------------------------------------------------- " s:NetrwUnmarkList: delete local marked file lists and remove their contents from the global marked-file list {{{2 fun! s:NetrwUnmarkList(curbufnr,curdir) @@ -4727,20 +4769,22 @@ fun! netrw#NetrwObtain(islocal,fname,...) endif " call Decho("tgtdir<".tgtdir.">") - if a:islocal - " obtain a file from b:netrw_curdir to getcwd() -" call Decho("obtain a local file from ".b:netrw_curdir." to ".tgtdir + if b:netrw_islocal + " obtain a file from local b:netrw_curdir to (local) tgtdir +" call Decho("obtain a file from local ".b:netrw_curdir." to ".tgtdir) if exists("b:netrw_curdir") && getcwd() != b:netrw_curdir let topath= s:ComposePath(tgtdir,"") if (has("win32") || has("win95") || has("win64") || has("win16")) " transfer files one at time +" call Decho("transfer files one at a time") for fname in fnamelist -" call Decho("system(".g:netrw_localcopycmd." ".fname." ".shellescape(topath).")") - call system(g:netrw_localcopycmd." ".fname." ".shellescape(topath)) +" call Decho("system(".g:netrw_localcopycmd." ".shellescape(fname)." ".shellescape(topath).")") + call system(g:netrw_localcopycmd." ".shellescape(fname)." ".shellescape(topath)) endfor else " transfer files with one command - let filelist= join(map(copy(fname),"shellescape(v:val)")) +" call Decho("transfer files with one command") + let filelist= join(map(deepcopy(fnamelist),"shellescape(v:val)")) " call Decho("system(".g:netrw_localcopycmd." ".filelist." ".shellescape(topath).")") call system(g:netrw_localcopycmd." ".filelist." ".shellescape(topath)) endif @@ -4751,7 +4795,8 @@ fun! netrw#NetrwObtain(islocal,fname,...) endif else -" call Decho("obtain a remote file from ".b:netrw_curdir." to ".tgtdir) + " obtain files from remote b:netrw_curdir to local tgtdir +" call Decho("obtain a file from remote ".b:netrw_curdir." to ".tgtdir) if type(a:fname) == 1 call s:SetupNetrwStatusLine('%f %h%m%r%=%9*Obtaining '.a:fname) endif @@ -4770,9 +4815,9 @@ fun! netrw#NetrwObtain(islocal,fname,...) else let path= "" endif - let filelist= join(map(copy(fnamelist),'shellescape(g:netrw_machine.":".escape(path.v:val,g:netrw_fname_escape))')) -" call Decho("exe ".s:netrw_silentxfer."!".g:netrw_scp_cmd.useport." ".filelist." ".shellescape(tgtdir)) - exe s:netrw_silentxfer."!".g:netrw_scp_cmd.useport." ".filelist." ".shellescape(tgtdir) + let filelist= join(map(deepcopy(fnamelist),'shellescape(g:netrw_machine.":".path.v:val,1)')) +" call Decho("exe ".s:netrw_silentxfer."!".g:netrw_scp_cmd.shellescape(useport,1)." ".filelist." ".shellescape(tgtdir,1)) + exe s:netrw_silentxfer."!".g:netrw_scp_cmd.shellescape(useport,1)." ".filelist." ".shellescape(tgtdir,1) elseif b:netrw_method == 2 " obtain file using ftp + .netrc @@ -4781,7 +4826,7 @@ fun! netrw#NetrwObtain(islocal,fname,...) let tmpbufnr= bufnr("%") setlocal ff=unix if exists("g:netrw_ftpmode") && g:netrw_ftpmode != "" - exe "put ='".g:netrw_ftpmode."'" + put =g:netrw_ftpmode " call Decho("filter input: ".getline('$')) endif @@ -4791,7 +4836,7 @@ fun! netrw#NetrwObtain(islocal,fname,...) endif if exists("g:netrw_ftpextracmd") - exe "put ='".g:netrw_ftpextracmd."'" + put =g:netrw_ftpextracmd " call Decho("filter input: ".getline('$')) endif for fname in fnamelist @@ -4799,11 +4844,11 @@ fun! netrw#NetrwObtain(islocal,fname,...) " call Decho("filter input: ".getline('$')) endfor if exists("g:netrw_port") && g:netrw_port != "" -" call Decho("executing: %!".g:netrw_ftp_cmd." -i ".g:netrw_machine." ".g:netrw_port) - exe s:netrw_silentxfer."%!".g:netrw_ftp_cmd." -i ".g:netrw_machine." ".g:netrw_port +" call Decho("executing: %!".g:netrw_ftp_cmd." -i ".shellescape(g:netrw_machine,1)." ".shellescape(g:netrw_port,1)) + exe s:netrw_silentxfer."%!".g:netrw_ftp_cmd." -i ".shellescape(g:netrw_machine,1)." ".shellescape(g:netrw_port,1) else -" call Decho("executing: %!".g:netrw_ftp_cmd." -i ".g:netrw_machine) - exe s:netrw_silentxfer."%!".g:netrw_ftp_cmd." -i ".g:netrw_machine +" call Decho("executing: %!".g:netrw_ftp_cmd." -i ".shellescape(g:netrw_machine,1)) + exe s:netrw_silentxfer."%!".g:netrw_ftp_cmd." -i ".shellescape(g:netrw_machine,1) endif " If the result of the ftp operation isn't blank, show an error message (tnx to Doug Claar) if getline(1) !~ "^$" && !exists("g:netrw_quiet") && getline(1) !~ '^Trying ' @@ -4849,12 +4894,12 @@ fun! netrw#NetrwObtain(islocal,fname,...) endif if exists("g:netrw_ftpextracmd") - exe "put ='".g:netrw_ftpextracmd."'" + put =g:netrw_ftpextracmd " call Decho("filter input: ".getline('$')) endif if exists("g:netrw_ftpextracmd") - exe "put ='".g:netrw_ftpextracmd."'" + put =g:netrw_ftpextracmd " call Decho("filter input: ".getline('$')) endif for fname in fnamelist @@ -5022,19 +5067,16 @@ fun! s:NetrwUpload(fname,tgt,...) " handle uploading a single file using NetWrite " call Decho("handle uploading a single file via NetWrite") 1split - let efname= escape(a:fname,g:netrw_fname_escape) -" call Decho("exe e ".efname) - exe "e ".efname +" call Decho("exe e ".fnameescape(a:fname)) + exe "e ".fnameescape(a:fname) " call Decho("now locally editing<".expand("%").">, has ".line("$")." lines") if a:tgt =~ '/$' let wfname= substitute(a:fname,'^.*/','','') - let wfname= escape(a:tgt.wfname,g:netrw_fname_escape) -" call Decho("exe w! ".wfname) - exe "w! ".wfname +" call Decho("exe w! ".fnameescape(wfname)) + exe "w! ".fnameescape(a:tgt.wfname) else - let wfname= escape(a:tgt,g:netrw_fname_escape) -" call Decho("writing local->remote: exe w ".wfname) - exe "w ".wfname +" call Decho("writing local->remote: exe w ".fnameescape(a:tgt)) + exe "w ".fnameescape(a:tgt) " call Decho("done writing local->remote") endif q! @@ -5045,8 +5087,8 @@ fun! s:NetrwUpload(fname,tgt,...) let curdir= getcwd() if a:tgt =~ '^scp:' exe "keepjumps silent lcd ".fnameescape(fromdir) - let filelist= copy(s:netrwmarkfilelist_{bufnr('%')}) - let args = join(map(filelist,"shellescape(v:val)")) + let filelist= deepcopy(s:netrwmarkfilelist_{bufnr('%')}) + let args = join(map(filelist,"shellescape(v:val, 1)")) if exists("g:netrw_port") && g:netrw_port != "" let useport= " ".g:netrw_scpport." ".g:netrw_port else @@ -5054,8 +5096,8 @@ fun! s:NetrwUpload(fname,tgt,...) endif let machine = substitute(a:tgt,'^scp://\([^/:]\+\).*$','\1','') let tgt = substitute(a:tgt,'^scp://[^/]\+/\(.*\)$','\1','') -" call Decho("exe ".s:netrw_silentxfer."!".g:netrw_scp_cmd.useport." ".args." ".shellescape(machine.":".escape(tgt,g:netrw_fname_escape))) - exe s:netrw_silentxfer."!".g:netrw_scp_cmd.useport." ".args." ".shellescape(machine.":".escape(tgt,g:netrw_fname_escape)) +" call Decho("exe ".s:netrw_silentxfer."!".g:netrw_scp_cmd.shellescape(useport,1)." ".args." ".shellescape(machine.":".tgt,1)) + exe s:netrw_silentxfer."!".g:netrw_scp_cmd.shellescape(useport,1)." ".args." ".shellescape(machine.":".tgt,1) exe "keepjumps silent lcd ".fnameescape(curdir) elseif a:tgt =~ '^ftp:' @@ -5067,11 +5109,11 @@ fun! s:NetrwUpload(fname,tgt,...) silent keepjumps new " call Decho("filter input window#".winnr()) - exe "put ='".g:netrw_ftpmode."'" + put =g:netrw_ftpmode " call Decho("filter input: ".getline('$')) if exists("g:netrw_ftpextracmd") - exe "put ='".g:netrw_ftpextracmd."'" + put =g:netrw_ftpextracmd " call Decho("filter input: ".getline('$')) endif @@ -5087,12 +5129,12 @@ fun! s:NetrwUpload(fname,tgt,...) endfor if exists("g:netrw_port") && g:netrw_port != "" -" call Decho("executing: ".s:netrw_silentxfer."%!".g:netrw_ftp_cmd." -i ".g:netrw_machine." ".g:netrw_port) - exe s:netrw_silentxfer."%!".g:netrw_ftp_cmd." -i ".g:netrw_machine." ".g:netrw_port +" call Decho("executing: ".s:netrw_silentxfer."%!".g:netrw_ftp_cmd." -i ".shellescape(g:netrw_machine,1)." ".shellescape(g:netrw_port,1)) + exe s:netrw_silentxfer."%!".g:netrw_ftp_cmd." -i ".shellescape(g:netrw_machine,1)." ".shellescape(g:netrw_port,1) else " call Decho("filter input window#".winnr()) -" call Decho("executing: ".s:netrw_silentxfer."%!".g:netrw_ftp_cmd." -i ".g:netrw_machine) - exe s:netrw_silentxfer."%!".g:netrw_ftp_cmd." -i ".g:netrw_machine +" call Decho("executing: ".s:netrw_silentxfer."%!".g:netrw_ftp_cmd." -i ".shellescape(g:netrw_machine,1)) + exe s:netrw_silentxfer."%!".g:netrw_ftp_cmd." -i ".shellescape(g:netrw_machine,1) endif " If the result of the ftp operation isn't blank, show an error message (tnx to Doug Claar) silent g/Local directory now/d @@ -5136,7 +5178,7 @@ fun! s:NetrwUpload(fname,tgt,...) endif if exists("g:netrw_ftpextracmd") - exe "put ='".g:netrw_ftpextracmd."'" + put =g:netrw_ftpextracmd " call Decho("filter input: ".getline('$')) endif @@ -5180,7 +5222,7 @@ fun! s:NetrwPreview(path) range call s:NetrwSafeOptions() if has("quickfix") if !isdirectory(a:path) - exe (g:netrw_preview? "vert " : "")."pedit ".escape(a:path,g:netrw_fname_escape) + exe (g:netrw_preview? "vert " : "")."pedit ".fnameescape(a:path) elseif !exists("g:netrw_quiet") call netrw#ErrorMsg(s:WARNING,"sorry, cannot preview a directory such as <".a:path.">",38) endif @@ -5794,10 +5836,10 @@ fun! s:PerformListing(islocal) " call Decho("g:netrw_sort_direction=".g:netrw_sort_direction." (bannercnt=".w:netrw_bannercnt.")") if g:netrw_sort_direction =~ 'n' " normal direction sorting - exe 'silent keepjumps '.w:netrw_bannercnt.',$sort' + exe 'silent keepjumps '.w:netrw_bannercnt.',$sort'.' '.g:netrw_sort_options else " reverse direction sorting - exe 'silent keepjumps '.w:netrw_bannercnt.',$sort!' + exe 'silent keepjumps '.w:netrw_bannercnt.',$sort!'.' '.g:netrw_sort_options endif endif " remove priority pattern prefix @@ -5810,10 +5852,10 @@ fun! s:PerformListing(islocal) " call Decho("g:netrw_sort_direction=".g:netrw_sort_direction) if g:netrw_sort_direction =~ 'n' " call Decho('exe silent keepjumps '.w:netrw_bannercnt.',$sort') - exe 'silent keepjumps '.w:netrw_bannercnt.',$sort' + exe 'silent keepjumps '.w:netrw_bannercnt.',$sort'.' '.g:netrw_sort_options else " call Decho('exe silent keepjumps '.w:netrw_bannercnt.',$sort!') - exe 'silent keepjumps '.w:netrw_bannercnt.',$sort!' + exe 'silent keepjumps '.w:netrw_bannercnt.',$sort!'.' '.g:netrw_sort_options endif endif exe 'silent keepjumps '.w:netrw_bannercnt.',$s/^\d\{-}\///e' @@ -5997,8 +6039,8 @@ fun! s:NetrwRemoteListing() let listcmd= s:MakeSshCmd(g:netrw_list_cmd) " call Decho("listcmd<".listcmd."> (using g:netrw_list_cmd)") if g:netrw_scp_cmd =~ '^pscp' -" call Decho("1: exe silent r! ".listcmd.shellescape(s:path)) - exe "silent r! ".listcmd.shellescape(s:path) +" call Decho("1: exe silent r! ".shellescape(listcmd.s:path, 1)) + exe "silent r! ".listcmd.shellescape(s:path, 1) " remove rubbish and adjust listing format of 'pscp' to 'ssh ls -FLa' like g/^Listing directory/d g/^d[-rwx][-rwx][-rwx]/s+$+/+e @@ -6011,8 +6053,8 @@ fun! s:NetrwRemoteListing() " call Decho("2: exe silent r! ".listcmd) exe "silent r! ".listcmd else -" call Decho("3: exe silent r! ".listcmd.' "'.shellescape(s:path).'"') - exe "silent r! ".listcmd.' "'.shellescape(s:path).'"' +" call Decho("3: exe silent r! ".listcmd.' '.shellescape(s:path,1)) + exe "silent r! ".listcmd.' '.shellescape(s:path,1) " call Decho("listcmd<".listcmd."> path<".s:path.">") endif endif @@ -6203,17 +6245,17 @@ fun! s:NetrwRemoteRmFile(path,rmfile,all) call s:NetrwRemoteFtpCmd(a:path,"rmdir ".a:rmfile) else let rmfile = substitute(a:path.a:rmfile,'/$','','') - let netrw_rmdir_cmd = s:MakeSshCmd(g:netrw_rmdir_cmd).' '.rmfile + let netrw_rmdir_cmd = s:MakeSshCmd(s:WinPath(g:netrw_rmdir_cmd)).' '.shellescape(s:WinPath(rmfile)) " call Decho("attempt to remove dir: system(".netrw_rmdir_cmd.")") - let ret= s:System("system",netrw_rmdir_cmd) + let ret= system(netrw_rmdir_cmd) " call Decho("returned=".ret." errcode=".v:shell_error) if v:shell_error != 0 -" call Decho("v:shell_error not 0") - let netrw_rmf_cmd= s:MakeSshCmd(g:netrw_rmf_cmd).' '.substitute(rmfile,'[\/]$','','e') -" call Decho("2nd attempt to remove dir: system(".netrw_rmf_cmd.")") - let ret= s:System("system",netrw_rmf_cmd) -" call Decho("returned=".ret." errcode=".v:shell_error) +" call Decho("v:shell_error not 0") + let netrw_rmf_cmd= s:MakeSshCmd(s:WinPath(g:netrw_rmf_cmd)).' '.shellescape(s:WinPath(substitute(rmfile,'[\/]$','','e'))) +" call Decho("2nd attempt to remove dir: system(".netrw_rmf_cmd.")") + let ret= system(netrw_rmf_cmd) +" call Decho("returned=".ret." errcode=".v:shell_error) if v:shell_error != 0 && !exists("g:netrw_quiet") call netrw#ErrorMsg(s:ERROR,"unable to remove directory<".rmfile."> -- is it empty?",22) @@ -6256,17 +6298,17 @@ fun! s:NetrwRemoteFtpCmd(path,listcmd) put ='cd \"'.a:path.'\"' endif if exists("g:netrw_ftpextracmd") - exe "put ='".g:netrw_ftpextracmd."'" + put =g:netrw_ftpextracmd " call Decho("filter input: ".getline('.')) endif call setline(line("$")+1,a:listcmd) " exe "keepjumps ".w:netrw_bannercnt.',$g/^./call Decho("ftp#".line(".").": ".getline("."))' if exists("g:netrw_port") && g:netrw_port != "" -" call Decho("exe ".s:netrw_silentxfer.w:netrw_bannercnt.",$!".g:netrw_ftp_cmd." -i ".g:netrw_machine." ".g:netrw_port) - exe s:netrw_silentxfer." keepjumps ".w:netrw_bannercnt.",$!".g:netrw_ftp_cmd." -i ".g:netrw_machine." ".g:netrw_port +" call Decho("exe ".s:netrw_silentxfer.w:netrw_bannercnt.",$!".g:netrw_ftp_cmd." -i ".shellescape(g:netrw_machine,1)." ".shellescape(g:netrw_port,1)) + exe s:netrw_silentxfer." keepjumps ".w:netrw_bannercnt.",$!".g:netrw_ftp_cmd." -i ".shellescape(g:netrw_machine,1)." ".shellescape(g:netrw_port,1) else -" call Decho("exe ".s:netrw_silentxfer.w:netrw_bannercnt.",$!".g:netrw_ftp_cmd." -i ".g:netrw_machine) - exe s:netrw_silentxfer." keepjumps ".w:netrw_bannercnt.",$!".g:netrw_ftp_cmd." -i ".g:netrw_machine +" call Decho("exe ".s:netrw_silentxfer.w:netrw_bannercnt.",$!".g:netrw_ftp_cmd." -i ".shellescape(g:netrw_machine,1)) + exe s:netrw_silentxfer." keepjumps ".w:netrw_bannercnt.",$!".g:netrw_ftp_cmd." -i ".shellescape(g:netrw_machine,1) endif "......................................... @@ -6290,7 +6332,7 @@ fun! s:NetrwRemoteFtpCmd(path,listcmd) put ='cd \"'.a:path.'\"' endif if exists("g:netrw_ftpextracmd") - exe "put ='".g:netrw_ftpextracmd."'" + put =g:netrw_ftpextracmd " call Decho("filter input: ".getline('.')) endif call setline(line("$")+1,a:listcmd) @@ -6368,10 +6410,10 @@ fun! s:NetrwRemoteRename(usrhost,path) range if exists("w:netrw_method") && (w:netrw_method == 2 || w:netrw_method == 3) call s:NetrwRemoteFtpCmd(a:path,"rename ".oldname." ".newname) else - let oldname= a:path.oldname - let newname= a:path.newname -" call Decho("system(rename_cmd".' "'.fnameescape(oldname," ").'" "'.escape(newname).'"') - let ret= s:System("system",rename_cmd.' "'.fnameescape(oldname).'" "'.fnameescape(newname).'"') + let oldname= shellescape(a:path.oldname) + let newname= shellescape(a:path.newname) +" call Decho("system(s:WinPath(".rename_cmd.") ".oldname.' '.newname.")") + let ret = system(s:WinPath(rename_cmd).' '.oldname.' '.newname) endif endfor @@ -6393,10 +6435,10 @@ fun! s:NetrwRemoteRename(usrhost,path) range if exists("w:netrw_method") && (w:netrw_method == 2 || w:netrw_method == 3) call s:NetrwRemoteFtpCmd(a:path,"rename ".oldname." ".newname) else - let oldname= a:path.oldname - let newname= a:path.newname -" call Decho("system(rename_cmd".' "'.fnameescape(oldname," ").'" "'.escape(newname).'"') - let ret= s:System("system",rename_cmd.' "'.fnameescape(oldname).'" "'.fnameescape(newname).'"') + let oldname= shellescape(a:path.oldname) + let newname= shellescape(a:path.newname) +" call Decho("system(s:WinPath(".rename_cmd.") ".oldname.' '.newname.")") + let ret = system(s:WinPath(rename_cmd).' '.oldname.' '.newname) endif let ctr= ctr + 1 @@ -6639,7 +6681,7 @@ fun! s:LocalBrowseShellCmdRefresh() if bufwinnr(ibuf) == -1 && index(buftablist,ibuf) == -1 " wipe out any non-displaying netrw buffer " call Decho("wiping buf#".ibuf,"<".bufname(ibuf).">") - exe "silent! bd ".ibuf + exe "silent! bd ".fnameescape(ibuf) call remove(s:netrw_browselist,ibl) " call Decho("browselist=".string(s:netrw_browselist)) continue @@ -6751,7 +6793,7 @@ fun! s:NetrwLocalRmFile(path,fname,all) endif if all || ok =~ 'y\%[es]' || ok == "" - let ret= s:System("delete",rmfile) + let ret= s:NetrwDelete(rmfile) " call Decho("errcode=".v:shell_error." ret=".ret) endif @@ -6773,19 +6815,19 @@ fun! s:NetrwLocalRmFile(path,fname,all) let rmfile= substitute(rmfile,'[\/]$','','e') if all || ok =~ 'y\%[es]' || ok == "" -" call Decho("1st attempt: system(".g:netrw_local_rmdir.' '.shellescape(rmfile).')') - call s:System("system",g:netrw_local_rmdir.' '.shellescape(rmfile)) +" call Decho("1st attempt: system(s:WinPath(".g:netrw_local_rmdir.') '.shellescape(rmfile).')') + call system(s:WinPath(g:netrw_local_rmdir).' '.shellescape(rmfile)) " call Decho("v:shell_error=".v:shell_error) if v:shell_error != 0 " call Decho("2nd attempt to remove directory<".rmfile.">") - let errcode= s:System("delete",rmfile) + let errcode= s:NetrwDelete(rmfile) " call Decho("errcode=".errcode) if errcode != 0 if has("unix") " call Decho("3rd attempt to remove directory<".rmfile.">") - call s:System("system","rm ".shellescape(rmfile)) + call system("rm ".shellescape(rmfile)) if v:shell_error != 0 && !exists("g:netrw_quiet") call netrw#ErrorMsg(s:ERROR,"unable to remove directory<".rmfile."> -- is it empty?",34) let ok="no" @@ -6830,7 +6872,7 @@ fun! s:NetrwLocalRename(path) range let newname = substitute(oldname,subfrom,subto,'') endif endif - let ret= rename(oldname,newname) + call rename(oldname,newname) endfor 2match none unlet s:netrwmarkfilelist_{bufnr("%")} @@ -6861,7 +6903,7 @@ fun! s:NetrwLocalRename(path) range let newname= input("Moving ".oldname." to : ",substitute(oldname,'/*$','','e')) call inputrestore() - let ret= rename(oldname,newname) + call rename(oldname,newname) " call Decho("renaming <".oldname."> to <".newname.">") let ctr= ctr + 1 @@ -6937,100 +6979,12 @@ endfun " --------------------------------------------------------------------- " Support Functions: {{{1 -" --------------------------------------------------------------------- -" s:UpdateBuffersMenu: does emenu Buffers.Refresh (but due to locale, the menu item may not be called that) {{{2 -" The Buffers.Refresh menu calls s:BMShow(); unfortunately, that means that that function -" can't be called except via emenu. But due to locale, that menu line may not be called -" Buffers.Refresh; hence, s:NetrwBMShow() utilizes a "cheat" to call that function anyway. -fun! s:UpdateBuffersMenu() -" call Dfunc("s:UpdateBuffersMenu()") - if has("gui") && has("menu") && has("gui_running") && &go =~ 'm' - try - silent emenu Buffers.Refresh\ menu - catch /^Vim\%((\a\+)\)\=:E/ - let v:errmsg= "" - silent call s:NetrwBMShow() - endtry - endif -" call Dret("s:UpdateBuffersMenu") -endfun - -" --------------------------------------------------------------------- -" s:NetrwBMShow: {{{2 -fun! s:NetrwBMShow() -" call Dfunc("s:NetrwBMShow()") - redir => bmshowraw - menu - redir END - let bmshowlist = split(bmshowraw,'\n') - if bmshowlist != [] - let bmshowfuncs= filter(bmshowlist,'v:val =~ "\\d\\+_BMShow()"') - if bmshowfuncs != [] - let bmshowfunc = substitute(bmshowfuncs[0],'^.*:\(call.*BMShow()\).*$','\1','') - if bmshowfunc =~ '^call.*BMShow()' - exe "silent! ".bmshowfunc - endif - endif - endif -" call Dret("s:NetrwBMShow : bmshowfunc<".(exists("bmshowfunc")? bmshowfunc : 'n/a').">") -endfun - -" --------------------------------------------------------------------- -" s:ComposePath: Appends a new part to a path taking different systems into consideration {{{2 -fun! s:ComposePath(base,subdir) -" call Dfunc("s:ComposePath(base<".a:base."> subdir<".a:subdir.">)") - - if(has("amiga")) -" call Decho("amiga") - let ec = a:base[strlen(a:base)-1] - if ec != '/' && ec != ':' - let ret = a:base . "/" . a:subdir - else - let ret = a:base . a:subdir - endif - - elseif a:subdir =~ '^\a:[/\\][^/\\]' && (has("win32") || has("win95") || has("win64") || has("win16")) -" call Decho("windows") - let ret= a:subdir - - elseif a:base =~ '^\a\+://' -" call Decho("remote linux/macos") - let urlbase = substitute(a:base,'^\(\a\+://.\{-}/\)\(.*\)$','\1','') - let curpath = substitute(a:base,'^\(\a\+://.\{-}/\)\(.*\)$','\2','') - if a:subdir == '../' - if curpath =~ '[^/]/[^/]\+/$' - let curpath= substitute(curpath,'[^/]\+/$','','') - else - let curpath="" - endif - let ret= urlbase.curpath - else - let ret= urlbase.curpath.a:subdir - endif -" call Decho("urlbase<".urlbase.">") -" call Decho("curpath<".curpath.">") -" call Decho("ret<".ret.">") - - else -" call Decho("local linux/macos") - let ret = substitute(a:base."/".a:subdir,"//","/","g") - if a:base =~ '^//' - " keeping initial '//' for the benefit of network share listing support - let ret= '/'.ret - endif - let ret= simplify(ret) - endif - -" call Dret("s:ComposePath ".ret) - return ret -endfun - " --------------------------------------------------------------------- " netrw#ErrorMsg: {{{2 " 0=note = s:NOTE " 1=warning = s:WARNING " 2=error = s:ERROR -" Jun 11, 2008 : max errnum currently is 70 +" Jul 08, 2008 : max errnum currently is 71 fun! netrw#ErrorMsg(level,msg,errnum) " call Dfunc("netrw#ErrorMsg(level=".a:level." msg<".a:msg."> errnum=".a:errnum.") g:netrw_use_errorwindow=".g:netrw_use_errorwindow) @@ -7099,6 +7053,68 @@ fun! netrw#ErrorMsg(level,msg,errnum) endfun " --------------------------------------------------------------------- +" netrw#NetrwRestorePosn: restores the cursor and file position as saved by NetrwSavePosn() {{{2 +fun! netrw#NetrwRestorePosn(...) +" call Dfunc("netrw#NetrwRestorePosn() a:0=".a:0." winnr=".(exists("w:netrw_winnr")? w:netrw_winnr : -1)." line=".(exists("w:netrw_line")? w:netrw_line : -1)." col=".(exists("w:netrw_col")? w:netrw_col : -1)." hline=".(exists("w:netrw_hline")? w:netrw_hline : -1)) + let eikeep= &ei + set ei=all + if expand("%") == "NetrwMessage" + exe s:winBeforeErr."wincmd w" + endif + + if a:0 > 0 + exe a:1 + endif + + " restore window + if exists("w:netrw_winnr") +" call Decho("restore window: exe silent! ".w:netrw_winnr."wincmd w") + exe "silent! ".w:netrw_winnr."wincmd w" + endif + if v:shell_error == 0 + " as suggested by Bram M: redraw on no error + " allows protocol error messages to remain visible +" redraw! + endif + + " restore top-of-screen line + if exists("w:netrw_hline") +" call Decho("restore topofscreen: exe norm! ".w:netrw_hline."G0z") + exe "norm! ".w:netrw_hline."G0z\" + endif + + " restore position + if exists("w:netrw_line") && exists("w:netrw_col") +" call Decho("restore posn: exe norm! ".w:netrw_line."G0".w:netrw_col."|") + exe "norm! ".w:netrw_line."G0".w:netrw_col."\" + endif + + let &ei= eikeep +" call Dret("netrw#NetrwRestorePosn") +endfun + +" --------------------------------------------------------------------- +" netrw#NetrwSavePosn: saves position of cursor on screen {{{2 +fun! netrw#NetrwSavePosn() +" call Dfunc("netrw#NetrwSavePosn()") + " Save current line and column + let w:netrw_winnr= winnr() + let w:netrw_line = line(".") + let w:netrw_col = virtcol(".") + + " Save top-of-screen line + norm! H0 + let w:netrw_hline= line(".") + + " set up string holding position parameters + let ret = "let w:netrw_winnr=".w:netrw_winnr."|let w:netrw_line=".w:netrw_line."|let w:netrw_col=".w:netrw_col."|let w:netrw_hline=".w:netrw_hline + + call netrw#NetrwRestorePosn() +" call Dret("netrw#NetrwSavePosn : winnr=".w:netrw_winnr." line=".w:netrw_line." col=".w:netrw_col." hline=".w:netrw_hline) + return ret +endfun + +" ------------------------------------------------------------------------ " netrw#RFC2396: converts %xx into characters {{{2 fun! netrw#RFC2396(fname) " call Dfunc("netrw#RFC2396(fname<".a:fname.">)") @@ -7107,6 +7123,56 @@ fun! netrw#RFC2396(fname) return fname endfun +" --------------------------------------------------------------------- +" s:ComposePath: Appends a new part to a path taking different systems into consideration {{{2 +fun! s:ComposePath(base,subdir) +" call Dfunc("s:ComposePath(base<".a:base."> subdir<".a:subdir.">)") + + if(has("amiga")) +" call Decho("amiga") + let ec = a:base[strlen(a:base)-1] + if ec != '/' && ec != ':' + let ret = a:base . "/" . a:subdir + else + let ret = a:base . a:subdir + endif + + elseif a:subdir =~ '^\a:[/\\][^/\\]' && (has("win32") || has("win95") || has("win64") || has("win16")) +" call Decho("windows") + let ret= a:subdir + + elseif a:base =~ '^\a\+://' +" call Decho("remote linux/macos") + let urlbase = substitute(a:base,'^\(\a\+://.\{-}/\)\(.*\)$','\1','') + let curpath = substitute(a:base,'^\(\a\+://.\{-}/\)\(.*\)$','\2','') + if a:subdir == '../' + if curpath =~ '[^/]/[^/]\+/$' + let curpath= substitute(curpath,'[^/]\+/$','','') + else + let curpath="" + endif + let ret= urlbase.curpath + else + let ret= urlbase.curpath.a:subdir + endif +" call Decho("urlbase<".urlbase.">") +" call Decho("curpath<".curpath.">") +" call Decho("ret<".ret.">") + + else +" call Decho("local linux/macos") + let ret = substitute(a:base."/".a:subdir,"//","/","g") + if a:base =~ '^//' + " keeping initial '//' for the benefit of network share listing support + let ret= '/'.ret + endif + let ret= simplify(ret) + endif + +" call Dret("s:ComposePath ".ret) + return ret +endfun + " --------------------------------------------------------------------- " s:FileReadable: o/s independent filereadable {{{2 fun! s:FileReadable(fname) @@ -7134,12 +7200,12 @@ fun! s:GetTempfile(fname) let tmpfile= tempname() " call Decho("tmpfile<".tmpfile."> : from tempname()") - let tmpfile= escape(substitute(tmpfile,'\','/','ge'),g:netrw_tmpfile_escape) + let tmpfile= substitute(tmpfile,'\','/','ge') " call Decho("tmpfile<".tmpfile."> : chgd any \\ -> /") " sanity check -- does the temporary file's directory exist? if !isdirectory(substitute(tmpfile,'[^/]\+$','','e')) -" call Decho("ro=".&ro." ma=".&ma." mod=".&mod." wrap=".&wrap) +" call Decho("ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap) call netrw#ErrorMsg(s:ERROR,"your <".substitute(tmpfile,'[^/]\+$','','e')."> directory is missing!",2) " call Dret("s:GetTempfile getcwd<".getcwd().">") return "" @@ -7176,7 +7242,6 @@ fun! s:GetTempfile(fname) else let suffix = substitute(a:fname,'^.*\(\.[^./]\+\)$','\1','e') endif - let suffix = escape(suffix,g:netrw_tmpfile_escape) " call Decho("suffix<".suffix.">") let tmpfile= substitute(tmpfile,'\.tmp$','','e') " call Decho("chgd tmpfile<".tmpfile."> (removed any .tmp suffix)") @@ -7186,14 +7251,14 @@ fun! s:GetTempfile(fname) endif endif -" call Decho("ro=".&ro." ma=".&ma." mod=".&mod." wrap=".&wrap) +" call Decho("ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap) " call Dret("s:GetTempfile <".tmpfile.">") return tmpfile endfun " --------------------------------------------------------------------- " s:MakeSshCmd: transforms input command using USEPORT HOSTNAME into {{{2 -" a correct command +" a correct command for use with a system() call fun! s:MakeSshCmd(sshcmd) " call Dfunc("s:MakeSshCmd(sshcmd<".a:sshcmd.">) user<".s:user."> machine<".s:machine.">") let sshcmd = substitute(a:sshcmd,'\',s:user.s:machine,'') @@ -7209,28 +7274,54 @@ fun! s:MakeSshCmd(sshcmd) endfun " --------------------------------------------------------------------- -" s:RemoteSystem: runs a command on a remote host using ssh {{{2 -" Returns status -fun! s:RemoteSystem(cmd) -" call Dfunc("s:RemoteSystem(cmd<".a:cmd.">)") - if !executable(g:netrw_ssh_cmd) - call netrw#ErrorMsg(s:ERROR,"g:netrw_ssh_cmd<".g:netrw_ssh_cmd."> is not executable!",52) - elseif !exists("b:netrw_curdir") - call netrw#ErrorMsg(s:ERROR,"for some reason b:netrw_curdir doesn't exist!",53) - else - let cmd = s:MakeSshCmd(g:netrw_ssh_cmd." USEPORT HOSTNAME") - let remotedir= substitute(b:netrw_curdir,'^.*//[^/]\+/\(.*\)$','\1','') - if remotedir != "" - let cmd= cmd.' "cd '.shellescape(remotedir).";" - else - let cmd= cmd.' "' +" s:NetrwBMShow: {{{2 +fun! s:NetrwBMShow() +" call Dfunc("s:NetrwBMShow()") + redir => bmshowraw + menu + redir END + let bmshowlist = split(bmshowraw,'\n') + if bmshowlist != [] + let bmshowfuncs= filter(bmshowlist,'v:val =~ "\\d\\+_BMShow()"') + if bmshowfuncs != [] + let bmshowfunc = substitute(bmshowfuncs[0],'^.*:\(call.*BMShow()\).*$','\1','') + if bmshowfunc =~ '^call.*BMShow()' + exe "silent! ".bmshowfunc + endif endif - let cmd= cmd.a:cmd.'"' -" call Decho("call system(".cmd.")") - let ret= system(cmd) endif -" call Dret("s:RemoteSystem ".ret) - return ret +" call Dret("s:NetrwBMShow : bmshowfunc<".(exists("bmshowfunc")? bmshowfunc : 'n/a').">") +endfun + +" --------------------------------------------------------------------- +" s:NetrwDelete: Deletes a file. {{{2 +" Uses Steve Hall's idea to insure that Windows paths stay +" acceptable. No effect on Unix paths. +" Examples of use: let result= s:NetrwDelete(path) +fun! s:NetrwDelete(path) +" call Dfunc("s:NetrwDelete(path<".a:path.">)") + + let path = s:WinPath(a:path) + if !g:netrw_cygwin && (has("win32") || has("win95") || has("win64") || has("win16")) + if exists("+shellslash") + let sskeep= &shellslash + setlocal noshellslash + let result = delete(path) + let &shellslash = sskeep + else +" call Decho("exe let result= ".a:cmd."('".path."')") + let result= delete(path) + endif + else +" call Decho("let result= delete(".path.")") + let result= delete(path) + endif + if result < 0 + call Netrw#ErrorMsg(s:WARNING,"delete(".path.") failed!",71) + endif + +" call Dret("s:NetrwDelete ".result) + return result endfun " --------------------------------------------------------------------- @@ -7286,7 +7377,7 @@ fun! s:NetrwEnew(curdir) nno [ :silent call TreeListMove('[') nno ] :silent call TreeListMove(']') else - exe "silent! keepalt file ".b:netrw_curdir + exe "silent! keepalt file ".fnameescape(b:netrw_curdir) endif endif @@ -7294,68 +7385,6 @@ fun! s:NetrwEnew(curdir) endfun " ------------------------------------------------------------------------ -" netrw#NetrwSavePosn: saves position of cursor on screen {{{2 -fun! netrw#NetrwSavePosn() -" call Dfunc("netrw#NetrwSavePosn()") - " Save current line and column - let w:netrw_winnr= winnr() - let w:netrw_line = line(".") - let w:netrw_col = virtcol(".") - - " Save top-of-screen line - norm! H0 - let w:netrw_hline= line(".") - - " set up string holding position parameters - let ret = "let w:netrw_winnr=".w:netrw_winnr."|let w:netrw_line=".w:netrw_line."|let w:netrw_col=".w:netrw_col."|let w:netrw_hline=".w:netrw_hline - - call netrw#NetrwRestorePosn() -" call Dret("netrw#NetrwSavePosn : winnr=".w:netrw_winnr." line=".w:netrw_line." col=".w:netrw_col." hline=".w:netrw_hline) - return ret -endfun - -" ------------------------------------------------------------------------ -" netrw#NetrwRestorePosn: restores the cursor and file position as saved by NetrwSavePosn() {{{2 -fun! netrw#NetrwRestorePosn(...) -" call Dfunc("netrw#NetrwRestorePosn() a:0=".a:0." winnr=".(exists("w:netrw_winnr")? w:netrw_winnr : -1)." line=".(exists("w:netrw_line")? w:netrw_line : -1)." col=".(exists("w:netrw_col")? w:netrw_col : -1)." hline=".(exists("w:netrw_hline")? w:netrw_hline : -1)) - let eikeep= &ei - set ei=all - if expand("%") == "NetrwMessage" - exe s:winBeforeErr."wincmd w" - endif - - if a:0 > 0 - exe a:1 - endif - - " restore window - if exists("w:netrw_winnr") -" call Decho("restore window: exe silent! ".w:netrw_winnr."wincmd w") - exe "silent! ".w:netrw_winnr."wincmd w" - endif - if v:shell_error == 0 - " as suggested by Bram M: redraw on no error - " allows protocol error messages to remain visible -" redraw! - endif - - " restore top-of-screen line - if exists("w:netrw_hline") -" call Decho("restore topofscreen: exe norm! ".w:netrw_hline."G0z") - exe "norm! ".w:netrw_hline."G0z\" - endif - - " restore position - if exists("w:netrw_line") && exists("w:netrw_col") -" call Decho("restore posn: exe norm! ".w:netrw_line."G0".w:netrw_col."|") - exe "norm! ".w:netrw_line."G0".w:netrw_col."\" - endif - - let &ei= eikeep -" call Dret("netrw#NetrwRestorePosn") -endfun - -" --------------------------------------------------------------------- " s:NetrwSaveWordPosn: used to keep cursor on same word after refresh, {{{2 " changed sorting, etc. Also see s:NetrwRestoreWordPosn(). fun! s:NetrwSaveWordPosn() @@ -7373,6 +7402,21 @@ fun! s:NetrwRestoreWordPosn() " call Dret("NetrwRestoreWordPosn") endfun +" --------------------------------------------------------------------- +" s:RestoreBufVars: {{{2 +fun! s:RestoreBufVars() +" call Dfunc("s:RestoreBufVars()") + + if exists("s:netrw_curdir") |let b:netrw_curdir = s:netrw_curdir |endif + if exists("s:netrw_lastfile") |let b:netrw_lastfile = s:netrw_lastfile |endif + if exists("s:netrw_method") |let b:netrw_method = s:netrw_method |endif + if exists("s:netrw_fname") |let b:netrw_fname = s:netrw_fname |endif + if exists("s:netrw_machine") |let b:netrw_machine = s:netrw_machine |endif + if exists("s:netrw_browser_active")|let b:netrw_browser_active = s:netrw_browser_active|endif + +" call Dret("s:RestoreBufVars") +endfun + " --------------------------------------------------------------------- " s:RemotePathAnalysis: {{{2 fun! s:RemotePathAnalysis(dirname) @@ -7397,18 +7441,31 @@ fun! s:RemotePathAnalysis(dirname) endfun " --------------------------------------------------------------------- -" s:RestoreBufVars: {{{2 -fun! s:RestoreBufVars() -" call Dfunc("s:RestoreBufVars()") - - if exists("s:netrw_curdir") |let b:netrw_curdir = s:netrw_curdir |endif - if exists("s:netrw_lastfile") |let b:netrw_lastfile = s:netrw_lastfile |endif - if exists("s:netrw_method") |let b:netrw_method = s:netrw_method |endif - if exists("s:netrw_fname") |let b:netrw_fname = s:netrw_fname |endif - if exists("s:netrw_machine") |let b:netrw_machine = s:netrw_machine |endif - if exists("s:netrw_browser_active")|let b:netrw_browser_active = s:netrw_browser_active|endif - -" call Dret("s:RestoreBufVars") +" s:RemoteSystem: runs a command on a remote host using ssh {{{2 +" Returns status +" Runs system() on +" [cd REMOTEDIRPATH;] a:cmd +" Note that it doesn't do shellescape(a:cmd)! +fun! s:RemoteSystem(cmd) +" call Dfunc("s:RemoteSystem(cmd<".a:cmd.">)") + if !executable(g:netrw_ssh_cmd) + call netrw#ErrorMsg(s:ERROR,"g:netrw_ssh_cmd<".g:netrw_ssh_cmd."> is not executable!",52) + elseif !exists("b:netrw_curdir") + call netrw#ErrorMsg(s:ERROR,"for some reason b:netrw_curdir doesn't exist!",53) + else + let cmd = s:MakeSshCmd(g:netrw_ssh_cmd." USEPORT HOSTNAME") + let remotedir= substitute(b:netrw_curdir,'^.*//[^/]\+/\(.*\)$','\1','') + if remotedir != "" + let cmd= cmd.' cd '.shellescape(remotedir).";" + else + let cmd= cmd.' ' + endif + let cmd= cmd.a:cmd +" call Decho("call system(".cmd.")") + let ret= system(cmd) + endif +" call Dret("s:RemoteSystem ".ret) + return ret endfun " --------------------------------------------------------------------- @@ -7525,22 +7582,24 @@ fun! s:SetRexDir(islocal,dirname) " call Dfunc("s:SetRexDir(islocal=".a:islocal." dirname<".a:dirname.">)") " set up Rex and leftmouse-double-click if a:islocal - exe 'com! Rexplore call s:NetrwRexplore(1,"'.a:dirname.'")' + exe 'com! Rexplore call s:NetrwRexplore(1,"'.escape(a:dirname,'"\').'")' if g:netrw_retmap silent! unmap <2-leftmouse> if !hasmapto("NetrwReturn") nmap <2-leftmouse> NetrwReturn endif - exe 'nnoremap NetrwReturn :call NetrwRexplore(1,"'.a:dirname.'")' + let dir = escape(a:dirname, s:netrw_map_escape) + exe 'nnoremap NetrwReturn :call NetrwRexplore(1,"'.dir.'")' endif else - exe 'com! Rexplore call s:NetrwRexplore(0,"'.a:dirname.'")' + exe 'com! Rexplore call s:NetrwRexplore(0,"'.escape(a:dirname,'"\').'")' if g:netrw_retmap silent! unmap <2-leftmouse> if !hasmapto("NetrwReturn") nmap <2-leftmouse> NetrwReturn endif - exe 'nnoremap NetrwReturn :call NetrwRexplore(0,"'.a:dirname.'")' + let dir = escape(a:dirname, s:netrw_map_escape) + exe 'nnoremap NetrwReturn :call NetrwRexplore(0,"'.dir.'")' endif endif " call Dret("s:SetRexDir") @@ -7585,44 +7644,6 @@ fun! s:Strlen(x) return ret endfun -" --------------------------------------------------------------------- -" s:System: using Steve Hall's idea to insure that Windows paths stay {{{2 -" acceptable. No effect on Unix paths. -" Examples of use: let result= s:System("rm",path) -" let result= s:System("delete",path) -fun! netrw#System(cmd,path) - echomsg s:System(a:cmd,a:path) -endfun -fun! s:System(cmd,path) -" call Dfunc("s:System(cmd<".a:cmd."> path<".a:path.">)") - - let path = a:path - if !g:netrw_cygwin && (has("win32") || has("win95") || has("win64") || has("win16")) - " system call prep - " remove trailing slash (Win95) - let path = substitute(path, '\(\\\|/\)$', '', 'g') - " remove escaped spaces - let path = substitute(path, '\ ', ' ', 'g') - " convert slashes to backslashes - let path = substitute(path, '/', '\', 'g') - if exists("+shellslash") - let sskeep= &shellslash - setlocal noshellslash - exe "let result= ".a:cmd."('".path."')" - let &shellslash = sskeep - else -" call Decho("exe let result= ".a:cmd."('".path."')") - exe "let result= ".a:cmd."('".path."')" - endif - else -" call Decho("exe let result= ".a:cmd."('".path."')") - exe "let result= ".a:cmd."('".path."')" - endif - -" call Dret("s:System result<".result.">") - return result -endfun - " --------------------------------------------------------------------- " s:TreeListMove: {{{2 fun! s:TreeListMove(dir) @@ -7679,6 +7700,24 @@ fun! s:TreeListMove(dir) " call Dret("s:TreeListMove") endfun +" --------------------------------------------------------------------- +" s:UpdateBuffersMenu: does emenu Buffers.Refresh (but due to locale, the menu item may not be called that) {{{2 +" The Buffers.Refresh menu calls s:BMShow(); unfortunately, that means that that function +" can't be called except via emenu. But due to locale, that menu line may not be called +" Buffers.Refresh; hence, s:NetrwBMShow() utilizes a "cheat" to call that function anyway. +fun! s:UpdateBuffersMenu() +" call Dfunc("s:UpdateBuffersMenu()") + if has("gui") && has("menu") && has("gui_running") && &go =~ 'm' + try + silent emenu Buffers.Refresh\ menu + catch /^Vim\%((\a\+)\)\=:E/ + let v:errmsg= "" + silent call s:NetrwBMShow() + endtry + endif +" call Dret("s:UpdateBuffersMenu") +endfun + " --------------------------------------------------------------------- " s:UseBufWinVars: (used by NetrwBrowse() and LocalBrowseCheck() {{{2 " Matching function to BufferWinVars() @@ -7697,6 +7736,24 @@ fun! s:UseBufWinVars() " call Dret("s:UseBufWinVars") endfun +" --------------------------------------------------------------------- +" s:WinPath: {{{2 +fun! s:WinPath(path) +" call Dfunc("s:WinPath(path<".a:path.">)") + if !g:netrw_cygwin && (has("win32") || has("win95") || has("win64") || has("win16")) + " remove trailing slash (Win95) + let path = substitute(a:path, '\(\\\|/\)$', '', 'g') + " remove escaped spaces + let path = substitute(path, '\ ', ' ', 'g') + " convert slashes to backslashes + let path = substitute(path, '/', '\', 'g') + else + let path= a:path + endif +" call Dret("s:WinPath <".path.">") + return path +endfun + " --------------------------------------------------------------------- " Settings Restoration: {{{2 let &cpo= s:keepcpo diff --git a/runtime/autoload/netrwSettings.vim b/runtime/autoload/netrwSettings.vim index d6a9362479..c0704d4ef4 100644 --- a/runtime/autoload/netrwSettings.vim +++ b/runtime/autoload/netrwSettings.vim @@ -1,7 +1,7 @@ " netrwSettings.vim: makes netrw settings simpler -" Date: Mar 11, 2008 +" Date: Jul 02, 2008 " Maintainer: Charles E Campbell, Jr -" Version: 11 +" Version: 12 " Copyright: Copyright (C) 1999-2007 Charles E. Campbell, Jr. {{{1 " Permission is hereby granted to use and distribute this code, " with or without modifications, provided that this copyright @@ -19,7 +19,7 @@ if exists("g:loaded_netrwSettings") || &cp finish endif -let g:loaded_netrwSettings = "v11" +let g:loaded_netrwSettings = "v12" " --------------------------------------------------------------------- " NetrwSettings: {{{1 @@ -82,8 +82,6 @@ fun! netrwSettings#NetrwSettings() put = 'let g:netrw_ftpmode = '.g:netrw_ftpmode put = 'let g:netrw_ignorenetrc = '.g:netrw_ignorenetrc put = 'let g:netrw_sshport = '.g:netrw_sshport - let shqline= line("$") - put = 'let g:netrw_shq...' put = 'let g:netrw_use_nt_rcp = '.g:netrw_use_nt_rcp put = 'let g:netrw_win95ftp = '.g:netrw_win95ftp let s:netrw_xfer_stop= line(".") @@ -101,8 +99,6 @@ fun! netrwSettings#NetrwSettings() else put = 'let g:netrw_browsex_viewer = (not defined)' endif - let cdescline= line("$") - put ='let g:netrw_cd_escape...' put = 'let g:netrw_compress = '.g:netrw_compress let decompressline= line("$") put ='let g:netrw_decompress...' @@ -137,6 +133,7 @@ fun! netrwSettings#NetrwSettings() put = 'let g:netrw_silent = '.g:netrw_silent put = 'let g:netrw_sort_by = '.g:netrw_sort_by put = 'let g:netrw_sort_direction = '.g:netrw_sort_direction + put = 'let g:netrw_sort_options = '.g:netrw_sort_options put = 'let g:netrw_sort_sequence = '.g:netrw_sort_sequence put = 'let g:netrw_special_syntax = '.g:netrw_special_syntax put = 'let g:netrw_ssh_browse_reject = '.g:netrw_ssh_browse_reject @@ -159,14 +156,6 @@ fun! netrwSettings#NetrwSettings() silent %s/= $/= ''/e 1 - " Put in g:netrw_shq setting and g:netrw_cd_escape - " (deferred so as to avoid the quote manipulation just preceding) - if g:netrw_shq == "'" - call setline(shqline, 'let g:netrw_shq = "'.g:netrw_shq.'"') - else - call setline(shqline, "let g:netrw_shq = '".g:netrw_shq."'") - endif - call setline(cdescline, "let g:netrw_cd_escape = ".'"'.escape(g:netrw_cd_escape,'\"').'"') call setline(decompressline,"let g:netrw_decompress = ".substitute(string(g:netrw_decompress),"^'\\(.*\\)'$",'\1','')) call setline(fnameescline, "let g:netrw_fname_escape = '".escape(g:netrw_fname_escape,"'")."'") call setline(globescline, "let g:netrw_glob_escape = '".escape(g:netrw_glob_escape,"'")."'") diff --git a/runtime/autoload/rubycomplete.vim b/runtime/autoload/rubycomplete.vim index 47c77d93d7..87e6c9a0fb 100644 --- a/runtime/autoload/rubycomplete.vim +++ b/runtime/autoload/rubycomplete.vim @@ -301,7 +301,7 @@ class VimRubyCompletion def get_buffer_entity(name, vimfun) loading_allowed = VIM::evaluate("exists('g:rubycomplete_buffer_loading') && g:rubycomplete_buffer_loading") - return nil if loading_allowed != '1' + return nil if loading_allowed.to_i.zero? return nil if /(\"|\')+/.match( name ) buf = VIM::Buffer.current nums = eval( VIM::evaluate( vimfun % name ) ) @@ -368,7 +368,7 @@ class VimRubyCompletion # this will be a little expensive. loading_allowed = VIM::evaluate("exists('g:rubycomplete_buffer_loading') && g:rubycomplete_buffer_loading") allow_aggressive_load = VIM::evaluate("exists('g:rubycomplete_classes_in_global') && g:rubycomplete_classes_in_global") - return [] if allow_aggressive_load != '1' || loading_allowed != '1' + return [] if allow_aggressive_load.to_i.zero? || loading_allowed.to_i.zero? buf = VIM::Buffer.current eob = buf.length @@ -401,7 +401,7 @@ class VimRubyCompletion def load_rails allow_rails = VIM::evaluate("exists('g:rubycomplete_rails') && g:rubycomplete_rails") - return if allow_rails != '1' + return if allow_rails.to_i.zero? buf_path = VIM::evaluate('expand("%:p")') file_name = VIM::evaluate('expand("%:t")') @@ -461,7 +461,7 @@ class VimRubyCompletion def get_rails_helpers allow_rails = VIM::evaluate("exists('g:rubycomplete_rails') && g:rubycomplete_rails") rails_loaded = VIM::evaluate('s:rubycomplete_rails_loaded') - return [] if allow_rails != '1' || rails_loaded != '1' + return [] if allow_rails.to_i.zero? || rails_loaded.to_i.zero? buf_path = VIM::evaluate('expand("%:p")') buf_path.gsub!( /\\/, "/" ) @@ -511,7 +511,7 @@ class VimRubyCompletion def add_rails_columns( cls ) allow_rails = VIM::evaluate("exists('g:rubycomplete_rails') && g:rubycomplete_rails") rails_loaded = VIM::evaluate('s:rubycomplete_rails_loaded') - return [] if allow_rails != '1' || rails_loaded != '1' + return [] if allow_rails.to_i.zero? || rails_loaded.to_i.zero? begin eval( "#{cls}.establish_connection" ) @@ -534,7 +534,7 @@ class VimRubyCompletion def get_rails_view_methods allow_rails = VIM::evaluate("exists('g:rubycomplete_rails') && g:rubycomplete_rails") rails_loaded = VIM::evaluate('s:rubycomplete_rails_loaded') - return [] if allow_rails != '1' || rails_loaded != '1' + return [] if allow_rails.to_i.zero? || rails_loaded.to_i.zero? buf_path = VIM::evaluate('expand("%:p")') buf_path.gsub!( /\\/, "/" ) @@ -580,7 +580,7 @@ class VimRubyCompletion def get_completions(base) loading_allowed = VIM::evaluate("exists('g:rubycomplete_buffer_loading') && g:rubycomplete_buffer_loading") - if loading_allowed == '1' + if loading_allowed.to_i == 1 load_requires load_rails end diff --git a/runtime/autoload/tar.vim b/runtime/autoload/tar.vim index 35ef7fd253..af6fbca2e1 100644 --- a/runtime/autoload/tar.vim +++ b/runtime/autoload/tar.vim @@ -1,7 +1,7 @@ " tar.vim: Handles browsing tarfiles " AUTOLOAD PORTION -" Date: Jun 12, 2008 -" Version: 16 +" Date: Aug 08, 2008 +" Version: 23 + modifications by Bram " Maintainer: Charles E Campbell, Jr " License: Vim License (see vim's :help license) " @@ -24,7 +24,7 @@ set cpo&vim if &cp || exists("g:loaded_tar") || v:version < 700 finish endif -let g:loaded_tar= "v16" +let g:loaded_tar= "v23b" "call Decho("loading autoload/tar.vim") if v:version < 701 || (v:version == 701 && !has("patch299")) echoerr "(autoload/tar.vim) need vim v7.1 with patchlevel 299" @@ -130,21 +130,25 @@ fun! tar#Browse(tarfile) let tarfile= a:tarfile if has("win32") && executable("cygpath") " assuming cygwin - let tarfile=substitute(system("cygpath -u ".s:Escape(tarfile)),'\n$','','e') + let tarfile=substitute(system("cygpath -u ".s:Escape(tarfile,0)),'\n$','','e') endif let curlast= line("$") if tarfile =~# '\.\(gz\|tgz\)$' -" call Decho("1: exe silent r! gzip -d -c ".s:Escape(tarfile)." | ".g:tar_cmd." -".g:tar_browseoptions." - ") - exe "silent r! gzip -d -c -- ".s:Escape(tarfile)." | ".g:tar_cmd." -".g:tar_browseoptions." - " +" call Decho("1: exe silent r! gzip -d -c -- ".s:Escape(tarfile,1)." | ".g:tar_cmd." -".g:tar_browseoptions." - ") + exe "silent r! gzip -d -c -- ".s:Escape(tarfile,1)." | ".g:tar_cmd." -".g:tar_browseoptions." - " elseif tarfile =~# '\.lrp' -" call Decho("2: exe silent r! cat -- ".s:Escape(tarfile)."|gzip -d -c -|".g:tar_cmd." -".g:tar_browseoptions." - ") - exe "silent r! cat -- ".s:Escape(tarfile)."|gzip -d -c -|".g:tar_cmd." -".g:tar_browseoptions." - " +" call Decho("2: exe silent r! cat -- ".s:Escape(tarfile,1)."|gzip -d -c -|".g:tar_cmd." -".g:tar_browseoptions." - ") + exe "silent r! cat -- ".s:Escape(tarfile,1)."|gzip -d -c -|".g:tar_cmd." -".g:tar_browseoptions." - " elseif tarfile =~# '\.bz2$' -" call Decho("3: exe silent r! bzip2 -d -c ".s:Escape(tarfile)." | ".g:tar_cmd." -".g:tar_browseoptions." - ") - exe "silent r! bzip2 -d -c -- ".s:Escape(tarfile)." | ".g:tar_cmd." -".g:tar_browseoptions." - " +" call Decho("3: exe silent r! bzip2 -d -c -- ".s:Escape(tarfile,1)." | ".g:tar_cmd." -".g:tar_browseoptions." - ") + exe "silent r! bzip2 -d -c -- ".s:Escape(tarfile,1)." | ".g:tar_cmd." -".g:tar_browseoptions." - " else -" call Decho("4: exe silent r! ".g:tar_cmd." -".g:tar_browseoptions." ".s:Escape(tarfile)) - exe "silent r! ".g:tar_cmd." -".g:tar_browseoptions." ".s:Escape(tarfile) + if tarfile =~ '^\s*-' + " A file name starting with a dash may be taken as an option. Prepend ./ to avoid that. + let tarfile = substitute(tarfile, '-', './-', '') + endif +" call Decho("4: exe silent r! ".g:tar_cmd." -".g:tar_browseoptions." ".s:Escape(tarfile,1)) + exe "silent r! ".g:tar_cmd." -".g:tar_browseoptions." ".s:Escape(tarfile,1) endif if v:shell_error != 0 redraw! @@ -160,7 +164,7 @@ fun! tar#Browse(tarfile) silent %d let eikeep= &ei set ei=BufReadCmd,FileReadCmd - exe "r ".a:tarfile + exe "r ".fnameescape(a:tarfile) let &ei= eikeep 1d " call Dret("tar#Browse : a:tarfile<".a:tarfile.">") @@ -183,6 +187,13 @@ fun! s:TarBrowseSelect() let fname= getline(".") " call Decho("fname<".fname.">") + if !exists("g:tar_secure") && fname =~ '^\s*-\|\s\+-' + redraw! + echohl WarningMsg | echo '***error*** (tar#BrowseSelect) rejecting tarfile member<'.fname.'> because of embedded "-"; See :help tar-options' +" call Dret('tar#BrowseSelect : rejecting tarfile member<'.fname.'> because of embedded "-"') + return + endif + " sanity check if fname =~ '^"' let &report= repkeep @@ -195,7 +206,7 @@ fun! s:TarBrowseSelect() let curfile= expand("%") if has("win32") && executable("cygpath") " assuming cygwin - let tarfile=substitute(system("cygpath -u ".s:Escape(tarfile)),'\n$','','e') + let tarfile=substitute(system("cygpath -u ".s:Escape(tarfile,0)),'\n$','','e') endif new @@ -220,7 +231,7 @@ fun! tar#Read(fname,mode) let fname = substitute(a:fname,'tarfile:.\{-}::\(.*\)$','\1','') if has("win32") && executable("cygpath") " assuming cygwin - let tarfile=substitute(system("cygpath -u ".s:Escape(tarfile)),'\n$','','e') + let tarfile=substitute(system("cygpath -u ".s:Escape(tarfile,0)),'\n$','','e') endif " call Decho("tarfile<".tarfile.">") " call Decho("fname<".fname.">") @@ -239,18 +250,27 @@ fun! tar#Read(fname,mode) endif endif - if tarfile =~# '\.\(gz\|tgz\)$' -" call Decho("5: exe silent r! gzip -d -c -- ".s:Escape(tarfile)."| ".g:tar_cmd.' -'.g:tar_readoptions.' - '.s:Escape(fname)) - exe "silent r! gzip -d -c -- ".s:Escape(tarfile)."| ".g:tar_cmd." -".g:tar_readoptions." - ".s:Escape(fname).decmp - elseif tarfile =~# '\.lrp$' -" call Decho("6: exe silent r! cat ".s:Escape(tarfile)." | gzip -d -c - | ".g:tar_cmd." -".g:tar_readoptions." - ".s:Escape(fname).decmp) - exe "silent r! cat -- ".s:Escape(tarfile)." | gzip -d -c - | ".g:tar_cmd." -".g:tar_readoptions." - ".s:Escape(fname).decmp - elseif tarfile =~# '\.bz2$' -" call Decho("7: exe silent r! bzip2 -d -c ".s:Escape(tarfile)."| ".g:tar_cmd." -".g:tar_readoptions." - ".s:Escape(fname).decmp) - exe "silent r! bzip2 -d -c -- ".s:Escape(tarfile)."| ".g:tar_cmd." -".g:tar_readoptions." - ".s:Escape(fname).decmp + if exists("g:tar_secure") + let tar_secure= " -- " else -" call Decho("8: exe silent r! ".g:tar_cmd." -".g:tar_readoptions." -- ".s:Escape(tarfile)." ".s:Escape(fname)) - exe "silent r! ".g:tar_cmd." -".g:tar_readoptions." ".s:Escape(tarfile)." -- ".s:Escape(fname).decmp + let tar_secure= " " + endif + if tarfile =~# '\.\(gz\|tgz\)$' +" call Decho("5: exe silent r! gzip -d -c -- ".s:Escape(tarfile,1)."| ".g:tar_cmd.' -'.g:tar_readoptions.' - '.tar_secure.s:Escape(fname,1)) + exe "silent r! gzip -d -c -- ".s:Escape(tarfile,1)."| ".g:tar_cmd." -".g:tar_readoptions." - ".tar_secure.s:Escape(fname,1).decmp + elseif tarfile =~# '\.lrp$' +" call Decho("6: exe silent r! cat ".s:Escape(tarfile,1)." | gzip -d -c - | ".g:tar_cmd." -".g:tar_readoptions." - ".tar_secure.s:Escape(fname,1).decmp) + exe "silent r! cat -- ".s:Escape(tarfile,1)." | gzip -d -c - | ".g:tar_cmd." -".g:tar_readoptions." - ".tar_secure.s:Escape(fname,1).decmp + elseif tarfile =~# '\.bz2$' +" call Decho("7: exe silent r! bzip2 -d -c ".s:Escape(tarfile,1)."| ".g:tar_cmd." -".g:tar_readoptions." - ".tar_secure.s:Escape(fname,1).decmp) + exe "silent r! bzip2 -d -c -- ".s:Escape(tarfile,1)."| ".g:tar_cmd." -".g:tar_readoptions." - ".tar_secure.s:Escape(fname,1).decmp + else + if tarfile =~ '^\s*-' + " A file name starting with a dash may be taken as an option. Prepend ./ to avoid that. + let tarfile = substitute(tarfile, '-', './-', '') + endif +" call Decho("8: exe silent r! ".g:tar_cmd." -".g:tar_readoptions." "s:Escape(tarfile,1).tar_secure..s:Escape(fname,1).decmp) + exe "silent r! ".g:tar_cmd." -".g:tar_readoptions." ".s:Escape(tarfile,1).tar_secure.s:Escape(fname,1).decmp endif if doro @@ -259,7 +279,7 @@ fun! tar#Read(fname,mode) endif let w:tarfile= a:fname - exe "file tarfile::".fname + exe "file tarfile::".fnameescape(fname) " cleanup 0d @@ -276,6 +296,13 @@ fun! tar#Write(fname) let repkeep= &report set report=10 + if !exists("g:tar_secure") && a:fname =~ '^\s*-\|\s\+-' + redraw! + echohl WarningMsg | echo '***error*** (tar#Write) rejecting tarfile member<'.a:fname.'> because of embedded "-"; See :help tar-options' +" call Dret('tar#Write : rejecting tarfile member<'.fname.'> because of embedded "-"') + return + endif + " sanity checks if !executable(g:tar_cmd) redraw! @@ -329,21 +356,23 @@ fun! tar#Write(fname) " handle compressed archives if tarfile =~# '\.gz' - call system("gzip -d -- ".tarfile) + call system("gzip -d -- ".s:Escape(tarfile,0)) let tarfile = substitute(tarfile,'\.gz','','e') - let compress= "gzip ".s:Escape(tarfile) + let compress= "gzip -- ".s:Escape(tarfile,0) +" call Decho("compress<".compress.">") elseif tarfile =~# '\.tgz' - call system("gzip -d -- ".s:Escape(tarfile)) + call system("gzip -d -- ".s:Escape(tarfile,0)) let tarfile = substitute(tarfile,'\.tgz','.tar','e') - let compress= "gzip -- ".s:Escape(tarfile) + let compress= "gzip -- ".s:Escape(tarfile,0) let tgz = 1 +" call Decho("compress<".compress.">") elseif tarfile =~# '\.bz2' - call system("bzip2 -d -- ".s:Escape(tarfile)) + call system("bzip2 -d -- ".s:Escape(tarfile,0)) let tarfile = substitute(tarfile,'\.bz2','','e') - let compress= "bzip2 -- ".s:Escape(tarfile) + let compress= "bzip2 -- ".s:Escape(tarfile,0) +" call Decho("compress<".compress.">") endif " call Decho("tarfile<".tarfile.">") -" call Decho("compress<".compress.">") if v:shell_error != 0 redraw! @@ -356,23 +385,32 @@ fun! tar#Write(fname) if fname =~ '/' let dirpath = substitute(fname,'/[^/]\+$','','e') if executable("cygpath") - let dirpath = substitute(system("cygpath ".dirpath),'\n','','e') + let dirpath = substitute(system("cygpath ".s:Escape(dirpath, 0)),'\n','','e') endif call mkdir(dirpath,"p") endif if tarfile !~ '/' let tarfile= curdir.'/'.tarfile endif + if tarfile =~ '^\s*-' + " A file name starting with a dash may be taken as an option. Prepend ./ to avoid that. + let tarfile = substitute(tarfile, '-', './-', '') + endif " call Decho("tarfile<".tarfile."> fname<".fname.">") + if exists("g:tar_secure") + let tar_secure= " -- " + else + let tar_secure= " " + endif exe "w! ".fnameescape(fname) if executable("cygpath") - let tarfile = substitute(system("cygpath ".s:Escape(tarfile)),'\n','','e') + let tarfile = substitute(system("cygpath ".s:Escape(tarfile,0)),'\n','','e') endif " delete old file from tarfile -" call Decho("system(tar --delete -f ".s:Escape(tarfile)." -- ".s:Escape(fname).")") - call system("tar --delete -f ".s:Escape(tarfile)." -- ".s:Escape(fname)) +" call Decho("system(".g:tar_cmd." --delete -f ".s:Escape(tarfile,0)." -- ".s:Escape(fname,0).")") + call system(g:tar_cmd." --delete -f ".s:Escape(tarfile,0).tar_secure.s:Escape(fname,0)) if v:shell_error != 0 redraw! echohl Error | echo "***error*** (tar#Write) sorry, unable to update ".fnameescape(tarfile)." with ".fnameescape(fname) | echohl None @@ -380,8 +418,8 @@ fun! tar#Write(fname) else " update tarfile with new file -" call Decho("tar -".g:tar_writeoptions." ".s:Escape(tarfile)." -- ".s:Escape(fname)) - call system("tar -".g:tar_writeoptions." ".s:Escape(tarfile)." -- ".s:Escape(fname)) +" call Decho(g:tar_cmd." -".g:tar_writeoptions." ".s:Escape(tarfile,0).tar_secure.s:Escape(fname,0)) + call system(g:tar_cmd." -".g:tar_writeoptions." ".s:Escape(tarfile,0).tar_secure.s:Escape(fname,0)) if v:shell_error != 0 redraw! echohl Error | echo "***error*** (tar#Write) sorry, unable to update ".fnameescape(tarfile)." with ".fnameescape(fname) | echohl None @@ -404,7 +442,7 @@ fun! tar#Write(fname) let binkeep= &binary let eikeep = &ei set binary ei=all - exe "e! ".tarfile + exe "e! ".fnameescape(tarfile) call netrw#NetWrite(tblfile) let &ei = eikeep let &binary = binkeep @@ -416,7 +454,7 @@ fun! tar#Write(fname) " cleanup and restore current directory cd .. call s:Rmdir("_ZIPVIM_") - exe "cd ".escape(curdir,' \') + exe "cd ".fnameescape(curdir) setlocal nomod let &report= repkeep @@ -428,12 +466,12 @@ endfun fun! s:Rmdir(fname) " call Dfunc("Rmdir(fname<".a:fname.">)") if has("unix") - call system("/bin/rm -rf -- ".s:Escape(a:fname)) + call system("/bin/rm -rf -- ".s:Escape(a:fname,0)) elseif has("win32") || has("win95") || has("win64") || has("win16") if &shell =~? "sh$" - call system("/bin/rm -rf -- ".s:Escape(a:fname)) + call system("/bin/rm -rf -- ".s:Escape(a:fname,0)) else - call system("del /S ".s:Escape(a:fname)) + call system("del /S ".s:Escape(a:fname,0)) endif endif " call Dret("Rmdir") @@ -441,10 +479,14 @@ endfun " --------------------------------------------------------------------- " s:Escape: {{{2 -fun s:Escape(name) +fun s:Escape(name,isfilt) " shellescape() was added by patch 7.0.111 if exists("*shellescape") - let qnameq= shellescape(a:name) + if a:isfilt + let qnameq= shellescape(a:name,1) + else + let qnameq= shellescape(a:name) + endif else let qnameq= g:tar_shq . a:name . g:tar_shq endif diff --git a/runtime/autoload/vimball.vim b/runtime/autoload/vimball.vim index d69c64532d..4f6292b9c0 100644 --- a/runtime/autoload/vimball.vim +++ b/runtime/autoload/vimball.vim @@ -1,7 +1,7 @@ " vimball.vim : construct a file containing both paths and files " Author: Charles E. Campbell, Jr. -" Date: Jun 05, 2008 -" Version: 27 +" Date: Jul 30, 2008 +" Version: 29 " GetLatestVimScripts: 1502 1 :AutoInstall: vimball.vim " Copyright: (c) 2004-2008 by Charles E. Campbell, Jr. " The VIM LICENSE applies to Vimball.vim, and Vimball.txt @@ -15,7 +15,7 @@ if &cp || exists("g:loaded_vimball") || v:version < 700 finish endif let s:keepcpo = &cpo -let g:loaded_vimball = "v27" +let g:loaded_vimball = "v29" set cpo&vim "DechoTabOn @@ -169,9 +169,8 @@ fun! vimball#MkVimball(line1,line2,writelevel,...) range call setline(lastline+1,0) " write the file from the tab - let svfilepath= s:Path(svfile,'') -" call Decho("exe $r ".fnameescape(svfilepath)) - exe "$r ".fnameescape(svfilepath) +" call Decho("exe $r ".fnameescape(svfile)) + exe "$r ".fnameescape(svfile) call setline(lastline+1,line("$") - lastline - 1) " call Decho("lastline=".lastline." line$=".line("$")) @@ -186,13 +185,11 @@ fun! vimball#MkVimball(line1,line2,writelevel,...) range call s:ChgDir(curdir) setlocal ff=unix if a:writelevel - let vbnamepath= s:Path(vbname,'') -" call Decho("exe w! ".fnameescape(vbnamepath)) - exe "w! ".fnameescape(vbnamepath) +" call Decho("exe w! ".fnameescape(vbname)) + exe "w! ".fnameescape(vbname) else - let vbnamepath= s:Path(vbname,'') -" call Decho("exe w ".fnameescape(vbnamepath)) - exe "w ".fnameescape(vbnamepath) +" call Decho("exe w ".fnameescape(vbname)) + exe "w ".fnameescape(vbname) endif " call Decho("Vimball<".vbname."> created") echo "Vimball<".vbname."> created" @@ -215,8 +212,8 @@ endfun fun! vimball#Vimball(really,...) " call Dfunc("vimball#Vimball(really=".a:really.") a:0=".a:0) - if v:version < 701 || (v:version == 701 && !has("patch299")) - echoerr "This version of vimball requires vim 7.1 with patch 299" + if v:version < 701 || (v:version == 701 && !exists('*fnameescape')) + echoerr "your vim is missing the fnameescape() function" " call Dret("vimball#Vimball : needs 7.1 with patch 299") return endif @@ -338,7 +335,7 @@ fun! vimball#Vimball(really,...) " write tab to file if a:really - let fnamepath= s:Path(home."/".fname,'') + let fnamepath= home."/".fname " call Decho("exe w! ".fnameescape(fnamepath)) exe "silent w! ".fnameescape(fnamepath) echo "wrote ".fnamepath @@ -364,9 +361,9 @@ fun! vimball#Vimball(really,...) " set up help " call Decho("about to set up help: didhelp<".didhelp.">") if didhelp != "" - let htpath= s:Path(home."/".didhelp,"") + let htpath= home."/".didhelp " call Decho("exe helptags ".htpath) - exe "helptags ".htpath + exe "helptags ".fnameescape(htpath) echo "did helptags" endif @@ -577,27 +574,6 @@ fun! s:ChgDir(newdir) " call Dret("ChgDir : curdir<".getcwd().">") endfun -" --------------------------------------------------------------------- -" s:Path: prepend and append quotes and do escaping {{{2 -fun! s:Path(cmd,quote) -" call Dfunc("Path(cmd<".a:cmd."> quote<".a:quote.">) vimball_path_escape<".g:vimball_path_escape.">") - if (has("win32") || has("win95") || has("win64") || has("win16")) -" let cmdpath= a:quote.substitute(a:cmd,'/','\\','g').a:quote - let cmdpath= a:quote.substitute(a:cmd,'\\','/','g').a:quote -" call Decho("cmdpath<".cmdpath."> (win32 mod)") - else - let cmdpath= a:quote.a:cmd.a:quote -" call Decho("cmdpath<".cmdpath."> (not-win32 mod)") - endif - if a:quote == "" && g:vimball_path_escape !~ ' ' - let cmdpath= escape(cmdpath,' ') -" call Decho("cmdpath<".cmdpath."> (empty quote case)") - endif - let cmdpath= escape(cmdpath,g:vimball_path_escape) -" call Dret("Path <".cmdpath.">") - return cmdpath -endfun - " --------------------------------------------------------------------- " s:RecordInVar: record a un-vimball command in the .VimballRecord file {{{2 fun! s:RecordInVar(home,cmd) @@ -719,14 +695,14 @@ fun! vimball#SaveSettings() let s:acdkeep = &acd endif let s:eikeep = &ei - let s:fenkeep = &fen + let s:fenkeep = &l:fen let s:hidkeep = &hidden let s:ickeep = &ic let s:lzkeep = &lz let s:pmkeep = &pm let s:repkeep = &report let s:vekeep = &ve - let s:ffkeep = &ff + let s:ffkeep = &l:ff if exists("&acd") setlocal ei=all ve=all noacd nofen noic report=999 nohid bt= ma lz pm= ff=unix else @@ -745,7 +721,7 @@ fun! vimball#RestoreSettings() if exists("&acd") let &acd = s:acdkeep endif - let &fen = s:fenkeep + let &l:fen = s:fenkeep let &hidden = s:hidkeep let &ic = s:ickeep let &lz = s:lzkeep @@ -753,7 +729,7 @@ fun! vimball#RestoreSettings() let &report = s:repkeep let &ve = s:vekeep let &ei = s:eikeep - let &ff = s:ffkeep + let &l:ff = s:ffkeep if s:makeep[0] != 0 " restore mark a " call Decho("restore mark-a: makeep=".string(makeep)) diff --git a/runtime/autoload/zip.vim b/runtime/autoload/zip.vim index 5842741b79..af56944ce3 100644 --- a/runtime/autoload/zip.vim +++ b/runtime/autoload/zip.vim @@ -1,7 +1,7 @@ " zip.vim: Handles browsing zipfiles " AUTOLOAD PORTION -" Date: Jun 12, 2008 -" Version: 18 +" Date: Jul 30, 2008 +" Version: 22 " Maintainer: Charles E Campbell, Jr " License: Vim License (see vim's :help license) " Copyright: Copyright (C) 2005-2008 Charles E. Campbell, Jr. {{{1 @@ -22,7 +22,7 @@ if &cp || exists("g:loaded_zip") || v:version < 700 finish endif -let g:loaded_zip = "v18" +let g:loaded_zip = "v22" let s:zipfile_escape = ' ?&;\' let s:ERROR = 2 let s:WARNING = 1 @@ -58,6 +58,12 @@ fun! zip#Browse(zipfile) set report=10 " sanity checks + if !exists("*fnameescape") + if &verbose > 1 + echoerr "the zip plugin is not available (your vim doens't support fnameescape())" + endif + return + endif if !executable(g:zip_unzipcmd) redraw! echohl Error | echo "***error*** (zip#Browse) unzip not available on your system" @@ -91,23 +97,24 @@ fun! zip#Browse(zipfile) set ft=tar " give header - exe "$put ='".'\"'." zip.vim version ".g:loaded_zip."'" - exe "$put ='".'\"'." Browsing zipfile ".a:zipfile."'" - exe "$put ='".'\"'." Select a file with cursor and press ENTER"."'" + let lastline= line("$") + call setline(lastline+1,'" zip.vim version '.g:loaded_zip) + call setline(lastline+2,'" Browsing zipfile '.a:zipfile) + call setline(lastline+3,'" Select a file with cursor and press ENTER') $put ='' 0d $ -" call Decho("exe silent r! ".g:zip_unzipcmd." -l ".s:QuoteFileDir(a:zipfile)) - exe "silent r! ".g:zip_unzipcmd." -l ".s:QuoteFileDir(a:zipfile) +" call Decho("exe silent r! ".g:zip_unzipcmd." -l -- ".s:Escape(a:zipfile,1)) + exe "silent r! ".g:zip_unzipcmd." -l -- ".s:Escape(a:zipfile,1) if v:shell_error != 0 redraw! - echohl WarningMsg | echo "***warning*** (zip#Browse) ".a:zipfile." is not a zip file" | echohl None + echohl WarningMsg | echo "***warning*** (zip#Browse) ".fnameescape(a:zipfile)." is not a zip file" | echohl None " call inputsave()|call input("Press to continue")|call inputrestore() silent %d let eikeep= &ei set ei=BufReadCmd,FileReadCmd - exe "r ".a:zipfile + exe "r ".fnameescape(a:zipfile) let &ei= eikeep 1d " call Dret("zip#Browse") @@ -166,8 +173,8 @@ fun! s:ZipBrowseSelect() wincmd _ endif let s:zipfile_{winnr()}= curfile -" call Decho("exe e zipfile:".escape(zipfile,s:zipfile_escape).'::'.escape(fname,s:zipfile_escape)) - exe "e zipfile:".escape(zipfile,s:zipfile_escape).'::'.escape(fname,s:zipfile_escape) +" call Decho("exe e ".fnameescape("zipfile:".zipfile.'::'.fname)) + exe "e ".fnameescape("zipfile:".zipfile.'::'.fname) filetype detect let &report= repkeep @@ -192,8 +199,8 @@ fun! zip#Read(fname,mode) " call Decho("zipfile<".zipfile.">") " call Decho("fname <".fname.">") -" call Decho("exe r! ".g:zip_unzipcmd." -p ".s:QuoteFileDir(zipfile)." ".s:QuoteFileDir(fname)) - exe "silent r! ".g:zip_unzipcmd." -p ".s:QuoteFileDir(zipfile)." ".s:QuoteFileDir(fname) +" call Decho("exe r! ".g:zip_unzipcmd." -p -- ".s:Escape(zipfile,1)." ".s:Escape(fname,1)) + exe "silent r! ".g:zip_unzipcmd." -p -- ".s:Escape(zipfile,1)." ".s:Escape(fname,1) " cleanup 0d @@ -266,7 +273,7 @@ fun! zip#Write(fname) if fname =~ '/' let dirpath = substitute(fname,'/[^/]\+$','','e') if executable("cygpath") - let dirpath = substitute(system("cygpath ".dirpath),'\n','','e') + let dirpath = substitute(system("cygpath ".s:Escape(dirpath,0)),'\n','','e') endif " call Decho("mkdir(dirpath<".dirpath.">,p)") call mkdir(dirpath,"p") @@ -276,17 +283,17 @@ fun! zip#Write(fname) endif " call Decho("zipfile<".zipfile."> fname<".fname.">") - exe "w! ".escape(fname,s:zipfile_escape) + exe "w! ".fnameescape(fname) if executable("cygpath") - let zipfile = substitute(system("cygpath ".zipfile),'\n','','e') + let zipfile = substitute(system("cygpath ".s:Escape(zipfile,0)),'\n','','e') endif if (has("win32") || has("win95") || has("win64") || has("win16")) && &shell !~? 'sh$' let fname = substitute(fname, '[', '[[]', 'g') endif -" call Decho(g:zip_zipcmd." -u ".s:QuoteFileDir(zipfile)." ".s:QuoteFileDir(fname)) - call system(g:zip_zipcmd." -u ".s:QuoteFileDir(zipfile)." ".s:QuoteFileDir(fname)) +" call Decho(g:zip_zipcmd." -u ".s:Escape(fnamemodify(zipfile,":p"),0)." ".s:Escape(fname,0)) + call system(g:zip_zipcmd." -u ".s:Escape(fnamemodify(zipfile,":p"),0)." ".s:Escape(fname,0)) if v:shell_error != 0 redraw! echohl Error | echo "***error*** (zip#Write) sorry, unable to update ".zipfile." with ".fname | echohl None @@ -300,7 +307,7 @@ fun! zip#Write(fname) let binkeep= &binary let eikeep = &ei set binary ei=all - exe "e! ".zipfile + exe "e! ".fnameescape(zipfile) call netrw#NetWrite(netzipfile) let &ei = eikeep let &binary = binkeep @@ -320,11 +327,15 @@ fun! zip#Write(fname) endfun " --------------------------------------------------------------------- -" QuoteFileDir: {{{2 -fun! s:QuoteFileDir(fname) -" call Dfunc("QuoteFileDir(fname<".a:fname.">)") - if has("*shellescape") - let qnameq= shellescape(a:fname) +" s:Escape: {{{2 +fun! s:Escape(fname,isfilt) +" call Dfunc("QuoteFileDir(fname<".a:fname."> isfilt=".a:isfilt.")") + if exists("*shellescape") + if a:isfilt + let qnameq= shellescape(a:fname,1) + else + let qnameq= shellescape(a:fname) + endif else let qnameq= g:zip_shq.escape(a:fname,g:zip_shq).g:zip_shq endif @@ -337,14 +348,8 @@ endfun fun! s:ChgDir(newdir,errlvl,errmsg) " call Dfunc("ChgDir(newdir<".a:newdir."> errlvl=".a:errlvl." errmsg<".a:errmsg.">)") - if (has("win32") || has("win95") || has("win64") || has("win16")) && &shell !~? 'sh$' - let newdir= escape(a:newdir,' ') - else - let newdir= escape(a:newdir,'\ ') - endif - try - exe "cd ".newdir + exe "cd ".fnameescape(a:newdir) catch /^Vim\%((\a\+)\)\=:E344/ redraw! if a:errlvl == s:NOTE @@ -364,13 +369,13 @@ fun! s:ChgDir(newdir,errlvl,errmsg) endfun " --------------------------------------------------------------------- -" Rmdir: {{{2 +" s:Rmdir: {{{2 fun! s:Rmdir(fname) " call Dfunc("Rmdir(fname<".a:fname.">)") if (has("win32") || has("win95") || has("win64") || has("win16")) && &shell !~? 'sh$' - call system("rmdir /S/Q ".s:QuoteFileDir(a:fname)) + call system("rmdir /S/Q ".s:Escape(a:fname,0)) else - call system("/bin/rm -rf ".s:QuoteFileDir(a:fname)) + call system("/bin/rm -rf ".s:Escape(a:fname,0)) endif " call Dret("Rmdir") endfun diff --git a/runtime/colors/darkblue.vim b/runtime/colors/darkblue.vim index c1800eaca8..4117122728 100644 --- a/runtime/colors/darkblue.vim +++ b/runtime/colors/darkblue.vim @@ -1,6 +1,6 @@ " Vim color file " Maintainer: Bohdan Vlasyuk -" Last Change: 2006 Apr 30 +" Last Change: 2008 Jul 18 " darkblue -- for those who prefer dark background " [note: looks bit uglier with come terminal palettes, @@ -58,3 +58,9 @@ hi PreProc ctermfg=magenta guifg=#ff80ff gui=none cterm=none hi type ctermfg=green guifg=#60ff60 gui=none cterm=none hi Underlined cterm=underline term=underline hi Ignore guifg=bg ctermfg=bg + +" suggested by tigmoid, 2008 Jul 18 +hi Pmenu guifg=#c0c0c0 guibg=#404080 +hi PmenuSel guifg=#c0c0c0 guibg=#2050d0 +hi PmenuSbar guifg=blue guibg=darkgray +hi PmenuThumb guifg=#c0c0c0 diff --git a/runtime/compiler/decada.vim b/runtime/compiler/decada.vim index 1b09d390f3..4c777fe7e0 100644 --- a/runtime/compiler/decada.vim +++ b/runtime/compiler/decada.vim @@ -3,14 +3,15 @@ " Language: Ada (Dec Ada) " $Id$ " Copyright: Copyright (C) 2006 Martin Krischik -" Maintainer: Martin Krischik +" Maintainer: Martin Krischik " $Author$ " $Date$ -" Version: 4.2 +" Version: 4.6 " $Revision$ -" $HeadURL: https://svn.sourceforge.net/svnroot/gnuada/trunk/tools/vim/compiler/decada.vim $ +" $HeadURL: https://gnuada.svn.sourceforge.net/svnroot/gnuada/trunk/tools/vim/compiler/decada.vim $ " History: 21.07.2006 MK New Dec Ada " 15.10.2006 MK Bram's suggestion for runtime integration +" 08.09.2006 MK Correct double load protection. " Help Page: compiler-decada "------------------------------------------------------------------------------ @@ -24,6 +25,13 @@ let current_compiler = "decada" if !exists("g:decada") let g:decada = decada#New () + + call ada#Map_Menu ( + \'Dec Ada.Build', + \'', + \'call decada.Make ()') + + call g:decada.Set_Session () endif if exists(":CompilerSet") != 2 @@ -33,16 +41,9 @@ if exists(":CompilerSet") != 2 command -nargs=* CompilerSet setlocal endif -call g:decada.Set_Session () - execute "CompilerSet makeprg=" . escape (g:decada.Make_Command, ' ') execute "CompilerSet errorformat=" . escape (g:decada.Error_Format, ' ') -call ada#Map_Menu ( - \'Dec Ada.Build', - \'', - \'call decada.Make ()') - finish " 1}}} "------------------------------------------------------------------------------ diff --git a/runtime/compiler/eruby.vim b/runtime/compiler/eruby.vim index f30fcc3b87..44194f5c94 100644 --- a/runtime/compiler/eruby.vim +++ b/runtime/compiler/eruby.vim @@ -38,4 +38,4 @@ CompilerSet errorformat= let &cpo = s:cpo_save unlet s:cpo_save -" vim: nowrap sw=2 sts=2: +" vim: nowrap sw=2 sts=2 ts=8: diff --git a/runtime/compiler/gnat.vim b/runtime/compiler/gnat.vim index 58e9ce8311..ad1697a061 100644 --- a/runtime/compiler/gnat.vim +++ b/runtime/compiler/gnat.vim @@ -3,15 +3,17 @@ " Language: Ada (GNAT) " $Id$ " Copyright: Copyright (C) 2006 Martin Krischik -" Maintainer: Martin Krischik +" Maintainer: Martin Krischi k +" Ned Okie " $Author$ " $Date$ -" Version: 4.2 +" Version: 4.6 " $Revision$ -" $HeadURL: https://svn.sourceforge.net/svnroot/gnuada/trunk/tools/vim/compiler/gnat.vim $ +" $HeadURL: https://gnuada.svn.sourceforge.net/svnroot/gnuada/trunk/tools/vim/compiler/gnat.vim $ " History: 24.05.2006 MK Unified Headers " 16.07.2006 MK Ada-Mode as vim-ball " 15.10.2006 MK Bram's suggestion for runtime integration +" 19.09.2007 NO use project file only when there is a project " Help Page: compiler-gnat "------------------------------------------------------------------------------ @@ -46,6 +48,8 @@ if !exists("g:gnat") \ 'GNAT.Set Projectfile\.\.\.', \ ':SetProject', \ 'call gnat.Set_Project_File ()') + + call g:gnat.Set_Session () endif if exists(":CompilerSet") != 2 @@ -55,8 +59,6 @@ if exists(":CompilerSet") != 2 command -nargs=* CompilerSet setlocal endif -call g:gnat.Set_Session () - execute "CompilerSet makeprg=" . escape (g:gnat.Get_Command('Make'), ' ') execute "CompilerSet errorformat=" . escape (g:gnat.Error_Format, ' ') diff --git a/runtime/compiler/rspec.vim b/runtime/compiler/rspec.vim new file mode 100644 index 0000000000..19c410f813 --- /dev/null +++ b/runtime/compiler/rspec.vim @@ -0,0 +1,41 @@ +" Vim compiler file +" Language: RSpec +" Maintainer: Tim Pope +" Info: $Id$ +" URL: http://vim-ruby.rubyforge.org +" Anon CVS: See above site +" Release Coordinator: Doug Kearns + +if exists("current_compiler") + finish +endif +let current_compiler = "rspec" + +if exists(":CompilerSet") != 2 " older Vim always used :setlocal + command -nargs=* CompilerSet setlocal +endif + +let s:cpo_save = &cpo +set cpo-=C + +CompilerSet makeprg=spec + +CompilerSet errorformat= + \%+W'%.%#'\ FAILED, + \%+I'%.%#'\ FIXED, + \%-Cexpected:%.%#, + \%-C\ \ \ \ \ got:%.%#, + \%E%.%#:in\ `load':\ %f:%l:%m, + \%C%f:%l:, + \%W%f:%l:\ warning:\ %m, + \%E%f:%l:in\ %*[^:]:\ %m, + \%E%f:%l:\ %m, + \%-Z%\tfrom\ %f:%l, + \%-Z%p^%.%#, + \%-C%.%#, + \%-G%.%# + +let &cpo = s:cpo_save +unlet s:cpo_save + +" vim: nowrap sw=2 sts=2 ts=8: diff --git a/runtime/doc/Makefile b/runtime/doc/Makefile index 3a289d7b04..2f697508b0 100644 --- a/runtime/doc/Makefile +++ b/runtime/doc/Makefile @@ -287,6 +287,11 @@ CONVERTED = \ vimdiff-it.UTF-8.1 \ vimtutor-it.UTF-8.1 \ xxd-it.UTF-8.1 \ + vim-pl.UTF-8.1 \ + evim-pl.UTF-8.1 \ + vimdiff-pl.UTF-8.1 \ + vimtutor-pl.UTF-8.1 \ + xxd-pl.UTF-8.1 \ vim-ru.UTF-8.1 \ evim-ru.UTF-8.1 \ vimdiff-ru.UTF-8.1 \ @@ -296,7 +301,7 @@ CONVERTED = \ .SUFFIXES: .SUFFIXES: .c .o .txt .html -all: tags vim.man vimdiff.man vimtutor.man xxd.man $(CONVERTED) +all: tags vim.man evim.man vimdiff.man vimtutor.man xxd.man $(CONVERTED) # Use Vim to generate the tags file. Can only be used when Vim has been # compiled and installed. Supports multiple languages. @@ -314,6 +319,9 @@ doctags: doctags.c vim.man: vim.1 nroff -man vim.1 | sed -e s/.//g > vim.man +evim.man: evim.1 + nroff -man evim.1 | sed -e s/.//g > evim.man + vimdiff.man: vimdiff.1 nroff -man vimdiff.1 | sed -e s/.//g > vimdiff.man @@ -445,6 +453,21 @@ vimtutor-it.UTF-8.1: vimtutor-it.1 xxd-it.UTF-8.1: xxd-it.1 iconv -f latin1 -t utf-8 $< >$@ +vim-pl.UTF-8.1: vim-pl.1 + iconv -f latin2 -t utf-8 $< >$@ + +evim-pl.UTF-8.1: evim-pl.1 + iconv -f latin2 -t utf-8 $< >$@ + +vimdiff-pl.UTF-8.1: vimdiff-pl.1 + iconv -f latin2 -t utf-8 $< >$@ + +vimtutor-pl.UTF-8.1: vimtutor-pl.1 + iconv -f latin2 -t utf-8 $< >$@ + +xxd-pl.UTF-8.1: xxd-pl.1 + iconv -f latin2 -t utf-8 $< >$@ + vim-ru.UTF-8.1: vim-ru.1 iconv -f KOI8-R -t utf-8 $< >$@ diff --git a/runtime/doc/arabic.txt b/runtime/doc/arabic.txt index 9445f2e09a..ec92d97ee3 100644 --- a/runtime/doc/arabic.txt +++ b/runtime/doc/arabic.txt @@ -1,4 +1,4 @@ -*arabic.txt* For Vim version 7.2a. Last change: 2005 Mar 29 +*arabic.txt* For Vim version 7.2. Last change: 2005 Mar 29 VIM REFERENCE MANUAL by Nadim Shaikli diff --git a/runtime/doc/autocmd.txt b/runtime/doc/autocmd.txt index 80032e038a..836f7d2128 100644 --- a/runtime/doc/autocmd.txt +++ b/runtime/doc/autocmd.txt @@ -1,4 +1,4 @@ -*autocmd.txt* For Vim version 7.2a. Last change: 2008 Jun 24 +*autocmd.txt* For Vim version 7.2. Last change: 2008 Jun 27 VIM REFERENCE MANUAL by Bram Moolenaar @@ -406,9 +406,10 @@ BufWinEnter After a buffer is displayed in a window. This Does not happen for |:split| without arguments, since you keep editing the same buffer, or ":split" with a file that's already - open in a window. But it does happen for - a ":split" with the name of the current - buffer, since it reloads that buffer. + open in a window, because it re-uses an + existing buffer. But it does happen for a + ":split" with the name of the current buffer, + since it reloads that buffer. *BufWinLeave* BufWinLeave Before a buffer is removed from a window. Not when it's still visible in another window. diff --git a/runtime/doc/change.txt b/runtime/doc/change.txt index 24cf3fe9c0..440e6b5456 100644 --- a/runtime/doc/change.txt +++ b/runtime/doc/change.txt @@ -1,4 +1,4 @@ -*change.txt* For Vim version 7.2a. Last change: 2008 Jun 22 +*change.txt* For Vim version 7.2. Last change: 2008 Jul 24 VIM REFERENCE MANUAL by Bram Moolenaar @@ -772,9 +772,9 @@ expression. This does not work recursively: a substitute() function inside the expression cannot use "\=" for the substitute string. The special meaning for characters as mentioned at |sub-replace-special| does -not apply except "", "\" and "\\". Thus in the result of the -expression you need to use two backslashes get one, put a backslash before a - you want to insert and use a without a backslash where you want to +not apply except for "", "\" and "\\". Thus in the result of the +expression you need to use two backslashes to get one, put a backslash before a + you want to insert, and use a without a backslash where you want to break the line. For convenience a character is also used as a line break. Prepend a @@ -797,7 +797,7 @@ Examples: > This replaces an end-of-line with a new line containing the value of $HOME. > s/E/\="\"/g -This replaces 'E' characters with an euro sign. Read more in ||. +This replaces each 'E' character with a euro sign. Read more in ||. 4.3 Search and replace *search-replace* @@ -1561,10 +1561,12 @@ found here: |sort()|. With [n] sorting is done on the first decimal number in the line (after or inside a {pattern} match). + One leading '-' is included in the number. With [x] sorting is done on the first hexadecimal number in the line (after or inside a {pattern} match). A leading "0x" or "0X" is ignored. + One leading '-' is included in the number. With [o] sorting is done on the first octal number in the line (after or inside a {pattern} match). diff --git a/runtime/doc/cmdline.txt b/runtime/doc/cmdline.txt index bc6bbd74db..c6f13120fa 100644 --- a/runtime/doc/cmdline.txt +++ b/runtime/doc/cmdline.txt @@ -1,4 +1,4 @@ -*cmdline.txt* For Vim version 7.2a. Last change: 2008 Jun 21 +*cmdline.txt* For Vim version 7.2. Last change: 2008 Jul 29 VIM REFERENCE MANUAL by Bram Moolenaar @@ -99,19 +99,20 @@ CTRL-E or *c_CTRL-E* *c_* cursor to end of command-line *c_* - cursor to position of mouse click. + Move the cursor to the position of the mouse click. CTRL-H *c_* *c_CTRL-H* - delete the character in front of the cursor (see |:fixdel| if + Delete the character in front of the cursor (see |:fixdel| if your key does not do what you want). *c_* - delete the character under the cursor (at end of line: + Delete the character under the cursor (at end of line: character before the cursor) (see |:fixdel| if your key does not do what you want). *c_CTRL-W* -CTRL-W delete the word before the cursor +CTRL-W Delete the |word| before the cursor. This depends on the + 'iskeyword' option. *c_CTRL-U* -CTRL-U remove all characters between the cursor position and +CTRL-U Remove all characters between the cursor position and the beginning of the line. Previous versions of vim deleted all characters on the line. If that is the preferred behavior, add the following to your .vimrc: > @@ -369,7 +370,9 @@ word before the cursor. This is available for: - Variable and function names: Only after a ":if", ":call" or similar command. When Vim was compiled with the |+cmdline_compl| feature disabled, only file -names, directories and help items can be completed. +names, directories and help items can be completed. The number of help item +matches is limited (currently to 300) to avoid a long delay when there are +very many matches. These are the commands that can be used: @@ -995,7 +998,7 @@ other than the one that is executed with are lost. If you would like to execute the command under the cursor and then have the command-line window open again, you may find this mapping useful: > - :map q: + :autocmd CmdwinEnter * map q: VARIOUS @@ -1042,9 +1045,9 @@ events are not triggered. You can use the Cmdwin events to do settings specifically for the command-line window. Be careful not to cause side effects! Example: > - :au CmdwinEnter : let b:cpt_save = &cpt | set cpt=v + :au CmdwinEnter : let b:cpt_save = &cpt | set cpt=. :au CmdwinLeave : let &cpt = b:cpt_save -This sets 'complete' to use command-line completion in Insert mode for CTRL-N. +This sets 'complete' to use completion in the current window for |i_CTRL-N|. Another example: > :au CmdwinEnter [/?] startinsert This will make Vim start in Insert mode in the command-line window. diff --git a/runtime/doc/debug.txt b/runtime/doc/debug.txt index 0e83ec7151..44c9f9f1a7 100644 --- a/runtime/doc/debug.txt +++ b/runtime/doc/debug.txt @@ -1,4 +1,4 @@ -*debug.txt* For Vim version 7.2a. Last change: 2006 May 01 +*debug.txt* For Vim version 7.2. Last change: 2006 May 01 VIM REFERENCE MANUAL by Bram Moolenaar diff --git a/runtime/doc/debugger.txt b/runtime/doc/debugger.txt index 0a152a61d5..3b599ade17 100644 --- a/runtime/doc/debugger.txt +++ b/runtime/doc/debugger.txt @@ -1,4 +1,4 @@ -*debugger.txt* For Vim version 7.2a. Last change: 2005 Mar 29 +*debugger.txt* For Vim version 7.2. Last change: 2005 Mar 29 VIM REFERENCE MANUAL by Gordon Prieur diff --git a/runtime/doc/develop.txt b/runtime/doc/develop.txt index 67adcb8f94..89cb455e0c 100644 --- a/runtime/doc/develop.txt +++ b/runtime/doc/develop.txt @@ -1,4 +1,4 @@ -*develop.txt* For Vim version 7.2a. Last change: 2007 May 11 +*develop.txt* For Vim version 7.2. Last change: 2007 May 11 VIM REFERENCE MANUAL by Bram Moolenaar diff --git a/runtime/doc/diff.txt b/runtime/doc/diff.txt index 1adef600c6..3f55c30b69 100644 --- a/runtime/doc/diff.txt +++ b/runtime/doc/diff.txt @@ -1,12 +1,12 @@ -*diff.txt* For Vim version 7.2a. Last change: 2006 Oct 02 +*diff.txt* For Vim version 7.2. Last change: 2008 Jul 21 VIM REFERENCE MANUAL by Bram Moolenaar *diff* *vimdiff* *gvimdiff* *diff-mode* -This file describes the +diff feature: Showing differences between two or -three versions of the same file. +This file describes the +diff feature: Showing differences between two, +three or four versions of the same file. The basics are explained in section |08.7| of the user manual. @@ -49,7 +49,7 @@ What happens is that Vim opens a window for each of the files. This is like using the |-O| argument. This uses vertical splits. If you prefer horizontal splits add the |-o| argument: > - vimdiff -o file1 file2 [file3] + vimdiff -o file1 file2 [file3 [file4]] If you always prefer horizontal splits include "horizontal" in 'diffopt'. diff --git a/runtime/doc/digraph.txt b/runtime/doc/digraph.txt index f5b5ce7422..65261b72e0 100644 --- a/runtime/doc/digraph.txt +++ b/runtime/doc/digraph.txt @@ -1,15 +1,15 @@ -*digraph.txt* For Vim version 7.2a. Last change: 2007 Sep 10 +*digraph.txt* For Vim version 7.2. Last change: 2008 Aug 06 VIM REFERENCE MANUAL by Bram Moolenaar -Digraphs *digraphs* *Digraphs* +Digraphs *digraph* *digraphs* *Digraphs* Digraphs are used to enter characters that normally cannot be entered by -an ordinary keyboard. These are mostly accented characters which have the -eighth bit set. The digraphs are easier to remember than the decimal number -that can be entered with CTRL-V (see |i_CTRL-V|). +an ordinary keyboard. These are mostly printable non-ASCII characters. The +digraphs are easier to remember than the decimal number that can be entered +with CTRL-V (see |i_CTRL-V|). There is a brief introduction on digraphs in the user manual: |24.9| An alternative is using the 'keymap' option. @@ -53,7 +53,9 @@ this file. The decimal number normally is the Unicode number of the character. Note that the meaning doesn't change when 'encoding' changes. The character will be converted from Unicode to 'encoding' when needed. This does require the -conversion to be available, it might fail. +conversion to be available, it might fail. For the NUL character you will see +"10". That's because NUL characters are internally represented with a NL +character. When you write the file it will become a NUL character. When Vim was compiled without the +multi_byte feature, you need to specify the character in the encoding given with 'encoding'. You might want to use diff --git a/runtime/doc/editing.txt b/runtime/doc/editing.txt index 2ef3f96bcf..c745f902ec 100644 --- a/runtime/doc/editing.txt +++ b/runtime/doc/editing.txt @@ -1,4 +1,4 @@ -*editing.txt* For Vim version 7.2a. Last change: 2008 Apr 29 +*editing.txt* For Vim version 7.2. Last change: 2008 Aug 09 VIM REFERENCE MANUAL by Bram Moolenaar @@ -302,9 +302,9 @@ CTRL-^ Edit the alternate file (equivalent to ":e #"). Uses the 'isfname' option to find out which characters are supposed to be in a file name. Trailing punctuation characters ".,:;!" are ignored. - Uses the 'path' option as a list of directory names - to look for the file. Also looks for the file - relative to the current file. + Uses the 'path' option as a list of directory names to + look for the file. See the 'path' option for details + about relative directories and wildcards. Uses the 'suffixesadd' option to check for file names with a suffix added. If the file can't be found, 'includeexpr' is used to @@ -367,13 +367,13 @@ current file name. Besides the things mentioned here, more special items for where a filename is expected are mentioned at |cmdline-special|. -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 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. +Note for systems other than Unix: 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 regularly embed +spaces in file names (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* Wildcards in {file} are expanded. Which wildcards are supported depends on @@ -391,6 +391,8 @@ is to use "path\[[]abc]". Then the file "path[abc]" literally. *starstar-wildcard* Expanding "**" is possible on Unix, Win32, Mac OS/X and a few other systems. This allows searching a directory tree. This goes up to 100 directories deep. +Note there are some commands where this works slightly different, see +|file-searching|. Example: > :n **/*.txt Finds files: @@ -717,23 +719,23 @@ list of the current window. and |+cmd|. {not in Vi} *:wn* *:wnext* -:[count]wn[ext] [++opt] [+cmd] +:[count]wn[ext] [++opt] Write current file and start editing the [count] next file. Also see |++opt| and |+cmd|. {not in Vi} -:[count]wn[ext] [++opt] [+cmd] {file} +:[count]wn[ext] [++opt] {file} Write current file to {file} and start editing the [count] next file, unless {file} already exists and the 'writeany' option is off. Also see |++opt| and |+cmd|. {not in Vi} -:[count]wn[ext]! [++opt] [+cmd] {file} +:[count]wn[ext]! [++opt] {file} Write current file to {file} and start editing the [count] next file. Also see |++opt| and |+cmd|. {not in Vi} -:[count]wN[ext][!] [++opt] [+cmd] [file] *:wN* *:wNext* -:[count]wp[revious][!] [++opt] [+cmd] [file] *:wp* *:wprevious* +:[count]wN[ext][!] [++opt] [file] *:wN* *:wNext* +:[count]wp[revious][!] [++opt] [file] *:wp* *:wprevious* Same as :wnext, but go to previous file instead of next. {not in Vi} @@ -853,39 +855,46 @@ Note: When the 'write' option is off, you are not able to write any file. *:w* *:write* *E502* *E503* *E504* *E505* *E512* *E514* *E667* *E796* -:w[rite] Write the whole buffer to the current file. This is +:w[rite] [++opt] Write the whole buffer to the current file. This is the normal way to save changes to a file. It fails when the 'readonly' option is set or when there is another reason why the file can't be written. + For ++opt see |++opt|, but only ++bin, ++nobin, ++ff + and ++enc are effective. -:w[rite]! Like ":write", but forcefully write when 'readonly' is +:w[rite]! [++opt] Like ":write", but forcefully write when 'readonly' is set or there is another reason why writing was refused. Note: This may change the permission and ownership of the file and break (symbolic) links. Add the 'W' flag to 'cpoptions' to avoid this. -:[range]w[rite][!] Write the specified lines to the current file. This +:[range]w[rite][!] [++opt] + Write the specified lines to the current file. This is unusual, because the file will not contain all lines in the buffer. *:w_f* *:write_f* -:[range]w[rite] {file} Write the specified lines to {file}, unless it +:[range]w[rite] [++opt] {file} + Write the specified lines to {file}, unless it already exists and the 'writeany' option is off. *:w!* -:[range]w[rite]! {file} Write the specified lines to {file}. Overwrite an +:[range]w[rite]! [++opt] {file} + Write the specified lines to {file}. Overwrite an existing file. *:w_a* *:write_a* *E494* -:[range]w[rite][!] >> Append the specified lines to the current file. +:[range]w[rite][!] [++opt] >> + Append the specified lines to the current file. -:[range]w[rite][!] >> {file} +:[range]w[rite][!] [++opt] >> {file} Append the specified lines to {file}. '!' forces the write even if file does not exist. *:w_c* *:write_c* -:[range]w[rite] !{cmd} Execute {cmd} with [range] lines as standard input +:[range]w[rite] [++opt] !{cmd} + Execute {cmd} with [range] lines as standard input (note the space in front of the '!'). {cmd} is executed like with ":!{cmd}", any '!' is replaced with the previous command |:!|. @@ -902,7 +911,8 @@ used, for example, when the write fails and you want to try again later with 'cpoptions' option. *:sav* *:saveas* -:sav[eas][!] {file} Save the current buffer under the name {file} and set +:sav[eas][!] [++opt] {file} + Save the current buffer under the name {file} and set the filename of the current buffer to {file}. The previous name is used for the alternate file name. The [!] is needed to overwrite an existing file. @@ -912,7 +922,7 @@ used, for example, when the write fails and you want to try again later with {not in Vi} *:up* *:update* -:[range]up[date][!] [>>] [file] +:[range]up[date][!] [++opt] [>>] [file] Like ":write", but only write when the buffer has been modified. {not in Vi} @@ -1061,30 +1071,31 @@ The names can be in upper- or lowercase. |quickfix|). {not in Vi} *:wq* -:wq Write the current file and quit. Writing fails when +:wq [++opt] Write the current file and quit. Writing fails when the file is read-only or the buffer does not have a name. Quitting fails when the last file in the argument list has not been edited. -:wq! Write the current file and quit. Writing fails when +:wq! [++opt] Write the current file and quit. Writing fails when the current buffer does not have a name. -:wq {file} Write to {file} and quit. Quitting fails when the +:wq [++opt] {file} Write to {file} and quit. Quitting fails when the last file in the argument list has not been edited. -:wq! {file} Write to {file} and quit. +:wq! [++opt] {file} Write to {file} and quit. -:[range]wq[!] [file] Same as above, but only write the lines in [range]. +:[range]wq[!] [++opt] [file] + Same as above, but only write the lines in [range]. *:x* *:xit* -:[range]x[it][!] [file] +:[range]x[it][!] [++opt] [file] Like ":wq", but write only when changes have been made. When 'hidden' is set and there are more windows, the current buffer becomes hidden, after writing the file. *:exi* *:exit* -:[range]exi[t][!] [file] +:[range]exi[t][!] [++opt] [file] Same as :xit. *ZZ* @@ -1116,18 +1127,18 @@ MULTIPLE WINDOWS AND BUFFERS *window-exit* *:quita* *:quitall* :quita[ll][!] Same as ":qall". {not in Vi} -:wqa[ll] *:wqa* *:wqall* *:xa* *:xall* +:wqa[ll] [++opt] *:wqa* *:wqall* *:xa* *:xall* :xa[ll] Write all changed buffers and exit Vim. If there are buffers without a file name, which are readonly or which cannot be written for another reason, Vim will not quit. {not in Vi} -:conf[irm] wqa[ll] +:conf[irm] wqa[ll] [++opt] :conf[irm] xa[ll] Write all changed buffers and exit Vim. Bring up a prompt when some buffers are readonly or cannot be written for another reason. See |:confirm|. {not in Vi} -:wqa[ll]! +:wqa[ll]! [++opt] :xa[ll]! Write all changed buffers, even the ones that are readonly, and exit Vim. If there are buffers without a file name or which cannot be written for another reason, Vim will not quit. @@ -1476,14 +1487,16 @@ problem goes away the next day. {not available when compiled without the |+path_extra| feature} The file searching is currently used for the 'path', 'cdpath' and 'tags' -options, for |finddir()| and |findfile()|. +options, for |finddir()| and |findfile()|. Other commands use |wildcards| +which is slightly different. There are three different types of searching: 1) Downward search: *starstar* 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. + supported by your operating system. '*' and '**' are handled inside Vim, + so they work on all operating systems. Note that "**" only acts as a + special wildcard when it is at the start of a name. The usage of '*' is quite simple: It matches 0 or more characters. In a search pattern this would be ".*". Note that the "." is not used for file @@ -1491,8 +1504,8 @@ There are three different types of searching: '**' 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 + - It matches up to 30 directories deep by default, 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: > @@ -1505,15 +1518,16 @@ There are three different types of searching: .... < 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. + The allowed number range is 0 ('**0' is removed) to 100 If the given number is smaller than 0 it defaults to 30, if it's - bigger than 255 then 255 is used. + bigger than 100 then 100 is used. The system also has a limit on the + path length, usually 256 or 1024 bytes. - '**' 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/*tory/sys/** /usr/**2/sys/* 2) Upward search: diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt index 1502412370..3866378e6c 100644 --- a/runtime/doc/eval.txt +++ b/runtime/doc/eval.txt @@ -1,4 +1,4 @@ -*eval.txt* For Vim version 7.2a. Last change: 2008 Jun 24 +*eval.txt* For Vim version 7.2. Last change: 2008 Aug 09 VIM REFERENCE MANUAL by Bram Moolenaar @@ -967,11 +967,16 @@ These are INVALID: 3. empty {M} 1e40 missing .{M} + *float-pi* *float-e* +A few useful values to copy&paste: > + :let pi = 3.14159265359 + :let e = 2.71828182846 + Rationale: Before floating point was introduced, the text "123.456" was interpreted as the two numbers "123" and "456", both converted to a string and concatenated, resulting in the string "123456". Since this was considered pointless, and we -could not find it actually being used in Vim scripts, this backwards +could not find it intentionally being used in Vim scripts, this backwards incompatibility was accepted in favor of being able to use the normal notation for floating point numbers. @@ -2524,9 +2529,15 @@ exists({expr}) The result is a Number, which is non-zero if {expr} is |internal-variables|). Also works for |curly-braces-names|, |Dictionary| entries, |List| items, etc. Beware - that this may cause functions to be - invoked cause an error message for an - invalid expression. + that evaluating an index may cause an + error message for an invalid + expression. E.g.: > + :let l = [1, 2, 3] + :echo exists("l[5]") +< 0 > + :echo exists("l[xx]") +< E121: Undefined variable: xx + 0 :cmdname Ex command: built-in command, user command or command modifier |:command|. Returns: @@ -2670,7 +2681,11 @@ extend({expr1}, {expr2} [, {expr3}]) *extend()* Examples: > :echo sort(extend(mylist, [7, 5])) :call extend(mylist, [2, 3], 1) -< Use |add()| to concatenate one item to a list. To concatenate +< When {expr1} is the same List as {expr2} then the number of + items copied is equal to the original length of the List. + E.g., when {expr3} is 1 you get N new copies of the first item + (where N is the original length of the List). + Use |add()| to concatenate one item to a list. To concatenate two lists into a new list use the + operator: > :let newlist = [1, 2, 3] + [4, 5] < @@ -2817,11 +2832,13 @@ fnameescape({string}) *fnameescape()* For most systems the characters escaped are " \t\n*?[{`$\\%#'\"|!<". For systems where a backslash appears in a filename, it depends on the value of 'isfname'. + A leading '+' and '>' is also escaped (special after |:edit| + and |:write|). And a "-" by itself (special after |:cd|). Example: > - :let fname = 'some str%nge|name' + :let fname = '+some str%nge|name' :exe "edit " . fnameescape(fname) < results in executing: > - edit some\ str\%nge\|name + edit \+some\ str\%nge\|name fnamemodify({fname}, {mods}) *fnamemodify()* Modify file name {fname} according to {mods}. {mods} is a @@ -2945,6 +2962,8 @@ getbufvar({expr}, {varname}) *getbufvar()* The result is the value of option or local buffer variable {varname} in buffer {expr}. Note that the name without "b:" must be used. + When {varname} is empty returns a dictionary with all the + buffer-local variables. This also works for a global or buffer-local option, but it doesn't work for a global variable, window-local variable or window-local option. @@ -3296,7 +3315,9 @@ globpath({path}, {expr}) *globpath()* For example, to find all "README.txt" files in the directories in 'runtimepath' and below: > :echo globpath(&rtp, "**/README.txt") -< +< Upwards search and limiting the depth of "**" is not + supported, thus using 'path' will not always work properly. + *has()* has({feature}) The result is a Number, which is 1 if the feature {feature} is supported, zero otherwise. The {feature} argument is a @@ -3361,13 +3382,13 @@ histdel({history} [, {item}]) *histdel()* Clear {history}, i.e. delete all its entries. See |hist-names| for the possible values of {history}. - If the parameter {item} is given as String, this is seen - as regular expression. All entries matching that expression - will be removed from the history (if there are any). + If the parameter {item} evaluates to a String, it is used as a + regular expression. All entries matching that expression will + be removed from the history (if there are any). Upper/lowercase must match, unless "\c" is used |/\c|. - If {item} is a Number, it will be interpreted as index, see - |:history-indexing|. The respective entry will be removed - if it exists. + If {item} evaluates to a Number, it will be interpreted as + an index, see |:history-indexing|. The respective entry will + be removed if it exists. The result is a Number: 1 for a successful operation, otherwise 0 is returned. @@ -4012,8 +4033,12 @@ mkdir({name} [, {path} [, {prot}]]) If {prot} is given it is used to set the protection bits of the new directory. The default is 0755 (rwxr-xr-x: r/w for the user readable for others). Use 0700 to make it unreadable - for others. - This function is not available in the |sandbox|. + for others. This is only used for the last part of {name}. + Thus if you create /tmp/foo/bar then /tmp/foo will be created + with 0755. + Example: > + :call mkdir($HOME . "/tmp/foo/bar", "p", 0700) +< This function is not available in the |sandbox|. Not available on all systems. To check use: > :if exists("*mkdir") < @@ -4278,9 +4303,11 @@ printf({fmt}, {expr1} ...) *printf()* % A '%' is written. No argument is converted. The complete conversion specification is "%%". - Each argument can be Number or String and is converted - automatically to fit the conversion specifier. Any other - argument type results in an error message. + When a Number argument is expected a String argument is also + accepted and automatically converted. + When a Float or String argument is expected a Number argument + is also accepted and automatically converted. + Any other argument type results in an error message. *E766* *E767* The number of {exprN} arguments must exactly match the number @@ -4506,7 +4533,7 @@ reverse({list}) Reverse the order of items in {list} in-place. Returns :let revlist = reverse(copy(mylist)) round({expr}) *round()* - Round off {expr} to a the nearest integral value and return it + Round off {expr} to the nearest integral value and return it as a |Float|. If {expr} lies halfway between two integral values, then use the larger one (away from zero). {expr} must evaluate to a |Float| or a |Number|. @@ -4951,9 +4978,16 @@ shellescape({string} [, {special}]) *shellescape()* and replace all "'" with "'\''". When the {special} argument is present and it's a non-zero Number or a non-empty String (|non-zero-arg|), then special - items such as "%", "#" and "" will be preceded by a - backslash. This backslash will be removed again by the |:!| + items such as "!", "%", "#" and "" will be preceded by + a backslash. This backslash will be removed again by the |:!| command. + The "!" character will be escaped (again with a |non-zero-arg| + {special}) when 'shell' contains "csh" in the tail. That is + because for csh and tcsh "!" is used for history replacement + even when inside single quotes. + The character is also escaped. With a |non-zero-arg| + {special} and 'shell' containing "csh" in the tail it's + escaped a second time. Example of use with a |:!| command: > :exe '!dir ' . shellescape(expand(''), 1) < This results in a directory listing for the file under the @@ -5098,6 +5132,7 @@ sqrt({expr}) *sqrt()* < 10.0 > :echo sqrt(-4.01) < nan + "nan" may be different, it depends on system libraries. {only available when compiled with the |+float| feature} @@ -5484,7 +5519,7 @@ tr({src}, {fromstr}, {tostr}) *tr()* < returns "{blob}" trunc({expr}) *trunc()* - Return the largest integral value with magnituted less than or + Return the largest integral value with magnitude less than or equal to {expr} as a |Float| (truncate towards zero). {expr} must evaluate to a |Float| or a |Number|. Examples: > @@ -5909,7 +5944,7 @@ It's also possible to use curly braces, see |curly-braces-names|. And the A function local to a script must start with "s:". A local script function can only be called from within the script and from functions, user commands and autocommands defined in the script. It is also possible to call the -function from a mappings defined in the script, but then || must be used +function from a mapping defined in the script, but then || must be used instead of "s:" when the mapping is expanded outside of the script. *:fu* *:function* *E128* *E129* *E123* @@ -6019,7 +6054,7 @@ can be 0). "a:000" is set to a |List| that contains these arguments. Note that "a:1" is the same as "a:000[0]". *E742* The a: scope and the variables in it cannot be changed, they are fixed. -However, if a |List| or |Dictionary| is used, you can changes their contents. +However, if a |List| or |Dictionary| is used, you can change their contents. Thus you can pass a |List| to a function and have the function add an item to it. If you want to make sure the function cannot change a |List| or |Dictionary| use |:lockvar|. @@ -6398,6 +6433,11 @@ This would call the function "my_func_whizz(parameter)". < One item from a |Dictionary| can be removed at a time: > :unlet dict['two'] :unlet dict.two +< This is especially useful to clean up used global + variables and script-local variables (these are not + deleted when the script ends). Function-local + variables are automatically deleted when the function + ends. :lockv[ar][!] [depth] {name} ... *:lockvar* *:lockv* Lock the internal variable {name}. Locking means that diff --git a/runtime/doc/farsi.txt b/runtime/doc/farsi.txt index f489a7a06f..2172a48e17 100644 --- a/runtime/doc/farsi.txt +++ b/runtime/doc/farsi.txt @@ -1,4 +1,4 @@ -*farsi.txt* For Vim version 7.2a. Last change: 2005 Mar 29 +*farsi.txt* For Vim version 7.2. Last change: 2005 Mar 29 VIM REFERENCE MANUAL by Mortaza Ghassab Shiran diff --git a/runtime/doc/filetype.txt b/runtime/doc/filetype.txt index db3fe4e5e9..7f2e7096cf 100644 --- a/runtime/doc/filetype.txt +++ b/runtime/doc/filetype.txt @@ -1,4 +1,4 @@ -*filetype.txt* For Vim version 7.2a. Last change: 2008 Jun 21 +*filetype.txt* For Vim version 7.2. Last change: 2008 Jul 15 VIM REFERENCE MANUAL by Bram Moolenaar @@ -55,7 +55,7 @@ filetype prepend "ft-" and optionally append "-syntax", "-indent" or If the file type is not detected automatically, or it finds the wrong type, you can either set the 'filetype' option manually, or add a modeline to your -file. Example, for in an IDL file use the command: > +file. Example, for an IDL file use the command: > :set filetype=idl or add this |modeline| to the file: @@ -284,8 +284,8 @@ match in angle brackets in place of a pattern, like this: > This will match: -- Any file whose name ends in `.html' -- Any file whose type is `&faf' or 'HTML', where the meaning of these types +- Any file whose name ends in ".html" +- Any file whose type is "&faf" or "HTML", where the meaning of these types depends on which version of Vim you are using. Unknown types are considered NOT to match. @@ -294,7 +294,7 @@ must both match): > :au BufRead <&fff>diff* -This will match files of type `&fff' whose names start with `diff'. +This will match files of type "&fff" whose names start with "diff". Note that osfiletype checking is skipped if Vim is compiled without the |+osfiletype| feature. @@ -482,6 +482,29 @@ g:changelog_date_end_entry_search The default is '^\s*$' which finds lines that contain only whitespace or are completely empty. +b:changelog_name *b:changelog_name* + Name of the ChangeLog file to look for. + The default is 'ChangeLog'. + +b:changelog_path + Path of the ChangeLog to use for the current buffer. + The default is empty, thus looking for a file named + |b:changelog_name| in the same directory as the + current buffer. If not found, the parent directory of + the current buffer is searched. This continues + recursively until a file is found or there are no more + parent directories to search. + +b:changelog_entry_prefix + Name of a function to call to generate a prefix to a + new entry. This function takes no arguments and + should return a string containing the prefix. + Returning an empty prefix is fine. + The default generates the shortest path between the + ChangeLog's pathname and the current buffers pathname. + In the future, it will also be possible to use other + variable contexts for this variable, for example, g:. + The Changelog entries are inserted where they add the least amount of text. After figuring out the current date and user, the file is searched for an entry beginning with the current date and user and if found adds another item diff --git a/runtime/doc/fold.txt b/runtime/doc/fold.txt index c814093980..7c117a8fdc 100644 --- a/runtime/doc/fold.txt +++ b/runtime/doc/fold.txt @@ -1,4 +1,4 @@ -*fold.txt* For Vim version 7.2a. Last change: 2007 May 11 +*fold.txt* For Vim version 7.2. Last change: 2007 May 11 VIM REFERENCE MANUAL by Bram Moolenaar diff --git a/runtime/doc/ft_ada.txt b/runtime/doc/ft_ada.txt index bec0f78fbf..6f328e625f 100644 --- a/runtime/doc/ft_ada.txt +++ b/runtime/doc/ft_ada.txt @@ -1,4 +1,4 @@ -*ft_ada.txt* For Vim version 7.2a. Last change: 2008 Jun 21 +*ft_ada.txt* For Vim version 7.2. Last change: 2008 Jun 21 ADA FILE TYPE PLUG-INS REFERENCE MANUAL~ diff --git a/runtime/doc/ft_sql.txt b/runtime/doc/ft_sql.txt index 7946c4f702..893a9c35e8 100644 --- a/runtime/doc/ft_sql.txt +++ b/runtime/doc/ft_sql.txt @@ -1,4 +1,4 @@ -*ft_sql.txt* For Vim version 7.2a. Last change: Wed Apr 26 2006 3:05:33 PM +*ft_sql.txt* For Vim version 7.2. Last change: Wed Apr 26 2006 3:05:33 PM by David Fishburn diff --git a/runtime/doc/gui.txt b/runtime/doc/gui.txt index fb6695e212..3afb996c23 100644 --- a/runtime/doc/gui.txt +++ b/runtime/doc/gui.txt @@ -1,4 +1,4 @@ -*gui.txt* For Vim version 7.2a. Last change: 2008 Jun 14 +*gui.txt* For Vim version 7.2. Last change: 2008 Jun 14 VIM REFERENCE MANUAL by Bram Moolenaar diff --git a/runtime/doc/gui_w16.txt b/runtime/doc/gui_w16.txt index 954e138d9d..fc060a746e 100644 --- a/runtime/doc/gui_w16.txt +++ b/runtime/doc/gui_w16.txt @@ -1,4 +1,4 @@ -*gui_w16.txt* For Vim version 7.2a. Last change: 2005 Mar 29 +*gui_w16.txt* For Vim version 7.2. Last change: 2005 Mar 29 VIM REFERENCE MANUAL by Bram Moolenaar diff --git a/runtime/doc/gui_w32.txt b/runtime/doc/gui_w32.txt index 78d696e0c1..be8cdd0da7 100644 --- a/runtime/doc/gui_w32.txt +++ b/runtime/doc/gui_w32.txt @@ -1,4 +1,4 @@ -*gui_w32.txt* For Vim version 7.2a. Last change: 2007 Aug 30 +*gui_w32.txt* For Vim version 7.2. Last change: 2007 Aug 30 VIM REFERENCE MANUAL by Bram Moolenaar @@ -129,7 +129,7 @@ the makefile by double clicking it and use the "Edit with Vim" entry to edit the makefile. You can select any files and right-click to see a menu option called "Edit -with gvim". Chosing this menu option will invoke gvim with the file you have +with gvim". Choosing this menu option will invoke gvim with the file you have selected. If you select multiple files, you will find two gvim-related menu options: "Edit with multiple gvims" -- one gvim for each file in the selection diff --git a/runtime/doc/gui_x11.txt b/runtime/doc/gui_x11.txt index 43d7464d18..a3e8f558eb 100644 --- a/runtime/doc/gui_x11.txt +++ b/runtime/doc/gui_x11.txt @@ -1,4 +1,4 @@ -*gui_x11.txt* For Vim version 7.2a. Last change: 2007 Dec 09 +*gui_x11.txt* For Vim version 7.2. Last change: 2007 Dec 09 VIM REFERENCE MANUAL by Bram Moolenaar diff --git a/runtime/doc/hangulin.txt b/runtime/doc/hangulin.txt index f1fa3b3dc0..2ad19c599d 100644 --- a/runtime/doc/hangulin.txt +++ b/runtime/doc/hangulin.txt @@ -1,4 +1,4 @@ -*hangulin.txt* For Vim version 7.2a. Last change: 2006 Apr 02 +*hangulin.txt* For Vim version 7.2. Last change: 2006 Apr 02 VIM REFERENCE MANUAL by Chi-Deok Hwang and Sung-Hyun Nam diff --git a/runtime/doc/hebrew.txt b/runtime/doc/hebrew.txt index 600f277188..9767aa8f83 100644 --- a/runtime/doc/hebrew.txt +++ b/runtime/doc/hebrew.txt @@ -1,4 +1,4 @@ -*hebrew.txt* For Vim version 7.2a. Last change: 2007 Jun 14 +*hebrew.txt* For Vim version 7.2. Last change: 2007 Jun 14 VIM REFERENCE MANUAL by Ron Aaron (and Avner Lottem) diff --git a/runtime/doc/help.txt b/runtime/doc/help.txt index ec49413333..cfdf08c09b 100644 --- a/runtime/doc/help.txt +++ b/runtime/doc/help.txt @@ -1,4 +1,4 @@ -*help.txt* For Vim version 7.2a. Last change: 2008 Jun 21 +*help.txt* For Vim version 7.2. Last change: 2008 Jul 21 VIM - main help file k @@ -126,7 +126,7 @@ Advanced editing ~ |tabpage.txt| commands for using multiple tab pages |syntax.txt| syntax highlighting |spell.txt| spell checking -|diff.txt| working with two or three versions of the same file +|diff.txt| working with two to four versions of the same file |autocmd.txt| automatically executing commands on an event |filetype.txt| settings done specifically for a type of file |eval.txt| expression evaluation, conditional commands diff --git a/runtime/doc/howto.txt b/runtime/doc/howto.txt index 3ad8f4fdd0..7bb81c8c6c 100644 --- a/runtime/doc/howto.txt +++ b/runtime/doc/howto.txt @@ -1,4 +1,4 @@ -*howto.txt* For Vim version 7.2a. Last change: 2006 Apr 02 +*howto.txt* For Vim version 7.2. Last change: 2006 Apr 02 VIM REFERENCE MANUAL by Bram Moolenaar diff --git a/runtime/doc/if_cscop.txt b/runtime/doc/if_cscop.txt index 7448062142..dae6ebce32 100644 --- a/runtime/doc/if_cscop.txt +++ b/runtime/doc/if_cscop.txt @@ -1,4 +1,4 @@ -*if_cscop.txt* For Vim version 7.2a. Last change: 2005 Mar 29 +*if_cscop.txt* For Vim version 7.2. Last change: 2005 Mar 29 VIM REFERENCE MANUAL by Andy Kahn diff --git a/runtime/doc/if_mzsch.txt b/runtime/doc/if_mzsch.txt index dd538accc2..87298eccf0 100644 --- a/runtime/doc/if_mzsch.txt +++ b/runtime/doc/if_mzsch.txt @@ -1,4 +1,4 @@ -*if_mzsch.txt* For Vim version 7.2a. Last change: 2007 May 03 +*if_mzsch.txt* For Vim version 7.2. Last change: 2008 Jun 28 VIM REFERENCE MANUAL by Sergey Khorev @@ -55,7 +55,7 @@ In the case of :mzscheme, the code to execute is in the command-line. In the case of :mzfile, the code to execute is the contents of the given file. Each buffer has its own MzScheme namespace. Global namespace is bound to -the `global-namespace' value from the 'vimext' module. +the "global-namespace" value from the 'vimext' module. MzScheme interface defines exception exn:vim, derived from exn. It is raised for various Vim errors. @@ -218,7 +218,7 @@ Buffers *mzscheme-buffer* {linenr}. If {linenr} is 0, lines will be inserted at start. (curr-buff) Get the current buffer. Use procedures - from `vimcmd' module to change it. + from "vimcmd" module to change it. (buff-count) Get count of total buffers in the editor. (get-next-buff [buffer]) Get next buffer. (get-prev-buff [buffer]) Get previous buffer. Return #f when there diff --git a/runtime/doc/if_ole.txt b/runtime/doc/if_ole.txt index 08b4c492dc..929fd3928e 100644 --- a/runtime/doc/if_ole.txt +++ b/runtime/doc/if_ole.txt @@ -1,4 +1,4 @@ -*if_ole.txt* For Vim version 7.2a. Last change: 2007 May 10 +*if_ole.txt* For Vim version 7.2. Last change: 2007 May 10 VIM REFERENCE MANUAL by Paul Moore diff --git a/runtime/doc/if_perl.txt b/runtime/doc/if_perl.txt index 675ed37f2d..bd760ee379 100644 --- a/runtime/doc/if_perl.txt +++ b/runtime/doc/if_perl.txt @@ -1,4 +1,4 @@ -*if_perl.txt* For Vim version 7.2a. Last change: 2006 Mar 06 +*if_perl.txt* For Vim version 7.2. Last change: 2006 Mar 06 VIM REFERENCE MANUAL by Sven Verdoolaege diff --git a/runtime/doc/if_pyth.txt b/runtime/doc/if_pyth.txt index f8b0f86832..0e5817b0d8 100644 --- a/runtime/doc/if_pyth.txt +++ b/runtime/doc/if_pyth.txt @@ -1,4 +1,4 @@ -*if_pyth.txt* For Vim version 7.2a. Last change: 2006 Apr 30 +*if_pyth.txt* For Vim version 7.2. Last change: 2006 Apr 30 VIM REFERENCE MANUAL by Paul Moore diff --git a/runtime/doc/if_ruby.txt b/runtime/doc/if_ruby.txt index c381a6342a..8e1ef35d8e 100644 --- a/runtime/doc/if_ruby.txt +++ b/runtime/doc/if_ruby.txt @@ -1,4 +1,4 @@ -*if_ruby.txt* For Vim version 7.2a. Last change: 2006 Apr 30 +*if_ruby.txt* For Vim version 7.2. Last change: 2006 Apr 30 VIM REFERENCE MANUAL by Shugo Maeda diff --git a/runtime/doc/if_sniff.txt b/runtime/doc/if_sniff.txt index 956895d9b2..e5c7715783 100644 --- a/runtime/doc/if_sniff.txt +++ b/runtime/doc/if_sniff.txt @@ -1,4 +1,4 @@ -*if_sniff.txt* For Vim version 7.2a. Last change: 2005 Mar 29 +*if_sniff.txt* For Vim version 7.2. Last change: 2005 Mar 29 VIM REFERENCE MANUAL diff --git a/runtime/doc/if_tcl.txt b/runtime/doc/if_tcl.txt index 344592b3ba..d9b6a9c8f3 100644 --- a/runtime/doc/if_tcl.txt +++ b/runtime/doc/if_tcl.txt @@ -1,4 +1,4 @@ -*if_tcl.txt* For Vim version 7.2a. Last change: 2006 Mar 06 +*if_tcl.txt* For Vim version 7.2. Last change: 2008 Jun 26 VIM REFERENCE MANUAL by Ingo Wilken @@ -407,7 +407,7 @@ Options: < See |tcl-window-cmds| for the available options. $buf command [-quiet] {cmd} *tcl-buffer-command* - $buf expr {exr} *tcl-buffer-expr* + $buf expr {expr} *tcl-buffer-expr* $buf option {opt} [val] *tcl-buffer-option* These are similar to "::vim::command" etc., except that everything is done in the context of the buffer represented by $buf, instead of the diff --git a/runtime/doc/indent.txt b/runtime/doc/indent.txt index 8e5b7a3972..4d00da2573 100644 --- a/runtime/doc/indent.txt +++ b/runtime/doc/indent.txt @@ -1,4 +1,4 @@ -*indent.txt* For Vim version 7.2a. Last change: 2008 Jun 21 +*indent.txt* For Vim version 7.2. Last change: 2008 Jul 30 VIM REFERENCE MANUAL by Bram Moolenaar @@ -506,11 +506,86 @@ to get do loops indented in .f90 files and left alone in Fortran files with other extensions such as .for. +PHP *ft-php-indent* *php-indent* *php-indenting* + +NOTE: PHP files will be indented correctly only if PHP |syntax| is active. + +If you are editing a file in Unix 'fileformat' and '\r' characters are present +before new lines, indentation won't proceed correctly ; you have to remove +those useless characters first with a command like: > + + :%s /\r$//g + +Or, you can simply |:let| the variable PHP_removeCRwhenUnix to 1 and the +script will silently remove them when Vim loads a PHP file (at each|BufRead|). + +OPTIONS: ~ + +PHP indenting can be altered in several ways by modifying the values of some +variables: + + *php-comment* +To not enable auto-formating of comments by default (if you want to use your +own 'formatoptions'): > + :let g:PHP_autoformatcomment = 0 + +Else, 't' will be removed from the 'formatoptions' string and "qrowcb" will be +added, see|fo-table|for more information. +------------- + +To add an extra indent to every PHP lines with N being the number of +'shiftwidth' to add: > + :let g:PHP_default_indenting = N + +For example, with N = 1, this will give: +> + +(Notice the extra indent between the PHP container markers and the code) +------------- + +To automatically remove '\r' characters when the 'fileformat' is set to Unix: > + :let g:PHP_removeCRwhenUnix = 1 +------------- + +To indent braces at the same level than the code they contain: > + :let g:PHP_BracesAtCodeLevel = 1 + +This will give the following result: > + if ($foo) + { + foo(); + } +Instead of: > + if ($foo) + { + foo(); + } + +NOTE: Indenting will be a bit slower if this option is used because some + optimizations won't be available. +------------- + +To indent 'case:' and 'default:' statements in switch() blocks: > + :let g:PHP_vintage_case_default_indent = 1 + +(By default they are indented at the same level than the 'switch()' to avoid +unnecessary indentation) + + PYTHON *ft-python-indent* The amount of indent can be set for the following situations. The examples -given are de the defaults. Note that the variables are set to an expression, -so that you can change the value of 'shiftwidth' later. +given are the defaults. Note that the variables are set to an expression, so +that you can change the value of 'shiftwidth' later. Indent after an open paren: > let g:pyindent_open_paren = '&sw * 2' diff --git a/runtime/doc/index.txt b/runtime/doc/index.txt index b66fec43d2..f7db13a59c 100644 --- a/runtime/doc/index.txt +++ b/runtime/doc/index.txt @@ -1,4 +1,4 @@ -*index.txt* For Vim version 7.2a. Last change: 2008 May 04 +*index.txt* For Vim version 7.2. Last change: 2008 May 04 VIM REFERENCE MANUAL by Bram Moolenaar diff --git a/runtime/doc/insert.txt b/runtime/doc/insert.txt index db0ba0e650..a7915da9a7 100644 --- a/runtime/doc/insert.txt +++ b/runtime/doc/insert.txt @@ -1,4 +1,4 @@ -*insert.txt* For Vim version 7.2a. Last change: 2008 Jun 21 +*insert.txt* For Vim version 7.2. Last change: 2008 Jun 21 VIM REFERENCE MANUAL by Bram Moolenaar diff --git a/runtime/doc/intro.txt b/runtime/doc/intro.txt index b830c57a04..eddd0c54f3 100644 --- a/runtime/doc/intro.txt +++ b/runtime/doc/intro.txt @@ -1,4 +1,4 @@ -*intro.txt* For Vim version 7.2a. Last change: 2008 Jun 24 +*intro.txt* For Vim version 7.2. Last change: 2008 Jun 24 VIM REFERENCE MANUAL by Bram Moolenaar @@ -208,7 +208,7 @@ Vim would never have become what it is now, without the help of these people! Bill Foster Athena GUI port Google Lets me work on Vim one day a week Loic Grenie xvim (ideas for multi windows version) - Sven Guckes Vim promotor and previous WWW page maintainer + Sven Guckes Vim promoter and previous WWW page maintainer Darren Hiebert Exuberant ctags Jason Hildebrand GTK+ 2 port Bruce Hunsaker improvements for VMS port diff --git a/runtime/doc/map.txt b/runtime/doc/map.txt index 41b96151cb..607295779e 100644 --- a/runtime/doc/map.txt +++ b/runtime/doc/map.txt @@ -1,4 +1,4 @@ -*map.txt* For Vim version 7.2a. Last change: 2008 Jun 21 +*map.txt* For Vim version 7.2. Last change: 2008 Aug 09 VIM REFERENCE MANUAL by Bram Moolenaar @@ -162,8 +162,8 @@ be used in any order. They must appear right after the command, before any other arguments. *:map-local* *:map-* *E224* *E225* -If the first argument to one of these commands is "" it will apply to -mappings locally to the current buffer only. Example: > +If the first argument to one of these commands is "" the mapping will +be effective in the current buffer only. Example: > :map ,w /[.,;] Then you can map ",w" to something else in another buffer: > :map ,w /[#&!] @@ -1300,7 +1300,7 @@ The replacement text for a user defined command is scanned for special escape sequences, using <...> notation. Escape sequences are replaced with values from the entered command line, and all other text is copied unchanged. The resulting string is executed as an Ex command. To avoid the replacement use - in plade of the initial <. Thus to include "" literally use + in place of the initial <. Thus to include "" literally use "bang>". The valid escape sequences are diff --git a/runtime/doc/mbyte.txt b/runtime/doc/mbyte.txt index 4eabcf790a..5b25250f5c 100644 --- a/runtime/doc/mbyte.txt +++ b/runtime/doc/mbyte.txt @@ -1,4 +1,4 @@ -*mbyte.txt* For Vim version 7.2a. Last change: 2008 Jun 21 +*mbyte.txt* For Vim version 7.2. Last change: 2008 Jun 21 VIM REFERENCE MANUAL by Bram Moolenaar et al. diff --git a/runtime/doc/message.txt b/runtime/doc/message.txt index 9f8bbfb906..dc772c7345 100644 --- a/runtime/doc/message.txt +++ b/runtime/doc/message.txt @@ -1,4 +1,4 @@ -*message.txt* For Vim version 7.2a. Last change: 2007 Aug 19 +*message.txt* For Vim version 7.2. Last change: 2007 Aug 19 VIM REFERENCE MANUAL by Bram Moolenaar diff --git a/runtime/doc/mlang.txt b/runtime/doc/mlang.txt index 2e94d85d6b..ce7a8f247b 100644 --- a/runtime/doc/mlang.txt +++ b/runtime/doc/mlang.txt @@ -1,4 +1,4 @@ -*mlang.txt* For Vim version 7.2a. Last change: 2008 Jun 08 +*mlang.txt* For Vim version 7.2. Last change: 2008 Jun 08 VIM REFERENCE MANUAL by Bram Moolenaar diff --git a/runtime/doc/motion.txt b/runtime/doc/motion.txt index cdeb4f92a9..f3364b61f9 100644 --- a/runtime/doc/motion.txt +++ b/runtime/doc/motion.txt @@ -1,4 +1,4 @@ -*motion.txt* For Vim version 7.2a. Last change: 2008 May 02 +*motion.txt* For Vim version 7.2. Last change: 2008 Aug 03 VIM REFERENCE MANUAL by Bram Moolenaar @@ -851,16 +851,16 @@ when using blockwise Visual mode. These commands do not work when no change was made yet in the current file. *'<* *`<* -'< `< To the first character of the last selected Visual - area in the current buffer. For block mode it may - also be the last character in the first line (to be - able to define the block). {not in Vi}. +'< `< To the first line or character of the last selected + Visual area in the current buffer. For block mode it + may also be the last character in the first line (to + be able to define the block). {not in Vi}. *'>* *`>* -'> `> To the last character of the last selected Visual - area in the current buffer. For block mode it may - also be the first character of the last line (to be - able to define the block). Note that 'selection' +'> `> To the last line or character of the last selected + Visual area in the current buffer. For block mode it + may also be the first character of the last line (to + be able to define the block). Note that 'selection' applies, the position may be just after the Visual area. {not in Vi}. diff --git a/runtime/doc/netbeans.txt b/runtime/doc/netbeans.txt index 3539111666..57bc6dec18 100644 --- a/runtime/doc/netbeans.txt +++ b/runtime/doc/netbeans.txt @@ -1,4 +1,4 @@ -*netbeans.txt* For Vim version 7.2a. Last change: 2008 Jun 22 +*netbeans.txt* For Vim version 7.2. Last change: 2008 Jun 28 VIM REFERENCE MANUAL by Gordon Prieur et al. @@ -69,7 +69,7 @@ Initially just a Java IDE, NetBeans has had C, C++, and Fortran support added in recent releases. For more information visit the main NetBeans web site http://www.netbeans.org. -The External Editor is now, unfortunately, declared Obsolte. See +The External Editor is now, unfortunately, declared obsolete. See http://externaleditor.netbeans.org. Sun Microsystems, Inc. also ships NetBeans under the name Sun ONE Studio. @@ -418,7 +418,7 @@ moveAnnoToFront serNum Not implemented. netbeansBuffer isNetbeansBuffer - If "isNetbeansBuffer" is "T" then this buffer is ``owned'' by + If "isNetbeansBuffer" is "T" then this buffer is "owned" by NetBeans. New in version 2.2. diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt index e70b39750b..61351d317b 100644 --- a/runtime/doc/options.txt +++ b/runtime/doc/options.txt @@ -1,4 +1,4 @@ -*options.txt* For Vim version 7.2a. Last change: 2008 Jun 24 +*options.txt* For Vim version 7.2. Last change: 2008 Aug 06 VIM REFERENCE MANUAL by Bram Moolenaar @@ -1285,7 +1285,8 @@ A jump table for the options with a short description can be found at |Q_op|. |+file_in_path| feature} This is a list of directories which will be searched when using the |:cd| and |:lcd| commands, provided that the directory being searched - for has a relative path (not starting with "/", "./" or "../"). + for has a relative path, not an absolute part starting with "/", "./" + or "../", the 'cdpath' option is not used then. The 'cdpath' option's value has the same form and semantics as |'path'|. Also see |file-searching|. The default value is taken from $CDPATH, with a "," prepended to look @@ -2296,6 +2297,8 @@ A jump table for the options with a short description can be found at |Q_op|. or "\\", the swap file name will be built from the complete path to the file with all path separators substituted to percent '%' signs. This will ensure file name uniqueness in the preserve directory. + On Win32, when a separating comma is following, you must use "//", + since "\\" will include the comma in the file name. - Spaces after the comma are ignored, other spaces are considered part of the directory name. To have a space at the start of a directory name, precede it with a backslash. @@ -4987,7 +4990,7 @@ A jump table for the options with a short description can be found at |Q_op|. name, datestamp and permissions. This option contains the extra information, the nature of which will vary between systems. The value of this option is usually set when the file is loaded, and - use to set the file type when file is written. + is used to set the operating system file type when file is written. It can affect the pattern matching of the automatic commands. |autocmd-osfiletypes| @@ -5101,9 +5104,10 @@ A jump table for the options with a short description can be found at |Q_op|. global or local to buffer |global-local| {not in Vi} This is a list of directories which will be searched when using the - |gf|, [f, ]f, ^Wf, |:find| and other commands, provided that the file - being searched for has a relative path (not starting with '/'). The - directories in the 'path' option may be relative or absolute. + |gf|, [f, ]f, ^Wf, |:find|, |:sfind|, |:tabfind| and other commands, + provided that the file being searched for has a relative path (not + starting with "/", "./" or "../"). The directories in the 'path' + option may be relative or absolute. - Use commas to separate directory names: > :set path=.,/usr/local/include,/usr/include < - Spaces can also be used to separate directory names (for backwards @@ -5122,19 +5126,8 @@ A jump table for the options with a short description can be found at |Q_op|. - Environment variables are expanded |:set_env|. - When using |netrw.vim| URLs can be used. For example, adding "http://www.vim.org" will make ":find index.html" work. - - Search upwards and downwards in a directory tree: - 1) "*" matches a sequence of characters, e.g.: > - :set path=/usr/include/* -< means all subdirectories in /usr/include (but not /usr/include - itself). > - :set path=/usr/*c -< matches /usr/doc and /usr/src. - 2) "**" matches a subtree, up to 100 directories deep. Example: > - :set path=/home/user_x/src/** -< means search in the whole subtree under "/home/usr_x/src". - 3) If the path ends with a ';', this path is the startpoint - for upward search. - See |file-searching| for more info and exact syntax. + - Search upwards and downwards in a directory tree using "*", "**" and + ";". See |file-searching| for info and syntax. {not available when compiled without the |+path_extra| feature} - Careful with '\' characters, type two to get one in the option: > :set path=.,c:\\include @@ -6405,15 +6398,15 @@ A jump table for the options with a short description can be found at |Q_op|. directory. F S Full path to the file in the buffer. t S File name (tail) of file in the buffer. - m F Modified flag, text is " [+]"; " [-]" if 'modifiable' is off. + m F Modified flag, text is "[+]"; "[-]" if 'modifiable' is off. M F Modified flag, text is ",+" or ",-". - r F Readonly flag, text is " [RO]". + r F Readonly flag, text is "[RO]". R F Readonly flag, text is ",RO". - h F Help buffer flag, text is " [help]". + h F Help buffer flag, text is "[help]". H F Help buffer flag, text is ",HLP". - w F Preview window flag, text is " [Preview]". + w F Preview window flag, text is "[Preview]". W F Preview window flag, text is ",PRV". - y F Type of file in the buffer, e.g., " [vim]". See 'filetype'. + y F Type of file in the buffer, e.g., "[vim]". See 'filetype'. Y F Type of file in the buffer, e.g., ",VIM". See 'filetype'. {not available when compiled without |+autocmd| feature} k S Value of "b:keymap_name" or 'keymap' when |:lmap| mappings are @@ -6460,14 +6453,9 @@ A jump table for the options with a short description can be found at |Q_op|. to StatusLineNC for the statusline of non-current windows. The number N must be between 1 and 9. See |hl-User1..9| - Display of flags are controlled by the following heuristic: - If a flag text starts with comma it is assumed that it wants to - separate itself from anything but preceding plaintext. If it starts - with a space it is assumed that it wants to separate itself from - anything but other flags. That is: A leading comma is removed if the - preceding character stems from plaintext. A leading space is removed - if the preceding character stems from another active flag. This will - make a nice display when flags are used like in the examples below. + When displaying a flag, Vim removes the leading comma, if any, when + that flag comes right after plaintext. This will make a nice display + when flags are used like in the examples below. When all items in a group becomes an empty string (i.e. flags that are not set) and a minwid is not set for the group, the whole group will diff --git a/runtime/doc/os_390.txt b/runtime/doc/os_390.txt index 9c7c0dcc7e..04ca16affc 100644 --- a/runtime/doc/os_390.txt +++ b/runtime/doc/os_390.txt @@ -1,4 +1,4 @@ -*os_390.txt* For Vim version 7.2a. Last change: 2005 Mar 29 +*os_390.txt* For Vim version 7.2. Last change: 2005 Mar 29 VIM REFERENCE MANUAL by Ralf Schandl diff --git a/runtime/doc/os_amiga.txt b/runtime/doc/os_amiga.txt index 3f2647f318..9597c522c8 100644 --- a/runtime/doc/os_amiga.txt +++ b/runtime/doc/os_amiga.txt @@ -1,4 +1,4 @@ -*os_amiga.txt* For Vim version 7.2a. Last change: 2005 Mar 29 +*os_amiga.txt* For Vim version 7.2. Last change: 2005 Mar 29 VIM REFERENCE MANUAL by Bram Moolenaar diff --git a/runtime/doc/os_beos.txt b/runtime/doc/os_beos.txt index 6ad3a5019e..37e34de579 100644 --- a/runtime/doc/os_beos.txt +++ b/runtime/doc/os_beos.txt @@ -1,4 +1,4 @@ -*os_beos.txt* For Vim version 7.2a. Last change: 2005 Mar 29 +*os_beos.txt* For Vim version 7.2. Last change: 2005 Mar 29 VIM REFERENCE MANUAL by Bram Moolenaar diff --git a/runtime/doc/os_dos.txt b/runtime/doc/os_dos.txt index 2156f65e80..272d031953 100644 --- a/runtime/doc/os_dos.txt +++ b/runtime/doc/os_dos.txt @@ -1,4 +1,4 @@ -*os_dos.txt* For Vim version 7.2a. Last change: 2006 Mar 30 +*os_dos.txt* For Vim version 7.2. Last change: 2006 Mar 30 VIM REFERENCE MANUAL by Bram Moolenaar diff --git a/runtime/doc/os_mac.txt b/runtime/doc/os_mac.txt index 0fc79f5ba4..d8585f2f42 100644 --- a/runtime/doc/os_mac.txt +++ b/runtime/doc/os_mac.txt @@ -1,4 +1,4 @@ -*os_mac.txt* For Vim version 7.2a. Last change: 2006 Apr 30 +*os_mac.txt* For Vim version 7.2. Last change: 2006 Apr 30 VIM REFERENCE MANUAL by Bram Moolenaar et al. diff --git a/runtime/doc/os_mint.txt b/runtime/doc/os_mint.txt index bda358603e..0bfc56aaac 100644 --- a/runtime/doc/os_mint.txt +++ b/runtime/doc/os_mint.txt @@ -1,4 +1,4 @@ -*os_mint.txt* For Vim version 7.2a. Last change: 2005 Mar 29 +*os_mint.txt* For Vim version 7.2. Last change: 2005 Mar 29 VIM REFERENCE MANUAL by Jens M. Felderhoff diff --git a/runtime/doc/os_msdos.txt b/runtime/doc/os_msdos.txt index 6aa8072489..d8db35313c 100644 --- a/runtime/doc/os_msdos.txt +++ b/runtime/doc/os_msdos.txt @@ -1,4 +1,4 @@ -*os_msdos.txt* For Vim version 7.2a. Last change: 2005 Mar 29 +*os_msdos.txt* For Vim version 7.2. Last change: 2005 Mar 29 VIM REFERENCE MANUAL by Bram Moolenaar diff --git a/runtime/doc/os_os2.txt b/runtime/doc/os_os2.txt index 1374346c11..b1116a46f8 100644 --- a/runtime/doc/os_os2.txt +++ b/runtime/doc/os_os2.txt @@ -1,4 +1,4 @@ -*os_os2.txt* For Vim version 7.2a. Last change: 2007 Apr 22 +*os_os2.txt* For Vim version 7.2. Last change: 2007 Apr 22 VIM REFERENCE MANUAL by Paul Slootman diff --git a/runtime/doc/os_qnx.txt b/runtime/doc/os_qnx.txt index 6d15e5157f..5fe702400e 100644 --- a/runtime/doc/os_qnx.txt +++ b/runtime/doc/os_qnx.txt @@ -1,4 +1,4 @@ -*os_qnx.txt* For Vim version 7.2a. Last change: 2005 Mar 29 +*os_qnx.txt* For Vim version 7.2. Last change: 2005 Mar 29 VIM REFERENCE MANUAL by Julian Kinraid diff --git a/runtime/doc/os_risc.txt b/runtime/doc/os_risc.txt index 0f6d2bba17..90bbde00e7 100644 --- a/runtime/doc/os_risc.txt +++ b/runtime/doc/os_risc.txt @@ -1,4 +1,4 @@ -*os_risc.txt* For Vim version 7.2a. Last change: 2005 Mar 29 +*os_risc.txt* For Vim version 7.2. Last change: 2008 Jun 28 VIM REFERENCE MANUAL by Thomas Leonard @@ -7,7 +7,7 @@ *riscos* *RISCOS* *RISC-OS* This file contains the particularities for the RISC OS version of Vim. -The RISC OS port is a completely new port and is not based on the old `archi' +The RISC OS port is a completely new port and is not based on the old "archi" port. 1. File locations |riscos-locations| @@ -46,7 +46,7 @@ run the command-line versions of Vim (see |riscos-commandline|). distribution, but modified slightly to work within the limits of ADFS, plus some extra files such as the window templates. -User choices are read from `Choices:*' and are saved to `.*'. +User choices are read from "Choices:*" and are saved to ".*". If you have the new !Boot structure then these should be set up already. If not, set Choices$Path to a list of directories to search when looking for user configuration files. Set Choices$Write to the directory you want files @@ -58,22 +58,22 @@ sessions). 2. Filename munging All pathname munging is disabled by default, so Vim should behave like a -normal RISC OS application now. So, if you want to edit `doc/html' then you -actually type `*vi doc/html'. +normal RISC OS application now. So, if you want to edit "doc/html" then you +actually type "*vi doc/html". The only times munging is done is when: - Searching included files from C programs, since these are always munged. See |[I|. Note: make sure you are in the right directory when you use this - command (i.e. the one with subdirectories 'c' and 'h'). + command (i.e. the one with subdirectories "c" and "h"). - Sourcing files using |:so|. - Paths starting `$VIM/' are munged like this: + Paths starting "$VIM/" are munged like this: $VIM/syntax/help.vim -> Vim:syntax.help - Also, files ending in `.vim' have their extensions removed, and slashes + Also, files ending in ".vim" have their extensions removed, and slashes replaced with dots. Some tag files and script files may have to be edited to work under this port. @@ -82,10 +82,10 @@ Some tag files and script files may have to be edited to work under this port. *riscos-commandline* 3. Command-line use -To use Vim from the command-line use the `*vi' command (or '*ex' for +To use Vim from the command-line use the "*vi" command (or "*ex" for |Ex-mode|). -Type `*vi -h' for a list of options. +Type "*vi -h" for a list of options. Running the command-line version of Vim in a large high-color mode may cause the scrolling to be very slow. Either change to a mode with fewer colors or @@ -149,7 +149,7 @@ font via ZapRedraw and any of the Zap fonts via ZapRedraw: > point is used. Thanks to John Kortink, Vim can use the ZapRedraw module. Start the font name -with '!' (or '!!' for double height), like this: > +with "!" (or "!!" for double height), like this: > :set guifont=!! < Use the system font, but via ZapRedraw. This gives a @@ -158,13 +158,13 @@ with '!' (or '!!' for double height), like this: > > :set guifont=!script < Uses the named Zap font (a directory in VimFont$Path). - The redraw is the same speed as for '!!', but you get + The redraw is the same speed as for "!!", but you get a nicer looking font. Only the "man+" and "script" fonts are supplied currently, but you can use any of the Zap fonts if they are in VimFont$Path. - Vim will try to load font files '0', 'B', 'I' and 'IB' - from the named directory. Only '0' (normal style) MUST + Vim will try to load font files "0", "B", "I" and "IB" + from the named directory. Only "0" (normal style) MUST be present. Link files are not currently supported. Note that when using ZapRedraw the edit bar is drawn in front of the character @@ -191,7 +191,7 @@ allow other codes to be used if you want to use Vim from a remote terminal. Although I do not have an internet connection to my Acorn, I have managed to run Vim in a FreeTerm window using the loopback connection. -It seems to work pretty well now, using '*vi -T ansi'. +It seems to work pretty well now, using "*vi -T ansi". ============================================================================== *riscos-temp-files* @@ -203,7 +203,7 @@ files are in (i.e. inside !Scrap) and backups are in the directory you were saving to. Vim will allow you to try and recover the file when you next try to edit it. -To see a list of swap files, press and type `*vi -r'. +To see a list of swap files, press and type "*vi -r". Vim no longer brings up ATTENTION warnings if you try to edit two files with the same name in different directories. @@ -228,8 +228,8 @@ older machines then edit the !RunTxt and GVim files. I don't know what UnixLib does by default on these machines so I'm playing safe. It doesn't work at all well without dynamic areas, since it can't change its -memory allocation once running. Hence you should edit `!Vim.GVim' and -`!Vim.!RunTxt' to choose the best size for you. You probably need at least +memory allocation once running. Hence you should edit "!Vim.GVim" and +"!Vim.!RunTxt" to choose the best size for you. You probably need at least about 1400K. ============================================================================== @@ -252,7 +252,7 @@ The system has changed from version 5.3. The new sequence of events is: Some examples may make this clearer: Kind of file loaded osfiletype filetype ~ - C code 'c.hellow' Text (&fff) C + C code "c.hellow" Text (&fff) C LaTeX document LaTeX (&2a8) TeX Draw document DrawFile (&aff) (not changed) @@ -263,7 +263,7 @@ Some examples may make this clearer: - Bangs (!s) are only replaced if they are followed by a space or end-of-line, since many pathnames contain them. -- You can prefix the command with '~', which stops any output from being +- You can prefix the command with "~", which stops any output from being displayed. This also means that you don't have to press afterwards, and stops the screen from being redrawn. {only in the GUI version} @@ -275,7 +275,7 @@ Downloading everything you need: - Get the latest source distribution (see www.vim.org) - Get the runtime environment files (e.g. these help files) -- Get the `extra' archive (contains the RISC OS specific bits) +- Get the "extra" archive (contains the RISC OS specific bits) - Get the RISC OS binary distribution (if possible) @@ -289,19 +289,19 @@ Unarchiving: Recompiling the sources: - Create c, s, and h directories. -- Put all the header files in 'h'. \ -- Put all the C files in `c'. | And lose the extensions -- Put the assembler file (`swis/s') in 's'. / -- Rename all the files in `proto' to `h', like this: +- Put all the header files in "h". \ +- Put all the C files in "c". | And lose the extensions +- Put the assembler file ("swis/s") in "s". / +- Rename all the files in "proto" to "h", like this: raFS::VimSrc.source.proto.file/pro becomes raFS::VimSrc.source.h.file_pro -- In the files `h.proto' and `c.termlib', search and replace +- In the files "h.proto" and "c.termlib", search and replace .pro" with _pro.h" -- Create a simple Makefile if desired and do '*make -k'. - Use 'CC = gcc -DRISCOS -DUSE_GUI -O2 -x c' in the Makefile. +- Create a simple Makefile if desired and do "*make -k". + Use "CC = gcc -DRISCOS -DUSE_GUI -O2 -x c" in the Makefile. - Save the binary as !Vim.Vim in the binary distribution. @@ -309,15 +309,15 @@ Updating the run-time environment: - Replace old or missing files inside !Vim.Resources with the new files. -- Remove files in `doc' not ending in `/txt', except for `tags'. -- Lose the extensions from the files in `doc'. -- Edit the `doc.tags' file. Remove extensions from the second column: > +- Remove files in "doc" not ending in "/txt", except for "tags". +- Lose the extensions from the files in "doc". +- Edit the "doc.tags" file. Remove extensions from the second column: > :%s/^\(.[^\t]*\t.*\)\.txt\t/\1\t/ - Remove extensions from the syntax files. Split them into two directories to avoid the 77 entry limit on old ADFS filesystems. -- Edit `Vim:FileType' to match `*.c.*' as well as `*/c' and so on. +- Edit "Vim:FileType" to match "*.c.*" as well as "*/c" and so on. Add filetype checking too. -- Edit `Vim:Menu' and remove all the keys from the menus: > +- Edit "Vim:Menu" and remove all the keys from the menus: > :%s/[^ \t]*// < vim:tw=78:ts=8:ft=help:norl: diff --git a/runtime/doc/os_unix.txt b/runtime/doc/os_unix.txt index cf200f0c72..cfe4e80a95 100644 --- a/runtime/doc/os_unix.txt +++ b/runtime/doc/os_unix.txt @@ -1,4 +1,4 @@ -*os_unix.txt* For Vim version 7.2a. Last change: 2005 Mar 29 +*os_unix.txt* For Vim version 7.2. Last change: 2005 Mar 29 VIM REFERENCE MANUAL by Bram Moolenaar diff --git a/runtime/doc/os_vms.txt b/runtime/doc/os_vms.txt index 6208d636c5..f74700d26f 100644 --- a/runtime/doc/os_vms.txt +++ b/runtime/doc/os_vms.txt @@ -1,4 +1,4 @@ -*os_vms.txt* For Vim version 7.2a. Last change: 2006 Nov 18 +*os_vms.txt* For Vim version 7.2. Last change: 2006 Nov 18 VIM REFERENCE MANUAL diff --git a/runtime/doc/os_win32.txt b/runtime/doc/os_win32.txt index afc05ddeab..6ed5891b27 100644 --- a/runtime/doc/os_win32.txt +++ b/runtime/doc/os_win32.txt @@ -1,4 +1,4 @@ -*os_win32.txt* For Vim version 7.2a. Last change: 2008 May 02 +*os_win32.txt* For Vim version 7.2. Last change: 2008 May 02 VIM REFERENCE MANUAL by George Reilly diff --git a/runtime/doc/pattern.txt b/runtime/doc/pattern.txt index cb367d07bf..77a4505520 100644 --- a/runtime/doc/pattern.txt +++ b/runtime/doc/pattern.txt @@ -1,4 +1,4 @@ -*pattern.txt* For Vim version 7.2a. Last change: 2008 Jun 21 +*pattern.txt* For Vim version 7.2. Last change: 2008 Jul 16 VIM REFERENCE MANUAL by Bram Moolenaar @@ -1122,7 +1122,7 @@ in the file. {Vi cannot handle characters in the file at all} *CR-used-for-NL* When 'fileformat' is "mac", characters in the file are stored as -characters internally. In the display they are shown as "^M". Otherwise this +characters internally. In the text they are shown as "^J". Otherwise this works similar to the usage of for a . When working with expression evaluation, a character in the pattern diff --git a/runtime/doc/pi_getscript.txt b/runtime/doc/pi_getscript.txt index 5f46de006a..3ac15692b5 100644 --- a/runtime/doc/pi_getscript.txt +++ b/runtime/doc/pi_getscript.txt @@ -1,4 +1,4 @@ -*pi_getscript.txt* For Vim version 7.2a. Last change: 2008 Jan 07 +*pi_getscript.txt* For Vim version 7.2. Last change: 2008 Jun 29 > GETSCRIPT REFERENCE MANUAL by Charles E. Campbell, Jr. < @@ -335,6 +335,9 @@ The AutoInstall process will: ============================================================================== 9. GetLatestVimScripts History *getscript-history* *glvs-hist* {{{1 +v31 Jun 29, 2008 : * (Bill McCarthy) fixed having hls enabled with getscript +v30 Jun 13, 2008 : * GLVS now checks for existence of fnameescape() and will + issue an error message if its not supported v29 Jan 07, 2008 : * Bram M pointed out that cpo is a global option and that getscriptPlugin.vim was setting it but not restoring it. v28 Jan 02, 2008 : * improved shell quoting character handling, cygwin diff --git a/runtime/doc/pi_gzip.txt b/runtime/doc/pi_gzip.txt index 3334379161..3c522ffe1e 100644 --- a/runtime/doc/pi_gzip.txt +++ b/runtime/doc/pi_gzip.txt @@ -1,4 +1,4 @@ -*pi_gzip.txt* For Vim version 7.2a. Last change: 2002 Oct 29 +*pi_gzip.txt* For Vim version 7.2. Last change: 2002 Oct 29 VIM REFERENCE MANUAL by Bram Moolenaar diff --git a/runtime/doc/pi_netrw.txt b/runtime/doc/pi_netrw.txt index 68a0299ce6..aefe987ad0 100644 --- a/runtime/doc/pi_netrw.txt +++ b/runtime/doc/pi_netrw.txt @@ -1,4 +1,4 @@ -*pi_netrw.txt* For Vim version 7.2a. Last change: 2008 Jun 21 +*pi_netrw.txt* For Vim version 7.2. Last change: 2008 Aug 08 ----------------------------------------------------- NETRW REFERENCE MANUAL by Charles E. Campbell, Jr. @@ -314,13 +314,6 @@ settings are described below, in |netrw-browser-options|, and in Also affects the "previous window" (see |netrw-P|) in the same way. - *g:netrw_shq* = "'" for Unix/Linux systems (ie. a single quote) - = "'" for Windows + cygwin systems (ie. a single quote) - = '"' for Windows systems, not using cygwin - (ie. a double quote) - Controls the quoting character used during scp and ftp - commands. - *g:netrw_scpport* = "-P" : option to use to set port for scp *g:netrw_sshport* = "-p" : option to use to set port for ssh @@ -864,6 +857,7 @@ QUICK HELP *netrw-quickhelp* {{{2 Sorted by Select sorting style (name/time/size).........|netrw-s| Editing the sorting sequence..................|netrw-S| + Sorting options...............................|g:netrw_sort_options| Associated setting variable...................|g:netrw_sort_sequence| Reverse sorting order.........................|netrw-r| @@ -921,6 +915,8 @@ QUICK REFERENCE: MAPS *netrw-browse-maps* {{{2 browser window. A vertical split is used. x View file with an associated program |netrw-x| + % Open a new file in netrw's current directory |netrw-%| + (gvim only) selects word under mouse as if a had been pressed (ie. edit file, change directory) (gvim only) same as P selecting word under mouse; @@ -1362,8 +1358,8 @@ will end up. One may change the sorting sequence by modifying the g:netrw_sort_sequence variable (either manually or in your <.vimrc>) or by using the "S" map. -Related topics: |netrw-s| -Associated setting variable: |g:netrw_sort_sequence| +Related topics: |netrw-s| |netrw-S| +Associated setting variables: |g:netrw_sort_sequence| |g:netrw_sort_options| GOING UP *netrw--* {{{2 @@ -1441,21 +1437,56 @@ tips & tools" by Rob Flickenger (O'Reilly, ISBN 0-596-00461-3) gives a tip for setting up no-password ssh and scp and discusses associated security issues. It used to be available at http://hacks.oreilly.com/pub/h/66 , but apparently that address is now being redirected to some "hackzine". -I'll attempt a summary: +I'll attempt a summary based on that article and on a communication from +Ben Schmidt: - 1. Generate a public/private key pair on the ssh server: - ssh-keygen -t rsa - (saving the file in ~/.ssh/id_rsa is ok) - 2. Just hit the when asked for passphrase (twice). - 3. This creates two files: - ~/.ssh/id_rsa - ~/.ssh/id_rsa.pub - 4. On the client: - cd - mkdir .ssh - chmod 0700 .ssh - scp {serverhostname}:.ssh/id_rsa.pub . - cat id_rsa.pub >> .ssh/authorized_keys2 + 1. Generate a public/private key pair on the local machine + (ssh client): > + ssh-keygen -t rsa + (saving the file in ~/.ssh/id_rsa as prompted) +< + 2. Just hit the when asked for passphrase (twice) for no + passphrase. If you do use a passphrase, you will also need to use + ssh-agent so you only have to type the passphrase once per session. + If you don't use a passphrase, simply logging onto your local + computer or getting access to the keyfile in any way will suffice + to access any ssh servers which have that key authorized for login. + + 3. This creates two files: > + ~/.ssh/id_rsa + ~/.ssh/id_rsa.pub +< + 4. On the target machine (ssh server): > + cd + mkdir -p .ssh + chmod 0700 .ssh +< + 5. On your local machine (ssh client): (one line) > + ssh {serverhostname} + cat '>>' '~/.ssh/authorized_keys2' < ~/.ssh/id_rsa.pub +< + or, for OpenSSH, (one line) > + ssh {serverhostname} + cat '>>' '~/.ssh/authorized_keys' < ~/.ssh/id_rsa.pub +< +You can test it out with > + ssh {serverhostname} +and you should be log onto the server machine without further need to type +anything. + +If you decided to use a passphrase, do: > + ssh-agent $SHELL + ssh-add + ssh {serverhostname} +You will be prompted for your key passphrase when you use ssh-add, but not +subsequently when you use ssh. For use with vim, you can use > + ssh-agent vim +and, when next within vim, use > + :!ssh-add +Alternatively, you can apply ssh-agent to the terminal you're planning on +running vim in: > + ssh-agent xterm & +and do ssh-add whenever you need. For Windows, folks on the vim mailing list have mentioned that Pageant helps with avoiding the constant need to enter the password. @@ -1632,6 +1663,13 @@ MARKED FILES: MOVING *netrw-mm* {{{2 (See |netrw-mf| and |netrw-mr| for how to mark files) (uses the global marked file list) + WARNING: moving files is more dangerous than copying them. + A file being moved is first copied and then deleted; if the + copy operation fails and the delete succeeds, you will lose + the file. Either try things out with unimportant files + first or do the copy and then delete yourself using mc and D. + Use at your own risk! + Select a target directory with mT (|netrw-mt|). Then change directory, select file(s) (see |netrw-mf|), and press "mm". @@ -1657,7 +1695,7 @@ MARKED FILES: TAGGING *netrw-mT* {{{2 (See |netrw-mf| and |netrw-mr| for how to mark files) (uses the global marked file list) -The "mt" mapping will apply the command in g:netrw_ctags (by default, its +The "mt" mapping will apply the command in |g:netrw_ctags| (by default, its "ctags") to marked files. For remote browsing, in order to create a tags file netrw will use ssh (see |g:netrw_ssh_cmd|), and so ssh must be available for this to work on remote systems. For your local system, see |ctags| on how to @@ -1676,7 +1714,7 @@ preceded by the netrw-compatible url used to obtain it. When one subsequently uses one of the go to tag actions (|tags|), the url will be used by netrw to edit the desired file and go to the tag. -Associated setting variables: |g:netrw_ssh_cmd| +Associated setting variables: |g:netrw_ctags| |g:netrw_ssh_cmd| MARKED FILES: SETTING THE TARGET DIRECTORY *netrw-mt* {{{2 @@ -1738,14 +1776,13 @@ your browsing preferences. (see also: |netrw-settings|) a script/function to handle the given extension. (see |netrw_filehandler|). - *g:netrw_cd_escape* ="[]#*$%'\" ?`!&();<>\\" - This option is used to escape directory names - before changing directory to them. - *g:netrw_compress* ="gzip" Will compress marked files with this command + *g:netrw_ctags* ="ctags" + The default external program used to create tags + *g:netrw_decompress* = { ".gz" : "gunzip" , ".bz2" : "bunzip2" , ".zip" : "unzip" , @@ -1888,6 +1925,14 @@ your browsing preferences. (see also: |netrw-settings|) *g:netrw_sort_direction* sorting direction: "normal" or "reverse" default: "normal" + *g:netrw_sort_options* sorting is done using |:sort|; this + variable's value is appended to the + sort command. Thus one may ignore case, + for example, with the following in your + .vimrc: > + let g:netrw_sort_options="i" +< default: "" + *g:netrw_sort_sequence* when sorting by name, first sort by the comma-separated pattern sequence default: '[\/]$,*,\.bak$,\.o$,\.h$, @@ -2031,6 +2076,13 @@ Related topics: directory, see |g:netrw_keepdir|. +OPEN A NEW FILE IN NETRW'S CURRENT DIRECTORY *netrw-%* + +To open a file in netrw's current directory, press "%". This map will +query the user for a new filename; an empty file by that name will be +placed in the netrw's current directory (ie. b:netrw_curdir). + + PREVIEW WINDOW *netrw-p* *netrw-preview* {{{2 One may use a preview window by using the "p" key when the cursor is atop the @@ -2377,6 +2429,37 @@ which is loaded automatically at startup (assuming :set nocp). ============================================================================== 12. History *netrw-history* {{{1 + v132: Aug 06, 2008 * Fixed marked file-based obtain + Aug 08, 2008 * sourcing a file via ftp from a netrw-generated + buffer (or any buffer with |'nobl'|) left an + empty no-name buffer in its wake. Fixed. + v130: Jul 31, 2008 * trying out elinks/links for http://host/ + requests. One problem: in-page links + (such as with ...#LABEL) are not supported + * verified that Bram's modified netrwPlugin works + Aug 01, 2008 * fixed a bug: when sourcing a file via ftp, the + "filter window" was left behind. + v129: Jul 31, 2008 * bug found in non-mouse enabled vim and some + local maps + v128: Jul 30, 2008 * much work done in using shellescape() and + fnameescape() + v126: Jun 30, 2008 * after having gone to a remote directory, + was no longer taking one to the correct + entry in the help (|netrw-quickhelp|). Fixed. + Jul 01, 2008 * extracting the last filename from a wide listing + missed the last letter when |'virtualedit'| not + enabled. + Jul 01, 2008 * vim foo/bar was creating [Scratch] buffers, + where bar was also a directory + Jul 01, 2008 * numerous additional changes were made to netrw + to use fnameescape() and shellescape() instead + of escape(). Not all changes have been tested + as yet... + Jul 01, 2008 * (James Vega reported) some problems with + :NetrwSettings (due to no longer used setting + variables). + Jul 07, 2008 * Additional numerous changes to support security; + shellescape(arg,1), etc. v125: Apr 07, 2008 * (Cristian Rigamonti) CR provides a patch; he noted that gx was failing since its call to netrw#NetBrowseX() wasn't updated to @@ -2570,7 +2653,7 @@ which is loaded automatically at startup (assuming :set nocp). v110: May 10, 2007 * added [ and ] maps to NetrwTreeListing May 25, 2007 * |g:netrw_preview| included May 29, 2007 * modifed netrw#NetBrowseX to consistently use - |g:netrw_shq| instead of hardcoded quotes, + g:netrw_shq instead of hardcoded quotes, and modified the snippet that sets up redir so Windows machines use "nul" instead of "/dev/null". diff --git a/runtime/doc/pi_paren.txt b/runtime/doc/pi_paren.txt index 810532797d..942a486f9f 100644 --- a/runtime/doc/pi_paren.txt +++ b/runtime/doc/pi_paren.txt @@ -1,4 +1,4 @@ -*pi_paren.txt* For Vim version 7.2a. Last change: 2008 Jun 16 +*pi_paren.txt* For Vim version 7.2. Last change: 2008 Jun 16 VIM REFERENCE MANUAL by Bram Moolenaar diff --git a/runtime/doc/pi_spec.txt b/runtime/doc/pi_spec.txt index 900e768fcb..268ee4f31b 100644 --- a/runtime/doc/pi_spec.txt +++ b/runtime/doc/pi_spec.txt @@ -1,4 +1,4 @@ -*pi_spec.txt* For Vim version 7.2a. Last change: 2006 Apr 24 +*pi_spec.txt* For Vim version 7.2. Last change: 2006 Apr 24 by Gustavo Niemeyer ~ diff --git a/runtime/doc/pi_tar.txt b/runtime/doc/pi_tar.txt index c50e0d13fa..582a25d62d 100644 --- a/runtime/doc/pi_tar.txt +++ b/runtime/doc/pi_tar.txt @@ -1,4 +1,4 @@ -*pi_tar.txt* For Vim version 7.2a. Last change: 2008 Jun 12 +*pi_tar.txt* For Vim version 7.2. Last change: 2008 Aug 09 +====================+ | Tar File Interface | @@ -37,12 +37,24 @@ Copyright 2005-2008: The GPL (gnu public license) applies to *tar-copyright* *g:tar_readoptions* "OPxf" used to extract a file from a tarball *g:tar_cmd* "tar" the name of the tar program *g:tar_nomax* 0 if true, file window will not be maximized + *g:tar_secure* undef if exists: + "--" will be used to prevent unwanted + option expansion in tar commands. + Please be sure that your tar command + accepts "--"; Posix compliant tar + utilities do accept it. + if not exists: + The tar plugin will reject any member + files that begin with "-" + Not all tar's support the "--" which is why + it isn't default. *g:tar_writeoptions* "uf" used to update/replace a file ============================================================================== 4. History *tar-history* + v22 Aug 08, 2008 * security fixes v16 Jun 06, 2008 * tarfile:: used instead of tarfile: when editing files inside tarballs. Fixes a problem with tarballs called things like c:\abc.tar. (tnx to Bill McCarthy) diff --git a/runtime/doc/pi_vimball.txt b/runtime/doc/pi_vimball.txt index e31f8a7c3b..143396e01c 100644 --- a/runtime/doc/pi_vimball.txt +++ b/runtime/doc/pi_vimball.txt @@ -1,4 +1,4 @@ -*pi_vimball.txt* For Vim version 7.2a. Last change: 2008 Jun 05 +*pi_vimball.txt* For Vim version 7.2. Last change: 2008 Jul 30 ---------------- Vimball Archiver @@ -164,7 +164,7 @@ Copyright: (c) 2004-2008 by Charles E. Campbell, Jr. *Vimball-copyright* will extract plugin/somefile to the AsNeeded/ directory 17 : Jun 28, 2006 * changes all \s to /s internally for Windows - 16 : Jun 15, 2006 * A. Mechylynck's idea to allow users to specify + 16 : Jun 15, 2006 * A. Mechelynck's idea to allow users to specify installation root paths implemented for UseVimball, MkVimball, and RmVimball. * RmVimball implemented diff --git a/runtime/doc/pi_zip.txt b/runtime/doc/pi_zip.txt index 830d5c6123..5c5cf8631a 100644 --- a/runtime/doc/pi_zip.txt +++ b/runtime/doc/pi_zip.txt @@ -1,4 +1,4 @@ -*pi_zip.txt* For Vim version 7.2a. Last change: 2008 Jun 12 +*pi_zip.txt* For Vim version 7.2. Last change: 2008 Jul 30 +====================+ | Zip File Interface | @@ -70,7 +70,7 @@ Copyright: Copyright (C) 2005-2008 Charles E Campbell, Jr *zip-copyright* au BufReadCmd *.jar,*.xpi call zip#Browse(expand("")) < - One simply can extend this line to accomodate additional extensions that + One can simply extend this line to accommodate additional extensions that should be treated as zip files. ============================================================================== diff --git a/runtime/doc/print.txt b/runtime/doc/print.txt index cb4de43184..440152decb 100644 --- a/runtime/doc/print.txt +++ b/runtime/doc/print.txt @@ -1,4 +1,4 @@ -*print.txt* For Vim version 7.2a. Last change: 2008 Apr 30 +*print.txt* For Vim version 7.2. Last change: 2008 Apr 30 VIM REFERENCE MANUAL by Bram Moolenaar diff --git a/runtime/doc/quickfix.txt b/runtime/doc/quickfix.txt index 26e2e7e881..6734170e53 100644 --- a/runtime/doc/quickfix.txt +++ b/runtime/doc/quickfix.txt @@ -1,4 +1,4 @@ -*quickfix.txt* For Vim version 7.2a. Last change: 2008 Mar 14 +*quickfix.txt* For Vim version 7.2. Last change: 2008 Mar 14 VIM REFERENCE MANUAL by Bram Moolenaar diff --git a/runtime/doc/quickref.txt b/runtime/doc/quickref.txt index 2a6069c432..ae52825828 100644 --- a/runtime/doc/quickref.txt +++ b/runtime/doc/quickref.txt @@ -1,4 +1,4 @@ -*quickref.txt* For Vim version 7.2a. Last change: 2008 Jan 22 +*quickref.txt* For Vim version 7.2. Last change: 2008 Jan 22 VIM REFERENCE MANUAL by Bram Moolenaar diff --git a/runtime/doc/quotes.txt b/runtime/doc/quotes.txt index 07b2126164..98d4357426 100644 --- a/runtime/doc/quotes.txt +++ b/runtime/doc/quotes.txt @@ -1,4 +1,4 @@ -*quotes.txt* For Vim version 7.2a. Last change: 2006 Apr 24 +*quotes.txt* For Vim version 7.2. Last change: 2006 Apr 24 VIM REFERENCE MANUAL by Bram Moolenaar diff --git a/runtime/doc/recover.txt b/runtime/doc/recover.txt index 578c8011d6..b82ea670a6 100644 --- a/runtime/doc/recover.txt +++ b/runtime/doc/recover.txt @@ -1,4 +1,4 @@ -*recover.txt* For Vim version 7.2a. Last change: 2006 Apr 24 +*recover.txt* For Vim version 7.2. Last change: 2006 Apr 24 VIM REFERENCE MANUAL by Bram Moolenaar diff --git a/runtime/doc/remote.txt b/runtime/doc/remote.txt index da50edaf82..2dac63e1aa 100644 --- a/runtime/doc/remote.txt +++ b/runtime/doc/remote.txt @@ -1,4 +1,4 @@ -*remote.txt* For Vim version 7.2a. Last change: 2008 May 24 +*remote.txt* For Vim version 7.2. Last change: 2008 May 24 VIM REFERENCE MANUAL by Bram Moolenaar diff --git a/runtime/doc/repeat.txt b/runtime/doc/repeat.txt index 38a485753d..7dbd49455e 100644 --- a/runtime/doc/repeat.txt +++ b/runtime/doc/repeat.txt @@ -1,4 +1,4 @@ -*repeat.txt* For Vim version 7.2a. Last change: 2007 Aug 12 +*repeat.txt* For Vim version 7.2. Last change: 2007 Aug 12 VIM REFERENCE MANUAL by Bram Moolenaar diff --git a/runtime/doc/rileft.txt b/runtime/doc/rileft.txt index d270740e22..e0093ab135 100644 --- a/runtime/doc/rileft.txt +++ b/runtime/doc/rileft.txt @@ -1,4 +1,4 @@ -*rileft.txt* For Vim version 7.2a. Last change: 2006 Apr 24 +*rileft.txt* For Vim version 7.2. Last change: 2006 Apr 24 VIM REFERENCE MANUAL by Avner Lottem diff --git a/runtime/doc/russian.txt b/runtime/doc/russian.txt index dabca4289f..b49a920a32 100644 --- a/runtime/doc/russian.txt +++ b/runtime/doc/russian.txt @@ -1,4 +1,4 @@ -*russian.txt* For Vim version 7.2a. Last change: 2006 Apr 24 +*russian.txt* For Vim version 7.2. Last change: 2006 Apr 24 VIM REFERENCE MANUAL by Vassily Ragosin diff --git a/runtime/doc/scroll.txt b/runtime/doc/scroll.txt index 91fc4c8fe7..33168d03c9 100644 --- a/runtime/doc/scroll.txt +++ b/runtime/doc/scroll.txt @@ -1,4 +1,4 @@ -*scroll.txt* For Vim version 7.2a. Last change: 2006 Aug 27 +*scroll.txt* For Vim version 7.2. Last change: 2006 Aug 27 VIM REFERENCE MANUAL by Bram Moolenaar diff --git a/runtime/doc/sign.txt b/runtime/doc/sign.txt index 5434279ec8..8e08ed57fa 100644 --- a/runtime/doc/sign.txt +++ b/runtime/doc/sign.txt @@ -1,4 +1,4 @@ -*sign.txt* For Vim version 7.2a. Last change: 2006 Apr 24 +*sign.txt* For Vim version 7.2. Last change: 2006 Apr 24 VIM REFERENCE MANUAL by Gordon Prieur diff --git a/runtime/doc/spell.txt b/runtime/doc/spell.txt index e6c40c83aa..d1e478e9a5 100644 --- a/runtime/doc/spell.txt +++ b/runtime/doc/spell.txt @@ -1,4 +1,4 @@ -*spell.txt* For Vim version 7.2a. Last change: 2008 Jun 21 +*spell.txt* For Vim version 7.2. Last change: 2008 Jun 21 VIM REFERENCE MANUAL by Bram Moolenaar diff --git a/runtime/doc/sponsor.txt b/runtime/doc/sponsor.txt index ac25f49f11..07d8804f57 100644 --- a/runtime/doc/sponsor.txt +++ b/runtime/doc/sponsor.txt @@ -1,4 +1,4 @@ -*sponsor.txt* For Vim version 7.2a. Last change: 2008 Jun 21 +*sponsor.txt* For Vim version 7.2. Last change: 2008 Jun 21 VIM REFERENCE MANUAL by Bram Moolenaar diff --git a/runtime/doc/starting.txt b/runtime/doc/starting.txt index 03ac89fca6..9d461d6c45 100644 --- a/runtime/doc/starting.txt +++ b/runtime/doc/starting.txt @@ -1,4 +1,4 @@ -*starting.txt* For Vim version 7.2a. Last change: 2008 Jun 21 +*starting.txt* For Vim version 7.2. Last change: 2008 Jun 21 VIM REFERENCE MANUAL by Bram Moolenaar diff --git a/runtime/doc/syntax.txt b/runtime/doc/syntax.txt index a4f66b0c46..0f6a2bef87 100644 --- a/runtime/doc/syntax.txt +++ b/runtime/doc/syntax.txt @@ -1,4 +1,4 @@ -*syntax.txt* For Vim version 7.2a. Last change: 2008 Jun 21 +*syntax.txt* For Vim version 7.2. Last change: 2008 Jul 22 VIM REFERENCE MANUAL by Bram Moolenaar @@ -852,8 +852,8 @@ If this variable is undefined or zero, btm syntax is selected. DOXYGEN *doxygen.vim* *doxygen-syntax* Doxygen generates code documentation using a special documentation format -(similar to Javadoc). This syntax script adds doxygen highlighting to c, cpp -and idl files, and should also work with java. +(similar to Javadoc). This syntax script adds doxygen highlighting to c, cpp, +idl and php files, and should also work with java. There are a few of ways to turn on doxygen formatting. It can be done explicitly or in a modeline by appending '.doxygen' to the syntax of the file. diff --git a/runtime/doc/tabpage.txt b/runtime/doc/tabpage.txt index 6410b117b8..0b64003a05 100644 --- a/runtime/doc/tabpage.txt +++ b/runtime/doc/tabpage.txt @@ -1,4 +1,4 @@ -*tabpage.txt* For Vim version 7.2a. Last change: 2007 Mar 11 +*tabpage.txt* For Vim version 7.2. Last change: 2007 Mar 11 VIM REFERENCE MANUAL by Bram Moolenaar diff --git a/runtime/doc/tags b/runtime/doc/tags index 4f94fe53e9..cf872e7a03 100644 --- a/runtime/doc/tags +++ b/runtime/doc/tags @@ -4615,6 +4615,7 @@ a{ motion.txt /*a{* a} motion.txt /*a}* b motion.txt /*b* b:changedtick-variable eval.txt /*b:changedtick-variable* +b:changelog_name filetype.txt /*b:changelog_name* b:current_syntax-variable syntax.txt /*b:current_syntax-variable* b:netrw_lastfile pi_netrw.txt /*b:netrw_lastfile* b:var eval.txt /*b:var* @@ -5078,6 +5079,7 @@ diff-patchexpr diff.txt /*diff-patchexpr* diff.txt diff.txt /*diff.txt* diff_filler() eval.txt /*diff_filler()* diff_hlID() eval.txt /*diff_hlID()* +digraph digraph.txt /*digraph* digraph-arg change.txt /*digraph-arg* digraph-encoding digraph.txt /*digraph-encoding* digraph-table digraph.txt /*digraph-table* @@ -5329,6 +5331,8 @@ fixed-6.4 version6.txt /*fixed-6.4* fixed-7.1 version7.txt /*fixed-7.1* fixed-7.2 version7.txt /*fixed-7.2* flexwiki.vim syntax.txt /*flexwiki.vim* +float-e eval.txt /*float-e* +float-pi eval.txt /*float-pi* float2nr() eval.txt /*float2nr()* floating-point-format eval.txt /*floating-point-format* floating-point-precision eval.txt /*floating-point-precision* @@ -5460,6 +5464,7 @@ ft-papp-syntax syntax.txt /*ft-papp-syntax* ft-pascal-syntax syntax.txt /*ft-pascal-syntax* ft-pdf-plugin filetype.txt /*ft-pdf-plugin* ft-perl-syntax syntax.txt /*ft-perl-syntax* +ft-php-indent indent.txt /*ft-php-indent* ft-php-omni insert.txt /*ft-php-omni* ft-php-syntax syntax.txt /*ft-php-syntax* ft-php3-syntax syntax.txt /*ft-php3-syntax* @@ -5583,8 +5588,8 @@ g:netrw_alto pi_netrw.txt /*g:netrw_alto* g:netrw_altv pi_netrw.txt /*g:netrw_altv* g:netrw_browse_split pi_netrw.txt /*g:netrw_browse_split* g:netrw_browsex_viewer pi_netrw.txt /*g:netrw_browsex_viewer* -g:netrw_cd_escape pi_netrw.txt /*g:netrw_cd_escape* g:netrw_compress pi_netrw.txt /*g:netrw_compress* +g:netrw_ctags pi_netrw.txt /*g:netrw_ctags* g:netrw_cygwin pi_netrw.txt /*g:netrw_cygwin* g:netrw_dav_cmd pi_netrw.txt /*g:netrw_dav_cmd* g:netrw_decompress pi_netrw.txt /*g:netrw_decompress* @@ -5625,10 +5630,10 @@ g:netrw_rsync_cmd pi_netrw.txt /*g:netrw_rsync_cmd* g:netrw_scp_cmd pi_netrw.txt /*g:netrw_scp_cmd* g:netrw_scpport pi_netrw.txt /*g:netrw_scpport* g:netrw_sftp_cmd pi_netrw.txt /*g:netrw_sftp_cmd* -g:netrw_shq pi_netrw.txt /*g:netrw_shq* g:netrw_silent pi_netrw.txt /*g:netrw_silent* g:netrw_sort_by pi_netrw.txt /*g:netrw_sort_by* g:netrw_sort_direction pi_netrw.txt /*g:netrw_sort_direction* +g:netrw_sort_options pi_netrw.txt /*g:netrw_sort_options* g:netrw_sort_sequence pi_netrw.txt /*g:netrw_sort_sequence* g:netrw_special_syntax pi_netrw.txt /*g:netrw_special_syntax* g:netrw_ssh_browse_reject pi_netrw.txt /*g:netrw_ssh_browse_reject* @@ -5647,6 +5652,7 @@ g:tar_browseoptions pi_tar.txt /*g:tar_browseoptions* g:tar_cmd pi_tar.txt /*g:tar_cmd* g:tar_nomax pi_tar.txt /*g:tar_nomax* g:tar_readoptions pi_tar.txt /*g:tar_readoptions* +g:tar_secure pi_tar.txt /*g:tar_secure* g:tar_writeoptions pi_tar.txt /*g:tar_writeoptions* g:var eval.txt /*g:var* g:vimball_home pi_vimball.txt /*g:vimball_home* @@ -6475,6 +6481,7 @@ netbeans-support netbeans.txt /*netbeans-support* netbeans.txt netbeans.txt /*netbeans.txt* netreadfixup pi_netrw.txt /*netreadfixup* netrw pi_netrw.txt /*netrw* +netrw-% pi_netrw.txt /*netrw-%* netrw-- pi_netrw.txt /*netrw--* netrw-D pi_netrw.txt /*netrw-D* netrw-O pi_netrw.txt /*netrw-O* @@ -6707,6 +6714,7 @@ nice todo.txt /*nice* no-eval-feature eval.txt /*no-eval-feature* no_buffers_menu gui.txt /*no_buffers_menu* non-greedy pattern.txt /*non-greedy* +non-zero-arg eval.txt /*non-zero-arg* normal-index index.txt /*normal-index* not-compatible usr_01.txt /*not-compatible* not-edited editing.txt /*not-edited* @@ -6812,6 +6820,9 @@ pfn-option print.txt /*pfn-option* pheader-option print.txt /*pheader-option* photon-fonts os_qnx.txt /*photon-fonts* photon-gui os_qnx.txt /*photon-gui* +php-comment indent.txt /*php-comment* +php-indent indent.txt /*php-indent* +php-indenting indent.txt /*php-indenting* php.vim syntax.txt /*php.vim* php3.vim syntax.txt /*php3.vim* phtml.vim syntax.txt /*phtml.vim* diff --git a/runtime/doc/tagsrch.txt b/runtime/doc/tagsrch.txt index 46dc18e913..1267fb1536 100644 --- a/runtime/doc/tagsrch.txt +++ b/runtime/doc/tagsrch.txt @@ -1,4 +1,4 @@ -*tagsrch.txt* For Vim version 7.2a. Last change: 2006 Apr 24 +*tagsrch.txt* For Vim version 7.2. Last change: 2006 Apr 24 VIM REFERENCE MANUAL by Bram Moolenaar diff --git a/runtime/doc/term.txt b/runtime/doc/term.txt index 55a9ae100c..3df065653e 100644 --- a/runtime/doc/term.txt +++ b/runtime/doc/term.txt @@ -1,4 +1,4 @@ -*term.txt* For Vim version 7.2a. Last change: 2008 Jun 21 +*term.txt* For Vim version 7.2. Last change: 2008 Jun 21 VIM REFERENCE MANUAL by Bram Moolenaar diff --git a/runtime/doc/tips.txt b/runtime/doc/tips.txt index 0bdcfa077c..5f83ec50ac 100644 --- a/runtime/doc/tips.txt +++ b/runtime/doc/tips.txt @@ -1,4 +1,4 @@ -*tips.txt* For Vim version 7.2a. Last change: 2006 Jul 24 +*tips.txt* For Vim version 7.2. Last change: 2006 Jul 24 VIM REFERENCE MANUAL by Bram Moolenaar diff --git a/runtime/doc/todo.txt b/runtime/doc/todo.txt index b606968978..81492c0f1a 100644 --- a/runtime/doc/todo.txt +++ b/runtime/doc/todo.txt @@ -1,4 +1,4 @@ -*todo.txt* For Vim version 7.2a. Last change: 2008 Jun 24 +*todo.txt* For Vim version 7.2. Last change: 2008 Aug 09 VIM REFERENCE MANUAL by Bram Moolenaar @@ -30,10 +30,23 @@ be worked on, but only if you sponsor Vim development. See |sponsor|. *known-bugs* -------------------- Known bugs and current work ----------------------- +":pedit %" with a BufReadPre autocommand causes the cursor to move to the +first line. (Ingo Karkat, 2008 Jul 1) Ian Kelling is working on this. + Have a look at patch for utf-8 line breaking. (Yongwei Wu, 2008 Mar 1, Mar 23) -Drawing popup menu isn't quite right when there are double-wide characters. -Yukihiro Nakadaira is working on a solution (2008 Jun 22). Use mb_fix_col(). +netrw: dragging status line causes selection of entry. Should check row +number to be below last visible line. + +Runtime files for Clojure. (Toralf Wittner, 2008 Jun 25) + +Patch to add extra argument to glob() and globpath() to ignore 'wildignore'. +(Ingo Karkat, 2008 Jun 25) + +Crash with dragn-n-drop of file combined with netrw (Marius Gedminas, 2008 Jun +11) I can't reproduce it. It's probably caused by a handle_drop() call +in combination with autocommands that invoke a ":redraw" command. +Another valgrind output Jun 30. When reallocating cmdline xp_pattern becomes invalid. Move expand_T xpc into ccline? (Dominique Pelle) @@ -42,22 +55,24 @@ Wildmenu not deleted: "gvim -u NONE", ":set nocp wildmenu cmdheight=3 laststatus=2", CTRL-D CTRL-H CTRL-H CTRL-H. (A.Politz, 2008 April 1) Works OK with Vim in an xterm. -Fix for matchparen HL doesn't work. beep. +When using ":e ++enc=foo file" and the file is already loaded with +'fileencoding' set to "bar", then do_ecmd() uses that buffer, even though the +fileencoding differs. Reload the buffer in this situation? Need to check for +the buffer to be unmodified. +Unfinished patch by Ian Kelling, 2008 Jul 11. Followup Jul 14, need to have +another look at it. -Crash with dragn-n-drop of file combined with netrw (Marius Gedminas, 2008 Jun -11) I can't reproduce it. +Fix for matchparen HL doesn't work. beep. Win32: associating a type with Vim doesn't take care of space after a backslash? (Robert Vibrant, 2008 Jun 5) -":let &g:tw = 44" sets the local option value. (Cyril Slobin, 2008 Apr 25) - After using for command line completion after ":ta blah" and getting E33 (no tags file), further editing the command to e.g., ":echo 'blah'", the -command is not executed. +command is not executed. Fix by Ian Kelling? -When 'bomb' is changed the window title is updated to show/hide a "+", but the -tab page label isn't. (Patrick Texier, 2008 Jun 24) +":help s/~" jumps to *s/\~*, while ":help s/\~" doesn't find anything. (Tim +Chase) Fix by Ian Kelling, 2008 Jul 14. Despite adding save_subexpr() this still doesn't work properly: Regexp: matchlist('12a4aaa', '^\(.\{-}\)\(\%5c\@<=a\+\)\(.\+\)\?') @@ -65,14 +80,14 @@ Returns ['12a4', 'aaa', '4aaa'], should be ['12a4', 'aaa', ''] Backreference not cleared when retrying after \@<= fails? (Brett Stahlman, 2008 March 8) +Patch for 2html.vim to avoid "&nbsp;". (Markus Heidelberg, 2008 Jul 19) + Win32: remote editing fails when the current directory name contains "[". (Ivan Tishchenko, Liu Yubao) Suggested patch by Chris Lubinski: Avoid escaping characters where the backslash is not removed later. Asked Chris for an alternate solution, also for src/ex_getln.c. - -When adding path to 'tags' with a wildcard, it appears only a first match is -used. (Erik Falor, 2008 April 18) Or is it that a wildcard in the file name -is not supported, only in the path? +This also fails when the file or directory name contains "%". (Thoml, 2008 +July 7) The str2special() function doesn't handle multi-byte characters properly. Patch from Vladimir Vichniakov, 2007 Apr 24. @@ -102,14 +117,15 @@ line doesn't fit. (Dasn, 2008 May 1) GUI: In Normal mode can't yank the modeless selection. Make "gy" do this? Works like CTRL-Y in Command line mode. -Mac: patch for mouse wheel scroll under Leopard. (Eckehard Berns, 2007 Dec 7) - Mac: After a ":vsplit" the left scrollbar doesn't appear until 'columns' is changed or the window is resized. Mac: Patch for configure: remove arch from ruby link args. (Knezevic, 2008 Mar 5) Alternative: Kazuki Sakamoto, Mar 7. +Mac: trouble compiling with Motif, requires --disable-darwin. (Raf, 2008 Aug +1) Reply by Ben Schmidt. + ":emenu" works with the translated menu name. Should also work with the untranslated name. Would need to store both the English and the translated name. Patch by Bjorn Winckler, 2008 Mar 30. @@ -124,8 +140,6 @@ Await response to question to make the register writable. Problem with 'ts' set to 9 and 'showbreak' to ">>>". (Matthew Winn, 2007 Oct 1) -"vim -O aa aa" gives only one window. (Zdenek Sekera, 2008 Apr 16) - Including NFA regexp code: Use "\%#= to set the engine: 0 = automatic, 1 = backtracking, 2 = new. Useful in tests. @@ -157,6 +171,10 @@ New PHP syntax file, use it? (Peter Hodge) 'foldcolumn' in modeline applied to wrong window when using a session. (Teemu Likonen, March 19) +The documentation mentions the priority for ":2match" and ":3match", but it +appears the last one wins. (John Beckett, 2008 Jul 22) Caused by adding +matchadd()? Suggested patch by John, 2008 Jul 24. + Replace ccomplete.vim by cppcomplete.vim from www.vim.org? script 1520 by Vissale Neang. (Martin Stubenschrott) Asked Vissale to make the scripts more friendly for the Vim distribution. @@ -167,11 +185,9 @@ Asked about latest version: 0.77.1 is on www.vim.org. More AmigaOS4 patches. (Peter Bengtsson, Nov 9) -globpath() doesn't work as expected. The example shows using 'path', but the -"**8" form and upwards search are not supported. - -Error when cancelling completion menu and auto-formatting. (Tim Weber, 2008 -Apr 17) +Insert mode completion: When editing the text and pressing CTRL-N again goes +back to originally completed text, edited text is gone. (Peng Yu, 2008 Jul 24) +Suggestion by Ben Schmidt, 2008 Aug 6. Problem with compound words? (Bert, 2008 May 6) No warning for when flags are defined after they are used in an affix. @@ -195,6 +211,9 @@ popup menu over it, first draw the new popup menu, remember its position and size and then redraw the text, skipping the characters under the popup menu. This should avoid flicker. Other solution by A.Politz, 2007 Aug 22. +When the popup menu is close to the edge of the window it is truncated. Patch +to anchor the popup menu in a different way. (James Vega, 2008 Jul 30) + Spell checking: Add a way to specify punctuation characters. Add the superscript numbers by default: 0x2070, 0xb9, 0xb2, 0xb3, 0x2074 - 0x2079. @@ -202,9 +221,15 @@ Windows 98: pasting from the clipboard with text from another application has a trailing NUL. (Joachim Hofmann) Perhaps the length specified for CF_TEXT isn't right? -Completion: Scanning for tags doesn't check for typed key now and then? -Hangs for about 5 seconds. Appears to be caused by finding include files with -"foo/**" in 'path'. (Kalisiak, 2006 July 15) +Command line completion: Scanning for tags doesn't check for typed key now and +then? Hangs for about 5 seconds. Appears to be caused by finding include +files with "foo/**" in 'path'. (Kalisiak, 2006 July 15) +Additional info: When using the |wildcards| ** globing, vim hangs +indefinitely on lots of directories. The |file-searching| globing, like in +":set path=/**" does not hang as often as with globing with |wildcards|, like +in ":1find /**/file". This is for a files that unix "find" can find very +quick. Merging the 2 kinds of globing might make this an easier fix. (Ian +Kelling, 2008 July 4) When the file name has parenthesis, e.g., "foo (bar).txt", ":!ls '%'" has the parenthesis escaped but not the space. That's inconsistent. Either escape @@ -230,7 +255,7 @@ go to Insert mode and add a few lines. Then backspacing every other time moves the cursor instead of deleting. (Chris Kaiser, 2007 Sep 25) Redraw problem when appending digraph causes line to wrap. (James Vega, 2007 -Sep 18) +Sep 18) Patch by Ian Kelling, 2008 Aug 8. Changes for Win32 makefile. (Mike Williams, 2007 Jan 22, Alexei Alexandrov, 2007 Feb 8) @@ -243,6 +268,9 @@ Win32: Patch for convert_filterW(). (Taro Muraoka, 2007 Mar 2) Win32: Patch for cscope external command. (Mike Williams, 2007 Aug 7) +":cscope find f filename" doesn't work because of the extra space. (Ethan +Mallove) + Win32: XPM support only works with path without spaces. Patch by Mathias Michaelis, 2006 Jun 9. Another patch for more path names, 2006 May 31. New version: http://members.tcnet.ch/michaelis/vim/patches.zip (also for other @@ -262,7 +290,10 @@ Win32: after "[I" showing matches, scroll wheel messes up screen. (Tsakiridis, Patch by Alex Dobrynin, 2007 Jun 3. Also fixes other scroll wheel problems. Win32: using CTRL-S in Insert mode doesn't remove the "+" from the tab pages -label. (Tsakiridis, 2007 Feb 18) +label. (Tsakiridis, 2007 Feb 18) Patch from Ian Kelling, 2008 Aug 6. + +When 'bomb' is changed the window title is updated to show/hide a "+", but the +tab page label isn't. (Patrick Texier, 2008 Jun 24) Win32: using "gvim --remote-tab-silent fname" sometimes gives an empty screen with the more prompt. Caused by setting the guitablabel? (Thomas Michael @@ -276,6 +307,10 @@ pointer in long and seek offset in 64 bit var. Win32: patch for fullscreen mode. (Liushaolin, 2008 April 17) +When file b is a link to file a and editing b twice you get the correct +warning for existing swap file, but when trying to recover it doesn't find the +swapfile. (Matt Wozniski, 2008 Aug 5) + Pressing the 'pastetoggle' key doesn't update the statusline. (Jan Christoph Ebersbach, 2008 Feb 1) @@ -309,7 +344,7 @@ C++ indenting wrong with "=". (James Kanze, 2007 Jan 26) ":lockvar" should use copyID to avoid endless loop. When using --remote-silent and the file name matches 'wildignore' get an E479 -error. without --remoete-silent it works fine. (Ben Fritz, 2008 Jun 20) +error. without --remote-silent it works fine. (Ben Fritz, 2008 Jun 20) Gvim: dialog for closing Vim should check if Vim is busy writing a file. Then use a different dialog: "busy saving, really quit? yes / no". @@ -317,6 +352,8 @@ use a different dialog: "busy saving, really quit? yes / no". Check other interfaces for changing curbuf in a wrong way. Patch like for if_ruby.c. +Problem with cursorcolumn highlighting and folds. (John Mullin, 2008 Jul 18) + Spell checking in popup menu: If the only problem is the case of the first character, don't offer "ignore" and "add to word list". @@ -332,7 +369,7 @@ name literally, and esp. if there is only one name. Test 61 fails sometimes. This is a timing problem: "sleep 2" sometimes takes longer than 2 seconds. -Changing 'guifont' in the console causes an uneccessary redraw. +Changing 'guifont' in the console causes an unnecessary redraw. "vim -C" often has 'nocompatible', because it's set in some startup script. Set 'compatible' after startup is done? Patch by James Vega, 2008 Feb 7. @@ -368,7 +405,7 @@ Windows installer could add a "open in new tab of existing Vim" menu entry. Gvimext: patch to add "Edit with single Vim &tabbed" menu entry. Just have two choices, always using one Vim and selecting between using an argument list or opening each file in a separate tab. -(Erik Falor, 2008 May 21) +(Erik Falor, 2008 May 21, 2008 Jun 26) GUI: When combining fg en bg make sure they are not equal. @@ -377,12 +414,19 @@ Jun 5) Mac: Using gvim: netrw window disappears. (Nick Lo, 2006 Jun 21) +When 'ff' is "mac" then "ga" on a ^J shows 0x0d instead of 0x0a. Compare with +using "ga" on a NUL when 'ff' is "unix". (Andy Wokula, 2008 Jul 16) + Add an option to specify the character to use when a double-width character is moved to the next line. Default '>', set to a space to blank it out. Check that char is single width when it's set (compare with 'listchars'). The generated vim.bat can avoid the loop for NT. (Carl Zmola, 2006 Sep 3) +In a C file with spell checking, in "% integer" "nteger" is seen as an error, +but "]s" doesn't find it. "nteger" by itself is found. (Ralf Wildenhues, 2008 +Jul 22) + Session file creation: 'autochdir' causes trouble. Keep it off until after loading all files. @@ -439,7 +483,7 @@ show more text of the completions. Shorten the items that don't fit in the middle? When running inside screen it's possible to kill the X server and restart it -(using pty's the program can keep on running). Vim dies because it looses the +(using pty's the program can keep on running). Vim dies because it loses the connection to the X server. Can Vim simply quit using the X server instead of dying? Also relevant when running in a console. @@ -459,9 +503,6 @@ Campbell 2006 Jul 06. Syntax HL error caused by "containedin". (Peter Hodge, 2006 Oct 6) -":help s/~" jumps to *s/\~*, while ":help s/\~" doesn't find anything. (Tim -Chase) - A custom completion function in a ":command" cannot be a Funcref. (Andy Wokula, 2007 Aug 25) @@ -483,10 +524,6 @@ number. (Tony Mechelynck, 2007 Feb 6) GTK: when using the -geom argument with an offset from the right edge and the size is smaller than the default, the Vim window is not positioned properly. -GTK: when editing a directory with the netrw plugin in a terminal and doing -":gui" Vim hangs in obtaining the selection. Workaround patch 7.1.209 is a -hack (timeout after 3 seconds). Why don't we get the selection here? - After starting Vim, using '0 to jump somewhere in a file, ":sp" doesn't center the cursor line. It works OK after some other commands. @@ -581,6 +618,9 @@ In gvim the backspace key produces a backspace character, but on Linux the VERASE key is Delete. Set VERASE to Backspace? (patch by Stephane Chazelas, 2007 Oct 16) +When entering a C /* comment, after typing for 70 times the indent +disappears. (Vincent Beffara, 2008 Jul 3) + TermResponse autocommand isn't always triggered when using vimdiff. (Aron Griffis, 2007 Sep 19) @@ -590,7 +630,7 @@ Create a gvimtutor.1 file and change Makefiles to install it. Vim 7.3: -- Add patch for 'relativenumber' option? Markus Heidelberg, 2008 Feb 21 +- Add patch for 'relativenumber' option? Markus Heidelberg, 2008 Jun 27. - Add blowfish encryption. Openssl has an implementation. Also by Paul Kocher (LGPL), close to original. Mohsin also has some ideas. Take four bytes and turn them into unsigned to avoid byte-order problems. @@ -619,6 +659,16 @@ More patches: - gettabvar() and settabvar() functions. (Yegappan Lakshmanan, 2007 Sep 13, 2008 Jun 12) - recognize hex numbers better. (Mark Manning, 2006 Sep 13) +- Add key, to expand an abbreviation in a mapping. (Kana + Natsuno, 2008 Jul 17) +- Add 'wspara' option, also accept blank lines like empty lines for "{" and + "}". (Mark Lundquist, 2008 Jul 18) +- Patch to add CTRL-T to delete part of a path on cmdline. (Adek, 2008 Jul + 21) +- Instead of creating a copy of the tutor in all the shell scripts, do it in + vimtutor.vim. (Jan Minar, 2008 Jul 20) +- When fsync() fails there is no hint about what went wrong. Patch by Ben + Schmidt, 2008 Jul 22. Awaiting updated patches: @@ -671,6 +721,8 @@ Awaiting updated patches: Search in 'runtimepath'? More docs needed about how to use this. How to get the messages into the .po files? + charlen() Like strlen() but counting characters instead of + bytes. confirm() add "flags" argument, with 'v' for vertical layout and 'c' for console dialog. (Haegg) Flemming Madsen has a patch for the 'c' flag @@ -1189,15 +1241,12 @@ Macintosh: 9 For Turkish vim_tolower() and vim_toupper() also need to use utf_ functions for characters below 0x80. (Sertacyildiz) 9 When the last edited file is a help file, using '0 in a new Vim doesn't - edit the file as a help file. + edit the file as a help file. 'filetype' is OK, but 'iskeyword' isn't, + file isn't readonly, etc. 8 When an ":edit" is inside a try command and the ATTENTION prompt is used, the :catch commands are always executed, also when the file is edited normally. Should reset did_emsg and undo side effects. Also make sure the ATTENTION message shows up. Servatius Brandt works on this. -9 When using ":e ++enc=foo file" and the file is already loaded with - 'fileencoding' set to "bar", then do_ecmd() uses that buffer, even though - the fileencoding differs. Reload the buffer in this situation? Need to - check for the buffer to be unmodified. 8 ":g//" gives "Pattern not found error" with E486. Should not use the error number, it's not a regular error message. 7 Vimtutor leaves escape sequence in terminal. This is the xterm response to @@ -1296,15 +1345,13 @@ Macintosh: 9 When editing a file with 'readonly' set, there is no check for an existing 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. + one. Unfinished patch by Ian Kelling, 2008 July 14. 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 'mousefocus' is set and switching to another window with a typed command, the mouse pointer may be moved to a part of the window that's covered by another window and we lose focus. Only move in the y direction, not horizontally? -8 When using CTRL-D after ":help", restrict the number of matches to a - thousand, otherwise using CTRL-D without an argument takes too long. 8 ":hardcopy": - Using the cterm_color[] table is wrong when t_colors is > 16. - Need to handle unprintable characters. @@ -1468,6 +1515,13 @@ Problems that will (probably) not be solved: - GTK: when using the popup menu with spelling suggestions and releasing the right mouse button before the menu appears selecting an item with the right mouse button has no effect. GTK does not produce an event for this. +- GTK 2: Cannot use the file selector. When using it many things become + slow. This is caused by some code in GTK that writes + ~/.recently-used.xbel every time an event is handled. It assumes the main + loop is never quit, which is a wrong assumption. Also, it overwrites the + file with different file permissions, which is a privacy issue. This + needs to be fixed in GTK. A solution in Vim would be really complicated. + (2008 Jul 31) - xterm title: The following scenario may occur (esp. when running the Vim test script): Vim 1 sets the title to "file1", then restores the title to "xterm" with an ESC sequence when exiting. Vim 2 obtains the old title @@ -1703,6 +1757,10 @@ Tab pages: Spell checking: +- have some way not to give spelling errors for a range of characters. + E.g. for Chinese and other languages with specific characters for which we + don't have a spell file. Useful when there is also text in other + languages in the file. - Support more regions? Caolan McNamara argues it's needed for es_XX. https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=219777 - Unicode defines another quote character: 0x2019. Use it as an equivalent @@ -1727,7 +1785,7 @@ Spell checking: WFP_COMPPERMIT and WFP_COMPFORBID 8 implement use of in .spl file: implement CHECKCOMPOUNDREP: when a compound word seems to be OK apply REP - items and theck if the result is a valid word. + items and check if the result is a valid word. implement CHECKCOMPOUNDDUP implement CHECKCOMPOUNDTRIPLE Add CHECKCOMPOUNDCASE: when compounding make leading capital lower case. @@ -2251,8 +2309,12 @@ Robustness: Performance: -7 For strings up to 3 bytes don't allocate memory, use v_list itself as a - character array. Use VAR_SSTRING (short string). +7 For string variables up to 3 bytes don't allocate memory, use v_list + itself as a character array. Use VAR_SSTRING (short string). +8 move_lines() copies every line into allocated memory, making reloading a + buffer a lot slower than re-editing the file. Can the memline be locked + so that we don't need to make a copy? Or avoid invoking ml_updatechunk(), + that is taking a lot of time. (Ralf Wildenhues, 2008 Jul 7) 8 Instead of loading rgb.txt every time a color wasn't recognized load it once and keep it in memory. Move the code to a common place to avoid repeating it in various system files. @@ -2471,6 +2533,11 @@ Tags: match. Remove tag_fname from the match and combine it with the fname in the match (without expanding or other things that take time). When 'tagrelative' is off tag_fname isn't needed at all. +8 For 'tags' wildcard in the file name is not supported, only in the path. + This is due to it using |file-searching|. Suboptimal solution would be to + make the filename or the whole option use |wildcards| globing, better + would be to merge the 2 kinds of globing. originall (Erik Falor, 2008 + April 18), updated (Ian Kelling, 2008 July 4) 8 Use a mechanism similar to omni completion to figure out the kind of tab for CTRL-] and jump to the appropriate matching tag (if there are several). @@ -2724,6 +2791,8 @@ Autocommands: Omni completion: +- Add a flag to 'complete' to be able to do omni completion with CTRL-N (and + mix it with other kinds of completion). - Ideas from the Vim 7 BOF at SANE: - For interpreted languages, use the interpreter to obtain information. Should work for Java (Eclipse does this), Python, Tcl, etc. @@ -2755,6 +2824,9 @@ Insert mode completion/expansion: - GUI implementation of the popup menu. 7 When searching in other files the name flash by, too fast to read. Only display a name every second or so, like with ":vimgrep". +7 When expanding file names with an environment variable, add the match with + the unexpanded var. So $HOME/tm expands to "/home/guy/tmp" and + "$HOME/tmp" 8 When there is no word before the cursor but something like "sys." complete with "sys.". Works well for C and similar languages. 9 ^X^L completion doesn't repeat correctly. It uses the first match with @@ -2903,6 +2975,7 @@ Insert mode: same change, so that "." repeats the whole insert. 7 Use CTRL-G to repeat what follows. Useful for inserting a character multiple times or repeating CTRL-Y. +- Make 'revins' work in Replace mode. 7 Use 'matchpairs' for 'showmatch': When inserting a character check if it appears in the rhs of 'matchpairs'. - In Insert mode (and command line editing?): Allow undo of the last typed @@ -3558,6 +3631,8 @@ Multiple Windows: 7 Use CTRL-W , like alt-tab, to switch between buffers. Repeat to select another buffer (only loaded ones?), to go back, to select buffer, to go back to original buffer. +7 Make it possible to edit a new buffer in the preview window. A script can + then fill it with something. ":popen"? 7 Add a 'tool' window: behaves like a preview window but there can be several. Don't count it in only_one_window(). (Alexei Alexandrov) 6 Add an option to resize the shell when splitting and/or closing a window. diff --git a/runtime/doc/uganda.txt b/runtime/doc/uganda.txt index 4842769d5b..8f684e8354 100644 --- a/runtime/doc/uganda.txt +++ b/runtime/doc/uganda.txt @@ -1,4 +1,4 @@ -*uganda.txt* For Vim version 7.2a. Last change: 2008 Jun 21 +*uganda.txt* For Vim version 7.2. Last change: 2008 Jun 21 VIM REFERENCE MANUAL by Bram Moolenaar diff --git a/runtime/doc/undo.txt b/runtime/doc/undo.txt index 33d4e3178e..c50e6390c5 100644 --- a/runtime/doc/undo.txt +++ b/runtime/doc/undo.txt @@ -1,4 +1,4 @@ -*undo.txt* For Vim version 7.2a. Last change: 2006 Apr 30 +*undo.txt* For Vim version 7.2. Last change: 2006 Apr 30 VIM REFERENCE MANUAL by Bram Moolenaar diff --git a/runtime/doc/usr_01.txt b/runtime/doc/usr_01.txt index 1e00a110c0..17fb6b05b1 100644 --- a/runtime/doc/usr_01.txt +++ b/runtime/doc/usr_01.txt @@ -1,4 +1,4 @@ -*usr_01.txt* For Vim version 7.2a. Last change: 2008 May 07 +*usr_01.txt* For Vim version 7.2. Last change: 2008 May 07 VIM USER MANUAL - by Bram Moolenaar diff --git a/runtime/doc/usr_02.txt b/runtime/doc/usr_02.txt index 44907b0e2d..9124c5cad2 100644 --- a/runtime/doc/usr_02.txt +++ b/runtime/doc/usr_02.txt @@ -1,4 +1,4 @@ -*usr_02.txt* For Vim version 7.2a. Last change: 2007 Feb 28 +*usr_02.txt* For Vim version 7.2. Last change: 2007 Feb 28 VIM USER MANUAL - by Bram Moolenaar diff --git a/runtime/doc/usr_03.txt b/runtime/doc/usr_03.txt index c5f114c9ce..30a6eea7aa 100644 --- a/runtime/doc/usr_03.txt +++ b/runtime/doc/usr_03.txt @@ -1,4 +1,4 @@ -*usr_03.txt* For Vim version 7.2a. Last change: 2006 Jun 21 +*usr_03.txt* For Vim version 7.2. Last change: 2006 Jun 21 VIM USER MANUAL - by Bram Moolenaar diff --git a/runtime/doc/usr_04.txt b/runtime/doc/usr_04.txt index b8f9c4ddbd..d1af10d63e 100644 --- a/runtime/doc/usr_04.txt +++ b/runtime/doc/usr_04.txt @@ -1,4 +1,4 @@ -*usr_04.txt* For Vim version 7.2a. Last change: 2006 Jun 21 +*usr_04.txt* For Vim version 7.2. Last change: 2006 Jun 21 VIM USER MANUAL - by Bram Moolenaar diff --git a/runtime/doc/usr_05.txt b/runtime/doc/usr_05.txt index bfa3926dec..0bac988d7b 100644 --- a/runtime/doc/usr_05.txt +++ b/runtime/doc/usr_05.txt @@ -1,4 +1,4 @@ -*usr_05.txt* For Vim version 7.2a. Last change: 2007 May 11 +*usr_05.txt* For Vim version 7.2. Last change: 2007 May 11 VIM USER MANUAL - by Bram Moolenaar diff --git a/runtime/doc/usr_06.txt b/runtime/doc/usr_06.txt index 626af3d009..a339129812 100644 --- a/runtime/doc/usr_06.txt +++ b/runtime/doc/usr_06.txt @@ -1,4 +1,4 @@ -*usr_06.txt* For Vim version 7.2a. Last change: 2006 Apr 24 +*usr_06.txt* For Vim version 7.2. Last change: 2006 Apr 24 VIM USER MANUAL - by Bram Moolenaar diff --git a/runtime/doc/usr_07.txt b/runtime/doc/usr_07.txt index 86a46ecade..0b51400045 100644 --- a/runtime/doc/usr_07.txt +++ b/runtime/doc/usr_07.txt @@ -1,4 +1,4 @@ -*usr_07.txt* For Vim version 7.2a. Last change: 2006 Apr 24 +*usr_07.txt* For Vim version 7.2. Last change: 2006 Apr 24 VIM USER MANUAL - by Bram Moolenaar diff --git a/runtime/doc/usr_08.txt b/runtime/doc/usr_08.txt index 144f6cc8d3..5eb6478af3 100644 --- a/runtime/doc/usr_08.txt +++ b/runtime/doc/usr_08.txt @@ -1,4 +1,4 @@ -*usr_08.txt* For Vim version 7.2a. Last change: 2006 Jul 18 +*usr_08.txt* For Vim version 7.2. Last change: 2006 Jul 18 VIM USER MANUAL - by Bram Moolenaar diff --git a/runtime/doc/usr_09.txt b/runtime/doc/usr_09.txt index 69a431c3cc..c68f565f35 100644 --- a/runtime/doc/usr_09.txt +++ b/runtime/doc/usr_09.txt @@ -1,4 +1,4 @@ -*usr_09.txt* For Vim version 7.2a. Last change: 2006 Apr 24 +*usr_09.txt* For Vim version 7.2. Last change: 2006 Apr 24 VIM USER MANUAL - by Bram Moolenaar diff --git a/runtime/doc/usr_10.txt b/runtime/doc/usr_10.txt index 168b089b3e..c1334a5431 100644 --- a/runtime/doc/usr_10.txt +++ b/runtime/doc/usr_10.txt @@ -1,4 +1,4 @@ -*usr_10.txt* For Vim version 7.2a. Last change: 2006 Nov 05 +*usr_10.txt* For Vim version 7.2. Last change: 2006 Nov 05 VIM USER MANUAL - by Bram Moolenaar diff --git a/runtime/doc/usr_11.txt b/runtime/doc/usr_11.txt index edb45981f9..67328846af 100644 --- a/runtime/doc/usr_11.txt +++ b/runtime/doc/usr_11.txt @@ -1,4 +1,4 @@ -*usr_11.txt* For Vim version 7.2a. Last change: 2006 Apr 24 +*usr_11.txt* For Vim version 7.2. Last change: 2006 Apr 24 VIM USER MANUAL - by Bram Moolenaar diff --git a/runtime/doc/usr_12.txt b/runtime/doc/usr_12.txt index 7e2f413d42..43ae89eb9b 100644 --- a/runtime/doc/usr_12.txt +++ b/runtime/doc/usr_12.txt @@ -1,4 +1,4 @@ -*usr_12.txt* For Vim version 7.2a. Last change: 2007 May 11 +*usr_12.txt* For Vim version 7.2. Last change: 2007 May 11 VIM USER MANUAL - by Bram Moolenaar diff --git a/runtime/doc/usr_20.txt b/runtime/doc/usr_20.txt index 84c58f7d0e..1841881869 100644 --- a/runtime/doc/usr_20.txt +++ b/runtime/doc/usr_20.txt @@ -1,4 +1,4 @@ -*usr_20.txt* For Vim version 7.2a. Last change: 2006 Apr 24 +*usr_20.txt* For Vim version 7.2. Last change: 2006 Apr 24 VIM USER MANUAL - by Bram Moolenaar diff --git a/runtime/doc/usr_21.txt b/runtime/doc/usr_21.txt index 3eabb68663..a6e58bebaa 100644 --- a/runtime/doc/usr_21.txt +++ b/runtime/doc/usr_21.txt @@ -1,4 +1,4 @@ -*usr_21.txt* For Vim version 7.2a. Last change: 2007 May 01 +*usr_21.txt* For Vim version 7.2. Last change: 2007 May 01 VIM USER MANUAL - by Bram Moolenaar diff --git a/runtime/doc/usr_22.txt b/runtime/doc/usr_22.txt index 5a13b871e8..45bd2f4aa5 100644 --- a/runtime/doc/usr_22.txt +++ b/runtime/doc/usr_22.txt @@ -1,4 +1,4 @@ -*usr_22.txt* For Vim version 7.2a. Last change: 2007 Aug 14 +*usr_22.txt* For Vim version 7.2. Last change: 2007 Aug 14 VIM USER MANUAL - by Bram Moolenaar diff --git a/runtime/doc/usr_23.txt b/runtime/doc/usr_23.txt index e0aa05dcb0..03367b89c2 100644 --- a/runtime/doc/usr_23.txt +++ b/runtime/doc/usr_23.txt @@ -1,4 +1,4 @@ -*usr_23.txt* For Vim version 7.2a. Last change: 2006 Apr 24 +*usr_23.txt* For Vim version 7.2. Last change: 2006 Apr 24 VIM USER MANUAL - by Bram Moolenaar diff --git a/runtime/doc/usr_24.txt b/runtime/doc/usr_24.txt index 35911bde54..37592a098d 100644 --- a/runtime/doc/usr_24.txt +++ b/runtime/doc/usr_24.txt @@ -1,4 +1,4 @@ -*usr_24.txt* For Vim version 7.2a. Last change: 2006 Jul 23 +*usr_24.txt* For Vim version 7.2. Last change: 2006 Jul 23 VIM USER MANUAL - by Bram Moolenaar diff --git a/runtime/doc/usr_25.txt b/runtime/doc/usr_25.txt index 6337871496..88505da306 100644 --- a/runtime/doc/usr_25.txt +++ b/runtime/doc/usr_25.txt @@ -1,4 +1,4 @@ -*usr_25.txt* For Vim version 7.2a. Last change: 2007 May 11 +*usr_25.txt* For Vim version 7.2. Last change: 2007 May 11 VIM USER MANUAL - by Bram Moolenaar diff --git a/runtime/doc/usr_26.txt b/runtime/doc/usr_26.txt index 0c9f2c8cfb..551875fa60 100644 --- a/runtime/doc/usr_26.txt +++ b/runtime/doc/usr_26.txt @@ -1,4 +1,4 @@ -*usr_26.txt* For Vim version 7.2a. Last change: 2006 Apr 24 +*usr_26.txt* For Vim version 7.2. Last change: 2006 Apr 24 VIM USER MANUAL - by Bram Moolenaar diff --git a/runtime/doc/usr_27.txt b/runtime/doc/usr_27.txt index 71bfdda98d..f06515d1ae 100644 --- a/runtime/doc/usr_27.txt +++ b/runtime/doc/usr_27.txt @@ -1,4 +1,4 @@ -*usr_27.txt* For Vim version 7.2a. Last change: 2007 Nov 10 +*usr_27.txt* For Vim version 7.2. Last change: 2007 Nov 10 VIM USER MANUAL - by Bram Moolenaar diff --git a/runtime/doc/usr_28.txt b/runtime/doc/usr_28.txt index 76644bb674..912f22bca8 100644 --- a/runtime/doc/usr_28.txt +++ b/runtime/doc/usr_28.txt @@ -1,4 +1,4 @@ -*usr_28.txt* For Vim version 7.2a. Last change: 2008 Jun 14 +*usr_28.txt* For Vim version 7.2. Last change: 2008 Jun 14 VIM USER MANUAL - by Bram Moolenaar diff --git a/runtime/doc/usr_29.txt b/runtime/doc/usr_29.txt index a314256c19..82dfaf585c 100644 --- a/runtime/doc/usr_29.txt +++ b/runtime/doc/usr_29.txt @@ -1,4 +1,4 @@ -*usr_29.txt* For Vim version 7.2a. Last change: 2007 Nov 10 +*usr_29.txt* For Vim version 7.2. Last change: 2008 Jun 28 VIM USER MANUAL - by Bram Moolenaar @@ -594,8 +594,8 @@ use this command: > This will go back to the start of the current function and find the first occurrence of the word under the cursor. Actually, it searches backwards to -an empty line above the a "{" in the first column. From there it searches -forward for the identifier. Example (cursor on "idx"): +an empty line above a "{" in the first column. From there it searches forward +for the identifier. Example (cursor on "idx"): int find_entry(char *name) { diff --git a/runtime/doc/usr_30.txt b/runtime/doc/usr_30.txt index 4998511359..00189e9bc6 100644 --- a/runtime/doc/usr_30.txt +++ b/runtime/doc/usr_30.txt @@ -1,4 +1,4 @@ -*usr_30.txt* For Vim version 7.2a. Last change: 2007 Nov 10 +*usr_30.txt* For Vim version 7.2. Last change: 2007 Nov 10 VIM USER MANUAL - by Bram Moolenaar diff --git a/runtime/doc/usr_31.txt b/runtime/doc/usr_31.txt index 941ab68957..ff3dfbcc23 100644 --- a/runtime/doc/usr_31.txt +++ b/runtime/doc/usr_31.txt @@ -1,4 +1,4 @@ -*usr_31.txt* For Vim version 7.2a. Last change: 2007 May 08 +*usr_31.txt* For Vim version 7.2. Last change: 2007 May 08 VIM USER MANUAL - by Bram Moolenaar diff --git a/runtime/doc/usr_32.txt b/runtime/doc/usr_32.txt index ed95a0d158..d0319a0e92 100644 --- a/runtime/doc/usr_32.txt +++ b/runtime/doc/usr_32.txt @@ -1,4 +1,4 @@ -*usr_32.txt* For Vim version 7.2a. Last change: 2006 Apr 30 +*usr_32.txt* For Vim version 7.2. Last change: 2006 Apr 30 VIM USER MANUAL - by Bram Moolenaar diff --git a/runtime/doc/usr_40.txt b/runtime/doc/usr_40.txt index dd90ba925d..737005fae6 100644 --- a/runtime/doc/usr_40.txt +++ b/runtime/doc/usr_40.txt @@ -1,4 +1,4 @@ -*usr_40.txt* For Vim version 7.2a. Last change: 2006 Jun 21 +*usr_40.txt* For Vim version 7.2. Last change: 2006 Jun 21 VIM USER MANUAL - by Bram Moolenaar diff --git a/runtime/doc/usr_41.txt b/runtime/doc/usr_41.txt index 38e511fa7c..5305ff18bc 100644 --- a/runtime/doc/usr_41.txt +++ b/runtime/doc/usr_41.txt @@ -1,4 +1,4 @@ -*usr_41.txt* For Vim version 7.2a. Last change: 2008 Jun 21 +*usr_41.txt* For Vim version 7.2. Last change: 2008 Jun 21 VIM USER MANUAL - by Bram Moolenaar diff --git a/runtime/doc/usr_42.txt b/runtime/doc/usr_42.txt index a40bf3b778..275078ceea 100644 --- a/runtime/doc/usr_42.txt +++ b/runtime/doc/usr_42.txt @@ -1,4 +1,4 @@ -*usr_42.txt* For Vim version 7.2a. Last change: 2008 May 05 +*usr_42.txt* For Vim version 7.2. Last change: 2008 May 05 VIM USER MANUAL - by Bram Moolenaar diff --git a/runtime/doc/usr_43.txt b/runtime/doc/usr_43.txt index 65ac9b64b0..089f3c4bad 100644 --- a/runtime/doc/usr_43.txt +++ b/runtime/doc/usr_43.txt @@ -1,4 +1,4 @@ -*usr_43.txt* For Vim version 7.2a. Last change: 2006 Apr 24 +*usr_43.txt* For Vim version 7.2. Last change: 2006 Apr 24 VIM USER MANUAL - by Bram Moolenaar diff --git a/runtime/doc/usr_44.txt b/runtime/doc/usr_44.txt index b9f29e3d28..f5506b4cb8 100644 --- a/runtime/doc/usr_44.txt +++ b/runtime/doc/usr_44.txt @@ -1,4 +1,4 @@ -*usr_44.txt* For Vim version 7.2a. Last change: 2006 Apr 24 +*usr_44.txt* For Vim version 7.2. Last change: 2006 Apr 24 VIM USER MANUAL - by Bram Moolenaar diff --git a/runtime/doc/usr_45.txt b/runtime/doc/usr_45.txt index 5c83d1ce41..42a11b4862 100644 --- a/runtime/doc/usr_45.txt +++ b/runtime/doc/usr_45.txt @@ -1,4 +1,4 @@ -*usr_45.txt* For Vim version 7.2a. Last change: 2008 Apr 30 +*usr_45.txt* For Vim version 7.2. Last change: 2008 Apr 30 VIM USER MANUAL - by Bram Moolenaar diff --git a/runtime/doc/usr_90.txt b/runtime/doc/usr_90.txt index f80c0af327..6701fe9428 100644 --- a/runtime/doc/usr_90.txt +++ b/runtime/doc/usr_90.txt @@ -1,4 +1,4 @@ -*usr_90.txt* For Vim version 7.2a. Last change: 2006 Apr 24 +*usr_90.txt* For Vim version 7.2. Last change: 2006 Apr 24 VIM USER MANUAL - by Bram Moolenaar diff --git a/runtime/doc/usr_toc.txt b/runtime/doc/usr_toc.txt index d649aca990..6f5ea48791 100644 --- a/runtime/doc/usr_toc.txt +++ b/runtime/doc/usr_toc.txt @@ -1,4 +1,4 @@ -*usr_toc.txt* For Vim version 7.2a. Last change: 2006 Apr 24 +*usr_toc.txt* For Vim version 7.2. Last change: 2006 Apr 24 VIM USER MANUAL - by Bram Moolenaar diff --git a/runtime/doc/various.txt b/runtime/doc/various.txt index c04ad95877..08cc5789e7 100644 --- a/runtime/doc/various.txt +++ b/runtime/doc/various.txt @@ -1,4 +1,4 @@ -*various.txt* For Vim version 7.2a. Last change: 2008 Jun 08 +*various.txt* For Vim version 7.2. Last change: 2008 Aug 06 VIM REFERENCE MANUAL by Bram Moolenaar @@ -647,7 +647,12 @@ g CTRL-A Only when Vim was compiled with MEM_PROFILING defined ":tnext" command can then be used to jump to other matches, "tselect" to list matches and choose one. > :help index| :tse z. -< This command can be followed by '|' and another +< When there is no argument you will see matches for + "help", to avoid listing all possible matches (that + would be very slow). + The number of matches displayed is limited to 300. + + This command can be followed by '|' and another command, but you don't need to escape the '|' inside a help command. So these both work: > :help | @@ -819,7 +824,7 @@ The second one finds the English user manual, even when 'helplang' is set to "it". When using command-line completion for the ":help" command, the "@en" -extention is only shown when a tag exists for multiple languages. When the +extension is only shown when a tag exists for multiple languages. When the tag only exists for English "@en" is omitted. When using |CTRL-]| or ":help!" in a non-English help file Vim will try to diff --git a/runtime/doc/version4.txt b/runtime/doc/version4.txt index 8211a8d1ca..82a1bbe746 100644 --- a/runtime/doc/version4.txt +++ b/runtime/doc/version4.txt @@ -1,4 +1,4 @@ -*version4.txt* For Vim version 7.2a. Last change: 2006 Apr 24 +*version4.txt* For Vim version 7.2. Last change: 2006 Apr 24 VIM REFERENCE MANUAL by Bram Moolenaar diff --git a/runtime/doc/version5.txt b/runtime/doc/version5.txt index 538c24572d..16d2657b9f 100644 --- a/runtime/doc/version5.txt +++ b/runtime/doc/version5.txt @@ -1,4 +1,4 @@ -*version5.txt* For Vim version 7.2a. Last change: 2007 May 11 +*version5.txt* For Vim version 7.2. Last change: 2008 Jun 28 VIM REFERENCE MANUAL by Bram Moolenaar @@ -1992,7 +1992,7 @@ because the compare with other tags was wrong. E.g., when "mnuFileSave" was already there, "mnuFile" would be skipped. (Negri) When scrolling up/down, a syntax item with "keepend" didn't work properly. -Now the flags are also stored for the syntax state a the start of each line. +Now the flags are also stored for the syntax state at the start of each line. When 'ic' was changed while 'hlsearch' is on, there was no redraw to show the effect. @@ -3067,7 +3067,7 @@ character in the line, instead of just after it. 5.2.7: Win32 GUI: scrollbar was one pixel too big. -5.2.8: Completion of "PopUp" menu showed the derivates "PopUpc", "PopUPi", +5.2.8: Completion of "PopUp" menu showed the derivatives "PopUpc", "PopUPi", etc. ":menu" also showed these. 5.2.9: When using two input() functions on a row, the prompt would not be diff --git a/runtime/doc/version6.txt b/runtime/doc/version6.txt index 1f3699c1f8..611ff8df2d 100644 --- a/runtime/doc/version6.txt +++ b/runtime/doc/version6.txt @@ -1,4 +1,4 @@ -*version6.txt* For Vim version 7.2a. Last change: 2007 May 11 +*version6.txt* For Vim version 7.2. Last change: 2008 Aug 06 VIM REFERENCE MANUAL by Bram Moolenaar @@ -5894,7 +5894,7 @@ Files: src/move.c Patch 6.1b.023 Problem: On MS-Windows system() may cause checking timestamps, because Vim - looses and gains input focus, while this doesn't happen on Unix. + loses and gains input focus, while this doesn't happen on Unix. Solution: Don't check timestamps while system() is busy. Files: src/ex_cmds2.c, src/fileio.c, src/globals.h, src/misc1.c @@ -13235,7 +13235,7 @@ Files: src/fileio.c Patch 6.2.499 Problem: When writing a file and halting the system, the file might be lost - when using a journalling file system. + when using a journaling file system. Solution: Use fsync() to flush the file data to disk after writing a file. (Radim Kolar) Files: src/fileio.c diff --git a/runtime/doc/version7.txt b/runtime/doc/version7.txt index c076b29f00..83e70cfab5 100644 --- a/runtime/doc/version7.txt +++ b/runtime/doc/version7.txt @@ -1,4 +1,4 @@ -*version7.txt* For Vim version 7.2a. Last change: 2008 Jun 24 +*version7.txt* For Vim version 7.2. Last change: 2008 Aug 09 VIM REFERENCE MANUAL by Bram Moolenaar @@ -263,7 +263,7 @@ Currently supported languages: Ruby |ft-ruby-omni| SQL |ft-sql-omni| XML |ft-xml-omni| - any language wih syntax highligting |ft-syntax-omni| + any language with syntax highlighting |ft-syntax-omni| You can add your own omni completion scripts. @@ -3399,7 +3399,7 @@ Solution: Include vim.h as before. (Mark S. Williams) Files: src/if_ole.cpp Patch 7.0.058 -Problem: The gbk and and gb18030 encodings are not recognized. +Problem: The gbk and gb18030 encodings are not recognized. Solution: Add aliases to cp936. (Edward L. Fox) Files: src/mbyte.c @@ -4657,25 +4657,35 @@ Moved including fcntl.h to vim.h and removed it from all .c files. Introduce macro STRMOVE(d, s), like STRCPY() for overlapping strings. Use it instead of mch_memmove(p, p + x, STRLEN(p + x) + 1). +Removed the bulgarian.vim keymap file, two more standard ones replace it. +(Boyko Bantchev) + +Increased the maximum number of tag matches for command line completion from +200 to 300. + +Renamed help file sql.txt to ft_sql.txt and ada.txt to ft_ada.txt. + Added *added-7.2* ----- New syntax files: + CUDA (Timothy B. Terriberry) Cdrdao config (Nikolai Weibull) Coco/R (Ashish Shukla) - CUDA (Timothy B. Terriberry) - denyhosts config (Nikolai Weibull) + Denyhosts config (Nikolai Weibull) Dtrace script (Nicolas Weber) Git output, commit, config, rebase, send-email (Tim Pope) - HASTE (M. Tranchero) + HASTE and HastePreProc (M. Tranchero) + Haml (Tim Pope) Host conf (Nikolai Weibull) Linden script (Timo Frenay) - Symbian meta-makefile, MMP (Ron Aaron) MS messages (Kevin Locke) PDF (Tim Pope) ProMeLa (Maurizio Tranchero) Reva Foth (Ron Aaron) + Sass (Tim Pope) + Symbian meta-makefile, MMP (Ron Aaron) VOS CM macro (Andrew McGill) XBL (Doug Kearns) @@ -4691,26 +4701,42 @@ New filetype plugins: Denyhosts (Nikolai Weibull) Dos .ini file (Nikolai Weibull) Dtrace script (Nicolas Weber) + FnameScript (Nikolai Weibull) Git, Git config, Git commit, Git rebase, Git send-email (Tim Pope) + Haml (Tim Pope) Host conf (Nikolai Weibull) + Host access (Nikolai Weibull) + Logtalk (Paulo Moura) MS messages (Kevin Locke) + NSIS script (Nikolai Weibull) PDF (Tim Pope) Reva Forth (Ron Aaron) + Sass (Tim Pope) New indent files: + DTD (Nikolai Weibull) Dtrace script (Nicolas Weber) Erlang (Csaba Hoch) + FrameScript (Nikolai Weibull) Git config (Tim Pope) + Haml (Tim Pope) + Logtalk (Paulo Moura) + Sass (Tim Pope) Tiny Fugue (Christian J. Robinson) +New compiler plugins: + RSpec (Tim Pope) + New keymap files: Croatian (Paul B. Mahol) Russian Dvorak (Serhiy Boiko) Ukrainian Dvorak (Serhiy Boiko) + Removed plain Bulgarian, "bds" and phonetic are sufficient. Other new runtime files: - Esperanto menus and message translations. (Dominique Pelle) - Finnish translation of menus and messages. (Flammie Pirinen) + Esperanto menu and message translations. (Dominique Pelle) + Finnish menu and message translations. (Flammie Pirinen) + Brazilian Portugese message translations. (Eduardo Dobay) Added floating point support. |Float| @@ -5118,7 +5144,7 @@ Solution: Adjust ind_len. (Chris Lubinski) Files: src/misc1.c Patch 7.1.063 (after 7.1.040) -Problem: Warning for unitialized variable. +Problem: Warning for uninitialized variable. Solution: Initialise it to NULL. Files: src/ex_docmd.c @@ -5186,7 +5212,7 @@ Solution: Handle the situation that we start without indent. (Chris Files: src/misc1.c Patch 7.1.074 -Problem: Crash when calling string() on a recurively nested List. +Problem: Crash when calling string() on a recursively nested List. Solution: Check result value for being NULL. (Yukihiro Nakadaira) Files: src/eval.c @@ -5489,7 +5515,7 @@ Patch 7.1.124 (extra) Problem: Mac: When dropping a file on Vim.app that is already in the buffer list (from .viminfo) results in editing an empty, unnamed buffer. (Axel Kielhorn) Also: warning for unused variable. -Solution: Move to the buffer of the first agument. Delete unused variable. +Solution: Move to the buffer of the first argument. Delete unused variable. Files: src/gui_mac.c Patch 7.1.125 @@ -6100,7 +6126,7 @@ Solution: use set_option_value() to set 'rightleft'. Files: src/main.c Patch 7.1.225 -Problem: Using unitialized value when XGetWMNormalHints() fails. +Problem: Using uninitialized value when XGetWMNormalHints() fails. Solution: Check the return value. (Dominique Pelle) Files: src/os_unix.c @@ -6197,7 +6223,7 @@ Problem: When "gUe" turns a German sharp s into SS the operation stops not changed to SS there. Solution: Make sure all the characters are operated upon. Detect the sharp s in latin2. Also fixes that changing case of a multi-byte - character that changes the byte cound doesn't always work. + character that changes the byte count doesn't always work. Files: src/ops.c Patch 7.1.241 @@ -6352,7 +6378,7 @@ Solution: Assume the escape sequence ends in a letter. Files: src/term.c Patch 7.1.267 -Problem: When changing folds cursor may be posioned in the wrong place. +Problem: When changing folds cursor may be positioned in the wrong place. Solution: Call changed_window_setting_win() instead of changed_window_setting(). Files: src/fold.c @@ -6678,7 +6704,7 @@ Solution: Add the 'v' argument to getpos(). Files: runtime/doc/eval.txt, src/eval.c Patch 7.1.323 -Problem: Test 19 fails with some termcaps. (Dominque Pelle) +Problem: Test 19 fails with some termcaps. (Dominique Pelle) Solution: Set the t_kb and t_kD termcap values. Files: src/testdir/test19.in, src/testdir/test38.in @@ -6773,5 +6799,350 @@ Setting 'pastetoggle' to "jj" didn't work. 'ic' and 'smartcase' don't work properly when using \%V in a search pattern. (Kana Natsuno) +Patch 7.2a.001 +Problem: On some systems X11/Xlib.h exists (from X11-dev package) but + X11/Intrinsic.h does not (in Xt-dev package). This breaks the + build. Also, on Solaris 9 sys/ptem.h isn't found. +Solution: Have configure only accept X11 when X11/Intrinsic.h exists. + Check for sys/ptem.h while including sys/stream.h. (Vladimir + Marek) +Files: src/auto/configure, src/configure.in + +Patch 7.2a.002 +Problem: getbufvar(N, "") gets the dictionary of the current buffer instead + of buffer N. +Solution: Set curbuf before calling find_var_in_ht(). (Kana Natsuno) +Files: src/eval.c + +Patch 7.2a.003 +Problem: Leaking memory when using ":file name" and using access control + lists. +Solution: Invoke mch_free_acl() in vim_rename(). (Dominique Pelle) +Files: src/fileio.c + +Patch 7.2a.004 +Problem: Some systems can't get spell files by ftp. +Solution: Use http when it looks like it's possible. (James Vega) +Files: runtime/autoload/spellfile.vim + +Patch 7.2a.005 +Problem: A few error messages use confusing names. Misspelling. +Solution: Change "dissallows" to "disallows". (Dominique Pelle) Change + "number" to "Number". +Files: src/eval.c, src/fileio.c + +Patch 7.2a.006 +Problem: Reading past NUL in a string. +Solution: Check for invalid utf-8 byte sequence. (Dominique Pelle) +Files: src/charset.c + +Patch 7.2a.007 +Problem: ":let v = 1.2.3" was OK in Vim 7.1, now it gives an error. +Solution: Don't look for a floating point number after the "." operator. +Files: src/eval.c + +Patch 7.2a.008 +Problem: printf("%g", 1) doesn't work. +Solution: Convert Number to Float when needed. +Files: src/message.c + +Patch 7.2a.009 +Problem: cygwin_conv_to_posix_path() does not specify buffer size. +Solution: Use new Cygwin function: cygwin_conv_path(). (Corinna Vinschen) +Files: src/main.c, src/os_unix.c + +Patch 7.2a.010 +Problem: When a file name has an illegal byte sequence Vim may read + uninitialised memory. +Solution: Don't use UTF_COMPOSINGLIKE() on an illegal byte. In + msg_outtrans_len_attr() use char2cells() instead of ptr2cells(). + In utf_ptr2char() don't check second byte when first byte is + illegal. (Dominique Pelle) +Files: src/mbyte.c, src/message.c + +Patch 7.2a.011 +Problem: The Edit/Startup Settings menu doesn't work. +Solution: Expand environment variables. (Ben Schmidt) +Files: runtime/menu.vim + +Patch 7.2a.012 +Problem: Compiler warnings for casting int to pointer. +Solution: Add cast to long in between. (Martin Toft) +Files: src/gui_gtk_x11.c + +Patch 7.2a.013 +Problem: shellescape() does not escape "%" and "#" characters. +Solution: Add find_cmdline_var() and use it when the second argument to + shellescape() is non-zero. +Files: runtime/doc/eval.txt, src/eval.c, src/ex_docmd.c, + src/proto/ex_docmd.pro, src/proto/misc2.pro, src/misc2.c + +Patch 7.2a.014 +Problem: Problem with % in message. +Solution: Put % in single quotes. +Files: src/eval.c + +Patch 7.2a.015 (after 7.2a.010) +Problem: Misaligned messages. +Solution: Compute length of unprintable chars correctly. +Files: src/message.c + +Patch 7.2a.016 +Problem: Using CTRL-W v in the quickfix window results in two quickfix + windows, which is not allowed. ":tab split" should be allowed to + open a new quickfix window in another tab. +Solution: For CTRL-W v instead of splitting the window open a new one. + When using ":tab" do allow splitting the quickfix window (was + already included in patch 7.2a.013). +Files: src/window.c + +Patch 7.2a.017 +Problem: ":doautoall" executes autocommands for all buffers instead of just + for loaded buffers. +Solution: Change "curbuf" to "buf". +Files: src/fileio.c + +Patch 7.2a.018 +Problem: Compiler warnings when compiling with Gnome. (Tony Mechelynck) +Solution: Add type casts. +Files: src/gui_gtk_x11.c + +Patch 7.2a.019 +Problem: ":let &g:tw = 44" sets the local option value. (Cyril Slobin) +Solution: Use get_varp_scope() instead of get_varp(). (Ian Kelling) +Files: src/option.c + +There is no way to avoid adding /usr/local/{include|lib} to the build +commands. Add the --with-local-dir argument to configure. (Michael +Haubenwallner) + +When using CTRL-D after ":help", the number of matches could be thousands. +Restrict to TAG_MANY to avoid this taking too long. (Ian Kelling) + +The popup menu could be placed at a weird location. Caused by w_wcol computed +by curs_columns(). (Dominique Pelle) + +Overlapping STRCPY() arguments when using %r item in 'errorformat'. Use +STRMOVE() instead. (Ralf Wildenhues) + +Mac: On Leopard gvim, when using the mouse wheel nothing would happen until +another event occurs, such as moving the mouse. Then the recorded scrolling +would take place all at once. (Eckehard Berns) + +Solution for cursor color not reflecting IM status for GTK 2. Add +preedit_is_active flag. (SungHyun Nam) + +filereadable() can hang on a FIFO on Linux. Use open() instead of fopen(), +with O_NONBLOCK. (suggested by Lars Kotthoff) + +Included patch to support Perl 5.10. (Yasuhiro Matsumoto) + +When files are dropped on gvim while the screen is being updated, ignore the +drop command to avoid freeing memory that is being used. + +In a terminal, when drawing the popup menu over double-wide characters, half +characters may not be cleared properly. (Yukihiro Nakadaira) + +The #ifdef for including "vimio.h" was inconsistent. In a few files it +depended on MSWIN, which isn't defined until later. + +Patch 7.2b.001 +Problem: Compilation problem: mb_fix_col() missing with multi-byte feature + but without GUI or clipboard. +Solution: Remove #ifdef. +Files: src/mbyte.c + +Patch 7.2b.002 +Problem: Compiler warnings for signed/unsigned mismatch. +Solution: Add type casts. +Files: src/screen.c + +Patch 7.2b.003 +Problem: Still a compilation problem, check_col() and check_row() missing. +Solution: Add FEAT_MBYTE to the #if. +Files: src/ui.c + +Patch 7.2b.004 +Problem: Trying to free memory for a static string when using ":helpgrep". + (George Reilly) +Solution: Set 'cpo' to empty_option instead of an empty string. Also for + searchpair() and substitute(). +Files: src/quickfix.c, src/eval.c + +Patch 7.2b.005 +Problem: The special character "!" isn't handled properly in shellescape(). + (Jan Minar) +Solution: Escape "!" when using a "csh" like shell and with + shellescape(s, 1). Twice for both. Also escape . +Files: src/misc2.c + +Patch 7.2b.006 +Problem: Reading past end of string when reading info from tags line. +Solution: Break the loop when encountering a NUL. (Dominique Pelle) +Files: src/tag.c + +Patch 7.2b.007 +Problem: Part of a message cannot be translated. +Solution: Put _() around the message. +Files: src/search.c + +Patch 7.2b.008 +Problem: A few filetypes are not detected or not detected properly. +Solution: Add filetype detection patterns. (Nikolai Weibull) +Files: runtime/filetype.vim + +Patch 7.2b.009 +Problem: Reading past end of screen line. (Epicurus) +Solution: Avoid going past the value of Columns. +Files: src/screen.c + +Patch 7.2b.010 +Problem: ":mksession" doesn't work for ":map , foo", ":sunmap ,". (Ethan + Mallove) +Solution: Check for "nxo", "nso" and other strange mapping combinations. +Files: src/getchar.c + +Patch 7.2b.011 +Problem: Configure for TCL ends up with include file in compiler command. + (Richard Hogg) +Solution: Delete items from $TCL_DEFS that do not start with a dash. +Files: src/auto/configure, src/configure.in + +Patch 7.2b.012 +Problem: Build failure with +multi_byte but without +diff. +Solution: Add #ifdef. (Patrick Texier) +Files: src/main.c + +Patch 7.2b.013 +Problem: Build fails with tiny features and Perl. (Dominique Pelle) +Solution: Define missing functions. Also when compiling Python. +Files: src/if_perl.xs, src/if_python.c + +Patch 7.2b.014 +Problem: Configure uses an unsafe temp file to store commands. +Solution: Create the temp file in local directory. +Files: src/auto/configure, src/configure.in + +Patch 7.2b.015 +Problem: Build fails on Mac when using Aap. +Solution: Fix typo in configure script. +Files: src/auto/configure, src/configure.in + +Patch 7.2b.016 +Problem: Build fails with normal features but without +autocmd. +Solution: Fix #ifdefs. (Ian Kelling) +Files: src/eval.c, src/ex_cmds.c, src/quickfix.c, src/option.c, + src/ex_docmd.c + +Patch 7.2b.017 +Problem: "vim -O foo foo" results in only one window. (Zdenek Sekera) +Solution: Handle result of ATTENTION prompt properly. (Ian Kelling) +Files: src/main.c + +Patch 7.2b.018 +Problem: When doing command line completion on a file name for a csh-like + shell argument a '!' character isn't escaped properly. +Solution: Add another backslash. +Files: src/ex_getln.c, src/misc2.c, src/proto/misc2.pro, src/screen.c + +Patch 7.2b.019 (extra) +Problem: Win32: Various compiler warnings. +Solution: Use __w64 attribute. Comment-out unused parameters. Adjust a few + #ifdefs. (George Reilly) +Files: src/gui_w48.c, src/GvimExt/gvimext.cpp, src/Make_mvc.mak, + src/os_mswin.c, src/os_win32.c, src/vim.h + +Patch 7.2b.020 +Problem: ":sort n" doesn't handle negative numbers. (James Vega) +Solution: Include '-' in the number. +Files: src/charset.c, src/ex_cmds.c + +Patch 7.2b.021 +Problem: Reloading doesn't read the BOM correctly. (Steve Gardner) +Solution: Accept utf-8 BOM when specified file encoding is utf-8. +Files: src/fileio.c + +Patch 7.2b.022 +Problem: When using ":normal" while updating the status line the count of + an operator is lost. (Dominique Pelle) +Solution: Save and restore "opcount". +Files: src/ex_docmd.c, src/globals.h, src/normal.c + +Patch 7.2b.023 +Problem: Crash when using the result of synstack(0,0). (Matt Wozniski) +Solution: Check for v_list to be NULL in a few more places. +Files: src/eval.c + +Patch 7.2b.024 +Problem: Using ":gui" while the netrw plugin is active causes a delay in + updating the display. +Solution: Don't check for terminal codes when starting the GUI. +Files: src/term.c + +Patch 7.2b.025 +Problem: When the CursorHold event triggers a pending count is lost. + (Juergen Kraemer) +Solution: Save the counts and restore them. +Files: src/normal.c, src/structs.h + +Patch 7.2b.026 +Problem: The GTK 2 file chooser causes the ~/.recently-used.xbel file to be + written over and over again. This may cause a significant + slowdown. (Guido Berhoerster) +Solution: Don't use the GTK 2 file chooser. +Files: src/gui_gtk.c + +Patch 7.2b.027 +Problem: Memory leak for Python, Perl, etc. script command with end marker. +Solution: Free the memory of the end marker. (Andy Kittner) +Files: src/ex_getln.c + +Patch 7.2b.028 +Problem: Reading uninitialized memory when doing ":gui -f". (Dominique + Pelle) +Solution: Don't position the cursor when the screen size is invalid. +Files: src/gui.c + +Patch 7.2b.029 +Problem: ":help a" doesn't jump to "a" tag in docs. (Tony Mechelynck) +Solution: Get all tags and throw away more than TAG_MANY after sorting. + When there is no argument find matches for "help" to avoid a long + delay. +Files: src/ex_cmds.c, src/ex_getln.c + +Patch 7.2b.030 +Problem: When changing the value of t_Co from 8 to 16 the Visual + highlighting keeps both reverse and a background color. +Solution: Remove the attribute when setting the default highlight color. + (Markus Heidelberg) +Files: src/syntax.c + +Error when cancelling completion menu and auto-formatting. (fixed by Ian +Kelling) + +Patch 7.2c.001 +Problem: ":let x=[''] | let x += x" causes hang. (Matt Wozniski) +Solution: Only insert elements up to the original length of the List. +Files: runtime/doc/eval.txt, src/eval.c + +Patch 7.2c.002 +Problem: fnameescape() doesn't handle a leading '+' or '>'. (Jan Minar) +Solution: Escape a leading '+' and '>'. And a single '-'. +Files: runtime/doc/eval.txt, src/ex_getln.c + +Patch 7.2c.003 +Problem: Searching for "foo\%[bar]\+" gives a "Corrupted regexp program" + error. (Joachim Hofmann) +Solution: Mark the \%[] item as not being simple. +Files: src/regexp.c + +On Vista access to system directories is virtualized. (Michael Mutschler) +Adjusted the manifest file to avoid this. (George Reilly) + +Memory leak when using CTRL-C to cancel listing the jump list. (Dominique +Pelle) + +Mac: Could not build with Perl interface. + vim:tw=78:ts=8:ft=help:norl: diff --git a/runtime/doc/vi_diff.txt b/runtime/doc/vi_diff.txt index df1452d2c3..06d327cfc7 100644 --- a/runtime/doc/vi_diff.txt +++ b/runtime/doc/vi_diff.txt @@ -1,4 +1,4 @@ -*vi_diff.txt* For Vim version 7.2a. Last change: 2008 May 05 +*vi_diff.txt* For Vim version 7.2. Last change: 2008 Jun 28 VIM REFERENCE MANUAL by Bram Moolenaar @@ -383,7 +383,7 @@ Improved indenting for programs. |'cindent'| Searching for words in included files. |include-search| The |[i| command can be used to search for a match of the word under the cursor in the current and included files. The 'include' option - can be set the a pattern that describes a command to include a file + can be set to a pattern that describes a command to include a file (the default is for C programs). The |[I| command lists all matches, the |[_CTRL-I| command jumps to a match. diff --git a/runtime/doc/vim-fr.1 b/runtime/doc/vim-fr.1 index 58434406a9..3b49351bff 100644 --- a/runtime/doc/vim-fr.1 +++ b/runtime/doc/vim-fr.1 @@ -549,7 +549,7 @@ Voir ":help 'filetype'". Script pour dtecter le type d'un fichier d'aprs son contenu. Voir ":help 'filetype'". .TP -/usr/local/lib/vim/*.ps +/usr/local/lib/vim/print/*.ps Fichiers utiliss pour l'impression PostScript. .PP Pour disposer d'informations rcentes, consulter le site Internet de VIM : diff --git a/runtime/doc/vim-fr.UTF-8.1 b/runtime/doc/vim-fr.UTF-8.1 index aa2c3c9580..6e7b183be1 100644 --- a/runtime/doc/vim-fr.UTF-8.1 +++ b/runtime/doc/vim-fr.UTF-8.1 @@ -549,7 +549,7 @@ Voir ":help 'filetype'". Script pour détecter le type d'un fichier d'après son contenu. Voir ":help 'filetype'". .TP -/usr/local/lib/vim/*.ps +/usr/local/lib/vim/print/*.ps Fichiers utilisés pour l'impression PostScript. .PP Pour disposer d'informations récentes, consulter le site Internet de VIM : diff --git a/runtime/doc/vim-it.1 b/runtime/doc/vim-it.1 index d712af466f..1a8967fd90 100755 --- a/runtime/doc/vim-it.1 +++ b/runtime/doc/vim-it.1 @@ -534,7 +534,7 @@ Vedere ":help 'filetype'". Script Vim per determinare il tipo di un file a partire dal suo contenuto. Vedere ":help 'filetype'". .TP -/usr/local/lib/vim/*.ps +/usr/local/lib/vim/print/*.ps File usati per stampa PostScript. .PP Per informazioni aggiornate [in inglese \- NdT] vedere la home page di Vim: diff --git a/runtime/doc/vim-it.UTF-8.1 b/runtime/doc/vim-it.UTF-8.1 index f41691df9e..a7ea5f99c6 100644 --- a/runtime/doc/vim-it.UTF-8.1 +++ b/runtime/doc/vim-it.UTF-8.1 @@ -534,7 +534,7 @@ Vedere ":help 'filetype'". Script Vim per determinare il tipo di un file a partire dal suo contenuto. Vedere ":help 'filetype'". .TP -/usr/local/lib/vim/*.ps +/usr/local/lib/vim/print/*.ps File usati per stampa PostScript. .PP Per informazioni aggiornate [in inglese \- NdT] vedere la home page di Vim: diff --git a/runtime/doc/vim-pl.1 b/runtime/doc/vim-pl.1 index 25dd78698c..3fa34e2991 100644 --- a/runtime/doc/vim-pl.1 +++ b/runtime/doc/vim-pl.1 @@ -523,7 +523,7 @@ Skrypt do wykrywania typu pliku wed /usr/local/lib/vim/scripts.vim Skrypt do wykrywania typu pliku wedug jego zawartoci. Zobacz ":help 'filetype'". .TP -/usr/local/lib/vim/*.ps +/usr/local/lib/vim/print/*.ps Pliku uywane do drukowania PostScriptu. .PP Najwiesze wiadomoci na stronie diff --git a/runtime/doc/vim-pl.UTF-8.1 b/runtime/doc/vim-pl.UTF-8.1 index ab19a527ca..365da5a41f 100644 --- a/runtime/doc/vim-pl.UTF-8.1 +++ b/runtime/doc/vim-pl.UTF-8.1 @@ -523,7 +523,7 @@ Skrypt do wykrywania typu pliku według jego nazwy. Zobacz ":help 'filetype'". /usr/local/lib/vim/scripts.vim Skrypt do wykrywania typu pliku według jego zawartości. Zobacz ":help 'filetype'". .TP -/usr/local/lib/vim/*.ps +/usr/local/lib/vim/print/*.ps Pliku używane do drukowania PostScriptu. .PP Najświeższe wiadomości na stronie diff --git a/runtime/doc/vim-ru.1 b/runtime/doc/vim-ru.1 index 11e30174b8..bb2597fead 100644 --- a/runtime/doc/vim-ru.1 +++ b/runtime/doc/vim-ru.1 @@ -452,7 +452,7 @@ rvim rview rgvim rgview /usr/local/lib/vim/scripts.vim . . ":help 'filetype'". .TP -/usr/local/lib/vim/*.ps +/usr/local/lib/vim/print/*.ps PostScript. .PP -- VIM: diff --git a/runtime/doc/vim-ru.UTF-8.1 b/runtime/doc/vim-ru.UTF-8.1 index b4d88edb53..78127a1ccb 100644 --- a/runtime/doc/vim-ru.UTF-8.1 +++ b/runtime/doc/vim-ru.UTF-8.1 @@ -452,7 +452,7 @@ rvim rview rgvim rgview /usr/local/lib/vim/scripts.vim Сценарий для определения типа файла по содержимому. См. ":help 'filetype'". .TP -/usr/local/lib/vim/*.ps +/usr/local/lib/vim/print/*.ps Файлы для печати PostScript. .PP Более свежая информация -- на сайте VIM: diff --git a/runtime/doc/vim.1 b/runtime/doc/vim.1 index 4e90da2760..820caa24f5 100644 --- a/runtime/doc/vim.1 +++ b/runtime/doc/vim.1 @@ -187,7 +187,7 @@ behave mostly like Vi, even though a .vimrc file exists. .TP \-d Start in diff mode. -There should be two or three file name arguments. +There should be two, three or four file name arguments. .B Vim will open all the files and show differences between them. Works like vimdiff(1). @@ -522,7 +522,7 @@ Script to detect the type of a file by its name. See ":help 'filetype'". /usr/local/lib/vim/scripts.vim Script to detect the type of a file by its contents. See ":help 'filetype'". .TP -/usr/local/lib/vim/*.ps +/usr/local/lib/vim/print/*.ps Files used for PostScript printing. .PP For recent info read the VIM home page: diff --git a/runtime/doc/vim.man b/runtime/doc/vim.man index fa5c5c855f..5b9b83cb6c 100644 --- a/runtime/doc/vim.man +++ b/runtime/doc/vim.man @@ -135,9 +135,9 @@ OPTIONS Vim behave mostly like Vi, even though a .vimrc file exists. - -d Start in diff mode. There should be two or three file name - arguments. Vim will open all the files and show differ- - ences between them. Works like vimdiff(1). + -d Start in diff mode. There should be two, three or four + file name arguments. Vim will open all the files and show + differences between them. Works like vimdiff(1). -d {device} Open {device} for use as a terminal. Only on the Amiga. Example: "-d con:20/30/600/150". @@ -398,7 +398,7 @@ FILES Script to detect the type of a file by its contents. See ":help 'filetype'". - /usr/local/lib/vim/*.ps + /usr/local/lib/vim/print/*.ps Files used for PostScript printing. For recent info read the VIM home page: diff --git a/runtime/doc/vimdiff.1 b/runtime/doc/vimdiff.1 index 90ed8b8007..bed2b32889 100644 --- a/runtime/doc/vimdiff.1 +++ b/runtime/doc/vimdiff.1 @@ -1,17 +1,17 @@ .TH VIMDIFF 1 "2001 March 30" .SH NAME -vimdiff \- edit two or three versions of a file with Vim and show differences +vimdiff \- edit two, three or four versions of a file with Vim and show differences .SH SYNOPSIS .br .B vimdiff -[options] file1 file2 [file3] +[options] file1 file2 [file3 [file4]] .PP .B gvimdiff .SH DESCRIPTION .B Vimdiff starts .B Vim -on two (or three) files. +on two (or three or four) files. Each file gets its own window. The differences between the files are highlighted. This is a nice way to inspect changes and to move changes from one version diff --git a/runtime/doc/vimdiff.man b/runtime/doc/vimdiff.man index 41ef47f35d..913ac13847 100644 --- a/runtime/doc/vimdiff.man +++ b/runtime/doc/vimdiff.man @@ -3,19 +3,19 @@ VIMDIFF(1) VIMDIFF(1) NAME - vimdiff - edit two or three versions of a file with Vim and show dif- - ferences + vimdiff - edit two, three or four versions of a file with Vim and show + differences SYNOPSIS - vimdiff [options] file1 file2 [file3] + vimdiff [options] file1 file2 [file3 [file4]] gvimdiff DESCRIPTION - Vimdiff starts Vim on two (or three) files. Each file gets its own - window. The differences between the files are highlighted. This is a - nice way to inspect changes and to move changes from one version to - another version of the same file. + Vimdiff starts Vim on two (or three or four) files. Each file gets its + own window. The differences between the files are highlighted. This + is a nice way to inspect changes and to move changes from one version + to another version of the same file. See vim(1) for details about Vim itself. diff --git a/runtime/doc/visual.txt b/runtime/doc/visual.txt index 4858bb88b9..e817f0908f 100644 --- a/runtime/doc/visual.txt +++ b/runtime/doc/visual.txt @@ -1,4 +1,4 @@ -*visual.txt* For Vim version 7.2a. Last change: 2006 Sep 26 +*visual.txt* For Vim version 7.2. Last change: 2006 Sep 26 VIM REFERENCE MANUAL by Bram Moolenaar diff --git a/runtime/doc/windows.txt b/runtime/doc/windows.txt index dc9c20ccb0..b1d81a3c19 100644 --- a/runtime/doc/windows.txt +++ b/runtime/doc/windows.txt @@ -1,4 +1,4 @@ -*windows.txt* For Vim version 7.2a. Last change: 2007 Oct 07 +*windows.txt* For Vim version 7.2. Last change: 2008 Aug 09 VIM REFERENCE MANUAL by Bram Moolenaar @@ -190,8 +190,8 @@ CTRL-W CTRL_N *CTRL-W_CTRL-N* Same as ":split", but set 'readonly' option for this buffer. :[N]sf[ind] [++opt] [+cmd] {file} *:sf* *:sfind* *splitfind* - Same as ":split", but search for {file} in 'path'. Doesn't - split if {file} is not found. + Same as ":split", but search for {file} in 'path' like in + |:find|. Doesn't split if {file} is not found. CTRL-W CTRL-^ *CTRL-W_CTRL-^* *CTRL-W_^* CTRL-W ^ Does ":split #", split window in two and edit alternate file. @@ -627,7 +627,7 @@ can also get to them with the buffer list commands, like ":bnext". not split. Also see |++opt| and |+cmd|. *:dr* *:drop* -:dr[op] {file} .. +:dr[op] [++opt] [+cmd] {file} .. Edit the first {file} in a window. - If the file is already open in a window change to that window. @@ -639,6 +639,7 @@ can also get to them with the buffer list commands, like ":bnext". program that wants Vim to edit another file, e.g., a debugger. When using the |:tab| modifier each argument is opened in a tab page. The last window is used if it's empty. + Also see |++opt| and |+cmd|. {only available when compiled with the +gui feature} ============================================================================== diff --git a/runtime/doc/workshop.txt b/runtime/doc/workshop.txt index c14bf718ae..0ec4555365 100644 --- a/runtime/doc/workshop.txt +++ b/runtime/doc/workshop.txt @@ -1,4 +1,4 @@ -*workshop.txt* For Vim version 7.2a. Last change: 2006 Apr 24 +*workshop.txt* For Vim version 7.2. Last change: 2006 Apr 24 VIM REFERENCE MANUAL by Gordon Prieur diff --git a/runtime/filetype.vim b/runtime/filetype.vim index 89af04cce5..a8e6261e91 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: 2008 Jun 20 +" Last Change: 2008 Aug 03 " Listen very carefully, I will say this only once if exists("did_load_filetypes") @@ -17,7 +17,7 @@ augroup filetypedetect " Ignored extensions if exists("*fnameescape") -au BufNewFile,BufRead ?\+.orig,?\+.bak,?\+.old,?\+.new,?\+.rpmsave,?\+.rpmnew +au BufNewFile,BufRead ?\+.orig,?\+.bak,?\+.old,?\+.new,?\+.dpkg-dist,?\+.dpkg-old,?\+.rpmsave,?\+.rpmnew \ exe "doau filetypedetect BufRead " . fnameescape(expand(":r")) au BufNewFile,BufRead *~ \ let s:name = expand("") | @@ -25,7 +25,7 @@ au BufNewFile,BufRead *~ \ if s:name != s:short && s:short != "" | \ exe "doau filetypedetect BufRead " . fnameescape(s:short) | \ endif | - \ unlet s:name s:short + \ unlet! s:name s:short au BufNewFile,BufRead ?\+.in \ if expand(":t") != "configure.in" | \ exe "doau filetypedetect BufRead " . fnameescape(expand(":r")) | @@ -92,9 +92,9 @@ au BufNewFile,BufRead *.wrm setf acedb " Ada (83, 9X, 95) au BufNewFile,BufRead *.adb,*.ads,*.ada setf ada if has("vms") - au BufNewFile,BufRead *.gpr,*.ada_m,*.adc setf ada + au BufNewFile,BufRead *.gpr,*.ada_m,*.adc setf ada else - au BufNewFile,BufRead *.gpr setf ada + au BufNewFile,BufRead *.gpr setf ada endif " AHDL @@ -181,7 +181,7 @@ func! s:FTasm() endif endif - exe "setf " . b:asmsyntax + exe "setf " . fnameescape(b:asmsyntax) endfunc func! s:FTasmsyntax() @@ -189,8 +189,9 @@ func! s:FTasmsyntax() " b:asmsyntax appropriately let head = " ".getline(1)." ".getline(2)." ".getline(3)." ".getline(4). \" ".getline(5)." " - if head =~ '\sasmsyntax=\S\+\s' - let b:asmsyntax = substitute(head, '.*\sasmsyntax=\([a-zA-Z0-9]\+\)\s.*','\1', "") + let match = matchstr(head, '\sasmsyntax=\zs[a-zA-Z0-9]\+\ze\s') + if match != '' + let b:asmsyntax = match elseif ((head =~? '\.title') || (head =~? '\.ident') || (head =~? '\.macro') || (head =~? '\.subtitle') || (head =~? '\.library')) let b:asmsyntax = "vmasm" endif @@ -291,6 +292,9 @@ endfunc " Blank au BufNewFile,BufRead *.bl setf blank +" Blkid cache file +au BufNewFile,BufRead /etc/blkid.tab,/etc/blkid.tab.old setf xml + " C or lpc au BufNewFile,BufRead *.c call s:FTlpc() @@ -633,7 +637,7 @@ func! s:FTe() endfunc " ERicsson LANGuage; Yaws is erlang too -au BufNewFile,BufRead *.erl,*.yaws setf erlang +au BufNewFile,BufRead *.erl,*.hrl,*.yaws setf erlang " Elm Filter Rules file au BufNewFile,BufRead filter-rules setf elmfilt @@ -687,6 +691,9 @@ if has("fname_case") endif au BufNewFile,BufRead *.f,*.for,*.fortran,*.fpp,*.ftn,*.f77,*.f90,*.f95 setf fortran +" Framescript +au BufNewFile,BufRead *.fsl setf framescript + " FStab au BufNewFile,BufRead fstab,mtab setf fstab @@ -739,11 +746,14 @@ au BufNewFile,BufRead *.groovy setf groovy au BufNewFile,BufRead *.gsp setf gsp " Group file -au BufNewFile,BufRead /etc/group setf group +au BufNewFile,BufRead /etc/group,/etc/group-,/etc/group.edit,/etc/gshadow,/etc/gshadow-,/etc/gshadow.edit,/var/backups/group.bak,/var/backups/gshadow.bak setf group " GTK RC au BufNewFile,BufRead .gtkrc,gtkrc setf gtkrc +" Haml +au BufNewFile,BufRead *.haml setf haml + " Hamster Classic | Playground files au BufNewFile,BufRead *.hsc,*.hsm setf hamster @@ -754,6 +764,7 @@ au BufNewFile,BufRead *.chs setf chaskell " Haste au BufNewFile,BufRead *.ht setf haste +au BufNewFile,BufRead *.htpp setf hastepreproc " Hercules au BufNewFile,BufRead *.vc,*.ev,*.rs,*.sum,*.errsum setf hercules @@ -796,6 +807,9 @@ au BufNewFile,BufRead *.tmpl setf htmlcheetah " Host config au BufNewFile,BufRead /etc/host.conf setf hostconf +" Hosts access +au BufNewFile,BufRead /etc/hosts.allow,/etc/hosts.deny setf hostsaccess + " Hyper Builder au BufNewFile,BufRead *.hb setf hb @@ -846,7 +860,7 @@ endfunc " Indent RC -au BufNewFile,BufRead indentrc setf indentrc +au BufNewFile,BufRead indentrc setf indent " Inform au BufNewFile,BufRead *.inf,*.INF setf inform @@ -1016,6 +1030,9 @@ au BufNewFile,BufRead /etc/man.conf,man.config setf manconf " Maple V au BufNewFile,BufRead *.mv,*.mpl,*.mws setf maple +" Map (UMN mapserver config file) +au BufNewFile,BufRead *.map setf map + " Mason au BufNewFile,BufRead *.mason,*.mhtml setf mason @@ -1226,7 +1243,7 @@ au BufNewFile,BufRead /etc/pam.conf setf pamconf au BufNewFile,BufRead *.papp,*.pxml,*.pxsl setf papp " Password file -au BufNewFile,BufRead /etc/passwd,/etc/shadow,/etc/shadow- setf passwd +au BufNewFile,BufRead /etc/passwd,/etc/passwd-,/etc/passwd.edit,/etc/shadow,/etc/shadow-,/var/backups/passwd.bak,/var/backups/shadow.bak setf passwd " Pascal (also *.p) au BufNewFile,BufRead *.pas setf pascal @@ -1334,7 +1351,7 @@ func! s:FTinc() else call s:FTasmsyntax() if exists("b:asmsyntax") - exe "setf " . b:asmsyntax + exe "setf " . fnameescape(b:asmsyntax) else setf pov endif @@ -1456,6 +1473,9 @@ au BufNewFile,BufRead *.pyx,*.pxd setf pyrex " Python au BufNewFile,BufRead *.py,*.pyw setf python +" Quixote (Python-based web framework) +au BufNewFile,BufRead *.ptl setf python + " Radiance au BufNewFile,BufRead *.rad,*.mat setf radiance @@ -1554,6 +1574,9 @@ au BufNewFile,BufRead *.rst setf rst " RTF au BufNewFile,BufRead *.rtf setf rtf +" Interactive Ruby shell +au BufNewFile,BufRead .irbrc,irbrc setf ruby + " Ruby au BufNewFile,BufRead *.rb,*.rbw,*.gem,*.gemspec setf ruby @@ -1572,6 +1595,9 @@ au BufNewFile,BufRead smb.conf setf samba " SAS script au BufNewFile,BufRead *.sas setf sas +" Sass +au BufNewFile,BufRead *.sass setf sass + " Sather au BufNewFile,BufRead *.sa setf sather @@ -1729,6 +1755,7 @@ endfunc " Z-Shell script au BufNewFile,BufRead .zprofile,/etc/zprofile,.zfbfmarks setf zsh au BufNewFile,BufRead .zsh*,.zlog*,.zcompdump* call s:StarSetf('zsh') +au BufNewFile,BufRead *.zsh setf zsh " Scheme au BufNewFile,BufRead *.scm,*.ss setf scheme @@ -1796,7 +1823,7 @@ au BufNewFile,BufRead *.rules call s:FTRules() let s:ft_rules_udev_rules_pattern = '^\s*\cudev_rules\s*=\s*"\([^"]\{-1,}\)/*".*' func! s:FTRules() - if expand(':p') =~ '^/etc/udev/rules\.d/.*\.rules$' + if expand(':p') =~ '^/etc/udev/\%(rules\.d/\)\=.*\.rules$' setf udevrules return endif @@ -2257,6 +2284,9 @@ au StdinReadPost * if !did_filetype() | runtime! scripts.vim | endif " Most of these should call s:StarSetf() to avoid names ending in .gz and the " like are used. +" More Apache files. +au BufNewFile,BufRead /etc/apache2/conf.*/*,/etc/apache2/sites-*/*,/etc/apache2/mods-*/* call s:StarSetf('apache') + " Asterisk config file au BufNewFile,BufRead *asterisk/*.conf* call s:StarSetf('asterisk') au BufNewFile,BufRead *asterisk*/*voicemail.conf* call s:StarSetf('asteriskvm') @@ -2276,7 +2306,7 @@ au BufNewFile,BufRead [cC]hange[lL]og* \|endif " Crontab -au BufNewFile,BufRead crontab,crontab.* call s:StarSetf('crontab') +au BufNewFile,BufRead crontab,crontab.*,/etc/cron.d/* call s:StarSetf('crontab') " Debian Sources.list au BufNewFile,BufRead /etc/apt/sources.list.d/* call s:StarSetf('debsources') diff --git a/runtime/ftplugin/a2ps.vim b/runtime/ftplugin/a2ps.vim index a596fc8396..6653351949 100644 --- a/runtime/ftplugin/a2ps.vim +++ b/runtime/ftplugin/a2ps.vim @@ -1,14 +1,20 @@ " Vim filetype plugin file " Language: a2ps(1) configuration file " Maintainer: Nikolai Weibull -" Latest Revision: 2006-04-19 +" Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 +let s:cpo_save = &cpo +set cpo&vim + let b:undo_ftplugin = "setl com< cms< inc< fo<" setlocal comments=:# commentstring=#\ %s include=^\\s*Include: setlocal formatoptions-=t formatoptions+=croql + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/runtime/ftplugin/ada.vim b/runtime/ftplugin/ada.vim index 688cf97f70..045645ddaf 100644 --- a/runtime/ftplugin/ada.vim +++ b/runtime/ftplugin/ada.vim @@ -2,13 +2,14 @@ " Description: Perform Ada specific completion & tagging. " Language: Ada (2005) " $Id$ -" Maintainer: Martin Krischik +" Maintainer: Martin Krischik +" Taylor Venable " Neil Bird " $Author$ " $Date$ -" Version: 4.2 +" Version: 4.6 " $Revision$ -" $HeadURL: https://svn.sourceforge.net/svnroot/gnuada/trunk/tools/vim/ftplugin/ada.vim $ +" $HeadURL: https://gnuada.svn.sourceforge.net/svnroot/gnuada/trunk/tools/vim/ftplugin/ada.vim $ " History: 24.05.2006 MK Unified Headers " 26.05.2006 MK ' should not be in iskeyword. " 16.07.2006 MK Ada-Mode as vim-ball @@ -17,6 +18,7 @@ " 05.11.2006 MK Bram suggested not to use include protection for " autoload " 05.11.2006 MK Bram suggested to save on spaces +" 08.07.2007 TV fix default compiler problems. " Help Page: ft-ada-plugin "------------------------------------------------------------------------------ " Provides mapping overrides for tag jumping that figure out the current @@ -30,7 +32,7 @@ if exists ("b:did_ftplugin") || version < 700 endif " Don't load another plugin for this buffer -let b:did_ftplugin = 38 +let b:did_ftplugin = 45 " " Temporarily set cpoptions to ensure the script loads OK @@ -38,12 +40,21 @@ let b:did_ftplugin = 38 let s:cpoptions = &cpoptions set cpoptions-=C -" Section: Comments {{{1 +" Section: Comments {{{1 " setlocal comments=O:--,:--\ \ setlocal commentstring=--\ \ %s setlocal complete=.,w,b,u,t,i +" Section: case {{{1 +" +setlocal nosmartcase +setlocal ignorecase + +" Section: formatoptions {{{1 +" +setlocal formatoptions+=ron + " Section: Tagging {{{1 " if exists ("g:ada_extended_tagging") @@ -104,8 +115,17 @@ if !exists ("b:match_words") && \ s:notend . '\:\\s\+\' endif + " Section: Compiler {{{1 " +if ! exists("g:ada_default_compiler") + if has("vms") + let g:ada_default_compiler = 'decada' + else + let g:ada_default_compiler = 'gnat' + endif +endif + if ! exists("current_compiler") || \ current_compiler != g:ada_default_compiler execute "compiler " . g:ada_default_compiler diff --git a/runtime/ftplugin/alsaconf.vim b/runtime/ftplugin/alsaconf.vim index 0ef6991d38..5d763c8011 100644 --- a/runtime/ftplugin/alsaconf.vim +++ b/runtime/ftplugin/alsaconf.vim @@ -1,13 +1,19 @@ " Vim filetype plugin file " Language: alsaconf(8) configuration file " Maintainer: Nikolai Weibull -" Latest Revision: 2006-04-19 +" Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 +let s:cpo_save = &cpo +set cpo&vim + let b:undo_ftplugin = "setl com< cms< fo<" setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/runtime/ftplugin/arch.vim b/runtime/ftplugin/arch.vim index 2da9e40ac1..71d831e112 100644 --- a/runtime/ftplugin/arch.vim +++ b/runtime/ftplugin/arch.vim @@ -1,13 +1,19 @@ " Vim filetype plugin file " Language: GNU Arch inventory file " Maintainer: Nikolai Weibull -" Latest Revision: 2006-04-19 +" Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 +let s:cpo_save = &cpo +set cpo&vim + let b:undo_ftplugin = "setl com< cms< fo<" setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/runtime/ftplugin/automake.vim b/runtime/ftplugin/automake.vim index c48ea13e15..20b06af362 100644 --- a/runtime/ftplugin/automake.vim +++ b/runtime/ftplugin/automake.vim @@ -1,10 +1,16 @@ " Vim filetype plugin file " Language: Automake " Maintainer: Nikolai Weibull -" Latest Revision: 2006-04-19 +" Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish endif +let s:cpo_save = &cpo +set cpo&vim + runtime! ftplugin/make.vim ftplugin/make_*.vim ftplugin/make/*.vim + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/runtime/ftplugin/bdf.vim b/runtime/ftplugin/bdf.vim index a010c2c5ae..120c5df968 100644 --- a/runtime/ftplugin/bdf.vim +++ b/runtime/ftplugin/bdf.vim @@ -1,14 +1,20 @@ " Vim filetype plugin file " Language: BDF font definition " Maintainer: Nikolai Weibull -" Latest Revision: 2006-04-19 +" Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 +let s:cpo_save = &cpo +set cpo&vim + let b:undo_ftplugin = "setl com< cms< fo<" setlocal comments=b:COMMENT commentstring=COMMENT\ %s setlocal formatoptions-=t formatoptions+=croql + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/runtime/ftplugin/calendar.vim b/runtime/ftplugin/calendar.vim index ca5651118c..6f117e36e5 100644 --- a/runtime/ftplugin/calendar.vim +++ b/runtime/ftplugin/calendar.vim @@ -1,14 +1,20 @@ " Vim filetype plugin file " Language: calendar(1) input file " Maintainer: Nikolai Weibull -" Latest Revision: 2006-04-19 +" Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 +let s:cpo_save = &cpo +set cpo&vim + let b:undo_ftplugin = "setl com< cms< inc< fo<" setlocal comments=s1:/*,mb:*,ex:*/ commentstring& include& setlocal formatoptions-=t formatoptions+=croql + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/runtime/ftplugin/cdrdaoconf.vim b/runtime/ftplugin/cdrdaoconf.vim index 86796eb8ec..557fd82c53 100644 --- a/runtime/ftplugin/cdrdaoconf.vim +++ b/runtime/ftplugin/cdrdaoconf.vim @@ -1,6 +1,6 @@ " Vim filetype plugin file " Maintainer: Nikolai Weibull -" Latest Revision: 2007-09-18 +" Latest Revision: 2007-12-04 if exists("b:did_ftplugin") finish @@ -14,5 +14,5 @@ let b:undo_ftplugin = "setl com< cms< fo<" setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql -let s:cpo_save = &cpo -set cpo&vim +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/runtime/ftplugin/conf.vim b/runtime/ftplugin/conf.vim index 8e0b7f8d21..1b110e475b 100644 --- a/runtime/ftplugin/conf.vim +++ b/runtime/ftplugin/conf.vim @@ -1,13 +1,19 @@ " Vim filetype plugin file " Language: generic configuration file " Maintainer: Nikolai Weibull -" Latest Revision: 2006-04-19 +" Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 +let s:cpo_save = &cpo +set cpo&vim + let b:undo_ftplugin = "setl com< cms< fo<" setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/runtime/ftplugin/context.vim b/runtime/ftplugin/context.vim index c74be07141..1c7d678375 100644 --- a/runtime/ftplugin/context.vim +++ b/runtime/ftplugin/context.vim @@ -1,7 +1,7 @@ " Vim filetype plugin file " Language: ConTeXt typesetting engine " Maintainer: Nikolai Weibull -" Latest Revision: 2006-04-19 +" Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish @@ -29,8 +29,7 @@ if exists("loaded_matchit") let b:match_skip = 'r:\\\@ -" Latest Revision: 2006-04-19 +" Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 +let s:cpo_save = &cpo +set cpo&vim + let b:undo_ftplugin = "setl com< cms< fo<" setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/runtime/ftplugin/css.vim b/runtime/ftplugin/css.vim index d80582e2f6..43d1edfa5b 100644 --- a/runtime/ftplugin/css.vim +++ b/runtime/ftplugin/css.vim @@ -1,13 +1,16 @@ " Vim filetype plugin file " Language: CSS " Maintainer: Nikolai Weibull -" Latest Revision: 2007-05-08 +" Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 +let s:cpo_save = &cpo +set cpo&vim + let b:undo_ftplugin = "setl com< cms< inc< fo< ofu<" setlocal comments=s1:/*,mb:*,ex:*/ commentstring& @@ -15,3 +18,6 @@ setlocal formatoptions-=t formatoptions+=croql setlocal omnifunc=csscomplete#CompleteCSS let &l:include = '^\s*@import\s\+\%(url(\)\=' + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/runtime/ftplugin/cvsrc.vim b/runtime/ftplugin/cvsrc.vim index 2a49f8d60b..c410530588 100644 --- a/runtime/ftplugin/cvsrc.vim +++ b/runtime/ftplugin/cvsrc.vim @@ -1,13 +1,19 @@ " Vim filetype plugin file " Language: cvs(1) RC file " Maintainer: Nikolai Weibull -" Latest Revision: 2006-04-19 +" Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 +let s:cpo_save = &cpo +set cpo&vim + let b:undo_ftplugin = "setl com< cms< fo<" setlocal comments= commentstring= formatoptions-=tcroql + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/runtime/ftplugin/debchangelog.vim b/runtime/ftplugin/debchangelog.vim index cd5b07162e..00a025b47c 100644 --- a/runtime/ftplugin/debchangelog.vim +++ b/runtime/ftplugin/debchangelog.vim @@ -7,6 +7,9 @@ " License: GNU GPL, version 2.0 or later " URL: http://git.debian.org/?p=pkg-vim/vim.git;a=blob_plain;f=runtime/ftplugin/debchangelog.vim;hb=debian +" Bug completion requires apt-listbugs installed for Debian packages or +" python-launchpad-bugs installed for Ubuntu packages + if exists("b:did_ftplugin") finish endif @@ -116,7 +119,9 @@ function NewVersion() normal h normal  call setline(1, substitute(getline(1), '-\$\$', '-', '')) - normal zo + if exists("g:debchangelog_fold_enable") + foldopen + endif call AddEntry() endfunction @@ -279,7 +284,9 @@ function! DebGetChangelogFold(lnum) return '=' endfunction -silent! foldopen! " unfold the entry the cursor is on (usually the first one) +if exists("g:debchangelog_fold_enable") + silent! foldopen! " unfold the entry the cursor is on (usually the first one) +endif " }}} @@ -291,27 +298,65 @@ endif fun! DebCompleteBugs(findstart, base) if a:findstart - " it we are just after an '#', the completion should start at the '#', - " otherwise no completion is possible let line = getline('.') - let colidx = col('.') - if colidx > 1 && line[colidx - 2] =~ '#' - let colidx = colidx - 2 - else - let colidx = -1 - endif + + " try to detect whether this is closes: or lp: + let g:debchangelog_complete_mode = 'debbugs' + let try_colidx = col('.') - 1 + let colidx = -1 " default to no-completion-possible + + while try_colidx > 0 && line[try_colidx - 1] =~ '\s\|\d\|#\|,\|:' + let try_colidx = try_colidx - 1 + if line[try_colidx] == '#' && colidx == -1 + " found hash, where we complete from: + let colidx = try_colidx + elseif line[try_colidx] == ':' + if try_colidx > 1 && strpart(line, try_colidx - 2, 3) =~ '\clp:' + let g:debchangelog_complete_mode = 'lp' + endif + break + endif + endwhile return colidx - else - if ! filereadable('/usr/sbin/apt-listbugs') - echoerr 'apt-listbugs not found, you should install it to use Closes bug completion' - return + else " return matches: + let bug_lines = [] + if g:debchangelog_complete_mode == 'lp' + if ! has('python') + echoerr 'vim must be built with Python support to use LP bug completion' + return + endif + let pkgsrc = DebGetPkgSrcName(line('.')) + python << EOF +import vim +try: + from launchpadbugs import connector + buglist = connector.ConnectBugList() + bl = list(buglist('https://bugs.launchpad.net/ubuntu/+source/%s' % vim.eval('pkgsrc'))) + bl.sort(None, int) + liststr = '[' + for bug in bl: + liststr += "'#%d - %s'," % (int(bug), bug.summary.replace('\'', '\'\'')) + liststr += ']' + vim.command('silent let bug_lines = %s' % liststr) +except ImportError: + vim.command('echoerr \'python-launchpad-bugs needs to be installed to use Launchpad bug completion\'') +EOF + else + if ! filereadable('/usr/sbin/apt-listbugs') + echoerr 'apt-listbugs not found, you should install it to use Closes bug completion' + return + endif + let pkgsrc = DebGetPkgSrcName(line('.')) + let listbugs_output = system('/usr/sbin/apt-listbugs -s ' . g:debchangelog_listbugs_severities . ' list ' . pkgsrc . ' | grep "^ #" 2> /dev/null') + let bug_lines = split(listbugs_output, '\n') endif - let pkgsrc = DebGetPkgSrcName(line('.')) - let listbugs_output = system('apt-listbugs -s ' . g:debchangelog_listbugs_severities . ' list ' . pkgsrc . ' | grep "^ #" 2> /dev/null') - let bug_lines = split(listbugs_output, '\n') let completions = [] for line in bug_lines let parts = matchlist(line, '^\s*\(#\S\+\)\s*-\s*\(.*\)$') + " filter only those which match a:base: + if parts[1] !~ "^" . a:base + continue + endif let completion = {} let completion['word'] = parts[1] let completion['menu'] = parts[2] diff --git a/runtime/ftplugin/denyhosts.vim b/runtime/ftplugin/denyhosts.vim index 86796eb8ec..557fd82c53 100644 --- a/runtime/ftplugin/denyhosts.vim +++ b/runtime/ftplugin/denyhosts.vim @@ -1,6 +1,6 @@ " Vim filetype plugin file " Maintainer: Nikolai Weibull -" Latest Revision: 2007-09-18 +" Latest Revision: 2007-12-04 if exists("b:did_ftplugin") finish @@ -14,5 +14,5 @@ let b:undo_ftplugin = "setl com< cms< fo<" setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql -let s:cpo_save = &cpo -set cpo&vim +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/runtime/ftplugin/dictconf.vim b/runtime/ftplugin/dictconf.vim index 6ebd94adf1..659046c176 100644 --- a/runtime/ftplugin/dictconf.vim +++ b/runtime/ftplugin/dictconf.vim @@ -1,13 +1,19 @@ " Vim filetype plugin file " Language: dict(1) configuration file " Maintainer: Nikolai Weibull -" Latest Revision: 2006-04-19 +" Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 +let s:cpo_save = &cpo +set cpo&vim + let b:undo_ftplugin = "setl com< cms< fo<" setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/runtime/ftplugin/dictdconf.vim b/runtime/ftplugin/dictdconf.vim index bda87821a0..ee738c50ce 100644 --- a/runtime/ftplugin/dictdconf.vim +++ b/runtime/ftplugin/dictdconf.vim @@ -1,13 +1,19 @@ " Vim filetype plugin file " Language: dictd(8) configuration file " Maintainer: Nikolai Weibull -" Latest Revision: 2006-04-19 +" Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 +let s:cpo_save = &cpo +set cpo&vim + let b:undo_ftplugin = "setl com< cms< fo<" setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/runtime/ftplugin/dircolors.vim b/runtime/ftplugin/dircolors.vim index bdbecc0196..3b3d046e36 100644 --- a/runtime/ftplugin/dircolors.vim +++ b/runtime/ftplugin/dircolors.vim @@ -1,13 +1,19 @@ " Vim filetype plugin file " Language: dircolors(1) input file " Maintainer: Nikolai Weibull -" Latest Revision: 2006-04-19 +" Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 +let s:cpo_save = &cpo +set cpo&vim + let b:undo_ftplugin = "setl com< cms< fo<" setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/runtime/ftplugin/dosini.vim b/runtime/ftplugin/dosini.vim index 354b093ee5..461403ca95 100644 --- a/runtime/ftplugin/dosini.vim +++ b/runtime/ftplugin/dosini.vim @@ -1,13 +1,19 @@ " Vim filetype plugin file " Language: Configuration File (ini file) for MSDOS/MS Windows " Maintainer: Nikolai Weibull -" Latest Revision: 2007-08-23 +" Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 +let s:cpo_save = &cpo +set cpo&vim + let b:undo_ftplugin = "setl com< cms< fo<" setlocal comments=:; commentstring=;\ %s formatoptions-=t formatoptions+=croql + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/runtime/ftplugin/dtd.vim b/runtime/ftplugin/dtd.vim index 991118779b..3b15bda3c4 100644 --- a/runtime/ftplugin/dtd.vim +++ b/runtime/ftplugin/dtd.vim @@ -1,7 +1,7 @@ " Vim filetype plugin file " Language: dtd " Maintainer: Dan Sharp -" Last Changed: 2003 Sep 29 +" Last Changed: 30 Jun 2008 " URL: http://mywebpage.netscape.com/sharppeople/vim/ftplugin if exists("b:did_ftplugin") | finish | endif @@ -13,6 +13,12 @@ let s:save_cpo = &cpo set cpo-=C setlocal commentstring= +setlocal comments=s: + +setlocal formatoptions-=t +if !exists("g:ft_dtd_autocomment") || (g:ft_dtd_autocomment == 1) + setlocal formatoptions+=croql +endif if exists("loaded_matchit") let b:match_words = ',' @@ -26,7 +32,7 @@ if has("gui_win32") endif " Undo the stuff we changed. -let b:undo_ftplugin = "setlocal commentstring<" . +let b:undo_ftplugin = "setlocal commentstring< comments< formatoptions<" . \ " | unlet! b:matchwords b:browsefilter" " Restore the saved compatibility options. diff --git a/runtime/ftplugin/elinks.vim b/runtime/ftplugin/elinks.vim index c7c11f642f..7d9257566b 100644 --- a/runtime/ftplugin/elinks.vim +++ b/runtime/ftplugin/elinks.vim @@ -1,13 +1,19 @@ " Vim filetype plugin file " Language: elinks(1) configuration file " Maintainer: Nikolai Weibull -" Latest Revision: 2006-04-19 +" Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 +let s:cpo_save = &cpo +set cpo&vim + let b:undo_ftplugin = "setl com< cms< fo<" setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/runtime/ftplugin/eruby.vim b/runtime/ftplugin/eruby.vim index 8b189df521..802f596e3d 100644 --- a/runtime/ftplugin/eruby.vim +++ b/runtime/ftplugin/eruby.vim @@ -27,7 +27,7 @@ if !exists("b:eruby_subtype") let s:lines = getline(1)."\n".getline(2)."\n".getline(3)."\n".getline(4)."\n".getline(5)."\n".getline("$") let b:eruby_subtype = matchstr(s:lines,'eruby_subtype=\zs\w\+') if b:eruby_subtype == '' - let b:eruby_subtype = matchstr(substitute(expand("%:t"),'\c\%(\.erb\)\+$','',''),'\.\zs\w\+$') + let b:eruby_subtype = matchstr(substitute(expand("%:t"),'\c\%(\.erb\|\.eruby\)\+$','',''),'\.\zs\w\+$') endif if b:eruby_subtype == 'rhtml' let b:eruby_subtype = 'html' diff --git a/runtime/ftplugin/eterm.vim b/runtime/ftplugin/eterm.vim index df5bf5007d..e072c638b1 100644 --- a/runtime/ftplugin/eterm.vim +++ b/runtime/ftplugin/eterm.vim @@ -1,14 +1,20 @@ " Vim filetype plugin file " Language: eterm(1) configuration file " Maintainer: Nikolai Weibull -" Latest Revision: 2006-04-19 +" Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 +let s:cpo_save = &cpo +set cpo&vim + let b:undo_ftplugin = "setl com< cms< inc< fo<" setlocal comments=:# commentstring=#\ %s include=^\\s*include setlocal formatoptions-=t formatoptions+=croql + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/runtime/ftplugin/fetchmail.vim b/runtime/ftplugin/fetchmail.vim index 174ed448bf..a0d4650c03 100644 --- a/runtime/ftplugin/fetchmail.vim +++ b/runtime/ftplugin/fetchmail.vim @@ -1,13 +1,19 @@ " Vim filetype plugin file " Language: fetchmail(1) RC File " Maintainer: Nikolai Weibull -" Latest Revision: 2006-04-19 +" Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 +let s:cpo_save = &cpo +set cpo&vim + let b:undo_ftplugin = "setl com< cms< fo<" setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/runtime/ftplugin/framescript.vim b/runtime/ftplugin/framescript.vim new file mode 100644 index 0000000000..805401a89b --- /dev/null +++ b/runtime/ftplugin/framescript.vim @@ -0,0 +1,30 @@ +" Vim ftplugin file +" Language: FrameScript +" Maintainer: Nikolai Weibull +" Latest Revision: 2008-07-19 + +let s:cpo_save = &cpo +set cpo&vim + +if exists("b:did_ftplugin") + finish +endif +let b:did_ftplugin = 1 + +let b:undo_ftplugin = "setl com< cms< fo< inc< | unlet! b:matchwords" + +setlocal comments=s1:/*,mb:*,ex:*/,:// commentstring=/*\ %s\ */ +setlocal formatoptions-=t formatoptions+=croql +setlocal include=^\\s*<#Include + +if exists("loaded_matchit") + let s:not_end = '\c\%(\:\c\:\c\:\c\,' . + \ s:not_end . '\:\c\' . + \ s:not_end . '\:\c\' + unlet s:not_end +endif + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/runtime/ftplugin/git.vim b/runtime/ftplugin/git.vim index 37888b15b4..9ac1aa1517 100644 --- a/runtime/ftplugin/git.vim +++ b/runtime/ftplugin/git.vim @@ -1,7 +1,7 @@ " Vim filetype plugin " Language: generic git output " Maintainer: Tim Pope -" Last Change: 2008 Feb 27 +" Last Change: 2008 Jul 30 " Only do this when not done yet for this buffer if (exists("b:did_ftplugin")) @@ -15,14 +15,14 @@ if !exists('b:git_dir') elseif $GIT_DIR != '' let b:git_dir = $GIT_DIR endif - if has('win32') || has('win64') + if (has('win32') || has('win64')) && exists('b:git_dir') let b:git_dir = substitute(b:git_dir,'\\','/','g') endif endif if exists('*shellescape') && exists('b:git_dir') && b:git_dir != '' if b:git_dir =~# '/\.git$' " Not a bare repository - let &l:path = escape(fnamemodify(b:git_dir,':t'),'\, ').','.&l:path + let &l:path = escape(fnamemodify(b:git_dir,':h'),'\, ').','.&l:path endif let &l:path = escape(b:git_dir,'\, ').','.&l:path let &l:keywordprg = 'git --git-dir='.shellescape(b:git_dir).' show' diff --git a/runtime/ftplugin/gpg.vim b/runtime/ftplugin/gpg.vim index d4bed143b5..5caa1f69c1 100644 --- a/runtime/ftplugin/gpg.vim +++ b/runtime/ftplugin/gpg.vim @@ -1,13 +1,19 @@ " Vim filetype plugin file " Language: gpg(1) configuration file " Maintainer: Nikolai Weibull -" Latest Revision: 2006-04-19 +" Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 +let s:cpo_save = &cpo +set cpo&vim + let b:undo_ftplugin = "setl com< cms< fo<" setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/runtime/ftplugin/group.vim b/runtime/ftplugin/group.vim index 447ba183c5..eef3cd68d9 100644 --- a/runtime/ftplugin/group.vim +++ b/runtime/ftplugin/group.vim @@ -1,13 +1,19 @@ " Vim filetype plugin file " Language: group(5) user group file " Maintainer: Nikolai Weibull -" Latest Revision: 2006-04-19 +" Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 +let s:cpo_save = &cpo +set cpo&vim + let b:undo_ftplugin = "setl com< cms< fo<" setlocal comments= commentstring= formatoptions-=tcroq formatoptions+=l + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/runtime/ftplugin/grub.vim b/runtime/ftplugin/grub.vim index 162fcd3eb8..21c4e3609d 100644 --- a/runtime/ftplugin/grub.vim +++ b/runtime/ftplugin/grub.vim @@ -1,13 +1,19 @@ " Vim filetype plugin file " Language: grub(8) configuration file " Maintainer: Nikolai Weibull -" Latest Revision: 2006-04-19 +" Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 +let s:cpo_save = &cpo +set cpo&vim + let b:undo_ftplugin = "setl com< cms< fo<" setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/runtime/ftplugin/haml.vim b/runtime/ftplugin/haml.vim new file mode 100644 index 0000000000..0a39d5ef3a --- /dev/null +++ b/runtime/ftplugin/haml.vim @@ -0,0 +1,66 @@ +" Vim filetype plugin +" Language: Haml +" Maintainer: Tim Pope + +" Only do this when not done yet for this buffer +if exists("b:did_ftplugin") + finish +endif + +let s:save_cpo = &cpo +set cpo-=C + +" Define some defaults in case the included ftplugins don't set them. +let s:undo_ftplugin = "" +let s:browsefilter = "All Files (*.*)\t*.*\n" +let s:match_words = "" + +runtime! ftplugin/html.vim ftplugin/html_*.vim ftplugin/html/*.vim +unlet! b:did_ftplugin + +" Override our defaults if these were set by an included ftplugin. +if exists("b:undo_ftplugin") + let s:undo_ftplugin = b:undo_ftplugin + unlet b:undo_ftplugin +endif +if exists("b:browsefilter") + let s:browsefilter = b:browsefilter + unlet b:browsefilter +endif +if exists("b:match_words") + let s:match_words = b:match_words + unlet b:match_words +endif + +runtime! ftplugin/ruby.vim ftplugin/ruby_*.vim ftplugin/ruby/*.vim +let b:did_ftplugin = 1 + +" Combine the new set of values with those previously included. +if exists("b:undo_ftplugin") + let s:undo_ftplugin = b:undo_ftplugin . " | " . s:undo_ftplugin +endif +if exists ("b:browsefilter") + let s:browsefilter = substitute(b:browsefilter,'\cAll Files (\*\.\*)\t\*\.\*\n','','') . s:browsefilter +endif +if exists("b:match_words") + let s:match_words = b:match_words . ',' . s:match_words +endif + +" Change the browse dialog on Win32 to show mainly Haml-related files +if has("gui_win32") + let b:browsefilter="Haml Files (*.haml)\t*.haml\nSass Files (*.sass)\t*.sass\n" . s:browsefilter +endif + +" Load the combined list of match_words for matchit.vim +if exists("loaded_matchit") + let b:match_words = s:match_words +endif + +setlocal commentstring=-#\ %s + +let b:undo_ftplugin = "setl cms< com< " + \ " | unlet! b:browsefilter b:match_words | " . s:undo_ftplugin + +let &cpo = s:save_cpo + +" vim:set sw=2: diff --git a/runtime/ftplugin/haskell.vim b/runtime/ftplugin/haskell.vim index f5a3a807aa..144f9f6860 100644 --- a/runtime/ftplugin/haskell.vim +++ b/runtime/ftplugin/haskell.vim @@ -1,14 +1,20 @@ " Vim filetype plugin file " Language: Haskell " Maintainer: Nikolai Weibull -" Latest Revision: 2006-04-19 +" Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 +let s:cpo_save = &cpo +set cpo&vim + let b:undo_ftplugin = "setl com< cms< fo<" setlocal comments=s1fl:{-,mb:-,ex:-},:-- commentstring=--\ %s setlocal formatoptions-=t formatoptions+=croql + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/runtime/ftplugin/help.vim b/runtime/ftplugin/help.vim index 46c844ca28..5c6dac8210 100644 --- a/runtime/ftplugin/help.vim +++ b/runtime/ftplugin/help.vim @@ -1,13 +1,19 @@ " Vim filetype plugin file " Language: Vim help file " Maintainer: Nikolai Weibull -" Latest Revision: 2006-04-19 +" Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 +let s:cpo_save = &cpo +set cpo&vim + let b:undo_ftplugin = "setl fo< tw<" setlocal formatoptions+=tcroql textwidth=78 + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/runtime/ftplugin/hostconf.vim b/runtime/ftplugin/hostconf.vim index 86796eb8ec..557fd82c53 100644 --- a/runtime/ftplugin/hostconf.vim +++ b/runtime/ftplugin/hostconf.vim @@ -1,6 +1,6 @@ " Vim filetype plugin file " Maintainer: Nikolai Weibull -" Latest Revision: 2007-09-18 +" Latest Revision: 2007-12-04 if exists("b:did_ftplugin") finish @@ -14,5 +14,5 @@ let b:undo_ftplugin = "setl com< cms< fo<" setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql -let s:cpo_save = &cpo -set cpo&vim +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/runtime/ftplugin/hostsaccess.vim b/runtime/ftplugin/hostsaccess.vim new file mode 100644 index 0000000000..a2f55acb8a --- /dev/null +++ b/runtime/ftplugin/hostsaccess.vim @@ -0,0 +1,19 @@ +" Vim filetype plugin file +" Language: hosts_access(5) control file +" Maintainer: Nikolai Weibull +" Latest Revision: 2008-07-09 + +if exists("b:did_ftplugin") + finish +endif +let b:did_ftplugin = 1 + +let s:cpo_save = &cpo +set cpo&vim + +let b:undo_ftplugin = "setl com< cms< fo<" + +setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/runtime/ftplugin/html.vim b/runtime/ftplugin/html.vim index 4797f4b460..6c8607d92b 100644 --- a/runtime/ftplugin/html.vim +++ b/runtime/ftplugin/html.vim @@ -12,8 +12,14 @@ let b:did_ftplugin = 1 let s:save_cpo = &cpo set cpo-=C -setlocal commentstring= setlocal matchpairs+=<:> +setlocal commentstring= +setlocal comments=s: + +if exists("g:ft_html_autocomment") && (g:ft_html_autocomment == 1) + setlocal formatoptions-=t formatoptions+=croql +endif + if exists('&omnifunc') " Distinguish between HTML versions @@ -77,7 +83,7 @@ if has("gui_win32") endif " Undo the stuff we changed. -let b:undo_ftplugin = "setlocal commentstring< matchpairs< omnifunc<" +let b:undo_ftplugin = "setlocal commentstring< matchpairs< omnifunc< comments< formatoptions<" . \ " | unlet! b:match_ignorecase b:match_skip b:match_words b:browsefilter" " Restore the saved compatibility options. diff --git a/runtime/ftplugin/indent.vim b/runtime/ftplugin/indent.vim index 2047b1de02..0e195b0615 100644 --- a/runtime/ftplugin/indent.vim +++ b/runtime/ftplugin/indent.vim @@ -1,14 +1,20 @@ " Vim filetype plugin file " Language: indent(1) configuration file " Maintainer: Nikolai Weibull -" Latest Revision: 2006-04-19 +" Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 +let s:cpo_save = &cpo +set cpo&vim + let b:undo_ftplugin = "setl com< cms< fo<" setlocal comments=s1:/*,mb:*,ex:*/ commentstring& setlocal formatoptions-=t formatoptions+=croql + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/runtime/ftplugin/kconfig.vim b/runtime/ftplugin/kconfig.vim index bb932188f2..1b10c86ae3 100644 --- a/runtime/ftplugin/kconfig.vim +++ b/runtime/ftplugin/kconfig.vim @@ -1,12 +1,18 @@ " Vim filetype plugin file " Maintainer: Nikolai Weibull -" Latest Revision: 2006-04-10 +" Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 +let s:cpo_save = &cpo +set cpo&vim + let b:undo_ftplugin = "setl com< cms< fo<" setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/runtime/ftplugin/ld.vim b/runtime/ftplugin/ld.vim index 544fc0d0ed..31ce5c9ffd 100644 --- a/runtime/ftplugin/ld.vim +++ b/runtime/ftplugin/ld.vim @@ -1,14 +1,20 @@ " Vim filetype plugin file " Language: ld(1) script " Maintainer: Nikolai Weibull -" Latest Revision: 2006-04-19 +" Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 +let s:cpo_save = &cpo +set cpo&vim + let b:undo_ftplugin = "setl com< cms< inc< fo<" setlocal comments=s1:/*,mb:*,ex:*/ commentstring=/*%s*/ include=^\\s*INCLUDE setlocal formatoptions-=t formatoptions+=croql + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/runtime/ftplugin/lftp.vim b/runtime/ftplugin/lftp.vim index e81684c2dc..9e2eeb52cb 100644 --- a/runtime/ftplugin/lftp.vim +++ b/runtime/ftplugin/lftp.vim @@ -1,13 +1,19 @@ " Vim filetype plugin file " Language: lftp(1) configuration file " Maintainer: Nikolai Weibull -" Latest Revision: 2006-04-19 +" Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 +let s:cpo_save = &cpo +set cpo&vim + let b:undo_ftplugin = "setl com< cms< fo<" setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/runtime/ftplugin/libao.vim b/runtime/ftplugin/libao.vim index 8845b17fc1..38bd3de92c 100644 --- a/runtime/ftplugin/libao.vim +++ b/runtime/ftplugin/libao.vim @@ -1,13 +1,19 @@ " Vim filetype plugin file " Language: libao.conf(5) configuration file " Maintainer: Nikolai Weibull -" Latest Revision: 2006-04-19 +" Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 +let s:cpo_save = &cpo +set cpo&vim + let b:undo_ftplugin = "setl com< cms< fo<" setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/runtime/ftplugin/limits.vim b/runtime/ftplugin/limits.vim index 6b18c83731..cd5b7b5c93 100644 --- a/runtime/ftplugin/limits.vim +++ b/runtime/ftplugin/limits.vim @@ -1,13 +1,19 @@ " Vim filetype plugin file " Language: limits(5) configuration file " Maintainer: Nikolai Weibull -" Latest Revision: 2006-04-19 +" Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 +let s:cpo_save = &cpo +set cpo&vim + let b:undo_ftplugin = "setl com< cms< fo<" setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/runtime/ftplugin/loginaccess.vim b/runtime/ftplugin/loginaccess.vim index c5cb1b1cb1..7c44f972f2 100644 --- a/runtime/ftplugin/loginaccess.vim +++ b/runtime/ftplugin/loginaccess.vim @@ -1,13 +1,19 @@ " Vim filetype plugin file " Language: login.access(5) configuration file " Maintainer: Nikolai Weibull -" Latest Revision: 2006-04-19 +" Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 +let s:cpo_save = &cpo +set cpo&vim + let b:undo_ftplugin = "setl com< cms< fo<" setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/runtime/ftplugin/logindefs.vim b/runtime/ftplugin/logindefs.vim index 431755e52d..668d08a002 100644 --- a/runtime/ftplugin/logindefs.vim +++ b/runtime/ftplugin/logindefs.vim @@ -1,13 +1,19 @@ " Vim filetype plugin file " Language: login.defs(5) configuration file " Maintainer: Nikolai Weibull -" Latest Revision: 2006-04-19 +" Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 +let s:cpo_save = &cpo +set cpo&vim + let b:undo_ftplugin = "setl com< cms< fo<" setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/runtime/ftplugin/logtalk.dict b/runtime/ftplugin/logtalk.dict new file mode 100644 index 0000000000..e3b9e6f2a4 --- /dev/null +++ b/runtime/ftplugin/logtalk.dict @@ -0,0 +1,164 @@ +encoding +calls +category +dynamic +end_category +end_object +end_protocol +info +initialization +object +protocol +synchronized +threaded +uses +alias +discontiguous +meta_predicate +mode +op +private +protected +public +current_object +current_protocol +current_category +object_property +protocol_property +category_property +create_object +create_protocol +create_category +abolish_object +abolish_protocol +abolish_category +complements +complements_object +extends +extends_object +extends_protocol +extends_category +implements +implements_protocol +imports +imports_category +instantiates +instantiates_class +specializes +specializes_class +abolish_events +current_event +define_events +logtalk_load +logtalk_compile +logtalk_library_path +current_logtalk_flag +set_logtalk_flag +threaded_call +threaded_once +threaded_ignore +threaded_exit +threaded_peek +threaded_wait +threaded_notify +self +this +sender +parameter +before +after +phrase +expand_term +goal_expansion +term_expansion +true +fail +call +catch +throw +unify_with_occurs_check +var +atom +integer +float +atomic +compound +nonvar +number +arg +copy_term +functor +current_predicate +predicate_property +abolish +assertz +asserta +clause +retract +retractall +bagof +findall +forall +setof +current_input +current_output +set_input +set_output +open +close +flush_output +stream_property +at_end_of_stream +set_stream_position +get_char +get_code +peek_char +peek_code +put_char +put_code +nl +get_byte +peek_byte +put_byte +read +read_term +write +writeq +write_canonical +atom_chars +atom_codes +atom_concat +number_chars +number_codes +current_op +char_conversion +current_char_conversion +once +repeat +atom_length +atom_concat +sub_atom +atom_chars +atom_codes +char_code +number_chars +number_codes +set_prolog_flag +current_prolog_flag +halt +abs +atan +ceiling +cos +exp +float_fractional_part +float_integer_part +floor +log +mod +rem +round +sign +sin +sqrt +truncate diff --git a/runtime/ftplugin/logtalk.vim b/runtime/ftplugin/logtalk.vim new file mode 100644 index 0000000000..e71307a399 --- /dev/null +++ b/runtime/ftplugin/logtalk.vim @@ -0,0 +1,18 @@ +" Logtalk filetype plugin file +" Language: Logtalk +" Maintainer: Paulo Moura +" Latest Revision: 2007-07-06 + +if exists("b:did_ftplugin") + finish +endif +let b:did_ftplugin = 1 + +let b:undo_ftplugin = "setl ts< sw< fdm< fdc< ai< dict<" + +"setlocal ts=4 +setlocal sw=4 +setlocal fdm=syntax +setlocal fdc=2 +setlocal autoindent +setlocal dict=$VIMRUNTIME/ftplugin/logtalk.dict diff --git a/runtime/ftplugin/m4.vim b/runtime/ftplugin/m4.vim index 870258409a..0ffe0ac77e 100644 --- a/runtime/ftplugin/m4.vim +++ b/runtime/ftplugin/m4.vim @@ -1,14 +1,20 @@ " Vim filetype plugin file " Language: m4 " Maintainer: Nikolai Weibull -" Latest Revision: 2006-04-19 +" Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 +let s:cpo_save = &cpo +set cpo&vim + let b:undo_ftplugin = "setl com< cms< fo<" setlocal comments=:#,:dnl commentstring=dnl\ %s setlocal formatoptions-=t formatoptions+=croql + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/runtime/ftplugin/mailaliases.vim b/runtime/ftplugin/mailaliases.vim index f52583fc8a..1b10c86ae3 100644 --- a/runtime/ftplugin/mailaliases.vim +++ b/runtime/ftplugin/mailaliases.vim @@ -1,12 +1,18 @@ " Vim filetype plugin file " Maintainer: Nikolai Weibull -" Latest Revision: 2006-03-27 +" Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 +let s:cpo_save = &cpo +set cpo&vim + let b:undo_ftplugin = "setl com< cms< fo<" setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/runtime/ftplugin/mailcap.vim b/runtime/ftplugin/mailcap.vim index df4e994c04..f4c8c232d8 100644 --- a/runtime/ftplugin/mailcap.vim +++ b/runtime/ftplugin/mailcap.vim @@ -1,13 +1,19 @@ " Vim filetype plugin file " Language: Mailcap configuration file " Maintainer: Nikolai Weibull -" Latest Revision: 2006-04-19 +" Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 +let s:cpo_save = &cpo +set cpo&vim + let b:undo_ftplugin = "setl com< cms< fo<" setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/runtime/ftplugin/manconf.vim b/runtime/ftplugin/manconf.vim index 69cf6f504d..a249a97507 100644 --- a/runtime/ftplugin/manconf.vim +++ b/runtime/ftplugin/manconf.vim @@ -1,13 +1,19 @@ " Vim filetype plugin file " Language: man.conf(5) - man configuration file " Maintainer: Nikolai Weibull -" Latest Revision: 2006-04-19 +" Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 +let s:cpo_save = &cpo +set cpo&vim + let b:undo_ftplugin = "setl com< cms< fo<" setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/runtime/ftplugin/mf.vim b/runtime/ftplugin/mf.vim index e351a13612..fd1d3ce646 100644 --- a/runtime/ftplugin/mf.vim +++ b/runtime/ftplugin/mf.vim @@ -1,14 +1,19 @@ " Vim filetype plugin file " Language: MetaFont " Maintainer: Nikolai Weibull -" Latest Revision: 2006-04-19 +" Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 +let s:cpo_save = &cpo +set cpo&vim + let b:undo_ftplugin = "setl com< cms< fo<" setlocal comments=:% commentstring=%\ %s formatoptions-=t formatoptions+=croql +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/runtime/ftplugin/modconf.vim b/runtime/ftplugin/modconf.vim index 97102a1ee7..f200e9f61e 100644 --- a/runtime/ftplugin/modconf.vim +++ b/runtime/ftplugin/modconf.vim @@ -1,14 +1,20 @@ " Vim filetype plugin file " Language: modules.conf(5) configuration file " Maintainer: Nikolai Weibull -" Latest Revision: 2006-04-19 +" Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 +let s:cpo_save = &cpo +set cpo&vim + let b:undo_ftplugin = "setl com< cms< inc< fo<" setlocal comments=:# commentstring=#\ %s include=^\\s*include setlocal formatoptions-=t formatoptions+=croql + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/runtime/ftplugin/mp.vim b/runtime/ftplugin/mp.vim index 3709782167..316fa9bb64 100644 --- a/runtime/ftplugin/mp.vim +++ b/runtime/ftplugin/mp.vim @@ -1,13 +1,16 @@ " Vim filetype plugin file " Language: MetaPost " Maintainer: Nikolai Weibull -" Latest Revision: 2006-07-04 +" Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 +let s:cpo_save = &cpo +set cpo&vim + let b:undo_ftplugin = "setl com< cms< fo<" setlocal comments=:% commentstring=%\ %s formatoptions-=t formatoptions+=croql @@ -20,3 +23,6 @@ if exists(":FixBeginfigs") != 2 g/^beginfig(\d*);$/s//\='beginfig('.i.');'/ | let i = i + 1 endfunction endif + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/runtime/ftplugin/mplayerconf.vim b/runtime/ftplugin/mplayerconf.vim index e410667d29..65034a8152 100644 --- a/runtime/ftplugin/mplayerconf.vim +++ b/runtime/ftplugin/mplayerconf.vim @@ -1,14 +1,20 @@ " Vim filetype plugin file " Language: mplayer(1) configuration file " Maintainer: Nikolai Weibull -" Latest Revision: 2006-04-19 +" Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 +let s:cpo_save = &cpo +set cpo&vim + let b:undo_ftplugin = "setl com< cms< inc< fo<" setlocal comments=:# commentstring=#\ %s include=^\\s*include setlocal formatoptions-=t formatoptions+=croql + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/runtime/ftplugin/muttrc.vim b/runtime/ftplugin/muttrc.vim index 18b06d8139..a109e5ddda 100644 --- a/runtime/ftplugin/muttrc.vim +++ b/runtime/ftplugin/muttrc.vim @@ -8,9 +8,15 @@ if exists("b:did_ftplugin") endif let b:did_ftplugin = 1 +let s:cpo_save = &cpo +set cpo&vim + let b:undo_ftplugin = "setl com< cms< inc< fo<" setlocal comments=:# commentstring=#\ %s setlocal formatoptions-=t formatoptions+=croql let &l:include = '^\s*source\>' + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/runtime/ftplugin/nanorc.vim b/runtime/ftplugin/nanorc.vim index 67a2a48cc0..be20d12503 100644 --- a/runtime/ftplugin/nanorc.vim +++ b/runtime/ftplugin/nanorc.vim @@ -1,13 +1,19 @@ " Vim filetype plugin file " Language: nanorc(5) - GNU nano configuration file " Maintainer: Nikolai Weibull -" Latest Revision: 2006-04-19 +" Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 +let s:cpo_save = &cpo +set cpo&vim + let b:undo_ftplugin = "setl com< cms< fo<" setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/runtime/ftplugin/netrc.vim b/runtime/ftplugin/netrc.vim index 0f9417a831..105a1d3a8e 100644 --- a/runtime/ftplugin/netrc.vim +++ b/runtime/ftplugin/netrc.vim @@ -1,13 +1,19 @@ " Vim filetype plugin file " Language: netrc(5) configuration file " Maintainer: Nikolai Weibull -" Latest Revision: 2006-04-19 +" Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 +let s:cpo_save = &cpo +set cpo&vim + let b:undo_ftplugin = "setl com< cms< fo<" setlocal comments= commentstring= formatoptions-=tcroq formatoptions+=l + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/runtime/ftplugin/nsis.vim b/runtime/ftplugin/nsis.vim new file mode 100644 index 0000000000..acc26208c4 --- /dev/null +++ b/runtime/ftplugin/nsis.vim @@ -0,0 +1,22 @@ +" Vim ftplugin file +" Language: NSIS script +" Maintainer: Nikolai Weibull +" Latest Revision: 2008-07-09 + +let s:cpo_save = &cpo +set cpo&vim + +if exists("b:did_ftplugin") + finish +endif +let b:did_ftplugin = 1 + +let b:undo_ftplugin = "setl com< cms< fo< def< inc<" + +setlocal comments=s1:/*,mb:*,ex:*/,b:#,:; commentstring=;\ %s +setlocal formatoptions-=t formatoptions+=croql +setlocal define=^\\s*!define\\%(\\%(utc\\)\\=date\\|math\\)\\= +setlocal include=^\\s*!include\\%(/NONFATAL\\)\\= + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/runtime/ftplugin/ocaml.vim b/runtime/ftplugin/ocaml.vim index 53431c9b0b..7acf493280 100644 --- a/runtime/ftplugin/ocaml.vim +++ b/runtime/ftplugin/ocaml.vim @@ -5,7 +5,8 @@ " Stefano Zacchiroli " Vincent Aravantinos " URL: http://www.ocaml.info/vim/ftplugin/ocaml.vim -" Last Change: 2007 Sep 09 - Added .annot support for ocamlbuild, python not +" Last Change: 2008 Jul 17 - Bugfix related to fnameescape (VA) +" 2007 Sep 09 - Added .annot support for ocamlbuild, python not " needed anymore (VA) " 2006 May 01 - Added .annot support for file.whateverext (SZ) " 2006 Apr 11 - Fixed an initialization bug; fixed ASS abbrev (MM) @@ -16,6 +17,17 @@ if exists("b:did_ftplugin") endif let b:did_ftplugin=1 +" some macro +if exists('*fnameescape') + function! s:Fnameescape(s) + return fnameescape(a:s) + endfun +else + function! s:Fnameescape(s) + return escape(a:s," \t\n*?[{`$\\%#'\"|!<") + endfun +endif + " Error handling -- helps moving where the compiler wants you to go let s:cposet=&cpoptions set cpo-=C @@ -71,14 +83,14 @@ if !exists("g:did_ocaml_switch") map S :call OCaml_switch(1) fun OCaml_switch(newwin) if (match(bufname(""), "\\.mli$") >= 0) - let fname = substitute(bufname(""), "\\.mli$", ".ml", "") + let fname = s:Fnameescape(substitute(bufname(""), "\\.mli$", ".ml", "")) if (a:newwin == 1) exec "new " . fname else exec "arge " . fname endif elseif (match(bufname(""), "\\.ml$") >= 0) - let fname = bufname("") . "i" + let fname = s:Fnameescape(bufname("")) . "i" if (a:newwin == 1) exec "new " . fname else @@ -260,6 +272,7 @@ endfunction " For the moment, the only possible keyword is \"type\"." " >> + " 1. Finding the annotation file even if we use ocamlbuild " In: two strings representing paths @@ -286,16 +299,16 @@ endfunction function! s:Locate_annotation() if !b:annotation_file_located - silent exe 'cd' expand('%:p:h') + silent exe 'cd' s:Fnameescape(expand('%:p:h')) - let annot_file_name = expand('%:r').'.annot' + let annot_file_name = s:Fnameescape(expand('%:r')).'.annot' " 1st case : the annot file is in the same directory as the buffer (no ocamlbuild) let b:annot_file_path = findfile(annot_file_name,'.') if b:annot_file_path != '' let b:annot_file_path = getcwd().'/'.b:annot_file_path let b:_build_path = '' - let b:source_file_relative_path = expand('%') + let b:source_file_relative_path = s:Fnameescape(expand('%')) else " 2nd case : the buffer and the _build directory are in the same directory " .. @@ -310,7 +323,7 @@ endfunction if b:annot_file_path != '' let b:annot_file_path = getcwd().'/'.b:annot_file_path endif - let b:source_file_relative_path = expand('%') + let b:source_file_relative_path = s:Fnameescape(expand('%')) else " 3rd case : the _build directory is in a directory higher in the file hierarchy " (it can't be deeper by ocamlbuild requirements) @@ -325,9 +338,9 @@ endfunction let b:_build_path = finddir('_build',';') if b:_build_path != '' let project_path = substitute(b:_build_path,'/_build$','','') - let path_relative_to_project = substitute(expand('%:p:h'),project_path.'/','','') + let path_relative_to_project = s:Fnameescape(substitute(expand('%:p:h'),project_path.'/','','')) let b:annot_file_path = findfile(annot_file_name,project_path.'/_build/'.path_relative_to_project) - let b:source_file_relative_path = substitute(expand('%:p'),project_path.'/','','') + let b:source_file_relative_path = s:Fnameescape(substitute(expand('%:p'),project_path.'/','','')) else let b:annot_file_path = findfile(annot_file_name,'**') "4th case : what if the user decided to change the name of the _build directory ? @@ -339,7 +352,7 @@ endfunction let b:annot_file_path = getcwd().'/'.b:annot_file_path let b:_build_path = getcwd().'/'.b:_build_path endif - let b:source_file_relative_path = expand('%') + let b:source_file_relative_path = s:Fnameescape(expand('%')) else " 4b. anarchy : the renamed _build directory may be higher in the hierarchy " this will work if the file for which we are looking annotations has a unique name in the whole project @@ -380,16 +393,16 @@ endfunction set hidden let s:current_buf = bufname('%') if bufloaded(b:annot_file_path) - silent exe 'keepj keepalt' 'buffer' b:annot_file_path + silent exe 'keepj keepalt' 'buffer' s:Fnameescape(b:annot_file_path) else - silent exe 'keepj keepalt' 'view' b:annot_file_path + silent exe 'keepj keepalt' 'view' s:Fnameescape(b:annot_file_path) endif endfun " After call: " The original buffer has been restored in the exact same state as before. function! s:Exit_annotation_buffer() - silent exe 'keepj keepalt' 'buffer' s:current_buf + silent exe 'keepj keepalt' 'buffer' s:Fnameescape(s:current_buf) let &l:hidden = s:current_hidden call setpos('.',s:current_pos) endfun diff --git a/runtime/ftplugin/pamconf.vim b/runtime/ftplugin/pamconf.vim index cf9707aab6..96d96461e2 100644 --- a/runtime/ftplugin/pamconf.vim +++ b/runtime/ftplugin/pamconf.vim @@ -1,13 +1,19 @@ " Vim filetype plugin file " Language: pam(8) configuration file " Maintainer: Nikolai Weibull -" Latest Revision: 2006-04-19 +" Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 +let s:cpo_save = &cpo +set cpo&vim + let b:undo_ftplugin = "setl com< cms< fo<" setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/runtime/ftplugin/passwd.vim b/runtime/ftplugin/passwd.vim index 20f2b7f58d..5088c43359 100644 --- a/runtime/ftplugin/passwd.vim +++ b/runtime/ftplugin/passwd.vim @@ -1,13 +1,19 @@ " Vim filetype plugin file " Language: passwd(5) password file " Maintainer: Nikolai Weibull -" Latest Revision: 2006-04-19 +" Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 +let s:cpo_save = &cpo +set cpo&vim + let b:undo_ftplugin = "setl com< cms< fo<" setlocal comments= commentstring= formatoptions-=tcroq formatoptions+=l + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/runtime/ftplugin/perl.vim b/runtime/ftplugin/perl.vim index 3f3e570b8e..3771005644 100644 --- a/runtime/ftplugin/perl.vim +++ b/runtime/ftplugin/perl.vim @@ -1,7 +1,7 @@ " Vim filetype plugin file " Language: Perl " Maintainer: Dan Sharp -" Last Change: 2007 Nov 30 +" Last Change: 17 Jul 2008 " URL: http://mywebpage.netscape.com/sharppeople/vim/ftplugin if exists("b:did_ftplugin") | finish | endif @@ -13,6 +13,7 @@ let s:save_cpo = &cpo set cpo-=C setlocal formatoptions+=crq +setlocal keywordprg=perldoc\ -f setlocal comments=:# setlocal commentstring=#%s @@ -63,7 +64,7 @@ let &l:path=perlpath "--------------------------------------------- " Undo the stuff we changed. -let b:undo_ftplugin = "setlocal fo< com< cms< inc< inex< def< isf<" . +let b:undo_ftplugin = "setlocal fo< com< cms< inc< inex< def< isf< kp<" . \ " | unlet! b:browsefilter" " Restore the saved compatibility options. diff --git a/runtime/ftplugin/pinfo.vim b/runtime/ftplugin/pinfo.vim index 7f1ecdfb59..6ec1f87b9e 100644 --- a/runtime/ftplugin/pinfo.vim +++ b/runtime/ftplugin/pinfo.vim @@ -1,13 +1,19 @@ " Vim filetype plugin file " Language: pinfo(1) configuration file " Maintainer: Nikolai Weibull -" Latest Revision: 2006-04-19 +" Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 +let s:cpo_save = &cpo +set cpo&vim + let b:undo_ftplugin = "setl com< cms< fo<" setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/runtime/ftplugin/procmail.vim b/runtime/ftplugin/procmail.vim index a8db58eb96..cc2ceede19 100644 --- a/runtime/ftplugin/procmail.vim +++ b/runtime/ftplugin/procmail.vim @@ -1,15 +1,21 @@ " Vim filetype plugin file " Language: procmail(1) configuration file " Maintainer: Nikolai Weibull -" Latest Revision: 2006-04-19 +" Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 +let s:cpo_save = &cpo +set cpo&vim + let b:undo_ftplugin = "setl com< cms< inc< fo<" setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql let &l:include = '^\s*INCLUDERC\>' + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/runtime/ftplugin/prolog.vim b/runtime/ftplugin/prolog.vim index cf191a90be..caeb574c5a 100644 --- a/runtime/ftplugin/prolog.vim +++ b/runtime/ftplugin/prolog.vim @@ -1,14 +1,20 @@ " Vim filetype plugin file " Language: Prolog " Maintainer: Nikolai Weibull -" Latest Revision: 2006-04-19 +" Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 +let s:cpo_save = &cpo +set cpo&vim + let b:undo_ftplugin = "setl com< cms< fo<" setlocal comments=s1:/*,mb:*,ex:*/,:% commentstring=%\ %s setlocal formatoptions-=t formatoptions+=croql + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/runtime/ftplugin/protocols.vim b/runtime/ftplugin/protocols.vim index b3679bd591..2486ff9370 100644 --- a/runtime/ftplugin/protocols.vim +++ b/runtime/ftplugin/protocols.vim @@ -1,13 +1,19 @@ " Vim filetype plugin file " Language: protocols(5) - Internet protocols definition file " Maintainer: Nikolai Weibull -" Latest Revision: 2006-04-19 +" Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 +let s:cpo_save = &cpo +set cpo&vim + let b:undo_ftplugin = "setl com< cms< fo<" setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/runtime/ftplugin/quake.vim b/runtime/ftplugin/quake.vim index 25c6e7e50e..f62693b11a 100644 --- a/runtime/ftplugin/quake.vim +++ b/runtime/ftplugin/quake.vim @@ -1,13 +1,19 @@ " Vim filetype plugin file " Language: Quake[1-3] configuration file " Maintainer: Nikolai Weibull -" Latest Revision: 2006-04-19 +" Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 +let s:cpo_save = &cpo +set cpo&vim + let b:undo_ftplugin = "setl com< cms< fo<" setlocal comments=:// commentstring=//\ %s formatoptions-=t formatoptions+=croql + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/runtime/ftplugin/racc.vim b/runtime/ftplugin/racc.vim index 72c1e14cdc..7ff22f8937 100644 --- a/runtime/ftplugin/racc.vim +++ b/runtime/ftplugin/racc.vim @@ -1,14 +1,20 @@ " Vim filetype plugin file " Language: Racc input file " Maintainer: Nikolai Weibull -" Latest Revision: 2006-04-19 +" Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 +let s:cpo_save = &cpo +set cpo&vim + let b:undo_ftplugin = "setl com< cms< fo<" setlocal comments=s1:/*,mb:*,ex:*/,:# commentstring=#\ %s setlocal formatoptions-=t formatoptions+=croql + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/runtime/ftplugin/readline.vim b/runtime/ftplugin/readline.vim index 9656c57572..0a4dbb5c03 100644 --- a/runtime/ftplugin/readline.vim +++ b/runtime/ftplugin/readline.vim @@ -1,13 +1,19 @@ " Vim filetype plugin file " Language: readline(3) configuration file " Maintainer: Nikolai Weibull -" Latest Revision: 2006-04-19 +" Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 +let s:cpo_save = &cpo +set cpo&vim + let b:undo_ftplugin = "setl com< cms< fo<" setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/runtime/ftplugin/rnc.vim b/runtime/ftplugin/rnc.vim index a5d21fb26d..2b8fd50d8d 100644 --- a/runtime/ftplugin/rnc.vim +++ b/runtime/ftplugin/rnc.vim @@ -1,13 +1,19 @@ " Vim filetype plugin file " Language: Relax NG compact syntax " Maintainer: Nikolai Weibull -" Latest Revision: 2006-04-19 +" Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 +let s:cpo_save = &cpo +set cpo&vim + let b:undo_ftplugin = "setl com< cms< fo<" setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/runtime/ftplugin/rst.vim b/runtime/ftplugin/rst.vim index 8fc25e9e24..b871cf1486 100644 --- a/runtime/ftplugin/rst.vim +++ b/runtime/ftplugin/rst.vim @@ -1,14 +1,20 @@ " Vim filetype plugin file " Language: reStructuredText documentation format " Maintainer: Nikolai Weibull -" Latest Revision: 2006-04-19 +" Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 +let s:cpo_save = &cpo +set cpo&vim + let b:undo_ftplugin = "setl com< cms< et< fo<" setlocal comments=fb:.. commentstring=..\ %s expandtab setlocal formatoptions+=tcroql + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/runtime/ftplugin/sass.vim b/runtime/ftplugin/sass.vim new file mode 100644 index 0000000000..ad039772ad --- /dev/null +++ b/runtime/ftplugin/sass.vim @@ -0,0 +1,18 @@ +" Vim filetype plugin +" Language: Sass +" Maintainer: Tim Pope + +" Only do this when not done yet for this buffer +if exists("b:did_ftplugin") + finish +endif +let b:did_ftplugin = 1 + +let b:undo_ftplugin = "setl cms< inc< ofu<" + +setlocal commentstring=//\ %s +setlocal omnifunc=csscomplete#CompleteCSS + +let &l:include = '^\s*@import\s\+\%(url(\)\=' + +" vim:set sw=2: diff --git a/runtime/ftplugin/screen.vim b/runtime/ftplugin/screen.vim index 92ce475b8e..95c3849556 100644 --- a/runtime/ftplugin/screen.vim +++ b/runtime/ftplugin/screen.vim @@ -1,13 +1,19 @@ " Vim filetype plugin file " Language: screen(1) configuration file " Maintainer: Nikolai Weibull -" Latest Revision: 2006-04-19 +" Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 +let s:cpo_save = &cpo +set cpo&vim + let b:undo_ftplugin = "setl com< cms< fo<" setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/runtime/ftplugin/sensors.vim b/runtime/ftplugin/sensors.vim index e1f66fc07e..813d14c0e1 100644 --- a/runtime/ftplugin/sensors.vim +++ b/runtime/ftplugin/sensors.vim @@ -1,13 +1,19 @@ " Vim filetype plugin file " Language: sensors.conf(5) - libsensors configuration file " Maintainer: Nikolai Weibull -" Latest Revision: 2006-04-19 +" Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 +let s:cpo_save = &cpo +set cpo&vim + let b:undo_ftplugin = "setl com< cms< fo<" setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/runtime/ftplugin/services.vim b/runtime/ftplugin/services.vim index d670cd90a8..d34349ee28 100644 --- a/runtime/ftplugin/services.vim +++ b/runtime/ftplugin/services.vim @@ -1,13 +1,19 @@ " Vim filetype plugin file " Language: services(5) - Internet network services list " Maintainer: Nikolai Weibull -" Latest Revision: 2006-04-19 +" Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 +let s:cpo_save = &cpo +set cpo&vim + let b:undo_ftplugin = "setl com< cms< fo<" setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/runtime/ftplugin/setserial.vim b/runtime/ftplugin/setserial.vim index 4b4796bc03..f9d5945787 100644 --- a/runtime/ftplugin/setserial.vim +++ b/runtime/ftplugin/setserial.vim @@ -1,13 +1,19 @@ " Vim filetype plugin file " Language: setserial(8) configuration file " Maintainer: Nikolai Weibull -" Latest Revision: 2006-04-19 +" Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 +let s:cpo_save = &cpo +set cpo&vim + let b:undo_ftplugin = "setl com< cms< fo<" setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/runtime/ftplugin/sieve.vim b/runtime/ftplugin/sieve.vim index d906e19875..9a8759c024 100644 --- a/runtime/ftplugin/sieve.vim +++ b/runtime/ftplugin/sieve.vim @@ -1,14 +1,20 @@ " Vim filetype plugin file " Language: Sieve filtering language input file " Maintainer: Nikolai Weibull -" Latest Revision: 2006-04-19 +" Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 +let s:cpo_save = &cpo +set cpo&vim + let b:undo_ftplugin = "setl com< cms< fo<" setlocal comments=s1:/*,mb:*,ex:*/,:# commentstring=#\ %s setlocal formatoptions-=t formatoptions+=croql + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/runtime/ftplugin/slpconf.vim b/runtime/ftplugin/slpconf.vim index 8c92a55b2c..0c45689672 100644 --- a/runtime/ftplugin/slpconf.vim +++ b/runtime/ftplugin/slpconf.vim @@ -1,14 +1,20 @@ " Vim filetype plugin file " Language: RFC 2614 - An API for Service Location configuration file " Maintainer: Nikolai Weibull -" Latest Revision: 2006-04-19 +" Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 +let s:cpo_save = &cpo +set cpo&vim + let b:undo_ftplugin = "setl com< cms< fo<" setlocal comments=:#,:; commentstring=#\ %s setlocal formatoptions-=t formatoptions+=croql + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/runtime/ftplugin/slpreg.vim b/runtime/ftplugin/slpreg.vim index 07e42c1f26..e9d533e2d4 100644 --- a/runtime/ftplugin/slpreg.vim +++ b/runtime/ftplugin/slpreg.vim @@ -1,14 +1,20 @@ " Vim filetype plugin file " Language: RFC 2614 - An API for Service Location registration file " Maintainer: Nikolai Weibull -" Latest Revision: 2006-04-19 +" Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 +let s:cpo_save = &cpo +set cpo&vim + let b:undo_ftplugin = "setl com< cms< fo<" setlocal comments=:#,:; commentstring=#\ %s setlocal formatoptions-=t formatoptions+=croql + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/runtime/ftplugin/slpspi.vim b/runtime/ftplugin/slpspi.vim index d6a6751744..8d64d476f1 100644 --- a/runtime/ftplugin/slpspi.vim +++ b/runtime/ftplugin/slpspi.vim @@ -1,14 +1,20 @@ " Vim filetype plugin file " Language: RFC 2614 - An API for Service Location SPI file " Maintainer: Nikolai Weibull -" Latest Revision: 2006-04-19 +" Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 +let s:cpo_save = &cpo +set cpo&vim + let b:undo_ftplugin = "setl com< cms< fo<" setlocal comments=:#,:; commentstring=#\ %s setlocal formatoptions-=t formatoptions+=croql + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/runtime/ftplugin/sshconfig.vim b/runtime/ftplugin/sshconfig.vim index 3552696a6e..f940af972e 100644 --- a/runtime/ftplugin/sshconfig.vim +++ b/runtime/ftplugin/sshconfig.vim @@ -1,13 +1,19 @@ " Vim filetype plugin file " Language: OpenSSH client configuration file " Maintainer: Nikolai Weibull -" Latest Revision: 2006-04-19 +" Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 +let s:cpo_save = &cpo +set cpo&vim + let b:undo_ftplugin = "setl com< cms< fo<" setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/runtime/ftplugin/sudoers.vim b/runtime/ftplugin/sudoers.vim index a698f04d6a..5756302178 100644 --- a/runtime/ftplugin/sudoers.vim +++ b/runtime/ftplugin/sudoers.vim @@ -1,13 +1,19 @@ " Vim filetype plugin file " Language: sudoers(5) configuration files " Maintainer: Nikolai Weibull -" Latest Revision: 2006-04-19 +" Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 +let s:cpo_save = &cpo +set cpo&vim + let b:undo_ftplugin = "setl com< cms< fo<" setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/runtime/ftplugin/sysctl.vim b/runtime/ftplugin/sysctl.vim index 6b1ac6c045..fb1098dd3b 100644 --- a/runtime/ftplugin/sysctl.vim +++ b/runtime/ftplugin/sysctl.vim @@ -1,14 +1,20 @@ " Vim filetype plugin file " Language: sysctl.conf(5) configuration file " Maintainer: Nikolai Weibull -" Latest Revision: 2006-04-19 +" Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 +let s:cpo_save = &cpo +set cpo&vim + let b:undo_ftplugin = "setl com< cms< fo<" setlocal comments=:;,:# commentstring=#\ %s setlocal formatoptions-=t formatoptions+=croql + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/runtime/ftplugin/terminfo.vim b/runtime/ftplugin/terminfo.vim index a473bcd06e..7ce31d1ca1 100644 --- a/runtime/ftplugin/terminfo.vim +++ b/runtime/ftplugin/terminfo.vim @@ -1,13 +1,19 @@ " Vim filetype plugin file " Language: terminfo(5) definition " Maintainer: Nikolai Weibull -" Latest Revision: 2006-04-19 +" Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 +let s:cpo_save = &cpo +set cpo&vim + let b:undo_ftplugin = "setl com< cms< fo<" setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/runtime/ftplugin/udevconf.vim b/runtime/ftplugin/udevconf.vim index c0a09827b5..6042e14413 100644 --- a/runtime/ftplugin/udevconf.vim +++ b/runtime/ftplugin/udevconf.vim @@ -1,13 +1,19 @@ " Vim filetype plugin file " Language: udev(8) configuration file " Maintainer: Nikolai Weibull -" Latest Revision: 2006-04-19 +" Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 +let s:cpo_save = &cpo +set cpo&vim + let b:undo_ftplugin = "setl com< cms< fo<" setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/runtime/ftplugin/udevperm.vim b/runtime/ftplugin/udevperm.vim index 82602b1ea4..e7ad31d071 100644 --- a/runtime/ftplugin/udevperm.vim +++ b/runtime/ftplugin/udevperm.vim @@ -1,13 +1,19 @@ " Vim filetype plugin file " Language: udev(8) permissions file " Maintainer: Nikolai Weibull -" Latest Revision: 2006-04-19 +" Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 +let s:cpo_save = &cpo +set cpo&vim + let b:undo_ftplugin = "setl com< cms< fo<" setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/runtime/ftplugin/udevrules.vim b/runtime/ftplugin/udevrules.vim index 3cb4c33467..be8d646968 100644 --- a/runtime/ftplugin/udevrules.vim +++ b/runtime/ftplugin/udevrules.vim @@ -1,13 +1,19 @@ " Vim filetype plugin file " Language: udev(8) rules file " Maintainer: Nikolai Weibull -" Latest Revision: 2006-04-19 +" Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 +let s:cpo_save = &cpo +set cpo&vim + let b:undo_ftplugin = "setl com< cms< fo<" setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/runtime/ftplugin/updatedb.vim b/runtime/ftplugin/updatedb.vim index db35fee153..f4e7bcebd5 100644 --- a/runtime/ftplugin/updatedb.vim +++ b/runtime/ftplugin/updatedb.vim @@ -1,13 +1,19 @@ " Vim filetype plugin file " Language: updatedb.conf(5) configuration file " Maintainer: Nikolai Weibull -" Latest Revision: 2006-04-19 +" Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 +let s:cpo_save = &cpo +set cpo&vim + let b:undo_ftplugin = "setl com< cms< fo<" setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/runtime/ftplugin/xdefaults.vim b/runtime/ftplugin/xdefaults.vim index b441dfe7f7..cd851829ca 100644 --- a/runtime/ftplugin/xdefaults.vim +++ b/runtime/ftplugin/xdefaults.vim @@ -1,14 +1,20 @@ " Vim filetype plugin file " Language: X resources files like ~/.Xdefaults (xrdb) " Maintainer: Nikolai Weibull -" Latest Revision: 2006-04-19 +" Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 +let s:cpo_save = &cpo +set cpo&vim + let b:undo_ftplugin = "setl com< cms< inc< fo<" setlocal comments=s1:/*,mb:*,ex:*/,:! commentstring& inc& setlocal formatoptions-=t formatoptions+=croql + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/runtime/ftplugin/xf86conf.vim b/runtime/ftplugin/xf86conf.vim index 29e9eac66c..ab7569a100 100644 --- a/runtime/ftplugin/xf86conf.vim +++ b/runtime/ftplugin/xf86conf.vim @@ -1,13 +1,19 @@ " Vim filetype plugin file " Language: XFree86 Configuration File " Maintainer: Nikolai Weibull -" Latest Revision: 2006-04-19 +" Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 +let s:cpo_save = &cpo +set cpo&vim + let b:undo_ftplugin = "setl com< cms< fo<" setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/runtime/ftplugin/xinetd.vim b/runtime/ftplugin/xinetd.vim index b62dec57bf..f209af18be 100644 --- a/runtime/ftplugin/xinetd.vim +++ b/runtime/ftplugin/xinetd.vim @@ -1,14 +1,20 @@ " Vim filetype plugin file " Language: xinetd.conf(5) configuration file " Maintainer: Nikolai Weibull -" Latest Revision: 2006-04-19 +" Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 +let s:cpo_save = &cpo +set cpo&vim + let b:undo_ftplugin = "setl com< cms< inc< fo<" setlocal comments=:# commentstring=#\ %s include=^\\s*include setlocal formatoptions-=t formatoptions+=croql + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/runtime/ftplugin/xml.vim b/runtime/ftplugin/xml.vim index 8cff537764..55d9ee6c5b 100644 --- a/runtime/ftplugin/xml.vim +++ b/runtime/ftplugin/xml.vim @@ -1,7 +1,7 @@ " Vim filetype plugin file " Language: xml " Maintainer: Dan Sharp -" Last Changed: 2003 Sep 29 +" Last Changed: 30 Jun 2008 " URL: http://mywebpage.netscape.com/sharppeople/vim/ftplugin if exists("b:did_ftplugin") | finish | endif @@ -13,6 +13,13 @@ let s:save_cpo = &cpo set cpo-=C setlocal commentstring= +setlocal comments=s: + +setlocal formatoptions-=t +if !exists("g:ft_xml_autocomment") || (g:ft_xml_autocomment == 1) + setlocal formatoptions+=croql +endif + " XML: thanks to Johannes Zellner and Akbar Ibrahim " - case sensitive @@ -49,7 +56,7 @@ if has("gui_win32") endif " Undo the stuff we changed. -let b:undo_ftplugin = "setlocal cms<" . +let b:undo_ftplugin = "setlocal commentstring< comments< formatoptions<" . \ " | unlet! b:match_ignorecase b:match_words b:browsefilter" " Restore the saved compatibility options. diff --git a/runtime/ftplugin/xmodmap.vim b/runtime/ftplugin/xmodmap.vim index a0d913ea45..027ae09ff2 100644 --- a/runtime/ftplugin/xmodmap.vim +++ b/runtime/ftplugin/xmodmap.vim @@ -1,13 +1,19 @@ " Vim filetype plugin file " Language: xmodmap(1) definition file " Maintainer: Nikolai Weibull -" Latest Revision: 2006-04-19 +" Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 +let s:cpo_save = &cpo +set cpo&vim + let b:undo_ftplugin = "setl com< cms< fo<" setlocal comments=:! commentstring=!\ %s formatoptions-=t formatoptions+=croql + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/runtime/ftplugin/yaml.vim b/runtime/ftplugin/yaml.vim index a2893cdad8..b88803ab3a 100644 --- a/runtime/ftplugin/yaml.vim +++ b/runtime/ftplugin/yaml.vim @@ -1,14 +1,20 @@ " Vim filetype plugin file " Language: YAML (YAML Ain't Markup Language) " Maintainer: Nikolai Weibull -" Latest Revision: 2006-04-19 +" Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 +let s:cpo_save = &cpo +set cpo&vim + let b:undo_ftplugin = "setl com< cms< et< fo<" setlocal comments=:# commentstring=#\ %s expandtab setlocal formatoptions-=t formatoptions+=croql + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/runtime/ftplugin/zsh.vim b/runtime/ftplugin/zsh.vim index c8f82a5617..c6db781711 100644 --- a/runtime/ftplugin/zsh.vim +++ b/runtime/ftplugin/zsh.vim @@ -1,13 +1,19 @@ " Vim filetype plugin file " Language: Zsh shell script " Maintainer: Nikolai Weibull -" Latest Revision: 2006-04-19 +" Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 +let s:cpo_save = &cpo +set cpo&vim + let b:undo_ftplugin = "setl com< cms< fo<" setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/runtime/indent/ada.vim b/runtime/indent/ada.vim index f2fc1ab4b0..e56aaffecf 100644 --- a/runtime/indent/ada.vim +++ b/runtime/indent/ada.vim @@ -3,17 +3,19 @@ " Language: Ada (2005) " $Id$ " Copyright: Copyright (C) 2006 Martin Krischik -" Maintainer: Martin Krischik +" Maintainer: Martin Krischik " Neil Bird +" Ned Okie " $Author$ " $Date$ -" Version: 4.2 +" Version: 4.6 " $Revision$ -" $HeadURL: https://svn.sourceforge.net/svnroot/gnuada/trunk/tools/vim/indent/ada.vim $ +" $HeadURL: https://gnuada.svn.sourceforge.net/svnroot/gnuada/trunk/tools/vim/indent/ada.vim $ " History: 24.05.2006 MK Unified Headers " 16.07.2006 MK Ada-Mode as vim-ball " 15.10.2006 MK Bram's suggestion for runtime integration " 05.11.2006 MK Bram suggested to save on spaces +" 19.09.2007 NO g: missing before ada#Comment " Help Page: ft-vim-indent "------------------------------------------------------------------------------ " ToDo: @@ -27,7 +29,7 @@ if exists("b:did_indent") || version < 700 finish endif -let b:did_indent = 1 +let b:did_indent = 45 setlocal indentexpr=GetAdaIndent() setlocal indentkeys-=0{,0} @@ -58,7 +60,7 @@ endif " Seems to work OK as it 'starts' with the indent of the /previous/ line. function s:MainBlockIndent (prev_indent, prev_lnum, blockstart, stop_at) let lnum = a:prev_lnum - let line = substitute( getline(lnum), ada#Comment, '', '' ) + let line = substitute( getline(lnum), g:ada#Comment, '', '' ) while lnum > 1 if a:stop_at != '' && line =~ '^\s*' . a:stop_at && indent(lnum) < a:prev_indent return a:prev_indent @@ -72,7 +74,7 @@ function s:MainBlockIndent (prev_indent, prev_lnum, blockstart, stop_at) let lnum = prevnonblank(lnum - 1) " Get previous non-blank/non-comment-only line while 1 - let line = substitute( getline(lnum), ada#Comment, '', '' ) + let line = substitute( getline(lnum), g:ada#Comment, '', '' ) if line !~ '^\s*$' && line !~ '^\s*#' break endif @@ -116,7 +118,7 @@ function s:EndBlockIndent( prev_indent, prev_lnum, blockstart, blockend ) " Get previous non-blank/non-comment-only line while 1 let line = getline(lnum) - let line = substitute( line, ada#Comment, '', '' ) + let line = substitute( line, g:ada#Comment, '', '' ) if line !~ '^\s*$' break endif @@ -143,7 +145,8 @@ function s:StatementIndent( current_indent, prev_lnum ) let lnum = prevnonblank(lnum - 1) " Get previous non-blank/non-comment-only line while 1 - let line = substitute( getline(lnum), ada#Comment, '', '' ) + let line = substitute( getline(lnum), g:ada#Comment, '', '' ) + if line !~ '^\s*$' && line !~ '^\s*#' break endif @@ -222,7 +225,7 @@ function GetAdaIndent() exe lnum exe 'normal! $F)%' if getline('.') =~ '^\s*(' - " Dire layout - use previous indent (could check for ada#Comment here) + " Dire layout - use previous indent (could check for g:ada#Comment here) let ind = indent( prevnonblank( line('.')-1 ) ) else let ind = indent('.') diff --git a/runtime/indent/dtd.vim b/runtime/indent/dtd.vim new file mode 100644 index 0000000000..3c35116aaa --- /dev/null +++ b/runtime/indent/dtd.vim @@ -0,0 +1,325 @@ +" Vim indent file +" Language: DTD (Document Type Definition for XML) +" Maintainer: Nikolai Weibull +" Latest Revision: 2008-07-18 + +let s:cpo_save = &cpo +set cpo&vim + +setlocal indentexpr=GetDTDIndent() +setlocal indentkeys=!^F,o,O,> +setlocal nosmartindent + +if exists("*GetDTDIndent") + finish +endif + +" TODO: Needs to be adjusted to stop at [, <, and ]. +let s:token_pattern = '^[^[:space:]]\+' + +function s:lex1(input, start, ...) + let pattern = a:0 > 0 ? a:1 : s:token_pattern + let start = matchend(a:input, '^\_s*', a:start) + if start == -1 + return ["", a:start] + endif + let end = matchend(a:input, pattern, start) + if end == -1 + return ["", a:start] + endif + let token = strpart(a:input, start, end - start) + return [token, end] +endfunction + +function s:lex(input, start, ...) + let pattern = a:0 > 0 ? a:1 : s:token_pattern + let info = s:lex1(a:input, a:start, pattern) + while info[0] == '--' + let info = s:lex1(a:input, info[1], pattern) + while info[0] != "" && info[0] != '--' + let info = s:lex1(a:input, info[1], pattern) + endwhile + if info[0] == "" + return info + endif + let info = s:lex1(a:input, info[1], pattern) + endwhile + return info +endfunction + +function s:indent_to_innermost_parentheses(line, end) + let token = '(' + let end = a:end + let parentheses = [end - 1] + while token != "" + let [token, end] = s:lex(a:line, end, '^\%([(),|]\|[A-Za-z0-9_-]\+\)[?*+]\=') + if token[0] == '(' + call add(parentheses, end - 1) + elseif token[0] == ')' + if len(parentheses) == 1 + return [-1, end] + endif + call remove(parentheses, -1) + endif + endwhile + return [parentheses[-1] - strridx(a:line, "\n", parentheses[-1]), end] +endfunction + +" TODO: Line and end could be script global (think OO members). +function GetDTDIndent() + if v:lnum == 1 + return 0 + endif + + " Begin by searching back for a " + return indent + endif + endwhile + return -1 + elseif declaration == 'ELEMENT' + " Check for element name. If none exists, indent one level. + let [name, end] = s:lex(line, end) + if name == "" + return indent + &sw + endif + + " Check for token following element name. This can be a specification of + " whether the start or end tag may be omitted. If nothing is found, indent + " one level. + let [token, end] = s:lex(line, end) + let n = 0 + while token =~ '[-O]' && n < 2 + let [token, end] = s:lex(line, end, '^\%([-O(]\|ANY\|EMPTY\)') + let n += 1 + endwhile + if token == "" + return indent + &sw + endif + + " Next comes the content model. If the token we’ve found isn’t a + " parenthesis it must be either ANY, EMPTY or some random junk. Either + " way, we’re done indenting this element, so set it to that of the first + " line so that the terminating “>” winds up having the same indention. + if token != '(' + return indent + endif + + " Now go through the content model. We need to keep track of the nesting + " of parentheses. As soon as we hit 0 we’re done. If that happens we must + " have a complete content model. Thus set indention to be the same as that + " of the first line so that the terminating “>” winds up having the same + " indention. Otherwise, we’ll indent to the innermost parentheses not yet + " matched. + let [indent_of_innermost, end] = s:indent_to_innermost_parentheses(line, end) + if indent_of_innermost != -1 + return indent_of_innermost + endif + + " Finally, look for any additions and/or exceptions to the content model. + " This is defined by a “+” or “-” followed by another content model + " declaration. + " TODO: Can the “-” be separated by whitespace from the “(”? + let seen = { '+(': 0, '-(': 0 } + while 1 + let [additions_exceptions, end] = s:lex(line, end, '^[+-](') + if additions_exceptions != '+(' && additions_exceptions != '-(' + let [token, end] = s:lex(line, end) + if token == '>' + return indent + endif + " TODO: Should use s:lex here on getline(v:lnum) and check for >. + return getline(v:lnum) =~ '^\s*>' || count(values(seen), 0) == 0 ? indent : (indent + &sw) + endif + + " If we’ve seen an addition or exception already and this is of the same + " kind, the user is writing a broken DTD. Time to bail. + if seen[additions_exceptions] + return indent + endif + let seen[additions_exceptions] = 1 + + let [indent_of_innermost, end] = s:indent_to_innermost_parentheses(line, end) + if indent_of_innermost != -1 + return indent_of_innermost + endif + endwhile + elseif declaration == 'ATTLIST' + " Check for element name. If none exists, indent one level. + let [name, end] = s:lex(line, end) + if name == "" + return indent + &sw + endif + + " Check for any number of attributes. + while 1 + " Check for attribute name. If none exists, indent one level, unless the + " current line is a lone “>”, in which case we indent to the same level + " as the first line. Otherwise, if the attribute name is “>”, we have + " actually hit the end of the attribute list, in which case we indent to + " the same level as the first line. + let [name, end] = s:lex(line, end) + if name == "" + " TODO: Should use s:lex here on getline(v:lnum) and check for >. + return getline(v:lnum) =~ '^\s*>' ? indent : (indent + &sw) + elseif name == ">" + return indent + endif + + " Check for attribute value declaration. If none exists, indent two + " levels. Otherwise, if it’s an enumerated value, check for nested + " parentheses and indent to the innermost one if we don’t reach the end + " of the listc. Otherwise, just continue with looking for the default + " attribute value. + " TODO: Do validation of keywords + " (CDATA|NMTOKEN|NMTOKENS|ID|IDREF|IDREFS|ENTITY|ENTITIES)? + let [value, end] = s:lex(line, end, '^\%((\|[^[:space:]]\+\)') + if value == "" + return indent + &sw * 2 + elseif value == 'NOTATION' + " If this is a enumerated value based on notations, read another token + " for the actual value. If it doesn’t exist, indent three levels. + " TODO: If validating according to above, value must be equal to '('. + let [value, end] = s:lex(line, end, '^\%((\|[^[:space:]]\+\)') + if value == "" + return indent + &sw * 3 + endif + endif + + if value == '(' + let [indent_of_innermost, end] = s:indent_to_innermost_parentheses(line, end) + if indent_of_innermost != -1 + return indent_of_innermost + endif + endif + + " Finally look for the attribute’s default value. If non exists, indent + " two levels. + " TODO: Do validation of keywords (#REQUIRED|#IMPLIED)? + let [default, end] = s:lex(line, end, '^\%("\_[^"]*"\|[^[:space:]]\+\)') + if default == "" + return indent + &sw * 2 + elseif default == '#FIXED' + " We need to look for the fixed value. If non exists, indent three + " levels. + let [default, end] = s:lex(line, end, '^"\_[^"]*"') + if default == "" + return indent + &sw * 3 + endif + endif + endwhile + elseif declaration == 'ENTITY' + " Check for entity name. If none exists, indent one level. Otherwise, if + " the name actually turns out to be a percent sign, “%”, this is a + " parameter entity. Read another token to determine the entity name and, + " again, if none exists, indent one level. + let [name, end] = s:lex(line, end) + if name == "" + return indent + &sw + elseif name == '%' + let [name, end] = s:lex(line, end) + if name == "" + return indent + &sw + endif + endif + + " Now check for the entity value. If none exists, indent one level. If it + " does exist, indent to same level as first line, as we’re now done with + " this entity. + " + " The entity value can be a string in single or double quotes (no escapes + " to worry about, as entities are used instead). However, it can also be + " that this is an external unparsed entity. In that case we have to look + " further for (possibly) a public ID and an URI followed by the NDATA + " keyword and the actual notation name. For the public ID and URI, indent + " two levels, if they don’t exist. If the NDATA keyword doesn’t exist, + " indent one level. Otherwise, if the actual notation name doesn’t exist, + " indent two level. If it does, indent to same level as first line, as + " we’re now done with this entity. + let [value, end] = s:lex(line, end) + if value == "" + return indent + &sw + elseif value == 'SYSTEM' || value == 'PUBLIC' + let [quoted_string, end] = s:lex(line, end, '\%("[^"]\+"\|''[^'']\+''\)') + if quoted_string == "" + return indent + &sw * 2 + endif + + if value == 'PUBLIC' + let [quoted_string, end] = s:lex(line, end, '\%("[^"]\+"\|''[^'']\+''\)') + if quoted_string == "" + return indent + &sw * 2 + endif + endif + + let [ndata, end] = s:lex(line, end) + if ndata == "" + return indent + &sw + endif + + let [name, end] = s:lex(line, end) + return name == "" ? (indent + &sw * 2) : indent + else + return indent + endif + elseif declaration == 'NOTATION' + " Check for notation name. If none exists, indent one level. + let [name, end] = s:lex(line, end) + if name == "" + return indent + &sw + endif + + " Now check for the external ID. If none exists, indent one level. + let [id, end] = s:lex(line, end) + if id == "" + return indent + &sw + elseif id == 'SYSTEM' || id == 'PUBLIC' + let [quoted_string, end] = s:lex(line, end, '\%("[^"]\+"\|''[^'']\+''\)') + if quoted_string == "" + return indent + &sw * 2 + endif + + if id == 'PUBLIC' + let [quoted_string, end] = s:lex(line, end, '\%("[^"]\+"\|''[^'']\+''\|>\)') + if quoted_string == "" + " TODO: Should use s:lex here on getline(v:lnum) and check for >. + return getline(v:lnum) =~ '^\s*>' ? indent : (indent + &sw * 2) + elseif quoted_string == '>' + return indent + endif + endif + endif + + return indent + endif + + " TODO: Processing directives could be indented I suppose. But perhaps it’s + " just as well to let the user decide how to indent them (perhaps extending + " this function to include proper support for whatever processing directive + " language they want to use). + + " Conditional sections are simply passed along to let Vim decide what to do + " (and hence the user). + return -1 +endfunction + +let &cpo = s:cpo_save diff --git a/runtime/indent/eruby.vim b/runtime/indent/eruby.vim index 83d010ef6b..31cbb8b011 100644 --- a/runtime/indent/eruby.vim +++ b/runtime/indent/eruby.vim @@ -12,7 +12,7 @@ endif runtime! indent/ruby.vim unlet! b:did_indent -set indentexpr= +setlocal indentexpr= if exists("b:eruby_subtype") exe "runtime! indent/".b:eruby_subtype.".vim" @@ -40,12 +40,17 @@ if exists("*GetErubyIndent") finish endif -function! GetErubyIndent() +function! GetErubyIndent(...) + if a:0 && a:1 == '.' + let v:lnum = line('.') + elseif a:0 && a:1 =~ '^\d' + let v:lnum = a:1 + endif let vcol = col('.') call cursor(v:lnum,1) let inruby = searchpair('<%','','%>','W') call cursor(v:lnum,vcol) - if inruby && getline(v:lnum) !~ '^<%' + if inruby && getline(v:lnum) !~ '^<%\|^\s*-\=%>' let ind = GetRubyIndent() else exe "let ind = ".b:eruby_subtype_indentexpr @@ -53,15 +58,15 @@ function! GetErubyIndent() let lnum = prevnonblank(v:lnum-1) let line = getline(lnum) let cline = getline(v:lnum) - if cline =~# '<%\s*\%(end\|else\|\%(ensure\|rescue\|elsif\|when\).\{-\}\)\s*\%(-\=%>\|$\)' + if cline =~# '<%-\=\s*\%(}\|end\|else\|\%(ensure\|rescue\|elsif\|when\).\{-\}\)\s*\%(-\=%>\|$\)' let ind = ind - &sw endif - if line =~# '\' + if line =~# '\%({\|\' let ind = ind + &sw - elseif line =~# '<%\s*\%(module\|class\|def\|if\|for\|while\|until\|else\|elsif\|case\|when\|unless\|begin\|ensure\|rescue\)\>.*%>' + elseif line =~# '<%-\=\s*\%(module\|class\|def\|if\|for\|while\|until\|else\|elsif\|case\|when\|unless\|begin\|ensure\|rescue\)\>.*%>' let ind = ind + &sw endif - if line =~# '^\s*<%[=#]\=\s*$' && cline !~# '^\s*end\>' + if line =~# '^\s*<%[=#-]\=\s*$' && cline !~# '^\s*end\>' let ind = ind + &sw endif if cline =~# '^\s*-\=%>\s*$' diff --git a/runtime/indent/framescript.vim b/runtime/indent/framescript.vim new file mode 100644 index 0000000000..49ff92a81d --- /dev/null +++ b/runtime/indent/framescript.vim @@ -0,0 +1,41 @@ +" Vim indent file +" Language: FrameScript +" Maintainer: Nikolai Weibull +" Latest Revision: 2008-07-19 + +if exists("b:did_indent") + finish +endif +let b:did_indent = 1 + +setlocal indentexpr=GetFrameScriptIndent() +setlocal indentkeys=!^F,o,O,0=~Else,0=~EndIf,0=~EndLoop,0=~EndSub +setlocal nosmartindent + +if exists("*GetFrameScriptIndent") + finish +endif + +function GetFrameScriptIndent() + let lnum = prevnonblank(v:lnum - 1) + + if lnum == 0 + return 0 + endif + + if getline(v:lnum) =~ '^\s*\*' + return cindent(v:lnum) + endif + + let ind = indent(lnum) + + if getline(lnum) =~? '^\s*\%(If\|Loop\|Sub\)' + let ind = ind + &sw + endif + + if getline(v:lnum) =~? '^\s*\%(Else\|End\%(If\|Loop\|Sub\)\)' + let ind = ind - &sw + endif + + return ind +endfunction diff --git a/runtime/indent/haml.vim b/runtime/indent/haml.vim new file mode 100644 index 0000000000..c1feee09a9 --- /dev/null +++ b/runtime/indent/haml.vim @@ -0,0 +1,73 @@ +" Vim indent file +" Language: HAML +" Maintainer: Tim Pope +" Last Change: 2007 Dec 16 + +if exists("b:did_indent") + finish +endif +runtime! indent/ruby.vim +unlet! b:did_indent +let b:did_indent = 1 + +setlocal autoindent sw=2 et +setlocal indentexpr=GetHamlIndent() +setlocal indentkeys=o,O,*,},],0),!^F,=end,=else,=elsif,=rescue,=ensure,=when + +" Only define the function once. +if exists("*GetHamlIndent") + finish +endif + +let s:attributes = '\%({.\{-\}}\|\[.\{-\}\]\)' +let s:tag = '\%([%.#][[:alnum:]_-]\+\|'.s:attributes.'\)*[<>]*' + +if !exists('g:haml_self_closing_tags') + let g:haml_self_closing_tags = 'meta|link|img|hr|br' +endif + +function! GetHamlIndent() + let lnum = prevnonblank(v:lnum-1) + if lnum == 0 + return 0 + endif + let line = substitute(getline(lnum),'\s\+$','','') + let cline = substitute(substitute(getline(v:lnum),'\s\+$','',''),'^\s\+','','') + let lastcol = strlen(line) + let line = substitute(line,'^\s\+','','') + let indent = indent(lnum) + let cindent = indent(v:lnum) + if cline =~# '\v^-\s*%(elsif|else|when)>' + let indent = cindent < indent ? cindent : indent - &sw + endif + let increase = indent + &sw + if indent == indent(lnum) + let indent = cindent <= indent ? -1 : increase + endif + "let indent = indent == indent(lnum) ? -1 : indent + "let indent = indent > indent(lnum) + &sw ? indent(lnum) + &sw : indent + + let group = synIDattr(synID(lnum,lastcol,1),'name') + + if line =~ '^!!!' + return indent + elseif line =~ '^/\%(\[[^]]*\]\)\=$' + return increase + elseif line =~ '^:' + return increase + elseif line =~ '^'.s:tag.'[=~-]\s*\%(\%(if\|else\|elsif\|unless\|case\|when\|while\|until\|for\|begin\|module\|class\|def\)\>\%(.*\\)\@!\|.*do |[^|]*|\s*$\)' + return increase + elseif line == '-#' + return increase + elseif group =~? '\v^(hamlSelfCloser)$' || line =~? '^%\v%('.g:haml_self_closing_tags.')>' + return indent + elseif group =~? '\v^%(hamlTag|hamlAttributesDelimiter|hamlObjectDelimiter|hamlClass|hamlId|htmlTagName|htmlSpecialTagName)$' + return increase + elseif synIDattr(synID(v:lnum,1,1),'name') ==? 'hamlRubyFilter' + return GetRubyIndent() + else + return indent + endif +endfunction + +" vim:set sw=2: diff --git a/runtime/indent/logtalk.vim b/runtime/indent/logtalk.vim new file mode 100644 index 0000000000..99e6ec896b --- /dev/null +++ b/runtime/indent/logtalk.vim @@ -0,0 +1,61 @@ +" Maintainer: Paulo Moura +" Revised on: 2008.06.02 +" Language: Logtalk + +" This Logtalk indent file is a modified version of the Prolog +" indent file written by Gergely Kontra + +" Only load this indent file when no other was loaded. +if exists("b:did_indent") + finish +endif + +let b:did_indent = 1 + +setlocal indentexpr=GetLogtalkIndent() +setlocal indentkeys-=:,0# +setlocal indentkeys+=0%,-,0;,>,0) + +" Only define the function once. +if exists("*GetLogtalkIndent") + finish +endif + +function! GetLogtalkIndent() + " Find a non-blank line above the current line. + let pnum = prevnonblank(v:lnum - 1) + " Hit the start of the file, use zero indent. + if pnum == 0 + return 0 + endif + let line = getline(v:lnum) + let pline = getline(pnum) + + let ind = indent(pnum) + " Previous line was comment -> use previous line's indent + if pline =~ '^\s*%' + retu ind + endif + " Check for entity opening directive on previous line + if pline =~ '^\s*:-\s\(object\|protocol\|category\)\ze(.*,$' + let ind = ind + &sw + " Check for clause head on previous line + elseif pline =~ ':-\s*\(%.*\)\?$' + let ind = ind + &sw + " Check for entity closing directive on previous line + elseif pline =~ '^\s*:-\send_\(object\|protocol\|category\)\.\(%.*\)\?$' + let ind = ind - &sw + " Check for end of clause on previous line + elseif pline =~ '\.\s*\(%.*\)\?$' + let ind = ind - &sw + endif + " Check for opening conditional on previous line + if pline =~ '^\s*\([(;]\|->\)' && pline !~ '\.\s*\(%.*\)\?$' && pline !~ '^.*\([)][,]\s*\(%.*\)\?$\)' + let ind = ind + &sw + endif + " Check for closing an unclosed paren, or middle ; or -> + if line =~ '^\s*\([);]\|->\)' + let ind = ind - &sw + endif + return ind +endfunction diff --git a/runtime/indent/php.vim b/runtime/indent/php.vim index d73460d07d..6124eb2f66 100644 --- a/runtime/indent/php.vim +++ b/runtime/indent/php.vim @@ -2,11 +2,14 @@ " Language: PHP " Author: John Wellesz " URL: http://www.2072productions.com/vim/indent/php.vim -" Last Change: 2007 Jun 24 +" Last Change: 2008 June 7th " Newsletter: http://www.2072productions.com/?to=php-indent-for-vim-newsletter.php -" Version: 1.24 +" Version: 1.28 " -" The change log and all the comments have been removed from this file. +" If you find a bug, please e-mail me at John.wellesz (AT) teaser (DOT) fr +" with an example of code that breaks the algorithm. +" +" ---> The change log and all the comments have been removed from this file. " " For a complete change log and fully commented code, download the script on " 2072productions.com at the URI provided above. @@ -19,12 +22,15 @@ " " " NOTE: This script must be used with PHP syntax ON and with the php syntax -" script by Lutz Eymers ( http://www.isp.de/data/php.vim ) that's the script bundled with Vim. +" script by Lutz Eymers (http://www.isp.de/data/php.vim ) or with the +" script by Peter Hodge (http://www.vim.org/scripts/script.php?script_id=1571 ) +" the later is bunbdled by default with vim 7. " " -" In the case you have syntax errors in your script such as end of HereDoc -" tags not at col 1 you'll have to indent your file 2 times (This script -" will automatically put HereDoc end tags at col 1). +" In the case you have syntax errors in your script such as HereDoc end +" identifiers not at col 1 you'll have to indent your file 2 times (This +" script will automatically put HereDoc end identifiers at col 1 if +" they are followed by a ';'). " " " NOTE: If you are editing file in Unix file format and that (by accident) @@ -37,8 +43,8 @@ " " or simply 'let' the option PHP_removeCRwhenUnix to 1 and the script will " silently remove them when VIM load this script (at each bufread). - - +" +" " Options: PHP_autoformatcomment = 0 to not enable autoformating of comment by " default, if set to 0, this script will let the 'formatoptions' setting intact. " @@ -48,7 +54,7 @@ " Options: PHP_removeCRwhenUnix = 1 to make the script automatically remove CR " at end of lines (by default this option is unset), NOTE that you " MUST remove CR when the fileformat is UNIX else the indentation -" won't be correct... +" won't be correct! " " Options: PHP_BracesAtCodeLevel = 1 to indent the '{' and '}' at the same " level than the code they contain. @@ -67,6 +73,10 @@ " " NOTE: The script will be a bit slower if you use this option because " some optimizations won't be available. +" +" Options: PHP_vintage_case_default_indent = 1 (defaults to 0) to add a meaningless indent +" befaore 'case:' and 'default":' statement in switch block +" if exists("b:did_indent") finish @@ -89,12 +99,21 @@ else let b:PHP_BracesAtCodeLevel = 0 endif + if exists("PHP_autoformatcomment") let b:PHP_autoformatcomment = PHP_autoformatcomment else let b:PHP_autoformatcomment = 1 endif +if exists("PHP_vintage_case_default_indent") + let b:PHP_vintage_case_default_indent = PHP_vintage_case_default_indent +else + let b:PHP_vintage_case_default_indent = 0 +endif + + + let b:PHP_lastindented = 0 let b:PHP_indentbeforelast = 0 let b:PHP_indentinghuge = 0 @@ -182,8 +201,8 @@ function! GetLastRealCodeLNum(startline) " {{{ endif - elseif lastline =~? '^\a\w*;$' && lastline !~? s:notPhpHereDoc - let tofind=substitute( lastline, '\([^;]\+\);', '<<<\1$', '') + elseif lastline =~? '^\a\w*;\=$' && lastline !~? s:notPhpHereDoc " XXX 0607 + let tofind=substitute( lastline, '\(\a\w*\);\=', '<<<''\\=\1''\\=$', '') " XXX 0607 while getline(lnum) !~? tofind && lnum > 1 let lnum = lnum - 1 endwhile @@ -209,7 +228,7 @@ function! Skippmatch2() let line = getline(".") - if line =~ '\%(".*\)\@<=/\*\%(.*"\)\@=' || line =~ '\%(//.*\)\@<=/\*' + if line =~ '\%(".*\)\@<=/\*\%(.*"\)\@=' || line =~ '\%(\%(//\|#\).*\)\@<=/\*' return 1 else return 0 @@ -218,7 +237,7 @@ endfun function! Skippmatch() " {{{ let synname = synIDattr(synID(line("."), col("."), 0), "name") - if synname == "Delimiter" || synname == "phpRegionDelimiter" || synname =~# "^phpParent" || synname == "phpArrayParens" || synname =~# '^php\%(Block\|Brace\)' || synname == "javaScriptBraces" || synname == "phpComment" && b:UserIsTypingComment + if synname == "Delimiter" || synname == "phpRegionDelimiter" || synname =~# "^phpParent" || synname == "phpArrayParens" || synname =~# '^php\%(Block\|Brace\)' || synname == "javaScriptBraces" || synname =~# "^phpComment" && b:UserIsTypingComment return 0 else return 1 @@ -295,8 +314,8 @@ function! IslinePHP (lnum, tofind) " {{{ endif endfunction " }}} -let s:notPhpHereDoc = '\%(break\|return\|continue\|exit\);' -let s:blockstart = '\%(\%(\%(}\s*\)\=else\%(\s\+\)\=\)\=if\>\|else\>\|while\>\|switch\>\|for\%(each\)\=\>\|declare\>\|class\>\|interface\>\|abstract\>\|try\>\|catch\>\|[|&]\)' +let s:notPhpHereDoc = '\%(break\|return\|continue\|exit\|else\)' +let s:blockstart = '\%(\%(\%(}\s*\)\=else\%(\s\+\)\=\)\=if\>\|else\>\|while\>\|switch\>\|for\%(each\)\=\>\|declare\>\|class\>\|interface\>\|abstract\>\|try\>\|catch\>\)' let s:autorestoptions = 0 if ! s:autorestoptions @@ -310,11 +329,11 @@ function! ResetOptions() setlocal comments=s1:/*,mb:*,ex:*/,://,:# - " setlocal formatoptions-=t + setlocal formatoptions-=t setlocal formatoptions+=q setlocal formatoptions+=r setlocal formatoptions+=o - " setlocal formatoptions+=w + setlocal formatoptions+=w setlocal formatoptions+=c setlocal formatoptions+=b endif @@ -341,7 +360,7 @@ function! GetPhpIndent() if !b:PHP_indentinghuge && b:PHP_lastindented > b:PHP_indentbeforelast if b:PHP_indentbeforelast let b:PHP_indentinghuge = 1 - echom 'Large indenting detected, speed optimizations engaged' + echom 'Large indenting detected, speed optimizations engaged (v1.28)' endif let b:PHP_indentbeforelast = b:PHP_lastindented endif @@ -381,7 +400,7 @@ function! GetPhpIndent() let b:InPHPcode = 1 let b:InPHPcode_tofind = "" - if synname == "phpComment" + if synname =~# "^phpComment" let b:UserIsTypingComment = 1 else let b:UserIsTypingComment = 0 @@ -396,11 +415,11 @@ function! GetPhpIndent() let b:UserIsTypingComment = 0 let lnum = v:lnum - 1 - while getline(lnum) !~? '<<<\a\w*$' && lnum > 1 + while getline(lnum) !~? '<<<''\=\a\w*''\=$' && lnum > 1 let lnum = lnum - 1 endwhile - let b:InPHPcode_tofind = substitute( getline(lnum), '^.*<<<\(\a\w*\)\c', '^\\s*\1;$', '') + let b:InPHPcode_tofind = substitute( getline(lnum), '^.*<<<''\=\(\a\w*\)''\=$', '^\\s*\1;\\=$', '') " XXX 0607 endif else let b:InPHPcode = 0 @@ -453,9 +472,9 @@ function! GetPhpIndent() let b:InPHPcode_and_script = 1 endif - elseif last_line =~? '<<<\a\w*$' + elseif last_line =~? '<<<''\=\a\w*''\=$' " XXX 0607 let b:InPHPcode = 0 - let b:InPHPcode_tofind = substitute( last_line, '^.*<<<\(\a\w*\)\c', '^\\s*\1;$', '') + let b:InPHPcode_tofind = substitute( last_line, '^.*<<<''\=\(\a\w*\)''\=$', '^\\s*\1;\\=$', '') " XXX 0607 elseif !UserIsEditing && cline =~ '^\s*/\*\%(.*\*/\)\@!' && getline(v:lnum + 1) !~ '^\s*\*' let b:InPHPcode = 0 @@ -513,7 +532,7 @@ function! GetPhpIndent() return 0 endif - if cline =~? '^\s*\a\w*;$' && cline !~? s:notPhpHereDoc + if cline =~? '^\s*\a\w*;$\|^\a\w*$' && cline !~? s:notPhpHereDoc " XXX 0607 return 0 endif " }}} @@ -558,7 +577,7 @@ function! GetPhpIndent() let defaultORcase = '^\s*\%(default\|case\).*:' - if last_line =~ '[;}]'.endline && last_line !~# defaultORcase + if last_line =~ '[;}]'.endline && last_line !~ '^)' && last_line !~# defaultORcase " Added && last_line !~ '^)' on 2007-12-30 if ind==b:PHP_default_indenting return b:PHP_default_indenting elseif b:PHP_indentinghuge && ind==b:PHP_CurrentIndentLevel && cline !~# '^\s*\%(else\|\%(case\|default\).*:\|[})];\=\)' && last_line !~# '^\s*\%(\%(}\s*\)\=else\)' && getline(GetLastRealCodeLNum(lnum - 1))=~';'.endline @@ -568,20 +587,20 @@ function! GetPhpIndent() let LastLineClosed = 0 - let terminated = '\%(;\%(\s*?>\)\=\|<<<\a\w*\|}\)'.endline + let terminated = '\%(;\%(\s*?>\)\=\|<<<''\=\a\w*''\=$\|^\s*}\)'.endline " XXX 0607 let unstated = '\%(^\s*'.s:blockstart.'.*)\|\%(//.*\)\@\)'.endline if ind != b:PHP_default_indenting && cline =~# '^\s*else\%(if\)\=\>' let b:PHP_CurrentIndentLevel = b:PHP_default_indenting return indent(FindTheIfOfAnElse(v:lnum, 1)) - elseif cline =~ '^\s*{' + elseif cline =~ '^\s*)\=\s*{' let previous_line = last_line let last_line_num = lnum while last_line_num > 1 - if previous_line =~ '^\s*\%(' . s:blockstart . '\|\%([a-zA-Z]\s*\)*function\)' && previous_line !~ '^\s*[|&]' + if previous_line =~ '^\s*\%(' . s:blockstart . '\|\%([a-zA-Z]\s*\)*function\)' let ind = indent(last_line_num) @@ -596,11 +615,11 @@ function! GetPhpIndent() let previous_line = getline(last_line_num) endwhile - elseif last_line =~# unstated && cline !~ '^\s*{\|^\s*);\='.endline - let ind = ind + &sw + elseif last_line =~# unstated && cline !~ '^\s*);\='.endline + let ind = ind + &sw " we indent one level further when the preceding line is not stated return ind - elseif ind != b:PHP_default_indenting && last_line =~ terminated + elseif (ind != b:PHP_default_indenting || last_line =~ '^)' ) && last_line =~ terminated " Added || last_line =~ '^)' on 2007-12-30 (array indenting [rpblem broke other things) let previous_line = last_line let last_line_num = lnum let LastLineClosed = 1 @@ -642,7 +661,7 @@ function! GetPhpIndent() endif if one_ahead_indent == two_ahead_indent || last_line_num < 1 - if previous_line =~# '[;}]'.endline || last_line_num < 1 + if previous_line =~# '\%(;\|^\s*}\)'.endline || last_line_num < 1 break endif endif @@ -680,8 +699,9 @@ function! GetPhpIndent() let ind = ind + &sw endif - if b:PHP_BracesAtCodeLevel || cline !~# defaultORcase + if b:PHP_BracesAtCodeLevel || b:PHP_vintage_case_default_indent == 1 || cline !~# defaultORcase let b:PHP_CurrentIndentLevel = ind + return ind endif @@ -692,21 +712,23 @@ function! GetPhpIndent() if openedparent != lnum let ind = indent(openedparent) endif - - - elseif cline !~ '^\s*{' && pline =~ '\%(;\%(\s*?>\)\=\|<<<\a\w*\|{\|^\s*'.s:blockstart.'\s*(.*)\)'.endline.'\|^\s*}\|'.defaultORcase - + elseif last_line =~ '^\s*'.s:blockstart let ind = ind + &sw + elseif last_line =~# defaultORcase + let ind = ind + &sw + + + elseif pline =~ '\%(;\%(\s*?>\)\=\|<<<''\=\a\w*''\=$\|^\s*}\|{\)'.endline . '\|' . defaultORcase + + let ind = ind + &sw endif - elseif last_line =~# defaultORcase - let ind = ind + &sw endif if cline =~ '^\s*);\=' let ind = ind - &sw - elseif cline =~# defaultORcase + elseif cline =~# defaultORcase && last_line !~# defaultORcase let ind = ind - &sw endif diff --git a/runtime/indent/ruby.vim b/runtime/indent/ruby.vim index 0f2de567d4..8a56e54c07 100644 --- a/runtime/indent/ruby.vim +++ b/runtime/indent/ruby.vim @@ -34,26 +34,26 @@ set cpo&vim " ============ " Regex of syntax group names that are or delimit string or are comments. -let s:syng_strcom = '\' +let s:syng_strcom = '\' " Regex of syntax group names that are strings. let s:syng_string = - \ '\' + \ '\' " Regex of syntax group names that are strings or documentation. let s:syng_stringdoc = - \'\' + \'\' " Expression used to check whether we should skip a match with searchpair(). let s:skip_expr = - \ "synIDattr(synID(line('.'),col('.'),0),'name') =~ '".s:syng_strcom."'" + \ "synIDattr(synID(line('.'),col('.'),1),'name') =~ '".s:syng_strcom."'" " Regex used for words that, at the start of a line, add a level of indent. let s:ruby_indent_keywords = '^\s*\zs\<\%(module\|class\|def\|if\|for' . \ '\|while\|until\|else\|elsif\|case\|when\|unless\|begin\|ensure' . \ '\|rescue\)\>' . - \ '\|\%([*+/,=:-]\|<<\|>>\)\s*\zs' . + \ '\|\%([*+/,=-]\|<<\|>>\|:\s\)\s*\zs' . \ '\<\%(if\|for\|while\|until\|case\|unless\|begin\)\>' " Regex used for words that, at the start of a line, remove a level of indent. @@ -65,7 +65,7 @@ let s:ruby_deindent_keywords = " TODO: the do here should be restricted somewhat (only at end of line)? let s:end_start_regex = '^\s*\zs\<\%(module\|class\|def\|if\|for' . \ '\|while\|until\|case\|unless\|begin\)\>' . - \ '\|\%([*+/,=:-]\|<<\|>>\)\s*\zs' . + \ '\|\%([*+/,=-]\|<<\|>>\|:\s\)\s*\zs' . \ '\<\%(if\|for\|while\|until\|case\|unless\|begin\)\>' . \ '\|\' @@ -78,15 +78,15 @@ let s:end_end_regex = '\%(^\|[^.:@$]\)\@<=\' " Expression used for searchpair() call for finding match for 'end' keyword. let s:end_skip_expr = s:skip_expr . \ ' || (expand("") == "do"' . - \ ' && getline(".") =~ "^\\s*\\")' + \ ' && getline(".") =~ "^\\s*\\<\\(while\\|until\\|for\\)\\>")' " Regex that defines continuation lines, not including (, {, or [. -let s:continuation_regex = '\%([\\*+/.,=:-]\|\W[|&?]\|||\|&&\)\s*\%(#.*\)\=$' +let s:continuation_regex = '\%([\\*+/.,:]\|\%(<%\)\@ +" Last Change: 2007 Dec 16 + +if exists("b:did_indent") + finish +endif +let b:did_indent = 1 + +setlocal autoindent sw=2 et +setlocal indentexpr=GetSassIndent() +setlocal indentkeys=o,O,*,<:>,!^F + +" Only define the function once. +if exists("*GetSassIndent") + finish +endif + +let s:property = '^\s*:\|^\s*[[:alnum:]-]\+:' + +function! GetSassIndent() + let lnum = prevnonblank(v:lnum-1) + let line = substitute(getline(lnum),'\s\+$','','') + let cline = substitute(substitute(getline(v:lnum),'\s\+$','',''),'^\s\+','','') + let lastcol = strlen(line) + let line = substitute(line,'^\s\+','','') + let indent = indent(lnum) + let cindent = indent(v:lnum) + if line !~ s:property && cline =~ s:property + return indent + &sw + "elseif line =~ s:property && cline !~ s:property + "return indent - &sw + else + return -1 + endif +endfunction + +" vim:set sw=2: diff --git a/runtime/keymap/bulgarian-bds.vim b/runtime/keymap/bulgarian-bds.vim index bb789a9af5..bf837c8645 100644 --- a/runtime/keymap/bulgarian-bds.vim +++ b/runtime/keymap/bulgarian-bds.vim @@ -1,31 +1,39 @@ -" Vim keymap file for Bulgarian and Russian characters, `bds' layout. -" Can be used with utf-8 or cp1251 file encodings. -" This file itself is in utf-8 +" Vim keymap file for Bulgarian and Russian characters, "bds" layout. +" Most of it can be used with both utf-8 and cp1251 file encodings, except +" the accented vowels which can only be stored in utf-8. +" This file itself is in utf-8. " Maintainer: Boyko Bantchev -" URI: http://www.math.bas.bg/softeng/bantchev/misc/vim/bulgarian-bds.vim -" Last Changed: 2006 Oct 18 +" URI: http://www.math.bas.bg/bantchev/vim/bulgarian-bds.vim +" Last Changed: 2008 June 28 -" This keymap corresponds to what is called Bulgarian standard, -" or BDS (БДС) typewriter keyboard layout. -" In addition to the Bulgarian alphabet, BDS prescribes the presence -" of the following characters: -" — The Cyrillic letters Э (capital), and ы and э (small) -" (these are present in the Russian alphabet). -" — The latin capital letters I and V (these are used to type -" Roman numerals without having to leave Cyrillic mode). -" — „ and “ (Bulgarian quotation style), and « and » (Russian quotation -" style). -" — §, №, —, •, ·, ±, ¬, ¤, and € +" This keymap corresponds to what is called Bulgarian standard typewriter +" keyboard layout (BDS, БДС). " -" Some punctuation characters that are present in ascii are mapped in BDS -" to keys different from the ones they occupy in the qwerty layout, because -" the latter are used to type other characters. +" Note that, in addition to the Bulgarian alphabet, the BDS layout prescribes +" the presence of the following characters: +" — The Russian letters ы (small), and Э and э (capital and small). +" — The latin capital letters I and V – used to type Roman numerals +" without having to leave Cyrillic mode. " -" In this keymap also defined (not in BDS) are the Russian letters Ё (capital) -" and ё (small), as well as the Russian capital letter Ы (see above the small -" counterpart). This way, using the bulgarian-bds keymap, one can access both -" the Bulgarian and the Russian alphabets. +" Some punctuation characters present in ascii are mapped in BDS to keys +" different from the ones they occupy in the qwerty layout, because the latter +" keys are used to type other characters. +" +" In this keymap, also defined (besides BDS) are: +" — The Russian letters Ё and ё (capital and small), as well as the +" Russian capital letter Ы (see above for the small counterpart). +" This way, using the bulgarian-bds keymap, one can access both +" the Bulgarian and the Russian alphabets. +" — The quotation marks „ “ ” ‘ ’ (used in the Bulgarian and English +" quotation styles), as well as « » (Russian quotation style). +" — The characters §, №, – (en-dash), — (em-dash), …, •, ·, ±, °, ¬, +" ¤, and €. +" +" The keymap also defines key combinations for accented vowels in Bulgarian. +" +" For details of what key or key combination maps to what character, please +" see below the map table itself. scriptencoding utf-8 @@ -114,14 +122,38 @@ q , COMMA @ ? QUESTION MARK } § SECTION SIGN (PARAGRAPH SIGN) ) № NUMERO SIGN --- — EM DASH +-- – EN DASH +--- — EM DASH +.. … HORIZONTAL ELLIPSIS +`` “ LEFT DOUBLE QUOTATION MARK +'' ” RIGHT DOUBLE QUOTATION MARK ,, „ DOUBLE LOW-9 QUOTATION MARK -`` “ LEFT DOUBLE QUOTATION MARK +`. ‘ LEFT SINGLE QUOTATION MARK +'. ’ RIGHT SINGLE QUOTATION MARK << « LEFT-POINTING DOUBLE ANGLE QUOTATION MARK >> » RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK -00 • BULLET -.. · MIDDLE DOT +** • BULLET +,. · MIDDLE DOT +- ± PLUS-MINUS SIGN +^o ° DEGREE SIGN ~~ ¬ NOT SIGN @@ ¤ CURRENCY SIGN $$ € EURO SIGN + +" accented vowels cannot map onto cp1251 – use utf-8 file encoding +`D А̀ CYRILLIC CAPITAL LETTER A + GRAVE ACCENT (COMPOSED) +`d а̀ CYRILLIC SMALL LETTER A + GRAVE ACCENT (COMPOSED) +`E Ѐ CYRILLIC CAPITAL LETTER IE + GRAVE ACCENT (COMPOSED) +`e ѐ CYRILLIC SMALL LETTER IE + GRAVE ACCENT (COMPOSED) +`R Ѝ CYRILLIC CAPITAL LETTER I + GRAVE ACCENT (COMPOSED) +`r ѝ CYRILLIC SMALL LETTER I + GRAVE ACCENT (COMPOSED) +`F О̀ CYRILLIC CAPITAL LETTER O + GRAVE ACCENT (COMPOSED) +`f о̀ CYRILLIC SMALL LETTER O + GRAVE ACCENT (COMPOSED) +`W У̀ CYRILLIC CAPITAL LETTER U + GRAVE ACCENT (COMPOSED) +`w у̀ CYRILLIC SMALL LETTER U + GRAVE ACCENT (COMPOSED) +`C Ъ̀ CYRILLIC CAPITAL LETTER HARD SIGN + GRAVE ACCENT (COMPOSED) +`c ъ̀ CYRILLIC SMALL LETTER HARD SIGN + GRAVE ACCENT (COMPOSED) +`Z Ю̀ CYRILLIC CAPITAL LETTER YU + GRAVE ACCENT (COMPOSED) +`z ю̀ CYRILLIC SMALL LETTER YU + GRAVE ACCENT (COMPOSED) +`S Я̀ CYRILLIC CAPITAL LETTER YA + GRAVE ACCENT (COMPOSED) +`s я̀ CYRILLIC SMALL LETTER YA + GRAVE ACCENT (COMPOSED) diff --git a/runtime/keymap/bulgarian-phonetic.vim b/runtime/keymap/bulgarian-phonetic.vim index feec587b7c..bac2e7ebee 100644 --- a/runtime/keymap/bulgarian-phonetic.vim +++ b/runtime/keymap/bulgarian-phonetic.vim @@ -1,26 +1,35 @@ -" Vim keymap file for Bulgarian and Russian characters, `phonetic' layout. -" Can be used with utf-8 or cp1251 file encodings. -" This file itself is in utf-8 +" Vim keymap file for Bulgarian and Russian characters, "phonetic" layout. +" Most of it can be used with both utf-8 and cp1251 file encodings, except +" the accented vowels which can only be stored in utf-8. +" This file itself is in utf-8. " Maintainer: Boyko Bantchev -" URI: http://www.math.bas.bg/softeng/bantchev/misc/vim/bulgarian-phonetic.vim -" Last Changed: 2006 Oct 18 +" URI: http://www.math.bas.bg/bantchev/vim/bulgarian-phonetic.vim +" Last Changed: 2008 June 28 -" This keymap corresponds to what is called `phonetic layout' in Bulgaria: -" Cyrillic letters homophonous with Latin letters tend to take the same -" places as the latter ones. Most of the keys corresponding to punctuation -" characters are left unmapped, so they retain their usual (qwerty) meanings -" while typing in Cyrillic. +" For a rationale for the layout and additional info on typing in Bulgarian +" using Unicode Cyrillic please see: + +" This keymap corresponds to what is called "phonetic layout" in Bulgaria: +" Cyrillic letters tend to be mapped to their Latin homophones, if present. +" Most keys corresponding to punctuation characters are left unmapped, so +" they retain their usual (qwerty) meanings in Cyrillic typing. " -" In addition to the Bulgarian alphabet, the keymap defines the following -" characters: -" — The Cyrillic letters Ё and ё, Э and э, and Ы and ы (in pairs of -" capital and small). These are the letters in the Russian alphabet -" that are not present in Bulgarian, so using the bulgarian-phonetic -" keymap one can type in Russian, too. -" — „ and “ (Bulgarian quotation style), and « and » (Russian quotation -" style). -" — §, №, —, •, ·, ±, ¬, ¤, and € +" In addition to the Bulgarian alphabet, the keymap makes accessible the +" following characters: +" — The letters Ё and ё, Э and э, and Ы and ы (in pairs of capital and +" small). These are the letters in the Russian alphabet that are not +" present in Bulgarian, so using the bulgarian-phonetic keymap one can +" type in Russian, too. +" — The quotation marks „ “ ” ‘ ’ (used in the Bulgarian and English +" quotation styles), as well as « » (Russian quotation style). +" — The characters §, №, – (en-dash), — (em-dash), …, •, ·, ±, °, ¬, +" ¤, and €. +" +" The keymap also defines key combinations for accented vowels in Bulgarian. +" +" For details of what key or key combination maps to what character, please +" see below the map table itself. scriptencoding utf-8 @@ -55,7 +64,7 @@ C Ц CYRILLIC CAPITAL LETTER TSE { Ш CYRILLIC CAPITAL LETTER SHA } Щ CYRILLIC CAPITAL LETTER SHCHA Y Ъ CYRILLIC CAPITAL LETTER HARD SIGN -YJ Ы CYRILLIC CAPITAL LETTER YERU +YI Ы CYRILLIC CAPITAL LETTER YERU X Ь CYRILLIC CAPITAL LETTER SOFT SIGN YE Э CYRILLIC CAPITAL LETTER REVERSED E | Ю CYRILLIC CAPITAL LETTER YU @@ -88,21 +97,45 @@ c ц CYRILLIC SMALL LETTER TSE [ ш CYRILLIC SMALL LETTER SHA ] щ CYRILLIC SMALL LETTER SHCHA y ъ CYRILLIC SMALL LETTER HARD SIGN -yj ы CYRILLIC SMALL LETTER YERU +yi ы CYRILLIC SMALL LETTER YERU x ь CYRILLIC SMALL LETTER SOFT SIGN ye э CYRILLIC SMALL LETTER REVERSED E \\ ю CYRILLIC SMALL LETTER YU q я CYRILLIC SMALL LETTER YA !! § SECTION SIGN (PARAGRAPH SIGN) ## № NUMERO SIGN --- — EM DASH -,, „ DOUBLE LOW-9 QUOTATION MARK +-- – EN DASH +--- — EM DASH +.. … HORIZONTAL ELLIPSIS `` “ LEFT DOUBLE QUOTATION MARK +'' ” RIGHT DOUBLE QUOTATION MARK +,, „ DOUBLE LOW-9 QUOTATION MARK +`. ‘ LEFT SINGLE QUOTATION MARK +'. ’ RIGHT SINGLE QUOTATION MARK << « LEFT-POINTING DOUBLE ANGLE QUOTATION MARK >> » RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK -00 • BULLET -.. · MIDDLE DOT +** • BULLET +,. · MIDDLE DOT +- ± PLUS-MINUS SIGN +^o ° DEGREE SIGN ~~ ¬ NOT SIGN @@ ¤ CURRENCY SIGN $$ € EURO SIGN + +" accented vowels cannot map onto cp1251 – use utf-8 file encoding +'A А̀ CYRILLIC CAPITAL LETTER A + GRAVE ACCENT (COMPOSED) +'a а̀ CYRILLIC SMALL LETTER A + GRAVE ACCENT (COMPOSED) +'E Ѐ CYRILLIC CAPITAL LETTER IE + GRAVE ACCENT (COMPOSED) +'e ѐ CYRILLIC SMALL LETTER IE + GRAVE ACCENT (COMPOSED) +'I Ѝ CYRILLIC CAPITAL LETTER I + GRAVE ACCENT (COMPOSED) +'i ѝ CYRILLIC SMALL LETTER I + GRAVE ACCENT (COMPOSED) +'O О̀ CYRILLIC CAPITAL LETTER O + GRAVE ACCENT (COMPOSED) +'o о̀ CYRILLIC SMALL LETTER O + GRAVE ACCENT (COMPOSED) +'U У̀ CYRILLIC CAPITAL LETTER U + GRAVE ACCENT (COMPOSED) +'u у̀ CYRILLIC SMALL LETTER U + GRAVE ACCENT (COMPOSED) +'Y Ъ̀ CYRILLIC CAPITAL LETTER HARD SIGN + GRAVE ACCENT (COMPOSED) +'y ъ̀ CYRILLIC SMALL LETTER HARD SIGN + GRAVE ACCENT (COMPOSED) +'| Ю̀ CYRILLIC CAPITAL LETTER YU + GRAVE ACCENT (COMPOSED) +'\\ ю̀ CYRILLIC SMALL LETTER YU + GRAVE ACCENT (COMPOSED) +'Q Я̀ CYRILLIC CAPITAL LETTER YA + GRAVE ACCENT (COMPOSED) +'q я̀ CYRILLIC SMALL LETTER YA + GRAVE ACCENT (COMPOSED) diff --git a/runtime/keymap/bulgarian.vim b/runtime/keymap/bulgarian.vim deleted file mode 100644 index 3c80c9ffed..0000000000 --- a/runtime/keymap/bulgarian.vim +++ /dev/null @@ -1,90 +0,0 @@ -" Vim Keymap file for russian characters, phonetic layout 'yawerty' -" Useful mainly with utf-8 but may work with other encodings - -" Maintainer: Alberto Mardegan -" Last Changed: 2004 Oct 17 - -" All characters are given literally, conversion to another encoding (e.g., -" UTF-8) should work. -scriptencoding utf-8 - -let b:keymap_name = "bg" - -loadkeymap -A А CYRILLIC CAPITAL LETTER A -B Б CYRILLIC CAPITAL LETTER BE -W В CYRILLIC CAPITAL LETTER VE -V В CYRILLIC CAPITAL LETTER VE -G Г CYRILLIC CAPITAL LETTER GHE -D Д CYRILLIC CAPITAL LETTER DE -E Е CYRILLIC CAPITAL LETTER IE -Zh Ж CYRILLIC CAPITAL LETTER ZHE -ZH Ж CYRILLIC CAPITAL LETTER ZHE -Z З CYRILLIC CAPITAL LETTER ZE -I И CYRILLIC CAPITAL LETTER I -J Й CYRILLIC CAPITAL LETTER SHORT I -K К CYRILLIC CAPITAL LETTER KA -L Л CYRILLIC CAPITAL LETTER EL -M М CYRILLIC CAPITAL LETTER EM -N Н CYRILLIC CAPITAL LETTER EN -O О CYRILLIC CAPITAL LETTER O -P П CYRILLIC CAPITAL LETTER PE -R Р CYRILLIC CAPITAL LETTER ER -S С CYRILLIC CAPITAL LETTER ES -T Т CYRILLIC CAPITAL LETTER TE -U У CYRILLIC CAPITAL LETTER U -F Ф CYRILLIC CAPITAL LETTER EF -H Х CYRILLIC CAPITAL LETTER HA -C Ц CYRILLIC CAPITAL LETTER TSE -Ch Ч CYRILLIC CAPITAL LETTER CHE -CH Ч CYRILLIC CAPITAL LETTER CHE -Sh Ш CYRILLIC CAPITAL LETTER SHA -SH Ш CYRILLIC CAPITAL LETTER SHA -Sht Щ CYRILLIC CAPITAL LETTER SHCHA -SHt Щ CYRILLIC CAPITAL LETTER SHCHA -SHT Щ CYRILLIC CAPITAL LETTER SHCHA -Sj Щ CYRILLIC CAPITAL LETTER SHCHA -SJ Щ CYRILLIC CAPITAL LETTER SHCHA -Y Ъ CYRILLIC CAPITAL LETTER HARD SIGN -X Ь CYRILLIC CAPITAL LETTER SOFT SIGN -~ Ю CYRILLIC CAPITAL LETTER YU -Ju Ю CYRILLIC CAPITAL LETTER YU -JU Ю CYRILLIC CAPITAL LETTER YU -Q Я CYRILLIC CAPITAL LETTER YA -Ja Я CYRILLIC CAPITAL LETTER YA -JA Я CYRILLIC CAPITAL LETTER YA -a а CYRILLIC SMALL LETTER A -b б CYRILLIC SMALL LETTER BE -w в CYRILLIC SMALL LETTER VE -v в CYRILLIC SMALL LETTER VE -g г CYRILLIC SMALL LETTER GHE -d д CYRILLIC SMALL LETTER DE -e е CYRILLIC SMALL LETTER IE -zh ж CYRILLIC SMALL LETTER ZHE -w ж CYRILLIC SMALL LETTER ZHE -z з CYRILLIC SMALL LETTER ZE -i и CYRILLIC SMALL LETTER I -j й CYRILLIC SMALL LETTER SHORT I -k к CYRILLIC SMALL LETTER KA -l л CYRILLIC SMALL LETTER EL -m м CYRILLIC SMALL LETTER EM -n н CYRILLIC SMALL LETTER EN -o о CYRILLIC SMALL LETTER O -p п CYRILLIC SMALL LETTER PE -r р CYRILLIC SMALL LETTER ER -s с CYRILLIC SMALL LETTER ES -t т CYRILLIC SMALL LETTER TE -u у CYRILLIC SMALL LETTER U -f ф CYRILLIC SMALL LETTER EF -h х CYRILLIC SMALL LETTER HA -c ц CYRILLIC SMALL LETTER TSE -ch ч CYRILLIC SMALL LETTER CHE -sh ш CYRILLIC SMALL LETTER SHA -sht щ CYRILLIC SMALL LETTER SHCHA -sj щ CYRILLIC SMALL LETTER SHCHA -y ъ CYRILLIC SMALL LETTER HARD SIGN -x ь CYRILLIC SMALL LETTER SOFT SIGN -` ю CYRILLIC SMALL LETTER YU -ju ю CYRILLIC SMALL LETTER YU -q я CYRILLIC SMALL LETTER YA -ja я CYRILLIC SMALL LETTER YA diff --git a/runtime/macros/justify.vim b/runtime/macros/justify.vim index 41d0591fe4..aa4a9ca585 100644 --- a/runtime/macros/justify.vim +++ b/runtime/macros/justify.vim @@ -256,17 +256,18 @@ function! Justify(...) range let str = substitute(str, '\s\+$', '', '') let str = substitute(str, '^\s\+', '', '') let str = substitute(str, '\s\+', ' ', 'g') - let str_n = strlen(str) + " Use substitute() hack to get strlen in characters instead of bytes + let str_n = strlen(substitute(str, '.', 'x', 'g')) " Possible addition of space after punctuation if exists("join_str") let str = substitute(str, join_str, '\1 ', 'g') endif - let join_n = strlen(str) - str_n + let join_n = strlen(substitute(str, '.', 'x', 'g')) - str_n " Can extraspaces be added? " Note that str_n may be less than strlen(str) [joinspaces above] - if strlen(str) < tw - indent_n && str_n > 0 + if strlen(substitute(str, '.', 'x', 'g')) < tw - indent_n && str_n > 0 " How many spaces should be added let s_add = tw - str_n - indent_n - join_n let s_nr = strlen(substitute(str, '\S', '', 'g') ) - join_n diff --git a/runtime/makemenu.vim b/runtime/makemenu.vim index 6fa34e5367..5f7883c79a 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: 2008 Jun 24 +" Last Change: 2008 Jul 13 " This is used by "make menu" in the src directory. edit :p:h/synmenu.vim @@ -228,11 +228,13 @@ SynMenu FG.Groff:groff SynMenu FG.Groovy:groovy SynMenu FG.GTKrc:gtkrc +SynMenu HIJK.Haml:haml SynMenu HIJK.Hamster:hamster SynMenu HIJK.Haskell.Haskell:haskell SynMenu HIJK.Haskell.Haskell-c2hs:chaskell SynMenu HIJK.Haskell.Haskell-literate:lhaskell SynMenu HIJK.HASTE:haste +SynMenu HIJK.HASTE\ preproc:hastepreproc SynMenu HIJK.Hercules:hercules SynMenu HIJK.Hex\ dump.XXD:xxd SynMenu HIJK.Hex\ dump.Intel\ MCS51:hex @@ -426,6 +428,7 @@ SynMenu R-Sg.Ruby:ruby SynMenu R-Sg.S-Lang:slang SynMenu R-Sg.Samba\ config:samba SynMenu R-Sg.SAS:sas +SynMenu R-Sg.Sass:sass SynMenu R-Sg.Sather:sather SynMenu R-Sg.Scheme:scheme SynMenu R-Sg.Scilab:scilab diff --git a/runtime/plugin/getscriptPlugin.vim b/runtime/plugin/getscriptPlugin.vim index 7fe103d618..4fd36db596 100644 --- a/runtime/plugin/getscriptPlugin.vim +++ b/runtime/plugin/getscriptPlugin.vim @@ -19,7 +19,7 @@ if &cp || exists("g:loaded_getscriptPlugin") endif finish endif -let g:loaded_getscriptPlugin = "v30" +let g:loaded_getscriptPlugin = "v31" let s:keepcpo = &cpo set cpo&vim diff --git a/runtime/plugin/netrwPlugin.vim b/runtime/plugin/netrwPlugin.vim index b0a29ad786..7d2ca0bbb3 100644 --- a/runtime/plugin/netrwPlugin.vim +++ b/runtime/plugin/netrwPlugin.vim @@ -1,9 +1,9 @@ " netrwPlugin.vim: Handles file transfer and remote directory listing across a network " PLUGIN SECTION -" Date: Apr 07, 2008 +" Date: Aug 01, 2008 " Maintainer: Charles E Campbell, Jr " GetLatestVimScripts: 1075 1 :AutoInstall: netrw.vim -" Copyright: Copyright (C) 1999-2005 Charles E. Campbell, Jr. {{{1 +" Copyright: Copyright (C) 1999-2008 Charles E. Campbell, Jr. {{{1 " Permission is hereby granted to use and distribute this code, " with or without modifications, provided that this copyright " notice is copied with it. Like anything else that's free, @@ -22,7 +22,7 @@ if &cp || exists("g:loaded_netrwPlugin") finish endif -let g:loaded_netrwPlugin = "v125" +let g:loaded_netrwPlugin = "v132" let s:keepcpo = &cpo if v:version < 700 echohl WarningMsg | echo "***netrw*** you need vim version 7.0 for this version of netrw" | echohl None @@ -47,19 +47,19 @@ augroup END augroup Network au! if has("win32") || has("win95") || has("win64") || has("win16") - au BufReadCmd file://* exe "silent doau BufReadPre ".netrw#RFC2396(expand(""))|exe 'e '.substitute(netrw#RFC2396(expand("")),'file://\(.*\)','\1',"")|exe "bwipe ".expand("")|exe "silent doau BufReadPost ".netrw#RFC2396(expand("")) + au BufReadCmd file://* exe "silent doau BufReadPre ".fnameescape(netrw#RFC2396(expand("")))|exe 'e '.fnameescape(substitute(netrw#RFC2396(expand("")),'file://\(.*\)','\1',""))|exe "bwipe ".fnameescape(expand(""))|exe "silent doau BufReadPost ".fnameescape(netrw#RFC2396(expand(""))) else - au BufReadCmd file://* exe "silent doau BufReadPre ".netrw#RFC2396(expand(""))|exe 'e '.substitute(netrw#RFC2396(expand("")),'file://\(.*\)','\1',"")|exe "bwipe ".expand("")|exe "silent doau BufReadPost ".netrw#RFC2396(expand("")) - au BufReadCmd file://localhost/* exe "silent doau BufReadPre ".netrw#RFC2396(expand(""))|exe 'e '.substitute(netrw#RFC2396(expand("")),'file://localhost/\(.*\)','\1',"")|exe "bwipe ".substitute(expand(""),'file://\(\k\+@\)\=','','')|exe "silent doau BufReadPost ".netrw#RFC2396(expand("")) + au BufReadCmd file://* exe "silent doau BufReadPre ".fnameescape(netrw#RFC2396(expand("")))|exe 'e '.fnameescape(substitute(netrw#RFC2396(expand("")),'file://\(.*\)','\1',""))|exe "bwipe ".fnameescape(expand(""))|exe "silent doau BufReadPost ".fnameescape(netrw#RFC2396(expand(""))) + au BufReadCmd file://localhost/* exe "silent doau BufReadPre ".fnameescape(netrw#RFC2396(expand("")))|exe 'e '.fnameescape(substitute(netrw#RFC2396(expand("")),'file://localhost/\(.*\)','\1',""))|exe "bwipe ".fnameescape(substitute(expand(""),'file://\(\k\+@\)\=','',''))|exe "silent doau BufReadPost ".fnameescape(netrw#RFC2396(expand(""))) endif - au BufReadCmd ftp://*,rcp://*,scp://*,http://*,dav://*,davs://*,rsync://*,sftp://* exe "silent doau BufReadPre ".expand("")|exe '2Nread "'.expand("").'"'|exe "silent doau BufReadPost ".expand("") - au FileReadCmd ftp://*,rcp://*,scp://*,http://*,dav://*,davs://*,rsync://*,sftp://* exe "silent doau FileReadPre ".expand("")|exe 'Nread "' .expand("").'"'|exe "silent doau FileReadPost ".expand("") - au BufWriteCmd ftp://*,rcp://*,scp://*,dav://*,davs://*,rsync://*,sftp://* exe "silent doau BufWritePre ".expand("")|exe 'Nwrite "' .expand("").'"'|exe "silent doau BufWritePost ".expand("") - au FileWriteCmd ftp://*,rcp://*,scp://*,dav://*,davs://*,rsync://*,sftp://* exe "silent doau FileWritePre ".expand("")|exe "'[,']".'Nwrite "' .expand("").'"'|exe "silent doau FileWritePost ".expand("") + au BufReadCmd ftp://*,rcp://*,scp://*,http://*,dav://*,davs://*,rsync://*,sftp://* exe "silent doau BufReadPre ".fnameescape(expand(""))|exe '2Nread '.fnameescape(expand(""))|exe "silent doau BufReadPost ".fnameescape(expand("")) + au FileReadCmd ftp://*,rcp://*,scp://*,http://*,dav://*,davs://*,rsync://*,sftp://* exe "silent doau FileReadPre ".fnameescape(expand(""))|exe 'Nread '.fnameescape(expand(""))|exe "silent doau FileReadPost ".fnameescape(expand("")) + au BufWriteCmd ftp://*,rcp://*,scp://*,dav://*,davs://*,rsync://*,sftp://* exe "silent doau BufWritePre ".fnameescape(expand(""))|exe 'Nwrite '.fnameescape(expand(""))|exe "silent doau BufWritePost ".fnameescape(expand("")) + au FileWriteCmd ftp://*,rcp://*,scp://*,dav://*,davs://*,rsync://*,sftp://* exe "silent doau FileWritePre ".fnameescape(expand(""))|exe "'[,']".'Nwrite '.fnameescape(expand(""))|exe "silent doau FileWritePost ".fnameescape(expand("")) try - au SourceCmd ftp://*,rcp://*,scp://*,http://*,dav://*,davs://*,rsync://*,sftp://* exe 'Nsource "'.expand("").'"' + au SourceCmd ftp://*,rcp://*,scp://*,http://*,dav://*,davs://*,rsync://*,sftp://* exe 'Nsource '.fnameescape(expand("")) catch /^Vim\%((\a\+)\)\=:E216/ - au SourcePre ftp://*,rcp://*,scp://*,http://*,dav://*,davs://*,rsync://*,sftp://* exe 'Nsource "'.expand("").'"' + au SourcePre ftp://*,rcp://*,scp://*,http://*,dav://*,davs://*,rsync://*,sftp://* exe 'Nsource '.fnameescape(expand("")) endtry augroup END diff --git a/runtime/plugin/tarPlugin.vim b/runtime/plugin/tarPlugin.vim index 42fd96a319..2ddf7f3484 100644 --- a/runtime/plugin/tarPlugin.vim +++ b/runtime/plugin/tarPlugin.vim @@ -14,7 +14,7 @@ if &cp || exists("g:loaded_tarPlugin") finish endif -let g:loaded_tarPlugin = "v16" +let g:loaded_tarPlugin = "v23" let s:keepcpo = &cpo set cpo&vim diff --git a/runtime/plugin/vimballPlugin.vim b/runtime/plugin/vimballPlugin.vim index 502c8216f2..630bb9fbaa 100644 --- a/runtime/plugin/vimballPlugin.vim +++ b/runtime/plugin/vimballPlugin.vim @@ -16,7 +16,7 @@ if &cp || exists("g:loaded_vimballPlugin") finish endif -let g:loaded_vimballPlugin = "v27" +let g:loaded_vimballPlugin = "v29" let s:keepcpo = &cpo set cpo&vim diff --git a/runtime/plugin/zipPlugin.vim b/runtime/plugin/zipPlugin.vim index e98686bbd3..b80ecc610f 100644 --- a/runtime/plugin/zipPlugin.vim +++ b/runtime/plugin/zipPlugin.vim @@ -20,7 +20,7 @@ if &cp || exists("g:loaded_zipPlugin") finish endif -let g:loaded_zipPlugin = "v18" +let g:loaded_zipPlugin = "v22" let s:keepcpo = &cpo set cpo&vim diff --git a/runtime/scripts.vim b/runtime/scripts.vim index 936f508e79..62ea472d48 100644 --- a/runtime/scripts.vim +++ b/runtime/scripts.vim @@ -1,7 +1,7 @@ " Vim support file to detect file types in scripts " " Maintainer: Bram Moolenaar -" Last change: 2008 Apr 28 +" Last change: 2008 Aug 09 " This file is called by an autocommand for every file that has just been " loaded into a buffer. It checks if the type of file can be recognized by @@ -168,7 +168,7 @@ else set ft=zsh " ELM Mail files - elseif s:line1 =~ '^From [a-zA-Z][a-zA-Z_0-9\.=-]*\(@[^ ]*\)\= .*[12][09]\d\d$' + elseif s:line1 =~ '^From \([a-zA-Z][a-zA-Z_0-9\.=-]*\(@[^ ]*\)\=\|-\) .* \(19\|20\)\d\d$' set ft=mail " Mason @@ -275,7 +275,7 @@ else set ft=virata " Strace - elseif s:line1 =~ '^[0-9]* *execve(' + elseif s:line1 =~ '^\(\[pid \d\+\] \)\=[0-9:.]* *execve(' || s:line1 =~ '^__libc_start_main' set ft=strace " VSE JCL diff --git a/runtime/spell/pt/main.aap b/runtime/spell/pt/main.aap index 17ba24d33a..b2ad65bf6e 100644 --- a/runtime/spell/pt/main.aap +++ b/runtime/spell/pt/main.aap @@ -1,5 +1,5 @@ # Aap recipe for Portuguese Vim spell files. -# +# See ftp://ftp.vim.org/pub/vim/runtime/spell/README.txt # Use a freshly compiled Vim if it exists. @if os.path.exists('../../../src/vim'): diff --git a/runtime/spell/pt/pt_BR.diff b/runtime/spell/pt/pt_BR.diff index 0bd44e2c2b..f4814af11f 100644 --- a/runtime/spell/pt/pt_BR.diff +++ b/runtime/spell/pt/pt_BR.diff @@ -14,7 +14,7 @@ --- 13,32 ---- + NAME Brazilian Portuguese -+ VERSION 20080221V ++ VERSION 2008-07-07V + HOME http://www.broffice.org/verortografico + AUTHOR Raimundo Santos Moura + EMAIL raimundomoura AT openoffice DOT org diff --git a/runtime/spell/pt/pt_PT.diff b/runtime/spell/pt/pt_PT.diff index 4b048eb604..36a12aced3 100644 --- a/runtime/spell/pt/pt_PT.diff +++ b/runtime/spell/pt/pt_PT.diff @@ -10,7 +10,7 @@ SET ISO8859-1 + NAME European Portuguese -+ VERSION 2008-03-20 ++ VERSION 2008-07-05 + HOME http://natura.di.uminho.pt/ + AUTHOR Rui Vilela + EMAIL ruivilela AT di DOT uminho DOT pt diff --git a/runtime/synmenu.vim b/runtime/synmenu.vim index 68a841e25d..c2159771e4 100644 --- a/runtime/synmenu.vim +++ b/runtime/synmenu.vim @@ -208,50 +208,52 @@ an 50.40.400 &Syntax.FG.Gretl :cal SetSyn("gretl") an 50.40.410 &Syntax.FG.Groff :cal SetSyn("groff") an 50.40.420 &Syntax.FG.Groovy :cal SetSyn("groovy") an 50.40.430 &Syntax.FG.GTKrc :cal SetSyn("gtkrc") -an 50.50.100 &Syntax.HIJK.Hamster :cal SetSyn("hamster") -an 50.50.110 &Syntax.HIJK.Haskell.Haskell :cal SetSyn("haskell") -an 50.50.120 &Syntax.HIJK.Haskell.Haskell-c2hs :cal SetSyn("chaskell") -an 50.50.130 &Syntax.HIJK.Haskell.Haskell-literate :cal SetSyn("lhaskell") -an 50.50.140 &Syntax.HIJK.HASTE :cal SetSyn("haste") -an 50.50.150 &Syntax.HIJK.Hercules :cal SetSyn("hercules") -an 50.50.160 &Syntax.HIJK.Hex\ dump.XXD :cal SetSyn("xxd") -an 50.50.170 &Syntax.HIJK.Hex\ dump.Intel\ MCS51 :cal SetSyn("hex") -an 50.50.180 &Syntax.HIJK.HTML.HTML :cal SetSyn("html") -an 50.50.190 &Syntax.HIJK.HTML.HTML\ with\ M4 :cal SetSyn("htmlm4") -an 50.50.200 &Syntax.HIJK.HTML.HTML\ with\ Ruby\ (eRuby) :cal SetSyn("eruby") -an 50.50.210 &Syntax.HIJK.HTML.Cheetah\ HTML\ template :cal SetSyn("htmlcheetah") -an 50.50.220 &Syntax.HIJK.HTML.Django\ HTML\ template :cal SetSyn("htmldjango") -an 50.50.230 &Syntax.HIJK.HTML.HTML/OS :cal SetSyn("htmlos") -an 50.50.240 &Syntax.HIJK.HTML.XHTML :cal SetSyn("xhtml") -an 50.50.250 &Syntax.HIJK.Host\.conf :cal SetSyn("hostconf") -an 50.50.260 &Syntax.HIJK.Hyper\ Builder :cal SetSyn("hb") -an 50.50.280 &Syntax.HIJK.Icewm\ menu :cal SetSyn("icemenu") -an 50.50.290 &Syntax.HIJK.Icon :cal SetSyn("icon") -an 50.50.300 &Syntax.HIJK.IDL\Generic\ IDL :cal SetSyn("idl") -an 50.50.310 &Syntax.HIJK.IDL\Microsoft\ IDL :cal SetSyn("msidl") -an 50.50.320 &Syntax.HIJK.Indent\ profile :cal SetSyn("indent") -an 50.50.330 &Syntax.HIJK.Inform :cal SetSyn("inform") -an 50.50.340 &Syntax.HIJK.Informix\ 4GL :cal SetSyn("fgl") -an 50.50.350 &Syntax.HIJK.Initng :cal SetSyn("initng") -an 50.50.360 &Syntax.HIJK.Inittab :cal SetSyn("inittab") -an 50.50.370 &Syntax.HIJK.Inno\ setup :cal SetSyn("iss") -an 50.50.380 &Syntax.HIJK.InstallShield\ script :cal SetSyn("ishd") -an 50.50.390 &Syntax.HIJK.Interactive\ Data\ Lang :cal SetSyn("idlang") -an 50.50.400 &Syntax.HIJK.IPfilter :cal SetSyn("ipfilter") -an 50.50.420 &Syntax.HIJK.JAL :cal SetSyn("jal") -an 50.50.430 &Syntax.HIJK.JAM :cal SetSyn("jam") -an 50.50.440 &Syntax.HIJK.Jargon :cal SetSyn("jargon") -an 50.50.450 &Syntax.HIJK.Java.Java :cal SetSyn("java") -an 50.50.460 &Syntax.HIJK.Java.JavaCC :cal SetSyn("javacc") -an 50.50.470 &Syntax.HIJK.Java.Java\ Server\ Pages :cal SetSyn("jsp") -an 50.50.480 &Syntax.HIJK.Java.Java\ Properties :cal SetSyn("jproperties") -an 50.50.490 &Syntax.HIJK.JavaScript :cal SetSyn("javascript") -an 50.50.500 &Syntax.HIJK.Jess :cal SetSyn("jess") -an 50.50.510 &Syntax.HIJK.Jgraph :cal SetSyn("jgraph") -an 50.50.530 &Syntax.HIJK.Kconfig :cal SetSyn("kconfig") -an 50.50.540 &Syntax.HIJK.KDE\ script :cal SetSyn("kscript") -an 50.50.550 &Syntax.HIJK.Kimwitu++ :cal SetSyn("kwt") -an 50.50.560 &Syntax.HIJK.KixTart :cal SetSyn("kix") +an 50.50.100 &Syntax.HIJK.Haml :cal SetSyn("haml") +an 50.50.110 &Syntax.HIJK.Hamster :cal SetSyn("hamster") +an 50.50.120 &Syntax.HIJK.Haskell.Haskell :cal SetSyn("haskell") +an 50.50.130 &Syntax.HIJK.Haskell.Haskell-c2hs :cal SetSyn("chaskell") +an 50.50.140 &Syntax.HIJK.Haskell.Haskell-literate :cal SetSyn("lhaskell") +an 50.50.150 &Syntax.HIJK.HASTE :cal SetSyn("haste") +an 50.50.160 &Syntax.HIJK.HASTE\ preproc :cal SetSyn("hastepreproc") +an 50.50.170 &Syntax.HIJK.Hercules :cal SetSyn("hercules") +an 50.50.180 &Syntax.HIJK.Hex\ dump.XXD :cal SetSyn("xxd") +an 50.50.190 &Syntax.HIJK.Hex\ dump.Intel\ MCS51 :cal SetSyn("hex") +an 50.50.200 &Syntax.HIJK.HTML.HTML :cal SetSyn("html") +an 50.50.210 &Syntax.HIJK.HTML.HTML\ with\ M4 :cal SetSyn("htmlm4") +an 50.50.220 &Syntax.HIJK.HTML.HTML\ with\ Ruby\ (eRuby) :cal SetSyn("eruby") +an 50.50.230 &Syntax.HIJK.HTML.Cheetah\ HTML\ template :cal SetSyn("htmlcheetah") +an 50.50.240 &Syntax.HIJK.HTML.Django\ HTML\ template :cal SetSyn("htmldjango") +an 50.50.250 &Syntax.HIJK.HTML.HTML/OS :cal SetSyn("htmlos") +an 50.50.260 &Syntax.HIJK.HTML.XHTML :cal SetSyn("xhtml") +an 50.50.270 &Syntax.HIJK.Host\.conf :cal SetSyn("hostconf") +an 50.50.280 &Syntax.HIJK.Hyper\ Builder :cal SetSyn("hb") +an 50.50.300 &Syntax.HIJK.Icewm\ menu :cal SetSyn("icemenu") +an 50.50.310 &Syntax.HIJK.Icon :cal SetSyn("icon") +an 50.50.320 &Syntax.HIJK.IDL\Generic\ IDL :cal SetSyn("idl") +an 50.50.330 &Syntax.HIJK.IDL\Microsoft\ IDL :cal SetSyn("msidl") +an 50.50.340 &Syntax.HIJK.Indent\ profile :cal SetSyn("indent") +an 50.50.350 &Syntax.HIJK.Inform :cal SetSyn("inform") +an 50.50.360 &Syntax.HIJK.Informix\ 4GL :cal SetSyn("fgl") +an 50.50.370 &Syntax.HIJK.Initng :cal SetSyn("initng") +an 50.50.380 &Syntax.HIJK.Inittab :cal SetSyn("inittab") +an 50.50.390 &Syntax.HIJK.Inno\ setup :cal SetSyn("iss") +an 50.50.400 &Syntax.HIJK.InstallShield\ script :cal SetSyn("ishd") +an 50.50.410 &Syntax.HIJK.Interactive\ Data\ Lang :cal SetSyn("idlang") +an 50.50.420 &Syntax.HIJK.IPfilter :cal SetSyn("ipfilter") +an 50.50.440 &Syntax.HIJK.JAL :cal SetSyn("jal") +an 50.50.450 &Syntax.HIJK.JAM :cal SetSyn("jam") +an 50.50.460 &Syntax.HIJK.Jargon :cal SetSyn("jargon") +an 50.50.470 &Syntax.HIJK.Java.Java :cal SetSyn("java") +an 50.50.480 &Syntax.HIJK.Java.JavaCC :cal SetSyn("javacc") +an 50.50.490 &Syntax.HIJK.Java.Java\ Server\ Pages :cal SetSyn("jsp") +an 50.50.500 &Syntax.HIJK.Java.Java\ Properties :cal SetSyn("jproperties") +an 50.50.510 &Syntax.HIJK.JavaScript :cal SetSyn("javascript") +an 50.50.520 &Syntax.HIJK.Jess :cal SetSyn("jess") +an 50.50.530 &Syntax.HIJK.Jgraph :cal SetSyn("jgraph") +an 50.50.550 &Syntax.HIJK.Kconfig :cal SetSyn("kconfig") +an 50.50.560 &Syntax.HIJK.KDE\ script :cal SetSyn("kscript") +an 50.50.570 &Syntax.HIJK.Kimwitu++ :cal SetSyn("kwt") +an 50.50.580 &Syntax.HIJK.KixTart :cal SetSyn("kix") an 50.60.100 &Syntax.L-Ma.Lace :cal SetSyn("lace") an 50.60.110 &Syntax.L-Ma.LamdaProlog :cal SetSyn("lprolog") an 50.60.120 &Syntax.L-Ma.Latte :cal SetSyn("latte") @@ -402,24 +404,25 @@ an 50.90.330 &Syntax.R-Sg.Ruby :cal SetSyn("ruby") an 50.90.350 &Syntax.R-Sg.S-Lang :cal SetSyn("slang") an 50.90.360 &Syntax.R-Sg.Samba\ config :cal SetSyn("samba") an 50.90.370 &Syntax.R-Sg.SAS :cal SetSyn("sas") -an 50.90.380 &Syntax.R-Sg.Sather :cal SetSyn("sather") -an 50.90.390 &Syntax.R-Sg.Scheme :cal SetSyn("scheme") -an 50.90.400 &Syntax.R-Sg.Scilab :cal SetSyn("scilab") -an 50.90.410 &Syntax.R-Sg.Screen\ RC :cal SetSyn("screen") -an 50.90.420 &Syntax.R-Sg.SDL :cal SetSyn("sdl") -an 50.90.430 &Syntax.R-Sg.Sed :cal SetSyn("sed") -an 50.90.440 &Syntax.R-Sg.Sendmail\.cf :cal SetSyn("sm") -an 50.90.450 &Syntax.R-Sg.Send-pr :cal SetSyn("sendpr") -an 50.90.460 &Syntax.R-Sg.Sensors\.conf :cal SetSyn("sensors") -an 50.90.470 &Syntax.R-Sg.Service\ Location\ config :cal SetSyn("slpconf") -an 50.90.480 &Syntax.R-Sg.Service\ Location\ registration :cal SetSyn("slpreg") -an 50.90.490 &Syntax.R-Sg.Service\ Location\ SPI :cal SetSyn("slpspi") -an 50.90.500 &Syntax.R-Sg.Services :cal SetSyn("services") -an 50.90.510 &Syntax.R-Sg.Setserial\ config :cal SetSyn("setserial") -an 50.90.520 &Syntax.R-Sg.SGML.SGML\ catalog :cal SetSyn("catalog") -an 50.90.530 &Syntax.R-Sg.SGML.SGML\ DTD :cal SetSyn("sgml") -an 50.90.540 &Syntax.R-Sg.SGML.SGML\ Declaration :cal SetSyn("sgmldecl") -an 50.90.550 &Syntax.R-Sg.SGML.SGML-linuxdoc :cal SetSyn("sgmllnx") +an 50.90.380 &Syntax.R-Sg.Sass :cal SetSyn("sass") +an 50.90.390 &Syntax.R-Sg.Sather :cal SetSyn("sather") +an 50.90.400 &Syntax.R-Sg.Scheme :cal SetSyn("scheme") +an 50.90.410 &Syntax.R-Sg.Scilab :cal SetSyn("scilab") +an 50.90.420 &Syntax.R-Sg.Screen\ RC :cal SetSyn("screen") +an 50.90.430 &Syntax.R-Sg.SDL :cal SetSyn("sdl") +an 50.90.440 &Syntax.R-Sg.Sed :cal SetSyn("sed") +an 50.90.450 &Syntax.R-Sg.Sendmail\.cf :cal SetSyn("sm") +an 50.90.460 &Syntax.R-Sg.Send-pr :cal SetSyn("sendpr") +an 50.90.470 &Syntax.R-Sg.Sensors\.conf :cal SetSyn("sensors") +an 50.90.480 &Syntax.R-Sg.Service\ Location\ config :cal SetSyn("slpconf") +an 50.90.490 &Syntax.R-Sg.Service\ Location\ registration :cal SetSyn("slpreg") +an 50.90.500 &Syntax.R-Sg.Service\ Location\ SPI :cal SetSyn("slpspi") +an 50.90.510 &Syntax.R-Sg.Services :cal SetSyn("services") +an 50.90.520 &Syntax.R-Sg.Setserial\ config :cal SetSyn("setserial") +an 50.90.530 &Syntax.R-Sg.SGML.SGML\ catalog :cal SetSyn("catalog") +an 50.90.540 &Syntax.R-Sg.SGML.SGML\ DTD :cal SetSyn("sgml") +an 50.90.550 &Syntax.R-Sg.SGML.SGML\ Declaration :cal SetSyn("sgmldecl") +an 50.90.560 &Syntax.R-Sg.SGML.SGML-linuxdoc :cal SetSyn("sgmllnx") an 50.100.100 &Syntax.Sh-S.Shell\ script.sh\ and\ ksh :cal SetSyn("sh") an 50.100.110 &Syntax.Sh-S.Shell\ script.csh :cal SetSyn("csh") an 50.100.120 &Syntax.Sh-S.Shell\ script.tcsh :cal SetSyn("tcsh") diff --git a/runtime/syntax/2html.vim b/runtime/syntax/2html.vim index bd4016615e..ee66bf644d 100644 --- a/runtime/syntax/2html.vim +++ b/runtime/syntax/2html.vim @@ -1,6 +1,6 @@ " Vim syntax support file " Maintainer: Bram Moolenaar -" Last Change: 2007 Aug 31 +" Last Change: 2008 Jul 17 " (modified by David Ne\v{c}as (Yeti) ) " (XHTML support by Panagiotis Issaris ) " (made w3 compliant by Edd Barrett ) @@ -238,7 +238,7 @@ let s:LeadingSpace = ' ' let s:HtmlEndline = '' if exists("html_no_pre") let s:HtmlEndline = ' " if exists("g:ada_rainbow_color") syntax match adaSpecial "[:;.,]" - runtime plugin/Rainbow_Parenthsis.vim + call rainbow_parenthsis#LoadRound () + call rainbow_parenthsis#Activate () else syntax match adaSpecial "[:;().,]" endif @@ -159,7 +158,7 @@ endif " Section: end {{{1 " Unless special ("end loop", "end if", etc.), "end" marks the end of a " begin, package, task etc. Assiging it to adaEnd. -syntax match adaEnd "\" +syntax match adaEnd /\/ syntax keyword adaPreproc pragma @@ -346,9 +345,6 @@ else endif -" Section: formatoptions {{{1 -" -setlocal formatoptions+=ron " Section: sync {{{1 " diff --git a/runtime/syntax/autohotkey.vim b/runtime/syntax/autohotkey.vim index bbefd6f7b0..42d4cfdfe4 100644 --- a/runtime/syntax/autohotkey.vim +++ b/runtime/syntax/autohotkey.vim @@ -1,7 +1,7 @@ " Vim syntax file " Language: AutoHotkey script file " Maintainer: Nikolai Weibull -" Latest Revision: 2007-06-01 +" Latest Revision: 2008-06-22 if exists("b:current_syntax") finish @@ -246,6 +246,15 @@ syn keyword autohotkeyBoolean \ true \ false +" TODO: Shouldn't we look for g:, b:, variables before defaulting to +" something? +if exists("g:autohotkey_syntax_sync_minlines") + let b:autohotkey_syntax_sync_minlines = g:autohotkey_syntax_sync_minlines +else + let b:autohotkey_syntax_sync_minlines = 50 +endif +exec "syn sync ccomment autohotkeyComment minlines=" . b:autohotkey_syntax_sync_minlines + hi def link autohotkeyTodo Todo hi def link autohotkeyComment Comment hi def link autohotkeyCommentStart autohotkeyComment diff --git a/runtime/syntax/bzr.vim b/runtime/syntax/bzr.vim index afbae1a7d2..2968f79b1a 100644 --- a/runtime/syntax/bzr.vim +++ b/runtime/syntax/bzr.vim @@ -4,7 +4,7 @@ " URL: http://www.hlabs.spb.ru/vim/bzr.vim " Revision: $Id$ " Filenames: bzr_log.* -" Version: 1.0 +" Version: 1.1 " For version 5.x: Clear all syntax items. " For version 6.x: Quit when a syntax file was already loaded. @@ -14,7 +14,7 @@ elseif exists("b:current_syntax") finish endif -syn region bzrRegion start="^-\{14} This line and the following will be ignored -\{14}$" end="\%$" contains=ALL +syn region bzrRegion start="^-\{14} This line and the following will be ignored -\{14}$" end="\%$" contains=ALL contains=@NoSpell syn match bzrRemoved "^removed:$" contained syn match bzrAdded "^added:$" contained syn match bzrRenamed "^renamed:$" contained diff --git a/runtime/syntax/debchangelog.vim b/runtime/syntax/debchangelog.vim index 28fe854725..e751fbc722 100644 --- a/runtime/syntax/debchangelog.vim +++ b/runtime/syntax/debchangelog.vim @@ -19,7 +19,7 @@ syn case ignore " Define some common expressions we can use later on syn match debchangelogName contained "^[[:alpha:]][[:alnum:].+-]\+ " syn match debchangelogUrgency contained "; urgency=\(low\|medium\|high\|critical\|emergency\)\( \S.*\)\=" -syn match debchangelogTarget contained "\( \(old\)\=stable\| frozen\| unstable\| testing-proposed-updates\| experimental\| \%(sarge\|etch\|lenny\)-\%(backports\|-volatile\)\| \(old\)\=stable-security\| testing-security\| \(dapper\|edgy\|feisty\|gutsy\|hardy\)\(-\(security\|proposed\|updates\|backports\|commercial\|partner\)\)\?\)\+" +syn match debchangelogTarget contained "\v %(%(old)=stable|frozen|unstable|%(testing-|%(old)=stable-)=proposed-updates|experimental|%(sarge|etch|lenny)-%(backports|volatile)|%(testing|%(old)=stable)-security|%(dapper|feisty|gutsy|hardy|intrepid)%(-%(security|proposed|updates|backports|commercial|partner))=)+" syn match debchangelogVersion contained "(.\{-})" syn match debchangelogCloses contained "closes:\_s*\(bug\)\=#\=\_s\=\d\+\(,\_s*\(bug\)\=#\=\_s\=\d\+\)*" syn match debchangelogLP contained "\clp:\s\+#\d\+\(,\s*#\d\+\)*" diff --git a/runtime/syntax/debcontrol.vim b/runtime/syntax/debcontrol.vim index 3b01fb50ae..d56a342328 100644 --- a/runtime/syntax/debcontrol.vim +++ b/runtime/syntax/debcontrol.vim @@ -34,6 +34,7 @@ syn match debcontrolPriority contained "\(extra\|important\|optional\|required\| syn match debcontrolSection contained "\(\(contrib\|non-free\|non-US/main\|non-US/contrib\|non-US/non-free\|restricted\|universe\|multiverse\)/\)\=\(admin\|base\|comm\|devel\|doc\|editors\|electronics\|embedded\|games\|gnome\|graphics\|hamradio\|interpreters\|kde\|libs\|libdevel\|mail\|math\|misc\|net\|news\|oldlibs\|otherosfs\|perl\|python\|science\|shells\|sound\|text\|tex\|utils\|web\|x11\|debian-installer\)" syn match debcontrolPackageType contained "u\?deb" syn match debcontrolVariable contained "\${.\{-}}" +syn match debcontrolDmUpload contained "\cyes" " A URL (using the domain name definitions from RFC 1034 and 1738), right now " only enforce protocol and some sanity on the server/path part; @@ -52,7 +53,7 @@ syn match debcontrolComment "^#.*$" syn case ignore " List of all legal keys -syn match debcontrolKey contained "^\(Source\|Package\|Section\|Priority\|Maintainer\|Uploaders\|Build-Depends\|Build-Conflicts\|Build-Depends-Indep\|Build-Conflicts-Indep\|Standards-Version\|Pre-Depends\|Depends\|Recommends\|Suggests\|Provides\|Replaces\|Conflicts\|Essential\|Architecture\|Description\|Bugs\|Origin\|Enhances\|Homepage\|\(XS-\)\=Vcs-\(Browser\|Arch\|Bzr\|Cvs\|Darcs\|Git\|Hg\|Mtn\|Svn\)\|XC-Package-Type\): *" +syn match debcontrolKey contained "^\(Source\|Package\|Section\|Priority\|Maintainer\|Uploaders\|Build-Depends\|Build-Conflicts\|Build-Depends-Indep\|Build-Conflicts-Indep\|Standards-Version\|Pre-Depends\|Depends\|Recommends\|Suggests\|Provides\|Replaces\|Conflicts\|Essential\|Architecture\|Description\|Bugs\|Origin\|Enhances\|Homepage\|\(XS-\)\=Vcs-\(Browser\|Arch\|Bzr\|Cvs\|Darcs\|Git\|Hg\|Mtn\|Svn\)\|XC-Package-Type\|\%(XS-\)\=DM-Upload-Allowed\): *" " Fields for which we do strict syntax checking syn region debcontrolStrictField start="^Architecture" end="$" contains=debcontrolKey,debcontrolArchitecture,debcontrolSpace oneline @@ -65,6 +66,7 @@ syn region debcontrolStrictField start="^\%(XS-\)\?Vcs-\%(Browser\|Arch\|Bzr\|Da syn region debcontrolStrictField start="^\%(XS-\)\?Vcs-Svn" end="$" contains=debcontrolKey,debcontrolVcsSvn,debcontrolHTTPUrl oneline keepend syn region debcontrolStrictField start="^\%(XS-\)\?Vcs-Cvs" end="$" contains=debcontrolKey,debcontrolVcsCvs oneline keepend syn region debcontrolStrictField start="^\%(XS-\)\?Vcs-Git" end="$" contains=debcontrolKey,debcontrolVcsGit oneline keepend +syn region debcontrolStrictField start="^\%(XS-\)\?DM-Upload-Allowed" end="$" contains=debcontrolKey,debcontrolDmUpload oneline " Catch-all for the other legal fields syn region debcontrolField start="^\(Maintainer\|Standards-Version\|Essential\|Bugs\|Origin\|X\(S\|B\)-Python-Version\|XSBC-Original-Maintainer\|\(XS-\)\?Vcs-Mtn\):" end="$" contains=debcontrolKey,debcontrolVariable,debcontrolEmail oneline @@ -94,6 +96,7 @@ if version >= 508 || !exists("did_debcontrol_syn_inits") HiLink debcontrolVcsCvs Identifier HiLink debcontrolVcsGit Identifier HiLink debcontrolHTTPUrl Identifier + HiLink debcontrolDmUpload Identifier HiLink debcontrolComment Comment HiLink debcontrolElse Special diff --git a/runtime/syntax/debsources.vim b/runtime/syntax/debsources.vim index c952ed82c6..0ae05abd68 100644 --- a/runtime/syntax/debsources.vim +++ b/runtime/syntax/debsources.vim @@ -1,12 +1,9 @@ " Vim syntax file -" Language: Debian sources.list -" Maintainer: Matthijs Mohlmann -" Last Change: $Date$ -" URL: http://www.cacholong.nl/~matthijs/vim/syntax/debsources.vim -" $Revision$ - -" this is a very simple syntax file - I will be improving it -" add entire DEFINE syntax +" Language: Debian sources.list +" Maintainer: Debian Vim Maintainers +" Former Maintainer: Matthijs Mohlmann +" Last Change: 2008-04-25 +" URL: http://git.debian.org/?p=pkg-vim/vim.git;a=blob_plain;f=runtime/syntax/debsources.vim;hb=debian " Standard syntax initialization if version < 600 @@ -19,14 +16,14 @@ endif syn case match " A bunch of useful keywords -syn match debsourcesKeyword /\(deb-src\|deb\|main\|contrib\|non-free\)/ +syn match debsourcesKeyword /\(deb-src\|deb\|main\|contrib\|non-free\|restricted\|universe\|multiverse\)/ " Match comments syn match debsourcesComment /#.*/ " Match uri's -syn match debsourcesUri +\(http://\|ftp://\|file:///\)[^' <>"]\++ -syn match debsourcesDistrKeyword +\([[:alnum:]_./]*\)\(woody\|sarge\|etch\|old-stable\|stable\|testing\|unstable\|sid\|experimental\|warty\|hoary\|breezy\)\([[:alnum:]_./]*\)+ +syn match debsourcesUri +\(http://\|ftp://\|[rs]sh://\|debtorrent://\|\(cdrom\|copy\|file\):\)[^' <>"]\++ +syn match debsourcesDistrKeyword +\([[:alnum:]_./]*\)\(sarge\|etch\|lenny\|\(old\)\=stable\|testing\|unstable\|sid\|experimental\|dapper\|feisty\|gutsy\|hardy\|intrepid\)\([-[:alnum:]_./]*\)+ " Associate our matches and regions with pretty colours hi def link debsourcesLine Error diff --git a/runtime/syntax/doxygen.vim b/runtime/syntax/doxygen.vim index 4916b4d364..fb4d3cca46 100644 --- a/runtime/syntax/doxygen.vim +++ b/runtime/syntax/doxygen.vim @@ -1,11 +1,11 @@ " DoxyGen syntax hilighting extension for c/c++/idl/java -" Language: doxygen on top of c, cpp, idl, java +" Language: doxygen on top of c, cpp, idl, java, php " Maintainer: Michael Geddes " Author: Michael Geddes -" Last Change: April 2007 -" Version: 1.20 +" Last Change: July 2008 +" Version: 1.22 " -" Copyright 2004-2006 Michael Geddes +" Copyright 2004-2008 Michael Geddes " Please feel free to use, modify & distribute all or part of this script, " providing this copyright message remains. " I would appreciate being acknowledged in any derived scripts, and would @@ -30,12 +30,14 @@ " also be set to any highlight attribute. Alternatively, a highlight for doxygenCodeWord " can be used to override it. " -" By default, highlighting is done assumng you have the JAVADOC_AUTOBRIEF +" By default, highlighting is done assuming you have the JAVADOC_AUTOBRIEF " setting turned on in your Doxygen configuration. If you don't, you " can set the variable g:doxygen_javadoc_autobrief to 0 to have the " highlighting more accurately reflect the way Doxygen will interpret your " comments. " +" Support for cpp, c, idl, doxygen and php. +" " Special thanks to: Wu Yongwei, Toby Allsopp " @@ -56,10 +58,10 @@ try " " C/C++ Style line comments - syn region doxygenComment start=+/\*\(\*/\)\@![*!]+ end=+\*/+ contains=doxygenSyncStart,doxygenStart,doxygenTODO keepend fold - syn region doxygenCommentL start=+//[/!]<\@!+me=e-1 end=+$+ contains=doxygenStartL keepend skipwhite skipnl nextgroup=doxygenComment2 fold - syn region doxygenCommentL start=+//[/!]<+me=e-2 end=+$+ contains=doxygenStartL keepend skipwhite skipnl fold - syn region doxygenCommentL start=+//@\ze[{}]+ end=+$+ contains=doxygenGroupDefine,doxygenGroupDefineSpecial fold + syn region doxygenComment start=+/\*\(\*/\)\@![*!]+ end=+\*/+ contains=doxygenSyncStart,doxygenStart,doxygenTODO keepend fold containedin=phpRegion + syn region doxygenCommentL start=+//[/!]<\@!+me=e-1 end=+$+ contains=doxygenStartL,@Spell keepend skipwhite skipnl nextgroup=doxygenComment2 fold containedin=phpRegion + syn region doxygenCommentL start=+//[/!]<+me=e-2 end=+$+ contains=doxygenStartL,@Spell keepend skipwhite skipnl fold containedin=phpRegion + syn region doxygenCommentL start=+//@\ze[{}]+ end=+$+ contains=doxygenGroupDefine,doxygenGroupDefineSpecial,@Spell fold containedin=phpRegion " Single line brief followed by multiline comment. syn region doxygenComment2 start=+/\*\(\*/\)\@![*!]+ end=+\*/+ contained contains=doxygenSyncStart2,doxygenStart2,doxygenTODO keepend fold @@ -98,7 +100,7 @@ try " This helps with sync-ing as for some reason, syncing behaves differently to a normal region, and the start pattern does not get matched. syn match doxygenSyncStart +\ze[^*/]+ contained nextgroup=doxygenBrief,doxygenPrev,doxygenStartSpecial,doxygenFindBriefSpecial,doxygenStartSkip,doxygenPage skipwhite skipnl - syn region doxygenBriefLine contained start=+\<\k+ end=+\(\n\s*\*\=\s*\([@\\]\([npcbea]\>\|em\>\|ref\>\|link\>\|f\$\|[$\\&<>#]\)\@!\)\|\s*$\)\@=+ contains=doxygenContinueComment,doxygenFindBriefSpecial,doxygenSmallSpecial,@doxygenHtmlGroup,doxygenTODO,doxygenHyperLink,doxygenHashLink skipwhite keepend + syn region doxygenBriefLine contained start=+\<\k+ end=+\(\n\s*\*\=\s*\([@\\]\([npcbea]\>\|em\>\|ref\>\|link\>\|f\$\|[$\\&<>#]\)\@!\)\|\s*$\)\@=+ contains=doxygenContinueComment,doxygenFindBriefSpecial,doxygenSmallSpecial,@doxygenHtmlGroup,doxygenTODO,doxygenHyperLink,doxygenHashLink,@Spell skipwhite keepend " Match a '<' for applying a comment to the previous element. syn match doxygenPrev +<+ contained nextgroup=doxygenBrief,doxygenBody,doxygenSpecial,doxygenStartSkip skipwhite diff --git a/runtime/syntax/eruby.vim b/runtime/syntax/eruby.vim index 22a84537c8..46e5704053 100644 --- a/runtime/syntax/eruby.vim +++ b/runtime/syntax/eruby.vim @@ -22,7 +22,7 @@ if !exists("b:eruby_subtype") && main_syntax == 'eruby' let s:lines = getline(1)."\n".getline(2)."\n".getline(3)."\n".getline(4)."\n".getline(5)."\n".getline("$") let b:eruby_subtype = matchstr(s:lines,'eruby_subtype=\zs\w\+') if b:eruby_subtype == '' - let b:eruby_subtype = matchstr(substitute(expand("%:t"),'\c\%(\.erb\)\+$','',''),'\.\zs\w\+$') + let b:eruby_subtype = matchstr(substitute(expand("%:t"),'\c\%(\.erb\|\.eruby\)\+$','',''),'\.\zs\w\+$') endif if b:eruby_subtype == 'rhtml' let b:eruby_subtype = 'html' @@ -55,31 +55,20 @@ syn include @rubyTop syntax/ruby.vim syn cluster erubyRegions contains=erubyOneLiner,erubyBlock,erubyExpression,erubyComment -exe 'syn region erubyOneLiner matchgroup=erubyDelimiter start="^%\{1,'.b:eruby_nest_level.'\}%\@!" end="$" contains=@rubyTop containedin=ALLBUT,@erbRegions keepend oneline' -exe 'syn region erubyBlock matchgroup=erubyDelimiter start="<%\{1,'.b:eruby_nest_level.'\}%\@!-\=" end="-\=%>" contains=@rubyTop containedin=ALLBUT,@erbRegions' -exe 'syn region erubyExpression matchgroup=erubyDelimiter start="<%\{1,'.b:eruby_nest_level.'\}=" end="-\=%>" contains=@rubyTop containedin=ALLBUT,@erbRegions' -exe 'syn region erubyComment matchgroup=erubyDelimiter start="<%\{1,'.b:eruby_nest_level.'\}#" end="-\=%>" contains=rubyTodo,@Spell containedin=ALLBUT,@erbRegions keepend' +exe 'syn region erubyOneLiner matchgroup=erubyDelimiter start="^%\{1,'.b:eruby_nest_level.'\}%\@!" end="$" contains=@rubyTop containedin=ALLBUT,@erubyRegions keepend oneline' +exe 'syn region erubyBlock matchgroup=erubyDelimiter start="<%\{1,'.b:eruby_nest_level.'\}%\@!-\=" end="-\=%\@" contains=@rubyTop containedin=ALLBUT,@erubyRegions keepend' +exe 'syn region erubyExpression matchgroup=erubyDelimiter start="<%\{1,'.b:eruby_nest_level.'\}=" end="-\=%\@" contains=@rubyTop containedin=ALLBUT,@erubyRegions keepend' +exe 'syn region erubyComment matchgroup=erubyDelimiter start="<%\{1,'.b:eruby_nest_level.'\}#" end="-\=%\@" contains=rubyTodo,@Spell containedin=ALLBUT,@erubyRegions keepend' " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_eruby_syntax_inits") - if version < 508 - let did_ruby_syntax_inits = 1 - command -nargs=+ HiLink hi link - else - command -nargs=+ HiLink hi def link - endif - HiLink erubyDelimiter Delimiter - HiLink erubyComment Comment +hi def link erubyDelimiter Delimiter +hi def link erubyComment Comment - delcommand HiLink -endif let b:current_syntax = 'eruby' if main_syntax == 'eruby' unlet main_syntax endif -" vim: nowrap sw=2 sts=2 ts=8 : +" vim: nowrap sw=2 sts=2 ts=8: diff --git a/runtime/syntax/forth.vim b/runtime/syntax/forth.vim index a61f7db3ff..8713a721a8 100644 --- a/runtime/syntax/forth.vim +++ b/runtime/syntax/forth.vim @@ -1,7 +1,7 @@ " Vim syntax file " Language: FORTH " Maintainer: Christian V. J. Brssow -" Last Change: Sa 14 Jul 2007 21:39:53 CEST +" Last Change: Sa 09 Feb 2008 13:27:29 CET " Filenames: *.fs,*.ft " URL: http://www.cvjb.de/comp/vim/forth.vim @@ -10,9 +10,17 @@ " The list of keywords is incomplete, compared with the offical ANS " wordlist. If you use this language, please improve it, and send me " the patches. +" +" Before sending me patches, please download the newest version of this file +" from http://www.cvjb.de/comp/vim/forth.vim or http://www.vim.org/ (search +" for forth.vim). " Many Thanks to... " +" 2008-02-09: +" Shawn K. Quinn send a big patch with +" new words commonly used in Forth programs or defined by GNU Forth. +" " 2007-07-11: " Benjamin Krill send me a patch " to highlight space errors. @@ -79,7 +87,7 @@ syn keyword forthTodo contained TODO FIXME XXX syn match forthTodo contained 'Copyright\(\s([Cc])\)\=\(\s[0-9]\{2,4}\)\=' " Characters allowed in keywords -" I don't know if 128-255 are allowed in ANS-FORHT +" I don't know if 128-255 are allowed in ANS-FORTH if version >= 600 setlocal iskeyword=!,@,33-35,%,$,38-64,A-Z,91-96,a-z,123-126,128-255 else @@ -100,21 +108,27 @@ endif " basic mathematical and logical operators syn keyword forthOperators + - * / MOD /MOD NEGATE ABS MIN MAX -syn keyword forthOperators AND OR XOR NOT INVERT 2* 2/ 1+ 1- 2+ 2- 8* +syn keyword forthOperators AND OR XOR NOT LSHIFT RSHIFT INVERT 2* 2/ 1+ +syn keyword forthOperators 1- 2+ 2- 8* UNDER+ syn keyword forthOperators M+ */ */MOD M* UM* M*/ UM/MOD FM/MOD SM/REM -syn keyword forthOperators D+ D- DNEGATE DABS DMIN DMAX +syn keyword forthOperators D+ D- DNEGATE DABS DMIN DMAX D2* D2/ syn keyword forthOperators F+ F- F* F/ FNEGATE FABS FMAX FMIN FLOOR FROUND syn keyword forthOperators F** FSQRT FEXP FEXPM1 FLN FLNP1 FLOG FALOG FSIN syn keyword forthOperators FCOS FSINCOS FTAN FASIN FACOS FATAN FATAN2 FSINH -syn keyword forthOperators FCOSH FTANH FASINH FACOSH FATANH -syn keyword forthOperators 0< 0<= 0<> 0= 0> 0>= < <= <> = > >= -syn keyword forthOperators ?NEGATE ?DNEGATE +syn keyword forthOperators FCOSH FTANH FASINH FACOSH FATANH F2* F2/ 1/F +syn keyword forthOperators F~REL F~ABS F~ +syn keyword forthOperators 0< 0<= 0<> 0= 0> 0>= < <= <> = > >= U< U<= +syn keyword forthOperators U> U>= D0< D0<= D0<> D0= D0> D0>= D< D<= D<> +syn keyword forthOperators D= D> D>= DU< DU<= DU> DU>= WITHIN ?NEGATE +syn keyword forthOperators ?DNEGATE " stack manipulations syn keyword forthStack DROP NIP DUP OVER TUCK SWAP ROT -ROT ?DUP PICK ROLL -syn keyword forthStack 2DROP 2NIP 2DUP 2OVER 2TUCK 2SWAP 2ROT -syn keyword forthStack 3DUP 4DUP +syn keyword forthStack 2DROP 2NIP 2DUP 2OVER 2TUCK 2SWAP 2ROT 2-ROT +syn keyword forthStack 3DUP 4DUP 5DUP 3DROP 4DROP 5DROP 8DROP 4SWAP 4ROT +syn keyword forthStack 4-ROT 4TUCK 8SWAP 8DUP syn keyword forthRStack >R R> R@ RDROP 2>R 2R> 2R@ 2RDROP +syn keyword forthRstack 4>R 4R> 4R@ 4RDROP syn keyword forthFStack FDROP FNIP FDUP FOVER FTUCK FSWAP FROT " stack pointer manipulations @@ -139,24 +153,40 @@ syn keyword forthLoop ?DO LOOP I J K +DO U+DO -DO U-DO DO +LOOP -LOOP syn keyword forthLoop UNLOOP LEAVE ?LEAVE EXIT DONE FOR NEXT " new words +syn match forthClassDef '\<:class\s*[^ \t]\+\>' +syn match forthObjectDef '\<:object\s*[^ \t]\+\>' syn match forthColonDef '\<:m\?\s*[^ \t]\+\>' syn keyword forthEndOfColonDef ; ;M ;m -syn keyword forthDefine CONSTANT 2CONSTANT FCONSTANT VARIABLE 2VARIABLE CREATE -syn keyword forthDefine USER VALUE TO DEFER IS DOES> IMMEDIATE COMPILE-ONLY -syn keyword forthDefine COMPILE RESTRICT INTERPRET POSTPONE EXECUTE LITERAL -syn keyword forthDefine CREATE-INTERPRET/COMPILE INTERPRETATION> INT NAME?INT NAME>COMP NAME>STRING STATE -syn keyword forthDefine C; CVARIABLE +syn keyword forthEndOfClassDef ;class +syn keyword forthEndOfObjectDef ;object +syn keyword forthDefine CONSTANT 2CONSTANT FCONSTANT VARIABLE 2VARIABLE +syn keyword forthDefine FVARIABLE CREATE USER VALUE TO DEFER IS DOES> IMMEDIATE +syn keyword forthDefine COMPILE-ONLY COMPILE RESTRICT INTERPRET POSTPONE EXECUTE +syn keyword forthDefine LITERAL CREATE-INTERPRET/COMPILE INTERPRETATION> +syn keyword forthDefine INT NAME?INT NAME>COMP +syn keyword forthDefine NAME>STRING STATE C; CVARIABLE +syn keyword forthDefine , 2, F, C, +syn match forthDefine "\[IFDEF]" +syn match forthDefine "\[IFUNDEF]" +syn match forthDefine "\[THEN]" +syn match forthDefine "\[ENDIF]" +syn match forthDefine "\[ELSE]" +syn match forthDefine "\[?DO]" +syn match forthDefine "\[DO]" +syn match forthDefine "\[LOOP]" +syn match forthDefine "\[+LOOP]" +syn match forthDefine "\[NEXT]" +syn match forthDefine "\[BEGIN]" +syn match forthDefine "\[UNTIL]" +syn match forthDefine "\[AGAIN]" +syn match forthDefine "\[WHILE]" +syn match forthDefine "\[REPEAT]" syn match forthDefine "\[COMP']" syn match forthDefine "'" syn match forthDefine '\<\[\>' syn match forthDefine "\[']" syn match forthDefine '\[COMPILE]' -syn match forthClassDef '\<:class\s*[^ \t]\+\>' -syn match forthObjectDef '\<:object\s*[^ \t]\+\>' -syn keyword forthEndOfClassDef ';class' -syn keyword forthEndOfObjectDef ';object' " debugging syn keyword forthDebug PRINTDEBUGDATA PRINTDEBUGLINE @@ -175,27 +205,48 @@ syn match forthCharOps '\<\[char\]\s\S\s' syn region forthCharOps start=+."\s+ skip=+\\"+ end=+"+ " char-number conversion -syn keyword forthConversion <# # #> #S (NUMBER) (NUMBER?) CONVERT D>F D>S DIGIT -syn keyword forthConversion DPL F>D HLD HOLD NUMBER S>D SIGN >NUMBER +syn keyword forthConversion <<# <# # #> #>> #S (NUMBER) (NUMBER?) CONVERT D>F +syn keyword forthConversion D>S DIGIT DPL F>D HLD HOLD NUMBER S>D SIGN >NUMBER +syn keyword forthConversion F>S S>F " interptreter, wordbook, compiler syn keyword forthForth (LOCAL) BYE COLD ABORT >BODY >NEXT >LINK CFA >VIEW HERE syn keyword forthForth PAD WORDS VIEW VIEW> N>LINK NAME> LINK> L>NAME FORGET -syn keyword forthForth BODY> +syn keyword forthForth BODY> ASSERT( ASSERT0( ASSERT1( ASSERT2( ASSERT3( ) syn region forthForth start=+ABORT"\s+ skip=+\\"+ end=+"+ " vocabularies syn keyword forthVocs ONLY FORTH ALSO ROOT SEAL VOCS ORDER CONTEXT #VOCS syn keyword forthVocs VOCABULARY DEFINITIONS +" File keywords +syn keyword forthFileMode R/O R/W W/O BIN +syn keyword forthFileWords OPEN-FILE CREATE-FILE CLOSE-FILE DELETE-FILE +syn keyword forthFileWords RENAME-FILE READ-FILE READ-LINE KEY-FILE +syn keyword forthFileWords KEY?-FILE WRITE-FILE WRITE-LINE EMIT-FILE +syn keyword forthFileWords FLUSH-FILE FILE-STATUS FILE-POSITION +syn keyword forthFileWords REPOSITION-FILE FILE-SIZE RESIZE-FILE +syn keyword forthFileWords SLURP-FILE SLURP-FID STDIN STDOUT STDERR +syn keyword forthBlocks OPEN-BLOCKS USE LOAD --> BLOCK-OFFSET +syn keyword forthBlocks GET-BLOCK-FID BLOCK-POSITION LIST SCR BLOCK +syn keyword forthBlocks BUFER EMPTY-BUFFERS EMPTY-BUFFER UPDATE UPDATED? +syn keyword forthBlocks SAVE-BUFFERS SAVE-BUFFER FLUSH THRU +LOAD +THRU +syn keyword forthBlocks BLOCK-INCLUDED + " numbers syn keyword forthMath DECIMAL HEX BASE syn match forthInteger '\<-\=[0-9.]*[0-9.]\+\>' +syn match forthInteger '\<&-\=[0-9.]*[0-9.]\+\>' " recognize hex and binary numbers, the '$' and '%' notation is for gforth syn match forthInteger '\<\$\x*\x\+\>' " *1* --- dont't mess syn match forthInteger '\<\x*\d\x*\>' " *2* --- this order! syn match forthInteger '\<%[0-1]*[0-1]\+\>' -syn match forthFloat '\<-\=\d*[.]\=\d\+[Ee]\d\+\>' +syn match forthFloat '\<-\=\d*[.]\=\d\+[DdEe]\d\+\>' +syn match forthFloat '\<-\=\d*[.]\=\d\+[DdEe][-+]\d\+\>' + +" XXX If you find this overkill you can remove it. this has to come after the +" highlighting for numbers otherwise it has no effect. +syn region forthComment start='0 \[if\]' end='\[endif\]' end='\[then\]' contains=forthTodo " Strings syn region forthString start=+\.*\"+ end=+"+ end=+$+ @@ -212,9 +263,15 @@ syn region forthComment start='/\*' end='\*/' contains=forthTodo,forthSpaceError " Include files syn match forthInclude '^INCLUDE\s\+\k\+' +syn match forthInclude '^require\s\+\k\+' syn match forthInclude '^fload\s\+' syn match forthInclude '^needs\s\+' +" Locals definitions +syn region forthLocals start='{\s' start='{$' end='\s}' end='^}' +syn match forthLocals '{ }' " otherwise, at least two spaces between +syn region forthDeprecated start='locals|' end='|' + " Define the default highlighting. " For version 5.7 and earlier: only when not done already " For version 5.8 and later: only when an item doesn't have highlighting yet @@ -257,6 +314,11 @@ if version >= 508 || !exists("did_forth_syn_inits") HiLink forthObjectDef Define HiLink forthEndOfObjectDef Define HiLink forthInclude Include + HiLink forthLocals Type " nothing else uses type and locals must stand out + HiLink forthDeprecated Error " if you must, change to Type + HiLink forthFileMode Function + HiLink forthFileWords Statement + HiLink forthBlocks Statement HiLink forthSpaceError Error delcommand HiLink diff --git a/runtime/syntax/haml.vim b/runtime/syntax/haml.vim new file mode 100644 index 0000000000..395600a70c --- /dev/null +++ b/runtime/syntax/haml.vim @@ -0,0 +1,89 @@ +" Vim syntax file +" Language: Haml +" Maintainer: Tim Pope +" Filenames: *.haml + +if exists("b:current_syntax") + finish +endif + +if !exists("main_syntax") + let main_syntax = 'haml' +endif +let b:ruby_no_expensive = 1 + +runtime! syntax/html.vim +unlet! b:current_syntax +silent! syn include @hamlSassTop syntax/sass.vim +unlet! b:current_syntax +syn include @hamlRubyTop syntax/ruby.vim + +syn case match + +syn cluster hamlComponent contains=hamlAttributes,hamlClassChar,hamlIdChar,hamlObject,hamlDespacer,hamlSelfCloser,hamlRuby,hamlPlainChar,hamlInterpolatable +syn cluster hamlEmbeddedRuby contains=hamlAttributes,hamlObject,hamlRuby,hamlRubyFilter +syn cluster hamlTop contains=hamlBegin,hamlPlainFilter,hamlRubyFilter,hamlSassFilter,hamlComment,hamlHtmlComment + +syn match hamlBegin "^\s*[<>&]\@!" nextgroup=hamlTag,hamlAttributes,hamlClassChar,hamlIdChar,hamlObject,hamlRuby,hamlPlainChar,hamlInterpolatable + +syn match hamlTag "%\w\+" contained contains=htmlTagName,htmlSpecialTagName nextgroup=@hamlComponent +syn region hamlAttributes matchgroup=hamlAttributesDelimiter start="{" end="}" contained contains=@hamlRubyTop nextgroup=@hamlComponent +syn region hamlObject matchgroup=hamlObjectDelimiter start="\[" end="\]" contained contains=@hamlRubyTop nextgroup=@hamlComponent +syn match hamlDespacer "[<>]" contained nextgroup=hamlDespacer,hamlSelfCloser,hamlRuby,hamlPlainChar,hamlInterpolatable +syn match hamlSelfCloser "/" contained +syn match hamlClassChar "\." contained nextgroup=hamlClass +syn match hamlIdChar "#" contained nextgroup=hamlId +syn match hamlClass "\%(\w\|-\)\+" contained nextgroup=@hamlComponent +syn match hamlId "\%(\w\|-\)\+" contained nextgroup=@hamlComponent +syn region hamlDocType start="^\s*!!!" end="$" + +syn region hamlRuby matchgroup=hamlRubyOutputChar start="[=~]" end="$" contained contains=@hamlRubyTop keepend +syn region hamlRuby matchgroup=hamlRubyChar start="-" end="$" contained contains=@hamlRubyTop keepend +syn match hamlPlainChar "\\" contained +syn region hamlInterpolatable matchgroup=hamlInterpolatableChar start="==" end="$" keepend contained contains=hamlInterpolation +syn region hamlInterpolation matchgroup=hamlInterpolationDelimiter start="#{" end="}" contained contains=@hamlRubyTop +syn region hamlErbInterpolation matchgroup=hamlInterpolationDelimiter start="<%[=-]\=" end="-\=%>" contained contains=@hamlRubyTop + +syn match hamlHelper "\[^]]*]" contained containedin=hamlHtmlComment + +hi def link hamlSelfCloser Special +hi def link hamlDespacer Special +hi def link hamlClassChar Special +hi def link hamlIdChar Special +hi def link hamlTag Special +hi def link hamlClass Type +hi def link hamlId Identifier +hi def link hamlPlainChar Special +hi def link hamlInterpolatableChar hamlRubyChar +hi def link hamlRubyOutputChar hamlRubyChar +hi def link hamlRubyChar Special +hi def link hamlInterpolationDelimiter Delimiter +hi def link hamlDocType PreProc +hi def link hamlFilter PreProc +hi def link hamlAttributesDelimiter Delimiter +hi def link hamlObjectDelimiter Delimiter +hi def link hamlHelper Function +hi def link hamlHtmlComment hamlComment +hi def link hamlComment Comment +hi def link hamlIEConditional SpecialComment +hi def link hamlError Error + +let b:current_syntax = "haml" + +" vim:set sw=2: diff --git a/runtime/syntax/haste.vim b/runtime/syntax/haste.vim index cf943f1085..b889c5c594 100644 --- a/runtime/syntax/haste.vim +++ b/runtime/syntax/haste.vim @@ -1,9 +1,12 @@ " Vim syntax file -" Language: HASTE +" Language: HASTE - a language for VLSI IC programming " Maintainer: M. Tranchero - maurizio.tranchero?gmail.com " Credits: some parts have been taken from vhdl, verilog, and C syntax " files -" version: 0.5 +" Version: 0.9 +" Last Change: 0.9 improvement of haste numbers detection +" Change: 0.8 error matching for wrong hierarchical connections +" Change: 0.7 added more rules to highlight pre-processor directives " HASTE if exists("b:current_syntax") @@ -50,6 +53,7 @@ syn match hasteStatement "\<\(for\|do\|od\)\>" syn match hasteStatement "\<\(do\|or\|od\)\>" syn match hasteStatement "\<\(sel\|les\)\>" syn match hasteError "\<\d\+[_a-zA-Z]\+\>" +syn match hasteError "\(\([[:alnum:]]\+\s*(\s\+\|)\s*,\)\)\s*\([[:alnum:]]\+\s*(\)" " Predifined Haste types syn keyword hasteType bool @@ -60,39 +64,28 @@ syn keyword hasteType bool syn match hasteVector "0b\"[01_]\+\"" syn match hasteVector "0x\"[0-9a-f_]\+\"" syn match hasteCharacter "'.'" -syn region hasteString start=+"+ end=+"+ -" C pre-processor directives -"syn region hasteIncluded display contained start=+"+ skip=+\\\\\|\\"+ end=+"+ +" syn region hasteString start=+"+ end=+"+ syn match hasteIncluded display contained "<[^>]*>" syn match hasteIncluded display contained "<[^"]*>" -syn match hasteInclude display "^\s*#include\>\s*["<]" contains=hasteIncluded -syn region hasteDefine start="^\s*\(%:\|#\)\s*\(define\|undef\)\>" skip="\\$" end="$" end="//"me=s-1 contains=ALLBUT,@hastePreProcGroup,@Spell -syn region hasteDefine start="^\s*\(%:\|#\)\s*\(ifndef\|ifdef\|endif\)\>" skip="\\$" end="$" end="//"me=s-1 contains=@Spell -syn region hastePreCondit start="^\s*\(%:\|#\)\s*\(if\|ifdef\|ifndef\|elif\)\>" skip="\\$" end="$" end="//"me=s-1 contains=hasteComment,hasteCppString,hasteCharacter,hasteCppParen,hasteParenError,hasteNumbers,hasteCommentError,hasteSpaceError -syn region hastePreProc start="^\s*\(%:\|#\)\s*\(pragma\>\|line\>\|warning\>\|warn\>\|error\>\)" skip="\\$" end="$" keepend contains=ALLBUT,@hastePreProcGroup,@Spell -syn cluster hastePreProcGroup contains=hasteIncluded,hasteInclude,hasteDefine -syn region hasteCppSkip contained start="^\s*\(%:\|#\)\s*\(if\>\|ifdef\>\|ifndef\>\)" skip="\\$" end="^\s*\(%:\|#\)\s*endif\>" contains=hasteSpaceError,hasteCppSkip +syn region hasteInclude start="^\s*#include\>\s*" end="$" contains=hasteIncluded,hasteString -" floating numbers -syn match hasteNumber "-\=\<\d\+\.\d\+\(E[+\-]\=\d\+\)\>" -syn match hasteNumber "-\=\<\d\+\.\d\+\>" -syn match hasteNumber "0*2#[01_]\+\.[01_]\+#\(E[+\-]\=\d\+\)\=" -syn match hasteNumber "0*16#[0-9a-f_]\+\.[0-9a-f_]\+#\(E[+\-]\=\d\+\)\=" " integer numbers -syn match hasteNumber "-\=\<\d\+\(E[+\-]\=\d\+\)\>" +syn match hasteNumber "\d\+\^[[:alnum:]]*[-+]\{0,1\}[[:alnum:]]*" +syn match hasteNumber "-\=\<\d\+\(\^[+\-]\=\d\+\)\>" syn match hasteNumber "-\=\<\d\+\>" -syn match hasteNumber "0*2#[01_]\+#\(E[+\-]\=\d\+\)\=" -syn match hasteNumber "0*16#[0-9a-f_]\+#\(E[+\-]\=\d\+\)\=" +" syn match hasteNumber "0*2#[01_]\+#\(\^[+\-]\=\d\+\)\=" +" syn match hasteNumber "0*16#[0-9a-f_]\+#\(\^[+\-]\=\d\+\)\=" " operators -syn keyword hasteSeparators & , . \| : +syn keyword hasteSeparators & , . \| syn keyword hasteExecution \|\| ; @ -syn keyword hasteOperator := ? ! +syn keyword hasteOperator := ? ! : syn keyword hasteTypeConstr "[" << >> .. "]" ~ syn keyword hasteExprOp < <= >= > = # <> + - * == ## syn keyword hasteMisc ( ) 0x 0b " syn match hasteSeparators "[&:\|,.]" syn match hasteOperator ":=" +syn match hasteOperator ":" syn match hasteOperator "?" syn match hasteOperator "!" syn match hasteExecution "||" @@ -110,7 +103,7 @@ syn match hasteExprOp "<>" syn match hasteExprOp "=" syn match hasteExprOp "==" syn match hasteExprOp "##" -syn match hasteExprOp "#" +" syn match hasteExprOp "#" syn match hasteExprOp "*" syn match hasteExprOp "+" @@ -133,6 +126,7 @@ hi def link hasteType Type hi def link hasteGlobal Error hi def link hasteError Error hi def link hasteAttribute Type +" hi def link hasteSeparators Special hi def link hasteExecution Special hi def link hasteTypeConstr Special @@ -143,7 +137,8 @@ hi def link hasteFutureExt Error hi def link hasteVerilog Error hi def link hasteDefine Macro hi def link hasteInclude Include -hi def link hastePreProc PreProc +" hi def link hastePreProc Preproc +" hi def link hastePreProcVar Special let b:current_syntax = "haste" diff --git a/runtime/syntax/hastepreproc.vim b/runtime/syntax/hastepreproc.vim new file mode 100644 index 0000000000..3fcb8ddd31 --- /dev/null +++ b/runtime/syntax/hastepreproc.vim @@ -0,0 +1,49 @@ +" Vim syntax file +" Language: Haste preprocessor files +" Maintainer: M. Tranchero - maurizio.tranchero@gmail.com +" Credits: some parts have been taken from vhdl, verilog, and C syntax +" files +" Version: 0.5 + +" HASTE +if exists("b:current_syntax") + finish +endif +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif +" Read the C syntax to start with +if version < 600 + so :p:h/haste.vim +else + runtime! syntax/haste.vim + unlet b:current_syntax +endif + +" case is significant +syn case match + +" C pre-processor directives +syn match hastepreprocVar display "\$[[:alnum:]_]*" +syn region hastepreprocVar start="\${" end="}" contains=hastepreprocVar +" +"syn region hastepreproc start="#\[\s*tg[:alnum:]*" end="]#" contains=hastepreprocVar,hastepreproc,hastepreprocError,@Spell +syn region hastepreproc start="#\[\s*\(\|tgfor\|tgif\)" end="$" contains=hastepreprocVar,hastepreproc,@Spell +syn region hastepreproc start="}\s\(else\)\s{" end="$" contains=hastepreprocVar,hastepreproc,@Spell +syn region hastepreproc start="^\s*#\s*\(ifndef\|ifdef\|else\|endif\)\>" end="$" contains=@hastepreprocGroup,@Spell +syn region hastepreproc start="\s*##\s*\(define\|undef\)\>" end="$" contains=@hastepreprocGroup,@Spell +syn match hastepreproc "}\{0,1}\s*]#" + +" Define the default highlighting. +" Only when an item doesn't have highlighting yet +hi def link hastepreproc Preproc +hi def link hastepreprocVar Special +hi def link hastepreprocError Error + +let b:current_syntax = "hastepreproc" + +" vim: ts=8 diff --git a/runtime/syntax/lhaskell.vim b/runtime/syntax/lhaskell.vim index d6f21ae7cd..7ff09e7b3b 100644 --- a/runtime/syntax/lhaskell.vim +++ b/runtime/syntax/lhaskell.vim @@ -4,8 +4,8 @@ " \begin{code} \end{code} blocks " Maintainer: Haskell Cafe mailinglist " Original Author: Arthur van Leeuwen -" Last Change: 2004 Aug 31 -" Version: 1.01 +" Last Change: 2008 Jul 01 +" Version: 1.02 " " Thanks to Ian Lynagh for thoughtful comments on initial versions and " for the inspiration for writing this in the first place. @@ -29,6 +29,8 @@ " 2004 February 20: Cleaned up the guessing and overriding a bit " 2004 February 23: Cleaned up syntax highlighting for \begin{code} and " \end{code}, added some clarification to the attributions +" 2008 July 1: Removed % from guess list, as it totally breaks plain +" text markup guessing " @@ -71,14 +73,14 @@ call cursor(1,1) " - \begin{env} (for env != code) " - \part, \chapter, \section, \subsection, \subsubsection, etc if b:lhs_markup == "unknown" - if search('%\|\\documentclass\|\\begin{\(code}\)\@!\|\\\(sub\)*section\|\\chapter|\\part','W') != 0 + if search('\\documentclass\|\\begin{\(code}\)\@!\|\\\(sub \)*section\|\\chapter|\\part','W') != 0 let b:lhs_markup = "tex" else let b:lhs_markup = "plain" endif endif -" If user wants us to highlight TeX syntax, read it. +" If user wants us to highlight TeX syntax or guess thinks it's TeX, read it. if b:lhs_markup == "tex" if version < 600 source :p:h/tex.vim diff --git a/runtime/syntax/logtalk.vim b/runtime/syntax/logtalk.vim index 6faf5960eb..5fcbb09742 100644 --- a/runtime/syntax/logtalk.vim +++ b/runtime/syntax/logtalk.vim @@ -2,7 +2,7 @@ " " Language: Logtalk " Maintainer: Paulo Moura -" Last Change: February 24, 2006 +" Last Change: June 16, 2008 " Quit when a syntax file was already loaded: @@ -32,12 +32,15 @@ syn match logtalkOperator ":-" " Logtalk quoted atoms and strings syn region logtalkString start=+"+ skip=+\\"+ end=+"+ -syn region logtalkAtom start=+'+ skip=+\\'+ end=+'+ +syn region logtalkAtom start=+'+ skip=+\\'+ end=+'+ contains=logtalkEscapeSequence + +syn match logtalkEscapeSequence contained "\\\([\\abfnrtv\"\']\|\(x[a-fA-F0-9]\+\|[0-7]\+\)\\\)" " Logtalk message sending operators syn match logtalkOperator "::" +syn match logtalkOperator ":" syn match logtalkOperator "\^\^" @@ -48,7 +51,7 @@ syn region logtalkExtCall matchgroup=logtalkExtCallTag start="{" matchgroup=l " Logtalk opening entity directives -syn region logtalkOpenEntityDir matchgroup=logtalkOpenEntityDirTag start=":- object(" matchgroup=logtalkOpenEntityDirTag end=")\." contains=logtalkEntity,logtalkVariable,logtalkNumber,logtalkOperator,logtalkEntityRel +syn region logtalkOpenEntityDir matchgroup=logtalkOpenEntityDirTag start=":- object(" matchgroup=logtalkOpenEntityDirTag end=")\." contains=logtalkEntity,logtalkVariable,logtalkNumber,logtalkOperator,logtalkString,logtalkAtom,logtalkEntityRel syn region logtalkOpenEntityDir matchgroup=logtalkOpenEntityDirTag start=":- protocol(" matchgroup=logtalkOpenEntityDirTag end=")\." contains=logtalkEntity,logtalkVariable,logtalkNumber,logtalkOperator,logtalkEntityRel syn region logtalkOpenEntityDir matchgroup=logtalkOpenEntityDirTag start=":- category(" matchgroup=logtalkOpenEntityDirTag end=")\." contains=logtalkEntity,logtalkVariable,logtalkNumber,logtalkOperator,logtalkEntityRel @@ -62,17 +65,19 @@ syn match logtalkCloseEntityDir ":- end_category\." " Logtalk entity relations -syn region logtalkEntityRel matchgroup=logtalkEntityRelTag start="instantiates(" matchgroup=logtalkEntityRelTag end=")" contains=logtalkEntity,logtalkVariable,logtalkNumber,logtalkOperator contained -syn region logtalkEntityRel matchgroup=logtalkEntityRelTag start="specializes(" matchgroup=logtalkEntityRelTag end=")" contains=logtalkEntity,logtalkVariable,logtalkNumber,logtalkOperator contained -syn region logtalkEntityRel matchgroup=logtalkEntityRelTag start="extends(" matchgroup=logtalkEntityRelTag end=")" contains=logtalkEntity,logtalkVariable,logtalkNumber,logtalkOperator contained -syn region logtalkEntityRel matchgroup=logtalkEntityRelTag start="imports(" matchgroup=logtalkEntityRelTag end=")" contains=logtalkEntity,logtalkVariable,logtalkNumber,logtalkOperator contained -syn region logtalkEntityRel matchgroup=logtalkEntityRelTag start="implements(" matchgroup=logtalkEntityRelTag end=")" contains=logtalkEntity,logtalkVariable,logtalkNumber,logtalkOperator contained +syn region logtalkEntityRel matchgroup=logtalkEntityRelTag start="instantiates(" matchgroup=logtalkEntityRelTag end=")" contains=logtalkEntity,logtalkVariable,logtalkNumber,logtalkOperator,logtalkString,logtalkAtom contained +syn region logtalkEntityRel matchgroup=logtalkEntityRelTag start="specializes(" matchgroup=logtalkEntityRelTag end=")" contains=logtalkEntity,logtalkVariable,logtalkNumber,logtalkOperator,logtalkString,logtalkAtom contained +syn region logtalkEntityRel matchgroup=logtalkEntityRelTag start="extends(" matchgroup=logtalkEntityRelTag end=")" contains=logtalkEntity,logtalkVariable,logtalkNumber,logtalkOperator,logtalkString,logtalkAtom contained +syn region logtalkEntityRel matchgroup=logtalkEntityRelTag start="imports(" matchgroup=logtalkEntityRelTag end=")" contains=logtalkEntity,logtalkVariable,logtalkNumber,logtalkOperator,logtalkString,logtalkAtom contained +syn region logtalkEntityRel matchgroup=logtalkEntityRelTag start="implements(" matchgroup=logtalkEntityRelTag end=")" contains=logtalkEntity,logtalkVariable,logtalkNumber,logtalkOperator,logtalkString,logtalkAtom contained +syn region logtalkEntityRel matchgroup=logtalkEntityRelTag start="complements(" matchgroup=logtalkEntityRelTag end=")" contains=logtalkEntity,logtalkVariable,logtalkNumber,logtalkOperator,logtalkString,logtalkAtom contained " Logtalk directives syn region logtalkDir matchgroup=logtalkDirTag start=":- alias(" matchgroup=logtalkDirTag end=")\." contains=ALL -syn region logtalkDir matchgroup=logtalkDirTag start=":- encoding(" matchgroup=logtalkDirTag end=")\." contains=ALL +syn region logtalkDir matchgroup=logtalkDirTag start=":- calls(" matchgroup=logtalkDirTag end=")\." contains=ALL +syn region logtalkDir matchgroup=logtalkDirTag start=":- encoding(" matchgroup=logtalkDirTag end=")\." contains=ALL syn region logtalkDir matchgroup=logtalkDirTag start=":- initialization(" matchgroup=logtalkDirTag end=")\." contains=ALL syn region logtalkDir matchgroup=logtalkDirTag start=":- info(" matchgroup=logtalkDirTag end=")\." contains=ALL syn region logtalkDir matchgroup=logtalkDirTag start=":- mode(" matchgroup=logtalkDirTag end=")\." contains=logtalkOperator, logtalkAtom @@ -83,17 +88,18 @@ syn region logtalkDir matchgroup=logtalkDirTag start=":- multifile(" matchgrou syn region logtalkDir matchgroup=logtalkDirTag start=":- public(" matchgroup=logtalkDirTag end=")\." contains=ALL syn region logtalkDir matchgroup=logtalkDirTag start=":- protected(" matchgroup=logtalkDirTag end=")\." contains=ALL syn region logtalkDir matchgroup=logtalkDirTag start=":- private(" matchgroup=logtalkDirTag end=")\." contains=ALL -syn region logtalkDir matchgroup=logtalkDirTag start=":- metapredicate(" matchgroup=logtalkDirTag end=")\." contains=ALL +syn region logtalkDir matchgroup=logtalkDirTag start=":- meta_predicate(" matchgroup=logtalkDirTag end=")\." contains=ALL syn region logtalkDir matchgroup=logtalkDirTag start=":- op(" matchgroup=logtalkDirTag end=")\." contains=ALL -syn region logtalkDir matchgroup=logtalkDirTag start=":- calls(" matchgroup=logtalkDirTag end=")\." contains=ALL +syn region logtalkDir matchgroup=logtalkDirTag start=":- synchronized(" matchgroup=logtalkDirTag end=")\." contains=ALL +syn match logtalkDirTag ":- synchronized\." syn region logtalkDir matchgroup=logtalkDirTag start=":- uses(" matchgroup=logtalkDirTag end=")\." contains=ALL +syn match logtalkDirTag ":- threaded\." " Module directives syn region logtalkDir matchgroup=logtalkDirTag start=":- module(" matchgroup=logtalkDirTag end=")\." contains=ALL syn region logtalkDir matchgroup=logtalkDirTag start=":- export(" matchgroup=logtalkDirTag end=")\." contains=ALL -syn region logtalkDir matchgroup=logtalkDirTag start=":- meta_predicate(" matchgroup=logtalkDirTag end=")\." contains=ALL syn region logtalkDir matchgroup=logtalkDirTag start=":- use_module(" matchgroup=logtalkDirTag end=")\." contains=ALL @@ -103,19 +109,22 @@ syn match logtalkBuiltIn "\<\(abolish\|c\(reate\|urrent\)\)_\(object\|protocol\ syn match logtalkBuiltIn "\<\(object\|protocol\|category\)_property\ze(" -syn match logtalkBuiltIn "\=" " Stream selection and control -syn match logtalkKeyword "\<\(current\|set\)_\(in\|out\)put\ze(" +syn match logtalkKeyword "\<\(curren\|se\)t_\(in\|out\)put\ze(" syn match logtalkKeyword "\" syn match logtalkKeyword "\" syn match logtalkKeyword "\" @@ -302,13 +311,13 @@ syn match logtalkOperator "\\" syn match logtalkOperator "|" -" Logtalk numbers +" Logtalk numbers syn match logtalkNumber "\<\d\+\>" syn match logtalkNumber "\<\d\+\.\d\+\>" syn match logtalkNumber "\<\d\+[eE][-+]\=\d\+\>" syn match logtalkNumber "\<\d\+\.\d\+[eE][-+]\=\d\+\>" -syn match logtalkNumber "\<0'.\>" +syn match logtalkNumber "\<0'.\|0''\|0'\"\>" syn match logtalkNumber "\<0b[0-1]\+\>" syn match logtalkNumber "\<0o\o\+\>" syn match logtalkNumber "\<0x\x\+\>" @@ -346,7 +355,7 @@ if version >= 508 || !exists("did_logtalk_syn_inits") else command -nargs=+ HiLink hi def link endif - + HiLink logtalkBlockComment Comment HiLink logtalkLineComment Comment @@ -365,6 +374,7 @@ if version >= 508 || !exists("did_logtalk_syn_inits") HiLink logtalkAtom String HiLink logtalkString String + HiLink logtalkEscapeSequence SpecialChar HiLink logtalkNumber Number @@ -386,7 +396,3 @@ endif let b:current_syntax = "logtalk" - -setlocal ts=4 -setlocal fdm=syntax -setlocal fdc=2 diff --git a/runtime/syntax/mailaliases.vim b/runtime/syntax/mailaliases.vim index de85a174fa..743068f66f 100644 --- a/runtime/syntax/mailaliases.vim +++ b/runtime/syntax/mailaliases.vim @@ -1,7 +1,7 @@ " Vim syntax file " Language: aliases(5) local alias database file " Maintainer: Nikolai Weibull -" Latest Revision: 2006-01-14 +" Latest Revision: 2008-04-14 if exists("b:current_syntax") finish @@ -19,7 +19,7 @@ syn match mailaliasesBegin display '^' \ nextgroup=mailaliasesName, \ mailaliasesComment -syn match mailaliasesName contained '[0-9A-Za-z_-]\+' +syn match mailaliasesName contained '[[:alnum:]\._-]\+' \ nextgroup=mailaliasesColon syn region mailaliasesName contained oneline start=+"+ diff --git a/runtime/syntax/make.vim b/runtime/syntax/make.vim index 5e72f4e69e..e9d7ee99d6 100644 --- a/runtime/syntax/make.vim +++ b/runtime/syntax/make.vim @@ -2,7 +2,7 @@ " Language: Makefile " Maintainer: Claudio Fleiner " URL: http://www.fleiner.com/vim/syntax/make.vim -" Last Change: 2007 Apr 30 +" Last Change: 2008 Aug 04 " For version 5.x: Clear all syntax items " For version 6.x: Quit when a syntax file was already loaded @@ -63,7 +63,7 @@ syn match makeCmdNextLine "\\\n."he=e-1 contained " Statements / Functions (GNU make) -syn match makeStatement contained "(\(subst\|addprefix\|addsuffix\|basename\|call\|dir\|error\|eval\|filter-out\|filter\|findstring\|firstword\|foreach\|if\|join\|notdir\|origin\|patsubst\|shell\|sort\|strip\|suffix\|warning\|wildcard\|word\|wordlist\|words\)\>"ms=s+1 +syn match makeStatement contained "(\(subst\|abspath\|addprefix\|addsuffix\|and\|basename\|call\|dir\|error\|eval\|filter-out\|filter\|findstring\|firstword\|flavor\|foreach\|if\|info\|join\|lastword\|notdir\|or\|origin\|patsubst\|realpath\|shell\|sort\|strip\|suffix\|value\|warning\|wildcard\|word\|wordlist\|words\)\>"ms=s+1 " Comment if exists("make_microsoft") diff --git a/runtime/syntax/messages.vim b/runtime/syntax/messages.vim index 2dbaa5ac3d..4648e94c13 100644 --- a/runtime/syntax/messages.vim +++ b/runtime/syntax/messages.vim @@ -1,7 +1,8 @@ " Vim syntax file " Language: /var/log/messages file " Maintainer: Yakov Lerner -" Latest Revision: 2006-06-19 +" Latest Revision: 2008-06-29 +" Changes: 2008-06-29 support for RFC3339 tuimestamps James Vega if exists("b:current_syntax") finish @@ -10,7 +11,7 @@ endif let s:cpo_save = &cpo set cpo&vim -syn match messagesBegin display '^' nextgroup=messagesDate +syn match messagesBegin display '^' nextgroup=messagesDate,messagesDateRFC3339 syn match messagesDate contained display '\a\a\a [ 0-9]\d *' \ nextgroup=messagesHour @@ -18,6 +19,15 @@ syn match messagesDate contained display '\a\a\a [ 0-9]\d *' syn match messagesHour contained display '\d\d:\d\d:\d\d\s*' \ nextgroup=messagesHost +syn match messagesDateRFC3339 contained display '\d\{4}-\d\d-\d\d' + \ nextgroup=messagesRFC3339T + +syn match messagesRFC3339T contained display '\cT' + \ nextgroup=messagesHourRFC3339 + +syn match messagesHourRFC3339 contained display '\c\d\d:\d\d:\d\d\(\.\d\+\)\=\([+-]\d\d:\d\d\|Z\)' + \ nextgroup=messagesHost + syn match messagesHost contained display '\S*\s*' \ nextgroup=messagesLabel @@ -43,6 +53,9 @@ syn match messagesError contained '\c.*\<\(FATAL\|ERROR\|ERRORS\|FAILED\ hi def link messagesDate Constant hi def link messagesHour Type +hi def link messagesDateRFC3339 Constant +hi def link messagesHourRFC3339 Type +hi def link messagesRFC3339T Normal hi def link messagesHost Identifier hi def link messagesLabel Operator hi def link messagesPID Constant diff --git a/runtime/syntax/modconf.vim b/runtime/syntax/modconf.vim index d4e8827bec..54b6593b66 100644 --- a/runtime/syntax/modconf.vim +++ b/runtime/syntax/modconf.vim @@ -1,7 +1,7 @@ " Vim syntax file " Language: modules.conf(5) configuration file " Maintainer: Nikolai Weibull -" Latest Revision: 2007-06-17 +" Latest Revision: 2007-10-25 if exists("b:current_syntax") finish @@ -21,7 +21,7 @@ syn keyword modconfConditional if else elseif endif syn keyword modconfPreProc alias define include keep prune \ post-install post-remove pre-install - \ pre-remove persistdir + \ pre-remove persistdir blacklist syn keyword modconfKeyword add above below install options probe probeall \ remove diff --git a/runtime/syntax/muttrc.vim b/runtime/syntax/muttrc.vim index 0b1d16164e..068609c9a5 100644 --- a/runtime/syntax/muttrc.vim +++ b/runtime/syntax/muttrc.vim @@ -2,9 +2,9 @@ " Language: Mutt setup files " Original: Preben 'Peppe' Guldberg " Maintainer: Kyle Wheeler -" Last Change: 15 Aug 2007 +" Last Change: 12 Jun 2008 -" This file covers mutt version 1.5.16 (and most of CVS HEAD) +" This file covers mutt version 1.5.18 (and most of the mercurial tip) " Included are also a few features from 1.4.2.1 " For version 5.x: Clear all syntax items @@ -76,6 +76,7 @@ syn region muttrcKey contained start=+'+ skip=+\\\\\|\\'+ end=+'+ contains=mut syn match muttrcKeyName contained "\" syn match muttrcKeyName contained "\\[trne]" syn match muttrcKeyName contained "\c<\%(BackSpace\|Delete\|Down\|End\|Enter\|Esc\|Home\|Insert\|Left\|PageDown\|PageUp\|Return\|Right\|Space\|Tab\|Up\)>" +syn match muttrcKeyName contained "" syn keyword muttrcVarBool contained allow_8bit allow_ansi arrow_cursor ascii_chars askbcc syn keyword muttrcVarBool contained askcc attach_split auto_tag autoedit beep beep_new @@ -217,6 +218,7 @@ syn match muttrcFormatErrors contained /%./ syn region muttrcIndexFormatStr contained keepend start=+"+ skip=+\\"+ end=+"+ contains=muttrcIndexFormatEscapes,muttrcIndexFormatConditionals,muttrcFormatErrors,muttrcTimeEscapes syn region muttrcIndexFormatStr contained keepend start=+'+ skip=+\\'+ end=+'+ contains=muttrcIndexFormatEscapes,muttrcIndexFormatConditionals,muttrcFormatErrors,muttrcTimeEscapes +syn region muttrcQueryFormatStr contained keepend start=+"+ skip=+\\"+ end=+"+ contains=muttrcQueryFormatEscapes,muttrcQueryFormatConditionals,muttrcFormatErrors syn region muttrcAliasFormatStr contained keepend start=+"+ skip=+\\"+ end=+"+ contains=muttrcAliasFormatEscapes,muttrcFormatErrors syn region muttrcAliasFormatStr contained keepend start=+'+ skip=+\\'+ end=+'+ contains=muttrcAliasFormatEscapes,muttrcFormatErrors syn region muttrcAttachFormatStr contained keepend start=+"+ skip=+\\"+ end=+"+ contains=muttrcAttachFormatEscapes,muttrcAttachFormatConditionals,muttrcFormatErrors @@ -243,6 +245,9 @@ syn match muttrcIndexFormatEscapes contained /%\%(\%(-\?[0-9]\+\)\?\%(\.[0-9]\+\ syn match muttrcIndexFormatConditionals contained /%?[EFHlLMNOXyY]?/ nextgroup=muttrcFormatConditionals2 " The following info was pulled from alias_format_str in addrbook.c syn match muttrcAliasFormatEscapes contained /%\%(\%(-\?[0-9]\+\)\?\%(\.[0-9]\+\)\?\)\?[:_]\?[afnrt%]/ +" The following info was pulled from query_format_str in query.c +syn match muttrcQueryFormatEscapes contained /%\%(\%(-\?[0-9]\+\)\?\%(\.[0-9]\+\)\?\)\?[:_]\?[acent%]/ +syn match muttrcQueryFormatConditionals contained /%?[e]?/ nextgroup=muttrcFormatConditionals2 " The following info was pulled from mutt_attach_fmt in recvattach.c syn match muttrcAttachFormatEscapes contained /%\%(\%(-\?[0-9]\+\)\?\%(\.[0-9]\+\)\?\)\?[:_]\?[CcDdefImMnQstTuX%]/ syn match muttrcAttachFormatEscapes contained /%[>|*]./ @@ -287,27 +292,29 @@ syn region muttrcTimeEscapes contained start=+%<+ end=+>+ contains=muttrcStrftim syn region muttrcPGPTimeEscapes contained start=+%\[+ end=+\]+ contains=muttrcStrftimeEscapes syn keyword muttrcVarStr contained attribution index_format message_format pager_format nextgroup=muttrcVarEqualsIdxFmt -syn match muttrcVarEqualsIdxFmt contained "=" nextgroup=muttrcIndexFormatStr +syn match muttrcVarEqualsIdxFmt contained " *= *" nextgroup=muttrcIndexFormatStr syn keyword muttrcVarStr contained alias_format nextgroup=muttrcVarEqualsAliasFmt -syn match muttrcVarEqualsAliasFmt contained "=" nextgroup=muttrcAliasFormatStr +syn match muttrcVarEqualsAliasFmt contained " *= *" nextgroup=muttrcAliasFormatStr syn keyword muttrcVarStr contained attach_format nextgroup=muttrcVarEqualsAttachFmt -syn match muttrcVarEqualsAttachFmt contained "=" nextgroup=muttrcAttachFormatStr +syn match muttrcVarEqualsAttachFmt contained " *= *" nextgroup=muttrcAttachFormatStr syn keyword muttrcVarStr contained compose_format nextgroup=muttrcVarEqualsComposeFmt -syn match muttrcVarEqualsComposeFmt contained "=" nextgroup=muttrcComposeFormatStr +syn match muttrcVarEqualsComposeFmt contained " *= *" nextgroup=muttrcComposeFormatStr syn keyword muttrcVarStr contained folder_format nextgroup=muttrcVarEqualsFolderFmt -syn match muttrcVarEqualsFolderFmt contained "=" nextgroup=muttrcFolderFormatStr +syn match muttrcVarEqualsFolderFmt contained " *= *" nextgroup=muttrcFolderFormatStr syn keyword muttrcVarStr contained mix_entry_format nextgroup=muttrcVarEqualsMixFmt -syn match muttrcVarEqualsMixFmt contained "=" nextgroup=muttrcMixFormatStr +syn match muttrcVarEqualsMixFmt contained " *= *" nextgroup=muttrcMixFormatStr syn keyword muttrcVarStr contained pgp_entry_format nextgroup=muttrcVarEqualsPGPFmt -syn match muttrcVarEqualsPGPFmt contained "=" nextgroup=muttrcPGPFormatStr +syn match muttrcVarEqualsPGPFmt contained " *= *" nextgroup=muttrcPGPFormatStr +syn keyword muttrcVarStr contained query_format nextgroup=muttrcVarEqualsQueryFmt +syn match muttrcVarEqualsQueryFmt contained " *= *" nextgroup=muttrcQueryFormatStr syn keyword muttrcVarStr contained pgp_decode_command pgp_verify_command pgp_decrypt_command pgp_clearsign_command pgp_sign_command pgp_encrypt_sign_command pgp_encrypt_only_command pgp_import_command pgp_export_command pgp_verify_key_command pgp_list_secring_command pgp_list_pubring_command nextgroup=muttrcVarEqualsPGPCmdFmt -syn match muttrcVarEqualsPGPCmdFmt contained "=" nextgroup=muttrcPGPCmdFormatStr +syn match muttrcVarEqualsPGPCmdFmt contained " *= *" nextgroup=muttrcPGPCmdFormatStr syn keyword muttrcVarStr contained status_format nextgroup=muttrcVarEqualsStatusFmt -syn match muttrcVarEqualsStatusFmt contained "=" nextgroup=muttrcStatusFormatStr +syn match muttrcVarEqualsStatusFmt contained " *= *" nextgroup=muttrcStatusFormatStr syn keyword muttrcVarStr contained pgp_getkeys_command nextgroup=muttrcVarEqualsPGPGetKeysFmt -syn match muttrcVarEqualsPGPGetKeysFmt contained "=" nextgroup=muttrcPGPGetKeysFormatStr +syn match muttrcVarEqualsPGPGetKeysFmt contained " *= *" nextgroup=muttrcPGPGetKeysFormatStr syn keyword muttrcVarStr contained smime_decrypt_command smime_verify_command smime_verify_opaque_command smime_sign_command smime_sign_opaque_command smime_encrypt_command smime_pk7out_command smime_get_cert_command smime_get_signer_cert_command smime_import_cert_command smime_get_cert_email_command nextgroup=muttrcVarEqualsSmimeFmt -syn match muttrcVarEqualsSmimeFmt contained "=" nextgroup=muttrcSmimeFormatStr +syn match muttrcVarEqualsSmimeFmt contained " *= *" nextgroup=muttrcSmimeFormatStr syn match muttrcVarStr contained 'my_[a-zA-Z0-9_]\+' syn keyword muttrcVarStr contained alias_file assumed_charset attach_charset attach_sep @@ -373,7 +380,7 @@ syn region muttrcAlternatesLine keepend start=+^\s*\%(un\)\?alternates\s+ skip=+ syn match muttrcVariable "\$[a-zA-Z_-]\+" syn match muttrcBadAction contained "[^<>]\+" contains=muttrcEmail -syn match muttrcFunction contained "\<\%(attach\|bounce\|copy\|delete\|display\|flag\|forward\|parent\|pipe\|postpone\|print\|recall\|resent\|save\|send\|tag\|undelete\)-message\>" +syn match muttrcFunction contained "\<\%(attach\|bounce\|copy\|delete\|display\|flag\|forward\|parent\|pipe\|postpone\|print\|recall\|resend\|save\|send\|tag\|undelete\)-message\>" syn match muttrcFunction contained "\<\%(delete\|next\|previous\|read\|tag\|undelete\)-thread\>" syn match muttrcFunction contained "\<\%(backward\|capitalize\|downcase\|forward\|kill\|upcase\)-word\>" syn match muttrcFunction contained "\<\%(delete\|filter\|first\|last\|next\|pipe\|previous\|print\|save\|select\|tag\|undelete\)-entry\>" @@ -389,7 +396,7 @@ syn match muttrcFunction contained "\" syn match muttrcFunction contained "\" syn match muttrcFunction contained "\" syn match muttrcFunction contained "\" -syn match muttrcFunction contained "\" +syn match muttrcFunction contained "\" syn match muttrcFunction contained "\" syn match muttrcFunction contained "\" syn match muttrcFunction contained "\" @@ -428,8 +435,8 @@ syn region muttrcMacroDescr contained keepend skipwhite start=+'+ms=e skip=+\\'+ syn region muttrcMacroDescr contained keepend skipwhite start=+"+ms=e skip=+\\"+ end=+"+me=s syn match muttrcMacroDescrNL contained /\s*\\$/ skipwhite skipnl nextgroup=muttrcMacroDescr,muttrcMacroDescrNL syn region muttrcMacroBody contained skipwhite start="\S" skip='\\ \|\\$' end=' \|$' contains=muttrcEscape,muttrcSet,muttrcUnset,muttrcReset,muttrcToggle,muttrcCommand,muttrcAction nextgroup=muttrcMacroDescr,muttrcMacroDescrNL -syn region muttrcMacroBody matchgroup=Type contained skipwhite start=+'+ms=e skip=+\\'+ end=+'+me=s contains=muttrcEscape,muttrcSet,muttrcUnset,muttrcReset,muttrcToggle,muttrcCommand,muttrcAction nextgroup=muttrcMacroDescr,muttrcMacroDescrNL -syn region muttrcMacroBody matchgroup=Type contained skipwhite start=+"+ms=e skip=+\\"+ end=+"+me=s contains=muttrcEscape,muttrcSet,muttrcUnset,muttrcReset,muttrcToggle,muttrcCommand,muttrcAction nextgroup=muttrcMacroDescr,muttrcMacroDescrNL +syn region muttrcMacroBody matchgroup=Type contained skipwhite start=+'+ms=e skip=+\\'\|\\$+ end=+'\|$+me=s contains=muttrcEscape,muttrcSet,muttrcUnset,muttrcReset,muttrcToggle,muttrcCommand,muttrcAction nextgroup=muttrcMacroDescr,muttrcMacroDescrNL +syn region muttrcMacroBody matchgroup=Type contained skipwhite start=+"+ms=e skip=+\\"\|\\$+ end=+"\|$+me=s contains=muttrcEscape,muttrcSet,muttrcUnset,muttrcReset,muttrcToggle,muttrcCommand,muttrcAction nextgroup=muttrcMacroDescr,muttrcMacroDescrNL syn match muttrcMacroBodyNL contained /\s*\\$/ skipwhite skipnl nextgroup=muttrcMacroBody,muttrcMacroBodyNL syn match muttrcMacroKey contained /\S\+/ skipwhite contains=muttrcKey nextgroup=muttrcMacroBody,muttrcMacroBodyNL syn match muttrcMacroKeyNL contained /\s*\\$/ skipwhite skipnl nextgroup=muttrcMacroKey,muttrcMacroKeyNL diff --git a/runtime/syntax/natural.vim b/runtime/syntax/natural.vim index f7f140f588..2628151378 100644 --- a/runtime/syntax/natural.vim +++ b/runtime/syntax/natural.vim @@ -1,205 +1,209 @@ " Vim syntax file " -" Language: NATURAL -" Version: 2.0.26.17 -" Maintainer: Marko Leipert -" Last Changed: 2002-02-28 09:50:36 -" Support: http://www.winconsole.de/vim/syntax.html +" Language: NATURAL +" Version: 2.1.0.3 +" Maintainer: Marko von Oppen +" Last Changed: 2008-07-29 01:40:52 +" Support: http://www.von-oppen.com/ " For version 5.x: Clear all syntax items " For version 6.x: Quit when this syntax file was already loaded if v:version < 600 - syntax clear - set iskeyword+=-,*,#,+,_,/ + syntax clear + set iskeyword+=-,*,#,+,_,/ elseif exists("b:current_syntax") - finish + finish else - setlocal iskeyword+=-,*,#,+,_,/ + setlocal iskeyword+=-,*,#,+,_,/ endif " NATURAL is case insensitive syntax case ignore " preprocessor -syn keyword naturalInclude include nextgroup=naturalObjName skipwhite +syn keyword naturalInclude include nextgroup=naturalObjName skipwhite " define data -syn keyword naturalKeyword define data end-define -syn keyword naturalKeyword independent global parameter local redefine view -syn keyword naturalKeyword const[ant] init initial +syn keyword naturalKeyword define data end-define +syn keyword naturalKeyword independent global parameter local redefine view +syn keyword naturalKeyword const[ant] init initial " loops -syn keyword naturalLoop read end-read end-work find end-find histogram end-histogram -syn keyword naturalLoop end-all sort end-sort sorted descending ascending -syn keyword naturalRepeat repeat end-repeat while until for step end-for -syn keyword naturalKeyword in file with field starting from ending at thru by isn where -syn keyword naturalError on error end-error -syn keyword naturalKeyword accept reject end-enddata number unique retain as release -syn keyword naturalKeyword start end-start break end-break physical page top sequence -syn keyword naturalKeyword end-toppage end-endpage end-endfile before processing -syn keyword naturalKeyword end-before +syn keyword naturalLoop read end-read end-work find end-find histogram end-histogram +syn keyword naturalLoop end-all sort end-sort sorted descending ascending +syn keyword naturalRepeat repeat end-repeat while until for step end-for +syn keyword naturalKeyword in file with field starting from ending at thru by isn where +syn keyword naturalError on error end-error +syn keyword naturalKeyword accept reject end-enddata number unique retain as release +syn keyword naturalKeyword start end-start break end-break physical page top sequence +syn keyword naturalKeyword end-toppage end-endpage end-endfile before processing +syn keyword naturalKeyword end-before " conditionals syn keyword naturalConditional if then else end-if end-norec syn keyword naturalConditional decide end-decide value when condition none any " assignment / calculation -syn keyword naturalKeyword reset assign move left right justified compress to into edited -syn keyword naturalKeyword add subtract multiply divide compute name -syn keyword naturalKeyword all giving remainder rounded leaving space -syn keyword naturalKeyword examine full replace giving separate delimiter modified -syn keyword naturalKeyword suspend identical suppress +syn keyword naturalKeyword reset assign move left right justified compress to into edited +syn keyword naturalKeyword add subtract multiply divide compute name +syn keyword naturalKeyword all giving remainder rounded leaving space numeric +syn keyword naturalKeyword examine full replace giving separate delimiter modified +syn keyword naturalKeyword suspend identical suppress " program flow -syn keyword naturalFlow callnat fetch return enter escape bottom top stack formatted -syn keyword naturalFlow command call -syn keyword naturalflow end-subroutine routine +syn keyword naturalFlow callnat fetch return enter escape bottom top stack formatted +syn keyword naturalFlow command call +syn keyword naturalflow end-subroutine routine " file operations -syn keyword naturalKeyword update store get delete end transaction work once close +syn keyword naturalKeyword update store get delete end transaction work once close " other keywords -syn keyword naturalKeyword first every of no record[s] found ignore immediate -syn keyword naturalKeyword set settime key control stop terminate +syn keyword naturalKeyword first every of no record[s] found ignore immediate +syn keyword naturalKeyword set settime key control stop terminate " in-/output -syn keyword naturalKeyword write display input reinput notitle nohdr map newpage mark -syn keyword naturalKeyword alarm text help eject index -syn keyword naturalKeyword format printer skip lines +syn keyword naturalKeyword write display input reinput notitle nohdr map newpage +syn keyword naturalKeyword alarm text help eject index window base size +syn keyword naturalKeyword format printer skip lines " functions -syn keyword naturalKeyword abs atn cos exp frac int log sgn sin sqrt tan val old +syn keyword naturalKeyword abs atn cos exp frac int log sgn sin sqrt tan val old +syn keyword naturalKeyword pos " report mode keywords syn keyword naturalRMKeyword same loop obtain indexed do doend " Subroutine name -syn keyword naturalFlow perform subroutine nextgroup=naturalFunction skipwhite -syn match naturalFunction "\<[a-z][-_a-z0-9]*\>" +syn keyword naturalFlow perform subroutine nextgroup=naturalFunction skipwhite +syn match naturalFunction "\<[a-z][-_a-z0-9]*\>" -syn keyword naturalFlow using nextgroup=naturalKeyword,naturalObjName skipwhite -syn match naturalObjName "\<[a-z][-_a-z0-9]\{,7}\>" +syn keyword naturalFlow using nextgroup=naturalKeyword,naturalObjName skipwhite +syn match naturalObjName "\<[a-z][-_a-z0-9]\{,7}\>" " Labels -syn match naturalLabel "\<[+#a-z][-_#a-z0-9]*\." -syn match naturalRef "\<[+#a-z][-_#a-z0-9]*\>\.\<[+#a-z][*]\=[-_#a-z0-9]*\>" +syn match naturalLabel "\<[+#a-z][-_#a-z0-9]*\." +syn match naturalRef "\<[+#a-z][-_#a-z0-9]*\>\.\<[+#a-z][*]\=[-_#a-z0-9]*\>" + +" mark keyword special handling +syn keyword naturalKeyword mark nextgroup=naturalMark skipwhite +syn match naturalMark "\<\*[a-z][-_#.a-z0-9]*\>" " System variables -syn match naturalSysVar "\<\*[a-z][-a-z0-9]*\>" +syn match naturalSysVar "\<\*[a-z][-a-z0-9]*\>" "integer number, or floating point number without a dot. -syn match naturalNumber "\<-\=\d\+\>" +syn match naturalNumber "\<-\=\d\+\>" "floating point number, with dot -syn match naturalNumber "\<-\=\d\+\.\d\+\>" +syn match naturalNumber "\<-\=\d\+\.\d\+\>" "floating point number, starting with a dot -syn match naturalNumber "\.\d\+" +syn match naturalNumber "\.\d\+" " Formats in write statement -syn match naturalFormat "\<\d\+[TX]\>" +syn match naturalFormat "\<\d\+[TX]\>" " String and Character contstants -syn match naturalString "H'\x\+'" -syn region naturalString start=+"+ end=+"+ -syn region naturalString start=+'+ end=+'+ +syn match naturalString "H'\x\+'" +syn region naturalString start=+"+ end=+"+ +syn region naturalString start=+'+ end=+'+ " Type definition -syn match naturalAttribute "\<[-a-z][a-z]=[-a-z0-9_\.,]\+\>" -syn match naturalType contained "\<[ABINP]\d\+\(,\d\+\)\=\>" -syn match naturalType contained "\<[CL]\>" +syn match naturalAttribute "\<[-a-z][a-z]=[-a-z0-9_\.,]\+\>" +syn match naturalType contained "\<[ABINP]\d\+\(,\d\+\)\=\>" +syn match naturalType contained "\<[CL]\>" " "TODO" / other comments -syn keyword naturalTodo contained todo test -syn match naturalCommentMark contained "[a-z][^ \t/:|]*\(\s[^ \t/:'"|]\+\)*:\s"he=e-1 +syn keyword naturalTodo contained todo test +syn match naturalCommentMark contained "[a-z][^ \t/:|]*\(\s[^ \t/:'"|]\+\)*:\s"he=e-1 " comments -syn region naturalComment start="/\*" end="$" contains=naturalTodo,naturalLineRef,naturalCommentMark -syn region naturalComment start="^\*[\ \*]" end="$" contains=naturalTodo,naturalLineRef,naturalCommentMark -syn region naturalComment start="^\d\{4} \*[\ \*]"lc=5 end="$" contains=naturalTodo,naturalLineRef,naturalCommentMark -syn match naturalComment "^*$" -syn match naturalComment "^\d\{4} \*$"lc=5 +syn region naturalComment start="/\*" end="$" contains=naturalTodo,naturalLineRef,naturalCommentMark +syn region naturalComment start="^\*[ *]" end="$" contains=naturalTodo,naturalLineRef,naturalCommentMark +syn region naturalComment start="^\d\{4} \*[\ \*]"lc=5 end="$" contains=naturalTodo,naturalLineRef,naturalCommentMark +syn match naturalComment "^\*$" +syn match naturalComment "^\d\{4} \*$"lc=5 " /* is legal syntax in parentheses e.g. "#ident(label./*)" -syn region naturalPComment contained start="/\*\s*[^),]" end="$" contains=naturalTodo,naturalLineRef,naturalCommentMark +syn region naturalPComment contained start="/\*\s*[^),]" end="$" contains=naturalTodo,naturalLineRef,naturalCommentMark " operators -syn keyword naturalOperator and or not eq ne gt lt ge le mask scan +syn keyword naturalOperator and or not eq ne gt lt ge le mask scan modified " constants -syn keyword naturalBoolean true false - -syn match naturalLineNo "^\d\{4}" +syn keyword naturalBoolean true false +syn match naturalLineNo "^\d\{4}" " identifiers -syn match naturalIdent "\<[+#a-z][-_#a-z0-9]*\>[^\.']"me=e-1 -syn match naturalIdent "\<[+#a-z][-_#a-z0-9]*$" -syn match naturalLegalIdent "[+#a-z][-_#a-z0-9]*/[-_#a-z0-9]*" +syn match naturalIdent "\<[+#a-z][-_#a-z0-9]*\>[^\.']"me=e-1 +syn match naturalIdent "\<[+#a-z][-_#a-z0-9]*$" +syn match naturalLegalIdent "[+#a-z][-_#a-z0-9]*/[-_#a-z0-9]*" " parentheses -syn region naturalPar matchgroup=naturalParGui start="(" end=")" contains=naturalLabel,naturalRef,naturalOperator,@naturalConstant,naturalType,naturalSysVar,naturalPar,naturalLineNo,naturalPComment -syn match naturalLineRef "(\d\{4})" +syn region naturalPar matchgroup=naturalParGui start="(" end=")" contains=naturalLabel,naturalRef,naturalOperator,@naturalConstant,naturalType,naturalSysVar,naturalPar,naturalLineNo,naturalPComment +syn match naturalLineRef "(\d\{4})" " build syntax groups syntax cluster naturalConstant contains=naturalString,naturalNumber,naturalAttribute,naturalBoolean " folding if v:version >= 600 - set foldignore=* + set foldignore=* endif if v:version >= 508 || !exists("did_natural_syntax_inits") - if v:version < 508 - let did_natural_syntax_inits = 1 - command -nargs=+ HiLink hi link - else - command -nargs=+ HiLink hi def link - endif - " The default methods for highlighting. Can be overridden later + if v:version < 508 + let did_natural_syntax_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + " The default methods for highlighting. Can be overridden later - " Constants - HiLink naturalFormat Constant - HiLink naturalAttribute Constant - HiLink naturalNumber Number - HiLink naturalString String - HiLink naturalBoolean Boolean + " Constants + HiLink naturalFormat Constant + HiLink naturalAttribute Constant + HiLink naturalNumber Number + HiLink naturalString String + HiLink naturalBoolean Boolean - " All kinds of keywords - HiLink naturalConditional Conditional - HiLink naturalRepeat Repeat - HiLink naturalLoop Repeat - HiLink naturalFlow Keyword - HiLink naturalError Keyword - HiLink naturalKeyword Keyword - HiLink naturalOperator Operator - HiLink naturalParGui Operator + " All kinds of keywords + HiLink naturalConditional Conditional + HiLink naturalRepeat Repeat + HiLink naturalLoop Repeat + HiLink naturalFlow Keyword + HiLink naturalError Keyword + HiLink naturalKeyword Keyword + HiLink naturalOperator Operator + HiLink naturalParGui Operator - " Labels - HiLink naturalLabel Label - HiLink naturalRefLabel Label + " Labels + HiLink naturalLabel Label + HiLink naturalRefLabel Label - " Comments - HiLink naturalPComment Comment - HiLink naturalComment Comment - HiLink naturalTodo Todo - HiLink naturalCommentMark PreProc + " Comments + HiLink naturalPComment Comment + HiLink naturalComment Comment + HiLink naturalTodo Todo + HiLink naturalCommentMark PreProc - HiLink naturalInclude Include - HiLink naturalSysVar Identifier - HiLink naturalLineNo LineNr - HiLink naturalLineRef Error - HiLink naturalSpecial Special - HiLink naturalComKey Todo + HiLink naturalInclude Include + HiLink naturalSysVar Identifier + HiLink naturalLineNo LineNr + HiLink naturalLineRef Error + HiLink naturalSpecial Special + HiLink naturalComKey Todo - " illegal things - HiLink naturalRMKeyword Error - HiLink naturalLegalIdent Error + " illegal things + HiLink naturalRMKeyword Error + HiLink naturalLegalIdent Error - HiLink naturalType Type - HiLink naturalFunction Function - HiLink naturalObjName Function + HiLink naturalType Type + HiLink naturalFunction Function + HiLink naturalObjName PreProc - delcommand HiLink + delcommand HiLink endif let b:current_syntax = "natural" -" vim:set ts=4 sw=4 noet ft=vim list: +" vim:set ts=8 sw=8 noet ft=vim: diff --git a/runtime/syntax/promela.vim b/runtime/syntax/promela.vim index 9c8a87cfda..e812bc2749 100644 --- a/runtime/syntax/promela.vim +++ b/runtime/syntax/promela.vim @@ -1,9 +1,9 @@ " Vim syntax file -" Language: ProMeLa +" Language: ProMeLa " Maintainer: Maurizio Tranchero - " First Release: Mon Oct 16 08:49:46 CEST 2006 -" Last Change: Sat May 16 12:20:43 CEST 2007 -" Version: 0.2 +" Last Change: Thu Aug 7 21:22:48 CEST 2008 +" Version: 0.5 " For version 5.x: Clear all syntax items " For version 6.x: Quit when a syntax file was already loaded @@ -19,17 +19,9 @@ endif syn keyword promelaStatement proctype if else while chan do od fi break goto unless syn keyword promelaStatement active assert label atomic syn keyword promelaFunctions skip timeout run -" check what it is the following +syn keyword promelaTodo contained TODO " ProMeLa Types syn keyword promelaType bit bool byte short int -" ProMeLa Regions -syn region promelaComment start="\/\/" end="$" keepend -syn region promelaString start="\"" end="\"" -" syn region promelaComment start="//" end="$" contains=ALL -" syn region promelaComment start="/\*" end="\*/" contains=ALL -" ProMeLa Comment -syn match promelaComment "\/.*$" -syn match promelaComment "/\*.*\*/" " Operators and special characters syn match promelaOperator "!" syn match promelaOperator "?" @@ -47,14 +39,18 @@ syn match promelaSpecial "\[" syn match promelaSpecial "\]" syn match promelaSpecial ";" syn match promelaSpecial "::" +" ProMeLa Comments +syn region promelaComment start="/\*" end="\*/" contains=promelaTodo,@Spell +syn match promelaComment "//.*" contains=promelaTodo,@Spell " Class Linking -hi def link promelaStatement Statement -hi def link promelaType Type -hi def link promelaComment Comment -hi def link promelaOperator Type -hi def link promelaSpecial Special -hi def link promelaFunctions Special +hi def link promelaStatement Statement +hi def link promelaType Type +hi def link promelaComment Comment +hi def link promelaOperator Type +hi def link promelaSpecial Special +hi def link promelaFunctions Special hi def link promelaString String +hi def link promelaTodo Todo let b:current_syntax = "promela" diff --git a/runtime/syntax/racc.vim b/runtime/syntax/racc.vim index 795b65243e..d412227cbd 100644 --- a/runtime/syntax/racc.vim +++ b/runtime/syntax/racc.vim @@ -1,7 +1,7 @@ " Vim default file " Language: Racc input file " Maintainer: Nikolai Weibull -" Latest Revision: 2006-07-09 +" Latest Revision: 2008-06-22 if exists("b:current_syntax") finish @@ -31,7 +31,7 @@ syn keyword raccPrecSpec contained nonassoc left right \ nextgroup=raccPrecToken,raccPrecString skipwhite \ skipnl -syn match raccPrecToken contained '\<\u[A-Z0-9]*\>' +syn match raccPrecToken contained '\<\u[A-Z0-9_]*\>' \ nextgroup=raccPrecToken,raccPrecString skipwhite \ skipnl @@ -48,7 +48,7 @@ syn region raccPrecString matchgroup=raccPrecString start=+'+ syn keyword raccTokenDecl contained token \ nextgroup=raccTokenR skipwhite skipnl -syn match raccTokenR contained '\<\u[A-Z0-9]*\>' +syn match raccTokenR contained '\<\u[A-Z0-9_]*\>' \ nextgroup=raccTokenR skipwhite skipnl syn keyword raccExpect contained expect @@ -67,13 +67,13 @@ syn region raccConvert transparent contained matchgroup=raccKeyword \ contains=raccComment,raccConvToken skipwhite \ skipnl -syn match raccConvToken contained '\<\u[A-Z0-9]*\>' +syn match raccConvToken contained '\<\u[A-Z0-9_]*\>' \ nextgroup=raccString skipwhite skipnl syn keyword raccStart contained start \ nextgroup=raccTargetS skipwhite skipnl -syn match raccTargetS contained '\<\l[a-z0-9]*\>' +syn match raccTargetS contained '\<\l[a-z0-9_]*\>' syn match raccSpecial contained '\\["'\\]' @@ -87,11 +87,11 @@ syn region raccRules transparent matchgroup=raccKeyword start='\' \ raccNumber,raccToken,raccTarget,raccDelimiter, \ raccAction -syn match raccTarget contained '\<\l[a-z0-9]*\>' +syn match raccTarget contained '\<\l[a-z0-9_]*\>' syn match raccDelimiter contained '[:|]' -syn match raccToken contained '\<\u[A-Z0-9]*\>' +syn match raccToken contained '\<\u[A-Z0-9_]*\>' syn include @raccRuby syntax/ruby.vim diff --git a/runtime/syntax/ruby.vim b/runtime/syntax/ruby.vim index f68d7f4dac..a5a118e4d3 100644 --- a/runtime/syntax/ruby.vim +++ b/runtime/syntax/ruby.vim @@ -19,6 +19,8 @@ if has("folding") && exists("ruby_fold") setlocal foldmethod=syntax endif +syn cluster rubyNotTop contains=@rubyExtendedStringSpecial,@rubyRegexpSpecial,@rubyDeclaration,rubyConditional,rubyTodo + if exists("ruby_space_errors") if !exists("ruby_no_trail_space_error") syn match rubySpaceError display excludenl "\s\+$" @@ -32,14 +34,14 @@ endif if exists("ruby_operators") syn match rubyOperator "\%([~!^&|*/%+-]\|\%(class\s*\)\@\|<=\|\%(<\|\>\|>=\|=\@\|\*\*\|\.\.\.\|\.\.\|::\)" syn match rubyPseudoOperator "\%(-=\|/=\|\*\*=\|\*=\|&&=\|&=\|&&\|||=\||=\|||\|%=\|+=\|!\~\|!=\)" - syn region rubyBracketOperator matchgroup=rubyOperator start="\%([_[:lower:]]\w*[?!=]\=\|[})]\)\@<=\[\s*" end="\s*]" contains=TOP + syn region rubyBracketOperator matchgroup=rubyOperator start="\%(\w[?!]\=\|[]})]\)\@<=\[\s*" end="\s*]" contains=ALLBUT,@rubyNotTop endif " Expression Substitution and Backslash Notation -syn match rubyEscape "\\\\\|\\[abefnrstv]\|\\\o\{1,3}\|\\x\x\{1,2}" contained display -syn match rubyEscape "\%(\\M-\\C-\|\\C-\\M-\|\\M-\\c\|\\c\\M-\|\\c\|\\C-\|\\M-\)\%(\\\o\{1,3}\|\\x\x\{1,2}\|\\\=\S\)" contained display +syn match rubyStringEscape "\\\\\|\\[abefnrstv]\|\\\o\{1,3}\|\\x\x\{1,2}" contained display +syn match rubyStringEscape "\%(\\M-\\C-\|\\C-\\M-\|\\M-\\c\|\\c\\M-\|\\c\|\\C-\|\\M-\)\%(\\\o\{1,3}\|\\x\x\{1,2}\|\\\=\S\)" contained display -syn region rubyInterpolation matchgroup=rubyInterpolationDelimiter start="#{" end="}" contained contains=TOP +syn region rubyInterpolation matchgroup=rubyInterpolationDelimiter start="#{" end="}" contained contains=ALLBUT,@rubyNotTop syn match rubyInterpolation "#\%(\$\|@@\=\)\w\+" display contained contains=rubyInterpolationDelimiter,rubyInstanceVariable,rubyClassVariable,rubyGlobalVariable,rubyPredefinedVariable syn match rubyInterpolationDelimiter "#\ze\%(\$\|@@\=\)\w\+" display contained syn match rubyInterpolation "#\$\%(-\w\|\W\)" display contained contains=rubyInterpolationDelimiter,rubyPredefinedVariable,rubyInvalidVariable @@ -51,17 +53,32 @@ syn match rubyNoInterpolation "\\#\$\W" display contained syn match rubyDelimEscape "\\[(<{\[)>}\]]" transparent display contained contains=NONE -syn region rubyNestedParentheses start="(" end=")" skip="\\\\\|\\)" transparent contained contains=@rubyStringSpecial,rubyNestedParentheses,rubyDelimEscape -syn region rubyNestedCurlyBraces start="{" end="}" skip="\\\\\|\\}" transparent contained contains=@rubyStringSpecial,rubyNestedCurlyBraces,rubyDelimEscape -syn region rubyNestedAngleBrackets start="<" end=">" skip="\\\\\|\\>" transparent contained contains=@rubyStringSpecial,rubyNestedAngleBrackets,rubyDelimEscape -if exists("ruby_operators") - syn region rubyNestedSquareBrackets start="\[" end="\]" skip="\\\\\|\\\]" transparent contained contains=@rubyStringSpecial,rubyNestedSquareBrackets,rubyDelimEscape -else - syn region rubyNestedSquareBrackets start="\[" end="\]" skip="\\\\\|\\\]" transparent containedin=rubyArrayLiteral contained contains=@rubyStringSpecial,rubyNestedSquareBrackets,rubyDelimEscape -endif +syn region rubyNestedParentheses start="(" skip="\\\\\|\\)" matchgroup=rubyString end=")" transparent contained +syn region rubyNestedCurlyBraces start="{" skip="\\\\\|\\}" matchgroup=rubyString end="}" transparent contained +syn region rubyNestedAngleBrackets start="<" skip="\\\\\|\\>" matchgroup=rubyString end=">" transparent contained +syn region rubyNestedSquareBrackets start="\[" skip="\\\\\|\\\]" matchgroup=rubyString end="\]" transparent contained -syn cluster rubyStringSpecial contains=rubyInterpolation,rubyNoInterpolation,rubyEscape +" These are mostly Oniguruma ready +syn region rubyRegexpComment matchgroup=rubyRegexpSpecial start="(?#" skip="\\)" end=")" contained +syn region rubyRegexpParens matchgroup=rubyRegexpSpecial start="(\(?:\|?<\=[=!]\|?>\|?<[a-z_]\w*>\|?[imx]*-[imx]*:\=\|\%(?#\)\@!\)" skip="\\)" end=")" contained transparent contains=@rubyRegexpSpecial +syn region rubyRegexpBrackets matchgroup=rubyRegexpCharClass start="\[\^\=" skip="\\\]" end="\]" contained transparent contains=rubyStringEscape,rubyRegexpEscape,rubyRegexpCharClass oneline +syn match rubyRegexpCharClass "\\[DdHhSsWw]" contained display +syn match rubyRegexpCharClass "\[:\^\=\%(alnum\|alpha\|ascii\|blank\|cntrl\|digit\|graph\|lower\|print\|punct\|space\|upper\|xdigit\):\]" contained +syn match rubyRegexpEscape "\\[].*?+^$|\\/(){}[]" contained display +syn match rubyRegexpQuantifier "[*?+][?+]\=" contained display +syn match rubyRegexpQuantifier "{\d\+\%(,\d*\)\=}?\=" contained display +syn match rubyRegexpAnchor "[$^]\|\\[ABbGZz]" contained display +syn match rubyRegexpDot "\." contained display +syn match rubyRegexpSpecial "|" contained display +syn match rubyRegexpSpecial "\\[1-9]\d\=\d\@!" contained display +syn match rubyRegexpSpecial "\\k<\%([a-z_]\w*\|-\=\d\+\)\%([+-]\d\+\)\=>" contained display +syn match rubyRegexpSpecial "\\k'\%([a-z_]\w*\|-\=\d\+\)\%([+-]\d\+\)\='" contained display +syn match rubyRegexpSpecial "\\g<\%([a-z_]\w*\|-\=\d\+\)>" contained display +syn match rubyRegexpSpecial "\\g'\%([a-z_]\w*\|-\=\d\+\)'" contained display + +syn cluster rubyStringSpecial contains=rubyInterpolation,rubyNoInterpolation,rubyStringEscape syn cluster rubyExtendedStringSpecial contains=@rubyStringSpecial,rubyNestedParentheses,rubyNestedCurlyBraces,rubyNestedAngleBrackets,rubyNestedSquareBrackets +syn cluster rubyRegexpSpecial contains=rubyInterpolation,rubyNoInterpolation,rubyStringEscape,rubyRegexpSpecial,rubyRegexpEscape,rubyRegexpBrackets,rubyRegexpCharClass,rubyRegexpDot,rubyRegexpQuantifier,rubyRegexpAnchor,rubyRegexpParens,rubyRegexpComment " Numbers and ASCII Codes syn match rubyASCIICode "\%(\w\|[]})\"'/]\)\@\|<=\|<\|===\|==\|=\~\|>>\|>=\|>\||\|-@\|-\|/\|\[]=\|\[]\|\*\*\|\*\|&\|%\|+@\|+\|`\)" syn match rubySymbol "[]})\"':]\@_,;:!?/.'"@$*\&+0]\)" syn match rubySymbol "[]})\"':]\@\@!\)\=" syn region rubySymbol start="[]})\"':]\@\|{\)\s*\)\@<=|" end="|" oneline display contains=rubyBlockParameter -syn match rubyInvalidVariable "$[^ A-Za-z-]" +syn match rubyInvalidVariable "$[^ A-Za-z_-]" syn match rubyPredefinedVariable #$[!$&"'*+,./0:;<=>?@\`~1-9]# syn match rubyPredefinedVariable "$_\>" display syn match rubyPredefinedVariable "$-[0FIKadilpvw]\>" display @@ -104,32 +121,32 @@ syn match rubyPredefinedConstant "\%(\%(\.\@" " Normal Regular Expression -syn region rubyRegexp matchgroup=rubyRegexpDelimiter start="\%(\%(^\|\<\%(and\|or\|while\|until\|unless\|if\|elsif\|when\|not\|then\|else\)\|[;\~=!|&(,[>]\)\s*\)\@<=/" end="/[iomxneus]*" skip="\\\\\|\\/" contains=@rubyStringSpecial fold -syn region rubyRegexp matchgroup=rubyRegexpDelimiter start="\%(\<\%(split\|scan\|gsub\|sub\)\s*\)\@<=/" end="/[iomxneus]*" skip="\\\\\|\\/" contains=@rubyStringSpecial fold +syn region rubyRegexp matchgroup=rubyRegexpDelimiter start="\%(\%(^\|\<\%(and\|or\|while\|until\|unless\|if\|elsif\|when\|not\|then\|else\)\|[;\~=!|&(,[>]\)\s*\)\@<=/" end="/[iomxneus]*" skip="\\\\\|\\/" contains=@rubyRegexpSpecial keepend fold +syn region rubyRegexp matchgroup=rubyRegexpDelimiter start="\%(\h\k*\s\+\)\@<=/[ \t=]\@!" end="/[iomxneus]*" skip="\\\\\|\\/" contains=@rubyRegexpSpecial fold + +" Generalized Regular Expression +syn region rubyRegexp matchgroup=rubyRegexpDelimiter start="%r\z([~`!@#$%^&*_\-+=|\:;"',.?/]\)" end="\z1[iomxneus]*" skip="\\\\\|\\\z1" contains=@rubyRegexpSpecial fold +syn region rubyRegexp matchgroup=rubyRegexpDelimiter start="%r{" end="}[iomxneus]*" skip="\\\\\|\\}" contains=@rubyRegexpSpecial fold +syn region rubyRegexp matchgroup=rubyRegexpDelimiter start="%r<" end=">[iomxneus]*" skip="\\\\\|\\>" contains=@rubyRegexpSpecial,rubyNestedAngleBrackets,rubyDelimEscape fold +syn region rubyRegexp matchgroup=rubyRegexpDelimiter start="%r\[" end="\][iomxneus]*" skip="\\\\\|\\\]" contains=@rubyRegexpSpecial fold +syn region rubyRegexp matchgroup=rubyRegexpDelimiter start="%r(" end=")[iomxneus]*" skip="\\\\\|\\)" contains=@rubyRegexpSpecial fold " Normal String and Shell Command Output syn region rubyString matchgroup=rubyStringDelimiter start="\"" end="\"" skip="\\\\\|\\\"" contains=@rubyStringSpecial fold syn region rubyString matchgroup=rubyStringDelimiter start="'" end="'" skip="\\\\\|\\'" fold syn region rubyString matchgroup=rubyStringDelimiter start="`" end="`" skip="\\\\\|\\`" contains=@rubyStringSpecial fold -" Generalized Regular Expression -syn region rubyRegexp matchgroup=rubyRegexpDelimiter start="%r\z([~`!@#$%^&*_\-+=|\:;"',.?/]\)" end="\z1[iomxneus]*" skip="\\\\\|\\\z1" contains=@rubyStringSpecial fold -syn region rubyRegexp matchgroup=rubyRegexpDelimiter start="%r{" end="}[iomxneus]*" skip="\\\\\|\\}" contains=@rubyStringSpecial,rubyNestedCurlyBraces,rubyDelimEscape fold -syn region rubyRegexp matchgroup=rubyRegexpDelimiter start="%r<" end=">[iomxneus]*" skip="\\\\\|\\>" contains=@rubyStringSpecial,rubyNestedAngleBrackets,rubyDelimEscape fold -syn region rubyRegexp matchgroup=rubyRegexpDelimiter start="%r\[" end="\][iomxneus]*" skip="\\\\\|\\\]" contains=@rubyStringSpecial,rubyNestedSquareBrackets,rubyDelimEscape fold -syn region rubyRegexp matchgroup=rubyRegexpDelimiter start="%r(" end=")[iomxneus]*" skip="\\\\\|\\)" contains=@rubyStringSpecial,rubyNestedParentheses,rubyDelimEscape fold - " Generalized Single Quoted String, Symbol and Array of Strings syn region rubyString matchgroup=rubyStringDelimiter start="%[qw]\z([~`!@#$%^&*_\-+=|\:;"',.?/]\)" end="\z1" skip="\\\\\|\\\z1" fold syn region rubyString matchgroup=rubyStringDelimiter start="%[qw]{" end="}" skip="\\\\\|\\}" fold contains=rubyNestedCurlyBraces,rubyDelimEscape syn region rubyString matchgroup=rubyStringDelimiter start="%[qw]<" end=">" skip="\\\\\|\\>" fold contains=rubyNestedAngleBrackets,rubyDelimEscape syn region rubyString matchgroup=rubyStringDelimiter start="%[qw]\[" end="\]" skip="\\\\\|\\\]" fold contains=rubyNestedSquareBrackets,rubyDelimEscape syn region rubyString matchgroup=rubyStringDelimiter start="%[qw](" end=")" skip="\\\\\|\\)" fold contains=rubyNestedParentheses,rubyDelimEscape -syn region rubySymbol start="%[s]\z([~`!@#$%^&*_\-+=|\:;"',.?/]\)" end="\z1" skip="\\\\\|\\\z1" fold -syn region rubySymbol start="%[s]{" end="}" skip="\\\\\|\\}" fold contains=rubyNestedCurlyBraces,rubyDelimEscape -syn region rubySymbol start="%[s]<" end=">" skip="\\\\\|\\>" fold contains=rubyNestedAngleBrackets,rubyDelimEscape -syn region rubySymbol start="%[s]\[" end="\]" skip="\\\\\|\\\]" fold contains=rubyNestedSquareBrackets,rubyDelimEscape -syn region rubySymbol start="%[s](" end=")" skip="\\\\\|\\)" fold contains=rubyNestedParentheses,rubyDelimEscape +syn region rubySymbol matchgroup=rubySymbolDelimiter start="%[s]\z([~`!@#$%^&*_\-+=|\:;"',.?/]\)" end="\z1" skip="\\\\\|\\\z1" fold +syn region rubySymbol matchgroup=rubySymbolDelimiter start="%[s]{" end="}" skip="\\\\\|\\}" fold contains=rubyNestedCurlyBraces,rubyDelimEscape +syn region rubySymbol matchgroup=rubySymbolDelimiter start="%[s]<" end=">" skip="\\\\\|\\>" fold contains=rubyNestedAngleBrackets,rubyDelimEscape +syn region rubySymbol matchgroup=rubySymbolDelimiter start="%[s]\[" end="\]" skip="\\\\\|\\\]" fold contains=rubyNestedSquareBrackets,rubyDelimEscape +syn region rubySymbol matchgroup=rubySymbolDelimiter start="%[s](" end=")" skip="\\\\\|\\)" fold contains=rubyNestedParentheses,rubyDelimEscape " Generalized Double Quoted String and Array of Strings and Shell Command Output " Note: %= is not matched here as the beginning of a double quoted string @@ -141,10 +158,10 @@ syn region rubyString matchgroup=rubyStringDelimiter start="%[QWx]\=\[" e syn region rubyString matchgroup=rubyStringDelimiter start="%[QWx]\=(" end=")" skip="\\\\\|\\)" contains=@rubyStringSpecial,rubyNestedParentheses,rubyDelimEscape fold " Here Document -syn region rubyHeredocStart matchgroup=rubyStringDelimiter start=+\%(\%(class\s*\|\%([]})"'.]\|::\)\)\_s*\|\w\)\@>\|[<>]=\=\|<=>\|===\|==\|=\~\|`\)\%([[:space:];#(]\|$\)\@=" contained containedin=rubyAliasDeclaration,rubyAliasDeclaration2,rubyMethodDeclaration +syn cluster rubyDeclaration contains=rubyAliasDeclaration,rubyAliasDeclaration2,rubyMethodDeclaration,rubyModuleDeclaration,rubyClassDeclaration,rubyFunction,rubyBlockParameter + " Expensive Mode - match 'end' with the appropriate opening keyword for syntax " based folding and special highlighting of module/class/method definitions if !exists("b:ruby_no_expensive") && !exists("ruby_no_expensive") syn match rubyDefine "\" nextgroup=rubyAliasDeclaration skipwhite skipnl syn match rubyDefine "\" nextgroup=rubyMethodDeclaration skipwhite skipnl + syn match rubyDefine "\" nextgroup=rubyFunction skipwhite skipnl syn match rubyClass "\" nextgroup=rubyClassDeclaration skipwhite skipnl syn match rubyModule "\" nextgroup=rubyModuleDeclaration skipwhite skipnl - syn region rubyBlock start="\" matchgroup=rubyDefine end="\%(\" contains=TOP fold - syn region rubyBlock start="\" matchgroup=rubyClass end="\" contains=TOP fold - syn region rubyBlock start="\" matchgroup=rubyModule end="\" contains=TOP fold + syn region rubyBlock start="\" matchgroup=rubyDefine end="\%(\" contains=ALLBUT,@rubyNotTop fold + syn region rubyBlock start="\" matchgroup=rubyClass end="\" contains=ALLBUT,@rubyNotTop fold + syn region rubyBlock start="\" matchgroup=rubyModule end="\" contains=ALLBUT,@rubyNotTop fold " modifiers syn match rubyConditionalModifier "\<\%(if\|unless\)\>" display syn match rubyRepeatModifier "\<\%(while\|until\)\>" display - syn region rubyDoBlock matchgroup=rubyControl start="\" end="\" contains=TOP fold + syn region rubyDoBlock matchgroup=rubyControl start="\" end="\" contains=ALLBUT,@rubyNotTop fold " curly bracket block or hash literal - syn region rubyCurlyBlock start="{" end="}" contains=TOP fold - syn region rubyArrayLiteral matchgroup=rubyArrayDelimiter start="\%(\w\|[\]})]\)\@" end="\" contains=TOP fold - syn region rubyCaseExpression matchgroup=rubyConditional start="\" end="\" contains=TOP fold - syn region rubyConditionalExpression matchgroup=rubyConditional start="\%(\%(^\|\.\.\.\=\|[{:,;([<>~\*/%&^|+=-]\|\%(\<[_[:lower:]][_[:alnum:]]*\)\@" end="\" contains=TOP fold + syn region rubyBlockExpression matchgroup=rubyControl start="\" end="\" contains=ALLBUT,@rubyNotTop fold + syn region rubyCaseExpression matchgroup=rubyConditional start="\" end="\" contains=ALLBUT,@rubyNotTop fold + syn region rubyConditionalExpression matchgroup=rubyConditional start="\%(\%(^\|\.\.\.\=\|[{:,;([<>~\*/%&^|+=-]\|\%(\<[_[:lower:]][_[:alnum:]]*\)\@" end="\" contains=ALLBUT,@rubyNotTop fold - syn keyword rubyConditional then else when contained containedin=rubyCaseExpression - syn keyword rubyConditional then else elsif contained containedin=rubyConditionalExpression + syn match rubyConditional "\<\%(then\|else\|when\)\>[?!]\@!" contained containedin=rubyCaseExpression + syn match rubyConditional "\<\%(then\|else\|elsif\)\>[?!]\@!" contained containedin=rubyConditionalExpression " statements with optional 'do' - syn region rubyOptionalDoLine matchgroup=rubyRepeat start="\" start="\%(\%(^\|\.\.\.\=\|[{:,;([<>~\*/%&^|+-]\|\%(\<[_[:lower:]][_[:alnum:]]*\)\@" matchgroup=rubyOptionalDo end="\%(\\)" end="\ze\%(;\|$\)" oneline contains=TOP - syn region rubyRepeatExpression start="\" start="\%(\%(^\|\.\.\.\=\|[{:,;([<>~\*/%&^|+-]\|\%(\<[_[:lower:]][_[:alnum:]]*\)\@" matchgroup=rubyRepeat end="\" contains=TOP nextgroup=rubyOptionalDoLine fold + syn region rubyOptionalDoLine matchgroup=rubyRepeat start="\[?!]\@!" start="\%(\%(^\|\.\.\.\=\|[{:,;([<>~\*/%&^|+-]\|\%(\<[_[:lower:]][_[:alnum:]]*\)\@" matchgroup=rubyOptionalDo end="\%(\\)" end="\ze\%(;\|$\)" oneline contains=ALLBUT,@rubyNotTop + syn region rubyRepeatExpression start="\[?!]\@!" start="\%(\%(^\|\.\.\.\=\|[{:,;([<>~\*/%&^|+-]\|\%(\<[_[:lower:]][_[:alnum:]]*\)\@" matchgroup=rubyRepeat end="\" contains=ALLBUT,@rubyNotTop nextgroup=rubyOptionalDoLine fold if !exists("ruby_minlines") let ruby_minlines = 50 @@ -207,31 +227,35 @@ if !exists("b:ruby_no_expensive") && !exists("ruby_no_expensive") exec "syn sync minlines=" . ruby_minlines else - syn match rubyControl "\" nextgroup=rubyMethodDeclaration skipwhite skipnl - syn match rubyControl "\" nextgroup=rubyClassDeclaration skipwhite skipnl - syn match rubyControl "\" nextgroup=rubyModuleDeclaration skipwhite skipnl - syn keyword rubyControl case begin do for if unless while until else elsif then when end - syn keyword rubyKeyword alias + syn match rubyControl "\[?!]\@!" nextgroup=rubyMethodDeclaration skipwhite skipnl + syn match rubyControl "\[?!]\@!" nextgroup=rubyClassDeclaration skipwhite skipnl + syn match rubyControl "\[?!]\@!" nextgroup=rubyModuleDeclaration skipwhite skipnl + syn match rubyControl "\<\%(case\|begin\|do\|for\|if\|unless\|while\|until\|else\|elsif\|then\|when\|end\)\>[?!]\@!" + syn match rubyKeyword "\<\%(alias\|undef\)\>[?!]\@!" endif " Keywords " Note: the following keywords have already been defined: " begin case class def do end for if module unless until while -syn keyword rubyControl and break ensure in next not or redo rescue retry return +syn match rubyControl "\<\%(and\|break\|ensure\|in\|next\|not\|or\|redo\|rescue\|retry\|return\)\>[?!]\@!" syn match rubyOperator "\[?!]\@!" +syn match rubyBoolean "\<\%(true\|false\)\>[?!]\@!" +syn match rubyPseudoVariable "\<\%(nil\|self\|__FILE__\|__LINE__\)\>[?!]\@!" +syn match rubyBeginEnd "\<\%(BEGIN\|END\)\>[?!]\@!" " Special Methods if !exists("ruby_no_special_methods") - syn keyword rubyAccess public protected private - syn keyword rubyAttribute attr attr_accessor attr_reader attr_writer - syn match rubyControl "\<\%(exit!\|\%(abort\|at_exit\|exit\|fork\|loop\|trap\)\>\)" + syn keyword rubyAccess public protected private module_function + " attr is a common variable name + syn match rubyAttribute "\%(\%(^\|;\)\s*\)\@<=attr\>\(\s*[.=]\)\@!" + syn keyword rubyAttribute attr_accessor attr_reader attr_writer + syn match rubyControl "\<\%(exit!\|\%(abort\|at_exit\|exit\|fork\|loop\|trap\)\>[?!]\@!\)" syn keyword rubyEval eval class_eval instance_eval module_eval syn keyword rubyException raise fail catch throw - syn keyword rubyInclude autoload extend include load require + " false positive with 'include?' + syn match rubyInclude "\[?!]\@!" + syn keyword rubyInclude autoload extend load require syn keyword rubyKeyword callcc caller lambda proc endif @@ -252,6 +276,9 @@ syn match rubyKeywordAsMethod "\%(\%(\.\@" transparent contains=NONE syn match rubyKeywordAsMethod "\%(\%(\.\@" transparent contains=NONE +syn match rubyKeywordAsMethod "\<\%(alias\|begin\|case\|class\|def\|do\|end\)[?!]" transparent contains=NONE +syn match rubyKeywordAsMethod "\<\%(if\|module\|undef\|unless\|until\|while\)[?!]" transparent contains=NONE + syn match rubyKeywordAsMethod "\%(\%(\.\@" transparent contains=NONE syn match rubyKeywordAsMethod "\%(\%(\.\@" transparent contains=NONE syn match rubyKeywordAsMethod "\%(\%(\.\@" transparent contains=NONE @@ -305,15 +332,24 @@ hi def link rubyComment Comment hi def link rubyData Comment hi def link rubyDataDirective Delimiter hi def link rubyDocumentation Comment -hi def link rubyEscape Special +hi def link rubyTodo Todo + +hi def link rubyStringEscape Special hi def link rubyInterpolationDelimiter Delimiter hi def link rubyNoInterpolation rubyString hi def link rubySharpBang PreProc hi def link rubyRegexpDelimiter rubyStringDelimiter +hi def link rubySymbolDelimiter rubyStringDelimiter hi def link rubyStringDelimiter Delimiter -hi def link rubyRegexp rubyString hi def link rubyString String -hi def link rubyTodo Todo +hi def link rubyRegexpEscape rubyRegexpSpecial +hi def link rubyRegexpQuantifier rubyRegexpSpecial +hi def link rubyRegexpAnchor rubyRegexpSpecial +hi def link rubyRegexpDot rubyRegexpCharClass +hi def link rubyRegexpCharClass rubyRegexpSpecial +hi def link rubyRegexpSpecial Special +hi def link rubyRegexpComment Comment +hi def link rubyRegexp rubyString hi def link rubyInvalidVariable Error hi def link rubyError Error @@ -321,4 +357,4 @@ hi def link rubySpaceError rubyError let b:current_syntax = "ruby" -" vim: nowrap sw=2 sts=2 ts=8 noet : +" vim: nowrap sw=2 sts=2 ts=8 noet: diff --git a/runtime/syntax/sas.vim b/runtime/syntax/sas.vim index 68e8788e26..976dca26f9 100644 --- a/runtime/syntax/sas.vim +++ b/runtime/syntax/sas.vim @@ -1,7 +1,11 @@ " Vim syntax file " Language: SAS " Maintainer: James Kidd -" Last Change: 02 Jun 2003 +" Last Change: 18 Jul 2008 by Paulo Tanimoto +" Fixed comments with * taking multiple lines. +" Fixed highlighting of macro keywords. +" Added words to cases that didn't fit anywhere. +" 02 Jun 2003 " Added highlighting for additional keywords and such; " Attempted to match SAS default syntax colors; " Changed syncing so it doesn't lose colors on large blocks; @@ -25,18 +29,18 @@ syn region sasCards start="^\s*DATALINES.*" end="^\s*;\s*$" syn match sasNumber "-\=\<\d*\.\=[0-9_]\>" +" Block comment syn region sasComment start="/\*" end="\*/" contains=sasTodo + " Ignore misleading //JCL SYNTAX... (Bob Heckel) syn region sasComment start="[^/][^/]/\*" end="\*/" contains=sasTodo -" Allow highlighting of embedded TODOs (Bob Heckel) -syn match sasComment "^\s*\*.*;" contains=sasTodo +" Previous code for comments was written by Bob Heckel +" Comments with * may take multiple lines (Paulo Tanimoto) +syn region sasComment start=";\s*\*"hs=s+1 end=";" contains=sasTodo -" Allow highlighting of embedded TODOs (Bob Heckel) -syn match sasComment ";\s*\*.*;"hs=s+1 contains=sasTodo - -" Handle macro comments too (Bob Heckel). -syn match sasComment "^\s*%*\*.*;" contains=sasTodo +" Comments with * starting after a semicolon (Paulo Tanimoto) +syn region sasComment start="^\s*\*" end=";" contains=sasTodo " This line defines macro variables in code. HiLink at end of file " defines the color scheme. Begin region with ampersand and end with @@ -84,24 +88,71 @@ syn keyword sasStatement NULL ON OR ORDER PRIMARY REFERENCES syn keyword sasStatement RESET RESTRICT SELECT SET TABLE syn keyword sasStatement UNIQUE UPDATE VALIDATE VIEW WHERE +" Match declarations have to appear one per line (Paulo Tanimoto) +syn match sasStatement "FOOTNOTE\d" +syn match sasStatement "TITLE\d" -syn match sasStatement "FOOTNOTE\d" "TITLE\d" - -syn match sasMacro "%BQUOTE" "%NRBQUOTE" "%CMPRES" "%QCMPRES" -syn match sasMacro "%COMPSTOR" "%DATATYP" "%DISPLAY" "%DO" -syn match sasMacro "%ELSE" "%END" "%EVAL" "%GLOBAL" -syn match sasMacro "%GOTO" "%IF" "%INDEX" "%INPUT" -syn match sasMacro "%KEYDEF" "%LABEL" "%LEFT" "%LENGTH" -syn match sasMacro "%LET" "%LOCAL" "%LOWCASE" "%MACRO" -syn match sasMacro "%MEND" "%NRBQUOTE" "%NRQUOTE" "%NRSTR" -syn match sasMacro "%PUT" "%QCMPRES" "%QLEFT" "%QLOWCASE" -syn match sasMacro "%QSCAN" "%QSUBSTR" "%QSYSFUNC" "%QTRIM" -syn match sasMacro "%QUOTE" "%QUPCASE" "%SCAN" "%STR" -syn match sasMacro "%SUBSTR" "%SUPERQ" "%SYSCALL" "%SYSEVALF" -syn match sasMacro "%SYSEXEC" "%SYSFUNC" "%SYSGET" "%SYSLPUT" -syn match sasMacro "%SYSPROD" "%SYSRC" "%SYSRPUT" "%THEN" -syn match sasMacro "%TO" "%TRIM" "%UNQUOTE" "%UNTIL" -syn match sasMacro "%UPCASE" "%VERIFY" "%WHILE" "%WINDOW" +" Match declarations have to appear one per line (Paulo Tanimoto) +syn match sasMacro "%BQUOTE" +syn match sasMacro "%NRBQUOTE" +syn match sasMacro "%CMPRES" +syn match sasMacro "%QCMPRES" +syn match sasMacro "%COMPSTOR" +syn match sasMacro "%DATATYP" +syn match sasMacro "%DISPLAY" +syn match sasMacro "%DO" +syn match sasMacro "%ELSE" +syn match sasMacro "%END" +syn match sasMacro "%EVAL" +syn match sasMacro "%GLOBAL" +syn match sasMacro "%GOTO" +syn match sasMacro "%IF" +syn match sasMacro "%INDEX" +syn match sasMacro "%INPUT" +syn match sasMacro "%KEYDEF" +syn match sasMacro "%LABEL" +syn match sasMacro "%LEFT" +syn match sasMacro "%LENGTH" +syn match sasMacro "%LET" +syn match sasMacro "%LOCAL" +syn match sasMacro "%LOWCASE" +syn match sasMacro "%MACRO" +syn match sasMacro "%MEND" +syn match sasMacro "%NRBQUOTE" +syn match sasMacro "%NRQUOTE" +syn match sasMacro "%NRSTR" +syn match sasMacro "%PUT" +syn match sasMacro "%QCMPRES" +syn match sasMacro "%QLEFT" +syn match sasMacro "%QLOWCASE" +syn match sasMacro "%QSCAN" +syn match sasMacro "%QSUBSTR" +syn match sasMacro "%QSYSFUNC" +syn match sasMacro "%QTRIM" +syn match sasMacro "%QUOTE" +syn match sasMacro "%QUPCASE" +syn match sasMacro "%SCAN" +syn match sasMacro "%STR" +syn match sasMacro "%SUBSTR" +syn match sasMacro "%SUPERQ" +syn match sasMacro "%SYSCALL" +syn match sasMacro "%SYSEVALF" +syn match sasMacro "%SYSEXEC" +syn match sasMacro "%SYSFUNC" +syn match sasMacro "%SYSGET" +syn match sasMacro "%SYSLPUT" +syn match sasMacro "%SYSPROD" +syn match sasMacro "%SYSRC" +syn match sasMacro "%SYSRPUT" +syn match sasMacro "%THEN" +syn match sasMacro "%TO" +syn match sasMacro "%TRIM" +syn match sasMacro "%UNQUOTE" +syn match sasMacro "%UNTIL" +syn match sasMacro "%UPCASE" +syn match sasMacro "%VERIFY" +syn match sasMacro "%WHILE" +syn match sasMacro "%WINDOW" " SAS Functions @@ -159,13 +210,17 @@ syn keyword sasErrMsg ERROR syn keyword sasTodo TODO TBD FIXME contained " These don't fit anywhere else (Bob Heckel). -syn match sasUnderscore "_NULL_" +" Added others that were missing. +syn match sasUnderscore "_ALL_" +syn match sasUnderscore "_AUTOMATIC_" +syn match sasUnderscore "_CHARACTER_" syn match sasUnderscore "_INFILE_" syn match sasUnderscore "_N_" -syn match sasUnderscore "_WEBOUT_" +syn match sasUnderscore "_NAME_" +syn match sasUnderscore "_NULL_" syn match sasUnderscore "_NUMERIC_" -syn match sasUnderscore "_CHARACTER_" -syn match sasUnderscore "_ALL_" +syn match sasUnderscore "_USER_" +syn match sasUnderscore "_WEBOUT_" " End of SAS Functions diff --git a/runtime/syntax/sass.vim b/runtime/syntax/sass.vim new file mode 100644 index 0000000000..1a2e7a450f --- /dev/null +++ b/runtime/syntax/sass.vim @@ -0,0 +1,56 @@ +" Vim syntax file +" Language: Sass +" Maintainer: Tim Pope +" Filenames: *.sass + +if exists("b:current_syntax") + finish +endif + +runtime! syntax/css.vim + +syn case ignore + +syn cluster sassCssProperties contains=cssFontProp,cssFontDescriptorProp,cssColorProp,cssTextProp,cssBoxProp,cssGeneratedContentProp,cssPagingProp,cssUIProp,cssRenderProp,cssAuralProp,cssTableProp +syn cluster sassCssAttributes contains=css.*Attr,cssComment,cssValue.*,cssColor,cssURL,cssImportant,cssError,cssStringQ,cssStringQQ,cssFunction,cssUnicodeEscape,cssRenderProp + +syn match sassProperty "^\s*\zs\s\%([[:alnum:]-]\+:\|:[[:alnum:]-]\+\)"hs=s+1 contains=css.*Prop skipwhite nextgroup=sassCssAttribute +syn match sassCssAttribute ".*$" contained contains=@sassCssAttributes,sassConstant +syn match sassConstant "![[:alnum:]_-]\+" +syn match sassConstantAssignment "\%(![[:alnum:]_]\+\s*\)\@<==" nextgroup=sassCssAttribute skipwhite +syn match sassMixin "^=.*" +syn match sassMixing "^\s\+\zs+.*" + +syn match sassEscape "^\s*\zs\\" +syn match sassIdChar "#[[:alnum:]_-]\@=" nextgroup=sassId +syn match sassId "[[:alnum:]_-]\+" contained +syn match sassClassChar "\.[[:alnum:]_-]\@=" nextgroup=sassClass +syn match sassClass "[[:alnum:]_-]\+" contained +syn match sassAmpersand "&" + +" TODO: Attribute namespaces +" TODO: Arithmetic (including strings and concatenation) + +syn region sassInclude start="@import" end=";\|$" contains=cssComment,cssURL,cssUnicodeEscape,cssMediaType + +syn keyword sassTodo FIXME NOTE TODO OPTIMIZE XXX contained +syn region sassComment start="^\z(\s*\)//" end="^\%(\z1 \)\@!" contains=sassTodo +syn region sassCssComment start="^\z(\s*\)/\*" end="^\%(\z1 \)\@!" contains=sassTodo + +hi def link sassCssComment sassComment +hi def link sassComment Comment +hi def link sassConstant Identifier +hi def link sassMixing PreProc +hi def link sassMixin PreProc +hi def link sassTodo Todo +hi def link sassInclude Include +hi def link sassEscape Special +hi def link sassIdChar Special +hi def link sassClassChar Special +hi def link sassAmpersand Character +hi def link sassId Identifier +hi def link sassClass Type + +let b:current_syntax = "sass" + +" vim:set sw=2: diff --git a/runtime/syntax/sh.vim b/runtime/syntax/sh.vim index bddfe1c7e4..5fa8d938fd 100644 --- a/runtime/syntax/sh.vim +++ b/runtime/syntax/sh.vim @@ -2,22 +2,10 @@ " Language: shell (sh) Korn shell (ksh) bash (sh) " Maintainer: Dr. Charles E. Campbell, Jr. " Previous Maintainer: Lennart Schultz -" Last Change: Apr 24, 2008 -" Version: 90 +" Last Change: Jul 11, 2008 +" Version: 102 " URL: http://mysite.verizon.net/astronaut/vim/index.html#vimlinks_syntax -" -" Using the following VIM variables: {{{1 -" g:is_bash if none of the previous three variables are -" defined, then if g:is_bash is set enhance with -" bash syntax highlighting -" g:is_kornshell if neither b:is_kornshell or b:is_bash is -" defined, then if g:is_kornshell is set -" enhance with kornshell/POSIX syntax highlighting -" g:is_posix this variable is the same as g:is_kornshell -" g:sh_fold_enabled if non-zero, syntax folding is enabled -" g:sh_minlines sets up syn sync minlines (dflt: 200) -" g:sh_maxlines sets up syn sync maxlines (dflt: 2x sh_minlines) -" +" For options and settings, please use: :help ft-sh-syntax " This file includes many ideas from ric Brunet (eric.brunet@ens.fr) " For version 5.x: Clear all syntax items {{{1 @@ -61,6 +49,15 @@ elseif g:sh_fold_enabled != 0 && !has("folding") let g:sh_fold_enabled= 0 echomsg "Ignoring g:sh_fold_enabled=".g:sh_fold_enabled."; need to re-compile vim for +fold support" endif +if !exists("s:sh_fold_functions") + let s:sh_fold_functions = 1 +endif +if !exists("s:sh_fold_heredoc") + let s:sh_fold_heredoc = 2 +endif +if !exists("s:sh_fold_ifdofor") + let s:sh_fold_ifdofor = 4 +endif if g:sh_fold_enabled && &fdm == "manual" set fdm=syntax endif @@ -70,26 +67,33 @@ syn case match " Clusters: contains=@... clusters {{{1 "================================== -syn cluster shCaseEsacList contains=shCaseStart,shCase,shCaseBar,shCaseIn,shComment,shDeref,shDerefSimple,shCaseCommandSub,shCaseExSingleQuote,shCaseSingleQuote,shCaseDoubleQuote,shCtrlSeq +syn cluster shErrorList contains=shDoError,shIfError,shInError,shCaseError,shEsacError,shCurlyError,shParenError,shTestError +if exists("b:is_kornshell") + syn cluster ErrorList add=shDTestError +endif +syn cluster shArithParenList contains=shArithmetic,shDeref,shDerefSimple,shEscape,shNumber,shOperator,shPosnParm,shExSingleQuote,shSingleQuote,shDoubleQuote,shStatement,shVariable,shAlias,shTest,shCtrlSeq,shSpecial,shParen +syn cluster shArithList contains=@shArithParenList,shParenError +syn cluster shCaseEsacList contains=shCaseStart,shCase,shCaseBar,shCaseIn,shComment,shDeref,shDerefSimple,shCaseCommandSub,shCaseExSingleQuote,shCaseSingleQuote,shCaseDoubleQuote,shCtrlSeq,@shErrorList,shStringSpecial syn cluster shCaseList contains=@shCommandSubList,shCaseEsac,shColon,shCommandSub,shCommandSub,shComment,shDo,shEcho,shExpr,shFor,shHereDoc,shIf,shRedir,shSetList,shSource,shStatement,shVariable,shCtrlSeq syn cluster shColonList contains=@shCaseList -syn cluster shCommandSubList contains=shArithmetic,shDeref,shDerefSimple,shNumber,shOperator,shPosnParm,shExSingleQuote,shSingleQuote,shDoubleQuote,shStatement,shVariable,shSubSh,shAlias,shTest,shCtrlSeq +syn cluster shCommandSubList contains=shArithmetic,shDeref,shDerefSimple,shEscape,shNumber,shOperator,shPosnParm,shExSingleQuote,shSingleQuote,shDoubleQuote,shStatement,shVariable,shSubSh,shAlias,shTest,shCtrlSeq,shSpecial syn cluster shCurlyList contains=shNumber,shComma,shDeref,shDerefSimple,shDerefSpecial syn cluster shDblQuoteList contains=shCommandSub,shDeref,shDerefSimple,shPosnParm,shExSingleQuote,shCtrlSeq,shSpecial syn cluster shDerefList contains=shDeref,shDerefSimple,shDerefVar,shDerefSpecial,shDerefWordError,shDerefPPS syn cluster shDerefVarList contains=shDerefOp,shDerefVarArray,shDerefOpError -syn cluster shEchoList contains=shArithmetic,shCommandSub,shDeref,shDerefSimple,shExpr,shExSingleQuote,shSingleQuote,shDoubleQuote,shCtrlSeq +syn cluster shEchoList contains=shArithmetic,shCommandSub,shDeref,shDerefSimple,shExpr,shExSingleQuote,shSingleQuote,shDoubleQuote,shCtrlSeq,shEchoQuote syn cluster shExprList1 contains=shCharClass,shNumber,shOperator,shExSingleQuote,shSingleQuote,shDoubleQuote,shExpr,shDblBrace,shDeref,shDerefSimple,shCtrlSeq syn cluster shExprList2 contains=@shExprList1,@shCaseList,shTest -syn cluster shFunctionList contains=@shCommandSubList,shCaseEsac,shColon,shCommandSub,shCommandSub,shComment,shDo,shEcho,shExpr,shFor,shHereDoc,shIf,shRedir,shSetList,shSource,shStatement,shVariable,shOperator,shFunctionStart,shCtrlSeq +syn cluster shFunctionList contains=@shCommandSubList,shCaseEsac,shColon,shCommandSub,shCommandSub,shComment,shDo,shEcho,shExpr,shFor,shHereDoc,shIf,shRedir,shSetList,shSource,shStatement,shVariable,shOperator,shCtrlSeq if exists("b:is_kornshell") || exists("b:is_bash") + syn cluster shFunctionList add=shRepeat syn cluster shFunctionList add=shDblBrace,shDblParen endif syn cluster shHereBeginList contains=@shCommandSubList syn cluster shHereList contains=shBeginHere,shHerePayload syn cluster shHereListDQ contains=shBeginHere,@shDblQuoteList,shHerePayload -syn cluster shIdList contains=shCommandSub,shWrapLineOperator,shIdWhiteSpace,shDeref,shDerefSimple,shRedir,shExSingleQuote,shSingleQuote,shDoubleQuote,shExpr,shCtrlSeq -syn cluster shLoopList contains=@shCaseList,shTestOpr,shExpr,shDblBrace,shConditional,shCaseEsac,shTest +syn cluster shIdList contains=shCommandSub,shWrapLineOperator,shSetOption,shDeref,shDerefSimple,shRedir,shExSingleQuote,shSingleQuote,shDoubleQuote,shExpr,shCtrlSeq,shStringSpecial +syn cluster shLoopList contains=@shCaseList,shTestOpr,shExpr,shDblBrace,shConditional,shCaseEsac,shTest,@shErrorList,shSet syn cluster shSubShList contains=@shCaseList,shOperator syn cluster shTestList contains=shCharClass,shComment,shCommandSub,shDeref,shDerefSimple,shDoubleQuote,shExpr,shExpr,shNumber,shOperator,shExSingleQuote,shSingleQuote,shTestOpr,shTest,shCtrlSeq @@ -97,10 +101,11 @@ syn cluster shTestList contains=shCharClass,shComment,shCommandSub,shDeref,shDer " Echo: {{{1 " ==== " This one is needed INSIDE a CommandSub, so that `echo bla` be correct -syn region shEcho matchgroup=shStatement start="\" skip="\\$" matchgroup=shOperator end="$" matchgroup=NONE end="[<>;&|()]"me=e-1 end="\d[<>]"me=e-2 end="#"me=e-1 contains=@shEchoList -syn region shEcho matchgroup=shStatement start="\" skip="\\$" matchgroup=shOperator end="$" matchgroup=NONE end="[<>;&|()]"me=e-1 end="\d[<>]"me=e-2 end="#"me=e-1 contains=@shEchoList +syn region shEcho matchgroup=shStatement start="\" skip="\\$" matchgroup=shOperator end="$" matchgroup=NONE end="[<>;&|()]"me=e-1 end="\d[<>]"me=e-2 end="#"me=e-1 contains=@shEchoList skipwhite nextgroup=shQuickComment +syn region shEcho matchgroup=shStatement start="\" skip="\\$" matchgroup=shOperator end="$" matchgroup=NONE end="[<>;&|()]"me=e-1 end="\d[<>]"me=e-2 end="#"me=e-1 contains=@shEchoList skipwhite nextgroup=shQuickComment +syn match shEchoQuote contained '\%(\\\\\)*\\["`']' -" This must be after the strings, so that bla \" be correct +" This must be after the strings, so that ... \" will be correct syn region shEmbeddedEcho contained matchgroup=shStatement start="\" skip="\\$" matchgroup=shOperator end="$" matchgroup=NONE end="[<>;&|`)]"me=e-1 end="\d[<>]"me=e-2 end="#"me=e-1 contains=shNumber,shExSingleQuote,shSingleQuote,shDeref,shDerefSimple,shSpecialVar,shOperator,shDoubleQuote,shCharClass,shCtrlSeq " Alias: {{{1 @@ -125,10 +130,10 @@ if exists("b:is_kornshell") endif syn match shTestError "]" -" Options Interceptor: {{{1 +" Options: {{{1 " ==================== -syn match shOption "\s[\-+][a-zA-Z0-9]\+\>"ms=s+1 -syn match shOption "\s--[^ \t$`'"|]\+"ms=s+1 +syn match shOption "\s\zs[-+][a-zA-Z0-9]\+\>" +syn match shOption "\s\zs--[^ \t$`'"|]\+" " File Redirection Highlighted As Operators: {{{1 "=========================================== @@ -140,8 +145,8 @@ syn match shRedir "\d<<-\=" " Operators: {{{1 " ========== syn match shOperator "<<\|>>" contained -syn match shOperator "[!&;|]" -syn match shOperator "\[[[^:]\|\]]" +syn match shOperator "[!&;|]" contained +syn match shOperator "\[[[^:]\|\]]" contained syn match shOperator "!\==" skipwhite nextgroup=shPattern syn match shPattern "\<\S\+\())\)\@=" contained contains=shExSingleQuote,shSingleQuote,shDoubleQuote,shDeref @@ -172,33 +177,34 @@ syn match shCharClass contained "\[:\(backspace\|escape\|return\|xdigit\|alnum " Loops: do, if, while, until {{{1 " ====== -if g:sh_fold_enabled +if (g:sh_fold_enabled % (s:sh_fold_ifdofor * 2))/s:sh_fold_ifdofor syn region shDo fold transparent matchgroup=shConditional start="\" matchgroup=shConditional end="\" contains=@shLoopList - syn region shIf fold transparent matchgroup=shConditional start="\" matchgroup=shConditional end="\<;\_s*then\>" end="\" contains=@shLoopList,shDblBrace,shDblParen,shFunctionKey - syn region shFor fold matchgroup=shLoop start="\" end="\" end="\"me=e-2 contains=@shLoopList,shDblParen skipwhite nextgroup=shCurlyIn + syn region shIf fold transparent matchgroup=shConditional start="\" contained +syn match shVariable "\<\([bwglsav]:\)\=[a-zA-Z0-9.!@_%+,]*\ze=" nextgroup=shSetIdentifier +syn match shSetIdentifier "=" contained nextgroup=shPattern,shDeref,shDerefSimple,shDoubleQuote,shSingleQuote,shExSingleQuote if exists("b:is_bash") - syn region shSetList matchgroup=shSet start="\<\(declare\|typeset\|local\|export\|unset\)\>\ze[^/]" end="$" matchgroup=shOperator end="\ze[|);&]"me=e-1 matchgroup=NONE end="#\|="me=e-1 contains=@shIdList - syn region shSetList matchgroup=shSet start="\[^/]"me=e-1 end="$" end="\\ze[|)]" matchgroup=shOperator end="\ze[|);&]"me=e-1 matchgroup=NONE end="[#=]"me=e-1 contains=@shIdList - syn match shSet "\<\(declare\|typeset\|local\|export\|set\|unset\)\>" + syn region shSetList oneline matchgroup=shSet start="\<\(declare\|typeset\|local\|export\|unset\)\>\ze[^/]" end="$" matchgroup=shOperator end="\ze[}|);&]" matchgroup=NONE end="\ze#\|=" contains=@shIdList + syn region shSetList oneline matchgroup=shSet start="\\ze[^/]" end="\ze[;|)]\|$" matchgroup=shOperator end="\ze[}|);&]" matchgroup=NONE end="\ze[#=]" contains=@shIdList elseif exists("b:is_kornshell") - syn region shSetList matchgroup=shSet start="\<\(typeset\|export\|unset\)\>\ze[^/]" end="$" matchgroup=shOperator end="\ze[|);&]"me=e-1 matchgroup=NONE end="[#=]"me=e-1 contains=@shIdList - syn region shSetList matchgroup=shSet start="\\ze[^/]" end="$\|\ze[})]" matchgroup=shOperator end="\ze[|);&]"me=e-1 matchgroup=NONE end="[#=]"me=e-1 contains=@shIdList - syn match shSet "\<\(typeset\|set\|export\|unset\)\>" + syn region shSetList oneline matchgroup=shSet start="\<\(typeset\|export\|unset\)\>\ze[^/]" end="$" matchgroup=shOperator end="\ze[}|);&]" matchgroup=NONE end="\ze[#=]" contains=@shIdList + syn region shSetList oneline matchgroup=shSet start="\\ze[^/]" end="$" matchgroup=shOperator end="\ze[}|);&]" matchgroup=NONE end="\ze[#=]" contains=@shIdList else - syn region shSetList matchgroup=shSet start="\<\(set\|export\|unset\)\>\ze[^/]" end="$\|\ze[|)]" matchgroup=shOperator end="\ze[|);&]" matchgroup=NONE end="[#=]"me=e-1 contains=@shIdList - syn match shStatement "\<\(set\|export\|unset\)\>" + syn region shSetList oneline matchgroup=shSet start="\<\(set\|export\|unset\)\>\ze[^/]" end="$" matchgroup=shOperator end="\ze[}|);&]" matchgroup=NONE end="\ze[#=]" contains=@shIdList endif " Functions: {{{1 -syn keyword shFunctionKey function skipwhite skipnl nextgroup=shFunctionTwo -" COMBAK -- look at bash09. function foo() (line#35) is folding 38 lines. Not being terminated properly -"syn match shFunctionStart "{" contained -if g:sh_fold_enabled - syn region shFunctionOne transparent fold start="^\s*\h\w*\s*()\_s*\ze{" matchgroup=shFunctionStart end="}" contains=@shFunctionList skipwhite skipnl nextgroup=shFunctionStart - syn region shFunctionTwo transparent fold start="\h\w*\s*\%(()\)\=\_s*\ze{" matchgroup=shFunctionStart end="}" contains=shFunctionKey,@shFunctionList contained skipwhite skipnl nextgroup=shFunctionStart +if !exists("g:is_posix") + syn keyword shFunctionKey function skipwhite skipnl nextgroup=shFunctionTwo +endif + +if exists("b:is_bash") + if (g:sh_fold_enabled % (s:sh_fold_functions * 2))/s:sh_fold_functions + syn region shFunctionOne fold matchgroup=shFunction start="^\s*\h[-a-zA-Z_0-9]*\s*()\_s*{" end="}" contains=@shFunctionList skipwhite skipnl nextgroup=shFunctionStart,shQuickComment + syn region shFunctionTwo fold matchgroup=shFunction start="\h[-a-zA-Z_0-9]*\s*\%(()\)\=\_s*{" end="}" contains=shFunctionKey,@shFunctionList contained skipwhite skipnl nextgroup=shFunctionStart,shQuickComment + else + syn region shFunctionOne matchgroup=shFunction start="^\s*\h[-a-zA-Z_0-9]*\s*()\_s*{" end="}" contains=@shFunctionList + syn region shFunctionTwo matchgroup=shFunction start="\h[-a-zA-Z_0-9]*\s*\%(()\)\=\_s*{" end="}" contains=shFunctionKey,@shFunctionList contained + endif else - syn region shFunctionOne transparent start="^\s*\h\w*\s*()\_s*\ze{" matchgroup=shFunctionStart end="}" contains=@shFunctionList - syn region shFunctionTwo transparent start="\h\w*\s*\%(()\)\=\_s*\ze{" matchgroup=shFunctionStart end="}" contains=shFunctionKey,@shFunctionList contained + if (g:sh_fold_enabled % (s:sh_fold_functions * 2))/s:sh_fold_functions + syn region shFunctionOne fold matchgroup=shFunction start="^\s*\h\w*\s*()\_s*{" end="}" contains=@shFunctionList skipwhite skipnl nextgroup=shFunctionStart,shQuickComment + syn region shFunctionTwo fold matchgroup=shFunction start="\h\w*\s*\%(()\)\=\_s*{" end="}" contains=shFunctionKey,@shFunctionList contained skipwhite skipnl nextgroup=shFunctionStart,shQuickComment + else + syn region shFunctionOne matchgroup=shFunction start="^\s*\h\w*\s*()\_s*{" end="}" contains=@shFunctionList + syn region shFunctionTwo matchgroup=shFunction start="\h\w*\s*\%(()\)\=\_s*{" end="}" contains=shFunctionKey,@shFunctionList contained + endif endif " Parameter Dereferencing: {{{1 @@ -365,6 +379,7 @@ syn match shDerefSimple "\$[-#*@!?]" syn match shDerefSimple "\$\$" if exists("b:is_bash") || exists("b:is_kornshell") syn region shDeref matchgroup=PreProc start="\${##\=" end="}" contains=@shDerefList + syn region shDeref matchgroup=PreProc start="\${\$\$" end="}" contains=@shDerefList endif " bash: ${!prefix*} and ${#parameter}: {{{1 @@ -401,9 +416,9 @@ if exists("b:is_bash") || exists("b:is_kornshell") syn region shDerefPattern contained start="{" end="}" contains=shDeref,shDerefSimple,shDerefString,shCommandSub nextgroup=shDerefPattern syn match shDerefEscape contained '\%(\\\\\)*\\.' endif -syn region shDerefString contained matchgroup=shOperator start=+'+ end=+'+ contains=shStringSpecial -syn region shDerefString contained matchgroup=shOperator start=+"+ skip=+\\"+ end=+"+ contains=@shDblQuoteList,shStringSpecial -syn match shDerefString contained "\\["']" +syn region shDerefString contained matchgroup=shOperator start=+\%(\\\)\@ -" Latest Revision: 2006-04-19 +" Latest Revision: 2007-10-25 if exists("b:current_syntax") finish @@ -33,7 +33,7 @@ syn keyword sieveTest address allof anyof envelope exists false header \ not size true syn keyword sievePreProc require stop syn keyword sieveAction reject fileinto redirect keep discard -syn match sieveKeyword '\<\h\w*\>' +syn keyword sieveKeyword vacation syn case match @@ -46,7 +46,7 @@ hi def link sieveString String hi def link sieveConditional Conditional hi def link sieveTest Keyword hi def link sievePreProc PreProc -hi def link sieveAction Keyword +hi def link sieveAction Function hi def link sieveKeyword Keyword let b:current_syntax = "sieve" diff --git a/runtime/syntax/svn.vim b/runtime/syntax/svn.vim index d691ba15c2..bb4f594469 100644 --- a/runtime/syntax/svn.vim +++ b/runtime/syntax/svn.vim @@ -4,10 +4,11 @@ " URL: http://www.hlabs.spb.ru/vim/svn.vim " Revision: $Id$ " Filenames: svn-commit*.tmp -" Version: 1.5 +" Version: 1.6 " Contributors: " Stefano Zacchiroli +" A. S. Budden " For version 5.x: Clear all syntax items. " For version 6.x: Quit when a syntax file was already loaded. @@ -17,7 +18,7 @@ elseif exists("b:current_syntax") finish endif -syn region svnRegion start="^--.*--$" end="\%$" contains=ALL +syn region svnRegion start="^--.*--$" end="\%$" contains=ALL contains=@NoSpell syn match svnRemoved "^D .*$" contained syn match svnAdded "^A[ M] .*$" contained syn match svnModified "^M[ M] .*$" contained diff --git a/runtime/syntax/updatedb.vim b/runtime/syntax/updatedb.vim index dd8e6f7a5c..4f912d4d98 100644 --- a/runtime/syntax/updatedb.vim +++ b/runtime/syntax/updatedb.vim @@ -1,7 +1,7 @@ " Vim syntax file " Language: updatedb.conf(5) configuration file " Maintainer: Nikolai Weibull -" Latest Revision: 2006-04-19 +" Latest Revision: 2007-10-25 if exists("b:current_syntax") finish @@ -18,7 +18,7 @@ syn region updatedbComment display oneline start='^\s*#' end='$' syn match updatedbBegin display '^' \ nextgroup=updatedbName,updatedbComment skipwhite -syn keyword updatedbName contained PRUNEFS PRUNEPATHS +syn keyword updatedbName contained PRUNEFS PRUNEPATHS PRUNE_BIND_MOUNTS \ nextgroup=updatedbNameEq syn match updatedbNameEq contained display '=' nextgroup=updatedbValue diff --git a/runtime/syntax/vim.vim b/runtime/syntax/vim.vim index bbf31f7a71..5bfcd66060 100644 --- a/runtime/syntax/vim.vim +++ b/runtime/syntax/vim.vim @@ -1,8 +1,8 @@ " Vim syntax file -" Language: Vim 7.1 script +" Language: Vim 7.2 script " Maintainer: Dr. Charles E. Campbell, Jr. -" Last Change: Apr 08, 2008 -" Version: 7.1-77 +" Last Change: July 29, 2008 +" Version: 7.2-82 " Automatically generated keyword lists: {{{1 " Quit when a syntax file was already loaded {{{2 @@ -16,21 +16,21 @@ syn keyword vimTodo contained COMBAK FIXME TODO XXX syn cluster vimCommentGroup contains=vimTodo,@Spell " regular vim commands {{{2 -syn keyword vimCommand contained ab[breviate] argd[elete] ar[gs] bd[elete] bn[ext] breaka[dd] bufdo ca[bbrev] cal[l] cd cgetb[uffer] chd[ir] clo[se] cnf[ile] comc[lear] co[py] cuna[bbrev] delf[unction] diffpu[t] di[splay] dsp[lit] e[dit] endfo[r] ene[w] files fir[st] foldd[oopen] gr[ep] helpg[rep] iabc[lear] inorea[bbrev] ju[mps] laddb[uffer] la[st] lch[dir] lex[pr] lgete[xpr] lh[elpgrep] lli[st] lnew[er] lNf[ile] lockv[ar] lp[revious] lv[imgrep] ma[rk] mk[exrc] mkv[imrc] mz[scheme] N[ext] nu[mber] opt[ions] perld[o] pp[op] P[rint] promptr[epl] ptj[ump] ptp[revious] pw[d] q[uit] redi[r] reg[isters] rew[ind] rubyd[o] sal[l] sba[ll] sbn[ext] sb[uffer] setf[iletype] sfir[st] sim[alt] sm[ap] sn[ext] snor[emap] so[urce] spellr[epall] spr[evious] star[tinsert] stopi[nsert] sunmenu t tabe[dit] tabm[ove] tabo[nly] ta[g] tclf[ile] tj[ump] tn[ext] tr[ewind] tu[nmenu] undol[ist] verb[ose] vim[grep] vmapc[lear] wh[ile] win[size] wq wv[iminfo] xm[ap] XMLent xnoremenu -syn keyword vimCommand contained abc[lear] argdo argu[ment] bel[owright] bN[ext] breakd[el] b[uffer] cabc[lear] cat[ch] ce[nter] cgete[xpr] che[ckpath] cmapc[lear] cNf[ile] comp[iler] cpf[ile] cw[indow] delm[arks] diffsplit dj[ump] earlier el[se] endf[unction] ex filetype fix[del] foldo[pen] grepa[dd] helpt[ags] if is[earch] k lad[dexpr] later lcl[ose] lf[ile] lg[etfile] l[ist] lmak[e] lne[xt] ln[oremap] lol[der] lr[ewind] lvimgrepa[dd] marks mks[ession] mod[e] nbkey nmapc[lear] omapc[lear] pc[lose] po[p] pre[serve] profd[el] ps[earch] ptl[ast] ptr[ewind] pyf[ile] quita[ll] red[o] res[ize] ri[ght] rubyf[ile] san[dbox] sbf[irst] sbN[ext] scripte[ncoding] setg[lobal] sh[ell] sla[st] smapc[lear] sN[ext] snoreme spelld[ump] spellu[ndo] sre[wind] startr[eplace] sts[elect] sus[pend] tab tabf[ind] tabnew tabp[revious] tags te[aroff] tl[ast] tN[ext] try una[bbreviate] unh[ide] ve[rsion] vimgrepa[dd] vne[w] winc[md] wn[ext] wqa[ll] X xmapc[lear] XMLns xunme -syn keyword vimCommand contained abo[veleft] arge[dit] as[cii] bf[irst] bo[tright] breakl[ist] buffers caddb[uffer] cb[uffer] cex[pr] cg[etfile] checkt[ime] cnew[er] cnorea[bbrev] conf[irm] cp[revious] debugg[reedy] diffg[et] diffthis dl[ist] echoe[rr] elsei[f] en[dif] exi[t] fina[lly] fo[ld] for ha[rdcopy] hid[e] ij[ump] isp[lit] keepalt laddf[ile] lb[uffer] le[ft] lfir[st] lgr[ep] ll lm[ap] lN[ext] lo[adview] lop[en] ls lw[indow] mat[ch] mksp[ell] m[ove] new noh[lsearch] on[ly] ped[it] popu prev[ious] prof[ile] pta[g] ptn[ext] pts[elect] py[thon] r[ead] redr[aw] ret[ab] rightb[elow] ru[ntime] sa[rgument] sbl[ast] sbp[revious] scrip[tnames] setl[ocal] sign sl[eep] sme sni[ff] snoremenu spe[llgood] spellw[rong] sta[g] stj[ump] sun[hide] sv[iew] tabc[lose] tabfir[st] tabn[ext] tabr[ewind] tc[l] tf[irst] tm to[pleft] ts[elect] u[ndo] unlo[ckvar] vert[ical] vi[sual] vs[plit] windo wN[ext] w[rite] xa[ll] xme xn[oremap] xunmenu -syn keyword vimCommand contained al[l] argg[lobal] bad[d] bl[ast] bp[revious] br[ewind] bun[load] cad[dexpr] cc cf[ile] c[hange] cla[st] cn[ext] col[der] con[tinue] cq[uit] delc[ommand] diffoff diffu[pdate] dr[op] echom[sg] em[enu] endt[ry] exu[sage] fin[d] foldc[lose] fu[nction] h[elp] his[tory] il[ist] iuna[bbrev] keepj[umps] lan[guage] lc[d] lefta[bove] lgetb[uffer] lgrepa[dd] lla[st] lmapc[lear] lnf[ile] loc[kmarks] lpf[ile] lt[ag] mak[e] menut[ranslate] mkvie[w] mzf[ile] n[ext] norea[bbrev] o[pen] pe[rl] popu[p] p[rint] promptf[ind] ptf[irst] ptN[ext] pu[t] qa[ll] rec[over] redraws[tatus] retu[rn] rub[y] rv[iminfo] sav[eas] sbm[odified] sbr[ewind] se[t] sf[ind] sil[ent] sm[agic] smenu sno[magic] sor[t] spelli[nfo] sp[lit] startg[replace] st[op] sunme syncbind tabd[o] tabl[ast] tabN[ext] tabs tcld[o] th[row] tm[enu] tp[revious] tu undoj[oin] up[date] vie[w] viu[sage] wa[ll] winp[os] wp[revious] ws[verb] x[it] xmenu xnoreme y[ank] -syn keyword vimCommand contained arga[dd] argl[ocal] ba[ll] bm[odified] brea[k] bro[wse] bw[ipeout] caddf[ile] ccl[ose] cfir[st] changes cl[ist] cN[ext] colo[rscheme] cope[n] cr[ewind] d[elete] diffpatch dig[raphs] ds[earch] echon emenu* endw[hile] f[ile] fini[sh] folddoc[losed] go[to] helpf[ind] ia[bbrev] imapc[lear] j[oin] kee[pmarks] +syn keyword vimCommand contained abc[lear] argdo argu[ment] bel[owright] bN[ext] breakd[el] b[uffer] caddb[uffer] cb[uffer] cex[pr] cg[etfile] checkt[ime] cnew[er] col[der] con[tinue] cq[uit] delc[ommand] diffoff diffu[pdate] dr[op] echom[sg] em[enu] endt[ry] exu[sage] fin[d] foldc[lose] fu[nction] ha[rdcopy] helpt[ags] if is[earch] ju[mps] kee[pmarks] lan[guage] lc[d] lefta[bove] lgetb[uffer] lgrepa[dd] lla[st] lmapc[lear] lnf[ile] loc[kmarks] lpf[ile] lt[ag] mak[e] menut[ranslate] mkvie[w] mzf[ile] n[ext] nu[mber] opt[ions] perld[o] pp[op] P[rint] promptr[epl] ptj[ump] ptp[revious] pw[d] q[uit] redi[r] reg[isters] rew[ind] rubyd[o] sal[l] sba[ll] sbn[ext] sb[uffer] setf[iletype] sfir[st] sim[alt] sm[ap] sn[ext] snor[emap] so[urce] spellr[epall] spr[evious] star[tinsert] stopi[nsert] sunmenu t tabe[dit] tabm[ove] tabo[nly] ta[g] tclf[ile] tj[ump] tn[ext] tr[ewind] tu[nmenu] undol[ist] verb[ose] vim[grep] vmapc[lear] wh[ile] win[size] wq wv[iminfo] xm[ap] XMLent xnoremenu +syn keyword vimCommand contained abo[veleft] arge[dit] as[cii] bf[irst] bo[tright] breakl[ist] buffers cad[dexpr] cc cf[ile] c[hange] cla[st] cn[ext] colo[rscheme] cope[n] cr[ewind] d[elete] diffpatch dig[raphs] ds[earch] echon emenu* endw[hile] f[ile] fini[sh] folddoc[losed] go[to] h[elp] hid[e] ij[ump] isp[lit] k laddb[uffer] la[st] lch[dir] lex[pr] lgete[xpr] lh[elpgrep] lli[st] lnew[er] lNf[ile] lockv[ar] lp[revious] lv[imgrep] ma[rk] mk[exrc] mkv[imrc] mz[scheme] N[ext] omapc[lear] pc[lose] po[p] pre[serve] profd[el] ps[earch] ptl[ast] ptr[ewind] pyf[ile] quita[ll] red[o] res[ize] ri[ght] rubyf[ile] san[dbox] sbf[irst] sbN[ext] scripte[ncoding] setg[lobal] sh[ell] sla[st] smapc[lear] sN[ext] snoreme spelld[ump] spellu[ndo] sre[wind] startr[eplace] sts[elect] sus[pend] tab tabf[ind] tabnew tabp[revious] tags te[aroff] tl[ast] tN[ext] try una[bbreviate] unh[ide] ve[rsion] vimgrepa[dd] vne[w] winc[md] wn[ext] wqa[ll] X xmapc[lear] XMLns xunme +syn keyword vimCommand contained al[l] argg[lobal] bad[d] bl[ast] bp[revious] br[ewind] bun[load] caddf[ile] ccl[ose] cfir[st] changes cl[ist] cN[ext] comc[lear] co[py] cuna[bbrev] delf[unction] diffpu[t] di[splay] dsp[lit] e[dit] endfo[r] ene[w] files fir[st] foldd[oopen] gr[ep] helpf[ind] his[tory] il[ist] iuna[bbrev] keepalt lad[dexpr] later lcl[ose] lf[ile] lg[etfile] l[ist] lmak[e] lne[xt] ln[oremap] lol[der] lr[ewind] lvimgrepa[dd] marks mks[ession] mod[e] nbkey nmapc[lear] on[ly] ped[it] popu prev[ious] prof[ile] pta[g] ptn[ext] pts[elect] py[thon] r[ead] redr[aw] ret[ab] rightb[elow] ru[ntime] sa[rgument] sbl[ast] sbp[revious] scrip[tnames] setl[ocal] sign sl[eep] sme sni[ff] snoremenu spe[llgood] spellw[rong] sta[g] stj[ump] sun[hide] sv[iew] tabc[lose] tabfir[st] tabn[ext] tabr[ewind] tc[l] tf[irst] tm to[pleft] ts[elect] u[ndo] unlo[ckvar] vert[ical] vi[sual] vs[plit] windo wN[ext] w[rite] xa[ll] xme xn[oremap] xunmenu +syn keyword vimCommand contained arga[dd] argl[ocal] ba[ll] bm[odified] brea[k] bro[wse] bw[ipeout] cal[l] cd cgetb[uffer] chd[ir] clo[se] cnf[ile] comp[iler] cpf[ile] cw[indow] delm[arks] diffsplit dj[ump] earlier el[se] endf[unction] ex filetype fix[del] foldo[pen] grepa[dd] helpg[rep] iabc[lear] imapc[lear] j[oin] keepj[umps] laddf[ile] lb[uffer] le[ft] lfir[st] lgr[ep] ll lm[ap] lN[ext] lo[adview] lop[en] ls lw[indow] mat[ch] mksp[ell] m[ove] new noh[lsearch] o[pen] pe[rl] popu[p] p[rint] promptf[ind] ptf[irst] ptN[ext] pu[t] qa[ll] rec[over] redraws[tatus] retu[rn] rub[y] rv[iminfo] sav[eas] sbm[odified] sbr[ewind] se[t] sf[ind] sil[ent] sm[agic] smenu sno[magic] sor[t] spelli[nfo] sp[lit] startg[replace] st[op] sunme syncbind tabd[o] tabl[ast] tabN[ext] tabs tcld[o] th[row] tm[enu] tp[revious] tu undoj[oin] up[date] vie[w] viu[sage] wa[ll] winp[os] wp[revious] ws[verb] x[it] xmenu xnoreme y[ank] +syn keyword vimCommand contained argd[elete] ar[gs] bd[elete] bn[ext] breaka[dd] bufdo cabc[lear] cat[ch] ce[nter] cgete[xpr] che[ckpath] cmapc[lear] cNf[ile] conf[irm] cp[revious] debugg[reedy] diffg[et] diffthis dl[ist] echoe[rr] elsei[f] en[dif] exi[t] fina[lly] fo[ld] for syn match vimCommand contained "\