0
0
mirror of https://github.com/vim/vim.git synced 2025-07-26 11:04:33 -04:00

updated for version 7.1a

This commit is contained in:
Bram Moolenaar 2007-05-05 17:10:09 +00:00
parent 3ed4447ed7
commit dd2a3cda55
20 changed files with 609 additions and 301 deletions

View File

@ -27,7 +27,7 @@ first:
# Some make programs use the last target for the $@ default; put the other # Some make programs use the last target for the $@ default; put the other
# targets separately to always let $@ expand to "first" by default. # targets separately to always let $@ expand to "first" by default.
all install uninstall tools config configure proto depend lint tags types test testclean clean distclean: all install uninstall tools config configure reconfig proto depend lint tags types test testclean clean distclean:
@echo "Starting make in the src directory." @echo "Starting make in the src directory."
@echo "If there are problems, cd to the src directory and run make there" @echo "If there are problems, cd to the src directory and run make there"
cd src && $(MAKE) $@ cd src && $(MAKE) $@
@ -69,7 +69,7 @@ all install uninstall tools config configure proto depend lint tags types test t
# Before creating an archive first delete all backup files, *.orig, etc. # Before creating an archive first delete all backup files, *.orig, etc.
MAJOR = 7 MAJOR = 7
MINOR = 0 MINOR = 1a
# Uncomment this line if the Win32s version is to be included. # Uncomment this line if the Win32s version is to be included.
DOSBIN_S = dosbin_s DOSBIN_S = dosbin_s
@ -81,14 +81,14 @@ DOSBIN_S = dosbin_s
# runtime/doc/*.txt and nsis/gvim.nsi. Other things in README_os2.txt. For a # runtime/doc/*.txt and nsis/gvim.nsi. Other things in README_os2.txt. For a
# minor/major version: src/GvimExt/GvimExt.reg, src/vim.def, src/vim16.def. # minor/major version: src/GvimExt/GvimExt.reg, src/vim.def, src/vim16.def.
# - Correct included_patches[] in src/version.c. # - Correct included_patches[] in src/version.c.
# - Compile Vim with GTK, Perl, Python, TCL, Ruby, MZscheme, Cscope and "huge" # - Compile Vim with GTK, Perl, Python, TCL, Ruby, MZscheme (if you can make it
# features. Exclude workshop and SNiFF. # work), Cscope and "huge" features. Exclude workshop and SNiFF.
# - With these features: "make proto" (requires cproto and Motif installed; # - With these features: "make proto" (requires cproto and Motif installed;
# ignore warnings for missing include files, fix problems for syntax errors). # ignore warnings for missing include files, fix problems for syntax errors).
# - With these features: "make depend" (works best with gcc). # - With these features: "make depend" (works best with gcc).
# - "make lint" and check the output (ignore GTK warnings). # - "make lint" and check the output (ignore GTK warnings).
# - Enable the efence library in "src/Makefile" and run "make test". May # - Enable the efence library in "src/Makefile" and run "make test". May
# require disabling Python to avoid trouble with threads. # require disabling Python and Ruby to avoid trouble with threads.
# - Check for missing entries in runtime/makemenu.vim (with checkmenu script). # - Check for missing entries in runtime/makemenu.vim (with checkmenu script).
# - Check for missing options in runtime/optwin.vim et al. (with check.vim). # - Check for missing options in runtime/optwin.vim et al. (with check.vim).
# - Do "make menu" to update the runtime/synmenu.vim file. # - Do "make menu" to update the runtime/synmenu.vim file.
@ -128,25 +128,26 @@ DOSBIN_S = dosbin_s
# - Rename the executables to "vimd32.exe", "xxdd32.exe", "installd32.exe" and # - Rename the executables to "vimd32.exe", "xxdd32.exe", "installd32.exe" and
# "uninstald32.exe". # "uninstald32.exe".
# Win32 console version: # Win32 console version:
# - Set environment for Visual C++ Toolkit 2003: "msvcsetup.bat" # - Set environment for Visual C++ Toolkit 2003: "msvcsetup.bat" (adjust the
# paths when necessary).
# - "nmake -f Make_mvc.mak" # - "nmake -f Make_mvc.mak"
# - "rm testdir/*.out", "nmake -f Make_mvc.mak test" and check the output. # - "rm testdir/*.out", "nmake -f Make_mvc.mak test" and check the output.
# - Rename the executables to "vimw32.exe", "xxdw32.exe". # - Rename the executables to "vimw32.exe", "xxdw32.exe".
# - Rename ObjC/vim.pdb to vimw32.pdb. # - Rename vim.pdb to vimw32.pdb.
# - When building the Win32s version later, delete vimrun.exe, install.exe and # - When building the Win32s version later, delete vimrun.exe, install.exe and
# uninstal.exe. Otherwise rename executables to installw32.exe and # uninstal.exe. Otherwise rename executables to installw32.exe and
# uninstalw32.exe. # uninstalw32.exe.
# Win32 GUI version: # Win32 GUI version:
# - "nmake -f Make_mvc.mak GUI=yes. # - "nmake -f Make_mvc.mak GUI=yes.
# - move "gvim.exe" to here (otherwise the OLE version will overwrite it). # - move "gvim.exe" to here (otherwise the OLE version will overwrite it).
# - Move ObjG/gvim.pdb to here. # - Move gvim.pdb to here.
# - Delete vimrun.exe, install.exe and uninstall.exe. # - Delete vimrun.exe, install.exe and uninstal.exe.
# - Copy "GvimExt/gvimext.dll" to here. # - Copy "GvimExt/gvimext.dll" to here.
# Win32 GUI version with OLE, PERL, TCL, PYTHON and dynamic IME: # Win32 GUI version with OLE, PERL, TCL, PYTHON and dynamic IME:
# - Run src/bigvim.bat ("nmake -f Make_mvc.mak GUI=yes OLE=yes IME=yes ...) # - Run src/bigvim.bat ("nmake -f Make_mvc.mak GUI=yes OLE=yes IME=yes ...)
# - Rename "gvim.exe" to "gvim_ole.exe". # - Rename "gvim.exe" to "gvim_ole.exe".
# - Rename ObjGOLYTR/gvim.pdb to "gvim_ole.pdb". # - Rename gvim.pdb to "gvim_ole.pdb".
# - Delete install.exe and uninstall.exe. # - Delete install.exe and uninstal.exe.
# - If building the Win32s version delete vimrun.exe. # - If building the Win32s version delete vimrun.exe.
# Win32s GUI version: # Win32s GUI version:
# - Set environment for Visual C++ 4.1 (requires a new console window) # - Set environment for Visual C++ 4.1 (requires a new console window)

View File

@ -1,4 +1,4 @@
README_os_390.txt for version 7.0 of Vim: Vi IMproved. README_os_390.txt for version 7.1a of Vim: Vi IMproved.
Welcome to the OS/390 Unix port of VIM. Welcome to the OS/390 Unix port of VIM.

View File

@ -1,7 +1,7 @@
" vimball : construct a file containing both paths and files " vimball.vim : construct a file containing both paths and files
" Author: Charles E. Campbell, Jr. " Author: Charles E. Campbell, Jr.
" Date: May 01, 2006 " Date: Jan 03, 2007
" Version: 13 " Version: 21
" GetLatestVimScripts: 1502 1 :AutoInstall: vimball.vim " GetLatestVimScripts: 1502 1 :AutoInstall: vimball.vim
" Copyright: (c) 2004-2006 by Charles E. Campbell, Jr. " Copyright: (c) 2004-2006 by Charles E. Campbell, Jr.
" The VIM LICENSE applies to Vimball.vim, and Vimball.txt " The VIM LICENSE applies to Vimball.vim, and Vimball.txt
@ -11,18 +11,26 @@
" --------------------------------------------------------------------- " ---------------------------------------------------------------------
" Load Once: {{{1 " Load Once: {{{1
if &cp || exists("g:loaded_vimball") if &cp || exists("g:loaded_vimball") || v:version < 700
finish finish
endif endif
let s:keepcpo = &cpo let s:keepcpo = &cpo
let g:loaded_vimball = "v13" let g:loaded_vimball = "v21"
set cpo&vim set cpo&vim
" =====================================================================
" Constants: {{{1
if !exists("s:USAGE")
let s:USAGE = 0
let s:WARNING = 1
let s:ERROR = 2
endif
" ===================================================================== " =====================================================================
" Functions: {{{1 " Functions: {{{1
" --------------------------------------------------------------------- " ---------------------------------------------------------------------
" MkVimball: creates a vimball given a list of paths to files {{{2 " vimball#MkVimball: creates a vimball given a list of paths to files {{{2
" Vimball Format: " Vimball Format:
" path " path
" filesize " filesize
@ -30,11 +38,24 @@ set cpo&vim
" path " path
" filesize " filesize
" [file] " [file]
fun! vimball#MkVimball(line1,line2,writelevel,vimballname) range fun! vimball#MkVimball(line1,line2,writelevel,...) range
" call Dfunc("MkVimball(line1=".a:line1." line2=".a:line2." writelevel=".a:writelevel." vimballname<".a:vimballname.">") " call Dfunc("MkVimball(line1=".a:line1." line2=".a:line2." writelevel=".a:writelevel." vimballname<".a:1.">) a:0=".a:0)
let vbname= substitute(a:vimballname,'\.[^.]*$','','e').'.vba' if a:1 =~ '.vim' || a:1 =~ '.txt'
let vbname= substitute(a:1,'\.\a\{3}$','.vba','')
else
let vbname= a:1
endif
if vbname !~ '\.vba$'
let vbname= vbname.'.vba'
endif
" call Decho("vbname<".vbname.">")
if a:1 =~ '[\/]'
call vimball#ShowMesg(s:ERROR,"(MkVimball) vimball name<".a:1."> should not include slashes")
" call Dret("MkVimball : vimball name<".a:1."> should not include slashes")
return
endif
if !a:writelevel && filereadable(vbname) if !a:writelevel && filereadable(vbname)
echohl Error | echoerr "(MkVimball) file<".vbname."> exists; use ! to insist" | echohl None call vimball#ShowMesg(s:ERROR,"(MkVimball) file<".vbname."> exists; use ! to insist")
" call Dret("MkVimball : file<".vbname."> already exists; use ! to insist") " call Dret("MkVimball : file<".vbname."> already exists; use ! to insist")
return return
endif endif
@ -42,17 +63,13 @@ fun! vimball#MkVimball(line1,line2,writelevel,vimballname) range
" user option bypass " user option bypass
call s:SaveSettings() call s:SaveSettings()
" go to vim plugin home if a:0 >= 2
for home in split(&rtp,',') + [''] " allow user to specify where to get the files
if isdirectory(home) | break | endif let home= expand(a:2)
endfor else
if home == "" " use first existing directory from rtp
let home= substitute(&rtp,',.*$','','') let home= s:VimballHome()
endif endif
if (has("win32") || has("win95") || has("win64") || has("win16"))
let home= substitute(home,'/','\\','ge')
endif
" call Decho("home<".home.">")
" save current directory " save current directory
let curdir = getcwd() let curdir = getcwd()
@ -68,7 +85,7 @@ fun! vimball#MkVimball(line1,line2,writelevel,vimballname) range
" call Decho("svfile<".svfile.">") " call Decho("svfile<".svfile.">")
if !filereadable(svfile) if !filereadable(svfile)
echohl Error | echo "unable to read file<".svfile.">" | echohl None call vimball#ShowMesg(s:ERROR,"unable to read file<".svfile.">")
call s:ChgDir(curdir) call s:ChgDir(curdir)
call s:RestoreSettings() call s:RestoreSettings()
" call Dret("MkVimball") " call Dret("MkVimball")
@ -89,9 +106,9 @@ fun! vimball#MkVimball(line1,line2,writelevel,vimballname) range
call setline(1,'" Vimball Archiver by Charles E. Campbell, Jr., Ph.D.') call setline(1,'" Vimball Archiver by Charles E. Campbell, Jr., Ph.D.')
call setline(2,'UseVimball') call setline(2,'UseVimball')
call setline(3,'finish') call setline(3,'finish')
let lastline= 4 let lastline= line("$") + 1
endif endif
call setline(lastline ,svfile) call setline(lastline ,substitute(svfile,'$',' [[[1',''))
call setline(lastline+1,0) call setline(lastline+1,0)
" write the file from the tab " write the file from the tab
@ -134,13 +151,13 @@ fun! vimball#MkVimball(line1,line2,writelevel,vimballname) range
endfun endfun
" --------------------------------------------------------------------- " ---------------------------------------------------------------------
" Vimball: {{{2 " vimball#Vimball: extract and distribute contents from a vimball {{{2
fun! vimball#Vimball(really) fun! vimball#Vimball(really,...)
" call Dfunc("Vimball(really=".a:really.")") " call Dfunc("vimball#Vimball(really=".a:really.") a:0=".a:0)
if getline(1) !~ '^" Vimball Archiver by Charles E. Campbell, Jr., Ph.D.$' if getline(1) !~ '^" Vimball Archiver by Charles E. Campbell, Jr., Ph.D.$'
echoerr "(Vimball) The current file does not appear to be a Vimball!" echoerr "(Vimball) The current file does not appear to be a Vimball!"
" call Dret("Vimball") " call Dret("vimball#Vimball")
return return
endif endif
@ -149,26 +166,27 @@ fun! vimball#Vimball(really)
let curtabnr = tabpagenr() let curtabnr = tabpagenr()
" set up vimball tab " set up vimball tab
" call Decho("setting up vimball tab")
tabnew tabnew
silent! file Vimball silent! file Vimball
let vbtabnr= tabpagenr() let vbtabnr= tabpagenr()
let didhelp= "" let didhelp= ""
" go to vim plugin home " go to vim plugin home
for home in split(&rtp,',') + [''] if a:0 > 0
if isdirectory(home) | break | endif let home= expand(a:1)
endfor else
if home == "" let home= s:VimballHome()
let home= substitute(&rtp,',.*$','','')
endif
if (has("win32") || has("win95") || has("win64") || has("win16"))
let home= substitute(home,'/','\\','ge')
endif endif
" call Decho("home<".home.">") " call Decho("home<".home.">")
" save current directory " save current directory and remove older same-named vimball, if any
let curdir = getcwd() let curdir = getcwd()
" call Decho("home<".home.">")
" call Decho("curdir<".curdir.">")
call s:ChgDir(home) call s:ChgDir(home)
call vimball#RmVimball()
let linenr = 4 let linenr = 4
let filecnt = 0 let filecnt = 0
@ -186,9 +204,12 @@ fun! vimball#Vimball(really)
exe "tabn ".curtabnr exe "tabn ".curtabnr
" call Decho("linenr=".linenr." line$=".line("$")) " call Decho("linenr=".linenr." line$=".line("$"))
while 1 < linenr && linenr < line("$") while 1 < linenr && linenr < line("$")
let fname = getline(linenr) let fname = substitute(getline(linenr),'\t\[\[\[1$','','')
let fname = substitute(fname,'\\','/','g')
let fsize = getline(linenr+1) let fsize = getline(linenr+1)
let filecnt = filecnt + 1 let filecnt = filecnt + 1
" call Decho("fname<".fname."> fsize=".fsize." filecnt=".filecnt)
if a:really if a:really
echomsg "extracted <".fname.">: ".fsize." lines" echomsg "extracted <".fname.">: ".fsize." lines"
else else
@ -197,16 +218,30 @@ fun! vimball#Vimball(really)
" call Decho("using L#".linenr.": will extract file<".fname.">") " call Decho("using L#".linenr.": will extract file<".fname.">")
" call Decho("using L#".(linenr+1).": fsize=".fsize) " call Decho("using L#".(linenr+1).": fsize=".fsize)
" Allow AsNeeded/ directory to take place of plugin/ directory
" when AsNeeded/filename is filereadable
if fname =~ '\<plugin/'
let anfname= substitute(fname,'\<plugin/','AsNeeded/','')
if filereadable(anfname)
" call Decho("using anfname<".anfname."> instead of <".fname.">")
let fname= anfname
endif
endif
" make directories if they don't exist yet " make directories if they don't exist yet
" call Decho("making directories if they don't exist yet")
if a:really if a:really
let fnamebuf= fname " call Decho("making directories if they don't exist yet (fname<".fname.">)")
let fnamebuf= substitute(fname,'\\','/','g')
let dirpath = substitute(home,'\\','/','g')
while fnamebuf =~ '/' while fnamebuf =~ '/'
let dirname = home."/".substitute(fnamebuf,'/.*$','','e') let dirname = dirpath."/".substitute(fnamebuf,'/.*$','','')
let fnamebuf = substitute(fnamebuf,'^.\{-}/\(.*\)$','\1','e') let dirpath = dirname
let fnamebuf = substitute(fnamebuf,'^.\{-}/\(.*\)$','\1','')
" call Decho("dirname<".dirname.">")
if !isdirectory(dirname) if !isdirectory(dirname)
" call Decho("making <".dirname.">") " call Decho("making <".dirname.">")
call mkdir(dirname) call mkdir(dirname)
call s:RecordInVar(home,"rmdir('".dirname."')")
endif endif
endwhile endwhile
endif endif
@ -233,6 +268,7 @@ fun! vimball#Vimball(really)
" call Decho("exe w! ".fnamepath) " call Decho("exe w! ".fnamepath)
exe "silent w! ".fnamepath exe "silent w! ".fnamepath
echo "wrote ".fnamepath echo "wrote ".fnamepath
call s:RecordInVar(home,"call delete('".fnamepath."')")
endif endif
" return to tab with vimball " return to tab with vimball
@ -242,7 +278,7 @@ fun! vimball#Vimball(really)
" set up help if its a doc/*.txt file " set up help if its a doc/*.txt file
" call Decho("didhelp<".didhelp."> fname<".fname.">") " call Decho("didhelp<".didhelp."> fname<".fname.">")
if a:really && didhelp == "" && fname =~ 'doc/[^/]\+\.txt$' if a:really && didhelp == "" && fname =~ 'doc/[^/]\+\.txt$'
let didhelp= substitute(fname,'^\(.*\<doc\)[/\\][^.]*\.txt$','\1','e') let didhelp= substitute(fname,'^\(.*\<doc\)[/\\][^.]*\.txt$','\1','')
" call Decho("didhelp<".didhelp.">") " call Decho("didhelp<".didhelp.">")
endif endif
@ -255,7 +291,7 @@ fun! vimball#Vimball(really)
" set up help " set up help
" call Decho("about to set up help: didhelp<".didhelp.">") " call Decho("about to set up help: didhelp<".didhelp.">")
if didhelp != "" if didhelp != ""
let htpath= escape(substitute(s:Path(home."/".didhelp,'"'),'"','','ge'),' ') let htpath= escape(substitute(s:Path(home."/".didhelp,'"'),'"','','g'),' ')
" call Decho("exe helptags ".htpath) " call Decho("exe helptags ".htpath)
exe "helptags ".htpath exe "helptags ".htpath
echo "did helptags" echo "did helptags"
@ -267,6 +303,9 @@ fun! vimball#Vimball(really)
let filecnt= filecnt + 1 let filecnt= filecnt + 1
endwhile endwhile
" record actions in <.VimballRecord>
call s:RecordInFile(home)
" restore events, delete tab and buffer " restore events, delete tab and buffer
exe "tabn ".vbtabnr exe "tabn ".vbtabnr
setlocal nomod bh=wipe setlocal nomod bh=wipe
@ -275,7 +314,76 @@ fun! vimball#Vimball(really)
call s:RestoreSettings() call s:RestoreSettings()
call s:ChgDir(curdir) call s:ChgDir(curdir)
" call Dret("Vimball") " call Dret("vimball#Vimball")
endfun
" ---------------------------------------------------------------------
" vimball#RmVimball: remove any files, remove any directories made by any {{{2
" previous vimball extraction based on a file of the current
" name.
" Usage: RmVimball (assume current file is a vimball; remove)
" RmVimball vimballname
fun! vimball#RmVimball(...)
" call Dfunc("vimball#RmVimball() a:0=".a:0)
if exists("g:vimball_norecord")
" call Dret("vimball#RmVimball : (g:vimball_norecord)")
return
endif
let eikeep= &ei
set ei=all
" call Decho("turned off all events")
if a:0 == 0
let curfile= '^'.expand("%:tr")
else
if a:1 =~ '[\/]'
call vimball#ShowMesg(s:USAGE,"RmVimball vimballname [path]")
" call Dret("vimball#RmVimball : suspect a:1<".a:1.">")
return
endif
let curfile= a:1
endif
if curfile !~ '.vba$'
let curfile= curfile.".vba: "
else
let curfile= curfile.": "
endif
if a:0 >= 2
let home= expand(a:2)
else
let home= s:VimballHome()
endif
let curdir = getcwd()
" call Decho("home <".home.">")
" call Decho("curfile<".curfile.">")
" call Decho("curdir <".curdir.">")
call s:ChgDir(home)
if filereadable(".VimballRecord")
" call Decho(".VimballRecord is readable")
" call Decho("curfile<".curfile.">")
keepalt keepjumps 1split
silent! keepalt keepjumps e .VimballRecord
let keepsrch= @/
if search(curfile,'cw')
let exestring= substitute(getline("."),curfile,'','')
" call Decho("exe ".exestring)
silent! keepalt keepjumps exe exestring
silent! keepalt keepjumps d
else
" call Decho("unable to find <".curfile."> in .VimballRecord")
endif
silent! keepalt keepjumps g/^\s*$/d
silent! keepalt keepjumps wq!
let @/= keepsrch
endif
call s:ChgDir(curdir)
" restoring events
" call Decho("restoring events")
let &ei= eikeep
" call Dret("vimball#RmVimball")
endfun endfun
" --------------------------------------------------------------------- " ---------------------------------------------------------------------
@ -288,24 +396,59 @@ fun! vimball#Decompress(fname)
exe "!gunzip ".a:fname exe "!gunzip ".a:fname
let fname= substitute(a:fname,'\.gz$','','') let fname= substitute(a:fname,'\.gz$','','')
exe "e ".escape(fname,' \') exe "e ".escape(fname,' \')
call vimball#ShowMesg("Source this file to extract it! (:so %)") call vimball#ShowMesg(s:USAGE,"Source this file to extract it! (:so %)")
elseif expand("%") =~ '.*\.bz2' && executable("bunzip2") elseif expand("%") =~ '.*\.bz2' && executable("bunzip2")
exe "!bunzip2 ".a:fname exe "!bunzip2 ".a:fname
let fname= substitute(a:fname,'\.bz2$','','') let fname= substitute(a:fname,'\.bz2$','','')
exe "e ".escape(fname,' \') exe "e ".escape(fname,' \')
call vimball#ShowMesg("Source this file to extract it! (:so %)") call vimball#ShowMesg(s:USAGE,"Source this file to extract it! (:so %)")
elseif expand("%") =~ '.*\.zip' && executable("unzip") elseif expand("%") =~ '.*\.zip' && executable("unzip")
exe "!unzip ".a:fname exe "!unzip ".a:fname
let fname= substitute(a:fname,'\.zip$','','') let fname= substitute(a:fname,'\.zip$','','')
exe "e ".escape(fname,' \') exe "e ".escape(fname,' \')
call vimball#ShowMesg("Source this file to extract it! (:so %)") call vimball#ShowMesg(s:USAGE,"Source this file to extract it! (:so %)")
endif endif
set noma bt=nofile fmr=[[[,]]] fdm=marker
" call Dret("Decompress") " call Dret("Decompress")
endfun endfun
" --------------------------------------------------------------------- " ---------------------------------------------------------------------
" ChgDir: change directory (in spite of Windoze) {{{2 " vimball#ShowMesg: {{{2
fun! vimball#ShowMesg(level,msg)
" call Dfunc("vimball#ShowMesg(level=".a:level." msg<".a:msg.">)")
let rulerkeep = &ruler
let showcmdkeep = &showcmd
set noruler noshowcmd
redraw!
if &fo =~ '[ta]'
echomsg "***vimball*** " a:msg
else
if a:level == s:WARNING || a:level == s:USAGE
echohl WarningMsg
elseif a:level == s:ERROR
echohl Error
endif
echomsg "***vimball*** " a:msg
echohl None
endif
if a:level != s:USAGE
call inputsave()|let ok= input("Press <cr> to continue")|call inputrestore()
endif
let &ruler = rulerkeep
let &showcmd = showcmdkeep
" call Dret("vimball#ShowMesg")
endfun
" ---------------------------------------------------------------------
let &cpo= s:keepcpo
unlet s:keepcpo
" =====================================================================
" s:ChgDir: change directory (in spite of Windoze) {{{2
fun! s:ChgDir(newdir) fun! s:ChgDir(newdir)
" call Dfunc("ChgDir(newdir<".a:newdir.">)") " call Dfunc("ChgDir(newdir<".a:newdir.">)")
if (has("win32") || has("win95") || has("win64") || has("win16")) if (has("win32") || has("win95") || has("win64") || has("win16"))
@ -317,11 +460,11 @@ fun! s:ChgDir(newdir)
endfun endfun
" --------------------------------------------------------------------- " ---------------------------------------------------------------------
" Path: {{{2 " s:Path: prepend and append quotes, do escaping, as necessary {{{2
fun! s:Path(cmd,quote) fun! s:Path(cmd,quote)
" call Dfunc("Path(cmd<".a:cmd."> quote<".a:quote.">)") " call Dfunc("Path(cmd<".a:cmd."> quote<".a:quote.">)")
if (has("win32") || has("win95") || has("win64") || has("win16")) if (has("win32") || has("win95") || has("win64") || has("win16"))
let cmdpath= a:quote.substitute(a:cmd,'/','\\','ge').a:quote let cmdpath= a:quote.substitute(a:cmd,'/','\\','g').a:quote
else else
let cmdpath= a:quote.a:cmd.a:quote let cmdpath= a:quote.a:cmd.a:quote
endif endif
@ -333,16 +476,98 @@ fun! s:Path(cmd,quote)
endfun endfun
" --------------------------------------------------------------------- " ---------------------------------------------------------------------
" vimball#ShowMesg: {{{2 " s:RecordInVar: record a un-vimball command in the .VimballRecord file {{{2
fun! vimball#ShowMesg(msg) fun! s:RecordInVar(home,cmd)
" call Dfunc("vimball#ShowMesg(msg<".a:msg.">)") " call Dfunc("RecordInVar(home<".a:home."> cmd<".a:cmd.">)")
let ich= 1 if a:cmd =~ '^rmdir'
echohl WarningMsg | echo a:msg | echohl None " if !exists("s:recorddir")
while ich < &ch " let s:recorddir= substitute(a:cmd,'^rmdir',"call s:Rmdir",'')
echo " " " else
let ich= ich + 1 " let s:recorddir= s:recorddir."|".substitute(a:cmd,'^rmdir',"call s:Rmdir",'')
endwhile " endif
" call Dret("vimball#ShowMesg") " call Decho("recorddir=".s:recorddir)
elseif !exists("s:recordfile")
let s:recordfile= a:cmd
" call Decho("recordfile=".s:recordfile)
else
let s:recordfile= s:recordfile."|".a:cmd
" call Decho("recordfile=".s:recordfile)
endif
" call Dret("RecordInVar")
endfun
" ---------------------------------------------------------------------
" s:RecordInFile: {{{2
fun! s:RecordInFile(home)
" call Dfunc("RecordInFile()")
if exists("g:vimball_norecord")
" call Dret("RecordInFile : (g:vimball_norecord)")
return
endif
if exists("s:recordfile") || exists("s:recorddir")
let curdir= getcwd()
call s:ChgDir(a:home)
keepalt keepjumps 1split
let cmd= expand("%:tr").": "
silent! keepalt keepjumps e .VimballRecord
$
if exists("s:recordfile") && exists("s:recorddir")
let cmd= cmd.s:recordfile."|".s:recorddir
elseif exists("s:recorddir")
let cmd= cmd.s:recorddir
elseif exists("s:recordfile")
let cmd= cmd.s:recordfile
else
" call Dret("RecordInFile")
return
endif
keepalt keepjumps put=cmd
silent! keepalt keepjumps g/^\s*$/d
silent! keepalt keepjumps wq!
call s:ChgDir(curdir)
if exists("s:recorddir") |unlet s:recorddir |endif
if exists("s:recordfile")|unlet s:recordfile|endif
else
" call Decho("s:record[file|dir] doesn't exist")
endif
" call Dret("RecordInFile")
endfun
" ---------------------------------------------------------------------
" s:Rmdir: {{{2
"fun! s:Rmdir(dirname)
"" call Dfunc("s:Rmdir(dirname<".a:dirname.">)")
" if (has("win32") || has("win95") || has("win64") || has("win16")) && &shell !~? 'sh$'
" call system("del ".a:dirname)
" else
" call system("rmdir ".a:dirname)
" endif
"" call Dret("s:Rmdir")
"endfun
" ---------------------------------------------------------------------
" s:VimballHome: determine/get home directory path (usually from rtp) {{{2
fun! s:VimballHome()
" call Dfunc("VimballHome()")
if exists("g:vimball_home")
let home= g:vimball_home
else
" go to vim plugin home
for home in split(&rtp,',') + ['']
if isdirectory(home) && filewritable(home) | break | endif
endfor
if home == ""
" just pick the first directory
let home= substitute(&rtp,',.*$','','')
endif
if (has("win32") || has("win95") || has("win64") || has("win16"))
let home= substitute(home,'/','\\','g')
endif
endif
" call Dret("VimballHome <".home.">")
return home
endfun endfun
" --------------------------------------------------------------------- " ---------------------------------------------------------------------
@ -360,10 +585,11 @@ fun! s:SaveSettings()
let s:ickeep = &ic let s:ickeep = &ic
let s:repkeep = &report let s:repkeep = &report
let s:vekeep = &ve let s:vekeep = &ve
let s:lzkeep = &lz
if exists("&acd") if exists("&acd")
set ei=all ve=all noacd nofen noic report=999 nohid set ei=all ve=all noacd nofen noic report=999 nohid bt= ma lz
else else
set ei=all ve=all nofen noic report=999 nohid set ei=all ve=all nofen noic report=999 nohid bt= ma lz
endif endif
" call Dret("SaveSettings") " call Dret("SaveSettings")
endfun endfun
@ -376,28 +602,27 @@ fun! s:RestoreSettings()
if exists("&acd") if exists("&acd")
let &acd = s:acdkeep let &acd = s:acdkeep
endif endif
let &ei = s:eikeep
let &fen = s:fenkeep let &fen = s:fenkeep
let &hidden = s:hidkeep let &hidden = s:hidkeep
let &ic = s:ickeep let &ic = s:ickeep
let &lz = s:lzkeep
let &report = s:repkeep let &report = s:repkeep
let &ve = s:vekeep let &ve = s:vekeep
let &ei = s:eikeep
if s:makeep[0] != 0 if s:makeep[0] != 0
" restore mark a " restore mark a
" call Decho("restore mark-a: makeep=".string(makeep)) " call Decho("restore mark-a: makeep=".string(makeep))
call setpos("'a",s:makeep) call setpos("'a",s:makeep)
endif endif
if exists("&acd") if exists("&acd")
unlet s:regakeep s:acdkeep s:eikeep s:fenkeep s:hidkeep s:ickeep s:repkeep s:vekeep s:makeep unlet s:regakeep s:acdkeep s:eikeep s:fenkeep s:hidkeep s:ickeep s:repkeep s:vekeep s:makeep s:lzkeep
else else
unlet s:regakeep s:eikeep s:fenkeep s:hidkeep s:ickeep s:repkeep s:vekeep s:makeep unlet s:regakeep s:eikeep s:fenkeep s:hidkeep s:ickeep s:repkeep s:vekeep s:makeep s:lzkeep
endif endif
set bt=nofile noma
" call Dret("RestoreSettings") " call Dret("RestoreSettings")
endfun endfun
" --------------------------------------------------------------------- " ---------------------------------------------------------------------
let &cpo= s:keepcpo
unlet s:keepcpo
" =====================================================================
" Modelines: {{{1 " Modelines: {{{1
" vim: fdm=marker " vim: fdm=marker

View File

@ -1,4 +1,4 @@
*index.txt* For Vim version 7.0. Last change: 2006 Apr 30 *index.txt* For Vim version 7.1a. Last change: 2007 May 05
VIM REFERENCE MANUAL by Bram Moolenaar VIM REFERENCE MANUAL by Bram Moolenaar
@ -624,9 +624,10 @@ tag char note action in Normal mode ~
included files that contains the word under included files that contains the word under
the cursor, start searching at beginning of the cursor, start searching at beginning of
current file current file
|[p| [p 2 like "P", but adjust indent to current line
|[m| [m 1 cursor N times back to start of member |[m| [m 1 cursor N times back to start of member
function function
|[p| [p 2 like "P", but adjust indent to current line
|[s| [s 1 move to the previous misspelled word
|[z| [z 1 move to start of open fold |[z| [z 1 move to start of open fold
|[{| [{ 1 cursor N times back to unmatched '{' |[{| [{ 1 cursor N times back to unmatched '{'
|[<MiddleMouse> [<MiddleMouse> 2 same as "[p" |[<MiddleMouse> [<MiddleMouse> 2 same as "[p"
@ -663,9 +664,10 @@ tag char note action in Normal mode ~
included files that contains the word under included files that contains the word under
the cursor, start searching at cursor the cursor, start searching at cursor
position position
|]p| ]p 2 like "p", but adjust indent to current line
|]m| ]m 1 cursor N times forward to end of member |]m| ]m 1 cursor N times forward to end of member
function function
|]p| ]p 2 like "p", but adjust indent to current line
|]s| ]s 1 move to next misspelled word
|]z| ]z 1 move to end of open fold |]z| ]z 1 move to end of open fold
|]}| ]} 1 cursor N times forward to unmatched '}' |]}| ]} 1 cursor N times forward to unmatched '}'
|]<MiddleMouse> ]<MiddleMouse> 2 same as "]p" |]<MiddleMouse> ]<MiddleMouse> 2 same as "]p"
@ -748,6 +750,8 @@ tag char note action in Normal mode ~
|gu| gu{motion} 2 make Nmove text lowercase |gu| gu{motion} 2 make Nmove text lowercase
|gv| gv reselect the previous Visual area |gv| gv reselect the previous Visual area
|gw| gw{motion} 2 format Nmove text and keep cursor |gw| gw{motion} 2 format Nmove text and keep cursor
|netrw-gx| gx execute application for file name under the
cursor (only with |netrw| plugin)
|g@| g@{motion} call 'operatorfunc' |g@| g@{motion} call 'operatorfunc'
|g~| g~{motion} 2 swap case for Nmove text |g~| g~{motion} 2 swap case for Nmove text
|g<Down>| g<Down> 1 same as "gj" |g<Down>| g<Down> 1 same as "gj"
@ -984,7 +988,7 @@ file names, tags, commands etc. as appropriate.
{expr} {expr}
CTRL-\ f - z reserved for extensions CTRL-\ f - z reserved for extensions
CTRL-\ others not used CTRL-\ others not used
CTRL-] not used |c_CTRL-]| CTRL-] trigger abbreviation
|c_CTRL-^| CTRL-^ toggle use of |:lmap| mappings |c_CTRL-^| CTRL-^ toggle use of |:lmap| mappings
|c_CTRL-_| CTRL-_ when 'allowrevins' set: change language |c_CTRL-_| CTRL-_ when 'allowrevins' set: change language
(Hebrew, Farsi) (Hebrew, Farsi)

View File

@ -1,4 +1,4 @@
*message.txt* For Vim version 7.0. Last change: 2006 Apr 30 *message.txt* For Vim version 7.1a. Last change: 2007 Mar 20
VIM REFERENCE MANUAL by Bram Moolenaar VIM REFERENCE MANUAL by Bram Moolenaar
@ -25,7 +25,8 @@ for other versions.
*g<* *g<*
The "g<" command can be used to see the last page of previous command output. The "g<" command can be used to see the last page of previous command output.
This is especially useful if you accidentally typed <Space> at the hit-enter This is especially useful if you accidentally typed <Space> at the hit-enter
prompt. prompt. You are then back at the hit-enter prompt and can then scroll further
back.
Note: when you stopped the output with "q" at the more prompt only up to that Note: when you stopped the output with "q" at the more prompt only up to that
point will be displayed. point will be displayed.
The previous command output is cleared when another command produces output. The previous command output is cleared when another command produces output.

View File

@ -1,4 +1,4 @@
*os_mint.txt* For Vim version 7.0. Last change: 2005 Mar 29 *os_mint.txt* For Vim version 7.1a. Last change: 2005 Mar 29
VIM REFERENCE MANUAL by Jens M. Felderhoff VIM REFERENCE MANUAL by Jens M. Felderhoff

View File

@ -1,4 +1,4 @@
*tabpage.txt* For Vim version 7.0. Last change: 2006 May 02 *tabpage.txt* For Vim version 7.1a. Last change: 2007 Mar 11
VIM REFERENCE MANUAL by Bram Moolenaar VIM REFERENCE MANUAL by Bram Moolenaar
@ -74,7 +74,8 @@ In the GUI tab pages line you can use the right mouse button to open menu.
:[count]tab {cmd} *:tab* :[count]tab {cmd} *:tab*
Execute {cmd} and when it opens a new window open a new tab Execute {cmd} and when it opens a new window open a new tab
page instead. Doesn't work for |:diffsplit| or |:diffpatch|. page instead. Doesn't work for |:diffsplit|, |:diffpatch|,
|:execute| and |:normal|.
When [count] is omitted the tab page appears after the current When [count] is omitted the tab page appears after the current
one. When [count] is specified the new tab page comes after one. When [count] is specified the new tab page comes after
tab page [count]. Use ":0tab cmd" to get the new tab page as tab page [count]. Use ":0tab cmd" to get the new tab page as
@ -129,23 +130,25 @@ label to switch to that tab page. Click where there is no label to go to the
next tab page. |'tabline'| next tab page. |'tabline'|
:tabn[ext] *:tabn* *:tabnext* *gt* :tabn[ext] *:tabn* *:tabnext* *gt*
gt *CTRL-<PageDown>* *<C-PageDown>* <C-PageDown> *CTRL-<PageDown>* *<C-PageDown>*
<C-PageDown> *i_CTRL-<PageDown>* *i_<C-PageDown>* gt *i_CTRL-<PageDown>* *i_<C-PageDown>*
Go to the next tab page. Wraps around from the last to the Go to the next tab page. Wraps around from the last to the
first one. first one.
:tabn[ext] {count} *CTRL-<PageUp>* *<C-PageUp>* :tabn[ext] {count}
{count}gt *i_CTRL-<PageUp>* *i_<C-PageUp>* {count}<C-PageDown>
<C-PageUp> Go to tab page {count}. The first tab page has number one. {count}gt Go to tab page {count}. The first tab page has number one.
:tabp[revious] *:tabp* *:tabprevious* *gT* :tabp[revious] *:tabp* *:tabprevious* *gT* *:tabN*
:tabN[ext] *:tabN* *:tabNext* :tabN[ext] *:tabNext* *CTRL-<PageUp>*
<C-PageUp> *<C-PageUp>* *i_CTRL-<PageUp>* *i_<C-PageUp>*
gT Go to the previous tab page. Wraps around from the first one gT Go to the previous tab page. Wraps around from the first one
to the last one. to the last one.
:tabp[revious] {count} :tabp[revious] {count}
:tabN[ext] {count} :tabN[ext] {count}
{count}<C-PageUp>
{count}gT Go {count} tab pages back. Wraps around from the first one {count}gT Go {count} tab pages back. Wraps around from the first one
to the last one. to the last one.
@ -203,7 +206,7 @@ The entries are:
pointer. pointer.
New Tab Open a tab page, editing an empty buffer. It appears New Tab Open a tab page, editing an empty buffer. It appears
to the left of the mouse pointer. to the left of the mouse pointer.
Open Tab... Like "New Tab" and additionaly use a file selector to Open Tab... Like "New Tab" and additionally use a file selector to
select a file to edit. select a file to edit.
Diff mode works per tab page. You can see the diffs between several files Diff mode works per tab page. You can see the diffs between several files
@ -247,6 +250,10 @@ always.
The highlighting of the tab pages line is set with the groups TabLine The highlighting of the tab pages line is set with the groups TabLine
TabLineSel and TabLineFill. |hl-TabLine| |hl-TabLineSel| |hl-TabLineFill| TabLineSel and TabLineFill. |hl-TabLine| |hl-TabLineSel| |hl-TabLineFill|
A "+" will be shown for a tab page that has a modified window. The number of
windows in a tabpage is also shown. Thus "3+" means three windows and one of
them has a modified buffer.
The 'tabline' option allows you to define your preferred way to tab pages The 'tabline' option allows you to define your preferred way to tab pages
labels. This isn't easy, thus an example will be given here. labels. This isn't easy, thus an example will be given here.
@ -254,8 +261,8 @@ For basics see the 'statusline' option. The same items can be used in the
'tabline' option. Additionally, the |tabpagebuflist()|, |tabpagenr()| and 'tabline' option. Additionally, the |tabpagebuflist()|, |tabpagenr()| and
|tabpagewinnr()| functions are useful. |tabpagewinnr()| functions are useful.
Since the number of tab labels will vary, you need to use an expresion for the Since the number of tab labels will vary, you need to use an expression for
whole option. Something like: > the whole option. Something like: >
:set tabline=%!MyTabLine() :set tabline=%!MyTabLine()
Then define the MyTabLine() function to list all the tab pages labels. A Then define the MyTabLine() function to list all the tab pages labels. A
@ -300,7 +307,7 @@ Now the MyTabLabel() function is called for each tab page to get its label. >
This is just a simplistic example that results in a tab pages line that This is just a simplistic example that results in a tab pages line that
resembles the default, but without adding a + for a modified buffer or resembles the default, but without adding a + for a modified buffer or
trunctating the names. You will want to reduce the width of labels in a truncating the names. You will want to reduce the width of labels in a
clever way when there is not enough room. Check the 'columns' option for the clever way when there is not enough room. Check the 'columns' option for the
space available. space available.
@ -330,7 +337,7 @@ label: >
:set guitablabel=%N\ %f :set guitablabel=%N\ %f
An example that resembles the default 'guitablabel': Show the number of An example that resembles the default 'guitablabel': Show the number of
windows in the tab page and a '+' if there is a modifed buffer: > windows in the tab page and a '+' if there is a modified buffer: >
function GuiTabLabel() function GuiTabLabel()
let label = '' let label = ''

View File

@ -1,4 +1,4 @@
*usr_45.txt* For Vim version 7.0. Last change: 2006 Apr 24 *usr_45.txt* For Vim version 7.1a. Last change: 2006 Apr 24
VIM USER MANUAL - by Bram Moolenaar VIM USER MANUAL - by Bram Moolenaar

View File

@ -1,4 +1,4 @@
*version4.txt* For Vim version 7.0. Last change: 2006 Apr 24 *version4.txt* For Vim version 7.1a. Last change: 2006 Apr 24
VIM REFERENCE MANUAL by Bram Moolenaar VIM REFERENCE MANUAL by Bram Moolenaar

View File

@ -1,4 +1,4 @@
*vi_diff.txt* For Vim version 7.0. Last change: 2006 Apr 24 *vi_diff.txt* For Vim version 7.1a. Last change: 2006 Nov 18
VIM REFERENCE MANUAL by Bram Moolenaar VIM REFERENCE MANUAL by Bram Moolenaar
@ -25,7 +25,7 @@ is missing something or because Posix is beside the mark).
============================================================================== ==============================================================================
1. Simulated command *simulated-command* 1. Simulated command *simulated-command*
This command is in Vi, but Vim only simuates it: This command is in Vi, but Vim only simulates it:
*:o* *:op* *:open* *:o* *:op* *:open*
:[range]o[pen] Works like |:visual|: end Ex mode. :[range]o[pen] Works like |:visual|: end Ex mode.
@ -953,7 +953,7 @@ Only Vim is able to accept options in between and after the file names.
============================================================================== ==============================================================================
7. POSIX compliance *posix* *posix-compliance* 7. POSIX compliance *posix* *posix-compliance*
In 2005 the POSIX test suite was run to check the compatiblity of Vim. Most In 2005 the POSIX test suite was run to check the compatibility of Vim. Most
of the test was executed properly. There are the few things where Vim of the test was executed properly. There are the few things where Vim
is not POSIX compliant, even when run in Vi compatibility mode. is not POSIX compliant, even when run in Vi compatibility mode.

View File

@ -0,0 +1,15 @@
" Vim indent file
" Language: Javascript
" Maintainer: None! Wanna improve this?
" Last Change: 2007 Jan 22
" Only load this indent file when no other was loaded.
if exists("b:did_indent")
finish
endif
let b:did_indent = 1
" C indenting is not too bad.
setlocal cindent
let b:undo_indent = "setl cin<"

View File

@ -1,6 +1,6 @@
" Script to define the syntax menu in synmenu.vim " Script to define the syntax menu in synmenu.vim
" Maintainer: Bram Moolenaar <Bram@vim.org> " Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2006 Apr 27 " Last Change: 2007 May 04
" This is used by "make menu" in the src directory. " This is used by "make menu" in the src directory.
edit <sfile>:p:h/synmenu.vim edit <sfile>:p:h/synmenu.vim
@ -87,6 +87,7 @@ SynMenu AB.ASN\.1:asn
SynMenu AB.Asterisk\ config:asterisk SynMenu AB.Asterisk\ config:asterisk
SynMenu AB.Asterisk\ voicemail\ config:asteriskvm SynMenu AB.Asterisk\ voicemail\ config:asteriskvm
SynMenu AB.Atlas:atlas SynMenu AB.Atlas:atlas
SynMenu AB.AutoIt:autoit
SynMenu AB.Automake:automake SynMenu AB.Automake:automake
SynMenu AB.Avenue:ave SynMenu AB.Avenue:ave
SynMenu AB.Awk:awk SynMenu AB.Awk:awk
@ -94,7 +95,11 @@ SynMenu AB.AYacc:ayacc
SynMenu AB.B:b SynMenu AB.B:b
SynMenu AB.Baan:baan SynMenu AB.Baan:baan
SynMenu AB.BASIC:basic SynMenu AB.Basic.FreeBasic:freebasic
SynMenu AB.Basic.IBasic:ibasic
SynMenu AB.Basic.QBasic:basic
SynMenu AB.Basic.Visual\ Basic:vb
SynMenu AB.Bazaar\ commit\ file:bzr
SynMenu AB.BC\ calculator:bc SynMenu AB.BC\ calculator:bc
SynMenu AB.BDF\ font:bdf SynMenu AB.BDF\ font:bdf
SynMenu AB.BibTeX.Bibliography\ database:bib SynMenu AB.BibTeX.Bibliography\ database:bib
@ -122,11 +127,11 @@ SynMenu C.Clean:clean
SynMenu C.Clever:cl SynMenu C.Clever:cl
SynMenu C.Clipper:clipper SynMenu C.Clipper:clipper
SynMenu C.Cmake:cmake SynMenu C.Cmake:cmake
SynMenu C.Cmusrc:cmusrc
SynMenu C.Cold\ Fusion:cf SynMenu C.Cold\ Fusion:cf
SynMenu C.Config.Cfg\ Config\ file:cfg SynMenu C.Config.Cfg\ Config\ file:cfg
SynMenu C.Config.Generic\ Config\ file:conf SynMenu C.Config.Generic\ Config\ file:conf
SynMenu C.Config.Configure\.in:config SynMenu C.Config.Configure\.in:config
SynMenu C.ConTeXt:context
SynMenu C.CRM114:crm SynMenu C.CRM114:crm
SynMenu C.Ctrl-H:ctrlh SynMenu C.Ctrl-H:ctrlh
SynMenu C.Cobol:cobol SynMenu C.Cobol:cobol
@ -209,6 +214,7 @@ SynMenu FG.Groff:groff
SynMenu FG.Groovy:groovy SynMenu FG.Groovy:groovy
SynMenu FG.GTKrc:gtkrc SynMenu FG.GTKrc:gtkrc
SynMenu HIJK.Hamster:hamster
SynMenu HIJK.Haskell.Haskell:haskell SynMenu HIJK.Haskell.Haskell:haskell
SynMenu HIJK.Haskell.Haskell-c2hs:chaskell SynMenu HIJK.Haskell.Haskell-c2hs:chaskell
SynMenu HIJK.Haskell.Haskell-literate:lhaskell SynMenu HIJK.Haskell.Haskell-literate:lhaskell
@ -230,6 +236,7 @@ SynMenu HIJK.IDL\Microsoft\ IDL:msidl
SynMenu HIJK.Indent\ profile:indent SynMenu HIJK.Indent\ profile:indent
SynMenu HIJK.Inform:inform SynMenu HIJK.Inform:inform
SynMenu HIJK.Informix\ 4GL:fgl SynMenu HIJK.Informix\ 4GL:fgl
SynMenu HIJK.Initng:initng
SynMenu HIJK.Inittab:inittab SynMenu HIJK.Inittab:inittab
SynMenu HIJK.Inno\ setup:iss SynMenu HIJK.Inno\ setup:iss
SynMenu HIJK.InstallShield\ script:ishd SynMenu HIJK.InstallShield\ script:ishd
@ -290,6 +297,7 @@ SynMenu L-Ma.Matlab:matlab
SynMenu L-Ma.Maxima:maxima SynMenu L-Ma.Maxima:maxima
SynMenu Me-NO.MEL\ (for\ Maya):mel SynMenu Me-NO.MEL\ (for\ Maya):mel
SynMenu Me-NO.Messages\ (/var/log):messages
SynMenu Me-NO.Metafont:mf SynMenu Me-NO.Metafont:mf
SynMenu Me-NO.MetaPost:mp SynMenu Me-NO.MetaPost:mp
SynMenu Me-NO.MGL:mgl SynMenu Me-NO.MGL:mgl
@ -357,6 +365,7 @@ SynMenu PQ.Povray.Povray\ scene\ descr:pov
SynMenu PQ.Povray.Povray\ configuration:povini SynMenu PQ.Povray.Povray\ configuration:povini
SynMenu PQ.Prescribe\ (Kyocera):prescribe SynMenu PQ.Prescribe\ (Kyocera):prescribe
SynMenu PQ.Printcap:pcap SynMenu PQ.Printcap:pcap
SynMenu PQ.Privoxy:privoxy
SynMenu PQ.Procmail:procmail SynMenu PQ.Procmail:procmail
SynMenu PQ.Product\ Spec\ File:psf SynMenu PQ.Product\ Spec\ File:psf
SynMenu PQ.Progress:progress SynMenu PQ.Progress:progress
@ -463,6 +472,7 @@ SynMenu Sh-S.Stata.SMCL:smcl
SynMenu Sh-S.Stata.Stata:stata SynMenu Sh-S.Stata.Stata:stata
SynMenu Sh-S.Stored\ Procedures:stp SynMenu Sh-S.Stored\ Procedures:stp
SynMenu Sh-S.Strace:strace SynMenu Sh-S.Strace:strace
SynMenu Sh-S.Streaming\ descriptor\ file:sd
SynMenu Sh-S.Subversion\ commit:svn SynMenu Sh-S.Subversion\ commit:svn
SynMenu Sh-S.Sudoers:sudoers SynMenu Sh-S.Sudoers:sudoers
SynMenu Sh-S.Sysctl\.conf:sysctl SynMenu Sh-S.Sysctl\.conf:sysctl
@ -477,7 +487,9 @@ SynMenu TUV.TealInfo:tli
SynMenu TUV.Telix\ Salt:tsalt SynMenu TUV.Telix\ Salt:tsalt
SynMenu TUV.Termcap/Printcap:ptcap SynMenu TUV.Termcap/Printcap:ptcap
SynMenu TUV.Terminfo:terminfo SynMenu TUV.Terminfo:terminfo
SynMenu TUV.TeX.TeX:tex SynMenu TUV.TeX.TeX/LaTeX:tex
SynMenu TUV.TeX.plain\ TeX:plaintex
SynMenu TUV.TeX.ConTeXt:context
SynMenu TUV.TeX.TeX\ configuration:texmf SynMenu TUV.TeX.TeX\ configuration:texmf
SynMenu TUV.TeX.Texinfo:texinfo SynMenu TUV.TeX.Texinfo:texinfo
SynMenu TUV.TF\ mud\ client:tf SynMenu TUV.TF\ mud\ client:tf

View File

@ -1,7 +1,7 @@
" netrwPlugin.vim: Handles file transfer and remote directory listing across a network " netrwPlugin.vim: Handles file transfer and remote directory listing across a network
" PLUGIN PORTION " PLUGIN SECTION
" Date: Oct 27, 2005 " Date: Jan 05, 2007
" Maintainer: Charles E Campbell, Jr <drchipNOSPAM at campbellfamily dot biz> " Maintainer: Charles E Campbell, Jr <NdrOchip@ScampbellPfamily.AbizM-NOSPAM>
" GetLatestVimScripts: 1075 1 :AutoInstall: netrw.vim " GetLatestVimScripts: 1075 1 :AutoInstall: netrw.vim
" Copyright: Copyright (C) 1999-2005 Charles E. Campbell, Jr. {{{1 " Copyright: Copyright (C) 1999-2005 Charles E. Campbell, Jr. {{{1
" Permission is hereby granted to use and distribute this code, " Permission is hereby granted to use and distribute this code,
@ -19,9 +19,11 @@
" --------------------------------------------------------------------- " ---------------------------------------------------------------------
" Load Once: {{{1 " Load Once: {{{1
if exists("g:loaded_netrw") if &cp || exists("g:loaded_netrwPlugin")
finish finish
endif endif
let g:loaded_netrwPlugin = 1
let s:keepcpo = &cpo
if v:version < 700 if v:version < 700
echohl WarningMsg | echo "***netrw*** you need vim version 7.0 for this version of netrw" | echohl None echohl WarningMsg | echo "***netrw*** you need vim version 7.0 for this version of netrw" | echohl None
finish finish
@ -36,6 +38,9 @@ set cpo&vim
augroup FileExplorer augroup FileExplorer
au! au!
au BufEnter * silent! call s:LocalBrowse(expand("<amatch>")) au BufEnter * silent! call s:LocalBrowse(expand("<amatch>"))
if has("win32") || has("win95") || has("win64") || has("win16")
au BufEnter .* silent! call s:LocalBrowse(expand("<amatch>"))
endif
augroup END augroup END
" Network Browsing Reading Writing: {{{2 " Network Browsing Reading Writing: {{{2
@ -51,6 +56,11 @@ augroup Network
au FileReadCmd ftp://*,rcp://*,scp://*,http://*,dav://*,rsync://*,sftp://* exe "silent doau FileReadPre ".expand("<amatch>")|exe 'Nread "' .expand("<amatch>").'"'|exe "silent doau FileReadPost ".expand("<amatch>") au FileReadCmd ftp://*,rcp://*,scp://*,http://*,dav://*,rsync://*,sftp://* exe "silent doau FileReadPre ".expand("<amatch>")|exe 'Nread "' .expand("<amatch>").'"'|exe "silent doau FileReadPost ".expand("<amatch>")
au BufWriteCmd ftp://*,rcp://*,scp://*,dav://*,rsync://*,sftp://* exe "silent doau BufWritePre ".expand("<amatch>")|exe 'Nwrite "' .expand("<amatch>").'"'|exe "silent doau BufWritePost ".expand("<amatch>") au BufWriteCmd ftp://*,rcp://*,scp://*,dav://*,rsync://*,sftp://* exe "silent doau BufWritePre ".expand("<amatch>")|exe 'Nwrite "' .expand("<amatch>").'"'|exe "silent doau BufWritePost ".expand("<amatch>")
au FileWriteCmd ftp://*,rcp://*,scp://*,dav://*,rsync://*,sftp://* exe "silent doau FileWritePre ".expand("<amatch>")|exe "'[,']".'Nwrite "' .expand("<amatch>").'"'|exe "silent doau FileWritePost ".expand("<amatch>") au FileWriteCmd ftp://*,rcp://*,scp://*,dav://*,rsync://*,sftp://* exe "silent doau FileWritePre ".expand("<amatch>")|exe "'[,']".'Nwrite "' .expand("<amatch>").'"'|exe "silent doau FileWritePost ".expand("<amatch>")
try
au SourceCmd ftp://*,rcp://*,scp://*,http://*,dav://*,rsync://*,sftp://* exe 'Nsource "'.expand("<amatch>").'"'
catch /^Vim\%((\a\+)\)\=:E216/
au SourcePre ftp://*,rcp://*,scp://*,http://*,dav://*,rsync://*,sftp://* exe 'Nsource "'.expand("<amatch>").'"'
endtry
augroup END augroup END
" Commands: :Nread, :Nwrite, :NetUserPass {{{2 " Commands: :Nread, :Nwrite, :NetUserPass {{{2
@ -58,23 +68,27 @@ com! -count=1 -nargs=* Nread call netrw#NetSavePosn()<bar>call netrw#NetRead(<c
com! -range=% -nargs=* Nwrite call netrw#NetSavePosn()<bar><line1>,<line2>call netrw#NetWrite(<f-args>)<bar>call netrw#NetRestorePosn() com! -range=% -nargs=* Nwrite call netrw#NetSavePosn()<bar><line1>,<line2>call netrw#NetWrite(<f-args>)<bar>call netrw#NetRestorePosn()
com! -nargs=* NetUserPass call NetUserPass(<f-args>) com! -nargs=* NetUserPass call NetUserPass(<f-args>)
com! -nargs=+ Ncopy call netrw#NetObtain(<f-args>) com! -nargs=+ Ncopy call netrw#NetObtain(<f-args>)
com! -nargs=* Nsource call netrw#NetSavePosn()<bar>call netrw#NetSource(<f-args>)<bar>call netrw#NetRestorePosn()
" Commands: :Explore, :Sexplore, Hexplore, Vexplore {{{2 " Commands: :Explore, :Sexplore, Hexplore, Vexplore {{{2
com! -nargs=? -bar -bang -count=0 Explore call netrw#Explore(<count>,0,0+<bang>0,<q-args>) com! -nargs=* -bar -bang -count=0 -complete=dir Explore call netrw#Explore(<count>,0,0+<bang>0,<q-args>)
com! -nargs=? -bar -bang -count=0 Sexplore call netrw#Explore(<count>,1,0+<bang>0,<q-args>) com! -nargs=* -bar -bang -count=0 -complete=dir Sexplore call netrw#Explore(<count>,1,0+<bang>0,<q-args>)
com! -nargs=? -bar -bang -count=0 Hexplore call netrw#Explore(<count>,1,2+<bang>0,<q-args>) com! -nargs=* -bar -bang -count=0 -complete=dir Hexplore call netrw#Explore(<count>,1,2+<bang>0,<q-args>)
com! -nargs=? -bar -bang -count=0 Vexplore call netrw#Explore(<count>,1,4+<bang>0,<q-args>) com! -nargs=* -bar -bang -count=0 -complete=dir Vexplore call netrw#Explore(<count>,1,4+<bang>0,<q-args>)
com! -nargs=? -bar -bang Nexplore call netrw#Explore(-1,0,0,<q-args>) com! -nargs=* -bar -count=0 -complete=dir Texplore call netrw#Explore(<count>,0,6 ,<q-args>)
com! -nargs=? -bar -bang Pexplore call netrw#Explore(-2,0,0,<q-args>) com! -nargs=* -bar -bang Nexplore call netrw#Explore(-1,0,0,<q-args>)
com! -nargs=* -bar -bang Pexplore call netrw#Explore(-2,0,0,<q-args>)
" Commands: NetrwSettings {{{2 " Commands: NetrwSettings {{{2
com! -nargs=0 NetrwSettings :call netrwSettings#NetrwSettings() com! -nargs=0 NetrwSettings :call netrwSettings#NetrwSettings()
" Maps: " Maps:
if !hasmapto('<Plug>NetrwBrowseX') if !exists("g:netrw_nogx") && maparg('g','n') == ""
nmap <unique> gx <Plug>NetrwBrowseX if !hasmapto('<Plug>NetrwBrowseX')
nmap <unique> gx <Plug>NetrwBrowseX
endif
nno <silent> <Plug>NetrwBrowseX :call netrw#NetBrowseX(expand("<cWORD>"),0)<cr>
endif endif
nno <silent> <Plug>NetrwBrowseX :call netrw#NetBrowseX(expand("<cWORD>"),0)<cr>
" --------------------------------------------------------------------- " ---------------------------------------------------------------------
" LocalBrowse: {{{2 " LocalBrowse: {{{2
@ -82,8 +96,17 @@ fun! s:LocalBrowse(dirname)
" unfortunate interaction -- debugging calls can't be used here; " unfortunate interaction -- debugging calls can't be used here;
" the BufEnter event causes triggering when attempts to write to " the BufEnter event causes triggering when attempts to write to
" the DBG buffer are made. " the DBG buffer are made.
if isdirectory(a:dirname) " echomsg "dirname<".a:dirname.">"
silent! call netrw#DirBrowse(a:dirname) if has("amiga")
" The check against '' is made for the Amiga, where the empty
" string is the current directory and not checking would break
" things such as the help command.
if a:dirname != '' && isdirectory(a:dirname)
silent! call netrw#LocalBrowseCheck(a:dirname)
endif
elseif isdirectory(a:dirname)
" echomsg "dirname<".dirname."> isdir"
silent! call netrw#LocalBrowseCheck(a:dirname)
endif endif
" not a directory, ignore it " not a directory, ignore it
endfun endfun

View File

@ -1,14 +1,18 @@
" Vim syntax file " Vim syntax file
" Language: fstab file " Language: fstab file
" Maintainer: David Ne\v{c}as (Yeti) <yeti@physics.muni.cz> " Maintaner: Radu Dineiu <radu.dineiu@gmail.com>
" Original Maintainer: Radu Dineiu <littledragon@altern.org> " URL: http://ld.yi.org/vim/fstab.vim
" License: This file can be redistribued and/or modified under the same terms " Last Change: 2007 Apr 24
" as Vim itself. " Version: 0.91
" URL: http://trific.ath.cx/Ftp/vim/syntax/fstab.vim "
" Last Change: 2006-04-16 " Credits:
" David Necas (Yeti) <yeti@physics.muni.cz>
" Options: let fstab_unknown_fs_errors = 1 to highlight unknown filesystems " Stefano Zacchiroli <zack@debian.org>
" as errors " Georgi Georgiev <chutz@gg3.net>
"
" Options:
" let fstab_unknown_fs_errors = 1
" highlight unknown filesystems as errors
if version < 600 if version < 600
syntax clear syntax clear
@ -19,24 +23,27 @@ endif
" General " General
syn cluster fsGeneralCluster contains=fsComment syn cluster fsGeneralCluster contains=fsComment
syn match fsComment /\s*#.*/ syn match fsComment /\s*#.*/
syn match fsOperator /[,=]/ syn match fsOperator /[,=:]/
" Device " Device
syn cluster fsDeviceCluster contains=fsOperator,fsDeviceKeyword,fsDeviceError syn cluster fsDeviceCluster contains=fsOperator,fsDeviceKeyword,fsDeviceError
syn match fsDeviceError /\%([^a-zA-Z0-9_\/#@:]\|^\w\{-}\ze\W\)/ contained syn match fsDeviceError /\%([^a-zA-Z0-9_\/#@:\.-]\|^\w\{-}\ze\W\)/ contained
syn keyword fsDeviceKeyword contained none proc linproc tmpfs devpts sysfs usbfs syn keyword fsDeviceKeyword contained none proc linproc tmpfs devpts sysfs usbfs
syn keyword fsDeviceKeyword contained LABEL nextgroup=fsDeviceLabel syn keyword fsDeviceKeyword contained LABEL nextgroup=fsDeviceLabel
syn keyword fsDeviceKeyword contained UUID nextgroup=fsDeviceUUID
syn match fsDeviceKeyword contained /^[a-zA-Z0-9.\-]\+\ze:/
syn match fsDeviceLabel contained /=[^ \t]\+/hs=s+1 contains=fsOperator syn match fsDeviceLabel contained /=[^ \t]\+/hs=s+1 contains=fsOperator
syn match fsDeviceUUID contained /=[^ \t]\+/hs=s+1 contains=fsOperator
" Mount Point " Mount Point
syn cluster fsMountPointCluster contains=fsMountPointKeyword,fsMountPointError syn cluster fsMountPointCluster contains=fsMountPointKeyword,fsMountPointError
syn match fsMountPointError /\%([^ \ta-zA-Z0-9_\/#@]\|\s\+\zs\w\{-}\ze\s\)/ contained syn match fsMountPointError /\%([^ \ta-zA-Z0-9_\/#@\.-]\|\s\+\zs\w\{-}\ze\s\)/ contained
syn keyword fsMountPointKeyword contained none swap syn keyword fsMountPointKeyword contained none swap
" Type " Type
syn cluster fsTypeCluster contains=fsTypeKeyword,fsTypeUnknown syn cluster fsTypeCluster contains=fsTypeKeyword,fsTypeUnknown
syn match fsTypeUnknown /\s\+\zs\w\+/ contained syn match fsTypeUnknown /\s\+\zs\w\+/ contained
syn keyword fsTypeKeyword contained adfs affs atfs audiofs auto autofs befs bfs cd9660 cfs cifs coda cramfs devfs devpts e2compr efs ext2 ext3 fdesc hfs hpfs iso9660 jffs jffs2 jfs kernfs linprocfs mfs minix msdos ncpfs nfs none none ntfs null nwfs ovlfs portal proc procfs qnx4 reiserfs romfs shm smbfs std subfs swap sysfs sysv tcfs tmpfs udf ufs umap umsdos union usbfs userfs vfat vs3fs vxfs wrapfs wvfs xfs zisofs syn keyword fsTypeKeyword contained adfs ados affs atfs audiofs auto autofs befs bfs cd9660 cfs cifs coda cramfs devfs devpts e2compr efs ext2 ext2fs ext3 fdesc ffs filecore hfs hpfs iso9660 jffs jffs2 jfs kernfs lfs linprocfs mfs minix msdos ncpfs nfs none ntfs null nwfs overlay ovlfs portal proc procfs ptyfs qnx4 reiserfs romfs shm smbfs std subfs swap sysfs sysv tcfs tmpfs udf ufs umap umsdos union usbfs userfs vfat vs3fs vxfs wrapfs wvfs xfs zisofs
" Options " Options
" ------- " -------
@ -48,7 +55,7 @@ syn match fsOptionsString /[a-zA-Z0-9_-]\+/
syn keyword fsOptionsYesNo yes no syn keyword fsOptionsYesNo yes no
syn cluster fsOptionsCheckCluster contains=fsOptionsExt2Check,fsOptionsFatCheck syn cluster fsOptionsCheckCluster contains=fsOptionsExt2Check,fsOptionsFatCheck
syn keyword fsOptionsSize 512 1024 2048 syn keyword fsOptionsSize 512 1024 2048
syn keyword fsOptionsGeneral async atime auto bind current defaults dev devgid devmode devuid dirsync exec force fstab kudzu loop mand move noatime noauto noclusterr noclusterw nodev nodiratime noexec nomand nosuid nosymfollow nouser owner rbind rdonly remount ro rq rw suid suiddir supermount sw sync union update user[s] xx syn keyword fsOptionsGeneral async atime auto bind current defaults dev devgid devmode devmtime devuid dirsync exec force fstab kudzu loop mand move noatime noauto noclusterr noclusterw nodev nodevmtime nodiratime noexec nomand nosuid nosymfollow nouser owner rbind rdonly remount ro rq rw suid suiddir supermount sw sync union update user users xx
syn match fsOptionsGeneral /_netdev/ syn match fsOptionsGeneral /_netdev/
" Options: adfs " Options: adfs
@ -101,6 +108,9 @@ syn match fsOptionsKeywords contained /\<\%(creator|type\)=/ nextgroup=fsOptions
syn match fsOptionsKeywords contained /\<\%(dir\|file\|\)_umask=/ nextgroup=fsOptionsNumberOctal syn match fsOptionsKeywords contained /\<\%(dir\|file\|\)_umask=/ nextgroup=fsOptionsNumberOctal
syn match fsOptionsKeywords contained /\<\%(session\|part\)=/ nextgroup=fsOptionsNumber syn match fsOptionsKeywords contained /\<\%(session\|part\)=/ nextgroup=fsOptionsNumber
" Options: ffs
syn keyword fsOptionsKeyWords contained softdep
" Options: hpfs " Options: hpfs
syn match fsOptionsKeywords contained /\<case=/ nextgroup=fsOptionsHpfsCase syn match fsOptionsKeywords contained /\<case=/ nextgroup=fsOptionsHpfsCase
syn keyword fsOptionsHpfsCase contained lower asis syn keyword fsOptionsHpfsCase contained lower asis
@ -197,9 +207,10 @@ if version >= 508 || !exists("did_config_syntax_inits")
HiLink fsTypeKeyword Type HiLink fsTypeKeyword Type
HiLink fsDeviceKeyword Identifier HiLink fsDeviceKeyword Identifier
HiLink fsDeviceLabel String HiLink fsDeviceLabel String
HiLink fsDeviceUUID String
HiLink fsFreqPassNumber Number HiLink fsFreqPassNumber Number
if exists('fstab_unknown_fs_errors') if exists('fstab_unknown_fs_errors') && fstab_unknown_fs_errors == 1
HiLink fsTypeUnknown Error HiLink fsTypeUnknown Error
endif endif
HiLink fsDeviceError Error HiLink fsDeviceError Error

View File

@ -1,7 +1,7 @@
" Vim syntax file " Vim syntax file
" Language: Perl " Language: Perl
" Maintainer: Nick Hibma <n_hibma@van-laarhoven.org> " Maintainer: Nick Hibma <nick@van-laarhoven.org>
" Last Change: 2005 October 18 " Last Change: 2006 November 23
" Location: http://www.van-laarhoven.org/vim/syntax/perl.vim " Location: http://www.van-laarhoven.org/vim/syntax/perl.vim
" "
" Please download most recent version first before mailing " Please download most recent version first before mailing
@ -17,14 +17,16 @@
" perl syntax highlighting, with defaults given: " perl syntax highlighting, with defaults given:
" "
" unlet perl_include_pod " unlet perl_include_pod
" unlet perl_no_scope_in_variables " unlet perl_want_scope_in_variables
" unlet perl_no_extended_vars " unlet perl_extended_vars
" unlet perl_string_as_statement " unlet perl_string_as_statement
" unlet perl_no_sync_on_sub " unlet perl_no_sync_on_sub
" unlet perl_no_sync_on_global_var " unlet perl_no_sync_on_global_var
" let perl_sync_dist = 100 " let perl_sync_dist = 100
" unlet perl_fold " unlet perl_fold
" unlet perl_fold_blocks " unlet perl_fold_blocks
" let perl_nofold_packages = 1
" let perl_nofold_subs = 1
" Remove any old syntax stuff that was loaded (5.x) or quit when a syntax file " Remove any old syntax stuff that was loaded (5.x) or quit when a syntax file
" was already loaded (6.x). " was already loaded (6.x).
@ -56,9 +58,9 @@ if exists("perl_include_pod")
else else
" Use only the bare minimum of rules " Use only the bare minimum of rules
if exists("perl_fold") if exists("perl_fold")
syn region perlPOD start="^=[a-z]" end="^=cut" contains=@Spell fold syn region perlPOD start="^=[a-z]" end="^=cut" fold
else else
syn region perlPOD start="^=[a-z]" end="^=cut" contains=@Spell syn region perlPOD start="^=[a-z]" end="^=cut"
endif endif
endif endif
@ -87,8 +89,8 @@ else
endif endif
syn keyword perlOperator defined undef and or not bless ref syn keyword perlOperator defined undef and or not bless ref
if exists("perl_fold") if exists("perl_fold")
" if BEGIN/END is a keyword the perlBEGINENDFold does not work " if BEGIN/END would be a keyword the perlBEGINENDFold does not work
syn match perlControl "\<BEGIN\|END\|CHECK\|INIT\>" contained syn match perlControl "\<BEGIN\|CHECK\|INIT\|END\>" contained
else else
syn keyword perlControl BEGIN END CHECK INIT syn keyword perlControl BEGIN END CHECK INIT
endif endif
@ -108,8 +110,8 @@ syn keyword perlStatementFiles chdir chmod chown chroot glob link mkdir readlin
syn match perlStatementFiles "-[rwxoRWXOezsfdlpSbctugkTBMAC]\>" syn match perlStatementFiles "-[rwxoRWXOezsfdlpSbctugkTBMAC]\>"
syn keyword perlStatementFlow caller die dump eval exit wantarray syn keyword perlStatementFlow caller die dump eval exit wantarray
syn keyword perlStatementInclude require syn keyword perlStatementInclude require
syn match perlStatementInclude "\<\(use\|no\)\s\+\(\(attributes\|autouse\|base\|big\(int\|num\|rat\)\|blib\|bytes\|charnames\|constant\|diagnostics\|encoding\|fields\|filetest\|if\|integer\|less\|lib\|locale\|open\|ops\|overload\|re\|sigtrap\|sort\|strict\|subs\|threads\(::shared\)\=\|utf8\|vars\|vmsish\|warnings\(::register\)\=\)\>\)\=" syn match perlStatementInclude "\<\(use\|no\)\s\+\(\(integer\|strict\|lib\|sigtrap\|subs\|vars\|warnings\|utf8\|byte\|base\|fields\)\>\)\="
syn keyword perlStatementScope import
syn keyword perlStatementProc alarm exec fork getpgrp getppid getpriority kill pipe setpgrp setpriority sleep system times wait waitpid syn keyword perlStatementProc alarm exec fork getpgrp getppid getpriority kill pipe setpgrp setpriority sleep system times wait waitpid
syn keyword perlStatementSocket accept bind connect getpeername getsockname getsockopt listen recv send setsockopt shutdown socket socketpair syn keyword perlStatementSocket accept bind connect getpeername getsockname getsockopt listen recv send setsockopt shutdown socket socketpair
syn keyword perlStatementIPC msgctl msgget msgrcv msgsnd semctl semget semop shmctl shmget shmread shmwrite syn keyword perlStatementIPC msgctl msgget msgrcv msgsnd semctl semget semop shmctl shmget shmread shmwrite
@ -118,11 +120,8 @@ syn keyword perlStatementPword getpwuid getpwnam getpwent setpwent endpwent get
syn keyword perlStatementTime gmtime localtime time times syn keyword perlStatementTime gmtime localtime time times
syn keyword perlStatementMisc warn formline reset scalar delete prototype lock syn keyword perlStatementMisc warn formline reset scalar delete prototype lock
if !exists("perl_no_semi_keywords") syn keyword perlStatementNew new
syn keyword perlStatementScope import
syn keyword perlStatementNew new
syn keyword perlStatementCarp carp confess croak
endif
syn keyword perlTodo TODO TBD FIXME XXX contained syn keyword perlTodo TODO TBD FIXME XXX contained
" Perl Identifiers. " Perl Identifiers.
@ -137,34 +136,39 @@ syn keyword perlTodo TODO TBD FIXME XXX contained
" Special variables first ($^A, ...) and ($|, $', ...) " Special variables first ($^A, ...) and ($|, $', ...)
syn match perlVarPlain "$^[ADEFHILMOPSTWX]\=" syn match perlVarPlain "$^[ADEFHILMOPSTWX]\="
syn match perlVarPlain "$[\\\"\[\]'&`+*.,;=%~?@$<>(-]" syn match perlVarPlain "$[\\\"\[\]'&`+*.,;=%~!?@#$<>(-]"
syn match perlVarPlain "$\(0\|[1-9]\d*\)" syn match perlVarPlain "$\(0\|[1-9][0-9]*\)"
" Same as above, but avoids confusion in $::foo (equivalent to $main::foo) " Same as above, but avoids confusion in $::foo (equivalent to $main::foo)
syn match perlVarPlain "$:[^:]" syn match perlVarPlain "$:[^:]"
" These variables are not recognized within matches. " These variables are not recognized within matches.
syn match perlVarNotInMatches "$[|)]" syn match perlVarNotInMatches "$[|)]"
" This variable is not recognized within matches delimited by '/'. " This variable is not recognized within matches delimited by m//.
syn match perlVarSlash "$/" syn match perlVarSlash "$/"
" This variable is not recognized within matches delimited by '!'.
syn match perlVarBang "$!"
" And plain identifiers " And plain identifiers
syn match perlPackageRef "\(\h\w*\)\=\(::\|'\)\I"me=e-1 contained syn match perlPackageRef "\(\h\w*\)\=\(::\|'\)\I"me=e-1 contained
" To highlight packages in variables as a scope reference - i.e. in $pack::var,
" pack:: is a scope, just set "perl_want_scope_in_variables"
" If you *want* complex things like @{${"foo"}} to be processed,
" just set the variable "perl_extended_vars"...
" FIXME value between {} should be marked as string. is treated as such by Perl. " FIXME value between {} should be marked as string. is treated as such by Perl.
" At the moment it is marked as something greyish instead of read. Probably todo " At the moment it is marked as something greyish instead of read. Probably todo
" with transparency. Or maybe we should handle the bare word in that case. or make it into " with transparency. Or maybe we should handle the bare word in that case. or make it into
if !exists("perl_no_scope_in_variables") if exists("perl_want_scope_in_variables")
syn match perlVarPlain "\\\=\([@%$]\|\$#\)\$*\(\I\i*\)\=\(\(::\|'\)\I\i*\)*\>" contains=perlPackageRef nextgroup=perlVarMember,perlVarSimpleMember,perlMethod syn match perlVarPlain "\\\=\([@$]\|\$#\)\$*\(\I\i*\)\=\(\(::\|'\)\I\i*\)*\>" contains=perlPackageRef nextgroup=perlVarMember,perlVarSimpleMember,perlMethod
syn match perlVarPlain2 "\\\=%\$*\(\I\i*\)\=\(\(::\|'\)\I\i*\)*\>" contains=perlPackageRef nextgroup=perlVarMember,perlVarSimpleMember,perlMethod
syn match perlFunctionName "\\\=&\$*\(\I\i*\)\=\(\(::\|'\)\I\i*\)*\>" contains=perlPackageRef nextgroup=perlVarMember,perlVarSimpleMember syn match perlFunctionName "\\\=&\$*\(\I\i*\)\=\(\(::\|'\)\I\i*\)*\>" contains=perlPackageRef nextgroup=perlVarMember,perlVarSimpleMember
else else
syn match perlVarPlain "\\\=\([@%$]\|\$#\)\$*\(\I\i*\)\=\(\(::\|'\)\I\i*\)*\>" nextgroup=perlVarMember,perlVarSimpleMember,perlMethod syn match perlVarPlain "\\\=\([@$]\|\$#\)\$*\(\I\i*\)\=\(\(::\|'\)\I\i*\)*\>" nextgroup=perlVarMember,perlVarSimpleMember,perlMethod
syn match perlVarPlain2 "\\\=%\$*\(\I\i*\)\=\(\(::\|'\)\I\i*\)*\>" nextgroup=perlVarMember,perlVarSimpleMember,perlMethod
syn match perlFunctionName "\\\=&\$*\(\I\i*\)\=\(\(::\|'\)\I\i*\)*\>" nextgroup=perlVarMember,perlVarSimpleMember syn match perlFunctionName "\\\=&\$*\(\I\i*\)\=\(\(::\|'\)\I\i*\)*\>" nextgroup=perlVarMember,perlVarSimpleMember
endif endif
if !exists("perl_no_extended_vars") if exists("perl_extended_vars")
syn cluster perlExpr contains=perlStatementScalar,perlStatementRegexp,perlStatementNumeric,perlStatementList,perlStatementHash,perlStatementFiles,perlStatementTime,perlStatementMisc,perlVarPlain,perlVarNotInMatches,perlVarSlash,perlVarBang,perlVarBlock,perlShellCommand,perlFloat,perlNumber,perlStringUnexpanded,perlString,perlQQ syn cluster perlExpr contains=perlStatementScalar,perlStatementRegexp,perlStatementNumeric,perlStatementList,perlStatementHash,perlStatementFiles,perlStatementTime,perlStatementMisc,perlVarPlain,perlVarPlain2,perlVarNotInMatches,perlVarSlash,perlVarBlock,perlShellCommand,perlFloat,perlNumber,perlStringUnexpanded,perlString,perlQQ
syn region perlVarBlock matchgroup=perlVarPlain start="\($#\|[@%$]\)\$*{" skip="\\}" end="}" contains=@perlExpr nextgroup=perlVarMember,perlVarSimpleMember syn region perlVarBlock matchgroup=perlVarPlain start="\($#\|[@%$]\)\$*{" skip="\\}" end="}" contains=@perlExpr nextgroup=perlVarMember,perlVarSimpleMember
syn region perlVarBlock matchgroup=perlVarPlain start="&\$*{" skip="\\}" end="}" contains=@perlExpr syn region perlVarBlock matchgroup=perlVarPlain start="&\$*{" skip="\\}" end="}" contains=@perlExpr
syn match perlVarPlain "\\\=\(\$#\|[@%&$]\)\$*{\I\i*}" nextgroup=perlVarMember,perlVarSimpleMember syn match perlVarPlain "\\\=\(\$#\|[@%&$]\)\$*{\I\i*}" nextgroup=perlVarMember,perlVarSimpleMember
@ -179,18 +183,17 @@ endif
syn match perlFiledescRead "[<]\h\w\+[>]" syn match perlFiledescRead "[<]\h\w\+[>]"
syn match perlFiledescStatementComma "(\=\s*\u\w*\s*,"me=e-1 transparent contained contains=perlFiledescStatement syn match perlFiledescStatementComma "(\=\s*\u\w*\s*,"me=e-1 transparent contained contains=perlFiledescStatement
syn match perlFiledescStatementNocomma "(\=\s*\u\w*\s*[^,[:space:]]"me=e-1 transparent contained contains=perlFiledescStatement syn match perlFiledescStatementNocomma "(\=\s*\u\w*\s*[^, \t]"me=e-1 transparent contained contains=perlFiledescStatement
syn match perlFiledescStatement "\u\w*" contained syn match perlFiledescStatement "\u\w*" contained
" Special characters in strings and matches " Special characters in strings and matches
syn match perlSpecialString "\\\(\d\+\|[xX]\x\+\|c\u\|.\)" contained syn match perlSpecialString "\\\(\d\+\|[xX]\x\+\|c\u\|.\)" contained
syn match perlSpecialStringU "\\['\\]" contained syn match perlSpecialStringU "\\['\\]" contained
syn match perlSpecialMatch "{\d\+\(,\d*\)\=}" contained syn match perlSpecialMatch "{\d\+\(,\(\d\+\)\=\)\=}" contained
syn match perlSpecialMatch "\[\(\]\|-\)\=[^\[\]]*\(\[\|\-\)\=\]" contained syn match perlSpecialMatch "\[\(\]\|-\)\=[^\[\]]*\(\[\|\-\)\=\]" contained
syn match perlSpecialMatch "[+*()?.]" contained syn match perlSpecialMatch "[+*()?.]" contained
syn match perlSpecialMatch "(?[#:=!]" contained syn match perlSpecialMatch "(?[#:=!]" contained
syn match perlSpecialMatch "(?<[=!]" contained
syn match perlSpecialMatch "(?[imsx]\+)" contained syn match perlSpecialMatch "(?[imsx]\+)" contained
" FIXME the line below does not work. It should mark end of line and " FIXME the line below does not work. It should mark end of line and
" begin of line as perlSpecial. " begin of line as perlSpecial.
@ -207,13 +210,13 @@ syn match perlNotEmptyLine "^\s\+$" contained
" Variable interpolation " Variable interpolation
" "
" These items are interpolated inside "" strings and similar constructs. " These items are interpolated inside "" strings and similar constructs.
syn cluster perlInterpDQ contains=perlSpecialString,perlVarPlain,perlVarNotInMatches,perlVarSlash,perlVarBang,perlVarBlock syn cluster perlInterpDQ contains=perlSpecialString,perlVarPlain,perlVarNotInMatches,perlVarSlash,perlVarBlock
" These items are interpolated inside '' strings and similar constructs. " These items are interpolated inside '' strings and similar constructs.
syn cluster perlInterpSQ contains=perlSpecialStringU syn cluster perlInterpSQ contains=perlSpecialStringU
" These items are interpolated inside m// matches and s/// substitutions. " These items are interpolated inside m// matches and s/// substitutions.
syn cluster perlInterpSlash contains=perlSpecialString,perlSpecialMatch,perlVarPlain,perlVarBlock,perlSpecialBEOM syn cluster perlInterpSlash contains=perlSpecialString,perlSpecialMatch,perlVarPlain,perlVarBlock,perlSpecialBEOM
" These items are interpolated inside m## matches and s### substitutions. " These items are interpolated inside m## matches and s### substitutions.
syn cluster perlInterpMatch contains=@perlInterpSlash,perlVarSlash,perlVarBang syn cluster perlInterpMatch contains=@perlInterpSlash,perlVarSlash
" Shell commands " Shell commands
syn region perlShellCommand matchgroup=perlMatchStartEnd start="`" end="`" contains=@perlInterpDQ syn region perlShellCommand matchgroup=perlMatchStartEnd start="`" end="`" contains=@perlInterpDQ
@ -239,7 +242,7 @@ syn region perlMatch matchgroup=perlMatchStartEnd start=+[m!]!+ end=+![cgimosx]*
" Below some hacks to recognise the // variant. This is virtually impossible to catch in all " Below some hacks to recognise the // variant. This is virtually impossible to catch in all
" cases as the / is used in so many other ways, but these should be the most obvious ones. " cases as the / is used in so many other ways, but these should be the most obvious ones.
syn region perlMatch matchgroup=perlMatchStartEnd start=+^split /+lc=5 start=+[^$@%&]\<split /+lc=6 start=+^while /+lc=5 start=+[^$@%&]while /+lc=6 start=+^if /+lc=2 start=+[^$@%&]if /+lc=3 start=+[!=]\~\s*/+lc=2 start=+[(~]/+lc=1 start=+\.\./+lc=2 start=+\s/[^=[:space:][:digit:]$@%&]+lc=1,me=e-1,rs=e-1 start=+^/+ skip=+\\/+ end=+/[cgimosx]*+ contains=@perlInterpSlash syn region perlMatch matchgroup=perlMatchStartEnd start=+^split /+lc=5 start=+[^$@%]\<split /+lc=6 start=+^while /+lc=5 start=+[^$@%]\<while /+lc=6 start=+^if /+lc=2 start=+[^$@%]\<if /+lc=3 start=+[!=]\~\s*/+lc=2 start=+[(~]/+lc=1 start=+\.\./+lc=2 start=+\s/[^= \t0-9$@%]+lc=1,me=e-1,rs=e-1 start=+^/+ skip=+\\/+ end=+/[cgimosx]*+ contains=@perlInterpSlash
" Substitutions " Substitutions
@ -258,7 +261,7 @@ syn region perlSubstitutionHash matchgroup=perlMatchStartEnd start=+#+ end=+#[
syn region perlSubstitutionBracket matchgroup=perlMatchStartEnd start=+\[+ end=+\][ecgimosx]*+ contained contains=@perlInterpDQ syn region perlSubstitutionBracket matchgroup=perlMatchStartEnd start=+\[+ end=+\][ecgimosx]*+ contained contains=@perlInterpDQ
syn region perlSubstitutionCurly matchgroup=perlMatchStartEnd start=+{+ end=+}[ecgimosx]*+ contained contains=@perlInterpDQ syn region perlSubstitutionCurly matchgroup=perlMatchStartEnd start=+{+ end=+}[ecgimosx]*+ contained contains=@perlInterpDQ
" A special case for s!!!x which allows for comments and extra whitespace in the pattern " A special case for m!!x which allows for comments and extra whitespace in the pattern
syn region perlMatch matchgroup=perlMatchStartEnd start=+\<s!+ end=+!+me=e-1 contains=@perlInterpSlash,perlComment nextgroup=perlSubstitutionPling syn region perlMatch matchgroup=perlMatchStartEnd start=+\<s!+ end=+!+me=e-1 contains=@perlInterpSlash,perlComment nextgroup=perlSubstitutionPling
syn region perlSubstitutionPling matchgroup=perlMatchStartEnd start=+!+ end=+![ecgimosx]*+ contained contains=@perlInterpDQ syn region perlSubstitutionPling matchgroup=perlMatchStartEnd start=+!+ end=+![ecgimosx]*+ contained contains=@perlInterpDQ
@ -285,24 +288,24 @@ syn match perlString "\<\I\i*\s*=>"me=e-2
" Strings and q, qq, qw and qr expressions " Strings and q, qq, qw and qr expressions
" Parentheses in qq() " Brackets in qq()
syn region perlParens start=+(+ end=+)+ contained transparent contains=perlParens,@perlStringSQ syn region perlBrackets start=+(+ end=+)+ contained transparent contains=perlBrackets,@perlStringSQ
syn region perlStringUnexpanded matchgroup=perlStringStartEnd start="'" end="'" contains=@Spell,@perlInterpSQ syn region perlStringUnexpanded matchgroup=perlStringStartEnd start="'" end="'" contains=@perlInterpSQ
syn region perlString matchgroup=perlStringStartEnd start=+"+ end=+"+ contains=@Spell,@perlInterpDQ syn region perlString matchgroup=perlStringStartEnd start=+"+ end=+"+ contains=@perlInterpDQ
syn region perlQQ matchgroup=perlStringStartEnd start=+\<q#+ end=+#+ contains=@perlInterpSQ syn region perlQQ matchgroup=perlStringStartEnd start=+\<q#+ end=+#+ contains=@perlInterpSQ
syn region perlQQ matchgroup=perlStringStartEnd start=+\<q|+ end=+|+ contains=@perlInterpSQ syn region perlQQ matchgroup=perlStringStartEnd start=+\<q|+ end=+|+ contains=@perlInterpSQ
syn region perlQQ matchgroup=perlStringStartEnd start=+\<q(+ end=+)+ contains=@perlInterpSQ,perlParens syn region perlQQ matchgroup=perlStringStartEnd start=+\<q(+ end=+)+ contains=@perlInterpSQ,perlBrackets
syn region perlQQ matchgroup=perlStringStartEnd start=+\<q{+ end=+}+ contains=@perlInterpSQ syn region perlQQ matchgroup=perlStringStartEnd start=+\<q{+ end=+}+ contains=@perlInterpSQ
syn region perlQQ matchgroup=perlStringStartEnd start=+\<q/+ end=+/+ contains=@perlInterpSQ syn region perlQQ matchgroup=perlStringStartEnd start=+\<q/+ end=+/+ contains=@perlInterpSQ
syn region perlQQ matchgroup=perlStringStartEnd start=+\<q[qx]#+ end=+#+ contains=@perlInterpDQ syn region perlQQ matchgroup=perlStringStartEnd start=+\<q[qx]#+ end=+#+ contains=@perlInterpDQ
syn region perlQQ matchgroup=perlStringStartEnd start=+\<q[qx]|+ end=+|+ contains=@perlInterpDQ syn region perlQQ matchgroup=perlStringStartEnd start=+\<q[qx]|+ end=+|+ contains=@perlInterpDQ
syn region perlQQ matchgroup=perlStringStartEnd start=+\<q[qx](+ end=+)+ contains=@perlInterpDQ,perlParens syn region perlQQ matchgroup=perlStringStartEnd start=+\<q[qx](+ end=+)+ contains=@perlInterpDQ,perlBrackets
syn region perlQQ matchgroup=perlStringStartEnd start=+\<q[qx]{+ end=+}+ contains=@perlInterpDQ syn region perlQQ matchgroup=perlStringStartEnd start=+\<q[qx]{+ end=+}+ contains=@perlInterpDQ
syn region perlQQ matchgroup=perlStringStartEnd start=+\<q[qx]/+ end=+/+ contains=@perlInterpDQ syn region perlQQ matchgroup=perlStringStartEnd start=+\<q[qx]/+ end=+/+ contains=@perlInterpDQ
syn region perlQQ matchgroup=perlStringStartEnd start=+\<qw#+ end=+#+ contains=@perlInterpSQ syn region perlQQ matchgroup=perlStringStartEnd start=+\<qw#+ end=+#+ contains=@perlInterpSQ
syn region perlQQ matchgroup=perlStringStartEnd start=+\<qw|+ end=+|+ contains=@perlInterpSQ syn region perlQQ matchgroup=perlStringStartEnd start=+\<qw|+ end=+|+ contains=@perlInterpSQ
syn region perlQQ matchgroup=perlStringStartEnd start=+\<qw(+ end=+)+ contains=@perlInterpSQ,perlParens syn region perlQQ matchgroup=perlStringStartEnd start=+\<qw(+ end=+)+ contains=@perlInterpSQ,perlBrackets
syn region perlQQ matchgroup=perlStringStartEnd start=+\<qw{+ end=+}+ contains=@perlInterpSQ syn region perlQQ matchgroup=perlStringStartEnd start=+\<qw{+ end=+}+ contains=@perlInterpSQ
syn region perlQQ matchgroup=perlStringStartEnd start=+\<qw/+ end=+/+ contains=@perlInterpSQ syn region perlQQ matchgroup=perlStringStartEnd start=+\<qw/+ end=+/+ contains=@perlInterpSQ
syn region perlQQ matchgroup=perlStringStartEnd start=+\<qr#+ end=+#[imosx]*+ contains=@perlInterpMatch syn region perlQQ matchgroup=perlStringStartEnd start=+\<qr#+ end=+#[imosx]*+ contains=@perlInterpMatch
@ -317,18 +320,18 @@ if version >= 600
" XXX Any statements after the identifier are in perlString colour (i.e. " XXX Any statements after the identifier are in perlString colour (i.e.
" 'if $a' in 'print <<EOF if $a'). " 'if $a' in 'print <<EOF if $a').
if exists("perl_fold") if exists("perl_fold")
syn region perlHereDoc matchgroup=perlStringStartEnd start=+<<\z(\I\i*\)+ end=+^\z1$+ contains=@perlInterpDQ fold syn region perlHereDoc matchgroup=perlStringStartEnd start=+<<\z(\I\i*\).*+ end=+^\z1$+ contains=@perlInterpDQ fold
syn region perlHereDoc matchgroup=perlStringStartEnd start=+<<\s*"\z(.\{-}\)"+ end=+^\z1$+ contains=@perlInterpDQ fold syn region perlHereDoc matchgroup=perlStringStartEnd start=+<<\s*"\z(.\{-}\)"+ end=+^\z1$+ contains=@perlInterpDQ fold
syn region perlHereDoc matchgroup=perlStringStartEnd start=+<<\s*'\z(.\{-}\)'+ end=+^\z1$+ contains=@perlInterpSQ fold syn region perlHereDoc matchgroup=perlStringStartEnd start=+<<\s*'\z(.\{-}\)'+ end=+^\z1$+ contains=@perlInterpSQ fold
syn region perlHereDoc matchgroup=perlStringStartEnd start=+<<\s*""+ end=+^$+ contains=@perlInterpDQ,perlNotEmptyLine fold syn region perlHereDoc matchgroup=perlStringStartEnd start=+<<\s*""+ end=+^$+ contains=@perlInterpDQ,perlNotEmptyLine fold
syn region perlHereDoc matchgroup=perlStringStartEnd start=+<<\s*''+ end=+^$+ contains=@perlInterpSQ,perlNotEmptyLine fold syn region perlHereDoc matchgroup=perlStringStartEnd start=+<<\s*''+ end=+^$+ contains=@perlInterpSQ,perlNotEmptyLine fold
syn region perlAutoload matchgroup=perlStringStartEnd start=+<<['"]\z(END_\(SUB\|OF_FUNC\|OF_AUTOLOAD\)\)['"]+ end=+^\z1$+ contains=ALL fold syn region perlAutoload matchgroup=perlStringStartEnd start=+<<['"]\z(END_\(SUB\|OF_FUNC\|OF_AUTOLOAD\)\)['"]+ end=+^\z1$+ contains=ALL fold
else else
syn region perlHereDoc matchgroup=perlStringStartEnd start=+<<\z(\I\i*\)+ end=+^\z1$+ contains=@perlInterpDQ syn region perlHereDoc matchgroup=perlStringStartEnd start=+<<\z(\I\i*\)+ end=+^\z1$+ contains=@perlInterpDQ
syn region perlHereDoc matchgroup=perlStringStartEnd start=+<<\s*"\z(.\{-}\)"+ end=+^\z1$+ contains=@perlInterpDQ syn region perlHereDoc matchgroup=perlStringStartEnd start=+<<\s*"\z(.\{-}\)"+ end=+^\z1$+ contains=@perlInterpDQ
syn region perlHereDoc matchgroup=perlStringStartEnd start=+<<\s*'\z(.\{-}\)'+ end=+^\z1$+ contains=@perlInterpSQ syn region perlHereDoc matchgroup=perlStringStartEnd start=+<<\s*'\z(.\{-}\)'+ end=+^\z1$+ contains=@perlInterpSQ
syn region perlHereDoc matchgroup=perlStringStartEnd start=+<<\s*""+ end=+^$+ contains=@perlInterpDQ,perlNotEmptyLine syn region perlHereDoc matchgroup=perlStringStartEnd start=+<<\s*""+ end=+^$+ contains=@perlInterpDQ,perlNotEmptyLine
syn region perlHereDoc matchgroup=perlStringStartEnd start=+<<\s*''+ end=+^$+ contains=@perlInterpSQ,perlNotEmptyLine syn region perlHereDoc matchgroup=perlStringStartEnd start=+<<\s*''+ end=+^$+ contains=@perlInterpSQ,perlNotEmptyLine
syn region perlAutoload matchgroup=perlStringStartEnd start=+<<\(['"]\|\)\z(END_\(SUB\|OF_FUNC\|OF_AUTOLOAD\)\)\1+ end=+^\z1$+ contains=ALL syn region perlAutoload matchgroup=perlStringStartEnd start=+<<\(['"]\|\)\z(END_\(SUB\|OF_FUNC\|OF_AUTOLOAD\)\)\1+ end=+^\z1$+ contains=ALL
endif endif
else else
@ -358,20 +361,19 @@ syn region perlFunction start="\s*\<sub\>" end="[;{]"he=e-1 contains=perlStatem
syn keyword perlStatementSub sub contained syn keyword perlStatementSub sub contained
syn match perlFunctionPrototype "([^)]*)" contained syn match perlFunctionPrototype "([^)]*)" contained
if !exists("perl_no_scope_in_variables") if exists("perl_want_scope_in_variables")
syn match perlFunctionPRef "\h\w*::" contained syn match perlFunctionPRef "\h\w*::" contained
syn match perlFunctionName "\h\w*[^:]" contained syn match perlFunctionName "\h\w*[^:]" contained
else else
syn match perlFunctionName "\h[[:alnum:]_:]*" contained syn match perlFunctionName "\h[[:alnum:]_:]*" contained
endif endif
" All other # are comments, except ^#! " All other # are comments, except ^#!
syn match perlComment "#.*" contains=@Spell,perlTodo syn match perlComment "#.*" contains=perlTodo
syn match perlSharpBang "^#!.*" syn match perlSharpBang "^#!.*"
" Formats " Formats
syn region perlFormat matchgroup=perlStatementIOFunc start="^\s*\<format\s\+\k\+\s*=\s*$"rs=s+6 end="^\s*\.\s*$" contains=perlFormatName,perlFormatField,perlVarPlain syn region perlFormat matchgroup=perlStatementIOFunc start="^\s*\<format\s\+\k\+\s*=\s*$"rs=s+6 end="^\s*\.\s*$" contains=perlFormatName,perlFormatField,perlVarPlain,perlVarPlain2
syn match perlFormatName "format\s\+\k\+\s*="lc=7,me=e-1 contained syn match perlFormatName "format\s\+\k\+\s*="lc=7,me=e-1 contained
syn match perlFormatField "[@^][|<>~]\+\(\.\.\.\)\=" contained syn match perlFormatField "[@^][|<>~]\+\(\.\.\.\)\=" contained
syn match perlFormatField "[@^]#[#.]*" contained syn match perlFormatField "[@^]#[#.]*" contained
@ -391,13 +393,17 @@ endif
" Folding " Folding
if exists("perl_fold") if exists("perl_fold")
syn region perlPackageFold start="^package \S\+;$" end="^1;$" end="\n\+package"me=s-1 transparent fold keepend if !exists("perl_nofold_packages")
syn region perlSubFold start="^\z(\s*\)\<sub\>.*[^};]$" end="^\z1}\s*$" end="^\z1}\s*\#.*$" transparent fold keepend syn region perlPackageFold start="^package \S\+;\s*\(#.*\)\=$" end="^1;\s*\(#.*\)\=$" end="\n\+package"me=s-1 transparent fold keepend
syn region perlBEGINENDFold start="^\z(\s*\)\<\(BEGIN\|END\|CHECK\|INIT\)\>.*[^};]$" end="^\z1}\s*$" transparent fold keepend endif
if !exists("perl_nofold_subs")
syn region perlSubFold start="^\z(\s*\)\<sub\>.*[^};]$" end="^\z1}\s*\(#.*\)\=$" transparent fold keepend
syn region perlSubFold start="^\z(\s*\)\<\(BEGIN\|END\|CHECK\|INIT\)\>.*[^};]$" end="^\z1}\s*$" transparent fold keepend
endif
if exists("perl_fold_blocks") if exists("perl_fold_blocks")
syn region perlIfFold start="^\z(\s*\)\(if\|unless\|for\|while\|until\)\s*(.*)\(\s*{\)\=\s*$" start="^\z(\s*\)foreach\s*\(\(my\|our\)\=\s*\S\+\s*\)\=(.*)\(\s*{\)\=\s*$" start="\z(\s*\)else\s*{\s*$" end="^\z1}\s*;\=$" transparent fold keepend syn region perlBlockFold start="^\z(\s*\)\(if\|elsif\|unless\|for\|while\|until\)\s*(.*)\(\s*{\)\=\s*\(#.*\)\=$" start="^\z(\s*\)foreach\s*\(\(my\|our\)\=\s*\S\+\s*\)\=(.*)\(\s*{\)\=\s*\(#.*\)\=$" end="^\z1}\s*;\=\(#.*\)\=$" transparent fold keepend
syn region perlIfFold start="^\z(\s*\)do\(\s*{\)\=\s*$" end="^\z1}\s*while" end="^\z1}\s*;\=$" transparent fold keepend syn region perlBlockFold start="^\z(\s*\)\(do\|else\)\(\s*{\)\=\s*\(#.*\)\=$" end="^\z1}\s*while" end="^\z1}\s*;\=\(#.*\)\=$" transparent fold keepend
endif endif
setlocal foldmethod=syntax setlocal foldmethod=syntax
@ -444,13 +450,13 @@ if version >= 508 || !exists("did_perl_syn_inits")
HiLink perlList perlStatement HiLink perlList perlStatement
HiLink perlMisc perlStatement HiLink perlMisc perlStatement
HiLink perlVarPlain perlIdentifier HiLink perlVarPlain perlIdentifier
HiLink perlVarPlain2 perlIdentifier
HiLink perlFiledescRead perlIdentifier HiLink perlFiledescRead perlIdentifier
HiLink perlFiledescStatement perlIdentifier HiLink perlFiledescStatement perlIdentifier
HiLink perlVarSimpleMember perlIdentifier HiLink perlVarSimpleMember perlIdentifier
HiLink perlVarSimpleMemberName perlString HiLink perlVarSimpleMemberName perlString
HiLink perlVarNotInMatches perlIdentifier HiLink perlVarNotInMatches perlIdentifier
HiLink perlVarSlash perlIdentifier HiLink perlVarSlash perlIdentifier
HiLink perlVarBang perlIdentifier
HiLink perlQQ perlString HiLink perlQQ perlString
if version >= 600 if version >= 600
HiLink perlHereDoc perlString HiLink perlHereDoc perlString
@ -460,7 +466,7 @@ if version >= 508 || !exists("did_perl_syn_inits")
HiLink perlUntilEOFSQ perlString HiLink perlUntilEOFSQ perlString
HiLink perlUntilEmptyDQ perlString HiLink perlUntilEmptyDQ perlString
HiLink perlUntilEmptySQ perlString HiLink perlUntilEmptySQ perlString
HiLink perlUntilEOF perlString HiLink perlUntilEOF perlString
endif endif
HiLink perlStringUnexpanded perlString HiLink perlStringUnexpanded perlString
HiLink perlSubstitutionSQ perlString HiLink perlSubstitutionSQ perlString
@ -496,7 +502,7 @@ if version >= 508 || !exists("did_perl_syn_inits")
HiLink perlStatementFiles perlStatement HiLink perlStatementFiles perlStatement
HiLink perlStatementFlow perlStatement HiLink perlStatementFlow perlStatement
HiLink perlStatementScope perlStatement HiLink perlStatementScope perlStatement
HiLink perlStatementInclude perlInclude HiLink perlStatementInclude perlStatement
HiLink perlStatementProc perlStatement HiLink perlStatementProc perlStatement
HiLink perlStatementSocket perlStatement HiLink perlStatementSocket perlStatement
HiLink perlStatementIPC perlStatement HiLink perlStatementIPC perlStatement
@ -517,9 +523,9 @@ if version >= 508 || !exists("did_perl_syn_inits")
HiLink perlSpecialMatch perlSpecial HiLink perlSpecialMatch perlSpecial
HiLink perlSpecialBEOM perlSpecial HiLink perlSpecialBEOM perlSpecial
HiLink perlDATA perlComment HiLink perlDATA perlComment
HiLink perlParens Error HiLink perlBrackets Error
" Possible errors " Possible errors
HiLink perlNotEmptyLine Error HiLink perlNotEmptyLine Error
HiLink perlElseIfError Error HiLink perlElseIfError Error

View File

@ -2,6 +2,8 @@
" SiSU Maintainer: Ralph Amissah <ralph@amissah.com> " SiSU Maintainer: Ralph Amissah <ralph@amissah.com>
" SiSU Markup: SiSU (sisu-0.38) " SiSU Markup: SiSU (sisu-0.38)
" (originally looked at Ruby Vim by Mirko Nasato) " (originally looked at Ruby Vim by Mirko Nasato)
" Last Update: 2006 Jul 22
if version < 600 if version < 600
syntax clear syntax clear
elseif exists("b:current_syntax") elseif exists("b:current_syntax")
@ -54,7 +56,8 @@ syn region sisu_content_alt contains=sisu_strikeout,sisu_number,sisu_control,sis
syn region sisu_content_alt contains=sisu_mark_endnote,sisu_content_endnote,sisu_link,sisu_mark,sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_contain start="^\(alt\|group\|poem\){" end="^}\(alt\|group\|poem\)" syn region sisu_content_alt contains=sisu_mark_endnote,sisu_content_endnote,sisu_link,sisu_mark,sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_contain start="^\(alt\|group\|poem\){" end="^}\(alt\|group\|poem\)"
syn region sisu_content_alt contains=sisu_error matchgroup=sisu_contain start="^code{" end="^}code" syn region sisu_content_alt contains=sisu_error matchgroup=sisu_contain start="^code{" end="^}code"
"% endnotes "% endnotes
syn region sisu_content_endnote contains=sisu_link,sisu_strikeout,sisu_underline,sisu_number,sisu_control,sisu_identifier,sisu_error,sisu_error_wspace,sisu_mark,sisu_break matchgroup=sisu_mark_endnote start="\~{" end="}\~" skip="\n" syn region sisu_content_endnote contains=sisu_link,sisu_strikeout,sisu_underline,sisu_number,sisu_control,sisu_identifier,sisu_error,sisu_error_wspace,sisu_mark,sisu_break matchgroup=sisu_mark_endnote start="\~{[*+]*" end="}\~" skip="\n"
syn region sisu_content_endnote contains=sisu_link,sisu_strikeout,sisu_underline,sisu_number,sisu_control,sisu_identifier,sisu_error,sisu_error_wspace,sisu_mark,sisu_break matchgroup=sisu_mark_endnote start="\~\[[*+]*" end="\]\~" skip="\n"
syn region sisu_content_endnote contains=sisu_strikeout,sisu_number,sisu_control,sisu_link,sisu_identifier,sisu_error,sisu_error_wspace,sisu_mark,sisu_break matchgroup=sisu_mark_endnote start="\^\~" end="\n\n" syn region sisu_content_endnote contains=sisu_strikeout,sisu_number,sisu_control,sisu_link,sisu_identifier,sisu_error,sisu_error_wspace,sisu_mark,sisu_break matchgroup=sisu_mark_endnote start="\^\~" end="\n\n"
"% images "% images
syn region sisu_linked contains=sisu_fontface,sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_link start="{" end="}\(\(https\?://\|\.\./\)\S\+\|image\)" oneline syn region sisu_linked contains=sisu_fontface,sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_link start="{" end="}\(\(https\?://\|\.\./\)\S\+\|image\)" oneline

View File

@ -1,9 +1,9 @@
/* digraph.c */ /* digraph.c */
extern int do_digraph __ARGS((int c)); int do_digraph __ARGS((int c));
extern int get_digraph __ARGS((int cmdline)); int get_digraph __ARGS((int cmdline));
extern int getdigraph __ARGS((int char1, int char2, int meta)); int getdigraph __ARGS((int char1, int char2, int meta));
extern void putdigraph __ARGS((char_u *str)); void putdigraph __ARGS((char_u *str));
extern void listdigraphs __ARGS((void)); void listdigraphs __ARGS((void));
extern char_u *keymap_init __ARGS((void)); char_u *keymap_init __ARGS((void));
extern void ex_loadkeymap __ARGS((exarg_T *eap)); void ex_loadkeymap __ARGS((exarg_T *eap));
/* vim: set ft=c : */ /* vim: set ft=c : */

View File

@ -1,31 +1,31 @@
/* gui_athena.c */ /* gui_athena.c */
extern void gui_x11_create_widgets __ARGS((void)); void gui_x11_create_widgets __ARGS((void));
extern void gui_x11_destroy_widgets __ARGS((void)); void gui_x11_destroy_widgets __ARGS((void));
extern void gui_mch_set_toolbar_pos __ARGS((int x, int y, int w, int h)); void gui_mch_set_toolbar_pos __ARGS((int x, int y, int w, int h));
extern void gui_mch_set_text_area_pos __ARGS((int x, int y, int w, int h)); void gui_mch_set_text_area_pos __ARGS((int x, int y, int w, int h));
extern void gui_x11_set_back_color __ARGS((void)); void gui_x11_set_back_color __ARGS((void));
extern void gui_mch_enable_menu __ARGS((int flag)); void gui_mch_enable_menu __ARGS((int flag));
extern void gui_mch_set_menu_pos __ARGS((int x, int y, int w, int h)); void gui_mch_set_menu_pos __ARGS((int x, int y, int w, int h));
extern void gui_mch_add_menu __ARGS((vimmenu_T *menu, int idx)); void gui_mch_add_menu __ARGS((vimmenu_T *menu, int idx));
extern void gui_mch_new_menu_font __ARGS((void)); void gui_mch_new_menu_font __ARGS((void));
extern void gui_mch_new_tooltip_font __ARGS((void)); void gui_mch_new_tooltip_font __ARGS((void));
extern void gui_mch_new_tooltip_colors __ARGS((void)); void gui_mch_new_tooltip_colors __ARGS((void));
extern void gui_mch_add_menu_item __ARGS((vimmenu_T *menu, int idx)); void gui_mch_add_menu_item __ARGS((vimmenu_T *menu, int idx));
extern void gui_mch_show_toolbar __ARGS((int showit)); void gui_mch_show_toolbar __ARGS((int showit));
extern int gui_mch_compute_toolbar_height __ARGS((void)); int gui_mch_compute_toolbar_height __ARGS((void));
extern void gui_mch_get_toolbar_colors __ARGS((Pixel *bgp, Pixel *fgp, Pixel *bsp, Pixel *tsp, Pixel *hsp)); void gui_mch_get_toolbar_colors __ARGS((Pixel *bgp, Pixel *fgp, Pixel *bsp, Pixel *tsp, Pixel *hsp));
extern void gui_mch_toggle_tearoffs __ARGS((int enable)); void gui_mch_toggle_tearoffs __ARGS((int enable));
extern void gui_mch_new_menu_colors __ARGS((void)); void gui_mch_new_menu_colors __ARGS((void));
extern void gui_mch_destroy_menu __ARGS((vimmenu_T *menu)); void gui_mch_destroy_menu __ARGS((vimmenu_T *menu));
extern void gui_mch_show_popupmenu __ARGS((vimmenu_T *menu)); void gui_mch_show_popupmenu __ARGS((vimmenu_T *menu));
extern void gui_mch_def_colors __ARGS((void)); void gui_mch_def_colors __ARGS((void));
extern void gui_mch_set_scrollbar_thumb __ARGS((scrollbar_T *sb, long val, long size, long max)); void gui_mch_set_scrollbar_thumb __ARGS((scrollbar_T *sb, long val, long size, long max));
extern void gui_mch_set_scrollbar_pos __ARGS((scrollbar_T *sb, int x, int y, int w, int h)); void gui_mch_set_scrollbar_pos __ARGS((scrollbar_T *sb, int x, int y, int w, int h));
extern void gui_mch_enable_scrollbar __ARGS((scrollbar_T *sb, int flag)); void gui_mch_enable_scrollbar __ARGS((scrollbar_T *sb, int flag));
extern void gui_mch_create_scrollbar __ARGS((scrollbar_T *sb, int orient)); void gui_mch_create_scrollbar __ARGS((scrollbar_T *sb, int orient));
extern void gui_mch_destroy_scrollbar __ARGS((scrollbar_T *sb)); void gui_mch_destroy_scrollbar __ARGS((scrollbar_T *sb));
extern void gui_mch_set_scrollbar_colors __ARGS((scrollbar_T *sb)); void gui_mch_set_scrollbar_colors __ARGS((scrollbar_T *sb));
extern Window gui_x11_get_wid __ARGS((void)); Window gui_x11_get_wid __ARGS((void));
extern char_u *gui_mch_browse __ARGS((int saving, char_u *title, char_u *dflt, char_u *ext, char_u *initdir, char_u *filter)); char_u *gui_mch_browse __ARGS((int saving, char_u *title, char_u *dflt, char_u *ext, char_u *initdir, char_u *filter));
extern int gui_mch_dialog __ARGS((int type, char_u *title, char_u *message, char_u *buttons, int dfltbutton, char_u *textfield)); int gui_mch_dialog __ARGS((int type, char_u *title, char_u *message, char_u *buttons, int dfltbutton, char_u *textfield));
/* vim: set ft=c : */ /* vim: set ft=c : */

View File

@ -1,63 +1,63 @@
/* os_mswin.c */ /* os_mswin.c */
extern void mch_exit __ARGS((int r)); void mch_exit __ARGS((int r));
extern void mch_early_init __ARGS((void)); void mch_early_init __ARGS((void));
extern int mch_input_isatty __ARGS((void)); int mch_input_isatty __ARGS((void));
extern void mch_settitle __ARGS((char_u *title, char_u *icon)); void mch_settitle __ARGS((char_u *title, char_u *icon));
extern void mch_restore_title __ARGS((int which)); void mch_restore_title __ARGS((int which));
extern int mch_can_restore_title __ARGS((void)); int mch_can_restore_title __ARGS((void));
extern int mch_can_restore_icon __ARGS((void)); int mch_can_restore_icon __ARGS((void));
extern int mch_FullName __ARGS((char_u *fname, char_u *buf, int len, int force)); int mch_FullName __ARGS((char_u *fname, char_u *buf, int len, int force));
extern int mch_isFullName __ARGS((char_u *fname)); int mch_isFullName __ARGS((char_u *fname));
extern void slash_adjust __ARGS((char_u *p)); void slash_adjust __ARGS((char_u *p));
extern int vim_stat __ARGS((const char *name, struct stat *stp)); int vim_stat __ARGS((const char *name, struct stat *stp));
extern void mch_settmode __ARGS((int tmode)); void mch_settmode __ARGS((int tmode));
extern int mch_get_shellsize __ARGS((void)); int mch_get_shellsize __ARGS((void));
extern void mch_set_shellsize __ARGS((void)); void mch_set_shellsize __ARGS((void));
extern void mch_new_shellsize __ARGS((void)); void mch_new_shellsize __ARGS((void));
extern void mch_suspend __ARGS((void)); void mch_suspend __ARGS((void));
extern void display_errors __ARGS((void)); void display_errors __ARGS((void));
extern int mch_has_exp_wildcard __ARGS((char_u *p)); int mch_has_exp_wildcard __ARGS((char_u *p));
extern int mch_has_wildcard __ARGS((char_u *p)); int mch_has_wildcard __ARGS((char_u *p));
extern int mch_chdir __ARGS((char *path)); int mch_chdir __ARGS((char *path));
extern int can_end_termcap_mode __ARGS((int give_msg)); int can_end_termcap_mode __ARGS((int give_msg));
extern int mch_screenmode __ARGS((char_u *arg)); int mch_screenmode __ARGS((char_u *arg));
extern int mch_libcall __ARGS((char_u *libname, char_u *funcname, char_u *argstring, int argint, char_u **string_result, int *number_result)); int mch_libcall __ARGS((char_u *libname, char_u *funcname, char_u *argstring, int argint, char_u **string_result, int *number_result));
extern int utf8_to_ucs2 __ARGS((char_u *instr, int inlen, short_u *outstr, int *unconvlenp)); int utf8_to_ucs2 __ARGS((char_u *instr, int inlen, short_u *outstr, int *unconvlenp));
extern int ucs2_to_utf8 __ARGS((short_u *instr, int inlen, char_u *outstr)); int ucs2_to_utf8 __ARGS((short_u *instr, int inlen, char_u *outstr));
extern void MultiByteToWideChar_alloc __ARGS((UINT cp, DWORD flags, LPCSTR in, int inlen, LPWSTR *out, int *outlen)); void MultiByteToWideChar_alloc __ARGS((UINT cp, DWORD flags, LPCSTR in, int inlen, LPWSTR *out, int *outlen));
extern void WideCharToMultiByte_alloc __ARGS((UINT cp, DWORD flags, LPCWSTR in, int inlen, LPSTR *out, int *outlen, LPCSTR def, LPBOOL useddef)); void WideCharToMultiByte_alloc __ARGS((UINT cp, DWORD flags, LPCWSTR in, int inlen, LPSTR *out, int *outlen, LPCSTR def, LPBOOL useddef));
extern int clip_mch_own_selection __ARGS((VimClipboard *cbd)); int clip_mch_own_selection __ARGS((VimClipboard *cbd));
extern void clip_mch_lose_selection __ARGS((VimClipboard *cbd)); void clip_mch_lose_selection __ARGS((VimClipboard *cbd));
extern short_u *enc_to_ucs2 __ARGS((char_u *str, int *lenp)); short_u *enc_to_ucs2 __ARGS((char_u *str, int *lenp));
extern char_u *ucs2_to_enc __ARGS((short_u *str, int *lenp)); char_u *ucs2_to_enc __ARGS((short_u *str, int *lenp));
extern void clip_mch_request_selection __ARGS((VimClipboard *cbd)); void clip_mch_request_selection __ARGS((VimClipboard *cbd));
extern void acp_to_enc __ARGS((char_u *str, int str_size, char_u **out, int *outlen)); void acp_to_enc __ARGS((char_u *str, int str_size, char_u **out, int *outlen));
extern void clip_mch_set_selection __ARGS((VimClipboard *cbd)); void clip_mch_set_selection __ARGS((VimClipboard *cbd));
extern void DumpPutS __ARGS((const char *psz)); void DumpPutS __ARGS((const char *psz));
extern int mch_get_winpos __ARGS((int *x, int *y)); int mch_get_winpos __ARGS((int *x, int *y));
extern void mch_set_winpos __ARGS((int x, int y)); void mch_set_winpos __ARGS((int x, int y));
extern void mch_print_cleanup __ARGS((void)); void mch_print_cleanup __ARGS((void));
extern int mch_print_init __ARGS((prt_settings_T *psettings, char_u *jobname, int forceit)); int mch_print_init __ARGS((prt_settings_T *psettings, char_u *jobname, int forceit));
extern int mch_print_begin __ARGS((prt_settings_T *psettings)); int mch_print_begin __ARGS((prt_settings_T *psettings));
extern void mch_print_end __ARGS((prt_settings_T *psettings)); void mch_print_end __ARGS((prt_settings_T *psettings));
extern int mch_print_end_page __ARGS((void)); int mch_print_end_page __ARGS((void));
extern int mch_print_begin_page __ARGS((char_u *msg)); int mch_print_begin_page __ARGS((char_u *msg));
extern int mch_print_blank_page __ARGS((void)); int mch_print_blank_page __ARGS((void));
extern void mch_print_start_line __ARGS((int margin, int page_line)); void mch_print_start_line __ARGS((int margin, int page_line));
extern int mch_print_text_out __ARGS((char_u *p, int len)); int mch_print_text_out __ARGS((char_u *p, int len));
extern void mch_print_set_font __ARGS((int iBold, int iItalic, int iUnderline)); void mch_print_set_font __ARGS((int iBold, int iItalic, int iUnderline));
extern void mch_print_set_bg __ARGS((long_u bgcol)); void mch_print_set_bg __ARGS((long_u bgcol));
extern void mch_print_set_fg __ARGS((long_u fgcol)); void mch_print_set_fg __ARGS((long_u fgcol));
extern char_u *mch_resolve_shortcut __ARGS((char_u *fname)); char_u *mch_resolve_shortcut __ARGS((char_u *fname));
extern void win32_set_foreground __ARGS((void)); void win32_set_foreground __ARGS((void));
extern void serverInitMessaging __ARGS((void)); void serverInitMessaging __ARGS((void));
extern void serverSetName __ARGS((char_u *name)); void serverSetName __ARGS((char_u *name));
extern char_u *serverGetVimNames __ARGS((void)); char_u *serverGetVimNames __ARGS((void));
extern int serverSendReply __ARGS((char_u *name, char_u *reply)); int serverSendReply __ARGS((char_u *name, char_u *reply));
extern int serverSendToVim __ARGS((char_u *name, char_u *cmd, char_u **result, void *ptarget, int asExpr, int silent)); int serverSendToVim __ARGS((char_u *name, char_u *cmd, char_u **result, void *ptarget, int asExpr, int silent));
extern void serverForeground __ARGS((char_u *name)); void serverForeground __ARGS((char_u *name));
extern char_u *serverGetReply __ARGS((HWND server, int *expr_res, int remove, int wait)); char_u *serverGetReply __ARGS((HWND server, int *expr_res, int remove, int wait));
extern void serverProcessPendingMessages __ARGS((void)); void serverProcessPendingMessages __ARGS((void));
extern char *charset_id2name __ARGS((int id)); char *charset_id2name __ARGS((int id));
extern int get_logfont __ARGS((LOGFONT *lf, char_u *name, HDC printer_dc, int verbose)); int get_logfont __ARGS((LOGFONT *lf, char_u *name, HDC printer_dc, int verbose));
/* vim: set ft=c : */ /* vim: set ft=c : */

View File

@ -1,4 +1,4 @@
CODE PRELOAD EXECUTEONLY CODE PRELOAD EXECUTEONLY
DATA MULTIPLE SHARED DATA MULTIPLE SHARED
DESCRIPTION 'Vim 7.0' DESCRIPTION 'Vim 7.1a'
HEAPSIZE 0,0 HEAPSIZE 0,0