From 9964e468c0209f6b8286e0b08109817c845a3079 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Sat, 5 May 2007 17:54:07 +0000 Subject: updated for version 7.1a --- README.txt | 2 +- README_amibin.txt | 2 +- README_dos.txt | 2 +- README_extra.txt | 2 +- README_mac.txt | 2 +- README_ole.txt | 2 +- runtime/autoload/adacomplete.vim | 109 + runtime/autoload/csscomplete.vim | 740 +-- runtime/autoload/decada.vim | 75 + runtime/autoload/getscript.vim | 501 ++ runtime/autoload/netrw.vim | 6973 ++++++++++++--------- runtime/autoload/pythoncomplete.vim | 94 +- runtime/autoload/rubycomplete.vim | 896 ++- runtime/autoload/syntaxcomplete.vim | 117 +- runtime/autoload/xmlcomplete.vim | 24 +- runtime/autoload/zip.vim | 138 +- runtime/colors/blue.vim | 90 +- runtime/colors/torte.vim | 6 +- runtime/doc/change.txt | 20 +- runtime/doc/cmdline.txt | 6 +- runtime/doc/debug.txt | 2 +- runtime/doc/debugger.txt | 2 +- runtime/doc/develop.txt | 4 +- runtime/doc/diff.txt | 17 +- runtime/doc/digraph.txt | 15 +- runtime/doc/editing.txt | 14 +- runtime/doc/fold.txt | 2 +- runtime/doc/gui_w16.txt | 2 +- runtime/doc/gui_w32.txt | 7 +- runtime/doc/gui_x11.txt | 15 +- runtime/doc/hangulin.txt | 2 +- runtime/doc/help.txt | 15 +- runtime/doc/if_cscop.txt | 2 +- runtime/doc/if_mzsch.txt | 9 +- runtime/doc/if_ole.txt | 2 +- runtime/doc/if_perl.txt | 2 +- runtime/doc/if_pyth.txt | 2 +- runtime/doc/if_ruby.txt | 2 +- runtime/doc/if_sniff.txt | 2 +- runtime/doc/insert.txt | 58 +- runtime/doc/mbyte.txt | 5 +- runtime/doc/mlang.txt | 4 +- runtime/doc/motion.txt | 20 +- runtime/doc/os_390.txt | 2 +- runtime/doc/os_beos.txt | 2 +- runtime/doc/os_mac.txt | 2 +- runtime/doc/os_msdos.txt | 2 +- runtime/doc/os_risc.txt | 2 +- runtime/doc/os_unix.txt | 2 +- runtime/doc/pi_getscript.txt | 406 ++ runtime/doc/pi_gzip.txt | 2 +- runtime/doc/pi_netrw.txt | 959 ++- runtime/doc/pi_paren.txt | 4 +- runtime/doc/pi_tar.txt | 34 +- runtime/doc/pi_vimball.txt | 71 +- runtime/doc/pi_zip.txt | 24 +- runtime/doc/print.txt | 4 +- runtime/doc/quickref.txt | 5 +- runtime/doc/recover.txt | 2 +- runtime/doc/rileft.txt | 2 +- runtime/doc/russian.txt | 2 +- runtime/doc/sign.txt | 2 +- runtime/doc/sponsor.txt | 4 +- runtime/doc/tags | 236 +- runtime/doc/term.txt | 4 +- runtime/doc/tips.txt | 6 +- runtime/doc/uganda.txt | 26 +- runtime/doc/undo.txt | 2 +- runtime/doc/usr_02.txt | 64 +- runtime/doc/usr_03.txt | 6 +- runtime/doc/usr_08.txt | 8 +- runtime/doc/usr_09.txt | 2 +- runtime/doc/usr_10.txt | 7 +- runtime/doc/usr_25.txt | 4 +- runtime/doc/usr_26.txt | 2 +- runtime/doc/usr_29.txt | 2 +- runtime/doc/usr_32.txt | 2 +- runtime/doc/usr_42.txt | 2 +- runtime/doc/usr_44.txt | 2 +- runtime/doc/usr_90.txt | 2 +- runtime/doc/usr_toc.txt | 2 +- runtime/doc/version5.txt | 8 +- runtime/doc/version6.txt | 6 +- runtime/doc/vim2html.pl | 1 - runtime/doc/visual.txt | 4 +- runtime/doc/xxd-it.1 | 2 +- runtime/doc/xxd-pl.UTF-8.1 | 2 +- runtime/doc/xxd-ru.UTF-8.1 | 2 +- runtime/ftplugin/ada.vim | 357 +- runtime/ftplugin/bst.vim | 15 + runtime/ftplugin/cobol.vim | 266 + runtime/ftplugin/debchangelog.vim | 27 +- runtime/ftplugin/hamster.vim | 61 + runtime/ftplugin/haskell.vim | 2 +- runtime/ftplugin/mail.vim | 5 +- runtime/ftplugin/make.vim | 4 +- runtime/ftplugin/ocaml.vim | 8 +- runtime/indent/ada.vim | 78 +- runtime/indent/eruby.vim | 51 +- runtime/indent/html.vim | 13 +- runtime/indent/htmldjango.vim | 12 + runtime/indent/jsp.vim | 17 + runtime/indent/ocaml.vim | 2 +- runtime/indent/python.vim | 4 +- runtime/indent/ruby.vim | 14 +- runtime/indent/vhdl.vim | 111 +- runtime/keymap/bulgarian-bds.vim | 127 + runtime/keymap/bulgarian-phonetic.vim | 108 + runtime/keymap/thaana.vim | 3 + runtime/keymap/vietnamese-viqr_utf-8.vim | 160 + runtime/lang/menu_sl_si.cp1250.vim | 294 + runtime/lang/menu_sl_si.latin2.vim | 294 + runtime/lang/menu_slovak_slovak_republic.1250.vim | 2 +- runtime/plugin/README.txt | 20 +- runtime/plugin/vimballPlugin.vim | 30 +- runtime/plugin/zipPlugin.vim | 24 +- runtime/spell/da/main.aap | 2 +- runtime/spell/pl/main.aap | 40 +- runtime/spell/pt/pt_PT.diff | 50 +- runtime/synmenu.vim | 296 +- runtime/syntax/amiga.vim | 6 +- runtime/syntax/aspvbs.vim | 8 +- runtime/syntax/autoit.vim | 1111 ++++ runtime/syntax/automake.vim | 27 +- runtime/syntax/b.vim | 2 +- runtime/syntax/bzr.vim | 51 + runtime/syntax/c.vim | 17 +- runtime/syntax/cmusrc.vim | 309 + runtime/syntax/csh.vim | 16 +- runtime/syntax/dcl.vim | 6 +- runtime/syntax/desc.vim | 4 +- runtime/syntax/elmfilt.vim | 8 +- runtime/syntax/eruby.vim | 8 +- runtime/syntax/foxpro.vim | 45 +- runtime/syntax/fvwm.vim | 906 ++- runtime/syntax/hamster.vim | 382 ++ runtime/syntax/ia64.vim | 3 +- runtime/syntax/ibasic.vim | 176 + runtime/syntax/initng.vim | 91 + runtime/syntax/javascript.vim | 6 +- runtime/syntax/lua.vim | 29 +- runtime/syntax/lynx.vim | 128 +- runtime/syntax/make.vim | 10 +- runtime/syntax/maple.vim | 10 +- runtime/syntax/masm.vim | 366 +- runtime/syntax/muttrc.vim | 163 +- runtime/syntax/named.vim | 44 +- runtime/syntax/netrw.vim | 13 +- runtime/syntax/objc.vim | 4 +- runtime/syntax/ocaml.vim | 20 +- runtime/syntax/php.vim | 734 ++- runtime/syntax/privoxy.vim | 71 + runtime/syntax/remind.vim | 17 +- runtime/syntax/ruby.vim | 149 +- runtime/syntax/sd.vim | 75 + runtime/syntax/sh.vim | 73 +- runtime/syntax/tcsh.vim | 19 +- runtime/syntax/tex.vim | 38 +- runtime/syntax/vim.vim | 59 +- runtime/syntax/xdefaults.vim | 6 +- runtime/tutor/tutor.cs | 812 +++ runtime/tutor/tutor.cs.cp1250 | 812 +++ runtime/tutor/tutor.cs.utf-8 | 812 +++ runtime/tutor/tutor.hu | 823 +++ runtime/tutor/tutor.hu.utf-8 | 823 +++ runtime/tutor/tutor.it | 752 ++- runtime/tutor/tutor.tr.utf-8 | 813 +++ src/GvimExt/GvimExt.reg | 4 +- src/if_xcmdsrv.c | 4 +- src/keymap.h | 2 +- src/move.c | 8 +- src/os_vms.c | 8 +- src/po/README_mvc.txt | 28 +- src/po/de.po | 10 +- src/po/pl.UTF-8.po | 43 +- src/po/pl.cp1250.po | 43 +- src/proto/charset.pro | 108 +- src/proto/diff.pro | 48 +- src/proto/ex_eval.pro | 60 +- src/proto/ex_getln.pro | 108 +- src/proto/fold.pro | 78 +- src/proto/gui.pro | 126 +- src/proto/gui_gtk_x11.pro | 142 +- src/proto/gui_xmdlg.pro | 2 +- src/proto/hashtab.pro | 24 +- src/proto/if_tcl.pro | 16 +- src/proto/main.pro | 48 +- src/proto/mark.pro | 56 +- src/proto/memfile.pro | 32 +- src/proto/message.pro | 138 +- src/proto/netbeans.pro | 46 +- src/proto/normal.pro | 48 +- src/proto/option.pro | 108 +- src/proto/os_riscos.pro | 94 +- src/proto/os_vms.pro | 24 +- src/proto/os_win16.pro | 20 +- src/proto/popupmnu.pro | 12 +- src/proto/regexp.pro | 30 +- src/proto/spell.pro | 48 +- src/proto/syntax.pro | 90 +- src/proto/version.pro | 14 +- src/proto/window.pro | 120 +- src/proto/workshop.pro | 94 +- src/testdir/test55.ok | 4 + src/vim16.def | 2 +- src/vimrun.c | 4 +- 206 files changed, 20003 insertions(+), 7188 deletions(-) create mode 100644 runtime/autoload/adacomplete.vim create mode 100644 runtime/autoload/decada.vim create mode 100644 runtime/autoload/getscript.vim create mode 100644 runtime/doc/pi_getscript.txt create mode 100644 runtime/ftplugin/bst.vim create mode 100644 runtime/ftplugin/cobol.vim create mode 100644 runtime/ftplugin/hamster.vim create mode 100644 runtime/indent/htmldjango.vim create mode 100644 runtime/indent/jsp.vim create mode 100644 runtime/keymap/bulgarian-bds.vim create mode 100644 runtime/keymap/bulgarian-phonetic.vim create mode 100644 runtime/keymap/thaana.vim create mode 100644 runtime/keymap/vietnamese-viqr_utf-8.vim create mode 100644 runtime/lang/menu_sl_si.cp1250.vim create mode 100644 runtime/lang/menu_sl_si.latin2.vim create mode 100644 runtime/syntax/autoit.vim create mode 100644 runtime/syntax/bzr.vim create mode 100644 runtime/syntax/cmusrc.vim create mode 100644 runtime/syntax/hamster.vim create mode 100644 runtime/syntax/ibasic.vim create mode 100644 runtime/syntax/initng.vim create mode 100644 runtime/syntax/privoxy.vim create mode 100644 runtime/syntax/sd.vim create mode 100644 runtime/tutor/tutor.cs create mode 100644 runtime/tutor/tutor.cs.cp1250 create mode 100644 runtime/tutor/tutor.cs.utf-8 create mode 100644 runtime/tutor/tutor.hu create mode 100644 runtime/tutor/tutor.hu.utf-8 create mode 100644 runtime/tutor/tutor.tr.utf-8 diff --git a/README.txt b/README.txt index 3289023d8..5f9d0e985 100644 --- a/README.txt +++ b/README.txt @@ -1,4 +1,4 @@ -README.txt for version 7.0 of Vim: Vi IMproved. +README.txt for version 7.1a of Vim: Vi IMproved. WHAT IS VIM diff --git a/README_amibin.txt b/README_amibin.txt index c6bf424ba..c2df760c9 100644 --- a/README_amibin.txt +++ b/README_amibin.txt @@ -1,4 +1,4 @@ -README_amibin.txt for version 7.0 of Vim: Vi IMproved. +README_amibin.txt for version 7.1a of Vim: Vi IMproved. See "README.txt" for general information about Vim. See "README_ami.txt" for installation instructions for the Amiga. diff --git a/README_dos.txt b/README_dos.txt index c153e5392..7cfef57c3 100644 --- a/README_dos.txt +++ b/README_dos.txt @@ -1,4 +1,4 @@ -README_dos.txt for version 7.0 of Vim: Vi IMproved. +README_dos.txt for version 7.1a of Vim: Vi IMproved. This file explains the installation of Vim on MS-DOS and MS-Windows systems. See "README.txt" for general information about Vim. diff --git a/README_extra.txt b/README_extra.txt index a1de23fb4..649f62c49 100644 --- a/README_extra.txt +++ b/README_extra.txt @@ -1,4 +1,4 @@ -README_extra.txt for version 7.0 of Vim: Vi IMproved. +README_extra.txt for version 7.1a of Vim: Vi IMproved. The extra archive of Vim is to be used in combination with the source archive (vim-7.0-src.tar.gz). The extra archive is useless without it. diff --git a/README_mac.txt b/README_mac.txt index 39857110a..50d939ee7 100644 --- a/README_mac.txt +++ b/README_mac.txt @@ -1,4 +1,4 @@ -README_mac.txt for version 7.0 of Vim: Vi IMproved. +README_mac.txt for version 7.1a of Vim: Vi IMproved. This file explains the installation of Vim on Macintosh systems. See "README.txt" for general information about Vim. diff --git a/README_ole.txt b/README_ole.txt index 4e8ba470d..d6b20d94b 100644 --- a/README_ole.txt +++ b/README_ole.txt @@ -1,4 +1,4 @@ -README_ole.txt for version 7.0 of Vim: Vi IMproved. +README_ole.txt for version 7.1a of Vim: Vi IMproved. This archive contains gvim.exe with OLE interface and VisVim. This version of gvim.exe can also load a number of interface dynamically (you diff --git a/runtime/autoload/adacomplete.vim b/runtime/autoload/adacomplete.vim new file mode 100644 index 000000000..28d68f63d --- /dev/null +++ b/runtime/autoload/adacomplete.vim @@ -0,0 +1,109 @@ +"------------------------------------------------------------------------------ +" Description: Vim Ada omnicompletion file +" Language: Ada (2005) +" $Id$ +" Maintainer: Martin Krischik +" $Author$ +" $Date$ +" Version: 4.2 +" $Revision$ +" $HeadURL: https://svn.sourceforge.net/svnroot/gnuada/trunk/tools/vim/autoload/adacomplete.vim $ +" History: 24.05.2006 MK Unified Headers +" 26.05.2006 MK improved search for begin of word. +" 16.07.2006 MK Ada-Mode as vim-ball +" 15.10.2006 MK Bram's suggestion for runtime integration +" 05.11.2006 MK Bram suggested not to use include protection for +" autoload +" 05.11.2006 MK Bram suggested agaist using setlocal omnifunc +" 05.11.2006 MK Bram suggested to save on spaces +" Help Page: ft-ada-omni +"------------------------------------------------------------------------------ + +if version < 700 + finish +endif + +" Section: adacomplete#Complete () {{{1 +" +" This function is used for the 'omnifunc' option. +" +function! adacomplete#Complete (findstart, base) + if a:findstart == 1 + return ada#User_Complete (a:findstart, a:base) + else + " + " look up matches + " + if exists ("g:ada_omni_with_keywords") + call ada#User_Complete (a:findstart, a:base) + endif + " + " search tag file for matches + " + let l:Pattern = '^' . a:base . '.*$' + let l:Tag_List = taglist (l:Pattern) + " + " add symbols + " + for Tag_Item in l:Tag_List + if l:Tag_Item['kind'] == '' + " + " Tag created by gnat xref + " + let l:Match_Item = { + \ 'word': l:Tag_Item['name'], + \ 'menu': l:Tag_Item['filename'], + \ 'info': "Symbol from file " . l:Tag_Item['filename'] . " line " . l:Tag_Item['cmd'], + \ 'kind': 's', + \ 'icase': 1} + else + " + " Tag created by ctags + " + let l:Info = 'Symbol : ' . l:Tag_Item['name'] . "\n" + let l:Info .= 'Of type : ' . g:ada#Ctags_Kinds[l:Tag_Item['kind']][1] . "\n" + let l:Info .= 'Defined in File : ' . l:Tag_Item['filename'] . "\n" + + if has_key( l:Tag_Item, 'package') + let l:Info .= 'Package : ' . l:Tag_Item['package'] . "\n" + let l:Menu = l:Tag_Item['package'] + elseif has_key( l:Tag_Item, 'separate') + let l:Info .= 'Separate from Package : ' . l:Tag_Item['separate'] . "\n" + let l:Menu = l:Tag_Item['separate'] + elseif has_key( l:Tag_Item, 'packspec') + let l:Info .= 'Package Specification : ' . l:Tag_Item['packspec'] . "\n" + let l:Menu = l:Tag_Item['packspec'] + elseif has_key( l:Tag_Item, 'type') + let l:Info .= 'Datetype : ' . l:Tag_Item['type'] . "\n" + let l:Menu = l:Tag_Item['type'] + else + let l:Menu = l:Tag_Item['filename'] + endif + + let l:Match_Item = { + \ 'word': l:Tag_Item['name'], + \ 'menu': l:Menu, + \ 'info': l:Info, + \ 'kind': l:Tag_Item['kind'], + \ 'icase': 1} + endif + if complete_add (l:Match_Item) == 0 + return [] + endif + if complete_check () + return [] + endif + endfor + return [] + endif +endfunction adacomplete#Complete + +finish " 1}}} + +"------------------------------------------------------------------------------ +" Copyright (C) 2006 Martin Krischik +" +" Vim is Charityware - see ":help license" or uganda.txt for licence details. +"------------------------------------------------------------------------------ +" vim: textwidth=78 wrap tabstop=8 shiftwidth=3 softtabstop=3 noexpandtab +" vim: foldmethod=marker diff --git a/runtime/autoload/csscomplete.vim b/runtime/autoload/csscomplete.vim index a6f7041ff..c9a5997c1 100644 --- a/runtime/autoload/csscomplete.vim +++ b/runtime/autoload/csscomplete.vim @@ -1,422 +1,407 @@ " Vim completion script " Language: CSS 2.1 " Maintainer: Mikolaj Machowski ( mikmach AT wp DOT pl ) -" Last Change: 2006 Apr 30 +" Last Change: 2007 Mar 11 function! csscomplete#CompleteCSS(findstart, base) + if a:findstart " We need whole line to proper checking - let line = getline('.') - let start = col('.') - 1 + let line = getline('.') + let start = col('.') - 1 let compl_begin = col('.') - 2 - while start >= 0 && line[start - 1] =~ '\(\k\|-\)' + while start >= 0 && line[start - 1] =~ '\%(\k\|-\)' let start -= 1 endwhile let b:compl_context = getline('.')[0:compl_begin] return start +endif + +" There are few chars important for context: +" ^ ; : { } /* */ +" Where ^ is start of line and /* */ are comment borders +" Depending on their relative position to cursor we will know what should +" be completed. +" 1. if nearest are ^ or { or ; current word is property +" 2. if : it is value (with exception of pseudo things) +" 3. if } we are outside of css definitions +" 4. for comments ignoring is be the easiest but assume they are the same +" as 1. +" 5. if @ complete at-rule +" 6. if ! complete important +if exists("b:compl_context") + let line = b:compl_context + unlet! b:compl_context else - " There are few chars important for context: - " ^ ; : { } /* */ - " Where ^ is start of line and /* */ are comment borders - " Depending on their relative position to cursor we will now what should - " be completed. - " 1. if nearest are ^ or { or ; current word is property - " 2. if : it is value (with exception of pseudo things) - " 3. if } we are outside of css definitions - " 4. for comments ignoring is be the easiest but assume they are the same - " as 1. - " 5. if @ complete at-rule - " 6. if ! complete important - if exists("b:compl_context") - let line = b:compl_context - unlet! b:compl_context - else - let line = a:base - endif - - let res = [] - let res2 = [] - let borders = {} - - " We need the last occurrence of char so reverse line - let revline = join(reverse(split(line, '.\zs')), '') - - let openbrace = stridx(revline, '{') - let closebrace = stridx(revline, '}') - let colon = stridx(revline, ':') - let semicolon = stridx(revline, ';') - let opencomm = stridx(revline, '*/') " Line was reversed - let closecomm = stridx(revline, '/*') " Line was reversed - let style = stridx(revline, '=\s*elyts') " Line was reversed - let atrule = stridx(revline, '@') - let exclam = stridx(revline, '!') - - if openbrace > -1 - let borders[openbrace] = "openbrace" - endif - if closebrace > -1 - let borders[closebrace] = "closebrace" - endif - if colon > -1 - let borders[colon] = "colon" - endif - if semicolon > -1 - let borders[semicolon] = "semicolon" - endif - if opencomm > -1 - let borders[opencomm] = "opencomm" - endif - if closecomm > -1 - let borders[closecomm] = "closecomm" - endif - if style > -1 - let borders[style] = "style" - endif - if atrule > -1 - let borders[atrule] = "atrule" - endif - if exclam > -1 - let borders[exclam] = "exclam" - endif - - - if len(borders) == 0 || borders[min(keys(borders))] =~ '^\(openbrace\|semicolon\|opencomm\|closecomm\|style\)$' - " Complete properties - - let values = split("azimuth background background-attachment background-color background-image background-position background-repeat border bottom border-collapse border-color border-spacing border-style border-top border-right border-bottom border-left border-top-color border-right-color border-bottom-color border-left-color border-top-style border-right-style border-bottom-style border-left-style border-top-width border-right-width border-bottom-width border-left-width border-width caption-side clear clip color content counter-increment counter-reset cue cue-after cue-before cursor display direction elevation empty-cells float font font-family font-size font-style font-variant font-weight height left letter-spacing line-height list-style list-style-image list-style-position list-style-type margin margin-right margin-left margin-top margin-bottom max-height max-width min-height min-width orphans outline outline-color outline-style outline-width overflow padding padding-top padding-right padding-bottom padding-left page-break-after page-break-before page-break-inside pause pause-after pause-before pitch pitch-range play-during position quotes right richness speak speak-header speak-numeral speak-punctuation speech-rate stress table-layout text-align text-decoration text-indent text-transform top unicode-bidi vertical-align visibility voice-family volume white-space width widows word-spacing z-index") - - let entered_property = matchstr(line, '.\{-}\zs[a-zA-Z-]*$') - - for m in values - if m =~? '^'.entered_property - call add(res, m . ':') - elseif m =~? entered_property - call add(res2, m . ':') - endif - endfor - - return res + res2 - - elseif borders[min(keys(borders))] == 'colon' - " Get name of property - let prop = tolower(matchstr(line, '\zs[a-zA-Z-]*\ze\s*:[^:]\{-}$')) - - if prop == 'azimuth' - let values = ["left-side", "far-left", "left", "center-left", "center", "center-right", "right", "far-right", "right-side", "behind", "leftwards", "rightwards"] - elseif prop == 'background-attachment' - let values = ["scroll", "fixed"] - elseif prop == 'background-color' - let values = ["transparent", "rgb(", "#"] - elseif prop == 'background-image' - let values = ["url(", "none"] - elseif prop == 'background-position' - let vals = matchstr(line, '.*:\s*\zs.*') - if vals =~ '^\([a-zA-Z]\+\)\?$' - let values = ["top", "center", "bottom"] - elseif vals =~ '^[a-zA-Z]\+\s\+\([a-zA-Z]\+\)\?$' - let values = ["left", "center", "right"] - else - return [] - endif - elseif prop == 'background-repeat' - let values = ["repeat", "repeat-x", "repeat-y", "no-repeat"] - elseif prop == 'background' - let values = ["url(", "scroll", "fixed", "transparent", "rgb(", "#", "none", "top", "center", "bottom" , "left", "right", "repeat", "repeat-x", "repeat-y", "no-repeat"] - elseif prop == 'border-collapse' - let values = ["collapse", "separate"] - elseif prop == 'border-color' - let values = ["rgb(", "#", "transparent"] - elseif prop == 'border-spacing' + let line = a:base +endif + +let res = [] +let res2 = [] +let borders = {} + +" Check last occurrence of sequence + +let openbrace = strridx(line, '{') +let closebrace = strridx(line, '}') +let colon = strridx(line, ':') +let semicolon = strridx(line, ';') +let opencomm = strridx(line, '/*') +let closecomm = strridx(line, '*/') +let style = strridx(line, 'style\s*=') +let atrule = strridx(line, '@') +let exclam = strridx(line, '!') + +if openbrace > -1 + let borders[openbrace] = "openbrace" +endif +if closebrace > -1 + let borders[closebrace] = "closebrace" +endif +if colon > -1 + let borders[colon] = "colon" +endif +if semicolon > -1 + let borders[semicolon] = "semicolon" +endif +if opencomm > -1 + let borders[opencomm] = "opencomm" +endif +if closecomm > -1 + let borders[closecomm] = "closecomm" +endif +if style > -1 + let borders[style] = "style" +endif +if atrule > -1 + let borders[atrule] = "atrule" +endif +if exclam > -1 + let borders[exclam] = "exclam" +endif + + +if len(borders) == 0 || borders[max(keys(borders))] =~ '^\%(openbrace\|semicolon\|opencomm\|closecomm\|style\)$' + " Complete properties + + let values = split("azimuth background background-attachment background-color background-image background-position background-repeat border bottom border-collapse border-color border-spacing border-style border-top border-right border-bottom border-left border-top-color border-right-color border-bottom-color border-left-color border-top-style border-right-style border-bottom-style border-left-style border-top-width border-right-width border-bottom-width border-left-width border-width caption-side clear clip color content counter-increment counter-reset cue cue-after cue-before cursor display direction elevation empty-cells float font font-family font-size font-style font-variant font-weight height left letter-spacing line-height list-style list-style-image list-style-position list-style-type margin margin-right margin-left margin-top margin-bottom max-height max-width min-height min-width orphans outline outline-color outline-style outline-width overflow padding padding-top padding-right padding-bottom padding-left page-break-after page-break-before page-break-inside pause pause-after pause-before pitch pitch-range play-during position quotes right richness speak speak-header speak-numeral speak-punctuation speech-rate stress table-layout text-align text-decoration text-indent text-transform top unicode-bidi vertical-align visibility voice-family volume white-space width widows word-spacing z-index") + + let entered_property = matchstr(line, '.\{-}\zs[a-zA-Z-]*$') + + for m in values + if m =~? '^'.entered_property + call add(res, m . ':') + elseif m =~? entered_property + call add(res2, m . ':') + endif + endfor + + return res + res2 + +elseif borders[max(keys(borders))] == 'colon' + " Get name of property + let prop = tolower(matchstr(line, '\zs[a-zA-Z-]*\ze\s*:[^:]\{-}$')) + + if prop == 'azimuth' + let values = ["left-side", "far-left", "left", "center-left", "center", "center-right", "right", "far-right", "right-side", "behind", "leftwards", "rightwards"] + elseif prop == 'background-attachment' + let values = ["scroll", "fixed"] + elseif prop == 'background-color' + let values = ["transparent", "rgb(", "#"] + elseif prop == 'background-image' + let values = ["url(", "none"] + elseif prop == 'background-position' + let vals = matchstr(line, '.*:\s*\zs.*') + if vals =~ '^\%([a-zA-Z]\+\)\?$' + let values = ["top", "center", "bottom"] + elseif vals =~ '^[a-zA-Z]\+\s\+\%([a-zA-Z]\+\)\?$' + let values = ["left", "center", "right"] + else return [] - elseif prop == 'border-style' + endif + elseif prop == 'background-repeat' + let values = ["repeat", "repeat-x", "repeat-y", "no-repeat"] + elseif prop == 'background' + let values = ["url(", "scroll", "fixed", "transparent", "rgb(", "#", "none", "top", "center", "bottom" , "left", "right", "repeat", "repeat-x", "repeat-y", "no-repeat"] + elseif prop == 'border-collapse' + let values = ["collapse", "separate"] + elseif prop == 'border-color' + let values = ["rgb(", "#", "transparent"] + elseif prop == 'border-spacing' + return [] + elseif prop == 'border-style' + let values = ["none", "hidden", "dotted", "dashed", "solid", "double", "groove", "ridge", "inset", "outset"] + elseif prop =~ 'border-\%(top\|right\|bottom\|left\)$' + let vals = matchstr(line, '.*:\s*\zs.*') + if vals =~ '^\%([a-zA-Z0-9.]\+\)\?$' + let values = ["thin", "thick", "medium"] + elseif vals =~ '^[a-zA-Z0-9.]\+\s\+\%([a-zA-Z]\+\)\?$' let values = ["none", "hidden", "dotted", "dashed", "solid", "double", "groove", "ridge", "inset", "outset"] - elseif prop =~ 'border-\(top\|right\|bottom\|left\)$' - let vals = matchstr(line, '.*:\s*\zs.*') - if vals =~ '^\([a-zA-Z0-9.]\+\)\?$' - let values = ["thin", "thick", "medium"] - elseif vals =~ '^[a-zA-Z0-9.]\+\s\+\([a-zA-Z]\+\)\?$' - let values = ["none", "hidden", "dotted", "dashed", "solid", "double", "groove", "ridge", "inset", "outset"] - elseif vals =~ '^[a-zA-Z0-9.]\+\s\+[a-zA-Z]\+\s\+\([a-zA-Z(]\+\)\?$' - let values = ["rgb(", "#", "transparent"] - else - return [] - endif - elseif prop =~ 'border-\(top\|right\|bottom\|left\)-color' + elseif vals =~ '^[a-zA-Z0-9.]\+\s\+[a-zA-Z]\+\s\+\%([a-zA-Z(]\+\)\?$' let values = ["rgb(", "#", "transparent"] - elseif prop =~ 'border-\(top\|right\|bottom\|left\)-style' - let values = ["none", "hidden", "dotted", "dashed", "solid", "double", "groove", "ridge", "inset", "outset"] - elseif prop =~ 'border-\(top\|right\|bottom\|left\)-width' - let values = ["thin", "thick", "medium"] - elseif prop == 'border-width' - let values = ["thin", "thick", "medium"] - elseif prop == 'border' - let vals = matchstr(line, '.*:\s*\zs.*') - if vals =~ '^\([a-zA-Z0-9.]\+\)\?$' - let values = ["thin", "thick", "medium"] - elseif vals =~ '^[a-zA-Z0-9.]\+\s\+\([a-zA-Z]\+\)\?$' - let values = ["none", "hidden", "dotted", "dashed", "solid", "double", "groove", "ridge", "inset", "outset"] - elseif vals =~ '^[a-zA-Z0-9.]\+\s\+[a-zA-Z]\+\s\+\([a-zA-Z(]\+\)\?$' - let values = ["rgb(", "#", "transparent"] - else - return [] - endif - elseif prop == 'bottom' - let values = ["auto"] - elseif prop == 'caption-side' - let values = ["top", "bottom"] - elseif prop == 'clear' - let values = ["none", "left", "right", "both"] - elseif prop == 'clip' - let values = ["auto", "rect("] - elseif prop == 'color' - let values = ["rgb(", "#"] - elseif prop == 'content' - let values = ["normal", "attr(", "open-quote", "close-quote", "no-open-quote", "no-close-quote"] - elseif prop =~ 'counter-\(increment\|reset\)$' - let values = ["none"] - elseif prop =~ '^\(cue-after\|cue-before\|cue\)$' - let values = ["url(", "none"] - elseif prop == 'cursor' - let values = ["url(", "auto", "crosshair", "default", "pointer", "move", "e-resize", "ne-resize", "nw-resize", "n-resize", "se-resize", "sw-resize", "s-resize", "w-resize", "text", "wait", "help", "progress"] - elseif prop == 'direction' - let values = ["ltr", "rtl"] - elseif prop == 'display' - let values = ["inline", "block", "list-item", "run-in", "inline-block", "table", "inline-table", "table-row-group", "table-header-group", "table-footer-group", "table-row", "table-column-group", "table-column", "table-cell", "table-caption", "none"] - elseif prop == 'elevation' - let values = ["below", "level", "above", "higher", "lower"] - elseif prop == 'empty-cells' - let values = ["show", "hide"] - elseif prop == 'float' - let values = ["left", "right", "none"] - elseif prop == 'font-family' - let values = ["sans-serif", "serif", "monospace", "cursive", "fantasy"] - elseif prop == 'font-size' - let values = ["xx-small", "x-small", "small", "medium", "large", "x-large", "xx-large", "larger", "smaller"] - elseif prop == 'font-style' - let values = ["normal", "italic", "oblique"] - elseif prop == 'font-variant' - let values = ["normal", "small-caps"] - elseif prop == 'font-weight' - let values = ["normal", "bold", "bolder", "lighter", "100", "200", "300", "400", "500", "600", "700", "800", "900"] - elseif prop == 'font' - let values = ["normal", "italic", "oblique", "small-caps", "bold", "bolder", "lighter", "100", "200", "300", "400", "500", "600", "700", "800", "900", "xx-small", "x-small", "small", "medium", "large", "x-large", "xx-large", "larger", "smaller", "sans-serif", "serif", "monospace", "cursive", "fantasy", "caption", "icon", "menu", "message-box", "small-caption", "status-bar"] - elseif prop =~ '^\(height\|width\)$' - let values = ["auto"] - elseif prop =~ '^\(left\|rigth\)$' - let values = ["auto"] - elseif prop == 'letter-spacing' - let values = ["normal"] - elseif prop == 'line-height' - let values = ["normal"] - elseif prop == 'list-style-image' - let values = ["url(", "none"] - elseif prop == 'list-style-position' - let values = ["inside", "outside"] - elseif prop == 'list-style-type' - let values = ["disc", "circle", "square", "decimal", "decimal-leading-zero", "lower-roman", "upper-roman", "lower-latin", "upper-latin", "none"] - elseif prop == 'list-style' + else return [] - elseif prop == 'margin' - let values = ["auto"] - elseif prop =~ 'margin-\(right\|left\|top\|bottom\)$' - let values = ["auto"] - elseif prop == 'max-height' - let values = ["auto"] - elseif prop == 'max-width' - let values = ["none"] - elseif prop == 'min-height' - let values = ["none"] - elseif prop == 'min-width' - let values = ["none"] - elseif prop == 'orphans' + endif + elseif prop =~ 'border-\%(top\|right\|bottom\|left\)-color' + let values = ["rgb(", "#", "transparent"] + elseif prop =~ 'border-\%(top\|right\|bottom\|left\)-style' + let values = ["none", "hidden", "dotted", "dashed", "solid", "double", "groove", "ridge", "inset", "outset"] + elseif prop =~ 'border-\%(top\|right\|bottom\|left\)-width' + let values = ["thin", "thick", "medium"] + elseif prop == 'border-width' + let values = ["thin", "thick", "medium"] + elseif prop == 'border' + let vals = matchstr(line, '.*:\s*\zs.*') + if vals =~ '^\%([a-zA-Z0-9.]\+\)\?$' + let values = ["thin", "thick", "medium"] + elseif vals =~ '^[a-zA-Z0-9.]\+\s\+\%([a-zA-Z]\+\)\?$' + let values = ["none", "hidden", "dotted", "dashed", "solid", "double", "groove", "ridge", "inset", "outset"] + elseif vals =~ '^[a-zA-Z0-9.]\+\s\+[a-zA-Z]\+\s\+\%([a-zA-Z(]\+\)\?$' + let values = ["rgb(", "#", "transparent"] + else return [] - elseif prop == 'outline-color' + endif + elseif prop == 'bottom' + let values = ["auto"] + elseif prop == 'caption-side' + let values = ["top", "bottom"] + elseif prop == 'clear' + let values = ["none", "left", "right", "both"] + elseif prop == 'clip' + let values = ["auto", "rect("] + elseif prop == 'color' + let values = ["rgb(", "#"] + elseif prop == 'content' + let values = ["normal", "attr(", "open-quote", "close-quote", "no-open-quote", "no-close-quote"] + elseif prop =~ 'counter-\%(increment\|reset\)$' + let values = ["none"] + elseif prop =~ '^\%(cue-after\|cue-before\|cue\)$' + let values = ["url(", "none"] + elseif prop == 'cursor' + let values = ["url(", "auto", "crosshair", "default", "pointer", "move", "e-resize", "ne-resize", "nw-resize", "n-resize", "se-resize", "sw-resize", "s-resize", "w-resize", "text", "wait", "help", "progress"] + elseif prop == 'direction' + let values = ["ltr", "rtl"] + elseif prop == 'display' + let values = ["inline", "block", "list-item", "run-in", "inline-block", "table", "inline-table", "table-row-group", "table-header-group", "table-footer-group", "table-row", "table-column-group", "table-column", "table-cell", "table-caption", "none"] + elseif prop == 'elevation' + let values = ["below", "level", "above", "higher", "lower"] + elseif prop == 'empty-cells' + let values = ["show", "hide"] + elseif prop == 'float' + let values = ["left", "right", "none"] + elseif prop == 'font-family' + let values = ["sans-serif", "serif", "monospace", "cursive", "fantasy"] + elseif prop == 'font-size' + let values = ["xx-small", "x-small", "small", "medium", "large", "x-large", "xx-large", "larger", "smaller"] + elseif prop == 'font-style' + let values = ["normal", "italic", "oblique"] + elseif prop == 'font-variant' + let values = ["normal", "small-caps"] + elseif prop == 'font-weight' + let values = ["normal", "bold", "bolder", "lighter", "100", "200", "300", "400", "500", "600", "700", "800", "900"] + elseif prop == 'font' + let values = ["normal", "italic", "oblique", "small-caps", "bold", "bolder", "lighter", "100", "200", "300", "400", "500", "600", "700", "800", "900", "xx-small", "x-small", "small", "medium", "large", "x-large", "xx-large", "larger", "smaller", "sans-serif", "serif", "monospace", "cursive", "fantasy", "caption", "icon", "menu", "message-box", "small-caption", "status-bar"] + elseif prop =~ '^\%(height\|width\)$' + let values = ["auto"] + elseif prop =~ '^\%(left\|rigth\)$' + let values = ["auto"] + elseif prop == 'letter-spacing' + let values = ["normal"] + elseif prop == 'line-height' + let values = ["normal"] + elseif prop == 'list-style-image' + let values = ["url(", "none"] + elseif prop == 'list-style-position' + let values = ["inside", "outside"] + elseif prop == 'list-style-type' + let values = ["disc", "circle", "square", "decimal", "decimal-leading-zero", "lower-roman", "upper-roman", "lower-latin", "upper-latin", "none"] + elseif prop == 'list-style' + return [] + elseif prop == 'margin' + let values = ["auto"] + elseif prop =~ 'margin-\%(right\|left\|top\|bottom\)$' + let values = ["auto"] + elseif prop == 'max-height' + let values = ["auto"] + elseif prop == 'max-width' + let values = ["none"] + elseif prop == 'min-height' + let values = ["none"] + elseif prop == 'min-width' + let values = ["none"] + elseif prop == 'orphans' + return [] + elseif prop == 'outline-color' + let values = ["rgb(", "#"] + elseif prop == 'outline-style' + let values = ["none", "hidden", "dotted", "dashed", "solid", "double", "groove", "ridge", "inset", "outset"] + elseif prop == 'outline-width' + let values = ["thin", "thick", "medium"] + elseif prop == 'outline' + let vals = matchstr(line, '.*:\s*\zs.*') + if vals =~ '^\%([a-zA-Z0-9,()#]\+\)\?$' let values = ["rgb(", "#"] - elseif prop == 'outline-style' + elseif vals =~ '^[a-zA-Z0-9,()#]\+\s\+\%([a-zA-Z]\+\)\?$' let values = ["none", "hidden", "dotted", "dashed", "solid", "double", "groove", "ridge", "inset", "outset"] - elseif prop == 'outline-width' + elseif vals =~ '^[a-zA-Z0-9,()#]\+\s\+[a-zA-Z]\+\s\+\%([a-zA-Z(]\+\)\?$' let values = ["thin", "thick", "medium"] - elseif prop == 'outline' - let vals = matchstr(line, '.*:\s*\zs.*') - if vals =~ '^\([a-zA-Z0-9,()#]\+\)\?$' - let values = ["rgb(", "#"] - elseif vals =~ '^[a-zA-Z0-9,()#]\+\s\+\([a-zA-Z]\+\)\?$' - let values = ["none", "hidden", "dotted", "dashed", "solid", "double", "groove", "ridge", "inset", "outset"] - elseif vals =~ '^[a-zA-Z0-9,()#]\+\s\+[a-zA-Z]\+\s\+\([a-zA-Z(]\+\)\?$' - let values = ["thin", "thick", "medium"] - else - return [] - endif - elseif prop == 'overflow' - let values = ["visible", "hidden", "scroll", "auto"] - elseif prop == 'padding' - return [] - elseif prop =~ 'padding-\(top\|right\|bottom\|left\)$' - return [] - elseif prop =~ 'page-break-\(after\|before\)$' - let values = ["auto", "always", "avoid", "left", "right"] - elseif prop == 'page-break-inside' - let values = ["auto", "avoid"] - elseif prop =~ 'pause-\(after\|before\)$' - return [] - elseif prop == 'pause' - return [] - elseif prop == 'pitch-range' - return [] - elseif prop == 'pitch' - let values = ["x-low", "low", "medium", "high", "x-high"] - elseif prop == 'play-during' - let values = ["url(", "mix", "repeat", "auto", "none"] - elseif prop == 'position' - let values = ["static", "relative", "absolute", "fixed"] - elseif prop == 'quotes' - let values = ["none"] - elseif prop == 'richness' - return [] - elseif prop == 'speak-header' - let values = ["once", "always"] - elseif prop == 'speak-numeral' - let values = ["digits", "continuous"] - elseif prop == 'speak-punctuation' - let values = ["code", "none"] - elseif prop == 'speak' - let values = ["normal", "none", "spell-out"] - elseif prop == 'speech-rate' - let values = ["x-slow", "slow", "medium", "fast", "x-fast", "faster", "slower"] - elseif prop == 'stress' - return [] - elseif prop == 'table-layout' - let values = ["auto", "fixed"] - elseif prop == 'text-align' - let values = ["left", "right", "center", "justify"] - elseif prop == 'text-decoration' - let values = ["none", "underline", "overline", "line-through", "blink"] - elseif prop == 'text-indent' - return [] - elseif prop == 'text-transform' - let values = ["capitalize", "uppercase", "lowercase", "none"] - elseif prop == 'top' - let values = ["auto"] - elseif prop == 'unicode-bidi' - let values = ["normal", "embed", "bidi-override"] - elseif prop == 'vertical-align' - let values = ["baseline", "sub", "super", "top", "text-top", "middle", "bottom", "text-bottom"] - elseif prop == 'visibility' - let values = ["visible", "hidden", "collapse"] - elseif prop == 'voice-family' - return [] - elseif prop == 'volume' - let values = ["silent", "x-soft", "soft", "medium", "loud", "x-loud"] - elseif prop == 'white-space' - let values = ["normal", "pre", "nowrap", "pre-wrap", "pre-line"] - elseif prop == 'widows' + else return [] - elseif prop == 'word-spacing' - let values = ["normal"] - elseif prop == 'z-index' - let values = ["auto"] + endif + elseif prop == 'overflow' + let values = ["visible", "hidden", "scroll", "auto"] + elseif prop == 'padding' + return [] + elseif prop =~ 'padding-\%(top\|right\|bottom\|left\)$' + return [] + elseif prop =~ 'page-break-\%(after\|before\)$' + let values = ["auto", "always", "avoid", "left", "right"] + elseif prop == 'page-break-inside' + let values = ["auto", "avoid"] + elseif prop =~ 'pause-\%(after\|before\)$' + return [] + elseif prop == 'pause' + return [] + elseif prop == 'pitch-range' + return [] + elseif prop == 'pitch' + let values = ["x-low", "low", "medium", "high", "x-high"] + elseif prop == 'play-during' + let values = ["url(", "mix", "repeat", "auto", "none"] + elseif prop == 'position' + let values = ["static", "relative", "absolute", "fixed"] + elseif prop == 'quotes' + let values = ["none"] + elseif prop == 'richness' + return [] + elseif prop == 'speak-header' + let values = ["once", "always"] + elseif prop == 'speak-numeral' + let values = ["digits", "continuous"] + elseif prop == 'speak-punctuation' + let values = ["code", "none"] + elseif prop == 'speak' + let values = ["normal", "none", "spell-out"] + elseif prop == 'speech-rate' + let values = ["x-slow", "slow", "medium", "fast", "x-fast", "faster", "slower"] + elseif prop == 'stress' + return [] + elseif prop == 'table-layout' + let values = ["auto", "fixed"] + elseif prop == 'text-align' + let values = ["left", "right", "center", "justify"] + elseif prop == 'text-decoration' + let values = ["none", "underline", "overline", "line-through", "blink"] + elseif prop == 'text-indent' + return [] + elseif prop == 'text-transform' + let values = ["capitalize", "uppercase", "lowercase", "none"] + elseif prop == 'top' + let values = ["auto"] + elseif prop == 'unicode-bidi' + let values = ["normal", "embed", "bidi-override"] + elseif prop == 'vertical-align' + let values = ["baseline", "sub", "super", "top", "text-top", "middle", "bottom", "text-bottom"] + elseif prop == 'visibility' + let values = ["visible", "hidden", "collapse"] + elseif prop == 'voice-family' + return [] + elseif prop == 'volume' + let values = ["silent", "x-soft", "soft", "medium", "loud", "x-loud"] + elseif prop == 'white-space' + let values = ["normal", "pre", "nowrap", "pre-wrap", "pre-line"] + elseif prop == 'widows' + return [] + elseif prop == 'word-spacing' + let values = ["normal"] + elseif prop == 'z-index' + let values = ["auto"] + else + " If no property match it is possible we are outside of {} and + " trying to complete pseudo-(class|element) + let element = tolower(matchstr(line, '\zs[a-zA-Z1-6]*\ze:[^:[:space:]]\{-}$')) + if stridx(',a,abbr,acronym,address,area,b,base,bdo,big,blockquote,body,br,button,caption,cite,code,col,colgroup,dd,del,dfn,div,dl,dt,em,fieldset,form,head,h1,h2,h3,h4,h5,h6,hr,html,i,img,input,ins,kbd,label,legend,li,link,map,meta,noscript,object,ol,optgroup,option,p,param,pre,q,samp,script,select,small,span,strong,style,sub,sup,table,tbody,td,textarea,tfoot,th,thead,title,tr,tt,ul,var,', ','.element.',') > -1 + let values = ["first-child", "link", "visited", "hover", "active", "focus", "lang", "first-line", "first-letter", "before", "after"] else - " If no property match it is possible we are outside of {} and - " trying to complete pseudo-(class|element) - let element = tolower(matchstr(line, '\zs[a-zA-Z1-6]*\ze:[^:[:space:]]\{-}$')) - if ",a,abbr,acronym,address,area,b,base,bdo,big,blockquote,body,br,button,caption,cite,code,col,colgroup,dd,del,dfn,div,dl,dt,em,fieldset,form,head,h1,h2,h3,h4,h5,h6,hr,html,i,img,input,ins,kbd,label,legend,li,link,map,meta,noscript,object,ol,optgroup,option,p,param,pre,q,samp,script,select,small,span,strong,style,sub,sup,table,tbody,td,textarea,tfoot,th,thead,title,tr,tt,ul,var," =~ ','.element.',' - let values = ["first-child", "link", "visited", "hover", "active", "focus", "lang", "first-line", "first-letter", "before", "after"] - else - return [] - endif + return [] endif + endif - " Complete values - let entered_value = matchstr(line, '.\{-}\zs[a-zA-Z0-9#,.(_-]*$') - - for m in values - if m =~? '^'.entered_value - call add(res, m) - elseif m =~? entered_value - call add(res2, m) - endif - endfor - - return res + res2 - - elseif borders[min(keys(borders))] == 'closebrace' + " Complete values + let entered_value = matchstr(line, '.\{-}\zs[a-zA-Z0-9#,.(_-]*$') - return [] + for m in values + if m =~? '^'.entered_value + call add(res, m) + elseif m =~? entered_value + call add(res2, m) + endif + endfor - elseif borders[min(keys(borders))] == 'exclam' + return res + res2 - " Complete values - let entered_imp = matchstr(line, '.\{-}!\s*\zs[a-zA-Z ]*$') +elseif borders[max(keys(borders))] == 'closebrace' - let values = ["important"] + return [] - for m in values - if m =~? '^'.entered_imp - call add(res, m) - endif - endfor +elseif borders[max(keys(borders))] == 'exclam' - return res + " Complete values + let entered_imp = matchstr(line, '.\{-}!\s*\zs[a-zA-Z ]*$') - elseif borders[min(keys(borders))] == 'atrule' + let values = ["important"] - let afterat = matchstr(line, '.*@\zs.*') + for m in values + if m =~? '^'.entered_imp + call add(res, m) + endif + endfor - if afterat =~ '\s' + return res - let atrulename = matchstr(line, '.*@\zs[a-zA-Z-]\+\ze') +elseif borders[max(keys(borders))] == 'atrule' - if atrulename == 'media' - let values = ["screen", "tty", "tv", "projection", "handheld", "print", "braille", "aural", "all"] + let afterat = matchstr(line, '.*@\zs.*') - let atruleafterbase = matchstr(line, '.*@media\s\+\ze.*$') - let entered_atruleafter = matchstr(line, '.*@media\s\+\zs.*$') + if afterat =~ '\s' - elseif atrulename == 'import' - let atruleafterbase = matchstr(line, '.*@import\s\+\ze.*$') - let entered_atruleafter = matchstr(line, '.*@import\s\+\zs.*$') + let atrulename = matchstr(line, '.*@\zs[a-zA-Z-]\+\ze') - if entered_atruleafter =~ "^[\"']" - let filestart = matchstr(entered_atruleafter, '^.\zs.*') - let files = split(glob(filestart.'*'), '\n') - let values = map(copy(files), '"\"".v:val') + if atrulename == 'media' + let values = ["screen", "tty", "tv", "projection", "handheld", "print", "braille", "aural", "all"] - elseif entered_atruleafter =~ "^url(" - let filestart = matchstr(entered_atruleafter, "^url([\"']\\?\\zs.*") - let files = split(glob(filestart.'*'), '\n') - let values = map(copy(files), '"url(".v:val') + let atruleafterbase = matchstr(line, '.*@media\s\+\ze.*$') + let entered_atruleafter = matchstr(line, '.*@media\s\+\zs.*$') - else - let values = ['"', 'url('] + elseif atrulename == 'import' + let atruleafterbase = matchstr(line, '.*@import\s\+\ze.*$') + let entered_atruleafter = matchstr(line, '.*@import\s\+\zs.*$') - endif + if entered_atruleafter =~ "^[\"']" + let filestart = matchstr(entered_atruleafter, '^.\zs.*') + let files = split(glob(filestart.'*'), '\n') + let values = map(copy(files), '"\"".v:val') + elseif entered_atruleafter =~ "^url(" + let filestart = matchstr(entered_atruleafter, "^url([\"']\\?\\zs.*") + let files = split(glob(filestart.'*'), '\n') + let values = map(copy(files), '"url(".v:val') + else - return [] + let values = ['"', 'url('] endif - for m in values - if m =~? '^'.entered_atruleafter - call add(res, m) - elseif m =~? entered_atruleafter - call add(res2, m) - endif - endfor - - return res + res2 + else + return [] endif - let values = ["charset", "page", "media", "import", "font-face"] - - let entered_atrule = matchstr(line, '.*@\zs[a-zA-Z-]*$') - for m in values - if m =~? '^'.entered_atrule - call add(res, m .' ') - elseif m =~? entered_atrule - call add(res2, m .' ') + if m =~? '^'.entered_atruleafter + call add(res, m) + elseif m =~? entered_atruleafter + call add(res2, m) endif endfor @@ -424,7 +409,22 @@ else endif - return [] + let values = ["charset", "page", "media", "import", "font-face"] + + let entered_atrule = matchstr(line, '.*@\zs[a-zA-Z-]*$') + + for m in values + if m =~? '^'.entered_atrule + call add(res, m .' ') + elseif m =~? entered_atrule + call add(res2, m .' ') + endif + endfor + + return res + res2 + +endif + +return [] - endif endfunction diff --git a/runtime/autoload/decada.vim b/runtime/autoload/decada.vim new file mode 100644 index 000000000..9f8aaf260 --- /dev/null +++ b/runtime/autoload/decada.vim @@ -0,0 +1,75 @@ +"------------------------------------------------------------------------------ +" Description: Vim Ada/Dec Ada compiler file +" Language: Ada (Dec Ada) +" $Id$ +" Copyright: Copyright (C) 2006 Martin Krischik +" Maintainer: Martin Krischik +" $Author$ +" $Date$ +" Version: 4.2 +" $Revision$ +" $HeadURL: https://svn.sourceforge.net/svnroot/gnuada/trunk/tools/vim/autoload/decada.vim $ +" History: 21.07.2006 MK New Dec Ada +" 15.10.2006 MK Bram's suggestion for runtime integration +" 05.11.2006 MK Bram suggested not to use include protection for +" autoload +" 05.11.2006 MK Bram suggested to save on spaces +" Help Page: compiler-decada +"------------------------------------------------------------------------------ + +if version < 700 + finish +endif + +function decada#Unit_Name () dict " {{{1 + " Convert filename into acs unit: + " 1: remove the file extenstion. + " 2: replace all double '_' or '-' with an dot (which denotes a separate) + " 3: remove a trailing '_' (wich denotes a specification) + return substitute (substitute (expand ("%:t:r"), '__\|-', ".", "g"), '_$', "", '') +endfunction decada#Unit_Name " }}}1 + +function decada#Make () dict " {{{1 + let l:make_prg = substitute (g:self.Make_Command, '%<', self.Unit_Name(), '') + let &errorformat = g:self.Error_Format + let &makeprg = l:make_prg + wall + make + copen + set wrap + wincmd W +endfunction decada#Build " }}}1 + +function decada#Set_Session (...) dict " {{{1 + if a:0 > 0 + call ada#Switch_Session (a:1) + elseif argc() == 0 && strlen (v:servername) > 0 + call ada#Switch_Session ( + \ expand('~')[0:-2] . ".vimfiles.session]" . + \ v:servername . ".vim") + endif + return +endfunction decada#Set_Session " }}}1 + +function decada#New () " }}}1 + let Retval = { + \ 'Make' : function ('decada#Make'), + \ 'Unit_Name' : function ('decada#Unit_Name'), + \ 'Set_Session' : function ('decada#Set_Session'), + \ 'Project_Dir' : '', + \ 'Make_Command' : 'ACS COMPILE /Wait /Log /NoPreLoad /Optimize=Development /Debug %<', + \ 'Error_Format' : '%+A%%ADAC-%t-%m,%C %#%m,%Zat line number %l in file %f,' . + \ '%+I%%ada-I-%m,%C %#%m,%Zat line number %l in file %f'} + + return Retval +endfunction decada#New " }}}1 + +finish " 1}}} + +"------------------------------------------------------------------------------ +" Copyright (C) 2006 Martin Krischik +" +" Vim is Charityware - see ":help license" or uganda.txt for licence details. +"------------------------------------------------------------------------------ +" vim: textwidth=78 wrap tabstop=8 shiftwidth=3 softtabstop=3 noexpandtab +" vim: foldmethod=marker diff --git a/runtime/autoload/getscript.vim b/runtime/autoload/getscript.vim new file mode 100644 index 000000000..bfe057cc3 --- /dev/null +++ b/runtime/autoload/getscript.vim @@ -0,0 +1,501 @@ +" --------------------------------------------------------------------- +" getscript.vim +" Author: Charles E. Campbell, Jr. +" Date: Nov 27, 2006 +" Version: 23 +" Installing: :help glvs-install +" Usage: :help glvs +" +" GetLatestVimScripts: 642 1 :AutoInstall: getscript.vim +" --------------------------------------------------------------------- +" Initialization: {{{1 +" if you're sourcing this file, surely you can't be +" expecting vim to be in its vi-compatible mode +if &cp + echoerr "GetLatestVimScripts is not vi-compatible; not loaded (you need to set nocp)" + finish +endif +let s:keepfo = &fo +let s:keepcpo = &cpo +set cpo&vim + +if exists("g:loaded_getscript") + finish +endif +let g:loaded_getscript= "v23" + +" --------------------------------------------------------------------- +" Global Variables: {{{1 +" allow user to change the command for obtaining scripts (does fetch work?) +if !exists("g:GetLatestVimScripts_wget") + if executable("wget") + let g:GetLatestVimScripts_wget= "wget" + elseif executable("curl") + let g:GetLatestVimScripts_wget= "curl" + else + let g:GetLatestVimScripts_wget = 'echo "GetLatestVimScripts needs wget or curl"' + let g:GetLatestVimScripts_options = "" + endif +endif + +" options that wget and curl require: +if !exists("g:GetLatestVimScripts_options") + if g:GetLatestVimScripts_wget == "wget" + let g:GetLatestVimScripts_options= "-q -O" + elseif g:GetLatestVimScripts_wget == "curl" + let g:GetLatestVimScripts_options= "-s -O" + else + let g:GetLatestVimScripts_options= "" + endif +endif + +" by default, allow autoinstall lines to work +if !exists("g:GetLatestVimScripts_allowautoinstall") + let g:GetLatestVimScripts_allowautoinstall= 1 +endif + +"" For debugging: +"let g:GetLatestVimScripts_wget = "echo" +"let g:GetLatestVimScripts_options = "options" + +" --------------------------------------------------------------------- +" Check If AutoInstall Capable: {{{1 +let s:autoinstall= "" +if g:GetLatestVimScripts_allowautoinstall + + if (has("win32") || has("gui_win32") || has("gui_win32s") || has("win16") || has("win64") || has("win32unix") || has("win95")) && &shell != "bash" + " windows (but not cygwin/bash) + let s:dotvim= "vimfiles" + if !exists("g:GetLatestVimScripts_mv") + let g:GetLatestVimScripts_mv= "ren" + endif + + else + " unix + let s:dotvim= ".vim" + if !exists("g:GetLatestVimScripts_mv") + let g:GetLatestVimScripts_mv= "mv" + endif + endif + + if exists('$HOME') && isdirectory(expand("$HOME")."/".s:dotvim) + let s:autoinstall= $HOME."/".s:dotvim + endif +" call Decho("s:autoinstall<".s:autoinstall.">") +"else "Decho +" call Decho("g:GetLatestVimScripts_allowautoinstall=".g:GetLatestVimScripts_allowautoinstall.": :AutoInstall: disabled") +endif + +" --------------------------------------------------------------------- +" Public Interface: {{{1 +com! -nargs=0 GetLatestVimScripts call getscript#GetLatestVimScripts() +com! -nargs=0 GetScript call getscript#GetLatestVimScripts() +silent! com -nargs=0 GLVS call getscript#GetLatestVimScripts() + +" --------------------------------------------------------------------- +" GetOneScript: (Get Latest Vim Script) this function operates {{{1 +" on the current line, interpreting two numbers and text as +" ScriptID, SourceID, and Filename. +" It downloads any scripts that have newer versions from vim.sf.net. +fun! s:GetOneScript(...) +" call Dfunc("GetOneScript()") + + " set options to allow progress to be shown on screen + let t_ti= &t_ti + let t_te= &t_te + let rs = &rs + set t_ti= t_te= nors + + " put current line on top-of-screen and interpret it into + " a script identifer : used to obtain webpage + " source identifier : used to identify current version + " and an associated comment: used to report on what's being considered + if a:0 >= 3 + let scriptid = a:1 + let srcid = a:2 + let fname = a:3 + let cmmnt = "" +" call Decho("scriptid<".scriptid.">") +" call Decho("srcid <".srcid.">") +" call Decho("fname <".fname.">") + else + let curline = getline(".") + if curline =~ '^\s*#' +" call Dret("GetOneScript : skipping a pure comment line") + return + endif + let parsepat = '^\s*\(\d\+\)\s\+\(\d\+\)\s\+\(.\{-}\)\(\s*#.*\)\=$' + try + let scriptid = substitute(curline,parsepat,'\1','e') + catch /^Vim\%((\a\+)\)\=:E486/ + let scriptid= 0 + endtry + try + let srcid = substitute(curline,parsepat,'\2','e') + catch /^Vim\%((\a\+)\)\=:E486/ + let srcid= 0 + endtry + try + let fname= substitute(curline,parsepat,'\3','e') + catch /^Vim\%((\a\+)\)\=:E486/ + let fname= "" + endtry + try + let cmmnt= substitute(curline,parsepat,'\4','e') + catch /^Vim\%((\a\+)\)\=:E486/ + let cmmnt= "" + endtry +" call Decho("curline <".curline.">") +" call Decho("parsepat<".parsepat.">") +" call Decho("scriptid<".scriptid.">") +" call Decho("srcid <".srcid.">") +" call Decho("fname <".fname.">") + endif + + if scriptid == 0 || srcid == 0 + " When looking for :AutoInstall: lines, skip scripts that + " have 0 0 scriptname +" call Dret("GetOneScript : skipping a scriptid==srcid==0 line") + return + endif + + let doautoinstall= 0 + if fname =~ ":AutoInstall:" +" call Decho("fname<".fname."> has :AutoInstall:...") + let aicmmnt= substitute(fname,'\s\+:AutoInstall:\s\+',' ','') +" call Decho("aicmmnt<".aicmmnt."> s:autoinstall=".s:autoinstall) + if s:autoinstall != "" + let doautoinstall = g:GetLatestVimScripts_allowautoinstall + endif + else + let aicmmnt= fname + endif +" call Decho("aicmmnt<".aicmmnt.">: doautoinstall=".doautoinstall) + + exe "norm z\" + redraw! +" call Decho('considering <'.aicmmnt.'> scriptid='.scriptid.' srcid='.srcid) + echomsg 'considering <'.aicmmnt.'> scriptid='.scriptid.' srcid='.srcid + + " grab a copy of the plugin's vim.sf.net webpage + let scriptaddr = 'http://vim.sf.net/script.php?script_id='.scriptid + let tmpfile = tempname() + let v:errmsg = "" + + " make three tries at downloading the description + let itry= 1 + while itry <= 3 +" call Decho("try#".itry." to download description of <".aicmmnt."> with addr=".scriptaddr) + if has("win32") || has("win16") || has("win95") +" call Decho("silent !".g:GetLatestVimScripts_wget." ".g:GetLatestVimScripts_options." ".tmpfile.' "'.scriptaddr.'"') + exe "silent !".g:GetLatestVimScripts_wget." ".g:GetLatestVimScripts_options." ".tmpfile.' "'.scriptaddr.'"' + else +" call Decho("silent !".g:GetLatestVimScripts_wget." ".g:GetLatestVimScripts_options." ".tmpfile." '".scriptaddr."'") + exe "silent !".g:GetLatestVimScripts_wget." ".g:GetLatestVimScripts_options." ".tmpfile." '".scriptaddr."'" + endif + if itry == 1 + exe "silent vsplit ".tmpfile + else + silent! e % + endif + + " find the latest source-id in the plugin's webpage + silent! 1 + let findpkg= search('Click on the package to download','W') + if findpkg > 0 + break + endif + let itry= itry + 1 + endwhile +" call Decho(" --- end downloading tries while loop --- itry=".itry) + + " testing: did finding /Click on the package.../ fail? + if findpkg == 0 || itry >= 4 + silent q! + call delete(tmpfile) + " restore options + let &t_ti = t_ti + let &t_te = t_te + let &rs = rs + let s:downerrors = s:downerrors + 1 +" call Decho("***warning*** couldn'".'t find "Click on the package..." in description page for <'.aicmmnt.">") + echomsg "***warning*** couldn'".'t find "Click on the package..." in description page for <'.aicmmnt.">" +" call Dret("GetOneScript : srch for /Click on the package/ failed") + return + endif +" call Decho('found "Click on the package to download"') + + let findsrcid= search('src_id=','W') + if findsrcid == 0 + silent q! + call delete(tmpfile) + " restore options + let &t_ti = t_ti + let &t_te = t_te + let &rs = rs + let s:downerrors = s:downerrors + 1 +" call Decho("***warning*** couldn'".'t find "src_id=" in description page for <'.aicmmnt.">") + echomsg "***warning*** couldn'".'t find "src_id=" in description page for <'.aicmmnt.">" +" call Dret("GetOneScript : srch for /src_id/ failed") + return + endif +" call Decho('found "src_id=" in description page') + + let srcidpat = '^\s*\([^<]\+\)<.*$' + let latestsrcid= substitute(getline("."),srcidpat,'\1','') + let fname = substitute(getline("."),srcidpat,'\2','') +" call Decho("srcidpat<".srcidpat."> latestsrcid<".latestsrcid."> fname<".fname.">") + silent q! + call delete(tmpfile) + + " convert the strings-of-numbers into numbers + let srcid = srcid + 0 + let latestsrcid = latestsrcid + 0 +" call Decho("srcid=".srcid." latestsrcid=".latestsrcid." fname<".fname.">") + + " has the plugin's most-recent srcid increased, which indicates + " that it has been updated + if latestsrcid > srcid + let s:downloads= s:downloads + 1 + if fname == bufname("%") + " GetLatestVimScript has to be careful about downloading itself + let fname= "NEW_".fname + endif + + " the plugin has been updated since we last obtained it, so download a new copy +" call Decho("...downloading new <".fname.">") + echomsg "...downloading new <".fname.">" + if has("win32") || has("gui_win32") || has("gui_win32s") || has("win16") || has("win64") || has("win32unix") || has("win95") +" call Decho("windows: silent !".g:GetLatestVimScripts_wget." ".g:GetLatestVimScripts_options." ".fname.' "'.'http://vim.sf.net/scripts/download_script.php?src_id='.latestsrcid.'"') + exe "silent !".g:GetLatestVimScripts_wget." ".g:GetLatestVimScripts_options." ".fname.' "'.'http://vim.sf.net/scripts/download_script.php?src_id='.latestsrcid.'"' + else +" call Decho("unix: silent !".g:GetLatestVimScripts_wget." ".g:GetLatestVimScripts_options." ".fname." '".'http://vim.sf.net/scripts/download_script.php?src_id='.latestsrcid."'") + exe "silent !".g:GetLatestVimScripts_wget." ".g:GetLatestVimScripts_options." ".fname." '".'http://vim.sf.net/scripts/download_script.php?src_id='.latestsrcid."'" + endif + + " AutoInstall: only if doautoinstall is so indicating + if doautoinstall +" call Decho("attempting to do autoinstall: getcwd<".getcwd()."> filereadable(".fname.")=".filereadable(fname)) + if filereadable(fname) +" call Decho("move <".fname."> to ".s:autoinstall) +" call Decho("DISABLED for testing") + exe "silent !".g:GetLatestVimScripts_mv." ".fname." ".s:autoinstall + let curdir= escape(substitute(getcwd(),'\','/','ge'),"|[]*'\" #") + exe "cd ".s:autoinstall + if fname =~ '\.bz2$' +" call Decho("attempt to bunzip2 ".fname) + exe "silent !bunzip2 ".fname + let fname= substitute(fname,'\.bz2$','','') + elseif fname =~ '\.gz$' +" call Decho("attempt to gunzip ".fname) + exe "silent !gunzip ".fname + let fname= substitute(fname,'\.gz$','','') + endif + if fname =~ '\.zip$' +" call Decho("attempt to unzip ".fname) + exe "silent !unzip -o".fname + elseif fname =~ '\.tar$' +" call Decho("attempt to untar ".fname) + exe "silent !tar -xvf ".fname + elseif fname =~ '\.vba$' +" call Decho("attempt to handle a vimball: ".fname) + 1split + exe "e ".fname + so % + q + endif + if fname =~ '.vim$' +" call Decho("attempt to simply move ".fname." to plugin") + exe "silent !".g:GetLatestVimScripts_mv." ".fname." plugin" + endif + let docdir= substitute(&rtp,',.*','','e')."/doc" +" call Decho("helptags docdir<".docdir.">") + exe "helptags ".docdir + exe "cd ".curdir + endif + endif + + " update the data in the file + let modline=scriptid." ".latestsrcid." ".fname.cmmnt + call setline(line("."),modline) +" call Decho("modline<".modline."> (updated GetLatestVimScripts.dat file)") + endif + + " restore options + let &t_ti= t_ti + let &t_te= t_te + let &rs = rs + +" call Dret("GetOneScript") +endfun + +" --------------------------------------------------------------------- +" GetLatestVimScripts: this function gets the latest versions of {{{1 +" scripts based on the list in +" (first dir in runtimepath)/GetLatest/GetLatestVimScripts.dat +fun! getscript#GetLatestVimScripts() +" call Dfunc("GetLatestVimScripts() autoinstall<".s:autoinstall.">") + +" insure that wget is executable + if executable(g:GetLatestVimScripts_wget) != 1 + echoerr "GetLatestVimScripts needs ".g:GetLatestVimScripts_wget." which apparently is not available on your system" +" call Dret("GetLatestVimScripts : wget not executable/availble") + return + endif + + " Find the .../GetLatest subdirectory under the runtimepath + for datadir in split(&rtp,',') + [''] + if isdirectory(datadir."/GetLatest") +" call Decho("found directory<".datadir.">") + let datadir= datadir . "/GetLatest" + break + endif + if filereadable(datadir."GetLatestVimScripts.dat") +" call Decho("found ".datadir."/GetLatestVimScripts.dat") + break + endif + endfor + " Sanity checks: readability and writability + if datadir == "" + echoerr 'Missing "GetLatest/" on your runtimepath - see :help glvs-dist-install' +" call Dret("GetLatestVimScripts : unable to find a GetLatest subdirectory") + return + endif + + if filewritable(datadir) != 2 + echoerr "(getLatestVimScripts) Your ".datadir." isn't writable" +" call Dret("GetLatestVimScripts : non-writable directory<".datadir.">") + return + endif + let datafile= datadir."/GetLatestVimScripts.dat" + if !filereadable(datafile) + echoerr "Your data file<".datafile."> isn't readable" +" call Dret("GetLatestVimScripts : non-readable datafile<".datafile.">") + return + endif + if !filewritable(datafile) + echoerr "Your data file<".datafile."> isn't writable" +" call Dret("GetLatestVimScripts : non-writable datafile<".datafile.">") + return + endif +" call Decho("datadir <".datadir.">") +" call Decho("datafile <".datafile.">") + + " don't let any events interfere (like winmanager's, taglist's, etc) + let eikeep= &ei + set ei=all + + " record current directory, change to datadir, open split window with + " datafile + let origdir= getcwd() + exe "cd ".escape(substitute(datadir,'\','/','ge'),"|[]*'\" #") + split + exe "e ".escape(substitute(datafile,'\','/','ge'),"|[]*'\" #") + res 1000 + let s:downloads = 0 + let s:downerrors= 0 + + " Check on dependencies mentioned in plugins +" call Decho(" ") +" call Decho("searching plugins for GetLatestVimScripts dependencies") + let lastline = line("$") + let plugins = globpath(&rtp,"plugin/*.vim") + let foundscript = 0 + +" call Decho("plugins<".plugins."> lastline#".lastline) + while plugins != "" + let plugin = substitute(plugins,'\n.*$','','e') + let plugins= (plugins =~ '\n')? substitute(plugins,'^.\{-}\n\(.*\)$','\1','e') : "" + $ +" call Decho(".dependency checking<".plugin."> line$=".line("$")) + exe "silent r ".plugin + while search('^"\s\+GetLatestVimScripts:\s\+\d\+\s\+\d\+','W') != 0 + let newscript= substitute(getline("."),'^"\s\+GetLatestVimScripts:\s\+\d\+\s\+\d\+\s\+\(.*\)$','\1','e') + let llp1 = lastline+1 + + if newscript !~ '^"' + " found a "GetLatestVimScripts: # #" line in the script; check if its already in the datafile + let curline = line(".") + let noai_script = substitute(newscript,'\s*:AutoInstall:\s*','','e') + exe llp1 + let srchline = search('\<'.noai_script.'\>','bW') +" call Decho("..newscript<".newscript."> noai_script<".noai_script."> srch=".srchline." lastline=".lastline) + + if srchline == 0 + " found a new script to permanently include in the datafile + let keep_rega = @a + let @a = substitute(getline(curline),'^"\s\+GetLatestVimScripts:\s\+','','') + exe lastline."put a" + echomsg "Appending <".@a."> to ".datafile." for ".newscript +" call Decho("..APPEND (".noai_script.")<".@a."> to GetLatestVimScripts.dat") + let @a = keep_rega + let lastline = llp1 + let curline = curline + 1 + let foundscript = foundscript + 1 +" else " Decho +" call Decho("..found <".noai_script."> (already in datafile at line#".srchline.")") + endif + + let curline = curline + 1 + exe curline + endif + + endwhile + let llp1= lastline + 1 +" call Decho(".deleting lines: ".llp1.",$d") + exe "silent! ".llp1.",$d" + endwhile + + if foundscript == 0 + set nomod + endif + + " Check on out-of-date scripts using GetLatest/GetLatestVimScripts.dat + set lz +" call Decho(" --- end of dependency checking loop --- ") +" call Decho("call GetOneScript on lines at end of datafile<".datafile.">") + 1 + /^-----/,$g/^\s*\d/call GetOneScript() + + " Final report (an echomsg) + try + silent! ?^-------? + catch /^Vim\%((\a\+)\)\=:E114/ +" call Dret("GetLatestVimScripts : nothing done!") + return + endtry + exe "norm! kz\" + redraw! + let s:msg = "" + if s:downloads == 1 + let s:msg = "Downloaded one updated script to <".datadir.">" + elseif s:downloads == 2 + let s:msg= "Downloaded two updated scripts to <".datadir.">" + elseif s:downloads > 1 + let s:msg= "Downloaded ".s:downloads." updated scripts to <".datadir.">" + else + let s:msg= "Everything was already current" + endif + if s:downerrors > 0 + let s:msg= s:msg." (".s:downerrors." downloading errors)" + endif + echomsg s:msg + " save the file + if &mod + silent! w! + endif + q + + " restore events and current directory + exe "cd ".escape(substitute(origdir,'\','/','ge'),"|[]*'\" #") + let &ei= eikeep + set nolz +" call Dret("GetLatestVimScripts : did ".s:downloads." downloads") +endfun +" --------------------------------------------------------------------- + +" Restore Options: {{{1 +let &fo = s:keepfo +let &cpo= s:keepcpo + +" vim: ts=8 sts=2 fdm=marker nowrap diff --git a/runtime/autoload/netrw.vim b/runtime/autoload/netrw.vim index a2f7efc02..6e80a6926 100644 --- a/runtime/autoload/netrw.vim +++ b/runtime/autoload/netrw.vim @@ -1,10 +1,10 @@ -" netrw.vim: Handles file transfer and remote directory listing across a network -" AUTOLOAD PORTION -" Date: May 02, 2006 -" Version: 98 -" Maintainer: Charles E Campbell, Jr +" netrw.vim: Handles file transfer and remote directory listing across +" AUTOLOAD SECTION +" Date: Mar 21, 2007 +" Version: 108 +" Maintainer: Charles E Campbell, Jr " GetLatestVimScripts: 1075 1 :AutoInstall: netrw.vim -" Copyright: Copyright (C) 1999-2005 Charles E. Campbell, Jr. {{{1 +" Copyright: Copyright (C) 1999-2007 Charles E. Campbell, Jr. {{{1 " Permission is hereby granted to use and distribute this code, " with or without modifications, provided that this copyright " notice is copied with it. Like anything else that's free, @@ -14,28 +14,52 @@ " in no event will the copyright holder be liable for any damages " resulting from the use of this software. " of this software. +" COMBAK: worked with tmpfile s:GetTempname() in NetRead() NetWrite() +" !!NEEDS DEBUGGING && TESTING!!! +"redraw!|call inputsave()|call input("Press to continue")|call inputrestore() " " But be doers of the Word, and not only hearers, deluding your own selves {{{1 " (James 1:22 RSV) " =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- - -" Exception for &cp: {{{1 +" Load Once: {{{1 if &cp || exists("g:loaded_netrw") finish endif -let g:loaded_netrw = "v98" +if !exists("s:NOTE") + let s:NOTE = 0 + let s:WARNING = 1 + let s:ERROR = 2 +endif +let g:loaded_netrw = "v108" if v:version < 700 - echohl WarningMsg | echo "***netrw*** you need vim version 7.0 or later for version ".g:loaded_netrw." of netrw" | echohl None + call netrw#ErrorMsg(s:WARNING,"you need vim version 7.0 or later for version ".g:loaded_netrw." of netrw",1) finish endif let s:keepcpo= &cpo -set cpo&vim -" call Decho("doing autoload/netrw.vim") +setlocal cpo&vim +"DechoTabOn +"call Decho("doing autoload/netrw.vim version ".g:loaded_netrw) " ====================== " Netrw Variables: {{{1 " ====================== +" --------------------------------------------------------------------- +" Netrw Constants: {{{2 +if !exists("g:NETRW_BOOKMARKMAX") + let g:NETRW_BOOKMARKMAX= 0 +endif +if !exists("g:NETRW_DIRHIST_CNT") + let g:NETRW_DIRHIST_CNT= 0 +endif +if !exists("s:LONGLIST") + let s:THINLIST = 0 + let s:LONGLIST = 1 + let s:WIDELIST = 2 + let s:TREELIST = 3 + let s:MAXLIST = 4 +endif + " --------------------------------------------------------------------- " Default values for netrw's global protocol variables {{{2 if !exists("g:netrw_dav_cmd") @@ -52,7 +76,9 @@ if !exists("g:netrw_ftp_cmd") let g:netrw_ftp_cmd = "ftp" endif if !exists("g:netrw_http_cmd") - if executable("wget") + if executable("curl") + let g:netrw_http_cmd = "curl -o" + elseif executable("wget") let g:netrw_http_cmd = "wget -q -O" elseif executable("fetch") let g:netrw_http_cmd = "fetch -o" @@ -82,7 +108,7 @@ if (has("win32") || has("win95") || has("win64") || has("win16")) \ && executable( $SystemRoot .'/system32/rcp.exe') let s:netrw_has_nt_rcp = 1 let s:netrw_rcpmode = '-b' - else +else let s:netrw_has_nt_rcp = 0 let s:netrw_rcpmode = '' endif @@ -91,17 +117,20 @@ endif " Default values for netrw's global variables {{{2 " Default values - a-c ---------- {{{3 if !exists("g:netrw_alto") - let g:netrw_alto= 0 + let g:netrw_alto= &sb endif if !exists("g:netrw_altv") - let g:netrw_altv= 0 + let g:netrw_altv= &spr endif if !exists("g:netrw_browse_split") let g:netrw_browse_split= 0 endif +if !exists("g:netrw_chgwin") + let g:netrw_chgwin = -1 +endif if !exists("g:netrw_cygwin") if has("win32") || has("win95") || has("win64") || has("win16") - if &shell == "bash" + if &shell =~ '\%(\\|\\)\%(\.exe\)\=$' let g:netrw_cygwin= 1 else let g:netrw_cygwin= 0 @@ -109,6 +138,8 @@ if !exists("g:netrw_cygwin") else let g:netrw_cygwin= 0 endif +else + let g:netrw_cygwin= 0 endif " Default values - d-f ---------- {{{3 if !exists("g:NETRW_DIRHIST_CNT") @@ -121,10 +152,14 @@ if !exists("g:netrw_ftp_browse_reject") let g:netrw_ftp_browse_reject='^total\s\+\d\+$\|^Trying\s\+\d\+.*$\|^KERBEROS_V\d rejected\|^Security extensions not\|No such file\|: connect to address [0-9a-fA-F:]*: No route to host$' endif if !exists("g:netrw_ftp_list_cmd") - if has("unix") || exists("g:netrw_cygwin") - let g:netrw_ftp_list_cmd= "ls -lF" + if has("unix") || (exists("g:netrw_cygwin") && g:netrw_cygwin) + let g:netrw_ftp_list_cmd = "ls -lF" + let g:netrw_ftp_timelist_cmd = "ls -tlF" + let g:netrw_ftp_sizelist_cmd = "ls -slF" else - let g:netrw_ftp_list_cmd= "dir" + let g:netrw_ftp_list_cmd = "dir" + let g:netrw_ftp_timelist_cmd = "dir" + let g:netrw_ftp_sizelist_cmd = "dir" endif endif if !exists("g:netrw_ftpmode") @@ -134,15 +169,28 @@ endif if !exists("g:netrw_hide") let g:netrw_hide= 1 endif +if !exists("g:netrw_ignorenetrc") + if &shell =~ '\c\<\%(cmd\|4nt\)\.exe$' + let g:netrw_ignorenetrc= 1 + else + let g:netrw_ignorenetrc= 0 + endif +endif if !exists("g:netrw_keepdir") let g:netrw_keepdir= 1 endif if !exists("g:netrw_list_cmd") - if executable(g:netrw_ssh_cmd) + if g:netrw_scp_cmd =~ '^pscp' && executable("pscp") + " provide a 'pscp' listing command + if (has("win32") || has("win95") || has("win64") || has("win16")) && filereadable("c:\\private.ppk") + let g:netrw_scp_cmd ="pscp -i C:\\private.ppk" + endif + let g:netrw_list_cmd= g:netrw_scp_cmd." -ls USEPORT HOSTNAME:" + elseif executable(g:netrw_ssh_cmd) " provide a default listing command - let g:netrw_list_cmd= g:netrw_ssh_cmd." HOSTNAME ls -FLa" + let g:netrw_list_cmd= g:netrw_ssh_cmd." USEPORT HOSTNAME ls -FLa" else -" call Decho(g:netrw_ssh_cmd." is not executable, can't do remote directory exploring") +" call Decho(g:netrw_ssh_cmd." is not executable") let g:netrw_list_cmd= "" endif endif @@ -156,34 +204,37 @@ endif if !exists("g:netrw_local_rmdir") let g:netrw_local_rmdir= "rmdir" endif -if !exists("g:netrw_longlist") - let g:netrw_longlist= 0 +if !exists("g:netrw_liststyle") + let g:netrw_liststyle= s:THINLIST endif -if g:netrw_longlist < 0 || g:netrw_longlist > 2 +if g:netrw_liststyle < 0 || g:netrw_liststyle >= s:MAXLIST " sanity check - let g:netrw_longlist= 0 + let g:netrw_liststyle= s:THINLIST endif -if g:netrw_longlist == 1 +if g:netrw_liststyle == s:LONGLIST && g:netrw_scp_cmd !~ '^pscp' let g:netrw_list_cmd= g:netrw_list_cmd." -l" endif " Default values - m-r ---------- {{{3 if !exists("g:netrw_maxfilenamelen") let g:netrw_maxfilenamelen= 32 endif +if !exists("g:netrw_menu") + let g:netrw_menu= 1 +endif if !exists("g:netrw_mkdir_cmd") - let g:netrw_mkdir_cmd= g:netrw_ssh_cmd." HOSTNAME mkdir" + let g:netrw_mkdir_cmd= g:netrw_ssh_cmd." USEPORT HOSTNAME mkdir" endif if !exists("g:netrw_rename_cmd") - let g:netrw_rename_cmd= g:netrw_ssh_cmd." HOSTNAME mv" + let g:netrw_rename_cmd= g:netrw_ssh_cmd." USEPORT HOSTNAME mv" endif if !exists("g:netrw_rm_cmd") - let g:netrw_rm_cmd = g:netrw_ssh_cmd." HOSTNAME rm" + let g:netrw_rm_cmd = g:netrw_ssh_cmd." USEPORT HOSTNAME rm" endif if !exists("g:netrw_rmdir_cmd") - let g:netrw_rmdir_cmd = g:netrw_ssh_cmd." HOSTNAME rmdir" + let g:netrw_rmdir_cmd = g:netrw_ssh_cmd." USEPORT HOSTNAME rmdir" endif if !exists("g:netrw_rmf_cmd") - let g:netrw_rmf_cmd = g:netrw_ssh_cmd." HOSTNAME rm -f" + let g:netrw_rmf_cmd = g:netrw_ssh_cmd." USEPORT HOSTNAME rm -f" endif " Default values - s ---------- {{{3 if exists("g:netrw_silent") && g:netrw_silent != 0 @@ -194,6 +245,20 @@ endif if !exists("g:netrw_fastbrowse") let g:netrw_fastbrowse= 1 endif +if !exists("g:netrw_shq") + if exists("&shq") && &shq != "" + let g:netrw_shq= &shq + elseif has("win32") || has("win95") || has("win64") || has("win16") + if g:netrw_cygwin + let g:netrw_shq= "'" + else + let g:netrw_shq= '"' + endif + else + let g:netrw_shq= "'" + endif +" call Decho("g:netrw_shq<".g:netrw_shq.">") +endif if !exists("g:netrw_sort_by") " alternatives: date size let g:netrw_sort_by= "name" @@ -203,15 +268,25 @@ if !exists("g:netrw_sort_direction") let g:netrw_sort_direction= "normal" endif if !exists("g:netrw_sort_sequence") - let g:netrw_sort_sequence= '[\/]$,*,\.bak$,\.o$,\.h$,\.info$,\.swp$,\.obj$' + let g:netrw_sort_sequence= '[\/]$,\.h$,\.c$,\.cpp$,\.[a-np-z]$,*,\.info$,\.swp$,\.o$\.obj$,\.bak$' endif if !exists("g:netrw_ssh_browse_reject") let g:netrw_ssh_browse_reject='^total\s\+\d\+$' endif +if !has("patch192") + if !exists("g:netrw_use_noswf") + let g:netrw_use_noswf= 1 + endif +else + let g:netrw_use_noswf= 0 +endif " Default values - t-w ---------- {{{3 if !exists("g:netrw_timefmt") let g:netrw_timefmt= "%c" endif +if !exists("g:NetrwTopLvlMenu") + let g:NetrwTopLvlMenu= "Netrw." +endif if !exists("g:netrw_win95ftp") let g:netrw_win95ftp= 1 endif @@ -221,11 +296,7 @@ endif " --------------------------------------------------------------------- " Default values for netrw's script variables: {{{2 if !exists("s:netrw_cd_escape") - if has("win32") || has("win95") || has("win64") || has("win16") - let s:netrw_cd_escape="#% " - else let s:netrw_cd_escape="[]#*$%'\" ?`!&();<>\\" - endif endif if !exists("g:netrw_fname_escape") let g:netrw_fname_escape= ' ?&;' @@ -234,11 +305,7 @@ if !exists("g:netrw_tmpfile_escape") let g:netrw_tmpfile_escape= ' ?&;' endif if !exists("s:netrw_glob_escape") - if has("win32") || has("win95") || has("win64") || has("win16") - let s:netrw_glob_escape= "" - else let s:netrw_glob_escape= '[]*?`{~$' - endif endif " BufEnter event ignored by decho when following variable is true @@ -253,7 +320,7 @@ endif " ------------------------------------------------------------------------ " NetSavePosn: saves position of cursor on screen {{{2 fun! netrw#NetSavePosn() -" call Dfunc("NetSavePosn()") +" call Dfunc("netrw#NetSavePosn()") " Save current line and column let w:netrw_winnr= winnr() let w:netrw_line = line(".") @@ -264,55 +331,188 @@ fun! netrw#NetSavePosn() let w:netrw_hline= line(".") call netrw#NetRestorePosn() -" call Dret("NetSavePosn : winnr=".w:netrw_winnr." line=".w:netrw_line." col=".w:netrw_col." hline=".w:netrw_hline) +" call Dret("netrw#NetSavePosn : winnr=".w:netrw_winnr." line=".w:netrw_line." col=".w:netrw_col." hline=".w:netrw_hline) endfun " ------------------------------------------------------------------------ " NetRestorePosn: restores the cursor and file position as saved by NetSavePosn() {{{2 fun! netrw#NetRestorePosn() -" call Dfunc("NetRestorePosn() winnr=".w:netrw_winnr." line=".w:netrw_line." col=".w:netrw_col." hline=".w:netrw_hline) +" call Dfunc("netrw#NetRestorePosn() winnr=".(exists("w:netrw_winnr")? w:netrw_winnr : -1)." line=".(exists("w:netrw_line")? w:netrw_line : -1)." col=".(exists("w:netrw_col")? w:netrw_col : -1)." hline=".(exists("w:netrw_hline")? w:netrw_hline : -1)) let eikeep= &ei set ei=all + if expand("%") == "NetrwMessage" + exe s:winBeforeErr."wincmd w" + endif " restore window -" call Decho("restore window: exe silent! ".w:netrw_winnr."wincmd w") - exe "silent! ".w:netrw_winnr."wincmd w" -" if v:shell_error == 0 -" " as suggested by Bram M: redraw on no error -" " allows protocol error messages to remain visible -" redraw! -" endif + if exists("w:netrw_winnr") +" call Decho("restore window: exe silent! ".w:netrw_winnr."wincmd w") + exe "silent! ".w:netrw_winnr."wincmd w" + endif + if v:shell_error == 0 + " as suggested by Bram M: redraw on no error + " allows protocol error messages to remain visible + redraw! + endif " restore top-of-screen line -" call Decho("restore topofscreen: exe norm! ".w:netrw_hline."G0z") - exe "norm! ".w:netrw_hline."G0z\" + if exists("w:netrw_hline") +" call Decho("restore topofscreen: exe norm! ".w:netrw_hline."G0z") + exe "norm! ".w:netrw_hline."G0z\" + endif " restore position -" call Decho("restore posn: exe norm! ".w:netrw_line."G0".w:netrw_col."|") - exe "norm! ".w:netrw_line."G0".w:netrw_col."\" + if exists("w:netrw_line") && exists("w:netrw_col") +" call Decho("restore posn: exe norm! ".w:netrw_line."G0".w:netrw_col."|") + exe "norm! ".w:netrw_line."G0".w:netrw_col."\" + endif let &ei= eikeep -" call Dret("NetRestorePosn") +" call Dret("netrw#NetRestorePosn") endfun " =============================== +" NetOptionSave: save options and set to "standard" form {{{2 +fun! s:NetOptionSave() +" call Dfunc("s:NetOptionSave()") + if !exists("w:netrw_optionsave") + let w:netrw_optionsave= 1 + else +" call Dret("s:NetOptionSave : netoptionsave=".w:netrw_optionsave) + return + endif + + " Save current settings and current directory + let s:yykeep = @@ + if exists("&l:acd") + let w:netrw_acdkeep = &l:acd + endif + let w:netrw_aikeep = &l:ai + let w:netrw_awkeep = &l:aw + let w:netrw_cikeep = &l:ci + let w:netrw_cinkeep = &l:cin + let w:netrw_cinokeep = &l:cino + let w:netrw_comkeep = &l:com + let w:netrw_cpokeep = &l:cpo + if g:netrw_keepdir + let w:netrw_dirkeep = getcwd() + endif + let w:netrw_fokeep = &l:fo " formatoptions + let w:netrw_gdkeep = &l:gd " gdefault + let w:netrw_hidkeep = &l:hidden + let w:netrw_magickeep = &l:magic + let w:netrw_repkeep = &l:report + let w:netrw_spellkeep = &l:spell + let w:netrw_twkeep = &l:tw " textwidth + let w:netrw_wigkeep = &l:wig " wildignore + if has("win32") && !has("win95") + let w:netrw_swfkeep= &l:swf " swapfile + endif + call s:NetrwSafeOptions() + if &go =~ 'a' | silent! let w:netrw_regstar = @* | endif + silent! let w:netrw_regslash= @/ + +" call Dret("s:NetOptionSave") +endfun + +" ------------------------------------------------------------------------ +" NetOptionRestore: restore options {{{2 +fun! s:NetOptionRestore() +" call Dfunc("s:NetOptionRestore()") + if !exists("w:netrw_optionsave") +" call Dret("s:NetOptionRestore : w:netrw_optionsave doesn't exist") + return + endif + unlet w:netrw_optionsave + + if exists("&acd") + if exists("w:netrw_acdkeep") |let &l:acd = w:netrw_acdkeep |unlet w:netrw_acdkeep |endif + endif + if exists("w:netrw_aikeep") |let &l:ai = w:netrw_aikeep |unlet w:netrw_aikeep |endif + if exists("w:netrw_awkeep") |let &l:aw = w:netrw_awkeep |unlet w:netrw_awkeep |endif + if exists("w:netrw_cikeep") |let &l:ci = w:netrw_cikeep |unlet w:netrw_cikeep |endif + if exists("w:netrw_cinkeep") |let &l:cin = w:netrw_cinkeep |unlet w:netrw_cinkeep |endif + if exists("w:netrw_cinokeep") |let &l:cino = w:netrw_cinokeep |unlet w:netrw_cinokeep |endif + if exists("w:netrw_comkeep") |let &l:com = w:netrw_comkeep |unlet w:netrw_comkeep |endif + if exists("w:netrw_cpokeep") |let &l:cpo = w:netrw_cpokeep |unlet w:netrw_cpokeep |endif + if exists("w:netrw_dirkeep") |exe "lcd ".w:netrw_dirkeep |unlet w:netrw_dirkeep |endif + if exists("w:netrw_fokeep") |let &l:fo = w:netrw_fokeep |unlet w:netrw_fokeep |endif + if exists("w:netrw_gdkeep") |let &l:gd = w:netrw_gdkeep |unlet w:netrw_gdkeep |endif + if exists("w:netrw_hidkeep") |let &l:hidden = w:netrw_hidkeep |unlet w:netrw_hidkeep |endif + if exists("w:netrw_magic") |let &l:magic = w:netrw_magic |unlet w:netrw_magic |endif + if exists("w:netrw_repkeep") |let &l:report = w:netrw_repkeep |unlet w:netrw_repkeep |endif + if exists("w:netrw_spellkeep")|let &l:spell = w:netrw_spellkeep |unlet w:netrw_spellkeep|endif + if exists("w:netrw_twkeep") |let &l:tw = w:netrw_twkeep |unlet w:netrw_twkeep |endif + if exists("w:netrw_wigkeep") |let &l:wig = w:netrw_wigkeep |unlet w:netrw_wigkeep |endif + if exists("s:yykeep") |let @@ = s:yykeep |unlet s:yykeep |endif + if exists("w:netrw_swfkeep") + if &directory == "" + " user hasn't specified a swapfile directory; + " netrw will temporarily set the swapfile directory + " to the current directory as returned by getcwd(). + let &l:directory = getcwd() + silent! let &l:swf = w:netrw_swfkeep + setlocal directory= + unlet w:netrw_swfkeep + elseif &l:swf != w:netrw_swfkeep + " following line causes a Press ENTER in windows -- can't seem to work around it!!! (COMBAK) + silent! let &l:swf= w:netrw_swfkeep + unlet w:netrw_swfkeep + endif + endif + if exists("w:netrw_regstar") |silent! let @*= w:netrw_regstar |unlet w:netrw_regstar |endif + if exists("w:netrw_regslash")|silent! let @/= w:netrw_regslash|unlet w:netrw_regslash|endif + +" call Dret("s:NetOptionRestore : restored user options") +endfun + +" --------------------------------------------------------------------- +" NetrwSafeOptions: sets options to help netrw do its job {{{2 +fun! s:NetrwSafeOptions() +" call Dfunc("s:NetrwSafeOptions()") + setlocal cino= + setlocal com= + setlocal cpo-=aA + if exists("&acd") + setlocal noacd nocin noai noci magic nospell nohid wig= noaw + setlocal fo=nroql2 + else + setlocal nocin noai noci magic nospell nohid wig= noaw + setlocal fo=nroql2 + endif + setlocal tw=0 + setlocal report=10000 + if g:netrw_use_noswf && has("win32") && !has("win95") + setlocal noswf + endif +" call Dret("s:NetrwSafeOptions") +endfun + +" ------------------------------------------------------------------------ " Netrw Transfer Functions: {{{1 " =============================== " ------------------------------------------------------------------------ " NetRead: responsible for reading a file over the net {{{2 +" mode: =0 read remote file and insert before current line +" =1 read remote file and insert after current line +" =2 replace with remote file +" =3 obtain file, but leave in temporary format fun! netrw#NetRead(mode,...) -" call Dfunc("NetRead(mode=".a:mode.",...) a:0=".a:0) +" call Dfunc("netrw#NetRead(mode=".a:mode.",...) a:0=".a:0." ".g:loaded_netrw) - " save options + " save options {{{3 call s:NetOptionSave() + " interpret mode into a readcmd {{{3 if a:mode == 0 " read remote file before current line let readcmd = "0r" elseif a:mode == 1 " read file after current line let readcmd = "r" elseif a:mode == 2 " replace with remote file let readcmd = "%r" + elseif a:mode == 3 " skip read of file (leave as temporary) + let readcmd = "t" else exe a:mode let readcmd = "r" @@ -320,18 +520,12 @@ fun! netrw#NetRead(mode,...) let ichoice = (a:0 == 0)? 0 : 1 " call Decho("readcmd<".readcmd."> ichoice=".ichoice) - " get name of a temporary file and set up shell-quoting character {{{3 - let tmpfile= tempname() -" call Decho("tmpfile<".tmpfile.">") - let tmpfile= escape(substitute(tmpfile,'\','/','ge'),g:netrw_tmpfile_escape) -" call Decho("tmpfile<".tmpfile.">") - if !isdirectory(substitute(tmpfile,'[^/]\+$','','e')) - echohl Error | echo "***netrw*** your <".substitute(tmpfile,'[^/]\+$','','e')."> directory is missing!" | echohl None - call inputsave()|call input("Press to continue")|call inputrestore() -" call Dret("NetRead :1 getcwd<".getcwd().">") + " Get Temporary Filename {{{3 + let tmpfile= s:GetTempfile("") + if tmpfile == "" +" call Dret("netrw#NetRead : unable to get a tempfile!") return endif -" call Decho("tmpfile<".tmpfile.">") while ichoice <= a:0 @@ -359,12 +553,13 @@ fun! netrw#NetRead(mode,...) echomsg ':Nread rsync://machine[:port]/path uses rsync' echomsg ':Nread scp://[user@]machine[[:#]port]/path uses scp' echomsg ':Nread sftp://[user@]machine[[:#]port]/path uses sftp' + sleep 4 break - elseif match(choice,"^\"") != -1 + elseif match(choice,'^"') != -1 " Reconstruct Choice if choice starts with '"' " call Decho("reconstructing choice") - if match(choice,"\"$") != -1 + if match(choice,'"$') != -1 " case "..." let choice=strpart(choice,1,strlen(choice)-2) else @@ -372,15 +567,14 @@ fun! netrw#NetRead(mode,...) let choice = strpart(choice,1,strlen(choice)-1) let wholechoice = "" - while match(choice,"\"$") == -1 + while match(choice,'"$') == -1 let wholechoice = wholechoice . " " . choice let ichoice = ichoice + 1 if ichoice > a:0 if !exists("g:netrw_quiet") - echohl Error | echo "***netrw*** Unbalanced string in filename '". wholechoice ."'" | echohl None - call inputsave()|call input("Press to continue")|call inputrestore() + call netrw#ErrorMsg(s:ERROR,"Unbalanced string in filename '". wholechoice ."'",3) endif -" call Dret("NetRead :2 getcwd<".getcwd().">") +" call Dret("netrw#NetRead :2 getcwd<".getcwd().">") return endif let choice= a:{ichoice} @@ -393,36 +587,19 @@ fun! netrw#NetRead(mode,...) " call Decho("choice<" . choice . ">") let ichoice= ichoice + 1 - " fix up windows urls - if has("win32") || has("win95") || has("win64") || has("win16") - let choice = substitute(choice,'\\','/','ge') -" call Decho("fixing up windows url to <".choice."> tmpfile<".tmpfile) - - if !g:netrw_keepdir - exe 'lcd ' . fnamemodify(tmpfile,':h') - endif - let tmpfile = fnamemodify(tmpfile,':t') - endif - " Determine method of read (ftp, rcp, etc) {{{3 call s:NetMethod(choice) + let tmpfile= s:GetTempfile(b:netrw_fname) " apply correct suffix " Check if NetBrowse() should be handling this request " call Decho("checking if NetBrowse() should handle choice<".choice."> with netrw_list_cmd<".g:netrw_list_cmd.">") - if choice =~ "^.*[\/]$" + if choice =~ "^.*[\/]$" && b:netrw_method != 5 && choice !~ '^http://' " call Decho("yes, choice matches '^.*[\/]$'") - keepjumps call s:NetBrowse(choice) -" call Dret("NetRead :3 getcwd<".getcwd().">") + keepjumps call s:NetBrowse(0,choice) +" call Dret("netrw#NetRead :3 getcwd<".getcwd().">") return endif - " use filename's suffix for the temporary file - if b:netrw_fname =~ '\.[^./]\+$' - let suffix = substitute(b:netrw_fname,'^.*\(\.[^./]\+\)$','\1','e') - let tmpfile= substitute(tmpfile,"$",suffix,'e') -" call Decho("chgd tmpfile<".tmpfile."> (added ".suffix." suffix) netrw_fname<".b:netrw_fname.">") - endif - " ============ " Perform Protocol-Based Read {{{3 " =========================== @@ -466,6 +643,10 @@ fun! netrw#NetRead(mode,...) setlocal ff=unix exe "put ='".g:netrw_ftpmode."'" " call Decho("filter input: ".getline(".")) + if exists("g:netrw_ftpextracmd") + exe "put ='".g:netrw_ftpextracmd."'" +" call Decho("filter input: ".getline(".")) + endif exe "put ='".'get \"'.netrw_fname.'\" '.tmpfile."'" " call Decho("filter input: ".getline(".")) if exists("g:netrw_port") && g:netrw_port != "" @@ -478,9 +659,8 @@ fun! netrw#NetRead(mode,...) " If the result of the ftp operation isn't blank, show an error message (tnx to Doug Claar) if getline(1) !~ "^$" && !exists("g:netrw_quiet") && getline(1) !~ '^Trying ' let debugkeep= &debug - set debug=msg - echohl Error | echo "***netrw*** ".getline(1) | echohl None - call inputsave()|call input("Press to continue")|call inputrestore() + setlocal debug=msg + call netrw#ErrorMsg(s:ERROR,getline(1),4) let &debug= debugkeep endif bd! @@ -517,8 +697,12 @@ fun! netrw#NetRead(mode,...) put =g:netrw_ftpmode " call Decho("filter input: ".getline(".")) endif - put ='get \"'.netrw_fname.'\" '.tmpfile + if exists("g:netrw_ftpextracmd") + exe "put ='".g:netrw_ftpextracmd."'" " call Decho("filter input: ".getline(".")) + endif + put ='get \"'.netrw_fname.'\" '.tmpfile +" call Decho("filter input: ".getline(".")) " perform ftp: " -i : turns off interactive prompting from ftp @@ -531,12 +715,11 @@ fun! netrw#NetRead(mode,...) if getline(1) !~ "^$" " call Decho("error<".getline(1).">") if !exists("g:netrw_quiet") - echohl Error | echo "***netrw*** ".getline(1) | echohl None - call inputsave()|call input("Press to continue")|call inputrestore() + call netrw#ErrorMsg(s:ERROR,getline(1),5) endif endif bd! - let result = s:NetGetFile(readcmd, tmpfile, b:netrw_method) + let result = s:NetGetFile(readcmd, tmpfile, b:netrw_method) let b:netrw_lastfile = choice "......................................... @@ -548,14 +731,8 @@ fun! netrw#NetRead(mode,...) else let useport= "" endif - if g:netrw_cygwin == 1 - let cygtmpfile=substitute(tmpfile,'^\(\a\):','/cygdrive/\1/','e') -" call Decho("executing: !".g:netrw_scp_cmd.useport." '".g:netrw_machine.":".escape(b:netrw_fname,g:netrw_fname_escape)."' ".cygtmpfile) - exe g:netrw_silentxfer."!".g:netrw_scp_cmd.useport." '".g:netrw_machine.":".escape(b:netrw_fname,g:netrw_fname_escape)."' ".cygtmpfile - else -" call Decho("executing: !".g:netrw_scp_cmd.useport." '".g:netrw_machine.":".escape(b:netrw_fname,g:netrw_fname_escape)."' ".tmpfile) - exe g:netrw_silentxfer."!".g:netrw_scp_cmd.useport." '".g:netrw_machine.":".escape(b:netrw_fname,g:netrw_fname_escape)."' ".tmpfile - endif +" call Decho("executing: !".g:netrw_scp_cmd.useport." '".g:netrw_machine.":".escape(b:netrw_fname,g:netrw_fname_escape)."' ".tmpfile) + exe g:netrw_silentxfer."!".g:netrw_scp_cmd.useport." ".g:netrw_shq.g:netrw_machine.":".escape(b:netrw_fname,g:netrw_fname_escape).g:netrw_shq." ".tmpfile let result = s:NetGetFile(readcmd, tmpfile, b:netrw_method) let b:netrw_lastfile = choice @@ -565,10 +742,9 @@ fun! netrw#NetRead(mode,...) " call Decho("read via http (method #5)") if g:netrw_http_cmd == "" if !exists("g:netrw_quiet") - echohl Error | echo "***netrw*** neither wget nor fetch command is available" | echohl None - call inputsave()|call input("Press to continue")|call inputrestore() + call netrw#ErrorMsg(s:ERROR,"neither the wget nor the fetch command is available",6) endif -" call Dret("NetRead :4 getcwd<".getcwd().">") +" call Dret("netrw#NetRead :4 getcwd<".getcwd().">") return endif @@ -592,6 +768,7 @@ fun! netrw#NetRead(mode,...) exe 'norm! 1G/<\s*a\s*name=\s*"'.netrw_tag.'"/'."\" endif let b:netrw_lastfile = choice + setlocal ro "......................................... " cadaver: NetRead Method #6 {{{3 @@ -608,13 +785,7 @@ fun! netrw#NetRead(mode,...) put ='open '.g:netrw_machine endif put ='user '.g:netrw_uid.' '.g:netrw_passwd - - if g:netrw_cygwin == 1 - let cygtmpfile=substitute(tmpfile,'^\(\a\):','/cygdrive/\1/','e') - put ='get '.netrw_fname.' '.cygtmpfile - else - put ='get '.netrw_fname.' '.tmpfile - endif + put ='get '.netrw_fname.' '.tmpfile put ='quit' " perform cadaver operation: @@ -630,14 +801,8 @@ fun! netrw#NetRead(mode,...) elseif b:netrw_method == 7 " call Decho("read via rsync (method #7)") let netrw_fname= escape(b:netrw_fname,g:netrw_fname_escape) - if g:netrw_cygwin == 1 - let cygtmpfile=substitute(tmpfile,'^\(\a\):','/cygdrive/\1/','e') -" call Decho("executing: !".g:netrw_rsync_cmd." ".g:netrw_machine.":".netrw_fname." ".cygtmpfile) - exe g:netrw_silentxfer."!".g:netrw_rsync_cmd." ".g:netrw_machine.":".netrw_fname." ".cygtmpfile - else -" call Decho("executing: !".g:netrw_rsync_cmd." ".g:netrw_machine.":".netrw_fname." ".tmpfile) - exe g:netrw_silentxfer."!".g:netrw_rsync_cmd." ".g:netrw_machine.":".netrw_fname." ".tmpfile - endif +" call Decho("executing: !".g:netrw_rsync_cmd." ".g:netrw_machine.":".netrw_fname." ".tmpfile) + exe g:netrw_silentxfer."!".g:netrw_rsync_cmd." ".g:netrw_machine.":".netrw_fname." ".tmpfile let result = s:NetGetFile(readcmd,tmpfile, b:netrw_method) let b:netrw_lastfile = choice @@ -645,11 +810,11 @@ fun! netrw#NetRead(mode,...) " fetch: NetRead Method #8 {{{3 " fetch://[user@]host[:http]/path elseif b:netrw_method == 8 +" call Decho("read via fetch (method #8)") let netrw_fname= escape(b:netrw_fname,g:netrw_fname_escape) if g:netrw_fetch_cmd == "" if !exists("g:netrw_quiet") - echohl Error | echo "***netrw*** fetch command not available" | echohl None - call inputsave()|call input("Press to continue")|call inputrestore() + call netrw#ErrorMsg(s:ERROR,"fetch command not available",7) endif " call Dret("NetRead") endif @@ -670,154 +835,53 @@ fun! netrw#NetRead(mode,...) let result = s:NetGetFile(readcmd,tmpfile, b:netrw_method) let b:netrw_lastfile = choice + setlocal ro "......................................... " sftp: NetRead Method #9 {{{3 elseif b:netrw_method == 9 -" call Decho("read via sftp (method #4)") +" call Decho("read via sftp (method #9)") let netrw_fname= escape(b:netrw_fname,g:netrw_fname_escape) - if g:netrw_cygwin == 1 - let cygtmpfile=substitute(tmpfile,'^\(\a\):','/cygdrive/\1/','e') -" call Decho("!".g:netrw_sftp_cmd." ".g:netrw_machine.":".netrw_fname." ".cygtmpfile) -" call Decho("executing: !".g:netrw_sftp_cmd." ".g:netrw_machine.":".netrw_fname." ".cygtmpfile) - exe "!".g:netrw_sftp_cmd." ".g:netrw_machine.":".netrw_fname." ".cygtmpfile - else -" call Decho("executing: !".g:netrw_sftp_cmd." ".g:netrw_machine.":".netrw_fname." ".tmpfile) - exe g:netrw_silentxfer."!".g:netrw_sftp_cmd." ".g:netrw_machine.":".netrw_fname." ".tmpfile - endif +" call Decho("executing: !".g:netrw_sftp_cmd." ".g:netrw_machine.":".netrw_fname." ".tmpfile) + exe g:netrw_silentxfer."!".g:netrw_sftp_cmd." ".g:netrw_machine.":".netrw_fname." ".tmpfile let result = s:NetGetFile(readcmd, tmpfile, b:netrw_method) let b:netrw_lastfile = choice "......................................... " Complain {{{3 else - echo "***warning*** unable to comply with your request<" . choice . ">" + call netrw#ErrorMsg(s:WARNING,"unable to comply with your request<" . choice . ">",8) endif endwhile " cleanup {{{3 -" call Decho("cleanup") if exists("b:netrw_method") +" call Decho("cleanup b:netrw_method and b:netrw_fname") unlet b:netrw_method unlet b:netrw_fname endif - call s:NetOptionRestore() - -" call Dret("NetRead :5 getcwd<".getcwd().">") -endfun - -" ------------------------------------------------------------------------ -" NetGetFile: Function to read temporary file "tfile" with command "readcmd". {{{2 -" readcmd == %r : replace buffer with newly read file -" == 0r : read file at top of buffer -" == r : read file after current line -fun! s:NetGetFile(readcmd, tfile, method) -" call Dfunc("NetGetFile(readcmd<".a:readcmd.">,tfile<".a:tfile."> method<".a:method.">)") - - " get name of remote filename (ie. url and all) - let rfile= bufname("%") -" call Decho("rfile<".rfile.">") - - if exists("*NetReadFixup") - " for the use of NetReadFixup (not otherwise used internally) - let line2= line("$") - endif - - " transform paths from / to \ for Windows (except for cygwin) - if &term == "win32" - if g:netrw_cygwin - let tfile= a:tfile -" call Decho("(win32 && cygwin) tfile<".tfile.">") - else - let tfile= substitute(a:tfile,'/','\\\\','ge') -" call Decho("(win32 && !cygwin) tfile<".tfile.">") - endif - else - let tfile= a:tfile -" call Decho("tfile=a:tfile<".tfile.">") - endif - - if a:readcmd[0] == '%' - " get file into buffer - -" call Dredir("ls!","starting buffer list") - - " rename the current buffer to the temp file (ie. tfile) - keepalt exe "file ".tfile -" call Dredir("ls!","after renaming current buffer to <".tfile.">") - - " edit temporary file (ie. read the temporary file in) - if rfile =~ '\.zip$' - call zip#Browse(tfile) - elseif rfile =~ '\.tar$' - call tar#Browse(tfile) - else -" call Decho("edit temporary file") - e - endif - - " rename buffer back to remote filename - keepalt exe "file ".escape(rfile,' ') - filetype detect -" call Dredir("ls!","renamed buffer back to remote filename<".rfile."> : expand(%)<".expand("%").">") - let line1 = 1 - let line2 = line("$") - - elseif filereadable(tfile) - " read file after current line - let curline = line(".") - let lastline= line("$") -" call Decho("exe<".a:readcmd." ".v:cmdarg." ".tfile."> line#".curline) - exe a:readcmd." ".v:cmdarg." ".tfile - let line1= curline + 1 - let line2= line("$") - lastline + 1 - - else - " not readable - echohl WarningMsg | echo "***netrw*** file <".tfile."> not readable"| echohl None - call inputsave()|call input("Press to continue")|call inputrestore() -" call Dret("NetGetFile : tfile<".tfile."> not readable") - return - endif - - " User-provided (ie. optional) fix-it-up command - if exists("*NetReadFixup") -" call Decho("calling NetReadFixup(method<".a:method."> line1=".line1." line2=".line2.")") - call NetReadFixup(a:method, line1, line2) -" else " Decho -" call Decho("NetReadFixup() not called, doesn't exist (line1=".line1." line2=".line2.")") - endif - - " update the Buffers menu - if has("gui") && has("gui_running") - silent! emenu Buffers.Refresh\ menu + if s:FileReadable(tmpfile) && tmpfile !~ '.tar.bz2$' && tmpfile !~ '.tar.gz$' && tmpfile !~ '.zip' && tmpfile !~ '.tar' && readcmd != 't' +" call Decho("cleanup by deleting tmpfile<".tmpfile.">") + call s:System("delete",tmpfile) endif + call s:NetOptionRestore() -" call Decho("readcmd<".a:readcmd."> cmdarg<".v:cmdarg."> tfile<".a:tfile."> readable=".filereadable(a:tfile)) - - " make sure file is being displayed - redraw! -" call Dret("NetGetFile") +" call Dret("netrw#NetRead :5 getcwd<".getcwd().">") endfun " ------------------------------------------------------------------------ " NetWrite: responsible for writing a file over the net {{{2 fun! netrw#NetWrite(...) range -" call Dfunc("NetWrite(a:0=".a:0.")") +" call Dfunc("netrw#NetWrite(a:0=".a:0.") ".g:loaded_netrw) " option handling let mod= 0 call s:NetOptionSave() " Get Temporary Filename {{{3 - let tmpfile= tempname() -" call Decho("tmpfile<".tmpfile."> (raw)") - let tmpfile= escape(substitute(tmpfile,'\','/','ge'),g:netrw_tmpfile_escape) -" call Decho("tmpfile<".tmpfile."> (escaped)") - if !isdirectory(substitute(tmpfile,'[^/]\+$','','e')) - echohl Error | echo "***netrw*** your <".substitute(tmpfile,'[^/]\+$','','e')."> directory is missing!" - call inputsave()|call input("Press to continue")|call inputrestore() -" call Dret("NetWrite") + let tmpfile= s:GetTempfile("") + if tmpfile == "" +" call Dret("netrw#NetWrite : unable to get a tempfile!") return endif @@ -827,20 +891,36 @@ fun! netrw#NetWrite(...) range let ichoice = 1 endif + let curbufname= expand("%") +" call Decho("curbufname<".curbufname.">") if &binary - " for binary writes, write entire file. Line numbers don't really make sense. - " Supports the writing of tar and zip files. -" call Decho("silent exe w! ".v:cmdarg." ".tmpfile) + " For binary writes, always write entire file. + " (line numbers don't really make sense for that). + " Also supports the writing of tar and zip files. +" call Decho("(write entire file) silent exe w! ".v:cmdarg." ".tmpfile) silent exe "w! ".v:cmdarg." ".tmpfile + elseif g:netrw_cygwin + " write (selected portion of) file to temporary + let cygtmpfile= substitute(tmpfile,'/cygdrive/\(.\)','\1:','') +" call Decho("(write selected portion) silent exe ".a:firstline."," . a:lastline . "w! ".v:cmdarg." ".cygtmpfile) + silent exe a:firstline."," . a:lastline . "w! ".v:cmdarg." ".cygtmpfile else " write (selected portion of) file to temporary -" call Decho("silent exe ".a:firstline."," . a:lastline . "w! ".v:cmdarg." ".tmpfile) +" call Decho("(write selected portion) silent exe ".a:firstline."," . a:lastline . "w! ".v:cmdarg." ".tmpfile) silent exe a:firstline."," . a:lastline . "w! ".v:cmdarg." ".tmpfile endif + if curbufname == "" + " if the file is [No Name], and one attempts to Nwrite it, the buffer takes + " on the temporary file's name. Deletion of the temporary file during + " cleanup then causes an error message. + 0file! + endif + + " While choice loop: {{{3 while ichoice <= a:0 - " Process arguments: {{{3 + " Process arguments: {{{4 " attempt to repeat with previous host-file-etc if exists("b:netrw_lastfile") && a:0 == 0 " call Decho("using b:netrw_lastfile<" . b:netrw_lastfile . ">") @@ -862,6 +942,7 @@ fun! netrw#NetWrite(...) range echomsg ':Nwrite rsync://[user@]machine/path uses rsync' echomsg ':Nwrite scp://[user@]machine[[:#]port]/path uses scp' echomsg ':Nwrite sftp://[user@]machine/path uses sftp' + sleep 4 break elseif match(choice,"^\"") != -1 @@ -878,10 +959,9 @@ fun! netrw#NetWrite(...) range let ichoice = ichoice + 1 if choice > a:0 if !exists("g:netrw_quiet") - echohl Error | echo "***netrw*** Unbalanced string in filename '". wholechoice ."'" | echohl None - call inputsave()|call input("Press to continue")|call inputrestore() + call netrw#ErrorMsg(s:ERROR,"Unbalanced string in filename '". wholechoice ."'",13) endif -" call Dret("NetWrite") +" call Dret("netrw#NetWrite") return endif let choice= a:{ichoice} @@ -890,30 +970,21 @@ fun! netrw#NetWrite(...) range endif endif endif -" call Decho("choice<" . choice . ">") let ichoice= ichoice + 1 +" call Decho("choice<" . choice . "> ichoice=".ichoice) - " fix up windows urls - if has("win32") || has("win95") || has("win64") || has("win16") - let choice= substitute(choice,'\\','/','ge') - if !g:netrw_keepdir - exe 'lcd ' . fnamemodify(tmpfile,':h') - endif - let tmpfile = fnamemodify(tmpfile,':t') - endif - - " Determine method of read (ftp, rcp, etc) {{{3 + " Determine method of write (ftp, rcp, etc) {{{4 call s:NetMethod(choice) " ============= - " Perform Protocol-Based Write {{{3 + " Perform Protocol-Based Write {{{4 " ============================ if exists("g:netrw_silent") && g:netrw_silent == 0 && &ch >= 1 echo "(netrw) Processing your write request..." endif "......................................... - " rcp: NetWrite Method #1 {{{3 + " rcp: NetWrite Method #1 {{{4 if b:netrw_method == 1 " call Decho("write via rcp (method #1)") if s:netrw_has_nt_rcp == 1 @@ -930,19 +1001,24 @@ fun! netrw#NetWrite(...) range endif endif let netrw_fname= escape(b:netrw_fname,g:netrw_fname_escape) -" call Decho("executing: !".g:netrw_rcp_cmd." ".s:netrw_rcpmode." ".tmpfile." ".uid_machine.":".netrw_fname) - exe g:netrw_silentxfer."!".g:netrw_rcp_cmd." ".s:netrw_rcpmode." ".tmpfile." ".uid_machine.":".netrw_fname +" call Decho("executing: !".g:netrw_rcp_cmd." ".s:netrw_rcpmode." ".g:netrw_shq.tmpfile.g:netrw_shq." ".uid_machine.":".netrw_fname) + exe g:netrw_silentxfer."!".g:netrw_rcp_cmd." ".s:netrw_rcpmode." ".g:netrw_shq.tmpfile.g:netrw_shq." ".uid_machine.":".netrw_fname let b:netrw_lastfile = choice "......................................... - " ftp + <.netrc>: NetWrite Method #2 {{{3 + " ftp + <.netrc>: NetWrite Method #2 {{{4 elseif b:netrw_method == 2 +" call Decho("write via ftp+.netrc (method #2)") let netrw_fname= b:netrw_fname new setlocal ff=unix exe "put ='".g:netrw_ftpmode."'" " call Decho(" filter input: ".getline(".")) - exe "put ='"."put ".tmpfile.' \"'.netrw_fname.'\"'."'" + if exists("g:netrw_ftpextracmd") + exe "put ='".g:netrw_ftpextracmd."'" +" call Decho("filter input: ".getline(".")) + endif + exe "put ='".'put \"'.tmpfile.'\" \"'.netrw_fname.'\"'."'" " call Decho(" filter input: ".getline(".")) if exists("g:netrw_port") && g:netrw_port != "" " call Decho("executing: %!".g:netrw_ftp_cmd." -i ".g:netrw_machine." ".g:netrw_port) @@ -954,8 +1030,7 @@ fun! netrw#NetWrite(...) range " If the result of the ftp operation isn't blank, show an error message (tnx to Doug Claar) if getline(1) !~ "^$" if !exists("g:netrw_quiet") - echohl Error | echo "***netrw*** ".getline(1) | echohl None - call inputsave()|call input("Press to continue")|call inputrestore() + call netrw#ErrorMsg(s:ERROR,getline(1),14) endif let mod=1 endif @@ -963,8 +1038,10 @@ fun! netrw#NetWrite(...) range let b:netrw_lastfile = choice "......................................... - " ftp + machine, id, passwd, filename: NetWrite Method #3 {{{3 + " ftp + machine, id, passwd, filename: NetWrite Method #3 {{{4 elseif b:netrw_method == 3 + " Construct execution string (four lines) which will be passed through filter +" call Decho("read via ftp+mipf (method #3)") let netrw_fname= b:netrw_fname new setlocal ff=unix @@ -984,7 +1061,7 @@ fun! netrw#NetWrite(...) range put ='user \"'.g:netrw_uid.'\" \"'.g:netrw_passwd.'\"' " call Decho("filter input: ".getline(".")) endif - put ='put '.tmpfile.' \"'.netrw_fname.'\"' + put ='put \"'.tmpfile.'\" \"'.netrw_fname.'\"' " call Decho("filter input: ".getline(".")) " save choice/id/password for future use let b:netrw_lastfile = choice @@ -999,42 +1076,36 @@ fun! netrw#NetWrite(...) range " If the result of the ftp operation isn't blank, show an error message (tnx to Doug Claar) if getline(1) !~ "^$" if !exists("g:netrw_quiet") - echohl Error | echo "***netrw*** ".getline(1) | echohl None - call inputsave()|call input("Press to continue")|call inputrestore() + call netrw#ErrorMsg(s:ERROR,getline(1),15) endif let mod=1 endif bd! "......................................... - " scp: NetWrite Method #4 {{{3 + " scp: NetWrite Method #4 {{{4 elseif b:netrw_method == 4 +" call Decho("write via scp (method #4)") let netrw_fname= escape(b:netrw_fname,g:netrw_fname_escape) if exists("g:netrw_port") && g:netrw_port != "" let useport= " -P ".g:netrw_port else let useport= "" endif - if g:netrw_cygwin == 1 - let cygtmpfile=substitute(tmpfile,'^\(\a\):','/cygdrive/\1/','e') -" call Decho("executing: !".g:netrw_scp_cmd.useport." ".cygtmpfile." '".g:netrw_machine.":".netrw_fname."'") - exe g:netrw_silentxfer."!".g:netrw_scp_cmd.useport." ".cygtmpfile." '".g:netrw_machine.":".netrw_fname."'" - else -" call Decho("executing: !".g:netrw_scp_cmd.useport." ".tmpfile." '".g:netrw_machine.":".netrw_fname."'") - exe g:netrw_silentxfer."!".g:netrw_scp_cmd.useport." ".tmpfile." '".g:netrw_machine.":".netrw_fname."'" - endif +" call Decho("exe ".g:netrw_silentxfer."!".g:netrw_scp_cmd.useport." ".g:netrw_shq.tmpfile.g:netrw_shq." ".g:netrw_shq.g:netrw_machine.":".netrw_fname.g:netrw_shq) + exe g:netrw_silentxfer."!".g:netrw_scp_cmd.useport." ".g:netrw_shq.tmpfile.g:netrw_shq." ".g:netrw_shq.g:netrw_machine.":".netrw_fname.g:netrw_shq let b:netrw_lastfile = choice "......................................... - " http: NetWrite Method #5 {{{3 + " http: NetWrite Method #5 {{{4 elseif b:netrw_method == 5 +" call Decho("write via http (method #5)") if !exists("g:netrw_quiet") - echohl Error | echo "***netrw*** currently does not support writing using http:" | echohl None - call inputsave()|call input("Press to continue")|call inputrestore() + call netrw#ErrorMsg(s:ERROR,"currently does not support writing using http:",16) endif "......................................... - " dav: NetWrite Method #6 (cadaver) {{{3 + " dav: NetWrite Method #6 (cadaver) {{{4 elseif b:netrw_method == 6 " call Decho("write via cadaver (method #6)") @@ -1048,13 +1119,7 @@ fun! netrw#NetWrite(...) range put ='open '.g:netrw_machine endif put ='user '.g:netrw_uid.' '.g:netrw_passwd - - if g:netrw_cygwin == 1 - let cygtmpfile=substitute(tmpfile,'^\(\a\):','/cygdrive/\1/','e') - put ='put '.cygtmpfile.' '.netrw_fname - else - put ='put '.tmpfile.' '.netrw_fname - endif + put ='put '.tmpfile.' '.netrw_fname " perform cadaver operation: norm! 1Gdd @@ -1064,22 +1129,18 @@ fun! netrw#NetWrite(...) range let b:netrw_lastfile = choice "......................................... - " rsync: NetWrite Method #7 {{{3 + " rsync: NetWrite Method #7 {{{4 elseif b:netrw_method == 7 +" call Decho("write via rsync (method #7)") let netrw_fname= escape(b:netrw_fname,g:netrw_fname_escape) - if g:netrw_cygwin == 1 - let cygtmpfile=substitute(tmpfile,'^\(\a\):','/cygdrive/\1/','e') -" call Decho("executing: !".g:netrw_rsync_cmd." ".cygtmpfile." ".g:netrw_machine.":".netrw_fname) - exe g:netrw_silentxfer."!".g:netrw_rsync_cmd." ".cygtmpfile." ".g:netrw_machine.":".netrw_fname - else -" call Decho("executing: !".g:netrw_rsync_cmd." ".tmpfile." ".g:netrw_machine.":".netrw_fname) - exe g:netrw_silentxfer."!".g:netrw_rsync_cmd." ".tmpfile." ".g:netrw_machine.":".netrw_fname - endif +" call Decho("executing: !".g:netrw_rsync_cmd." ".tmpfile." ".g:netrw_machine.":".netrw_fname) + exe g:netrw_silentxfer."!".g:netrw_rsync_cmd." ".tmpfile." ".g:netrw_machine.":".netrw_fname let b:netrw_lastfile = choice "......................................... - " sftp: NetWrite Method #9 {{{3 + " sftp: NetWrite Method #9 {{{4 elseif b:netrw_method == 9 +" call Decho("read via sftp (method #9)") let netrw_fname= escape(b:netrw_fname,g:netrw_fname_escape) if exists("g:netrw_uid") && ( g:netrw_uid != "" ) let uid_machine = g:netrw_uid .'@'. g:netrw_machine @@ -1088,7 +1149,8 @@ fun! netrw#NetWrite(...) range endif new setlocal ff=unix - put ='put '.tmpfile.' '.netrw_fname + put ='put \"'.escape(tmpfile,'\').'\" '.netrw_fname +" call Decho("filter input: ".getline(".")) norm! 1Gdd " call Decho("executing: %!".g:netrw_sftp_cmd.' '.uid_machine) exe g:netrw_silentxfer."%!".g:netrw_sftp_cmd.' '.uid_machine @@ -1096,3101 +1158,3668 @@ fun! netrw#NetWrite(...) range let b:netrw_lastfile= choice "......................................... - " Complain {{{3 + " Complain {{{4 else - echo "***warning*** unable to comply with your request<" . choice . ">" + call netrw#ErrorMsg(s:WARNING,"unable to comply with your request<" . choice . ">",17) endif endwhile - " cleanup {{{3 + " Cleanup: {{{3 " call Decho("cleanup") - let result=delete(tmpfile) + if s:FileReadable(tmpfile) +" call Decho("tmpfile<".tmpfile."> readable, will now delete it") + call s:System("delete",tmpfile) + endif call s:NetOptionRestore() if a:firstline == 1 && a:lastline == line("$") - let &mod= mod " usually equivalent to set nomod + " restore modifiability; usually equivalent to set nomod + let &mod= mod endif -" call Dret("NetWrite") +" call Dret("netrw#NetWrite") endfun -" =========================================== -" Remote Directory Browsing Support: {{{1 -" =========================================== - " --------------------------------------------------------------------- -" NetBrowse: This function uses the command in g:netrw_list_cmd to get a list {{{2 -" of the contents of a remote directory. It is assumed that the -" g:netrw_list_cmd has a string, HOSTNAME, that needs to be substituted -" with the requested remote hostname first. -fun! s:NetBrowse(dirname) - if !exists("w:netrw_longlist")|let w:netrw_longlist= g:netrw_longlist|endif -" call Dfunc("NetBrowse(dirname<".a:dirname.">) longlist=".w:netrw_longlist) - - if exists("s:netrw_skipbrowse") - unlet s:netrw_skipbrowse -" call Dret("NetBrowse") - return +" NetSource: source a remotely hosted vim script {{{2 +" uses NetRead to get a copy of the file into a temporarily file, +" then sources that file, +" then removes that file. +fun! netrw#NetSource(...) +" call Dfunc("netrw#NetSource() a:0=".a:0) + if a:0 > 0 && a:1 == '?' + " give help + echomsg 'NetSource Usage:' + echomsg ':Nsource dav://machine[:port]/path uses cadaver' + echomsg ':Nsource fetch://machine/path uses fetch' + echomsg ':Nsource ftp://[user@]machine[:port]/path uses ftp autodetects <.netrc>' + echomsg ':Nsource http://[user@]machine/path uses http wget' + echomsg ':Nsource rcp://[user@]machine/path uses rcp' + echomsg ':Nsource rsync://machine[:port]/path uses rsync' + echomsg ':Nsource scp://[user@]machine[[:#]port]/path uses scp' + echomsg ':Nsource sftp://[user@]machine[[:#]port]/path uses sftp' + sleep 4 + else + let i= 1 + while i <= a:0 + call netrw#NetRead(3,a:{i}) +" call Decho("s:netread_tmpfile<".s:netrw_tmpfile.">") + if s:FileReadable(s:netrw_tmpfile) +" call Decho("exe so ".s:netrw_tmpfile) + exe "so ".s:netrw_tmpfile + call delete(s:netrw_tmpfile) + unlet s:netrw_tmpfile + else + call netrw#ErrorMsg(s:ERROR,"unable to source <".a:{i}.">!",48) + endif + let i= i + 1 + endwhile endif +" call Dret("netrw#NetSource") +endfun - call s:NetOptionSave() - - " sanity check - if exists("b:netrw_method") && b:netrw_method =~ '[235]' -" call Decho("b:netrw_method=".b:netrw_method) - if !executable("ftp") - if !exists("g:netrw_quiet") - echohl Error | echo "***netrw*** this system doesn't support remote directory listing via ftp" | echohl None - call inputsave()|call input("Press to continue")|call inputrestore() - endif - call s:NetOptionRestore() -" call Dret("NetBrowse") - return - endif - elseif !exists("g:netrw_list_cmd") || g:netrw_list_cmd == '' - if !exists("g:netrw_quiet") - echohl Error | echo "***netrw*** this system doesn't support remote directory listing via ".g:netrw_list_cmd | echohl None - call inputsave()|call input("Press to continue")|call inputrestore() - endif +" =========================================== +" NetGetFile: Function to read temporary file "tfile" with command "readcmd". {{{2 +" readcmd == %r : replace buffer with newly read file +" == 0r : read file at top of buffer +" == r : read file after current line +" == t : leave file in temporary form (ie. don't read into buffer) +fun! s:NetGetFile(readcmd, tfile, method) +" call Dfunc("NetGetFile(readcmd<".a:readcmd.">,tfile<".a:tfile."> method<".a:method.">)") - call s:NetOptionRestore() -" call Dret("NetBrowse") + " readcmd=='t': simply do nothing + if a:readcmd == 't' +" call Dret("NetGetFile : skip read of <".a:tfile.">") return endif - " use buffer-oriented WinVars if buffer ones exist but window ones don't - call s:UseBufWinVars() + " get name of remote filename (ie. url and all) + let rfile= bufname("%") +" call Decho("rfile<".rfile.">") - " set up menus - let b:netrw_browser_active= 1 - call s:NetMenu(1) + if exists("*NetReadFixup") + " for the use of NetReadFixup (not otherwise used internally) + let line2= line("$") + endif - " make this buffer modifiable - setlocal ma nonu nowrap + if a:readcmd[0] == '%' + " get file into buffer +" call Decho("get file into buffer") - " analyze a:dirname and g:netrw_list_cmd - let dirpat = '^\(\w\{-}\)://\(\w\+@\)\=\([^/]\+\)/\(.*\)$' - let dirname = substitute(a:dirname,'\\','/','ge') -" call Decho("dirname<".dirname.">") - if dirname !~ dirpat - if !exists("g:netrw_quiet") - echohl Error | echo "***netrw*** netrw doesn't understand your dirname<".dirname.">" | echohl None - call inputsave()|call input("Press to continue")|call inputrestore() - endif - call s:NetOptionRestore() -" call Dret("NetBrowse : badly formatted dirname<".dirname.">") - return - endif - - let method = substitute(dirname,dirpat,'\1','') - let user = substitute(dirname,dirpat,'\2','') - let machine = substitute(dirname,dirpat,'\3','') - let path = substitute(dirname,dirpat,'\4','') - let fname = substitute(dirname,'^.*/\ze.','','') -" call Decho("set up method <".method .">") -" call Decho("set up user <".user .">") -" call Decho("set up machine<".machine.">") -" call Decho("set up path <".path .">") -" call Decho("set up fname <".fname .">") - - if method == "ftp" || method == "http" - let method = "ftp" - let listcmd = g:netrw_ftp_list_cmd - else - let listcmd = substitute(g:netrw_list_cmd,'\',user.machine,'') - endif - - if exists("b:netrw_method") -" call Decho("setting w:netrw_method<".b:netrw_method.">") - let w:netrw_method= b:netrw_method - endif - - " optionally sort by time (-t) or by size (-S) - if listcmd == "dir" && g:netrw_sort_by =~ "^[ts]" - echohl WarningMsg | echo "***netrw*** windows' ftp doesn't support time/size sorts (get cygwin, set g:netrw_cygwin)" | echohl None - call inputsave()|call input("Press to continue")|call inputrestore() - else - if g:netrw_sort_by =~ "^t" - let listcmd= listcmd."t" - elseif g:netrw_sort_by =~ "^s" - let listcmd= listcmd."S" + " rename the current buffer to the temp file (ie. tfile) + if g:netrw_cygwin + let tfile= substitute(a:tfile,'/cygdrive/\(.\)','\1:','') + else + let tfile= a:tfile endif +" call Decho("keepalt exe file ".tfile) + keepalt exe "silent! keepalt file ".tfile - " optionally sort in reverse - if g:netrw_sort_direction =~ "^r" && listcmd == "dir" - let listcmd= listcmd."r" + " edit temporary file (ie. read the temporary file in) + if rfile =~ '\.zip$' +" call Decho("handling remote zip file with zip#Browse(tfile<".tfile.">)") + call zip#Browse(tfile) + elseif rfile =~ '\.tar$' +" call Decho("handling remote tar file with tar#Browse(tfile<".tfile.">)") + call tar#Browse(tfile) + elseif rfile =~ '\.tar\.gz' +" call Decho("handling remote gzip-compressed tar file") + call tar#Browse(tfile) + elseif rfile =~ '\.tar\.bz2' +" call Decho("handling remote bz2-compressed tar file") + call tar#Browse(tfile) + else +" call Decho("edit temporary file") + e! endif - endif - -" call Decho("set up listcmd<".listcmd.">") - if fname =~ '@$' && fname !~ '^"' -" call Decho("attempt transfer of symlink as file") - call s:NetBrowse(substitute(dirname,'@$','','e')) - redraw! - call s:NetOptionRestore() -" call Dret("NetBrowse : symlink") - return - elseif fname !~ '[\/]$' && fname !~ '^"' - " looks like a regular file, attempt transfer -" call Decho("attempt transfer as regular file<".dirname.">") - - " remove any filetype indicator from end of dirname, except for the - " "this is a directory" indicator (/). There shouldn't be one of those, - " anyway. - let path= substitute(path,'[*=@|]\r\=$','','e') -" call Decho("new path<".path.">") - - " remote-read the requested file into current buffer - mark ' - keepjumps keepalt enew! - set ma -" call Decho("exe file ".method."://".user.machine."/".escape(path,s:netrw_cd_escape)) - exe "file ".method."://".user.machine."/".escape(path,s:netrw_cd_escape) - exe "silent doau BufReadPre ".fname - silent call netrw#NetRead(2,method."://".user.machine."/".path) - exe "silent doau BufReadPost ".fname - - " save certain window-oriented variables into buffer-oriented variables - call s:SetBufWinVars() - call s:NetOptionRestore() - setlocal nomod nowrap + " rename buffer back to remote filename + exe "silent! keepalt file ".escape(rfile,' ') + filetype detect +" call Dredir("renamed buffer back to remote filename<".rfile."> : expand(%)<".expand("%").">","ls!") + let line1 = 1 + let line2 = line("$") -" call Dret("NetBrowse : file<".fname.">") - return - endif + elseif s:FileReadable(a:tfile) + " read file after current line +" call Decho("read file<".a:tfile."> after current line") + let curline = line(".") + let lastline= line("$") +" call Decho("exe<".a:readcmd." ".v:cmdarg." ".a:tfile."> line#".curline) + exe a:readcmd." ".v:cmdarg." ".a:tfile + let line1= curline + 1 + let line2= line("$") - lastline + 1 - " --------------------------------------------------------------------- - " Perform Directory Listing: -" call Decho("Perform directory listing...") - " set up new buffer and map - let bufname = method.'://'.user.machine.'/'.path - let bufnamenr = bufnr(bufname.'$') -" call Decho("bufname<".bufname."> bufnamenr=".bufnamenr) - mark ' - if bufnamenr != -1 - " buffer already exists, switch to it! -" call Decho("buffer already exists, switching to it") - exe "b ".bufnamenr - if line("$") >= 5 - call s:NetOptionRestore() -" call Dret("NetBrowse") - return - endif else -" call Decho("generate a new buffer") - keepjumps keepalt enew! + " not readable +" call Decho("tfile<".a:tfile."> not readable") + call netrw#ErrorMsg(s:WARNING,"file <".a:tfile."> not readable",9) +" call Dret("NetGetFile : tfile<".a:tfile."> not readable") + return endif - " rename file to reflect where its from - setlocal bt=nofile bh=wipe nobl noswf - exe "setlocal ts=".g:netrw_maxfilenamelen -" call Decho("exe file ".escape(bufname,s:netrw_cd_escape)) - exe 'file '.escape(bufname,s:netrw_cd_escape) -" call Decho("renaming file to bufname<".bufname.">") - setlocal bt=nofile nobl nonu noswf - if g:netrw_fastbrowse >= 1 - setlocal bh=hide - else - setlocal bh=delete + " User-provided (ie. optional) fix-it-up command + if exists("*NetReadFixup") +" call Decho("calling NetReadFixup(method<".a:method."> line1=".line1." line2=".line2.")") + call NetReadFixup(a:method, line1, line2) +" else " Decho +" call Decho("NetReadFixup() not called, doesn't exist (line1=".line1." line2=".line2.")") endif - " save current directory on directory history list - call s:NetBookmarkDir(3,expand("%")) - - " set up buffer-local mappings -" call Decho("set up buffer-local mappings") - nnoremap :call NetBrowse(NetBrowseChgDir(expand("%"),NetGetWord())) - nnoremap :call NetRefresh(NetBrowseChgDir(expand("%"),'./'),0) - nnoremap - :exe "norm! 0"call NetBrowse(NetBrowseChgDir(expand("%"),'../')) - nnoremap a :let g:netrw_hide=(g:netrw_hide+1)%3exe "norm! 0"call NetBrowse(NetBrowseChgDir(expand("%"),'./')) - if w:netrw_longlist != 2 - nnoremap b :call NetBookmarkDir(0,expand("%")) - nnoremap B :call NetBookmarkDir(1,expand("%")) - endif - nnoremap Nb :call NetBookmarkDir(0,expand("%")) - nnoremap NB :call NetBookmarkDir(0,expand("%")) - nnoremap :call NetHideEdit(0) - nnoremap i :call NetLongList(0) - nnoremap o :call NetSplit(0) - nnoremap O :call netrw#NetObtain() - nnoremap P :call NetPrevWinOpen(0) - nnoremap q :call NetBookmarkDir(2,expand("%")) - nnoremap r :let g:netrw_sort_direction= (g:netrw_sort_direction =~ 'n')? 'r' : 'n'exe "norm! 0"call NetBrowse(NetBrowseChgDir(expand("%"),'./')) - nnoremap s :call NetSaveWordPosn()let g:netrw_sort_by= (g:netrw_sort_by =~ 'n')? 'time' : (g:netrw_sort_by =~ 't')? 'size' : 'name'exe "norm! 0"call NetBrowse(NetBrowseChgDir(expand("%"),'./'))call NetRestoreWordPosn() - nnoremap S :call NetSortSequence(0) - nnoremap u :call NetBookmarkDir(4,expand("%")) - nnoremap U :call NetBookmarkDir(5,expand("%")) - nnoremap v :call NetSplit(1) - nnoremap x :call netrw#NetBrowseX(NetBrowseChgDir(expand("%"),NetGetWord()),1) - nnoremap <2-leftmouse> :call NetBrowse(NetBrowseChgDir(expand("%"),NetGetWord())) - exe 'nnoremap :call NetBrowseRm("'.user.machine.'","'.path.'")' - exe 'vnoremap :call NetBrowseRm("'.user.machine.'","'.path.'")' - exe 'nnoremap d :call NetMakeDir("'.user.machine.'")' - exe 'nnoremap D :call NetBrowseRm("'.user.machine.'","'.path.'")' - exe 'vnoremap D :call NetBrowseRm("'.user.machine.'","'.path.'")' - exe 'nnoremap R :call NetBrowseRename("'.user.machine.'","'.path.'")' - exe 'vnoremap R :call NetBrowseRename("'.user.machine.'","'.path.'")' - nnoremap :he netrw-browse-cmds - setlocal ma nonu nowrap - - " Set up the banner -" call Decho("set up the banner: sortby<".g:netrw_sort_by."> method<".method."> direction<".g:netrw_sort_direction.">") - keepjumps put ='\" ===========================================================================' - keepjumps put ='\" Netrw Remote Directory Listing (netrw '.g:loaded_netrw.')' - keepjumps put ='\" '.bufname - let w:netrw_bannercnt = 7 - let sortby = g:netrw_sort_by - if g:netrw_sort_direction =~ "^r" - let sortby = sortby." reversed" + " update the Buffers menu + if has("gui") && has("gui_running") + silent! emenu Buffers.Refresh\ menu endif - if g:netrw_sort_by =~ "^n" - " sorted by name - let w:netrw_bannercnt= w:netrw_bannercnt + 1 - keepjumps put ='\" Sorted by '.sortby - keepjumps put ='\" Sort sequence: '.g:netrw_sort_sequence - else - " sorted by size or date - keepjumps put ='\" Sorted by '.sortby - endif - if g:netrw_list_hide != "" && g:netrw_hide -" call Decho("g:netrw_hide=".g:netrw_hide) - if g:netrw_hide == 1 - keepjumps put ='\" Hiding: '.g:netrw_list_hide - else - keepjumps put ='\" Showing: '.g:netrw_list_hide - endif - let w:netrw_bannercnt= w:netrw_bannercnt + 1 - endif - keepjumps put ='\" Quick Help: :help -:go up dir D:delete R:rename s:sort-by x:exec' - keepjumps put ='\" ===========================================================================' +" call Decho("readcmd<".a:readcmd."> cmdarg<".v:cmdarg."> tfile<".a:tfile."> readable=".s:FileReadable(a:tfile)) - " remote read the requested directory listing - " Use ftp if that was the file-transfer method selected, otherwise use ssh - " Note that not all ftp servers honor the options for ls - if method == "ftp" - " use ftp to get remote file listing -" call Decho("use ftp to get remote file listing") - call s:NetBrowseFtpCmd(path,listcmd) - keepjumps 1d + " make sure file is being displayed + redraw! +" call Dret("NetGetFile") +endfun - if w:netrw_longlist == 0 || w:netrw_longlist == 2 - " shorten the listing -" call Decho("generate short listing") - exe "keepjumps ".w:netrw_bannercnt +" ------------------------------------------------------------------------ +" NetMethod: determine method of transfer {{{2 +" method == 1: rcp +" 2: ftp + <.netrc> +" 3: ftp + machine, id, password, and [path]filename +" 4: scp +" 5: http (wget) +" 6: cadaver +" 7: rsync +" 8: fetch +" 9: sftp +fun! s:NetMethod(choice) " globals: method machine id passwd fname +" call Dfunc("NetMethod(a:choice<".a:choice.">)") - " cleanup - if g:netrw_ftp_browse_reject != "" - exe "silent! g/".g:netrw_ftp_browse_reject."/keepjumps d" - endif - silent! keepjumps %s/\r$//e + " initialization + let b:netrw_method = 0 + let g:netrw_machine = "" + let b:netrw_fname = "" + let g:netrw_port = "" + let g:netrw_choice = a:choice - " if there's no ../ listed, then put ./ and ../ in - let line1= line(".") - keepjumps 1 - silent keepjumps call search('^\.\.\/\%(\s\|$\)','W') - let line2= line(".") - if line2 == 0 - keepjumps put='../' - keepjumps put='./' - endif - exe "keepjumps ".line1 - keepjumps norm! 0 + " Patterns: + " mipf : a:machine a:id password filename Use ftp + " mf : a:machine filename Use ftp + <.netrc> or g:netrw_uid g:netrw_passwd + " ftpurm : ftp://[user@]host[[#:]port]/filename Use ftp + <.netrc> or g:netrw_uid g:netrw_passwd + " rcpurm : rcp://[user@]host/filename Use rcp + " rcphf : [user@]host:filename Use rcp + " scpurm : scp://[user@]host[[#:]port]/filename Use scp + " httpurm : http://[user@]host/filename Use wget + " davurm : [s]dav://host[:port]/path Use cadaver + " rsyncurm : rsync://host[:port]/path Use rsync + " fetchurm : fetch://[user@]host[:http]/filename Use fetch (defaults to ftp, override for http) + " sftpurm : sftp://[user@]host/filename Use scp + let mipf = '^\(\S\+\)\s\+\(\S\+\)\s\+\(\S\+\)\s\+\(\S\+\)$' + let mf = '^\(\S\+\)\s\+\(\S\+\)$' + let ftpurm = '^ftp://\(\([^/@]\{-}\)@\)\=\([^/#:]\{-}\)\([#:]\d\+\)\=/\(.*\)$' + let rcpurm = '^rcp://\%(\([^/@]\{-}\)@\)\=\([^/]\{-}\)/\(.*\)$' + let rcphf = '^\(\(\h\w*\)@\)\=\(\h\w*\):\([^@]\+\)$' + let scpurm = '^scp://\([^/#:]\+\)\%([#:]\(\d\+\)\)\=/\(.*\)$' + let httpurm = '^http://\([^/]\{-}\)\(/.*\)\=$' + let davurm = '^s\=dav://\([^/]\+\)/\(.*/\)\([-_.~[:alnum:]]\+\)$' + let rsyncurm = '^rsync://\([^/]\{-}\)/\(.*\)\=$' + let fetchurm = '^fetch://\(\([^/@]\{-}\)@\)\=\([^/#:]\{-}\)\(:http\)\=/\(.*\)$' + let sftpurm = '^sftp://\([^/]\{-}\)/\(.*\)\=$' - " more cleanup - exe 'silent! keepjumps '.w:netrw_bannercnt.',$s/^\(\%(\S\+\s\+\)\{7}\S\+\)\s\+\(\S.*\)$/\2/e' - exe "silent! keepjumps ".w:netrw_bannercnt.',$g/ -> /s# -> .*/$#/#e' - exe "silent! keepjumps ".w:netrw_bannercnt.',$g/ -> /s# -> .*$#/#e' +" call Decho("determine method:") + " Determine Method + " rcp://user@hostname/...path-to-file + if match(a:choice,rcpurm) == 0 +" call Decho("rcp://...") + let b:netrw_method = 1 + let userid = substitute(a:choice,rcpurm,'\1',"") + let g:netrw_machine = substitute(a:choice,rcpurm,'\2',"") + let b:netrw_fname = substitute(a:choice,rcpurm,'\3',"") + if userid != "" + let g:netrw_uid= userid endif - else - " use ssh to get remote file listing -" call Decho("use ssh to get remote file listing") - let shq= &shq? &shq : ( &sxq? &sxq : "'") -" call Decho("exe silent r! ".listcmd." '".shq.escape(path,s:netrw_cd_escape).shq."'") - exe "silent r! ".listcmd." ".shq.escape(path,s:netrw_cd_escape).shq - keepjumps 1d - " cleanup - if g:netrw_ftp_browse_reject != "" - exe "silent! g/".g:netrw_ssh_browse_reject."/keepjumps d" - endif - endif + " scp://user@hostname/...path-to-file + elseif match(a:choice,scpurm) == 0 +" call Decho("scp://...") + let b:netrw_method = 4 + let g:netrw_machine = substitute(a:choice,scpurm,'\1',"") + let g:netrw_port = substitute(a:choice,scpurm,'\2',"") + let b:netrw_fname = substitute(a:choice,scpurm,'\3',"") - " set up syntax highlighting - if has("syntax") - setlocal ft=netrw - if !exists("g:syntax_on") || !g:syntax_on - setlocal ft= - " Ugly workaround -- when syntax highlighting is off and laststatus==2, - " sometimes the laststatus highlight bleeds into the entire display. - " Only seems to happen with remote browsing. Weird. - redraw - endif - endif + " http://user@hostname/...path-to-file + elseif match(a:choice,httpurm) == 0 +" call Decho("http://...") + let b:netrw_method = 5 + let g:netrw_machine= substitute(a:choice,httpurm,'\1',"") + let b:netrw_fname = substitute(a:choice,httpurm,'\2',"") - " manipulate the directory listing (hide, sort) - if line("$") >= w:netrw_bannercnt - if g:netrw_hide && g:netrw_list_hide != "" - call s:NetrwListHide() + " dav://hostname[:port]/..path-to-file.. + elseif match(a:choice,davurm) == 0 +" call Decho("dav://...") + let b:netrw_method= 6 + if a:choice =~ '^s' + let g:netrw_machine= 'https://'.substitute(a:choice,davurm,'\1/\2',"") + else + let g:netrw_machine= 'http://'.substitute(a:choice,davurm,'\1/\2',"") endif + let b:netrw_fname = substitute(a:choice,davurm,'\3',"") - if w:netrw_longlist == 1 - " do a long listing; these substitutions need to be done prior to sorting -" call Decho("manipulate long listing") - - if method == "ftp" - " cleanup - exe "keepjumps ".w:netrw_bannercnt - while getline(".") =~ g:netrw_ftp_browse_reject - keepjumps d - endwhile - " if there's no ../ listed, then put ./ and ../ in - let line1= line(".") - keepjumps 1 - silent keepjumps call search('^\.\.\/\%(\s\|$\)','W') - let line2= line(".") - if line2 == 0 - exe 'keepjumps '.w:netrw_bannercnt."put='./'" - exe 'keepjumps '.w:netrw_bannercnt."put='../'" - endif - exe "keepjumps ".line1 - keepjumps norm! 0 - endif + " rsync://user@hostname/...path-to-file + elseif match(a:choice,rsyncurm) == 0 +" call Decho("rsync://...") + let b:netrw_method = 7 + let g:netrw_machine= substitute(a:choice,rsyncurm,'\1',"") + let b:netrw_fname = substitute(a:choice,rsyncurm,'\2',"") - exe 'silent keepjumps '.w:netrw_bannercnt.',$s/ -> .*$//e' - exe 'silent keepjumps '.w:netrw_bannercnt.',$s/^\(\%(\S\+\s\+\)\{7}\S\+\)\s\+\(\S.*\)$/\2\t\1/e' - exe 'silent keepjumps '.w:netrw_bannercnt + " ftp://[user@]hostname[[:#]port]/...path-to-file + elseif match(a:choice,ftpurm) == 0 +" call Decho("ftp://...") + let userid = substitute(a:choice,ftpurm,'\2',"") + let g:netrw_machine= substitute(a:choice,ftpurm,'\3',"") + let g:netrw_port = substitute(a:choice,ftpurm,'\4',"") + let b:netrw_fname = substitute(a:choice,ftpurm,'\5',"") + if userid != "" + let g:netrw_uid= userid endif - - if line("$") >= w:netrw_bannercnt - if g:netrw_sort_by =~ "^n" - call s:SetSort() - if g:netrw_sort_direction =~ 'n' - exe 'silent keepjumps '.w:netrw_bannercnt.',$sort' - else - exe 'silent keepjumps '.w:netrw_bannercnt.',$sort!' + if exists("g:netrw_uid") && exists("g:netrw_passwd") + let b:netrw_method = 3 + else + if s:FileReadable(expand("$HOME/.netrc")) && !g:netrw_ignorenetrc + let b:netrw_method= 2 + else + if !exists("g:netrw_uid") || g:netrw_uid == "" + call NetUserPass() + elseif !exists("g:netrw_passwd") || g:netrw_passwd == "" + call NetUserPass(g:netrw_uid) + " else just use current g:netrw_uid and g:netrw_passwd endif - " remove priority pattern prefix - exe 'silent keepjumps '.w:netrw_bannercnt.',$s/^\d\{3}\///e' - endif - if w:netrw_longlist == 1 - " shorten the list to keep its width <= winwidth characters - exe "silent keepjumps ".w:netrw_bannercnt.',$s/\t[-dstrwx]\+/\t/e' + let b:netrw_method= 3 endif endif - endif - call s:NetrwWideListing() - if line("$") >= w:netrw_bannercnt - " place cursor on the top-left corner of the file listing - exe "keepjumps ".w:netrw_bannercnt - norm! 0 - endif + elseif match(a:choice,fetchurm) == 0 +" call Decho("fetch://...") + let b:netrw_method = 8 + let g:netrw_userid = substitute(a:choice,fetchurm,'\2',"") + let g:netrw_machine= substitute(a:choice,fetchurm,'\3',"") + let b:netrw_option = substitute(a:choice,fetchurm,'\4',"") + let b:netrw_fname = substitute(a:choice,fetchurm,'\5',"") - call s:NetOptionRestore() - setlocal nomod noma nonu + " Issue an ftp : "machine id password [path/]filename" + elseif match(a:choice,mipf) == 0 +" call Decho("(ftp) host id pass file") + let b:netrw_method = 3 + let g:netrw_machine = substitute(a:choice,mipf,'\1',"") + let g:netrw_uid = substitute(a:choice,mipf,'\2',"") + let g:netrw_passwd = substitute(a:choice,mipf,'\3',"") + let b:netrw_fname = substitute(a:choice,mipf,'\4',"") -" call Dret("NetBrowse") - return -endfun + " Issue an ftp: "hostname [path/]filename" + elseif match(a:choice,mf) == 0 +" call Decho("(ftp) host file") + if exists("g:netrw_uid") && exists("g:netrw_passwd") + let b:netrw_method = 3 + let g:netrw_machine = substitute(a:choice,mf,'\1',"") + let b:netrw_fname = substitute(a:choice,mf,'\2',"") -" --------------------------------------------------------------------- -" NetBrowseChgDir: {{{2 -fun! s:NetBrowseChgDir(dirname,newdir) -" call Dfunc("NetBrowseChgDir(dirname<".a:dirname."> newdir<".a:newdir.">)") + elseif s:FileReadable(expand("$HOME/.netrc")) + let b:netrw_method = 2 + let g:netrw_machine = substitute(a:choice,mf,'\1',"") + let b:netrw_fname = substitute(a:choice,mf,'\2',"") + endif - let dirname= a:dirname - let newdir = a:newdir + " sftp://user@hostname/...path-to-file + elseif match(a:choice,sftpurm) == 0 +" call Decho("sftp://...") + let b:netrw_method = 9 + let g:netrw_machine= substitute(a:choice,sftpurm,'\1',"") + let b:netrw_fname = substitute(a:choice,sftpurm,'\2',"") - if newdir !~ '[\/]$' - " handling a file - let dirname= dirname.newdir - let didfile= 0 - if g:netrw_browse_split == 1 - new - wincmd _ - elseif g:netrw_browse_split == 2 - rightb vert new - wincmd | - else - " handling a file, didn't split, so possibly remove menu - call s:NetMenu(0) + " Issue an rcp: hostname:filename" (this one should be last) + elseif match(a:choice,rcphf) == 0 +" call Decho("(rcp) [user@]host:file) rcphf<".rcphf.">") + let b:netrw_method = 1 + let userid = substitute(a:choice,rcphf,'\2',"") + let g:netrw_machine= substitute(a:choice,rcphf,'\3',"") + let b:netrw_fname = substitute(a:choice,rcphf,'\4',"") +" call Decho('\1<'.substitute(a:choice,rcphf,'\1',"").">") +" call Decho('\2<'.substitute(a:choice,rcphf,'\2',"").">") +" call Decho('\3<'.substitute(a:choice,rcphf,'\3',"").">") +" call Decho('\4<'.substitute(a:choice,rcphf,'\4',"").">") + if userid != "" + let g:netrw_uid= userid endif -" call Decho("handling a file: dirname<".dirname.">") - elseif newdir == './' - " refresh the directory list -" call Decho("refresh directory listing") - setlocal ma nobl - if g:netrw_fastbrowse >= 1 - setlocal bh=hide - else - setlocal bh=delete + else + if !exists("g:netrw_quiet") + call netrw#ErrorMsg(s:WARNING,"cannot determine method",45) endif - %d + let b:netrw_method = -1 + endif - elseif newdir == '../' - " go up one directory - let trailer= substitute(a:dirname,'^\(\w\+://\%(\w\+@\)\=\w\+/\)\(.*\)$','\2','') + " remove any leading [:#] from port number + if g:netrw_port != "" + let g:netrw_port = substitute(g:netrw_port,'[#:]\+','','') + endif - if trailer =~ '^\%(\.\./\)*$' - " tack on a ../" - let dirname= dirname.'../' +" call Decho("a:choice <".a:choice.">") +" call Decho("b:netrw_method <".b:netrw_method.">") +" call Decho("g:netrw_machine<".g:netrw_machine.">") +" call Decho("g:netrw_port <".g:netrw_port.">") +" if exists("g:netrw_uid") "Decho +" call Decho("g:netrw_uid <".g:netrw_uid.">") +" endif "Decho +" if exists("g:netrw_passwd") "Decho +" call Decho("g:netrw_passwd <".g:netrw_passwd.">") +" endif "Decho +" call Decho("b:netrw_fname <".b:netrw_fname.">") +" call Dret("NetMethod : b:netrw_method=".b:netrw_method) +endfun - else - " strip off a directory name from dirname - let dirname= substitute(dirname,'^\(.*/\)[^/]\+/','\1','') +" ------------------------------------------------------------------------ +" NetReadFixup: this sort of function is typically written by the user {{{2 +" to handle extra junk that their system's ftp dumps +" into the transfer. This function is provided as an +" example and as a fix for a Windows 95 problem: in my +" experience, win95's ftp always dumped four blank lines +" at the end of the transfer. +if has("win95") && exists("g:netrw_win95ftp") && g:netrw_win95ftp + fun! NetReadFixup(method, line1, line2) +" call Dfunc("NetReadFixup(method<".a:method."> line1=".a:line1." line2=".a:line2.")") + if method == 3 " ftp (no <.netrc>) + let fourblanklines= line2 - 3 + silent fourblanklines.",".line2."g/^\s*/d" endif -" call Decho("go up one dir: dirname<".dirname."> trailer<".trailer.">") +" call Dret("NetReadFixup") + endfun +endif - else - " go down one directory - let dirname= dirname.newdir -" call Decho("go down one dir: dirname<".dirname."> newdir<".newdir.">") +" --------------------------------------------------------------------- +" NetUserPass: set username and password for subsequent ftp transfer {{{2 +" Usage: :call NetUserPass() -- will prompt for userid and password +" :call NetUserPass("uid") -- will prompt for password +" :call NetUserPass("uid","password") -- sets global userid and password +fun! NetUserPass(...) + + " get/set userid + if a:0 == 0 +" call Dfunc("NetUserPass(a:0<".a:0.">)") + if !exists("g:netrw_uid") || g:netrw_uid == "" + " via prompt + let g:netrw_uid= input('Enter username: ') endif + else " from command line +" call Dfunc("NetUserPass(a:1<".a:1.">) {") + let g:netrw_uid= a:1 + endif -" call Dret("NetBrowseChgDir <".dirname.">") - return dirname + " get password + if a:0 <= 1 " via prompt +" call Decho("a:0=".a:0." case <=1:") + let g:netrw_passwd= inputsecret("Enter Password: ") + else " from command line +" call Decho("a:0=".a:0." case >1: a:2<".a:2.">") + let g:netrw_passwd=a:2 + endif + +" call Dret("NetUserPass") endfun +" =========================================== +" Shared Browsing Support: {{{1 +" =========================================== + " --------------------------------------------------------------------- -" NetGetWord: it gets the directory named under the cursor {{{2 -fun! s:NetGetWord() -" call Dfunc("NetGetWord() line#".line(".")." longlist=".g:netrw_longlist." virtcol=".virtcol(".")) +" s:BrowserMaps: {{{2 +fun! s:BrowserMaps(islocal) +" call Dfunc("s:BrowserMaps(islocal=".a:islocal.") b:netrw_curdir<".b:netrw_curdir.">") + if a:islocal + nnoremap :call netrw#LocalBrowseCheck(NetBrowseChgDir(1,NetGetWord())) + nnoremap :call netrw#LocalBrowseCheck(NetBrowseChgDir(1,NetGetWord())) + nnoremap :call NetRefresh(1,NetBrowseChgDir(1,'./')) + nnoremap - :exe "norm! 0"call netrw#LocalBrowseCheck(NetBrowseChgDir(1,'../')) + nnoremap a :call NetHide(1) + nnoremap mb :call NetBookmarkDir(0,b:netrw_curdir) + nnoremap gb :call NetBookmarkDir(1,b:netrw_curdir) + nnoremap c :exe "cd ".b:netrw_curdir + nnoremap C :let g:netrw_chgwin= winnr() + nnoremap d :call NetMakeDir("") + nnoremap :call NetHideEdit(1) + nnoremap i :call NetListStyle(1) + nnoremap o :call NetSplit(3) + nnoremap O :call LocalObtain() + nnoremap p :call NetPreview(NetBrowseChgDir(1,NetGetWord(),1)) + nnoremap P :call NetPrevWinOpen(1) + nnoremap q :call NetBookmarkDir(2,b:netrw_curdir) + nnoremap r :let g:netrw_sort_direction= (g:netrw_sort_direction =~ 'n')? 'r' : 'n'exe "norm! 0"call NetRefresh(1,NetBrowseChgDir(1,'./')) + nnoremap s :call NetSortStyle(1) + nnoremap S :call NetSortSequence(1) + nnoremap t :call NetSplit(4) + nnoremap u :call NetBookmarkDir(4,expand("%")) + nnoremap U :call NetBookmarkDir(5,expand("%")) + nnoremap v :call NetSplit(5) + nnoremap x :call netrw#NetBrowseX(NetBrowseChgDir(1,NetGetWord(),0),0)" + if s:didstarstar || !mapcheck("","n") + nnoremap :Nexplore + endif + if s:didstarstar || !mapcheck("","n") + nnoremap :Pexplore + endif + exe 'nnoremap :call LocalBrowseRm("'.b:netrw_curdir.'")' + exe 'vnoremap :call LocalBrowseRm("'.b:netrw_curdir.'")' + exe 'nnoremap :call LocalBrowseRm("'.b:netrw_curdir.'")' + exe 'vnoremap :call LocalBrowseRm("'.b:netrw_curdir.'")' + exe 'nnoremap D :call LocalBrowseRm("'.b:netrw_curdir.'")' + exe 'vnoremap D :call LocalBrowseRm("'.b:netrw_curdir.'")' + exe 'nnoremap R :call LocalBrowseRename("'.b:netrw_curdir.'")' + exe 'vnoremap R :call LocalBrowseRename("'.b:netrw_curdir.'")' + exe 'nnoremap m :call NetMakeDir("")' + nnoremap :he netrw-dir + + else " remote + call s:RemotePathAnalysis(b:netrw_curdir) + nnoremap :call NetBrowse(0,NetBrowseChgDir(0,NetGetWord())) + nnoremap :call NetBrowse(0,NetBrowseChgDir(0,NetGetWord())) + nnoremap :call NetRefresh(0,NetBrowseChgDir(0,'./')) + nnoremap - :exe "norm! 0"call NetBrowse(0,NetBrowseChgDir(0,'../')) + nnoremap a :call NetHide(0) + nnoremap mb :call NetBookmarkDir(0,b:netrw_curdir) + nnoremap gb :call NetBookmarkDir(1,b:netrw_cur) + nnoremap C :let g:netrw_chgwin= winnr() + nnoremap :call NetHideEdit(0) + nnoremap i :call NetListStyle(0) + nnoremap o :call NetSplit(0) + nnoremap O :call netrw#NetObtain(0) + vnoremap O :call netrw#NetObtain(1) + nnoremap p :call NetPreview(NetBrowseChgDir(1,NetGetWord(),1)) + nnoremap P :call NetPrevWinOpen(0) + nnoremap q :call NetBookmarkDir(2,b:netrw_curdir) + nnoremap r :let g:netrw_sort_direction= (g:netrw_sort_direction =~ 'n')? 'r' : 'n'exe "norm! 0"call NetBrowse(0,NetBrowseChgDir(0,'./')) + nnoremap s :call NetSortStyle(0) + nnoremap S :call NetSortSequence(0) + nnoremap t :call NetSplit(1) + nnoremap u :call NetBookmarkDir(4,b:netrw_curdir) + nnoremap U :call NetBookmarkDir(5,b:netrw_curdir) + nnoremap v :call NetSplit(2) + nnoremap x :call netrw#NetBrowseX(NetBrowseChgDir(0,NetGetWord()),1) + exe 'nnoremap :call NetBrowseRm("'.s:user.s:machine.'","'.s:path.'")' + exe 'vnoremap :call NetBrowseRm("'.s:user.s:machine.'","'.s:path.'")' + exe 'nnoremap :call NetBrowseRm("'.s:user.s:machine.'","'.s:path.'")' + exe 'vnoremap :call NetBrowseRm("'.s:user.s:machine.'","'.s:path.'")' + exe 'nnoremap d :call NetMakeDir("'.s:user.s:machine.'")' + exe 'nnoremap D :call NetBrowseRm("'.s:user.s:machine.'","'.s:path.'")' + exe 'vnoremap D :call NetBrowseRm("'.s:user.s:machine.'","'.s:path.'")' + exe 'nnoremap R :call NetBrowseRename("'.s:user.s:machine.'","'.s:path.'")' + exe 'vnoremap R :call NetBrowseRename("'.s:user.s:machine.'","'.s:path.'")' + nnoremap :he netrw-browse-cmds + endif +" call Dret("s:BrowserMaps") +endfun + +" --------------------------------------------------------------------- +" s:NetBrowse: This function uses the command in g:netrw_list_cmd to get a list {{{2 +" of the contents of a remote directory. It is assumed that the +" g:netrw_list_cmd has a string, USEPORT HOSTNAME, that needs to be substituted +" with the requested remote hostname first. +fun! s:NetBrowse(islocal,dirname) + if !exists("w:netrw_liststyle")|let w:netrw_liststyle= g:netrw_liststyle|endif +" call Dfunc("NetBrowse(islocal=".a:islocal." dirname<".a:dirname.">) liststyle=".w:netrw_liststyle." ".g:loaded_netrw." buf#".bufnr("%")) +" call Dredir("ls!") + + if exists("s:netrw_skipbrowse") + unlet s:netrw_skipbrowse +" call Dret("NetBrowse : s:netrw_skipbrowse=".s:netrw_skipbrowse) + return + endif + + call s:NetOptionSave() + + if a:islocal && exists("w:netrw_acdkeep") && w:netrw_acdkeep +" call Decho("handle w:netrw_acdkeep:") +" call Decho("cd ".escape(a:dirname,s:netrw_cd_escape)." (due to 'acd')") + exe 'cd '.escape(a:dirname,s:netrw_cd_escape) +" call Decho("getcwd<".getcwd().">") + + elseif !a:islocal && a:dirname !~ '[\/]$' && a:dirname !~ '^"' + " looks like a regular file, attempt transfer +" call Decho("attempt transfer as regular file<".a:dirname.">") + + " remove any filetype indicator from end of dirname, except for the {{{3 + " "this is a directory" indicator (/). + " There shouldn't be one of those here, anyway. + let path= substitute(a:dirname,'[*=@|]\r\=$','','e') +" call Decho("new path<".path.">") + call s:RemotePathAnalysis(a:dirname) + + " remote-read the requested file into current buffer {{{3 + mark ' + call s:NetrwEnew(a:dirname) + let b:netrw_curdir= a:dirname + call s:NetrwSafeOptions() + setlocal ma noro +" call Decho("exe silent! keepalt file ".s:method."://".s:user.s:machine."/".escape(s:path,s:netrw_cd_escape)." (bt=".&bt.")") + exe "silent! keepalt file ".s:method."://".s:user.s:machine."/".escape(s:path,s:netrw_cd_escape) + exe "silent keepalt doau BufReadPre ".s:fname + silent call netrw#NetRead(2,s:method."://".s:user.s:machine."/".s:path) + exe "silent keepalt doau BufReadPost ".s:fname + + " save certain window-oriented variables into buffer-oriented variables {{{3 + call s:SetBufWinVars() + call s:NetOptionRestore() + setlocal nomod nowrap + +" call Dret("NetBrowse : file<".s:fname.">") + return + endif + + " use buffer-oriented WinVars if buffer ones exist but window ones don't {{{3 call s:UseBufWinVars() - " insure that w:netrw_longlist is set up - if !exists("w:netrw_longlist") - if exists("g:netrw_longlist") - let w:netrw_longlist= g:netrw_longlist + " set up some variables {{{3 + let b:netrw_browser_active = 1 + let dirname = a:dirname + let s:last_sort_by = g:netrw_sort_by + + call s:NetMenu(1) " set up menu {{{3 + if s:NetGetBuffer(a:islocal,dirname) " set up buffer {{{3 +" call Dret("NetBrowse : re-using buffer") + return + endif + + " set b:netrw_curdir to the new directory name {{{3 +" call Decho("set b:netrw_curdir to the new directory name:") + let b:netrw_curdir= dirname + if b:netrw_curdir =~ '[/\\]$' + let b:netrw_curdir= substitute(b:netrw_curdir,'[/\\]$','','e') + endif + if b:netrw_curdir == '' + if has("amiga") + " On the Amiga, the empty string connotes the current directory + let b:netrw_curdir= getcwd() else - let w:netrw_longlist= 0 + " under unix, when the root directory is encountered, the result + " from the preceding substitute is an empty string. + let b:netrw_curdir= '/' endif -" call Decho("w:netrw_longlist=".w:netrw_longlist) endif + if !a:islocal && b:netrw_curdir !~ '/$' + let b:netrw_curdir= b:netrw_curdir.'/' + endif +" call Decho("b:netrw_curdir<".b:netrw_curdir.">") - if exists("w:netrw_bannercnt") && line(".") < w:netrw_bannercnt - " Active Banner support -" call Decho("active banner handling") - norm! 0 - let dirname= "./" - let curline= getline(".") - if curline =~ '"\s*Sorted by\s' - norm s - let s:netrw_skipbrowse= 1 - echo 'Pressing "s" also works' - elseif curline =~ '"\s*Sort sequence:' - let s:netrw_skipbrowse= 1 - echo 'Press "S" to edit sorting sequence' - elseif curline =~ '"\s*Quick Help:' - norm ? - let s:netrw_skipbrowse= 1 - echo 'Pressing "?" also works' - elseif curline =~ '"\s*\%(Hiding\|Showing\):' - norm a - let s:netrw_skipbrowse= 1 - echo 'Pressing "a" also works' - elseif line("$") > w:netrw_bannercnt - exe 'silent keepjumps '.w:netrw_bannercnt + " ------------ + " (local only) {{{3 + " ------------ + if a:islocal +" call Decho("local only:") + + " Set up ShellCmdPost handling. Append current buffer to browselist + call s:LocalFastBrowser() + + " handle g:netrw_keepdir: set vim's current directory to netrw's notion of the current directory {{{3 + if !g:netrw_keepdir +" call Decho("handle keepdir:") +" call Decho('exe cd '.escape(b:netrw_curdir,s:netrw_cd_escape)) + try + exe 'cd '.escape(b:netrw_curdir,s:netrw_cd_escape) + catch /^Vim\%((\a\+)\)\=:E472/ + call netrw#ErrorMsg(s:ERROR,"unable to change directory to <".b:netrw_curdir."> (permissions?)",33) + if exists("w:netrw_prvdir") + let b:netrw_curdir= w:netrw_prvdir + else + call s:NetOptionRestore() + let b:netrw_curdir= dirname +" call Dret("NetBrowse : reusing buffer#".(exists("bufnum")? bufnum : 'N/A')."<".dirname."> getcwd<".getcwd().">") + return + endif + endtry endif - elseif w:netrw_longlist == 0 -" call Decho("thin column handling") - norm! 0 - let dirname= getline(".") - - elseif w:netrw_longlist == 1 -" call Decho("long column handling") - norm! 0 - let dirname= substitute(getline("."),'^\(\%(\S\+\s\)*\S\+\).\{-}$','\1','e') - + " -------------------------------- + " remote handling: {{{3 + " -------------------------------- else -" call Decho("obtain word from wide listing") - let dirname= getline(".") +" call Decho("remote only:") + + " analyze a:dirname and g:netrw_list_cmd {{{4 +" call Decho("b:netrw_curdir<".(exists("b:netrw_curdir")? b:netrw_curdir : "doesn't exist")."> a:dirname<".a:dirname.">") + if a:dirname == "NetrwTreeListing" + let dirname= b:netrw_curdir +" call Decho("(dirname was NetrwTreeListing) dirname<".dirname.">") + elseif exists("w:netrw_liststyle") && w:netrw_liststyle == s:TREELIST && exists("b:netrw_curdir") + let dirname= substitute(b:netrw_curdir,'\\','/','g') + if dirname !~ '/$' + let dirname= dirname.'/' + endif + let b:netrw_curdir = dirname +" call Decho("(liststyle is TREELIST) dirname<".dirname.">") + else + let dirname = substitute(a:dirname,'\\','/','g') +" call Decho("(normal) dirname<".dirname.">") + endif - if !exists("b:netrw_cpf") - let b:netrw_cpf= 0 - exe 'silent keepjumps '.w:netrw_bannercnt.',$g/^./if virtcol("$") > b:netrw_cpf|let b:netrw_cpf= virtcol("$")|endif' -" call Decho("computed cpf") + let dirpat = '^\(\w\{-}\)://\(\w\+@\)\=\([^/]\+\)/\(.*\)$' + if dirname !~ dirpat + if !exists("g:netrw_quiet") + call netrw#ErrorMsg(s:ERROR,"netrw doesn't understand your dirname<".dirname.">",20) + endif + call s:NetOptionRestore() +" call Dret("NetBrowse : badly formatted dirname<".dirname.">") + return endif + let b:netrw_curdir= dirname +" call Decho("b:netrw_curdir<".b:netrw_curdir."> (remote)") + endif " (additional remote handling) - let filestart = (virtcol(".")/b:netrw_cpf)*b:netrw_cpf -" call Decho("filestart= ([virtcol=".virtcol(".")."]/[b:netrw_cpf=".b:netrw_cpf."])*b:netrw_cpf=".filestart." bannercnt=".w:netrw_bannercnt) -" call Decho("1: dirname<".dirname.">") - if filestart > 0|let dirname= substitute(dirname,'^.\{'.filestart.'}','','')|endif -" call Decho("2: dirname<".dirname.">") - let dirname = substitute(dirname,'^\(.\{'.b:netrw_cpf.'}\).*$','\1','e') -" call Decho("3: dirname<".dirname.">") - let dirname = substitute(dirname,'\s\+$','','e') -" call Decho("4: dirname<".dirname.">") - endif + " ----------------------- + " Directory Listing: {{{3 + " ----------------------- + setlocal noro ma + call s:BrowserMaps(a:islocal) + call s:PerformListing(a:islocal) -" call Dret("NetGetWord <".dirname.">") - return dirname +" call Dret("NetBrowse") + return endfun " --------------------------------------------------------------------- -" NetBrowseRm: remove/delete a remote file or directory {{{2 -fun! s:NetBrowseRm(usrhost,path) range -" call Dfunc("NetBrowseRm(usrhost<".a:usrhost."> path<".a:path.">) virtcol=".virtcol(".")) -" call Decho("firstline=".a:firstline." lastline=".a:lastline) - - " preparation for removing multiple files/directories - let ctr= a:firstline - let all= 0 +" s:NetGetBuffer: {{{2 +" returns 0=cleared buffer +" 1=re-used buffer +fun! s:NetGetBuffer(islocal,dirname) +" call Dfunc("s:NetGetBuffer(islocal=".a:islocal." dirname<".a:dirname.">)") + + " re-use buffer if possible {{{3 + if exists("w:netrw_liststyle") && w:netrw_liststyle == s:TREELIST + " find NetrwTreeList buffer if there is one + let dirname= "NetrwTreeListing" + let bufnum = bufnr('\') + if bufnum != -1 +" call Dret("s:NetGetBuffer : bufnum#".bufnum."") + return + endif - " remove multiple files and directories - while ctr <= a:lastline - exe ctr - - let rmfile= s:NetGetWord() -" call Decho("rmfile<".rmfile.">") - - if rmfile !~ '^"' && (rmfile =~ '@$' || rmfile !~ '[\/]$') - " attempt to remove file - if !all - echohl Statement - call inputsave() - let ok= input("Confirm deletion of file<".rmfile."> ","[{y(es)},n(o),a(ll),q(uit)] ") - call inputrestore() - echohl NONE - if ok == "" - let ok="no" - endif - let ok= substitute(ok,'\[{y(es)},n(o),a(ll),q(uit)]\s*','','e') - if ok =~ 'a\%[ll]' - let all= 1 - endif - endif - - if all || ok =~ 'y\%[es]' || ok == "" - if exists("w:netrw_method") && (w:netrw_method == 2 || w:netrw_method == 3) - silent! keepjumps .,$d - call s:NetBrowseFtpCmd(a:path,"delete ".rmfile) - else - let netrw_rm_cmd= substitute(g:netrw_rm_cmd,'HOSTNAME',a:usrhost,'').' "'.escape(a:path.rmfile,s:netrw_cd_escape).'"' -" call Decho("attempt to remove file: system(".netrw_rm_cmd.")") - let ret= system(netrw_rm_cmd) -" call Decho("returned=".ret." errcode=".v:shell_error) - endif - elseif ok =~ 'q\%[uit]' - break + else + " find buffer number of buffer named precisely the same as dirname {{{3 + let dirname= a:dirname +" call Decho("find buffer<".dirname.">'s number ") + let bufnum= bufnr(escape(dirname,'\')) +" call Decho("findbuf: bufnum=bufnr('".escape(dirname,'\')."')=".bufnum." (initial)") + let ibuf= 1 + if bufnum > 0 && bufname(bufnum) != dirname + let buflast = bufnr("$") +" call Decho("findbuf: buflast=".buflast) + while ibuf <= buflast + let bname= bufname(ibuf) +" call Decho("findbuf: ibuf=".ibuf. " bufname<".bufname(ibuf)."> dirname<".dirname.">") + if bname != '' && bname !~ '/' && dirname =~ '/'.bname.'$' | break | endif + if bname =~ '^'.dirname.'\=$' | break | endif + let ibuf= ibuf + 1 + endwhile + if ibuf > buflast + let bufnum= -1 + else + let bufnum= ibuf endif +" call Decho("findbuf: bufnum=".bufnum." (final)") + endif + endif + " get enew buffer and name it -or- re-use buffer {{{3 + mark ' + if bufnum < 0 || !bufexists(bufnum) +" call Decho("get enew buffer") + call s:NetrwEnew(dirname) + call s:NetrwSafeOptions() + " name the buffer + if exists("w:netrw_liststyle") && w:netrw_liststyle == s:TREELIST + silent! keepalt file NetrwTreeListing else - " attempt to remove directory - if !all - call inputsave() - let ok= input("Confirm deletion of directory<".rmfile."> ","[{y(es)},n(o),a(ll),q(uit)] ") - call inputrestore() - if ok == "" - let ok="no" - endif - let ok= substitute(ok,'\[{y(es)},n(o),a(ll),q(uit)]\s*','','e') - if ok =~ 'a\%[ll]' - let all= 1 - endif - endif - - if all || ok =~ 'y\%[es]' || ok == "" - if exists("w:netrw_method") && (w:netrw_method == 2 || w:netrw_method == 3) - call s:NetBrowseFtpCmd(a:path,"rmdir ".rmfile) - else - let rmfile = a:path.rmfile - let netrw_rmdir_cmd= substitute(g:netrw_rmdir_cmd,'HOSTNAME',a:usrhost,'').' '."'".'"'.rmfile.'"'."'" -" call Decho("attempt to remove dir: system(".netrw_rmdir_cmd.")") - let ret= system(netrw_rmdir_cmd) -" call Decho("returned=".ret." errcode=".v:shell_error) - - if v:shell_error != 0 - let netrw_rmf_cmd= substitute(g:netrw_rmf_cmd,'HOSTNAME',a:usrhost,'').' '.substitute(rmfile,'[\/]$','','e') -" call Decho("2nd attempt to remove dir: system(".netrw_rmf_cmd.")") - let ret= system(netrw_rmf_cmd) -" call Decho("returned=".ret." errcode=".v:shell_error) - - if v:shell_error != 0 && !exists("g:netrw_quiet") - echohl Error | echo "***netrw*** unable to remove directory<".rmfile."> -- is it empty?" | echohl None - call inputsave()|call input("Press to continue")|call inputrestore() - endif - endif - endif - - elseif ok =~ 'q\%[uit]' - break - endif + exe 'silent! keepalt file '.escape(dirname,s:netrw_cd_escape) endif +" call Decho("named enew buffer<".expand("%").">") - let ctr= ctr + 1 - endwhile - - " refresh the directory - let curline= line(".")-1 -" call Decho("refresh the directory") - call s:NetBrowse(s:NetBrowseChgDir(expand("%"),'./')) - exe curline - -" call Dret("NetBrowseRm") -endfun - -" --------------------------------------------------------------------- -" NetBrowseRename: rename a remote file or directory {{{2 -fun! s:NetBrowseRename(usrhost,path) range -" call Dfunc("NetBrowseRename(usrhost<".a:usrhost."> path<".a:path.">)") - - " preparation for removing multiple files/directories - let ctr = a:firstline - let rename_cmd = substitute(g:netrw_rename_cmd,'\',a:usrhost,'') - - " attempt to rename files/directories - while ctr <= a:lastline - exe "keepjumps ".ctr - - norm! 0 - let oldname= s:NetGetWord() -" call Decho("oldname<".oldname.">") - - call inputsave() - let newname= input("Moving ".oldname." to : ",oldname) - call inputrestore() + else " Re-use the buffer - if exists("w:netrw_method") && (w:netrw_method == 2 || w:netrw_method == 3) - call s:NetBrowseFtpCmd(a:path,"rename ".oldname." ".newname) +" call Decho("re-use buffer:") + let eikeep= &ei + set ei=all + if getline(2) =~ '^" Netrw Directory Listing' +" call Decho("re-use buffer#".bufnum."<".((bufnum > 0)? bufname(bufnum) : "")."> using: keepalt b ".bufnum) + exe "keepalt b ".bufnum else - let oldname= a:path.oldname - let newname= a:path.newname -" call Decho("system(rename_cmd".' "'.escape(oldname," ").'" "'.escape(newname,s:netrw_cd_escape).'"') - let ret= system(rename_cmd.' "'.escape(oldname,s:netrw_cd_escape).'" "'.escape(newname,s:netrw_cd_escape).'"') +" call Decho("reusing buffer#".bufnum."<".((bufnum > 0)? bufname(bufnum) : "")."> using: b ".bufnum) + exe "b ".bufnum + endif + let &ei= eikeep + if line("$") <= 1 + call s:NetrwListSettings(a:islocal) +" call Dret("s:NetGetBuffer 0 : re-using buffer#".bufnr("%").", but its empty, so refresh it") + return 0 + elseif exists("w:netrw_liststyle") && w:netrw_liststyle == s:TREELIST +" call Decho("clear buffer<".expand("%")."> with :%d") + silent %d + call s:NetrwListSettings(a:islocal) +" call Dret("s:NetGetBuffer 0 : re-using buffer#".bufnr("%").", but treelist mode always needs a refresh") + return 0 + else +" call Dret("s:NetGetBuffer 1 : buf#".bufnr("%")) + return 1 endif + endif - let ctr= ctr + 1 - endwhile + " do netrw settings: make this buffer not-a-file, modifiable, not line-numbered, etc {{{3 + " fastbrowse Local Remote Hiding a buffer implies it may be re-used (fast) + " slow 0 D D Deleting a buffer implies it will not be re-used (slow) + " med 1 D H + " fast 2 H H + let fname= expand("%") + call s:NetrwListSettings(a:islocal) + exe "file ".escape(fname,' ') + + " delete all lines from buffer {{{3 +" call Decho("clear buffer<".expand("%")."> with :%d") + keepalt silent! %d - " refresh the directory - let curline= line(".") - call s:NetBrowse(s:NetBrowseChgDir(expand("%"),'./')) - exe "keepjumps ".curline -" call Dret("NetBrowseRename") +" call Dret("s:NetGetBuffer 0 : buf#".bufnr("%")) + return 0 endfun " --------------------------------------------------------------------- -" NetRefresh: {{{2 -fun! s:NetRefresh(dirname,islocal) -" call Dfunc("NetRefresh(dirname<".a:dirname.">,islocal=".a:islocal.")") - call netrw#NetSavePosn() - set ma - %d - if a:islocal - call s:LocalBrowse(a:dirname) - else - call s:NetBrowse(a:dirname) +" s:NetrwListSettings: {{{2 +fun! s:NetrwListSettings(islocal) +" call Dfunc("s:NetrwListSettings(islocal=".a:islocal.")") + let fname= bufname("%") + setlocal bt=nofile nobl ma nonu nowrap noro + exe "file ".escape(fname,' ') + if g:netrw_use_noswf + setlocal noswf endif - call netrw#NetRestorePosn() - redraw! -" call Dret("NetRefresh") -endfun - -" --------------------------------------------------------------------- -" NetSplit: mode {{{2 -" =0 : net and o -" =1 : net and v -" =2 : local and o -" =3 : local and v -fun! s:NetSplit(mode) -" call Dfunc("NetSplit(mode=".a:mode.") alto=".g:netrw_alto." altv=".g:netrw_altv) - - call s:SaveWinVars() - if a:mode == 0 - exe (g:netrw_alto? "bel " : "abo ").g:netrw_winsize."wincmd s" - call s:CopyWinVars() - exe "norm! 0" - call s:NetBrowse(s:NetBrowseChgDir(expand("%"),s:NetGetWord())) - elseif a:mode ==1 - exe (g:netrw_altv? "rightb " : "lefta ").g:netrw_winsize."wincmd v" - call s:CopyWinVars() - exe "norm! 0" - call s:NetBrowse(s:NetBrowseChgDir(expand("%"),s:NetGetWord())) - elseif a:mode ==2 - exe (g:netrw_alto? "bel " : "abo ").g:netrw_winsize."wincmd s" - call s:CopyWinVars() - exe "norm! 0" - call s:LocalBrowse(s:LocalBrowseChgDir(b:netrw_curdir,s:NetGetWord())) +"call Dredir("ls!") +" call Decho("exe setlocal ts=".g:netrw_maxfilenamelen) + exe "setlocal ts=".g:netrw_maxfilenamelen + if g:netrw_fastbrowse > a:islocal + setlocal bh=hide else - exe (g:netrw_altv? "rightb " : "lefta ").g:netrw_winsize."wincmd v" - call s:CopyWinVars() - exe "norm! 0" - call s:LocalBrowse(s:LocalBrowseChgDir(b:netrw_curdir,s:NetGetWord())) + setlocal bh=delete endif - -" call Dret("NetSplit") +" call Dret("s:NetrwListSettings") endfun " --------------------------------------------------------------------- -" NetBrowseX: allows users to write custom functions to operate on {{{2 -" files given their extension. Passes 0=local, 1=remote -fun! netrw#NetBrowseX(fname,remote) -" call Dfunc("NetBrowseX(fname<".a:fname."> remote=".a:remote.")") +" s:PerformListing: {{{2 +fun! s:PerformListing(islocal) +" call Dfunc("s:PerformListing(islocal=".a:islocal.")") + +" if exists("g:netrw_silent") && g:netrw_silent == 0 && &ch >= 1 " Decho +" call Decho("(netrw) Processing your browsing request...") +" endif " Decho + +" call Decho('w:netrw_liststyle='.(exists("w:netrw_liststyle")? w:netrw_liststyle : 'n/a')) + if exists("w:netrw_liststyle") && w:netrw_liststyle == s:TREELIST && exists("w:netrw_treedict") + " force a refresh for tree listings +" call Decho("clear buffer<".expand("%")."> with :%d") + setlocal ma noro + keepjumps %d + endif - " set up the filename - " (lower case the extension, make a local copy of a remote file) - let exten= substitute(a:fname,'.*\.\(.\{-}\)','\1','e') - if has("win32") || has("win95") || has("win64") || has("win16") - let exten= substitute(exten,'^.*$','\L&\E','') - endif - let fname= escape(a:fname,"%#") -" call Decho("fname<".fname."> after escape()") + " save current directory on directory history list + call s:NetBookmarkDir(3,b:netrw_curdir) - " seems kde systems often have gnome-open due to dependencies, even though - " gnome-open's subsidiary display tools are largely absent. Kde systems - " usually have "kdeinit" running, though... (tnx Mikolaj Machowski) - if !exists("s:haskdeinit") - if has("unix") - silent! let s:haskdeinit= system('ps -e') =~ 'kdeinit' - if v:shell_error - let s:haskdeinit = 0 - endif - else - let s:haskdeinit= 0 - endif -" call Decho("setting s:haskdeinit=".s:haskdeinit) - endif + " Set up the banner {{{3 +" call Decho("set up banner") + keepjumps put ='\" ============================================================================' + keepjumps put ='\" Netrw Directory Listing (netrw '.g:loaded_netrw.')' + keepjumps put ='\" '.b:netrw_curdir + keepjumps 1d + let w:netrw_bannercnt= 3 + exe w:netrw_bannercnt - if a:remote == 1 - " create a local copy - let fname= tempname().".".exten -" call Decho("a:remote==1: create a local copy of <".a:fname."> as <".fname.">") - exe "silent keepjumps bot 1new ".a:fname - set bh=delete - exe "w! ".fname - q + let sortby= g:netrw_sort_by + if g:netrw_sort_direction =~ "^r" + let sortby= sortby." reversed" endif -" call Decho("exten<".exten."> "."netrwFileHandlers#NFH_".exten."():exists=".exists("*netrwFileHandlers#NFH_".exten)) - " set up redirection - if &srr =~ "%s" - let redir= substitute(&srr,"%s","/dev/null","") + " Sorted by... {{{3 +" call Decho("handle specified sorting: g:netrw_sort_by<".g:netrw_sort_by.">") + if g:netrw_sort_by =~ "^n" +" call Decho("directories will be sorted by name") + " sorted by name + keepjumps put ='\" Sorted by '.sortby + keepjumps put ='\" Sort sequence: '.g:netrw_sort_sequence + let w:netrw_bannercnt= w:netrw_bannercnt + 2 else - let redir= &srr . "/dev/null" +" call Decho("directories will be sorted by size or time") + " sorted by size or date + keepjumps put ='\" Sorted by '.sortby + let w:netrw_bannercnt= w:netrw_bannercnt + 1 endif -" call Decho("redir{".redir."} srr{".&srr."}") + exe w:netrw_bannercnt - if exists("g:netrw_browsex_viewer") && executable(g:netrw_browsex_viewer) -" call Decho("g:netrw_browsex_viewer<".g:netrw_browsex_viewer.">") - if g:netrw_browsex_viewer == '-' - let ret= netrwFileHandlers#Invoke(exten,fname) + " Hiding... -or- Showing... {{{3 +" call Decho("handle hiding/showing (g:netrw_hide=".g:netrw_list_hide." g:netrw_list_hide<".g:netrw_list_hide.">)") + if g:netrw_list_hide != "" && g:netrw_hide + if g:netrw_hide == 1 + keepjumps put ='\" Hiding: '.g:netrw_list_hide else -" call Decho("exe silent !".g:netrw_browsex_viewer." '".escape(fname,'%#')."' ".redir) - exe "silent !".g:netrw_browsex_viewer." '".escape(fname,'%#')."'".redir - let ret= v:shell_error + keepjumps put ='\" Showing: '.g:netrw_list_hide endif + let w:netrw_bannercnt= w:netrw_bannercnt + 1 + endif + exe w:netrw_bannercnt + keepjumps put ='\" Quick Help: :help -:go up dir D:delete R:rename s:sort-by x:exec' + keepjumps put ='\" ============================================================================' + let w:netrw_bannercnt= w:netrw_bannercnt + 2 - " execute the file handler - elseif has("win32") || has("win64") -" call Decho('exe silent !start rundll32 url.dll,FileProtocolHandler "'.escape(fname, '%#').'"') - exe 'silent !start rundll32 url.dll,FileProtocolHandler "'.escape(fname, '%#').'"' - let ret= v:shell_error - - elseif has("unix") && executable("gnome-open") && !s:haskdeinit -" call Decho("exe silent !gnome-open '".escape(fname,'%#')."' ".redir) - exe "silent !gnome-open '".escape(fname,'%#')."'".redir - let ret= v:shell_error - - elseif has("unix") && executable("kfmclient") && s:haskdeinit -" call Decho("exe silent !kfmclient exec '".escape(fname,'%#')."' ".redir) - exe "silent !kfmclient exec '".escape(fname,'%#')."' ".redir - let ret= v:shell_error + " bannercnt should index the line just after the banner + let w:netrw_bannercnt= w:netrw_bannercnt + 1 + exe w:netrw_bannercnt +" call Decho("bannercnt=".w:netrw_bannercnt." (should index line just after banner) line($)=".line("$")) - else - " netrwFileHandlers#Invoke() always returns 0 - let ret= netrwFileHandlers#Invoke(exten,fname) + " set up syntax highlighting {{{3 +" call Decho("set up syntax highlighting") + if has("syntax") + setlocal ft=netrw + if !exists("g:syntax_on") || !g:syntax_on + setlocal ft= + endif endif - " if unsuccessful, attempt netrwFileHandlers#Invoke() - if ret - let ret= netrwFileHandlers#Invoke(exten,fname) + " get list of files + if a:islocal + call s:LocalListing() + else " remote + call s:RemoteListing() endif +" call Decho("w:netrw_bannercnt=".w:netrw_bannercnt." (banner complete)") - redraw! + " manipulate the directory listing (hide, sort) {{{3 + if line("$") >= w:netrw_bannercnt +" call Decho("manipulate directory listing (hide)") +" call Decho("g:netrw_hide=".g:netrw_hide." g:netrw_list_hide<".g:netrw_list_hide.">") + if g:netrw_hide && g:netrw_list_hide != "" + call s:NetListHide() + endif + if line("$") >= w:netrw_bannercnt +" call Decho("manipulate directory listing (sort) : g:netrw_sort_by<".g:netrw_sort_by.">") - " cleanup: remove temporary file, - " delete current buffer if success with handler, - " return to prior buffer (directory listing) - if a:remote == 1 && fname != a:fname -" call Decho("deleting temporary file<".fname.">") - call delete(fname) - endif + if g:netrw_sort_by =~ "^n" + " sort by name + call s:SetSort() - if a:remote == 1 - set bh=delete bt=nofile noswf - exe "norm! \" - redraw! + if w:netrw_bannercnt < line("$") +" call Decho("g:netrw_sort_direction=".g:netrw_sort_direction." (bannercnt=".w:netrw_bannercnt.")") + if g:netrw_sort_direction =~ 'n' + " normal direction sorting + exe 'silent keepjumps '.w:netrw_bannercnt.',$sort' + else + " reverse direction sorting + exe 'silent keepjumps '.w:netrw_bannercnt.',$sort!' + endif + endif + " remove priority pattern prefix +" call Decho("remove priority pattern prefix") + exe 'silent keepjumps '.w:netrw_bannercnt.',$s/^\d\{3}\///e' + + elseif a:islocal + if w:netrw_bannercnt < line("$") +" call Decho("g:netrw_sort_direction=".g:netrw_sort_direction) + if g:netrw_sort_direction =~ 'n' +" call Decho('exe silent keepjumps '.w:netrw_bannercnt.',$sort') + exe 'silent keepjumps '.w:netrw_bannercnt.',$sort' + else +" call Decho('exe silent keepjumps '.w:netrw_bannercnt.',$sort!') + exe 'silent keepjumps '.w:netrw_bannercnt.',$sort!' + endif + endif + exe 'silent keepjumps '.w:netrw_bannercnt.',$s/^\d\{-}\///e' + endif + + elseif g:netrw_sort_direction =~ 'r' +" call Decho('reverse the sorted listing') + exe 'silent keepjumps '.w:netrw_bannercnt.'g/^/m '.w:netrw_bannercnt + endif endif -" call Dret("NetBrowseX") -endfun + " convert to wide/tree listing {{{3 +" call Decho("modify display if wide/tree listing style") + call s:NetWideListing() + call s:NetTreeListing(b:netrw_curdir) -" --------------------------------------------------------------------- -" NetBrowseFtpCmd: unfortunately, not all ftp servers honor options for ls {{{2 -" This function assumes that a long listing will be received. Size, time, -" and reverse sorts will be requested of the server but not otherwise -" enforced here. -fun! s:NetBrowseFtpCmd(path,listcmd) -" call Dfunc("NetBrowseFtpCmd(path<".a:path."> listcmd<".a:listcmd.">) netrw_method=".w:netrw_method) + if exists("w:netrw_bannercnt") && line("$") > w:netrw_bannercnt + " place cursor on the top-left corner of the file listing +" call Decho("place cursor on top-left corner of file listing") + exe 'silent '.w:netrw_bannercnt + norm! 0 + endif - " because WinXX ftp uses unix style input - " curline is one more than the bannercnt in order to account - " for the unwanted first blank line (doing a :put to an empty - " buffer yields a blank first line) - let ffkeep= &ff - setlocal ma ff=unix - let curline= w:netrw_bannercnt+1 - exe "silent! keepjumps ".curline.",$d" + " record previous current directory + let w:netrw_prvdir= b:netrw_curdir +" call Decho("record netrw_prvdir<".w:netrw_prvdir.">") - "......................................... - if w:netrw_method == 2 || w:netrw_method == 5 - " ftp + <.netrc>: Method #2 - if a:path != "" - put ='cd \"'.a:path.'\"' -" call Decho('ftp: '.getline(".")) - endif - exe "put ='".a:listcmd."'" -" call Decho("ftp: ".getline(".")) -" redraw!|call inputsave()|call input("Pausing...")|call inputrestore() - if exists("g:netrw_port") && g:netrw_port != "" -" call Decho("exe ".g:netrw_silentxfer.curline.",$!".g:netrw_ftp_cmd." -i ".g:netrw_machine." ".g:netrw_port) - exe g:netrw_silentxfer.curline.",$!".g:netrw_ftp_cmd." -i ".g:netrw_machine." ".g:netrw_port - else -" call Decho("exe ".g:netrw_silentxfer.curline.",$!".g:netrw_ftp_cmd." -i ".g:netrw_machine) - exe g:netrw_silentxfer.curline.",$!".g:netrw_ftp_cmd." -i ".g:netrw_machine - endif + " save certain window-oriented variables into buffer-oriented variables {{{3 + call s:SetBufWinVars() + call s:NetOptionRestore() - "......................................... - elseif w:netrw_method == 3 - " ftp + machine,id,passwd,filename: Method #3 - setlocal ff=unix - if exists("g:netrw_port") && g:netrw_port != "" - put ='open '.g:netrw_machine.' '.g:netrw_port - else - put ='open '.g:netrw_machine - endif + " set display to netrw display settings +" call Decho("set display to netrw display settings (noma nomod etc)") + setlocal noma nomod nonu nobl nowrap ro + if exists("s:treecurpos") + call setpos('.',s:treecurpos) + unlet s:treecurpos + endif - if exists("g:netrw_ftp") && g:netrw_ftp == 1 - put =g:netrw_uid - put ='\"'.g:netrw_passwd.'\"' - else - put ='user \"'.g:netrw_uid.'\" \"'.g:netrw_passwd.'\"' - endif +" call Dret("s:PerformListing : curpos<".string(getpos(".")).">") +endfun - if a:path != "" - put ='cd \"'.a:path.'\"' - endif - exe "put ='".a:listcmd."'" +" --------------------------------------------------------------------- +" s:NetBrowseChgDir: constructs a new directory based on the current {{{2 +" directory and a new directory name +fun! s:NetBrowseChgDir(islocal,newdir,...) +" call Dfunc("s:NetBrowseChgDir(islocal=".a:islocal."> newdir<".a:newdir.">) a:0=".a:0." curpos<".string(getpos("."))."> b:netrw_curdir<".(exists("b:netrw_curdir")? b:netrw_curdir : "").">") - " perform ftp: - " -i : turns off interactive prompting from ftp - " -n unix : DON'T use <.netrc>, even though it exists - " -n win32: quit being obnoxious about password -" call Decho("exe ".g:netrw_silentxfer.curline.",$!".g:netrw_ftp_cmd." -i -n") - exe g:netrw_silentxfer.curline.",$!".g:netrw_ftp_cmd." -i -n" + if !exists("b:netrw_curdir") +" call Decho("(NetBrowseChgDir) b:netrw_curdir doesn't exist!") + echoerr "(NetBrowseChgDir) b:netrw_curdir doesn't exist!" +" call Dret("s:NetBrowseChgDir") + return + endif - "......................................... + call netrw#NetSavePosn() + let nbcd_curpos = getpos('.') + let dirname = substitute(b:netrw_curdir,'\\','/','ge') + let newdir = a:newdir + + " set up o/s-dependent directory recognition pattern + if has("amiga") + let dirpat= '[\/:]$' else - echo "***warning*** unable to comply with your request<" . choice . ">" + let dirpat= '[\/]$' endif +" call Decho("dirname<".dirname."> dirpat<".dirpat.">") - " cleanup for Windows - if has("win32") || has("win95") || has("win64") || has("win16") - silent! keepjumps! %s/\r$//e - endif - if a:listcmd == "dir" - " infer directory/link based on the file permission string - silent! keepjumps g/d\%([-r][-w][-x]\)\{3}/s@$@/@ - silent! keepjumps g/l\%([-r][-w][-x]\)\{3}/s/$/@/ - if w:netrw_longlist == 0 || w:netrw_longlist == 2 - exe "silent! keepjumps ".curline.',$s/^\%(\S\+\s\+\)\{8}//e' - endif + if dirname !~ dirpat + " apparently vim is "recognizing" that it is in a directory and + " is removing the trailing "/". Bad idea, so I have to put it back. + let dirname= dirname.'/' +" call Decho("adjusting dirname<".dirname.">") endif - " ftp's ls doesn't seem to include ./ or ../ - if !search('^\.\/$','wn') - exe 'keepjumps '.curline - if a:path !~ '^$' - put ='../' + if newdir !~ dirpat + " handling a file +" call Decho('case "handling a file": newdir<'.newdir.'> !~ dirpat<'.dirpat.">") + if exists("w:netrw_liststyle") && w:netrw_liststyle == s:TREELIST && exists("w:netrw_treedict") && newdir !~ '^\(/\|\a:\)' + let dirname= s:NetTreeDir().newdir +" call Decho("tree listing") + elseif newdir =~ '^\(/\|\a:\)' + let dirname= newdir + else + let dirname= s:ComposePath(dirname,newdir) + endif +" call Decho("handling a file: dirname<".dirname."> (a:0=".a:0.")") + " this lets NetBrowseX avoid the edit + if a:0 < 1 +" call Decho("dirname<".dirname."> netrw_cd_escape<".s:netrw_cd_escape."> browse_split=".g:netrw_browse_split) +" call Decho("about to edit<".escape(dirname,s:netrw_cd_escape)."> didsplit=".(exists("s:didsplit")? s:didsplit : "doesn't exist")) + if !exists("s:didsplit") + if g:netrw_browse_split == 1 + new + wincmd _ + elseif g:netrw_browse_split == 2 + rightb vert new + wincmd | + elseif g:netrw_browse_split == 3 + tabnew + else + " handling a file, didn't split, so remove menu +" call Decho("handling a file+didn't split, so remove menu") + call s:NetMenu(0) + " optional change to window + if g:netrw_chgwin >= 1 + exe g:netrw_chgwin."wincmd w" + endif + endif + endif + " edit the file + " its local only: LocalBrowseCheck() doesn't edit a file, but NetBrowse() will + if a:islocal +" call Decho("edit file: exe e! ".escape(dirname,s:netrw_cd_escape)) + exe "e! ".escape(dirname,s:netrw_cd_escape) + endif + setlocal ma nomod noro endif - put ='./' - exe 'keepjumps '.curline - endif - " restore settings - let &ff= ffkeep -" call Dret("NetBrowseFtpCmd") -endfun + elseif newdir =~ '^/' + " just go to the new directory spec +" call Decho('case "just go to new directory spec": newdir<'.newdir.'>') + let dirname= newdir -" --------------------------------------------------------------------- -" NetrwListHide: uses [range]g~...~d to delete files that match comma {{{2 -" separated patterns given in g:netrw_list_hide -fun! s:NetrwListHide() -" call Dfunc("NetrwListHide() hide=".g:netrw_hide." listhide<".g:netrw_list_hide.">") + elseif newdir == './' + " refresh the directory list +" call Decho('case "refresh directory listing": newdir == "./"') - " find a character not in the "hide" string to used as a separator - " for :g and :v commands - let listhide= g:netrw_list_hide - let sep = strpart(substitute('~!@#$%^&*{};:,<.>/?|abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890','['.escape(listhide,'-]^\').']','','ge'),1,1) -" call Decho("sep=".sep) + elseif newdir == '../' + " go up one directory +" call Decho('case "go up one directory": newdir == "../"') + + if w:netrw_liststyle == s:TREELIST && exists("w:netrw_treedict") + " force a refresh +" call Decho("clear buffer<".expand("%")."> with :%d") + setlocal noro ma + keepjumps %d + endif + + if has("amiga") + " amiga +" call Decho('case "go up one directory": newdir == "../" and amiga') + if a:islocal + let dirname= substitute(dirname,'^\(.*[/:]\)\([^/]\+$\)','\1','') + let dirname= substitute(dirname,'/$','','') + else + let dirname= substitute(dirname,'^\(.*[/:]\)\([^/]\+/$\)','\1','') + endif +" call Decho("amiga: dirname<".dirname."> (go up one dir)") - while listhide != "" - if listhide =~ ',' - let hide = substitute(listhide,',.*$','','e') - let listhide = substitute(listhide,'^.\{-},\(.*\)$','\1','e') else - let hide = listhide - let listhide= "" + " unix or cygwin +" call Decho('case "go up one directory": newdir == "../" and unix or cygwin') + if a:islocal + let dirname= substitute(dirname,'^\(.*\)/\([^/]\+\)/$','\1','') + if dirname == "" + let dirname= '/' + endif + else + let dirname= substitute(dirname,'^\(\a\+://.\{-}/\{1,2}\)\(.\{-}\)\([^/]\+\)/$','\1\2','') + endif +" call Decho("unix: dirname<".dirname."> (go up one dir)") endif - " Prune the list by hiding any files which match - if g:netrw_hide == 1 -" call Decho("hiding<".hide."> listhide<".listhide.">") - exe 'silent keepjumps '.w:netrw_bannercnt.',$g'.sep.hide.sep.'d' - elseif g:netrw_hide == 2 -" call Decho("showing<".hide."> listhide<".listhide.">") - exe 'silent keepjumps '.w:netrw_bannercnt.',$g'.sep.hide.sep.'s@^@ /-KEEP-/ @' + elseif w:netrw_liststyle == s:TREELIST && exists("w:netrw_treedict") +" call Decho('case liststyle is TREELIST and w:netrw_treedict exists') + " force a refresh (for TREELIST, wait for NetTreeDir() to force the refresh) + setlocal noro ma + if !(exists("w:netrw_liststyle") && w:netrw_liststyle == s:TREELIST && exists("b:netrw_curdir")) +" call Decho("clear buffer<".expand("%")."> with :%d") + keepjumps %d + endif + let treedir = s:NetTreeDir() + let s:treecurpos = nbcd_curpos + let haskey= 0 +" call Decho("w:netrw_treedict<".string(w:netrw_treedict).">") + + " search treedict for tree dir as-is + if has_key(w:netrw_treedict,treedir) +" call Decho('....searched for treedir<'.treedir.'> : found it!') + let haskey= 1 + else +" call Decho('....searched for treedir<'.treedir.'> : not found') endif - endwhile - if g:netrw_hide == 2 - exe 'silent keepjumps '.w:netrw_bannercnt.',$v@^ /-KEEP-/ @d' - exe 'silent keepjumps '.w:netrw_bannercnt.',$s@^\%( /-KEEP-/ \)\+@@e' - endif -" call Dret("NetrwListHide") -endfun + " search treedict for treedir with a / appended + if !haskey && treedir !~ '/$' + if has_key(w:netrw_treedict,treedir."/") + let treedir= treedir."/" +" call Decho('....searched.for treedir<'.treedir.'> found it!') + let haskey = 1 + else +" call Decho('....searched for treedir<'.treedir.'/> : not found') + endif + endif -" --------------------------------------------------------------------- -" NetHideEdit: allows user to edit the file/directory hiding list -fun! s:NetHideEdit(islocal) -" call Dfunc("NetHideEdit(islocal=".a:islocal.")") + " search treedict for treedir with any trailing / elided + if !haskey && treedir =~ '/$' + let treedir= substitute(treedir,'/$','','') + if has_key(w:netrw_treedict,treedir) +" call Decho('....searched.for treedir<'.treedir.'> found it!') + let haskey = 1 + else +" call Decho('....searched for treedir<'.treedir.'> : not found') + endif + endif - " get new hiding list from user - call inputsave() - let newhide= input("Edit Hiding List: ",g:netrw_list_hide) - call inputrestore() - let g:netrw_list_hide= newhide -" call Decho("new g:netrw_list_hide<".g:netrw_list_hide.">") + if haskey + " close tree listing for selected subdirectory +" call Decho("closing selected subdirectory<".dirname.">") + call remove(w:netrw_treedict,treedir) +" call Decho("removed entry<".dirname."> from treedict") +" call Decho("yielding treedict<".string(w:netrw_treedict).">") + let dirname= w:netrw_treetop + else + " go down one directory + let dirname= substitute(treedir,'/*$','/','') +" call Decho("go down one dir: treedir<".treedir.">") + endif - " refresh the listing - if a:islocal == 0 - silent call s:NetBrowse(s:NetBrowseChgDir(expand("%"),'./')) else - silent call s:NetRefresh(s:LocalBrowseChgDir(b:netrw_curdir,"./"),a:islocal) + " go down one directory + let dirname= s:ComposePath(dirname,newdir) +" call Decho("go down one dir: dirname<".dirname."> newdir<".newdir.">") endif -" call Dret("NetHideEdit") +" call Dret("s:NetBrowseChgDir <".dirname."> : curpos<".string(getpos(".")).">") + return dirname endfun " --------------------------------------------------------------------- -" NetSortSequence: allows user to edit the sorting sequence -fun! s:NetSortSequence(mode) -" call Dfunc("NetSortSequence(mode=".a:mode.")") - - call inputsave() - let newsortseq= input("Edit Sorting Sequence: ",g:netrw_sort_sequence) - call inputrestore() - - " refresh the listing - let g:netrw_sort_sequence= newsortseq - if a:mode == 0 - silent call s:NetBrowse(s:NetBrowseChgDir(expand("%"),'./')) - else - silent call s:LocalBrowse(s:LocalBrowseChgDir(b:netrw_curdir,"./")) - endif - -" call Dret("NetSortSequence") +" s:NetHide: this function is invoked by the "a" map for browsing {{{2 +" and switches the hiding mode +fun! s:NetHide(islocal) +" call Dfunc("NetHide(islocal=".a:islocal.")") + let g:netrw_hide=(g:netrw_hide+1)%3 + exe "norm! 0" + if g:netrw_hide && g:netrw_list_hide == "" + call netrw#ErrorMsg(s:WARNING,"your hiding list is empty!",49) +" call Dret("NetHide") + return + endif + call netrw#NetSavePosn() + call s:NetRefresh(a:islocal,s:NetBrowseChgDir(a:islocal,'./')) +" call Dret("NetHide") endfun " --------------------------------------------------------------------- -" NetLongList: {{{2 -fun! s:NetLongList(mode) -" call Dfunc("NetLongList(mode=".a:mode.") netrw_longlist=".w:netrw_longlist) - let fname = s:NetGetWord() - let w:netrw_longlist = (w:netrw_longlist + 1) % 3 -" call Decho("fname<".fname.">") - - if w:netrw_longlist == 0 - " use one column listing -" call Decho("use one column list") - let g:netrw_list_cmd = substitute(g:netrw_list_cmd,' -l','','ge') - - elseif w:netrw_longlist == 1 - " use long list -" call Decho("use long list") - let g:netrw_list_cmd = g:netrw_list_cmd." -l" - else - " give wide list -" call Decho("use wide list") - let g:netrw_list_cmd = substitute(g:netrw_list_cmd,' -l','','ge') +" =========================================== +" s:NetPreview: {{{2 +fun! s:NetPreview(path) range +" call Dfunc("NetPreview(path<".a:path.">)") + if has("quickfix") + if !isdirectory(a:path) + exe "pedit ".escape(a:path,g:netrw_fname_escape) + elseif !exists("g:netrw_quiet") + call netrw#ErrorMsg(s:WARNING,"sorry, cannot preview a directory such as <".a:path.">",38) + endif + elseif !exists("g:netrw_quiet") + call netrw#ErrorMsg(s:WARNING,"sorry, to preview your vim needs the quickfix feature compiled in",39) endif - setlocal ma - - " clear buffer - this will cause NetBrowse/LocalBrowse to do a refresh - %d +" call Dret("NetPreview") +endfun - " refresh the listing - if a:mode == 0 - silent call s:NetBrowse(s:NetBrowseChgDir(expand("%"),"./")) - else - silent call s:LocalBrowse(s:LocalBrowseChgDir(b:netrw_curdir,"./")) - endif +" --------------------------------------------------------------------- +" s:NetSortStyle: change sorting style (name - time - size) and refresh display {{{2 +fun! s:NetSortStyle(islocal) +" call Dfunc("s:NetSortStyle(islocal=".a:islocal.") netrw_sort_by<".g:netrw_sort_by.">") + call s:NetSaveWordPosn() - " keep cursor on the filename - silent keepjumps $ - if fname =~ '/$' - silent call search('\%(^\|\s\{2,}\)\zs'.escape(fname,'.\[]*$^').'\%(\s\{2,}\|$\)','bW') - else - silent call search('\%(^\|\s\{2,}\)\zs'.escape(fname,'.\[]*$^').'\%(\s\{2,}\|$\)','bW') - endif + let g:netrw_sort_by= (g:netrw_sort_by =~ 'n')? 'time' : (g:netrw_sort_by =~ 't')? 'size' : 'name' + norm! 0 + call netrw#NetSavePosn() + call s:NetRefresh(a:islocal,s:NetBrowseChgDir(a:islocal,'./')) -" call Dret("NetLongList : w:netrw_longlist=".w:netrw_longlist) +" call Dret("s:NetSortStyle : netrw_sort_by<".g:netrw_sort_by.">") endfun " --------------------------------------------------------------------- -" NetrwWideListing: {{{2 -fun! s:NetrwWideListing() +" Remote Directory Browsing Support: {{{1 +" =========================================== - if w:netrw_longlist == 2 -" call Dfunc("NetrwWideListing() w:netrw_longlist=".w:netrw_longlist) - " look for longest filename (cpf=characters per filename) - " cpf: characters per file - " fpl: files per line - " fpc: files per column - set ma - let b:netrw_cpf= 0 - if line("$") >= w:netrw_bannercnt - exe 'silent keepjumps '.w:netrw_bannercnt.',$g/^./if virtcol("$") > b:netrw_cpf|let b:netrw_cpf= virtcol("$")|endif' - else -" call Dret("NetrwWideListing") +" --------------------------------------------------------------------- +" s:RemoteListing: {{{2 +fun! s:RemoteListing() +" call Dfunc("s:RemoteListing() b:netrw_curdir<".b:netrw_curdir.">)") + + call s:RemotePathAnalysis(b:netrw_curdir) + + " sanity check: + if exists("b:netrw_method") && b:netrw_method =~ '[235]' +" call Decho("b:netrw_method=".b:netrw_method) + if !executable("ftp") + if !exists("g:netrw_quiet") + call netrw#ErrorMsg(s:ERROR,"this system doesn't support remote directory listing via ftp",18) + endif + call s:NetOptionRestore() +" call Dret("s:RemoteListing") return endif -" call Decho("max file strlen+1=".b:netrw_cpf) - let b:netrw_cpf= b:netrw_cpf + 1 - " determine qty files per line (fpl) - let w:netrw_fpl= winwidth(0)/b:netrw_cpf - if w:netrw_fpl <= 0 - let w:netrw_fpl= 1 + elseif !exists("g:netrw_list_cmd") || g:netrw_list_cmd == '' + if !exists("g:netrw_quiet") + if g:netrw_list_cmd == "" + call netrw#ErrorMsg(s:ERROR,g:netrw_ssh_cmd." is not executable on your system",47) + else + call netrw#ErrorMsg(s:ERROR,"this system doesn't support remote directory listing via ".g:netrw_list_cmd,19) + endif endif -" call Decho("fpl= ".winwidth(0)."/[b:netrw_cpf=".b:netrw_cpf.']='.w:netrw_fpl) - " make wide display - exe 'silent keepjumps '.w:netrw_bannercnt.',$s/^.*$/\=printf("%-'.b:netrw_cpf.'s",escape(submatch(0),"\\"))/' - let fpc = (line("$") - w:netrw_bannercnt + w:netrw_fpl)/w:netrw_fpl - let newcolstart = w:netrw_bannercnt + fpc - let newcolend = newcolstart + fpc - 1 -" call Decho("bannercnt=".w:netrw_bannercnt." fpl=".w:netrw_fpl." fpc=".fpc." newcol[".newcolstart.",".newcolend."]") - while line("$") >= newcolstart - if newcolend > line("$") | let newcolend= line("$") | endif - let newcolqty= newcolend - newcolstart - exe newcolstart - if newcolqty == 0 - exe "silent keepjumps norm! 0\$hx".w:netrw_bannercnt."G$p" - else - exe "silent keepjumps norm! 0\".newcolqty.'j$hx'.w:netrw_bannercnt.'G$p' - endif - exe "silent keepjumps ".newcolstart.','.newcolend.'d' - exe 'silent keepjumps '.w:netrw_bannercnt - endwhile - exe "silent keepjumps ".w:netrw_bannercnt.',$s/\s\+$//e' - setlocal noma nomod -" call Dret("NetrwWideListing") - endif - -endfun - -" --------------------------------------------------------------------- -" NetSaveWordPosn: used by the "s" command in both remote and local {{{2 -" browsing. Along with NetRestoreWordPosn(), it keeps the cursor on -" the same word even though the sorting has changed its order of appearance. -fun! s:NetSaveWordPosn() -" call Dfunc("NetSaveWordPosn()") - let s:netrw_saveword= '^'.escape(getline("."),s:netrw_cd_escape).'$' -" call Dret("NetSaveWordPosn : saveword<".s:netrw_saveword.">") -endfun - -" --------------------------------------------------------------------- -" NetRestoreWordPosn: used by the "s" command; see NetSaveWordPosn() above {{{2 -fun! s:NetRestoreWordPosn() -" call Dfunc("NetRestoreWordPosn()") - silent! call search(s:netrw_saveword,'w') -" call Dret("NetRestoreWordPosn") -endfun + call s:NetOptionRestore() +" call Dret("s:RemoteListing") + return + endif " (remote handling sanity check) -" --------------------------------------------------------------------- -" NetMakeDir: this function makes a directory (both local and remote) {{{2 -fun! s:NetMakeDir(usrhost) -" call Dfunc("NetMakeDir(usrhost<".a:usrhost.">)") + if exists("b:netrw_method") +" call Decho("setting w:netrw_method<".b:netrw_method.">") + let w:netrw_method= b:netrw_method + endif - " get name of new directory from user. A bare will skip. - " if its currently a directory, also request will be skipped, but with - " a message. - call inputsave() - let newdirname= input("Please give directory name: ") - call inputrestore() -" call Decho("newdirname<".newdirname.">") + if s:method == "ftp" + " use ftp to get remote file listing +" call Decho("use ftp to get remote file listing") + let s:method = "ftp" + let listcmd = g:netrw_ftp_list_cmd + if g:netrw_sort_by =~ '^t' + let listcmd= g:netrw_ftp_timelist_cmd + elseif g:netrw_sort_by =~ '^s' + let listcmd= g:netrw_ftp_sizelist_cmd + endif +" call Decho("listcmd<".listcmd."> (using g:netrw_ftp_list_cmd)") + call s:NetBrowseFtpCmd(s:path,listcmd) +" exe "keepjumps ".w:netrw_bannercnt.',$g/^./call Decho("raw listing: ".getline("."))' - if newdirname == "" -" call Dret("NetMakeDir : user aborted with bare ") - return - endif + if w:netrw_liststyle == s:THINLIST || w:netrw_liststyle == s:WIDELIST || w:netrw_liststyle == s:TREELIST + " shorten the listing +" call Decho("generate short listing") + exe "keepjumps ".w:netrw_bannercnt - if a:usrhost == "" + " cleanup + if g:netrw_ftp_browse_reject != "" + exe "silent! g/".g:netrw_ftp_browse_reject."/keepjumps d" + endif + silent! keepjumps %s/\r$//e - " Local mkdir: - " sanity checks - let fullnewdir= b:netrw_curdir.'/'.newdirname -" call Decho("fullnewdir<".fullnewdir.">") - if isdirectory(fullnewdir) - if !exists("g:netrw_quiet") - echohl WarningMsg | echo "***netrw*** <".newdirname."> is already a directory!" | echohl None - call inputsave()|call input("Press to continue")|call inputrestore() + " if there's no ../ listed, then put ./ and ../ in + let line1= line(".") + exe "keepjumps ".w:netrw_bannercnt + let line2= search('^\.\.\/\%(\s\|$\)','cnW') + if line2 == 0 +" call Decho("netrw is putting ./ and ../ into listing") + keepjumps put='../' + keepjumps put='./' endif -" call Dret("NetMakeDir : directory<".newdirname."> exists previously") - return - endif - if filereadable(fullnewdir) - if !exists("g:netrw_quiet") - echohl WarningMsg | echo "***netrw*** <".newdirname."> is already a file!" | echohl None - call inputsave()|call input("Press to continue")|call inputrestore() + exe "keepjumps ".line1 + keepjumps norm! 0 + +" call Decho("line1=".line1." line2=".line2." line(.)=".line(".")) + if search('^\d\{2}-\d\{2}-\d\{2}\s','n') " M$ ftp site cleanup +" call Decho("M$ ftp cleanup") + exe 'silent! keepjumps '.w:netrw_bannercnt.',$s/^\d\{2}-\d\{2}-\d\{2}\s\+\d\+:\d\+[AaPp][Mm]\s\+\%(\|\d\+\)\s\+//' + else " normal ftp cleanup +" call Decho("normal ftp cleanup") + exe 'silent! keepjumps '.w:netrw_bannercnt.',$s/^\(\%(\S\+\s\+\)\{7}\S\+\)\s\+\(\S.*\)$/\2/e' + exe "silent! keepjumps ".w:netrw_bannercnt.',$g/ -> /s# -> .*/$#/#e' + exe "silent! keepjumps ".w:netrw_bannercnt.',$g/ -> /s# -> .*$#/#e' endif -" call Dret("NetMakeDir : file<".newdirname."> exists previously") - return endif - " requested new local directory is neither a pre-existing file or - " directory, so make it! - if exists("*mkdir") - call mkdir(fullnewdir,"p") + else + " use ssh to get remote file listing {{{3 +" call Decho("use ssh to get remote file listing: s:netrw_shq<".g:netrw_shq."> s:path<".s:path."> s:netrw_cd_escape<".s:netrw_cd_escape.">") + let listcmd= s:MakeSshCmd(g:netrw_list_cmd) +" call Decho("listcmd<".listcmd."> (using g:netrw_list_cmd)") + if g:netrw_scp_cmd =~ '^pscp' +" call Decho("1: exe silent r! ".listcmd.g:netrw_shq.s:path.g:netrw_shq) + exe "silent r! ".listcmd.g:netrw_shq.s:path.g:netrw_shq + " remove rubbish and adjust listing format of 'pscp' to 'ssh ls -FLa' like + g/^Listing directory/d + g/^d[-rwx][-rwx][-rwx]/s+$+/+e + silent g/^l[-rwx][-rwx][-rwx]/s+$+@+e + if g:netrw_liststyle != s:LONGLIST + g/^[dlsp-][-rwx][-rwx][-rwx]/s/^.*\s\(\S\+\)$/\1/e + endif else - let netrw_origdir= s:NetGetcwd(1) - exe 'keepjumps cd '.b:netrw_curdir -" call Decho("netrw_origdir<".netrw_origdir.">: cd b:netrw_curdir<".b:netrw_curdir.">") -" call Decho("exe silent! !".g:netrw_local_mkdir.' "'.newdirname.'"') - exe "silent! !".g:netrw_local_mkdir.' "'.newdirname.'"' - if !g:netrw_keepdir | exe 'keepjumps cd '.netrw_origdir | endif - if !g:netrw_keepdir - exe 'keepjumps cd '.netrw_origdir -" call Decho("netrw_keepdir=".g:netrw_keepdir.": cd ".netrw_origdir) + if s:path == "" +" call Decho("2: exe silent r! ".listcmd) + exe "silent r! ".listcmd + else +" call Decho("3: exe silent r! ".listcmd." ".g:netrw_shq.s:path.g:netrw_shq) + exe "silent r! ".listcmd." ".g:netrw_shq.s:path.g:netrw_shq endif endif - if v:shell_error == 0 - " refresh listing -" call Decho("refresh listing") - let linenum= line(".") - norm! H0 - let hline = line(".") - set ma|norm! 2D - call s:LocalBrowse(s:LocalBrowseChgDir(b:netrw_curdir,'./')) - exe "norm! ".hline."G0z\" - exe linenum - elseif !exists("g:netrw_quiet") - echohl Error | echo "***netrw*** unable to make directory<".newdirname.">" | echohl None - call inputsave()|call input("Press to continue")|call inputrestore() + " cleanup + if g:netrw_ftp_browse_reject != "" +" call Decho("(cleanup) exe silent! g/".g:netrw_ssh_browse_reject."/keepjumps d") + exe "silent! g/".g:netrw_ssh_browse_reject."/keepjumps d" endif - redraw! + endif - else - " Remote mkdir: - let mkdircmd = substitute(g:netrw_mkdir_cmd,'\',a:usrhost,'') - let newdirname= "'".'"'.substitute(expand("%"),'^\%(.\{-}/\)\{3}\(.*\)$','\1','').newdirname.'"'."'" -" call Decho("exe silent! !".mkdircmd." ".newdirname) - exe "silent! !".mkdircmd." ".newdirname - if v:shell_error == 0 - " refresh listing - let linenum= line(".") - norm! H0 - let hline = line(".") - call s:NetBrowse(s:NetBrowseChgDir(expand("%"),'./')) - exe "norm! ".hline."G0z\" - exe linenum - elseif !exists("g:netrw_quiet") - echohl Error | echo "***netrw*** unable to make directory<".newdirname.">" | echohl None - call inputsave()|call input("Press to continue")|call inputrestore() + if w:netrw_liststyle == s:LONGLIST + " do a long listing; these substitutions need to be done prior to sorting {{{3 +" call Decho("fix long listing:") + + if s:method == "ftp" + " cleanup + exe "keepjumps ".w:netrw_bannercnt + while getline(".") =~ g:netrw_ftp_browse_reject + keepjumps d + endwhile + " if there's no ../ listed, then put ./ and ../ in + let line1= line(".") + keepjumps 1 + silent keepjumps call search('^\.\.\/\%(\s\|$\)','W') + let line2= line(".") + if line2 == 0 + exe 'keepjumps '.w:netrw_bannercnt."put='./'" + if b:netrw_curdir != '/' + exe 'keepjumps '.w:netrw_bannercnt."put='../'" + endif + endif + exe "keepjumps ".line1 + keepjumps norm! 0 + endif + + if search('^\d\{2}-\d\{2}-\d\{2}\s','n') " M$ ftp site cleanup +" call Decho("M$ ftp site listing cleanup") + exe 'silent! keepjumps '.w:netrw_bannercnt.',$s/^\(\d\{2}-\d\{2}-\d\{2}\s\+\d\+:\d\+[AaPp][Mm]\s\+\%(\|\d\+\)\s\+\)\(\w.*\)$/\2\t\1/' + elseif exists("w:netrw_bannercnt") && w:netrw_bannercnt <= line("$") +" call Decho("normal ftp site listing cleanup: bannercnt=".w:netrw_bannercnt." line($)=".line("$")) + exe 'silent keepjumps '.w:netrw_bannercnt.',$s/ -> .*$//e' + exe 'silent keepjumps '.w:netrw_bannercnt.',$s/^\(\%(\S\+\s\+\)\{7}\S\+\)\s\+\(\S.*\)$/\2\t\1/e' + exe 'silent keepjumps '.w:netrw_bannercnt endif - redraw! endif -" call Dret("NetMakeDir") +" if exists("w:netrw_bannercnt") && w:netrw_bannercnt <= line("$") " Decho +" exe "keepjumps ".w:netrw_bannercnt.',$g/^./call Decho("listing: ".getline("."))' +" endif " Decho +" call Dret("s:RemoteListing") endfun " --------------------------------------------------------------------- -" NetBookmarkDir: {{{2 -" 0: (user: ) bookmark current directory -" 1: (user: ) change to the bookmarked directory -" 2: (user: ) list bookmarks -" 3: (LocalBrowse) record current directory history -" 4: (user: ) go up (previous) bookmark -" 5: (user: ) go down (next) bookmark -fun! s:NetBookmarkDir(chg,curdir) -" call Dfunc("NetBookmarkDir(chg=".a:chg." curdir<".a:curdir.">) cnt=".v:count) - if exists("w:netrw_bannercnt") && line(".") <= w:netrw_bannercnt - " looks like a "b" was pressed while in the banner region - if line("$") > w:netrw_bannercnt - exe 'silent keepjumps '.w:netrw_bannercnt - endif - if &ch > 1 - " "clear" the message - echo "" +" NetGetWord: it gets the directory named under the cursor {{{2 +fun! s:NetGetWord() +" call Dfunc("NetGetWord() line#".line(".")." liststyle=".g:netrw_liststyle." virtcol=".virtcol(".")) + call s:UseBufWinVars() + + " insure that w:netrw_liststyle is set up + if !exists("w:netrw_liststyle") + if exists("g:netrw_liststyle") + let w:netrw_liststyle= g:netrw_liststyle + else + let w:netrw_liststyle= s:THINLIST endif -" call Dret("NetBookmarkDir - ignoring") - return +" call Decho("w:netrw_liststyle=".w:netrw_liststyle) endif - if a:chg == 0 - " bookmark the current directory - let g:NETRW_BOOKMARKDIR_{v:count}= a:curdir - if !exists("g:NETRW_BOOKMARKMAX") - let g:NETRW_BOOKMARKMAX= v:count - elseif v:count > g:NETRW_BOOKMARKMAX - let g:NETRW_BOOKMARKMAX= v:count - endif - echo "bookmarked the current directory" + if exists("w:netrw_bannercnt") && line(".") < w:netrw_bannercnt + " Active Banner support +" call Decho("active banner handling") + norm! 0 + let dirname= "./" + let curline= getline(".") - elseif a:chg == 1 - " change to the bookmarked directory - if exists("g:NETRW_BOOKMARKDIR_{v:count}") - exe "e ".g:NETRW_BOOKMARKDIR_{v:count} - else - echomsg "Sorry, bookmark#".v:count." doesn't exist!" - endif + if curline =~ '"\s*Sorted by\s' + norm s + let s:netrw_skipbrowse= 1 + echo 'Pressing "s" also works' - elseif a:chg == 2 - " list user's bookmarks - if exists("g:NETRW_BOOKMARKMAX") -" call Decho("list bookmarks [0,".g:NETRW_BOOKMARKMAX."]") - let cnt= 0 - while cnt <= g:NETRW_BOOKMARKMAX - if exists("g:NETRW_BOOKMARKDIR_{cnt}") -" call Decho("Netrw Bookmark#".cnt.": ".g:NETRW_BOOKMARKDIR_{cnt}) - echo "Netrw Bookmark#".cnt.": ".g:NETRW_BOOKMARKDIR_{cnt} - endif - let cnt= cnt + 1 - endwhile - endif + elseif curline =~ '"\s*Sort sequence:' + let s:netrw_skipbrowse= 1 + echo 'Press "S" to edit sorting sequence' - " list directory history - let cnt = g:NETRW_DIRHIST_CNT - let first = 1 - let histcnt = 0 - while ( first || cnt != g:NETRW_DIRHIST_CNT ) -" call Decho("first=".first." cnt=".cnt." dirhist_cnt=".g:NETRW_DIRHIST_CNT) - let histcnt= histcnt + 1 - if exists("g:NETRW_DIRHIST_{cnt}") -" call Decho("Netrw History#".histcnt.": ".g:NETRW_DIRHIST_{cnt}) - echo "Netrw History#".histcnt.": ".g:NETRW_DIRHIST_{cnt} - endif - let first = 0 - let cnt = ( cnt - 1 ) % g:netrw_dirhistmax - if cnt < 0 - let cnt= cnt + g:netrw_dirhistmax - endif - endwhile + elseif curline =~ '"\s*Quick Help:' + norm ? + let s:netrw_skipbrowse= 1 + echo 'Pressing "?" also works' - elseif a:chg == 3 - " saves most recently visited directories (when they differ) - if !exists("g:NETRW_DIRHIST_0") || g:NETRW_DIRHIST_{g:NETRW_DIRHIST_CNT} != a:curdir - let g:NETRW_DIRHIST_CNT= ( g:NETRW_DIRHIST_CNT + 1 ) % g:netrw_dirhistmax - let g:NETRW_DIRHIST_{g:NETRW_DIRHIST_CNT}= substitute(a:curdir,'[/\\]$','','e') -" call Decho("save dirhist#".g:NETRW_DIRHIST_CNT."<".g:NETRW_DIRHIST_{g:NETRW_DIRHIST_CNT}.">") - endif + elseif curline =~ '"\s*\%(Hiding\|Showing\):' + norm a + let s:netrw_skipbrowse= 1 + echo 'Pressing "a" also works' - elseif a:chg == 4 - " u: change to the previous directory stored on the history list - let g:NETRW_DIRHIST_CNT= ( g:NETRW_DIRHIST_CNT - 1 ) % g:netrw_dirhistmax - if g:NETRW_DIRHIST_CNT < 0 - let g:NETRW_DIRHIST_CNT= g:NETRW_DIRHIST_CNT + g:netrw_dirhistmax + elseif line("$") > w:netrw_bannercnt + exe 'silent keepjumps '.w:netrw_bannercnt endif - if exists("g:NETRW_DIRHIST_{g:NETRW_DIRHIST_CNT}") -" call Decho("changedir u#".g:NETRW_DIRHIST_CNT."<".g:NETRW_DIRHIST_{g:NETRW_DIRHIST_CNT}.">") - exe "e ".g:NETRW_DIRHIST_{g:NETRW_DIRHIST_CNT} - else - let g:NETRW_DIRHIST_CNT= ( g:NETRW_DIRHIST_CNT + 1 ) % g:netrw_dirhistmax - echo "Sorry, no predecessor directory exists yet" + + elseif w:netrw_liststyle == s:THINLIST +" call Decho("thin column handling") + norm! 0 + let dirname= getline(".") + + elseif w:netrw_liststyle == s:LONGLIST +" call Decho("long column handling") + norm! 0 + let dirname= substitute(getline("."),'^\(\%(\S\+ \)*\S\+\).\{-}$','\1','e') + + elseif w:netrw_liststyle == s:TREELIST +" call Decho("treelist handling") + let dirname= substitute(getline("."),'^\(| \)*','','e') + + else +" call Decho("obtain word from wide listing") + let dirname= getline(".") + + if !exists("b:netrw_cpf") + let b:netrw_cpf= 0 + exe 'silent keepjumps '.w:netrw_bannercnt.',$g/^./if virtcol("$") > b:netrw_cpf|let b:netrw_cpf= virtcol("$")|endif' +" call Decho("computed cpf") endif - elseif a:chg == 5 - " U: change to the subsequent directory stored on the history list - let g:NETRW_DIRHIST_CNT= ( g:NETRW_DIRHIST_CNT + 1 ) % g:netrw_dirhistmax - if exists("g:NETRW_DIRHIST_{g:NETRW_DIRHIST_CNT}") -" call Decho("changedir U#".g:NETRW_DIRHIST_CNT."<".g:NETRW_DIRHIST_{g:NETRW_DIRHIST_CNT}.">") - exe "e ".g:NETRW_DIRHIST_{g:NETRW_DIRHIST_CNT} - else - let g:NETRW_DIRHIST_CNT= ( g:NETRW_DIRHIST_CNT - 1 ) % g:netrw_dirhistmax - if g:NETRW_DIRHIST_CNT < 0 - let g:NETRW_DIRHIST_CNT= g:NETRW_DIRHIST_CNT + g:netrw_dirhistmax - endif - echo "Sorry, no successor directory exists yet" - endif +" call Decho("buf#".bufnr("%")."<".bufname("%").">") + let filestart = (virtcol(".")/b:netrw_cpf)*b:netrw_cpf +" call Decho("filestart= ([virtcol=".virtcol(".")."]/[b:netrw_cpf=".b:netrw_cpf."])*b:netrw_cpf=".filestart." bannercnt=".w:netrw_bannercnt) +" call Decho("1: dirname<".dirname.">") + if filestart > 0|let dirname= substitute(dirname,'^.\{'.filestart.'}','','')|endif +" call Decho("2: dirname<".dirname.">") + let dirname = substitute(dirname,'^\(.\{'.b:netrw_cpf.'}\).*$','\1','e') +" call Decho("3: dirname<".dirname.">") + let dirname = substitute(dirname,'\s\+$','','e') +" call Decho("4: dirname<".dirname.">") endif -" call Dret("NetBookmarkDir") + +" call Dret("NetGetWord <".dirname.">") + return dirname endfun " --------------------------------------------------------------------- -" NetObtain: obtain file under cursor (for remote browsing support) {{{2 -fun! netrw#NetObtain(...) -" call Dfunc("NetObtain() a:0=".a:0) +" NetBrowseRm: remove/delete a remote file or directory {{{2 +fun! s:NetBrowseRm(usrhost,path) range +" call Dfunc("NetBrowseRm(usrhost<".a:usrhost."> path<".a:path.">) virtcol=".virtcol(".")) +" call Decho("firstline=".a:firstline." lastline=".a:lastline) - if a:0==0 - " no arguments -- use word under cursor - let fname= expand("") -" call Decho("no arguments, use <".fname.">") - elseif a:0 > 1 - " more than one argument, recurse with each argument separately -" call Decho("more than 1 argument, use recursion") - let i=1 - while i <= a:0 - call netrw#NetObtain(a:{i}) - let i=i+1 - endwhile - return - else - " one argument provided - let fname = a:1 - let keep_netrw_choice = exists("b:netrw_choice")? b:netrw_choice : "" - let keep_netrw_fname = exists("b:netrw_fname")? b:netrw_fname : "" - let keep_netrw_wmethod = exists("w:netrw_method")? w:netrw_method : "" - call s:NetMethod(fname) - let w:netrw_method= b:netrw_method - let fname = b:netrw_fname -" call Decho("g:netrw_scp_cmd<".g:netrw_scp_cmd.">") -" call Decho("g:netrw_machine<".g:netrw_machine.">") -" call Decho("fname<".fname.">") - endif + " preparation for removing multiple files/directories + let ctr= a:firstline + let all= 0 - " NetrwStatusLine support - for obtaining support - call s:SetupNetrwStatusLine('%f %h%m%r%=%9*Obtaining '.fname) + " remove multiple files and directories + while ctr <= a:lastline + exe ctr - if exists("w:netrw_method") && w:netrw_method =~ '[235]' -" call Decho("method=".w:netrw_method) - if executable("ftp") -" call Decho("ftp is executable, method=".w:netrw_method) - let curdir = expand("%") - let path = substitute(curdir,'ftp://[^/]\+/','','e') - let curline= line(".") - let endline= line("$")+1 - set ma - keepjumps $ -" call Decho("getcwd<".getcwd().">") -" call Decho("curdir<".curdir.">") -" call Decho("path<".path.">") -" call Decho("curline=".curline) -" call Decho("endline=".endline) + let rmfile= s:NetGetWord() +" call Decho("rmfile<".rmfile.">") - "......................................... - if w:netrw_method == 2 - " ftp + <.netrc>: Method #2 - setlocal ff=unix - if path != "" - put ='cd '.path -" call Decho("ftp: cd ".path) + if rmfile !~ '^"' && (rmfile =~ '@$' || rmfile !~ '[\/]$') + " attempt to remove file +" call Decho("attempt to remove file") + if !all + echohl Statement + call inputsave() + let ok= input("Confirm deletion of file<".rmfile."> ","[{y(es)},n(o),a(ll),q(uit)] ") + call inputrestore() + echohl NONE + if ok == "" + let ok="no" endif - put ='get '.fname -" call Decho("ftp: get ".fname) - put ='quit' -" call Decho("ftp: quit") - if exists("g:netrw_port") && g:netrw_port != "" -" call Decho("exe ".g:netrw_silentxfer.endline.",$!".g:netrw_ftp_cmd." -i ".g:netrw_machine." ".g:netrw_port) - exe g:netrw_silentxfer.endline.",$!".g:netrw_ftp_cmd." -i ".g:netrw_machine." ".g:netrw_port - else -" call Decho("exe ".g:netrw_silentxfer.endline.",$!".g:netrw_ftp_cmd." -i ".g:netrw_machine) - exe g:netrw_silentxfer.endline.",$!".g:netrw_ftp_cmd." -i ".g:netrw_machine + let ok= substitute(ok,'\[{y(es)},n(o),a(ll),q(uit)]\s*','','e') + if ok =~ 'a\%[ll]' + let all= 1 endif + endif - "......................................... - elseif w:netrw_method == 3 - " ftp + machine,id,passwd,filename: Method #3 - setlocal ff=unix - if exists("g:netrw_port") && g:netrw_port != "" - put ='open '.g:netrw_machine.' '.g:netrw_port -" call Decho('ftp: open '.g:netrw_machine.' '.g:netrw_port) - else - put ='open '.g:netrw_machine -" call Decho('ftp: open '.g:netrw_machine) + if all || ok =~ 'y\%[es]' || ok == "" + if exists("w:netrw_method") && (w:netrw_method == 2 || w:netrw_method == 3) + silent! keepjumps .,$d + call s:NetBrowseFtpCmd(a:path,"delete ".rmfile) + else + let netrw_rm_cmd= s:MakeSshCmd(g:netrw_rm_cmd) +" call Decho("attempt to remove file: system(".netrw_rm_cmd.")") + let ret= s:System("system",netrw_rm_cmd) +" call Decho("returned=".ret." errcode=".v:shell_error) + endif + elseif ok =~ 'q\%[uit]' + break endif - if exists("g:netrw_ftp") && g:netrw_ftp == 1 - put =g:netrw_uid - put ='\"'.g:netrw_passwd.'\"' -" call Decho('ftp: g:netrw_uid') -" call Decho('ftp: g:netrw_passwd') - else - put ='user \"'.g:netrw_uid.'\" \"'.g:netrw_passwd.'\"' -" call Decho('user '.g:netrw_uid.' '.g:netrw_passwd) + else + " attempt to remove directory +" call Decho("attempt to remove directory") + if !all + call inputsave() + let ok= input("Confirm deletion of directory<".rmfile."> ","[{y(es)},n(o),a(ll),q(uit)] ") + call inputrestore() + if ok == "" + let ok="no" + endif + let ok= substitute(ok,'\[{y(es)},n(o),a(ll),q(uit)]\s*','','e') + if ok =~ 'a\%[ll]' + let all= 1 + endif endif - if a:path != "" - put ='cd '.a:path -" call Decho('cd '.a:path) - endif - exe "put ='".a:cmd."'" -" call Decho("ftp: ".a:cmd) + if all || ok =~ 'y\%[es]' || ok == "" + if exists("w:netrw_method") && (w:netrw_method == 2 || w:netrw_method == 3) + call s:NetBrowseFtpCmd(a:path,"rmdir ".rmfile) + else + let rmfile = substitute(a:path.rmfile,'/$','','') + let netrw_rmdir_cmd = s:MakeSshCmd(g:netrw_rmdir_cmd).' '.rmfile +" call Decho("attempt to remove dir: system(".netrw_rmdir_cmd.")") + let ret= s:System("system",netrw_rmdir_cmd) +" call Decho("returned=".ret." errcode=".v:shell_error) - " perform ftp: - " -i : turns off interactive prompting from ftp - " -n unix : DON'T use <.netrc>, even though it exists - " -n win32: quit being obnoxious about password -" call Decho("exe ".g:netrw_silentxfer.curline.",$!".g:netrw_ftp_cmd." -i -n") - exe g:netrw_silentxfer.endline.",$!".g:netrw_ftp_cmd." -i -n" + if v:shell_error != 0 +" call Decho("v:shell_error not 0") + let netrw_rmf_cmd= s:MakeSshCmd(g:netrw_rmf_cmd).' '.substitute(rmfile,'[\/]$','','e') +" call Decho("2nd attempt to remove dir: system(".netrw_rmf_cmd.")") + let ret= s:System("system",netrw_rmf_cmd) +" call Decho("returned=".ret." errcode=".v:shell_error) - "......................................... - else - echo "***warning*** unable to comply with your request<" . choice . ">" - endif - " restore - exe "silent! ".endline.",$d" - exe "keepjumps ".curline - setlocal noma nomod - else -" call Decho("ftp not executable") - if !exists("g:netrw_quiet") - echohl Error | echo "***netrw*** this system doesn't support ftp" | echohl None - call inputsave()|call input("Press to continue")|call inputrestore() - endif - " restore status line - let &stl = s:netrw_users_stl - let &laststatus = s:netrw_users_ls - " restore NetMethod - if exists("keep_netrw_method") - call s:NetMethod(keep_netrw_choice) - let w:netrw_method = keep_netrw_wmethod - endif -" call Dret("NetObtain") - return - endif + if v:shell_error != 0 && !exists("g:netrw_quiet") + call netrw#ErrorMsg(s:ERROR,"unable to remove directory<".rmfile."> -- is it empty?",22) + endif + endif + endif - "......................................... - else - " scp: Method#4 -" call Decho("using scp") - let curdir = expand("%") - let path = substitute(curdir,'scp://[^/]\+/','','e') -" call Decho("path<".path.">") - if exists("g:netrw_port") && g:netrw_port != "" - let useport= " -P ".g:netrw_port - else - let useport= "" - endif - if g:netrw_cygwin == 1 - let cygtmpfile=substitute(tmpfile,'^\(\a\):','/cygdrive/\1/','e') -" call Decho("executing: !".g:netrw_scp_cmd.useport." ".g:netrw_machine.":".path.escape(fname,' ?&')." .") - exe g:netrw_silentxfer."!".g:netrw_scp_cmd.useport." ".g:netrw_machine.":".path.escape(fname,' ?&')." ." - else -" call Decho("executing: !".g:netrw_scp_cmd.useport." ".g:netrw_machine.":".path.escape(fname,' ?&')." .") - exe g:netrw_silentxfer."!".g:netrw_scp_cmd.useport." ".g:netrw_machine.":".path.escape(fname,' ?&')." ." + elseif ok =~ 'q\%[uit]' + break + endif endif - endif - " restore status line - let &stl = s:netrw_users_stl - let &laststatus = s:netrw_users_ls - redraw! + let ctr= ctr + 1 + endwhile - " restore NetMethod - if exists("keep_netrw_method") - call s:NetMethod(keep_netrw_choice) - let w:netrw_method = keep_netrw_wmethod - endif + " refresh the (remote) directory listing +" call Decho("refresh remote directory listing") + call netrw#NetSavePosn() + call s:NetRefresh(0,s:NetBrowseChgDir(0,'./')) -" call Dret("NetObtain") +" call Dret("NetBrowseRm") endfun " --------------------------------------------------------------------- -" NetPrevWinOpen: open file/directory in previous window. {{{2 -" If there's only one window, then the window will first be split. -fun! s:NetPrevWinOpen(islocal) -" call Dfunc("NetPrevWinOpen(islocal=".a:islocal.")") +" NetBrowseRename: rename a remote file or directory {{{2 +fun! s:NetBrowseRename(usrhost,path) range +" call Dfunc("NetBrowseRename(usrhost<".a:usrhost."> path<".a:path.">)") - " get last window number and the word currently under the cursor - let lastwinnr = winnr("$") - let curword = s:NetGetWord() - let curdir = b:netrw_curdir -" call Decho("lastwinnr=".lastwinnr." curword<".curword.">") + " preparation for removing multiple files/directories + let ctr = a:firstline + let rename_cmd = s:MakeSshCmd(g:netrw_rename_cmd) - let didsplit = 0 - if lastwinnr == 1 - " if only one window, open a new one first -" call Decho("only one window, so open a new one (g:netrw_alto=".g:netrw_alto.")") - exe (g:netrw_alto? "bel " : "abo ").g:netrw_winsize."wincmd s" - let didsplit = 1 + " attempt to rename files/directories + while ctr <= a:lastline + exe "keepjumps ".ctr - else - wincmd p - " if the previous window's buffer has been changed (is modified), - " and it doesn't appear in any other extant window, then ask the - " user if s/he wants to abandon modifications therein. - let bnr = winbufnr(0) - let bnrcnt = 0 - if &mod - windo if winbufnr(0) == bnr | let bnrcnt=bnrcnt+1 | endif -" call Decho("bnr=".bnr." bnrcnt=".bnrcnt) - if bnrcnt == 1 - let bufname= bufname(winbufnr(winnr())) - let choice= confirm("Save modified file<".bufname.">?","&Yes\n&No\n&Cancel") + norm! 0 + let oldname= s:NetGetWord() +" call Decho("oldname<".oldname.">") - if choice == 1 - " Yes -- write file & then browse - let v:errmsg= "" - silent w - if v:errmsg != "" - echohl Error | echo "***netrw*** "unable to write <".bufname.">!" | echohl None - call inputsave()|call input("Press to continue")|call inputrestore() - if didsplit - q - else - wincmd p - endif -" call Dret("NetPrevWinOpen : unable to write <".bufname.">") - return - endif - - elseif choice == 2 - " No -- don't worry about changed file, just browse anyway - set nomod - echohl WarningMsg | echo "***netrw*** ".bufname." changes abandoned" | echohl None + call inputsave() + let newname= input("Moving ".oldname." to : ",oldname) + call inputrestore() - else - " Cancel -- don't do this - if didsplit - q - else - wincmd p - endif -" call Dret("NetPrevWinOpen : cancelled") - return - endif - endif + if exists("w:netrw_method") && (w:netrw_method == 2 || w:netrw_method == 3) + call s:NetBrowseFtpCmd(a:path,"rename ".oldname." ".newname) + else + let oldname= a:path.oldname + let newname= a:path.newname +" call Decho("system(rename_cmd".' "'.escape(oldname," ").'" "'.escape(newname,s:netrw_cd_escape).'"') + let ret= s:System("system",rename_cmd.' "'.escape(oldname,s:netrw_cd_escape).'" "'.escape(newname,s:netrw_cd_escape).'"') endif - endif + let ctr= ctr + 1 + endwhile + + " refresh the directory + let curline= line(".") + call s:NetBrowse(0,s:NetBrowseChgDir(0,'./')) + exe "keepjumps ".curline +" call Dret("NetBrowseRename") +endfun + +" --------------------------------------------------------------------- +" NetRefresh: {{{2 +fun! s:NetRefresh(islocal,dirname) +" call Dfunc("NetRefresh(islocal<".a:islocal.">,dirname=".a:dirname.") hide=".g:netrw_hide." sortdir=".g:netrw_sort_direction) + " at the current time (Mar 19, 2007) all calls to NetRefresh() call NetBrowseChgDir() first. + " NetBrowseChgDir() may clear the display; hence a NetSavePosn() may not work if its placed here. + " Also, NetBrowseChgDir() now does a NetSavePosn() itself. + setlocal ma noro +" call Decho("clear buffer<".expand("%")."> with :%d") + %d if a:islocal - call s:LocalBrowse(s:LocalBrowseChgDir(curdir,curword)) + call netrw#LocalBrowseCheck(a:dirname) else - call s:NetBrowse(s:NetBrowseChgDir(expand("%"),curword)) + call s:NetBrowse(a:islocal,a:dirname) endif -" call Dret("NetPrevWinOpen") + call netrw#NetRestorePosn() + redraw! +" call Dret("NetRefresh") endfun " --------------------------------------------------------------------- -" NetMenu: generates the menu for gvim and netrw {{{2 -fun! s:NetMenu(domenu) - - if !exists("g:NetrwMenuPriority") - let g:NetrwMenuPriority= 80 - endif +" NetSplit: mode {{{2 +" =0 : net and o +" =1 : net and t +" =2 : net and v +" =3 : local and o +" =4 : local and t +" =5 : local and v +fun! s:NetSplit(mode) +" call Dfunc("NetSplit(mode=".a:mode.") alto=".g:netrw_alto." altv=".g:netrw_altv) - if has("menu") && has("gui_running") && &go =~ 'm' -" call Dfunc("NetMenu(domenu=".a:domenu.")") - if !exists("s:netrw_menu_enabled") && a:domenu -" call Decho("initialize menu") - let s:netrw_menu_enabled= 1 - if !exists("g:NetrwTopLvlMenu") - let g:NetrwTopLvlMenu= "Netrw." - endif - exe 'silent! '.g:NetrwMenuPriority.'menu '.g:NetrwTopLvlMenu.'Help ' - exe 'silent! '.g:NetrwMenuPriority.'menu '.g:NetrwTopLvlMenu.'Apply\ Special\ Viewerx x' - exe 'silent! '.g:NetrwMenuPriority.'menu '.g:NetrwTopLvlMenu.'Bookmark\ Current\ Directoryb Nb' - exe 'silent! '.g:NetrwMenuPriority.'menu '.g:NetrwTopLvlMenu.'Go\ Up\ Directory- -' - exe 'silent! '.g:NetrwMenuPriority.'menu '.g:NetrwTopLvlMenu.'Goto\ Bookmarked\ DirectoryB NB' - exe 'silent! '.g:NetrwMenuPriority.'menu '.g:NetrwTopLvlMenu.'Change\ To\ Recently\ Used\ Directoryu u' - exe 'silent! '.g:NetrwMenuPriority.'menu '.g:NetrwTopLvlMenu.'Change\ To\ Subsequently\ Used\ DirectoryU U' - exe 'silent! '.g:NetrwMenuPriority.'menu '.g:NetrwTopLvlMenu.'Delete\ File/DirectoryD D' - exe 'silent! '.g:NetrwMenuPriority.'menu '.g:NetrwTopLvlMenu.'Edit\ File\ Hiding\ List'." \" - exe 'silent! '.g:NetrwMenuPriority.'menu '.g:NetrwTopLvlMenu.'Edit\ File/Directory '."\" - exe 'silent! '.g:NetrwMenuPriority.'menu '.g:NetrwTopLvlMenu.'Edit\ File/Directory,\ New\ Windowo o' - exe 'silent! '.g:NetrwMenuPriority.'menu '.g:NetrwTopLvlMenu.'Edit\ File/Directory,\ New\ Vertical\ Windowv v' - exe 'silent! '.g:NetrwMenuPriority.'menu '.g:NetrwTopLvlMenu.'List\ Bookmarks\ and\ Historyq q' - exe 'silent! '.g:NetrwMenuPriority.'menu '.g:NetrwTopLvlMenu.'Listing\ Style\ (thin-long-wide)i i' - exe 'silent! '.g:NetrwMenuPriority.'menu '.g:NetrwTopLvlMenu.'Make\ Subdirectoryd d' - exe 'silent! '.g:NetrwMenuPriority.'menu '.g:NetrwTopLvlMenu.'Normal-Hide-Showa a' - exe 'silent! '.g:NetrwMenuPriority.'menu '.g:NetrwTopLvlMenu.'Obtain\ FileO O' - exe 'silent! '.g:NetrwMenuPriority.'menu '.g:NetrwTopLvlMenu.'Preview\ File/Directoryp p' - exe 'silent! '.g:NetrwMenuPriority.'menu '.g:NetrwTopLvlMenu.'Previous\ Window\ BrowserP P' - exe 'silent! '.g:NetrwMenuPriority.'menu '.g:NetrwTopLvlMenu.'Refresh\ Listing'." \" - exe 'silent! '.g:NetrwMenuPriority.'menu '.g:NetrwTopLvlMenu.'Rename\ File/DirectoryR R' - exe 'silent! '.g:NetrwMenuPriority.'menu '.g:NetrwTopLvlMenu.'Reverse\ Sorting\ Order'."r r" - exe 'silent! '.g:NetrwMenuPriority.'menu '.g:NetrwTopLvlMenu.'Select\ Sorting\ Styles s' - exe 'silent! '.g:NetrwMenuPriority.'menu '.g:NetrwTopLvlMenu.'Sorting\ Sequence\ EditS S' - exe 'silent! '.g:NetrwMenuPriority.'menu '.g:NetrwTopLvlMenu.'Set\ Current\ Directoryc c' - exe 'silent! '.g:NetrwMenuPriority.'menu '.g:NetrwTopLvlMenu.'Settings/Options:NetrwSettings '.":NetrwSettings\" - elseif !a:domenu - let s:netrwcnt = 0 - let curwin = winnr() - windo if getline(2) =~ "Netrw" | let s:netrwcnt= s:netrwcnt + 1 | endif - exe curwin."wincmd w" - - if s:netrwcnt <= 1 -" call Decho("clear menus") - exe 'silent! unmenu '.g:NetrwTopLvlMenu.'Help' - exe 'silent! unmenu '.g:NetrwTopLvlMenu.'Apply\ Special\ Viewer' - exe 'silent! unmenu '.g:NetrwTopLvlMenu.'Bookmark\ Current\ Directory' - exe 'silent! unmenu '.g:NetrwTopLvlMenu.'Go\ Up\ Directory' - exe 'silent! unmenu '.g:NetrwTopLvlMenu.'Goto\ Bookmarked\ Directory' - exe 'silent! unmenu '.g:NetrwTopLvlMenu.'Change\ To\ Recently\ Used\ Directory' - exe 'silent! unmenu '.g:NetrwTopLvlMenu.'Change\ To\ Subsequently\ Used\ Directory' - exe 'silent! unmenu '.g:NetrwTopLvlMenu.'Delete\ File/Directory' - exe 'silent! unmenu '.g:NetrwTopLvlMenu.'Edit\ File/Directory' - exe 'silent! unmenu '.g:NetrwTopLvlMenu.'Edit\ File/Directory,\ New\ Window' - exe 'silent! unmenu '.g:NetrwTopLvlMenu.'Edit\ File/Directory,\ New\ Vertical\ Window' - exe 'silent! unmenu '.g:NetrwTopLvlMenu.'Edit\ File\ Hiding\ List' - exe 'silent! unmenu '.g:NetrwTopLvlMenu.'Edit\ File' - exe 'silent! unmenu '.g:NetrwTopLvlMenu.'Enter\ File/Directory' - exe 'silent! unmenu '.g:NetrwTopLvlMenu.'Enter\ File/Directory\ (vertical\ split)' - exe 'silent! unmenu '.g:NetrwTopLvlMenu.'List\ Bookmarks\ and\ History' - exe 'silent! unmenu '.g:NetrwTopLvlMenu.'Listing\ Style\ (thin-long-wide)' - exe 'silent! unmenu '.g:NetrwTopLvlMenu.'Make\ Subdirectory' - exe 'silent! unmenu '.g:NetrwTopLvlMenu.'Normal-Hide-Show' - exe 'silent! unmenu '.g:NetrwTopLvlMenu.'Obtain\ File' - exe 'silent! unmenu '.g:NetrwTopLvlMenu.'Preview\ File/Directory' - exe 'silent! unmenu '.g:NetrwTopLvlMenu.'Previous\ Window\ Browser' - exe 'silent! unmenu '.g:NetrwTopLvlMenu.'Refresh\ Listing' - exe 'silent! unmenu '.g:NetrwTopLvlMenu.'Rename\ File/Directory' - exe 'silent! unmenu '.g:NetrwTopLvlMenu.'Reverse\ Sorting\ Order' - exe 'silent! unmenu '.g:NetrwTopLvlMenu.'Select\ Sorting\ Style' - exe 'silent! unmenu '.g:NetrwTopLvlMenu.'Sorting\ Sequence\ Edit' - exe 'silent! unmenu '.g:NetrwTopLvlMenu.'Set\ Current\ Directory' - exe 'silent! unmenu '.g:NetrwTopLvlMenu.'Settings/Options' - unlet s:netrw_menu_enabled - endif - endif -" call Dret("NetMenu") - endif + call s:SaveWinVars() -endfun + if a:mode == 0 + " remote and o + exe (g:netrw_alto? "bel " : "abo ").g:netrw_winsize."wincmd s" + let s:didsplit= 1 + call s:RestoreWinVars() + call s:NetBrowse(0,s:NetBrowseChgDir(0,s:NetGetWord())) + unlet s:didsplit + + elseif a:mode == 1 + " remote and t + let cursorword = s:NetGetWord() + tabnew + let s:didsplit= 1 + call s:RestoreWinVars() + call s:NetBrowse(0,s:NetBrowseChgDir(0,cursorword)) + unlet s:didsplit + + elseif a:mode == 2 + " remote and v + exe (g:netrw_altv? "rightb " : "lefta ").g:netrw_winsize."wincmd v" + let s:didsplit= 1 + call s:RestoreWinVars() + call s:NetBrowse(0,s:NetBrowseChgDir(0,s:NetGetWord())) + unlet s:didsplit -" ========================================== -" Local Directory Browsing Support: {{{1 -" ========================================== + elseif a:mode == 3 + " local and o + exe (g:netrw_alto? "bel " : "abo ").g:netrw_winsize."wincmd s" + let s:didsplit= 1 + call s:RestoreWinVars() + call netrw#LocalBrowseCheck(s:NetBrowseChgDir(1,s:NetGetWord())) + unlet s:didsplit + + elseif a:mode == 4 + " local and t + let netrw_curdir= b:netrw_curdir + let cursorword = s:NetGetWord() + tabnew + let b:netrw_curdir= netrw_curdir + let s:didsplit= 1 + call s:RestoreWinVars() + call netrw#LocalBrowseCheck(s:NetBrowseChgDir(1,cursorword)) + unlet s:didsplit + + elseif a:mode == 5 + " local and v + exe (g:netrw_altv? "rightb " : "lefta ").g:netrw_winsize."wincmd v" + let s:didsplit= 1 + call s:RestoreWinVars() + call netrw#LocalBrowseCheck(s:NetBrowseChgDir(1,s:NetGetWord())) + unlet s:didsplit -" --------------------------------------------------------------------- -" LocalBrowse: {{{2 -fun! s:LocalBrowse(dirname) - " unfortunate interaction -- debugging calls can't be used here; - " the BufEnter event causes triggering when attempts to write to - " the DBG buffer are made. - if isdirectory(a:dirname) - silent! call netrw#DirBrowse(a:dirname) + else + call netrw#ErrorMsg(s:ERROR,"(NetSplit) unsupported mode=".a:mode,45) endif - " not a directory, ignore it + +" call Dret("NetSplit") endfun " --------------------------------------------------------------------- -" DirBrowse: supports local file/directory browsing {{{2 -fun! netrw#DirBrowse(dirname) - if !exists("w:netrw_longlist")|let w:netrw_longlist= g:netrw_longlist|endif -" call Dfunc("DirBrowse(dirname<".a:dirname.">) buf#".bufnr("%")." winnr=".winnr()." sortby=".g:netrw_sort_by." hide=".g:netrw_hide) -" call Dredir("ls!") +" NetBrowseX: allows users to write custom functions to operate on {{{2 +" files given their extension. Passes 0=local, 1=remote +fun! netrw#NetBrowseX(fname,remote) +" call Dfunc("NetBrowseX(fname<".a:fname."> remote=".a:remote.")") - if exists("s:netrw_skipbrowse") - unlet s:netrw_skipbrowse -" call Dret("DirBrowse") - return + " set up the filename + " (lower case the extension, make a local copy of a remote file) + let exten= substitute(a:fname,'.*\.\(.\{-}\)','\1','e') + if has("win32") || has("win95") || has("win64") || has("win16") + let exten= substitute(exten,'^.*$','\L&\E','') endif - if &fo =~ '[ta]' - set fo-=t - set fo-=a - echohl Warning - echo '***warning*** directory browsing and formatoptions "ta" are incompatible' - echohl None + let fname= escape(a:fname,"%#") +" call Decho("fname<".fname."> after escape()") + + " seems kde systems often have gnome-open due to dependencies, even though + " gnome-open's subsidiary display tools are largely absent. Kde systems + " usually have "kdeinit" running, though... (tnx Mikolaj Machowski) + if !exists("s:haskdeinit") + if has("unix") + let s:haskdeinit= s:System("system",'ps -e') =~ 'kdeinit' + if v:shell_error + let s:haskdeinit = 0 + endif + else + let s:haskdeinit= 0 + endif +" call Decho("setting s:haskdeinit=".s:haskdeinit) endif - call s:NetOptionSave() - if exists("w:acdkeep") && w:acdkeep - exe 'cd '.escape(a:dirname,s:netrw_cd_escape) -" call Decho("cd ".escape(a:dirname,s:netrw_cd_escape)) -" call Decho("getcwd<".getcwd().">") + if a:remote == 1 + " create a local copy + let fname= fnamemodify(tempname(),":t:r").".".exten +" call Decho("a:remote=".a:remote.": create a local copy of <".a:fname."> as <".fname.">") + exe "silent keepjumps bot 1new ".a:fname + setlocal bh=delete +" call Decho("exe w! ".fname) + exe "w! ".fname + q endif +" call Decho("exten<".exten."> "."netrwFileHandlers#NFH_".exten."():exists=".exists("*netrwFileHandlers#NFH_".exten)) - if v:version < 603 - if !exists("g:netrw_quiet") - echohl Error | echo "***netrw*** vim version<".v:version."> too old for browsing with netrw" | echohl None - call inputsave()|call input("Press to continue")|call inputrestore() - endif - call s:NetOptionRestore() -" call Dret("DirBrowse : vim version<".v:version."> too old") - return + " set up redirection + if &srr =~ "%s" + let redir= substitute(&srr,"%s","/dev/null","") + else + let redir= &srr . "/dev/null" endif +" call Decho("redir{".redir."} srr{".&srr."}") - " use buffer-oriented WinVars if buffer ones exist but window ones don't - call s:UseBufWinVars() + " execute the file handler + if exists("g:netrw_browsex_viewer") && g:netrw_browsex_viewer == '-' +" call Decho("g:netrw_browsex_viewer<".g:netrw_browsex_viewer.">") + let ret= netrwFileHandlers#Invoke(exten,fname) - " set up menus - let b:netrw_browser_active= 1 - call s:NetMenu(1) + elseif exists("g:netrw_browsex_viewer") && executable(g:netrw_browsex_viewer) +" call Decho("g:netrw_browsex_viewer<".g:netrw_browsex_viewer.">") +" call Decho("exe silent !".g:netrw_browsex_viewer." '".escape(fname,'%#')."' ".redir) + exe "silent !".g:netrw_browsex_viewer." '".escape(fname,'%#')."'".redir + let ret= v:shell_error - " find buffer number of buffer named precisely the same as a:dirname - let bufnum= bufnr(escape(a:dirname,'\')) -" call Decho("findbuf: bufnum=".bufnum) - if bufnum > 0 && bufname(bufnum) != a:dirname - let ibuf= 1 - let buflast= bufnr("$") - while bufname(ibuf) !~ '^'.a:dirname.'\=$' && ibuf <= buflast -" call Decho("findbuf: ibuf=".ibuf. " bufname<".bufname(ibuf)."> dirname<".a:dirname.">") - let ibuf= ibuf + 1 - endwhile - if ibuf > buflast - let bufnum= -1 - else - let bufnum= ibuf - endif -" call Decho("findbuf: bufnum=".bufnum." (final)") - endif + elseif has("win32") || has("win64") +" call Decho('exe silent !start rundll32 url.dll,FileProtocolHandler "'.escape(fname, '%#').'"') + exe 'silent !start rundll32 url.dll,FileProtocolHandler "'.escape(fname, '%#').'"' + call inputsave()|call input("Press to continue")|call inputrestore() + let ret= v:shell_error - " get cleared buffer - mark ' - if bufnum < 0 || !bufexists(bufnum) - keepjumps keepalt enew! -" call Decho("enew buffer") - else - exe "keepalt b ".bufnum - if exists("s:last_sort_by") && g:netrw_sort_by == s:last_sort_by - if getline(2) =~ '^" Netrw Directory Listing ' - if !g:netrw_keepdir - exe 'cd '.escape(b:netrw_curdir,s:netrw_cd_escape) -" call Decho("netrw_keepdir=".g:netrw_keepdir.": cd ".escape(b:netrw_curdir,s:netrw_cd_escape)) - endif - call s:NetOptionRestore() -" call Dret("DirBrowse : reusing buffer#".bufnum."<".a:dirname.">") - return - endif - endif - endif - let s:last_sort_by= g:netrw_sort_by + elseif has("unix") && executable("gnome-open") && !s:haskdeinit +" call Decho("exe silent !gnome-open '".escape(fname,'%#')."' ".redir) + exe "silent !gnome-open '".escape(fname,'%#')."'".redir + let ret= v:shell_error - " set up ShellCmdPost handling. Append current buffer to browselist - call s:LocalFastBrowser() + elseif has("unix") && executable("kfmclient") && s:haskdeinit +" call Decho("exe silent !kfmclient exec '".escape(fname,'%#')."' ".redir) + exe "silent !kfmclient exec '".escape(fname,'%#')."' ".redir + let ret= v:shell_error - " get the new directory name - if has("win32") || has("win95") || has("win64") || has("win16") - let b:netrw_curdir= substitute(a:dirname,'\\','/','ge') else - let b:netrw_curdir= a:dirname - endif - if b:netrw_curdir =~ '[/\\]$' - let b:netrw_curdir= substitute(b:netrw_curdir,'[/\\]$','','e') - endif - if b:netrw_curdir == '' - " under unix, when the root directory is encountered, the result - " from the preceding substitute is an empty string. - let b:netrw_curdir= '/' + " netrwFileHandlers#Invoke() always returns 0 + let ret= netrwFileHandlers#Invoke(exten,fname) endif -" call Decho("b:netrw_curdir<".b:netrw_curdir.">") - " make netrw's idea of the current directory vim's if the user wishes - if !g:netrw_keepdir -" call Decho("netrw_keepdir=".g:netrw_keepdir.": cd ".escape(b:netrw_curdir,s:netrw_cd_escape)) - try - exe 'cd '.escape(b:netrw_curdir,s:netrw_cd_escape) - catch /^Vim\%((\a\+)\)\=:E472/ - echohl Error | echo "***netrw*** unable to change directory to <".b:netrw_curdir."> (permissions?)" | echohl None - call inputsave()|call input("Press to continue")|call inputrestore() - if exists("w:netrw_prvdir") - let b:netrw_curdir= w:netrw_prvdir - else - call s:NetOptionRestore() -" call Dret("DirBrowse : reusing buffer#".bufnum."<".a:dirname.">") - return - endif - endtry + " if unsuccessful, attempt netrwFileHandlers#Invoke() + if ret + let ret= netrwFileHandlers#Invoke(exten,fname) endif - " change the name of the buffer to reflect the b:netrw_curdir - " Hmm. When another vim is open to the same directory, I get - " a "Press ENTER" ... ok, setting "noswf" avoids it. -" call Decho('exe silent! file '.escape(b:netrw_curdir,s:netrw_cd_escape)) - exe 'silent! file '.escape(b:netrw_curdir,s:netrw_cd_escape) + redraw! - " make this buffer not-a-file, modifiable, not line-numbered, etc - setlocal bt=nofile nobl ma nonu noswf nowrap - if g:netrw_fastbrowse >= 2 - setlocal bh=hide - else - setlocal bh=delete + " cleanup: remove temporary file, + " delete current buffer if success with handler, + " return to prior buffer (directory listing) + if a:remote == 1 && fname != a:fname +" call Decho("deleting temporary file<".fname.">") + call s:System("delete",fname) endif - keepalt silent! %d - " --------------------------- - " Perform Directory Listing: - if exists("g:netrw_silent") && g:netrw_silent == 0 && &ch >= 1 - echo "(netrw) Processing your browsing request..." + if a:remote == 1 + setlocal bh=delete bt=nofile + if g:netrw_use_noswf + setlocal noswf endif + exe "norm! \" + redraw! + endif - " save current directory on directory history list - call s:NetBookmarkDir(3,b:netrw_curdir) +" call Dret("NetBrowseX") +endfun - " set up all the maps -" call Decho("Setting up local browser maps") - nnoremap :call LocalBrowse(LocalBrowseChgDir(b:netrw_curdir,NetGetWord())) - nnoremap :call NetRefresh(LocalBrowseChgDir(b:netrw_curdir,'./'),1) - nnoremap - :exe "norm! 0"call LocalBrowse(LocalBrowseChgDir(b:netrw_curdir,'../')) - nnoremap a :let g:netrw_hide=(g:netrw_hide+1)%3exe "norm! 0"call NetRefresh(LocalBrowseChgDir(b:netrw_curdir,'./'),1) - if w:netrw_longlist != 2 - nnoremap b :call NetBookmarkDir(0,b:netrw_curdir) - nnoremap B :call NetBookmarkDir(1,b:netrw_curdir) - endif - nnoremap Nb :call NetBookmarkDir(0,b:netrw_curdir) - nnoremap NB :call NetBookmarkDir(1,b:netrw_curdir) - nnoremap c :exe "cd ".b:netrw_curdir - nnoremap d :call NetMakeDir("") - nnoremap :call NetHideEdit(1) - nnoremap i :call NetLongList(1) - nnoremap o :call NetSplit(2) - nnoremap O :call LocalObtain() - nnoremap p :call LocalPreview(LocalBrowseChgDir(b:netrw_curdir,NetGetWord(),1)) - nnoremap P :call NetPrevWinOpen(1) - nnoremap q :call NetBookmarkDir(2,b:netrw_curdir) - nnoremap r :let g:netrw_sort_direction= (g:netrw_sort_direction =~ 'n')? 'r' : 'n'exe "norm! 0"call NetRefresh(LocalBrowseChgDir(b:netrw_curdir,'./'),1) - nnoremap s :call NetSaveWordPosn()let g:netrw_sort_by= (g:netrw_sort_by =~ 'n')? 'time' : (g:netrw_sort_by =~ 't')? 'size' : 'name'exe "norm! 0"call LocalBrowse(LocalBrowseChgDir(b:netrw_curdir,'./'))call NetRestoreWordPosn() - nnoremap S :call NetSortSequence(1) - nnoremap u :call NetBookmarkDir(4,expand("%")) - nnoremap U :call NetBookmarkDir(5,expand("%")) - nnoremap v :call NetSplit(3) - nnoremap x :call netrw#NetBrowseX(LocalBrowseChgDir(b:netrw_curdir,NetGetWord(),0),0)" - nnoremap <2-leftmouse> :call LocalBrowse(LocalBrowseChgDir(b:netrw_curdir,NetGetWord())) - if s:didstarstar || !mapcheck("","n") - nnoremap :Nexplore - endif - if s:didstarstar || !mapcheck("","n") - nnoremap :Pexplore - endif - exe 'nnoremap :call LocalBrowseRm("'.b:netrw_curdir.'")' - exe 'vnoremap :call LocalBrowseRm("'.b:netrw_curdir.'")' - exe 'nnoremap D :call LocalBrowseRm("'.b:netrw_curdir.'")' - exe 'vnoremap D :call LocalBrowseRm("'.b:netrw_curdir.'")' - exe 'nnoremap R :call LocalBrowseRename("'.b:netrw_curdir.'")' - exe 'vnoremap R :call LocalBrowseRename("'.b:netrw_curdir.'")' - exe 'nnoremap m :call NetMakeDir("")' - nnoremap :he netrw-dir - - " Set up the banner -" call Decho("set up banner") - keepjumps put ='\" ============================================================================' - keepjumps 1d - keepjumps put ='\" Netrw Directory Listing (netrw '.g:loaded_netrw.')' - keepjumps put ='\" '.b:netrw_curdir - let w:netrw_bannercnt= 3 +" --------------------------------------------------------------------- +" NetBrowseFtpCmd: unfortunately, not all ftp servers honor options for ls {{{2 +" This function assumes that a long listing will be received. Size, time, +" and reverse sorts will be requested of the server but not otherwise +" enforced here. +fun! s:NetBrowseFtpCmd(path,listcmd) +" call Dfunc("NetBrowseFtpCmd(path<".a:path."> listcmd<".a:listcmd.">) netrw_method=".w:netrw_method) +" call Decho("line($)=".line("$")." bannercnt=".w:netrw_bannercnt) - let sortby= g:netrw_sort_by - if g:netrw_sort_direction =~ "^r" - let sortby= sortby." reversed" - endif + " because WinXX ftp uses unix style input + let ffkeep= &ff + setlocal ma ff=unix noro - " Sorted by... - if g:netrw_sort_by =~ "^n" -" call Decho("directories will be sorted by name") - " sorted by name - keepjumps put ='\" Sorted by '.sortby - keepjumps put ='\" Sort sequence: '.g:netrw_sort_sequence - let w:netrw_bannercnt= w:netrw_bannercnt + 2 - else -" call Decho("directories will be sorted by size or date") - " sorted by size or date - keepjumps put ='\" Sorted by '.sortby - let w:netrw_bannercnt= w:netrw_bannercnt + 1 - endif + " clear off any older non-banner lines + " note that w:netrw_bannercnt indexes the line after the banner +" call Decho('exe silent! keepjumps '.w:netrw_bannercnt.",$d (clear off old non-banner lines)") + exe "silent! keepjumps ".w:netrw_bannercnt.",$d" - " Hiding... -or- Showing... - if g:netrw_list_hide != "" && g:netrw_hide - if g:netrw_hide == 1 - keepjumps put ='\" Hiding: '.g:netrw_list_hide + "......................................... + if w:netrw_method == 2 || w:netrw_method == 5 + " ftp + <.netrc>: Method #2 + if a:path != "" + put ='cd \"'.a:path.'\"' + endif + if exists("g:netrw_ftpextracmd") + exe "put ='".g:netrw_ftpextracmd."'" +" call Decho("filter input: ".getline(".")) + endif + exe "put ='".a:listcmd."'" +" exe w:netrw_bannercnt.',$g/^./call Decho("ftp#".line(".").": ".getline("."))' + if exists("g:netrw_port") && g:netrw_port != "" +" call Decho("exe ".g:netrw_silentxfer.w:netrw_bannercnt.",$!".g:netrw_ftp_cmd." -i ".g:netrw_machine." ".g:netrw_port) + exe g:netrw_silentxfer.w:netrw_bannercnt.",$!".g:netrw_ftp_cmd." -i ".g:netrw_machine." ".g:netrw_port else - keepjumps put ='\" Showing: '.g:netrw_list_hide +" call Decho("exe ".g:netrw_silentxfer.w:netrw_bannercnt.",$!".g:netrw_ftp_cmd." -i ".g:netrw_machine) + exe g:netrw_silentxfer.w:netrw_bannercnt.",$!".g:netrw_ftp_cmd." -i ".g:netrw_machine endif - let w:netrw_bannercnt= w:netrw_bannercnt + 1 - endif - keepjumps put ='\" Quick Help: :help -:go up dir D:delete R:rename s:sort-by x:exec' - keepjumps put ='\" ============================================================================' - let w:netrw_bannercnt= w:netrw_bannercnt + 2 - " bannercnt should index the line just after the banner - let w:netrw_bannercnt= w:netrw_bannercnt + 1 -" call Decho("bannercnt=".w:netrw_bannercnt) + "......................................... + elseif w:netrw_method == 3 + " ftp + machine,id,passwd,filename: Method #3 + setlocal ff=unix + if exists("g:netrw_port") && g:netrw_port != "" + put ='open '.g:netrw_machine.' '.g:netrw_port + else + put ='open '.g:netrw_machine + endif - " generate the requested directory listing - call s:LocalBrowseList() + if exists("g:netrw_ftp") && g:netrw_ftp == 1 + put =g:netrw_uid + put ='\"'.g:netrw_passwd.'\"' + else + put ='user \"'.g:netrw_uid.'\" \"'.g:netrw_passwd.'\"' + endif - " set up syntax highlighting - if has("syntax") - setlocal ft=netrw - if !exists("g:syntax_on") || !g:syntax_on - setlocal ft= + if a:path != "" + put ='cd \"'.a:path.'\"' endif - endif - - " manipulate the directory listing (hide, sort) - if line("$") >= w:netrw_bannercnt - if g:netrw_hide && g:netrw_list_hide != "" - call s:NetrwListHide() + if exists("g:netrw_ftpextracmd") + exe "put ='".g:netrw_ftpextracmd."'" +" call Decho("filter input: ".getline(".")) endif - if line("$") >= w:netrw_bannercnt - - if g:netrw_sort_by =~ "^n" - call s:SetSort() + exe "put ='".a:listcmd."'" - if w:netrw_bannercnt < line("$") - if g:netrw_sort_direction =~ 'n' - exe 'silent keepjumps '.w:netrw_bannercnt.',$sort' - else - exe 'silent keepjumps '.w:netrw_bannercnt.',$sort!' - endif - endif - " remove priority pattern prefix - exe 'silent keepjumps '.w:netrw_bannercnt.',$s/^\d\{3}\///e' + " perform ftp: + " -i : turns off interactive prompting from ftp + " -n unix : DON'T use <.netrc>, even though it exists + " -n win32: quit being obnoxious about password +" exe w:netrw_bannercnt.',$g/^./call Decho("ftp#".line(".").": ".getline("."))' +" call Decho("exe ".g:netrw_silentxfer.w:netrw_bannercnt.",$!".g:netrw_ftp_cmd." -i -n") + exe g:netrw_silentxfer.w:netrw_bannercnt.",$!".g:netrw_ftp_cmd." -i -n" - else - if w:netrw_bannercnt < line("$") - if g:netrw_sort_direction =~ 'n' - exe 'silent keepjumps '.w:netrw_bannercnt.',$sort' - else - exe 'silent keepjumps '.w:netrw_bannercnt.',$sort!' - endif - endif - exe 'silent keepjumps '.w:netrw_bannercnt.',$s/^\d\{-}\///e' - endif + "......................................... + else + call netrw#ErrorMsg(s:WARNING,"unable to comply with your request<" . choice . ">",23) + endif + " cleanup for Windows + if has("win32") || has("win95") || has("win64") || has("win16") + silent! keepjumps %s/\r$//e + endif + if a:listcmd == "dir" + " infer directory/link based on the file permission string + silent! keepjumps g/d\%([-r][-w][-x]\)\{3}/s@$@/@ + silent! keepjumps g/l\%([-r][-w][-x]\)\{3}/s/$/@/ + if w:netrw_liststyle == s:THINLIST || w:netrw_liststyle == s:WIDELIST || w:netrw_liststyle == s:TREELIST + exe "silent! keepjumps ".w:netrw_bannercnt.',$s/^\%(\S\+\s\+\)\{8}//e' endif endif - call s:NetrwWideListing() - if exists("w:netrw_bannercnt") && line("$") > w:netrw_bannercnt - " place cursor on the top-left corner of the file listing - exe 'silent '.w:netrw_bannercnt - norm! 0 + " ftp's listing doesn't seem to include ./ or ../ + if !search('^\.\/$\|\s\.\/$','wn') + exe 'keepjumps '.w:netrw_bannercnt + put ='./' endif - - " record previous current directory - let w:netrw_prvdir= b:netrw_curdir - - " save certain window-oriented variables into buffer-oriented variables - call s:SetBufWinVars() - call s:NetOptionRestore() - setlocal noma nomod nonu nobl nowrap - if g:netrw_fastbrowse >= 2 - setlocal bh=hide + if !search('^\.\.\/$\|\s\.\.\/$','wn') + exe 'keepjumps '.w:netrw_bannercnt + put ='../' endif -" call Dret("DirBrowse : file<".expand("%:p")."> bufname<".bufname("%").">") + " restore settings + let &ff= ffkeep +" call Dret("NetBrowseFtpCmd") endfun " --------------------------------------------------------------------- -" LocalBrowseList: does the job of "ls" for local directories {{{2 -fun! s:LocalBrowseList() -" call Dfunc("LocalBrowseList() b:netrw_curdir<".b:netrw_curdir."> sortby<".g:netrw_sort_by.">") - - " get the list of files contained in the current directory - let dirname = escape(b:netrw_curdir,s:netrw_glob_escape) - let dirnamelen = strlen(b:netrw_curdir) - let filelist = glob(dirname."/*") -" call Decho("glob(dirname<".dirname."/.*>)=".filelist) - if filelist != "" - let filelist= filelist."\n" - endif - let filelist= filelist.glob(dirname."/.*") -" call Decho("glob(dirname<".dirname."/.*>)=".glob(dirname.".*")) - - " if the directory name includes a "$", and possibly other characters, - " the glob() doesn't include "." and ".." entries. - if filelist !~ '[\\/]\.[\\/]\=\(\n\|$\)' -" call Decho("forcibly tacking on .") - if filelist == "" - let filelist= dirname."." - else - let filelist= filelist."\n".b:netrw_curdir."." - endif -" call Decho("filelist<".filelist.">") - endif - if filelist !~ '[\\/]\.\.[\\/]\=\(\n\|$\)' -" call Decho("forcibly tacking on ..") - let filelist= filelist."\n".b:netrw_curdir.".." -" call Decho("filelist<".filelist.">") - endif - let filelist= substitute(filelist,'\n\{2,}','\n','ge') - if (has("win32") || has("win95") || has("win64") || has("win16")) - let filelist= substitute(filelist,'\','/','ge') - else - let filelist= substitute(filelist,'\','\\','ge') - endif +" NetListHide: uses [range]g~...~d to delete files that match comma {{{2 +" separated patterns given in g:netrw_list_hide +fun! s:NetListHide() +" call Dfunc("NetListHide() hide=".g:netrw_hide." listhide<".g:netrw_list_hide.">") -" call Decho("dirname<".dirname.">") -" call Decho("dirnamelen<".dirnamelen.">") -" call Decho("filelist<".filelist.">") + " find a character not in the "hide" string to use as a separator for :g and :v commands + " How-it-works: take the hiding command, convert it into a range. Duplicate + " characters don't matter. Remove all such characters from the '/~...90' + " string. Use the first character left as a separator character. + let listhide= g:netrw_list_hide + let sep = strpart(substitute('/~@#$%^&*{};:,<.>?|1234567890','['.escape(listhide,'-]^\').']','','ge'),1,1) +" call Decho("sep=".sep) - while filelist != "" - if filelist =~ '\n' - let filename = substitute(filelist,'\n.*$','','e') - let filelist = substitute(filelist,'^.\{-}\n\(.*\)$','\1','e') + while listhide != "" + if listhide =~ ',' + let hide = substitute(listhide,',.*$','','e') + let listhide = substitute(listhide,'^.\{-},\(.*\)$','\1','e') else - let filename = filelist - let filelist = "" - endif - let pfile= filename - if isdirectory(filename) - let pfile= filename."/" - endif - if pfile =~ '//$' - let pfile= substitute(pfile,'//$','/','e') - endif - let pfile= strpart(pfile,dirnamelen) - let pfile= substitute(pfile,'^/','','e') -" call Decho(" ") -" call Decho("filename<".filename.">") -" call Decho("pfile <".pfile.">") - - if w:netrw_longlist == 1 - let sz = getfsize(filename) - let fsz = strpart(" ",1,15-strlen(sz)).sz - let pfile= pfile."\t".fsz." ".strftime(g:netrw_timefmt,getftime(filename)) -" call Decho("sz=".sz." fsz=".fsz) + let hide = listhide + let listhide= "" endif - if g:netrw_sort_by =~ "^t" - " sort by time (handles time up to 1 quintillion seconds, US) -" call Decho("getftime(".filename.")=".getftime(filename)) - let t = getftime(filename) - let ft = strpart("000000000000000000",1,18-strlen(t)).t -" call Decho("exe keepjumps put ='".ft.'/'.filename."'") - let ftpfile= ft.'/'.pfile - keepjumps silent! put=ftpfile - - elseif g:netrw_sort_by =~ "^s" - " sort by size (handles file sizes up to 1 quintillion bytes, US) -" call Decho("getfsize(".filename.")=".getfsize(filename)) - let sz = getfsize(filename) - let fsz = strpart("000000000000000000",1,18-strlen(sz)).sz -" call Decho("exe keepjumps put ='".fsz.'/'.filename."'") - let fszpfile= fsz.'/'.pfile - keepjumps silent! put =fszpfile - - else - " sort by name -" call Decho("exe keepjumps put ='".pfile."'") - keepjumps silent! put=pfile + " Prune the list by hiding any files which match + if g:netrw_hide == 1 +" call Decho("hiding<".hide."> listhide<".listhide.">") + exe 'silent keepjumps '.w:netrw_bannercnt.',$g'.sep.hide.sep.'d' + elseif g:netrw_hide == 2 +" call Decho("showing<".hide."> listhide<".listhide.">") + exe 'silent keepjumps '.w:netrw_bannercnt.',$g'.sep.hide.sep.'s@^@ /-KEEP-/ @' endif endwhile + if g:netrw_hide == 2 + exe 'silent keepjumps '.w:netrw_bannercnt.',$v@^ /-KEEP-/ @d' + exe 'silent keepjumps '.w:netrw_bannercnt.',$s@^\%( /-KEEP-/ \)\+@@e' + endif - " cleanup any windows mess at end-of-line - silent! keepjumps %s/\r$//e - setlocal ts=32 - -" call Dret("LocalBrowseList") +" call Dret("NetListHide") endfun " --------------------------------------------------------------------- -" LocalBrowseChgDir: constructs a new directory based on the current {{{2 -" directory and a new directory name -fun! s:LocalBrowseChgDir(dirname,newdir,...) -" call Dfunc("LocalBrowseChgDir(dirname<".a:dirname."> newdir<".a:newdir.">) a:0=".a:0) +" NetHideEdit: allows user to edit the file/directory hiding list +fun! s:NetHideEdit(islocal) +" call Dfunc("NetHideEdit(islocal=".a:islocal.")") - let dirname= substitute(a:dirname,'\\','','ge') - let newdir = a:newdir + " save current cursor position + let s:nhe_curpos= getpos(".") - if dirname !~ '[\/]$' - " apparently vim is "recognizing" that it is in the home directory and - " is removing the "/". Bad idea, so I have to put it back. - let dirname= dirname.'/' -" call Decho("adjusting dirname<".dirname.">") - endif + " get new hiding list from user + call inputsave() + let newhide= input("Edit Hiding List: ",g:netrw_list_hide) + call inputrestore() + let g:netrw_list_hide= newhide +" call Decho("new g:netrw_list_hide<".g:netrw_list_hide.">") - if newdir !~ '[\/]$' - " handling a file - let dirname= dirname.newdir -" call Decho("handling a file: dirname<".dirname.">") - " this lets NetBrowseX avoid the edit - if a:0 < 1 -" call Decho("dirname<".dirname."> netrw_cd_escape<".s:netrw_cd_escape.">") -" call Decho("about to edit<".escape(dirname,s:netrw_cd_escape).">") - if g:netrw_browse_split == 1 - new - wincmd _ - elseif g:netrw_browse_split == 2 - rightb vert new - wincmd | - else - " handling a file, didn't split, so possibly remove menu - call s:NetMenu(0) - endif - exe "e! ".escape(dirname,s:netrw_cd_escape) - set ma nomod - endif + " refresh the listing + silent call s:NetRefresh(a:islocal,s:NetBrowseChgDir(a:islocal,"./")) - elseif newdir == './' - " refresh the directory list -" call Decho("refresh directory listing") + " restore cursor position + call setpos('.',s:nhe_curpos) + unlet s:nhe_curpos - elseif newdir == '../' - " go up one directory - let dirname= substitute(dirname,'^\(.*/\)\([^/]\+[\/]$\)','\1','e') -" call Decho("go up one dir: dirname<".dirname.">") +" call Dret("NetHideEdit") +endfun - else - " go down one directory - let dirname= dirname.newdir -" call Decho("go down one dir: dirname<".dirname."> newdir<".newdir.">") - endif +" --------------------------------------------------------------------- +" NetSortSequence: allows user to edit the sorting sequence +fun! s:NetSortSequence(islocal) +" call Dfunc("NetSortSequence(islocal=".a:islocal.")") -" call Dret("LocalBrowseChgDir <".dirname.">") - return dirname + call inputsave() + let newsortseq= input("Edit Sorting Sequence: ",g:netrw_sort_sequence) + call inputrestore() + + " refresh the listing + let g:netrw_sort_sequence= newsortseq + call netrw#NetSavePosn() + call s:NetRefresh(a:islocal,s:NetBrowseChgDir(a:islocal,'./')) + +" call Dret("NetSortSequence") endfun " --------------------------------------------------------------------- -" LocalBrowseShellCmdRefresh: this function is called after a user has {{{2 -" performed any shell command. The idea is to cause all local-browsing -" buffers to be refreshed after a user has executed some shell command, -" on the chance that s/he removed/created a file/directory with it. -fun! s:LocalBrowseShellCmdRefresh() -" call Dfunc("LocalBrowseShellCmdRefresh() browselist=".string(s:netrw_browselist)) - " GO through all buffers on netrw_browselist (ie. just local-netrw buffers): - " | refresh any netrw window - " | wipe out any non-displaying netrw buffer - let curwin = winnr() - let ibl = 0 - for ibuf in s:netrw_browselist - if bufwinnr(ibuf) == -1 -" call Decho("wiping buf#".ibuf) - exe "silent! bw ".ibuf - call remove(s:netrw_browselist,ibl) -" call Decho("browselist=".string(s:netrw_browselist)) - continue - else -" call Decho("refresh buf#".ibuf.'-> win#'.bufwinnr(ibuf)) - exe bufwinnr(ibuf)."wincmd w" - call s:NetRefresh(s:LocalBrowseChgDir(b:netrw_curdir,'./'),1) - endif - let ibl= ibl + 1 - endfor - exe curwin."wincmd w" - -" call Dret("LocalBrowseShellCmdRefresh") -endfun - -" --------------------------------------------------------------------- -" LocalBrowseRm: {{{2 -fun! s:LocalBrowseRm(path) range -" call Dfunc("LocalBrowseRm(path<".a:path.">)") -" call Decho("firstline=".a:firstline." lastline=".a:lastline) +" NetListStyle: {{{2 +" islocal=0: remote browsing +" =1: local browsing +fun! s:NetListStyle(islocal) +" call Dfunc("NetListStyle(islocal=".a:islocal.") w:netrw_liststyle=".w:netrw_liststyle) + let fname = s:NetGetWord() + if !exists("w:netrw_liststyle")|let w:netrw_liststyle= g:netrw_liststyle|endif + let w:netrw_liststyle = (w:netrw_liststyle + 1) % s:MAXLIST +" call Decho("fname<".fname.">") +" call Decho("chgd w:netrw_liststyle to ".w:netrw_liststyle) +" call Decho("b:netrw_curdir<".(exists("b:netrw_curdir")? b:netrw_curdir : "doesn't exist").">") - " preparation for removing multiple files/directories - let ctr = a:firstline - let ret = 0 - let all= 0 + if w:netrw_liststyle == s:THINLIST + " use one column listing +" call Decho("use one column list") + let g:netrw_list_cmd = substitute(g:netrw_list_cmd,' -l','','ge') - " remove multiple files and directories - while ctr <= a:lastline - exe "keepjumps ".ctr + elseif w:netrw_liststyle == s:LONGLIST + " use long list +" call Decho("use long list") + let g:netrw_list_cmd = g:netrw_list_cmd." -l" - " sanity checks - if line(".") < w:netrw_bannercnt - let ctr= ctr + 1 - continue - endif - let curword= s:NetGetWord() - if curword == "./" || curword == "../" - let ctr= ctr + 1 - continue - endif + elseif w:netrw_liststyle == s:WIDELIST + " give wide list +" call Decho("use wide list") + let g:netrw_list_cmd = substitute(g:netrw_list_cmd,' -l','','ge') - norm! 0 - let rmfile= a:path."/".curword -" call Decho("rmfile<".rmfile.">") + elseif w:netrw_liststyle == s:TREELIST +" call Decho("use tree list") + let g:netrw_list_cmd = substitute(g:netrw_list_cmd,' -l','','ge') - if rmfile !~ '^"' && (rmfile =~ '@$' || rmfile !~ '[\/]$') - " attempt to remove file - if !all - echohl Statement - call inputsave() - let ok= input("Confirm deletion of file<".rmfile."> ","[{y(es)},n(o),a(ll),q(uit)] ") - call inputrestore() - echohl NONE - if ok == "" - let ok="no" - endif -" call Decho("response: ok<".ok.">") - let ok= substitute(ok,'\[{y(es)},n(o),a(ll),q(uit)]\s*','','e') -" call Decho("response: ok<".ok."> (after sub)") - if ok =~ 'a\%[ll]' - let all= 1 - endif - endif + else + call netrw#ErrorMsg(s:WARNING,"bad value for g:netrw_liststyle (=".w:netrw_liststyle.")",46) + let g:netrw_liststyle = s:THINLIST + let w:netrw_liststyle = g:netrw_liststyle + let g:netrw_list_cmd = substitute(g:netrw_list_cmd,' -l','','ge') + endif + setlocal ma noro - if all || ok =~ 'y\%[es]' || ok == "" - let ret= delete(rmfile) -" call Decho("errcode=".v:shell_error." ret=".ret) - elseif ok =~ 'q\%[uit]' - break - endif + " clear buffer - this will cause NetBrowse/LocalBrowseCheck to do a refresh +" call Decho("clear buffer<".expand("%")."> with :%d") + %d - else - " attempt to remove directory - if !all - echohl Statement - call inputsave() - let ok= input("Confirm deletion of directory<".rmfile."> ","[{y(es)},n(o),a(ll),q(uit)] ") - call inputrestore() - let ok= substitute(ok,'\[{y(es)},n(o),a(ll),q(uit)]\s*','','e') - if ok == "" - let ok="no" - endif - if ok =~ 'a\%[ll]' - let all= 1 - endif - endif - let rmfile= substitute(rmfile,'[\/]$','','e') + " refresh the listing + call netrw#NetSavePosn() + call s:NetRefresh(a:islocal,s:NetBrowseChgDir(a:islocal,'./')) - if all || ok =~ 'y\%[es]' || ok == "" -" call Decho("1st attempt: system(".g:netrw_local_rmdir.' "'.rmfile.'")') - call system(g:netrw_local_rmdir.' "'.rmfile.'"') -" call Decho("v:shell_error=".v:shell_error) + " keep cursor on the filename + silent keepjumps $ + let result= search('\%(^\%(|\+\s\)\=\|\s\{2,}\)\zs'.escape(fname,'.\[]*$^').'\%(\s\{2,}\|$\)','bc') +" call Decho("search result=".result." w:netrw_bannercnt=".(exists("w:netrw_bannercnt")? w:netrw_bannercnt : 'N/A')) + if result <= 0 && exists("w:netrw_bannercnt") + exe w:netrw_bannercnt + endif - if v:shell_error != 0 -" call Decho("2nd attempt to remove directory<".rmfile.">") - let errcode= delete(rmfile) -" call Decho("errcode=".errcode) +" call Dret("NetListStyle".(exists("w:netrw_liststyle")? ' : w:netrw_liststyle='.w:netrw_liststyle : "")) +endfun - if errcode != 0 - if has("unix") -" call Decho("3rd attempt to remove directory<".rmfile.">") -call system("rm ".rmfile) - if v:shell_error != 0 && !exists("g:netrw_quiet") - echohl Error | echo "***netrw*** unable to remove directory<".rmfile."> -- is it empty?" | echohl None - call inputsave()|call input("Press to continue")|call inputrestore() -endif - elseif !exists("g:netrw_quiet") - echohl Error | echo "***netrw*** unable to remove directory<".rmfile."> -- is it empty?" | echohl None - call inputsave()|call input("Press to continue")|call inputrestore() - endif - endif - endif +" --------------------------------------------------------------------- +" NetWideListing: {{{2 +fun! s:NetWideListing() - elseif ok =~ 'q\%[uit]' - break - endif + if w:netrw_liststyle == s:WIDELIST +" call Dfunc("NetWideListing() w:netrw_liststyle=".w:netrw_liststyle.' fo='.&fo.' l:fo='.&l:fo) + " look for longest filename (cpf=characters per filename) + " cpf: characters per file + " fpl: files per line + " fpc: files per column + setlocal ma noro + let b:netrw_cpf= 0 + if line("$") >= w:netrw_bannercnt + exe 'silent keepjumps '.w:netrw_bannercnt.',$g/^./if virtcol("$") > b:netrw_cpf|let b:netrw_cpf= virtcol("$")|endif' + else +" call Dret("NetWideListing") + return endif +" call Decho("max file strlen+1=".b:netrw_cpf) + let b:netrw_cpf= b:netrw_cpf + 1 - let ctr= ctr + 1 - endwhile + " determine qty files per line (fpl) + let w:netrw_fpl= winwidth(0)/b:netrw_cpf + if w:netrw_fpl <= 0 + let w:netrw_fpl= 1 + endif +" call Decho("fpl= ".winwidth(0)."/[b:netrw_cpf=".b:netrw_cpf.']='.w:netrw_fpl) - " refresh the directory - let curline= line(".") -" call Decho("refresh the directory") - call s:NetRefresh(s:LocalBrowseChgDir(b:netrw_curdir,'./'),1) - exe curline + " make wide display + exe 'silent keepjumps '.w:netrw_bannercnt.',$s/^.*$/\=escape(printf("%-'.b:netrw_cpf.'s",submatch(0)),"\\")/' + let fpc = (line("$") - w:netrw_bannercnt + w:netrw_fpl)/w:netrw_fpl + let newcolstart = w:netrw_bannercnt + fpc + let newcolend = newcolstart + fpc - 1 +" call Decho("bannercnt=".w:netrw_bannercnt." fpl=".w:netrw_fpl." fpc=".fpc." newcol[".newcolstart.",".newcolend."]") + silent! let keepregstar = @* + while line("$") >= newcolstart + if newcolend > line("$") | let newcolend= line("$") | endif + let newcolqty= newcolend - newcolstart + exe newcolstart + if newcolqty == 0 + exe "silent keepjumps norm! 0\$hx".w:netrw_bannercnt."G$p" + else + exe "silent keepjumps norm! 0\".newcolqty.'j$hx'.w:netrw_bannercnt.'G$p' + endif + exe "silent keepjumps ".newcolstart.','.newcolend.'d' + exe 'silent keepjumps '.w:netrw_bannercnt + endwhile + silent! let @*= keepregstar + exe "silent keepjumps ".w:netrw_bannercnt.',$s/\s\+$//e' + setlocal noma nomod ro +" call Dret("NetWideListing") + endif -" call Dret("LocalBrowseRm") endfun " --------------------------------------------------------------------- -" LocalBrowseRename: rename a remote file or directory {{{2 -fun! s:LocalBrowseRename(path) range -" call Dfunc("LocalBrowseRename(path<".a:path.">)") - - " preparation for removing multiple files/directories - let ctr= a:firstline - - " attempt to rename files/directories - while ctr <= a:lastline - exe "keepjumps ".ctr - - " sanity checks - if line(".") < w:netrw_bannercnt - let ctr= ctr + 1 - continue - endif - let curword= s:NetGetWord() - if curword == "./" || curword == "../" - let ctr= ctr + 1 - continue +" NetTreeDir: determine tree directory given current cursor position {{{2 +" (full path directory with trailing slash returned) +fun! s:NetTreeDir() +" call Dfunc("NetTreeDir() curline#".line(".")."<".getline(".")."> b:netrw_curdir<".b:netrw_curdir."> tab#".tabpagenr()." win#".winnr()." buf#".bufnr("%")) + + let treedir= b:netrw_curdir +" call Decho("set initial treedir<".treedir.">") + let s:treecurpos= getpos(".") + + if w:netrw_liststyle == s:TREELIST +" call Decho("w:netrrw_liststyle is TREELIST:") +" call Decho("line#".line(".")." getline(.)<".getline('.')."> treecurpos<".string(s:treecurpos).">") + if getline('.') =~ '/$' + let treedir= substitute(getline('.'),'^\%(| \)*\([^|].\{-}\)$','\1','e') + else + let treedir= "" endif - norm! 0 - let oldname= a:path."/".curword -" call Decho("oldname<".oldname.">") +" call Decho("treedir<".treedir.">") - call inputsave() - let newname= input("Moving ".oldname." to : ",substitute(oldname,'/*$','','e')) - call inputrestore() + " detect user attempting to close treeroot + if getline('.') !~ '|' && getline('.') != '..' +" call Decho("user attempted to close treeroot") + " now force a refresh +" call Decho("clear buffer<".expand("%")."> with :%d") + keepjumps %d +" call Dret("NetTreeDir <".treedir."> : (side effect) s:treecurpos<".string(s:treecurpos).">") + return b:netrw_curdir + endif - let ret= rename(oldname,newname) -" call Decho("renaming <".oldname."> to <".newname.">") + " elide all non-depth information + let depth = substitute(getline('.'),'^\(\%(| \)*\)[^|].\{-}$','\1','e') +" call Decho("depth<".depth."> 1st subst") + + " elide first depth + let depth = substitute(depth,'^| ','','') +" call Decho("depth<".depth."> 2nd subst") + + " construct treedir by searching backwards at correct depth +" call Decho("constructing treedir<".treedir."> depth<".depth.">") + while depth != "" && search('^'.depth.'[^|].\{-}/$','bW') + let dirname= substitute(getline("."),'^\(| \)*','','e') + let treedir= dirname.treedir + let depth = substitute(depth,'^| ','','') +" call Decho("constructing treedir<".treedir.">: dirname<".dirname."> while depth<".depth.">") + endwhile + if w:netrw_treetop =~ '/$' + let treedir= w:netrw_treetop.treedir + else + let treedir= w:netrw_treetop.'/'.treedir + endif +" call Decho("bufnr(.)=".bufnr(".")." line($)=".line("$")." line(.)=".line(".")) + endif + let treedir= substitute(treedir,'//$','/','') - let ctr= ctr + 1 - endwhile +" " now force a refresh +" call Decho("clear buffer<".expand("%")."> with :%d") +" setlocal ma noro +" keepjumps %d - " refresh the directory - let curline= line(".") -" call Decho("refresh the directory listing") - call s:NetRefresh(s:LocalBrowseChgDir(b:netrw_curdir,'./'),1) - exe "keepjumps ".curline -" call Dret("LocalBrowseRename") +" call Dret("NetTreeDir <".treedir."> : (side effect) s:treecurpos<".string(s:treecurpos).">") + return treedir endfun " --------------------------------------------------------------------- -" LocalFastBrowser: handles setting up/taking down fast browsing for the {{{2 -" local browser -fun! s:LocalFastBrowser() -" call Dfunc("LocalFastBrowser()") +" NetTreeDisplay: recursive tree display {{{2 +fun! s:NetTreeDisplay(dir,depth) +" call Dfunc("NetTreeDisplay(dir<".a:dir."> depth<".a:depth.">)") - " initialize browselist, a list of buffer numbers that the local browser has used - if !exists("s:netrw_browselist") - let s:netrw_browselist= [] - endif + " insure that there are no folds + setlocal nofen - " append current buffer to fastbrowse list - if g:netrw_fastbrowse <= 1 && (empty(s:netrw_browselist) || bufnr("%") > s:netrw_browselist[-1]) - call add(s:netrw_browselist,bufnr("%")) -" call Decho("browselist=".string(s:netrw_browselist)) + " install ../ and shortdir + if a:depth == "" + call setline(line("$")+1,'../') +" call Decho("setline#".line("$")." ../ (depth is zero)") endif - - " enable autocmd events to handle refreshing/removing local browser buffers - " If local browse buffer is currently showing: refresh it - " If local browse buffer is currently hidden : wipe it - if !exists("s:netrw_browser_shellcmd") && g:netrw_fastbrowse <= 1 -" call Decho("setting up local-browser shell command refresh") - let s:netrw_browser_shellcmd= 1 - augroup AuNetrwShellCmd - au! - if (has("win32") || has("win95") || has("win64") || has("win16")) - au ShellCmdPost * call s:LocalBrowseShellCmdRefresh() - else - au ShellCmdPost,FocusGained * call s:LocalBrowseShellCmdRefresh() - endif - augroup END + if a:dir =~ '^\a\+://' + if a:dir == w:netrw_treetop + let shortdir= a:dir + else + let shortdir= substitute(a:dir,'^.*/\([^/]\+\)/$','\1/','e') + endif + call setline(line("$")+1,a:depth.shortdir) + else + let shortdir= substitute(a:dir,'^.*/','','e') + call setline(line("$")+1,a:depth.shortdir.'/') endif +" call Decho("setline#".line("$")." shortdir<".a:depth.shortdir.">") - " user must have changed fastbrowse to its fast setting, so remove - " the associated autocmd events - if g:netrw_fastbrowse > 1 && exists("s:netrw_browser_shellcmd") - unlet s:netrw_browser_shellcmd - augroup AuNetrwShellCmd - au! - augroup END - augroup! AuNetrwShellCmd + " append a / to dir if its missing one + let dir= a:dir + if dir !~ '/$' + let dir= dir.'/' endif -" call Dret("LocalFastBrowser") + " display subtrees (if any) + let depth= "| ".a:depth +" call Decho("display subtrees with depth<".depth."> and current leaves") + for entry in w:netrw_treedict[a:dir] + let direntry= substitute(dir.entry,'/$','','e') +" call Decho("dir<".dir."> entry<".entry."> direntry<".direntry.">") + if entry =~ '/$' && has_key(w:netrw_treedict,direntry) +" call Decho("<".direntry."> is a key in treedict - display subtree for it") + call s:NetTreeDisplay(direntry,depth) + elseif entry =~ '/$' && has_key(w:netrw_treedict,direntry.'/') +" call Decho("<".direntry."/> is a key in treedict - display subtree for it") + call s:NetTreeDisplay(direntry.'/',depth) + else +" call Decho("<".entry."> is not a key in treedict (no subtree)") + call setline(line("$")+1,depth.entry) + endif + endfor +" call Dret("NetTreeDisplay") endfun " --------------------------------------------------------------------- -" LocalObtain: copy selected file to current working directory {{{2 -fun! s:LocalObtain() -" call Dfunc("LocalObtain()") - if exists("b:netrw_curdir") && getcwd() != b:netrw_curdir - let fname= expand("") - let fcopy= readfile(b:netrw_curdir."/".fname,"b") - call writefile(fcopy,getcwd()."/".fname,"b") - elseif !exists("b:netrw_curdir") - echohl Error | echo "***netrw*** local browsing directory doesn't exist!" - call inputsave()|call input("Press to continue")|call inputrestore() - else - echohl Error | echo "***netrw*** local browsing directory and current directory are identical" - call inputsave()|call input("Press to continue")|call inputrestore() - endif -" call Dret("LocalObtain") -endfun - -" --------------------------------------------------------------------- -" LocalPreview: {{{2 -fun! s:LocalPreview(path) range -" call Dfunc("LocalPreview(path<".a:path.">)") - if has("quickfix") - if !isdirectory(a:path) - exe "pedit ".escape(a:path,g:netrw_fname_escape) - elseif !exists("g:netrw_quiet") - echohl WarningMsg | echo "***netrw*** sorry, cannot preview a directory such as <".a:path.">" | echohl None - call inputsave()|call input("Press to continue")|call inputrestore() +" NetTreeListing: displays tree listing from treetop on down, using NetTreeDisplay() {{{2 +fun! s:NetTreeListing(dirname) + if w:netrw_liststyle == s:TREELIST +" call Dfunc("NetTreeListing() bufname<".expand("%").">") +" call Decho("curdir<".a:dirname.">") + + " update the treetop +" call Decho("update the treetop") + if !exists("w:netrw_treetop") + let w:netrw_treetop= a:dirname +" call Decho("w:netrw_treetop<".w:netrw_treetop."> (reusing)") + elseif (w:netrw_treetop =~ ('^'.a:dirname) && strlen(a:dirname) < strlen(w:netrw_treetop)) || a:dirname !~ ('^'.w:netrw_treetop) + let w:netrw_treetop= a:dirname +" call Decho("w:netrw_treetop<".w:netrw_treetop."> (went up)") endif - elseif !exists("g:netrw_quiet") - echohl WarningMsg | echo "***netrw*** sorry, to preview your vim needs the quickfix feature compiled in" | echohl None - call inputsave()|call input("Press to continue")|call inputrestore() - endif -" call Dret("LocalPreview") -endfun - -" --------------------------------------------------------------------- -" Explore: launch the local browser in the directory of the current file {{{2 -" dosplit==0: the window will be split iff the current file has -" been modified -" dosplit==1: the window will be split before running the local -" browser -fun! netrw#Explore(indx,dosplit,style,...) -" call Dfunc("Explore(indx=".a:indx." dosplit=".a:dosplit." style=".a:style.")") - - " if dosplit or file has been modified - if a:dosplit || &modified - call s:SaveWinVars() - - if a:style == 0 " Explore, Sexplore - exe g:netrw_winsize."wincmd s" -" call Decho("style=0: Explore or Sexplore") - - elseif a:style == 1 "Explore!, Sexplore! - exe g:netrw_winsize."wincmd v" -" call Decho("style=1: Explore! or Sexplore!") - - elseif a:style == 2 " Hexplore - exe "bel ".g:netrw_winsize."wincmd s" -" call Decho("style=2: Hexplore") - - elseif a:style == 3 " Hexplore! - exe "abo ".g:netrw_winsize."wincmd s" -" call Decho("style=3: Hexplore!") - - elseif a:style == 4 " Vexplore - exe "lefta ".g:netrw_winsize."wincmd v" -" call Decho("style=4: Vexplore") - elseif a:style == 5 " Vexplore! - exe "rightb ".g:netrw_winsize."wincmd v" -" call Decho("style=5: Vexplore!") + " insure that we have at least an empty treedict + if !exists("w:netrw_treedict") + let w:netrw_treedict= {} endif - call s:CopyWinVars() - endif - norm! 0 - - if a:1 =~ '^\*/' - " Explore */pattern - let pattern= substitute(a:1,'^\*/\(.*\)$','\1','') -" call Decho("Explore */pat: a:1<".a:1."> -> pattern<".pattern.">") - elseif a:1 =~ '^\*\*//' - " Explore **//pattern - let pattern = substitute(a:1,'^\*\*//','','') - let starstarpat = 1 -" call Decho("Explore **//pat: a:1<".a:1."> -> pattern<".pattern.">") - endif - if a:1 == "" && a:indx >= 0 - " Explore Hexplore Vexplore Sexplore -" call Decho("Explore Hexplore Vexplore Sexplore") - let newdir= substitute(expand("%:p"),'^\(.*[/\\]\)[^/\\]*$','\1','e') - if newdir =~ '^scp:' || newdir =~ '^ftp:' -" call Decho("calling NetBrowse(newdir<".newdir.">)") - call s:NetBrowse(newdir) + " update the directory listing for the current directory +" call Decho("updating dictionary with ".a:dirname.":[..directory listing..]") +" call Decho("bannercnt=".w:netrw_bannercnt." line($)=".line("$")) + exe "silent! keepjumps ".w:netrw_bannercnt.',$g@^\.\.\=/$@d' + let w:netrw_treedict[a:dirname]= getline(w:netrw_bannercnt,line("$")) +" call Decho("treedict=".string(w:netrw_treedict)) + exe "silent! keepjumps ".w:netrw_bannercnt.",$d" + + " if past banner, record word + if exists("w:netrw_bannercnt") && line(".") > w:netrw_bannercnt + let fname= expand("") else - if newdir == ""|let newdir= getcwd()|endif -" call Decho("calling LocalBrowse(newdir<".newdir.">)") - call s:LocalBrowse(newdir) - endif - - elseif a:1 =~ '^\*\*/' || a:indx < 0 || a:1 =~ '^\*/' - " Nexplore, Pexplore, Explore **/... , or Explore */pattern -" call Decho("Nexplore, Pexplore, , , Explore ".a:1) - let s:didstarstar= 1 - if exists("b:netrw_curdir") - nnoremap :Pexplore - nnoremap :Nexplore + let fname= "" endif - if has("path_extra") - if !exists("w:netrw_explore_indx") - let w:netrw_explore_indx= 0 + " display from treetop on down + call s:NetTreeDisplay(w:netrw_treetop,"") + + " place cursor + if !exists("s:nbcd_curpos") + if fname != "" +" call Decho("(NetTreeListing) place cursor <".fname.">") + call search('\<'.fname.'\>','cw') + elseif exists("w:netrw_bannercnt") + exe (w:netrw_bannercnt+1) +" call Decho("(NetTreeListing) place cursor line#".(w:netrw_bannercnt+1)) endif - let indx = a:indx -" call Decho("set indx=".indx) -" - if indx == -1 - "Nexplore - if !exists("w:netrw_explore_list") " sanity check - echohl WarningMsg | echo "***netrw*** using Nexplore or improperly; see help for netrw-starstar" | echohl None - call inputsave()|call input("Press to continue")|call inputrestore() -" call Dret("Explore") - return - endif - let indx = w:netrw_explore_indx - let curfile= w:netrw_explore_list[indx] - while indx < w:netrw_explore_listlen && curfile == w:netrw_explore_list[indx] - let indx= indx + 1 -" call Decho("indx=".indx) - endwhile -" call Decho("Nexplore: indx= [w:netrw_explore_indx=".w:netrw_explore_indx."]=".indx) + endif - elseif indx == -2 - "Pexplore - if !exists("w:netrw_explore_list") " sanity check - echohl WarningMsg | echo "***netrw*** using Pexplore or improperly; see help for netrw-starstar" | echohl None - call inputsave()|call input("Press to continue")|call inputrestore() -" call Dret("Explore") - return - endif - let indx = w:netrw_explore_indx - let curfile= w:netrw_explore_list[indx] - while indx > 0 && curfile == w:netrw_explore_list[indx] - let indx= indx - 1 - endwhile -" call Decho("Pexplore: indx= [w:netrw_explore_indx=".w:netrw_explore_indx."]=".indx) +" call Dret("NetTreeListing : bufname<".expand("%").">") + endif +endfun - else - " Explore -- initialize - " build list of files to Explore with Nexplore/Pexplore -" call Decho("Explore -- initialize") - let w:netrw_explore_indx= 0 - if !exists("b:netrw_curdir") - let b:netrw_curdir= getcwd() - endif -" call Decho("b:netrw_curdir<".b:netrw_curdir.">") - if exists("pattern") -" call Decho("building list based on pattern<".pattern."> cwd<".getcwd().">") - if exists("starstarpat") - exe "vimgrep /".pattern."/gj "."**/*" - let s:netrw_curdir= b:netrw_curdir - let w:netrw_explore_list = map(getqflist(),'s:netrw_curdir."/".bufname(v:val.bufnr)') - else - exe "vimgrep /".pattern."/gj ".b:netrw_curdir."/*" - if (has("win32") || has("win95") || has("win64") || has("win16")) - let w:netrw_explore_list = map(getqflist(),'bufname(v:val.bufnr)') - else - let w:netrw_explore_list = map(getqflist(),'b:netrw_curdir.bufname(v:val.bufnr)') - endif - endif - else -" call Decho("building list based on ".b:netrw_curdir."/".a:1) - let w:netrw_explore_list= split(expand(b:netrw_curdir."/".a:1),'\n') - endif +" --------------------------------------------------------------------- +" NetSaveWordPosn: used by the "s" command in both remote and local {{{2 +" browsing. Along with NetRestoreWordPosn(), it keeps the cursor on +" the same word even though the sorting has changed its order of appearance. +fun! s:NetSaveWordPosn() +" call Dfunc("NetSaveWordPosn()") + let s:netrw_saveword= '^'.escape(getline("."),s:netrw_cd_escape).'$' +" call Dret("NetSaveWordPosn : saveword<".s:netrw_saveword.">") +endfun - let w:netrw_explore_listlen = len(w:netrw_explore_list) -" call Decho("w:netrw_explore_list<".string(w:netrw_explore_list)."> listlen=".w:netrw_explore_listlen) +" --------------------------------------------------------------------- +" NetRestoreWordPosn: used by the "s" command; see NetSaveWordPosn() above {{{2 +fun! s:NetRestoreWordPosn() +" call Dfunc("NetRestoreWordPosn()") + silent! call search(s:netrw_saveword,'w') +" call Dret("NetRestoreWordPosn") +endfun - if w:netrw_explore_listlen == 1 && w:netrw_explore_list[0] =~ '\*\*\/' - echohl WarningMsg | echo "***netrw*** no files matched" | echohl None - call inputsave()|call input("Press to continue")|call inputrestore() -" call Dret("Explore") - return - endif - endif +" --------------------------------------------------------------------- +" NetMakeDir: this function makes a directory (both local and remote) {{{2 +fun! s:NetMakeDir(usrhost) +" call Dfunc("NetMakeDir(usrhost<".a:usrhost.">)") - " NetrwStatusLine support - for exploring support - let w:netrw_explore_indx= indx -" call Decho("explorelist<".join(w:netrw_explore_list,',')."> len=".w:netrw_explore_listlen) + " get name of new directory from user. A bare will skip. + " if its currently a directory, also request will be skipped, but with + " a message. + call inputsave() + let newdirname= input("Please give directory name: ") + call inputrestore() +" call Decho("newdirname<".newdirname.">") - " sanity check - if indx >= w:netrw_explore_listlen || indx < 0 - let indx= (indx < 0)? 0 : ( w:netrw_explore_listlen - 1 ) - echohl WarningMsg | echo "***netrw*** no more files match Explore pattern" | echohl None - call inputsave()|call input("Press to continue")|call inputrestore() -" call Dret("Explore") - return - endif + if newdirname == "" +" call Dret("NetMakeDir : user aborted with bare ") + return + endif - exe "let dirfile= w:netrw_explore_list[".indx."]" -" call Decho("dirfile=w:netrw_explore_list[indx=".indx."]= <".dirfile.">") - let newdir= substitute(dirfile,'/[^/]*$','','e') -" call Decho("newdir<".newdir.">") + if a:usrhost == "" -" call Decho("calling LocalBrowse(newdir<".newdir.">)") - call s:LocalBrowse(newdir) - if w:netrw_longlist == 0 || w:netrw_longlist == 1 - call search('^'.substitute(dirfile,"^.*/","","").'\>',"W") - else - call search('\<'.substitute(dirfile,"^.*/","","").'\>',"w") + " Local mkdir: + " sanity checks + let fullnewdir= b:netrw_curdir.'/'.newdirname +" call Decho("fullnewdir<".fullnewdir.">") + if isdirectory(fullnewdir) + if !exists("g:netrw_quiet") + call netrw#ErrorMsg(s:WARNING,"<".newdirname."> is already a directory!",24) endif - let w:netrw_explore_mtchcnt = indx + 1 - let w:netrw_explore_bufnr = bufnr("%") - let w:netrw_explore_line = line(".") - call s:SetupNetrwStatusLine('%f %h%m%r%=%9*%{NetrwStatusLine()}') -" call Decho("explore: mtchcnt=".w:netrw_explore_mtchcnt." bufnr=".w:netrw_explore_bufnr." line#".w:netrw_explore_line) +" call Dret("NetMakeDir : directory<".newdirname."> exists previously") + return + endif + if s:FileReadable(fullnewdir) + if !exists("g:netrw_quiet") + call netrw#ErrorMsg(s:WARNING,"<".newdirname."> is already a file!",25) + endif +" call Dret("NetMakeDir : file<".newdirname."> exists previously") + return + endif + " requested new local directory is neither a pre-existing file or + " directory, so make it! + if exists("*mkdir") + call mkdir(fullnewdir,"p") else - if !exists("g:netrw_quiet") - echohl WarningMsg | echo "***netrw*** your vim needs the +path_extra feature for Exploring with **!" | echohl None | echohl None + let netrw_origdir= s:NetGetcwd(1) + exe 'keepjumps cd '.b:netrw_curdir +" call Decho("netrw_origdir<".netrw_origdir.">: cd b:netrw_curdir<".b:netrw_curdir.">") +" call Decho("exe silent! !".g:netrw_local_mkdir.' '.g:netrw_shq.newdirname.g:netrw_shq) + exe "silent! !".g:netrw_local_mkdir.' '.g:netrw_shq.newdirname.g:netrw_shq + if !g:netrw_keepdir | exe 'keepjumps cd '.netrw_origdir | endif + if !g:netrw_keepdir + exe 'keepjumps cd '.netrw_origdir +" call Decho("netrw_keepdir=".g:netrw_keepdir.": cd ".netrw_origdir) endif - call inputsave()|call input("Press to continue")|call inputrestore() endif + if v:shell_error == 0 + " refresh listing +" call Decho("refresh listing") + call netrw#NetSavePosn() + call s:NetRefresh(1,s:NetBrowseChgDir(1,'./')) + elseif !exists("g:netrw_quiet") + call netrw#ErrorMsg(s:ERROR,"unable to make directory<".newdirname.">",26) + endif + redraw! + else -" call Decho("Explore newdir<".a:1.">") - let newdir= a:1 - call s:LocalBrowse(newdir) + " Remote mkdir: + let mkdircmd = s:MakeSshCmd(g:netrw_mkdir_cmd) + let newdirname= substitute(b:netrw_curdir,'^\%(.\{-}/\)\{3}\(.*\)$','\1','').newdirname +" call Decho("exe silent! !".mkdircmd." ".g:netrw_shq.newdirname.g:netrw_shq) + exe "silent! !".mkdircmd." ".g:netrw_shq.newdirname.g:netrw_shq + if v:shell_error == 0 + " refresh listing + call netrw#NetSavePosn() + call s:NetRefresh(0,s:NetBrowseChgDir(0,'./')) + elseif !exists("g:netrw_quiet") + call netrw#ErrorMsg(s:ERROR,"unable to make directory<".newdirname.">",27) + endif + redraw! endif -" call Dret("Explore") +" call Dret("NetMakeDir") endfun " --------------------------------------------------------------------- -" SetupNetrwStatusLine: {{{2 -fun! s:SetupNetrwStatusLine(statline) -" call Dfunc("SetupNetrwStatusLine(statline<".a:statline.">)") +" NetBookmarkDir: {{{2 +" 0: (user: ) bookmark current directory +" 1: (user: ) change to the bookmarked directory +" 2: (user: ) list bookmarks +" 3: (browsing) record current directory history +" 4: (user: ) go up (previous) bookmark +" 5: (user: ) go down (next) bookmark +fun! s:NetBookmarkDir(chg,curdir) +" call Dfunc("NetBookmarkDir(chg=".a:chg." curdir<".a:curdir.">) cnt=".v:count." bookmarkcnt=".g:NETRW_BOOKMARKMAX." histcnt=".g:NETRW_DIRHIST_CNT." bookmax=".g:NETRW_BOOKMARKMAX." histmax=".g:netrw_dirhistmax) - if !exists("s:netrw_setup_statline") - let s:netrw_setup_statline= 1 -" call Decho("do first-time status line setup") + if a:chg == 0 + " bookmark the current directory +" call Decho("(user: ) bookmark the current directory") + if v:count > 0 + " handle bookmark# specified via the count + let g:NETRW_BOOKMARKDIR_{v:count}= a:curdir + if !exists("g:NETRW_BOOKMARKMAX") + let g:NETRW_BOOKMARKMAX= v:count + elseif v:count > g:NETRW_BOOKMARKMAX + let g:NETRW_BOOKMARKMAX= v:count + endif + else + " handle no count specified + let g:NETRW_BOOKMARKMAX = g:NETRW_BOOKMARKMAX + 1 + let g:NETRW_BOOKMARKDIR_{g:NETRW_BOOKMARKMAX} = a:curdir + endif + echo "bookmarked the current directory" - if !exists("s:netrw_users_stl") - let s:netrw_users_stl= &stl + elseif a:chg == 1 + " change to the bookmarked directory +" call Decho("(user: ) change to the bookmarked directory") + if exists("g:NETRW_BOOKMARKDIR_{v:count}") + exe "e ".g:NETRW_BOOKMARKDIR_{v:count} + else + echomsg "Sorry, bookmark#".v:count." doesn't exist!" endif - if !exists("s:netrw_users_ls") - let s:netrw_users_ls= &laststatus + + elseif a:chg == 2 + redraw! + let didwork= 0 + " list user's bookmarks +" call Decho("(user: ) list user's bookmarks") + if exists("g:NETRW_BOOKMARKMAX") +" call Decho("list bookmarks [0,".g:NETRW_BOOKMARKMAX."]") + let cnt= 0 + while cnt <= g:NETRW_BOOKMARKMAX + if exists("g:NETRW_BOOKMARKDIR_{cnt}") +" call Decho("Netrw Bookmark#".cnt.": ".g:NETRW_BOOKMARKDIR_{cnt}) + echo "Netrw Bookmark#".cnt.": ".g:NETRW_BOOKMARKDIR_{cnt} + let didwork= 1 + endif + let cnt= cnt + 1 + endwhile endif - " set up User9 highlighting as needed - let keepa= @a - redir @a - try - hi User9 - catch /^Vim\%((\a\+)\)\=:E411/ - if &bg == "dark" - hi User9 ctermfg=yellow ctermbg=blue guifg=yellow guibg=blue - else - hi User9 ctermbg=yellow ctermfg=blue guibg=yellow guifg=blue + " list directory history + let cnt = g:NETRW_DIRHIST_CNT + let first = 1 + let histcnt = 0 + while ( first || cnt != g:NETRW_DIRHIST_CNT ) +" call Decho("first=".first." cnt=".cnt." dirhist_cnt=".g:NETRW_DIRHIST_CNT) + let histcnt= histcnt + 1 + if exists("g:NETRW_DIRHIST_{cnt}") +" call Decho("Netrw History#".histcnt.": ".g:NETRW_DIRHIST_{cnt}) + echo "Netrw History#".histcnt.": ".g:NETRW_DIRHIST_{cnt} + let didwork= 1 endif - endtry - redir END - let @a= keepa - endif + let first = 0 + let cnt = ( cnt - 1 ) % g:netrw_dirhistmax + if cnt < 0 + let cnt= cnt + g:netrw_dirhistmax + endif + endwhile + if didwork + call inputsave()|call input("Press to continue")|call inputrestore() + endif - " set up status line (may use User9 highlighting) - " insure that windows have a statusline - " make sure statusline is displayed - let &stl=a:statline - set laststatus=2 -" call Decho("stl=".&stl) - redraw! + elseif a:chg == 3 + " saves most recently visited directories (when they differ) +" call Decho("(browsing) record curdir history") + if !exists("g:NETRW_DIRHIST_0") || g:NETRW_DIRHIST_{g:NETRW_DIRHIST_CNT} != a:curdir + let g:NETRW_DIRHIST_CNT= ( g:NETRW_DIRHIST_CNT + 1 ) % g:netrw_dirhistmax +" let g:NETRW_DIRHIST_{g:NETRW_DIRHIST_CNT}= substitute(a:curdir,'[/\\]$','','e') + let g:NETRW_DIRHIST_{g:NETRW_DIRHIST_CNT}= a:curdir +" call Decho("save dirhist#".g:NETRW_DIRHIST_CNT."<".g:NETRW_DIRHIST_{g:NETRW_DIRHIST_CNT}.">") + endif -" call Dret("SetupNetrwStatusLine : stl=".&stl) + elseif a:chg == 4 + " u: change to the previous directory stored on the history list +" call Decho("(user: ) chg to prev dir from history") + let g:NETRW_DIRHIST_CNT= ( g:NETRW_DIRHIST_CNT - 1 ) % g:netrw_dirhistmax + if g:NETRW_DIRHIST_CNT < 0 + let g:NETRW_DIRHIST_CNT= g:NETRW_DIRHIST_CNT + g:netrw_dirhistmax + endif + if exists("g:NETRW_DIRHIST_{g:NETRW_DIRHIST_CNT}") +" call Decho("changedir u#".g:NETRW_DIRHIST_CNT."<".g:NETRW_DIRHIST_{g:NETRW_DIRHIST_CNT}.">") + if exists("w:netrw_liststyle") && w:netrw_liststyle == s:TREELIST && exists("b:netrw_curdir") + setlocal ma noro + %d + setlocal nomod + endif +" call Decho("exe e! ".g:NETRW_DIRHIST_{g:NETRW_DIRHIST_CNT}) + exe "e! ".g:NETRW_DIRHIST_{g:NETRW_DIRHIST_CNT} + else + let g:NETRW_DIRHIST_CNT= ( g:NETRW_DIRHIST_CNT + 1 ) % g:netrw_dirhistmax + echo "Sorry, no predecessor directory exists yet" + endif + + elseif a:chg == 5 + " U: change to the subsequent directory stored on the history list +" call Decho("(user: ) chg to next dir from history") + let g:NETRW_DIRHIST_CNT= ( g:NETRW_DIRHIST_CNT + 1 ) % g:netrw_dirhistmax + if exists("g:NETRW_DIRHIST_{g:NETRW_DIRHIST_CNT}") +" call Decho("changedir U#".g:NETRW_DIRHIST_CNT."<".g:NETRW_DIRHIST_{g:NETRW_DIRHIST_CNT}.">") + if exists("w:netrw_liststyle") && w:netrw_liststyle == s:TREELIST && exists("b:netrw_curdir") + setlocal ma noro + %d + setlocal nomod + endif +" call Decho("exe e! ".g:NETRW_DIRHIST_{g:NETRW_DIRHIST_CNT}) + exe "e! ".g:NETRW_DIRHIST_{g:NETRW_DIRHIST_CNT} + else + let g:NETRW_DIRHIST_CNT= ( g:NETRW_DIRHIST_CNT - 1 ) % g:netrw_dirhistmax + if g:NETRW_DIRHIST_CNT < 0 + let g:NETRW_DIRHIST_CNT= g:NETRW_DIRHIST_CNT + g:netrw_dirhistmax + endif + echo "Sorry, no successor directory exists yet" + endif + endif + call s:NetBookmarkMenu() +" call Dret("NetBookmarkDir") endfun " --------------------------------------------------------------------- -" NetrwStatusLine: {{{2 -fun! NetrwStatusLine() +" NetBookmarkMenu: {{{2 +fun! s:NetBookmarkMenu() + if !exists("s:netrw_menucnt") + return + endif +" call Dfunc("NetBookmarkMenu() bookmarkcnt=".g:NETRW_BOOKMARKMAX." histcnt=".g:NETRW_DIRHIST_CNT." menucnt=".s:netrw_menucnt) + if has("menu") && has("gui_running") && &go =~ 'm' + if exists("g:NetrwTopLvlMenu") + exe 'silent! unmenu '.g:NetrwTopLvlMenu.'Bookmark' + endif - " vvv NetrwStatusLine() debugging vvv -" let g:stlmsg="" -" if !exists("w:netrw_explore_bufnr") -" let g:stlmsg="!X" -" elseif w:netrw_explore_bufnr != bufnr("%") -" let g:stlmsg="explore_bufnr!=".bufnr("%") -" endif -" if !exists("w:netrw_explore_line") -" let g:stlmsg=" !X" -" elseif w:netrw_explore_line != line(".") -" let g:stlmsg=" explore_line!={line(.)<".line(".").">" -" endif -" if !exists("w:netrw_explore_list") -" let g:stlmsg=" !X" -" endif - " ^^^ NetrwStatusLine() debugging ^^^ + " show bookmarked places + let cnt = 0 + while cnt <= g:NETRW_BOOKMARKMAX + if exists("g:NETRW_BOOKMARKDIR_{cnt}") + let bmdir= escape(g:NETRW_BOOKMARKDIR_{cnt},'.') +" call Decho('silent! menu '.g:NetrwMenuPriority.".2.".cnt." ".g:NetrwTopLvlMenu.'Bookmark.'.bmdir.' :e '.g:NETRW_BOOKMARKDIR_{cnt}) + exe 'silent! menu '.g:NetrwMenuPriority.".2.".cnt." ".g:NetrwTopLvlMenu.'Bookmarks.'.bmdir.' :e '.g:NETRW_BOOKMARKDIR_{cnt}."\" + endif + let cnt= cnt + 1 + endwhile - if !exists("w:netrw_explore_bufnr") || w:netrw_explore_bufnr != bufnr("%") || !exists("w:netrw_explore_line") || w:netrw_explore_line != line(".") || !exists("w:netrw_explore_list") - " restore user's status line - let &stl = s:netrw_users_stl - let &laststatus = s:netrw_users_ls - if exists("w:netrw_explore_bufnr")|unlet w:netrw_explore_bufnr|endif - if exists("w:netrw_explore_line")|unlet w:netrw_explore_line|endif - return "" - else - return "Match ".w:netrw_explore_mtchcnt." of ".w:netrw_explore_listlen + " show directory browsing history + let cnt = g:NETRW_DIRHIST_CNT + let first = 1 + let histcnt = 0 + while ( first || cnt != g:NETRW_DIRHIST_CNT ) + let histcnt = histcnt + 1 + let priority = g:NETRW_DIRHIST_CNT + histcnt + if exists("g:NETRW_DIRHIST_{cnt}") + let bmdir= escape(g:NETRW_DIRHIST_{cnt},'.') +" call Decho('silent! menu '.g:NetrwMenuPriority.".3.".priority." ".g:NetrwTopLvlMenu.'History.'.bmdir.' :e '.g:NETRW_DIRHIST_{cnt}) + exe 'silent! menu '.g:NetrwMenuPriority.".3.".priority." ".g:NetrwTopLvlMenu.'History.'.bmdir.' :e '.g:NETRW_DIRHIST_{cnt}."\" + endif + let first = 0 + let cnt = ( cnt - 1 ) % g:netrw_dirhistmax + if cnt < 0 + let cnt= cnt + g:netrw_dirhistmax + endif + endwhile endif +" call Dret("NetBookmarkMenu") endfun " --------------------------------------------------------------------- -" NetGetcwd: get the current directory. {{{2 -" Change backslashes to forward slashes, if any. -" If doesc is true, escape certain troublesome characters -fun! s:NetGetcwd(doesc) -" call Dfunc("NetGetcwd(doesc=".a:doesc.")") - let curdir= substitute(getcwd(),'\\','/','ge') - if curdir !~ '[\/]$' - let curdir= curdir.'/' - endif - if a:doesc - let curdir= escape(curdir,s:netrw_cd_escape) +" NetObtain: obtain file under cursor (for remote browsing support) {{{2 +fun! netrw#NetObtain(vismode,...) range +" call Dfunc("NetObtain(vismode=".a:vismode.") a:0=".a:0) + + if a:vismode == 0 + " normal mode + let fname= expand("") +" call Decho("no arguments, use <".fname.">") + elseif a:vismode == 1 + " visual mode + let keeprega = @a + norm! gv"ay + if g:netrw_liststyle == s:THINLIST + " thin listing + let filelist= split(@a,'\n') + elseif g:netrw_liststyle == s:LONGLIST + " long listing + let filelist= split(substitute(@a,'\t.\{-}\n','\n','g'),'\n') + else + " wide listing + let filelist = split(substitute(@a,'\s\{2,}','\n','g'),'\n') + let filelist = map(filelist,'substitute(v:val,"^\\s\\+","","")') + let filelist = map(filelist,'substitute(v:val,"\\s\\+$","","")') + endif +" call Decho("filelist<".string(filelist).">") + let @a= keeprega + for f in filelist + if f != "" + call netrw#NetObtain(2,f) + endif + endfor +" call Dret("NetObtain : visual mode handler") + return + elseif a:vismode == 2 + " multiple file mode + let fname= a:1 +" call Decho("visual mode handling: <".fname.">") endif -" call Dret("NetGetcwd <".curdir.">") - return curdir -endfun -" --------------------------------------------------------------------- -" NetMethod: determine method of transfer {{{2 -" method == 1: rcp -" 2: ftp + <.netrc> -" 3: ftp + machine, id, password, and [path]filename -" 4: scp -" 5: http (wget) -" 6: cadaver -" 7: rsync -" 8: fetch -" 9: sftp -fun! s:NetMethod(choice) " globals: method machine id passwd fname -" call Dfunc("NetMethod(a:choice<".a:choice.">)") + " NetrwStatusLine support - for obtaining support + call s:SetupNetrwStatusLine('%f %h%m%r%=%9*Obtaining '.fname) - " initialization - let b:netrw_method = 0 - let g:netrw_machine = "" - let b:netrw_fname = "" - let g:netrw_port = "" - let g:netrw_choice = a:choice + if exists("w:netrw_method") && w:netrw_method =~ '[235]' +" call Decho("method=".w:netrw_method) + if executable("ftp") +" call Decho("ftp is executable, method=".w:netrw_method) + let curdir = b:netrw_curdir + let path = substitute(curdir,'ftp://[^/]\+/','','e') + let curline= line(".") + let endline= line("$")+1 + setlocal ma noro + keepjumps $ +" call Decho("getcwd<".getcwd().">") +" call Decho("curdir<".curdir.">") +" call Decho("path<".path.">") +" call Decho("curline=".curline) +" call Decho("endline=".endline) - " Patterns: - " mipf : a:machine a:id password filename Use ftp - " mf : a:machine filename Use ftp + <.netrc> or g:netrw_uid g:netrw_passwd - " ftpurm : ftp://[user@]host[[#:]port]/filename Use ftp + <.netrc> or g:netrw_uid g:netrw_passwd - " rcpurm : rcp://[user@]host/filename Use rcp - " rcphf : [user@]host:filename Use rcp - " scpurm : scp://[user@]host[[#:]port]/filename Use scp - " httpurm : http://[user@]host/filename Use wget - " davurm : [s]dav://host[:port]/path Use cadaver - " rsyncurm : rsync://host[:port]/path Use rsync - " fetchurm : fetch://[user@]host[:http]/filename Use fetch (defaults to ftp, override for http) - " sftpurm : sftp://[user@]host/filename Use scp - let mipf = '^\(\S\+\)\s\+\(\S\+\)\s\+\(\S\+\)\s\+\(\S\+\)$' - let mf = '^\(\S\+\)\s\+\(\S\+\)$' - let ftpurm = '^ftp://\(\([^/@]\{-}\)@\)\=\([^/#:]\{-}\)\([#:]\d\+\)\=/\(.*\)$' - let rcpurm = '^rcp://\%(\([^/@]\{-}\)@\)\=\([^/]\{-}\)/\(.*\)$' - let rcphf = '^\(\(\h\w*\)@\)\=\(\h\w*\):\([^@]\+\)$' - let scpurm = '^scp://\([^/#:]\+\)\%([#:]\(\d\+\)\)\=/\(.*\)$' - let httpurm = '^http://\([^/]\{-}\)\(/.*\)\=$' - let davurm = '^s\=dav://\([^/]\+\)/\(.*/\)\([-_.~[:alnum:]]\+\)$' - let rsyncurm = '^rsync://\([^/]\{-}\)/\(.*\)\=$' - let fetchurm = '^fetch://\(\([^/@]\{-}\)@\)\=\([^/#:]\{-}\)\(:http\)\=/\(.*\)$' - let sftpurm = '^sftp://\([^/]\{-}\)/\(.*\)\=$' + "......................................... + if w:netrw_method == 2 + " ftp + <.netrc>: Method #2 + setlocal ff=unix + if path != "" + put ='cd '.path +" call Decho("ftp: cd ".path) + endif + put ='get '.fname +" call Decho("ftp: get ".fname) + put ='quit' +" call Decho("ftp: quit") + if exists("g:netrw_port") && g:netrw_port != "" +" call Decho("exe ".g:netrw_silentxfer.endline.",$!".g:netrw_ftp_cmd." -i ".g:netrw_machine." ".g:netrw_port) + exe g:netrw_silentxfer.endline.",$!".g:netrw_ftp_cmd." -i ".g:netrw_machine." ".g:netrw_port + else +" call Decho("exe ".g:netrw_silentxfer.endline.",$!".g:netrw_ftp_cmd." -i ".g:netrw_machine) + exe g:netrw_silentxfer.endline.",$!".g:netrw_ftp_cmd." -i ".g:netrw_machine + endif -" call Decho("determine method:") - " Determine Method - " rcp://user@hostname/...path-to-file - if match(a:choice,rcpurm) == 0 -" call Decho("rcp://...") - let b:netrw_method = 1 - let userid = substitute(a:choice,rcpurm,'\1',"") - let g:netrw_machine = substitute(a:choice,rcpurm,'\2',"") - let b:netrw_fname = substitute(a:choice,rcpurm,'\3',"") - if userid != "" - let g:netrw_uid= userid + "......................................... + elseif w:netrw_method == 3 + " ftp + machine,id,passwd,filename: Method #3 + setlocal ff=unix + if exists("g:netrw_port") && g:netrw_port != "" + put ='open '.g:netrw_machine.' '.g:netrw_port +" call Decho('ftp: open '.g:netrw_machine.' '.g:netrw_port) + else + put ='open '.g:netrw_machine +" call Decho('ftp: open '.g:netrw_machine) + endif + + if exists("g:netrw_ftp") && g:netrw_ftp == 1 + put =g:netrw_uid + put ='\"'.g:netrw_passwd.'\"' +" call Decho('ftp: g:netrw_uid') +" call Decho('ftp: g:netrw_passwd') + else + put ='user \"'.g:netrw_uid.'\" \"'.g:netrw_passwd.'\"' +" call Decho('user '.g:netrw_uid.' '.g:netrw_passwd) + endif + + if path != "" + put ='cd '.path +" call Decho('cd '.a:path) endif + put ='get '.fname +" call Decho("ftp: get ".fname) + put ='quit' +" call Decho("ftp: quit") - " scp://user@hostname/...path-to-file - elseif match(a:choice,scpurm) == 0 -" call Decho("scp://...") - let b:netrw_method = 4 - let g:netrw_machine = substitute(a:choice,scpurm,'\1',"") - let g:netrw_port = substitute(a:choice,scpurm,'\2',"") - let b:netrw_fname = substitute(a:choice,scpurm,'\3',"") + " perform ftp: + " -i : turns off interactive prompting from ftp + " -n unix : DON'T use <.netrc>, even though it exists + " -n win32: quit being obnoxious about password +" call Decho("exe ".g:netrw_silentxfer.curline.",$!".g:netrw_ftp_cmd." -i -n") + exe g:netrw_silentxfer.endline.",$!".g:netrw_ftp_cmd." -i -n" + + "......................................... + else + call netrw#ErrorMsg(s:WARNING,"unable to comply with your request<" . choice . ">",28) + endif + " restore + exe "silent! ".endline.",$d" + exe "keepjumps ".curline + setlocal noma nomod ro + else +" call Decho("ftp not executable") + if !exists("g:netrw_quiet") + call netrw#ErrorMsg(s:ERROR,"this system doesn't support ftp",29) + endif + " restore status line + let &stl = s:netrw_users_stl + let &laststatus = s:netrw_users_ls + " restore NetMethod + if exists("keep_netrw_method") + call s:NetMethod(keep_netrw_choice) + let w:netrw_method = keep_netrw_wmethod + endif +" call Dret("NetObtain") + return + endif + + "......................................... + else + " scp: Method#4 +" call Decho("using scp") + let curdir = b:netrw_curdir + let path = substitute(curdir,'scp://[^/]\+/','','e') +" call Decho("path<".path.">") + if exists("g:netrw_port") && g:netrw_port != "" + let useport= " -P ".g:netrw_port + else + let useport= "" + endif +" call Decho("executing: !".g:netrw_scp_cmd.useport." ".g:netrw_machine.":".path.escape(fname,' ?&')." .") + exe g:netrw_silentxfer."!".g:netrw_scp_cmd.useport." ".g:netrw_machine.":".path.escape(fname,' ?&')." ." + endif + endif + + " restore status line + let &stl = s:netrw_users_stl + let &laststatus = s:netrw_users_ls + redraw! + + " restore NetMethod + if exists("keep_netrw_method") + call s:NetMethod(keep_netrw_choice) + let w:netrw_method = keep_netrw_wmethod + endif + +" call Dret("NetObtain") +endfun + +" --------------------------------------------------------------------- +" NetPrevWinOpen: open file/directory in previous window. {{{2 +" If there's only one window, then the window will first be split. +fun! s:NetPrevWinOpen(islocal) +" call Dfunc("NetPrevWinOpen(islocal=".a:islocal.")") + + " get last window number and the word currently under the cursor + let lastwinnr = winnr("$") + let curword = s:NetGetWord() +" call Decho("lastwinnr=".lastwinnr." curword<".curword.">") + + let didsplit = 0 + if lastwinnr == 1 + " if only one window, open a new one first +" call Decho("only one window, so open a new one (g:netrw_alto=".g:netrw_alto.")") + exe (g:netrw_alto? "bel " : "abo ").g:netrw_winsize."wincmd s" + let didsplit = 1 + + else + wincmd p + " if the previous window's buffer has been changed (is modified), + " and it doesn't appear in any other extant window, then ask the + " user if s/he wants to abandon modifications therein. + let bnr = winbufnr(0) + let bnrcnt = 0 + if &mod + windo if winbufnr(0) == bnr | let bnrcnt=bnrcnt+1 | endif +" call Decho("bnr=".bnr." bnrcnt=".bnrcnt) + if bnrcnt == 1 + let bufname= bufname(winbufnr(winnr())) + let choice= confirm("Save modified file<".bufname.">?","&Yes\n&No\n&Cancel") + + if choice == 1 + " Yes -- write file & then browse + let v:errmsg= "" + silent w + if v:errmsg != "" + call netrw#ErrorMsg(s:ERROR,"unable to write <".bufname.">!",30) + if didsplit + q + else + wincmd p + endif +" call Dret("NetPrevWinOpen : unable to write <".bufname.">") + return + endif + + elseif choice == 2 + " No -- don't worry about changed file, just browse anyway + setlocal nomod + call netrw#ErrorMsg(s:WARNING,bufname." changes abandoned",31) + + else + " Cancel -- don't do this + if didsplit + q + else + wincmd p + endif +" call Dret("NetPrevWinOpen : cancelled") + return + endif + endif + endif + endif + + if a:islocal + call netrw#LocalBrowseCheck(s:NetBrowseChgDir(a:islocal,curword)) + else + call s:NetBrowse(a:islocal,s:NetBrowseChgDir(a:islocal,curword)) + endif +" call Dret("NetPrevWinOpen") +endfun + +" --------------------------------------------------------------------- +" NetMenu: generates the menu for gvim and netrw {{{2 +fun! s:NetMenu(domenu) + + if !exists("g:NetrwMenuPriority") + let g:NetrwMenuPriority= 80 + endif + + if has("menu") && has("gui_running") && &go =~ 'm' && g:netrw_menu +" call Dfunc("NetMenu(domenu=".a:domenu.")") + + if !exists("s:netrw_menu_enabled") && a:domenu +" call Decho("initialize menu") + let s:netrw_menu_enabled= 1 + exe 'silent! menu '.g:NetrwMenuPriority.'.1 '.g:NetrwTopLvlMenu.'Help ' + call s:NetBookmarkMenu() " provide some history! + exe 'silent! menu '.g:NetrwMenuPriority.'.4 '.g:NetrwTopLvlMenu.'Go\ Up\ Directory- -' + exe 'silent! menu '.g:NetrwMenuPriority.'.5 '.g:NetrwTopLvlMenu.'Apply\ Special\ Viewerx x' + exe 'silent! menu '.g:NetrwMenuPriority.'.6 '.g:NetrwTopLvlMenu.'Bookmark\ Current\ Directorymb mb' + exe 'silent! menu '.g:NetrwMenuPriority.'.7 '.g:NetrwTopLvlMenu.'Goto\ Bookmarked\ Directorygb gb' + exe 'silent! menu '.g:NetrwMenuPriority.'.8 '.g:NetrwTopLvlMenu.'Change\ To\ Recently\ Used\ Directoryu u' + exe 'silent! menu '.g:NetrwMenuPriority.'.9 '.g:NetrwTopLvlMenu.'Change\ To\ Subsequently\ Used\ DirectoryU U' + exe 'silent! menu '.g:NetrwMenuPriority.'.10 '.g:NetrwTopLvlMenu.'Delete\ File/DirectoryD D' + exe 'silent! menu '.g:NetrwMenuPriority.'.11 '.g:NetrwTopLvlMenu.'Edit\ File\ Hiding\ List'." \" + exe 'silent! menu '.g:NetrwMenuPriority.'.12 '.g:NetrwTopLvlMenu.'Edit\ File/Directory '."\" + exe 'silent! menu '.g:NetrwMenuPriority.'.13 '.g:NetrwTopLvlMenu.'Edit\ File/Directory,\ New\ Windowo o' + exe 'silent! menu '.g:NetrwMenuPriority.'.14 '.g:NetrwTopLvlMenu.'Edit\ File/Directory,\ New\ Vertical\ Windowv v' + exe 'silent! menu '.g:NetrwMenuPriority.'.15 '.g:NetrwTopLvlMenu.'List\ Bookmarks\ and\ Historyq q' + exe 'silent! menu '.g:NetrwMenuPriority.'.16 '.g:NetrwTopLvlMenu.'Listing\ Style\ (thin-long-wide)i i' + exe 'silent! menu '.g:NetrwMenuPriority.'.17 '.g:NetrwTopLvlMenu.'Make\ Subdirectoryd d' + exe 'silent! menu '.g:NetrwMenuPriority.'.18 '.g:NetrwTopLvlMenu.'Normal-Hide-Showa a' + exe 'silent! menu '.g:NetrwMenuPriority.'.19 '.g:NetrwTopLvlMenu.'Obtain\ FileO O' + exe 'silent! menu '.g:NetrwMenuPriority.'.20 '.g:NetrwTopLvlMenu.'Preview\ File/Directoryp p' + exe 'silent! menu '.g:NetrwMenuPriority.'.21 '.g:NetrwTopLvlMenu.'Previous\ Window\ BrowserP P' + exe 'silent! menu '.g:NetrwMenuPriority.'.22 '.g:NetrwTopLvlMenu.'Refresh\ Listing'." \" + exe 'silent! menu '.g:NetrwMenuPriority.'.23 '.g:NetrwTopLvlMenu.'Rename\ File/DirectoryR R' + exe 'silent! menu '.g:NetrwMenuPriority.'.24 '.g:NetrwTopLvlMenu.'Reverse\ Sorting\ Order'."r r" + exe 'silent! menu '.g:NetrwMenuPriority.'.25 '.g:NetrwTopLvlMenu.'Select\ Sorting\ Styles s' + exe 'silent! menu '.g:NetrwMenuPriority.'.26 '.g:NetrwTopLvlMenu.'Sorting\ Sequence\ EditS S' + exe 'silent! menu '.g:NetrwMenuPriority.'.27 '.g:NetrwTopLvlMenu.'Set\ Current\ Directoryc c' + exe 'silent! menu '.g:NetrwMenuPriority.'.28 '.g:NetrwTopLvlMenu.'Settings/Options:NetrwSettings '.":NetrwSettings\" + let s:netrw_menucnt= 28 + + elseif !a:domenu + let s:netrwcnt = 0 + let curwin = winnr() + windo if getline(2) =~ "Netrw" | let s:netrwcnt= s:netrwcnt + 1 | endif + exe curwin."wincmd w" + + if s:netrwcnt <= 1 +" call Decho("clear menus") + exe 'silent! unmenu '.g:NetrwTopLvlMenu.'Help' + exe 'silent! unmenu '.g:NetrwTopLvlMenu.'Apply\ Special\ Viewer' + exe 'silent! unmenu '.g:NetrwTopLvlMenu.'Bookmark\ Current\ Directory' + exe 'silent! unmenu '.g:NetrwTopLvlMenu.'Go\ Up\ Directory' + exe 'silent! unmenu '.g:NetrwTopLvlMenu.'Goto\ Bookmarked\ Directory' + exe 'silent! unmenu '.g:NetrwTopLvlMenu.'Change\ To\ Recently\ Used\ Directory' + exe 'silent! unmenu '.g:NetrwTopLvlMenu.'Change\ To\ Subsequently\ Used\ Directory' + exe 'silent! unmenu '.g:NetrwTopLvlMenu.'Delete\ File/Directory' + exe 'silent! unmenu '.g:NetrwTopLvlMenu.'Edit\ File/Directory' + exe 'silent! unmenu '.g:NetrwTopLvlMenu.'Edit\ File/Directory,\ New\ Window' + exe 'silent! unmenu '.g:NetrwTopLvlMenu.'Edit\ File/Directory,\ New\ Vertical\ Window' + exe 'silent! unmenu '.g:NetrwTopLvlMenu.'Edit\ File\ Hiding\ List' + exe 'silent! unmenu '.g:NetrwTopLvlMenu.'Edit\ File' + exe 'silent! unmenu '.g:NetrwTopLvlMenu.'Enter\ File/Directory' + exe 'silent! unmenu '.g:NetrwTopLvlMenu.'Enter\ File/Directory\ (vertical\ split)' + exe 'silent! unmenu '.g:NetrwTopLvlMenu.'List\ Bookmarks\ and\ History' + exe 'silent! unmenu '.g:NetrwTopLvlMenu.'Listing\ Style\ (thin-long-wide)' + exe 'silent! unmenu '.g:NetrwTopLvlMenu.'Make\ Subdirectory' + exe 'silent! unmenu '.g:NetrwTopLvlMenu.'Normal-Hide-Show' + exe 'silent! unmenu '.g:NetrwTopLvlMenu.'Obtain\ File' + exe 'silent! unmenu '.g:NetrwTopLvlMenu.'Preview\ File/Directory' + exe 'silent! unmenu '.g:NetrwTopLvlMenu.'Previous\ Window\ Browser' + exe 'silent! unmenu '.g:NetrwTopLvlMenu.'Refresh\ Listing' + exe 'silent! unmenu '.g:NetrwTopLvlMenu.'Rename\ File/Directory' + exe 'silent! unmenu '.g:NetrwTopLvlMenu.'Reverse\ Sorting\ Order' + exe 'silent! unmenu '.g:NetrwTopLvlMenu.'Select\ Sorting\ Style' + exe 'silent! unmenu '.g:NetrwTopLvlMenu.'Sorting\ Sequence\ Edit' + exe 'silent! unmenu '.g:NetrwTopLvlMenu.'Set\ Current\ Directory' + exe 'silent! unmenu '.g:NetrwTopLvlMenu.'Settings/Options' + exe 'silent! unmenu '.g:NetrwTopLvlMenu.'Bookmarks' + silent! unlet s:netrw_menu_enabled + endif + endif +" call Dret("NetMenu") + endif + +endfun + +" ========================================== +" Local Directory Browsing Support: {{{1 +" ========================================== + +" --------------------------------------------------------------------- +" LocalBrowseCheck: {{{2 +fun! netrw#LocalBrowseCheck(dirname) + " unfortunate interaction -- split window debugging can't be +" " used here, must use DechoRemOn or DechoTabOn -- the BufEnter + " event triggers another call to LocalBrowseCheck() when attempts + " to write to the DBG buffer are made. +" call Dfunc("LocalBrowseCheck(dirname<".a:dirname.">") + if isdirectory(a:dirname) + silent! call s:NetBrowse(1,a:dirname) + endif +" call Dret("LocalBrowseCheck") + " not a directory, ignore it +endfun + +" --------------------------------------------------------------------- +" LocalListing: does the job of "ls" for local directories {{{2 +fun! s:LocalListing() +" call Dfunc("LocalListing() &ma=".&ma." &mod=".&mod." &ro=".&ro) +" if exists("b:netrw_curdir") |call Decho('b:netrw_curdir<'.b:netrw_curdir.">") |else|call Decho("b:netrw_curdir doesn't exist") |endif +" if exists("g:netrw_sort_by")|call Decho('g:netrw_sort_by<'.g:netrw_sort_by.">")|else|call Decho("g:netrw_sort_by doesn't exist")|endif + + " get the list of files contained in the current directory + let dirname = escape(b:netrw_curdir,s:netrw_glob_escape) + let dirnamelen = strlen(b:netrw_curdir) + let filelist = glob(s:ComposePath(dirname,"*")) +" call Decho("glob(dirname<".dirname."/*>)=".filelist) + if filelist != "" + let filelist= filelist."\n" + endif + let filelist= filelist.glob(s:ComposePath(dirname,".*")) +" call Decho("glob(dirname<".dirname."/.*>)=".glob(dirname.".*")) + + " if the directory name includes a "$", and possibly other characters, + " the glob() doesn't include "." and ".." entries. + if filelist !~ '[\\/]\.[\\/]\=\(\n\|$\)' +" call Decho("forcibly tacking on .") + if filelist == "" + let filelist= s:ComposePath(dirname,"./") + else + let filelist= filelist."\n".s:ComposePath(b:netrw_curdir,"./") + endif +" call Decho("filelist<".filelist.">") + endif + if filelist !~ '[\\/]\.\.[\\/]\=\(\n\|$\)' +" call Decho("forcibly tacking on ..") + let filelist= filelist."\n".s:ComposePath(b:netrw_curdir,"../") +" call Decho("filelist<".filelist.">") + endif + if b:netrw_curdir == '/' + " remove .. from filelist when current directory is root directory + let filelist= substitute(filelist,'/\.\.\n','','') +" call Decho("remove .. from filelist") + endif + let filelist= substitute(filelist,'\n\{2,}','\n','ge') + if (has("win32") || has("win95") || has("win64") || has("win16")) + let filelist= substitute(filelist,'\','/','ge') + else + let filelist= substitute(filelist,'\','\\','ge') + endif + +" call Decho("dirname<".dirname.">") +" call Decho("dirnamelen<".dirnamelen.">") +" call Decho("filelist<".filelist.">") + + while filelist != "" + if filelist =~ '\n' + let filename = substitute(filelist,'\n.*$','','e') + let filelist = substitute(filelist,'^.\{-}\n\(.*\)$','\1','e') + else + let filename = filelist + let filelist = "" + endif + let pfile= filename + if isdirectory(filename) + let pfile= filename."/" + endif + if pfile =~ '//$' + let pfile= substitute(pfile,'//$','/','e') + endif + let pfile= strpart(pfile,dirnamelen) + let pfile= substitute(pfile,'^[/\\]','','e') +" call Decho(" ") +" call Decho("filename<".filename.">") +" call Decho("pfile <".pfile.">") + + if w:netrw_liststyle == s:LONGLIST + let sz = getfsize(filename) + let fsz = strpart(" ",1,15-strlen(sz)).sz + let pfile= pfile."\t".fsz." ".strftime(g:netrw_timefmt,getftime(filename)) +" call Decho("sz=".sz." fsz=".fsz) + endif + + if g:netrw_sort_by =~ "^t" + " sort by time (handles time up to 1 quintillion seconds, US) +" call Decho("getftime(".filename.")=".getftime(filename)) + let t = getftime(filename) + let ft = strpart("000000000000000000",1,18-strlen(t)).t +" call Decho("exe keepjumps put ='".ft.'/'.filename."'") + let ftpfile= ft.'/'.pfile + keepjumps silent! put=ftpfile + + elseif g:netrw_sort_by =~ "^s" + " sort by size (handles file sizes up to 1 quintillion bytes, US) +" call Decho("getfsize(".filename.")=".getfsize(filename)) + let sz = getfsize(filename) + let fsz = strpart("000000000000000000",1,18-strlen(sz)).sz +" call Decho("exe keepjumps put ='".fsz.'/'.filename."'") + let fszpfile= fsz.'/'.pfile + keepjumps silent! put =fszpfile + + else + " sort by name +" call Decho("exe keepjumps put ='".pfile."'") + keepjumps silent! put=pfile + endif + endwhile + + " cleanup any windows mess at end-of-line + silent! keepjumps %s/\r$//e + setlocal ts=32 +" call Decho("setlocal ts=32") + +" call Dret("LocalListing") +endfun + +" --------------------------------------------------------------------- +" LocalBrowseShellCmdRefresh: this function is called after a user has {{{2 +" performed any shell command. The idea is to cause all local-browsing +" buffers to be refreshed after a user has executed some shell command, +" on the chance that s/he removed/created a file/directory with it. +fun! s:LocalBrowseShellCmdRefresh() +" call Dfunc("LocalBrowseShellCmdRefresh() browselist=".string(s:netrw_browselist)) + " determine which buffers currently reside in a tab + let itab = 1 + let buftablist = [] + while itab <= tabpagenr("$") + let buftablist= buftablist + tabpagebuflist() + let itab= itab + 1 + tabn + endwhile +" call Decho("buftablist".string(buftablist)) + " GO through all buffers on netrw_browselist (ie. just local-netrw buffers): + " | refresh any netrw window + " | wipe out any non-displaying netrw buffer + let curwin = winnr() + let ibl = 0 + for ibuf in s:netrw_browselist +" call Decho("bufwinnr(".ibuf.") index(buftablist,".ibuf.")=".index(buftablist,ibuf)) + if bufwinnr(ibuf) == -1 && index(buftablist,ibuf) == -1 +" call Decho("wiping buf#".ibuf,"<".bufname(ibuf).">") + exe "silent! bw ".ibuf + call remove(s:netrw_browselist,ibl) +" call Decho("browselist=".string(s:netrw_browselist)) + continue + elseif index(tabpagebuflist(),ibuf) != -1 +" call Decho("refresh buf#".ibuf.'-> win#'.bufwinnr(ibuf)) + exe bufwinnr(ibuf)."wincmd w" + call s:NetRefresh(1,s:NetBrowseChgDir(1,'./')) + endif + let ibl= ibl + 1 + endfor + exe curwin."wincmd w" + +" call Dret("LocalBrowseShellCmdRefresh") +endfun + +" --------------------------------------------------------------------- +" LocalBrowseRm: {{{2 +fun! s:LocalBrowseRm(path) range +" call Dfunc("LocalBrowseRm(path<".a:path.">)") +" call Decho("firstline=".a:firstline." lastline=".a:lastline) + + " preparation for removing multiple files/directories + let ctr = a:firstline + let ret = 0 + let all= 0 + + " remove multiple files and directories + while ctr <= a:lastline + exe "keepjumps ".ctr + + " sanity checks + if line(".") < w:netrw_bannercnt + let ctr= ctr + 1 + continue + endif + let curword= s:NetGetWord() + if curword == "./" || curword == "../" + let ctr= ctr + 1 + continue + endif + + norm! 0 + let rmfile= s:ComposePath(a:path,curword) +" call Decho("rmfile<".rmfile.">") + + if rmfile !~ '^"' && (rmfile =~ '@$' || rmfile !~ '[\/]$') + " attempt to remove file + if !all + echohl Statement + call inputsave() + let ok= input("Confirm deletion of file<".rmfile."> ","[{y(es)},n(o),a(ll),q(uit)] ") + call inputrestore() + echohl NONE + if ok == "" + let ok="no" + endif +" call Decho("response: ok<".ok.">") + let ok= substitute(ok,'\[{y(es)},n(o),a(ll),q(uit)]\s*','','e') +" call Decho("response: ok<".ok."> (after sub)") + if ok =~ 'a\%[ll]' + let all= 1 + endif + endif + + if all || ok =~ 'y\%[es]' || ok == "" + let ret= s:System("delete",rmfile) +" call Decho("errcode=".v:shell_error." ret=".ret) + elseif ok =~ 'q\%[uit]' + break + endif + + else + " attempt to remove directory + if !all + echohl Statement + call inputsave() + let ok= input("Confirm deletion of directory<".rmfile."> ","[{y(es)},n(o),a(ll),q(uit)] ") + call inputrestore() + let ok= substitute(ok,'\[{y(es)},n(o),a(ll),q(uit)]\s*','','e') + if ok == "" + let ok="no" + endif + if ok =~ 'a\%[ll]' + let all= 1 + endif + endif + let rmfile= substitute(rmfile,'[\/]$','','e') + + if all || ok =~ 'y\%[es]' || ok == "" +" call Decho("1st attempt: system(".g:netrw_local_rmdir.' "'.rmfile.'")') + call s:System("system",g:netrw_local_rmdir.' "'.rmfile.'"') +" call Decho("v:shell_error=".v:shell_error) + + if v:shell_error != 0 +" call Decho("2nd attempt to remove directory<".rmfile.">") + let errcode= s:System("delete",rmfile) +" call Decho("errcode=".errcode) + + if errcode != 0 + if has("unix") +" call Decho("3rd attempt to remove directory<".rmfile.">") + call s:System("system","rm ".rmfile) + if v:shell_error != 0 && !exists("g:netrw_quiet") + call netrw#ErrorMsg(s:ERROR,"unable to remove directory<".rmfile."> -- is it empty?",34) +endif + elseif !exists("g:netrw_quiet") + call netrw#ErrorMsg(s:ERROR,"unable to remove directory<".rmfile."> -- is it empty?",35) + endif + endif + endif + + elseif ok =~ 'q\%[uit]' + break + endif + endif + + let ctr= ctr + 1 + endwhile + + " refresh the directory + let curline= line(".") +" call Decho("refresh the directory") + call s:NetRefresh(1,s:NetBrowseChgDir(1,'./')) + exe curline + +" call Dret("LocalBrowseRm") +endfun + +" --------------------------------------------------------------------- +" LocalBrowseRename: rename a remote file or directory {{{2 +fun! s:LocalBrowseRename(path) range +" call Dfunc("LocalBrowseRename(path<".a:path.">)") + + " preparation for removing multiple files/directories + let ctr= a:firstline + + " attempt to rename files/directories + while ctr <= a:lastline + exe "keepjumps ".ctr + + " sanity checks + if line(".") < w:netrw_bannercnt + let ctr= ctr + 1 + continue + endif + let curword= s:NetGetWord() + if curword == "./" || curword == "../" + let ctr= ctr + 1 + continue + endif + + norm! 0 + let oldname= s:ComposePath(a:path,curword) +" call Decho("oldname<".oldname.">") + + call inputsave() + let newname= input("Moving ".oldname." to : ",substitute(oldname,'/*$','','e')) + call inputrestore() + + let ret= rename(oldname,newname) +" call Decho("renaming <".oldname."> to <".newname.">") + + let ctr= ctr + 1 + endwhile + + " refresh the directory +" call Decho("refresh the directory listing") + call netrw#NetSavePosn() + call s:NetRefresh(1,s:NetBrowseChgDir(1,'./')) +" call Dret("LocalBrowseRename") +endfun + +" --------------------------------------------------------------------- +" LocalFastBrowser: handles setting up/taking down fast browsing for the {{{2 +" local browser +" fastbrowse Local Remote Hiding a buffer implies it may be re-used (fast) +" slow 0 D D Deleting a buffer implies it will not be re-used (slow) +" med 1 D H +" fast 2 H H +fun! s:LocalFastBrowser() +" call Dfunc("LocalFastBrowser() g:netrw_fastbrowse=".g:netrw_fastbrowse) + + " initialize browselist, a list of buffer numbers that the local browser has used + if !exists("s:netrw_browselist") +" call Decho("initialize s:netrw_browselist") + let s:netrw_browselist= [] + endif + + " append current buffer to fastbrowse list + if g:netrw_fastbrowse <= 1 && (empty(s:netrw_browselist) || bufnr("%") > s:netrw_browselist[-1]) +" call Decho("appendng current buffer to browselist") + call add(s:netrw_browselist,bufnr("%")) +" call Decho("browselist=".string(s:netrw_browselist)) + endif + + " enable autocmd events to handle refreshing/removing local browser buffers + " If local browse buffer is currently showing: refresh it + " If local browse buffer is currently hidden : wipe it + if !exists("s:netrw_browser_shellcmd") && g:netrw_fastbrowse <= 1 +" call Decho("setting up local-browser shell command refresh") + let s:netrw_browser_shellcmd= 1 + augroup AuNetrwShellCmd + au! + if (has("win32") || has("win95") || has("win64") || has("win16")) + au ShellCmdPost * call s:LocalBrowseShellCmdRefresh() + else + au ShellCmdPost,FocusGained * call s:LocalBrowseShellCmdRefresh() + endif + augroup END + endif + + " user must have changed fastbrowse to its fast setting, so remove + " the associated autocmd events + if g:netrw_fastbrowse > 1 && exists("s:netrw_browser_shellcmd") +" call Decho("remove AuNetrwShellCmd autcmd group") + unlet s:netrw_browser_shellcmd + augroup AuNetrwShellCmd + au! + augroup END + augroup! AuNetrwShellCmd + endif + +" call Dret("LocalFastBrowser") +endfun + +" --------------------------------------------------------------------- +" LocalObtain: copy selected file to current working directory {{{2 +fun! s:LocalObtain() +" call Dfunc("LocalObtain()") + if exists("b:netrw_curdir") && getcwd() != b:netrw_curdir + let fname= expand("") + let fcopy= readfile(b:netrw_curdir."/".fname,"b") + call writefile(fcopy,getcwd()."/".fname,"b") + elseif !exists("b:netrw_curdir") + call netrw#ErrorMsg(s:ERROR,"local browsing directory doesn't exist!",36) + else + call netrw#ErrorMsg(s:ERROR,"local browsing directory and current directory are identical",37) + endif +" call Dret("LocalObtain") +endfun - " http://user@hostname/...path-to-file - elseif match(a:choice,httpurm) == 0 -" call Decho("http://...") - let b:netrw_method = 5 - let g:netrw_machine= substitute(a:choice,httpurm,'\1',"") - let b:netrw_fname = substitute(a:choice,httpurm,'\2',"") +" --------------------------------------------------------------------- +" netrw#Explore: launch the local browser in the directory of the current file {{{2 +" dosplit==0: the window will be split iff the current file has +" been modified +" dosplit==1: the window will be split before running the local +" browser +fun! netrw#Explore(indx,dosplit,style,...) +" call Dfunc("netrw#Explore(indx=".a:indx." dosplit=".a:dosplit." style=".a:style.",a:1<".a:1.">) &modified=".&modified) + if !exists("b:netrw_curdir") + let b:netrw_curdir= getcwd() + endif + let curfile = b:netrw_curdir +" call Decho("curfile<".curfile.">") - " dav://hostname[:port]/..path-to-file.. - elseif match(a:choice,davurm) == 0 -" call Decho("dav://...") - let b:netrw_method= 6 - if a:choice =~ '^s' - let g:netrw_machine= 'https://'.substitute(a:choice,davurm,'\1/\2',"") - else - let g:netrw_machine= 'http://'.substitute(a:choice,davurm,'\1/\2',"") - endif - let b:netrw_fname = substitute(a:choice,davurm,'\3',"") + " save registers + silent! let keepregstar = @* + silent! let keepregplus = @+ + silent! let keepregslash= @/ - " rsync://user@hostname/...path-to-file - elseif match(a:choice,rsyncurm) == 0 -" call Decho("rsync://...") - let b:netrw_method = 7 - let g:netrw_machine= substitute(a:choice,rsyncurm,'\1',"") - let b:netrw_fname = substitute(a:choice,rsyncurm,'\2',"") + " if dosplit or file has been modified + if a:dosplit || &modified || a:style == 6 +" call Decho("case: dosplit=".a:dosplit." modified=".&modified." a:style=".a:style) + call s:SaveWinVars() - " ftp://[user@]hostname[[:#]port]/...path-to-file - elseif match(a:choice,ftpurm) == 0 -" call Decho("ftp://...") - let userid = substitute(a:choice,ftpurm,'\2',"") - let g:netrw_machine= substitute(a:choice,ftpurm,'\3',"") - let g:netrw_port = substitute(a:choice,ftpurm,'\4',"") - let b:netrw_fname = substitute(a:choice,ftpurm,'\5',"") - if userid != "" - let g:netrw_uid= userid - endif - if exists("g:netrw_uid") && exists("g:netrw_passwd") - let b:netrw_method = 3 - else - if filereadable(expand("$HOME/.netrc")) && !exists("g:netrw_ignorenetrc") - let b:netrw_method= 2 - else - if !exists("g:netrw_uid") || g:netrw_uid == "" - call NetUserPass() - elseif !exists("g:netrw_passwd") || g:netrw_passwd == "" - call NetUserPass(g:netrw_uid) - " else just use current g:netrw_uid and g:netrw_passwd - endif - let b:netrw_method= 3 - endif - endif + if a:style == 0 " Explore, Sexplore +" call Decho("style=0: Explore or Sexplore") + exe g:netrw_winsize."wincmd s" - elseif match(a:choice,fetchurm) == 0 -" call Decho("fetch://...") - let b:netrw_method = 8 - let g:netrw_userid = substitute(a:choice,fetchurm,'\2',"") - let g:netrw_machine= substitute(a:choice,fetchurm,'\3',"") - let b:netrw_option = substitute(a:choice,fetchurm,'\4',"") - let b:netrw_fname = substitute(a:choice,fetchurm,'\5',"") + elseif a:style == 1 "Explore!, Sexplore! +" call Decho("style=1: Explore! or Sexplore!") + exe g:netrw_winsize."wincmd v" - " Issue an ftp : "machine id password [path/]filename" - elseif match(a:choice,mipf) == 0 -" call Decho("(ftp) host id pass file") - let b:netrw_method = 3 - let g:netrw_machine = substitute(a:choice,mipf,'\1',"") - let g:netrw_uid = substitute(a:choice,mipf,'\2',"") - let g:netrw_passwd = substitute(a:choice,mipf,'\3',"") - let b:netrw_fname = substitute(a:choice,mipf,'\4',"") + elseif a:style == 2 " Hexplore +" call Decho("style=2: Hexplore") + exe "bel ".g:netrw_winsize."wincmd s" - " Issue an ftp: "hostname [path/]filename" - elseif match(a:choice,mf) == 0 -" call Decho("(ftp) host file") - if exists("g:netrw_uid") && exists("g:netrw_passwd") - let b:netrw_method = 3 - let g:netrw_machine = substitute(a:choice,mf,'\1',"") - let b:netrw_fname = substitute(a:choice,mf,'\2',"") + elseif a:style == 3 " Hexplore! +" call Decho("style=3: Hexplore!") + exe "abo ".g:netrw_winsize."wincmd s" - elseif filereadable(expand("$HOME/.netrc")) - let b:netrw_method = 2 - let g:netrw_machine = substitute(a:choice,mf,'\1',"") - let b:netrw_fname = substitute(a:choice,mf,'\2',"") - endif + elseif a:style == 4 " Vexplore +" call Decho("style=4: Vexplore") + exe "lefta ".g:netrw_winsize."wincmd v" - " sftp://user@hostname/...path-to-file - elseif match(a:choice,sftpurm) == 0 -" call Decho("sftp://...") - let b:netrw_method = 9 - let g:netrw_machine= substitute(a:choice,sftpurm,'\1',"") - let b:netrw_fname = substitute(a:choice,sftpurm,'\2',"") + elseif a:style == 5 " Vexplore! +" call Decho("style=5: Vexplore!") + exe "rightb ".g:netrw_winsize."wincmd v" - " Issue an rcp: hostname:filename" (this one should be last) - elseif match(a:choice,rcphf) == 0 -" call Decho("(rcp) [user@]host:file) rcphf<".rcphf.">") - let b:netrw_method = 1 - let userid = substitute(a:choice,rcphf,'\2',"") - let g:netrw_machine= substitute(a:choice,rcphf,'\3',"") - let b:netrw_fname = substitute(a:choice,rcphf,'\4',"") -" call Decho('\1<'.substitute(a:choice,rcphf,'\1',"").">") -" call Decho('\2<'.substitute(a:choice,rcphf,'\2',"").">") -" call Decho('\3<'.substitute(a:choice,rcphf,'\3',"").">") -" call Decho('\4<'.substitute(a:choice,rcphf,'\4',"").">") - if userid != "" - let g:netrw_uid= userid - endif - if has("win32") || has("win95") || has("win64") || has("win16") - " don't let PCs try <.netrc> - let b:netrw_method = 3 + elseif a:style == 6 " Texplore + call s:SaveBufVars() +" call Decho("style = 6: Texplore") + tabnew + call s:RestoreBufVars() endif + call s:RestoreWinVars() + endif + norm! 0 - else - if !exists("g:netrw_quiet") - echohl Error | echo "***netrw*** cannot determine method" | echohl None - call inputsave()|call input("Press to continue")|call inputrestore() +" call Decho("a:1<".a:1.">") + if a:1 =~ '^\~' && (has("unix") || (exists("g:netrw_cygwin") && g:netrw_cygwin)) + let dirname= substitute(a:1,'\~',expand("$HOME"),'') +" call Decho("using dirname<".dirname."> (case: ~ && unix||cygwin)") + elseif a:1 == '.' + let dirname= exists("b:netrw_curdir")? b:netrw_curdir : getcwd() + if dirname !~ '/$' + let dirname= dirname."/" endif - let b:netrw_method = -1 +" call Decho("using dirname<".dirname."> (case: ".(exists("b:netrw_curdir")? "b:netrw_curdir" : "getcwd()").")") + else + let dirname= a:1 +" call Decho("using dirname<".dirname.">") endif - " remove any leading [:#] from port number - if g:netrw_port != "" - let g:netrw_port = substitute(g:netrw_port,'[#:]\+','','') + if dirname =~ '^\*/' + " Explore */pattern +" call Decho("case Explore */pattern") + let pattern= substitute(dirname,'^\*/\(.*\)$','\1','') +" call Decho("Explore */pat: dirname<".dirname."> -> pattern<".pattern.">") + if &hls | let keepregslash= s:ExplorePatHls(pattern) | endif + elseif dirname =~ '^\*\*//' + " Explore **//pattern +" call Decho("case Explore **//pattern") + let pattern = substitute(dirname,'^\*\*//','','') + let starstarpat = 1 +" call Decho("Explore **//pat: dirname<".dirname."> -> pattern<".pattern.">") endif -" call Decho("a:choice <".a:choice.">") -" call Decho("b:netrw_method <".b:netrw_method.">") -" call Decho("g:netrw_machine<".g:netrw_machine.">") -" call Decho("g:netrw_port <".g:netrw_port.">") -" if exists("g:netrw_uid") "Decho -" call Decho("g:netrw_uid <".g:netrw_uid.">") -" endif "Decho -" if exists("g:netrw_passwd") "Decho -" call Decho("g:netrw_passwd <".g:netrw_passwd.">") -" endif "Decho -" call Decho("b:netrw_fname <".b:netrw_fname.">") -" call Dret("NetMethod : b:netrw_method=".b:netrw_method) -endfun + if dirname == "" && a:indx >= 0 + " Explore Hexplore Vexplore Sexplore +" call Decho("case Explore Hexplore Vexplore Sexplore") + let newdir= substitute(expand("%:p"),'^\(.*[/\\]\)[^/\\]*$','\1','e') + if newdir =~ '^scp:' || newdir =~ '^ftp:' +" call Decho("calling NetBrowse(0,newdir<".newdir.">)") + call s:NetBrowse(0,newdir) + else + if newdir == ""|let newdir= getcwd()|endif +" call Decho("calling LocalBrowseCheck(newdir<".newdir.">)") + call netrw#LocalBrowseCheck(newdir) + endif + call search('\<'.substitute(curfile,'^.*/','','e').'\>','cW') -" ------------------------------------------------------------------------ -" NetUserPass: set username and password for subsequent ftp transfer {{{2 -" Usage: :call NetUserPass() -- will prompt for userid and password -" :call NetUserPass("uid") -- will prompt for password -" :call NetUserPass("uid","password") -- sets global userid and password -fun! NetUserPass(...) + elseif dirname =~ '^\*\*/' || a:indx < 0 || dirname =~ '^\*/' + " Nexplore, Pexplore, Explore **/... , or Explore */pattern +" call Decho("case Nexplore, Pexplore, , , Explore dirname<".dirname.">") + if !mapcheck("","n") && !mapcheck("","n") && exists("b:netrw_curdir") +" call Decho("set up and maps") + let s:didstarstar= 1 + nnoremap :Pexplore + nnoremap :Nexplore + endif - " get/set userid - if a:0 == 0 -" call Dfunc("NetUserPass(a:0<".a:0.">)") - if !exists("g:netrw_uid") || g:netrw_uid == "" - " via prompt - let g:netrw_uid= input('Enter username: ') - endif - else " from command line -" call Dfunc("NetUserPass(a:1<".a:1.">) {") - let g:netrw_uid= a:1 - endif + if has("path_extra") +" call Decho("has path_extra") + if !exists("w:netrw_explore_indx") + let w:netrw_explore_indx= 0 + endif + let indx = a:indx +" call Decho("set indx= [a:indx=".indx."]") +" + if indx == -1 + "Nexplore +" call Decho("case Nexplore: (indx=".indx.")") + if !exists("w:netrw_explore_list") " sanity check + call netrw#ErrorMsg(s:WARNING,"using Nexplore or improperly; see help for netrw-starstar",40) + silent! let @* = keepregstar + silent! let @+ = keepregstar + silent! let @/ = keepregslash +" call Dret("netrw#Explore") + return + endif + let indx= w:netrw_explore_indx + if indx < 0 | let indx= 0 | endif + if indx >= w:netrw_explore_listlen | let indx= w:netrw_explore_listlen - 1 | endif + let curfile= w:netrw_explore_list[indx] +" call Decho("indx=".indx." curfile<".curfile.">") + while indx < w:netrw_explore_listlen && curfile == w:netrw_explore_list[indx] + let indx= indx + 1 +" call Decho("indx=".indx." (Nexplore while loop)") + endwhile + if indx >= w:netrw_explore_listlen | let indx= w:netrw_explore_listlen - 1 | endif +" call Decho("Nexplore: indx= [w:netrw_explore_indx=".w:netrw_explore_indx."]=".indx) - " get password - if a:0 <= 1 " via prompt -" call Decho("a:0=".a:0." case <=1:") - let g:netrw_passwd= inputsecret("Enter Password: ") - else " from command line -" call Decho("a:0=".a:0." case >1: a:2<".a:2.">") - let g:netrw_passwd=a:2 - endif + elseif indx == -2 + "Pexplore +" call Decho("case Pexplore: (indx=".indx.")") + if !exists("w:netrw_explore_list") " sanity check + call netrw#ErrorMsg(s:WARNING,"using Pexplore or improperly; see help for netrw-starstar",41) + silent! let @* = keepregstar + silent! let @+ = keepregstar + silent! let @/ = keepregslash +" call Dret("netrw#Explore") + return + endif + let indx= w:netrw_explore_indx + if indx < 0 | let indx= 0 | endif + if indx >= w:netrw_explore_listlen | let indx= w:netrw_explore_listlen - 1 | endif + let curfile= w:netrw_explore_list[indx] +" call Decho("indx=".indx." curfile<".curfile.">") + while indx >= 0 && curfile == w:netrw_explore_list[indx] + let indx= indx - 1 +" call Decho("indx=".indx." (Pexplore while loop)") + endwhile + if indx < 0 | let indx= 0 | endif +" call Decho("Pexplore: indx= [w:netrw_explore_indx=".w:netrw_explore_indx."]=".indx) + + else + " Explore -- initialize + " build list of files to Explore with Nexplore/Pexplore +" call Decho("case Explore: initialize (indx=".indx.")") + let w:netrw_explore_indx= 0 + if !exists("b:netrw_curdir") + let b:netrw_curdir= getcwd() + endif +" call Decho("b:netrw_curdir<".b:netrw_curdir.">") + + if exists("pattern") +" call Decho("pattern exists: building list pattern<".pattern."> cwd<".getcwd().">") + if exists("starstarpat") +" call Decho("starstarpat<".starstarpat.">") + try + exe "silent vimgrep /".pattern."/gj "."**/*" + catch /^Vim\%((\a\+)\)\=:E480/ + call netrw#ErrorMsg(s:WARNING,'no files matched pattern<'.pattern.'>',45) + if &hls | let keepregslash= s:ExplorePatHls(pattern) | endif + silent! let @* = keepregstar + silent! let @+ = keepregstar + silent! let @/ = keepregslash +" call Dret("netrw#Explore : no files matched pattern") + return + endtry + let s:netrw_curdir = b:netrw_curdir + let w:netrw_explore_list = getqflist() + let w:netrw_explore_list = map(w:netrw_explore_list,'s:netrw_curdir."/".bufname(v:val.bufnr)') + else +" call Decho("no starstarpat") + exe "vimgrep /".pattern."/gj ".b:netrw_curdir."/*" + let w:netrw_explore_list = map(getqflist(),'bufname(v:val.bufnr)') + if &hls | let keepregslash= s:ExplorePatHls(pattern) | endif + endif + else +" call Decho("no pattern: building list based on ".b:netrw_curdir."/".dirname) + let w:netrw_explore_list= split(expand(b:netrw_curdir."/".dirname),'\n') + if &hls | let keepregslash= s:ExplorePatHls(dirname) | endif + endif + + let w:netrw_explore_listlen = len(w:netrw_explore_list) +" call Decho("w:netrw_explore_list<".string(w:netrw_explore_list)."> listlen=".w:netrw_explore_listlen) + + if w:netrw_explore_listlen == 0 || (w:netrw_explore_listlen == 1 && w:netrw_explore_list[0] =~ '\*\*\/') + call netrw#ErrorMsg(s:WARNING,"no files matched",42) + silent! let @* = keepregstar + silent! let @+ = keepregstar + silent! let @/ = keepregslash +" call Dret("netrw#Explore : no files matched") + return + endif + endif + + " NetrwStatusLine support - for exploring support + let w:netrw_explore_indx= indx +" call Decho("explorelist<".join(w:netrw_explore_list,',')."> len=".w:netrw_explore_listlen) + + " wrap the indx around, but issue a note + if indx >= w:netrw_explore_listlen || indx < 0 +" call Decho("wrap indx (indx=".indx." listlen=".w:netrw_explore_listlen.")") + let indx = (indx < 0)? ( w:netrw_explore_listlen - 1 ) : 0 + let w:netrw_explore_indx= indx + call netrw#ErrorMsg(s:NOTE,"no more files match Explore pattern",43) + sleep 1 + endif + + exe "let dirfile= w:netrw_explore_list[".indx."]" +" call Decho("dirfile=w:netrw_explore_list[indx=".indx."]= <".dirfile.">") + let newdir= substitute(dirfile,'/[^/]*$','','e') +" call Decho("newdir<".newdir.">") + +" call Decho("calling LocalBrowseCheck(newdir<".newdir.">)") + call netrw#LocalBrowseCheck(newdir) + if !exists("w:netrw_liststyle") + let w:netrw_liststyle= g:netrw_liststyle + endif + if w:netrw_liststyle == s:THINLIST || w:netrw_liststyle == s:LONGLIST + call search('^'.substitute(dirfile,"^.*/","","").'\>',"W") + else + call search('\<'.substitute(dirfile,"^.*/","","").'\>',"w") + endif + let w:netrw_explore_mtchcnt = indx + 1 + let w:netrw_explore_bufnr = bufnr("%") + let w:netrw_explore_line = line(".") + call s:SetupNetrwStatusLine('%f %h%m%r%=%9*%{NetrwStatusLine()}') +" call Decho("explore: mtchcnt=".w:netrw_explore_mtchcnt." bufnr=".w:netrw_explore_bufnr." line#".w:netrw_explore_line) -" call Dret("NetUserPass") -endfun + else +" call Decho("vim does not have path_extra") + if !exists("g:netrw_quiet") + call netrw#ErrorMsg(s:WARNING,"your vim needs the +path_extra feature for Exploring with **!",44) + endif + silent! let @* = keepregstar + silent! let @+ = keepregstar + silent! let @/ = keepregslash +" call Dret("netrw#Explore : missing +path_extra") + return + endif -" ------------------------------------------------------------------------ -" NetOptionSave: save options and set to "standard" form {{{2 -fun! s:NetOptionSave() -" call Dfunc("NetOptionSave()") - if !exists("w:netoptionsave") - let w:netoptionsave= 1 else -" call Dret("NetOptionSave : netoptionsave=".w:netoptionsave) - return +" call Decho("case Explore newdir<".dirname.">") + if exists("w:netrw_liststyle") && w:netrw_liststyle == s:TREELIST && dirname =~ '/' + silent! unlet w:netrw_treedict + silent! unlet w:netrw_treetop + endif + let newdir= dirname + if !exists("b:netrw_curdir") + call netrw#LocalBrowseCheck(getcwd()) + else + call netrw#LocalBrowseCheck(s:NetBrowseChgDir(1,newdir)) + endif endif - " Get Temporary Filename - if exists("&acd") - let w:acdkeep = &acd - endif - let w:aikeep = &ai - let w:fokeep = &fo - let w:cikeep = &ci - let w:cinkeep = &cin - let w:cinokeep = &cino - let w:comkeep = &com - let w:cpokeep = &cpo - let w:hidkeep = &hidden - let w:magickeep = &magic - if !g:netrw_keepdir - let w:dirkeep = getcwd() - endif - let w:gdkeep = &gd - let w:repkeep = &report - let w:spellkeep = &spell - let w:twkeep = &tw - setlocal cino = - setlocal com = - setlocal cpo -=aA - if exists("&acd") - setlocal noacd nocin noai noci magic nospell fo=nroql2 nohid - else - setlocal nocin noai noci magic nospell fo=nroql2 nohid - endif - setlocal tw =0 - setlocal report=10000 - if has("win32") && !has("win95") - let w:swfkeep= &swf - setlocal noswf -" call Decho("setting w:swfkeep to <".&swf.">") - endif + silent! let @* = keepregstar + silent! let @+ = keepregstar + silent! let @/ = keepregslash +" call Dret("netrw#Explore : @/<".@/.">") +endfun -" call Dret("NetOptionSave") +" --------------------------------------------------------------------- +" s:ExplorePatHls: converts an Explore pattern into a regular expression search pattern {{{2 +fun! s:ExplorePatHls(pattern) +" call Dfunc("s:ExplorePatHls(pattern<".a:pattern.">)") + let repat= substitute(a:pattern,'^**/\{1,2}','','') +" call Decho("repat<".repat.">") + let repat= escape(repat,'][.\') +" call Decho("repat<".repat.">") + let repat= '\<'.substitute(repat,'\*','\\(\\S\\+ \\)*\\S\\+','g').'\>' +" call Dret("s:ExplorePatHls repat<".repat.">") + return repat endfun -" ------------------------------------------------------------------------ -" NetOptionRestore: restore options {{{2 -fun! s:NetOptionRestore() -" call Dfunc("NetOptionRestore()") - if !exists("w:netoptionsave") -" call Dret("NetOptionRestore : w:netoptionsave doesn't exist") - return - endif - unlet w:netoptionsave +" --------------------------------------------------------------------- +" SetupNetrwStatusLine: {{{2 +fun! s:SetupNetrwStatusLine(statline) +" call Dfunc("SetupNetrwStatusLine(statline<".a:statline.">)") - if exists("&acd") - if exists("w:acdkeep") |let &acd = w:acdkeep |unlet w:acdkeep |endif - endif - if exists("w:aikeep") |let &ai = w:aikeep |unlet w:aikeep |endif - if exists("w:cikeep") |let &ci = w:cikeep |unlet w:cikeep |endif - if exists("w:cinkeep") |let &cin = w:cinkeep |unlet w:cinkeep |endif - if exists("w:cinokeep") |let &cino = w:cinokeep |unlet w:cinokeep |endif - if exists("w:comkeep") |let &com = w:comkeep |unlet w:comkeep |endif - if exists("w:cpokeep") |let &cpo = w:cpokeep |unlet w:cpokeep |endif - if exists("w:dirkeep") |exe "lcd ".w:dirkeep |unlet w:dirkeep |endif - if exists("w:fokeep") |let &fo = w:fokeep |unlet w:fokeep |endif - if exists("w:gdkeep") |let &gd = w:gdkeep |unlet w:gdkeep |endif - if exists("w:hidkeep") |let &hidden = w:hidkeep |unlet w:hidkeep |endif - if exists("w:magic") |let &magic = w:magic |unlet w:magic |endif - if exists("w:repkeep") |let &report = w:repkeep |unlet w:repkeep |endif - if exists("w:spellkeep")|let &spell = w:spellkeep |unlet w:spellkeep|endif - if exists("w:twkeep") |let &tw = w:twkeep |unlet w:twkeep |endif - if exists("w:swfkeep") - if &directory == "" && exists("w:swfkeep") - " user hasn't specified a swapfile directory; - " netrw will temporarily make the swapfile - " directory the current local one. - let &directory = getcwd() - silent! let &swf = w:swfkeep - set directory= - else - let &swf= w:swfkeep + if !exists("s:netrw_setup_statline") + let s:netrw_setup_statline= 1 +" call Decho("do first-time status line setup") + + if !exists("s:netrw_users_stl") + let s:netrw_users_stl= &stl + endif + if !exists("s:netrw_users_ls") + let s:netrw_users_ls= &laststatus endif - unlet w:swfkeep + + " set up User9 highlighting as needed + let keepa= @a + redir @a + try + hi User9 + catch /^Vim\%((\a\+)\)\=:E411/ + if &bg == "dark" + hi User9 ctermfg=yellow ctermbg=blue guifg=yellow guibg=blue + else + hi User9 ctermbg=yellow ctermfg=blue guibg=yellow guifg=blue + endif + endtry + redir END + let @a= keepa endif -" call Dret("NetOptionRestore") -endfun + " set up status line (may use User9 highlighting) + " insure that windows have a statusline + " make sure statusline is displayed + let &stl=a:statline + setlocal laststatus=2 +" call Decho("stl=".&stl) + redraw! -" ------------------------------------------------------------------------ -" NetReadFixup: this sort of function is typically written by the user {{{2 -" to handle extra junk that their system's ftp dumps -" into the transfer. This function is provided as an -" example and as a fix for a Windows 95 problem: in my -" experience, win95's ftp always dumped four blank lines -" at the end of the transfer. -if has("win95") && exists("g:netrw_win95ftp") && g:netrw_win95ftp - fun! NetReadFixup(method, line1, line2) -" call Dfunc("NetReadFixup(method<".a:method."> line1=".a:line1." line2=".a:line2.")") - if method == 3 " ftp (no <.netrc>) - let fourblanklines= line2 - 3 - silent fourblanklines.",".line2."g/^\s*/d" - endif -" call Dret("NetReadFixup") - endfun -endif +" call Dret("SetupNetrwStatusLine : stl=".&stl) +endfun " --------------------------------------------------------------------- -" NetSort: Piet Delport's BISort2() function, modified to take a range {{{2 -if v:version < 700 - fun! s:NetSort() range -" " call Dfunc("NetSort()") - - let i = a:firstline + 1 - while i <= a:lastline - " find insertion point via binary search - let i_val = getline(i) - let lo = a:firstline - let hi = i - while lo < hi - let mid = (lo + hi) / 2 - let mid_val = getline(mid) - if g:netrw_sort_direction =~ '^n' - " normal sorting order - if i_val < mid_val - let hi = mid - else - let lo = mid + 1 - if i_val == mid_val | break | endif - endif - else - " reverse sorting order - if i_val > mid_val - let hi = mid - else - let lo = mid + 1 - if i_val == mid_val | break | endif - endif - endif - endwhile - " do insert - if lo < i - exe 'keepjumps '.i.'d_' - keepjumps call append(lo - 1, i_val) - endif - let i = i + 1 - endwhile +" NetrwStatusLine: {{{2 +fun! NetrwStatusLine() -" " call Dret("NetSort") - endfun -endif +" vvv NetrwStatusLine() debugging vvv +" let g:stlmsg="" +" if !exists("w:netrw_explore_bufnr") +" let g:stlmsg="!X" +" elseif w:netrw_explore_bufnr != bufnr("%") +" let g:stlmsg="explore_bufnr!=".bufnr("%") +" endif +" if !exists("w:netrw_explore_line") +" let g:stlmsg=" !X" +" elseif w:netrw_explore_line != line(".") +" let g:stlmsg=" explore_line!={line(.)<".line(".").">" +" endif +" if !exists("w:netrw_explore_list") +" let g:stlmsg=" !X" +" endif +" ^^^ NetrwStatusLine() debugging ^^^ + + if !exists("w:netrw_explore_bufnr") || w:netrw_explore_bufnr != bufnr("%") || !exists("w:netrw_explore_line") || w:netrw_explore_line != line(".") || !exists("w:netrw_explore_list") + " restore user's status line + let &stl = s:netrw_users_stl + let &laststatus = s:netrw_users_ls + if exists("w:netrw_explore_bufnr")|unlet w:netrw_explore_bufnr|endif + if exists("w:netrw_explore_line")|unlet w:netrw_explore_line|endif + return "" + else + return "Match ".w:netrw_explore_mtchcnt." of ".w:netrw_explore_listlen + endif +endfun + +" --------------------------------------------------------------------- +" NetGetcwd: get the current directory. {{{2 +" Change backslashes to forward slashes, if any. +" If doesc is true, escape certain troublesome characters +fun! s:NetGetcwd(doesc) +" call Dfunc("NetGetcwd(doesc=".a:doesc.")") + let curdir= substitute(getcwd(),'\\','/','ge') + if curdir !~ '[\/]$' + let curdir= curdir.'/' + endif + if a:doesc + let curdir= escape(curdir,s:netrw_cd_escape) + endif +" call Dret("NetGetcwd <".curdir.">") + return curdir +endfun " --------------------------------------------------------------------- " SetSort: sets up the sort based on the g:netrw_sort_sequence {{{2 @@ -4200,7 +4829,7 @@ endif " front. An "*" pattern handles the default priority. fun! s:SetSort() " call Dfunc("SetSort() bannercnt=".w:netrw_bannercnt) - if w:netrw_longlist == 1 + if w:netrw_liststyle == s:LONGLIST let seqlist = substitute(g:netrw_sort_sequence,'\$','\\%(\t\\|\$\\)','ge') else let seqlist = g:netrw_sort_sequence @@ -4255,66 +4884,403 @@ fun! s:SetSort() " call Dret("SetSort") endfun +" ===================================================================== +" Support Functions: {{{1 + " --------------------------------------------------------------------- -" SaveWinVars: (used by Explore()) {{{2 -fun! s:SaveWinVars() -" call Dfunc("SaveWinVars()") - if exists("w:netrw_bannercnt") |let s:bannercnt = w:netrw_bannercnt |endif - if exists("w:netrw_method") |let s:method = w:netrw_method |endif - if exists("w:netrw_prvdir") |let s:prvdir = w:netrw_prvdir |endif - if exists("w:netrw_explore_indx") |let s:explore_indx = w:netrw_explore_indx |endif - if exists("w:netrw_explore_listlen")|let s:explore_listlen = w:netrw_explore_listlen|endif - if exists("w:netrw_explore_mtchcnt")|let s:explore_mtchcnt = w:netrw_explore_mtchcnt|endif - if exists("w:netrw_explore_bufnr") |let s:explore_bufnr = w:netrw_explore_bufnr |endif - if exists("w:netrw_explore_line") |let s:explore_line = w:netrw_explore_line |endif - if exists("w:netrw_explore_list") |let s:explore_list = w:netrw_explore_list |endif -" call Dret("SaveWinVars") +" ComposePath: Appends a new part to a path taking different systems into consideration {{{2 +fun! s:ComposePath(base,subdir) +" call Dfunc("s:ComposePath(base<".a:base."> subdir<".a:subdir.">)") + if(has("amiga")) + let ec = a:base[strlen(a:base)-1] + if ec != '/' && ec != ':' + let ret = a:base . "/" . a:subdir + else + let ret = a:base . a:subdir + endif + elseif a:base =~ '^\a\+://' + let urlbase = substitute(a:base,'^\(\a\+://.\{-}/\)\(.*\)$','\1','') + let curpath = substitute(a:base,'^\(\a\+://.\{-}/\)\(.*\)$','\2','') + let ret = urlbase.curpath.a:subdir +" call Decho("urlbase<".urlbase.">") +" call Decho("curpath<".curpath.">") +" call Decho("ret<".ret.">") + else + let ret = substitute(a:base."/".a:subdir,"//","/","g") + endif +" call Dret("s:ComposePath ".ret) + return ret +endfun + +" --------------------------------------------------------------------- +" netrw#ErrorMsg: {{{2 +" 0=note = s:NOTE +" 1=warning = s:WARNING +" 2=error = s:ERROR +" Mar 19, 2007 : max errnum currently is 49 +fun! netrw#ErrorMsg(level,msg,errnum) +" call Dfunc("netrw#ErrorMsg(level=".a:level." msg<".a:msg."> errnum=".a:errnum.")") + + " record current window number for NetRestorePosn()'s benefit + let s:winBeforeErr= winnr() + + " getting messages out reliably is just plain difficult! + " This attempt splits the current window, creating a one line window. + let errbufnum= bufnr("NetrwMessage") + + bo 1split + enew + setlocal bt=nofile + file NetrwMessage + + put ='***netrw*** '.a:msg + if &fo !~ '[ta]' + syn clear + syn match netrwMesg "^\*\*\*netrw\*\*\*" + if a:level == s:WARNING + hi link netrwMesg WarningMsg + elseif a:level == s:ERROR + hi link netrwMesg Error + endif + endif + 1d + setlocal noma ro bh=wipe + +" call Dret("netrw#ErrorMsg") +endfun + +" --------------------------------------------------------------------- +" netrw#RFC2396: converts %xx into characters {{{2 +fun! netrw#RFC2396(fname) +" call Dfunc("netrw#RFC2396(fname<".a:fname.">)") + let fname = escape(substitute(a:fname,'%\(\x\x\)','\=nr2char("0x".submatch(1))','ge')," \t") +" call Dret("netrw#RFC2396 ".fname) + return fname +endfun + +" --------------------------------------------------------------------- +" s:FileReadable: o/s independent filereadable {{{2 +fun! s:FileReadable(fname) +" call Dfunc("s:FileReadable(fname<".a:fname.">)") + + if g:netrw_cygwin + let ret= filereadable(substitute(a:fname,'/cygdrive/\(.\)','\1:/','')) + else + let ret= filereadable(a:fname) + endif + +" call Dret("s:FileReadable ".ret) + return ret +endfun + +" --------------------------------------------------------------------- +" s:GetTempfile: gets a tempname that'll work for various o/s's {{{2 +" Places correct suffix on end of temporary filename, +" using the suffix provided with fname +fun! s:GetTempfile(fname) +" call Dfunc("s:GetTempfile(fname<".a:fname.">)") + + if !exists("b:netrw_tmpfile") + " get a brand new temporary filename + let tmpfile= tempname() +" call Decho("tmpfile<".tmpfile."> : from tempname()") + + let tmpfile= escape(substitute(tmpfile,'\','/','ge'),g:netrw_tmpfile_escape) +" call Decho("tmpfile<".tmpfile."> : chgd any \\ -> /") + + " sanity check -- does the temporary file's directory exist? + if !isdirectory(substitute(tmpfile,'[^/]\+$','','e')) + call netrw#ErrorMsg(s:ERROR,"your <".substitute(tmpfile,'[^/]\+$','','e')."> directory is missing!",2) +" call Dret("s:GetTempfile getcwd<".getcwd().">") + return "" + endif + + " let netrw#NetSource() know about the tmpfile + let s:netrw_tmpfile= tmpfile " used by netrw#NetSource() +" call Decho("tmpfile<".tmpfile."> s:netrw_tmpfile<".s:netrw_tmpfile.">") + + " o/s dependencies + if g:netrw_cygwin == 1 + let tmpfile = substitute(tmpfile,'^\(\a\):','/cygdrive/\1','e') + elseif has("win32") || has("win95") || has("win64") || has("win16") + let tmpfile = substitute(tmpfile,'/','\\','g') + else + let tmpfile = tmpfile + endif + let b:netrw_tmpfile= tmpfile +" call Decho("o/s dependent fixed tempname<".tmpfile.">") + else + " re-use temporary filename + let tmpfile= b:netrw_tmpfile +" call Decho("tmpfile<".tmpfile."> re-using") + endif + + " use fname's suffix for the temporary file + if a:fname != "" + if a:fname =~ '\.[^./]\+$' +" call Decho("using fname<".a:fname.">'s suffix") + if a:fname =~ '.tar.gz' || a:fname =~ '.tar.bz2' + let suffix = ".tar".substitute(a:fname,'^.*\(\.[^./]\+\)$','\1','e') + else + let suffix = substitute(a:fname,'^.*\(\.[^./]\+\)$','\1','e') + endif + let suffix = escape(suffix,g:netrw_tmpfile_escape) +" call Decho("suffix<".suffix.">") + let tmpfile= substitute(tmpfile,'\.tmp$','','e') +" call Decho("chgd tmpfile<".tmpfile."> (removed any .tmp suffix)") + let tmpfile .= suffix +" call Decho("chgd tmpfile<".tmpfile."> (added ".suffix." suffix) netrw_fname<".b:netrw_fname.">") + let s:netrw_tmpfile= tmpfile " supports netrw#NetSource() + endif + endif + +" call Dret("s:GetTempfile <".tmpfile.">") + return tmpfile +endfun + +" --------------------------------------------------------------------- +" s:MakeSshCmd: transforms input command using USEPORT HOSTNAME into {{{2 +" a correct command +fun! s:MakeSshCmd(sshcmd) +" call Dfunc("s:MakeSshCmd(sshcmd<".a:sshcmd.">)") + let sshcmd = substitute(a:sshcmd,'\',s:user.s:machine,'') + if exists("g:netrw_port") && g:netrw_port != "" + let sshcmd= substitute(sshcmd,"USEPORT",'-P '.g:netrw_port,'') + elseif exists("s:port") && s:port != "" + let sshcmd= substitute(sshcmd,"USEPORT",'-P '.s:port,'') + else + let sshcmd= substitute(sshcmd,"USEPORT ",'','') + endif +" call Dret("s:MakeSshCmd <".sshcmd.">") + return sshcmd +endfun + +" --------------------------------------------------------------------- +" s:NetrwEnew: opens a new buffer, passes netrw buffer variables through {{{2 +fun! s:NetrwEnew(curdir) +" call Dfunc("s:NetrwEnew(curdir<".a:curdir.">) expand(%)<".expand("%").">") + + " grab a function-local copy of buffer variables + if exists("b:netrw_bannercnt") |let netrw_bannercnt = b:netrw_bannercnt |endif + if exists("b:netrw_browser_active") |let netrw_browser_active = b:netrw_browser_active |endif + if exists("b:netrw_cpf") |let netrw_cpf = b:netrw_cpf |endif + if exists("b:netrw_curdir") |let netrw_curdir = b:netrw_curdir |endif + if exists("b:netrw_explore_bufnr") |let netrw_explore_bufnr = b:netrw_explore_bufnr |endif + if exists("b:netrw_explore_indx") |let netrw_explore_indx = b:netrw_explore_indx |endif + if exists("b:netrw_explore_line") |let netrw_explore_line = b:netrw_explore_line |endif + if exists("b:netrw_explore_list") |let netrw_explore_list = b:netrw_explore_list |endif + if exists("b:netrw_explore_listlen")|let netrw_explore_listlen = b:netrw_explore_listlen|endif + if exists("b:netrw_explore_mtchcnt")|let netrw_explore_mtchcnt = b:netrw_explore_mtchcnt|endif + if exists("b:netrw_fname") |let netrw_fname = b:netrw_fname |endif + if exists("b:netrw_lastfile") |let netrw_lastfile = b:netrw_lastfile |endif + if exists("b:netrw_liststyle") |let netrw_liststyle = b:netrw_liststyle |endif + if exists("b:netrw_method") |let netrw_method = b:netrw_method |endif + if exists("b:netrw_option") |let netrw_option = b:netrw_option |endif + if exists("b:netrw_prvdir") |let netrw_prvdir = b:netrw_prvdir |endif + + if getline(2) =~ '^" Netrw Directory Listing' +" call Decho("generate a buffer with keepjumps keepalt enew! (1)") + keepjumps keepalt enew! + else +" call Decho("generate a buffer with keepjumps enew! (2)") + keepjumps enew! + endif + + " copy function-local variables to buffer variable equivalents + if exists("netrw_bannercnt") |let b:netrw_bannercnt = netrw_bannercnt |endif + if exists("netrw_browser_active") |let b:netrw_browser_active = netrw_browser_active |endif + if exists("netrw_cpf") |let b:netrw_cpf = netrw_cpf |endif + if exists("netrw_curdir") |let b:netrw_curdir = netrw_curdir |endif + if exists("netrw_explore_bufnr") |let b:netrw_explore_bufnr = netrw_explore_bufnr |endif + if exists("netrw_explore_indx") |let b:netrw_explore_indx = netrw_explore_indx |endif + if exists("netrw_explore_line") |let b:netrw_explore_line = netrw_explore_line |endif + if exists("netrw_explore_list") |let b:netrw_explore_list = netrw_explore_list |endif + if exists("netrw_explore_listlen")|let b:netrw_explore_listlen = netrw_explore_listlen|endif + if exists("netrw_explore_mtchcnt")|let b:netrw_explore_mtchcnt = netrw_explore_mtchcnt|endif + if exists("netrw_fname") |let b:netrw_fname = netrw_fname |endif + if exists("netrw_lastfile") |let b:netrw_lastfile = netrw_lastfile |endif + if exists("netrw_liststyle") |let b:netrw_liststyle = netrw_liststyle |endif + if exists("netrw_method") |let b:netrw_method = netrw_method |endif + if exists("netrw_option") |let b:netrw_option = netrw_option |endif + if exists("netrw_prvdir") |let b:netrw_prvdir = netrw_prvdir |endif + + let b:netrw_curdir= a:curdir + if b:netrw_curdir =~ '/$' + if exists("w:netrw_liststyle") && w:netrw_liststyle == s:TREELIST + file NetrwTreeListing + else + exe "silent! file ".b:netrw_curdir + endif + endif + +" call Dret("s:NetrwEnew : buf#".bufnr("%")) +endfun + +" ------------------------------------------------------------------------ +" s:RemotePathAnalysis: {{{2 +fun! s:RemotePathAnalysis(dirname) +" call Dfunc("s:RemotePathAnalysis()") + + let dirpat = '^\(\w\{-}\)://\(\w\+@\)\=\([^/:#]\+\)\%([:#]\(\d\+\)\)\=/\(.*\)$' + let s:method = substitute(a:dirname,dirpat,'\1','') + let s:user = substitute(a:dirname,dirpat,'\2','') + let s:machine = substitute(a:dirname,dirpat,'\3','') + let s:port = substitute(a:dirname,dirpat,'\4','') + let s:path = substitute(a:dirname,dirpat,'\5','') + let s:fname = substitute(a:dirname,'^.*/\ze.','','') + +" call Decho("set up s:method <".s:method .">") +" call Decho("set up s:user <".s:user .">") +" call Decho("set up s:machine<".s:machine.">") +" call Decho("set up s:port <".s:port.">") +" call Decho("set up s:path <".s:path .">") +" call Decho("set up s:fname <".s:fname .">") + +" call Dret("s:RemotePathAnalysis") endfun " --------------------------------------------------------------------- -" CopyWinVars: (used by Explore()) {{{2 -fun! s:CopyWinVars() -" call Dfunc("CopyWinVars()") +" s:RestoreBufVars: {{{2 +fun! s:RestoreBufVars() +" call Dfunc("s:RestoreBufVars()") + + if exists("s:netrw_curdir") |let b:netrw_curdir = s:netrw_curdir |endif + if exists("s:netrw_lastfile") |let b:netrw_lastfile = s:netrw_lastfile |endif + if exists("s:netrw_method") |let b:netrw_method = s:netrw_method |endif + if exists("s:netrw_fname") |let b:netrw_fname = s:netrw_fname |endif + if exists("s:netrw_machine") |let b:netrw_machine = s:netrw_machine |endif + if exists("s:netrw_browser_active")|let b:netrw_browser_active = s:netrw_browser_active|endif + +" call Dret("s:RestoreBufVars") +endfun + +" --------------------------------------------------------------------- +" s:RestoreWinVars: (used by Explore() and NetSplit()) {{{2 +fun! s:RestoreWinVars() +" call Dfunc("s:RestoreWinVars()") if exists("s:bannercnt") |let w:netrw_bannercnt = s:bannercnt |unlet s:bannercnt |endif - if exists("s:method") |let w:netrw_method = s:method |unlet s:method |endif - if exists("s:prvdir") |let w:netrw_prvdir = s:prvdir |unlet s:prvdir |endif - if exists("s:explore_indx") |let w:netrw_explore_indx = s:explore_indx |unlet s:explore_indx |endif - if exists("s:explore_listlen")|let w:netrw_explore_listlen = s:explore_listlen|unlet s:explore_listlen|endif - if exists("s:explore_mtchcnt")|let w:netrw_explore_mtchcnt = s:explore_mtchcnt|unlet s:explore_mtchcnt|endif + if exists("s:col") |let w:netrw_col = s:col |unlet s:col |endif + if exists("s:curdir") |let w:netrw_curdir = s:curdir |unlet s:curdir |endif if exists("s:explore_bufnr") |let w:netrw_explore_bufnr = s:explore_bufnr |unlet s:explore_bufnr |endif + if exists("s:explore_indx") |let w:netrw_explore_indx = s:explore_indx |unlet s:explore_indx |endif if exists("s:explore_line") |let w:netrw_explore_line = s:explore_line |unlet s:explore_line |endif + if exists("s:explore_listlen")|let w:netrw_explore_listlen = s:explore_listlen|unlet s:explore_listlen|endif if exists("s:explore_list") |let w:netrw_explore_list = s:explore_list |unlet s:explore_list |endif -" call Dret("CopyWinVars") + if exists("s:explore_mtchcnt")|let w:netrw_explore_mtchcnt = s:explore_mtchcnt|unlet s:explore_mtchcnt|endif + if exists("s:fpl") |let w:netrw_fpl = s:fpl |unlet s:fpl |endif + if exists("s:hline") |let w:netrw_hline = s:hline |unlet s:hline |endif + if exists("s:line") |let w:netrw_line = s:line |unlet s:line |endif + if exists("s:liststyle") |let w:netrw_liststyle = s:liststyle |unlet s:liststyle |endif + if exists("s:method") |let w:netrw_method = s:method |unlet s:method |endif + if exists("s:prvdir") |let w:netrw_prvdir = s:prvdir |unlet s:prvdir |endif + if exists("s:treedict") |let w:netrw_treedict = s:treedict |unlet s:treedict |endif + if exists("s:treetop") |let w:netrw_treetop = s:treetop |unlet s:treetop |endif + if exists("s:winnr") |let w:netrw_winnr = s:winnr |unlet s:winnr |endif +" call Dret("s:RestoreWinVars") +endfun + +" --------------------------------------------------------------------- +" s:SaveBufVars: {{{2 +fun! s:SaveBufVars() +" call Dfunc("s:SaveBufVars()") + + if exists("b:netrw_curdir") |let s:netrw_curdir = b:netrw_curdir |endif + if exists("b:netrw_lastfile") |let s:netrw_lastfile = b:netrw_lastfile |endif + if exists("b:netrw_method") |let s:netrw_method = b:netrw_method |endif + if exists("b:netrw_fname") |let s:netrw_fname = b:netrw_fname |endif + if exists("b:netrw_machine") |let s:netrw_machine = b:netrw_machine |endif + if exists("b:netrw_browser_active")|let s:netrw_browser_active = b:netrw_browser_active|endif + +" call Dret("s:SaveBufVars") +endfun + +" --------------------------------------------------------------------- +" s:SaveWinVars: (used by Explore() and NetSplit()) {{{2 +fun! s:SaveWinVars() +" call Dfunc("s:SaveWinVars()") + if exists("w:netrw_bannercnt") |let s:bannercnt = w:netrw_bannercnt |endif + if exists("w:netrw_col") |let s:col = w:netrw_col |endif + if exists("w:netrw_curdir") |let s:curdir = w:netrw_curdir |endif + if exists("w:netrw_explore_bufnr") |let s:explore_bufnr = w:netrw_explore_bufnr |endif + if exists("w:netrw_explore_indx") |let s:explore_indx = w:netrw_explore_indx |endif + if exists("w:netrw_explore_line") |let s:explore_line = w:netrw_explore_line |endif + if exists("w:netrw_explore_listlen")|let s:explore_listlen = w:netrw_explore_listlen|endif + if exists("w:netrw_explore_list") |let s:explore_list = w:netrw_explore_list |endif + if exists("w:netrw_explore_mtchcnt")|let s:explore_mtchcnt = w:netrw_explore_mtchcnt|endif + if exists("w:netrw_fpl") |let s:fpl = w:netrw_fpl |endif + if exists("w:netrw_hline") |let s:hline = w:netrw_hline |endif + if exists("w:netrw_line") |let s:line = w:netrw_line |endif + if exists("w:netrw_liststyle") |let s:liststyle = w:netrw_liststyle |endif + if exists("w:netrw_method") |let s:method = w:netrw_method |endif + if exists("w:netrw_prvdir") |let s:prvdir = w:netrw_prvdir |endif + if exists("w:netrw_treedict") |let s:treedict = w:netrw_treedict |endif + if exists("w:netrw_treetop") |let s:treetop = w:netrw_treetop |endif + if exists("w:netrw_winnr") |let s:winnr = w:netrw_winnr |endif +" call Dret("s:SaveWinVars") endfun " --------------------------------------------------------------------- -" SetBufWinVars: (used by NetBrowse() and LocalBrowse()) {{{2 +" s:SetBufWinVars: (used by NetBrowse() and LocalBrowseCheck()) {{{2 " To allow separate windows to have their own activities, such as " Explore **/pattern, several variables have been made window-oriented. " However, when the user splits a browser window (ex: ctrl-w s), these " variables are not inherited by the new window. SetBufWinVars() and " UseBufWinVars() get around that. fun! s:SetBufWinVars() -" call Dfunc("SetBufWinVars()") - if exists("w:netrw_longlist") |let b:netrw_longlist = w:netrw_longlist |endif - if exists("w:netrw_bannercnt") |let b:netrw_bannercnt = w:netrw_bannercnt |endif - if exists("w:netrw_method") |let b:netrw_method = w:netrw_method |endif - if exists("w:netrw_prvdir") |let b:netrw_prvdir = w:netrw_prvdir |endif - if exists("w:netrw_explore_indx") |let b:netrw_explore_indx = w:netrw_explore_indx |endif - if exists("w:netrw_explore_listlen")|let b:netrw_explore_listlen = w:netrw_explore_listlen|endif - if exists("w:netrw_explore_mtchcnt")|let b:netrw_explore_mtchcnt = w:netrw_explore_mtchcnt|endif - if exists("w:netrw_explore_bufnr") |let b:netrw_explore_bufnr = w:netrw_explore_bufnr |endif - if exists("w:netrw_explore_line") |let b:netrw_explore_line = w:netrw_explore_line |endif - if exists("w:netrw_explore_list") |let b:netrw_explore_list = w:netrw_explore_list |endif -" call Dret("SetBufWinVars") +" call Dfunc("s:SetBufWinVars()") + if exists("w:netrw_liststyle") |let b:netrw_liststyle = w:netrw_liststyle |endif + if exists("w:netrw_bannercnt") |let b:netrw_bannercnt = w:netrw_bannercnt |endif + if exists("w:netrw_method") |let b:netrw_method = w:netrw_method |endif + if exists("w:netrw_prvdir") |let b:netrw_prvdir = w:netrw_prvdir |endif + if exists("w:netrw_explore_indx") |let b:netrw_explore_indx = w:netrw_explore_indx |endif + if exists("w:netrw_explore_listlen")|let b:netrw_explore_listlen= w:netrw_explore_listlen|endif + if exists("w:netrw_explore_mtchcnt")|let b:netrw_explore_mtchcnt= w:netrw_explore_mtchcnt|endif + if exists("w:netrw_explore_bufnr") |let b:netrw_explore_bufnr = w:netrw_explore_bufnr |endif + if exists("w:netrw_explore_line") |let b:netrw_explore_line = w:netrw_explore_line |endif + if exists("w:netrw_explore_list") |let b:netrw_explore_list = w:netrw_explore_list |endif +" call Dret("s:SetBufWinVars") +endfun + +" --------------------------------------------------------------------- +" s:System: using Steve Hall's idea to insure that Windows paths stay {{{2 +" acceptable. No effect on Unix paths. +" Examples of use: let result= s:System("system",path) +" let result= s:System("delete",path) +fun! s:System(cmd,path) +" call Dfunc("s:System(cmd<".a:cmd."> path<".a:path.">)") + + let path = a:path + if (has("win32") || has("win95") || has("win64") || has("win16")) + " system call prep + " remove trailing slash (Win95) + let path = substitute(path, '\(\\\|/\)$', '', 'g') + " remove escaped spaces + let path = substitute(path, '\ ', ' ', 'g') + " convert slashes to backslashes + let path = substitute(path, '/', '\', 'g') + if exists("+shellslash") + let sskeep= &shellslash + setlocal noshellslash + exe "let result= ".a:cmd."('".path."')" + let &shellslash = sskeep + else + exe "let result= ".a:cmd."(".g:netrw_shq.path.g:netrw_shq.")" + endif + else + exe "let result= ".a:cmd."('".path."')" + endif + +" call Decho("result<".result.">") +" call Dret("s:System") + return result endfun " --------------------------------------------------------------------- -" UseBufWinVars: (used by NetBrowse() and LocalBrowse() {{{2 +" s:UseBufWinVars: (used by NetBrowse() and LocalBrowseCheck() {{{2 " Matching function to BufferWinVars() fun! s:UseBufWinVars() -" call Dfunc("UseBufWinVars()") - if exists("b:netrw_longlist") && !exists("w:netrw_longlist") |let w:netrw_longlist = b:netrw_longlist |endif +" call Dfunc("s:UseBufWinVars()") + if exists("b:netrw_liststyle") && !exists("w:netrw_liststyle") |let w:netrw_liststyle = b:netrw_liststyle |endif if exists("b:netrw_bannercnt") && !exists("w:netrw_bannercnt") |let w:netrw_bannercnt = b:netrw_bannercnt |endif if exists("b:netrw_method") && !exists("w:netrw_method") |let w:netrw_method = b:netrw_method |endif if exists("b:netrw_prvdir") && !exists("w:netrw_prvdir") |let w:netrw_prvdir = b:netrw_prvdir |endif @@ -4324,19 +5290,10 @@ fun! s:UseBufWinVars() if exists("b:netrw_explore_bufnr") && !exists("w:netrw_explore_bufnr") |let w:netrw_explore_bufnr = b:netrw_explore_bufnr |endif if exists("b:netrw_explore_line") && !exists("w:netrw_explore_line") |let w:netrw_explore_line = b:netrw_explore_line |endif if exists("b:netrw_explore_list") && !exists("w:netrw_explore_list") |let w:netrw_explore_list = b:netrw_explore_list |endif -" call Dret("UseBufWinVars") +" call Dret("s:UseBufWinVars") endfun " --------------------------------------------------------------------- -" RFC2396: converts %xx into characters {{{2 -fun! netrw#RFC2396(fname) -" call Dfunc("RFC2396(fname<".a:fname.">)") - let fname = escape(substitute(a:fname,'%\(\x\x\)','\=nr2char("0x".submatch(1))','ge')," \t") -" call Dret("RFC2396 ".fname) - return fname -endfun - -" ------------------------------------------------------------------------ " Settings Restoration: {{{2 let &cpo= s:keepcpo unlet s:keepcpo diff --git a/runtime/autoload/pythoncomplete.vim b/runtime/autoload/pythoncomplete.vim index ee217ed2c..2f52f97e2 100644 --- a/runtime/autoload/pythoncomplete.vim +++ b/runtime/autoload/pythoncomplete.vim @@ -1,16 +1,34 @@ "pythoncomplete.vim - Omni Completion for python " Maintainer: Aaron Griffin -" Version: 0.5 -" Last Updated: 19 April 2006 -" -" Yeah, I skipped a version number - 0.4 was never public. -" It was a bugfix version on top of 0.3. This is a complete -" rewrite. +" Version: 0.7 +" Last Updated: 19 Oct 2006 " +" Changes " TODO: " User defined docstrings aren't handled right... " 'info' item output can use some formatting work " Add an "unsafe eval" mode, to allow for return type evaluation +" Complete basic syntax along with import statements +" i.e. "import url" +" Continue parsing on invalid line?? +" +" v 0.7 +" * Fixed function list sorting (_ and __ at the bottom) +" * Removed newline removal from docs. It appears vim handles these better in +" recent patches +" +" v 0.6: +" * Fixed argument completion +" * Removed the 'kind' completions, as they are better indicated +" with real syntax +" * Added tuple assignment parsing (whoops, that was forgotten) +" * Fixed import handling when flattening scope +" +" v 0.5: +" Yeah, I skipped a version number - 0.4 was never public. +" It was a bugfix version on top of 0.3. This is a complete +" rewrite. +" if !has('python') echo "Error: Required vim compiled with +python" @@ -28,7 +46,7 @@ function! pythoncomplete#Complete(findstart, base) if c =~ '\w' continue elseif ! c =~ '\.' - idx = -1 + let idx = -1 break else break @@ -45,7 +63,7 @@ function! pythoncomplete#Complete(findstart, base) while idx > 0 let idx -= 1 let c = line[idx] - if c =~ '\w' || c =~ '\.' + if c =~ '\w' || c =~ '\.' || c == '(' let cword = c . cword continue elseif strlen(cword) > 0 || idx == 0 @@ -73,7 +91,24 @@ def vimcomplete(context,match): try: import vim def complsort(x,y): - return x['abbr'] > y['abbr'] + try: + xa = x['abbr'] + ya = y['abbr'] + if xa[0] == '_': + if xa[1] == '_' and ya[0:2] == '__': + return xa > ya + elif ya[0:2] == '__': + return -1 + elif y[0] == '_': + return xa > ya + else: + return 1 + elif ya[0] == '_': + return -1 + else: + return xa > ya + except: + return 0 cmpl = Completer() cmpl.evalsource('\n'.join(vim.current.buffer),vim.eval("line('.')")) all = cmpl.get_completions(context,match) @@ -86,7 +121,7 @@ def vimcomplete(context,match): dictstr += '"icase":0},' if dictstr[-1] == ',': dictstr = dictstr[:-1] dictstr += ']' - dbg("dict: %s" % dictstr) + #dbg("dict: %s" % dictstr) vim.command("silent let g:pythoncomplete_completions = %s" % dictstr) #dbg("Completion dict:\n%s" % all) except vim.error: @@ -108,11 +143,7 @@ class Completer(object): except: dbg("locals: %s, %s [%s]" % (sys.exc_info()[0],sys.exc_info()[1],l)) def _cleanstr(self,doc): - return doc.replace('"',' ')\ - .replace("'",' ')\ - .replace('\n',' ')\ - .replace('\r',' ')\ - .replace(' ',' ') + return doc.replace('"',' ').replace("'",' ') def get_arguments(self,func_obj): def _ctor(obj): @@ -128,23 +159,23 @@ class Completer(object): elif type(func_obj) == types.MethodType: func_obj = func_obj.im_func else: arg_offset = 0 - arg_text = ')' + arg_text='' if type(func_obj) in [types.FunctionType, types.LambdaType]: try: cd = func_obj.func_code real_args = cd.co_varnames[arg_offset:cd.co_argcount] - defaults = func_obj.func_defaults or [] - defaults = [map(lambda name: "=%s" % name, defaults)] + defaults = func_obj.func_defaults or '' + defaults = map(lambda name: "=%s" % name, defaults) defaults = [""] * (len(real_args)-len(defaults)) + defaults items = map(lambda a,d: a+d, real_args, defaults) if func_obj.func_code.co_flags & 0x4: items.append("...") if func_obj.func_code.co_flags & 0x8: items.append("***") - arg_text = ", ".join(items) + ')' + arg_text = (','.join(items)) + ')' except: - dbg("completion: %s: %s" % (sys.exc_info()[0],sys.exc_info()[1])) + dbg("arg completion: %s: %s" % (sys.exc_info()[0],sys.exc_info()[1])) pass if len(arg_text) == 0: # The doc string sometimes contains the function signature @@ -160,6 +191,7 @@ class Completer(object): ridx = sigline.find(')') if lidx > 0 and ridx > 0: arg_text = sigline[lidx+1:ridx] + ')' + if len(arg_text) == 0: arg_text = ')' return arg_text def get_completions(self,context,match): @@ -172,12 +204,11 @@ class Completer(object): all = {} ridx = stmt.rfind('.') if len(stmt) > 0 and stmt[-1] == '(': - #TODO result = eval(_sanitize(stmt[:-1]), self.compldict) doc = result.__doc__ if doc == None: doc = '' - args = self.get_arguments(res) - return [{'word':self._cleanstr(args),'info':self._cleanstr(doc),'kind':'p'}] + args = self.get_arguments(result) + return [{'word':self._cleanstr(args),'info':self._cleanstr(doc)}] elif ridx == -1: match = stmt all = self.compldict @@ -206,22 +237,18 @@ class Completer(object): if doc == None or doc == '': doc = maindoc wrd = m[len(match):] - c = {'word':wrd, 'abbr':m, 'info':self._cleanstr(doc),'kind':'m'} + c = {'word':wrd, 'abbr':m, 'info':self._cleanstr(doc)} if "function" in typestr: c['word'] += '(' c['abbr'] += '(' + self._cleanstr(self.get_arguments(inst)) - c['kind'] = 'f' elif "method" in typestr: c['word'] += '(' c['abbr'] += '(' + self._cleanstr(self.get_arguments(inst)) - c['kind'] = 'f' elif "module" in typestr: c['word'] += '.' - c['kind'] = 'm' elif "class" in typestr: c['word'] += '(' c['abbr'] += '(' - c['kind']='c' completions.append(c) except: i = sys.exc_info() @@ -277,10 +304,13 @@ class Scope(object): # we need to start with this, to fix up broken completions # hopefully this name is unique enough... str = '"""'+self.docstr+'"""\n' + for l in self.locals: + if l.startswith('import'): str += l+'\n' str += 'class _PyCmplNoType:\n def __getattr__(self,name):\n return None\n' for sub in self.subscopes: str += sub.get_code() - #str += '\n'.join(self.locals)+'\n' + for l in self.locals: + if not l.startswith('import'): str += l+'\n' return str @@ -420,6 +450,8 @@ class PyParser: tokentype, token, indent = self.next() if tokentype == tokenize.STRING or token == 'str': return '""' + elif token == '(' or token == 'tuple': + return '()' elif token == '[' or token == 'list': return '[]' elif token == '{' or token == 'dict': @@ -494,9 +526,9 @@ class PyParser: freshscope=True while True: tokentype, token, indent = self.next() - #print 'main: token=[%s] indent=[%s]' % (token,indent) + #dbg( 'main: token=[%s] indent=[%s]' % (token,indent)) - if tokentype == DEDENT: + if tokentype == DEDENT or token == "pass": self.scope = self.scope.pop(indent) elif token == 'def': func = self._parsefunction(indent) diff --git a/runtime/autoload/rubycomplete.vim b/runtime/autoload/rubycomplete.vim index 9cde21494..5b728607c 100644 --- a/runtime/autoload/rubycomplete.vim +++ b/runtime/autoload/rubycomplete.vim @@ -5,6 +5,7 @@ " URL: http://vim-ruby.rubyforge.org " Anon CVS: See above site " Release Coordinator: Doug Kearns +" Maintainer Version: 0.8 " ---------------------------------------------------------------------------- " " Ruby IRB/Complete author: Keiju ISHITSUKA(keiju@ishitsuka.com) @@ -12,20 +13,20 @@ " {{{ requirement checks if !has('ruby') - echohl ErrorMsg - echo "Error: Required vim compiled with +ruby" - echohl None + s:ErrMsg( "Error: Rubycomplete requires vim compiled with +ruby" ) + s:ErrMsg( "Error: falling back to syntax completion" ) + " lets fall back to syntax completion + setlocal omnifunc=syntaxcomplete#Complete finish endif if version < 700 - echohl ErrorMsg - echo "Error: Required vim >= 7.0" - echohl None + s:ErrMsg( "Error: Required vim >= 7.0" ) finish endif " }}} requirement checks +" {{{ configuration failsafe initialization if !exists("g:rubycomplete_rails") let g:rubycomplete_rails = 0 endif @@ -34,76 +35,131 @@ if !exists("g:rubycomplete_classes_in_global") let g:rubycomplete_classes_in_global = 0 endif +if !exists("g:rubycomplete_buffer_loading") + let g:rubycomplete_classes_in_global = 0 +endif + +if !exists("g:rubycomplete_include_object") + let g:rubycomplete_include_object = 0 +endif + +if !exists("g:rubycomplete_include_objectspace") + let g:rubycomplete_include_objectspace = 0 +endif +" }}} configuration failsafe initialization + " {{{ vim-side support functions -function! GetBufferRubyModule(name) - let [snum,enum] = GetBufferRubyEntity(a:name, "module") +let s:rubycomplete_debug = 0 + +function! s:ErrMsg(msg) + echohl ErrorMsg + echo a:msg + echohl None +endfunction + +function! s:dprint(msg) + if s:rubycomplete_debug == 1 + echom a:msg + endif +endfunction + +function! s:GetBufferRubyModule(name, ...) + if a:0 == 1 + let [snum,enum] = s:GetBufferRubyEntity(a:name, "module", a:1) + else + let [snum,enum] = s:GetBufferRubyEntity(a:name, "module") + endif return snum . '..' . enum endfunction -function! GetBufferRubyClass(name) - let [snum,enum] = GetBufferRubyEntity(a:name, "class") +function! s:GetBufferRubyClass(name, ...) + if a:0 >= 1 + let [snum,enum] = s:GetBufferRubyEntity(a:name, "class", a:1) + else + let [snum,enum] = s:GetBufferRubyEntity(a:name, "class") + endif return snum . '..' . enum endfunction -function! GetBufferRubySingletonMethods(name) +function! s:GetBufferRubySingletonMethods(name) endfunction -function! GetBufferRubyEntity( name, type ) +function! s:GetBufferRubyEntity( name, type, ... ) + let lastpos = getpos(".") + let lastline = lastpos + if (a:0 >= 1) + let lastline = [ 0, a:1, 0, 0 ] + call cursor( a:1, 0 ) + endif + let stopline = 1 - let crex = '^\s*' . a:type . '\s*' . a:name . '\s*\(<\s*.*\s*\)\?\n*\(\(\s\|#\).*\n*\)*\n*\s*end$' - let [lnum,lcol] = searchpos( crex, 'nbw') + + let crex = '^\s*\<' . a:type . '\>\s*\<' . a:name . '\>\s*\(<\s*.*\s*\)\?' + let [lnum,lcol] = searchpos( crex, 'w' ) + "let [lnum,lcol] = searchpairpos( crex . '\zs', '', '\(end\|}\)', 'w' ) + if lnum == 0 && lcol == 0 + call cursor(lastpos[1], lastpos[2]) return [0,0] endif - let [enum,ecol] = searchpos( crex, 'nebw') + let curpos = getpos(".") + let [enum,ecol] = searchpairpos( crex, '', '\(end\|}\)', 'wr' ) + call cursor(lastpos[1], lastpos[2]) + if lnum > enum - let realdef = getline( lnum ) - let crexb = '^' . realdef . '\n*\(\(\s\|#\).*\n*\)*\n*\s*end$' - let [enum,ecol] = searchpos( crexb, 'necw' ) + return [0,0] endif " we found a the class def return [lnum,enum] endfunction -function! IsInClassDef() - let [snum,enum] = GetBufferRubyEntity( '.*', "class" ) +function! s:IsInClassDef() + return s:IsPosInClassDef( line('.') ) +endfunction + +function! s:IsPosInClassDef(pos) + let [snum,enum] = s:GetBufferRubyEntity( '.*', "class" ) let ret = 'nil' - let pos = line('.') - if snum < pos && pos < enum + if snum < a:pos && a:pos < enum let ret = snum . '..' . enum endif return ret endfunction -function! GetRubyVarType(v) +function! s:GetRubyVarType(v) let stopline = 1 let vtp = '' let pos = getpos('.') - let [lnum,lcol] = searchpos('^\s*#\s*@var\s*'.a:v.'\>\s\+[^ \t]\+\s*$','nb',stopline) + let sstr = '^\s*#\s*@var\s*'.a:v.'\>\s\+[^ \t]\+\s*$' + let [lnum,lcol] = searchpos(sstr,'nb',stopline) if lnum != 0 && lcol != 0 call setpos('.',pos) let str = getline(lnum) - let vtp = substitute(str,'^\s*#\s*@var\s*'.a:v.'\>\s\+\([^ \t]\+\)\s*$','\1','') + let vtp = substitute(str,sstr,'\1','') return vtp endif call setpos('.',pos) - if g:rubycomplete_rails == 1 && g:rubycomplete_rails_loaded == 1 - let ctors = '\(now\|new\|open\|get_instance\|find\|create\)' + let ctors = '\(now\|new\|open\|get_instance' + if exists('g:rubycomplete_rails') && g:rubycomplete_rails == 1 && s:rubycomplete_rails_loaded == 1 + let ctors = ctors.'\|find\|create' else - let ctors = '\(now\|new\|open\|get_instance\)' endif + let ctors = ctors.'\)' - let [lnum,lcol] = searchpos(''.a:v.'\>\s*[+\-*/]*=\s*\([^ \t]\+.' . ctors .'\>\|[\[{"''/]\|%r{\|[A-Za-z0-9@:\-()]\+...\?\)','nb',stopline) + let fstr = '=\s*\([^ \t]\+.' . ctors .'\>\|[\[{"''/]\|%[xwQqr][(\[{@]\|[A-Za-z0-9@:\-()\.]\+...\?\|lambda\|&\)' + let sstr = ''.a:v.'\>\s*[+\-*/]*'.fstr + let [lnum,lcol] = searchpos(sstr,'nb',stopline) if lnum != 0 && lcol != 0 - let str = matchstr(getline(lnum),'=\s*\([^ \t]\+.' . ctors . '\>\|[\[{"''/]\|%r{\|[A-Za-z0-9@:\-()]\+...\?\)',lcol) + let str = matchstr(getline(lnum),fstr,lcol) let str = substitute(str,'^=\s*','','') + call setpos('.',pos) - if str == '"' || str == '''' + if str == '"' || str == '''' || stridx(tolower(str), '%q[') != -1 return 'String' - elseif str == '[' + elseif str == '[' || stridx(str, '%w[') != -1 return 'Array' elseif str == '{' return 'Hash' @@ -111,6 +167,8 @@ function! GetRubyVarType(v) return 'Regexp' elseif strlen(str) >= 4 && stridx(str,'..') != -1 return 'Range' + elseif stridx(str, 'lambda') != -1 || str == '&' + return 'Proc' elseif strlen(str) > 4 let l = stridx(str,'.') return str[0:l-1] @@ -123,6 +181,11 @@ endfunction "}}} vim-side support functions +"{{{ vim-side completion function +function! rubycomplete#Init() + execute "ruby VimRubyCompletion.preload_rails" +endfunction + function! rubycomplete#Complete(findstart, base) "findstart = 1 when we need to get the text length if a:findstart @@ -145,346 +208,595 @@ function! rubycomplete#Complete(findstart, base) "findstart = 0 when we need to return the list of completions else let g:rubycomplete_completions = [] - execute "ruby get_completions('" . a:base . "')" + execute "ruby VimRubyCompletion.get_completions('" . a:base . "')" return g:rubycomplete_completions endif endfunction +"}}} vim-side completion function - +"{{{ ruby-side code function! s:DefRuby() ruby << RUBYEOF # {{{ ruby completion -RailsWords = [ - "has_many", "has_one", - "belongs_to", - ] - -ReservedWords = [ - "BEGIN", "END", - "alias", "and", - "begin", "break", - "case", "class", - "def", "defined", "do", - "else", "elsif", "end", "ensure", - "false", "for", - "if", "in", - "module", - "next", "nil", "not", - "or", - "redo", "rescue", "retry", "return", - "self", "super", - "then", "true", - "undef", "unless", "until", - "when", "while", - "yield", - ] - -Operators = [ "%", "&", "*", "**", "+", "-", "/", - "<", "<<", "<=", "<=>", "==", "===", "=~", ">", ">=", ">>", - "[]", "[]=", "^", ] - - -def load_requires - buf = VIM::Buffer.current - enum = buf.line_number - nums = Range.new( 1, enum ) - nums.each do |x| - ln = buf[x] + +begin + require 'rubygems' # let's assume this is safe...? +rescue Exception + #ignore? +end +class VimRubyCompletion +# {{{ constants + @@debug = false + @@ReservedWords = [ + "BEGIN", "END", + "alias", "and", + "begin", "break", + "case", "class", + "def", "defined", "do", + "else", "elsif", "end", "ensure", + "false", "for", + "if", "in", + "module", + "next", "nil", "not", + "or", + "redo", "rescue", "retry", "return", + "self", "super", + "then", "true", + "undef", "unless", "until", + "when", "while", + "yield", + ] + + @@Operators = [ "%", "&", "*", "**", "+", "-", "/", + "<", "<<", "<=", "<=>", "==", "===", "=~", ">", ">=", ">>", + "[]", "[]=", "^", ] +# }}} constants + +# {{{ buffer analysis magic + def load_requires + buf = VIM::Buffer.current + enum = buf.line_number + nums = Range.new( 1, enum ) + nums.each do |x| + ln = buf[x] + begin + eval( "require %s" % $1 ) if /.*require\s*(.*)$/.match( ln ) + rescue Exception + #ignore? + end + end + end + + def load_buffer_class(name) + dprint "load_buffer_class(%s) START" % name + classdef = get_buffer_entity(name, 's:GetBufferRubyClass("%s")') + return if classdef == nil + + pare = /^\s*class\s*(.*)\s*<\s*(.*)\s*\n/.match( classdef ) + load_buffer_class( $2 ) if pare != nil && $2 != name # load parent class if needed + + mixre = /.*\n\s*include\s*(.*)\s*\n/.match( classdef ) + load_buffer_module( $2 ) if mixre != nil && $2 != name # load mixins if needed + begin - eval( "require %s" % $1 ) if /.*require\s*(.*)$/.match( ln ) + eval classdef rescue Exception - #ignore? + VIM::evaluate( "s:ErrMsg( 'Problem loading class \"%s\", was it already completed?' )" % name ) end + dprint "load_buffer_class(%s) END" % name end -end -def load_buffer_class(name) - classdef = get_buffer_entity(name, 'GetBufferRubyClass("%s")') - return if classdef == nil + def load_buffer_module(name) + dprint "load_buffer_module(%s) START" % name + classdef = get_buffer_entity(name, 's:GetBufferRubyModule("%s")') + return if classdef == nil - pare = /^\s*class\s*(.*)\s*<\s*(.*)\s*\n/.match( classdef ) - load_buffer_class( $2 ) if pare != nil + begin + eval classdef + rescue Exception + VIM::evaluate( "s:ErrMsg( 'Problem loading module \"%s\", was it already completed?' )" % name ) + end + dprint "load_buffer_module(%s) END" % name + end + + def get_buffer_entity(name, vimfun) + loading_allowed = VIM::evaluate("exists('g:rubycomplete_buffer_loading') && g:rubycomplete_buffer_loading") + return nil if loading_allowed != '1' + return nil if /(\"|\')+/.match( name ) + buf = VIM::Buffer.current + nums = eval( VIM::evaluate( vimfun % name ) ) + return nil if nums == nil + return nil if nums.min == nums.max && nums.min == 0 + + dprint "get_buffer_entity START" + visited = [] + clscnt = 0 + bufname = VIM::Buffer.current.name + classdef = "" + cur_line = VIM::Buffer.current.line_number + while (nums != nil && !(nums.min == 0 && nums.max == 0) ) + dprint "visited: %s" % visited.to_s + break if visited.index( nums ) + visited << nums + + nums.each do |x| + if x != cur_line + next if x == 0 + ln = buf[x] + if /^\s*(module|class|def|include)\s+/.match(ln) + clscnt += 1 if $1 == "class" + #dprint "\$1: %s" % $1 + classdef += "%s\n" % ln + classdef += "end\n" if /def\s+/.match(ln) + dprint ln + end + end + end - mixre = /.*\n\s*include\s*(.*)\s*\n/.match( classdef ) - load_buffer_module( $2 ) if mixre != nil + nm = "%s(::.*)*\", %s, \"" % [ name, nums.last ] + nums = eval( VIM::evaluate( vimfun % nm ) ) + dprint "nm: \"%s\"" % nm + dprint "vimfun: %s" % (vimfun % nm) + dprint "got nums: %s" % nums.to_s + end + if classdef.length > 1 + classdef += "end\n"*clscnt + # classdef = "class %s\n%s\nend\n" % [ bufname.gsub( /\/|\\/, "_" ), classdef ] + end - eval classdef -end + dprint "get_buffer_entity END" + dprint "classdef====start" + lns = classdef.split( "\n" ) + lns.each { |x| dprint x } + dprint "classdef====end" + return classdef + end -def load_buffer_module(name) - classdef = get_buffer_entity(name, 'GetBufferRubyModule("%s")') - return if classdef == nil + def get_var_type( receiver ) + if /(\"|\')+/.match( receiver ) + "String" + else + VIM::evaluate("s:GetRubyVarType('%s')" % receiver) + end + end - eval classdef -end + def dprint( txt ) + print txt if @@debug + end -def get_buffer_entity(name, vimfun) - return nil if /(\"|\')+/.match( name ) - buf = VIM::Buffer.current - nums = eval( VIM::evaluate( vimfun % name ) ) - return nil if nums == nil - return nil if nums.min == nums.max && nums.min == 0 - - cur_line = VIM::Buffer.current.line_number - classdef = "" - nums.each do |x| - if x != cur_line - ln = buf[x] - classdef += "%s\n" % ln + def get_buffer_entity_list( type ) + # this will be a little expensive. + loading_allowed = VIM::evaluate("exists('g:rubycomplete_buffer_loading') && g:rubycomplete_buffer_loading") + allow_aggressive_load = VIM::evaluate("exists('g:rubycomplete_classes_in_global') && g:rubycomplete_classes_in_global") + return [] if allow_aggressive_load != '1' || loading_allowed != '1' + + buf = VIM::Buffer.current + eob = buf.length + ret = [] + rg = 1..eob + re = eval( "/^\s*%s\s*([A-Za-z0-9_:-]*)(\s*<\s*([A-Za-z0-9_:-]*))?\s*/" % type ) + + rg.each do |x| + if re.match( buf[x] ) + next if type == "def" && eval( VIM::evaluate("s:IsPosInClassDef(%s)" % x) ) != nil + ret.push $1 + end end + + return ret end - return classdef -end + def get_buffer_modules + return get_buffer_entity_list( "modules" ) + end -def get_var_type( receiver ) - if /(\"|\')+/.match( receiver ) - "String" - else - VIM::evaluate("GetRubyVarType('%s')" % receiver) + def get_buffer_methods + return get_buffer_entity_list( "def" ) end -end -def get_buffer_classes() - # this will be a little expensive. - allow_aggressive_load = VIM::evaluate('g:rubycomplete_classes_in_global') - return [] if allow_aggressive_load != '1' + def get_buffer_classes + return get_buffer_entity_list( "class" ) + end + + + def load_rails + allow_rails = VIM::evaluate("exists('g:rubycomplete_rails') && g:rubycomplete_rails") + return if allow_rails != '1' + + buf_path = VIM::evaluate('expand("%:p")') + file_name = VIM::evaluate('expand("%:t")') + vim_dir = VIM::evaluate('getcwd()') + file_dir = buf_path.gsub( file_name, '' ) + file_dir.gsub!( /\\/, "/" ) + vim_dir.gsub!( /\\/, "/" ) + vim_dir << "/" + dirs = [ vim_dir, file_dir ] + sdirs = [ "", "./", "../", "../../", "../../../", "../../../../" ] + rails_base = nil + + dirs.each do |dir| + sdirs.each do |sub| + trail = "%s%s" % [ dir, sub ] + tcfg = "%sconfig" % trail + + if File.exists?( tcfg ) + rails_base = trail + break + end + end + break if rails_base + end - buf = VIM::Buffer.current - eob = buf.length - ret = [] - rg = 1..eob + return if rails_base == nil + $:.push rails_base unless $:.index( rails_base ) - rg.each do |x| - if /^\s*class\s*([A-Za-z0-9_-]*)(\s*<\s*([A-Za-z0-9_:-]*))?\s*/.match( buf[x] ) - ret.push $1 + rails_config = rails_base + "config/" + rails_lib = rails_base + "lib/" + $:.push rails_config unless $:.index( rails_config ) + $:.push rails_lib unless $:.index( rails_lib ) + + bootfile = rails_config + "boot.rb" + envfile = rails_config + "environment.rb" + if File.exists?( bootfile ) && File.exists?( envfile ) + begin + require bootfile + require envfile + begin + require 'console_app' + require 'console_with_helpers' + rescue Exception + dprint "Rails 1.1+ Error %s" % $! + # assume 1.0 + end + #eval( "Rails::Initializer.run" ) #not necessary? + VIM::command('let s:rubycomplete_rails_loaded = 1') + dprint "rails loaded" + rescue Exception + dprint "Rails Error %s" % $! + VIM::evaluate( "s:ErrMsg('Error loading rails environment')" ) + end end end - return ret -end + def get_rails_helpers + allow_rails = VIM::evaluate("exists('g:rubycomplete_rails') && g:rubycomplete_rails") + rails_loaded = VIM::evaluate('s:rubycomplete_rails_loaded') + return [] if allow_rails != '1' || rails_loaded != '1' + + buf_path = VIM::evaluate('expand("%:p")') + buf_path.gsub!( /\\/, "/" ) + path_elm = buf_path.split( "/" ) + dprint "buf_path: %s" % buf_path + types = [ "app", "db", "lib", "test", "components", "script" ] + + i = nil + ret = [] + type = nil + types.each do |t| + i = path_elm.index( t ) + break if i + end + type = path_elm[i] + type.downcase! + + dprint "type: %s" % type + case type + when "app" + i += 1 + subtype = path_elm[i] + subtype.downcase! + + dprint "subtype: %s" % subtype + case subtype + when "views" + ret += ActionView::Base.instance_methods + ret += ActionView::Base.methods + when "controllers" + ret += ActionController::Base.instance_methods + ret += ActionController::Base.methods + when "models" + ret += ActiveRecord::Base.instance_methods + ret += ActiveRecord::Base.methods + end -def load_rails() - allow_rails = VIM::evaluate('g:rubycomplete_rails') - return if allow_rails != '1' - - buf_path = VIM::evaluate('expand("%:p")') - file_name = VIM::evaluate('expand("%:t")') - path = buf_path.gsub( file_name, '' ) - path.gsub!( /\\/, "/" ) - pup = [ "./", "../", "../../", "../../../", "../../../../" ] - pok = nil - - pup.each do |sup| - tpok = "%s%sconfig" % [ path, sup ] - if File.exists?( tpok ) - pok = tpok - break + when "db" + ret += ActiveRecord::ConnectionAdapters::SchemaStatements.instance_methods + ret += ActiveRecord::ConnectionAdapters::SchemaStatements.methods end + + + return ret end - return if pok == nil + def add_rails_columns( cls ) + allow_rails = VIM::evaluate("exists('g:rubycomplete_rails') && g:rubycomplete_rails") + rails_loaded = VIM::evaluate('s:rubycomplete_rails_loaded') + return [] if allow_rails != '1' || rails_loaded != '1' - bootfile = pok + "/boot.rb" - envfile = pok + "/environment.rb" - if File.exists?( bootfile ) && File.exists?( envfile ) begin - require bootfile - require envfile - require 'console_app' - require 'console_with_helpers' - VIM::command('let g:rubycomplete_rails_loaded = 1') + eval( "#{cls}.establish_connection" ) + return [] unless eval( "#{cls}.ancestors.include?(ActiveRecord::Base).to_s" ) + col = eval( "#{cls}.column_names" ) + return col if col rescue - print "Error loading rails environment" + dprint "add_rails_columns err: (cls: %s) %s" % [ cls, $! ] + return [] end + return [] end -end -def get_rails_helpers - allow_rails = VIM::evaluate('g:rubycomplete_rails') - rails_loaded = VIM::evaluate('g:rubycomplete_rails_loaded') - return [] if allow_rails != '1' || rails_loaded != '1' - return RailsWords -end + def clean_sel(sel, msg) + sel.delete_if { |x| x == nil } + sel.uniq! + sel.grep(/^#{Regexp.quote(msg)}/) if msg != nil + end -def get_completions(base) - load_requires - load_rails + def get_rails_view_methods + allow_rails = VIM::evaluate("exists('g:rubycomplete_rails') && g:rubycomplete_rails") + rails_loaded = VIM::evaluate('s:rubycomplete_rails_loaded') + return [] if allow_rails != '1' || rails_loaded != '1' - input = VIM::Buffer.current.line - cpos = VIM::Window.current.cursor[1] - 1 - input = input[0..cpos] if cpos != 0 - input += base + buf_path = VIM::evaluate('expand("%:p")') + buf_path.gsub!( /\\/, "/" ) + pelm = buf_path.split( "/" ) + idx = pelm.index( "views" ) - rip = input.rindex(/\s/,cpos) - if rip - input = input[rip..input.length] - end + return [] unless idx + idx += 1 - asn = /^.*(\+|\-|\*|=|\(|\[)=?(\s*[A-Za-z0-9_:@.-]*)(\s*(\{|\+|\-|\*|\%|\/)?\s*).*/ - if asn.match(input) - input = $2 - end + clspl = pelm[idx].camelize.pluralize + cls = clspl.singularize - input.strip! - message = nil - receiver = nil - candidates = [] - - case input - when /^(\/[^\/]*\/)\.([^.]*)$/ # Regexp - receiver = $1 - message = Regexp.quote($2) - candidates = Regexp.instance_methods(true) - - when /^([^\]]*\])\.([^.]*)$/ # Array - receiver = $1 - message = Regexp.quote($2) - candidates = Array.instance_methods(true) - - when /^([^\}]*\})\.([^.]*)$/ # Proc or Hash - receiver = $1 - message = Regexp.quote($2) - candidates = Proc.instance_methods(true) | Hash.instance_methods(true) - - when /^(:[^:.]*)$/ # Symbol - if Symbol.respond_to?(:all_symbols) - receiver = $1 - candidates = Symbol.all_symbols.collect{|s| s.id2name} - candidates.delete_if { |c| c.match( /'/ ) } - end + ret = [] + begin + ret += eval( "#{cls}.instance_methods" ) + ret += eval( "#{clspl}Helper.instance_methods" ) + rescue Exception + dprint "Error: Unable to load rails view helpers for %s: %s" % [ cls, $! ] + end - when /^::([A-Z][^:\.\(]*)$/ # Absolute Constant or class methods - receiver = $1 - candidates = Object.constants - candidates.grep(/^#{receiver}/).collect{|e| "::" + e} + return ret + end +# }}} buffer analysis magic - when /^(((::)?[A-Z][^:.\(]*)+)::?([^:.]*)$/ # Constant or class methods - receiver = $1 - message = Regexp.quote($4) +# {{{ main completion code + def self.preload_rails + a = VimRubyCompletion.new + require 'Thread' + Thread.new(a) do |b| begin - candidates = eval("#{receiver}.constants | #{receiver}.methods") - rescue Exception - candidates = [] + b.load_rails + rescue end - candidates.grep(/^#{message}/).collect{|e| receiver + "::" + e} + end + a.load_rails + rescue + end - when /^(:[^:.]+)\.([^.]*)$/ # Symbol - receiver = $1 - message = Regexp.quote($2) - candidates = Symbol.instance_methods(true) + def self.get_completions(base) + b = VimRubyCompletion.new + b.get_completions base + end - when /^([0-9_]+(\.[0-9_]+)?(e[0-9]+)?)\.([^.]*)$/ # Numeric - receiver = $1 - message = Regexp.quote($4) - begin - candidates = eval(receiver).methods - rescue Exception - candidates - end + def get_completions(base) + loading_allowed = VIM::evaluate("exists('g:rubycomplete_buffer_loading') && g:rubycomplete_buffer_loading") + if loading_allowed == '1' + load_requires + load_rails + end - when /^(\$[^.]*)$/ #global - candidates = global_variables.grep(Regexp.new(Regexp.quote($1))) + input = VIM::Buffer.current.line + cpos = VIM::Window.current.cursor[1] - 1 + input = input[0..cpos] + input += base + input.sub!(/.*[ \t\n\"\\'`><=;|&{(]/, '') # Readline.basic_word_break_characters + input.sub!(/self\./, '') + input.sub!(/.*((\.\.[\[(]?)|([\[(]))/, '') + + dprint 'input %s' % input + message = nil + receiver = nil + methods = [] + variables = [] + classes = [] + constants = [] + + case input + when /^(\/[^\/]*\/)\.([^.]*)$/ # Regexp + receiver = $1 + message = Regexp.quote($2) + methods = Regexp.instance_methods(true) - when /^((\.?[^.]+)+)\.([^.]*)$/ # variable - receiver = $1 - message = Regexp.quote($3) - load_buffer_class( receiver ) + when /^([^\]]*\])\.([^.]*)$/ # Array + receiver = $1 + message = Regexp.quote($2) + methods = Array.instance_methods(true) - cv = eval("self.class.constants") - vartype = get_var_type( receiver ) - if vartype != '' - load_buffer_class( vartype ) + when /^([^\}]*\})\.([^.]*)$/ # Proc or Hash + receiver = $1 + message = Regexp.quote($2) + methods = Proc.instance_methods(true) | Hash.instance_methods(true) + + when /^(:[^:.]*)$/ # Symbol + dprint "symbol" + if Symbol.respond_to?(:all_symbols) + receiver = $1 + message = $1.sub( /:/, '' ) + methods = Symbol.all_symbols.collect{|s| s.id2name} + methods.delete_if { |c| c.match( /'/ ) } + end + + when /^::([A-Z][^:\.\(]*)$/ # Absolute Constant or class methods + dprint "const or cls" + receiver = $1 + methods = Object.constants + methods.grep(/^#{receiver}/).collect{|e| "::" + e} + when /^(((::)?[A-Z][^:.\(]*)+)::?([^:.]*)$/ # Constant or class methods + receiver = $1 + message = Regexp.quote($4) + dprint "const or cls 2 [recv: \'%s\', msg: \'%s\']" % [ receiver, message ] + load_buffer_class( receiver ) begin - candidates = eval("#{vartype}.instance_methods") + classes = eval("#{receiver}.constants") + #methods = eval("#{receiver}.methods") rescue Exception - candidates = [] + dprint "exception: %s" % $! + methods = [] end - elsif (cv).include?(receiver) - # foo.func and foo is local var. - candidates = eval("#{receiver}.methods") - elsif /^[A-Z]/ =~ receiver and /\./ !~ receiver - # Foo::Bar.func + methods.grep(/^#{message}/).collect{|e| receiver + "::" + e} + + when /^(:[^:.]+)\.([^.]*)$/ # Symbol + dprint "symbol" + receiver = $1 + message = Regexp.quote($2) + methods = Symbol.instance_methods(true) + + when /^([0-9_]+(\.[0-9_]+)?(e[0-9]+)?)\.([^.]*)$/ # Numeric + dprint "numeric" + receiver = $1 + message = Regexp.quote($4) begin - candidates = eval("#{receiver}.methods") + methods = eval(receiver).methods rescue Exception - candidates = [] + methods = [] end - else - # func1.func2 - candidates = [] - ObjectSpace.each_object(Module){|m| - next if m.name != "IRB::Context" and - /^(IRB|SLex|RubyLex|RubyToken)/ =~ m.name - candidates.concat m.instance_methods(false) - } - end - when /^\(?\s*[A-Za-z0-9:^@.%\/+*\(\)]+\.\.\.?[A-Za-z0-9:^@.%\/+*\(\)]+\s*\)?\.([^.]*)/ - message = $1 - candidates = Range.instance_methods(true) + when /^(\$[^.]*)$/ #global + dprint "global" + methods = global_variables.grep(Regexp.new(Regexp.quote($1))) - when /^\[(\s*[A-Za-z0-9:^@.%\/+*\(\)\[\]\{\}.\'\"],?)*\].([^.]*)/ - message = $2 - candidates = Array.instance_methods(true) + when /^((\.?[^.]+)+)\.([^.]*)$/ # variable + dprint "variable" + receiver = $1 + message = Regexp.quote($3) + load_buffer_class( receiver ) - when /^\.([^.]*)$/ # unknown(maybe String) - message = Regexp.quote($1) - candidates = String.instance_methods(true) + cv = eval("self.class.constants") + vartype = get_var_type( receiver ) + dprint "vartype: %s" % vartype + if vartype != '' + load_buffer_class( vartype ) + + begin + methods = eval("#{vartype}.instance_methods") + variables = eval("#{vartype}.instance_variables") + rescue Exception + dprint "load_buffer_class err: %s" % $! + end + elsif (cv).include?(receiver) + # foo.func and foo is local var. + methods = eval("#{receiver}.methods") + vartype = receiver + elsif /^[A-Z]/ =~ receiver and /\./ !~ receiver + vartype = receiver + # Foo::Bar.func + begin + methods = eval("#{receiver}.methods") + rescue Exception + end + else + # func1.func2 + ObjectSpace.each_object(Module){|m| + next if m.name != "IRB::Context" and + /^(IRB|SLex|RubyLex|RubyToken)/ =~ m.name + methods.concat m.instance_methods(false) + } + end + variables += add_rails_columns( "#{vartype}" ) if vartype && vartype.length > 0 - else - inclass = eval( VIM::evaluate("IsInClassDef()") ) + when /^\(?\s*[A-Za-z0-9:^@.%\/+*\(\)]+\.\.\.?[A-Za-z0-9:^@.%\/+*\(\)]+\s*\)?\.([^.]*)/ + message = $1 + methods = Range.instance_methods(true) - if inclass != nil - classdef = "%s\n" % VIM::Buffer.current[ inclass.min ] - found = /^\s*class\s*([A-Za-z0-9_-]*)(\s*<\s*([A-Za-z0-9_:-]*))?\s*\n$/.match( classdef ) + when /^\.([^.]*)$/ # unknown(maybe String) + message = Regexp.quote($1) + methods = String.instance_methods(true) - if found != nil - receiver = $1 - message = input - load_buffer_class( receiver ) - begin - candidates = eval( "#{receiver}.instance_methods" ) - candidates += get_rails_helpers - rescue Exception - found = nil + else + dprint "default/other" + inclass = eval( VIM::evaluate("s:IsInClassDef()") ) + + if inclass != nil + dprint "inclass" + classdef = "%s\n" % VIM::Buffer.current[ inclass.min ] + found = /^\s*class\s*([A-Za-z0-9_-]*)(\s*<\s*([A-Za-z0-9_:-]*))?\s*\n$/.match( classdef ) + + if found != nil + receiver = $1 + message = input + load_buffer_class( receiver ) + begin + methods = eval( "#{receiver}.instance_methods" ) + variables += add_rails_columns( "#{receiver}" ) + rescue Exception + found = nil + end end end - end - if inclass == nil || found == nil - candidates = eval("self.class.constants") - candidates += get_buffer_classes - message = receiver = input + if inclass == nil || found == nil + dprint "inclass == nil" + methods = get_buffer_methods + methods += get_rails_view_methods + + cls_const = Class.constants + constants = cls_const.select { |c| /^[A-Z_-]+$/.match( c ) } + classes = eval("self.class.constants") - constants + classes += get_buffer_classes + classes += get_buffer_modules + + include_objectspace = VIM::evaluate("exists('g:rubycomplete_include_objectspace') && g:rubycomplete_include_objectspace") + ObjectSpace.each_object(Class) { |cls| classes << cls.to_s } if include_objectspace == "1" + message = receiver = input + end + + methods += get_rails_helpers + methods += Kernel.public_methods end - end - candidates.delete_if { |x| x == nil } - candidates.uniq! - candidates.sort! - candidates = candidates.grep(/^#{Regexp.quote(message)}/) if message != nil - outp = "" - valid = (candidates-Object.instance_methods) + include_object = VIM::evaluate("exists('g:rubycomplete_include_object') && g:rubycomplete_include_object") + methods = clean_sel( methods, message ) + methods = (methods-Object.instance_methods) if include_object == "0" + rbcmeth = (VimRubyCompletion.instance_methods-Object.instance_methods) # lets remove those rubycomplete methods + methods = (methods-rbcmeth) + + variables = clean_sel( variables, message ) + classes = clean_sel( classes, message ) - ["VimRubyCompletion"] + constants = clean_sel( constants, message ) - rg = 0..valid.length - rg.step(150) do |x| - stpos = 0+x - enpos = 150+x - valid[stpos..enpos].each { |c| outp += "{'word':'%s','item':'%s'}," % [ c, c ] } - outp.sub!(/,$/, '') + valid = [] + valid += methods.collect { |m| { :name => m, :type => 'm' } } + valid += variables.collect { |v| { :name => v, :type => 'v' } } + valid += classes.collect { |c| { :name => c, :type => 't' } } + valid += constants.collect { |d| { :name => d, :type => 'd' } } + valid.sort! { |x,y| x[:name] <=> y[:name] } - VIM::command("call extend(g:rubycomplete_completions, [%s])" % outp) outp = "" + + rg = 0..valid.length + rg.step(150) do |x| + stpos = 0+x + enpos = 150+x + valid[stpos..enpos].each { |c| outp += "{'word':'%s','item':'%s','kind':'%s'}," % [ c[:name], c[:name], c[:type] ] } + outp.sub!(/,$/, '') + + VIM::command("call extend(g:rubycomplete_completions, [%s])" % outp) + outp = "" + end end -end +# }}} main completion code +end # VimRubyCompletion # }}} ruby completion RUBYEOF endfunction -let g:rubycomplete_rails_loaded = 0 +let s:rubycomplete_rails_loaded = 0 call s:DefRuby() -" vim:tw=78:sw=4:ts=8:et:ft=vim:norl: +"}}} ruby-side code + + +" vim:tw=78:sw=4:ts=8:et:fdm=marker:ft=vim:norl: diff --git a/runtime/autoload/syntaxcomplete.vim b/runtime/autoload/syntaxcomplete.vim index 5e0d013c6..36bd9f426 100644 --- a/runtime/autoload/syntaxcomplete.vim +++ b/runtime/autoload/syntaxcomplete.vim @@ -1,8 +1,8 @@ " Vim completion script " Language: All languages, uses existing syntax highlighting rules " Maintainer: David Fishburn -" Version: 2.0 -" Last Change: Fri May 05 2006 10:34:57 PM +" Version: 3.0 +" Last Change: Wed Nov 08 2006 10:46:46 AM " Usage: For detailed help, ":help ft-syntax-omni" " Set completion with CTRL-X CTRL-O to autoloaded function. @@ -19,13 +19,31 @@ endif if exists('g:loaded_syntax_completion') finish endif -let g:loaded_syntax_completion = 20 +let g:loaded_syntax_completion = 30 " Set ignorecase to the ftplugin standard +" This is the default setting, but if you define a buffer local +" variable you can override this on a per filetype. if !exists('g:omni_syntax_ignorecase') let g:omni_syntax_ignorecase = &ignorecase endif +" Indicates whether we should use the iskeyword option to determine +" how to split words. +" This is the default setting, but if you define a buffer local +" variable you can override this on a per filetype. +if !exists('g:omni_syntax_use_iskeyword') + let g:omni_syntax_use_iskeyword = 1 +endif + +" Only display items in the completion window that are at least +" this many characters in length. +" This is the default setting, but if you define a buffer local +" variable you can override this on a per filetype. +if !exists('g:omni_syntax_minimum_length') + let g:omni_syntax_minimum_length = 0 +endif + " This script will build a completion list based on the syntax " elements defined by the files in $VIMRUNTIME/syntax. let s:syn_remove_words = 'match,matchgroup=,contains,'. @@ -38,21 +56,28 @@ let s:prepended = '' " This function is used for the 'omnifunc' option. function! syntaxcomplete#Complete(findstart, base) + " Only display items in the completion window that are at least + " this many characters in length + if !exists('b:omni_syntax_ignorecase') + if exists('g:omni_syntax_ignorecase') + let b:omni_syntax_ignorecase = g:omni_syntax_ignorecase + else + let b:omni_syntax_ignorecase = &ignorecase + endif + endif + if a:findstart " Locate the start of the item, including "." let line = getline('.') let start = col('.') - 1 let lastword = -1 while start > 0 - if line[start - 1] =~ '\w' + " if line[start - 1] =~ '\S' + " let start -= 1 + " elseif line[start - 1] =~ '\.' + if line[start - 1] =~ '\k' let start -= 1 - elseif line[start - 1] =~ '\.' - " The user must be specifying a column name - if lastword == -1 - let lastword = start - endif - let start -= 1 - let b:sql_compl_type = 'column' + let lastword = a:findstart else break endif @@ -64,11 +89,12 @@ function! syntaxcomplete#Complete(findstart, base) let s:prepended = '' return start endif - let s:prepended = strpart(line, start, lastword - start) - return lastword + let s:prepended = strpart(line, start, (col('.') - 1) - start) + return start endif - let base = s:prepended . a:base + " let base = s:prepended . a:base + let base = s:prepended let filetype = substitute(&filetype, '\.', '_', 'g') let list_idx = index(s:cache_name, filetype, 0, &ignorecase) @@ -82,11 +108,16 @@ function! syntaxcomplete#Complete(findstart, base) " Return list of matches. - if base =~ '\w' - let compstr = join(compl_list, ' ') - let expr = (g:omni_syntax_ignorecase==0?'\C':'').'\<\%('.base.'\)\@!\w\+\s*' - let compstr = substitute(compstr, expr, '', 'g') - let compl_list = split(compstr, '\s\+') + if base != '' + " let compstr = join(compl_list, ' ') + " let expr = (b:omni_syntax_ignorecase==0?'\C':'').'\<\%('.base.'\)\@!\w\+\s*' + " let compstr = substitute(compstr, expr, '', 'g') + " let compl_list = split(compstr, '\s\+') + + " Filter the list based on the first few characters the user + " entered + let expr = 'v:val '.(g:omni_syntax_ignorecase==1?'=~?':'=~#')." '^".escape(base, '\\/.*$^~[]').".*'" + let compl_list = filter(deepcopy(compl_list), expr) endif return compl_list @@ -100,6 +131,26 @@ function! OmniSyntaxList() " let use_dictionary = a:1 " endif + " Only display items in the completion window that are at least + " this many characters in length + if !exists('b:omni_syntax_use_iskeyword') + if exists('g:omni_syntax_use_iskeyword') + let b:omni_syntax_use_iskeyword = g:omni_syntax_use_iskeyword + else + let b:omni_syntax_use_iskeyword = 1 + endif + endif + + " Only display items in the completion window that are at least + " this many characters in length + if !exists('b:omni_syntax_minimum_length') + if exists('g:omni_syntax_minimum_length') + let b:omni_syntax_minimum_length = g:omni_syntax_minimum_length + else + let b:omni_syntax_minimum_length = 0 + endif + endif + let saveL = @l " Loop through all the syntax groupnames, and build a @@ -294,14 +345,32 @@ function! s:SyntaxCSyntaxGroupItems( group_name, syntax_full ) \ , "", 'g' \ ) - " There are a number of items which have non-word characters in - " them, *'T_F1'*. vim.vim is one such file. - " This will replace non-word characters with spaces. - let syn_list = substitute( syn_list, '[^0-9A-Za-z_ ]', ' ', 'g' ) + if b:omni_syntax_use_iskeyword == 0 + " There are a number of items which have non-word characters in + " them, *'T_F1'*. vim.vim is one such file. + " This will replace non-word characters with spaces. + let syn_list = substitute( syn_list, '[^0-9A-Za-z_ ]', ' ', 'g' ) + else + let accept_chars = ','.&iskeyword.',' + " Remove all character ranges + let accept_chars = substitute(accept_chars, ',[^,]\+-[^,]\+,', ',', 'g') + " Remove all numeric specifications + let accept_chars = substitute(accept_chars, ',\d\{-},', ',', 'g') + " Remove all commas + let accept_chars = substitute(accept_chars, ',', '', 'g') + " Escape special regex characters + let accept_chars = escape(accept_chars, '\\/.*$^~[]' ) + " Remove all characters that are not acceptable + let syn_list = substitute( syn_list, '[^0-9A-Za-z_ '.accept_chars.']', ' ', 'g' ) + endif + + if b:omni_syntax_minimum_length > 0 + " If the user specified a minimum length, enforce it + let syn_list = substitute(' '.syn_list.' ', ' \S\{,'.b:omni_syntax_minimum_length.'}\ze ', ' ', 'g') + endif else let syn_list = '' endif return syn_list endfunction - diff --git a/runtime/autoload/xmlcomplete.vim b/runtime/autoload/xmlcomplete.vim index 78d30582a..79d913d63 100644 --- a/runtime/autoload/xmlcomplete.vim +++ b/runtime/autoload/xmlcomplete.vim @@ -1,7 +1,12 @@ " Vim completion script " Language: XML " Maintainer: Mikolaj Machowski ( mikmach AT wp DOT pl ) -" Last Change: 2006 Apr 30 +" Last Change: 2006 Jul 18 +" Version: 1.8 +" +" Changelog: +" 1.8 - 2006 Jul 18 +" - allow for closing of xml tags even when data file isn't available " This function will create Dictionary with users namespace strings and values " canonical (system) names of data files. Names should be lowercase, @@ -80,7 +85,7 @@ function! xmlcomplete#CompleteTags(findstart, base) let context_line = getline(curline-i) if context_line =~ '<[^>]*$' " Yep, this is this line - let context_lines = getline(curline-i, curline) + let context_lines = getline(curline-i, curline-1) + [b:compl_context] let b:compl_context = join(context_lines, ' ') break elseif context_line =~ '>[^<]*$' || i == curline @@ -106,10 +111,6 @@ function! xmlcomplete#CompleteTags(findstart, base) return start else - " There is no connection of namespace and data file. Abandon action - if !exists("g:xmldata_connection") || g:xmldata_connection == {} - return [] - endif " Initialize base return lists let res = [] let res2 = [] @@ -119,6 +120,17 @@ function! xmlcomplete#CompleteTags(findstart, base) endif let context = matchstr(b:compl_context, '^<\zs.*') unlet! b:compl_context + " There is no connection of namespace and data file. + if !exists("g:xmldata_connection") || g:xmldata_connection == {} + " There is still possibility we may do something - eg. close tag + let b:unaryTagsStack = "base meta link hr br param img area input col" + if context =~ '^\/' + let opentag = xmlcomplete#GetLastOpenTag("b:unaryTagsStack") + return [opentag.">"] + else + return [] + endif + endif " Make entities completion if exists("b:entitiescompl") diff --git a/runtime/autoload/zip.vim b/runtime/autoload/zip.vim index e0ae9b8b7..2a15deeaf 100644 --- a/runtime/autoload/zip.vim +++ b/runtime/autoload/zip.vim @@ -1,9 +1,9 @@ " zip.vim: Handles browsing zipfiles " AUTOLOAD PORTION -" Date: May 01, 2006 -" Version: 9 -" Maintainer: Charles E Campbell, Jr -" License: Vim License (see vim's :help license) +" Date: Sep 29, 2006 +" Version: 12 +" Maintainer: Charles E Campbell, Jr +" License: Vim License (see vim's :help license) " Copyright: Copyright (C) 2005 Charles E. Campbell, Jr. {{{1 " Permission is hereby granted to use and distribute this code, " with or without modifications, provided that this copyright @@ -15,15 +15,28 @@ " of this software. " --------------------------------------------------------------------- -" Initialization: {{{1 +" Load Once: {{{1 let s:keepcpo= &cpo set cpo&vim -if exists("g:loaded_zip") +if &cp || exists("g:loaded_zip") || v:version < 700 finish endif -let g:loaded_zip = "v9" +let g:loaded_zip = "v12" let s:zipfile_escape = ' ?&;\' +let s:ERROR = 2 +let s:WARNING = 1 +let s:NOTE = 0 + +" --------------------------------------------------------------------- +" Global Values: {{{1 +if !exists("g:zip_shq") + if has("unix") + let g:zip_shq= "'" + else + let g:zip_shq= '"' + endif +endif " ---------------- " Functions: {{{1 @@ -38,8 +51,9 @@ fun! zip#Browse(zipfile) " sanity checks if !executable("unzip") + redraw! echohl Error | echo "***error*** (zip#Browse) unzip not available on your system" - call inputsave()|call input("Press to continue")|call inputrestore() +" call inputsave()|call input("Press to continue")|call inputrestore() let &report= repkeep " call Dret("zip#Browse") return @@ -47,8 +61,9 @@ fun! zip#Browse(zipfile) if !filereadable(a:zipfile) if a:zipfile !~# '^\a\+://' " if its an url, don't complain, let url-handlers such as vim do its thing + redraw! echohl Error | echo "***error*** (zip#Browse) File not readable<".a:zipfile.">" | echohl None - call inputsave()|call input("Press to continue")|call inputrestore() +" call inputsave()|call input("Press to continue")|call inputrestore() endif let &report= repkeep " call Dret("zip#Browse : file<".a:zipfile."> not readable") @@ -75,11 +90,12 @@ fun! zip#Browse(zipfile) 0d $ -" call Decho("exe silent r! unzip -l '".a:zipfile."'") - exe "silent r! unzip -l '".a:zipfile."'" +" call Decho("exe silent r! unzip -l ".s:QuoteFileDir(a:zipfile)) + exe "silent r! unzip -l ".s:QuoteFileDir(a:zipfile) if v:shell_error != 0 + redraw! echohl WarningMsg | echo "***warning*** (zip#Browse) ".a:zipfile." is not a zip file" | echohl None - call inputsave()|call input("Press to continue")|call inputrestore() +" call inputsave()|call input("Press to continue")|call inputrestore() silent %d let eikeep= &ei set ei=BufReadCmd,FileReadCmd @@ -121,8 +137,9 @@ fun! s:ZipBrowseSelect() return endif if fname =~ '/$' + redraw! echohl Error | echo "***error*** (zip#Browse) Please specify a file, not a directory" | echohl None - call inputsave()|call input("Press to continue")|call inputrestore() +" call inputsave()|call input("Press to continue")|call inputrestore() let &report= repkeep " call Dret("ZipBrowseSelect") return @@ -131,7 +148,7 @@ fun! s:ZipBrowseSelect() " call Decho("fname<".fname.">") " get zipfile to the new-window - let zipfile= substitute(w:zipfile,'.zip$','','e') + let zipfile = w:zipfile let curfile= expand("%") " call Decho("zipfile<".zipfile.">") " call Decho("curfile<".curfile.">") @@ -160,12 +177,15 @@ fun! zip#Read(fname,mode) else let zipfile = substitute(a:fname,'^.\{-}zipfile:\(.\{-}\)::[^\\].*$','\1','') let fname = substitute(a:fname,'^.\{-}zipfile:.\{-}::\([^\\].*\)$','\1','') + + " TODO Needs to predicated to using InfoZIP's unzip on Windows + let fname = substitute(fname, '[', '[[]', 'g') endif " call Decho("zipfile<".zipfile.">") " call Decho("fname <".fname.">") -" call Decho("exe r! unzip -p '".zipfile."' '".fname."'") - exe "silent r! unzip -p '".zipfile."' '".fname."'" +" call Decho("exe r! unzip -p ".s:QuoteFileDir(zipfile)." ".s:QuoteFileDir(fname)) + exe "silent r! unzip -p ".s:QuoteFileDir(zipfile)." ".s:QuoteFileDir(fname) " cleanup 0d @@ -184,15 +204,17 @@ fun! zip#Write(fname) " sanity checks if !executable("zip") + redraw! echohl Error | echo "***error*** (zip#Write) sorry, your system doesn't appear to have the zip pgm" | echohl None - call inputsave()|call input("Press to continue")|call inputrestore() +" call inputsave()|call input("Press to continue")|call inputrestore() let &report= repkeep " call Dret("zip#Write") return endif if !exists("*mkdir") + redraw! echohl Error | echo "***error*** (zip#Write) sorry, mkdir() doesn't work on your system" | echohl None - call inputsave()|call input("Press to continue")|call inputrestore() +" call inputsave()|call input("Press to continue")|call inputrestore() let &report= repkeep " call Dret("zip#Write") return @@ -208,15 +230,11 @@ fun! zip#Write(fname) call mkdir(tmpdir,"p") " attempt to change to the indicated directory - try - exe "cd ".escape(tmpdir,' \') - catch /^Vim\%((\a\+)\)\=:E344/ - echohl Error | echo "***error*** (zip#Write) cannot cd to temporary directory" | Echohl None - call inputsave()|call input("Press to continue")|call inputrestore() + if s:ChgDir(tmpdir,s:ERROR,"(zip#Write) cannot cd to temporary directory") let &report= repkeep " call Dret("zip#Write") return - endtry + endif " call Decho("current directory now: ".getcwd()) " place temporary files under .../_ZIPVIM_/ @@ -255,21 +273,27 @@ fun! zip#Write(fname) let zipfile = substitute(system("cygpath ".zipfile),'\n','','e') endif -" call Decho("zip -u '".zipfile.".zip' '".fname."'") - call system("zip -u '".zipfile.".zip' '".fname."'") + " TODO Needs to predicated to using InfoZIP's unzip + if (has("win32") || has("win95") || has("win64") || has("win16")) && &shell !~? 'sh$' + let fname = substitute(fname, '[', '[[]', 'g') + endif + +" call Decho("zip -u ".s:QuoteFileDir(zipfile)." ".s:QuoteFileDir(fname)) + call system("zip -u ".s:QuoteFileDir(zipfile)." ".s:QuoteFileDir(fname)) if v:shell_error != 0 + redraw! echohl Error | echo "***error*** (zip#Write) sorry, unable to update ".zipfile." with ".fname | echohl None - call inputsave()|call input("Press to continue")|call inputrestore() +" call inputsave()|call input("Press to continue")|call inputrestore() elseif s:zipfile_{winnr()} =~ '^\a\+://' " support writing zipfiles across a network let netzipfile= s:zipfile_{winnr()} -" call Decho("handle writing <".zipfile.".zip> across network as <".netzipfile.">") +" call Decho("handle writing <".zipfile."> across network as <".netzipfile.">") 1split|enew let binkeep= &binary let eikeep = &ei set binary ei=all - exe "e! ".zipfile.".zip" + exe "e! ".zipfile call netrw#NetWrite(netzipfile) let &ei = eikeep let &binary = binkeep @@ -280,25 +304,61 @@ fun! zip#Write(fname) " cleanup and restore current directory cd .. call s:Rmdir("_ZIPVIM_") - exe "cd ".escape(curdir,' \') + call s:ChgDir(curdir,s:WARNING,"(zip#Write) unable to return to ".curdir."!") + call s:Rmdir(tmpdir) setlocal nomod let &report= repkeep " call Dret("zip#Write") endfun +" --------------------------------------------------------------------- +" QuoteFileDir: {{{2 +fun! s:QuoteFileDir(fname) +" call Dfunc("QuoteFileDir(fname<".a:fname.">)") +" call Dret("QuoteFileDir") + return g:zip_shq.a:fname.g:zip_shq +endfun + +" --------------------------------------------------------------------- +" ChgDir: {{{2 +fun! s:ChgDir(newdir,errlvl,errmsg) +" call Dfunc("ChgDir(newdir<".a:newdir."> errlvl=".a:errlvl." errmsg<".a:errmsg.">)") + + if (has("win32") || has("win95") || has("win64") || has("win16")) && &shell !~? 'sh$' + let newdir= escape(a:newdir,' ') + else + let newdir= escape(a:newdir,'\ ') + endif + + try + exe "cd ".newdir + catch /^Vim\%((\a\+)\)\=:E344/ + redraw! + if a:errlvl == s:NOTE + echo "***note*** ".a:errmsg + elseif a:errlvl == s:WARNING + echohl WarningMsg | echo "***warning*** ".a:errmsg | echohl NONE + elseif a:errlvl == s:ERROR + echohl Error | echo "***error*** ".a:errmsg | echohl NONE + endif +" call inputsave()|call input("Press to continue")|call inputrestore() +" call Dret("ChgDir 1") + return 1 + endtry + +" call Dret("ChgDir 0") + return 0 +endfun + " --------------------------------------------------------------------- " Rmdir: {{{2 fun! s:Rmdir(fname) " call Dfunc("Rmdir(fname<".a:fname.">)") - if has("unix") - call system("/bin/rm -rf ".a:fname) - elseif has("win32") || has("win95") || has("win64") || has("win16") - if &shell =~? "sh$" - call system("/bin/rm -rf ".a:fname) - else - call system("del /S ".a:fname) - endif + if (has("win32") || has("win95") || has("win64") || has("win16")) && &shell !~? 'sh$' + call system("rmdir /S/Q ".s:QuoteFileDir(a:fname)) + else + call system("/bin/rm -rf ".s:QuoteFileDir(a:fname)) endif " call Dret("Rmdir") endfun @@ -307,4 +367,4 @@ endfun " Modelines And Restoration: {{{1 let &cpo= s:keepcpo unlet s:keepcpo -" vim:ts=8 fdm=marker +" vim:ts=8 fdm=marker diff --git a/runtime/colors/blue.vim b/runtime/colors/blue.vim index dcfe3d783..86de8a4dc 100644 --- a/runtime/colors/blue.vim +++ b/runtime/colors/blue.vim @@ -2,9 +2,9 @@ " vim: tw=0 ts=4 sw=4 " Vim color file " Maintainer: Steven Vertigan -" Last Change: 2003 May 11 -" Revision #4: Support for new "Underline" group. Removed superfluous html -" formatting. +" Last Change: 2006 Sep 23 +" Revision #5: Switch main text from white to yellow for easier contrast, +" fixed some problems with terminal backgrounds. set background=dark hi clear @@ -12,66 +12,44 @@ if exists("syntax_on") syntax reset endif let g:colors_name = "blue" -hi Normal guifg=white guibg=darkBlue -hi Normal ctermfg=white ctermbg=darkBlue +hi Normal guifg=yellow guibg=darkBlue ctermfg=yellow ctermbg=darkBlue hi NonText guifg=magenta ctermfg=lightMagenta -hi comment guifg=gray gui=bold -hi comment ctermfg=gray +hi comment guifg=gray ctermfg=gray ctermbg=darkBlue gui=bold hi constant guifg=cyan ctermfg=cyan -hi identifier guifg=gray ctermfg=gray -hi statement guifg=yellow gui=none ctermfg=yellow +hi identifier guifg=gray ctermfg=red +hi statement guifg=white ctermfg=white ctermbg=darkBlue gui=none hi preproc guifg=green ctermfg=green -hi type guifg=orange ctermfg=darkYellow -hi special guifg=magenta ctermfg=lightMagenta -hi Underlined guifg=cyan ctermfg=cyan -hi Underlined gui=underline cterm=underline - -hi ErrorMsg guifg=orange guibg=darkBlue -hi ErrorMsg ctermfg=lightRed -hi WarningMsg guifg=cyan guibg=darkBlue gui=bold -hi WarningMsg ctermfg=cyan -hi ModeMsg guifg=yellow gui=NONE -hi ModeMsg ctermfg=yellow -hi MoreMsg guifg=yellow gui=NONE -hi MoreMsg ctermfg=yellow -hi Error guifg=red guibg=darkBlue gui=underline -hi Error ctermfg=red - -hi Todo guifg=black guibg=orange -hi Todo ctermfg=black ctermbg=darkYellow -hi Cursor guifg=black guibg=white -hi Cursor ctermfg=black ctermbg=white -hi Search guifg=black guibg=orange -hi Search ctermfg=black ctermbg=darkYellow -hi IncSearch guifg=black guibg=yellow -hi IncSearch ctermfg=black ctermbg=darkYellow -hi LineNr guifg=pink ctermfg=lightMagenta +hi type guifg=orange ctermfg=lightRed ctermbg=darkBlue +hi special guifg=magenta ctermfg=lightMagenta ctermbg=darkBlue +hi Underlined guifg=cyan ctermfg=cyan gui=underline cterm=underline +hi label guifg=yellow ctermfg=yellow +hi operator guifg=orange gui=bold ctermfg=lightRed ctermbg=darkBlue + +hi ErrorMsg guifg=orange guibg=darkBlue ctermfg=lightRed +hi WarningMsg guifg=cyan guibg=darkBlue ctermfg=cyan gui=bold +hi ModeMsg guifg=yellow gui=NONE ctermfg=yellow +hi MoreMsg guifg=yellow gui=NONE ctermfg=yellow +hi Error guifg=red guibg=darkBlue gui=underline ctermfg=red + +hi Todo guifg=black guibg=orange ctermfg=black ctermbg=darkYellow +hi Cursor guifg=black guibg=white ctermfg=black ctermbg=white +hi Search guifg=black guibg=orange ctermfg=black ctermbg=darkYellow +hi IncSearch guifg=black guibg=yellow ctermfg=black ctermbg=darkYellow +hi LineNr guifg=cyan ctermfg=cyan hi title guifg=white gui=bold cterm=bold -hi StatusLineNC gui=NONE guifg=black guibg=blue -hi StatusLineNC ctermfg=black ctermbg=blue -hi StatusLine gui=bold guifg=cyan guibg=blue -hi StatusLine ctermfg=cyan ctermbg=blue +hi StatusLineNC gui=NONE guifg=black guibg=blue ctermfg=black ctermbg=blue +hi StatusLine gui=bold guifg=cyan guibg=blue ctermfg=cyan ctermbg=blue +hi VertSplit gui=none guifg=blue guibg=blue ctermfg=blue ctermbg=blue -hi label guifg=yellow ctermfg=yellow -hi operator guifg=orange gui=bold ctermfg=darkYellow -hi clear Visual -hi Visual term=reverse -hi Visual ctermfg=black ctermbg=darkCyan -hi Visual guifg=black guibg=darkCyan +hi Visual term=reverse ctermfg=black ctermbg=darkCyan guifg=black guibg=darkCyan -hi DiffChange guibg=darkGreen guifg=black -hi DiffChange ctermbg=darkGreen ctermfg=black -hi DiffText guibg=olivedrab guifg=black -hi DiffText ctermbg=lightGreen ctermfg=black -hi DiffAdd guibg=slateblue guifg=black -hi DiffAdd ctermbg=blue ctermfg=black -hi DiffDelete guibg=coral guifg=black -hi DiffDelete ctermbg=cyan ctermfg=black +hi DiffChange guibg=darkGreen guifg=black ctermbg=darkGreen ctermfg=black +hi DiffText guibg=olivedrab guifg=black ctermbg=lightGreen ctermfg=black +hi DiffAdd guibg=slateblue guifg=black ctermbg=blue ctermfg=black +hi DiffDelete guibg=coral guifg=black ctermbg=cyan ctermfg=black -hi Folded guibg=orange guifg=black -hi Folded ctermbg=yellow ctermfg=black -hi FoldColumn guibg=gray30 guifg=black -hi FoldColumn ctermbg=gray ctermfg=black +hi Folded guibg=orange guifg=black ctermbg=yellow ctermfg=black +hi FoldColumn guibg=gray30 guifg=black ctermbg=gray ctermfg=black hi cIf0 guifg=gray ctermfg=gray diff --git a/runtime/colors/torte.vim b/runtime/colors/torte.vim index 65d4b3f89..0e7a916a1 100644 --- a/runtime/colors/torte.vim +++ b/runtime/colors/torte.vim @@ -1,6 +1,6 @@ " Vim color file " Maintainer: Thorsten Maerz -" Last Change: 2001 Jul 23 +" Last Change: 2006 Dec 07 " grey on black " optimized for TFT panels @@ -18,7 +18,7 @@ let g:colors_name = "torte" " GUI highlight Normal guifg=Grey80 guibg=Black highlight Search guifg=Black guibg=Red gui=bold -highlight Visual guifg=Grey25 gui=bold +highlight Visual guifg=#404040 gui=bold highlight Cursor guifg=Black guibg=Green gui=bold highlight Special guifg=Orange highlight Comment guifg=#80a0ff @@ -42,7 +42,7 @@ if has("unix") if v:version<600 highlight Normal ctermfg=Grey ctermbg=Black cterm=NONE guifg=Grey80 guibg=Black gui=NONE highlight Search ctermfg=Black ctermbg=Red cterm=bold guifg=Black guibg=Red gui=bold - highlight Visual ctermfg=Black ctermbg=yellow cterm=bold guifg=Grey25 gui=bold + highlight Visual ctermfg=Black ctermbg=yellow cterm=bold guifg=#404040 gui=bold highlight Special ctermfg=LightBlue cterm=NONE guifg=LightBlue gui=NONE highlight Comment ctermfg=Cyan cterm=NONE guifg=LightBlue gui=NONE endif diff --git a/runtime/doc/change.txt b/runtime/doc/change.txt index 01f9a4bf9..f0ae4133c 100644 --- a/runtime/doc/change.txt +++ b/runtime/doc/change.txt @@ -1,4 +1,4 @@ -*change.txt* For Vim version 7.0. Last change: 2006 May 05 +*change.txt* For Vim version 7.1a. Last change: 2007 Jan 07 VIM REFERENCE MANUAL by Bram Moolenaar @@ -640,7 +640,7 @@ The flags that you can use for the substitute commands: [#] Like [p] and prepend the line number. -[l] Like [l] but print the text like |:list|. +[l] Like [p] but print the text like |:list|. [r] Only useful in combination with ":&" or ":s" without arguments. ":&r" works the same way as ":~": When the search pattern is empty, use the @@ -670,14 +670,20 @@ pattern from the last substitute or ":global" command. With the [r] flag, the command uses the pattern from the last substitute, ":global", or search command. +If the {string} is omitted the substitute is done as if it's empty. Thus the +matched pattern is deleted. The separator after {pattern} can also be left +out then. Example: > + :%s/TESTING +This deletes "TESTING" from all lines, but only one per line. + For compatibility with Vi these two exceptions are allowed: "\/{string}/" and "\?{string}?" do the same as "//{string}/r". "\&{string}&" does the same as "//{string}/". *E146* Instead of the '/' which surrounds the pattern and replacement string, you -can use any other character, but not an alphanumeric character, '\', '"' or -'|'. This is useful if you want to include a '/' in the search pattern or -replacement string. Example: > +can use any other single-byte character, but not an alphanumeric character, +'\', '"' or '|'. This is useful if you want to include a '/' in the search +pattern or replacement string. Example: > :s+/+//+ For the definition of a pattern, see |pattern|. @@ -1075,7 +1081,7 @@ and ":put" commands and with CTRL-R. {not in Vi} {not available when compiled without the |+cmdline_hist| feature} -6. Expression register "= *quote_=* *quote=* +6. Expression register "= *quote_=* *quote=* *@=* This is not really a register that stores text, but is a way to use an expression in commands which use a register. The expression register is read-only; you cannot put text into it. After the '=', the cursor moves to @@ -1365,7 +1371,7 @@ readability. letter meaning when present in 'formatoptions' ~ -t Auto-wrap text using textwidth (does not apply to comments) +t Auto-wrap text using textwidth c Auto-wrap comments using textwidth, inserting the current comment leader automatically. r Automatically insert the current comment leader after hitting diff --git a/runtime/doc/cmdline.txt b/runtime/doc/cmdline.txt index 414ef429a..6d2fef289 100644 --- a/runtime/doc/cmdline.txt +++ b/runtime/doc/cmdline.txt @@ -1,4 +1,4 @@ -*cmdline.txt* For Vim version 7.0. Last change: 2006 Apr 30 +*cmdline.txt* For Vim version 7.1a. Last change: 2006 Jul 18 VIM REFERENCE MANUAL by Bram Moolenaar @@ -301,6 +301,10 @@ CTRL-^ Toggle the use of language |:lmap| mappings and/or Input for the next command or Search pattern. {not in Vi} + *c_CTRL-]* +CTRL-] Trigger abbreviation, without inserting a character. {not in + Vi} + For Emacs-style editing on the command-line see |emacs-keys|. The and keys take the current command-line as a search string. diff --git a/runtime/doc/debug.txt b/runtime/doc/debug.txt index 599e18138..6af7a12c8 100644 --- a/runtime/doc/debug.txt +++ b/runtime/doc/debug.txt @@ -1,4 +1,4 @@ -*debug.txt* For Vim version 7.0. Last change: 2006 May 01 +*debug.txt* For Vim version 7.1a. Last change: 2006 May 01 VIM REFERENCE MANUAL by Bram Moolenaar diff --git a/runtime/doc/debugger.txt b/runtime/doc/debugger.txt index d7268209d..b96f7c208 100644 --- a/runtime/doc/debugger.txt +++ b/runtime/doc/debugger.txt @@ -1,4 +1,4 @@ -*debugger.txt* For Vim version 7.0. Last change: 2005 Mar 29 +*debugger.txt* For Vim version 7.1a. Last change: 2005 Mar 29 VIM REFERENCE MANUAL by Gordon Prieur diff --git a/runtime/doc/develop.txt b/runtime/doc/develop.txt index 1d1c6cae5..037a3ccb1 100644 --- a/runtime/doc/develop.txt +++ b/runtime/doc/develop.txt @@ -1,4 +1,4 @@ -*develop.txt* For Vim version 7.0. Last change: 2006 Mar 09 +*develop.txt* For Vim version 7.1a. Last change: 2006 Sep 26 VIM REFERENCE MANUAL by Bram Moolenaar @@ -224,7 +224,7 @@ __.* POSIX, system _[A-Z].* POSIX, system E[A-Z0-9]* POSIX, errno.h -*_t POSIX, for typedefs. Use *_T instead. +.*_t POSIX, for typedefs. Use .*_T instead. wait don't use as argument to a function, conflicts with types.h index shadows global declaration diff --git a/runtime/doc/diff.txt b/runtime/doc/diff.txt index a0e8053a4..ed059c919 100644 --- a/runtime/doc/diff.txt +++ b/runtime/doc/diff.txt @@ -1,4 +1,4 @@ -*diff.txt* For Vim version 7.0. Last change: 2006 Apr 14 +*diff.txt* For Vim version 7.1a. Last change: 2006 Oct 02 VIM REFERENCE MANUAL by Bram Moolenaar @@ -155,13 +155,16 @@ All the buffers edited in a window where the 'diff' option is set will join in the diff. This is also possible for hidden buffers. They must have been edited in a window first for this to be possible. + *:DiffOrig* *diff-original-file* Since 'diff' is a window-local option, it's possible to view the same buffer in diff mode in one window and "normal" in another window. It is also -possible to view the changes you have made to a buffer, but since Vim doesn't -allow having two buffers for the same file, you need to make a copy of the -original file and diff with that. For example: > - :!cp % tempfile - :diffsplit tempfile +possible to view the changes you have made to a buffer since the file was +loaded. Since Vim doesn't allow having two buffers for the same file, you +need another buffer. This command is useful: > + command DiffOrig vert new | set bt=nofile | r # | 0d_ | diffthis + \ | wincmd p | diffthis +(this is in |vimrc_example.vim|). Use ":DiffOrig" to see the differences +between the current buffer and the file it was loaded from. A buffer that is unloaded cannot be used for the diff. But it does work for hidden buffers. You can use ":hide" to close a window without unloading the @@ -239,7 +242,7 @@ that the buffers will be equal within the specified range. mode. See below for [range]. - *:diffpu* *:diffput* + *:diffpu* *:diffput* *E793* :[range]diffpu[t] [bufspec] Modify another buffer to undo difference with the current buffer. Just like ":diffget" but the other buffer is modified diff --git a/runtime/doc/digraph.txt b/runtime/doc/digraph.txt index ec5aec5a5..8ca411090 100644 --- a/runtime/doc/digraph.txt +++ b/runtime/doc/digraph.txt @@ -1,4 +1,4 @@ -*digraph.txt* For Vim version 7.0. Last change: 2006 Apr 25 +*digraph.txt* For Vim version 7.1a. Last change: 2006 Jul 18 VIM REFERENCE MANUAL by Bram Moolenaar @@ -107,13 +107,12 @@ If you accidentally typed an 'a' that should be an 'e', you will type 'a' this, you will have to type e again. To avoid this don't set the 'digraph' option and use CTRL-K to enter digraphs. -You may have problems using Vim with characters which have an ASCII value -above 128. For example: You insert ue (u-umlaut) and the editor echoes \334 -in Insert mode. After leaving the Insert mode everything is fine. Note that -fmt removes all characters with ASCII codes above 128 from the text being -formatted. On some Unix systems this means you have to define the -environment-variable LC_CTYPE. If you are using csh, then put the following -line in your .cshrc: > +You may have problems using Vim with characters which have a value above 128. +For example: You insert ue (u-umlaut) and the editor echoes \334 in Insert +mode. After leaving the Insert mode everything is fine. Note that fmt +removes all characters with a value above 128 from the text being formatted. +On some Unix systems this means you have to define the environment-variable +LC_CTYPE. If you are using csh, then put the following line in your .cshrc: > setenv LC_CTYPE iso_8859_1 ============================================================================== diff --git a/runtime/doc/editing.txt b/runtime/doc/editing.txt index 4c982c50e..05c46fbfe 100644 --- a/runtime/doc/editing.txt +++ b/runtime/doc/editing.txt @@ -1,4 +1,4 @@ -*editing.txt* For Vim version 7.0. Last change: 2006 Apr 30 +*editing.txt* For Vim version 7.1a. Last change: 2006 Oct 10 VIM REFERENCE MANUAL by Bram Moolenaar @@ -372,7 +372,7 @@ Example: The command ":e Long File Name " will edit the file "Long File Name". When using a command that accepts more than one file name (like ":next file1 file2") embedded spaces must be escaped with a backslash. - *wildcard* + *wildcard* *wildcards* Wildcards in {file} are expanded. Which wildcards are supported depends on the system. These are the common ones: ? matches one character @@ -849,7 +849,7 @@ Note: When the 'write' option is off, you are not able to write any file. *:w* *:write* *E502* *E503* *E504* *E505* - *E512* *E514* *E667* + *E512* *E514* *E667* *E796* :w[rite] Write the whole buffer to the current file. This is the normal way to save changes to a file. It fails when the 'readonly' option is set or when there is @@ -1150,8 +1150,8 @@ If you want to always use ":confirm", set the 'confirm' option. *:browse* *:bro* *E338* *E614* *E615* *E616* *E578* :bro[wse] {command} Open a file selection dialog for an argument to {command}. At present this works for |:e|, |:w|, - |:r|, |:saveas|, |:sp|, |:mkexrc|, |:mkvimrc| and - |:mksession|. + |:r|, |:saveas|, |:sp|, |:mkexrc|, |:mkvimrc|, + |:mksession|, |:split|, |:vsplit|, and |:tabe|. {only in Win32, Athena, Motif, GTK and Mac GUI} When ":browse" is not possible you get an error message. If the |+browse| feature is missing or the @@ -1469,7 +1469,9 @@ problem goes away the next day. {not available when compiled without the |+path_extra| feature} The file searching is currently used for the 'path', 'cdpath' and 'tags' -options. There are three different types of searching: +options, for |finddir()| and |findfile()|. + +There are three different types of searching: 1) Downward search: *starstar* Downward search uses the wildcards '*', '**' and possibly others diff --git a/runtime/doc/fold.txt b/runtime/doc/fold.txt index d29fa4cf1..99c2e4a01 100644 --- a/runtime/doc/fold.txt +++ b/runtime/doc/fold.txt @@ -1,4 +1,4 @@ -*fold.txt* For Vim version 7.0. Last change: 2006 Mar 29 +*fold.txt* For Vim version 7.1a. Last change: 2006 Mar 29 VIM REFERENCE MANUAL by Bram Moolenaar diff --git a/runtime/doc/gui_w16.txt b/runtime/doc/gui_w16.txt index 5319beeed..d7eb73971 100644 --- a/runtime/doc/gui_w16.txt +++ b/runtime/doc/gui_w16.txt @@ -1,4 +1,4 @@ -*gui_w16.txt* For Vim version 7.0. Last change: 2005 Mar 29 +*gui_w16.txt* For Vim version 7.1a. Last change: 2005 Mar 29 VIM REFERENCE MANUAL by Bram Moolenaar diff --git a/runtime/doc/gui_w32.txt b/runtime/doc/gui_w32.txt index 25b0e164a..a518f032a 100644 --- a/runtime/doc/gui_w32.txt +++ b/runtime/doc/gui_w32.txt @@ -1,4 +1,4 @@ -*gui_w32.txt* For Vim version 7.0. Last change: 2005 Mar 29 +*gui_w32.txt* For Vim version 7.1a. Last change: 2007 May 03 VIM REFERENCE MANUAL by Bram Moolenaar @@ -233,7 +233,8 @@ $VIMRUNTIME/mswin.vim script. You could add this line to your _vimrc file: > Since CTRL-C is used to copy the text to the clipboard, it can't be used to cancel an operation. Use CTRL-Break for that. -CTRL-Z is used for undo. This means you can't suspend Vim. +CTRL-Z is used for undo. This means you can't suspend Vim with this key, use +|:suspend| instead (if it's supported at all). *CTRL-V-alternative* *CTRL-Q* Since CTRL-V is used to paste, you can't use it to start a blockwise Visual @@ -463,6 +464,8 @@ This maps Alt-Space to pop down the system menu for the Vim window. Note that Maps Control-N to produce the keys Alt-Space followed by N. This minimizes the Vim window via the system menu. +Note that the key changes depending on the language you are using. + *intellimouse-wheel-problems* When using the Intellimouse mouse wheel causes Vim to stop accepting input, go to: diff --git a/runtime/doc/gui_x11.txt b/runtime/doc/gui_x11.txt index a78dd3640..838b13f65 100644 --- a/runtime/doc/gui_x11.txt +++ b/runtime/doc/gui_x11.txt @@ -1,4 +1,4 @@ -*gui_x11.txt* For Vim version 7.0. Last change: 2006 Apr 30 +*gui_x11.txt* For Vim version 7.1a. Last change: 2006 Jul 12 VIM REFERENCE MANUAL by Bram Moolenaar @@ -406,8 +406,9 @@ These are the different looks: - That means the menubar and toolbar handles are back! Yeah! And the resizing grid still works too. -GNOME is automatically compiled with if it was found by configure. -(FIXME: Is this still true? Use --enable-gnome-check to force it to.) +GNOME is compiled with if it was found by configure and the +--enable-gnome-check argument was used. + GNOME session support *gui-gnome-session* *gnome-session* @@ -436,7 +437,7 @@ command line argument). ============================================================================== 7. KDE version *gui-kde* *kde* *KDE* *KVim* - + *gui-x11-kde* There is no KDE version of Vim. There has been some work on a port using the Qt toolkit, but it never worked properly and it has been abandoned. Work continues on Yzis: www.yzis.org. @@ -497,12 +498,6 @@ menus look a bit better. Edit the Makefile and look for "XAW_LIB". The scrollbars will remain the same, because Vim has its own, which are already 3D (in fact, they look more like Motif). - *gui-x11-kde* -For Vim-KDE, you need at least Qt(>=2.x) and the corresponding kdelibs. -To compile, you must use the --with-qt-dir configure flag because QTDIR is not -automatically detected yet. Giving KDE's directories to the configure script -may also help in some cases. - *gui-x11-neXtaw* The neXtaw version is mostly like Athena, but uses different widgets. diff --git a/runtime/doc/hangulin.txt b/runtime/doc/hangulin.txt index a5d97bc37..a79e8ab78 100644 --- a/runtime/doc/hangulin.txt +++ b/runtime/doc/hangulin.txt @@ -1,4 +1,4 @@ -*hangulin.txt* For Vim version 7.0. Last change: 2006 Apr 02 +*hangulin.txt* For Vim version 7.1a. Last change: 2006 Apr 02 VIM REFERENCE MANUAL by Chi-Deok Hwang and Sung-Hyun Nam diff --git a/runtime/doc/help.txt b/runtime/doc/help.txt index 77a7ebd39..40fad99ae 100644 --- a/runtime/doc/help.txt +++ b/runtime/doc/help.txt @@ -1,4 +1,4 @@ -*help.txt* For Vim version 7.0. Last change: 2006 May 07 +*help.txt* For Vim version 7.1a. Last change: 2006 Nov 07 VIM - main help file k @@ -143,6 +143,7 @@ Special issues ~ |farsi.txt| Farsi (Persian) editing |hebrew.txt| Hebrew language support and editing |russian.txt| Russian language support and editing +|ada.txt| Ada (the programming language) support |hangulin.txt| Hangul (Korean) input mode |rileft.txt| right-to-left editing mode @@ -189,11 +190,13 @@ Remarks about specific systems ~ |os_win32.txt| MS-Windows 95/98/NT *standard-plugin-list* Standard plugins ~ -|pi_gzip.txt| Reading and writing compressed files -|pi_netrw.txt| Reading and writing files over a network -|pi_paren.txt| Highlight matching parens -|pi_tar.txt| Tar file explorer -|pi_zip.txt| Zip archive explorer +|pi_getscript.txt| Downloading latest version of Vim scripts +|pi_gzip.txt| Reading and writing compressed files +|pi_netrw.txt| Reading and writing files over a network +|pi_paren.txt| Highlight matching parens +|pi_tar.txt| Tar file explorer +|pi_vimball.txt| Create a self-installing Vim script +|pi_zip.txt| Zip archive explorer LOCAL ADDITIONS: *local-additions* diff --git a/runtime/doc/if_cscop.txt b/runtime/doc/if_cscop.txt index 3a9de57cd..b8b04403a 100644 --- a/runtime/doc/if_cscop.txt +++ b/runtime/doc/if_cscop.txt @@ -1,4 +1,4 @@ -*if_cscop.txt* For Vim version 7.0. Last change: 2005 Mar 29 +*if_cscop.txt* For Vim version 7.1a. Last change: 2005 Mar 29 VIM REFERENCE MANUAL by Andy Kahn diff --git a/runtime/doc/if_mzsch.txt b/runtime/doc/if_mzsch.txt index 2760b1162..f42b1bfde 100644 --- a/runtime/doc/if_mzsch.txt +++ b/runtime/doc/if_mzsch.txt @@ -1,4 +1,4 @@ -*if_mzsch.txt* For Vim version 7.0. Last change: 2006 Apr 30 +*if_mzsch.txt* For Vim version 7.1a. Last change: 2007 May 03 VIM REFERENCE MANUAL by Sergey Khorev @@ -23,6 +23,8 @@ Dynamic loading added by Sergey Khorev For downloading MzScheme and other info: http://www.plt-scheme.org/software/mzscheme/ +Note: On FreeBSD you should use the "drscheme" port. + ============================================================================== 1. Commands *mzscheme-commands* @@ -262,8 +264,9 @@ In a console window type "path" to see what directories are used. The names of the DLLs must match the MzScheme version Vim was compiled with. For MzScheme version 209 they will be "libmzsch209_000.dll" and -"libmzgc209_000.dll". To know for sure edit "gvim.exe" and search for -"libmzsch\d\d\d_\d\d\d\.dll\c". +"libmzgc209_000.dll". To know for sure look at the output of the ":version" +command, look for -DDYNAMIC_MZSCH_DLL="something" and +-DDYNAMIC_MZGC_DLL="something" in the "Compilation" info. ====================================================================== vim:tw=78:ts=8:sts=4:ft=help:norl: diff --git a/runtime/doc/if_ole.txt b/runtime/doc/if_ole.txt index e8fac082e..626da3e2f 100644 --- a/runtime/doc/if_ole.txt +++ b/runtime/doc/if_ole.txt @@ -1,4 +1,4 @@ -*if_ole.txt* For Vim version 7.0. Last change: 2006 Apr 30 +*if_ole.txt* For Vim version 7.1a. Last change: 2006 Apr 30 VIM REFERENCE MANUAL by Paul Moore diff --git a/runtime/doc/if_perl.txt b/runtime/doc/if_perl.txt index c0c4bc8b7..930522df1 100644 --- a/runtime/doc/if_perl.txt +++ b/runtime/doc/if_perl.txt @@ -1,4 +1,4 @@ -*if_perl.txt* For Vim version 7.0. Last change: 2006 Mar 06 +*if_perl.txt* For Vim version 7.1a. Last change: 2006 Mar 06 VIM REFERENCE MANUAL by Sven Verdoolaege diff --git a/runtime/doc/if_pyth.txt b/runtime/doc/if_pyth.txt index e171c6b12..04bbced34 100644 --- a/runtime/doc/if_pyth.txt +++ b/runtime/doc/if_pyth.txt @@ -1,4 +1,4 @@ -*if_pyth.txt* For Vim version 7.0. Last change: 2006 Apr 30 +*if_pyth.txt* For Vim version 7.1a. Last change: 2006 Apr 30 VIM REFERENCE MANUAL by Paul Moore diff --git a/runtime/doc/if_ruby.txt b/runtime/doc/if_ruby.txt index 978782de3..a61417246 100644 --- a/runtime/doc/if_ruby.txt +++ b/runtime/doc/if_ruby.txt @@ -1,4 +1,4 @@ -*if_ruby.txt* For Vim version 7.0. Last change: 2006 Apr 30 +*if_ruby.txt* For Vim version 7.1a. Last change: 2006 Apr 30 VIM REFERENCE MANUAL by Shugo Maeda diff --git a/runtime/doc/if_sniff.txt b/runtime/doc/if_sniff.txt index 972776054..3444c3831 100644 --- a/runtime/doc/if_sniff.txt +++ b/runtime/doc/if_sniff.txt @@ -1,4 +1,4 @@ -*if_sniff.txt* For Vim version 7.0. Last change: 2005 Mar 29 +*if_sniff.txt* For Vim version 7.1a. Last change: 2005 Mar 29 VIM REFERENCE MANUAL diff --git a/runtime/doc/insert.txt b/runtime/doc/insert.txt index 8171ef9c3..f7188296c 100644 --- a/runtime/doc/insert.txt +++ b/runtime/doc/insert.txt @@ -1,4 +1,4 @@ -*insert.txt* For Vim version 7.0. Last change: 2006 May 05 +*insert.txt* For Vim version 7.1a. Last change: 2007 Apr 28 VIM REFERENCE MANUAL by Bram Moolenaar @@ -219,8 +219,8 @@ CTRL-_ Switch between languages, as follows: Please refer to |rileft.txt| for more information about right-to-left mode. {not in Vi} - Only if compiled with the |+rightleft| feature (which is not - the default). + Only if compiled with the |+rightleft| feature. + *i_CTRL-^* CTRL-^ Toggle the use of typing language characters. When language |:lmap| mappings are defined: @@ -1156,14 +1156,15 @@ any printable, non-white character: In all three states these can be used: CTRL-Y Yes: Accept the currently selected match and stop completion. -CTRL-E End completion, go back to what was typed. +CTRL-E End completion, go back to what was there before selecting a + match (what was typed or longest common string). Select a match several entries back, but don't insert it. Select a match several entries further, but don't insert it. Select the previous match, as if CTRL-P was used, but don't insert it. Select the next match, as if CTRL-N was used, but don't insert it. -space or Stop completion without changing the match and insert the + or Stop completion without changing the match and insert the typed character. The behavior of the Enter key depends on the state you are in: @@ -1210,7 +1211,8 @@ C *ft-c-omni* Completion of C code requires a tags file. You should use Exuberant ctags, because it adds extra information that is needed for completion. You can find -it here: http://ctags.sourceforge.net/ +it here: http://ctags.sourceforge.net/ Version 5.6 or later is recommended. + For version 5.5.4 you should add a patch that adds the "typename:" field: ftp://ftp.vim.org/pub/vim/unstable/patches/ctags-5.5.4.patch A compiled .exe for MS-Windows can be found at: @@ -1330,9 +1332,9 @@ will be suggested. All other elements are not placed in suggestion list. PHP *ft-php-omni* -Completion of PHP code requires tags file for completion of data from external -files. You should use Exuberant ctags version 5.5.4 or newer. You can find it -here: http://ctags.sourceforge.net/ +Completion of PHP code requires a tags file for completion of data from +external files and for class aware completion. You should use Exuberant ctags +version 5.5.4 or newer. You can find it here: http://ctags.sourceforge.net/ Script completes: @@ -1390,8 +1392,10 @@ The completions provided by CTRL-X CTRL-O are sensitive to the context: Notes: - Vim will load/evaluate code in order to provide completions. This may - cause some code execution, which may be a concern. - - In context 1 above, Vim can parse the entire buffer to add a list of + cause some code execution, which may be a concern. This is no longer + enabled by default, to enable this feature add > + let g:rubycomplete_buffer_loading = 1 +<- In context 1 above, Vim can parse the entire buffer to add a list of classes to the completion results. This feature is turned off by default, to enable it add > let g:rubycomplete_classes_in_global = 1 @@ -1407,8 +1411,13 @@ Notes: SYNTAX *ft-syntax-omni* -This uses the current syntax highlighting for completion. It can be used for -any filetype and provides a minimal language-sensitive completion. +Vim has the ability to color syntax highlight nearly 500 languages. Part of +this highlighting includes knowing what keywords are part of a language. Many +filetypes already have custom completion scripts written for them, the +syntaxcomplete plugin provides basic completion for all other filetypes. It +does this by populating the omni completion list with the text Vim already +knows how to color highlight. It can be used for any filetype and provides a +minimal language-sensitive completion. To enable syntax code completion you can run: > setlocal omnifunc=syntaxcomplete#Complete @@ -1461,6 +1470,15 @@ groups: > You can create as many of these variables as you need, varying only the filetype at the end of the variable name. +The plugin uses the isKeyword option to determine where word boundaries are +for the syntax items. For example, in the Scheme language completion should +include the "-", call-with-output-file. Depending on your filetype, this may +not provide the words you are expecting. Setting the +g:omni_syntax_use_iskeyword option to 0 will force the syntax plugin to break +on word characters. This can be controlled adding the following to your +vimrc: > + let g:omni_syntax_use_iskeyword = 0 + SQL *ft-sql-omni* @@ -1771,13 +1789,13 @@ NOTE: ":append" and ":insert" don't work properly in between ":if" and See |++opt| for the possible values of [++opt]. *:r!* *:read!* -:r[ead] !{cmd} Execute {cmd} and insert its standard output below - the cursor. A temporary file is used to store the - output of the command which is then read into the - buffer. 'shellredir' is used to save the output of - the command, which can be set to include stderr or - not. {cmd} is executed like with ":!{cmd}", any '!' - is replaced with the previous command |:!|. +:[range]r[ead] !{cmd} Execute {cmd} and insert its standard output below + the cursor or the specified line. A temporary file is + used to store the output of the command which is then + read into the buffer. 'shellredir' is used to save + the output of the command, which can be set to include + stderr or not. {cmd} is executed like with ":!{cmd}", + any '!' is replaced with the previous command |:!|. These commands insert the contents of a file, or the output of a command, into the buffer. They can be undone. They cannot be repeated with the "." diff --git a/runtime/doc/mbyte.txt b/runtime/doc/mbyte.txt index 809abda4b..9a24736cb 100644 --- a/runtime/doc/mbyte.txt +++ b/runtime/doc/mbyte.txt @@ -1,4 +1,4 @@ -*mbyte.txt* For Vim version 7.0. Last change: 2006 Apr 30 +*mbyte.txt* For Vim version 7.1a. Last change: 2006 Aug 11 VIM REFERENCE MANUAL by Bram Moolenaar et al. @@ -403,7 +403,8 @@ depends on the system used, no detailed list can be given. 8bit 2byte MS-Windows: works for all codepages installed on your system; you can only type 8bit characters; Other systems: does NOT work. - 8bit Unicode Works, but you can only type 8bit characters; in a + 8bit Unicode Works, but only 8bit characters can be typed directly + (others through digraphs, keymaps, etc.); in a terminal you can only see 8bit characters; the GUI can show all characters that the 'guifont' supports. diff --git a/runtime/doc/mlang.txt b/runtime/doc/mlang.txt index c1ef8d502..7b27fc497 100644 --- a/runtime/doc/mlang.txt +++ b/runtime/doc/mlang.txt @@ -1,4 +1,4 @@ -*mlang.txt* For Vim version 7.0. Last change: 2004 Feb 24 +*mlang.txt* For Vim version 7.1a. Last change: 2006 Jul 12 VIM REFERENCE MANUAL by Bram Moolenaar @@ -114,7 +114,7 @@ the language of your choice. use "en" to disable translations. > ============================================================================== 2. Menus *multilang-menus* -See |45.2| for the basics. +See |45.2| for the basics, esp. using 'langmenu'. Note that if changes have been made to the menus after the translation was done, some of the menus may be shown in English. Please try contacting the diff --git a/runtime/doc/motion.txt b/runtime/doc/motion.txt index 6fdfd9310..1446db0a9 100644 --- a/runtime/doc/motion.txt +++ b/runtime/doc/motion.txt @@ -1,4 +1,4 @@ -*motion.txt* For Vim version 7.0. Last change: 2006 Apr 30 +*motion.txt* For Vim version 7.1a. Last change: 2006 Dec 07 VIM REFERENCE MANUAL by Bram Moolenaar @@ -169,15 +169,15 @@ l or *l* *0* 0 To the first character of the line. |exclusive| - motion. When moving up or down, stay in same screen - column (if possible). + motion. ** ** To the first character of the line. |exclusive| - motion. When moving up or down, stay in same text - column (if possible). Works like "1|", which differs - from "0" when the line starts with a . {not in - Vi} + motion. When moving up or down next, stay in same + TEXT column (if possible). Most other commands stay + in the same SCREEN column. works like "1|", + which differs from "0" when the line starts with a + . {not in Vi} *^* ^ To the first non-blank character of the line. @@ -752,11 +752,11 @@ m[ or m] Set the |'[| or |']| mark. Useful when an operator is be omitted. *'* *'a* *`* *`a* -'{a-z} `{a-z} Jump to the mark {a-z}. +'{a-z} `{a-z} Jump to the mark {a-z} in the current buffer. *'A* *'0* *`A* *`0* -'{A-Z0-9} `{A-Z0-9} To the mark {A-Z0-9} in the correct file (not a motion - command when in another file). {not in Vi} +'{A-Z0-9} `{A-Z0-9} To the mark {A-Z0-9} in the file where it was set (not + a motion command when in another file). {not in Vi} *g'* *g'a* *g`* *g`a* g'{mark} g`{mark} diff --git a/runtime/doc/os_390.txt b/runtime/doc/os_390.txt index fd9ab244c..119635577 100644 --- a/runtime/doc/os_390.txt +++ b/runtime/doc/os_390.txt @@ -1,4 +1,4 @@ -*os_390.txt* For Vim version 7.0. Last change: 2005 Mar 29 +*os_390.txt* For Vim version 7.1a. Last change: 2005 Mar 29 VIM REFERENCE MANUAL by Ralf Schandl diff --git a/runtime/doc/os_beos.txt b/runtime/doc/os_beos.txt index e872b4d04..52276efaf 100644 --- a/runtime/doc/os_beos.txt +++ b/runtime/doc/os_beos.txt @@ -1,4 +1,4 @@ -*os_beos.txt* For Vim version 7.0. Last change: 2005 Mar 29 +*os_beos.txt* For Vim version 7.1a. Last change: 2005 Mar 29 VIM REFERENCE MANUAL by Bram Moolenaar diff --git a/runtime/doc/os_mac.txt b/runtime/doc/os_mac.txt index d788477ea..e56d4c71a 100644 --- a/runtime/doc/os_mac.txt +++ b/runtime/doc/os_mac.txt @@ -1,4 +1,4 @@ -*os_mac.txt* For Vim version 7.0. Last change: 2006 Apr 30 +*os_mac.txt* For Vim version 7.1a. Last change: 2006 Apr 30 VIM REFERENCE MANUAL by Bram Moolenaar et al. diff --git a/runtime/doc/os_msdos.txt b/runtime/doc/os_msdos.txt index 9a255d070..e689b6e79 100644 --- a/runtime/doc/os_msdos.txt +++ b/runtime/doc/os_msdos.txt @@ -1,4 +1,4 @@ -*os_msdos.txt* For Vim version 7.0. Last change: 2005 Mar 29 +*os_msdos.txt* For Vim version 7.1a. Last change: 2005 Mar 29 VIM REFERENCE MANUAL by Bram Moolenaar diff --git a/runtime/doc/os_risc.txt b/runtime/doc/os_risc.txt index 79f610617..2756f224b 100644 --- a/runtime/doc/os_risc.txt +++ b/runtime/doc/os_risc.txt @@ -1,4 +1,4 @@ -*os_risc.txt* For Vim version 7.0. Last change: 2005 Mar 29 +*os_risc.txt* For Vim version 7.1a. Last change: 2005 Mar 29 VIM REFERENCE MANUAL by Thomas Leonard diff --git a/runtime/doc/os_unix.txt b/runtime/doc/os_unix.txt index c6a987ffd..96d7c14e1 100644 --- a/runtime/doc/os_unix.txt +++ b/runtime/doc/os_unix.txt @@ -1,4 +1,4 @@ -*os_unix.txt* For Vim version 7.0. Last change: 2005 Mar 29 +*os_unix.txt* For Vim version 7.1a. Last change: 2005 Mar 29 VIM REFERENCE MANUAL by Bram Moolenaar diff --git a/runtime/doc/pi_getscript.txt b/runtime/doc/pi_getscript.txt new file mode 100644 index 000000000..10d9387fd --- /dev/null +++ b/runtime/doc/pi_getscript.txt @@ -0,0 +1,406 @@ +*pi_getscript.txt* For Vim version 7.1a. Last change: 2007 Apr 26 +> + GETSCRIPT REFERENCE MANUAL by Charles E. Campbell, Jr. +< +Authors: Charles E. Campbell, Jr. + (remove NOSPAM from the email address) + *GetLatestVimScripts-copyright* +Copyright: (c) 2004-2006 by Charles E. Campbell, Jr. *glvs-copyright* + The VIM LICENSE applies to getscript.vim and + pi_getscript.txt (see |copyright|) except use + "getscript" instead of "Vim". No warranty, express or implied. + Use At-Your-Own-Risk. + +Getscript is a plugin that simplifies retrieval of the latest versions of the +scripts that you yourself use! Typing |:GLVS| will invoke getscript; it will +then use the (see |GetLatestVimScripts_dat|) file to +get the latest versions of scripts listed therein from http://vim.sf.net/. + +============================================================================== +1. Contents *glvs-contents* *glvs* *getscript* + *GetLatestVimScripts* + + 1. Contents........................................: |glvs-contents| + 2. GetLatestVimScripts -- Getting Started..........: |glvs-install| + 3. GetLatestVimScripts Usage.......................: |glvs-usage| + 4. GetLatestVimScripts Data File...................: |glvs-data| + 5. GetLatestVimScripts Friendly Plugins............: |glvs-plugins| + 6. GetLatestVimScripts AutoInstall.................: |glvs-autoinstall| + 7. GetLatestViMScripts Options.....................: |glvs-options| + 8. GetLatestVimScripts Algorithm...................: |glvs-alg| + 9. GetLatestVimScripts History.....................: |glvs-hist| + + +============================================================================== +2. GetLatestVimScripts -- Getting Started *getscript-start* + *getlatestvimscripts-install* + + VERSION FROM VIM DISTRIBUTION *glvs-dist-install* + +Vim 7.0 does not include the GetLatestVimScripts.dist file which +serves as an example and a template. So, you'll need to create +your own! See |GetLatestVimScripts_dat|. + + VERSION FROM VIM SF NET *glvs-install* + +NOTE: The last step, that of renaming/moving the GetLatestVimScripts.dist +file, is for those who have just downloaded GetLatestVimScripts.tar.bz2 for +the first time. + +The GetLatestVimScripts.dist file serves as an example and a template for your +own personal list. Feel free to remove all the scripts mentioned within it; +the "important" part of it is the first two lines. + +Your computer needs to have wget for GetLatestVimScripts to do its work. + + 1. if compressed: gunzip getscript.vba.gz + 2. Unix: + vim getscript.vba + :so % + :q + cd ~/.vim/GetLatest + mv GetLatestVimScripts.dist GetLatestVimScripts.dat + (edit GetLatestVimScripts.dat to install your own personal + list of desired plugins -- see |GetLatestVimScripts_dat|) + + 3. Windows: + vim getscript.vba + :so % + :q + cd **path-to-vimfiles**/GetLatest + mv GetLatestVimScripts.dist GetLatestVimScripts.dat + (edit GetLatestVimScripts.dat to install your own personal + list of desired plugins -- see |GetLatestVimScripts_dat|) + + +============================================================================== +3. GetLatestVimScripts Usage *glvs-usage* *:GLVS* + +Unless its been defined elsewhere, > + :GLVS +will invoke GetLatestVimScripts(). If some other plugin has defined that +command, then you may type +> + :GetLatestVimScripts +< +The script will attempt to update and, if permitted, will automatically +install scripts from http://vim.sourceforge.net/. To do so it will peruse a +file, +> + .vim/GetLatest/GetLatestVimScripts.dat (unix) +< +or > + ..wherever..\vimfiles\GetLatest\GetLatestVimScripts.dat (windows) +(see |glvs-data|), and examine plugins in your [.vim|vimfiles]/plugin +directory (see |glvs-plugins|). + +Scripts which have been downloaded will appear in the +~/.vim/GetLatest (unix) or ..wherever..\vimfiles\GetLatest (windows) +subdirectory. GetLatestVimScripts will attempt to automatically +install them if you have the following line in your <.vimrc>: > + + let g:GetLatestVimScripts_allowautoinstall=1 + +The file will be automatically be updated to +reflect the latest version of script(s) so downloaded. +(also see |glvs-options|) + + +============================================================================== +4. GetLatestVimScripts Data File *getscript-data* *glvs-data* + *:GetLatestVimScripts_dat* +The data file must have for its first two lines +the following text: +> + ScriptID SourceID Filename + -------------------------- +< +Following those two lines are three columns; the first two are numeric +followed by a text column. The GetLatest/GetLatestVimScripts.dist file +contains an example of such a data file. Anything following a #... is +ignored, so you may embed comments in the file. + +The first number on each line gives the script's ScriptID. When you're about +to use a web browser to look at scripts on http://vim.sf.net/, just before you +click on the script's link, you'll see a line resembling + + http://vim.sourceforge.net/scripts/script.php?script_id=40 + +The "40" happens to be a ScriptID that GetLatestVimScripts needs to +download the associated page. + +The second number on each line gives the script's SourceID. The SourceID +records the count of uploaded scripts as determined by vim.sf.net; hence it +serves to indicate "when" a script was uploaded. Setting the SourceID to 1 +insures that GetLatestVimScripts will assume that the script it has is +out-of-date. + +The SourceID is extracted by GetLatestVimScripts from the script's page on +vim.sf.net; whenever its greater than the one stored in the +GetLatestVimScripts.dat file, the script will be downloaded +(see |GetLatestVimScripts_dat|). + +If your script's author has included a special comment line in his/her plugin, +the plugin itself will be used by GetLatestVimScripts to build your + file, including any dependencies on other scripts it +may have. As an example, consider: > + + " GetLatestVimScripts: 884 1 :AutoInstall: AutoAlign.vim + +This comment line tells getscript.vim to check vimscript #884 and that the +script is automatically installable. Getscript will also use this line to +help build the GetLatestVimScripts.dat file, by including a line such as: > + + 884 1 AutoAlign.vim +< +in it an AutoAlign.vim line isn't already in GetLatestVimScripts.dat file. +See |glvs-plugins| for more. Thus, GetLatestVimScripts thus provides a +comprehensive ability to keep your plugins up-to-date! + + *GetLatestVimScripts_dat* +As an example of a file: +> + ScriptID SourceID Filename + -------------------------- + 294 1 Align.vim + 120 2 decho.vim + 40 3 DrawIt.tar.gz + 451 4 EasyAccents.vim + 195 5 engspchk.vim + 642 6 GetLatestVimScripts.vim + 489 7 Manpageview.vim +< +Note: the first two lines are required, but essentially act as comments. + + +============================================================================== +5. GetLatestVimScripts Friendly Plugins *getscript-plugins* *glvs-plugins* + +If a plugin author includes the following comment anywhere in their plugin, +GetLatestVimScripts will find it and use it to automatically build the user's +GetLatestVimScripts.dat files: +> + src_id + v + " GetLatestVimScripts: ### ### yourscriptname + ^ + scriptid +< +As an author, you should include such a line in to refer to your own script +plus any additional lines describing any plugin dependencies it may have. +Same format, of course! + +If your command is auto-installable (see |glvs-autoinstall|), and most scripts +are, then you may include :AutoInstall: at the start of "yourscriptname". + +GetLatestVimScripts commands for those scripts are then appended, if not +already present, to the user's GetLatest/GetLatestVimScripts.dat file. Its a +relatively painless way to automate the acquisition of any scripts your +plugins depend upon. + +Now, as an author, you probably don't want GetLatestVimScripts to download +your own scripts for you yourself, thereby overwriting your not-yet-released +hard work. GetLatestVimScripts provides a solution for this: put +> + 0 0 yourscriptname +< +into your file and GetLatestVimScripts will skip +examining the "yourscriptname" scripts for those GetLatestVimScripts comment +lines. As a result, those lines won't be inadvertently installed into your + file and subsequently used to download your own +scripts. This is especially important to do if you've included the +:AutoInstall: option. + +Be certain to use the same "yourscriptname" in the "0 0 yourscriptname" line +as you've used in your GetLatestVimScripts comment! + + +============================================================================== +6. GetLatestVimScripts AutoInstall *getscript-autoinstall* + *glvs-autoinstall* + +GetLatestVimScripts now supports "AutoInstall". Not all scripts are +supportive of auto-install, as they may have special things you need to do to +install them (please refer to the script's "install" directions). On the +other hand, most scripts will be auto-installable. + +To let GetLatestVimScripts do an autoinstall, the data file's comment field +should begin with (surrounding blanks are ignored): > + + :AutoInstall: +< +Both colons are needed, and it should begin the comment (yourscriptname) +field. + +One may prevent any autoinstalling by putting the following line in your +<.vimrc>: > + + let g:GetLatestVimScripts_allowautoinstall= 0 +< +With :AutoInstall: enabled, as it is by default, files which end with + + ---.tar.bz2 : decompressed & untarred in .vim/ directory + ---.vba.bz2 : decompressed in .vim/ directory, then vimball handles it + ---.vim.bz2 : decompressed & moved into .vim/plugin directory + ---.tar.gz : decompressed & untarred in .vim/ directory + ---.vba.gz : decompressed in .vim/ directory, then vimball handles it + ---.vim.gz : decompressed & moved into .vim/plugin directory + ---.vba : unzipped in .vim/ directory + ---.vim : moved to .vim/plugin directory + ---.zip : unzipped in .vim/ directory + +and which merely need to have their components placed by the untar/gunzip or +move-to-plugin-directory process should be auto-installable. Vimballs, of +course, should always be auto-installable. + +When is a script not auto-installable? Let me give an example: + + .vim/after/syntax/blockhl.vim + +The script provides block highlighting for C/C++ programs; it is +available at: + + http://vim.sourceforge.net/scripts/script.php?script_id=104 + +Currently, vim's after/syntax only supports by-filetype scripts (in +blockhl.vim's case, that's after/syntax/c.vim). Hence, auto-install would +possibly overwrite the current user's after/syntax/c.vim file. + +In my own case, I use (renamed to after/syntax/c.vim) to +allow a after/syntax/c/ directory: + + http://vim.sourceforge.net/scripts/script.php?script_id=1023 + +The script allows multiple syntax files to exist separately in the +after/syntax/c subdirectory. I can't bundle aftersyntax.vim in and build an +appropriate tarball for auto-install because of the potential for the +after/syntax/c.vim contained in it to overwrite a user's c.vim. + + +============================================================================== +7. GetLatestVimScripts Options *glvs-options* +> + g:GetLatestVimScripts_wget +< default= "wget" + This variable holds the name of the command for obtaining + scripts. +> + g:GetLatestVimScripts_options +< default= "-q -O" + This variable holds the options to be used with the + g:GetLatestVimScripts_wget command. +> + g:getLatestVimScripts_allowautoinstall +< default= 1 + This variable indicates whether GetLatestVimScripts is allowed + to attempt to automatically install scripts. Note that it + doesn't understand vimballs (yet). Furthermore, the plugin + author has to have explicitly indicated that his/her plugin + is automatically installable. + + +============================================================================== +8. GetLatestVimScripts Algorithm *glvs-algorithm* *glvs-alg* + +The Vim sourceforge page dynamically creates a page by keying off of the +so-called script-id. Within the webpage of + + http://vim.sourceforge.net/scripts/script.php?script_id=40 + +is a line specifying the latest source-id (src_id). The source identifier +numbers are always increasing, hence if the src_id is greater than the one +recorded for the script in GetLatestVimScripts then its time to download a +newer copy of that script. + +GetLatestVimScripts will then download the script and update its internal +database of script ids, source ids, and scriptnames. + +The AutoInstall process will: + + Move the file from GetLatest/ to the following directory + Unix : $HOME/.vim + Windows: $HOME\vimfiles + if the downloaded file ends with ".bz2" + bunzip2 it + else if the downloaded file ends with ".gz" + gunzip it + if the resulting file ends with ".zip" + unzip it + else if the resulting file ends with ".tar" + tar -oxvf it + else if the resulting file ends with ".vim" + move it to the plugin subdirectory + + +============================================================================== +9. GetLatestVimScripts History *getscript-history* *glvs-hist* {{{1 + +v23 Nov 03, 2006 : * ignores comments (#...) + * handles vimballs +v22 Oct 13, 2006 : * supports automatic use of curl if wget is not + available +v21 May 01, 2006 : * now takes advantage of autoloading. +v20 Dec 23, 2005 : * Eric Haarbauer found&fixed a bug with unzip use; + unzip needs the -o flag to overwrite. +v19 Nov 28, 2005 : * v18's GetLatestVimScript line accessed the wrong + script! Fixed. +v18 Mar 21, 2005 : * bugfix to automatic database construction + * bugfix - nowrapscan caused an error + (tnx to David Green for the fix) + Apr 01, 2005 * if shell is bash, "mv" instead of "ren" used in + :AutoInstall:s, even though its o/s is windows + Apr 01, 2005 * when downloading errors occurred, GLVS was + terminating early. It now just goes on to trying + the next script (after trying three times to + download a script description page) + Apr 20, 2005 * bugfix - when a failure to download occurred, + GetLatestVimScripts would stop early and claim that + everything was current. Fixed. +v17 Aug 25, 2004 : * g:GetLatestVimScripts_allowautoinstall, which + defaults to 1, can be used to prevent all + :AutoInstall: +v16 Aug 25, 2004 : * made execution of bunzip2/gunzip/tar/zip silent + * fixed bug with :AutoInstall: use of helptags +v15 Aug 24, 2004 : * bugfix: the "0 0 comment" download prevention wasn't + always preventing downloads (just usually). Fixed. +v14 Aug 24, 2004 : * bugfix -- helptags was using dotvim, rather than + s:dotvim. Fixed. +v13 Aug 23, 2004 : * will skip downloading a file if its scriptid or srcid + is zero. Useful for script authors; that way their + own GetLatestVimScripts activity won't overwrite + their scripts. +v12 Aug 23, 2004 : * bugfix - a "return" got left in the distribution that + was intended only for testing. Removed, now works. + * :AutoInstall: implemented +v11 Aug 20, 2004 : * GetLatestVimScripts is now a plugin: + * :GetLatestVimScripts command + * (runtimepath)/GetLatest/GetLatestVimScripts.dat + now holds scripts that need updating +v10 Apr 19, 2004 : * moved history from script to doc +v9 Jan 23, 2004 : windows (win32/win16/win95) will use + double quotes ("") whereas other systems will use + single quotes ('') around the urls in calls via wget +v8 Dec 01, 2003 : makes three tries at downloading +v7 Sep 02, 2003 : added error messages if "Click on..." or "src_id=" + not found in downloaded webpage + Uses t_ti, t_te, and rs to make progress visible +v6 Aug 06, 2003 : final status messages now display summary of work + ( "Downloaded someqty scripts" or + "Everything was current") + Now GetLatestVimScripts is careful about downloading + GetLatestVimScripts.vim itself! + (goes to ) +v5 Aug 04, 2003 : missing an endif near bottom +v4 Jun 17, 2003 : redraw! just before each "considering" message +v3 May 27, 2003 : Protects downloaded files from errant shell + expansions with single quotes: '...' +v2 May 14, 2003 : extracts name of item to be obtained from the + script file. Uses it instead of comment field + for output filename; comment is used in the + "considering..." line and is now just a comment! + * Fixed a bug: a string-of-numbers is not the + same as a number, so I added zero to them + and they became numbers. Fixes comparison. + +============================================================================== +vim:tw=78:ts=8:ft=help:fdm=marker diff --git a/runtime/doc/pi_gzip.txt b/runtime/doc/pi_gzip.txt index 1d9466ac2..e29ea1be7 100644 --- a/runtime/doc/pi_gzip.txt +++ b/runtime/doc/pi_gzip.txt @@ -1,4 +1,4 @@ -*pi_gzip.txt* For Vim version 7.0. Last change: 2002 Oct 29 +*pi_gzip.txt* For Vim version 7.1a. Last change: 2002 Oct 29 VIM REFERENCE MANUAL by Bram Moolenaar diff --git a/runtime/doc/pi_netrw.txt b/runtime/doc/pi_netrw.txt index 5c01d61ac..d5821de11 100644 --- a/runtime/doc/pi_netrw.txt +++ b/runtime/doc/pi_netrw.txt @@ -1,17 +1,20 @@ -*pi_netrw.txt* For Vim version 7.0. Last change: 2006 May 02 +*pi_netrw.txt* For Vim version 7.1a. Last change: 2007 May 05 - NETRW REFERENCE MANUAL by Charles E. Campbell, Jr. + ----------------------------------------------------- + NETRW REFERENCE MANUAL by Charles E. Campbell, Jr. + ----------------------------------------------------- -*dav* *http* *network* *rcp* *scp* -*fetch* *netrw* *Nread* *rsync* *sftp* -*ftp* *netrw.vim* *Nwrite* *netrw-file* +*dav* *http* *network* *Nwrite* *netrw-file* +*fetch* *netrw* *Nread* *rcp* *scp* +*ftp* *netrw.vim* *Nsource* *rsync* *sftp* ============================================================================== -0. Contents *netrw-contents* +1. Contents *netrw-contents* -1. Starting With Netrw..................................|netrw-start| -2. Netrw Reference......................................|netrw-ref| +1. Contents.............................................|netrw-contents| +2. Starting With Netrw..................................|netrw-start| +3. Netrw Reference......................................|netrw-ref| CONTROLLING EXTERNAL APPLICATIONS..................|netrw-externapp| READING............................................|netrw-read| WRITING............................................|netrw-write| @@ -19,14 +22,14 @@ CHANGING THE USERID AND PASSWORD...................|netrw-chgup| VARIABLES..........................................|netrw-variables| PATHS..............................................|netrw-path| -3. Network-Oriented File Transfer.......................|netrw-xfer| +4. Network-Oriented File Transfer.......................|netrw-xfer| NETRC..............................................|netrw-netrc| PASSWORD...........................................|netrw-passwd| -4. Activation...........................................|netrw-activate| -5. Transparent File Transfer............................|netrw-transparent| -6. Ex Commands..........................................|netrw-ex| -7. Variables and Options................................|netrw-var| -8. Directory Browsing...................................|netrw-browse| {{{1 +5. Activation...........................................|netrw-activate| +6. Transparent File Transfer............................|netrw-transparent| +7. Ex Commands..........................................|netrw-ex| +8. Variables and Options................................|netrw-var| +9. Directory Browsing...................................|netrw-browse| {{{1 Maps...............................................|netrw-maps| Exploring..........................................|netrw-explore-cmds| Quick Reference Commands Table.....................|netrw-browse-cmds| @@ -38,38 +41,39 @@ Going Up...........................................|netrw--| Browsing...........................................|netrw-cr| Obtaining A File...................................|netrw-O| - Thin, Long, and Wide Listings......................|netrw-i| + Change Listing Style...............................|netrw-i| Making A New Directory.............................|netrw-d| Deleting Files Or Directories......................|netrw-D| Renaming Files Or Directories......................|netrw-move| Hiding Files Or Directories........................|netrw-a| Edit File Or Directory Hiding List.................|netrw-ctrl-h| Browsing With A Horizontally Split Window..........|netrw-o| + Browsing With A Vertically Split Window............|netrw-v| + Browsing With A New Tab............................|netrw-t| Preview Window.....................................|netrw-p| Selecting Sorting Style............................|netrw-s| Editing The Sorting Sequence.......................|netrw-S| Reversing Sorting Order............................|netrw-r| Changing To A Predecessor Directory................|netrw-u| Changing To A Successor Directory..................|netrw-U| - Browsing With A Vertically Split Window............|netrw-v| Customizing Browsing With A User Function..........|netrw-x| Making The Browsing Directory The Current Directory|netrw-c| - Bookmarking A Directory............................|netrw-b| |netrw-Nb| - Changing To A Bookmarked Directory.................|netrw-B| |netrw-NB| + Bookmarking A Directory............................|netrw-mb| + Changing To A Bookmarked Directory.................|netrw-gb| Listing Bookmarks And History......................|netrw-q| Improving Directory Browsing.......................|netrw-listhack| }}}1 -9. Problems and Fixes...................................|netrw-problems| -10. Debugging............................................|netrw-debug| -11. History..............................................|netrw-history| -12. Credits..............................................|netrw-credits| +10. Problems and Fixes...................................|netrw-problems| +11. Debugging............................................|netrw-debug| +12. History..............................................|netrw-history| +13. Credits..............................................|netrw-credits| The Netrw plugin is generally sourced automatically as it is a |standard-plugin|. That said, to make use of netrw, one must have plugins available which can be done with the following two lines in your <.vimrc>: > - set nocp " 'compatible' is not set - filetype plugin on " plugins are enabled + set nocp " 'compatible' is not set + filetype plugin on " plugins are enabled < You can avoid loading this plugin by setting the "loaded_netrw" variable in your <.vimrc> file: > @@ -79,14 +83,14 @@ in your <.vimrc> file: > {Vi does not have any of this} ============================================================================== -1. Starting With Netrw *netrw-start* +2. Starting With Netrw *netrw-start* Netrw makes reading, writing, and browsing over a network connection easy! First, make sure that you have plugins enabled, so you'll need to have at least the following in your <.vimrc>: (or see |netrw-activate|) > - set nocp " 'compatible' is not set - filetype plugin on " plugins are enabled + set nocp " 'compatible' is not set + filetype plugin on " plugins are enabled < (see |'cp'| and |:filetype-plugin-on|) @@ -111,9 +115,9 @@ and has lines resembling > machine HOSTNAME login USERID password "PASSWORD" machine HOSTNAME login USERID password "PASSWORD" ... - default login USERID password "PASSWORD" + default login USERID password "PASSWORD" < -How about browsing -- ie. you just want to look around before editing a +Now about browsing -- ie. when you just want to look around before editing a file. For browsing on your current host, just "edit" a directory: > vim . @@ -131,7 +135,7 @@ There's more protocols supported than scp and ftp, too: see the next section, |netrw-externapp|. ============================================================================== -2. Netrw Reference *netrw-ref* +3. Netrw Reference *netrw-ref* CONTROLLING EXTERNAL APPLICATIONS *netrw-externapp* @@ -140,8 +144,9 @@ CONTROLLING EXTERNAL APPLICATIONS *netrw-externapp* dav: *g:netrw_dav_cmd* = "cadaver" fetch: *g:netrw_fetch_cmd* = "fetch -o" if fetch is available ftp: *g:netrw_ftp_cmd* = "ftp" - http: *g:netrw_http_cmd* = "fetch -o" if fetch is available - http: g:netrw_http_cmd = "wget -q -O" If wget is available + http: *g:netrw_http_cmd* = "curl -o" if curl is available + http: g:netrw_http_cmd = "wget -q -O" else if wget is available + http: g:netrw_http_cmd = "fetch -o" else if fetch is available rcp: *g:netrw_rcp_cmd* = "rcp" rsync: *g:netrw_rsync_cmd* = "rsync -a" scp: *g:netrw_scp_cmd* = "scp -q" @@ -174,10 +179,22 @@ WRITING *netrw-write* *netrw-nwrite* :Nwrite "sftp://[user@]machine/path" uses sftp http: not supported! +SOURCING *netrw-source* + :Nsource ? give help + :Nsource "dav://machine[:port]/path" uses cadaver + :Nsource "fetch://[user@]machine/path" uses fetch + :Nsource "ftp://[user@]machine[[:#]port]/path" uses ftp w/ <.netrc> + :Nsource "http://[user@]machine/path" uses http uses wget + :Nsource "rcp://[user@]machine/path" uses rcp + :Nsource "rsync://[user@]machine[:port]/path" uses rsync + :Nsource "scp://[user@]machine[[:#]port]/path" uses scp + :Nsource "sftp://[user@]machine/path" uses sftp + DIRECTORY LISTING *netrw-dirlist* :Nread [protocol]://[user]@hostname/path/ - CHANGING USERID AND PASSWORD *netrw-chgup* + *netrw-login* *netrw-password* + CHANGING USERID AND PASSWORD *netrw-chgup* *netrw-userpass* Attempts to use ftp will prompt you for a user-id and a password. These will be saved in g:netrw_uid and g:netrw_passwd Subsequent uses of ftp will re-use those. If you need to use a different user id @@ -189,14 +206,12 @@ DIRECTORY LISTING *netrw-dirlist* :call NetUserPass("uid","password") -- sets global uid and password VARIABLES *netrw-variables* + +(see also: |netrw-browse-var| |netrw-protocol| |netrw-settings| |netrw-var|) + *b:netrw_lastfile* last file Network-read/written retained on a per-buffer basis (supports plain :Nw ) - *s:netrw_line* during :Nw/NetWrite, holds current line number - *s:netrw_col* during :Nw/NetWrite, holds current column number - s:netrw_line and s:netrw_col are used to - restore the cursor position on writes - *g:netrw_ftp* if it doesn't exist, use default ftp =0 use default ftp (uid password) =1 use alternate ftp method (user uid password) @@ -204,16 +219,36 @@ VARIABLES *netrw-variables* value of this variable to see if the alternate ftp method works for your setup. + *g:netrw_extracmd* default: doesn't exist + If this variable exists, then any string it contains + will be placed into the commands set to your ftp + client. As an example: + ="passive" + *g:netrw_ftpmode* ="binary" (default) ="ascii" - *g:netrw_ignorenetrc* =0 (default) + *g:netrw_ignorenetrc* =0 (default for linux, cygwin) =1 If you have a <.netrc> file but it doesn't work and you want it ignored, then set this variable as shown. + (default for Windows + cmd.exe) + + *g:netrw_menu* =0 disable netrw's menu + =1 (default) netrw's menu enabled + + *g:netrw_nogx* if this variable exists, then the "gx" map will not + be available (see |netrw-gx|) *g:netrw_uid* (ftp) user-id, retained on a per-session basis *g:netrw_passwd* (ftp) password, retained on a per-session basis + *g:netrw_shq* = "'" for Unix/Linux systems (ie. a single quote) + = "'" for Windows + cygwin systems (ie. a single quote) + = '"' for Windows systems, not using cygwin + (ie. a double quote) + Controls the quoting character used during scp and ftp + commands. + *g:netrw_win95ftp* =1 if using Win95, will remove four trailing blank lines that o/s's ftp "provides" on transfers =0 force normal ftp behavior (no trailing line removal) @@ -226,7 +261,7 @@ VARIABLES *netrw-variables* This option is ignored if you're using unix *g:netrw_use_nt_rcp* =0 don't use the rcp of WinNT, Win2000 and WinXP - =1 use WinNT's rcp in binary mode (default) + =1 use WinNT's rcp in binary mode (default) PATHS *netrw-path* @@ -245,7 +280,7 @@ file using root-relative paths, use the full path: < ============================================================================== -3. Network-Oriented File Transfer *netrw-xfer* +4. Network-Oriented File Transfer *netrw-xfer* Network-oriented file transfer under Vim is implemented by a VimL-based script () using plugin techniques. It currently supports both reading and @@ -267,12 +302,16 @@ series of commands (typically ftp) which it issues to an external program from/written to a temporary file (under Unix/Linux, /tmp/...) which the script will clean up. - *netrw-putty* *netrw-pscp* + *netrw-putty* *netrw-pscp* *netrw-psftp* One may modify any protocol's implementing external application by setting a variable (ex. scp uses the variable g:netrw_scp_cmd, which is defaulted to "scp -q"). As an example, consider using PuTTY: > - let g:netrw_scp_cmd= '"c:\Program Files\PuTTY\pscp.exe" -q -batch' + + let g:netrw_scp_cmd = '"c:\Program Files\PuTTY\pscp.exe" -q -batch' + let g:netrw_sftp_cmd= '"c:\Program Files\PuTTY\psftp.exe"' < +See |netrw-p8| for more about putty, pscp, psftp, etc. + Ftp, an old protocol, seems to be blessed by numerous implementations. Unfortunately, some implementations are noisy (ie., add junk to the end of the file). Thus, concerned users may decide to write a NetReadFixup() function @@ -303,57 +342,57 @@ additional prompting. *netrw-urls* +=================================+============================+============+ - | Reading | Writing | Uses | + | Reading | Writing | Uses | +=================================+============================+============+ - | DAV: | | | - | dav://host/path | | cadaver | - | :Nread dav://host/path | :Nwrite dav://host/path | cadaver | + | DAV: | | | + | dav://host/path | | cadaver | + | :Nread dav://host/path | :Nwrite dav://host/path | cadaver | +---------------------------------+----------------------------+------------+ - | FETCH: | | | - | fetch://[user@]host/path | | | - | fetch://[user@]host:http/path | Not Available | fetch | - | :Nread fetch://[user@]host/path| | | + | FETCH: | | | + | fetch://[user@]host/path | | | + | fetch://[user@]host:http/path | Not Available | fetch | + | :Nread fetch://[user@]host/path| | | +---------------------------------+----------------------------+------------+ - | FILE: | | | - | file:///* | file:///* | | - | file://localhost/* | file://localhost/* | | + | FILE: | | | + | file:///* | file:///* | | + | file://localhost/* | file://localhost/* | | +---------------------------------+----------------------------+------------+ - | FTP: (*3) | (*3) | | - | ftp://[user@]host/path | ftp://[user@]host/path | ftp (*2) | - | :Nread ftp://host/path | :Nwrite ftp://host/path | ftp+.netrc | - | :Nread host path | :Nwrite host path | ftp+.netrc | - | :Nread host uid pass path | :Nwrite host uid pass path | ftp | + | FTP: (*3) | (*3) | | + | ftp://[user@]host/path | ftp://[user@]host/path | ftp (*2) | + | :Nread ftp://host/path | :Nwrite ftp://host/path | ftp+.netrc | + | :Nread host path | :Nwrite host path | ftp+.netrc | + | :Nread host uid pass path | :Nwrite host uid pass path | ftp | +---------------------------------+----------------------------+------------+ - | HTTP: wget is executable: (*4) | | | - | http://[user@]host/path | Not Available | wget | + | HTTP: wget is executable: (*4) | | | + | http://[user@]host/path | Not Available | wget | +---------------------------------+----------------------------+------------+ - | HTTP: fetch is executable (*4) | | | - | http://[user@]host/path | Not Available | fetch | + | HTTP: fetch is executable (*4) | | | + | http://[user@]host/path | Not Available | fetch | +---------------------------------+----------------------------+------------+ - | RCP: | | | - | rcp://[user@]host/path | rcp://[user@]host/path | rcp | + | RCP: | | | + | rcp://[user@]host/path | rcp://[user@]host/path | rcp | +---------------------------------+----------------------------+------------+ - | RSYNC: | | | - | rsync://[user@]host/path | rsync://[user@]host/path | rsync | - | :Nread rsync://host/path | :Nwrite rsync://host/path | rsync | - | :Nread rcp://host/path | :Nwrite rcp://host/path | rcp | + | RSYNC: | | | + | rsync://[user@]host/path | rsync://[user@]host/path | rsync | + | :Nread rsync://host/path | :Nwrite rsync://host/path | rsync | + | :Nread rcp://host/path | :Nwrite rcp://host/path | rcp | +---------------------------------+----------------------------+------------+ - | SCP: | | | - | scp://[user@]host/path | scp://[user@]host/path | scp | - | :Nread scp://host/path | :Nwrite scp://host/path | scp (*1) | + | SCP: | | | + | scp://[user@]host/path | scp://[user@]host/path | scp | + | :Nread scp://host/path | :Nwrite scp://host/path | scp (*1) | +---------------------------------+----------------------------+------------+ - | SFTP: | | | - | sftp://[user@]host/path | sftp://[user@]host/path | sftp | - | :Nread sftp://host/path | :Nwrite sftp://host/path | sftp (*1) | + | SFTP: | | | + | sftp://[user@]host/path | sftp://[user@]host/path | sftp | + | :Nread sftp://host/path | :Nwrite sftp://host/path | sftp (*1) | +=================================+============================+============+ (*1) For an absolute path use scp://machine//path. (*2) if <.netrc> is present, it is assumed that it will work with your ftp client. Otherwise the script will - prompt for user-id and pasword. + prompt for user-id and password. - (*3) for ftp, "machine" may be machine#port or machine:port + (*3) for ftp, "machine" may be machine#port or machine:port if a different port is needed than the standard ftp port (*4) for http:..., if wget is available it will be used. Otherwise, @@ -393,7 +432,7 @@ However, |netrw-listhack| can help with this problem. ============================================================================== -4. Activation *netrw-activate* +5. Activation *netrw-activate* Network-oriented file transfers are available by default whenever Vim's |'nocompatible'| mode is enabled. The file resides in your @@ -408,7 +447,7 @@ up vim. I suggest that, at a minimum, you have at least the following in your < ============================================================================== -5. Transparent File Transfer *netrw-transparent* +6. Transparent File Transfer *netrw-transparent* Transparent file transfers occur whenever a regular file read or write (invoked via an |:autocmd| for |BufReadCmd| or |BufWriteCmd| events) is made. @@ -423,12 +462,16 @@ such as netrw. ============================================================================== -6. Ex Commands *netrw-ex* +7. Ex Commands *netrw-ex* The usual read/write commands are supported. There are also a few additional commands available. Often you won't need to use Nw or -Nread as shown in |netrw-transparent| (ie. use :e url, :r url, :w url; -see |netrw-urls|). +Nread as shown in |netrw-transparent| (ie. simply use > + :e url + :r url + :w url +instead, as appropriate) -- see |netrw-urls|. In the explanations +below, a {netfile} is an url to a remote file. :[range]Nw Write the specified lines to the current file as specified in b:netrw_lastfile. @@ -443,7 +486,14 @@ see |netrw-urls|). :Nread {netfile} {netfile}... Read the {netfile} after the current line. - *netrw-uidpass* +:Nsource {netfile} + Source the {netfile}. + To start up vim using a remote .vimrc, one may use + the following (all on one line) (tnx to Antoine Mechelynck) > + vim -u NORC -N + --cmd "runtime plugin/netrwPlugin.vim" + --cmd "source scp://HOSTNAME/.vimrc" +< *netrw-uidpass* :call NetUserPass() If b:netrw_uid and b:netrw_passwd don't exist, this function query the user for them. @@ -458,48 +508,50 @@ see |netrw-urls|). effectively remove the user-id and password by using "" strings. -:NetrwSettings This command is desribed in |netrw-settings| -- used to - display netrw settings and change netrw behavior. +:NetrwSettings This command is described in |netrw-settings| -- used to + display netrw settings and change netrw behavior. ============================================================================== -7. Variables and Options *netrw-options* *netrw-var* +8. Variables and Options *netrw-options* *netrw-var* -The script uses several variables which can affect 's -behavior. These variables typically may be set in the user's <.vimrc> file: -(also see |netrw-settings|) > +The script provides several variables which act as options to +ffect 's behavior. These variables typically may be set in the +user's <.vimrc> file: +(see also: |netrw-settings| |netrw-browse-var| |netrw-protocol| +|netrw-settings|) > - ------------- - Netrw Options - ------------- + ------------- + Netrw Options + ------------- Option Meaning -------------- ----------------------------------------------- < - b:netrw_col Holds current cursor position (during NetWrite) - g:netrw_cygwin =1 assume scp under windows is from cygwin - (default/windows) - =0 assume scp under windows accepts windows - style paths (default/else) - g:netrw_ftp =0 use default ftp (uid password) - g:netrw_ftpmode ="binary" (default) - ="ascii" (your choice) - g:netrw_ignorenetrc =1 (default) - if you have a <.netrc> file but you don't + b:netrw_col Holds current cursor position (during NetWrite) + g:netrw_cygwin =1 assume scp under windows is from cygwin + (default/windows) + =0 assume scp under windows accepts windows + style paths (default/else) + g:netrw_ftp =0 use default ftp (uid password) + g:netrw_ftpmode ="binary" (default) + ="ascii" (your choice) + g:netrw_ignorenetrc =1 (default) + if you have a <.netrc> file but you don't want it used, then set this variable. Its mere existence is enough to cause <.netrc> to be ignored. - b:netrw_lastfile Holds latest method/machine/path. - b:netrw_line Holds current line number (during NetWrite) - g:netrw_passwd Holds current password for ftp. - g:netrw_silent =0 transfers done normally - =1 transfers done silently - g:netrw_uid Holds current user-id for ftp. - =1 use alternate ftp (user uid password) - (see |netrw-options|) - g:netrw_use_nt_rcp =0 don't use WinNT/2K/XP's rcp (default) - =1 use WinNT/2K/XP's rcp, binary mode - g:netrw_win95ftp =0 use unix-style ftp even if win95/98/ME/etc - =1 use default method to do ftp > + b:netrw_lastfile Holds latest method/machine/path. + b:netrw_line Holds current line number (during NetWrite) + g:netrw_passwd Holds current password for ftp. + g:netrw_silent =0 transfers done normally + =1 transfers done silently + g:netrw_uid Holds current user-id for ftp. + =1 use alternate ftp (user uid password) + (see |netrw-options|) + g:netrw_use_nt_rcp =0 don't use WinNT/2K/XP's rcp (default) + =1 use WinNT/2K/XP's rcp, binary mode + g:netrw_win95ftp =0 use unix-style ftp even if win95/98/ME/etc + =1 use default method to do ftp > ----------------------------------------------------------------------- < The script will also make use of the following variables internally, albeit @@ -522,25 +574,25 @@ Netrw supports a number of protocols. These protocols are invoked using the variables listed below, and may be modified by the user. > ------------------------ - Protocol Control Options + Protocol Control Options ------------------------ - Option Type Setting Meaning - --------- -------- -------------- --------------------------- + Option Type Setting Meaning + --------- -------- -------------- --------------------------- < - netrw_ftp variable =doesn't exist userid set by "user userid" - =0 userid set by "user userid" - =1 userid set by "userid" - NetReadFixup function =doesn't exist no change - =exists Allows user to have files - read via ftp automatically - transformed however they wish - by NetReadFixup() + netrw_ftp variable =doesn't exist userid set by "user userid" + =0 userid set by "user userid" + =1 userid set by "userid" + NetReadFixup function =doesn't exist no change + =exists Allows user to have files + read via ftp automatically + transformed however they wish + by NetReadFixup() g:netrw_dav_cmd variable ="cadaver" - g:netrw_fetch_cmd variable ="fetch -o" if fetch is available + g:netrw_fetch_cmd variable ="fetch -o" if fetch is available g:netrw_ftp_cmd variable ="ftp" g:netrw_http_cmd variable ="fetch -o" if fetch is available g:netrw_http_cmd variable ="wget -O" else if wget is available - g:netrw_list_cmd variable ="ssh HOSTNAME ls -Fa" + g:netrw_list_cmd variable ="ssh USEPORT HOSTNAME ls -Fa" g:netrw_rcp_cmd variable ="rcp" g:netrw_rsync_cmd variable ="rsync -a" g:netrw_scp_cmd variable ="scp -q" @@ -548,16 +600,19 @@ variables listed below, and may be modified by the user. ------------------------------------------------------------------------- < *netrw-ftp* -The first two options (netrw_ftp and NetReadFixup) both help with certain -ftp's that give trouble otherwise. In order to best understand how to use -these options if ftp is giving you troubles, a bit of discussion follows on -how netrw does ftp reads. -The g:netrw_..._cmd variables specify the external program to use handle the -associated protocol (rcp, ftp, etc), plus any options. +The g:netrw_..._cmd options (|g:netrw_ftp_cmd| and |g:netrw_sftp_cmd|) +specify the external program to use handle the ftp protocol. They may +include command line options (such as -p for passive mode). -The g:netrw_list_cmd's HOSTNAME entry will be changed via substitution with -whatever the current request is for a hostname. +Browsing is supported by using the |g:netrw_list_cmd|; the substring +"HOSTNAME" will be changed via substitution with whatever the current request +is for a hostname. + +Two options (|g:netrw_ftp| and |netrw-fixup|) both help with certain ftp's +that give trouble . In order to best understand how to use these options if +ftp is giving you troubles, a bit of discussion is provided on how netrw does +ftp reads. For ftp, netrw typically builds up lines of one of the following formats in a temporary file: @@ -565,18 +620,20 @@ temporary file: IF g:netrw_ftp !exists or is not 1 IF g:netrw_ftp exists and is 1 ---------------------------------- ------------------------------ < - open machine [port] open machine [port] - user userid password userid password - [g:netrw_ftpmode] password - get filename tempfile [g:netrw_ftpmode] - get filename tempfile > + open machine [port] open machine [port] + user userid password userid password + [g:netrw_ftpmode] password + [g:netrw_extracmd] [g:netrw_ftpmode] + get filename tempfile [g:netrw_extracmd] + get filename tempfile > --------------------------------------------------------------------- < +The |g:netrw_ftpmode| and |g:netrw_extracmd| are optional. + Netrw then executes the lines above by use of a filter: > :%! {g:netrw_ftp_cmd} -i [-n] < - where g:netrw_ftp_cmd is usually "ftp", -i tells ftp not to be interactive @@ -611,7 +668,7 @@ messages) you may write a NetReadFixup(tmpfile) function: elseif a:method == 7 "rsync elseif a:method == 8 "fetch elseif a:method == 9 "sftp - else " complain + else " complain endif endfunction > @@ -625,15 +682,15 @@ itself: if has("win95") && g:netrw_win95ftp fun! NetReadFixup(method, line1, line2) if method == 3 " ftp (no <.netrc>) - let fourblanklines= line2 - 3 - silent fourblanklines.",".line2."g/^\s*/d" + let fourblanklines= line2 - 3 + silent fourblanklines.",".line2."g/^\s*/d" endif endfunction endif > ============================================================================== -8. Directory Browsing *netrw-browse* *netrw-dir* *netrw-list* *netrw-help* +9. Directory Browsing *netrw-browse* *netrw-dir* *netrw-list* *netrw-help* MAPS *netrw-maps* .............Help.......................................|netrw-help| @@ -641,13 +698,13 @@ MAPS *netrw-maps* ............Deleting Files or Directories..............|netrw-delete| -................Going Up...................................|netrw--| a................Hiding Files or Directories................|netrw-a| - b................Bookmarking a Directory....................|netrw-b| - B................Changing to a Bookmarked Directory.........|netrw-B| + mb...............Bookmarking a Directory....................|netrw-mb| + gb...............Changing to a Bookmarked Directory.........|netrw-gb| c................Make Browsing Directory The Current Dir....|netrw-c| d................Make A New Directory.......................|netrw-d| D................Deleting Files or Directories..............|netrw-D| ............Edit File/Directory Hiding List............|netrw-ctrl-h| - i................Long Listing...............................|netrw-i| + i................Change Listing Style.......................|netrw-i| ............Refreshing the Listing.....................|netrw-ctrl-l| o................Browsing with a Horizontal Split...........|netrw-o| p................Preview Window.............................|netrw-p| @@ -656,6 +713,7 @@ MAPS *netrw-maps* R................Renaming Files or Directories..............|netrw-R| s................Selecting Sorting Style....................|netrw-s| S................Editing the Sorting Sequence...............|netrw-S| + t................Browsing with a new tab....................|netrw-t| u................Changing to a Predecessor Directory........|netrw-u| U................Changing to a Successor Directory..........|netrw-U| v................Browsing with a Vertical Split.............|netrw-v| @@ -666,6 +724,7 @@ MAPS *netrw-maps* :Sexplore[!] [dir] Split & Explore directory ...............|netrw-explore| :Hexplore[!] [dir] Horizontal Split & Explore...............|netrw-explore| :Vexplore[!] [dir] Vertical Split & Explore.................|netrw-explore| + :Texplore[!] [dir] Tab & Explore............................|netrw-explore| :Pexplore[!] [dir] Vertical Split & Explore.................|netrw-explore| :Nexplore[!] [dir] Vertical Split & Explore.................|netrw-explore| :NetrwSettings.............................................|netrw-settings| @@ -674,7 +733,7 @@ QUICK REFERENCE COMMANDS TABLE *netrw-browse-cmds* > ------- ----------- Command Explanation - ------- ----------- + ------- ----------- < Causes Netrw to issue help Netrw will enter the directory or read the file |netrw-cr| Netrw will attempt to remove the file/directory |netrw-del| @@ -682,27 +741,25 @@ QUICK REFERENCE COMMANDS TABLE *netrw-browse-cmds* a Toggles between normal display, |netrw-a| hiding (suppress display of files matching g:netrw_list_hide) showing (display only files which match g:netrw_list_hide) - b bookmark current directory; use Nb if compact listing - in use |netrw-b| - B go to previous bookmarked directory; use Nb if compact - listing is in use |netrw-B| + mb bookmark current directory + gb go to previous bookmarked directory c Make current browsing directory the current directory |netrw-c| d Make a directory |netrw-d| D Netrw will attempt to remove the file(s)/directory(ies) |netrw-D| Edit file hiding list |netrw-ctrl-h| - i Toggles between long and short listing |netrw-i| + i Cycle between thin, long, wide, and tree listings|netrw-i| Causes Netrw to refresh the directory listing |netrw-ctrl-l| - Nb Same as b, but always available |netrw-Nb| - NB Same as B, but always available |netrw-NB| o Enter the file/directory under the cursor in a new browser window. A horizontal split is used. |netrw-o| O Obtain a file specified by cursor |netrw-O| p Preview the file |netrw-p| P Browse in the previously used window |netrw-P| + q List bookmarked directories and history |netrw-q| r Reverse sorting order |netrw-r| R Rename the designed file(s)/directory(ies) |netrw-R| s Select sorting style: by name, time, or file size |netrw-s| S Specify suffix priority for name-sorting |netrw-S| + t Enter the file/directory under the cursor in a new tab|netrw-t| u Change to recently-visited directory |netrw-u| U Change to subsequently-visited directory |netrw-U| v Enter the file/directory under the cursor in a new browser @@ -716,16 +773,17 @@ NETRW BROWSER VARIABLES *netrw-browse-var* --- ----------- < *g:netrw_alto* change from above splitting to below splitting by setting this variable (see |netrw-o|) - default: =0 + default: =&sb (see |'sb'|) *g:netrw_altv* change from left splitting to right splitting by setting this variable (see |netrw-v|) - default: =0 + default: =&spr (see |'spr'|) *g:netrw_browse_split* when browsing, will open the file by: =0: re-using the same window - =1: horizontally splitting the window first - =2: vertically splitting the window first + =1: horizontally splitting the window first + =2: vertically splitting the window first + =3: open file in new tab *g:netrw_browsex_viewer* specify user's preference for a viewer: > "kfmclient exec" @@ -772,9 +830,22 @@ NETRW BROWSER VARIABLES *netrw-browse-var* *g:netrw_ftp_list_cmd* options for passing along to ftp for directory listing. Defaults: unix or g:netrw_cygwin set: : "ls -lF" - otherwise "dir" + otherwise "dir" - *g:netrw_hide* if true, the hiding list is used + + *g:netrw_ftp_sizelist_cmd* options for passing along to ftp for directory + listing, sorted by size of file. + Defaults: + unix or g:netrw_cygwin set: : "ls -slF" + otherwise "dir" + + *g:netrw_ftp_timelist_cmd* options for passing along to ftp for directory + listing, sorted by time of last modification. + Defaults: + unix or g:netrw_cygwin set: : "ls -tlF" + otherwise "dir" + + *g:netrw_hide* if true, the hiding list is used default: =0 *g:netrw_keepdir* =1 (default) keep current directory immune from @@ -786,10 +857,14 @@ NETRW BROWSER VARIABLES *netrw-browse-var* *g:netrw_list_cmd* command for listing remote directories default: (if ssh is executable) - "ssh HOSTNAME ls -FLa" - - *g:netrw_longlist* if =1, then long listing will be default - + "ssh HOSTNAME ls -FLa" + + *g:netrw_liststyle* Set the default listing style: + = 0: thin listing (one file per line) + = 1: long listing (one file per line with time + stamp information and file size) + = 2: wide listing (multiple files in columns) + = 3: tree style listing *g:netrw_list_hide* comma separated pattern list for hiding files default: "" @@ -807,16 +882,16 @@ NETRW BROWSER VARIABLES *netrw-browse-var* columnar. *g:netrw_mkdir_cmd* command for making a remote directory - default: "ssh HOSTNAME mkdir" + default: "ssh USEPORT HOSTNAME mkdir" *g:netrw_rm_cmd* command for removing files - default: "ssh HOSTNAME rm" + default: "ssh USEPORT HOSTNAME rm" *g:netrw_rmdir_cmd* command for removing directories - default: "ssh HOSTNAME rmdir" + default: "ssh USEPORT HOSTNAME rmdir" *g:netrw_rmf_cmd* command for removing softlinks - default: "ssh HOSTNAME rm -f" + default: "ssh USEPORT HOSTNAME rm -f" *g:netrw_sort_by* sort by "name", "time", or "size" default: "name" @@ -827,7 +902,7 @@ NETRW BROWSER VARIABLES *netrw-browse-var* *g:netrw_sort_sequence* when sorting by name, first sort by the comma-separated pattern sequence default: '[\/]$,*,\.bak$,\.o$,\.h$, - \.info$,\.swp$,\.obj$' + \.info$,\.swp$,\.obj$' *g:netrw_ssh_cmd* One may specify an executable command to use instead of ssh for remote actions @@ -841,6 +916,14 @@ NETRW BROWSER VARIABLES *netrw-browse-var* messages. By default its value is: '^total\s\+\d\+$' + *g:netrw_use_noswf* netrw normally avoids writing swapfiles + for browser buffers. However, under some + systems this apparently is causing nasty + ml_get errors to appear; if you're getting + ml_get errors, try putting + let g:netrw_use_noswf= 0 + in your .vimrc. + *g:netrw_timefmt* specify format string to strftime() (%c) default: "%c" @@ -888,33 +971,36 @@ If either of these options are present when browsing is attempted, netrw will change them by using noacd and removing the ta suboptions from the |'formatoptions'|. - *netrw-explore* *netrw-pexplore* - *netrw-hexplore* *netrw-sexplore* -DIRECTORY EXPLORING COMMANDS *netrw-nexplore* *netrw-vexplore* + *netrw-explore* *netrw-pexplore* *netrw-texplore* + *netrw-hexplore* *netrw-sexplore* *netrw-nexplore* + *netrw-vexplore* +DIRECTORY EXPLORING COMMANDS :Explore[!] [dir]... Explore directory of current file *:Explore* :Sexplore[!] [dir]... Split&Explore directory of current file *:Sexplore* - :Hexplore[!] [dir]... Horizontal Split & Explore *:Hexplore* - :Vexplore[!] [dir]... Vertical Split & Explore *:Vexplore* + :Hexplore[!] [dir]... Horizontal Split & Explore *:Hexplore* + :Vexplore[!] [dir]... Vertical Split & Explore *:Vexplore* + :Texplore [dir]... Tab & Explore *:Texplore* - Used with :Explore **/pattern : - :Nexplore............. go to next matching file *:Nexplore* - :Pexplore............. go to previous matching file *:Pexplore* + Used with :Explore **/pattern : (also see |netrw-starstar|) + :Nexplore............. go to next matching file *:Nexplore* + :Pexplore............. go to previous matching file *:Pexplore* :Explore will open the local-directory browser on the current file's - directory (or on directory [dir] if specified). The window will be + directory (or on directory [dir] if specified). The window will be split only if the file has been modified, otherwise the browsing window will take over that window. Normally the splitting is taken horizontally. :Explore! is like :Explore, but will use vertical splitting. :Sexplore will always split the window before invoking the local-directory - browser. As with Explore, the splitting is normally done + browser. As with Explore, the splitting is normally done horizontally. :Sexplore! [dir] is like :Sexplore, but the splitting will be done vertically. :Hexplore [dir] does an :Explore with |:belowright| horizontal splitting. :Hexplore! [dir] does an :Explore with |:aboveleft| horizontal splitting. :Vexplore [dir] does an :Explore with |:leftabove| vertical splitting. :Vexplore! [dir] does an :Explore with |:rightbelow| vertical splitting. +:Texplore [dir] does a tabnew before generating the browser window By default, these commands use the current file's directory. However, one may explicitly provide a directory (path) to use. @@ -976,7 +1062,7 @@ however, Explore will also search subdirectories as well as the current directory. -REFRESHING THE LISTING *netrw-ctrl-l* +REFRESHING THE LISTING *netrw-ctrl-l* *netrw-ctrl_l* To refresh either a local or remote directory listing, press ctrl-l () or hit the when atop the ./ directory entry in the listing. One may also @@ -1005,18 +1091,19 @@ BROWSING *netrw-cr* Browsing is simple: move the cursor onto a file or directory of interest. Hitting the (the return key) will select the file or directory. Directories will themselves be listed, and files will be opened using the -protocol given in the original read request. +protocol given in the original read request. - CAVEAT: There are three forms of listing (see |netrw-i|). Netrw assumes + CAVEAT: There are four forms of listing (see |netrw-i|). Netrw assumes that two or more spaces delimit filenames and directory names for the long and wide listing formats. Thus, if your filename or directory name has two or more spaces embedded in it, or any trailing spaces, then you'll need to use the "thin" format to select it. The |g:netrw_browse_split| option, which is zero by default, may be used to -cause the opening of files to be done in a new window. The splitting will -be done horizontally if the option is one and vertically if the option is -two. +cause the opening of files to be done in a new window or tab. When the option +is one or two, the splitting will be taken horizontally or vertically, +respectively. When the option is set to three, a will cause the file +to appear in a new tab. OBTAINING A FILE *netrw-O* @@ -1041,9 +1128,9 @@ Related topics: directory, see |g:netrw_keepdir|. -THIN, LONG, AND WIDE LISTINGS *netrw-i* +CHANGE LISTING STYLE *netrw-i* -The "i" map cycles between the thin, long, and wide listing formats. +The "i" map cycles between the thin, long, wide, and tree listing formats. The short listing format gives just the files' and directories' names. @@ -1053,14 +1140,17 @@ date of last modification for local directories. With the long listing format, netrw is not able to recognize filenames which have trailing spaces. Use the thin listing format for such files. -The wide listing format has a multi-column display of the various files in the -netrw current directory, rather like the Unix "ls" presents. In this mode the -"b" and "B" maps are not available; instead, use Nb (|netrw-Nb|) and NB -(|netrw-NB|). The wide listing format uses two or more contiguous spaces to -delineate filenames; when using that format, netrw won't be able to recognize -or use filenames which have two or more contiguous spaces embedded in the name -or any trailing spaces. The thin listing format will, however, work with such -files. +The wide listing format uses two or more contiguous spaces to delineate +filenames; when using that format, netrw won't be able to recognize or use +filenames which have two or more contiguous spaces embedded in the name or any +trailing spaces. The thin listing format will, however, work with such files. +This listing format is the most compact. + +The tree listing format has a top directory followed by files and directories +preceded by a "|". One may open and close directories by pressing the +key while atop the directory name. There is only one tree listing buffer; +hence, using "v" or "o" on a subdirectory will only show the same buffer, +twice. MAKING A NEW DIRECTORY *netrw-d* @@ -1116,21 +1206,30 @@ One may rename a block of files and directories by selecting them with the V (|linewise-visual|). -HIDING FILES OR DIRECTORIES *netrw-a* +HIDING FILES OR DIRECTORIES *netrw-a* *netrw-hiding* Netrw's browsing facility allows one to use the hiding list in one of three ways: ignore it, hide files which match, and show only those files which match. The "a" map allows the user to cycle about these three ways. The g:netrw_list_hide variable holds a comma delimited list of patterns (ex. -\.obj) which specify the hiding list. (also see |netrw-ctrl-h|) To set the hiding -list, use the map. As an example, to hide files which begin with a ".", -one may use the map to set the hiding list to '^\..*' (or one may put -let g:netrw_list_hide= '^\..*' in one's <.vimrc>). One may then use the "a" -key to show all files, hide matching files, or to show only the matching +\.obj) which specify the hiding list. (also see |netrw-ctrl-h|) To set the +hiding list, use the map. As an example, to hide files which begin with +a ".", one may use the map to set the hiding list to '^\..*' (or one may +put let g:netrw_list_hide= '^\..*' in one's <.vimrc>). One may then use the +"a" key to show all files, hide matching files, or to show only the matching files. + Example: ^.*\.[ch] + This hiding list command will hide/show all *.c and *.h files. + Example: ^.*\.c,^.*\.h + This hiding list command will also hide/show all *.c and *.h + files. + +Don't forget to use the "a" map to select the normal/hiding/show mode you want! + + *netrw-ctrl_h* EDIT FILE OR DIRECTORY HIDING LIST *netrw-ctrl-h* *netrw-edithide* The "" map brings up a requestor allowing the user to change the @@ -1152,13 +1251,41 @@ new window and cursor at the bottom, have let g:netrw_alto = 1 -in your <.vimrc>. +in your <.vimrc>. (also see |netrw-t| |netrw-v| |g:netrw_alto|) + +There is only one tree listing buffer; using "o" on a displayed subdirectory +will split the screen, but the same buffer will be shown twice. + + +BROWSING WITH A VERTICALLY SPLIT WINDOW *netrw-v* + +Normally one enters a file or directory using the . However, the "v" map +allows one to open a new window to hold the new directory listing or file. A +vertical split is used. (for horizontal splitting, see |netrw-o|) + +Normally, the v key splits the window vertically with the new window and +cursor at the left. To change to splitting the window vertically with the new +window and cursor at the right, have + + let g:netrw_altv = 1 + +in your <.vimrc>. (also see: |netrw-o| |netrw-t| |g:netrw_altv|) + +There is only one tree listing buffer; using "v" on a displayed subdirectory +will split the screen, but the same buffer will be shown twice. + + +BROWSING WITH A NEW TAB *netrw-t* + +Normally one enters a file or directory using the . The "t" map +allows one to open a new window hold the new directory listing or file in a +new tab. (also see: |netrw-o| |netrw-v|) PREVIEW WINDOW *netrw-p* *netrw-preview* -One may use a preview window (currently only for local browsing) by using the -"p" key when the cursor is atop the desired filename to be previewed. +One may use a preview window by using the "p" key when the cursor is atop the +desired filename to be previewed. PREVIOUS WINDOW *netrw-P* *netrw-prvwin* @@ -1218,23 +1345,9 @@ With the "U" map, one can change to a later directory (successor). This map is the opposite of the "u" map. (see |netrw-u|) Use the q map to list both the bookmarks and history. (see |netrw-q|) - -BROWSING WITH A VERTICALLY SPLIT WINDOW *netrw-v* - -Normally one enters a file or directory using the . However, the "v" map -allows one to open a new window to hold the new directory listing or file. A -vertical split is used. (for horizontal splitting, see |netrw-o|) - -Normally, the v key splits the window vertically with the new window and -cursor at the left. To change to splitting the window vertically with the new -window and cursor at the right, have - - let g:netrw_altv = 1 - -in your <.vimrc>. - - -CUSTOMIZING BROWSING WITH A USER FUNCTION *netrw-x* *netrw-handler* *gx* + *netrw-gx* +CUSTOMIZING BROWSING WITH A USER FUNCTION *netrw-x* *netrw-handler* + (also see |netrw_filehandler|) Certain files, such as html, gif, jpeg, (word/office) doc, etc, files, are best seen with a special handler (ie. a tool provided with your computer). @@ -1242,7 +1355,8 @@ Netrw allows one to invoke such special handlers by: > * when Exploring, hit the "x" key * when editing, hit gx with the cursor atop the special filename -< +< (not available if the |g:netrw_nogx| variable exists) + Netrw determines which special handler by the following method: * if |g:netrw_browsex_viewer| exists, then it will be used to attempt to @@ -1255,7 +1369,7 @@ Netrw determines which special handler by the following method: If g:netrw_browsex_viewer == '-', then netrwFileHandler() will be invoked first (see |netrw_filehandler|). - * for Windows 32 or 64, the url and FileProtocolHandler dlls are used. + * for Windows 32 or 64, the url and FileProtocolHandler dlls are used. * for Gnome (with gnome-open): gnome-open is used. * for KDE (with kfmclient): kfmclient is used. * otherwise the netrwFileHandler plugin is used. @@ -1266,68 +1380,81 @@ OpenOffice (*.sfx), visualization (*.jpg, *.gif, etc), and PostScript (*.ps, *.eps) can be handled. *netrw_filehandler* -The netrwFileHandler applies a user-defined function to a file, based on its -extension. Of course, the handler function must exist for it to be called! + +The "x" map applies a function to a file, based on its extension. Of course, +the handler function must exist for it to be called! > Ex. mypgm.html x -> - netrwFileHandler_html("scp://user@host/some/path/mypgm.html") + NFH_html("scp://user@host/some/path/mypgm.html") < -See the for an example of how to handle an html -file with mozilla. - -One may write custom netrwFileHandlers; please look at the > - - plugin/netrwFileHandlers.vim - -script for examples. If its likely to be generally useful, please feel free -to forward a copy to me for future inclusion in the distribution. +Users may write their own netrw File Handler functions to support more +suffixes with special handling. See for +examples on how to make file handler functions. As an example: > + + " NFH_suffix(filename) + fun! NFH_suffix(filename) + ..do something special with filename.. + endfun +< +These functions need to be defined in some file in your .vim/plugin +(vimfiles\plugin) directory. Vim's function names may not have punctuation +characters (except for the underscore) in them. To support suffices that +contain such characters, netrw will first convert the suffix using the +following table: > + + @ -> AT ! -> EXCLAMATION % -> PERCENT + : -> COLON = -> EQUAL ? -> QUESTION + , -> COMMA - -> MINUS ; -> SEMICOLON + $ -> DOLLAR + -> PLUS ~ -> TILDE +< +So, for example: > + + file.rcs,v -> NFH_rcsCOMMAv() +< +If more such translations are necessary, please send me email: > + NdrOchip at ScampbellPfamily.AbizM - NOSPAM +with a request. MAKING THE BROWSING DIRECTORY THE CURRENT DIRECTORY *netrw-c* *netrw-curdir* By default, |g:netrw_keepdir| is 1. This setting means that the current -directory will not track the browsing directory. However, setting -g:netrw_keepdir to 0 (say, in your <.vimrc>) will tell netrw to make the -currently browsed directory also be the current directory. +directory will not track the browsing directory. + +Setting g:netrw_keepdir to 0 tells netrw to make vim's current directory to +track netrw's browsing directory. -However, with the default setting for g:netrw_keepdir of 1 where netrw +However, given the default setting for g:netrw_keepdir of 1 where netrw maintains its own separate notion of the current directory, in order to make the two directories the same, use the "c" map (just type c). That map will -set Vim's notion of the current directory to the netrw's current browsing +set Vim's notion of the current directory to netrw's current browsing directory. -BOOKMARKING A DIRECTORY *netrw-b* *netrw-bookmark* *netrw-bookmarks* - *netrw-Nb* +BOOKMARKING A DIRECTORY *netrw-mb* *netrw-bookmark* *netrw-bookmarks* One may easily "bookmark" a directory by using > - {cnt}b + {cnt}mb < Any count may be used. One may use viminfo's "!" option to retain bookmarks -between vim sessions. See |netrw-B| for how to return to a bookmark and +between vim sessions. See |netrw-gb| for how to return to a bookmark and |netrw-q| for how to list them. -When wide listing is in use (see |netrw-i|), then the b map is not available; -instead, use {cnt}Nb. - -CHANGING TO A BOOKMARKED DIRECTORY *netrw-NB* *netrw-B* +CHANGING TO A BOOKMARKED DIRECTORY *netrw-gb* To change directory back to a bookmarked directory, use - {cnt}B + {cnt}gb -Any count may be used to reference any of the bookmarks. See |netrw-b| on +Any count may be used to reference any of the bookmarks. See |netrw-mb| on how to bookmark a directory and |netrw-q| on how to list bookmarks. -When wide listing is in use (see |netrw-i|), then the B map is not available; -instead, use {cnt}NB. - LISTING BOOKMARKS AND HISTORY *netrw-q* *netrw-listbookmark* Pressing "q" will list the bookmarked directories and directory traversal -history (query). (see |netrw-b|, |netrw-B|, |netrw-u|, and |netrw-U|) +history (query). (see |netrw-mb|, |netrw-gb|, |netrw-u|, and |netrw-U|) IMPROVING DIRECTORY BROWSING *netrw-listhack* @@ -1335,15 +1462,29 @@ IMPROVING DIRECTORY BROWSING *netrw-listhack* Especially with the remote directory browser, constantly entering the password is tedious. -For Linux/Unix systems, I suggest looking into - - http://hacks.oreilly.com/pub/h/66 - -It gives a tip for setting up password-less use of ssh and scp, and discusses -the associated security issues. - -For Windows, the vim mailing list has mentioned that Pageant helps with -avoiding the constant need to enter the password. +For Linux/Unix systems, the book "Linux Server Hacks - 100 industrial strength +tips & tools" by Rob Flickenger (O'Reilly, ISBN 0-596-00461-3), gives a tip +for setting up no-password ssh and scp, plus discusses associated security +issues. It used to be available at http://hacks.oreilly.com/pub/h/66 , +but apparently that address is now being redirected to some "hackzine". +I'll attempt a summary: + + 1. Generate a public/private key pair on the ssh server: + ssh-keygen -t rsa + (saving the file in ~/.ssh/id_rsa is ok) + 2. Just hit the when asked for passphrase (twice). + 3. This creates two files: + ~/.ssh/id_rsa + ~/.ssh/id_rsa.pub + 4. On the client: + cd + mkdir .ssh + chmod 0700 .ssh + scp {serverhostname}:.ssh/id_rsa.pub . + cat id_rsa.pub >> .ssh/authorized_keys2 + +For Windows, folks on the vim mailing list have mentioned that Pageant helps +with avoiding the constant need to enter the password. NETRW SETTINGS *netrw-settings* @@ -1355,9 +1496,11 @@ settings. You may change any of their values; when you save the file, the settings therein will be used. One may also press "?" on any of the lines for help on what each of the variables do. +(see also: |netrw-browse-var| |netrw-protocol| |netrw-var| |netrw-variables|) + ============================================================================== -9. Problems and Fixes *netrw-problems* +10. Problems and Fixes *netrw-problems* (This section is likely to grow as I get feedback) (also see |netrw-debug|) @@ -1371,22 +1514,31 @@ help on what each of the variables do. let g:netrw_win95ftp= 1 *netrw-p2* - P2. I use windows, and my network browsing with ftp doesn't sort by - time or size + P2. I use Windows, and my network browsing with ftp doesn't sort by + time or size! -or- The remote system is a Windows server; why + don't I get sorts by time or size? Windows' ftp has a minimal support for ls (ie. it doesn't accept sorting options). It doesn't support the -F which gives an explanatory character (ABC/ for "ABC is a directory"). - Netrw uses dir to get its short and long listings. If you - think your ftp does support a full-up ls, put the following - into your <.vimrc>: - - let g:netrw_ftp_list_cmd= "ls -lF" + Netrw then uses "dir" to get both its short and long listings. + If you think your ftp does support a full-up ls, put the + following into your <.vimrc>: > + let g:netrw_ftp_list_cmd = "ls -lF" + let g:netrw_ftp_timelist_cmd= "ls -tlF" + let g:netrw_ftp_sizelist_cmd= "ls -slF" +< Alternatively, if you have cygwin on your Windows box, put - into your <.vimrc>: + into your <.vimrc>: > let g:netrw_cygwin= 1 +< + This problem also occurs when the remote system is Windows. + In this situation, the various g:netrw_ftp_[time|size]list_cmds + are as shown above, but the remote system will not correctly + modify its listing behavior. + *netrw-p3* P3. I tried rcp://user@host/ (or protocol other than ftp) and netrw @@ -1400,7 +1552,7 @@ help on what each of the variables do. *netrw-p4* P4. I would like long listings to be the default. - let g:netrw_longlist=1 + let g:netrw_liststyle= 1 Check out |netrw-browse-var| for more customizations that you can set. @@ -1419,10 +1571,110 @@ help on what each of the variables do. How do I do that? let g:netrw_keepdir= 0 - + + *netrw-p7* + P7. I use Chinese (or other non-ascii) characters in my filenames, and + netrw (Explore, Sexplore, Hexplore, etc) doesn't display them! + + (taken from an answer provided by Wu Yongwei on the vim + mailing list) + I now see the problem. You code page is not 936, right? Vim + seems only able to open files with names that are valid in the + current code page, as are many other applications that do not + use the Unicode version of Windows APIs. This is an OS-related + issue. You should not have such problems when the system + locale uses UTF-8, such as modern Linux distros. + + (...it is one more reason to recommend that people use utf-8!) + + *netrw-p8* + P8. I'm getting "ssh is not executable on your system" -- what do I + do? + + (Dudley Fox) Most people I know use putty for windows ssh. It + is a free ssh/telnet application. You can read more about it + here: + + http://www.chiark.greenend.org.uk/~sgtatham/putty/ Also: + + (Marlin Unruh) This program also works for me. It's a single + executable, so he/she can copy it into the Windows\System32 + folder and create a shortcut to it. + + (Dudley Fox) You might also wish to consider plink, as it + sounds most similar to what you are looking for. plink is an + application in the putty suite. + + http://the.earth.li/~sgtatham/putty/0.58/htmldoc/Chapter7.html#plink + + (Vissale Neang) Maybe you can try OpenSSH for windows, which + can be obtained from: + + http://sshwindows.sourceforge.net/ + + It doesn't need the full Cygwin package. + + (Antoine Mechelynck) For individual Unix-like programs needed + for work in a native-Windows environment, I recommend getting + them from the GnuWin32 project on sourceforge if it has them: + + http://gnuwin32.sourceforge.net/ + + Unlike Cygwin, which sets up a Unix-like virtual machine on + top of Windows, GnuWin32 is a rewrite of Unix utilities with + Windows system calls, and its programs works quite well in the + cmd.exe "Dos box". + + (dave) Download WinSCP and use that to connect to the server. + In Preferences > Editors, set gvim as your editor: + + - Click "Add..." + - Set External Editor (adjust path as needed, include + the quotes and !.! at the end): + "c:\Program Files\Vim\vim70\gvim.exe" !.! + - Check that the filetype in the box below is + {asterisk}.{asterisk} (all files), or whatever types + you want (cec: change {asterisk} to * ; I had to + write it that way because otherwise the helptags + system thinks its a tag) + - Make sure its at the top of the listbox (click it, + then click "Up" if its not) + If using the Norton Commander style, you just have to hit + to edit a file in a local copy of gvim. + + (Vit Gottwald) How to generate public/private key and save + public key it on server: > + http://www.tartarus.org/~simon/puttydoc/Chapter8.html#pubkey-gettingready + 8.3 Getting ready for public key authentication +< + How to use private key with 'pscp': > + http://www.tartarus.org/~simon/puttydoc/Chapter5.html + 5.2.4 Using public key authentication with PSCP +< + (cec) To make proper use of these suggestions above, you will + need to modify the following user-settable variables in your + .vimrc: + + |g:netrw_ssh_cmd| |g:netrw_list_cmd| |g:netrw_mkdir_cmd| + |g:netrw_rm_cmd| |g:netrw_rmdir_cmd| |g:netrw_rmf_cmd| + + The first one (|g:netrw_ssh_cmd|) is the most important; most + of the others will use the string in g:netrw_ssh_cmd by + default. + *netrw-p9* *netrw-ml_get* + P9. I'm browsing, changing directory, and bang! ml_get errors + appear and I have to kill vim. Any way around this? + + Normally netrw attempts to avoid writing swapfiles for + its temporary directory buffers. However, on some systems + this attempt appears to be causing ml_get errors to + appear. Please try setting |g:netrw_use_noswf| to 0 + in your <.vimrc>: > + let g:netrw_use_noswf= 0 +< ============================================================================== -10. Debugging *netrw-debug* +11. Debugging *netrw-debug* The script is typically available as: > @@ -1463,21 +1715,144 @@ which is loaded automatically at startup (assuming :set nocp). This command, provided by , will comment out all Decho-debugging statements (Dfunc(), Dret(), Decho(), Dredir()). - 4. Then bring up vim and attempt a transfer. A set of messages - should appear concerning the steps that took in - attempting to read/write your file over the network. Please - send that information to 's maintainer, + 4. Then bring up vim and attempt a transfer or do browsing. A set of + messages should appear concerning the steps that took + in attempting to read/write your file over the network. + To save the file, use > + :wincmd j + :set bt= + :w! DBG +< Please send that information to 's maintainer, > NdrOchip at ScampbellPfamily.AbizM - NOSPAM - +< ============================================================================== -11. History *netrw-history* {{{1 - - v98: May 02, 2006 * the "p" key didn't work properly when the browsing - directory name had spaces in it. - v97: May 01, 2006 * exists("&acd") now used to determine if - the 'acd' option exists - * "obtain" now works again under Windows +12. History *netrw-history* {{{1 + + v108: Jan 03, 2007 * included preview map (|netrw-p|), supporting + remote browsing + * netrw can now source remote files + Jan 26, 2007 * Colton Jamieson noted that remote directory + browsing did not support alternate port + selection. This feature has now been extended + to apply to all remote browsing commands via ssh. + (list, remove/delete, rename) + Jan 31, 2007 * Luis Florit reported that @* was an invalid + register. The @* register is now only saved and + restored if 'guioptions' contains "a". + Feb 02, 2007 * Fixed a bug that cropped up when writing files + via scp using cygwin + Feb 08, 2007 * tree listing mode managed to stop working again; + fixed again! + Feb 15, 2007 * Guido Van Hoecke reported that netrw didn't + handle browsing well with M$ ftp servers. He even + set up a temporary account for me to test with + (thanks!). Netrw now can browse M$ ftp servers. + v107: Oct 12, 2006 * bypassed the autowrite option + Oct 24, 2006 * handles automatic decompression of *.gz and *.bz2 + files + Nov 03, 2006 * Explore will highlight matching files when + **/pattern is used (and if the |'hls'| option + is set) + Nov 09, 2006 * a debugging line, when enabled, was inadvertently + bringing up help instead of simply reporting on + list contents + Nov 21, 2006 * tree listing improved (cursor remains put) + Nov 27, 2006 * fixed b:netrw_curdir bug when repeated "i"s were + pressed. + Dec 15, 2006 * considerable qty of changes, mostly to share more + code between local and remote browsing. Includes + support for tree-style listing for both remote + and local browsing. + Dec 15, 2006 * Included Peter Bengtsson's modifications to + support the Amiga. + v106: Sep 21, 2006 * removed old v:version<700 code as netrw now + requires vim 7.0 + * worked around a bug where register * was + overwritten during local browsing + v104: Sep 05, 2006 * as suggested by Rodolfo Borges, :Explore and + variants will position the cursor on the file + just having been edited + * changed default |g:netrw_sort_sequence| order + * changed b, Nb to simply mb (see |netrw-mb|) + * changed B, NB to simply gb (see |netrw-gb|) + * tree listing style (see |g:netrw_liststyle|) + * attempts to retain the alternate file + v103: Jul 26, 2006 * used Yakov Lerner's tip#1289 to improve netrw + error message display + * wide listings didn't handle files with backslashes + in their names properly. A symptom was an + inability to open files. + Aug 09, 2006 * included "t" mapping for opening tabbed windows, + both for remote and local browsing + * changed netrw_longlist to netrw_liststyle + Aug 15, 2006 * fixed one of the NB maps + Aug 22, 2006 * changed *Explore commands to use -nargs=* instead + of -nargs=?. Allows both -complete=dir _and_ the + starstar arguments to work (-nargs=? seems to + require one or the other). + Aug 23, 2006 * copied all w:.. variables across splits to + new windows + Aug 25, 2006 * when g:netrw_browsex_viewer was '-' + (see |g:netrw_browsex_viewer|) it wasn't causing + netrwFileHandlers#Invoke() to be called as it + was expected to. (tnx Steve Dugaro) + Aug 29, 2006 * changed NetBrowseX() to use "setlocal ... noswf" + instead of "set ... noswf" (tnx Benji Fisher) + Aug 31, 2006 * tabs and fastbrowse<=1 didn't work together. + v102: Jun 15, 2006 * chgd netrwPlugin to call netrw#LocalBrowseCheck() + * bugfix: g:netrw_keepdir==0 had stopped working + Jul 06, 2006 * bugfix: NetOptionSave/Restore now saves/restores + the unnamed register (|registers|) + Jul 07, 2006 * |g:netrw_menu| support included + Jul 13, 2006 * :Texplore command implemented + Jul 17, 2006 * NetSplit and (Local|Net)BrowseChgDir() were both + splitting windows. This affected o, v, and + g:netrw_browse_split. + Jul 20, 2006 * works around wildignore setting (was causing + netrw's local browser not to list wildignore'd + files) + Jul 24, 2006 * acts as a for selecting a file + acts as a for deleting a file + v100: May 14, 2006 * when using Windows and shell==cmd.exe, the + default for g:netrw_ignorenetrc is now 1 + * bugfix: unwanted ^Ms now removed + (affected shell==cmd.exe - Windows) + * added Bookmarks and History to the menu + * an error message about non-existing + w:netrw_longlist was appearing during attempts to + Explore (fixed) + * g:netrw_shq now available to make netrw use + specified style of quotes for commands + May 29, 2006 * user NFH_*() functions were inadvertently being + ignored + * fixed a Windows non-cygwin ftp handling problem. + * hiding pattern candidate separators included some + characters it shouldn't have (tnx to Osei Poku) + Jun 01, 2006 * for browsing, netrw was supposed to use "dir" + instead of "ls -lF" when using + ftp+non-cygwin+windows. Fixed. + * an inadvertently left-in-place debugging statement + was preventing use of the "x" key with browsing. + Jun 05, 2006 * g:netrw_nogx available to prevent making the gx + map (see |g:netrw_nogx|) + * bugfix, Explore woulnd't change directory + properly (vim ., :Explore subdirname) + Jun 06, 2006 * moved history to 2nd line in Netrw menu + * fixed delete for unix-based systems + Jun 07, 2006 * x key now works for windows-noncygwin-ftp + Jun 08, 2006 * Explore */pat and **//pat now wraps + v99: May 09, 2006 * g:netrw_browse_split=3 for opening files in new + tabs implemented. + May 12, 2006 * deletes temporary file at end of NetRead() + * visual mode based Obtain implemented + * added -complete=dir to the various Explore + commands + v98: May 02, 2006 * the "p" key didn't work properly when the browsing + directory name had spaces in it. + v97: May 01, 2006 * exists("&acd") now used to determine if + the 'acd' option exists + * "obtain" now works again under Windows v96: * bugfix - the |'acd'| option is not always defined but is now bypassed only when it is v95: * bugfix - Hiding mode worked correctly (don't show any file @@ -1532,7 +1907,7 @@ which is loaded automatically at startup (assuming :set nocp). * g:netrw_browsex_viewer implemented * Mikolaj Machowski pointed out that gnome-open is often executable under KDE systems, although it is effectively - not functional. NetBrowseX now looks for "kicker" as + not functional. NetBrowseX now looks for "kicker" as a running process to determine if KDE is actually the really running. * Explorer's O functionality was inadvertently left out. @@ -1590,7 +1965,7 @@ which is loaded automatically at startup (assuming :set nocp). in order to allow them to be used for motions v65: * Browser functions now use NetOptionSave/Restore; in particular, netrw now works around the report setting - v64: * Bugfix - browsing a "/" directory (Unix) yielded buffers + v64: * Bugfix - browsing a "/" directory (Unix) yielded buffers named "[Scratch]" instead of "/" * Bugfix - remote browsing with ftp was omitting the ./ and ../ v63: * netrw now takes advantage of autoload (and requires 7.0) @@ -1732,7 +2107,7 @@ which is loaded automatically at startup (assuming :set nocp). ============================================================================== -11. Credits *netrw-credits* {{{1 +12. Credits *netrw-credits* {{{1 Vim editor by Bram Moolenaar (Thanks, Bram!) dav support by C Campbell diff --git a/runtime/doc/pi_paren.txt b/runtime/doc/pi_paren.txt index b3488496f..3752637eb 100644 --- a/runtime/doc/pi_paren.txt +++ b/runtime/doc/pi_paren.txt @@ -1,4 +1,4 @@ -*pi_paren.txt* For Vim version 7.0. Last change: 2006 Apr 24 +*pi_paren.txt* For Vim version 7.1a. Last change: 2006 Jun 14 VIM REFERENCE MANUAL by Bram Moolenaar @@ -43,7 +43,7 @@ are: - What is visible in the window. - 100 lines above or below the cursor to avoid a long delay when there are closed folds. -- 'synmaxcolumn' times 2 bytes before or after the cursor to avoid a delay +- 'synmaxcol' times 2 bytes before or after the cursor to avoid a delay in a long line with syntax highlighting. ============================================================================== diff --git a/runtime/doc/pi_tar.txt b/runtime/doc/pi_tar.txt index 9dd746906..51c96ccb5 100644 --- a/runtime/doc/pi_tar.txt +++ b/runtime/doc/pi_tar.txt @@ -1,8 +1,8 @@ -*pi_tar.txt* For Vim version 7.0. Last change: 2006 May 02 +*pi_tar.txt* For Vim version 7.1a. Last change: 2006 Sep 29 - +====================+ - | Tar File Interface | - +====================+ + +====================+ + | Tar File Interface | + +====================+ Author: Charles E. Campbell, Jr. (remove NOSPAM from Campbell's email first) @@ -31,35 +31,37 @@ Copyright: The GPL (gnu public license) applies to *tar-copyright* These options are variables that one may change, typically in one's <.vimrc> file. - Default - Variable Value Explanation + Default + Variable Value Explanation *g:tar_browseoptions* "Ptf" used to get a list of contents - *g:tar_readoptions* "OPxf" used to extract a file from a tarball - *g:tar_cmd* "tar" the name of the tar program - *g:tar_writeoptions* "uf" used to update/replace a file + *g:tar_readoptions* "OPxf" used to extract a file from a tarball + *g:tar_cmd* "tar" the name of the tar program + *g:tar_writeoptions* "uf" used to update/replace a file ============================================================================== 4. History *tar-history* + v10 May 02, 2006 * now using "redraw then echo" to show messages, instead + of "echo and prompt user" v9 May 02, 2006 * improved detection of masquerading as tar file v8 May 02, 2006 * allows editing of files that merely masquerade as tar - files + files v7 Mar 22, 2006 * work on making tar plugin work across network Mar 27, 2006 * g:tar_cmd now available for users to change the name - of the tar program to be used. By default, of course, + of the tar program to be used. By default, of course, its "tar". v6 Dec 21, 2005 * writing to files not in directories caused problems - - fixed (pointed out by Christian Robinson) + fixed (pointed out by Christian Robinson) v5 Nov 22, 2005 * report option workaround installed v3 Sep 16, 2005 * handles writing files in an archive back to the - archive + archive Oct 18, 2005 * used instead of in autocmds Oct 18, 2005 * handles writing to compressed archives Nov 03, 2005 * handles writing tarfiles across a network using - netrw#NetWrite() - v2 * converted to use Vim7's new autoload feature by - Bram Moolenaar + netrw#NetWrite() + v2 * converted to use Vim7's new autoload feature by + Bram Moolenaar v1 (original) * Michael Toren (see http://michael.toren.net/code/) ============================================================================== diff --git a/runtime/doc/pi_vimball.txt b/runtime/doc/pi_vimball.txt index 1fefc7f90..75eae344a 100644 --- a/runtime/doc/pi_vimball.txt +++ b/runtime/doc/pi_vimball.txt @@ -1,4 +1,4 @@ -*pi_vimball.txt* For Vim version 7.0. Last change: 2006 May 01 +*pi_vimball.txt* For Vim version 7.1a. Last change: 2007 Jan 03 ---------------- Vimball Archiver @@ -13,10 +13,13 @@ Copyright: (c) 2004-2006 by Charles E. Campbell, Jr. *Vimball-copyright* Use At-Your-Own-Risk! ============================================================================== -1. Contents *vimball* *vimball-contents* +1. Contents *vba* *vimball* *vimball-contents* 1. Contents......................................: |vimball-contents| 2. Vimball Manual................................: |vimball-manual| + MkVimball.....................................: |:MkVimball| + UseVimball....................................: |:UseVimball| + RmVimball.....................................: |:RmVimball| 3. Vimball History...............................: |vimball-history| @@ -24,19 +27,26 @@ Copyright: (c) 2004-2006 by Charles E. Campbell, Jr. *Vimball-copyright* 2. Vimball Manual *vimball-manual* *:MkVimball* - :[range]MkVimball[!] filename + :[range]MkVimball[!] filename [path] - This command takes lines holding a path to files to be included in - your vimball; as an example: > + The range is composed of lines holding paths to files to be included + in your new vimball. As an example: > plugin/something.vim doc/something.txt -< using MkVimball on this range will create a file called "filename.vba" - which can be used by Vimball.vim to re-create these files. If the +< using > + :[range]MkVimball filename +< + on this range of lines will create a file called "filename.vba" which + can be used by Vimball.vim to re-create these files. If the "filename.vba" file already exists, then MkVimball will issue a warning and not create the file. Note that these paths are relative to your .vim (vimfiles) directory, and the files should be in that - directory. The vimball plugin uses the first |'runtimepath'|directory - that exists as a prefix; don't use absolute paths. + directory. The vimball plugin normally uses the first |'runtimepath'| + directory that exists as a prefix; don't use absolute paths, unless + the user has specified such a path. + *g:vimball_home* + You may override the use of the |'runtimepath'| by specifying a + variable, g:vimball_home. If you use the exclamation point (!), then MkVimball will create the "filename.vba" file, overwriting it if it already exists. This @@ -52,22 +62,57 @@ Copyright: (c) 2004-2006 by Charles E. Campbell, Jr. *Vimball-copyright* file holds the "Vimball Archiver by Charles E. Campbell, Jr., Ph.D." line. - :VimballList *vimball-vimballlist* + :VimballList *:VimballList* This command will tell Vimball to list the files in the archive, along with their lengths in lines. + :UseVimball [path] *:UseVimball* + + This command is contained within the vimball itself; it invokes the + vimball#Vimball() routine which is responsible for unpacking the + vimball. One may choose to execute it by hand instead of sourcing + the vimball; one may also choose to specify a path for the + installation, thereby overriding the automatic choice of the first + existing directory on the |'runtimepath'|. + + :RmVimball vimballfile [path] *:RmVimball* + + This command removes all files generated by the specified vimball + (but not any directories it may have made). One may choose a path + for de-installation, too (see |'runtimepath'|); otherwise, the + default is the first existing directory on the |'runtimepath'|. + To implement this, a file (.VimballRecord) is made in that directory + containing a record of what files need to be removed for all vimballs + used thus far. + ============================================================================== 3. Vimball History *vimball-history* {{{1 + 21 : Nov 27, 2006 * (tnx to Bill McCarthy) vimball had a header + handling problem and it now changes \s to /s + 20 : Nov 20, 2006 * substitute() calls have all had the 'e' flag + removed. + 18 : Aug 01, 2006 * vimballs now use folding to easily display their + contents. + * if a user has AsNeeded/somefile, then vimball + will extract plugin/somefile to the AsNeeded/ + directory + 17 : Jun 28, 2006 * changes all \s to /s internally for Windows + 16 : Jun 15, 2006 * A. Mechylynk's idea to allow users to specify + installation root paths implemented for + UseVimball, MkVimball, and RmVimball. + * RmVimball implemented + 15 : Jun 13, 2006 * bugfix + 14 : May 26, 2006 * bugfixes 13 : May 01, 2006 * exists("&acd") used to determine if the acd option exists 12 : May 01, 2006 * bugfix - the |'acd'| option is not always defined 11 : Apr 27, 2006 * VimballList would create missing subdirectories that - the vimball specified were needed. Fixed. + the vimball specified were needed. Fixed. 10 : Apr 27, 2006 * moved all setting saving/restoration to a pair of - functions. Included some more settings in them + functions. Included some more settings in them which frequently cause trouble. 9 : Apr 26, 2006 * various changes to support Windows prediliction for backslashes and spaces in file and directory @@ -80,7 +125,7 @@ Copyright: (c) 2004-2006 by Charles E. Campbell, Jr. *Vimball-copyright* only fires once, so the "Source this file..." message is now issued only once. 3 : Mar 20, 2006 * removed query, now requires sourcing to be - extracted (:so %). Message to that effect + extracted (:so %). Message to that effect included. * :VimballList now shows files that would be extracted. diff --git a/runtime/doc/pi_zip.txt b/runtime/doc/pi_zip.txt index ce2dcd18c..cedd9114a 100644 --- a/runtime/doc/pi_zip.txt +++ b/runtime/doc/pi_zip.txt @@ -1,4 +1,4 @@ -*pi_zip.txt* For Vim version 7.0. Last change: 2006 May 01 +*pi_zip.txt* For Vim version 7.1a. Last change: 2006 Sep 29 +====================+ | Zip File Interface | @@ -7,7 +7,7 @@ Author: Charles E. Campbell, Jr. (remove NOSPAM from Campbell's email first) Copyright: Copyright (C) 2005,2006 Charles E Campbell, Jr {{{1 *zip-copyright* - Permission is hereby granted to use and distribute this code, + Permission is hereby granted to use and distribute this code, with or without modifications, provided that this copyright notice is copied with it. Like anything else that's free, zip.vim, zipPlugin.vim, and pi_zip.txt are provided *as is* @@ -31,24 +31,34 @@ Copyright: Copyright (C) 2005,2006 Charles E Campbell, Jr {{{1 *zip-copyright* also write to the file. Currently, one may not make a new file in zip archives via the plugin. + The zip program supports one option: > + g:zip_shq +< which by default is a single quote under Unix (') and a double quote + under Windows ("). If you'd rather have no quotes, simply set + g:zip_shq to the empty string (let g:zip_shq= "") in your <.vimrc>. + ============================================================================== 3. History *zip-history* + v10 May 02, 2006 * now using "redraw then echo" to show messages, instead + of "echo and prompt user" + * g:zip_shq provided to allow for quoting control for the + command being passed via :r! ... commands. v8 Apr 10, 2006 * Bram Moolenaar reported that he received an error message - due to "Pattern not found: ^.*\%0c"; this was caused by + due to "Pattern not found: ^.*\%0c"; this was caused by stridx finding a Name... at the beginning of the line; zip.vim tried 4,$s/^.*\%0c//, but that doesn't work. Fixed. v7 Mar 22, 2006 * escaped some characters that can cause filename handling - problems. + problems. v6 Dec 21, 2005 * writing to files not in directories caused problems - - fixed (pointed out by Christian Robinson) + fixed (pointed out by Christian Robinson) v5 Nov 22, 2005 * report option workaround installed v3 Oct 18, 2005 * used instead of in autocmds v2 Sep 16, 2005 * silenced some commands (avoiding hit-enter prompt) - * began testing under Windows; works thus far + * began testing under Windows; works thus far * filetype detection fixed Nov 03, 2005 * handles writing zipfiles across a network using - netrw#NetWrite() + netrw#NetWrite() v1 Sep 15, 2005 * Initial release, had browsing, reading, and writing ============================================================================== diff --git a/runtime/doc/print.txt b/runtime/doc/print.txt index 36f9470fc..9f912815b 100644 --- a/runtime/doc/print.txt +++ b/runtime/doc/print.txt @@ -1,4 +1,4 @@ -*print.txt* For Vim version 7.0. Last change: 2006 Apr 30 +*print.txt* For Vim version 7.1a. Last change: 2007 Apr 22 VIM REFERENCE MANUAL by Bram Moolenaar @@ -427,7 +427,7 @@ There are currently a number of limitations with PostScript printing: *E618* *E619* To use your own print character encoding when printing 8-bit character data you need to define your own PostScript font encoding vector. Details on how -to to define a font encoding vector is beyond the scope of this help file, but +to define a font encoding vector is beyond the scope of this help file, but you can find details in the PostScript Language Reference Manual, 3rd Edition, published by Addison-Wesley and available in PDF form at http://www.adobe.com/. The following describes what you need to do for VIM to diff --git a/runtime/doc/quickref.txt b/runtime/doc/quickref.txt index bdd2be508..9377d6443 100644 --- a/runtime/doc/quickref.txt +++ b/runtime/doc/quickref.txt @@ -1,4 +1,4 @@ -*quickref.txt* For Vim version 7.0. Last change: 2006 Apr 30 +*quickref.txt* For Vim version 7.1a. Last change: 2006 Nov 18 VIM REFERENCE MANUAL by Bram Moolenaar @@ -783,7 +783,8 @@ Short explanation of each option: *option-list* 'number' 'nu' print the line number in front of each line 'numberwidth' 'nuw' number of columns used for the line number 'omnifunc' 'ofu' function for filetype-specific completion -'operatorfunc' 'opfunc' funtion to be called for |g@| operator +'opendevice' 'odev' allow reading/writing devices on MS-Windows +'operatorfunc' 'opfunc' function to be called for |g@| operator 'osfiletype' 'oft' operating system-specific filetype information 'paragraphs' 'para' nroff macros that separate paragraphs 'paste' allow pasting text diff --git a/runtime/doc/recover.txt b/runtime/doc/recover.txt index 0de489a83..159bd3c03 100644 --- a/runtime/doc/recover.txt +++ b/runtime/doc/recover.txt @@ -1,4 +1,4 @@ -*recover.txt* For Vim version 7.0. Last change: 2006 Apr 24 +*recover.txt* For Vim version 7.1a. Last change: 2006 Apr 24 VIM REFERENCE MANUAL by Bram Moolenaar diff --git a/runtime/doc/rileft.txt b/runtime/doc/rileft.txt index a149e150c..a3f655f0c 100644 --- a/runtime/doc/rileft.txt +++ b/runtime/doc/rileft.txt @@ -1,4 +1,4 @@ -*rileft.txt* For Vim version 7.0. Last change: 2006 Apr 24 +*rileft.txt* For Vim version 7.1a. Last change: 2006 Apr 24 VIM REFERENCE MANUAL by Avner Lottem diff --git a/runtime/doc/russian.txt b/runtime/doc/russian.txt index c240a9ba1..d487d97ce 100644 --- a/runtime/doc/russian.txt +++ b/runtime/doc/russian.txt @@ -1,4 +1,4 @@ -*russian.txt* For Vim version 7.0. Last change: 2006 Apr 24 +*russian.txt* For Vim version 7.1a. Last change: 2006 Apr 24 VIM REFERENCE MANUAL by Vassily Ragosin diff --git a/runtime/doc/sign.txt b/runtime/doc/sign.txt index ea47050d3..de12c32f7 100644 --- a/runtime/doc/sign.txt +++ b/runtime/doc/sign.txt @@ -1,4 +1,4 @@ -*sign.txt* For Vim version 7.0. Last change: 2006 Apr 24 +*sign.txt* For Vim version 7.1a. Last change: 2006 Apr 24 VIM REFERENCE MANUAL by Gordon Prieur diff --git a/runtime/doc/sponsor.txt b/runtime/doc/sponsor.txt index d77f4e841..170643ae8 100644 --- a/runtime/doc/sponsor.txt +++ b/runtime/doc/sponsor.txt @@ -1,4 +1,4 @@ -*sponsor.txt* For Vim version 7.0. Last change: 2006 Apr 30 +*sponsor.txt* For Vim version 7.1a. Last change: 2007 Jan 05 VIM REFERENCE MANUAL by Bram Moolenaar @@ -59,7 +59,7 @@ But only if you enable this on your account page. HOW TO SEND MONEY *send-money* Credit card Through PayPal, see the PayPal site for information: - https://www.paypal.com + https://www.paypal.com/en_US/mrb/pal=XAC62PML3GF8Q The e-mail address for sending sponsorship money is: donate@vim.org The e-mail address for Vim registration is: diff --git a/runtime/doc/tags b/runtime/doc/tags index 7431960ef..f69f0e6ff 100644 --- a/runtime/doc/tags +++ b/runtime/doc/tags @@ -253,6 +253,26 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME* 'gfw' options.txt /*'gfw'* 'ghr' options.txt /*'ghr'* 'go' options.txt /*'go'* +'go-A' options.txt /*'go-A'* +'go-F' options.txt /*'go-F'* +'go-L' options.txt /*'go-L'* +'go-M' options.txt /*'go-M'* +'go-R' options.txt /*'go-R'* +'go-T' options.txt /*'go-T'* +'go-a' options.txt /*'go-a'* +'go-b' options.txt /*'go-b'* +'go-c' options.txt /*'go-c'* +'go-e' options.txt /*'go-e'* +'go-f' options.txt /*'go-f'* +'go-g' options.txt /*'go-g'* +'go-h' options.txt /*'go-h'* +'go-i' options.txt /*'go-i'* +'go-l' options.txt /*'go-l'* +'go-m' options.txt /*'go-m'* +'go-p' options.txt /*'go-p'* +'go-r' options.txt /*'go-r'* +'go-t' options.txt /*'go-t'* +'go-v' options.txt /*'go-v'* 'gp' options.txt /*'gp'* 'gr' vi_diff.txt /*'gr'* 'graphic' vi_diff.txt /*'graphic'* @@ -528,6 +548,8 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME* 'nomousehide' options.txt /*'nomousehide'* 'nonu' options.txt /*'nonu'* 'nonumber' options.txt /*'nonumber'* +'noodev' options.txt /*'noodev'* +'noopendevice' options.txt /*'noopendevice'* 'nopaste' options.txt /*'nopaste'* 'nopi' options.txt /*'nopi'* 'nopreserveindent' options.txt /*'nopreserveindent'* @@ -629,11 +651,13 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME* 'number' options.txt /*'number'* 'numberwidth' options.txt /*'numberwidth'* 'nuw' options.txt /*'nuw'* +'odev' options.txt /*'odev'* 'oft' options.txt /*'oft'* 'ofu' options.txt /*'ofu'* 'omnifunc' options.txt /*'omnifunc'* 'op' vi_diff.txt /*'op'* 'open' vi_diff.txt /*'open'* +'opendevice' options.txt /*'opendevice'* 'operatorfunc' options.txt /*'operatorfunc'* 'opfunc' options.txt /*'opfunc'* 'optimize' vi_diff.txt /*'optimize'* @@ -1283,6 +1307,7 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME* -xrm gui_x11.txt /*-xrm* -y starting.txt /*-y* . repeat.txt /*.* +... eval.txt /*...* .Xdefaults gui_x11.txt /*.Xdefaults* .aff spell.txt /*.aff* .dic spell.txt /*.dic* @@ -1296,6 +1321,7 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME* / pattern.txt /*\/* /[[. pattern.txt /*\/[[.* /[[= pattern.txt /*\/[[=* +/[\n] pattern.txt /*\/[\\n]* /[] pattern.txt /*\/[]* /\ pattern.txt /*\/\\* /\$ pattern.txt /*\/\\$* @@ -1672,6 +1698,7 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME* :!cmd various.txt /*:!cmd* :!start os_win32.txt /*:!start* :# various.txt /*:#* +:#! various.txt /*:#!* :$ cmdline.txt /*:$* :% cmdline.txt /*:%* :& change.txt /*:&* @@ -1707,8 +1734,20 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME* :@ repeat.txt /*:@* :@: repeat.txt /*:@:* :@@ repeat.txt /*:@@* +:AdaLines ada.txt /*:AdaLines* +:AdaRainbow ada.txt /*:AdaRainbow* +:AdaSpaces ada.txt /*:AdaSpaces* +:AdaTagDir ada.txt /*:AdaTagDir* +:AdaTagFile ada.txt /*:AdaTagFile* +:AdaTypes ada.txt /*:AdaTypes* :CompilerSet usr_41.txt /*:CompilerSet* +:DiffOrig diff.txt /*:DiffOrig* :Explore pi_netrw.txt /*:Explore* +:GLVS pi_getscript.txt /*:GLVS* +:GetLatestVimScripts_dat pi_getscript.txt /*:GetLatestVimScripts_dat* +:GnatFind ada.txt /*:GnatFind* +:GnatPretty ada.txt /*:GnatPretty* +:GnatTags ada.txt /*:GnatTags* :Hexplore pi_netrw.txt /*:Hexplore* :Man filetype.txt /*:Man* :MkVimball pi_vimball.txt /*:MkVimball* @@ -1718,9 +1757,13 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME* :P various.txt /*:P* :Pexplore pi_netrw.txt /*:Pexplore* :Print various.txt /*:Print* +:RmVimball pi_vimball.txt /*:RmVimball* :Sexplore pi_netrw.txt /*:Sexplore* :TOhtml syntax.txt /*:TOhtml* +:Texplore pi_netrw.txt /*:Texplore* +:UseVimball pi_vimball.txt /*:UseVimball* :Vexplore pi_netrw.txt /*:Vexplore* +:VimballList pi_vimball.txt /*:VimballList* :X editing.txt /*:X* :XMLent insert.txt /*:XMLent* :XMLns insert.txt /*:XMLns* @@ -1906,9 +1949,17 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME* :comc map.txt /*:comc* :comclear map.txt /*:comclear* :command map.txt /*:command* +:command-bang map.txt /*:command-bang* +:command-bar map.txt /*:command-bar* +:command-buffer map.txt /*:command-buffer* +:command-complete map.txt /*:command-complete* :command-completion map.txt /*:command-completion* :command-completion-custom map.txt /*:command-completion-custom* :command-completion-customlist map.txt /*:command-completion-customlist* +:command-count map.txt /*:command-count* +:command-nargs map.txt /*:command-nargs* +:command-range map.txt /*:command-range* +:command-register map.txt /*:command-register* :command-verbose map.txt /*:command-verbose* :comment eval.txt /*:comment* :comp quickfix.txt /*:comp* @@ -1992,6 +2043,7 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME* :earlier undo.txt /*:earlier* :ec eval.txt /*:ec* :echo eval.txt /*:echo* +:echo-redraw eval.txt /*:echo-redraw* :echoe eval.txt /*:echoe* :echoerr eval.txt /*:echoerr* :echoh eval.txt /*:echoh* @@ -2186,12 +2238,12 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME* :let eval.txt /*:let* :let+= eval.txt /*:let+=* :let-$ eval.txt /*:let-$* +:let-& eval.txt /*:let-&* :let-= eval.txt /*:let-=* :let-@ eval.txt /*:let-@* :let-environment eval.txt /*:let-environment* :let-option eval.txt /*:let-option* :let-register eval.txt /*:let-register* -:let-star eval.txt /*:let-star* :let-unpack eval.txt /*:let-unpack* :let.= eval.txt /*:let.=* :lex quickfix.txt /*:lex* @@ -2708,6 +2760,7 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME* :syn-sync-second syntax.txt /*:syn-sync-second* :syn-sync-third syntax.txt /*:syn-sync-third* :syn-transparent syntax.txt /*:syn-transparent* +:sync scroll.txt /*:sync* :syncbind scroll.txt /*:syncbind* :syntax syntax.txt /*:syntax* :syntax-enable syntax.txt /*:syntax-enable* @@ -3027,6 +3080,7 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME* cmdline.txt /** intro.txt /** map.txt /** + map.txt /** term.txt /** term.txt /** term.txt /** @@ -3086,7 +3140,9 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME* @ repeat.txt /*@* @/ change.txt /*@\/* @: repeat.txt /*@:* +@= change.txt /*@=* @@ repeat.txt /*@@* +@r eval.txt /*@r* A insert.txt /*A* ACL editing.txt /*ACL* ATTENTION usr_11.txt /*ATTENTION* @@ -4017,6 +4073,11 @@ E789 syntax.txt /*E789* E79 message.txt /*E79* E790 undo.txt /*E790* E791 mbyte.txt /*E791* +E792 gui.txt /*E792* +E793 diff.txt /*E793* +E794 eval.txt /*E794* +E795 eval.txt /*E795* +E796 editing.txt /*E796* E80 message.txt /*E80* E800 arabic.txt /*E800* E81 map.txt /*E81* @@ -4079,7 +4140,10 @@ GTK+ gui_x11.txt /*GTK+* GUI gui.txt /*GUI* GUI-X11 gui_x11.txt /*GUI-X11* GUIEnter autocmd.txt /*GUIEnter* -GetLatestVimScripts-copyright getscript.txt /*GetLatestVimScripts-copyright* +GUIFailed autocmd.txt /*GUIFailed* +GetLatestVimScripts pi_getscript.txt /*GetLatestVimScripts* +GetLatestVimScripts-copyright pi_getscript.txt /*GetLatestVimScripts-copyright* +GetLatestVimScripts_dat pi_getscript.txt /*GetLatestVimScripts_dat* Gnome gui_x11.txt /*Gnome* H motion.txt /*H* I insert.txt /*I* @@ -4129,6 +4193,7 @@ NetBSD-backspace options.txt /*NetBSD-backspace* Normal intro.txt /*Normal* Normal-mode intro.txt /*Normal-mode* Nread pi_netrw.txt /*Nread* +Nsource pi_netrw.txt /*Nsource* Nvi intro.txt /*Nvi* Nwrite pi_netrw.txt /*Nwrite* O insert.txt /*O* @@ -4222,6 +4287,7 @@ SessionLoad-variable starting.txt /*SessionLoad-variable* SessionLoadPost autocmd.txt /*SessionLoadPost* ShellCmdPost autocmd.txt /*ShellCmdPost* ShellFilterPost autocmd.txt /*ShellFilterPost* +SourceCmd autocmd.txt /*SourceCmd* SourcePre autocmd.txt /*SourcePre* SpellFileMissing autocmd.txt /*SpellFileMissing* StdinReadPost autocmd.txt /*StdinReadPost* @@ -4418,7 +4484,17 @@ abandon editing.txt /*abandon* abbreviations map.txt /*abbreviations* abel.vim syntax.txt /*abel.vim* active-buffer windows.txt /*active-buffer* -ada.vim syntax.txt /*ada.vim* +ada#Create_Tags() ada.txt /*ada#Create_Tags()* +ada#Jump_Tag() ada.txt /*ada#Jump_Tag()* +ada#Listtags() ada.txt /*ada#Listtags()* +ada#Switch_Syntax_Option() ada.txt /*ada#Switch_Syntax_Option()* +ada#Word() ada.txt /*ada#Word()* +ada-compiler ada.txt /*ada-compiler* +ada-ctags ada.txt /*ada-ctags* +ada-extra-plugins ada.txt /*ada-extra-plugins* +ada-reference ada.txt /*ada-reference* +ada.txt ada.txt /*ada.txt* +ada.vim ada.txt /*ada.vim* add() eval.txt /*add()* add-filetype-plugin usr_05.txt /*add-filetype-plugin* add-global-plugin usr_05.txt /*add-global-plugin* @@ -4437,6 +4513,7 @@ added-6.1 version6.txt /*added-6.1* added-6.2 version6.txt /*added-6.2* added-6.3 version6.txt /*added-6.3* added-6.4 version6.txt /*added-6.4* +added-7.1 version7.txt /*added-7.1* added-BeOS version5.txt /*added-BeOS* added-Mac version5.txt /*added-Mac* added-VMS version5.txt /*added-VMS* @@ -4650,6 +4727,7 @@ c_CTRL-Y cmdline.txt /*c_CTRL-Y* c_CTRL-\_CTRL-G intro.txt /*c_CTRL-\\_CTRL-G* c_CTRL-\_CTRL-N intro.txt /*c_CTRL-\\_CTRL-N* c_CTRL-\_e cmdline.txt /*c_CTRL-\\_e* +c_CTRL-] cmdline.txt /*c_CTRL-]* c_CTRL-^ cmdline.txt /*c_CTRL-^* c_CTRL-_ cmdline.txt /*c_CTRL-_* c_digraph cmdline.txt /*c_digraph* @@ -4679,6 +4757,7 @@ changed-6.1 version6.txt /*changed-6.1* changed-6.2 version6.txt /*changed-6.2* changed-6.3 version6.txt /*changed-6.3* changed-6.4 version6.txt /*changed-6.4* +changed-7.1 version7.txt /*changed-7.1* changelist motion.txt /*changelist* changelog.vim syntax.txt /*changelog.vim* changenr() eval.txt /*changenr()* @@ -4729,10 +4808,15 @@ compatible-default starting.txt /*compatible-default* compile-changes-5 version5.txt /*compile-changes-5* compile-changes-6 version6.txt /*compile-changes-6* compile-changes-7 version7.txt /*compile-changes-7* +compiler-compaqada ada.txt /*compiler-compaqada* +compiler-decada ada.txt /*compiler-decada* +compiler-gnat ada.txt /*compiler-gnat* +compiler-hpada ada.txt /*compiler-hpada* compiler-manx quickfix.txt /*compiler-manx* compiler-pyunit quickfix.txt /*compiler-pyunit* compiler-select quickfix.txt /*compiler-select* compiler-tex quickfix.txt /*compiler-tex* +compiler-vaxada ada.txt /*compiler-vaxada* compl-current insert.txt /*compl-current* compl-define insert.txt /*compl-define* compl-dictionary insert.txt /*compl-dictionary* @@ -4916,6 +5000,7 @@ debugger-integration debugger.txt /*debugger-integration* debugger-support debugger.txt /*debugger-support* debugger.txt debugger.txt /*debugger.txt* dec-mouse options.txt /*dec-mouse* +decada_members ada.txt /*decada_members* deepcopy() eval.txt /*deepcopy()* definition-search tagsrch.txt /*definition-search* definitions intro.txt /*definitions* @@ -4952,6 +5037,7 @@ diff diff.txt /*diff* diff-diffexpr diff.txt /*diff-diffexpr* diff-mode diff.txt /*diff-mode* diff-options diff.txt /*diff-options* +diff-original-file diff.txt /*diff-original-file* diff-patchexpr diff.txt /*diff-patchexpr* diff.txt diff.txt /*diff.txt* diff_filler() eval.txt /*diff_filler()* @@ -5203,6 +5289,7 @@ fixed-6.1 version6.txt /*fixed-6.1* fixed-6.2 version6.txt /*fixed-6.2* fixed-6.3 version6.txt /*fixed-6.3* fixed-6.4 version6.txt /*fixed-6.4* +fixed-7.1 version7.txt /*fixed-7.1* flexwiki.vim syntax.txt /*flexwiki.vim* fname_diff-variable eval.txt /*fname_diff-variable* fname_in-variable eval.txt /*fname_in-variable* @@ -5250,7 +5337,15 @@ fortran.vim syntax.txt /*fortran.vim* french-maillist intro.txt /*french-maillist* frombook usr_01.txt /*frombook* ft-abel-syntax syntax.txt /*ft-abel-syntax* -ft-ada-syntax syntax.txt /*ft-ada-syntax* +ft-ada-commands ada.txt /*ft-ada-commands* +ft-ada-constants ada.txt /*ft-ada-constants* +ft-ada-functions ada.txt /*ft-ada-functions* +ft-ada-indent ada.txt /*ft-ada-indent* +ft-ada-omni ada.txt /*ft-ada-omni* +ft-ada-options ada.txt /*ft-ada-options* +ft-ada-plugin ada.txt /*ft-ada-plugin* +ft-ada-syntax ada.txt /*ft-ada-syntax* +ft-ada-variables ada.txt /*ft-ada-variables* ft-ant-syntax syntax.txt /*ft-ant-syntax* ft-apache-syntax syntax.txt /*ft-apache-syntax* ft-asm-syntax syntax.txt /*ft-asm-syntax* @@ -5395,18 +5490,60 @@ g- undo.txt /*g-* g0 motion.txt /*g0* g8 various.txt /*g8* g:NetrwTopLvlMenu pi_netrw.txt /*g:NetrwTopLvlMenu* +g:ada#Comment ada.txt /*g:ada#Comment* +g:ada#Ctags_Kinds ada.txt /*g:ada#Ctags_Kinds* +g:ada#DotWordRegex ada.txt /*g:ada#DotWordRegex* +g:ada#Keywords ada.txt /*g:ada#Keywords* +g:ada#WordRegex ada.txt /*g:ada#WordRegex* +g:ada_abbrev ada.txt /*g:ada_abbrev* +g:ada_all_tab_usage ada.txt /*g:ada_all_tab_usage* +g:ada_begin_preproc ada.txt /*g:ada_begin_preproc* +g:ada_default_compiler ada.txt /*g:ada_default_compiler* +g:ada_extended_completion ada.txt /*g:ada_extended_completion* +g:ada_extended_tagging ada.txt /*g:ada_extended_tagging* +g:ada_folding ada.txt /*g:ada_folding* +g:ada_gnat_extensions ada.txt /*g:ada_gnat_extensions* +g:ada_line_errors ada.txt /*g:ada_line_errors* +g:ada_no_tab_space_error ada.txt /*g:ada_no_tab_space_error* +g:ada_no_trail_space_error ada.txt /*g:ada_no_trail_space_error* +g:ada_omni_with_keywords ada.txt /*g:ada_omni_with_keywords* +g:ada_rainbow_color ada.txt /*g:ada_rainbow_color* +g:ada_space_errors ada.txt /*g:ada_space_errors* +g:ada_standard_types ada.txt /*g:ada_standard_types* +g:ada_with_gnat_project_files ada.txt /*g:ada_with_gnat_project_files* +g:ada_withuse_ordinary ada.txt /*g:ada_withuse_ordinary* +g:decada ada.txt /*g:decada* +g:decada.Error_Format ada.txt /*g:decada.Error_Format* +g:decada.Make() ada.txt /*g:decada.Make()* +g:decada.Make_Command ada.txt /*g:decada.Make_Command* +g:decada.Unit_Name() ada.txt /*g:decada.Unit_Name()* +g:gnat ada.txt /*g:gnat* +g:gnat.Error_Format ada.txt /*g:gnat.Error_Format* +g:gnat.Find() ada.txt /*g:gnat.Find()* +g:gnat.Find_Program ada.txt /*g:gnat.Find_Program* +g:gnat.Make() ada.txt /*g:gnat.Make()* +g:gnat.Make_Command ada.txt /*g:gnat.Make_Command* +g:gnat.Pretty() ada.txt /*g:gnat.Pretty()* +g:gnat.Pretty_Program ada.txt /*g:gnat.Pretty_Program* +g:gnat.Project_File ada.txt /*g:gnat.Project_File* +g:gnat.Set_Project_File() ada.txt /*g:gnat.Set_Project_File()* +g:gnat.Tags() ada.txt /*g:gnat.Tags()* +g:gnat.Tags_Command ada.txt /*g:gnat.Tags_Command* g:netrw_alto pi_netrw.txt /*g:netrw_alto* g:netrw_altv pi_netrw.txt /*g:netrw_altv* g:netrw_browse_split pi_netrw.txt /*g:netrw_browse_split* g:netrw_browsex_viewer pi_netrw.txt /*g:netrw_browsex_viewer* g:netrw_cygwin pi_netrw.txt /*g:netrw_cygwin* g:netrw_dav_cmd pi_netrw.txt /*g:netrw_dav_cmd* +g:netrw_extracmd pi_netrw.txt /*g:netrw_extracmd* g:netrw_fastbrowse pi_netrw.txt /*g:netrw_fastbrowse* g:netrw_fetch_cmd pi_netrw.txt /*g:netrw_fetch_cmd* g:netrw_ftp pi_netrw.txt /*g:netrw_ftp* g:netrw_ftp_browse_reject pi_netrw.txt /*g:netrw_ftp_browse_reject* g:netrw_ftp_cmd pi_netrw.txt /*g:netrw_ftp_cmd* g:netrw_ftp_list_cmd pi_netrw.txt /*g:netrw_ftp_list_cmd* +g:netrw_ftp_sizelist_cmd pi_netrw.txt /*g:netrw_ftp_sizelist_cmd* +g:netrw_ftp_timelist_cmd pi_netrw.txt /*g:netrw_ftp_timelist_cmd* g:netrw_ftpmode pi_netrw.txt /*g:netrw_ftpmode* g:netrw_hide pi_netrw.txt /*g:netrw_hide* g:netrw_http_cmd pi_netrw.txt /*g:netrw_http_cmd* @@ -5414,11 +5551,13 @@ g:netrw_ignorenetrc pi_netrw.txt /*g:netrw_ignorenetrc* g:netrw_keepdir pi_netrw.txt /*g:netrw_keepdir* g:netrw_list_cmd pi_netrw.txt /*g:netrw_list_cmd* g:netrw_list_hide pi_netrw.txt /*g:netrw_list_hide* +g:netrw_liststyle pi_netrw.txt /*g:netrw_liststyle* g:netrw_local_mkdir pi_netrw.txt /*g:netrw_local_mkdir* g:netrw_local_rmdir pi_netrw.txt /*g:netrw_local_rmdir* -g:netrw_longlist pi_netrw.txt /*g:netrw_longlist* g:netrw_maxfilenamelen pi_netrw.txt /*g:netrw_maxfilenamelen* +g:netrw_menu pi_netrw.txt /*g:netrw_menu* g:netrw_mkdir_cmd pi_netrw.txt /*g:netrw_mkdir_cmd* +g:netrw_nogx pi_netrw.txt /*g:netrw_nogx* g:netrw_passwd pi_netrw.txt /*g:netrw_passwd* g:netrw_rcp_cmd pi_netrw.txt /*g:netrw_rcp_cmd* g:netrw_rm_cmd pi_netrw.txt /*g:netrw_rm_cmd* @@ -5427,6 +5566,7 @@ g:netrw_rmf_cmd pi_netrw.txt /*g:netrw_rmf_cmd* g:netrw_rsync_cmd pi_netrw.txt /*g:netrw_rsync_cmd* g:netrw_scp_cmd pi_netrw.txt /*g:netrw_scp_cmd* g:netrw_sftp_cmd pi_netrw.txt /*g:netrw_sftp_cmd* +g:netrw_shq pi_netrw.txt /*g:netrw_shq* g:netrw_sort_by pi_netrw.txt /*g:netrw_sort_by* g:netrw_sort_direction pi_netrw.txt /*g:netrw_sort_direction* g:netrw_sort_sequence pi_netrw.txt /*g:netrw_sort_sequence* @@ -5434,6 +5574,7 @@ g:netrw_ssh_browse_reject pi_netrw.txt /*g:netrw_ssh_browse_reject* g:netrw_ssh_cmd pi_netrw.txt /*g:netrw_ssh_cmd* g:netrw_timefmt pi_netrw.txt /*g:netrw_timefmt* g:netrw_uid pi_netrw.txt /*g:netrw_uid* +g:netrw_use_noswf pi_netrw.txt /*g:netrw_use_noswf* g:netrw_use_nt_rcp pi_netrw.txt /*g:netrw_use_nt_rcp* g:netrw_win95ftp pi_netrw.txt /*g:netrw_win95ftp* g:netrw_winsize pi_netrw.txt /*g:netrw_winsize* @@ -5442,6 +5583,7 @@ g:tar_cmd pi_tar.txt /*g:tar_cmd* g:tar_readoptions pi_tar.txt /*g:tar_readoptions* g:tar_writeoptions pi_tar.txt /*g:tar_writeoptions* g:var eval.txt /*g:var* +g:vimball_home pi_vimball.txt /*g:vimball_home* g; motion.txt /*g;* g< message.txt /*g<* g motion.txt /*g* @@ -5496,20 +5638,19 @@ getfperm() eval.txt /*getfperm()* getfsize() eval.txt /*getfsize()* getftime() eval.txt /*getftime()* getftype() eval.txt /*getftype()* -getlatestvimscripts getscript.txt /*getlatestvimscripts* -getlatestvimscripts-algorithm getscript.txt /*getlatestvimscripts-algorithm* -getlatestvimscripts-autoinstall getscript.txt /*getlatestvimscripts-autoinstall* -getlatestvimscripts-data getscript.txt /*getlatestvimscripts-data* -getlatestvimscripts-history getscript.txt /*getlatestvimscripts-history* -getlatestvimscripts-plugins getscript.txt /*getlatestvimscripts-plugins* +getlatestvimscripts-install pi_getscript.txt /*getlatestvimscripts-install* getline() eval.txt /*getline()* getloclist() eval.txt /*getloclist()* getpos() eval.txt /*getpos()* getqflist() eval.txt /*getqflist()* getreg() eval.txt /*getreg()* getregtype() eval.txt /*getregtype()* -getscript getscript.txt /*getscript* -getscript.txt getscript.txt /*getscript.txt* +getscript pi_getscript.txt /*getscript* +getscript-autoinstall pi_getscript.txt /*getscript-autoinstall* +getscript-data pi_getscript.txt /*getscript-data* +getscript-history pi_getscript.txt /*getscript-history* +getscript-plugins pi_getscript.txt /*getscript-plugins* +getscript-start pi_getscript.txt /*getscript-start* gettabwinvar() eval.txt /*gettabwinvar()* getwinposx() eval.txt /*getwinposx()* getwinposy() eval.txt /*getwinposy()* @@ -5526,14 +5667,24 @@ global-ime mbyte.txt /*global-ime* global-local options.txt /*global-local* global-variable eval.txt /*global-variable* globpath() eval.txt /*globpath()* -glvs getscript.txt /*glvs* -glvs-alg getscript.txt /*glvs-alg* -glvs-autoinstall getscript.txt /*glvs-autoinstall* -glvs-contents getscript.txt /*glvs-contents* -glvs-data getscript.txt /*glvs-data* -glvs-hist getscript.txt /*glvs-hist* -glvs-plugins getscript.txt /*glvs-plugins* +glvs pi_getscript.txt /*glvs* +glvs-alg pi_getscript.txt /*glvs-alg* +glvs-algorithm pi_getscript.txt /*glvs-algorithm* +glvs-autoinstall pi_getscript.txt /*glvs-autoinstall* +glvs-contents pi_getscript.txt /*glvs-contents* +glvs-copyright pi_getscript.txt /*glvs-copyright* +glvs-data pi_getscript.txt /*glvs-data* +glvs-dist-install pi_getscript.txt /*glvs-dist-install* +glvs-hist pi_getscript.txt /*glvs-hist* +glvs-install pi_getscript.txt /*glvs-install* +glvs-options pi_getscript.txt /*glvs-options* +glvs-plugins pi_getscript.txt /*glvs-plugins* +glvs-usage pi_getscript.txt /*glvs-usage* gm motion.txt /*gm* +gnat#Insert_Tags_Header() ada.txt /*gnat#Insert_Tags_Header()* +gnat#New() ada.txt /*gnat#New()* +gnat-xref ada.txt /*gnat-xref* +gnat_members ada.txt /*gnat_members* gnome-session gui_x11.txt /*gnome-session* go motion.txt /*go* gp change.txt /*gp* @@ -5621,7 +5772,6 @@ gvimrc gui.txt /*gvimrc* gw change.txt /*gw* gwgw change.txt /*gwgw* gww change.txt /*gww* -gx pi_netrw.txt /*gx* gzip pi_gzip.txt /*gzip* gzip-autocmd pi_gzip.txt /*gzip-autocmd* gzip-example autocmd.txt /*gzip-example* @@ -5636,11 +5786,13 @@ has() eval.txt /*has()* has-patch eval.txt /*has-patch* has_key() eval.txt /*has_key()* haskell.vim syntax.txt /*haskell.vim* +haslocaldir() eval.txt /*haslocaldir()* hasmapto() eval.txt /*hasmapto()* hebrew hebrew.txt /*hebrew* hebrew.txt hebrew.txt /*hebrew.txt* help various.txt /*help* help-context help.txt /*help-context* +help-summary usr_02.txt /*help-summary* help-translated various.txt /*help-translated* help-xterm-window various.txt /*help-xterm-window* help.txt help.txt /*help.txt* @@ -6162,6 +6314,9 @@ mouse-mode-table term.txt /*mouse-mode-table* mouse-overview term.txt /*mouse-overview* mouse-swap-buttons term.txt /*mouse-swap-buttons* mouse-using term.txt /*mouse-using* +mouse_col-variable eval.txt /*mouse_col-variable* +mouse_lnum-variable eval.txt /*mouse_lnum-variable* +mouse_win-variable eval.txt /*mouse_win-variable* movement intro.txt /*movement* ms-dos os_msdos.txt /*ms-dos* msdos os_msdos.txt /*msdos* @@ -6232,10 +6387,7 @@ netbeans.txt netbeans.txt /*netbeans.txt* netreadfixup pi_netrw.txt /*netreadfixup* netrw pi_netrw.txt /*netrw* netrw-- pi_netrw.txt /*netrw--* -netrw-B pi_netrw.txt /*netrw-B* netrw-D pi_netrw.txt /*netrw-D* -netrw-NB pi_netrw.txt /*netrw-NB* -netrw-Nb pi_netrw.txt /*netrw-Nb* netrw-O pi_netrw.txt /*netrw-O* netrw-P pi_netrw.txt /*netrw-P* netrw-R pi_netrw.txt /*netrw-R* @@ -6243,7 +6395,6 @@ netrw-S pi_netrw.txt /*netrw-S* netrw-U pi_netrw.txt /*netrw-U* netrw-a pi_netrw.txt /*netrw-a* netrw-activate pi_netrw.txt /*netrw-activate* -netrw-b pi_netrw.txt /*netrw-b* netrw-bookmark pi_netrw.txt /*netrw-bookmark* netrw-bookmarks pi_netrw.txt /*netrw-bookmarks* netrw-browse pi_netrw.txt /*netrw-browse* @@ -6258,6 +6409,8 @@ netrw-cr pi_netrw.txt /*netrw-cr* netrw-credits pi_netrw.txt /*netrw-credits* netrw-ctrl-h pi_netrw.txt /*netrw-ctrl-h* netrw-ctrl-l pi_netrw.txt /*netrw-ctrl-l* +netrw-ctrl_h pi_netrw.txt /*netrw-ctrl_h* +netrw-ctrl_l pi_netrw.txt /*netrw-ctrl_l* netrw-curdir pi_netrw.txt /*netrw-curdir* netrw-d pi_netrw.txt /*netrw-d* netrw-debug pi_netrw.txt /*netrw-debug* @@ -6274,9 +6427,12 @@ netrw-externapp pi_netrw.txt /*netrw-externapp* netrw-file pi_netrw.txt /*netrw-file* netrw-fixup pi_netrw.txt /*netrw-fixup* netrw-ftp pi_netrw.txt /*netrw-ftp* +netrw-gb pi_netrw.txt /*netrw-gb* +netrw-gx pi_netrw.txt /*netrw-gx* netrw-handler pi_netrw.txt /*netrw-handler* netrw-help pi_netrw.txt /*netrw-help* netrw-hexplore pi_netrw.txt /*netrw-hexplore* +netrw-hiding pi_netrw.txt /*netrw-hiding* netrw-history pi_netrw.txt /*netrw-history* netrw-horiz pi_netrw.txt /*netrw-horiz* netrw-i pi_netrw.txt /*netrw-i* @@ -6284,7 +6440,10 @@ netrw-incompatible pi_netrw.txt /*netrw-incompatible* netrw-list pi_netrw.txt /*netrw-list* netrw-listbookmark pi_netrw.txt /*netrw-listbookmark* netrw-listhack pi_netrw.txt /*netrw-listhack* +netrw-login pi_netrw.txt /*netrw-login* netrw-maps pi_netrw.txt /*netrw-maps* +netrw-mb pi_netrw.txt /*netrw-mb* +netrw-ml_get pi_netrw.txt /*netrw-ml_get* netrw-move pi_netrw.txt /*netrw-move* netrw-netrc pi_netrw.txt /*netrw-netrc* netrw-nexplore pi_netrw.txt /*netrw-nexplore* @@ -6299,7 +6458,11 @@ netrw-p3 pi_netrw.txt /*netrw-p3* netrw-p4 pi_netrw.txt /*netrw-p4* netrw-p5 pi_netrw.txt /*netrw-p5* netrw-p6 pi_netrw.txt /*netrw-p6* +netrw-p7 pi_netrw.txt /*netrw-p7* +netrw-p8 pi_netrw.txt /*netrw-p8* +netrw-p9 pi_netrw.txt /*netrw-p9* netrw-passwd pi_netrw.txt /*netrw-passwd* +netrw-password pi_netrw.txt /*netrw-password* netrw-path pi_netrw.txt /*netrw-path* netrw-pexplore pi_netrw.txt /*netrw-pexplore* netrw-preview pi_netrw.txt /*netrw-preview* @@ -6307,6 +6470,7 @@ netrw-problems pi_netrw.txt /*netrw-problems* netrw-protocol pi_netrw.txt /*netrw-protocol* netrw-prvwin pi_netrw.txt /*netrw-prvwin* netrw-pscp pi_netrw.txt /*netrw-pscp* +netrw-psftp pi_netrw.txt /*netrw-psftp* netrw-putty pi_netrw.txt /*netrw-putty* netrw-q pi_netrw.txt /*netrw-q* netrw-r pi_netrw.txt /*netrw-r* @@ -6319,15 +6483,19 @@ netrw-settings pi_netrw.txt /*netrw-settings* netrw-sexplore pi_netrw.txt /*netrw-sexplore* netrw-sort pi_netrw.txt /*netrw-sort* netrw-sortsequence pi_netrw.txt /*netrw-sortsequence* +netrw-source pi_netrw.txt /*netrw-source* netrw-starpat pi_netrw.txt /*netrw-starpat* netrw-starstar pi_netrw.txt /*netrw-starstar* netrw-starstarpat pi_netrw.txt /*netrw-starstarpat* netrw-start pi_netrw.txt /*netrw-start* +netrw-t pi_netrw.txt /*netrw-t* +netrw-texplore pi_netrw.txt /*netrw-texplore* netrw-transparent pi_netrw.txt /*netrw-transparent* netrw-u pi_netrw.txt /*netrw-u* netrw-uidpass pi_netrw.txt /*netrw-uidpass* netrw-updir pi_netrw.txt /*netrw-updir* netrw-urls pi_netrw.txt /*netrw-urls* +netrw-userpass pi_netrw.txt /*netrw-userpass* netrw-v pi_netrw.txt /*netrw-v* netrw-var pi_netrw.txt /*netrw-var* netrw-variables pi_netrw.txt /*netrw-variables* @@ -6415,8 +6583,10 @@ new-vimgrep version7.txt /*new-vimgrep* new-virtedit version6.txt /*new-virtedit* news intro.txt /*news* nextnonblank() eval.txt /*nextnonblank()* +nice todo.txt /*nice* no-eval-feature eval.txt /*no-eval-feature* no_buffers_menu gui.txt /*no_buffers_menu* +non-greedy pattern.txt /*non-greedy* normal-index index.txt /*normal-index* not-compatible usr_01.txt /*not-compatible* not-edited editing.txt /*not-edited* @@ -6523,6 +6693,7 @@ photon-gui os_qnx.txt /*photon-gui* php.vim syntax.txt /*php.vim* php3.vim syntax.txt /*php3.vim* phtml.vim syntax.txt /*phtml.vim* +pi_getscript.txt pi_getscript.txt /*pi_getscript.txt* pi_gzip.txt pi_gzip.txt /*pi_gzip.txt* pi_netrw.txt pi_netrw.txt /*pi_netrw.txt* pi_paren.txt pi_paren.txt /*pi_paren.txt* @@ -6694,6 +6865,7 @@ replacing change.txt /*replacing* replacing-ex insert.txt /*replacing-ex* reselect-Visual visual.txt /*reselect-Visual* resolve() eval.txt /*resolve()* +restore-cursor usr_05.txt /*restore-cursor* restore-position tips.txt /*restore-position* restricted-mode starting.txt /*restricted-mode* retab-example change.txt /*retab-example* @@ -6761,8 +6933,6 @@ s/\r change.txt /*s\/\\r* s/\t change.txt /*s\/\\t* s/\u change.txt /*s\/\\u* s/\~ change.txt /*s\/\\~* -s:netrw_col pi_netrw.txt /*s:netrw_col* -s:netrw_line pi_netrw.txt /*s:netrw_line* s:var eval.txt /*s:var* s change.txt /*s* sandbox eval.txt /*sandbox* @@ -6775,6 +6945,7 @@ script usr_41.txt /*script* script-here if_perl.txt /*script-here* script-local map.txt /*script-local* script-variable eval.txt /*script-variable* +scriptnames-dictionary eval.txt /*scriptnames-dictionary* scriptout-changed version4.txt /*scriptout-changed* scroll-binding scroll.txt /*scroll-binding* scroll-cursor scroll.txt /*scroll-cursor* @@ -6832,6 +7003,7 @@ sgml.vim syntax.txt /*sgml.vim* sh.vim syntax.txt /*sh.vim* shell-window tips.txt /*shell-window* shell_error-variable eval.txt /*shell_error-variable* +shellescape() eval.txt /*shellescape()* shift intro.txt /*shift* shift-left-right change.txt /*shift-left-right* short-name-changed version4.txt /*short-name-changed* @@ -7340,6 +7512,8 @@ termresponse-variable eval.txt /*termresponse-variable* tex-error syntax.txt /*tex-error* tex-folding syntax.txt /*tex-folding* tex-math syntax.txt /*tex-math* +tex-morecommands syntax.txt /*tex-morecommands* +tex-package syntax.txt /*tex-package* tex-runon syntax.txt /*tex-runon* tex-slow syntax.txt /*tex-slow* tex-style syntax.txt /*tex-style* @@ -7481,6 +7655,9 @@ v:key eval.txt /*v:key* v:lang eval.txt /*v:lang* v:lc_time eval.txt /*v:lc_time* v:lnum eval.txt /*v:lnum* +v:mouse_col eval.txt /*v:mouse_col* +v:mouse_lnum eval.txt /*v:mouse_lnum* +v:mouse_win eval.txt /*v:mouse_win* v:prevcount eval.txt /*v:prevcount* v:profiling eval.txt /*v:profiling* v:progname eval.txt /*v:progname* @@ -7610,6 +7787,7 @@ various-cmds various.txt /*various-cmds* various-motions motion.txt /*various-motions* various.txt various.txt /*various.txt* vb.vim syntax.txt /*vb.vim* +vba pi_vimball.txt /*vba* verbose starting.txt /*verbose* version-5.1 version5.txt /*version-5.1* version-5.2 version5.txt /*version-5.2* @@ -7623,6 +7801,7 @@ version-6.1 version6.txt /*version-6.1* version-6.2 version6.txt /*version-6.2* version-6.3 version6.txt /*version-6.3* version-6.4 version6.txt /*version-6.4* +version-7.1 version7.txt /*version-7.1* version-variable eval.txt /*version-variable* version4.txt version4.txt /*version4.txt* version5.txt version5.txt /*version5.txt* @@ -7648,13 +7827,13 @@ vim-multibyte intro.txt /*vim-multibyte* vim-script-intro usr_41.txt /*vim-script-intro* vim-variable eval.txt /*vim-variable* vim.vim syntax.txt /*vim.vim* +vim7 version7.txt /*vim7* vim: options.txt /*vim:* vimball pi_vimball.txt /*vimball* vimball-contents pi_vimball.txt /*vimball-contents* vimball-extract pi_vimball.txt /*vimball-extract* vimball-history pi_vimball.txt /*vimball-history* vimball-manual pi_vimball.txt /*vimball-manual* -vimball-vimballlist pi_vimball.txt /*vimball-vimballlist* vimdev intro.txt /*vimdev* vimdiff diff.txt /*vimdiff* vimfiles options.txt /*vimfiles* @@ -7709,6 +7888,7 @@ warningmsg-variable eval.txt /*warningmsg-variable* white-space pattern.txt /*white-space* whitespace pattern.txt /*whitespace* wildcard editing.txt /*wildcard* +wildcards editing.txt /*wildcards* win16-!start gui_w16.txt /*win16-!start* win16-clipboard gui_w16.txt /*win16-clipboard* win16-colors gui_w16.txt /*win16-colors* diff --git a/runtime/doc/term.txt b/runtime/doc/term.txt index 515ceaed3..41fca5ffa 100644 --- a/runtime/doc/term.txt +++ b/runtime/doc/term.txt @@ -1,4 +1,4 @@ -*term.txt* For Vim version 7.0. Last change: 2006 Apr 30 +*term.txt* For Vim version 7.1a. Last change: 2007 Feb 28 VIM REFERENCE MANUAL by Bram Moolenaar @@ -749,7 +749,7 @@ to be used while keeping the shift key pressed. When clicking in a window which is editing another buffer, the Visual or Select mode is stopped. In Normal, Visual and Select mode clicking the right mouse button with the alt -key pressed causes the Visual area to become blockwise. When 'mousemodel is +key pressed causes the Visual area to become blockwise. When 'mousemodel' is "popup" the left button has to be used with the alt key. Note that this won't work on systems where the window manager consumes the mouse events when the alt key is pressed (it may move the window). diff --git a/runtime/doc/tips.txt b/runtime/doc/tips.txt index 597664f4a..1abfba91a 100644 --- a/runtime/doc/tips.txt +++ b/runtime/doc/tips.txt @@ -1,4 +1,4 @@ -*tips.txt* For Vim version 7.0. Last change: 2006 Apr 30 +*tips.txt* For Vim version 7.1a. Last change: 2006 Jul 24 VIM REFERENCE MANUAL by Bram Moolenaar @@ -149,8 +149,8 @@ these two variables are the correct place where the above mentioned control sequences should go. Compare your xterm termcap entry (found in /etc/termcap) with your xterm -terminfo entry (retrieved with /usr/5bin/infocmp -C xterm). Both should -contain entries similar to: > +terminfo entry (retrieved with "infocmp -C xterm"). Both should contain +entries similar to: > :te=\E[2J\E[?47l\E8:ti=\E7\E[?47h: PS: If you find any difference, someone (your sysadmin?) should better check diff --git a/runtime/doc/uganda.txt b/runtime/doc/uganda.txt index a1258b7d1..a8990c0f3 100644 --- a/runtime/doc/uganda.txt +++ b/runtime/doc/uganda.txt @@ -1,4 +1,4 @@ -*uganda.txt* For Vim version 7.0. Last change: 2006 Apr 24 +*uganda.txt* For Vim version 7.1a. Last change: 2007 May 05 VIM REFERENCE MANUAL by Bram Moolenaar @@ -13,6 +13,7 @@ below or visit the ICCF web site, available at these URLs: http://iccf-holland.org/ http://www.vim.org/iccf/ + http://www.iccf.nl/ You can also sponsor the development of Vim. Vim sponsors can vote for features. See |sponsor|. The money goes to Uganda anyway. @@ -211,21 +212,12 @@ Sending money: *iccf-donations* Check the ICCF web site for the latest information! See |iccf| for the URL. -USA: The methods mentioned below can be used. Alternatively, you - can send a check to the Nehemiah Group Outreach Society - (NGOS). This will reduce banking costs and you can get an IRS - tax receipt. The NGOS forwards the funds directly to the - Kibaale project in Uganda. Checks must be made payable to - NGOS but please note on the check "donation Kibaale". Mail - checks to: - NGOS - P.O. Box 50862 - Indianapolis, IN 45250 - Questions regarding the Nehemiah Group Outreach Society (NGOS) - should be directed to: Ross deMerchant, Executive Director - - r.demerchant AT sbcglobal DOT net. - For sponsoring a child contact KCF in Canada (see below) and - send the check to NGOS in Indianapolis. +USA: The methods mentioned below can be used. + Sending a check to the Nehemiah Group Outreach Society (NGOS) + is no longer possible, unfortunately. We are looking for + another way to get you an IRS tax receipt. + For sponsoring a child contact KCF in Canada (see below). US + checks can be send to them to lower banking costs. Canada: Contact Kibaale Children's Fund (KCF) in Surrey, Canada. They take care of the Canadian sponsors for the children in @@ -264,7 +256,7 @@ Europe: Use a bank transfer if possible. Your bank should have a form Credit Card: You can use PayPal to send money with a Credit card. This is the most widely used Internet based payment system. It's really simple to use. Use this link to find more info: - https://www.paypal.com/affil/pal=Bram%40iccf-holland.org + https://www.paypal.com/en_US/mrb/pal=XAC62PML3GF8Q The e-mail address for sending the money to is: Bram@iccf-holland.org For amounts above 400 Euro ($500) sending a check is diff --git a/runtime/doc/undo.txt b/runtime/doc/undo.txt index fde879d44..e1f65858d 100644 --- a/runtime/doc/undo.txt +++ b/runtime/doc/undo.txt @@ -1,4 +1,4 @@ -*undo.txt* For Vim version 7.0. Last change: 2006 Apr 30 +*undo.txt* For Vim version 7.1a. Last change: 2006 Apr 30 VIM REFERENCE MANUAL by Bram Moolenaar diff --git a/runtime/doc/usr_02.txt b/runtime/doc/usr_02.txt index 2b3dd788a..e782754c9 100644 --- a/runtime/doc/usr_02.txt +++ b/runtime/doc/usr_02.txt @@ -1,4 +1,4 @@ -*usr_02.txt* For Vim version 7.0. Last change: 2006 Apr 24 +*usr_02.txt* For Vim version 7.1a. Last change: 2007 Feb 28 VIM USER MANUAL - by Bram Moolenaar @@ -302,7 +302,7 @@ edited. Typing this command twice cancels the preceding "U". The "U" command is a change by itself, which the "u" command undoes and CTRL-R redoes. This might be a bit confusing. Don't worry, with "u" and CTRL-R you -can go to any of the situations you had. More about that in section ||. +can go to any of the situations you had. More about that in section |32.1|. ============================================================================== *02.6* Other editing commands @@ -497,6 +497,66 @@ You can use the error ID at the start to find help about it: > :help E37 + +Summary: *help-summary* > + :help +< Gives you very general help. Scroll down to see a list of all + helpfiles, including those added locally (i.e. not distributed + with Vim). > + :help user-toc.txt +< Table of contents of the User Manual. > + :help :subject +< Ex-command "subject", for instance the following: > + :help :help +< Help on getting help. > + :help abc +< normal-mode command "abc". > + :help CTRL-B +< Control key in Normal mode. > + :help i_abc + :help i_CTRL-B +< The same in Insert mode. > + :help v_abc + :help v_CTRL-B +< The same in Visual mode. > + :help c_abc + :help c_CTRL-B +< The same in Command-line mode. > + :help 'subject' +< Option 'subject'. > + :help subject() +< Function "subject". > + :help -subject +< Command-line option "-subject". > + :help +subject +< Compile-time feature "+subject'. > + :help EventName +< Autocommand event "EventName". > + :help digraphs.txt +< The top of the helpfile "digraph.txt". + Similarly for any other helpfile. > + :help pattern +< Find a help tag starting with "pattern". Repeat for + others. > + :help pattern +< See all possible help tag matches "pattern" at once. > + :helpgrep pattern +< Search the whole text of all help files for pattern "pattern". + Jumps to the first match. Jump to other matches with: > + :cn +< next match > + :cprev + :cN +< previous match > + :cfirst + :clast +< first or last match > + :copen + :cclose +< open/close the quickfix window; press to jump + to the item under the cursor + + ============================================================================== Next chapter: |usr_03.txt| Moving around diff --git a/runtime/doc/usr_03.txt b/runtime/doc/usr_03.txt index 9f15540bc..b082f83cb 100644 --- a/runtime/doc/usr_03.txt +++ b/runtime/doc/usr_03.txt @@ -1,4 +1,4 @@ -*usr_03.txt* For Vim version 7.0. Last change: 2006 Apr 24 +*usr_03.txt* For Vim version 7.1a. Last change: 2006 Jun 21 VIM USER MANUAL - by Bram Moolenaar @@ -606,7 +606,7 @@ NAMED MARKS *bookmark* Vim enables you to place your own marks in the text. The command "ma" marks the place under the cursor as mark a. You can place 26 marks (a through z) in your text. You can't see them, it's just a position that Vim remembers. - To go to a mark, use the command `{mark}, where "{mark} is the mark letter. + To go to a mark, use the command `{mark}, where {mark} is the mark letter. Thus to move to the a mark: > `a @@ -622,7 +622,7 @@ while working on some text near the end of the file. ms -The move to the text you want to work on and put the e (end) mark there: > +Then move to the text you want to work on and put the e (end) mark there: > me diff --git a/runtime/doc/usr_08.txt b/runtime/doc/usr_08.txt index cdb157e10..20de736dd 100644 --- a/runtime/doc/usr_08.txt +++ b/runtime/doc/usr_08.txt @@ -1,4 +1,4 @@ -*usr_08.txt* For Vim version 7.0. Last change: 2006 Apr 30 +*usr_08.txt* For Vim version 7.1a. Last change: 2006 Jul 18 VIM USER MANUAL - by Bram Moolenaar @@ -197,8 +197,8 @@ unmodified.) MOVING BETWEEN WINDOWS Since you can split windows horizontally and vertically as much as you like, -you can create any layout of windows. Then you can use these commands to move -between them: +you can create almost any layout of windows. Then you can use these commands +to move between them: CTRL-W h move to the window on the left CTRL-W j move to the window below @@ -242,7 +242,7 @@ and the type this command: > This uses the uppercase letter K. What happens is that the window is moved to the very top. You will notice that K is again used for moving upwards. When you have vertical splits, CTRL-W K will move the current window to the -top and make it occupy the full with of the Vim window. If this is your +top and make it occupy the full width of the Vim window. If this is your layout: +-------------------------------------------+ diff --git a/runtime/doc/usr_09.txt b/runtime/doc/usr_09.txt index fcfbcb65a..0c7a0418d 100644 --- a/runtime/doc/usr_09.txt +++ b/runtime/doc/usr_09.txt @@ -1,4 +1,4 @@ -*usr_09.txt* For Vim version 7.0. Last change: 2006 Apr 24 +*usr_09.txt* For Vim version 7.1a. Last change: 2006 Apr 24 VIM USER MANUAL - by Bram Moolenaar diff --git a/runtime/doc/usr_10.txt b/runtime/doc/usr_10.txt index b094a7296..3e7de4b54 100644 --- a/runtime/doc/usr_10.txt +++ b/runtime/doc/usr_10.txt @@ -1,4 +1,4 @@ -*usr_10.txt* For Vim version 7.0. Last change: 2006 Apr 24 +*usr_10.txt* For Vim version 7.1a. Last change: 2006 Nov 05 VIM USER MANUAL - by Bram Moolenaar @@ -183,8 +183,9 @@ results in (starting with the original line): Teacher Smith criticized Teacher Johnson today. ~ Other flags include p (print), which causes the ":substitute" command to print -out each line it changes. The c (confirm) flag tells ":substitute" to ask you -for confirmation before it performs each substitution. Enter the following: > +out the last line it changes. The c (confirm) flag tells ":substitute" to ask +you for confirmation before it performs each substitution. Enter the +following: > :%s/Professor/Teacher/c diff --git a/runtime/doc/usr_25.txt b/runtime/doc/usr_25.txt index a1e887afb..998cc1a25 100644 --- a/runtime/doc/usr_25.txt +++ b/runtime/doc/usr_25.txt @@ -1,4 +1,4 @@ -*usr_25.txt* For Vim version 7.0. Last change: 2006 Apr 24 +*usr_25.txt* For Vim version 7.1a. Last change: 2006 Jun 21 VIM USER MANUAL - by Bram Moolenaar @@ -122,7 +122,7 @@ whole file by typing this: > together. A common mistake is to have a line with a space or Tab. That's a blank line, but not an empty line. -Vim is able format more than just plain text. See |fo-table| for how to +Vim is able to format more than just plain text. See |fo-table| for how to change this. See the 'joinspaces' option to change the number of spaces used after a full stop. It is possible to use an external program for formatting. This is useful diff --git a/runtime/doc/usr_26.txt b/runtime/doc/usr_26.txt index ca78681ad..c2159714a 100644 --- a/runtime/doc/usr_26.txt +++ b/runtime/doc/usr_26.txt @@ -1,4 +1,4 @@ -*usr_26.txt* For Vim version 7.0. Last change: 2006 Apr 24 +*usr_26.txt* For Vim version 7.1a. Last change: 2006 Apr 24 VIM USER MANUAL - by Bram Moolenaar diff --git a/runtime/doc/usr_29.txt b/runtime/doc/usr_29.txt index b3a1d51eb..aa05560da 100644 --- a/runtime/doc/usr_29.txt +++ b/runtime/doc/usr_29.txt @@ -1,4 +1,4 @@ -*usr_29.txt* For Vim version 7.0. Last change: 2006 Apr 24 +*usr_29.txt* For Vim version 7.1a. Last change: 2006 Apr 24 VIM USER MANUAL - by Bram Moolenaar diff --git a/runtime/doc/usr_32.txt b/runtime/doc/usr_32.txt index 055a5add3..4b243fb27 100644 --- a/runtime/doc/usr_32.txt +++ b/runtime/doc/usr_32.txt @@ -1,4 +1,4 @@ -*usr_32.txt* For Vim version 7.0. Last change: 2006 Apr 30 +*usr_32.txt* For Vim version 7.1a. Last change: 2006 Apr 30 VIM USER MANUAL - by Bram Moolenaar diff --git a/runtime/doc/usr_42.txt b/runtime/doc/usr_42.txt index 5370a30da..3b0cb0498 100644 --- a/runtime/doc/usr_42.txt +++ b/runtime/doc/usr_42.txt @@ -1,4 +1,4 @@ -*usr_42.txt* For Vim version 7.0. Last change: 2006 Apr 24 +*usr_42.txt* For Vim version 7.1a. Last change: 2006 Apr 24 VIM USER MANUAL - by Bram Moolenaar diff --git a/runtime/doc/usr_44.txt b/runtime/doc/usr_44.txt index e5b0fa95d..48b4b92fc 100644 --- a/runtime/doc/usr_44.txt +++ b/runtime/doc/usr_44.txt @@ -1,4 +1,4 @@ -*usr_44.txt* For Vim version 7.0. Last change: 2006 Apr 24 +*usr_44.txt* For Vim version 7.1a. Last change: 2006 Apr 24 VIM USER MANUAL - by Bram Moolenaar diff --git a/runtime/doc/usr_90.txt b/runtime/doc/usr_90.txt index 65aad26c8..7334b451f 100644 --- a/runtime/doc/usr_90.txt +++ b/runtime/doc/usr_90.txt @@ -1,4 +1,4 @@ -*usr_90.txt* For Vim version 7.0. Last change: 2006 Apr 24 +*usr_90.txt* For Vim version 7.1a. Last change: 2006 Apr 24 VIM USER MANUAL - by Bram Moolenaar diff --git a/runtime/doc/usr_toc.txt b/runtime/doc/usr_toc.txt index 9fe133c49..ff42aa96a 100644 --- a/runtime/doc/usr_toc.txt +++ b/runtime/doc/usr_toc.txt @@ -1,4 +1,4 @@ -*usr_toc.txt* For Vim version 7.0. Last change: 2006 Apr 24 +*usr_toc.txt* For Vim version 7.1a. Last change: 2006 Apr 24 VIM USER MANUAL - by Bram Moolenaar diff --git a/runtime/doc/version5.txt b/runtime/doc/version5.txt index bc0628e5a..503cde476 100644 --- a/runtime/doc/version5.txt +++ b/runtime/doc/version5.txt @@ -1,4 +1,4 @@ -*version5.txt* For Vim version 7.0. Last change: 2006 Apr 24 +*version5.txt* For Vim version 7.1a. Last change: 2006 Nov 18 VIM REFERENCE MANUAL by Bram Moolenaar @@ -1865,7 +1865,7 @@ For ":syntax keyword" the "transparent" option did work, although not mentioned in the help. But synID() returned wrong name. "gqG" in a file with one-word-per-line (e.g. a dictionary) was very slow and -not interruptable. +not interruptible. "gq" operator inserted screen lines in the wrong situation. Now screen lines are inserted or deleted when this speeds up displaying. @@ -2870,7 +2870,7 @@ backspace key. "\" produces 0x7f. The shell syntax didn't contain a "syn sync maxlines" setting. In a long file without recognizable items, syncing took so long it looked like Vim hangs. -Added a maxlines setting, and made syncing interruptable. +Added a maxlines setting, and made syncing interruptible. The "gs" command didn't flush output before waiting. @@ -7578,7 +7578,7 @@ Fixed compiling under NeXT. (Jeroen C.M. Goudswaard) optwin.vim gave an error when used in Vi compatible mode ('cpo' contains 'C'). -Tcl interpreter: "buffer" command didn't check for presense of an argument. +Tcl interpreter: "buffer" command didn't check for presence of an argument. (Dave Bodenstab) dosinst.c: Added checks for too long file name. diff --git a/runtime/doc/version6.txt b/runtime/doc/version6.txt index 9dda5777a..9d33aa6f4 100644 --- a/runtime/doc/version6.txt +++ b/runtime/doc/version6.txt @@ -1,4 +1,4 @@ -*version6.txt* For Vim version 7.0. Last change: 2006 Apr 30 +*version6.txt* For Vim version 7.1a. Last change: 2006 Nov 18 VIM REFERENCE MANUAL by Bram Moolenaar @@ -11128,7 +11128,7 @@ Solution: Insert the indent. Also fix other mistakes. Files: runtime/doc/eval.txt Patch 6.2.187 -Problem: Using Insure++ reveals a number of bugs. (Dominuque Pelle) +Problem: Using Insure++ reveals a number of bugs. (Dominique Pelle) Solution: Initialize variables where needed. Free allocated memory to avoid leaks. Fix comparing tags to avoid reading past allocated memory. Files: src/buffer.c, src/diff.c, src/fileio.c, src/mark.c, src/misc1.c, @@ -14406,7 +14406,7 @@ Files: src/normal.c Patch 6.3.075 Problem: After unloading another buffer, syntax highlighting in the current buffer may be wrong when it uses "containedin". (Eric Arnold) -Solution: Use "buf" intead of "curbuf" in syntax_clear(). +Solution: Use "buf" instead of "curbuf" in syntax_clear(). Files: src/syntax.c Patch 6.3.076 diff --git a/runtime/doc/vim2html.pl b/runtime/doc/vim2html.pl index ddb1c4623..d51f60709 100644 --- a/runtime/doc/vim2html.pl +++ b/runtime/doc/vim2html.pl @@ -182,7 +182,6 @@ EOF } - sub writeCSS { open( CSS, ">vim-stylesheet.css" ) || die "Couldn't write stylesheet: $!\n"; diff --git a/runtime/doc/visual.txt b/runtime/doc/visual.txt index e588d954b..ef4a0a708 100644 --- a/runtime/doc/visual.txt +++ b/runtime/doc/visual.txt @@ -1,4 +1,4 @@ -*visual.txt* For Vim version 7.0. Last change: 2006 Apr 24 +*visual.txt* For Vim version 7.1a. Last change: 2006 Sep 26 VIM REFERENCE MANUAL by Bram Moolenaar @@ -175,7 +175,7 @@ stops when a motion command is used that does not move straight up or down. For moving the end of the block many commands can be used, but you cannot use Ex commands, commands that make changes or abandon the file. Commands -(starting with) ".pPiIaAO&", CTRL-^, "Z", CTRL-], CTRL-T, CTRL-R, CTRL-I +(starting with) ".", "&", CTRL-^, "Z", CTRL-], CTRL-T, CTRL-R, CTRL-I and CTRL-O cause a beep and Visual mode continues. When switching to another window on the same buffer, the cursor position in diff --git a/runtime/doc/xxd-it.1 b/runtime/doc/xxd-it.1 index 82f77cc89..41298495a 100755 --- a/runtime/doc/xxd-it.1 +++ b/runtime/doc/xxd-it.1 @@ -226,7 +226,7 @@ Stampa 3 linee (0x30 bytes esadecimali) alla fine di \fI% xxd \-s \-0x30 file .PP .br -Stampa 120 bytes come immagine esadecimale continua con 40 bytes per linea. +Stampa 120 bytes come immagine esadecimale continua con 20 bytes per linea. .br \fI% xxd \-l 120 \-ps \-c 20 xxd.1\fR diff --git a/runtime/doc/xxd-pl.UTF-8.1 b/runtime/doc/xxd-pl.UTF-8.1 index 624de29de..669ffc2ea 100644 --- a/runtime/doc/xxd-pl.UTF-8.1 +++ b/runtime/doc/xxd-pl.UTF-8.1 @@ -216,7 +216,7 @@ Wypisz trzy linie (heksowe 0x30 bajtów) z koÅ„ca \fI% xxd \-s \-0x30 plik .PP .br -Wypisz 120 bajtów jako ciÄ…gÅ‚y zrzut heksowy z 40 oktetami na liniÄ™. +Wypisz 120 bajtów jako ciÄ…gÅ‚y zrzut heksowy z 20 oktetami na liniÄ™. .br \fI% xxd \-l 120 \-ps \-c 20 xxd.1\fR .br diff --git a/runtime/doc/xxd-ru.UTF-8.1 b/runtime/doc/xxd-ru.UTF-8.1 index ce75f8304..647845bab 100644 --- a/runtime/doc/xxd-ru.UTF-8.1 +++ b/runtime/doc/xxd-ru.UTF-8.1 @@ -231,7 +231,7 @@ xxd Ñ Ð¿Ð¾Ð¼Ð¾Ñ‰ÑŒÑŽ strace(1) или truss(1) в тех ÑлучаÑÑ…, ког .PP .br ВывеÑти 120 байтов в виде непрерывного шеÑтнадцатеричного предÑÑ‚Ð°Ð²Ð»ÐµÐ½Ð¸Ñ -по 40 октетов в Ñтроке: +по 20 октетов в Ñтроке: .PP \fI% xxd \-l 120 \-ps \-c 20 xxd.1\fR .br diff --git a/runtime/ftplugin/ada.vim b/runtime/ftplugin/ada.vim index 13fa8f93f..688cf97f7 100644 --- a/runtime/ftplugin/ada.vim +++ b/runtime/ftplugin/ada.vim @@ -1,223 +1,190 @@ -" Vim Ada plugin file -" Language: Ada -" Maintainer: Neil Bird -" Last Change: 2006 Apr 21 -" Version: $Id$ -" Look for the latest version at http://vim.sourceforge.net/ -" -" Perform Ada specific completion & tagging. -" -" +"------------------------------------------------------------------------------ +" Description: Perform Ada specific completion & tagging. +" Language: Ada (2005) +" $Id$ +" Maintainer: Martin Krischik +" Neil Bird +" $Author$ +" $Date$ +" Version: 4.2 +" $Revision$ +" $HeadURL: https://svn.sourceforge.net/svnroot/gnuada/trunk/tools/vim/ftplugin/ada.vim $ +" History: 24.05.2006 MK Unified Headers +" 26.05.2006 MK ' should not be in iskeyword. +" 16.07.2006 MK Ada-Mode as vim-ball +" 02.10.2006 MK Better folding. +" 15.10.2006 MK Bram's suggestion for runtime integration +" 05.11.2006 MK Bram suggested not to use include protection for +" autoload +" 05.11.2006 MK Bram suggested to save on spaces +" Help Page: ft-ada-plugin +"------------------------------------------------------------------------------ " Provides mapping overrides for tag jumping that figure out the current " Ada object and tag jump to that, not the 'simple' vim word. " Similarly allows matching of full-length ada entities from tags. -" Exports 'AdaWord()' function to return full name of Ada entity under the -" cursor( or at given line/column), stripping whitespace/newlines as necessary. +"------------------------------------------------------------------------------ " Only do this when not done yet for this buffer -if exists("b:did_ftplugin") - finish +if exists ("b:did_ftplugin") || version < 700 + finish endif " Don't load another plugin for this buffer -let b:did_ftplugin = 1 +let b:did_ftplugin = 38 +" " Temporarily set cpoptions to ensure the script loads OK +" let s:cpoptions = &cpoptions -set cpo-=C +set cpoptions-=C -" Ada comments -setlocal comments+=O:-- +" Section: Comments {{{1 +" +setlocal comments=O:--,:--\ \ +setlocal commentstring=--\ \ %s +setlocal complete=.,w,b,u,t,i -" Make local tag mappings for this buffer (if not already set) -if mapcheck('','n') == '' - nnoremap :call JumpToTag_ada('') -endif -if mapcheck('g','n') == '' - nnoremap g :call JumpToTag_ada('','stj') +" Section: Tagging {{{1 +" +if exists ("g:ada_extended_tagging") + " Make local tag mappings for this buffer (if not already set) + if g:ada_extended_tagging == 'jump' + if mapcheck('','n') == '' + nnoremap :call ada#Jump_Tag ('', 'tjump') + endif + if mapcheck('g','n') == '' + nnoremap g :call ada#Jump_Tag ('','stjump') + endif + elseif g:ada_extended_tagging == 'list' + if mapcheck('','n') == '' + nnoremap :call ada#List_Tag () + endif + if mapcheck('g','n') == '' + nnoremap g :call ada#List_Tag () + endif + endif endif -if mapcheck('','i') == '' - inoremap =AdaCompletion("\C-N>") -endif -if mapcheck('','i') == '' - inoremap =AdaCompletion("\C-P>") -endif -if mapcheck('','i') == '' - inoremap =AdaCompletion("\C-X>\C-]>") -endif -if mapcheck('','i') == '' - inoremap =AdaInsertBackspace() +" Section: Completion {{{1 +" +setlocal completefunc=ada#User_Complete +setlocal omnifunc=adacomplete#Complete + +if exists ("g:ada_extended_completion") + if mapcheck ('','i') == '' + inoremap =ada#Completion("\C-N>") + endif + if mapcheck ('','i') == '' + inoremap =ada#Completion("\C-P>") + endif + if mapcheck ('','i') == '' + inoremap =ada#Completion("\C-X>\C-]>") + endif + if mapcheck ('','i') == '' + inoremap =ada#Insert_Backspace () + endif endif - +" Section: Matchit {{{1 +" " Only do this when not done yet for this buffer & matchit is used -if ! exists("b:match_words") && exists("loaded_matchit") - " The following lines enable the macros/matchit.vim plugin for - " Ada-specific extended matching with the % key. - let s:notend = '\%(\:\:\:\\s\+\,' . - \ s:notend . '\:\:\\s\+\,' . - \ '\%(\.*\|\.*\|'.s:notend.'\)\:\\s\+\,' . - \ '\%(\\|\\):\:\\s*\%($\|[;A-Z]\),' . - \ s:notend . '\:\\s\+\' +" +if !exists ("b:match_words") && + \ exists ("loaded_matchit") + " + " The following lines enable the macros/matchit.vim plugin for + " Ada-specific extended matching with the % key. + " + let s:notend = '\%(\:\:\:\\s\+\,' . + \ s:notend . '\:\:\\s\+\,' . + \ '\%(\.*\|\.*\|'.s:notend.'\)\:\\s\+\,' . + \ '\%(\\|\\):\:\\s*\%($\|[;A-Z]\),' . + \ s:notend . '\:\\s\+\' endif - -" Prevent re-load of functions -if exists('s:id') - finish +" Section: Compiler {{{1 +" +if ! exists("current_compiler") || + \ current_compiler != g:ada_default_compiler + execute "compiler " . g:ada_default_compiler endif -" Get this script's unique id -map ', 'nWb') - \ || 0 < searchpair(js, '', '', 'nW') + \ && 0 < searchpair(js, '', '', 'nW') " we're inside javascript if getline(lnum) !~ js && getline(a:lnum) != '' if restore_ic == 0 diff --git a/runtime/indent/htmldjango.vim b/runtime/indent/htmldjango.vim new file mode 100644 index 000000000..8da9fe3a5 --- /dev/null +++ b/runtime/indent/htmldjango.vim @@ -0,0 +1,12 @@ +" Vim indent file +" Language: Django HTML template +" Maintainer: Dave Hodder +" Last Change: 2007 Jan 25 + +" Only load this indent file when no other was loaded. +if exists("b:did_indent") + finish +endif + +" Use HTML formatting rules. +runtime! indent/html.vim diff --git a/runtime/indent/jsp.vim b/runtime/indent/jsp.vim new file mode 100644 index 000000000..6f7069e94 --- /dev/null +++ b/runtime/indent/jsp.vim @@ -0,0 +1,17 @@ +" Vim filetype indent file +" Language: JSP files +" Maintainer: David Fishburn +" Version: 1.0 +" Last Change: Wed Nov 08 2006 11:08:05 AM + +" Only load this indent file when no other was loaded. +if exists("b:did_indent") + finish +endif + +" If there has been no specific JSP indent script created, +" use the default html indent script which will handle +" html, javascript and most of the JSP constructs. +runtime! indent/html.vim + + diff --git a/runtime/indent/ocaml.vim b/runtime/indent/ocaml.vim index 1893d84a8..5c267af8b 100644 --- a/runtime/indent/ocaml.vim +++ b/runtime/indent/ocaml.vim @@ -4,7 +4,7 @@ " Mike Leary " Markus Mottl " URL: http://www.ocaml.info/vim/indent/ocaml.vim -" Last Change: 2006 Apr 30 +" Last Change: 2005 Jun 25 - Fixed multiple bugs due to 'else\nreturn ind' working " 2005 May 09 - Added an option to not indent OCaml-indents specially (MM) " 2005 Apr 11 - Fixed an indentation bug concerning "let" (MM) diff --git a/runtime/indent/python.vim b/runtime/indent/python.vim index 3e14afc99..0c04e8110 100644 --- a/runtime/indent/python.vim +++ b/runtime/indent/python.vim @@ -2,7 +2,7 @@ " Language: Python " Maintainer: Bram Moolenaar " Original Author: David Bustos -" Last Change: 2006 Apr 30 +" Last Change: 2006 Jun 18 " Only load this indent file when no other was loaded. if exists("b:did_indent") @@ -136,7 +136,7 @@ function GetPythonIndent(lnum) endif " If the previous line was a stop-execution statement... - if getline(plnum) =~ '^\s*\(break\|continue\|raise\|return\)\>' + if getline(plnum) =~ '^\s*\(break\|continue\|raise\|return\|pass\)\>' " See if the user has already dedented if indent(a:lnum) > indent(plnum) - &sw " If not, recommend one dedent diff --git a/runtime/indent/ruby.vim b/runtime/indent/ruby.vim index 3a2837e04..824635bc5 100644 --- a/runtime/indent/ruby.vim +++ b/runtime/indent/ruby.vim @@ -217,7 +217,11 @@ function GetRubyIndent() call cursor(v:lnum, col) let bs = strpart('(){}[]', stridx(')}]', line[col - 1]) * 2, 2) if searchpair(escape(bs[0], '\['), '', bs[1], 'bW', s:skip_expr) > 0 - let ind = line[col-1]==')' ? virtcol('.')-1 : indent(s:GetMSL(line('.'))) + if line[col-1]==')' && col('.') != col('$') - 1 + let ind = virtcol('.')-1 + else + let ind = indent(s:GetMSL(line('.'))) + endif endif return ind endif @@ -274,7 +278,11 @@ function GetRubyIndent() if line =~ '[[({]' let counts = s:LineHasOpeningBrackets(lnum) if counts[0] == '1' && searchpair('(', '', ')', 'bW', s:skip_expr) > 0 - return virtcol('.') + if col('.') + 1 == col('$') + return ind + &sw + else + return virtcol('.') + endif elseif counts[1] == '1' || counts[2] == '1' return ind + &sw else @@ -361,3 +369,5 @@ endfunction let &cpo = s:cpo_save unlet s:cpo_save + +" vim:set sw=2 sts=2 ts=8 noet ff=unix: diff --git a/runtime/indent/vhdl.vim b/runtime/indent/vhdl.vim index c6f01988d..d288be4ce 100644 --- a/runtime/indent/vhdl.vim +++ b/runtime/indent/vhdl.vim @@ -1,8 +1,8 @@ " VHDL indent ('93 syntax) " Language: VHDL " Maintainer: Gerald Lai -" Version: 1.36 -" Last Change: 2006 Apr 12 +" Version: 1.50 +" Last Change: 2007 Jan 29 " URL: http://www.vim.org/scripts/script.php?script_id=1450 " only load this indent file when no other was loaded @@ -13,9 +13,11 @@ let b:did_indent = 1 " setup indent options for local VHDL buffer setlocal indentexpr=GetVHDLindent() -setlocal indentkeys=!^F,o,O,e,0(,0) +setlocal indentkeys=!^F,o,O,0(,0) +setlocal indentkeys+==~begin,=~end\ ,=~end\ ,=~is,=~select,=~when setlocal indentkeys+==~if,=~then,=~elsif,=~else -setlocal indentkeys+==~begin,=~is,=~select +setlocal indentkeys+==~case,=~loop,=~for,=~generate,=~record,=~units,=~process,=~block,=~function,=~component,=~procedure +setlocal indentkeys+==~architecture,=~configuration,=~entity,=~package " constants " not a comment @@ -25,6 +27,16 @@ let s:ES = '\s*\%(--.*\)\=$' " no "end" keyword in front let s:NE = '\%(\' - if curs !~? s2.'.*'.s:NC.'\.*'.s:ES && prevs =~? s2 + if (curs !~? s2.'.*'.s:NC.'\.*'.s:ES && prevs =~? s2) || m == 1 let ind = ind + &sw endif return ind @@ -240,61 +260,55 @@ function GetVHDLindent() " where: start of current line " find previous opening statement of " keywords: "for", "if" - if curs =~? '^\s*\' && prevs =~? s:NC.s:NE.'\%(\%(\\|\\)' + if curs =~? '^\s*\' && prevs =~? s:NC.s:NE.'\%(\%(\' return ind2 endif " indent: +sw - " keywords: "begin", "block", "loop", "process", "record", "units" - " removed: "case", "elsif", "if", "while" + " keywords: "block", "process" + " removed: "begin", "case", "elsif", "if", "loop", "record", "units", "while" " where: anywhere in previous line - if prevs =~? s:NC.'\%(\\|'.s:NE.'\<\%(block\|loop\|process\|record\|units\)\>\)' + if prevs =~? s:NC.s:NE.'\<\%(block\|process\)\>' return ind + &sw endif " indent: +sw - " keywords: "architecture", "component", "configuration", "entity", "for", "package" - " removed: "when", "with" + " keywords: "architecture", "configuration", "entity", "package" + " removed: "component", "for", "when", "with" " where: start of previous line - if prevs =~? '^\s*\%(architecture\|component\|configuration\|entity\|for\|package\)\>' + if prevs =~? '^\s*\%(architecture\|configuration\|entity\|package\)\>' return ind + &sw endif " indent: +sw - " keyword: "generate", "is", "select", "=>" + " keyword: "select" + " removed: "generate", "is", "=>" " where: end of previous line - if prevs =~? s:NC.'\%(\%('.s:NE.'\\)'.s:ES + if prevs =~? s:NC.'\" " where: end of previous line " _note_: indent allowed to leave this filter - if prevs =~? '^\s*else\>' || prevs =~? s:NC.'\\|'.s:NE.'\<\%(loop\|record\|units\)\>\)' || prevs =~? '^\s*\%(component\|else\|for\)\>' || prevs =~? s:NC.'\%('.s:NE.'\\)'.s:ES let ind = ind + &sw endif " **************************************************************************************** " indent: -sw - " keywords: "when", provided previous line does not begin with "when" + " keywords: "when", provided previous line does not begin with "when", does not end with "is" " where: start of current line let s4 = '^\s*when\>' if curs =~? s4 - if prevs !~? s4 - return ind - &sw - else - return ind2 - endif - endif - - " indent: -sw - " keywords: "else", "elsif", provided previous line does not contain "then" - " where: start of current line - if curs =~? '^\s*\%(else\|elsif\)\>' - if prevs !~? s:NC.'\' + if prevs =~? s:NC.'\' - if prevs !~? '^\s*else\>' && prevs !~? s:NC.'\' - return ind - &sw - else - return ind2 - endif - endif - - " indent: -sw - " keywords: "end" + "function", "procedure", provided previous line does not contain "begin" - " where: start of current line - if curs =~? '^\s*end\s\+\%(function\|procedure\)\>' - if prevs !~? s:NC.'\' - return ind - &sw - else - return ind2 - endif - endif - - " indent: -sw - " keywords: "end" + "block", "for", "generate", "loop", "process", "record", "units" - " where: start of current line - if curs =~? '^\s*end\s\+\%(block\|for\|generate\|loop\|process\|record\|units\)\>' + if curs =~? '^\s*\%(else\|elsif\|end\s\+\%(block\|for\|function\|generate\|if\|loop\|procedure\|process\|record\|units\)\)\>' return ind - &sw endif @@ -365,9 +357,9 @@ function GetVHDLindent() endif "indent: follow "keyword: "component" - "where: anywhere in previous non-comment line + "where: start of previous non-comment line elseif m == 2 - if ps =~? s:NC.s:NE.'\' + if ps =~? '^\s*component\>' return indent(pn) endif endif @@ -395,7 +387,8 @@ function GetVHDLindent() " indent: -sw " keywords: "end" + identifier " where: start of current line - if curs =~? '^\s*end\s\+\w\+\>' + "if curs =~? '^\s*end\s\+\w\+\>' + if curs =~? '^\s*end\s' return ind - &sw endif diff --git a/runtime/keymap/bulgarian-bds.vim b/runtime/keymap/bulgarian-bds.vim new file mode 100644 index 000000000..bb789a9af --- /dev/null +++ b/runtime/keymap/bulgarian-bds.vim @@ -0,0 +1,127 @@ +" Vim keymap file for Bulgarian and Russian characters, `bds' layout. +" Can be used with utf-8 or cp1251 file encodings. +" This file itself is in utf-8 + +" Maintainer: Boyko Bantchev +" URI: http://www.math.bas.bg/softeng/bantchev/misc/vim/bulgarian-bds.vim +" Last Changed: 2006 Oct 18 + +" This keymap corresponds to what is called Bulgarian standard, +" or BDS (БДС) typewriter keyboard layout. +" In addition to the Bulgarian alphabet, BDS prescribes the presence +" of the following characters: +" — The Cyrillic letters Э (capital), and Ñ‹ and Ñ (small) +" (these are present in the Russian alphabet). +" — The latin capital letters I and V (these are used to type +" Roman numerals without having to leave Cyrillic mode). +" — „ and “ (Bulgarian quotation style), and « and » (Russian quotation +" style). +" — §, â„–, —, •, ·, ±, ¬, ¤, and € +" +" Some punctuation characters that are present in ascii are mapped in BDS +" to keys different from the ones they occupy in the qwerty layout, because +" the latter are used to type other characters. +" +" In this keymap also defined (not in BDS) are the Russian letters Ð (capital) +" and Ñ‘ (small), as well as the Russian capital letter Ы (see above the small +" counterpart). This way, using the bulgarian-bds keymap, one can access both +" the Bulgarian and the Russian alphabets. + +scriptencoding utf-8 + +let b:keymap_name = "bds" + +loadkeymap +D Ð CYRILLIC CAPITAL LETTER A +? Б CYRILLIC CAPITAL LETTER BE +L Ð’ CYRILLIC CAPITAL LETTER VE +H Г CYRILLIC CAPITAL LETTER GHE +O Д CYRILLIC CAPITAL LETTER DE +E Е CYRILLIC CAPITAL LETTER IE +E:: Ð CYRILLIC CAPITAL LETTER IO +G Ж CYRILLIC CAPITAL LETTER ZHE +P З CYRILLIC CAPITAL LETTER ZE +R И CYRILLIC CAPITAL LETTER I +X Й CYRILLIC CAPITAL LETTER SHORT I +U К CYRILLIC CAPITAL LETTER KA +> Л CYRILLIC CAPITAL LETTER EL +: Ðœ CYRILLIC CAPITAL LETTER EM +K Ð CYRILLIC CAPITAL LETTER EN +F О CYRILLIC CAPITAL LETTER O +M П CYRILLIC CAPITAL LETTER PE +< Р CYRILLIC CAPITAL LETTER ER +I С CYRILLIC CAPITAL LETTER ES +J Т CYRILLIC CAPITAL LETTER TE +W У CYRILLIC CAPITAL LETTER U +B Ф CYRILLIC CAPITAL LETTER EF +N Ð¥ CYRILLIC CAPITAL LETTER HA +{ Ц CYRILLIC CAPITAL LETTER TSE +\" Ч CYRILLIC CAPITAL LETTER CHE +T Ш CYRILLIC CAPITAL LETTER SHA +Y Щ CYRILLIC CAPITAL LETTER SHCHA +C Ъ CYRILLIC CAPITAL LETTER HARD SIGN +CX Ы CYRILLIC CAPITAL LETTER YERU +A Ь CYRILLIC CAPITAL LETTER SOFT SIGN +V Э CYRILLIC CAPITAL LETTER REVERSED E +Z Ю CYRILLIC CAPITAL LETTER YU +S Я CYRILLIC CAPITAL LETTER YA +d а CYRILLIC SMALL LETTER A +\/ б CYRILLIC SMALL LETTER BE +l в CYRILLIC SMALL LETTER VE +h г CYRILLIC SMALL LETTER GHE +o д CYRILLIC SMALL LETTER DE +e е CYRILLIC SMALL LETTER IE +e:: Ñ‘ CYRILLIC SMALL LETTER IO +g ж CYRILLIC SMALL LETTER ZHE +p з CYRILLIC SMALL LETTER ZE +r и CYRILLIC SMALL LETTER I +x й CYRILLIC SMALL LETTER SHORT I +u к CYRILLIC SMALL LETTER KA +\. л CYRILLIC SMALL LETTER EL +; м CYRILLIC SMALL LETTER EM +k н CYRILLIC SMALL LETTER EN +f о CYRILLIC SMALL LETTER O +m п CYRILLIC SMALL LETTER PE +, Ñ€ CYRILLIC SMALL LETTER ER +i Ñ CYRILLIC SMALL LETTER ES +j Ñ‚ CYRILLIC SMALL LETTER TE +w у CYRILLIC SMALL LETTER U +b Ñ„ CYRILLIC SMALL LETTER EF +n Ñ… CYRILLIC SMALL LETTER HA +[ ц CYRILLIC SMALL LETTER TSE +' ч CYRILLIC SMALL LETTER CHE +t ш CYRILLIC SMALL LETTER SHA +y щ CYRILLIC SMALL LETTER SHCHA +c ÑŠ CYRILLIC SMALL LETTER HARD SIGN +Q Ñ‹ CYRILLIC SMALL LETTER YERU +a ÑŒ CYRILLIC SMALL LETTER SOFT SIGN +v Ñ CYRILLIC SMALL LETTER REVERSED E +z ÑŽ CYRILLIC SMALL LETTER YU +s Ñ CYRILLIC SMALL LETTER YA +_ I LATIN CAPITAL LETTER I ++ V LATIN CAPITAL LETTER V +$ " QUOTATION MARK +\\ ( LEFT PARENTHESIS +| ) RIGHT PARENTHESIS +# + PLUS SIGN +q , COMMA +( - HYPHEN-MINUS += . FULL STOP (PERIOD) +* / SOLIDUS (SLASH) +& : COLON +] ; SEMICOLON +^ = EQUALS SIGN +@ ? QUESTION MARK +} § SECTION SIGN (PARAGRAPH SIGN) +) â„– NUMERO SIGN +-- — EM DASH +,, „ DOUBLE LOW-9 QUOTATION MARK +`` “ LEFT DOUBLE QUOTATION MARK +<< « LEFT-POINTING DOUBLE ANGLE QUOTATION MARK +>> » RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK +00 • BULLET +.. · MIDDLE DOT ++- ± PLUS-MINUS SIGN +~~ ¬ NOT SIGN +@@ ¤ CURRENCY SIGN +$$ € EURO SIGN diff --git a/runtime/keymap/bulgarian-phonetic.vim b/runtime/keymap/bulgarian-phonetic.vim new file mode 100644 index 000000000..feec587b7 --- /dev/null +++ b/runtime/keymap/bulgarian-phonetic.vim @@ -0,0 +1,108 @@ +" Vim keymap file for Bulgarian and Russian characters, `phonetic' layout. +" Can be used with utf-8 or cp1251 file encodings. +" This file itself is in utf-8 + +" Maintainer: Boyko Bantchev +" URI: http://www.math.bas.bg/softeng/bantchev/misc/vim/bulgarian-phonetic.vim +" Last Changed: 2006 Oct 18 + +" This keymap corresponds to what is called `phonetic layout' in Bulgaria: +" Cyrillic letters homophonous with Latin letters tend to take the same +" places as the latter ones. Most of the keys corresponding to punctuation +" characters are left unmapped, so they retain their usual (qwerty) meanings +" while typing in Cyrillic. +" +" In addition to the Bulgarian alphabet, the keymap defines the following +" characters: +" — The Cyrillic letters Ð and Ñ‘, Э and Ñ, and Ы and Ñ‹ (in pairs of +" capital and small). These are the letters in the Russian alphabet +" that are not present in Bulgarian, so using the bulgarian-phonetic +" keymap one can type in Russian, too. +" — „ and “ (Bulgarian quotation style), and « and » (Russian quotation +" style). +" — §, â„–, —, •, ·, ±, ¬, ¤, and € + +scriptencoding utf-8 + +let b:keymap_name = "pho" + +loadkeymap +A Ð CYRILLIC CAPITAL LETTER A +B Б CYRILLIC CAPITAL LETTER BE +W Ð’ CYRILLIC CAPITAL LETTER VE +G Г CYRILLIC CAPITAL LETTER GHE +D Д CYRILLIC CAPITAL LETTER DE +E Е CYRILLIC CAPITAL LETTER IE +E:: Ð CYRILLIC CAPITAL LETTER IO +V Ж CYRILLIC CAPITAL LETTER ZHE +Z З CYRILLIC CAPITAL LETTER ZE +I И CYRILLIC CAPITAL LETTER I +J Й CYRILLIC CAPITAL LETTER SHORT I +K К CYRILLIC CAPITAL LETTER KA +L Л CYRILLIC CAPITAL LETTER EL +M Ðœ CYRILLIC CAPITAL LETTER EM +N Ð CYRILLIC CAPITAL LETTER EN +O О CYRILLIC CAPITAL LETTER O +P П CYRILLIC CAPITAL LETTER PE +R Р CYRILLIC CAPITAL LETTER ER +S С CYRILLIC CAPITAL LETTER ES +T Т CYRILLIC CAPITAL LETTER TE +U У CYRILLIC CAPITAL LETTER U +F Ф CYRILLIC CAPITAL LETTER EF +H Ð¥ CYRILLIC CAPITAL LETTER HA +C Ц CYRILLIC CAPITAL LETTER TSE +~ Ч CYRILLIC CAPITAL LETTER CHE +{ Ш CYRILLIC CAPITAL LETTER SHA +} Щ CYRILLIC CAPITAL LETTER SHCHA +Y Ъ CYRILLIC CAPITAL LETTER HARD SIGN +YJ Ы CYRILLIC CAPITAL LETTER YERU +X Ь CYRILLIC CAPITAL LETTER SOFT SIGN +YE Э CYRILLIC CAPITAL LETTER REVERSED E +| Ю CYRILLIC CAPITAL LETTER YU +Q Я CYRILLIC CAPITAL LETTER YA +a а CYRILLIC SMALL LETTER A +b б CYRILLIC SMALL LETTER BE +w в CYRILLIC SMALL LETTER VE +g г CYRILLIC SMALL LETTER GHE +d д CYRILLIC SMALL LETTER DE +e е CYRILLIC SMALL LETTER IE +e:: Ñ‘ CYRILLIC SMALL LETTER IO +v ж CYRILLIC SMALL LETTER ZHE +z з CYRILLIC SMALL LETTER ZE +i и CYRILLIC SMALL LETTER I +j й CYRILLIC SMALL LETTER SHORT I +k к CYRILLIC SMALL LETTER KA +l л CYRILLIC SMALL LETTER EL +m м CYRILLIC SMALL LETTER EM +n н CYRILLIC SMALL LETTER EN +o о CYRILLIC SMALL LETTER O +p п CYRILLIC SMALL LETTER PE +r Ñ€ CYRILLIC SMALL LETTER ER +s Ñ CYRILLIC SMALL LETTER ES +t Ñ‚ CYRILLIC SMALL LETTER TE +u у CYRILLIC SMALL LETTER U +f Ñ„ CYRILLIC SMALL LETTER EF +h Ñ… CYRILLIC SMALL LETTER HA +c ц CYRILLIC SMALL LETTER TSE +` ч CYRILLIC SMALL LETTER CHE +[ ш CYRILLIC SMALL LETTER SHA +] щ CYRILLIC SMALL LETTER SHCHA +y ÑŠ CYRILLIC SMALL LETTER HARD SIGN +yj Ñ‹ CYRILLIC SMALL LETTER YERU +x ÑŒ CYRILLIC SMALL LETTER SOFT SIGN +ye Ñ CYRILLIC SMALL LETTER REVERSED E +\\ ÑŽ CYRILLIC SMALL LETTER YU +q Ñ CYRILLIC SMALL LETTER YA +!! § SECTION SIGN (PARAGRAPH SIGN) +## â„– NUMERO SIGN +-- — EM DASH +,, „ DOUBLE LOW-9 QUOTATION MARK +`` “ LEFT DOUBLE QUOTATION MARK +<< « LEFT-POINTING DOUBLE ANGLE QUOTATION MARK +>> » RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK +00 • BULLET +.. · MIDDLE DOT ++- ± PLUS-MINUS SIGN +~~ ¬ NOT SIGN +@@ ¤ CURRENCY SIGN +$$ € EURO SIGN diff --git a/runtime/keymap/thaana.vim b/runtime/keymap/thaana.vim new file mode 100644 index 000000000..bf22d80ec --- /dev/null +++ b/runtime/keymap/thaana.vim @@ -0,0 +1,3 @@ +if &enc == 'utf-8' + source :p:h/thaana-phonetic_utf-8.vim +endif diff --git a/runtime/keymap/vietnamese-viqr_utf-8.vim b/runtime/keymap/vietnamese-viqr_utf-8.vim new file mode 100644 index 000000000..b17be6dae --- /dev/null +++ b/runtime/keymap/vietnamese-viqr_utf-8.vim @@ -0,0 +1,160 @@ +" Vim Keymap file for vietnamese through the usual viqr method +" Maintainer: Samuel Thibault +" Last Change: 2006 Jun 17 + +scriptencoding utf-8 + +let b:keymap_name = "vietnamese" + +loadkeymap +a a +A A +a` à +A` À +a? ả +A? Ả +a~ ã +A~ à +a' á +A' à +a. ạ +A. Ạ +a( ă +A( Ä‚ +a(` ằ +A(` Ằ +a(? ẳ +A(? Ẳ +a(~ ẵ +A(~ Ẵ +a(' ắ +A(' Ắ +a(. ặ +A(. Ặ +a^ â +A^  +a^` ầ +A^` Ầ +a^? ẩ +A^? Ẩ +a^~ ẫ +A^~ Ẫ +a^' ấ +A^' Ấ +a^. ậ +A^. Ậ +d d +D D +dd Ä‘ +Dd Ä +DD Ä +e e +E E +e` è +E` È +e? ẻ +E? Ẻ +e~ ẽ +E~ Ẽ +e' é +E' É +e. ẹ +E. Ẹ +e^ ê +E^ Ê +e^` á» +E^` Ề +e^? ể +E^? Ể +e^~ á»… +E^~ Ễ +e^' ế +E^' Ế +e^. ệ +E^. Ệ +i i +I I +i` ì +I` ÃŒ +i? ỉ +I? Ỉ +i~ Ä© +I~ Ĩ +i' í +I' à +i. ị +I. Ị +o o +O O +o` ò +O` Ã’ +o? á» +O? Ỏ +o~ õ +O~ Õ +o' ó +O' Ó +o. á» +O. Ọ +o^ ô +O^ Ô +o^` ồ +O^` á»’ +o^? ổ +O^? á»” +o^~ á»— +O^~ á»– +o^' ố +O^' á» +o^. á»™ +O^. Ộ +o+ Æ¡ +O+ Æ  +o+` á» +O+` Ờ +o+? ở +O+? Ở +o+~ ỡ +O+~ á»  +o+' á»› +O+' Ớ +o+. ợ +O+. Ợ +u u +U U +u` ù +U` Ù +u? ủ +U? Ủ +u~ Å© +U~ Ũ +u' ú +U' Ú +u. ụ +U. Ụ +u+ Æ° +U+ Ư +u+` ừ +U+` Ừ +u+? á»­ +U+? Ử +u+~ ữ +U+~ á»® +u+' ứ +U+' Ứ +u+. á»± +U+. á»° +y y +Y Y +y` ỳ +Y` Ỳ +y? á»· +Y? Ỷ +y~ ỹ +Y~ Ỹ +y' ý +Y' à +y. ỵ +Y. á»´ +\\d d +\\D D diff --git a/runtime/lang/menu_sl_si.cp1250.vim b/runtime/lang/menu_sl_si.cp1250.vim new file mode 100644 index 000000000..23f668ced --- /dev/null +++ b/runtime/lang/menu_sl_si.cp1250.vim @@ -0,0 +1,294 @@ +" Menu Translations: Slovenian / Slovensko +" Maintainer: Mojca Miklavec +" Originally By: Mojca Miklavec +" Last Change: Sat, 17 Jun 2006 +" vim:set foldmethod=marker tabstop=8: + +" TODO: add/check all '&'s + +" Quit when menu translations have already been done. +if exists("did_menu_trans") + finish +endif +let did_menu_trans = 1 + +scriptencoding cp1250 + +" {{{ FILE / DATOTEKA +menutrans &File &Datoteka +menutrans &Open\.\.\.:e &Odpri\ \.\.\.:e +menutrans Sp&lit-Open\.\.\.:sp Odpri\ de&ljeno\ \.\.\.:sp +menutrans Open\ Tab\.\.\.:tabnew Odpri\ v\ zavi&hku\ \.\.\.:tabnew +menutrans &New:enew &Nova:enew +menutrans &Close:close &Zapri:close +menutrans &Save:w &Shrani:w +menutrans Save\ &As\.\.\.:sav Shrani\ &kot\ \.\.\.:sav +menutrans &Print Na&tisni +menutrans Sa&ve-Exit:wqa Shrani\ in\ &konèaj:wqa +menutrans E&xit:qa &Izhod:qa + +if has("diff") + menutrans Split\ &Diff\ with\.\.\. Primerjaj\ z\ (di&ff)\ \.\.\. + menutrans Split\ Patched\ &By\.\.\. &Popravi\ z\ (patch)\ \.\.\. +endif +" }}} FILE / DATOTEKA + +" {{{ EDIT / UREDI +menutrans &Edit &Uredi +menutrans &Undou &Razveljaviu +menutrans &Redo^R &Obnovi^R +menutrans Rep&eat\. Po&novi\. +menutrans Cu&t"+x &Izreži"+x +menutrans &Copy"+y &Kopiraj"+y +menutrans &Paste"+gP &Prilepi"+gP +menutrans Put\ &Before[p Vrini\ pred[p +menutrans Put\ &After]p Vrini\ za]p +menutrans &Deletex Iz&brišix +menutrans &Select\ allggVG Izberi\ vseggVG +menutrans &Find\.\.\. Po&išèi\ \.\.\. +menutrans Find\ and\ Rep&lace\.\.\. Poišèi\ in\ &zamenjaj\ \.\.\. + +" [-- SETTINGS --] +menutrans Settings\ &Window Nastavitve\ \.\.\. +menutrans Startup\ &Settings Zaèetne\ nastavitve +menutrans &Global\ Settings &Globalne\ nastavitve + +menutrans Toggle\ Pattern\ &Highlight:set\ hls! Vkljuèi/izkljuèi\ poudarjanje\ iskanega\ niza:set\ hls! +menutrans Toggle\ &Ignore-case:set\ ic! Vkljuèi/izkljuèi\ loèevanje\ velikih\ in\ malih\ èrk:set\ ic! +menutrans Toggle\ &Showmatch:set\ sm! Vkljuèi/izkljuèi\ kratek\ skok\ na\ pripadajoèi\ oklepaj:set\ sm! + +menutrans &Context\ lines Št\.\ vidnih\ vrstic\ pred/za\ kurzorjem + +menutrans &Virtual\ Edit Dovoli\ položaj\ kazalèka,\ kjer\ ni\ besedila +menutrans Never Nikoli +menutrans Block\ Selection Le\ med\ izbiranjem\ bloka +menutrans Insert\ mode Le\ v\ naèinu\ za\ pisanje +menutrans Block\ and\ Insert Pri\ obojem +menutrans Always Vedno +menutrans Toggle\ Insert\ &Mode:set\ im! Vkljuèi/izkljuèi\ naèin\ za\ pisanje:set\ im! +menutrans Toggle\ Vi\ C&ompatible:set\ cp! Vkljuèi/izkljuèi\ združljivost\ z\ Vi-jem:set\ cp! + +menutrans Search\ &Path\.\.\. Pot\ za\ iskanje\ \.\.\. +menutrans Ta&g\ Files\.\.\. Ta&g-datoteke\.\.\. + +menutrans Toggle\ &Toolbar Pokaži/skrij\ Orodja +menutrans Toggle\ &Bottom\ Scrollbar Pokaži/skrij\ spodnji\ drsnik +menutrans Toggle\ &Left\ Scrollbar Pokaži/skrij\ levi\ drsnik +menutrans Toggle\ &Right\ Scrollbar Pokaži/skrij\ desni\ drsnik + +" Edit/File Settings +menutrans F&ile\ Settings &Nastavitve\ datoteke + +" Boolean options +menutrans Toggle\ Line\ &Numbering:set\ nu! Pokaži/skrij\ številke\ vrstic:set\ nu! +menutrans Toggle\ &List\ Mode:set\ list! Pokaži/skrij\ nevidne\ znake:set\ list! " space/tab +menutrans Toggle\ Line\ &Wrap:set\ wrap! Vkljuèi/izkljuèi\ prelome\ vrstic:set\ wrap! +menutrans Toggle\ W&rap\ at\ word:set\ lbr! Vkljuèi/izkljuèi\ prelome\ vrstic\ med\ besedami:set\ lbr! +menutrans Toggle\ &expand-tab:set\ et! Vkljuèi/izkljuèi\ zamenjavo\ tabulatorjev\ s\ presledki:set\ et! +menutrans Toggle\ &auto-indent:set\ ai! Vkljuèi/izkljuèi\ avtomatsko\ zamikanje\ vrstic:set\ ai! +menutrans Toggle\ &C-indenting:set\ cin! Vkljuèi/izkljuèi\ C-jevski\ naèin\ zamikanja\ vrstic:set\ cin! + +" other options +menutrans &Shiftwidth Širina\ zamika\ vrstic +menutrans Soft\ &Tabstop Širina\ &tabulatorja +menutrans Te&xt\ Width\.\.\. Širina\ besedila\ \.\.\. +menutrans &File\ Format\.\.\. Format\ &datoteke\ \.\.\. +menutrans C&olor\ Scheme &Barvna\ shema\ \.\.\. +menutrans &Keymap &Keymap +menutrans Select\ Fo&nt\.\.\. Pisava\ \.\.\. +" }}} EDIT / UREDI + +" {{{ TOOLS / ORODJA +menutrans &Tools &Orodja +menutrans &Jump\ to\ this\ tagg^] &Skoèi\ k\ tej\ znaèkig^] +menutrans Jump\ &back^T Skoèi\ Na&zaj^T +menutrans Build\ &Tags\ File Napravi\ datoteke\ z\ znaèkami\ (tag) +if has("spell") + menutrans &Spelling Èrkovalnik + menutrans &Spell\ Check\ On &Vkljuèi + menutrans Spell\ Check\ &Off &Izkljuèi + menutrans To\ &Next\ error]s K\ &naslednji\ napaki]s + menutrans To\ &Previous\ error[s K\ &prejšnji\ napaki[s + menutrans Suggest\ &Correctionsz= Predlagaj\ popravekz= + menutrans &Repeat\ correction:spellrepall Po&novi\ popravke\ na\ vseh\ besedah:spellrepall + menutrans Set\ language\ to\ "en" Angleški\ "en" + menutrans Set\ language\ to\ "en_au" Angleški\ "en_au" + menutrans Set\ language\ to\ "en_ca" Angleški\ "en_ca" + menutrans Set\ language\ to\ "en_gb" Angleški\ "en_gb" + menutrans Set\ language\ to\ "en_nz" Angleški\ "en_nz" + menutrans Set\ language\ to\ "en_us" Angleški\ "en_us" + menutrans Set\ language\ to\ "sl" Slovenski\ "sl" + menutrans Set\ language\ to\ "de" Nemški\ "de" + menutrans Set\ language\ to\ Èrkovalnik:\ + menutrans &Find\ More\ Languages &Ostali\ jeziki +endif +if has("folding") + menutrans &Folding Zvijanje\ kode + " open close folds + menutrans &Enable/Disable\ foldszi Omogoèi/onemogoèi\ zvijanjezi " Omogoèi/onemogoèi\ zavihke + menutrans &View\ Cursor\ Linezv Pokaži\ vrstico\ s\ kazalèkomzv " kjer je kazalec + menutrans Vie&w\ Cursor\ Line\ onlyzMzx Pokaži\ samo\ vrstico\ s\ kazalèkomzMzx + menutrans C&lose\ more\ foldszm Zvij\ naslednji\ nivozm " Zapri\ veè\ zavihkov + menutrans &Close\ all\ foldszM Zvij\ vso\ kodozM " Zapri\ vse\ zavihke + menutrans O&pen\ more\ foldszr Razvij\ en\ nivozr " Odpri\ veè\ zavihkov + menutrans &Open\ all\ foldszR Razvij\ vso\ kodozR " Odpri\ vse\ zavihke + " fold method + menutrans Fold\ Met&hod Kriterij\ za\ zvijanje " Ustvarjanje\ zavihkov + menutrans M&anual &Roèno + menutrans I&ndent Glede\ na\ &poravnavo + menutrans E&xpression Z\ &izrazi\ (foldexpr) + menutrans S&yntax Glede\ na\ &sintakso + menutrans &Diff Razlike\ (&diff) + menutrans Ma&rker Z\ &markerji/oznaèbami + " create and delete folds + " TODO accelerators + menutrans Create\ &Foldzf Ustvari\ zvitekzf + menutrans &Delete\ Foldzd Izbriši\ zvitekzd + menutrans Delete\ &All\ FoldszD Izbriši\ vse\ zvitkezD + " moving around in folds + menutrans Fold\ column\ &width Širina\ drevesa\ z\ zvitki +endif " has folding + +if has("diff") + menutrans &Diff Razlike\ (&Diff) + menutrans &Update &Posodobi + menutrans &Get\ Block &Sprejmi\ (spremeni\ to\ okno) " XXX: check if translation is OK + menutrans &Put\ Block &Pošlji\ (spremeni\ drugo\ okno) +endif + +menutrans &Make:make Napravi\ (&make):make +menutrans &List\ Errors:cl Pokaži\ napake:cl +menutrans L&ist\ Messages:cl! Pokaži\ sporoèila:cl! +menutrans &Next\ Error:cn K\ &naslednji\ napaki:cn +menutrans &Previous\ Error:cp K\ &prejšnji\ napaki:cp +menutrans &Older\ List:cold K\ &starejšemu\ seznamu\ napak:cold +menutrans N&ewer\ List:cnew K\ &novejšemu\ seznamu\ napak:cnew + +menutrans Error\ &Window Okno\ z\ napakami +menutrans &Update:cwin &Posodobi:cwin +menutrans &Open:copen &Odpri:copen +menutrans &Close:cclose &Zapri:cclose + +menutrans &Set\ Compiler Nastavi\ &prevajalnik +menutrans Se&T\ Compiler Nastavi\ &prevajalnik " bug in original translation? + +menutrans &Convert\ to\ HEX:%!xxd Pretvori\ v\ HE&X:%!xxd +menutrans Conve&rt\ back:%!xxd\ -r Pretvori\ nazaj:%!xxd\ -r +" }}} TOOLS / ORODJA + +" {{{ SYNTAX / BARVANJE KODE +menutrans &Syntax &Barvanje\ kode +menutrans &Show\ filetypes\ in\ menu Podprte\ vrste\ datotek +menutrans Set\ '&syntax'\ only Samo\ barvanje\ ('&syntax') +menutrans Set\ '&filetype'\ too Tudi\ obnašanje\ ('&filetype') +menutrans &Off &Izkljuèeno +menutrans &Manual &Roèno +menutrans A&utomatic &Avtomatsko +menutrans on/off\ for\ &This\ file Vkljuèi/izkljuèi\ za\ to\ datoteko +menutrans Co&lor\ test Preizkus\ barv +menutrans &Highlight\ test Preizkus\ barvanja\ kode +menutrans &Convert\ to\ HTML Pretvori\ v\ &HTML +" }}} SYNTAX / BARVANJE KODE + +" {{{ BUFFERS / MEDPOMNILNIK +menutrans &Buffers &Medpomnilnik " XXX: ni najbolje: okno bi bolj pristajalo, ampak okno je že +menutrans &Refresh\ menu &Osveži +menutrans Delete &Briši +menutrans &Alternate &Menjaj +menutrans &Next &Naslednji +menutrans &Previous &Prejšnji +menutrans [No\ File] [Brez\ datoteke] +" }}} BUFFERS / MEDPOMNILNIK + +" {{{ WINDOW / OKNO +menutrans &Window &Okno +menutrans &New^Wn &Novo^Wn +menutrans S&plit^Ws Razdeli^Ws +menutrans Split\ &Vertically^Wv Razdeli\ navpièno^Ws +menutrans Split\ File\ E&xplorer Razdeli:\ Vsebina\ mape +menutrans Sp&lit\ To\ #^W^^ Razdeli\ v\ #^W^^ +menutrans &Close^Wc &Zapri^Wc +menutrans Close\ &Other(s)^Wo Zapri\ &ostala^Wo +menutrans Move\ &To Premakni +menutrans &Top^WK &Gor^WK +menutrans &Bottom^WJ &Dol^WJ +menutrans &Left\ side^WH &Levo^WH +menutrans &Right\ side^WL &Desno^WL +menutrans Rotate\ &Up^WR Zavrti\ navzgor^WR +menutrans Rotate\ &Down^Wr Zavrti\ navzdol^Wr +menutrans &Equal\ Size^W= &Enaka\ velikost^W= +menutrans &Max\ Height^W_ Najvišje^W_ +menutrans M&in\ Height^W1_ Najnižje^W1_ +menutrans Max\ &Width^W\| Najširše^W\| +menutrans Min\ Widt&h^W1\| Najožje^W1\| +" }}} WINDOW / OKNO + +" {{{ HELP / POMOÈ +menutrans &Help &Pomoè +menutrans &Overview Hitri\ pregled +menutrans &User\ Manual P&riroènik +menutrans &How-to\ links &How-to\ kazalo +menutrans &Find\.\.\. Po&išèi\ \.\.\. " conflicts with Edit.Find +menutrans &Credits &Avtorji +menutrans Co&pying &Licenca +menutrans &Sponsor/Register Registracija\ in\ &donacije +menutrans O&rphans &Sirotam +menutrans &Version &Verzija +menutrans &About &O\ programu +" }}} HELP / POMOÈ + +" {{{ POPUP +menutrans &Undo &Razveljavi +menutrans Cu&t &Izreži +menutrans &Copy &Kopieraj +menutrans &Paste &Prilepi +menutrans &Delete &Zbriši +menutrans Select\ Blockwise Izbiraj\ po\ blokih +menutrans Select\ &Word Izberi\ &besedo +menutrans Select\ &Sentence Izberi\ &stavek +menutrans Select\ Pa&ragraph Izberi\ &odstavek +menutrans Select\ &Line Izberi\ vrs&tico +menutrans Select\ &Block Izberi\ b&lok +menutrans &Select\ AllggVG Izberi\ &vseggVG +" }}} POPUP + +" {{{ TOOLBAR +if has("toolbar") + if exists("*Do_toolbar_tmenu") + delfun Do_toolbar_tmenu + endif + fun Do_toolbar_tmenu() + tmenu ToolBar.Open Odpri datoteko + tmenu ToolBar.Save Shrani datoteko + tmenu ToolBar.SaveAll Shrani vse datoteke + tmenu ToolBar.Print Natisni + tmenu ToolBar.Undo Razveljavi + tmenu ToolBar.Redo Obnovi + tmenu ToolBar.Cut Izreži + tmenu ToolBar.Copy Kopiraj + tmenu ToolBar.Paste Prilepi + tmenu ToolBar.Find Najdi ... + tmenu ToolBar.FindNext Najdi naslednje + tmenu ToolBar.FindPrev Najdi prejšnje + tmenu ToolBar.Replace Najdi in zamenjaj ... + tmenu ToolBar.LoadSesn Naloži sejo + tmenu ToolBar.SaveSesn Shrani trenutno sejo + tmenu ToolBar.RunScript Izberi Vim skripto za izvajanje + tmenu ToolBar.Make Napravi trenutni projekt (:make) + tmenu ToolBar.RunCtags Napravi znaèke v trenutnem direktoriju (!ctags -R.) + tmenu ToolBar.TagJump Skoèi k znaèki pod kurzorjem + tmenu ToolBar.Help Pomoè za Vim + tmenu ToolBar.FindHelp Išèi v pomoèi za Vim + endfun +endif +" }}} TOOLBAR + +" {{{ DIALOG TEXTS +let g:menutrans_no_file = "[Brez datoteke]" +let g:menutrans_help_dialog = "Vnesite ukaz ali besedo, za katero želite pomoè:\n\nUporabite predpono i_ za ukaze v naèinu za pisanje (npr.: i_CTRL-X)\nUporabite predpono c_ za ukaze v ukazni vrstici (command-line) (npr.: c_)\nUporabite predpono ' za imena opcij (npr.: 'shiftwidth')" +let g:menutrans_path_dialog = "Vnesite poti za iskanje datotek.\nImena direktorijev loèite z vejico." +let g:menutrans_tags_dialog = "Vnesite imena datotek z znaèkami ('tag').\nImana loèite z vejicami." +let g:menutrans_textwidth_dialog = "Vnesite novo širino besedila (ali 0 za izklop formatiranja): " +let g:menutrans_fileformat_dialog = "Izberite format datoteke" +let g:menutrans_fileformat_choices = "&Unix\n&Dos\n&Mac\n&Preklièi" +" }}} diff --git a/runtime/lang/menu_sl_si.latin2.vim b/runtime/lang/menu_sl_si.latin2.vim new file mode 100644 index 000000000..57d6c89de --- /dev/null +++ b/runtime/lang/menu_sl_si.latin2.vim @@ -0,0 +1,294 @@ +" Menu Translations: Slovenian / Slovensko +" Maintainer: Mojca Miklavec +" Originally By: Mojca Miklavec +" Last Change: Mon, 12 Jun 2006 00:00:00 CEST +" vim:set foldmethod=marker tabstop=8: + +" TODO: add/check all '&'s + +" Quit when menu translations have already been done. +if exists("did_menu_trans") + finish +endif +let did_menu_trans = 1 + +scriptencoding latin2 + +" {{{ FILE / DATOTEKA +menutrans &File &Datoteka +menutrans &Open\.\.\.:e &Odpri\ \.\.\.:e +menutrans Sp&lit-Open\.\.\.:sp Odpri\ de&ljeno\ \.\.\.:sp +menutrans Open\ Tab\.\.\.:tabnew Odpri\ v\ zavi&hku\ \.\.\.:tabnew +menutrans &New:enew &Nova:enew +menutrans &Close:close &Zapri:close +menutrans &Save:w &Shrani:w +menutrans Save\ &As\.\.\.:sav Shrani\ &kot\ \.\.\.:sav +menutrans &Print Na&tisni +menutrans Sa&ve-Exit:wqa Shrani\ in\ &konèaj:wqa +menutrans E&xit:qa &Izhod:qa + +if has("diff") + menutrans Split\ &Diff\ with\.\.\. Primerjaj\ z\ (di&ff)\ \.\.\. + menutrans Split\ Patched\ &By\.\.\. &Popravi\ z\ (patch)\ \.\.\. +endif +" }}} FILE / DATOTEKA + +" {{{ EDIT / UREDI +menutrans &Edit &Uredi +menutrans &Undou &Razveljaviu +menutrans &Redo^R &Obnovi^R +menutrans Rep&eat\. Po&novi\. +menutrans Cu&t"+x &Izre¾i"+x +menutrans &Copy"+y &Kopiraj"+y +menutrans &Paste"+gP &Prilepi"+gP +menutrans Put\ &Before[p Vrini\ pred[p +menutrans Put\ &After]p Vrini\ za]p +menutrans &Deletex Iz&bri¹ix +menutrans &Select\ allggVG Izberi\ vseggVG +menutrans &Find\.\.\. Po&i¹èi\ \.\.\. +menutrans Find\ and\ Rep&lace\.\.\. Poi¹èi\ in\ &zamenjaj\ \.\.\. + +" [-- SETTINGS --] +menutrans Settings\ &Window Nastavitve\ \.\.\. +menutrans Startup\ &Settings Zaèetne nastavitve +menutrans &Global\ Settings &Globalne\ nastavitve + +menutrans Toggle\ Pattern\ &Highlight:set\ hls! Vkljuèi/izkljuèi\ poudarjanje\ iskanega\ niza:set\ hls! +menutrans Toggle\ &Ignore-case:set\ ic! Vkljuèi/izkljuèi\ loèevanje\ velikih\ in\ malih\ èrk:set\ ic! +menutrans Toggle\ &Showmatch:set\ sm! Vkljuèi/izkljuèi\ kratek\ skok\ na\ pripadajoèi\ oklepaj:set\ sm! + +menutrans &Context\ lines ©t\.\ vidnih\ vrstic\ pred/za\ kurzorjem + +menutrans &Virtual\ Edit Dovoli\ polo¾aj\ kazalèka,\ kjer\ ni\ besedila +menutrans Never Nikoli +menutrans Block\ Selection Le\ med\ izbiranjem\ bloka +menutrans Insert\ mode Le\ v\ naèinu\ za\ pisanje +menutrans Block\ and\ Insert Pri\ obojem +menutrans Always Vedno +menutrans Toggle\ Insert\ &Mode:set\ im! Vkljuèi/izkljuèi\ naèin\ za\ pisanje:set\ im! +menutrans Toggle\ Vi\ C&ompatible:set\ cp! Vkljuèi/izkljuèi\ zdru¾ljivost\ z\ Vi-jem:set\ cp! + +menutrans Search\ &Path\.\.\. Pot\ za\ iskanje\ \.\.\. +menutrans Ta&g\ Files\.\.\. Ta&g-datoteke\.\.\. + +menutrans Toggle\ &Toolbar Poka¾i/skrij\ Orodja +menutrans Toggle\ &Bottom\ Scrollbar Poka¾i/skrij\ spodnji\ drsnik +menutrans Toggle\ &Left\ Scrollbar Poka¾i/skrij\ levi\ drsnik +menutrans Toggle\ &Right\ Scrollbar Poka¾i/skrij\ desni\ drsnik + +" Edit/File Settings +menutrans F&ile\ Settings &Nastavitve\ datoteke + +" Boolean options +menutrans Toggle\ Line\ &Numbering:set\ nu! Poka¾i/skrij\ ¹tevilke\ vrstic:set\ nu! +menutrans Toggle\ &List\ Mode:set\ list! Poka¾i/skrij\ nevidne\ znake:set\ list! " space/tab +menutrans Toggle\ Line\ &Wrap:set\ wrap! Vkljuèi/izkljuèi\ prelome\ vrstic:set\ wrap! +menutrans Toggle\ W&rap\ at\ word:set\ lbr! Vkljuèi/izkljuèi\ prelome\ vrstic\ med\ besedami:set\ lbr! +menutrans Toggle\ &expand-tab:set\ et! Vkljuèi/izkljuèi\ zamenjavo\ tabulatorjev\ s\ presledki:set\ et! +menutrans Toggle\ &auto-indent:set\ ai! Vkljuèi/izkljuèi\ avtomatsko\ zamikanje\ vrstic:set\ ai! +menutrans Toggle\ &C-indenting:set\ cin! Vkljuèi/izkljuèi\ C-jevski\ naèin\ zamikanja\ vrstic:set\ cin! + +" other options +menutrans &Shiftwidth ©irina\ zamika\ vrstic +menutrans Soft\ &Tabstop ©irina &tabulatorja +menutrans Te&xt\ Width\.\.\. ©irina\ besedila\ \.\.\. +menutrans &File\ Format\.\.\. Format\ &datoteke\ \.\.\. +menutrans C&olor\ Scheme &Barvna\ shema\ \.\.\. +menutrans &Keymap &Keymap +menutrans Select\ Fo&nt\.\.\. Pisava\ \.\.\. +" }}} EDIT / UREDI + +" {{{ TOOLS / ORODJA +menutrans &Tools &Orodja +menutrans &Jump\ to\ this\ tagg^] &Skoèi\ k\ tej\ znaèkig^] +menutrans Jump\ &back^T Skoèi\ Na&zaj^T +menutrans Build\ &Tags\ File Napravi\ datoteke\ z\ znaèkami\ (tag) +if has("spell") + menutrans &Spelling Èrkovalnik + menutrans &Spell\ Check\ On &Vkljuèi + menutrans Spell\ Check\ &Off &Izkljuèi + menutrans To\ &Next\ error]s K\ &naslednji\ napaki]s + menutrans To\ &Previous\ error[s K\ &prej¹nji\ napaki[s + menutrans Suggest\ &Correctionsz= Predlagaj\ popravekz= + menutrans &Repeat\ correction:spellrepall Po&novi\ popravke\ na\ vseh\ besedah:spellrepall + menutrans Set\ language\ to\ "en" Èrkovalnik:\ angle¹ki\ "en" + menutrans Set\ language\ to\ "en_au" Èrkovalnik:\ angle¹ki\ "en_au" + menutrans Set\ language\ to\ "en_ca" Èrkovalnik:\ angle¹ki\ "en_ca" + menutrans Set\ language\ to\ "en_gb" Èrkovalnik:\ angle¹ki\ "en_gb" + menutrans Set\ language\ to\ "en_nz" Èrkovalnik:\ angle¹ki\ "en_nz" + menutrans Set\ language\ to\ "en_us" Èrkovalnik:\ angle¹ki\ "en_us" + menutrans Set\ language\ to\ "sl" Èrkovalnik:\ slovenski\ "sl" + menutrans Set\ language\ to\ "de" Èrkovalnik:\ nem¹ki\ "de" + menutrans Set\ language\ to\ Èrkovalnik:\ + menutrans &Find\ More\ Languages &Ostali\ jeziki +endif +if has("folding") + menutrans &Folding Zavihek + " open close folds + menutrans &Enable/Disable\ foldszi Omogoèi/onemogoèi\ zavihkezi + menutrans &View\ Cursor\ Linezv Poka¾i\ vrstico\ s\ kazalcemzv " kjer je kazalec + menutrans Vie&w\ Cursor\ Line\ onlyzMzx Poka¾i\ samo\ vrstico\ s\ kazalcemzMzx + menutrans C&lose\ more\ foldszm Zapri\ veè\ zavihkovzm + menutrans &Close\ all\ foldszM Zapri\ vse\ zavihkezM + menutrans O&pen\ more\ foldszr Odpri\ veè\ zavihkovzr + menutrans &Open\ all\ foldszR Odpri\ vse\ zavihkezR + " fold method + menutrans Fold\ Met&hod Ustvarjanje\ zavihkov + menutrans M&anual &Roèno + menutrans I&ndent Glede\ na\ &poravnavo + menutrans E&xpression Z\ &izrazi\ (foldexpr) + menutrans S&yntax Glede\ na\ &sintakso + menutrans &Diff Razlike\ (&diff) + menutrans Ma&rker Z\ &markerji/oznaèbami + " create and delete folds + " TODO accelerators + menutrans Create\ &Foldzf Ustvari\ zavihekzf + menutrans &Delete\ Foldzd Izbri¹i\ zavihekzd + menutrans Delete\ &All\ FoldszD Izbri¹i\ vse\ zavihkezD + " moving around in folds + menutrans Fold\ column\ &width ©irina\ stolpca\ z\ zavihkom +endif " has folding + +if has("diff") + menutrans &Diff Razlike\ (&Diff) + menutrans &Update &Posodobi + menutrans &Get\ Block &Sprejmi\ (spremeni\ to\ okno) " TODO: check if translation is OK + menutrans &Put\ Block &Po¹lji\ (spremeni\ drugo\ okno) +endif + +menutrans &Make:make Napravi\ (&make):make +menutrans &List\ Errors:cl Poka¾i\ napake:cl +menutrans L&ist\ Messages:cl! Poka¾i\ sporoèila:cl! +menutrans &Next\ Error:cn K\ &naslednji\ napaki:cn +menutrans &Previous\ Error:cp K\ &prej¹nji\ napaki:cp +menutrans &Older\ List:cold K\ &starej¹emu\ seznamu\ napak:cold +menutrans N&ewer\ List:cnew K\ &novej¹emu\ seznamu\ napak:cnew + +menutrans Error\ &Window Okno\ z\ napakami +menutrans &Update:cwin &Posodobi:cwin +menutrans &Open:copen &Odpri:copen +menutrans &Close:cclose &Zapri:cclose + +menutrans &Set\ Compiler Nastavi\ &prevajalnik +menutrans Se&T\ Compiler Nastavi\ &prevajalnik " bug in original translation? + +menutrans &Convert\ to\ HEX:%!xxd Pretvori\ v\ HE&X:%!xxd +menutrans Conve&rt\ back:%!xxd\ -r Pretvori\ nazaj:%!xxd\ -r +" }}} TOOLS / ORODJA + +" {{{ SYNTAX / BARVANJE KODE +menutrans &Syntax &Barvanje\ kode +menutrans &Show\ filetypes\ in\ menu Podprte\ vrste\ datotek +menutrans Set\ '&syntax'\ only Samo\ barvanje\ ('&syntax') +menutrans Set\ '&filetype'\ too Tudi\ obna¹anje\ ('&filetype') +menutrans &Off &Izkljuèeno +menutrans &Manual &Roèno +menutrans A&utomatic &Avtomatsko +menutrans on/off\ for\ &This\ file Vkljuèi/izkljuèi\ za\ to\ datoteko +menutrans Co&lor\ test Preizkus\ barv +menutrans &Highlight\ test Preizkus\ barvanja\ kode +menutrans &Convert\ to\ HTML Pretvori\ v\ &HTML +" }}} SYNTAX / BARVANJE KODE + +" {{{ BUFFERS / MEDPOMNILNIK +menutrans &Buffers &Medpomnilnik " XXX: ni najbolje: okno bi bolj pristajalo, ampak okno je ¾e +menutrans &Refresh\ menu &Osve¾i +menutrans Delete &Bri¹i +menutrans &Alternate &Menjaj +menutrans &Next &Naslednji +menutrans &Previous &Prej¹nji +menutrans [No\ File] [Brez\ datoteke] +" }}} BUFFERS / MEDPOMNILNIK + +" {{{ WINDOW / OKNO +menutrans &Window &Okno +menutrans &New^Wn &Novo^Wn +menutrans S&plit^Ws Razdeli^Ws +menutrans Split\ &Vertically^Wv Razdeli\ navpièno^Ws +menutrans Split\ File\ E&xplorer Razdeli:\ Vsebina\ mape +menutrans Sp&lit\ To\ #^W^^ Razdeli\ v\ #^W^^ +menutrans &Close^Wc &Zapri^Wc +menutrans Close\ &Other(s)^Wo Zapri\ &ostala^Wo +menutrans Move\ &To Premakni +menutrans &Top^WK &Gor^WK +menutrans &Bottom^WJ &Dol^WJ +menutrans &Left\ side^WH &Levo^WH +menutrans &Right\ side^WL &Desno^WL +menutrans Rotate\ &Up^WR Zavrti\ navzgor^WR +menutrans Rotate\ &Down^Wr Zavrti\ navzdol^Wr +menutrans &Equal\ Size^W= &Enaka\ velikost^W= +menutrans &Max\ Height^W_ Najvi¹je^W_ +menutrans M&in\ Height^W1_ Najni¾je^W1_ +menutrans Max\ &Width^W\| Naj¹ir¹e^W\| +menutrans Min\ Widt&h^W1\| Najo¾je^W1\| +" }}} WINDOW / OKNO + +" {{{ HELP / POMOÈ +menutrans &Help &Pomoè +menutrans &Overview Hitri\ pregled +menutrans &User\ Manual P&riroènik +menutrans &How-to\ links &How-to\ kazalo +menutrans &Find\.\.\. Po&i¹èi\ \.\.\. " conflicts with Edit.Find +menutrans &Credits &Avtorji +menutrans Co&pying &Licenca +menutrans &Sponsor/Register Registracija\ in\ &donacije +menutrans O&rphans &Sirotam +menutrans &Version &Verzija +menutrans &About &O\ programu +" }}} HELP / POMOÈ + +" {{{ POPUP +menutrans &Undo &Razveljavi +menutrans Cu&t &Izre¾i +menutrans &Copy &Kopieraj +menutrans &Paste &Prilepi +menutrans &Delete &Zbri¹i +menutrans Select\ Blockwise Izbiraj\ po\ blokih +menutrans Select\ &Word Izberi\ &besedo +menutrans Select\ &Sentence Izberi\ &stavek +menutrans Select\ Pa&ragraph Izberi\ &odstavek +menutrans Select\ &Line Izberi\ vrs&tico +menutrans Select\ &Block Izberi\ b&lok +menutrans Select\ &All Izberi\ &vse +" }}} POPUP + +" {{{ TOOLBAR +if has("toolbar") + if exists("*Do_toolbar_tmenu") + delfun Do_toolbar_tmenu + endif + fun Do_toolbar_tmenu() + tmenu ToolBar.Open Odpri datoteko + tmenu ToolBar.Save Shrani datoteko + tmenu ToolBar.SaveAll Shrani vse datoteke + tmenu ToolBar.Print Natisni + tmenu ToolBar.Undo Razveljavi + tmenu ToolBar.Redo Obnovi + tmenu ToolBar.Cut Izre¾i + tmenu ToolBar.Copy Kopiraj + tmenu ToolBar.Paste Prilepi + tmenu ToolBar.Find Najdi ... + tmenu ToolBar.FindNext Najdi naslednje + tmenu ToolBar.FindPrev Najdi prej¹nje + tmenu ToolBar.Replace Najdi in zamenjaj ... + tmenu ToolBar.LoadSesn Nalo¾i sejo + tmenu ToolBar.SaveSesn Shrani trenutno sejo + tmenu ToolBar.RunScript Izberi Vim skripto za izvajanje + tmenu ToolBar.Make Napravi trenutni projekt (:make) + tmenu ToolBar.RunCtags Napravi znaèke v trenutnem direktoriju (!ctags -R.) + tmenu ToolBar.TagJump Skoèi k znaèki pod kurzorjem + tmenu ToolBar.Help Pomoè za Vim + tmenu ToolBar.FindHelp I¹èi v pomoèi za Vim + endfun +endif +" }}} TOOLBAR + +" {{{ DIALOG TEXTS +let g:menutrans_no_file = "[Brez datoteke]" +let g:menutrans_help_dialog = "Vnesite ukaz ali besedo, za katero ¾elite pomoè:\n\nUporabite predpono i_ za ukaze v naèinu za pisanje (npr.: i_CTRL-X)\nUporabite predpono c_ za ukaze v ukazni vrstici (command-line) (npr.: c_)\nUporabite predpono ' za imena opcij (npr.: 'shiftwidth')" +let g:menutrans_path_dialog = "Vnesite poti za iskanje datotek.\nImena direktorijev loèite z vejico." +let g:menutrans_tags_dialog = "Vnesite imena datotek z znaèkami ('tag').\nImana loèite z vejicami." +let g:menutrans_textwidth_dialog = "Vnesite novo ¹irino besedila (ali 0 za izklop formatiranja): " +let g:menutrans_fileformat_dialog = "Izberite format datoteke" +let g:menutrans_fileformat_choices = "&Unix\n&Dos\n&Mac\n&Preklièi" +" }}} diff --git a/runtime/lang/menu_slovak_slovak_republic.1250.vim b/runtime/lang/menu_slovak_slovak_republic.1250.vim index 950aea94d..1df513de9 100644 --- a/runtime/lang/menu_slovak_slovak_republic.1250.vim +++ b/runtime/lang/menu_slovak_slovak_republic.1250.vim @@ -1,6 +1,6 @@ " Menu Translations: Slovak " Translated By: Martin Lacko -" Last Change: 2003 Mar 30 +" Last Change: 2006 Jun 17 " Quit when menu translations have already been done. if exists("did_menu_trans") diff --git a/runtime/plugin/README.txt b/runtime/plugin/README.txt index cb87ed9ec..37e22e57c 100644 --- a/runtime/plugin/README.txt +++ b/runtime/plugin/README.txt @@ -1,15 +1,19 @@ The plugin directory is for standard Vim plugin scripts. All files here ending in .vim will be sourced by Vim when it starts up. +Look in the file for hints on how it can be disabled without deleting it. -Standard plugins: -gzip.vim edit compressed files -netrw.vim edit files over a network and browse (remote) directories -rrhelper.vim used for --remote-wait editing -tar.vim edit (compressed) tar files -tohtml.vim convert a file with syntax highlighting to HTML -vimball.vim create and unpack .vba files +getscriptPlugin.vim get latest version of Vim scripts +gzip.vim edit compressed files +matchparen.vim highlight paren matching the one under the cursor +netrwPlugin.vim edit files over a network and browse (remote) directories +rrhelper.vim used for --remote-wait editing +spellfile.vim download a spellfile when it's missing +tarPlugin.vim edit (compressed) tar files +tohtml.vim convert a file with syntax highlighting to HTML +vimballPlugin.vim create and unpack .vba files +zipPlugin.vim edit zip archives Note: the explorer.vim plugin is no longer here, the netrw.vim plugin has -taken over browsing directories (also over ftp). +taken over browsing directories (also for remote directories). diff --git a/runtime/plugin/vimballPlugin.vim b/runtime/plugin/vimballPlugin.vim index 95c06c3ec..9b3b4d318 100644 --- a/runtime/plugin/vimballPlugin.vim +++ b/runtime/plugin/vimballPlugin.vim @@ -1,32 +1,36 @@ -" vimball : construct a file containing both paths and files +" vimballPlugin : construct a file containing both paths and files " Author: Charles E. Campbell, Jr. -" GetLatestVimScripts: 1502 1 :AutoInstall: vimball.vim " Copyright: (c) 2004-2006 by Charles E. Campbell, Jr. " The VIM LICENSE applies to Vimball.vim, and Vimball.txt " (see |copyright|) except use "Vimball" instead of "Vim". " No warranty, express or implied. " *** *** Use At-Your-Own-Risk! *** *** +" +" (Rom 2:1 WEB) Therefore you are without excuse, O man, whoever you are who +" judge. For in that which you judge another, you condemn yourself. For +" you who judge practice the same things. +" GetLatestVimScripts: 1502 1 :AutoInstall: vimball.vim " --------------------------------------------------------------------- " Load Once: {{{1 -if &cp || exists("g:loaded_vimball") || exists("g:loaded_vimballplugin") +if &cp || exists("g:loaded_vimballPlugin") finish endif -let g:loaded_vimballplugin= 1 - -let s:keepcpo= &cpo +let g:loaded_vimballPlugin = 1 +let s:keepcpo = &cpo set cpo&vim " ------------------------------------------------------------------------------ " Public Interface: {{{1 -com! -ra -na=+ -bang MkVimball call vimball#MkVimball(,,0,) -com! -na=0 UseVimball call vimball#Vimball(1) -com! -na=0 VimballList call vimball#Vimball(0) +com! -ra -complete=dir -na=+ -bang MkVimball call vimball#MkVimball(,,0,) +com! -na=? -complete=dir UseVimball call vimball#Vimball(1,) +com! -na=0 VimballList call vimball#Vimball(0) +com! -na=* -complete=dir RmVimball call vimball#RmVimball() au BufEnter *.vba.gz,*.vba.bz2,*.vba.zip call vimball#Decompress(expand("")) -au BufEnter *.vba call vimball#ShowMesg("Source this file to extract it! (:so %)") +au BufEnter *.vba set noma bt=nofile fmr=[[[,]]] fdm=marker|call vimball#ShowMesg(0,"Source this file to extract it! (:so %)") -let &cpo= s:keepcpo -unlet s:keepcpo " ===================================================================== -" Modelines: {{{1 +" Restoration And Modelines: {{{1 " vim: fdm=marker +let &cpo= s:keepcpo +unlet s:keepcpo diff --git a/runtime/plugin/zipPlugin.vim b/runtime/plugin/zipPlugin.vim index 20319a328..69e98bd66 100644 --- a/runtime/plugin/zipPlugin.vim +++ b/runtime/plugin/zipPlugin.vim @@ -1,9 +1,9 @@ " zipPlugin.vim: Handles browsing zipfiles " PLUGIN PORTION -" Date: Sep 14, 2005 -" Maintainer: Charles E Campbell, Jr +" Date: Jul 18, 2006 +" Maintainer: Charles E Campbell, Jr " License: Vim License (see vim's :help license) -" Copyright: Copyright (C) 2005 Charles E. Campbell, Jr. {{{1 +" Copyright: Copyright (C) 2005,2006 Charles E. Campbell, Jr. {{{1 " Permission is hereby granted to use and distribute this code, " with or without modifications, provided that this copyright " notice is copied with it. Like anything else that's free, @@ -12,10 +12,16 @@ " plugin, you agree that in no event will the copyright " holder be liable for any damages resulting from the use " of this software. - +" +" (James 4:8 WEB) Draw near to God, and he will draw near to you. +" Cleanse your hands, you sinners; and purify your hearts, you double-minded. " --------------------------------------------------------------------- -" Initialization: {{{1 -let s:keepcpo= &cpo +" Load Once: {{{1 +if &cp || exists("g:loaded_zipPlugin") + finish +endif +let g:loaded_zipPlugin = 1 +let s:keepcpo = &cpo set cpo&vim " --------------------------------------------------------------------- @@ -37,8 +43,8 @@ augroup zip au BufReadCmd *.zip call zip#Browse(expand("")) augroup END -" ------------------------------------------------------------------------ -" Modelines And Restoration: {{{1 +" --------------------------------------------------------------------- +" Restoration And Modelines: {{{1 +" vim: fdm=marker let &cpo= s:keepcpo unlet s:keepcpo -" vim:ts=8 fdm=marker diff --git a/runtime/spell/da/main.aap b/runtime/spell/da/main.aap index 65e1a2f7d..4c371b246 100644 --- a/runtime/spell/da/main.aap +++ b/runtime/spell/da/main.aap @@ -35,7 +35,7 @@ da_DK.aff da_DK.dic: {buildcheck=} :fetch da_DK.zip :sys $UNZIP da_DK.zip :delete da_DK.zip - :delete contributors COPYING Makefile da_DK.excluded + :delete COPYING Makefile da_DK.excluded @if not os.path.exists('da_DK.orig.aff'): :copy da_DK.aff da_DK.orig.aff @if not os.path.exists('da_DK.orig.dic'): diff --git a/runtime/spell/pl/main.aap b/runtime/spell/pl/main.aap index eb21c5e48..74cd1d58b 100644 --- a/runtime/spell/pl/main.aap +++ b/runtime/spell/pl/main.aap @@ -33,29 +33,19 @@ $SPELLDIR/pl.cp1250.spl : $FILES # # Fetching the files from # -HTTPDIR = http://www.kurnik.pl/slownik/ort/ +HTTPDIR = http://www.kurnik.pl/dictionary # The files don't depend on the .zip file so that we can delete it. # Only download the zip file if the targets don't exist. # This is a bit tricky, since the file name includes the date. pl_PL.aff pl_PL.dic: {buildcheck=} :assertpkg tar bunzip2 - @from time import strftime, gmtime, time - @for day in range(20): - date = `strftime('%Y%m%d', gmtime(time() - day * 24 * 60 * 60))` - base = alt-myspell-pl-$date - fname = $base.tar.bz2 - :attr {fetch = $HTTPDIR/%file%} $fname - @try: - :fetch $fname - ok = 1 - @except: - ok = 0 - @if ok: - @break + fname = alt-myspell-pl.tar.bz2 + :attr {fetch = $HTTPDIR/%file%} $fname + :fetch $fname :sys bunzip2 -c $fname | tar xf - - :move $base/* . - :deldir $base + :move alt-myspell-pl-20[0-9]*/* . + :deldir alt-myspell-pl-20[0-9]* :delete $fname @if not os.path.exists('pl_PL.orig.aff'): :copy pl_PL.aff pl_PL.orig.aff @@ -79,21 +69,11 @@ diff: check: :assertpkg tar bunzip2 diff - @from time import strftime, gmtime, time - @for day in range(20): - date = `strftime('%Y%m%d', gmtime(time() - day * 24 * 60 * 60))` - base = alt-myspell-pl-$date - fname = $base.tar.bz2 - :attr {fetch = $HTTPDIR/%file%} $fname - @try: - :fetch $fname - ok = 1 - @except: - ok = 0 - @if ok: - @break + fname = alt-myspell-pl.tar.bz2 + :attr {fetch = $HTTPDIR/%file%} $fname + :fetch $fname :sys bunzip2 -c $fname | tar xf - - :cd $base + :cd alt-myspell-pl-20[0-9]* @try: @import stat :sys $UNZIP ../pl_PL.zip diff --git a/runtime/spell/pt/pt_PT.diff b/runtime/spell/pt/pt_PT.diff index 653a2d2de..cb287d1e7 100644 --- a/runtime/spell/pt/pt_PT.diff +++ b/runtime/spell/pt/pt_PT.diff @@ -1,27 +1,35 @@ -*** pt_PT.orig.aff Wed Aug 31 20:05:16 2005 ---- pt_PT.aff Wed Aug 31 20:05:16 2005 +*** pt_PT.orig.aff Mon Apr 16 15:20:13 2007 +--- pt_PT.aff Mon Apr 16 15:52:13 2007 *************** *** 3,4 **** ---- 3,24 ---- +--- 3,7 ---- + FOL ßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿ + LOW ßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿ + UPP ßÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞÿ -+ -+ SOFOFROM abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþßÿÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞ¿ -+ SOFOTO ebctefghejklnnepkrstevvkesebctefghejklnnepkrstevvkeseeeeeeeceeeeeeeedneeeeeeeeeeepseeeeeeeeceeeeeeeedneeeeeeeeeeep? -+ -+ MIDWORD ' -+ -+ MAP 9 -+ MAP aàáâãäå -+ MAP eèéêë -+ MAP iìíîï -+ MAP oòóôõö -+ MAP uùúûü -+ MAP nñ -+ MAP cç -+ MAP yÿý -+ MAP sß -+ - PFX A Y 1 + +*************** +*** 1065,1078 **** + +! MAP 11 +! MAP aá +! MAP aã +! MAP aâ +! MAP eé +! MAP eê +! MAP ií + MAP cç +! MAP oó +! MAP oô +! MAP oõ +! MAP uú +! +--- 1068,1075 ---- + +! MAP 6 +! MAP aáãâAÁà+! MAP eéêEÉÊ +! MAP iíIÍ + MAP cç +! MAP oóõôOÓÕÔ +! MAP uúüUÚÜ diff --git a/runtime/synmenu.vim b/runtime/synmenu.vim index a2a28bfd7..06383188a 100644 --- a/runtime/synmenu.vim +++ b/runtime/synmenu.vim @@ -74,20 +74,25 @@ an 50.10.450 &Syntax.AB.ASN\.1 :cal SetSyn("asn") an 50.10.460 &Syntax.AB.Asterisk\ config :cal SetSyn("asterisk") an 50.10.470 &Syntax.AB.Asterisk\ voicemail\ config :cal SetSyn("asteriskvm") an 50.10.480 &Syntax.AB.Atlas :cal SetSyn("atlas") -an 50.10.490 &Syntax.AB.Automake :cal SetSyn("automake") -an 50.10.500 &Syntax.AB.Avenue :cal SetSyn("ave") -an 50.10.510 &Syntax.AB.Awk :cal SetSyn("awk") -an 50.10.520 &Syntax.AB.AYacc :cal SetSyn("ayacc") -an 50.10.540 &Syntax.AB.B :cal SetSyn("b") -an 50.10.550 &Syntax.AB.Baan :cal SetSyn("baan") -an 50.10.560 &Syntax.AB.BASIC :cal SetSyn("basic") -an 50.10.570 &Syntax.AB.BC\ calculator :cal SetSyn("bc") -an 50.10.580 &Syntax.AB.BDF\ font :cal SetSyn("bdf") -an 50.10.590 &Syntax.AB.BibTeX.Bibliography\ database :cal SetSyn("bib") -an 50.10.600 &Syntax.AB.BibTeX.Bibliography\ Style :cal SetSyn("bst") -an 50.10.610 &Syntax.AB.BIND.BIND\ config :cal SetSyn("named") -an 50.10.620 &Syntax.AB.BIND.BIND\ zone :cal SetSyn("bindzone") -an 50.10.630 &Syntax.AB.Blank :cal SetSyn("blank") +an 50.10.490 &Syntax.AB.AutoIt :cal SetSyn("autoit") +an 50.10.500 &Syntax.AB.Automake :cal SetSyn("automake") +an 50.10.510 &Syntax.AB.Avenue :cal SetSyn("ave") +an 50.10.520 &Syntax.AB.Awk :cal SetSyn("awk") +an 50.10.530 &Syntax.AB.AYacc :cal SetSyn("ayacc") +an 50.10.550 &Syntax.AB.B :cal SetSyn("b") +an 50.10.560 &Syntax.AB.Baan :cal SetSyn("baan") +an 50.10.570 &Syntax.AB.Basic.FreeBasic :cal SetSyn("freebasic") +an 50.10.580 &Syntax.AB.Basic.IBasic :cal SetSyn("ibasic") +an 50.10.590 &Syntax.AB.Basic.QBasic :cal SetSyn("basic") +an 50.10.600 &Syntax.AB.Basic.Visual\ Basic :cal SetSyn("vb") +an 50.10.610 &Syntax.AB.Bazaar\ commit\ file :cal SetSyn("bzr") +an 50.10.620 &Syntax.AB.BC\ calculator :cal SetSyn("bc") +an 50.10.630 &Syntax.AB.BDF\ font :cal SetSyn("bdf") +an 50.10.640 &Syntax.AB.BibTeX.Bibliography\ database :cal SetSyn("bib") +an 50.10.650 &Syntax.AB.BibTeX.Bibliography\ Style :cal SetSyn("bst") +an 50.10.660 &Syntax.AB.BIND.BIND\ config :cal SetSyn("named") +an 50.10.670 &Syntax.AB.BIND.BIND\ zone :cal SetSyn("bindzone") +an 50.10.680 &Syntax.AB.Blank :cal SetSyn("blank") an 50.20.100 &Syntax.C.C :cal SetSyn("c") an 50.20.110 &Syntax.C.C++ :cal SetSyn("cpp") an 50.20.120 &Syntax.C.C# :cal SetSyn("cs") @@ -107,11 +112,11 @@ an 50.20.250 &Syntax.C.Clean :cal SetSyn("clean") an 50.20.260 &Syntax.C.Clever :cal SetSyn("cl") an 50.20.270 &Syntax.C.Clipper :cal SetSyn("clipper") an 50.20.280 &Syntax.C.Cmake :cal SetSyn("cmake") -an 50.20.290 &Syntax.C.Cold\ Fusion :cal SetSyn("cf") -an 50.20.300 &Syntax.C.Config.Cfg\ Config\ file :cal SetSyn("cfg") -an 50.20.310 &Syntax.C.Config.Generic\ Config\ file :cal SetSyn("conf") -an 50.20.320 &Syntax.C.Config.Configure\.in :cal SetSyn("config") -an 50.20.330 &Syntax.C.ConTeXt :cal SetSyn("context") +an 50.20.290 &Syntax.C.Cmusrc :cal SetSyn("cmusrc") +an 50.20.300 &Syntax.C.Cold\ Fusion :cal SetSyn("cf") +an 50.20.310 &Syntax.C.Config.Cfg\ Config\ file :cal SetSyn("cfg") +an 50.20.320 &Syntax.C.Config.Generic\ Config\ file :cal SetSyn("conf") +an 50.20.330 &Syntax.C.Config.Configure\.in :cal SetSyn("config") an 50.20.340 &Syntax.C.CRM114 :cal SetSyn("crm") an 50.20.350 &Syntax.C.Ctrl-H :cal SetSyn("ctrlh") an 50.20.360 &Syntax.C.Cobol :cal SetSyn("cobol") @@ -189,46 +194,48 @@ an 50.40.340 &Syntax.FG.Gretl :cal SetSyn("gretl") an 50.40.350 &Syntax.FG.Groff :cal SetSyn("groff") an 50.40.360 &Syntax.FG.Groovy :cal SetSyn("groovy") an 50.40.370 &Syntax.FG.GTKrc :cal SetSyn("gtkrc") -an 50.50.100 &Syntax.HIJK.Haskell.Haskell :cal SetSyn("haskell") -an 50.50.110 &Syntax.HIJK.Haskell.Haskell-c2hs :cal SetSyn("chaskell") -an 50.50.120 &Syntax.HIJK.Haskell.Haskell-literate :cal SetSyn("lhaskell") -an 50.50.130 &Syntax.HIJK.Hercules :cal SetSyn("hercules") -an 50.50.140 &Syntax.HIJK.Hex\ dump.XXD :cal SetSyn("xxd") -an 50.50.150 &Syntax.HIJK.Hex\ dump.Intel\ MCS51 :cal SetSyn("hex") -an 50.50.160 &Syntax.HIJK.HTML.HTML :cal SetSyn("html") -an 50.50.170 &Syntax.HIJK.HTML.HTML\ with\ M4 :cal SetSyn("htmlm4") -an 50.50.180 &Syntax.HIJK.HTML.HTML\ with\ Ruby\ (eRuby) :cal SetSyn("eruby") -an 50.50.190 &Syntax.HIJK.HTML.Cheetah\ HTML\ template :cal SetSyn("htmlcheetah") -an 50.50.200 &Syntax.HIJK.HTML.Django\ HTML\ template :cal SetSyn("htmldjango") -an 50.50.210 &Syntax.HIJK.HTML.HTML/OS :cal SetSyn("htmlos") -an 50.50.220 &Syntax.HIJK.HTML.XHTML :cal SetSyn("xhtml") -an 50.50.230 &Syntax.HIJK.Hyper\ Builder :cal SetSyn("hb") -an 50.50.250 &Syntax.HIJK.Icewm\ menu :cal SetSyn("icemenu") -an 50.50.260 &Syntax.HIJK.Icon :cal SetSyn("icon") -an 50.50.270 &Syntax.HIJK.IDL\Generic\ IDL :cal SetSyn("idl") -an 50.50.280 &Syntax.HIJK.IDL\Microsoft\ IDL :cal SetSyn("msidl") -an 50.50.290 &Syntax.HIJK.Indent\ profile :cal SetSyn("indent") -an 50.50.300 &Syntax.HIJK.Inform :cal SetSyn("inform") -an 50.50.310 &Syntax.HIJK.Informix\ 4GL :cal SetSyn("fgl") -an 50.50.320 &Syntax.HIJK.Inittab :cal SetSyn("inittab") -an 50.50.330 &Syntax.HIJK.Inno\ setup :cal SetSyn("iss") -an 50.50.340 &Syntax.HIJK.InstallShield\ script :cal SetSyn("ishd") -an 50.50.350 &Syntax.HIJK.Interactive\ Data\ Lang :cal SetSyn("idlang") -an 50.50.360 &Syntax.HIJK.IPfilter :cal SetSyn("ipfilter") -an 50.50.380 &Syntax.HIJK.JAL :cal SetSyn("jal") -an 50.50.390 &Syntax.HIJK.JAM :cal SetSyn("jam") -an 50.50.400 &Syntax.HIJK.Jargon :cal SetSyn("jargon") -an 50.50.410 &Syntax.HIJK.Java.Java :cal SetSyn("java") -an 50.50.420 &Syntax.HIJK.Java.JavaCC :cal SetSyn("javacc") -an 50.50.430 &Syntax.HIJK.Java.Java\ Server\ Pages :cal SetSyn("jsp") -an 50.50.440 &Syntax.HIJK.Java.Java\ Properties :cal SetSyn("jproperties") -an 50.50.450 &Syntax.HIJK.JavaScript :cal SetSyn("javascript") -an 50.50.460 &Syntax.HIJK.Jess :cal SetSyn("jess") -an 50.50.470 &Syntax.HIJK.Jgraph :cal SetSyn("jgraph") -an 50.50.490 &Syntax.HIJK.Kconfig :cal SetSyn("kconfig") -an 50.50.500 &Syntax.HIJK.KDE\ script :cal SetSyn("kscript") -an 50.50.510 &Syntax.HIJK.Kimwitu++ :cal SetSyn("kwt") -an 50.50.520 &Syntax.HIJK.KixTart :cal SetSyn("kix") +an 50.50.100 &Syntax.HIJK.Hamster :cal SetSyn("hamster") +an 50.50.110 &Syntax.HIJK.Haskell.Haskell :cal SetSyn("haskell") +an 50.50.120 &Syntax.HIJK.Haskell.Haskell-c2hs :cal SetSyn("chaskell") +an 50.50.130 &Syntax.HIJK.Haskell.Haskell-literate :cal SetSyn("lhaskell") +an 50.50.140 &Syntax.HIJK.Hercules :cal SetSyn("hercules") +an 50.50.150 &Syntax.HIJK.Hex\ dump.XXD :cal SetSyn("xxd") +an 50.50.160 &Syntax.HIJK.Hex\ dump.Intel\ MCS51 :cal SetSyn("hex") +an 50.50.170 &Syntax.HIJK.HTML.HTML :cal SetSyn("html") +an 50.50.180 &Syntax.HIJK.HTML.HTML\ with\ M4 :cal SetSyn("htmlm4") +an 50.50.190 &Syntax.HIJK.HTML.HTML\ with\ Ruby\ (eRuby) :cal SetSyn("eruby") +an 50.50.200 &Syntax.HIJK.HTML.Cheetah\ HTML\ template :cal SetSyn("htmlcheetah") +an 50.50.210 &Syntax.HIJK.HTML.Django\ HTML\ template :cal SetSyn("htmldjango") +an 50.50.220 &Syntax.HIJK.HTML.HTML/OS :cal SetSyn("htmlos") +an 50.50.230 &Syntax.HIJK.HTML.XHTML :cal SetSyn("xhtml") +an 50.50.240 &Syntax.HIJK.Hyper\ Builder :cal SetSyn("hb") +an 50.50.260 &Syntax.HIJK.Icewm\ menu :cal SetSyn("icemenu") +an 50.50.270 &Syntax.HIJK.Icon :cal SetSyn("icon") +an 50.50.280 &Syntax.HIJK.IDL\Generic\ IDL :cal SetSyn("idl") +an 50.50.290 &Syntax.HIJK.IDL\Microsoft\ IDL :cal SetSyn("msidl") +an 50.50.300 &Syntax.HIJK.Indent\ profile :cal SetSyn("indent") +an 50.50.310 &Syntax.HIJK.Inform :cal SetSyn("inform") +an 50.50.320 &Syntax.HIJK.Informix\ 4GL :cal SetSyn("fgl") +an 50.50.330 &Syntax.HIJK.Initng :cal SetSyn("initng") +an 50.50.340 &Syntax.HIJK.Inittab :cal SetSyn("inittab") +an 50.50.350 &Syntax.HIJK.Inno\ setup :cal SetSyn("iss") +an 50.50.360 &Syntax.HIJK.InstallShield\ script :cal SetSyn("ishd") +an 50.50.370 &Syntax.HIJK.Interactive\ Data\ Lang :cal SetSyn("idlang") +an 50.50.380 &Syntax.HIJK.IPfilter :cal SetSyn("ipfilter") +an 50.50.400 &Syntax.HIJK.JAL :cal SetSyn("jal") +an 50.50.410 &Syntax.HIJK.JAM :cal SetSyn("jam") +an 50.50.420 &Syntax.HIJK.Jargon :cal SetSyn("jargon") +an 50.50.430 &Syntax.HIJK.Java.Java :cal SetSyn("java") +an 50.50.440 &Syntax.HIJK.Java.JavaCC :cal SetSyn("javacc") +an 50.50.450 &Syntax.HIJK.Java.Java\ Server\ Pages :cal SetSyn("jsp") +an 50.50.460 &Syntax.HIJK.Java.Java\ Properties :cal SetSyn("jproperties") +an 50.50.470 &Syntax.HIJK.JavaScript :cal SetSyn("javascript") +an 50.50.480 &Syntax.HIJK.Jess :cal SetSyn("jess") +an 50.50.490 &Syntax.HIJK.Jgraph :cal SetSyn("jgraph") +an 50.50.510 &Syntax.HIJK.Kconfig :cal SetSyn("kconfig") +an 50.50.520 &Syntax.HIJK.KDE\ script :cal SetSyn("kscript") +an 50.50.530 &Syntax.HIJK.Kimwitu++ :cal SetSyn("kwt") +an 50.50.540 &Syntax.HIJK.KixTart :cal SetSyn("kix") an 50.60.100 &Syntax.L-Ma.Lace :cal SetSyn("lace") an 50.60.110 &Syntax.L-Ma.LamdaProlog :cal SetSyn("lprolog") an 50.60.120 &Syntax.L-Ma.Latte :cal SetSyn("latte") @@ -268,45 +275,46 @@ an 50.60.460 &Syntax.L-Ma.Mathematica :cal SetSyn("mma") an 50.60.470 &Syntax.L-Ma.Matlab :cal SetSyn("matlab") an 50.60.480 &Syntax.L-Ma.Maxima :cal SetSyn("maxima") an 50.70.100 &Syntax.Me-NO.MEL\ (for\ Maya) :cal SetSyn("mel") -an 50.70.110 &Syntax.Me-NO.Metafont :cal SetSyn("mf") -an 50.70.120 &Syntax.Me-NO.MetaPost :cal SetSyn("mp") -an 50.70.130 &Syntax.Me-NO.MGL :cal SetSyn("mgl") -an 50.70.140 &Syntax.Me-NO.MMIX :cal SetSyn("mmix") -an 50.70.150 &Syntax.Me-NO.Modconf :cal SetSyn("modconf") -an 50.70.160 &Syntax.Me-NO.Model :cal SetSyn("model") -an 50.70.170 &Syntax.Me-NO.Modsim\ III :cal SetSyn("modsim3") -an 50.70.180 &Syntax.Me-NO.Modula\ 2 :cal SetSyn("modula2") -an 50.70.190 &Syntax.Me-NO.Modula\ 3 :cal SetSyn("modula3") -an 50.70.200 &Syntax.Me-NO.Monk :cal SetSyn("monk") -an 50.70.210 &Syntax.Me-NO.Mplayer\ config :cal SetSyn("mplayerconf") -an 50.70.220 &Syntax.Me-NO.MOO :cal SetSyn("moo") -an 50.70.230 &Syntax.Me-NO.Mrxvtrc :cal SetSyn("mrxvtrc") -an 50.70.240 &Syntax.Me-NO.MS-DOS/Windows.4DOS\ \.bat\ file :cal SetSyn("btm") -an 50.70.250 &Syntax.Me-NO.MS-DOS/Windows.\.bat\/\.cmd\ file :cal SetSyn("dosbatch") -an 50.70.260 &Syntax.Me-NO.MS-DOS/Windows.\.ini\ file :cal SetSyn("dosini") -an 50.70.270 &Syntax.Me-NO.MS-DOS/Windows.Module\ Definition :cal SetSyn("def") -an 50.70.280 &Syntax.Me-NO.MS-DOS/Windows.Registry :cal SetSyn("registry") -an 50.70.290 &Syntax.Me-NO.MS-DOS/Windows.Resource\ file :cal SetSyn("rc") -an 50.70.300 &Syntax.Me-NO.Msql :cal SetSyn("msql") -an 50.70.310 &Syntax.Me-NO.MuPAD :cal SetSyn("mupad") -an 50.70.320 &Syntax.Me-NO.MUSHcode :cal SetSyn("mush") -an 50.70.330 &Syntax.Me-NO.Muttrc :cal SetSyn("muttrc") -an 50.70.350 &Syntax.Me-NO.Nanorc :cal SetSyn("nanorc") -an 50.70.360 &Syntax.Me-NO.Nastran\ input/DMAP :cal SetSyn("nastran") -an 50.70.370 &Syntax.Me-NO.Natural :cal SetSyn("natural") -an 50.70.380 &Syntax.Me-NO.Netrc :cal SetSyn("netrc") -an 50.70.390 &Syntax.Me-NO.Novell\ NCF\ batch :cal SetSyn("ncf") -an 50.70.400 &Syntax.Me-NO.Not\ Quite\ C\ (LEGO) :cal SetSyn("nqc") -an 50.70.410 &Syntax.Me-NO.Nroff :cal SetSyn("nroff") -an 50.70.420 &Syntax.Me-NO.NSIS\ script :cal SetSyn("nsis") -an 50.70.440 &Syntax.Me-NO.Objective\ C :cal SetSyn("objc") -an 50.70.450 &Syntax.Me-NO.Objective\ C++ :cal SetSyn("objcpp") -an 50.70.460 &Syntax.Me-NO.OCAML :cal SetSyn("ocaml") -an 50.70.470 &Syntax.Me-NO.Occam :cal SetSyn("occam") -an 50.70.480 &Syntax.Me-NO.Omnimark :cal SetSyn("omnimark") -an 50.70.490 &Syntax.Me-NO.OpenROAD :cal SetSyn("openroad") -an 50.70.500 &Syntax.Me-NO.Open\ Psion\ Lang :cal SetSyn("opl") -an 50.70.510 &Syntax.Me-NO.Oracle\ config :cal SetSyn("ora") +an 50.70.110 &Syntax.Me-NO.Messages\ (/var/log) :cal SetSyn("messages") +an 50.70.120 &Syntax.Me-NO.Metafont :cal SetSyn("mf") +an 50.70.130 &Syntax.Me-NO.MetaPost :cal SetSyn("mp") +an 50.70.140 &Syntax.Me-NO.MGL :cal SetSyn("mgl") +an 50.70.150 &Syntax.Me-NO.MMIX :cal SetSyn("mmix") +an 50.70.160 &Syntax.Me-NO.Modconf :cal SetSyn("modconf") +an 50.70.170 &Syntax.Me-NO.Model :cal SetSyn("model") +an 50.70.180 &Syntax.Me-NO.Modsim\ III :cal SetSyn("modsim3") +an 50.70.190 &Syntax.Me-NO.Modula\ 2 :cal SetSyn("modula2") +an 50.70.200 &Syntax.Me-NO.Modula\ 3 :cal SetSyn("modula3") +an 50.70.210 &Syntax.Me-NO.Monk :cal SetSyn("monk") +an 50.70.220 &Syntax.Me-NO.Mplayer\ config :cal SetSyn("mplayerconf") +an 50.70.230 &Syntax.Me-NO.MOO :cal SetSyn("moo") +an 50.70.240 &Syntax.Me-NO.Mrxvtrc :cal SetSyn("mrxvtrc") +an 50.70.250 &Syntax.Me-NO.MS-DOS/Windows.4DOS\ \.bat\ file :cal SetSyn("btm") +an 50.70.260 &Syntax.Me-NO.MS-DOS/Windows.\.bat\/\.cmd\ file :cal SetSyn("dosbatch") +an 50.70.270 &Syntax.Me-NO.MS-DOS/Windows.\.ini\ file :cal SetSyn("dosini") +an 50.70.280 &Syntax.Me-NO.MS-DOS/Windows.Module\ Definition :cal SetSyn("def") +an 50.70.290 &Syntax.Me-NO.MS-DOS/Windows.Registry :cal SetSyn("registry") +an 50.70.300 &Syntax.Me-NO.MS-DOS/Windows.Resource\ file :cal SetSyn("rc") +an 50.70.310 &Syntax.Me-NO.Msql :cal SetSyn("msql") +an 50.70.320 &Syntax.Me-NO.MuPAD :cal SetSyn("mupad") +an 50.70.330 &Syntax.Me-NO.MUSHcode :cal SetSyn("mush") +an 50.70.340 &Syntax.Me-NO.Muttrc :cal SetSyn("muttrc") +an 50.70.360 &Syntax.Me-NO.Nanorc :cal SetSyn("nanorc") +an 50.70.370 &Syntax.Me-NO.Nastran\ input/DMAP :cal SetSyn("nastran") +an 50.70.380 &Syntax.Me-NO.Natural :cal SetSyn("natural") +an 50.70.390 &Syntax.Me-NO.Netrc :cal SetSyn("netrc") +an 50.70.400 &Syntax.Me-NO.Novell\ NCF\ batch :cal SetSyn("ncf") +an 50.70.410 &Syntax.Me-NO.Not\ Quite\ C\ (LEGO) :cal SetSyn("nqc") +an 50.70.420 &Syntax.Me-NO.Nroff :cal SetSyn("nroff") +an 50.70.430 &Syntax.Me-NO.NSIS\ script :cal SetSyn("nsis") +an 50.70.450 &Syntax.Me-NO.Objective\ C :cal SetSyn("objc") +an 50.70.460 &Syntax.Me-NO.Objective\ C++ :cal SetSyn("objcpp") +an 50.70.470 &Syntax.Me-NO.OCAML :cal SetSyn("ocaml") +an 50.70.480 &Syntax.Me-NO.Occam :cal SetSyn("occam") +an 50.70.490 &Syntax.Me-NO.Omnimark :cal SetSyn("omnimark") +an 50.70.500 &Syntax.Me-NO.OpenROAD :cal SetSyn("openroad") +an 50.70.510 &Syntax.Me-NO.Open\ Psion\ Lang :cal SetSyn("opl") +an 50.70.520 &Syntax.Me-NO.Oracle\ config :cal SetSyn("ora") an 50.80.100 &Syntax.PQ.Packet\ filter\ conf :cal SetSyn("pf") an 50.80.110 &Syntax.PQ.Palm\ resource\ compiler :cal SetSyn("pilrc") an 50.80.120 &Syntax.PQ.Pam\ config :cal SetSyn("pamconf") @@ -334,16 +342,17 @@ an 50.80.330 &Syntax.PQ.Povray.Povray\ scene\ descr :cal SetSyn("pov") an 50.80.340 &Syntax.PQ.Povray.Povray\ configuration :cal SetSyn("povini") an 50.80.350 &Syntax.PQ.Prescribe\ (Kyocera) :cal SetSyn("prescribe") an 50.80.360 &Syntax.PQ.Printcap :cal SetSyn("pcap") -an 50.80.370 &Syntax.PQ.Procmail :cal SetSyn("procmail") -an 50.80.380 &Syntax.PQ.Product\ Spec\ File :cal SetSyn("psf") -an 50.80.390 &Syntax.PQ.Progress :cal SetSyn("progress") -an 50.80.400 &Syntax.PQ.Prolog :cal SetSyn("prolog") -an 50.80.410 &Syntax.PQ.Protocols :cal SetSyn("protocols") -an 50.80.420 &Syntax.PQ.Purify\ log :cal SetSyn("purifylog") -an 50.80.430 &Syntax.PQ.Pyrex :cal SetSyn("pyrex") -an 50.80.440 &Syntax.PQ.Python :cal SetSyn("python") -an 50.80.460 &Syntax.PQ.Quake :cal SetSyn("quake") -an 50.80.470 &Syntax.PQ.Quickfix\ window :cal SetSyn("qf") +an 50.80.370 &Syntax.PQ.Privoxy :cal SetSyn("privoxy") +an 50.80.380 &Syntax.PQ.Procmail :cal SetSyn("procmail") +an 50.80.390 &Syntax.PQ.Product\ Spec\ File :cal SetSyn("psf") +an 50.80.400 &Syntax.PQ.Progress :cal SetSyn("progress") +an 50.80.410 &Syntax.PQ.Prolog :cal SetSyn("prolog") +an 50.80.420 &Syntax.PQ.Protocols :cal SetSyn("protocols") +an 50.80.430 &Syntax.PQ.Purify\ log :cal SetSyn("purifylog") +an 50.80.440 &Syntax.PQ.Pyrex :cal SetSyn("pyrex") +an 50.80.450 &Syntax.PQ.Python :cal SetSyn("python") +an 50.80.470 &Syntax.PQ.Quake :cal SetSyn("quake") +an 50.80.480 &Syntax.PQ.Quickfix\ window :cal SetSyn("qf") an 50.90.100 &Syntax.R-Sg.R.R :cal SetSyn("r") an 50.90.110 &Syntax.R-Sg.R.R\ help :cal SetSyn("rhelp") an 50.90.120 &Syntax.R-Sg.R.R\ noweb :cal SetSyn("rnoweb") @@ -438,9 +447,10 @@ an 50.100.560 &Syntax.Sh-S.Stata.SMCL :cal SetSyn("smcl") an 50.100.570 &Syntax.Sh-S.Stata.Stata :cal SetSyn("stata") an 50.100.580 &Syntax.Sh-S.Stored\ Procedures :cal SetSyn("stp") an 50.100.590 &Syntax.Sh-S.Strace :cal SetSyn("strace") -an 50.100.600 &Syntax.Sh-S.Subversion\ commit :cal SetSyn("svn") -an 50.100.610 &Syntax.Sh-S.Sudoers :cal SetSyn("sudoers") -an 50.100.620 &Syntax.Sh-S.Sysctl\.conf :cal SetSyn("sysctl") +an 50.100.600 &Syntax.Sh-S.Streaming\ descriptor\ file :cal SetSyn("sd") +an 50.100.610 &Syntax.Sh-S.Subversion\ commit :cal SetSyn("svn") +an 50.100.620 &Syntax.Sh-S.Sudoers :cal SetSyn("sudoers") +an 50.100.630 &Syntax.Sh-S.Sysctl\.conf :cal SetSyn("sysctl") an 50.110.100 &Syntax.TUV.TADS :cal SetSyn("tads") an 50.110.110 &Syntax.TUV.Tags :cal SetSyn("tags") an 50.110.120 &Syntax.TUV.TAK.TAK\ compare :cal SetSyn("takcmp") @@ -451,37 +461,39 @@ an 50.110.160 &Syntax.TUV.TealInfo :cal SetSyn("tli") an 50.110.170 &Syntax.TUV.Telix\ Salt :cal SetSyn("tsalt") an 50.110.180 &Syntax.TUV.Termcap/Printcap :cal SetSyn("ptcap") an 50.110.190 &Syntax.TUV.Terminfo :cal SetSyn("terminfo") -an 50.110.200 &Syntax.TUV.TeX.TeX :cal SetSyn("tex") -an 50.110.210 &Syntax.TUV.TeX.TeX\ configuration :cal SetSyn("texmf") -an 50.110.220 &Syntax.TUV.TeX.Texinfo :cal SetSyn("texinfo") -an 50.110.230 &Syntax.TUV.TF\ mud\ client :cal SetSyn("tf") -an 50.110.240 &Syntax.TUV.Tidy\ configuration :cal SetSyn("tidy") -an 50.110.250 &Syntax.TUV.Tilde :cal SetSyn("tilde") -an 50.110.260 &Syntax.TUV.TPP :cal SetSyn("tpp") -an 50.110.270 &Syntax.TUV.Trasys\ input :cal SetSyn("trasys") -an 50.110.280 &Syntax.TUV.Trustees :cal SetSyn("trustees") -an 50.110.290 &Syntax.TUV.TSS.Command\ Line :cal SetSyn("tsscl") -an 50.110.300 &Syntax.TUV.TSS.Geometry :cal SetSyn("tssgm") -an 50.110.310 &Syntax.TUV.TSS.Optics :cal SetSyn("tssop") -an 50.110.330 &Syntax.TUV.Udev\ config :cal SetSyn("udevconf") -an 50.110.340 &Syntax.TUV.Udev\ permissions :cal SetSyn("udevperm") -an 50.110.350 &Syntax.TUV.Udev\ rules :cal SetSyn("udevrules") -an 50.110.360 &Syntax.TUV.UIT/UIL :cal SetSyn("uil") -an 50.110.370 &Syntax.TUV.UnrealScript :cal SetSyn("uc") -an 50.110.380 &Syntax.TUV.Updatedb\.conf :cal SetSyn("updatedb") -an 50.110.400 &Syntax.TUV.Valgrind :cal SetSyn("valgrind") -an 50.110.410 &Syntax.TUV.Vera :cal SetSyn("vera") -an 50.110.420 &Syntax.TUV.Verilog-AMS\ HDL :cal SetSyn("verilogams") -an 50.110.430 &Syntax.TUV.Verilog\ HDL :cal SetSyn("verilog") -an 50.110.440 &Syntax.TUV.Vgrindefs :cal SetSyn("vgrindefs") -an 50.110.450 &Syntax.TUV.VHDL :cal SetSyn("vhdl") -an 50.110.460 &Syntax.TUV.Vim.Vim\ help\ file :cal SetSyn("help") -an 50.110.470 &Syntax.TUV.Vim.Vim\ script :cal SetSyn("vim") -an 50.110.480 &Syntax.TUV.Vim.Viminfo\ file :cal SetSyn("viminfo") -an 50.110.490 &Syntax.TUV.Virata\ config :cal SetSyn("virata") -an 50.110.500 &Syntax.TUV.Visual\ Basic :cal SetSyn("vb") -an 50.110.510 &Syntax.TUV.VRML :cal SetSyn("vrml") -an 50.110.520 &Syntax.TUV.VSE\ JCL :cal SetSyn("vsejcl") +an 50.110.200 &Syntax.TUV.TeX.TeX/LaTeX :cal SetSyn("tex") +an 50.110.210 &Syntax.TUV.TeX.plain\ TeX :cal SetSyn("plaintex") +an 50.110.220 &Syntax.TUV.TeX.ConTeXt :cal SetSyn("context") +an 50.110.230 &Syntax.TUV.TeX.TeX\ configuration :cal SetSyn("texmf") +an 50.110.240 &Syntax.TUV.TeX.Texinfo :cal SetSyn("texinfo") +an 50.110.250 &Syntax.TUV.TF\ mud\ client :cal SetSyn("tf") +an 50.110.260 &Syntax.TUV.Tidy\ configuration :cal SetSyn("tidy") +an 50.110.270 &Syntax.TUV.Tilde :cal SetSyn("tilde") +an 50.110.280 &Syntax.TUV.TPP :cal SetSyn("tpp") +an 50.110.290 &Syntax.TUV.Trasys\ input :cal SetSyn("trasys") +an 50.110.300 &Syntax.TUV.Trustees :cal SetSyn("trustees") +an 50.110.310 &Syntax.TUV.TSS.Command\ Line :cal SetSyn("tsscl") +an 50.110.320 &Syntax.TUV.TSS.Geometry :cal SetSyn("tssgm") +an 50.110.330 &Syntax.TUV.TSS.Optics :cal SetSyn("tssop") +an 50.110.350 &Syntax.TUV.Udev\ config :cal SetSyn("udevconf") +an 50.110.360 &Syntax.TUV.Udev\ permissions :cal SetSyn("udevperm") +an 50.110.370 &Syntax.TUV.Udev\ rules :cal SetSyn("udevrules") +an 50.110.380 &Syntax.TUV.UIT/UIL :cal SetSyn("uil") +an 50.110.390 &Syntax.TUV.UnrealScript :cal SetSyn("uc") +an 50.110.400 &Syntax.TUV.Updatedb\.conf :cal SetSyn("updatedb") +an 50.110.420 &Syntax.TUV.Valgrind :cal SetSyn("valgrind") +an 50.110.430 &Syntax.TUV.Vera :cal SetSyn("vera") +an 50.110.440 &Syntax.TUV.Verilog-AMS\ HDL :cal SetSyn("verilogams") +an 50.110.450 &Syntax.TUV.Verilog\ HDL :cal SetSyn("verilog") +an 50.110.460 &Syntax.TUV.Vgrindefs :cal SetSyn("vgrindefs") +an 50.110.470 &Syntax.TUV.VHDL :cal SetSyn("vhdl") +an 50.110.480 &Syntax.TUV.Vim.Vim\ help\ file :cal SetSyn("help") +an 50.110.490 &Syntax.TUV.Vim.Vim\ script :cal SetSyn("vim") +an 50.110.500 &Syntax.TUV.Vim.Viminfo\ file :cal SetSyn("viminfo") +an 50.110.510 &Syntax.TUV.Virata\ config :cal SetSyn("virata") +an 50.110.520 &Syntax.TUV.Visual\ Basic :cal SetSyn("vb") +an 50.110.530 &Syntax.TUV.VRML :cal SetSyn("vrml") +an 50.110.540 &Syntax.TUV.VSE\ JCL :cal SetSyn("vsejcl") an 50.120.100 &Syntax.WXYZ.WEB.CWEB :cal SetSyn("cweb") an 50.120.110 &Syntax.WXYZ.WEB.WEB :cal SetSyn("web") an 50.120.120 &Syntax.WXYZ.WEB.WEB\ Changes :cal SetSyn("change") diff --git a/runtime/syntax/amiga.vim b/runtime/syntax/amiga.vim index d35f0561c..e70f995f6 100644 --- a/runtime/syntax/amiga.vim +++ b/runtime/syntax/amiga.vim @@ -1,8 +1,8 @@ " Vim syntax file " Language: AmigaDos " Maintainer: Dr. Charles E. Campbell, Jr. -" Last Change: Sep 06, 2005 -" Version: 5 +" Last Change: Sep 11, 2006 +" Version: 6 " URL: http://mysite.verizon.net/astronaut/vim/index.html#vimlinks_syntax " For version 5.x: Clear all syntax items @@ -23,7 +23,7 @@ syn match amiAlias "\<[a-zA-Z][a-zA-Z0-9]\+:" syn match amiAlias "\<[a-zA-Z][a-zA-Z0-9]\+:[a-zA-Z0-9/]*/" " strings -syn region amiString start=+"+ end=+"+ oneline +syn region amiString start=+"+ end=+"+ oneline contains=@Spell " numbers syn match amiNumber "\<\d\+\>" diff --git a/runtime/syntax/aspvbs.vim b/runtime/syntax/aspvbs.vim index 74bf2a15e..e73d67491 100644 --- a/runtime/syntax/aspvbs.vim +++ b/runtime/syntax/aspvbs.vim @@ -2,7 +2,8 @@ " Language: Microsoft VBScript Web Content (ASP) " Maintainer: Devin Weaver (non-functional) " URL: http://tritarget.com/pub/vim/syntax/aspvbs.vim (broken) -" Last Change: 2004 Jul 29 +" Last Change: 2006 Jun 19 +" by Dan Casey " Version: $Revision$ " Thanks to Jay-Jay for a syntax sync hack, hungarian " notation, and extra highlighting. @@ -35,7 +36,7 @@ syn cluster htmlPreProc add=AspVBScriptInsideHtmlTags hi def AspVBSVariableSimple term=standout ctermfg=3 guifg=#99ee99 hi def AspVBSVariableComplex term=standout ctermfg=3 guifg=#ee9900 syn match AspVBSVariableSimple contained "\<\(bln\|byt\|dtm\=\|dbl\|int\|str\)\u\w*" -syn match AspVBSVariableComplex contained "\<\(arr\|obj\)\u\w*" +syn match AspVBSVariableComplex contained "\<\(arr\|ary\|obj\)\u\w*" " Functions and methods that are in VB but will cause errors in an ASP page @@ -67,8 +68,9 @@ syn match AspVBSError contained "Respose\.\S*" " AspVBScript Reserved Words. syn match AspVBSStatement contained "\\|\" -syn match AspVBSStatement contained "\" +syn match AspVBSStatement contained "\" syn match AspVBSStatement contained "\" +syn match AspVBSStatement contained "\" syn match AspVBSStatement contained "\" syn match AspVBSStatement contained "\\|\" syn match AspVBSStatement contained "\" diff --git a/runtime/syntax/autoit.vim b/runtime/syntax/autoit.vim new file mode 100644 index 000000000..47210f55b --- /dev/null +++ b/runtime/syntax/autoit.vim @@ -0,0 +1,1111 @@ +" Vim syntax file +" +" Language: AutoIt v3 (http://www.autoitscript.com/autoit3/) +" Maintainer: Jared Breland +" Authored By: Riccardo Casini +" Script URL: http://www.vim.org/scripts/script.php?script_id=1239 +" ChangeLog: Please visit the script URL for detailed change information + +" AutoIt is not case dependent +syn case ignore + +" Definitions for AutoIt reserved keywords +syn keyword autoitKeyword Default False True +syn keyword autoitKeyword Const Dim Global Local ReDim +syn keyword autoitKeyword If Else ElseIf Then EndIf +syn keyword autoitKeyword Select Switch Case EndSelect EndSwitch +syn keyword autoitKeyword Enum For In To Step Next +syn keyword autoitKeyword With While EndWith Wend Do Until +syn keyword autoitKeyword ContinueCase ContinueLoop ExitLoop Exit + +" inside script inclusion and global options +syn match autoitIncluded display contained "<[^>]*>" +syn match autoitInclude display "^\s*#\s*include\>\s*["<]" + \ contains=autoitIncluded,autoitString +syn match autoitInclude "^\s*#include-once\>" +syn match autoitInclude "^\s*#NoTrayIcon\>" +syn match autoitInclude "^\s*#RequireAdmin\>" + +" user-defined functions +syn keyword autoitKeyword Func ByRef EndFunc Return OnAutoItStart OnAutoItExit + +" built-in functions +" environment management +syn keyword autoitFunction ClipGet ClipPut EnvGet EnvSet EnvUpdate MemGetStats +" file, directory, and disk management +syn keyword autoitFunction ConsoleRead ConsoleWrite ConsoleWriteError +syn keyword autoitFunction DirCopy DirCreate DirGetSize DirMove DirRemove +syn keyword autoitFunction DriveGetDrive DriveGetFileSystem DriveGetLabel + \ DriveGetSerial DriveGetType DriveMapAdd DriveMapDel DriveMapGet + \ DriveSetLabel DriveSpaceFree DriveSpaceTotal DriveStatus +syn keyword autoitFunction FileChangeDir FileClose FileCopy FileCreateNTFSLink + \ FileCreateShortcut FileDelete FileExists FileFindFirstFile + \ FileFindNextFile FileGetAttrib FileGetLongName FileGetShortcut + \ FileGetShortName FileGetSize FileGetTime FileGetVersion FileInstall + \ FileMove FileOpen FileOpenDialog FileRead FileReadLine FileRecycle + \ FileRecycleEmpty FileSaveDialog FileSelectFolder FileSetAttrib + \ FileSetTime FileWrite FileWriteLine +syn keyword autoitFunction IniDelete IniRead IniReadSection IniReadSectionNames + \ IniRenameSection IniWrite IniWriteSection +syn keyword autoitFunction StderrRead StdinWrite StdoutRead +" graphic and sound +syn keyword autoitFunction Beep PixelChecksum PixelGetColor PixelSearch + \ SoundPlay SoundSetWaveVolume +" gui reference +syn keyword autoitFunction GUICreate GUIDelete GUICtrlGetHandle GUICtrlGetState + \ GUICtrlRead GUICtrlRecvMsg GUICtrlSendMsg GUICtrlSendToDummy + \ GUIGetCursorInfo GUIGetMsg GUIRegisterMsg GUIStartGroup GUISwitch +syn keyword autoitFunction GUICtrlCreateAvi GUICtrlCreateButton + \ GUICtrlCreateCheckbox GUICtrlCreateCombo GUICtrlCreateContextMenu + \ GUICtrlCreateDate GUICtrlCreateDummy GUICtrlCreateEdit + \ GUICtrlCreateGraphic GUICtrlCreateGroup GUICtrlCreateIcon + \ GUICtrlCreateInput GUICtrlCreateLabel GUICtrlCreateList + \ GUICtrlCreateListView GUICtrlCreateListViewItem GUICtrlCreateMenu + \ GUICtrlCreateMenuItem GUICtrlCreateMonthCal GUICtrlCreateObj + \ GUICtrlCreatePic GUICtrlCreateProgress GUICtrlCreateRadio + \ GUICtrlCreateSlider GUICtrlCreateTab GUICtrlCreateTabItem + \ GUICtrlCreateTreeView GUICtrlCreateTreeViewItem + \ GUICtrlCreateUpDown GUICtrlDelete +syn keyword autoitFunction GUICtrlRegisterListViewSort GUICtrlSetBkColor + \ GUICtrlSetColor GUICtrlSetCursor GUICtrlSetData GUICtrlSetFont + \ GUICtrlSetGraphic GUICtrlSetImage GUICtrlSetLimit GUICtrlSetOnEvent + \ GUICtrlSetPos GUICtrlSetResizing GUICtrlSetState GUICtrlSetStyle + \ GUICtrlSetTip +syn keyword autoitFunction GUISetBkColor GUISetCoord GUISetCursor GUISetFont + \ GUISetHelp GUISetIcon GUISetOnEvent GUISetState +" keyboard control +syn keyword autoitFunction HotKeySet Send +" math +syn keyword autoitFunction Abs ACos ASin ATan BitAND BitNOT BitOR BitRotate + \ BitShift BitXOR Cos Ceiling Exp Floor Log Mod Random Round Sin Sqrt + \ SRandom Tan +" message boxes and dialogs +syn keyword autoitFunction InputBox MsgBox ProgressOff ProgressOn ProgressSet + \ SplashImageOn SplashOff SplashTextOn ToolTip +" miscellaneous +syn keyword autoitFunction AdlibDisable AdlibEnable AutoItSetOption + \ AutoItWinGetTitle AutoItWinSetTitle BlockInput Break Call CDTray + \ Execute Opt SetError SetExtended +" mouse control +syn keyword autoitFunction MouseClick MouseClickDrag MouseDown MouseGetCursor + \ MouseGetPos MouseMove MouseUp MouseWheel +" network +syn keyword autoitFunction FtpSetProxy HttpSetProxy InetGet InetGetSize Ping + \ TCPAccept TCPCloseSocket TCPConnect TCPListen TCPNameToIp TCPRecv + \ TCPSend TCPShutDown TCPStartup UDPBind UDPCloseSocket UDPOpen UDPRecv + \ UDPSend UDPShutdown UDPStartup +" obj/com reference +syn keyword autoitFunction ObjCreate ObjEvent ObjGet ObjName +" process management +syn keyword autoitFunction DllCall DllClose DllOpen DllStructCreate + \ DllStructGetData DllStructGetPtr DllStructGetSize DllStructSetData + \ ProcessClose ProcessExists ProcessSetPriority ProcessList ProcessWait + \ ProcessWaitClose Run RunAsSet RunWait ShellExecute ShellExecuteWait + \ Shutdown + " removed from 3.2.0 docs - PluginClose PluginOpen +" registry management +syn keyword autoitFunction RegDelete RegEnumKey RegEnumVal RegRead RegWrite +" string management +syn keyword autoitFunction StringAddCR StringFormat StringInStr StringIsAlNum + \ StringIsAlpha StringIsASCII StringIsDigit StringIsFloat StringIsInt + \ StringIsLower StringIsSpace StringIsUpper StringIsXDigit StringLeft + \ StringLen StringLower StringMid StringRegExp StringRegExpReplace + \ StringReplace StringRight StringSplit StringStripCR StringStripWS + \ StringTrimLeft StringTrimRight StringUpper +" timer and delay +syn keyword autoitFunction Sleep TimerInit TimerDiff +" tray +syn keyword autoitFunction TrayCreateItem TrayCreateMenu TrayItemDelete + \ TrayItemGetHandle TrayItemGetState TrayItemGetText TrayItemSetOnEvent + \ TrayItemSetState TrayItemSetText TrayGetMsg TraySetClick TraySetIcon + \ TraySetOnEvent TraySetPauseIcon TraySetState TraySetToolTip TrayTip +" variables and conversions +syn keyword autoitFunction Asc Assign Binary Chr Dec Eval Hex HWnd Int IsAdmin + \ IsArray IsBinaryString IsBool IsDeclared IsDllStruct IsFloat IsHWnd + \ IsInt IsKeyword IsNumber IsObj IsString Number String UBound +" window management +syn keyword autoitFunction WinActivate WinActive WinClose WinExists WinFlash + \ WinGetCaretPos WinGetClassList WinGetClientSize WinGetHandle WinGetPos + \ WinGetProcess WinGetState WinGetText WinGetTitle WinKill WinList + \ WinMenuSelectItem WinMinimizeAll WinMinimizeAllUndo WinMove + \ WinSetOnTop WinSetState WinSetTitle WinSetTrans WinWait WinWaitActive + \ WinWaitClose WinWaitNotActive +syn keyword autoitFunction ControlClick ControlCommand ControlDisable + \ ControlEnable ControlFocus ControlGetFocus ControlGetHandle + \ ControlGetPos ControlGetText ControlHide ControlListView ControlMove + \ ControlSend ControlSetText ControlShow StatusBarGetText + +" user defined functions +" array +syn keyword autoitFunction _ArrayAdd _ArrayBinarySearch _ArrayCreate + \ _ArrayDelete _ArrayDisplay _ArrayInsert _ArrayMax _ArrayMaxIndex + \ _ArrayMin _ArrayMinIndex _ArrayPop _ArrayPush _ArrayReverse + \ _ArraySearch _ArraySort _ArraySwap _ArrayToClip _ArrayToString + \ _ArrayTrim +" color +syn keyword autoitFunction _ColorgetBlue _ColorGetGreen _ColorGetRed +" date +syn keyword autoitFunction _DateAdd _DateDayOfWeek _DateDaysInMonth _DateDiff + \ _DateIsLeapYear _DateIsValid _DateTimeFormat _DateTimeSplit + \ _DateToDayOfWeek _ToDayOfWeekISO _DateToDayValue _DayValueToDate _Now + \ _NowCalc _NowCalcDate _NowDate _NowTime _SetDate _SetTime _TicksToTime + \ _TimeToTicks _WeekNumberISO +" file +syn keyword autoitFunction _FileCountLines _FileCreate _FileListToArray + \ _FilePrint _FileReadToArray _FileWriteFromArray _FileWriteLog + \ _FileWriteToLine _PathFull _PathMake _PathSplit _ReplaceStringInFile + \ _TempFile +" guicombo +syn keyword autoitFunction _GUICtrlComboAddDir _GUICtrlComboAddString + \ _GUICtrlComboAutoComplete _GUICtrlComboDeleteString + \ _GUICtrlComboFindString _GUICtrlComboGetCount _GUICtrlComboGetCurSel + \ _GUICtrlComboGetDroppedControlRect _GUICtrlComboGetDroppedState + \ _GUICtrlComboGetDroppedWidth _GUICtrlComboGetEditSel + \ _GUICtrlComboGetExtendedUI _GUICtrlComboGetHorizontalExtent + \ _GUICtrlComboGetItemHeight _GUICtrlComboGetLBText + \ _GUICtrlComboGetLBTextLen _GUICtrlComboGetList _GUICtrlComboGetLocale + \ _GUICtrlComboGetMinVisible _GUICtrlComboGetTopIndex + \ _GUICtrlComboInitStorage _GUICtrlComboInsertString + \ _GUICtrlComboLimitText _GUICtrlComboResetContent + \ _GUICtrlComboSelectString _GUICtrlComboSetCurSel + \ _GUICtrlComboSetDroppedWidth _GUICtrlComboSetEditSel + \ _GUICtrlComboSetExtendedUI _GUICtrlComboSetHorizontalExtent + \ _GUICtrlComboSetItemHeight _GUICtrlComboSetMinVisible + \ _GUICtrlComboSetTopIndex _GUICtrlComboShowDropDown +" guiedit +syn keyword autoitFunction _GUICtrlEditCanUndo _GUICtrlEditEmptyUndoBuffer + \ _GuiCtrlEditFind _GUICtrlEditGetFirstVisibleLine _GUICtrlEditGetLine + \ _GUICtrlEditGetLineCount _GUICtrlEditGetModify _GUICtrlEditGetRect + \ _GUICtrlEditGetSel _GUICtrlEditLineFromChar _GUICtrlEditLineIndex + \ _GUICtrlEditLineLength _GUICtrlEditLineScroll _GUICtrlEditReplaceSel + \ _GUICtrlEditScroll _GUICtrlEditSetModify _GUICtrlEditSetRect + \ _GUICtrlEditSetSel _GUICtrlEditUndo +" guiipaddress +syn keyword autoitFunction _GUICtrlIpAddressClear _GUICtrlIpAddressCreate + \ _GUICtrlIpAddressDelete _GUICtrlIpAddressGet _GUICtrlIpAddressIsBlank + \ _GUICtrlIpAddressSet _GUICtrlIpAddressSetFocus + \ _GUICtrlIpAddressSetFont + \ _GUICtrlIpAddressSetRange _GUICtrlIpAddressShowHide +" guilist +syn keyword autoitFunction _GUICtrlListAddDir _GUICtrlListAddItem + \ _GUICtrlListClear + \ _GUICtrlListCount _GUICtrlListDeleteItem _GUICtrlListFindString + \ _GUICtrlListGetAnchorIndex _GUICtrlListGetCaretIndex + \ _GUICtrlListGetHorizontalExtent _GUICtrlListGetInfo + \ _GUICtrlListGetItemRect _GUICtrlListGetLocale _GUICtrlListGetSelCount + \ _GUICtrlListGetSelItems _GUICtrlListGetSelItemsText + \ _GUICtrlListGetSelState _GUICtrlListGetText _GUICtrlListGetTextLen + \ _GUICtrlListGetTopIndex _GUICtrlListInsertItem + \ _GUICtrlListReplaceString _GUICtrlListSelectedIndex + \ _GUICtrlListSelectIndex _GUICtrlListSelectString + \ _GUICtrlListSelItemRange _GUICtrlListSelItemRangeEx + \ _GUICtrlListSetAnchorIndex _GUICtrlListSetCaretIndex + \ _GUICtrlListSetHorizontalExtent _GUICtrlListSetLocale + \ _GUICtrlListSetSel _GUICtrlListSetTopIndex _GUICtrlListSort + \ _GUICtrlListSwapString +" guilistview +syn keyword autoitFunction _GUICtrlListViewCopyItems + \ _GUICtrlListViewDeleteAllItems _GUICtrlListViewDeleteColumn + \ _GUICtrlListViewDeleteItem _GUICtrlListViewDeleteItemsSelected + \ _GUICtrlListViewEnsureVisible _GUICtrlListViewFindItem + \ _GUICtrlListViewGetBackColor _GUICtrlListViewGetCallBackMask + \ _GUICtrlListViewGetCheckedState _GUICtrlListViewGetColumnOrder + \ _GUICtrlListViewGetColumnWidth _GUICtrlListViewGetCounterPage + \ _GUICtrlListViewGetCurSel _GUICtrlListViewGetExtendedListViewStyle + \ _GUICtrlListViewGetHeader _GUICtrlListViewGetHotCursor + \ _GUICtrlListViewGetHotItem _GUICtrlListViewGetHoverTime + \ _GUICtrlListViewGetItemCount _GUICtrlListViewGetItemText + \ _GUICtrlListViewGetItemTextArray _GUICtrlListViewGetNextItem + \ _GUICtrlListViewGetSelectedCount _GUICtrlListViewGetSelectedIndices + \ _GUICtrlListViewGetSubItemsCount _GUICtrlListViewGetTopIndex + \ _GUICtrlListViewGetUnicodeFormat _GUICtrlListViewHideColumn + \ _GUICtrlListViewInsertColumn _GUICtrlListViewInsertItem + \ _GUICtrlListViewJustifyColumn _GUICtrlListViewScroll + \ _GUICtrlListViewSetCheckState _GUICtrlListViewSetColumnHeaderText + \ _GUICtrlListViewSetColumnOrder _GUICtrlListViewSetColumnWidth + \ _GUICtrlListViewSetHotItem _GUICtrlListViewSetHoverTime + \ _GUICtrlListViewSetItemCount _GUICtrlListViewSetItemSelState + \ _GUICtrlListViewSetItemText _GUICtrlListViewSort +" guimonthcal +syn keyword autoitFunction _GUICtrlMonthCalGet1stDOW _GUICtrlMonthCalGetColor + \ _GUICtrlMonthCalGetDelta _GUICtrlMonthCalGetMaxSelCount + \ _GUICtrlMonthCalGetMaxTodayWidth _GUICtrlMonthCalGetMinReqRect + \ _GUICtrlMonthCalSet1stDOW _GUICtrlMonthCalSetColor + \ _GUICtrlMonthCalSetDelta _GUICtrlMonthCalSetMaxSelCount +" guislider +syn keyword autoitFunction _GUICtrlSliderClearTics _GUICtrlSliderGetLineSize + \ _GUICtrlSliderGetNumTics _GUICtrlSliderGetPageSize + \ _GUICtrlSliderGetPos _GUICtrlSliderGetRangeMax + \ _GUICtrlSliderGetRangeMin _GUICtrlSliderSetLineSize + \ _GUICtrlSliderSetPageSize _GUICtrlSliderSetPos + \ _GUICtrlSliderSetTicFreq +" guistatusbar +syn keyword autoitFunction _GuiCtrlStatusBarCreate + \ _GUICtrlStatusBarCreateProgress _GUICtrlStatusBarDelete + \ _GuiCtrlStatusBarGetBorders _GuiCtrlStatusBarGetIcon + \ _GuiCtrlStatusBarGetParts _GuiCtrlStatusBarGetRect + \ _GuiCtrlStatusBarGetText _GuiCtrlStatusBarGetTextLength + \ _GuiCtrlStatusBarGetTip _GuiCtrlStatusBarGetUnicode + \ _GUICtrlStatusBarIsSimple _GuiCtrlStatusBarResize + \ _GuiCtrlStatusBarSetBKColor _GuiCtrlStatusBarSetIcon + \ _GuiCtrlStatusBarSetMinHeight _GUICtrlStatusBarSetParts + \ _GuiCtrlStatusBarSetSimple _GuiCtrlStatusBarSetText + \ _GuiCtrlStatusBarSetTip _GuiCtrlStatusBarSetUnicode + \ _GUICtrlStatusBarShowHide +" guitab +syn keyword autoitFunction _GUICtrlTabDeleteAllItems _GUICtrlTabDeleteItem + \ _GUICtrlTabDeselectAll _GUICtrlTabGetCurFocus _GUICtrlTabGetCurSel + \ _GUICtrlTabGetExtendedStyle _GUICtrlTabGetItemCount + \ _GUICtrlTabGetItemRect _GUICtrlTabGetRowCount + \ _GUICtrlTabGetUnicodeFormat _GUICtrlTabHighlightItem + \ _GUICtrlTabSetCurFocus _GUICtrlTabSetCurSel + \ _GUICtrlTabSetMinTabWidth _GUICtrlTabSetUnicodeFormat +" guitreeview +syn keyword autoitFunction _GUICtrlTreeViewDeleteAllItems + \ _GUICtrlTreeViewDeleteItem _GUICtrlTreeViewExpand + \ _GUICtrlTreeViewGetBkColor _GUICtrlTreeViewGetCount + \ _GUICtrlTreeViewGetIndent _GUICtrlTreeViewGetLineColor + \ _GUICtrlTreeViewGetParentHandle _GUICtrlTreeViewGetParentID + \ _GUICtrlTreeViewGetState _GUICtrlTreeViewGetText + \ _GUICtrlTreeViewGetTextColor _GUICtrlTreeViewItemGetTree + \ _GUICtrlTreeViewInsertItem _GUICtrlTreeViewSetBkColor + \ _GUICtrlTreeViewSetIcon _GUICtrlTreeViewSetIndent + \ _GUICtrlTreeViewSetLineColor GUICtrlTreeViewSetState + \ _GUICtrlTreeViewSetText _GUICtrlTreeViewSetTextColor + \ _GUICtrlTreeViewSort +" ie +syn keyword autoitFunction _IE_Example _IE_Introduction _IE_VersionInfo + \ _IEAction _IEAttach _IEBodyReadHTML _IEBodyReadText _IEBodyWriteHTML + \ _IECreate _IECreateEmbedded _IEDocGetObj _IEDocInsertHTML + \ _IEDocInsertText _IEDocReadHTML _IEDocWriteHTML + \ _IEErrorHandlerDeRegister _IEErrorHandlerRegister _IEErrorNotify + \ _IEFormElementCheckboxSelect _IEFormElementGetCollection + \ _IEFormElementGetObjByName _IEFormElementGetValue + \ _IEFormElementOptionSelect _IEFormElementRadioSelect + \ _IEFormElementSetValue _IEFormGetCollection _IEFormGetObjByName + \ _IEFormImageClick _IEFormReset _IEFormSubmit _IEFrameGetCollection + \ _IEFrameGetObjByName _IEGetObjByName _IEHeadInsertEventScript + \ _IEImgClick _IEImgGetCollection _IEIsFrameSet _IELinkClickByIndex + \ _IELinkClickByText _IELinkGetCollection _IELoadWait _IELoadWaitTimeout + \ _IENavigate _IEPropertyGet _IEPropertySet _IEQuit + \ _IETableGetCollection _IETableWriteToArray _IETagNameAllGetCollection + \ _IETagNameGetCollection +" inet +syn keyword autoitFunction _GetIP _INetExplorerCapable _INetGetSource _INetMail + \ _INetSmtpMail _TCPIpToName +" math +syn keyword autoitFunction _Degree _MathCheckDiv _Max _Min _Radian +" miscellaneous +syn keyword autoitFunction _ChooseColor _ChooseFont _ClipPutFile _Iif + \ _IsPressed _MouseTrap _SendMessage _Singleton +" process +syn keyword autoitFunction _ProcessGetName _ProcessGetPriority _RunDOS +" sound +syn keyword autoitFunction _SoundClose _SoundLength _SoundOpen _SoundPause + \ _SoundPlay _SoundPos _SoundResume _SoundSeek _SoundStatus _SoundStop +" sqlite +syn keyword autoitFunction _SQLite_Changes _SQLite_Close + \ _SQLite_Display2DResult _SQLite_Encode _SQLite_ErrCode _SQLite_ErrMsg + \ _SQLite_Escape _SQLite_Exec _SQLite_FetchData _SQLite_FetchNames + \ _SQLite_GetTable _SQLite_GetTable2D _SQLite_LastInsertRowID + \ _SQLite_LibVersion _SQLite_Open _SQLite_Query _SQLite_QueryFinalize + \ _SQLite_QueryReset _SQLite_QuerySingleRow _SQLite_SaveMode + \ _SQLite_SetTimeout _SQLite_Shutdown _SQLite_SQLiteExe _SQLite_Startup + \ _SQLite_TotalChanges +" string +syn keyword autoitFunction _HexToString _StringAddComma _StringBetween + \ _StringEncrypt _StringInsert _StringProper _StringRepeat + \ _StringReverse _StringToHex +" visa +syn keyword autoitFunction _viClose _viExecCommand _viFindGpib _viGpibBusReset + \ _viGTL _viOpen _viSetAttribute _viSetTimeout + +" read-only macros +syn match autoitBuiltin "@AppData\(Common\)\=Dir" +syn match autoitBuiltin "@AutoItExe" +syn match autoitBuiltin "@AutoItPID" +syn match autoitBuiltin "@AutoItVersion" +syn match autoitBuiltin "@COM_EventObj" +syn match autoitBuiltin "@CommonFilesDir" +syn match autoitBuiltin "@Compiled" +syn match autoitBuiltin "@ComputerName" +syn match autoitBuiltin "@ComSpec" +syn match autoitBuiltin "@CR\(LF\)\=" +syn match autoitBuiltin "@Desktop\(Common\)\=Dir" +syn match autoitBuiltin "@DesktopDepth" +syn match autoitBuiltin "@DesktopHeight" +syn match autoitBuiltin "@DesktopRefresh" +syn match autoitBuiltin "@DesktopWidth" +syn match autoitBuiltin "@DocumentsCommonDir" +syn match autoitBuiltin "@Error" +syn match autoitBuiltin "@ExitCode" +syn match autoitBuiltin "@ExitMethod" +syn match autoitBuiltin "@Extended" +syn match autoitBuiltin "@Favorites\(Common\)\=Dir" +syn match autoitBuiltin "@GUI_CtrlId" +syn match autoitBuiltin "@GUI_CtrlHandle" +syn match autoitBuiltin "@GUI_DragId" +syn match autoitBuiltin "@GUI_DragFile" +syn match autoitBuiltin "@GUI_DropId" +syn match autoitBuiltin "@GUI_WinHandle" +syn match autoitBuiltin "@HomeDrive" +syn match autoitBuiltin "@HomePath" +syn match autoitBuiltin "@HomeShare" +syn match autoitBuiltin "@HOUR" +syn match autoitBuiltin "@HotKeyPressed" +syn match autoitBuiltin "@InetGetActive" +syn match autoitBuiltin "@InetGetBytesRead" +syn match autoitBuiltin "@IPAddress[1234]" +syn match autoitBuiltin "@KBLayout" +syn match autoitBuiltin "@LF" +syn match autoitBuiltin "@Logon\(DNS\)\=Domain" +syn match autoitBuiltin "@LogonServer" +syn match autoitBuiltin "@MDAY" +syn match autoitBuiltin "@MIN" +syn match autoitBuiltin "@MON" +syn match autoitBuiltin "@MyDocumentsDir" +syn match autoitBuiltin "@NumParams" +syn match autoitBuiltin "@OSBuild" +syn match autoitBuiltin "@OSLang" +syn match autoitBuiltin "@OSServicePack" +syn match autoitBuiltin "@OSTYPE" +syn match autoitBuiltin "@OSVersion" +syn match autoitBuiltin "@ProcessorArch" +syn match autoitBuiltin "@ProgramFilesDir" +syn match autoitBuiltin "@Programs\(Common\)\=Dir" +syn match autoitBuiltin "@ScriptDir" +syn match autoitBuiltin "@ScriptFullPath" +syn match autoitBuiltin "@ScriptLineNumber" +syn match autoitBuiltin "@ScriptName" +syn match autoitBuiltin "@SEC" +syn match autoitBuiltin "@StartMenu\(Common\)\=Dir" +syn match autoitBuiltin "@Startup\(Common\)\=Dir" +syn match autoitBuiltin "@SW_DISABLE" +syn match autoitBuiltin "@SW_ENABLE" +syn match autoitBuiltin "@SW_HIDE" +syn match autoitBuiltin "@SW_LOCK" +syn match autoitBuiltin "@SW_MAXIMIZE" +syn match autoitBuiltin "@SW_MINIMIZE" +syn match autoitBuiltin "@SW_RESTORE" +syn match autoitBuiltin "@SW_SHOW" +syn match autoitBuiltin "@SW_SHOWDEFAULT" +syn match autoitBuiltin "@SW_SHOWMAXIMIZED" +syn match autoitBuiltin "@SW_SHOWMINIMIZED" +syn match autoitBuiltin "@SW_SHOWMINNOACTIVE" +syn match autoitBuiltin "@SW_SHOWNA" +syn match autoitBuiltin "@SW_SHOWNOACTIVATE" +syn match autoitBuiltin "@SW_SHOWNORMAL" +syn match autoitBuiltin "@SW_UNLOCK" +syn match autoitBuiltin "@SystemDir" +syn match autoitBuiltin "@TAB" +syn match autoitBuiltin "@TempDir" +syn match autoitBuiltin "@TRAY_ID" +syn match autoitBuiltin "@TrayIconFlashing" +syn match autoitBuiltin "@TrayIconVisible" +syn match autoitBuiltin "@UserProfileDir" +syn match autoitBuiltin "@UserName" +syn match autoitBuiltin "@WDAY" +syn match autoitBuiltin "@WindowsDir" +syn match autoitBuiltin "@WorkingDir" +syn match autoitBuiltin "@YDAY" +syn match autoitBuiltin "@YEAR" + +"comments and commenting-out +syn match autoitComment ";.*" +"in this way also #ce alone will be highlighted +syn match autoitCommDelimiter "^\s*#comments-start\>" +syn match autoitCommDelimiter "^\s*#cs\>" +syn match autoitCommDelimiter "^\s*#comments-end\>" +syn match autoitCommDelimiter "^\s*#ce\>" +syn region autoitComment + \ matchgroup=autoitCommDelimiter + \ start="^\s*#comments-start\>" start="^\s*#cs\>" + \ end="^\s*#comments-end\>" end="^\s*#ce\>" + +"one character operators +syn match autoitOperator "[-+*/&^=<>][^-+*/&^=<>]"me=e-1 +"two characters operators +syn match autoitOperator "==[^=]"me=e-1 +syn match autoitOperator "<>" +syn match autoitOperator "<=" +syn match autoitOperator ">=" +syn match autoitOperator "+=" +syn match autoitOperator "-=" +syn match autoitOperator "*=" +syn match autoitOperator "/=" +syn match autoitOperator "&=" +syn keyword autoitOperator NOT AND OR + +syn match autoitParen "(\|)" +syn match autoitBracket "\[\|\]" +syn match autoitComma "," + +"numbers must come after operator '-' +"decimal numbers without a dot +syn match autoitNumber "-\=\<\d\+\>" +"hexadecimal numbers without a dot +syn match autoitNumber "-\=\<0x\x\+\>" +"floating point number with dot (inside or at end) + +syn match autoitNumber "-\=\<\d\+\.\d*\>" +"floating point number, starting with a dot +syn match autoitNumber "-\=\<\.\d\+\>" +"scientific notation numbers without dots +syn match autoitNumber "-\=\<\d\+e[-+]\=\d\+\>" +"scientific notation numbers with dots +syn match autoitNumber "-\=\<\(\(\d\+\.\d*\)\|\(\.\d\+\)\)\(e[-+]\=\d\+\)\=\>" + +"string constants +"we want the escaped quotes marked in red +syn match autoitDoubledSingles +''+ contained +syn match autoitDoubledDoubles +""+ contained +"we want the continuation character marked in red +"(also at the top level, not just contained) +syn match autoitCont "_$" + +" send key list - must be defined before autoitStrings +syn match autoitSend "{!}" contained +syn match autoitSend "{#}" contained +syn match autoitSend "{+}" contained +syn match autoitSend "{^}" contained +syn match autoitSend "{{}" contained +syn match autoitSend "{}}" contained +syn match autoitSend "{SPACE}" contained +syn match autoitSend "{ENTER}" contained +syn match autoitSend "{ALT}" contained +syn match autoitSend "{BACKSPACE}" contained +syn match autoitSend "{BS}" contained +syn match autoitSend "{DELETE}" contained +syn match autoitSend "{DEL}" contained +syn match autoitSend "{UP}" contained +syn match autoitSend "{DOWN}" contained +syn match autoitSend "{LEFT}" contained +syn match autoitSend "{RIGHT}" contained +syn match autoitSend "{HOME}" contained +syn match autoitSend "{END}" contained +syn match autoitSend "{ESCAPE}" contained +syn match autoitSend "{ESC}" contained +syn match autoitSend "{INSERT}" contained +syn match autoitSend "{INS}" contained +syn match autoitSend "{PGUP}" contained +syn match autoitSend "{PGDN}" contained +syn match autoitSend "{F1}" contained +syn match autoitSend "{F2}" contained +syn match autoitSend "{F3}" contained +syn match autoitSend "{F4}" contained +syn match autoitSend "{F5}" contained +syn match autoitSend "{F6}" contained +syn match autoitSend "{F7}" contained +syn match autoitSend "{F8}" contained +syn match autoitSend "{F9}" contained +syn match autoitSend "{F10}" contained +syn match autoitSend "{F11}" contained +syn match autoitSend "{F12}" contained +syn match autoitSend "{TAB}" contained +syn match autoitSend "{PRINTSCREEN}" contained +syn match autoitSend "{LWIN}" contained +syn match autoitSend "{RWIN}" contained +syn match autoitSend "{NUMLOCK}" contained +syn match autoitSend "{CTRLBREAK}" contained +syn match autoitSend "{PAUSE}" contained +syn match autoitSend "{CAPSLOCK}" contained +syn match autoitSend "{NUMPAD0}" contained +syn match autoitSend "{NUMPAD1}" contained +syn match autoitSend "{NUMPAD2}" contained +syn match autoitSend "{NUMPAD3}" contained +syn match autoitSend "{NUMPAD4}" contained +syn match autoitSend "{NUMPAD5}" contained +syn match autoitSend "{NUMPAD6}" contained +syn match autoitSend "{NUMPAD7}" contained +syn match autoitSend "{NUMPAD8}" contained +syn match autoitSend "{NUMPAD9}" contained +syn match autoitSend "{NUMPADMULT}" contained +syn match autoitSend "{NUMPADADD}" contained +syn match autoitSend "{NUMPADSUB}" contained +syn match autoitSend "{NUMPADDIV}" contained +syn match autoitSend "{NUMPADDOT}" contained +syn match autoitSend "{NUMPADENTER}" contained +syn match autoitSend "{APPSKEY}" contained +syn match autoitSend "{LALT}" contained +syn match autoitSend "{RALT}" contained +syn match autoitSend "{LCTRL}" contained +syn match autoitSend "{RCTRL}" contained +syn match autoitSend "{LSHIFT}" contained +syn match autoitSend "{RSHIFT}" contained +syn match autoitSend "{SLEEP}" contained +syn match autoitSend "{ALTDOWN}" contained +syn match autoitSend "{SHIFTDOWN}" contained +syn match autoitSend "{CTRLDOWN}" contained +syn match autoitSend "{LWINDOWN}" contained +syn match autoitSend "{RWINDOWN}" contained +syn match autoitSend "{ASC \d\d\d\d}" contained +syn match autoitSend "{BROWSER_BACK}" contained +syn match autoitSend "{BROWSER_FORWARD}" contained +syn match autoitSend "{BROWSER_REFRESH}" contained +syn match autoitSend "{BROWSER_STOP}" contained +syn match autoitSend "{BROWSER_SEARCH}" contained +syn match autoitSend "{BROWSER_FAVORITES}" contained +syn match autoitSend "{BROWSER_HOME}" contained +syn match autoitSend "{VOLUME_MUTE}" contained +syn match autoitSend "{VOLUME_DOWN}" contained +syn match autoitSend "{VOLUME_UP}" contained +syn match autoitSend "{MEDIA_NEXT}" contained +syn match autoitSend "{MEDIA_PREV}" contained +syn match autoitSend "{MEDIA_STOP}" contained +syn match autoitSend "{MEDIA_PLAY_PAUSE}" contained +syn match autoitSend "{LAUNCH_MAIL}" contained +syn match autoitSend "{LAUNCH_MEDIA}" contained +syn match autoitSend "{LAUNCH_APP1}" contained +syn match autoitSend "{LAUNCH_APP2}" contained + +"this was tricky! +"we use an oneline region, instead of a match, in order to use skip= +"matchgroup= so start and end quotes are not considered as au3Doubled +"contained +syn region autoitString oneline contains=autoitSend matchgroup=autoitQuote start=+"+ + \ end=+"+ end=+_\n\{1}.*"+ + \ contains=autoitCont,autoitDoubledDoubles skip=+""+ +syn region autoitString oneline matchgroup=autoitQuote start=+'+ + \ end=+'+ end=+_\n\{1}.*'+ + \ contains=autoitCont,autoitDoubledSingles skip=+''+ + +syn match autoitVarSelector "\$" contained display +syn match autoitVariable "$\w\+" contains=autoitVarSelector + +" options - must be defined after autoitStrings +syn match autoitOption "\([\"\']\)CaretCoordMode\1" +syn match autoitOption "\([\"\']\)ColorMode\1" +syn match autoitOption "\([\"\']\)ExpandEnvStrings\1" +syn match autoitOption "\([\"\']\)ExpandVarStrings\1" +syn match autoitOption "\([\"\']\)FtpBinaryMode\1" +syn match autoitOption "\([\"\']\)GUICloseOnEsc\1" +syn match autoitOption "\([\"\']\)GUICoordMode\1" +syn match autoitOption "\([\"\']\)GUIDataSeparatorChar\1" +syn match autoitOption "\([\"\']\)GUIOnEventMode\1" +syn match autoitOption "\([\"\']\)GUIResizeMode\1" +syn match autoitOption "\([\"\']\)GUIEventCompatibilityMode\1" +syn match autoitOption "\([\"\']\)MouseClickDelay\1" +syn match autoitOption "\([\"\']\)MouseClickDownDelay\1" +syn match autoitOption "\([\"\']\)MouseClickDragDelay\1" +syn match autoitOption "\([\"\']\)MouseCoordMode\1" +syn match autoitOption "\([\"\']\)MustDeclareVars\1" +syn match autoitOption "\([\"\']\)OnExitFunc\1" +syn match autoitOption "\([\"\']\)PixelCoordMode\1" +syn match autoitOption "\([\"\']\)RunErrorsFatal\1" +syn match autoitOption "\([\"\']\)SendAttachMode\1" +syn match autoitOption "\([\"\']\)SendCapslockMode\1" +syn match autoitOption "\([\"\']\)SendKeyDelay\1" +syn match autoitOption "\([\"\']\)SendKeyDownDelay\1" +syn match autoitOption "\([\"\']\)TCPTimeout\1" +syn match autoitOption "\([\"\']\)TrayAutoPause\1" +syn match autoitOption "\([\"\']\)TrayIconDebug\1" +syn match autoitOption "\([\"\']\)TrayIconHide\1" +syn match autoitOption "\([\"\']\)TrayMenuMode\1" +syn match autoitOption "\([\"\']\)TrayOnEventMode\1" +syn match autoitOption "\([\"\']\)WinDetectHiddenText\1" +syn match autoitOption "\([\"\']\)WinSearchChildren\1" +syn match autoitOption "\([\"\']\)WinTextMatchMode\1" +syn match autoitOption "\([\"\']\)WinTitleMatchMode\1" +syn match autoitOption "\([\"\']\)WinWaitDelay\1" + +" styles - must be defined after autoitVariable +" common +syn match autoitStyle "\$WS_BORDER" +syn match autoitStyle "\$WS_POPUP" +syn match autoitStyle "\$WS_CAPTION" +syn match autoitStyle "\$WS_CLIPCHILDREN" +syn match autoitStyle "\$WS_CLIPSIBLINGS" +syn match autoitStyle "\$WS_DISABLED" +syn match autoitStyle "\$WS_DLGFRAME" +syn match autoitStyle "\$WS_HSCROLL" +syn match autoitStyle "\$WS_MAXIMIZE" +syn match autoitStyle "\$WS_MAXIMIZEBOX" +syn match autoitStyle "\$WS_MINIMIZE" +syn match autoitStyle "\$WS_MINIMIZEBOX" +syn match autoitStyle "\$WS_OVERLAPPED" +syn match autoitStyle "\$WS_OVERLAPPEDWINDOW" +syn match autoitStyle "\$WS_POPUPWINDOW" +syn match autoitStyle "\$WS_SIZEBOX" +syn match autoitStyle "\$WS_SYSMENU" +syn match autoitStyle "\$WS_THICKFRAME" +syn match autoitStyle "\$WS_VSCROLL" +syn match autoitStyle "\$WS_VISIBLE" +syn match autoitStyle "\$WS_CHILD" +syn match autoitStyle "\$WS_GROUP" +syn match autoitStyle "\$WS_TABSTOP" +syn match autoitStyle "\$DS_MODALFRAME" +syn match autoitStyle "\$DS_SETFOREGROUND" +syn match autoitStyle "\$DS_CONTEXTHELP" +" common extended +syn match autoitStyle "\$WS_EX_ACCEPTFILES" +syn match autoitStyle "\$WS_EX_APPWINDOW" +syn match autoitStyle "\$WS_EX_CLIENTEDGE" +syn match autoitStyle "\$WS_EX_CONTEXTHELP" +syn match autoitStyle "\$WS_EX_DLGMODALFRAME" +syn match autoitStyle "\$WS_EX_MDICHILD" +syn match autoitStyle "\$WS_EX_OVERLAPPEDWINDOW" +syn match autoitStyle "\$WS_EX_STATICEDGE" +syn match autoitStyle "\$WS_EX_TOPMOST" +syn match autoitStyle "\$WS_EX_TRANSPARENT" +syn match autoitStyle "\$WS_EX_TOOLWINDOW" +syn match autoitStyle "\$WS_EX_WINDOWEDGE" +syn match autoitStyle "\$WS_EX_LAYERED" +syn match autoitStyle "\$GUI_WS_EX_PARENTDRAG" +" checkbox +syn match autoitStyle "\$BS_3STATE" +syn match autoitStyle "\$BS_AUTO3STATE" +syn match autoitStyle "\$BS_AUTOCHECKBOX" +syn match autoitStyle "\$BS_CHECKBOX" +syn match autoitStyle "\$BS_LEFT" +syn match autoitStyle "\$BS_PUSHLIKE" +syn match autoitStyle "\$BS_RIGHT" +syn match autoitStyle "\$BS_RIGHTBUTTON" +syn match autoitStyle "\$BS_GROUPBOX" +syn match autoitStyle "\$BS_AUTORADIOBUTTON" +" push button +syn match autoitStyle "\$BS_BOTTOM" +syn match autoitStyle "\$BS_CENTER" +syn match autoitStyle "\$BS_DEFPUSHBUTTON" +syn match autoitStyle "\$BS_MULTILINE" +syn match autoitStyle "\$BS_TOP" +syn match autoitStyle "\$BS_VCENTER" +syn match autoitStyle "\$BS_ICON" +syn match autoitStyle "\$BS_BITMAP" +syn match autoitStyle "\$BS_FLAT" +" combo +syn match autoitStyle "\$CBS_AUTOHSCROLL" +syn match autoitStyle "\$CBS_DISABLENOSCROLL" +syn match autoitStyle "\$CBS_DROPDOWN" +syn match autoitStyle "\$CBS_DROPDOWNLIST" +syn match autoitStyle "\$CBS_LOWERCASE" +syn match autoitStyle "\$CBS_NOINTEGRALHEIGHT" +syn match autoitStyle "\$CBS_OEMCONVERT" +syn match autoitStyle "\$CBS_SIMPLE" +syn match autoitStyle "\$CBS_SORT" +syn match autoitStyle "\$CBS_UPPERCASE" +" list +syn match autoitStyle "\$LBS_DISABLENOSCROLL" +syn match autoitStyle "\$LBS_NOINTEGRALHEIGHT" +syn match autoitStyle "\$LBS_NOSEL" +syn match autoitStyle "\$LBS_NOTIFY" +syn match autoitStyle "\$LBS_SORT" +syn match autoitStyle "\$LBS_STANDARD" +syn match autoitStyle "\$LBS_USETABSTOPS" +" edit/input +syn match autoitStyle "\$ES_AUTOHSCROLL" +syn match autoitStyle "\$ES_AUTOVSCROLL" +syn match autoitStyle "\$ES_CENTER" +syn match autoitStyle "\$ES_LOWERCASE" +syn match autoitStyle "\$ES_NOHIDESEL" +syn match autoitStyle "\$ES_NUMBER" +syn match autoitStyle "\$ES_OEMCONVERT" +syn match autoitStyle "\$ES_MULTILINE" +syn match autoitStyle "\$ES_PASSWORD" +syn match autoitStyle "\$ES_READONLY" +syn match autoitStyle "\$ES_RIGHT" +syn match autoitStyle "\$ES_UPPERCASE" +syn match autoitStyle "\$ES_WANTRETURN" +" progress bar +syn match autoitStyle "\$PBS_SMOOTH" +syn match autoitStyle "\$PBS_VERTICAL" +" up-down +syn match autoitStyle "\$UDS_ALIGNLEFT" +syn match autoitStyle "\$UDS_ALIGNRIGHT" +syn match autoitStyle "\$UDS_ARROWKEYS" +syn match autoitStyle "\$UDS_HORZ" +syn match autoitStyle "\$UDS_NOTHOUSANDS" +syn match autoitStyle "\$UDS_WRAP" +" label/static +syn match autoitStyle "\$SS_BLACKFRAME" +syn match autoitStyle "\$SS_BLACKRECT" +syn match autoitStyle "\$SS_CENTER" +syn match autoitStyle "\$SS_CENTERIMAGE" +syn match autoitStyle "\$SS_ETCHEDFRAME" +syn match autoitStyle "\$SS_ETCHEDHORZ" +syn match autoitStyle "\$SS_ETCHEDVERT" +syn match autoitStyle "\$SS_GRAYFRAME" +syn match autoitStyle "\$SS_GRAYRECT" +syn match autoitStyle "\$SS_LEFT" +syn match autoitStyle "\$SS_LEFTNOWORDWRAP" +syn match autoitStyle "\$SS_NOPREFIX" +syn match autoitStyle "\$SS_NOTIFY" +syn match autoitStyle "\$SS_RIGHT" +syn match autoitStyle "\$SS_RIGHTJUST" +syn match autoitStyle "\$SS_SIMPLE" +syn match autoitStyle "\$SS_SUNKEN" +syn match autoitStyle "\$SS_WHITEFRAME" +syn match autoitStyle "\$SS_WHITERECT" +" tab +syn match autoitStyle "\$TCS_SCROLLOPPOSITE" +syn match autoitStyle "\$TCS_BOTTOM" +syn match autoitStyle "\$TCS_RIGHT" +syn match autoitStyle "\$TCS_MULTISELECT" +syn match autoitStyle "\$TCS_FLATBUTTONS" +syn match autoitStyle "\$TCS_FORCEICONLEFT" +syn match autoitStyle "\$TCS_FORCELABELLEFT" +syn match autoitStyle "\$TCS_HOTTRACK" +syn match autoitStyle "\$TCS_VERTICAL" +syn match autoitStyle "\$TCS_TABS" +syn match autoitStyle "\$TCS_BUTTONS" +syn match autoitStyle "\$TCS_SINGLELINE" +syn match autoitStyle "\$TCS_MULTILINE" +syn match autoitStyle "\$TCS_RIGHTJUSTIFY" +syn match autoitStyle "\$TCS_FIXEDWIDTH" +syn match autoitStyle "\$TCS_RAGGEDRIGHT" +syn match autoitStyle "\$TCS_FOCUSONBUTTONDOWN" +syn match autoitStyle "\$TCS_OWNERDRAWFIXED" +syn match autoitStyle "\$TCS_TOOLTIPS" +syn match autoitStyle "\$TCS_FOCUSNEVER" +" avi clip +syn match autoitStyle "\$ACS_AUTOPLAY" +syn match autoitStyle "\$ACS_CENTER" +syn match autoitStyle "\$ACS_TRANSPARENT" +syn match autoitStyle "\$ACS_NONTRANSPARENT" +" date +syn match autoitStyle "\$DTS_UPDOWN" +syn match autoitStyle "\$DTS_SHOWNONE" +syn match autoitStyle "\$DTS_LONGDATEFORMAT" +syn match autoitStyle "\$DTS_TIMEFORMAT" +syn match autoitStyle "\$DTS_RIGHTALIGN" +syn match autoitStyle "\$DTS_SHORTDATEFORMAT" +" monthcal +syn match autoitStyle "\$MCS_NOTODAY" +syn match autoitStyle "\$MCS_NOTODAYCIRCLE" +syn match autoitStyle "\$MCS_WEEKNUMBERS" +" treeview +syn match autoitStyle "\$TVS_HASBUTTONS" +syn match autoitStyle "\$TVS_HASLINES" +syn match autoitStyle "\$TVS_LINESATROOT" +syn match autoitStyle "\$TVS_DISABLEDRAGDROP" +syn match autoitStyle "\$TVS_SHOWSELALWAYS" +syn match autoitStyle "\$TVS_RTLREADING" +syn match autoitStyle "\$TVS_NOTOOLTIPS" +syn match autoitStyle "\$TVS_CHECKBOXES" +syn match autoitStyle "\$TVS_TRACKSELECT" +syn match autoitStyle "\$TVS_SINGLEEXPAND" +syn match autoitStyle "\$TVS_FULLROWSELECT" +syn match autoitStyle "\$TVS_NOSCROLL" +syn match autoitStyle "\$TVS_NONEVENHEIGHT" +" slider +syn match autoitStyle "\$TBS_AUTOTICKS" +syn match autoitStyle "\$TBS_BOTH" +syn match autoitStyle "\$TBS_BOTTOM" +syn match autoitStyle "\$TBS_HORZ" +syn match autoitStyle "\$TBS_VERT" +syn match autoitStyle "\$TBS_NOTHUMB" +syn match autoitStyle "\$TBS_NOTICKS" +syn match autoitStyle "\$TBS_LEFT" +syn match autoitStyle "\$TBS_RIGHT" +syn match autoitStyle "\$TBS_TOP" +" listview +syn match autoitStyle "\$LVS_ICON" +syn match autoitStyle "\$LVS_REPORT" +syn match autoitStyle "\$LVS_SMALLICON" +syn match autoitStyle "\$LVS_LIST" +syn match autoitStyle "\$LVS_EDITLABELS" +syn match autoitStyle "\$LVS_NOCOLUMNHEADER" +syn match autoitStyle "\$LVS_NOSORTHEADER" +syn match autoitStyle "\$LVS_SINGLESEL" +syn match autoitStyle "\$LVS_SHOWSELALWAYS" +syn match autoitStyle "\$LVS_SORTASCENDING" +syn match autoitStyle "\$LVS_SORTDESCENDING" +" listview extended +syn match autoitStyle "\$LVS_EX_FULLROWSELECT" +syn match autoitStyle "\$LVS_EX_GRIDLINES" +syn match autoitStyle "\$LVS_EX_HEADERDRAGDROP" +syn match autoitStyle "\$LVS_EX_TRACKSELECT" +syn match autoitStyle "\$LVS_EX_CHECKBOXES" +syn match autoitStyle "\$LVS_EX_BORDERSELECT" +syn match autoitStyle "\$LVS_EX_DOUBLEBUFFER" +syn match autoitStyle "\$LVS_EX_FLATSB" +syn match autoitStyle "\$LVS_EX_MULTIWORKAREAS" +syn match autoitStyle "\$LVS_EX_SNAPTOGRID" +syn match autoitStyle "\$LVS_EX_SUBITEMIMAGES" + +" constants - must be defined after autoitVariable - excludes styles +" constants - autoit options +syn match autoitConst "\$OPT_COORDSRELATIVE" +syn match autoitConst "\$OPT_COORDSABSOLUTE" +syn match autoitConst "\$OPT_COORDSCLIENT" +syn match autoitConst "\$OPT_ERRORSILENT" +syn match autoitConst "\$OPT_ERRORFATAL" +syn match autoitConst "\$OPT_CAPSNOSTORE" +syn match autoitConst "\$OPT_CAPSSTORE" +syn match autoitConst "\$OPT_MATCHSTART" +syn match autoitConst "\$OPT_MATCHANY" +syn match autoitConst "\$OPT_MATCHEXACT" +syn match autoitConst "\$OPT_MATCHADVANCED" +" constants - file +syn match autoitConst "\$FC_NOOVERWRITE" +syn match autoitConst "\$FC_OVERWRITE" +syn match autoitConst "\$FT_MODIFIED" +syn match autoitConst "\$FT_CREATED" +syn match autoitConst "\$FT_ACCESSED" +syn match autoitConst "\$FO_READ" +syn match autoitConst "\$FO_APPEND" +syn match autoitConst "\$FO_OVERWRITE" +syn match autoitConst "\$EOF" +syn match autoitConst "\$FD_FILEMUSTEXIST" +syn match autoitConst "\$FD_PATHMUSTEXIST" +syn match autoitConst "\$FD_MULTISELECT" +syn match autoitConst "\$FD_PROMPTCREATENEW" +syn match autoitConst "\$FD_PROMPTOVERWRITE" +" constants - keyboard +syn match autoitConst "\$KB_SENDSPECIAL" +syn match autoitConst "\$KB_SENDRAW" +syn match autoitConst "\$KB_CAPSOFF" +syn match autoitConst "\$KB_CAPSON" +" constants - message box +syn match autoitConst "\$MB_OK" +syn match autoitConst "\$MB_OKCANCEL" +syn match autoitConst "\$MB_ABORTRETRYIGNORE" +syn match autoitConst "\$MB_YESNOCANCEL" +syn match autoitConst "\$MB_YESNO" +syn match autoitConst "\$MB_RETRYCANCEL" +syn match autoitConst "\$MB_ICONHAND" +syn match autoitConst "\$MB_ICONQUESTION" +syn match autoitConst "\$MB_ICONEXCLAMATION" +syn match autoitConst "\$MB_ICONASTERISK" +syn match autoitConst "\$MB_DEFBUTTON1" +syn match autoitConst "\$MB_DEFBUTTON2" +syn match autoitConst "\$MB_DEFBUTTON3" +syn match autoitConst "\$MB_APPLMODAL" +syn match autoitConst "\$MB_SYSTEMMODAL" +syn match autoitConst "\$MB_TASKMODAL" +syn match autoitConst "\$MB_TOPMOST" +syn match autoitConst "\$MB_RIGHTJUSTIFIED" +syn match autoitConst "\$IDTIMEOUT" +syn match autoitConst "\$IDOK" +syn match autoitConst "\$IDCANCEL" +syn match autoitConst "\$IDABORT" +syn match autoitConst "\$IDRETRY" +syn match autoitConst "\$IDIGNORE" +syn match autoitConst "\$IDYES" +syn match autoitConst "\$IDNO" +syn match autoitConst "\$IDTRYAGAIN" +syn match autoitConst "\$IDCONTINUE" +" constants - progress and splash +syn match autoitConst "\$DLG_NOTITLE" +syn match autoitConst "\$DLG_NOTONTOP" +syn match autoitConst "\$DLG_TEXTLEFT" +syn match autoitConst "\$DLG_TEXTRIGHT" +syn match autoitConst "\$DLG_MOVEABLE" +syn match autoitConst "\$DLG_TEXTVCENTER" +" constants - tray tip +syn match autoitConst "\$TIP_ICONNONE" +syn match autoitConst "\$TIP_ICONASTERISK" +syn match autoitConst "\$TIP_ICONEXCLAMATION" +syn match autoitConst "\$TIP_ICONHAND" +syn match autoitConst "\$TIP_NOSOUND" +" constants - mouse +syn match autoitConst "\$IDC_UNKNOWN" +syn match autoitConst "\$IDC_APPSTARTING" +syn match autoitConst "\$IDC_ARROW" +syn match autoitConst "\$IDC_CROSS" +syn match autoitConst "\$IDC_HELP" +syn match autoitConst "\$IDC_IBEAM" +syn match autoitConst "\$IDC_ICON" +syn match autoitConst "\$IDC_NO" +syn match autoitConst "\$IDC_SIZE" +syn match autoitConst "\$IDC_SIZEALL" +syn match autoitConst "\$IDC_SIZENESW" +syn match autoitConst "\$IDC_SIZENS" +syn match autoitConst "\$IDC_SIZENWSE" +syn match autoitConst "\$IDC_SIZEWE" +syn match autoitConst "\$IDC_UPARROW" +syn match autoitConst "\$IDC_WAIT" +" constants - process +syn match autoitConst "\$SD_LOGOFF" +syn match autoitConst "\$SD_SHUTDOWN" +syn match autoitConst "\$SD_REBOOT" +syn match autoitConst "\$SD_FORCE" +syn match autoitConst "\$SD_POWERDOWN" +" constants - string +syn match autoitConst "\$STR_NOCASESENSE" +syn match autoitConst "\$STR_CASESENSE" +syn match autoitConst "\STR_STRIPLEADING" +syn match autoitConst "\$STR_STRIPTRAILING" +syn match autoitConst "\$STR_STRIPSPACES" +syn match autoitConst "\$STR_STRIPALL" +" constants - tray +syn match autoitConst "\$TRAY_ITEM_EXIT" +syn match autoitConst "\$TRAY_ITEM_PAUSE" +syn match autoitConst "\$TRAY_ITEM_FIRST" +syn match autoitConst "\$TRAY_CHECKED" +syn match autoitConst "\$TRAY_UNCHECKED" +syn match autoitConst "\$TRAY_ENABLE" +syn match autoitConst "\$TRAY_DISABLE" +syn match autoitConst "\$TRAY_FOCUS" +syn match autoitConst "\$TRAY_DEFAULT" +syn match autoitConst "\$TRAY_EVENT_SHOWICON" +syn match autoitConst "\$TRAY_EVENT_HIDEICON" +syn match autoitConst "\$TRAY_EVENT_FLASHICON" +syn match autoitConst "\$TRAY_EVENT_NOFLASHICON" +syn match autoitConst "\$TRAY_EVENT_PRIMARYDOWN" +syn match autoitConst "\$TRAY_EVENT_PRIMARYUP" +syn match autoitConst "\$TRAY_EVENT_SECONDARYDOWN" +syn match autoitConst "\$TRAY_EVENT_SECONDARYUP" +syn match autoitConst "\$TRAY_EVENT_MOUSEOVER" +syn match autoitConst "\$TRAY_EVENT_MOUSEOUT" +syn match autoitConst "\$TRAY_EVENT_PRIMARYDOUBLE" +syn match autoitConst "\$TRAY_EVENT_SECONDARYDOUBLE" +" constants - stdio +syn match autoitConst "\$STDIN_CHILD" +syn match autoitConst "\$STDOUT_CHILD" +syn match autoitConst "\$STDERR_CHILD" +" constants - color +syn match autoitConst "\$COLOR_BLACK" +syn match autoitConst "\$COLOR_SILVER" +syn match autoitConst "\$COLOR_GRAY" +syn match autoitConst "\$COLOR_WHITE" +syn match autoitConst "\$COLOR_MAROON" +syn match autoitConst "\$COLOR_RED" +syn match autoitConst "\$COLOR_PURPLE" +syn match autoitConst "\$COLOR_FUCHSIA" +syn match autoitConst "\$COLOR_GREEN" +syn match autoitConst "\$COLOR_LIME" +syn match autoitConst "\$COLOR_OLIVE" +syn match autoitConst "\$COLOR_YELLOW" +syn match autoitConst "\$COLOR_NAVY" +syn match autoitConst "\$COLOR_BLUE" +syn match autoitConst "\$COLOR_TEAL" +syn match autoitConst "\$COLOR_AQUA" +" constants - reg value type +syn match autoitConst "\$REG_NONE" +syn match autoitConst "\$REG_SZ" +syn match autoitConst "\$REG_EXPAND_SZ" +syn match autoitConst "\$REG_BINARY" +syn match autoitConst "\$REG_DWORD" +syn match autoitConst "\$REG_DWORD_BIG_ENDIAN" +syn match autoitConst "\$REG_LINK" +syn match autoitConst "\$REG_MULTI_SZ" +syn match autoitConst "\$REG_RESOURCE_LIST" +syn match autoitConst "\$REG_FULL_RESOURCE_DESCRIPTOR" +syn match autoitConst "\$REG_RESOURCE_REQUIREMENTS_LIST" +" guiconstants - events and messages +syn match autoitConst "\$GUI_EVENT_CLOSE" +syn match autoitConst "\$GUI_EVENT_MINIMIZE" +syn match autoitConst "\$GUI_EVENT_RESTORE" +syn match autoitConst "\$GUI_EVENT_MAXIMIZE" +syn match autoitConst "\$GUI_EVENT_PRIMARYDOWN" +syn match autoitConst "\$GUI_EVENT_PRIMARYUP" +syn match autoitConst "\$GUI_EVENT_SECONDARYDOWN" +syn match autoitConst "\$GUI_EVENT_SECONDARYUP" +syn match autoitConst "\$GUI_EVENT_MOUSEMOVE" +syn match autoitConst "\$GUI_EVENT_RESIZED" +syn match autoitConst "\$GUI_EVENT_DROPPED" +syn match autoitConst "\$GUI_RUNDEFMSG" +" guiconstants - state +syn match autoitConst "\$GUI_AVISTOP" +syn match autoitConst "\$GUI_AVISTART" +syn match autoitConst "\$GUI_AVICLOSE" +syn match autoitConst "\$GUI_CHECKED" +syn match autoitConst "\$GUI_INDETERMINATE" +syn match autoitConst "\$GUI_UNCHECKED" +syn match autoitConst "\$GUI_DROPACCEPTED" +syn match autoitConst "\$GUI_DROPNOTACCEPTED" +syn match autoitConst "\$GUI_ACCEPTFILES" +syn match autoitConst "\$GUI_SHOW" +syn match autoitConst "\$GUI_HIDE" +syn match autoitConst "\$GUI_ENABLE" +syn match autoitConst "\$GUI_DISABLE" +syn match autoitConst "\$GUI_FOCUS" +syn match autoitConst "\$GUI_NOFOCUS" +syn match autoitConst "\$GUI_DEFBUTTON" +syn match autoitConst "\$GUI_EXPAND" +syn match autoitConst "\$GUI_ONTOP" +" guiconstants - font +syn match autoitConst "\$GUI_FONTITALIC" +syn match autoitConst "\$GUI_FONTUNDER" +syn match autoitConst "\$GUI_FONTSTRIKE" +" guiconstants - resizing +syn match autoitConst "\$GUI_DOCKAUTO" +syn match autoitConst "\$GUI_DOCKLEFT" +syn match autoitConst "\$GUI_DOCKRIGHT" +syn match autoitConst "\$GUI_DOCKHCENTER" +syn match autoitConst "\$GUI_DOCKTOP" +syn match autoitConst "\$GUI_DOCKBOTTOM" +syn match autoitConst "\$GUI_DOCKVCENTER" +syn match autoitConst "\$GUI_DOCKWIDTH" +syn match autoitConst "\$GUI_DOCKHEIGHT" +syn match autoitConst "\$GUI_DOCKSIZE" +syn match autoitConst "\$GUI_DOCKMENUBAR" +syn match autoitConst "\$GUI_DOCKSTATEBAR" +syn match autoitConst "\$GUI_DOCKALL" +syn match autoitConst "\$GUI_DOCKBORDERS" +" guiconstants - graphic +syn match autoitConst "\$GUI_GR_CLOSE" +syn match autoitConst "\$GUI_GR_LINE" +syn match autoitConst "\$GUI_GR_BEZIER" +syn match autoitConst "\$GUI_GR_MOVE" +syn match autoitConst "\$GUI_GR_COLOR" +syn match autoitConst "\$GUI_GR_RECT" +syn match autoitConst "\$GUI_GR_ELLIPSE" +syn match autoitConst "\$GUI_GR_PIE" +syn match autoitConst "\$GUI_GR_DOT" +syn match autoitConst "\$GUI_GR_PIXEL" +syn match autoitConst "\$GUI_GR_HINT" +syn match autoitConst "\$GUI_GR_REFRESH" +syn match autoitConst "\$GUI_GR_PENSIZE" +syn match autoitConst "\$GUI_GR_NOBKCOLOR" +" guiconstants - control default styles +syn match autoitConst "\$GUI_SS_DEFAULT_AVI" +syn match autoitConst "\$GUI_SS_DEFAULT_BUTTON" +syn match autoitConst "\$GUI_SS_DEFAULT_CHECKBOX" +syn match autoitConst "\$GUI_SS_DEFAULT_COMBO" +syn match autoitConst "\$GUI_SS_DEFAULT_DATE" +syn match autoitConst "\$GUI_SS_DEFAULT_EDIT" +syn match autoitConst "\$GUI_SS_DEFAULT_GRAPHIC" +syn match autoitConst "\$GUI_SS_DEFAULT_GROUP" +syn match autoitConst "\$GUI_SS_DEFAULT_ICON" +syn match autoitConst "\$GUI_SS_DEFAULT_INPUT" +syn match autoitConst "\$GUI_SS_DEFAULT_LABEL" +syn match autoitConst "\$GUI_SS_DEFAULT_LIST" +syn match autoitConst "\$GUI_SS_DEFAULT_LISTVIEW" +syn match autoitConst "\$GUI_SS_DEFAULT_MONTHCAL" +syn match autoitConst "\$GUI_SS_DEFAULT_PIC" +syn match autoitConst "\$GUI_SS_DEFAULT_PROGRESS" +syn match autoitConst "\$GUI_SS_DEFAULT_RADIO" +syn match autoitConst "\$GUI_SS_DEFAULT_SLIDER" +syn match autoitConst "\$GUI_SS_DEFAULT_TAB" +syn match autoitConst "\$GUI_SS_DEFAULT_TREEVIEW" +syn match autoitConst "\$GUI_SS_DEFAULT_UPDOWN" +syn match autoitConst "\$GUI_SS_DEFAULT_GUI" +" guiconstants - background color special flags +syn match autoitConst "\$GUI_BKCOLOR_DEFAULT" +syn match autoitConst "\$GUI_BKCOLOR_LV_ALTERNATE" +syn match autoitConst "\$GUI_BKCOLOR_TRANSPARENT" + +" registry constants +syn match autoitConst "\([\"\']\)REG_BINARY\1" +syn match autoitConst "\([\"\']\)REG_SZ\1" +syn match autoitConst "\([\"\']\)REG_MULTI_SZ\1" +syn match autoitConst "\([\"\']\)REG_EXPAND_SZ\1" +syn match autoitConst "\([\"\']\)REG_DWORD\1" + +" Define the default highlighting. +" Unused colors: Underlined, Ignore, Error, Todo +hi def link autoitFunction Statement " yellow/yellow +hi def link autoitKeyword Statement +hi def link autoitOperator Operator +hi def link autoitVarSelector Operator +hi def link autoitComment Comment " cyan/blue +hi def link autoitParen Comment +hi def link autoitComma Comment +hi def link autoitBracket Comment +hi def link autoitNumber Constant " magenta/red +hi def link autoitString Constant +hi def link autoitQuote Constant +hi def link autoitIncluded Constant +hi def link autoitCont Special " red/orange +hi def link autoitDoubledSingles Special +hi def link autoitDoubledDoubles Special +hi def link autoitCommDelimiter PreProc " blue/magenta +hi def link autoitInclude PreProc +hi def link autoitVariable Identifier " cyan/cyan +hi def link autoitBuiltin Type " green/green +hi def link autoitOption Type +hi def link autoitStyle Type +hi def link autoitConst Type +hi def link autoitSend Type +syn sync minlines=50 diff --git a/runtime/syntax/automake.vim b/runtime/syntax/automake.vim index d0877a5bd..b2dd0f930 100644 --- a/runtime/syntax/automake.vim +++ b/runtime/syntax/automake.vim @@ -1,16 +1,10 @@ " Vim syntax file -" Language: automake Makefile.am -" Maintainer: Debian VIM Maintainers -" Former Maintainer: John Williams -" Last Change: $LastChangedDate: 2006-04-16 22:06:40 -0400 (dom, 16 apr 2006) $ +" Language: automake Makefile.am +" Maintainer: Felipe Contreras +" Former Maintainer: John Williams +" Last Change: $LastChangedDate: 2006-04-16 22:06:40 -0400 (dom, 16 apr 2006) $ " URL: http://svn.debian.org/wsvn/pkg-vim/trunk/runtime/syntax/automake.vim?op=file&rev=0&sc=0 " -" XXX This file is in need of a new maintainer, Debian VIM Maintainers maintain -" it only because patches have been submitted for it by Debian users and the -" former maintainer was MIA (Missing In Action), taking over its -" maintenance was thus the only way to include those patches. -" If you care about this file, and have time to maintain it please do so! -" " This script adds support for automake's Makefile.am format. It highlights " Makefile variables significant to automake as well as highlighting " autoconf-style @variable@ substitutions . Subsitutions are marked as errors @@ -25,11 +19,18 @@ else runtime! syntax/make.vim endif -syn match automakePrimary "^[A-Za-z0-9_]\+\(_PROGRAMS\|LIBRARIES\|_LIST\|_SCRIPTS\|_DATA\|_HEADERS\|_MANS\|_TEXINFOS\|_JAVA\|_LTLIBRARIES\)\s*="me=e-1 +syn match automakePrimary "^[A-Za-z0-9_]\+_\(PROGRAMS\|LIBRARIES\|LISP\|PYTHON\|JAVA\|SCRIPTS\|DATA\|HEADERS\|MANS\|TEXINFOS\|LTLIBRARIES\)\s*="me=e-1 + +syn match automakeSecondary "^[A-Za-z0-9_]\+_\(SOURCES\|AR\|LIBADD\|LDADD\|LDFLAGS\|DEPENDENCIES\|LINK\|SHORTNAME\)\s*="me=e-1 +syn match automakeSecondary "^[A-Za-z0-9_]\+_\(CCASFLAGS\|CFLAGS\|CPPFLAGS\|CXXFLAGS\|FFLAGS\|GCJFLAGS\|LFLAGS\|OBJCFLAGS\|RFLAGS\|YFLAGS\)\s*="me=e-1 + +syn match automakeExtra "^EXTRA_DIST\s*="me=e-1 +syn match automakeExtra "^EXTRA_PROGRAMS\s*="me=e-1 +syn match automakeExtra "^EXTRA_[A-Za-z0-9_]\+_SOURCES\s*="me=e-1 + +" TODO: Check these: syn match automakePrimary "^TESTS\s*="me=e-1 -syn match automakeSecondary "^[A-Za-z0-9_]\+\(_SOURCES\|_LDADD\|_LIBADD\|_LDFLAGS\|_DEPENDENCIES\|_CPPFLAGS\)\s*="me=e-1 syn match automakeSecondary "^OMIT_DEPENDENCIES\s*="me=e-1 -syn match automakeExtra "^EXTRA_[A-Za-z0-9_]\+\s*="me=e-1 syn match automakeOptions "^\(AUTOMAKE_OPTIONS\|ETAGS_ARGS\|TAGS_DEPENDENCIES\)\s*="me=e-1 syn match automakeClean "^\(MOSTLY\|DIST\|MAINTAINER\)\=CLEANFILES\s*="me=e-1 syn match automakeSubdirs "^\(DIST_\)\=SUBDIRS\s*="me=e-1 diff --git a/runtime/syntax/b.vim b/runtime/syntax/b.vim index e97669175..7f6c4e880 100644 --- a/runtime/syntax/b.vim +++ b/runtime/syntax/b.vim @@ -137,6 +137,6 @@ if version >= 508 || !exists("did_b_syntax_inits") delcommand HiLink endif -let current_syntax = "b" +let b:current_syntax = "b" " vim: ts=8 diff --git a/runtime/syntax/bzr.vim b/runtime/syntax/bzr.vim new file mode 100644 index 000000000..afbae1a7d --- /dev/null +++ b/runtime/syntax/bzr.vim @@ -0,0 +1,51 @@ +" Vim syntax file +" Language: Bazaar (bzr) commit file +" Maintainer: Dmitry Vasiliev +" URL: http://www.hlabs.spb.ru/vim/bzr.vim +" Revision: $Id$ +" Filenames: bzr_log.* +" Version: 1.0 + +" For version 5.x: Clear all syntax items. +" For version 6.x: Quit when a syntax file was already loaded. +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +syn region bzrRegion start="^-\{14} This line and the following will be ignored -\{14}$" end="\%$" contains=ALL +syn match bzrRemoved "^removed:$" contained +syn match bzrAdded "^added:$" contained +syn match bzrRenamed "^renamed:$" contained +syn match bzrModified "^modified:$" contained +syn match bzrUnchanged "^unchanged:$" contained +syn match bzrUnknown "^unknown:$" contained + +" Synchronization. +syn sync clear +syn sync match bzrSync grouphere bzrRegion "^-\{14} This line and the following will be ignored -\{14}$"me=s-1 + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already. +" For version 5.8 and later: only when an item doesn't have highlighting yet. +if version >= 508 || !exists("did_bzr_syn_inits") + if version <= 508 + let did_bzr_syn_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink bzrRegion Comment + HiLink bzrRemoved Constant + HiLink bzrAdded Identifier + HiLink bzrModified Special + HiLink bzrRenamed Special + HiLink bzrUnchanged Special + HiLink bzrUnknown Special + + delcommand HiLink +endif + +let b:current_syntax = "bzr" diff --git a/runtime/syntax/c.vim b/runtime/syntax/c.vim index a39fbd80e..7164e14ed 100644 --- a/runtime/syntax/c.vim +++ b/runtime/syntax/c.vim @@ -1,7 +1,7 @@ " Vim syntax file " Language: C " Maintainer: Bram Moolenaar -" Last Change: 2006 May 01 +" Last Change: 2007 Feb 13 " Quit when a (custom) syntax file was already loaded if exists("b:current_syntax") @@ -64,6 +64,9 @@ if exists("c_space_errors") endif endif +" This should be before cErrInParen to avoid problems with #define ({ xxx }) +syntax region cBlock start="{" end="}" transparent fold + "catch errors caused by wrong parenthesis and brackets " also accept <% for {, %> for }, <: for [ and :> for ] (C99) " But avoid matching <::. @@ -132,9 +135,11 @@ if exists("c_comment_strings") syntax region cComment2String contained start=+L\=\\\@]*>" syn match cInclude display "^\s*\(%:\|#\)\s*include\>\s*["<]" contains=cIncluded "syn match cLineSkip "\\$" syn cluster cPreProcGroup contains=cPreCondit,cIncluded,cInclude,cDefine,cErrInParen,cErrInBracket,cUserLabel,cSpecial,cOctalZero,cCppOut,cCppOut2,cCppSkip,cFormat,cNumber,cFloat,cOctal,cOctalError,cNumbersCom,cString,cCommentSkip,cCommentString,cComment2String,@cCommentGroup,cCommentStartError,cParen,cBracket,cMulti -syn region cDefine start="^\s*\(%:\|#\)\s*\(define\|undef\)\>" skip="\\$" end="$" end="//"me=s-1 contains=ALLBUT,@cPreProcGroup,@Spell +syn region cDefine start="^\s*\(%:\|#\)\s*\(define\|undef\)\>" skip="\\$" end="$" end="//"me=s-1 keepend contains=ALLBUT,@cPreProcGroup,@Spell syn region cPreProc start="^\s*\(%:\|#\)\s*\(pragma\>\|line\>\|warning\>\|warn\>\|error\>\)" skip="\\$" end="$" keepend contains=ALLBUT,@cPreProcGroup,@Spell " Highlight User Labels diff --git a/runtime/syntax/cmusrc.vim b/runtime/syntax/cmusrc.vim new file mode 100644 index 000000000..3e84751a9 --- /dev/null +++ b/runtime/syntax/cmusrc.vim @@ -0,0 +1,309 @@ +" Vim syntax file +" Maintainer: Nikolai Weibull +" Latest Revision: 2006-07-22 + +if exists("b:current_syntax") + finish +endif + +let s:cpo_save = &cpo +set cpo&vim + +setlocal iskeyword=@,48-57,_,- + +syn keyword cmusrcTodo contained TODO FIXME XXX NOTE + +syn match cmusrcComment contained display '^\s*#.*$' + +syn match cmusrcBegin display '^' + \ nextgroup=cmusrcKeyword,cmusrcComment + \ skipwhite + +syn keyword cmusrcKeyword contained add + \ nextgroup=cmusrcAddSwitches,cmusrcURI + \ skipwhite + +syn match cmusrcAddSwitches contained display '-[lpqQ]' + \ nextgroup=cmusrcURI + \ skipwhite + +syn match cmusrcURI contained display '.\+' + +syn keyword cmusrcKeyword contained bind + \ nextgroup=cmusrcBindSwitches, + \ cmusrcBindContext + \ skipwhite + +syn match cmusrcBindSwitches contained display '-[f]' + \ nextgroup=cmusrcBindContext + \ skipwhite + +syn keyword cmusrcBindContext contained common library playlist queue + \ browser filters + \ nextgroup=cmusrcBindKey + \ skipwhite + +syn match cmusrcBindKey contained display '\S\+' + \ nextgroup=cmusrcKeyword + \ skipwhite + +syn keyword cmusrcKeyword contained browser-up colorscheme echo factivate + \ filter invert player-next player-pause + \ player-play player-prev player-stop quit + \ refresh run search-next search-prev shuffle + \ unmark win-activate win-add-l win-add-p + \ win-add-Q win-add-q win-bottom win-down + \ win-mv-after win-mv-before win-next + \ win-page-down win-page-up win-remove + \ win-sel-cur win-toggle win-top win-up + \ win-update + +syn keyword cmusrcKeyword contained cd + \ nextgroup=cmusrcDirectory + \ skipwhite + +syn match cmusrcDirectory contained display '.\+' + +syn keyword cmusrcKeyword contained clear + \ nextgroup=cmusrcClearSwitches + +syn match cmusrcClearSwitches contained display '-[lpq]' + +syn keyword cmusrcKeyword contained fset + \ nextgroup=cmusrcFSetName + \ skipwhite + +syn match cmusrcFSetName contained display '[^=]\+' + \ nextgroup=cmusrcFSetEq + +syn match cmusrcFSetEq contained display '=' + \ nextgroup=cmusrcFilterExpr + +syn match cmusrcFilterExpr contained display '.\+' + +syn keyword cmusrcKeyword contained load + \ nextgroup=cmusrcLoadSwitches,cmusrcURI + \ skipwhite + +syn match cmusrcLoadSwitches contained display '-[lp]' + \ nextgroup=cmusrcURI + \ skipwhite + +syn keyword cmusrcKeyword contained mark + \ nextgroup=cmusrcFilterExpr + +syn keyword cmusrcKeyword contained save + \ nextgroup=cmusrcSaveSwitches,cmusrcFile + \ skipwhite + +syn match cmusrcSaveSwitches contained display '-[lp]' + \ nextgroup=cmusrcFile + \ skipwhite + +syn match cmusrcFile contained display '.\+' + +syn keyword cmusrcKeyword contained seek + \ nextgroup=cmusrcSeekOffset + \ skipwhite + +syn match cmusrcSeekOffset contained display + \ '[+-]\=\%(\d\+[mh]\=\|\%(\%(0\=\d\|[1-5]\d\):\)\=\%(0\=\d\|[1-5]\d\):\%(0\=\d\|[1-5]\d\)\)' + +syn keyword cmusrcKeyword contained set + \ nextgroup=cmusrcOption + \ skipwhite + +syn keyword cmusrcOption contained auto_reshuffle confirm_run + \ continue play_library play_sorted repeat + \ show_hidden show_remaining_time shuffle + \ nextgroup=cmusrcSetTest,cmusrcOptEqBoolean + +syn match cmusrcSetTest contained display '?' + +syn match cmusrcOptEqBoolean contained display '=' + \ nextgroup=cmusrcOptBoolean + +syn keyword cmusrcOptBoolean contained true false + +syn keyword cmusrcOption contained aaa_mode + \ nextgroup=cmusrcOptEqAAA + +syn match cmusrcOptEqAAA contained display '=' + \ nextgroup=cmusrcOptAAA + +syn keyword cmusrcOptAAA contained all artist album + +syn keyword cmusrcOption contained buffer_seconds + \ nextgroup=cmusrcOptEqNumber + +syn match cmusrcOptEqNumber contained display '=' + \ nextgroup=cmusrcOptNumber + +syn match cmusrcOptNumber contained display '\d\+' + +syn keyword cmusrcOption contained altformat_current altformat_playlist + \ altformat_title altformat_trackwin + \ format_current format_playlist format_title + \ format_trackwin + \ nextgroup=cmusrcOptEqFormat + +syn match cmusrcOptEqFormat contained display '=' + \ nextgroup=cmusrcOptFormat + +syn match cmusrcOptFormat contained display '.\+' + \ contains=cmusrcFormatSpecial + +syn match cmusrcFormatSpecial contained display '%[0-]*\d*[alDntgydfF=%]' + +syn keyword cmusrcOption contained color_cmdline_bg color_cmdline_fg + \ color_error color_info color_separator + \ color_statusline_bg color_statusline_fg + \ color_titleline_bg color_titleline_fg + \ color_win_bg color_win_cur + \ color_win_cur_sel_bg color_win_cur_sel_fg + \ color_win_dir color_win_fg + \ color_win_inactive_cur_sel_bg + \ color_win_inactive_cur_sel_fg + \ color_win_inactive_sel_bg + \ color_win_inactive_sel_fg + \ color_win_sel_bg color_win_sel_fg + \ color_win_title_bg color_win_title_fg + \ nextgroup=cmusrcOptEqColor + +syn match cmusrcOptEqColor contained display '=' + \ nextgroup=@cmusrcOptColor + +syn cluster cmusrcOptColor contains=cmusrcOptColorName,cmusrcOptColorValue + +syn keyword cmusrcOptColorName contained default black red green yellow blue + \ magenta cyan gray darkgray lightred lightred + \ lightgreen lightyellow lightblue lightmagenta + \ lightcyan white + +syn match cmusrcOptColorValue contained display + \ '-1\|0*\%(\d\|[1-9]\d\|1\d\d\|2\%([0-4]\d\|5[0-5]\)\)' + +syn keyword cmusrcOption contained id3_default_charset output_plugin + \ status_display_program + \ nextgroup=cmusrcOptEqString + +syn match cmusrcOption contained + \ '\%(dsp\|mixer\)\.\%(alsa\|oss\|sun\)\.\%(channel\|device\)' + \ nextgroup=cmusrcOptEqString + +syn match cmusrcOption contained + \ 'dsp\.ao\.\%(buffer_size\|driver\|wav_counter\|wav_dir\)' + \ nextgroup=cmusrcOptEqString + +syn match cmusrcOptEqString contained display '=' + \ nextgroup=cmusrcOptString + +syn match cmusrcOptString contained display '.\+' + +syn keyword cmusrcOption contained lib_sort pl_sort + \ nextgroup=cmusrcOptEqSortKeys + +syn match cmusrcOptEqSortKeys contained display '=' + \ nextgroup=cmusrcOptSortKeys + +syn keyword cmusrcOptSortKeys contained artist album title tracknumber + \ discnumber date genre filename + \ nextgroup=cmusrcOptSortKeys + \ skipwhite + +syn keyword cmusrcKeyword contained showbind + \ nextgroup=cmusrcSBindContext + \ skipwhite + +syn keyword cmusrcSBindContext contained common library playlist queue + \ browser filters + \ nextgroup=cmusrcSBindKey + \ skipwhite + +syn match cmusrcSBindKey contained display '\S\+' + +syn keyword cmusrcKeyword contained toggle + \ nextgroup=cmusrcTogglableOpt + \ skipwhite + +syn keyword cmusrcTogglableOpt contained auto_reshuffle aaa_mode + \ confirm_run continue play_library play_sorted + \ repeat show_hidden show_remaining_time shuffle + +syn keyword cmusrcKeyword contained unbind + \ nextgroup=cmusrcUnbindSwitches, + \ cmusrcSBindContext + \ skipwhite + +syn match cmusrcUnbindSwitches contained display '-[f]' + \ nextgroup=cmusrcSBindContext + \ skipwhite + +syn keyword cmusrcKeyword contained view + \ nextgroup=cmusrcView + \ skipwhite + +syn keyword cmusrcView contained library playlist queue browser filters +syn match cmusrcView contained display '[1-6]' + +syn keyword cmusrcKeyword contained vol + \ nextgroup=cmusrcVolume1 + \ skipwhite + +syn match cmusrcVolume1 contained display '[+-]\=\d\+%' + \ nextgroup=cmusrcVolume2 + \ skipwhite + +syn match cmusrcVolume2 contained display '[+-]\=\d\+%' + +hi def link cmusrcTodo Todo +hi def link cmusrcComment Comment +hi def link cmusrcKeyword Keyword +hi def link cmusrcSwitches Special +hi def link cmusrcAddSwitches cmusrcSwitches +hi def link cmusrcURI Normal +hi def link cmusrcBindSwitches cmusrcSwitches +hi def link cmusrcContext Type +hi def link cmusrcBindContext cmusrcContext +hi def link cmusrcKey String +hi def link cmusrcBindKey cmusrcKey +hi def link cmusrcDirectory Normal +hi def link cmusrcClearSwitches cmusrcSwitches +hi def link cmusrcFSetName PreProc +hi def link cmusrcEq Normal +hi def link cmusrcFSetEq cmusrcEq +hi def link cmusrcFilterExpr Normal +hi def link cmusrcLoadSwitches cmusrcSwitches +hi def link cmusrcSaveSwitches cmusrcSwitches +hi def link cmusrcFile Normal +hi def link cmusrcSeekOffset Number +hi def link cmusrcOption PreProc +hi def link cmusrcSetTest Normal +hi def link cmusrcOptBoolean Boolean +hi def link cmusrcOptEqAAA cmusrcEq +hi def link cmusrcOptAAA Identifier +hi def link cmusrcOptEqNumber cmusrcEq +hi def link cmusrcOptNumber Number +hi def link cmusrcOptEqFormat cmusrcEq +hi def link cmusrcOptFormat String +hi def link cmusrcFormatSpecial SpecialChar +hi def link cmusrcOptEqColor cmusrcEq +hi def link cmusrcOptColor Normal +hi def link cmusrcOptColorName cmusrcOptColor +hi def link cmusrcOptColorValue cmusrcOptColor +hi def link cmusrcOptEqString cmusrcEq +hi def link cmusrcOptString Normal +hi def link cmusrcOptEqSortKeys cmusrcEq +hi def link cmusrcOptSortKeys Identifier +hi def link cmusrcSBindContext cmusrcContext +hi def link cmusrcSBindKey cmusrcKey +hi def link cmusrcTogglableOpt cmusrcOption +hi def link cmusrcUnbindSwitches cmusrcSwitches +hi def link cmusrcView Normal +hi def link cmusrcVolume1 Number +hi def link cmusrcVolume2 Number + +let b:current_syntax = "cmusrc" + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/runtime/syntax/csh.vim b/runtime/syntax/csh.vim index be8bfc2ad..39603fa15 100644 --- a/runtime/syntax/csh.vim +++ b/runtime/syntax/csh.vim @@ -1,8 +1,8 @@ " Vim syntax file " Language: C-shell (csh) " Maintainer: Dr. Charles E. Campbell, Jr. -" Version: 9 -" Last Change: Sep 06, 2005 +" Version: 10 +" Last Change: Sep 11, 2006 " URL: http://mysite.verizon.net/astronaut/vim/index.html#vimlinks_syntax " For version 5.x: Clear all syntax items @@ -35,12 +35,12 @@ syn match cshNoEndlineDQ contained "[^\"]\(\\\\\)*$" syn match cshNoEndlineSQ contained "[^\']\(\\\\\)*$" syn match cshNoEndlineBQ contained "[^\`]\(\\\\\)*$" -syn region cshDblQuote start=+[^\\]"+lc=1 skip=+\\\\\|\\"+ end=+"+ contains=cshSpecial,cshShellVariables,cshExtVar,cshSelector,cshQtyWord,cshArgv,cshSubst,cshNoEndlineDQ,cshBckQuote -syn region cshSnglQuote start=+[^\\]'+lc=1 skip=+\\\\\|\\'+ end=+'+ contains=cshNoEndlineSQ -syn region cshBckQuote start=+[^\\]`+lc=1 skip=+\\\\\|\\`+ end=+`+ contains=cshNoEndlineBQ -syn region cshDblQuote start=+^"+ skip=+\\\\\|\\"+ end=+"+ contains=cshSpecial,cshExtVar,cshSelector,cshQtyWord,cshArgv,cshSubst,cshNoEndlineDQ -syn region cshSnglQuote start=+^'+ skip=+\\\\\|\\'+ end=+'+ contains=cshNoEndlineSQ -syn region cshBckQuote start=+^`+ skip=+\\\\\|\\`+ end=+`+ contains=cshNoEndlineBQ +syn region cshDblQuote start=+[^\\]"+lc=1 skip=+\\\\\|\\"+ end=+"+ contains=cshSpecial,cshShellVariables,cshExtVar,cshSelector,cshQtyWord,cshArgv,cshSubst,cshNoEndlineDQ,cshBckQuote,@Spell +syn region cshSnglQuote start=+[^\\]'+lc=1 skip=+\\\\\|\\'+ end=+'+ contains=cshNoEndlineSQ,@Spell +syn region cshBckQuote start=+[^\\]`+lc=1 skip=+\\\\\|\\`+ end=+`+ contains=cshNoEndlineBQ,@Spell +syn region cshDblQuote start=+^"+ skip=+\\\\\|\\"+ end=+"+ contains=cshSpecial,cshExtVar,cshSelector,cshQtyWord,cshArgv,cshSubst,cshNoEndlineDQ,@Spell +syn region cshSnglQuote start=+^'+ skip=+\\\\\|\\'+ end=+'+ contains=cshNoEndlineSQ,@Spell +syn region cshBckQuote start=+^`+ skip=+\\\\\|\\`+ end=+`+ contains=cshNoEndlineBQ,@Spell syn cluster cshCommentGroup contains=cshTodo,@Spell syn match cshComment "#.*$" contains=@cshCommentGroup diff --git a/runtime/syntax/dcl.vim b/runtime/syntax/dcl.vim index 77515bc5f..b051b08cf 100644 --- a/runtime/syntax/dcl.vim +++ b/runtime/syntax/dcl.vim @@ -1,8 +1,8 @@ " Vim syntax file " Language: DCL (Digital Command Language - vms) " Maintainer: Dr. Charles E. Campbell, Jr. -" Last Change: Apr 12, 2006 -" Version: 5 +" Last Change: Sep 11, 2006 +" Version: 6 " URL: http://mysite.verizon.net/astronaut/vim/index.html#vimlinks_syntax " For version 5.x: Clear all syntax items @@ -75,7 +75,7 @@ syn match dclFilename "\I\i*\.\(\I\i*\)\=\(;\d\+\)\=" contains=dclDirSep conta syn match dclDirSep "[[\].;]" " Strings -syn region dclString start='"' skip='""' end='"' +syn region dclString start='"' skip='""' end='"' contains=@Spell " $ stuff and comments syn cluster dclCommentGroup contains=dclStart,dclTodo,@Spell diff --git a/runtime/syntax/desc.vim b/runtime/syntax/desc.vim index a454fb055..ca47176ff 100644 --- a/runtime/syntax/desc.vim +++ b/runtime/syntax/desc.vim @@ -1,7 +1,7 @@ " Vim syntax file " Language: T2 / ROCK Linux .desc " Maintainer: René Rebe , Piotr Esden-Tempski -" Last Change: 2006 Mar 30 +" Last Change: 2006 Aug 14 " For version 5.x: Clear all syntax items " For version 6.x: Quit when a syntax file was already loaded @@ -14,7 +14,7 @@ endif " syntax definitions setl iskeyword+=- -syn keyword descFlag DIETLIBC KAFFE JAIL FPIC-QUIRK NO-LIBTOOL-QUIRK AUTOMAKE-QUIRK NO-AS-NEEDED NO-SSP contained +syn keyword descFlag DIETLIBC KAFFE JAIL NOPARALLEL FPIC-QUIRK LIBTOOL-WUIRK NO-LIBTOOL-FIX AUTOMAKE-QUIRK NO-AS-NEEDED NO-SSP KERNEL INIT LIBC CC CXX F77 KCC contained syn keyword descLicense Unknown GPL LGPL FDL MIT BSD OpenSource Free-to-use Commercial contained " tags diff --git a/runtime/syntax/elmfilt.vim b/runtime/syntax/elmfilt.vim index 05e8cb8e9..0afa1694c 100644 --- a/runtime/syntax/elmfilt.vim +++ b/runtime/syntax/elmfilt.vim @@ -1,8 +1,8 @@ " Vim syntax file " Language: Elm Filter rules " Maintainer: Dr. Charles E. Campbell, Jr. -" Last Change: Sep 06, 2005 -" Version: 4 +" Last Change: Sep 11, 2006 +" Version: 5 " URL: http://mysite.verizon.net/astronaut/vim/index.html#vimlinks_syntax " For version 5.x: Clear all syntax items @@ -33,8 +33,8 @@ syn match elmfiltNumber contained "\d\+" syn keyword elmfiltOperKey contained and not skipnl skipwhite nextgroup=elmfiltOper,elmfiltOperKey,elmfiltString syn match elmfiltOper contained "\~" skipnl skipwhite nextgroup=elmfiltMatch syn match elmfiltOper contained "<=\|>=\|!=\|<\|<\|=" skipnl skipwhite nextgroup=elmfiltString,elmfiltCond,elmfiltOperKey -syn region elmfiltString contained start='"' skip='"\(\\\\\)*\\["%]' end='"' contains=elmfiltArg skipnl skipwhite nextgroup=elmfiltOper,elmfiltOperKey -syn region elmfiltString contained start="'" skip="'\(\\\\\)*\\['%]" end="'" contains=elmfiltArg skipnl skipwhite nextgroup=elmfiltOper,elmfiltOperKey +syn region elmfiltString contained start='"' skip='"\(\\\\\)*\\["%]' end='"' contains=elmfiltArg skipnl skipwhite nextgroup=elmfiltOper,elmfiltOperKey,@Spell +syn region elmfiltString contained start="'" skip="'\(\\\\\)*\\['%]" end="'" contains=elmfiltArg skipnl skipwhite nextgroup=elmfiltOper,elmfiltOperKey,@Spell syn match elmfiltSpaceError contained "\s.*$" " Define the default highlighting. diff --git a/runtime/syntax/eruby.vim b/runtime/syntax/eruby.vim index 971417c39..3aedc6cfd 100644 --- a/runtime/syntax/eruby.vim +++ b/runtime/syntax/eruby.vim @@ -29,10 +29,10 @@ endif syn cluster erubyRegions contains=erubyOneLiner,erubyBlock,erubyExpression,erubyComment -syn region erubyOneLiner matchgroup=erubyDelimiter start="^%%\@!" end="$" contains=@rubyTop containedin=ALLBUT,@erubyRegions keepend oneline -syn region erubyBlock matchgroup=erubyDelimiter start="<%%\@!" end="%>" contains=@rubyTop containedin=ALLBUT,@erubyRegions -syn region erubyExpression matchgroup=erubyDelimiter start="<%=" end="%>" contains=@rubyTop containedin=ALLBUT,@erubyRegions -syn region erubyComment matchgroup=erubyDelimiter start="<%#" end="%>" contains=rubyTodo,@Spell containedin=ALLBUT,@erubyRegions keepend +syn region erubyOneLiner matchgroup=erubyDelimiter start="^%%\@!" end="$" contains=@rubyTop containedin=ALLBUT,@erubyRegions keepend oneline +syn region erubyBlock matchgroup=erubyDelimiter start="<%%\@!-\=" end="-\=%>" contains=@rubyTop containedin=ALLBUT,@erubyRegions +syn region erubyExpression matchgroup=erubyDelimiter start="<%=" end="-\=%>" contains=@rubyTop containedin=ALLBUT,@erubyRegions +syn region erubyComment matchgroup=erubyDelimiter start="<%#" end="-\=%>" contains=rubyTodo,@Spell containedin=ALLBUT,@erubyRegions keepend " Define the default highlighting. " For version 5.7 and earlier: only when not done already diff --git a/runtime/syntax/foxpro.vim b/runtime/syntax/foxpro.vim index 8fabd2325..ca5d7e2f9 100644 --- a/runtime/syntax/foxpro.vim +++ b/runtime/syntax/foxpro.vim @@ -1,16 +1,46 @@ " Vim syntax file -" Language: FoxPro for DOS v2.x -" Maintainer: Powing Tse -" Last Change: 06 September 2001 +" Filename: foxpro.vim +" Version: 1.0 +" Language: FoxPro for DOS/UNIX v2.6 +" Maintainer: Bill W. Smith, Jr. +" Last Change: 15 May 2006 -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded +" This file replaces the FoxPro for DOS v2.x syntax file +" maintained by Powing Tse +" +" Change Log: added support for FoxPro Codebook highlighting +" corrected highlighting of comments that do NOT start in col 1 +" corrected highlighting of comments at end of line (&&) +" +" if version < 600 syntax clear elseif exists("b:current_syntax") finish endif +" FoxPro Codebook Naming Conventions +syn match foxproCBConst "\<[c][A-Z][A-Za-z0-9_]*\>" +syn match foxproCBVar "\<[lgrt][acndlmf][A-Z][A-Za-z0-9_]*\>" +syn match foxproCBField "\<[a-z0-9]*\.[A-Za-z0-9_]*\>" +" PROPER CodeBook field names start with the data type and do NOT have _ +syn match foxproCBField "\<[A-Za-z0-9]*\.[acndlm][A-Z][A-Za-z0-9]*\>" +syn match foxproCBWin "\" +" CodeBook 2.0 defined objects as follows +" This uses the hotkey from the screen builder as the second character +syn match foxproCBObject "\<[lgr][bfthnkoli][A-Z][A-Za-z0-9_]*\>" +" A later version added the following conventions for objects +syn match foxproCBObject "\" +syn match foxproCBObject "\" +syn match foxproCBObject "\" +syn match foxproCBObject "\" +syn match foxproCBObject "\" +syn match foxproCBObject "\" +syn match foxproCBObject "\" +syn match foxproCBObject "\" +syn match foxproCBObject "\" +syn match foxproCBObject "\" + syntax case ignore " Highlight special characters @@ -685,6 +715,11 @@ if version >= 508 || !exists("did_foxpro_syn_inits") HiLink foxproFloat Float HiLink foxproComment Comment HiLink foxproParenErr Error + HiLink foxproCBConst PreProc + HiLink foxproCBField Special + HiLink foxproCBVar Identifier + HiLink foxproCBWin Special + HiLink foxproCBObject Identifier delcommand HiLink endif diff --git a/runtime/syntax/fvwm.vim b/runtime/syntax/fvwm.vim index ff1b78399..43b7abcfc 100644 --- a/runtime/syntax/fvwm.vim +++ b/runtime/syntax/fvwm.vim @@ -1,15 +1,15 @@ " Vim syntax file -" Language: Fvwm{1,2} configuration file -" Maintainer: Haakon Riiser -" Last Change: 2002 Jun 2 +" Language: Fvwm{1,2} configuration file +" Maintainer: Gautam Iyer +" Previous Maintainer: Haakon Riiser +" Last Change: Sat 04 Nov 2006 11:28:37 PM PST " " Thanks to David Necas (Yeti) for adding Fvwm 2.4 support. +" +" 2006-05-09 gi1242: Rewrote fvwm2 syntax completely. Also since fvwm1 is now +" mostly obsolete, made the syntax file pick fvwm2 syntax by default. -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syn clear -elseif exists("b:current_syntax") +if exists("b:current_syntax") finish endif @@ -18,332 +18,600 @@ syn case ignore " Identifiers in Fvwm can contain most characters, so we only " include the most common ones here. -if version >= 600 - setlocal iskeyword=_,-,+,.,a-z,A-Z,48-57 -else - set iskeyword=_,-,+,.,a-z,A-Z,48-57 -endif +setlocal iskeyword=_,-,+,.,a-z,A-Z,48-57 -" Read system colors from the color database (rgb.txt) -if exists("rgb_file") - " We don't want any hit-return prompts, so we make sure that - " &shortmess is set to `O' - let __fvwm_oldshm = &shortmess - set shortmess=O - - " And we set &report to a huge number, so that no hit-return prompts - " will be given - let __fvwm_oldreport = &report - set report=10000 - - " Append the color database to the fvwm configuration, and read the - " colors from this buffer - let __fvwm_i = line("$") + 1 - exe "$r" rgb_file - let __fvwm_lastline = line("$") - while __fvwm_i <= __fvwm_lastline - let __fvwm_s = matchstr(getline(__fvwm_i), '^\s*\d\+\s\+\d\+\s\+\d\+\s\+\h.*$') - if __fvwm_s != "" - exe "syn keyword fvwmColors ".substitute(__fvwm_s, '^\s*\d\+\s\+\d\+\s\+\d\+\s\+\(\h.*\)$', '\1', "") - endif - let __fvwm_i = __fvwm_i + 1 - endwhile - - " Remove the appended data - undo - - " Goto first line again - 1 - - " and restore the old values of the variables - let &shortmess = __fvwm_oldshm - let &report = __fvwm_oldreport - unlet __fvwm_i __fvwm_s __fvwm_lastline __fvwm_oldshm __fvwm_oldreport -endif -" done reading colors - -syn match fvwmWhitespace "\s\+" contained +" Syntax items common to fvwm1 and fvwm2 config files +syn cluster fvwmConstants contains=fvwmEnvVar,fvwmNumber syn match fvwmEnvVar "\$\w\+" -syn match fvwmModConf "^\s*\*\a\+" contains=fvwmWhitespace -syn match fvwmString '".\{-}"' +syn match fvwmNumber '\v<(\d+|0x[0-9a-f]+)>' + +syn match fvwmModConf nextgroup=fvwmModArg "\v^\s*\*\a+" +syn region fvwmModArg contained contains=fvwmString,fvwmRGBValue + \ start='.' skip='\\$' end='$' + +syn region fvwmString contains=fvwmBackslash start='"' + \ matchgroup=fvwmBackslash skip='\v\\"' end='"' +syn region fvwmString contains=fvwmBackslash start='`' + \ matchgroup=fvwmBackslash skip='\v\\`' end='`' +syn region fvwmString contains=fvwmBackslash start="'" + \ matchgroup=fvwmBackslash skip="\v\\'" end="'" +syn match fvwmBackslash contained '\\[^"'`]' + syn match fvwmRGBValue "#\x\{3}" syn match fvwmRGBValue "#\x\{6}" syn match fvwmRGBValue "#\x\{9}" syn match fvwmRGBValue "#\x\{12}" syn match fvwmRGBValue "rgb:\x\{1,4}/\x\{1,4}/\x\{1,4}" -syn match fvwmPath "\= 508 || !exists("did_fvwm_syntax_inits") - if version < 508 - let did_fvwm_syntax_inits = 1 - command -nargs=+ HiLink hi link - else - command -nargs=+ HiLink hi def link - endif - - HiLink fvwmComment Comment - HiLink fvwmEnvVar Macro - HiLink fvwmExec Function - HiLink fvwmFunction Function - HiLink fvwmFunctionName Special - HiLink fvwmContextName Function - HiLink fvwmConditionName Function - HiLink fvwmIcon Comment - HiLink fvwmKey Function - HiLink fvwmKeyword Keyword - HiLink fvwmMenuString String - HiLink fvwmModConf Macro - HiLink fvwmModule Function - HiLink fvwmModuleName Special - HiLink fvwmRGBValue Type - HiLink fvwmShortcutKey SpecialChar - HiLink fvwmString String - - if exists("rgb_file") - HiLink fvwmColors Type - endif - - delcommand HiLink + syn match fvwmDef contains=fvwmMenuString,fvwmWhitespace + \ '^\s*+\s*".\{-}"' + syn region fvwmMenuString contains=fvwmIcon,fvwmShortcutKey + \ start='^\s*+\s*\zs"' skip='\v\\\\|\\\"' end='"' + syn region fvwmIcon contained start='\v\%\%@!' end='%' + syn match fvwmShortcutKey contained "&." + + syn keyword fvwmModuleName FvwmAnimate FvwmAudio FvwmAuto FvwmBacker + \ FvwmBanner FvwmButtons FvwmCommandS + \ FvwmConsole FvwmCpp FvwmDebug FvwmDragWell + \ FvwmEvent FvwmForm FvwmGtk FvwmIconBox + \ FvwmIconMan FvwmIdent FvwmM4 FvwmPager + \ FvwmSave FvwmSaveDesk FvwmScript FvwmScroll + \ FvwmTaskBar FvwmWinList FvwmWharf + " Obsolete fvwmModuleName: FvwmTheme + + syn keyword fvwmKeyword AddToMenu ChangeMenuStyle CopyMenuStyle + \ DestroyMenu DestroyMenuStyle Menu + \ Popup TearMenuOff Title BugOpts BusyCursor + \ ClickTime ColorLimit ColormapFocus + \ DefaultColors DefaultColorset DefaultFont + \ DefaultIcon DefaultLayers Deschedule Emulate + \ EscapeFunc FakeClick FakeKeypress GlobalOpts + \ HilightColor HilightColorset IconFont + \ PrintInfo Repeat Schedule State WindowFont + \ XSync XSynchronize AnimatedMove + \ HideGeometryWindow Layer Lower Move + \ MoveToDesk MoveThreshold MoveToPage + \ MoveToScreen OpaqueMoveSize PlaceAgain Raise + \ RaiseLower ResizeMaximize ResizeMove + \ ResizeMoveMaximize RestackTransients + \ SetAnimation SnapAttraction SnapGrid + \ WindowsDesk XorPixmap XorValue CursorMove + \ FlipFocus Focus WarpToWindow Close Delete + \ Destroy Iconify Recapture RecaptureWindow + \ Refresh RefreshWindow Stick StickAcrossPages + \ StickAcrossDesks WindowShade + \ WindowShadeAnimate IgnoreModifiers + \ EdgeCommand EdgeLeaveCommand GnomeButton + \ Stroke StrokeFunc FocusStyle DestroyStyle + \ UpdateStyles AddToDecor BorderStyle + \ ChangeDecor DestroyDecor UpdateDecor + \ DesktopName DeskTopSize EdgeResistance + \ EdgeScroll EdgeThickness EwmhBaseStruts + \ EWMHNumberOfDesktops GotoDeskAndPage + \ GotoPage Scroll Xinerama + \ XineramaPrimaryScreen XineramaSls + \ XineramaSlsSize XineramaSlsScreens AddToFunc + \ Beep DestroyFunc Echo Exec ExecUseShell + \ Function Nop PipeRead Read SetEnv Silent + \ UnsetEnv Wait DestroyModuleConfig KillModule + \ Module ModuleSynchronous ModuleTimeout + \ SendToModule Quit QuitScreen QuitSession + \ Restart SaveSession SaveQuitSession KeepRc + \ NoWindow Break CleanupColorsets + + " Conditional commands + syn keyword fvwmKeyword nextgroup=fvwmCondition skipwhite + \ All Any Current Next None Pick PointerWindow + \ Prev ThisWindow + syn keyword fvwmKeyword nextgroup=fvwmDirection skipwhite + \ Direction + syn keyword fvwmDirection contained nextgroup=fvwmDirection skipwhite + \ FromPointer + syn keyword fvwmDirection contained nextgroup=fvwmCondition skipwhite + \ North Northeast East Southeast South + \ Southwest West Northwest Center + syn region fvwmCondition contained contains=fvwmCondNames,fvwmString + \ matchgroup=fvwmKeyword start='(' skip=',' + \ end=')' + syn keyword fvwmCondNames contained + \ AcceptsFocus AnyScreen CirculateHit + \ CirculateHitIcon CirculateHitShaded Closable + \ CurrentDesk CurrentGlobalPage + \ CurrentGlobalPageAnyDesk CurrentPage + \ CurrentPageAnyDesk CurrentScreen FixedSize + \ Focused HasHandles HasPointer Iconic + \ Iconifiable Maximizable Maximized + \ Overlapped PlacedByButton3 PlacedByFvwm Raised + \ Shaded Sticky StickyAcrossDesks + \ StickyAcrossPages Transient Visible + syn keyword fvwmCondNames contained skipwhite nextgroup=@fvwmConstants + \ State Layer + + " Test + syn keyword fvwmKeyword nextgroup=fvwmTCond skipwhite + \ Test + syn region fvwmTCond contained contains=fvwmTCNames,fvwmString + \ matchgroup=fvwmKeyword start='(' end=')' + syn keyword fvwmTCNames contained + \ Version EnvIsSet EnvMatch EdgeHasPointer + \ EdgeIsActive Start Init Restart Exit Quit + \ ToRestart True False F R W X I + + " TestRc + syn keyword fvwmKeyword nextgroup=fvwmTRCond skipwhite + \ TestRc + syn region fvwmTRCond contained contains=fvwmTRNames,fvwmNumber + \ matchgroup=fvwmKeyword start='(' end=')' + syn keyword fvwmTRNames contained NoMatch Match Error Break + + " Colorsets + syn keyword fvwmKeyword nextgroup=fvwmCSArgs skipwhite + \ ColorSet + syn region fvwmCSArgs contained transparent contains=fvwmCSNames,@fvwmConstants,fvwmString,fvwmRGBValue,fvwmGradient + \ start='.' skip='\\$' end='$' + syn keyword fvwmCSNames contained + \ fg Fore Foreground bg Back Background hi + \ Hilite Hilight sh Shade Shadow fgsh Pixmap + \ TiledPixmap AspectPixmap RootTransparent + \ Shape TiledShape AspectShape Tint fgTint + \ bgTint Alpha fgAlpha Dither IconTint + \ IconAlpha NoShape Plain Translucent + syn match fvwmCSNames contained '\v' + syn match fvwmGradient contained '\v<[HVDBSCRY]Gradient>' + + " Styles + syn keyword fvwmKeyword nextgroup=fvwmStyleArgs skipwhite + \ Style WindowStyle + syn region fvwmStyleArgs contained transparent contains=fvwmStyleNames,@fvwmConstants,fvwmString,fvwmRGBValue + \ start='.' skip='\\$' end='$' + syn keyword fvwmStyleNames contained + \ BorderWidth HandleWidth NoIcon Icon MiniIcon + \ IconBox IconGrid IconFill IconSize NoTitle + \ Title TitleAtBottom TitleAtLeft TitleAtRight + \ TitleAtTop LeftTitleRotatedCW + \ LeftTitleRotatedCCW RightTitleRotatedCCW + \ RightTitleRotatedCW TopTitleRotated + \ TopTitleNotRotated BottomTitleRotated + \ BottomTitleNotRotated UseTitleDecorRotation + \ StippledTitle StippledTitleOff + \ IndexedWindowName ExactWindowName + \ IndexedIconName ExactIconName Borders + \ NoHandles Handles WindowListSkip + \ WindowListHit CirculateSkip CirculateHit + \ CirculateSkipShaded CirculateHitShaded Layer + \ StaysOnTop StaysOnBottom StaysPut Sticky + \ Slippery StickyAcrossPages StickyAcrossDesks + \ StartIconic StartNormal Color ForeColor + \ BackColor Colorset HilightFore HilightBack + \ HilightColorset BorderColorset + \ HilightBorderColorset IconTitleColorset + \ HilightIconTitleColorset + \ IconBackgroundColorset IconTitleRelief + \ IconBackgroundRelief IconBackgroundPadding + \ Font IconFont StartsOnDesk StartsOnPage + \ StartsAnyWhere StartsOnScreen + \ ManualPlacementHonorsStartsOnPage + \ ManualPlacementIgnoresStartsOnPage + \ CaptureHonorsStartsOnPage + \ CaptureIgnoresStartsOnPage + \ RecaptureHonorsStartsOnPage + \ RecaptureIgnoresStartsOnPage + \ StartsOnPageIncludesTransients + \ StartsOnPageIgnoresTransients IconTitle + \ NoIconTitle MwmButtons FvwmButtons MwmBorder + \ FvwmBorder MwmDecor NoDecorHint MwmFunctions + \ NoFuncHint HintOverride NoOverride NoButton + \ Button ResizeHintOverride NoResizeOverride + \ OLDecor NoOLDecor GNOMEUseHints + \ GNOMEIgnoreHints StickyIcon SlipperyIcon + \ StickyAcrossPagesIcon StickyAcrossDesksIcon + \ ManualPlacement CascadePlacement + \ MinOverlapPlacement + \ MinOverlapPercentPlacement + \ TileManualPlacement TileCascadePlacement + \ CenterPlacement MinOverlapPlacementPenalties + \ MinOverlapPercentPlacementPenalties + \ DecorateTransient NakedTransient + \ DontRaiseTransient RaiseTransient + \ DontLowerTransient LowerTransient + \ DontStackTransientParent + \ StackTransientParent SkipMapping ShowMapping + \ ScatterWindowGroups KeepWindowGroupsOnDesk + \ UseDecor UseStyle NoPPosition UsePPosition + \ NoUSPosition UseUSPosition + \ NoTransientPPosition UseTransientPPosition + \ NoTransientUSPosition UseTransientUSPosition + \ NoIconPosition UseIconPosition Lenience + \ NoLenience ClickToFocus SloppyFocus + \ MouseFocus FocusFollowsMouse NeverFocus + \ ClickToFocusPassesClickOff + \ ClickToFocusPassesClick + \ ClickToFocusRaisesOff ClickToFocusRaises + \ MouseFocusClickRaises + \ MouseFocusClickRaisesOff GrabFocus + \ GrabFocusOff GrabFocusTransientOff + \ GrabFocusTransient FPFocusClickButtons + \ FPFocusClickModifiers + \ FPSortWindowlistByFocus FPClickRaisesFocused + \ FPClickDecorRaisesFocused + \ FPClickIconRaisesFocused + \ FPClickRaisesUnfocused + \ FPClickDecorRaisesUnfocused + \ FPClickIconRaisesUnfocused FPClickToFocus + \ FPClickDecorToFocus FPClickIconToFocus + \ FPEnterToFocus FPLeaveToUnfocus + \ FPFocusByProgram FPFocusByFunction + \ FPFocusByFunctionWarpPointer FPLenient + \ FPPassFocusClick FPPassRaiseClick + \ FPIgnoreFocusClickMotion + \ FPIgnoreRaiseClickMotion + \ FPAllowFocusClickFunction + \ FPAllowRaiseClickFunction FPGrabFocus + \ FPGrabFocusTransient FPOverrideGrabFocus + \ FPReleaseFocus FPReleaseFocusTransient + \ FPOverrideReleaseFocus StartsLowered + \ StartsRaised IgnoreRestack AllowRestack + \ FixedPosition VariablePosition + \ FixedUSPosition VariableUSPosition + \ FixedPPosition VariablePPosition FixedSize + \ VariableSize FixedUSSize VariableUSSize + \ FixedPSize VariablePSize Closable + \ Iconifiable Maximizable + \ AllowMaximizeFixedSize IconOverride + \ NoIconOverride NoActiveIconOverride + \ DepressableBorder FirmBorder MaxWindowSize + \ IconifyWindowGroups IconifyWindowGroupsOff + \ ResizeOpaque ResizeOutline BackingStore + \ BackingStoreOff BackingStoreWindowDefault + \ Opacity ParentalRelativity SaveUnder + \ SaveUnderOff WindowShadeShrinks + \ WindowShadeScrolls WindowShadeSteps + \ WindowShadeAlwaysLazy WindowShadeBusy + \ WindowShadeLazy EWMHDonateIcon + \ EWMHDontDonateIcon EWMHDonateMiniIcon + \ EWMHDontDonateMiniIcon EWMHMiniIconOverride + \ EWMHNoMiniIconOverride + \ EWMHUseStackingOrderHints + \ EWMHIgnoreStackingOrderHints + \ EWMHIgnoreStateHints EWMHUseStateHints + \ EWMHIgnoreStrutHints EWMHUseStrutHints + \ EWMHMaximizeIgnoreWorkingArea + \ EWMHMaximizeUseWorkingArea + \ EWMHMaximizeUseDynamicWorkingArea + \ EWMHPlacementIgnoreWorkingArea + \ EWMHPlacementUseWorkingArea + \ EWMHPlacementUseDynamicWorkingArea + \ MoveByProgramMethod Unmanaged State + + " Cursor styles + syn keyword fvwmKeyword nextgroup=fvwmCursorStyle skipwhite + \ CursorStyle + syn case match + syn keyword fvwmCursorStyle contained + \ POSITION TITLE DEFAULT SYS MOVE RESIZE WAIT + \ MENU SELECT DESTROY TOP RIGHT BOTTOM LEFT + \ TOP_LEFT TOP_RIGHT BOTTOM_LEFT BOTTOM_RIGHT + \ TOP_EDGE RIGHT_EDGE BOTTOM_EDGE LEFT_EDGE + \ ROOT STROKE + syn case ignore + + " Menu style + syn keyword fvwmKeyword nextgroup=fvwmMStyleArgs skipwhite + \ MenuStyle + syn region fvwmMStyleArgs contained transparent contains=fvwmMStyleNames,@fvwmConstants,fvwmString,fvwmGradient,fvwmRGBValue + \ start='.' skip='\\$' end='$' + syn keyword fvwmMStyleNames contained + \ Fvwm Mwm Win BorderWidth Foreground + \ Background Greyed HilightBack HilightBackOff + \ ActiveFore ActiveForeOff MenuColorset + \ ActiveColorset GreyedColorset Hilight3DThick + \ Hilight3DThin Hilight3DOff + \ Hilight3DThickness Animation AnimationOff + \ Font MenuFace PopupDelay PopupOffset + \ TitleWarp TitleWarpOff TitleUnderlines0 + \ TitleUnderlines1 TitleUnderlines2 + \ SeparatorsLong SeparatorsShort + \ TrianglesSolid TrianglesRelief + \ PopupImmediately PopupDelayed + \ PopdownImmediately PopdownDelayed + \ PopupActiveArea DoubleClickTime SidePic + \ SideColor PopupAsRootMenu PopupAsSubmenu + \ PopupIgnore PopupClose RemoveSubmenus + \ HoldSubmenus SubmenusRight SubmenusLeft + \ SelectOnRelease ItemFormat + \ VerticalItemSpacing VerticalTitleSpacing + \ AutomaticHotkeys AutomaticHotkeysOff + + " Button style + syn keyword fvwmKeyword nextgroup=fvwmBNum skipwhite + \ ButtonStyle AddButtonStyle + syn match fvwmBNum contained + \ nextgroup=fvwmBState,fvwmBStyleArgs skipwhite + \ '\v<([0-9]|All|Left|Right|Reset)>' + syn keyword fvwmBState contained nextgroup=fvwmBStyleArgs skipwhite + \ ActiveUp ActiveDown InactiveUp InactiveDown + \ Active Inactive ToggledActiveUp + \ ToggledActiveDown ToggledInactiveUp + \ ToggledInactiveDown ToggledActive + \ ToggledInactive AllNormal AllToggled + \ AllActive AllInactive AllUp AllDown + syn region fvwmBStyleArgs contained contains=fvwmBStyleFlags,fvwmBStyleNames,fvwmGradient,fvwmRGBValue,@fvwmConstants,fvwmString + \ start='\S' skip='\\$' end='$' + syn keyword fvwmBStyleNames contained + \ Simple Default Solid Colorset Vector Pixmap + \ AdjustedPixmap ShrunkPixmap StretchedPixmap + \ TiledPixmap MiniIcon + syn keyword fvwmBStyleFlags contained + \ Raised Sunk Flat UseTitleStyle + \ UseBorderStyle + + " Border style + syn keyword fvwmKeyword skipwhite nextgroup=fvwmBdState,fvwmBdStyleArgs + \ BorderStyle + syn keyword fvwmBdState contained skipwhite nextgroup=fvwmBdStyleArgs + \ Active Inactive + syn region fvwmBdStyleArgs contained contains=fvwmBdStyNames,fvwmBdStyFlags + \ start='\S' skip='\\$' end='$' + syn keyword fvwmBdStyNames contained + \ TiledPixmap Colorset + syn keyword fvwmBdStyFlags contained + \ HiddenHandles NoInset Raised Sunk Flat + + " Title styles + syn keyword fvwmKeyword skipwhite nextgroup=fvwmTState,fvwmTStyleArgs + \ TitleStyle AddTitleStyle + syn keyword fvwmTState contained skipwhite nextgroup=fvwmTStyleArgs + \ ActiveUp ActiveDown InactiveUp InactiveDown + \ Active Inactive ToggledActiveUp + \ ToggledActiveDown ToggledInactiveUp + \ ToggledInactiveDown ToggledActive + \ ToggledInactive AllNormal AllToggled + \ AllActive AllInactive AllUp AllDown + syn region fvwmTStyleArgs contained contains=fvwmBStyleNames,fvwmTStyleNames,fvwmMPmapNames,fvwmTStyleFlags,fvwmGradient,fvwmRGBValue,@fvwmConstants + \ start='\S' skip='\\$' end='$' + syn keyword fvwmTStyleNames contained + \ MultiPixmap + syn keyword fvwmTStyleNames contained + \ LeftJustified Centered RightJustified Height + \ MinHeight + syn keyword fvwmMPmapNames contained + \ Main LeftMain RightMain UnderText LeftOfText + \ RightOfText LeftEnd RightEnd Buttons + \ LeftButtons RightButtons + syn keyword fvwmTStyleFlags contained + \ Raised Flat Sunk + + " Button state + syn keyword fvwmKeyword nextgroup=fvwmBStateArgs + \ ButtonState + syn region fvwmBStateArgs contained contains=fvwmBStateTF,fvwmBStateNames + \ start='.' skip='\\$' end='$' + syn keyword fvwmBStateNames contained ActiveDown Inactive InactiveDown + syn keyword fvwmBStateTF contained True False + + " Paths + syn keyword fvwmKeyword nextgroup=fvwmPath skipwhite + \ IconPath ImagePath LocalePath PixmapPath + \ ModulePath + syn match fvwmPath contained contains=fvwmEnvVar '\v.+$' + + " Window list command + syn keyword fvwmKeyword nextgroup=fvwmWLArgs skipwhite + \ WindowList + syn region fvwmWLArgs contained + \ contains=fvwmCondition,@fvwmConstants,fvwmString,fvwmWLOpts + \ start='.' skip='\\$' end='$' + syn keyword fvwmWLOpts contained + \ Geometry NoGeometry NoGeometryWithInfo + \ NoDeskNum NoNumInDeskTitle + \ NoCurrentDeskTitle MaxLabelWidth width + \ TitleForAllDesks Function funcname Desk + \ desknum CurrentDesk NoIcons Icons OnlyIcons + \ NoNormal Normal OnlyNormal NoSticky Sticky + \ OnlySticky NoStickyAcrossPages + \ StickyAcrossPages OnlyStickyAcrossPages + \ NoStickyAcrossDesks StickyAcrossDesks + \ OnlyStickyAcrossDesks NoOnTop OnTop + \ OnlyOnTop NoOnBottom OnBottom OnlyOnBottom + \ Layer UseListSkip OnlyListSkip NoDeskSort + \ ReverseOrder CurrentAtEnd IconifiedAtEnd + \ UseIconName Alphabetic NotAlphabetic + \ SortByResource SortByClass NoHotkeys + \ SelectOnRelease + + syn keyword fvwmSpecialFn StartFunction InitFunction RestartFunction + \ ExitFunction SessionInitFunction + \ SessionRestartFunction SessionExitFunction + \ MissingSubmenuFunction WindowListFunc + + syn keyword fvwmKeyword skipwhite nextgroup=fvwmKeyWin,fvwmKeyName + \ Key PointerKey + syn region fvwmKeyWin contained skipwhite nextgroup=fvwmKeyName + \ start='(' end=')' + syn case match + syn match fvwmKeyName contained skipwhite nextgroup=fvwmKeyContext + \ '\v<([a-zA-Z0-9]|F\d+|KP_\d)>' + syn keyword fvwmKeyName contained skipwhite nextgroup=fvwmKeyContext + \ BackSpace Begin Break Cancel Clear Delete + \ Down End Escape Execute Find Help Home + \ Insert KP_Add KP_Begin KP_Decimal KP_Delete + \ KP_Divide KP_Down KP_End KP_Enter KP_Equal + \ KP_Home KP_Insert KP_Left KP_Multiply + \ KP_Next KP_Page_Down KP_Page_Up KP_Prior + \ KP_Right KP_Separator KP_Space KP_Subtract + \ KP_Tab KP_Up Left Linefeed Menu Mode_switch + \ Next Num_Lock Page_Down Page_Up Pause Print + \ Prior Redo Return Right script_switch + \ Scroll_Lock Select Sys_Req Tab Undo Up space + \ exclam quotedbl numbersign dollar percent + \ ampersand apostrophe quoteright parenleft + \ parenright asterisk plus comma minus period + \ slash colon semicolon less equal greater + \ question at bracketleft backslash + \ bracketright asciicircum underscore grave + \ quoteleft braceleft bar braceright + \ asciitilde + + syn match fvwmKeyContext contained skipwhite nextgroup=fvwmKeyMods + \ '\v<[][RWDTS_F<^>vI0-9AM-]+>' + syn match fvwmKeyMods contained '\v[NCSMLA1-5]+' + syn case ignore + + syn keyword fvwmKeyword skipwhite nextgroup=fvwmMouseWin,fvwmMouseButton + \ Mouse + syn region fvwmMouseWin contained skipwhite nextgroup=fvwmMouseButton + \ start='(' end=')' + syn match fvwmMouseButton contained skipwhite nextgroup=fvwmKeyContext + \ '[0-5]' endif +" Define syntax highlighting groups + +" +" Common highlighting groups +" +hi def link fvwmComment Comment +hi def link fvwmEnvVar Macro +hi def link fvwmNumber Number +hi def link fvwmKeyword Keyword +hi def link fvwmPath Constant +hi def link fvwmModConf Macro +hi def link fvwmRGBValue Constant +hi def link fvwmString String +hi def link fvwmBackslash SpecialChar + + +" +" Highlighting groups for fvwm1 specific items +" +hi def link fvwmExec fvwmKeyword +hi def link fvwmKey fvwmKeyword +hi def link fvwmModule fvwmKeyword +hi def link fvwmFunction Function + +" +" Highlighting groups for fvwm2 specific items +" +hi def link fvwmSpecialFn Type +hi def link fvwmCursorStyle fvwmStyleNames +hi def link fvwmStyleNames Identifier +hi def link fvwmMStyleNames fvwmStyleNames +hi def link fvwmCSNames fvwmStyleNames +hi def link fvwmGradient fvwmStyleNames +hi def link fvwmCondNames fvwmStyleNames +hi def link fvwmTCNames fvwmStyleNames +hi def link fvwmTRNames fvwmStyleNames +hi def link fvwmWLOpts fvwmStyleNames + +hi def link fvwmBNum Number +hi def link fvwmBState Type +hi def link fvwmBStyleNames fvwmStyleNames +hi def link fvwmBStyleFlags Special + +hi def link fvwmBStateTF Constant +hi def link fvwmBStateNames fvwmStyleNames + +hi def link fvwmBdState fvwmBState +hi def link fvwmBdStyNames fvwmStyleNames +hi def link fvwmBdStyFlags fvwmBStyleFlags + +hi def link fvwmTState fvwmBState +hi def link fvwmTStyleNames fvwmStyleNames +hi def link fvwmMPmapNames fvwmBStyleFlags +hi def link fvwmTStyleFlags fvwmBStyleFlags + +hi def link fvwmDirection fvwmBStyleFlags + +hi def link fvwmKeyWin Constant +hi def link fvwmMouseWin fvwmKeyWin +hi def link fvwmKeyName Special +hi def link fvwmKeyContext fvwmKeyName +hi def link fvwmKeyMods fvwmKeyName +hi def link fvwmMouseButton fvwmKeyName + +hi def link fvwmMenuString String +hi def link fvwmIcon Type +hi def link fvwmShortcutKey SpecialChar + +hi def link fvwmModuleName Function + let b:current_syntax = "fvwm" -" vim: sts=4 sw=4 ts=8 diff --git a/runtime/syntax/hamster.vim b/runtime/syntax/hamster.vim new file mode 100644 index 000000000..bd52300ca --- /dev/null +++ b/runtime/syntax/hamster.vim @@ -0,0 +1,382 @@ +" Vim syntax file +" Language: Hamster Scripting Language +" Maintainer: David Fishburn +" Last Change: Sun Oct 24 2004 7:11:50 PM +" Version: 2.0.6.0 + +" Description: Hamster Classic +" Hamster is a local server for news and mail. It's a windows-32-bit-program. +" It allows the use of multiple news- and mailserver and combines them to one +" mail- and newsserver for the news/mail-client. It load faster than a normal +" newsreader because many threads can run simultaneous. It contains scorefile +" for news and mail, a build-in script language, the GUI allows translation to +" other languages, it can be used in a network and that's not all features... +" +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +syn case ignore + +syn keyword hamsterSpecial abs +syn keyword hamsterSpecial artaddheader +syn keyword hamsterSpecial artalloc +syn keyword hamsterSpecial artdelheader +syn keyword hamsterSpecial artfree +syn keyword hamsterSpecial artgetbody +syn keyword hamsterSpecial artgetheader +syn keyword hamsterSpecial artgetheaders +syn keyword hamsterSpecial artgettext +syn keyword hamsterSpecial artheaderexists +syn keyword hamsterSpecial artload +syn keyword hamsterSpecial artsave +syn keyword hamsterSpecial artsetbody +syn keyword hamsterSpecial artsetheader +syn keyword hamsterSpecial artsetheaders +syn keyword hamsterSpecial artsettext +syn keyword hamsterSpecial assert +syn keyword hamsterSpecial atadd +syn keyword hamsterSpecial atclear +syn keyword hamsterSpecial atcount +syn keyword hamsterSpecial ateverymins +syn keyword hamsterSpecial atexecute +syn keyword hamsterSpecial atfrom +syn keyword hamsterSpecial atondays +syn keyword hamsterSpecial atsubfunction +syn keyword hamsterSpecial atuntil +syn keyword hamsterSpecial beep +syn keyword hamsterSpecial break +syn keyword hamsterSpecial chr +syn keyword hamsterSpecial clearxcounter +syn keyword hamsterSpecial clipread +syn keyword hamsterSpecial clipwrite +syn keyword hamsterSpecial const +syn keyword hamsterSpecial constenum +syn keyword hamsterSpecial continue +syn keyword hamsterSpecial copy +syn keyword hamsterSpecial debug +syn keyword hamsterSpecial dec +syn keyword hamsterSpecial decodebase64 +syn keyword hamsterSpecial decodeqp +syn keyword hamsterSpecial decodetime +syn keyword hamsterSpecial decxcounter +syn keyword hamsterSpecial delete +syn keyword hamsterSpecial deletehostsentry +syn keyword hamsterSpecial digest +syn keyword hamsterSpecial dirchange +syn keyword hamsterSpecial dircurrent +syn keyword hamsterSpecial direxists +syn keyword hamsterSpecial dirmake +syn keyword hamsterSpecial dirremove +syn keyword hamsterSpecial dirsystem +syn keyword hamsterSpecial dirwindows +syn keyword hamsterSpecial diskfreekb +syn keyword hamsterSpecial dllcall +syn keyword hamsterSpecial dllfree +syn keyword hamsterSpecial dlllasterror +syn keyword hamsterSpecial dllload +syn keyword hamsterSpecial dump +syn keyword hamsterSpecial encodetime +syn keyword hamsterSpecial entercontext +syn keyword hamsterSpecial errcatch +syn keyword hamsterSpecial errline +syn keyword hamsterSpecial errlineno +syn keyword hamsterSpecial errmodule +syn keyword hamsterSpecial errmsg +syn keyword hamsterSpecial errnum +syn keyword hamsterSpecial error +syn keyword hamsterSpecial errsender +syn keyword hamsterSpecial eval +syn keyword hamsterSpecial eventclose +syn keyword hamsterSpecial eventcreate +syn keyword hamsterSpecial eventmultiplewait +syn keyword hamsterSpecial eventpulse +syn keyword hamsterSpecial eventreset +syn keyword hamsterSpecial eventset +syn keyword hamsterSpecial eventwait +syn keyword hamsterSpecial execute +syn keyword hamsterSpecial false +syn keyword hamsterSpecial filecopy +syn keyword hamsterSpecial filedelete +syn keyword hamsterSpecial fileexists +syn keyword hamsterSpecial filemove +syn keyword hamsterSpecial filerename +syn keyword hamsterSpecial filesize +syn keyword hamsterSpecial filetime +syn keyword hamsterSpecial getenv +syn keyword hamsterSpecial getprocessidentifier +syn keyword hamsterSpecial getuptimedays +syn keyword hamsterSpecial getuptimehours +syn keyword hamsterSpecial getuptimemins +syn keyword hamsterSpecial getuptimesecs +syn keyword hamsterSpecial gosub +syn keyword hamsterSpecial goto +syn keyword hamsterSpecial hex +syn keyword hamsterSpecial icase +syn keyword hamsterSpecial iif +syn keyword hamsterSpecial inc +syn keyword hamsterSpecial incxcounter +syn keyword hamsterSpecial inidelete +syn keyword hamsterSpecial inierasesection +syn keyword hamsterSpecial iniread +syn keyword hamsterSpecial iniwrite +syn keyword hamsterSpecial inputbox +syn keyword hamsterSpecial inputpw +syn keyword hamsterSpecial int +syn keyword hamsterSpecial isint +syn keyword hamsterSpecial isstr +syn keyword hamsterSpecial leavecontext +syn keyword hamsterSpecial len +syn keyword hamsterSpecial listadd +syn keyword hamsterSpecial listalloc +syn keyword hamsterSpecial listappend +syn keyword hamsterSpecial listbox +syn keyword hamsterSpecial listclear +syn keyword hamsterSpecial listcount +syn keyword hamsterSpecial listdelete +syn keyword hamsterSpecial listdirs +syn keyword hamsterSpecial listexists +syn keyword hamsterSpecial listfiles +syn keyword hamsterSpecial listfiles +syn keyword hamsterSpecial listfree +syn keyword hamsterSpecial listget +syn keyword hamsterSpecial listgetkey +syn keyword hamsterSpecial listgettag +syn keyword hamsterSpecial listgettext +syn keyword hamsterSpecial listindexof +syn keyword hamsterSpecial listinsert +syn keyword hamsterSpecial listload +syn keyword hamsterSpecial listrasentries +syn keyword hamsterSpecial listsave +syn keyword hamsterSpecial listset +syn keyword hamsterSpecial listsetkey +syn keyword hamsterSpecial listsettag +syn keyword hamsterSpecial listsettext +syn keyword hamsterSpecial listsort +syn keyword hamsterSpecial localhostaddr +syn keyword hamsterSpecial localhostname +syn keyword hamsterSpecial lookuphostaddr +syn keyword hamsterSpecial lookuphostname +syn keyword hamsterSpecial lowercase +syn keyword hamsterSpecial memalloc +syn keyword hamsterSpecial memforget +syn keyword hamsterSpecial memfree +syn keyword hamsterSpecial memgetint +syn keyword hamsterSpecial memgetstr +syn keyword hamsterSpecial memsetint +syn keyword hamsterSpecial memsetstr +syn keyword hamsterSpecial memsize +syn keyword hamsterSpecial memvarptr +syn keyword hamsterSpecial msgbox +syn keyword hamsterSpecial ord +syn keyword hamsterSpecial paramcount +syn keyword hamsterSpecial paramstr +syn keyword hamsterSpecial popupbox +syn keyword hamsterSpecial pos +syn keyword hamsterSpecial print +syn keyword hamsterSpecial quit +syn keyword hamsterSpecial random +syn keyword hamsterSpecial randomize +syn keyword hamsterSpecial rasdial +syn keyword hamsterSpecial rasgetconnection +syn keyword hamsterSpecial rasgetip +syn keyword hamsterSpecial rashangup +syn keyword hamsterSpecial rasisconnected +syn keyword hamsterSpecial re_extract +syn keyword hamsterSpecial re_match +syn keyword hamsterSpecial re_parse +syn keyword hamsterSpecial re_split +syn keyword hamsterSpecial replace +syn keyword hamsterSpecial return +syn keyword hamsterSpecial runscript +syn keyword hamsterSpecial scriptpriority +syn keyword hamsterSpecial set +syn keyword hamsterSpecial sethostsentry_byaddr +syn keyword hamsterSpecial sethostsentry_byname +syn keyword hamsterSpecial setxcounter +syn keyword hamsterSpecial sgn +syn keyword hamsterSpecial shell +syn keyword hamsterSpecial sleep +syn keyword hamsterSpecial stopthread +syn keyword hamsterSpecial str +syn keyword hamsterSpecial syserrormessage +syn keyword hamsterSpecial testmailfilterline +syn keyword hamsterSpecial testnewsfilterline +syn keyword hamsterSpecial ticks +syn keyword hamsterSpecial time +syn keyword hamsterSpecial timegmt +syn keyword hamsterSpecial trace +syn keyword hamsterSpecial trim +syn keyword hamsterSpecial true +syn keyword hamsterSpecial uppercase +syn keyword hamsterSpecial utf7toucs16 +syn keyword hamsterSpecial utf8toucs32 +syn keyword hamsterSpecial var +syn keyword hamsterSpecial varset +syn keyword hamsterSpecial warning +syn keyword hamsterSpecial xcounter + +" common functions +syn keyword hamsterFunction addlog +syn keyword hamsterFunction decodemimeheaderstring +syn keyword hamsterFunction decodetolocalcharset +syn keyword hamsterFunction gettasksactive +syn keyword hamsterFunction gettasksrun +syn keyword hamsterFunction gettaskswait +syn keyword hamsterFunction hamaddgroup +syn keyword hamsterFunction hamaddlog +syn keyword hamsterFunction hamaddpull +syn keyword hamsterFunction hamartcount +syn keyword hamsterFunction hamartdeletemid +syn keyword hamsterFunction hamartdeletemidingroup +syn keyword hamsterFunction hamartdeletenringroup +syn keyword hamsterFunction hamartimport +syn keyword hamsterFunction hamartlocatemid +syn keyword hamsterFunction hamartlocatemidingroup +syn keyword hamsterFunction hamartnomax +syn keyword hamsterFunction hamartnomin +syn keyword hamsterFunction hamarttext +syn keyword hamsterFunction hamarttextexport +syn keyword hamsterFunction hamchangepassword +syn keyword hamsterFunction hamcheckpurge +syn keyword hamsterFunction hamdelgroup +syn keyword hamsterFunction hamdelpull +syn keyword hamsterFunction hamdialogaddpull +syn keyword hamsterFunction hamdialogeditdirs +syn keyword hamsterFunction hamdialogmailkillfilelog +syn keyword hamsterFunction hamdialognewskillfilelog +syn keyword hamsterFunction hamdialogscripts +syn keyword hamsterFunction hamenvelopefrom +syn keyword hamsterFunction hamexepath +syn keyword hamsterFunction hamfetchmail +syn keyword hamsterFunction hamflush +syn keyword hamsterFunction hamgetstatus +syn keyword hamsterFunction hamgroupclose +syn keyword hamsterFunction hamgroupcount +syn keyword hamsterFunction hamgroupindex +syn keyword hamsterFunction hamgroupname +syn keyword hamsterFunction hamgroupnamebyhandle +syn keyword hamsterFunction hamgroupopen +syn keyword hamsterFunction hamgroupspath +syn keyword hamsterFunction hamhscpath +syn keyword hamsterFunction hamhsmpath +syn keyword hamsterFunction hamimapserver +syn keyword hamsterFunction hamisidle +syn keyword hamsterFunction hamlogspath +syn keyword hamsterFunction hammailexchange +syn keyword hamsterFunction hammailpath +syn keyword hamsterFunction hammailsoutpath +syn keyword hamsterFunction hammainfqdn +syn keyword hamsterFunction hammainwindow +syn keyword hamsterFunction hammessage +syn keyword hamsterFunction hammidfqdn +syn keyword hamsterFunction hamnewmail +syn keyword hamsterFunction hamnewserrpath +syn keyword hamsterFunction hamnewsjobsadd +syn keyword hamsterFunction hamnewsjobscheckactive +syn keyword hamsterFunction hamnewsjobsclear +syn keyword hamsterFunction hamnewsjobsdelete +syn keyword hamsterFunction hamnewsjobsfeed +syn keyword hamsterFunction hamnewsjobsgetcounter +syn keyword hamsterFunction hamnewsjobsgetparam +syn keyword hamsterFunction hamnewsjobsgetpriority +syn keyword hamsterFunction hamnewsjobsgetserver +syn keyword hamsterFunction hamnewsjobsgettype +syn keyword hamsterFunction hamnewsjobspost +syn keyword hamsterFunction hamnewsjobspostdef +syn keyword hamsterFunction hamnewsjobspull +syn keyword hamsterFunction hamnewsjobspulldef +syn keyword hamsterFunction hamnewsjobssetpriority +syn keyword hamsterFunction hamnewsjobsstart +syn keyword hamsterFunction hamnewsoutpath +syn keyword hamsterFunction hamnewspost +syn keyword hamsterFunction hamnewspull +syn keyword hamsterFunction hamnntpserver +syn keyword hamsterFunction hampassreload +syn keyword hamsterFunction hampath +syn keyword hamsterFunction hampop3server +syn keyword hamsterFunction hampostmaster +syn keyword hamsterFunction hampurge +syn keyword hamsterFunction hamrasdial +syn keyword hamsterFunction hamrashangup +syn keyword hamsterFunction hamrcpath +syn keyword hamsterFunction hamrebuildgloballists +syn keyword hamsterFunction hamrebuildhistory +syn keyword hamsterFunction hamrecoserver +syn keyword hamsterFunction hamreloadconfig +syn keyword hamsterFunction hamreloadipaccess +syn keyword hamsterFunction hamresetcounters +syn keyword hamsterFunction hamrotatelog +syn keyword hamsterFunction hamscorelist +syn keyword hamsterFunction hamscoretest +syn keyword hamsterFunction hamsendmail +syn keyword hamsterFunction hamsendmailauth +syn keyword hamsterFunction hamserverpath +syn keyword hamsterFunction hamsetlogin +syn keyword hamsterFunction hamshutdown +syn keyword hamsterFunction hamsmtpserver +syn keyword hamsterFunction hamstopalltasks +syn keyword hamsterFunction hamthreadcount +syn keyword hamsterFunction hamtrayicon +syn keyword hamsterFunction hamusenetacc +syn keyword hamsterFunction hamversion +syn keyword hamsterFunction hamwaitidle +syn keyword hamsterFunction raslasterror +syn keyword hamsterFunction rfctimezone +syn keyword hamsterFunction settasklimiter + +syn keyword hamsterStatement if +syn keyword hamsterStatement else +syn keyword hamsterStatement elseif +syn keyword hamsterStatement endif +syn keyword hamsterStatement do +syn keyword hamsterStatement loop +syn keyword hamsterStatement while +syn keyword hamsterStatement endwhile +syn keyword hamsterStatement repeat +syn keyword hamsterStatement until +syn keyword hamsterStatement for +syn keyword hamsterStatement endfor +syn keyword hamsterStatement sub +syn keyword hamsterStatement endsub +syn keyword hamsterStatement label + + +" Strings and characters: +syn region hamsterString start=+"+ end=+"+ contains=@Spell +syn region hamsterString start=+'+ end=+'+ contains=@Spell + +" Numbers: +syn match hamsterNumber "-\=\<\d*\.\=[0-9_]\>" + +" Comments: +syn region hamsterHashComment start=/#/ end=/$/ contains=@Spell +syn cluster hamsterComment contains=hamsterHashComment +syn sync ccomment hamsterHashComment + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_hamster_syn_inits") + if version < 508 + let did_hamster_syn_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink hamsterHashComment Comment + HiLink hamsterSpecial Special + HiLink hamsterStatement Statement + HiLink hamsterString String + HiLink hamsterFunction Function + + delcommand HiLink +endif + +let b:current_syntax = "hamster" + +" vim:sw=4 diff --git a/runtime/syntax/ia64.vim b/runtime/syntax/ia64.vim index d6292ce63..f0d510b94 100644 --- a/runtime/syntax/ia64.vim +++ b/runtime/syntax/ia64.vim @@ -4,7 +4,7 @@ " URL: http://www.geocities.com/pmalwankar (Home Page with link to my Vim page) " http://www.geocities.com/pmalwankar/vim.htm (for VIM) " File Version: 0.7 -" Last Change: 2004 May 04 +" Last Change: 2006 Sep 08 " For version 5.x: Clear all syntax items " For version 6.x: Quit when a syntax file was already loaded @@ -309,4 +309,3 @@ endif let b:current_syntax = "ia64" " vim: ts=8 sw=2 - diff --git a/runtime/syntax/ibasic.vim b/runtime/syntax/ibasic.vim new file mode 100644 index 000000000..75e59419b --- /dev/null +++ b/runtime/syntax/ibasic.vim @@ -0,0 +1,176 @@ +" Vim syntax file +" Language: ibasic +" Maintainer: Mark Manning +" Originator: Allan Kelly +" Created: 10/1/2006 +" Updated: 10/21/2006 +" Description: A vim file to handle the IBasic file format. +" Notes: +" Updated by Mark Manning +" Applied IBasic support to the already excellent support for standard +" basic syntax (like QB). +" +" First version based on Micro$soft QBASIC circa 1989, as documented in +" 'Learn BASIC Now' by Halvorson&Rygmyr. Microsoft Press 1989. +" This syntax file not a complete implementation yet. +" Send suggestions to the maintainer. +" +" This version is based upon the commands found in IBasic (www.pyxia.com). +" MEM 10/6/2006 +" +" Quit when a (custom) syntax file was already loaded (Taken from c.vim) +" +if exists("b:current_syntax") + finish +endif +" +" Be sure to turn on the "case ignore" since current versions of basic +" support both upper as well as lowercase letters. +" +syn case ignore +" +" A bunch of useful BASIC keywords +" +syn keyword ibasicStatement beep bload bsave call absolute chain chdir circle +syn keyword ibasicStatement clear close cls color com common const data +syn keyword ibasicStatement loop draw end environ erase error exit field +syn keyword ibasicStatement files function get gosub goto +syn keyword ibasicStatement input input# ioctl key kill let line locate +syn keyword ibasicStatement lock unlock lprint using lset mkdir name +syn keyword ibasicStatement on error open option base out paint palette pcopy +syn keyword ibasicStatement pen play pmap poke preset print print# using pset +syn keyword ibasicStatement put randomize read redim reset restore resume +syn keyword ibasicStatement return rmdir rset run seek screen +syn keyword ibasicStatement shared shell sleep sound static stop strig sub +syn keyword ibasicStatement swap system timer troff tron type unlock +syn keyword ibasicStatement view wait width window write +syn keyword ibasicStatement date$ mid$ time$ +" +" Do the basic variables names first. This is because it +" is the most inclusive of the tests. Later on we change +" this so the identifiers are split up into the various +" types of identifiers like functions, basic commands and +" such. MEM 9/9/2006 +" +syn match ibasicIdentifier "\<[a-zA-Z_][a-zA-Z0-9_]*\>" +syn match ibasicGenericFunction "\<[a-zA-Z_][a-zA-Z0-9_]*\>\s*("me=e-1,he=e-1 +" +" Function list +" +syn keyword ibasicBuiltInFunction abs asc atn cdbl cint clng cos csng csrlin cvd cvdmbf +syn keyword ibasicBuiltInFunction cvi cvl cvs cvsmbf eof erdev erl err exp fileattr +syn keyword ibasicBuiltInFunction fix fre freefile inp instr lbound len loc lof +syn keyword ibasicBuiltInFunction log lpos mod peek pen point pos rnd sadd screen seek +syn keyword ibasicBuiltInFunction setmem sgn sin spc sqr stick strig tab tan ubound +syn keyword ibasicBuiltInFunction val valptr valseg varptr varseg +syn keyword ibasicBuiltInFunction chr\$ command$ date$ environ$ erdev$ hex$ inkey$ +syn keyword ibasicBuiltInFunction input$ ioctl$ lcases$ laft$ ltrim$ mid$ mkdmbf$ mkd$ +syn keyword ibasicBuiltInFunction mki$ mkl$ mksmbf$ mks$ oct$ right$ rtrim$ space$ +syn keyword ibasicBuiltInFunction str$ string$ time$ ucase$ varptr$ +syn keyword ibasicTodo contained TODO +syn cluster ibasicFunctionCluster contains=ibasicBuiltInFunction,ibasicGenericFunction + +syn keyword Conditional if else then elseif endif select case endselect +syn keyword Repeat for do while next enddo endwhile wend + +syn keyword ibasicTypeSpecifier single double defdbl defsng +syn keyword ibasicTypeSpecifier int integer uint uinteger int64 uint64 defint deflng +syn keyword ibasicTypeSpecifier byte char string istring defstr +syn keyword ibasicDefine dim def declare +" +"catch errors caused by wrong parenthesis +" +syn cluster ibasicParenGroup contains=ibasicParenError,ibasicIncluded,ibasicSpecial,ibasicTodo,ibasicUserCont,ibasicUserLabel,ibasicBitField +syn region ibasicParen transparent start='(' end=')' contains=ALLBUT,@bParenGroup +syn match ibasicParenError ")" +syn match ibasicInParen contained "[{}]" +" +"integer number, or floating point number without a dot and with "f". +" +syn region ibasicHex start="&h" end="\W" +syn region ibasicHexError start="&h\x*[g-zG-Z]" end="\W" +syn match ibasicInteger "\<\d\+\(u\=l\=\|lu\|f\)\>" +" +"floating point number, with dot, optional exponent +" +syn match ibasicFloat "\<\d\+\.\d*\(e[-+]\=\d\+\)\=[fl]\=\>" +" +"floating point number, starting with a dot, optional exponent +" +syn match ibasicFloat "\.\d\+\(e[-+]\=\d\+\)\=[fl]\=\>" +" +"floating point number, without dot, with exponent +" +syn match ibasicFloat "\<\d\+e[-+]\=\d\+[fl]\=\>" +" +"hex number +" +syn match ibasicIdentifier "\<[a-zA-Z_][a-zA-Z0-9_]*\>" +syn match ibasicFunction "\<[a-zA-Z_][a-zA-Z0-9_]*\>\s*("me=e-1,he=e-1 +syn case match +syn match ibasicOctalError "\<0\o*[89]" +" +" String and Character contstants +" +syn region ibasicString start='"' end='"' contains=ibasicSpecial,ibasicTodo +syn region ibasicString start="'" end="'" contains=ibasicSpecial,ibasicTodo +" +" Comments +" +syn match ibasicSpecial contained "\\." +syn region ibasicComment start="^rem" end="$" contains=ibasicSpecial,ibasicTodo +syn region ibasicComment start=":\s*rem" end="$" contains=ibasicSpecial,ibasicTodo +syn region ibasicComment start="\s*'" end="$" contains=ibasicSpecial,ibasicTodo +syn region ibasicComment start="^'" end="$" contains=ibasicSpecial,ibasicTodo +" +" Now do the comments and labels +" +syn match ibasicLabel "^\d" +syn region ibasicLineNumber start="^\d" end="\s" +" +" Pre-compiler options : FreeBasic +" +syn region ibasicPreCondit start="^\s*#\s*\(if\>\|ifdef\>\|ifndef\>\|elif\>\|else\>\|endif\>\)" skip="\\$" end="$" contains=ibasicString,ibasicCharacter,ibasicNumber,ibasicCommentError,ibasicSpaceError +syn match ibasicInclude "^\s*#\s*include\s*" +" +" Create the clusters +" +syn cluster ibasicNumber contains=ibasicHex,ibasicInteger,ibasicFloat +syn cluster ibasicError contains=ibasicHexError +" +" Used with OPEN statement +" +syn match ibasicFilenumber "#\d\+" +" +"syn sync ccomment ibasicComment +" +syn match ibasicMathOperator "[\+\-\=\|\*\/\>\<\%\()[\]]" contains=ibasicParen +" +" The default methods for highlighting. Can be overridden later +" +hi def link ibasicLabel Label +hi def link ibasicConditional Conditional +hi def link ibasicRepeat Repeat +hi def link ibasicHex Number +hi def link ibasicInteger Number +hi def link ibasicFloat Number +hi def link ibasicError Error +hi def link ibasicHexError Error +hi def link ibasicStatement Statement +hi def link ibasicString String +hi def link ibasicComment Comment +hi def link ibasicLineNumber Comment +hi def link ibasicSpecial Special +hi def link ibasicTodo Todo +hi def link ibasicGenericFunction Function +hi def link ibasicBuiltInFunction Function +hi def link ibasicTypeSpecifier Type +hi def link ibasicDefine Type +hi def link ibasicInclude Include +hi def link ibasicIdentifier Identifier +hi def link ibasicFilenumber ibasicTypeSpecifier +hi def link ibasicMathOperator Operator + +let b:current_syntax = "ibasic" + +" vim: ts=8 diff --git a/runtime/syntax/initng.vim b/runtime/syntax/initng.vim new file mode 100644 index 000000000..2b7bc3b41 --- /dev/null +++ b/runtime/syntax/initng.vim @@ -0,0 +1,91 @@ +" Vim syntax file +" Language: initng .i files +" Maintainer: Elan Ruusamäe +" URL: http://glen.alkohol.ee/pld/initng/ +" License: GPL v2 +" Version: 0.13 +" Last Change: $Date$ +" +" Syntax highlighting for initng .i files. Inherits from sh.vim and adds +" in the hiliting to start/stop {} blocks. Requires vim 6.3 or later. + +if &compatible || v:version < 603 + finish +endif + +if exists("b:current_syntax") + finish +endif + +syn case match + +let is_bash = 1 +unlet! b:current_syntax +syn include @shTop syntax/sh.vim + +syn region initngService matchgroup=initngServiceHeader start="^\s*\(service\|virtual\|daemon\|class\|cron\)\s\+\(\(\w\|[-/*]\)\+\(\s\+:\s\+\(\w\|[-/*]\)\+\)\?\)\s\+{" end="}" contains=@initngServiceCluster +syn cluster initngServiceCluster contains=initngComment,initngAction,initngServiceOption,initngServiceHeader,initngDelim,initngVariable + +syn region initngAction matchgroup=initngActionHeader start="^\s*\(script start\|script stop\|script run\)\s*=\s*{" end="}" contains=@initngActionCluster +syn cluster initngActionCluster contains=@shTop + +syn match initngDelim /[{}]/ contained + +syn region initngString start=/"/ end=/"/ skip=/\\"/ + +" option = value +syn match initngServiceOption /.\+\s*=.\+;/ contains=initngServiceKeywords,initngSubstMacro contained +" option without value +syn match initngServiceOption /\w\+;/ contains=initngServiceKeywords,initngSubstMacro contained + +" options with value +syn keyword initngServiceKeywords also_stop need use nice setuid contained +syn keyword initngServiceKeywords delay chdir suid sgid start_pause env_file env_parse pid_file pidfile contained +syn keyword initngServiceKeywords pid_of up_when_pid_set stdout stderr syncron just_before contained +syn keyword initngServiceKeywords provide lockfile daemon_stops_badly contained +syn match initngServiceKeywords /\(script\|exec\(_args\)\?\) \(start\|stop\|daemon\)/ contained +syn match initngServiceKeywords /env\s\+\w\+/ contained + +" rlimits +syn keyword initngServiceKeywords rlimit_cpu_hard rlimit_core_soft contained + +" single options +syn keyword initngServiceKeywords last respawn network_provider require_network require_file critical forks contained +" cron options +syn keyword initngServiceKeywords hourly contained +syn match initngVariable /\${\?\w\+\}\?/ + +" Substituted @foo@ macros: +" ========== +syn match initngSubstMacro /@[^@]\+@/ contained +syn cluster initngActionCluster add=initngSubstMacro +syn cluster shCommandSubList add=initngSubstMacro + +" Comments: +" ========== +syn cluster initngCommentGroup contains=initngTodo,@Spell +syn keyword initngTodo TODO FIXME XXX contained +syn match initngComment /#.*$/ contains=@initngCommentGroup + +" install_service #macros +" TODO: syntax check for ifd-endd pairs +" ========== +syn region initngDefine start="^#\(endd\|elsed\|exec\|ifd\|endexec\|endd\)\>" skip="\\$" end="$" end="#"me=s-1 +syn cluster shCommentGroup add=initngDefine +syn cluster initngCommentGroup add=initngDefine + +hi def link initngComment Comment +hi def link initngTodo Todo + +hi def link initngString String +hi def link initngServiceKeywords Define + +hi def link initngServiceHeader Keyword +hi def link initngActionHeader Type +hi def link initngDelim Delimiter + +hi def link initngVariable PreProc +hi def link initngSubstMacro Comment +hi def link initngDefine Macro + +let b:current_syntax = "initng" diff --git a/runtime/syntax/javascript.vim b/runtime/syntax/javascript.vim index a1b9e157a..ba8975bc9 100644 --- a/runtime/syntax/javascript.vim +++ b/runtime/syntax/javascript.vim @@ -7,7 +7,7 @@ " (ss) repaired several quoting and grouping glitches " (ss) fixed regex parsing issue with multiple qualifiers [gi] " (ss) additional factoring of keywords, globals, and members -" Last Change: 2006 Jan 15 +" Last Change: 2006 Jun 19 " For version 5.x: Clear all syntax items " For version 6.x: Quit when a syntax file was already loaded @@ -32,9 +32,9 @@ syn case ignore syn keyword javaScriptCommentTodo TODO FIXME XXX TBD contained -syn match javaScriptLineComment "\/\/.*" contains=javaScriptCommentTodo +syn match javaScriptLineComment "\/\/.*" contains=@Spell,javaScriptCommentTodo syn match javaScriptCommentSkip "^[ \t]*\*\($\|[ \t]\+\)" -syn region javaScriptComment start="/\*" end="\*/" contains=javaScriptCommentTodo +syn region javaScriptComment start="/\*" end="\*/" contains=@Spell,javaScriptCommentTodo syn match javaScriptSpecial "\\\d\d\d\|\\." syn region javaScriptStringD start=+"+ skip=+\\\\\|\\"+ end=+"\|$+ contains=javaScriptSpecial,@htmlPreproc syn region javaScriptStringS start=+'+ skip=+\\\\\|\\'+ end=+'\|$+ contains=javaScriptSpecial,@htmlPreproc diff --git a/runtime/syntax/lua.vim b/runtime/syntax/lua.vim index 7d72603bf..c40c6285c 100644 --- a/runtime/syntax/lua.vim +++ b/runtime/syntax/lua.vim @@ -2,7 +2,7 @@ " Language: Lua 4.0, Lua 5.0 and Lua 5.1 " Maintainer: Marcus Aurelius Farias " First Author: Carlos Augusto Teixeira Mendes -" Last Change: 2006 Apr 21 +" Last Change: 2006 Aug 10 " Options: lua_version = 4 or 5 " lua_subversion = 0 (4.0, 5.0) or 1 (5.1) " default 5.1 @@ -31,13 +31,13 @@ syn sync minlines=100 " Comments syn keyword luaTodo contained TODO FIXME XXX -syn match luaComment "--.*$" contains=luaTodo +syn match luaComment "--.*$" contains=luaTodo,@Spell if lua_version == 5 && lua_subversion == 0 - syn region luaComment matchgroup=luaComment start="--\[\[" end="\]\]" contains=luaTodo,luaInnerComment + syn region luaComment matchgroup=luaComment start="--\[\[" end="\]\]" contains=luaTodo,luaInnerComment,@Spell syn region luaInnerComment contained transparent start="\[\[" end="\]\]" elseif lua_version > 5 || (lua_version == 5 && lua_subversion >= 1) " Comments in Lua 5.1: --[[ ... ]], [=[ ... ]=], [===[ ... ]===], etc. - syn region luaComment matchgroup=luaComment start="--\[\z(=*\)\[" end="\]\z1\]" + syn region luaComment matchgroup=luaComment start="--\[\z(=*\)\[" end="\]\z1\]" contains=luaTodo,@Spell endif " First line may start with #! @@ -95,22 +95,27 @@ if lua_version < 5 syn match luaSpecial contained "\\[\\abfnrtv\'\"]\|\\\d\{,3}" elseif lua_version == 5 && lua_subversion == 0 syn match luaSpecial contained "\\[\\abfnrtv\'\"[\]]\|\\\d\{,3}" - syn region luaString2 matchgroup=luaString start=+\[\[+ end=+\]\]+ contains=luaString2 + syn region luaString2 matchgroup=luaString start=+\[\[+ end=+\]\]+ contains=luaString2,@Spell elseif lua_version > 5 || (lua_version == 5 && lua_subversion >= 1) syn match luaSpecial contained "\\[\\abfnrtv\'\"]\|\\\d\{,3}" - syn region luaString2 matchgroup=luaString start="\[\z(=*\)\[" end="\]\z1\]" + syn region luaString2 matchgroup=luaString start="\[\z(=*\)\[" end="\]\z1\]" contains=@Spell endif -syn region luaString start=+'+ end=+'+ skip=+\\\\\|\\'+ contains=luaSpecial -syn region luaString start=+"+ end=+"+ skip=+\\\\\|\\"+ contains=luaSpecial +syn region luaString start=+'+ end=+'+ skip=+\\\\\|\\'+ contains=luaSpecial,@Spell +syn region luaString start=+"+ end=+"+ skip=+\\\\\|\\"+ contains=luaSpecial,@Spell " integer number -syn match luaNumber "\<[0-9]\+\>" +syn match luaNumber "\<\d\+\>" " floating point number, with dot, optional exponent -syn match luaFloat "\<[0-9]\+\.[0-9]*\%(e[-+]\=[0-9]\+\)\=\>" +syn match luaFloat "\<\d\+\.\d*\%(e[-+]\=\d\+\)\=\>" " floating point number, starting with a dot, optional exponent -syn match luaFloat "\.[0-9]\+\%(e[-+]\=[0-9]\+\)\=\>" +syn match luaFloat "\.\d\+\%(e[-+]\=\d\+\)\=\>" " floating point number, without dot, with exponent -syn match luaFloat "\<[0-9]\+e[-+]\=[0-9]\+\>" +syn match luaFloat "\<\d\+e[-+]\=\d\+\>" + +" hex numbers +if lua_version > 5 || (lua_version == 5 && lua_subversion >= 1) + syn match luaNumber "\<0x\x\+\>" +endif " tables syn region luaTableBlock transparent matchgroup=luaTable start="{" end="}" contains=ALLBUT,luaTodo,luaSpecial,luaCond,luaCondElseif,luaCondEnd,luaCondStart,luaBlock,luaRepeatBlock,luaRepeat,luaStatement diff --git a/runtime/syntax/lynx.vim b/runtime/syntax/lynx.vim index 471d708a0..2e37ff64c 100644 --- a/runtime/syntax/lynx.vim +++ b/runtime/syntax/lynx.vim @@ -1,25 +1,23 @@ -" Lynx syntax file -" Filename: lynx.vim -" Language: Lynx configuration file ( lynx.cfg ) -" Maintainer: Doug Kearns +" Vim syntax file +" Language: Lynx configuration file (lynx.cfg) +" Maintainer: Doug Kearns " URL: http://gus.gscit.monash.edu.au/~djkea2/vim/syntax/lynx.vim -" Last Change: 2004 Nov 27 +" Last Change: 2007 Mar 20 -" TODO: more intelligent and complete argument highlighting +" Lynx 2.8.5 -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +if exists("b:current_syntax") finish endif +let s:cpo_save = &cpo +set cpo&vim + syn match lynxLeadingWS "^\s*" transparent nextgroup=lynxOption syn match lynxComment "\(^\|\s\+\)#.*$" contains=lynxTodo -syn keyword lynxTodo TODO NOTE FIXME XXX contained +syn keyword lynxTodo TODO NOTE FIXME XXX contained syn match lynxDelimiter ":" contained nextgroup=lynxBoolean,lynxNumber @@ -27,41 +25,50 @@ syn case ignore syn keyword lynxBoolean TRUE FALSE contained syn case match -syn match lynxNumber "-\=\<\d\+\>" contained +syn match lynxNumber "-\=\<\d\+\>" contained syn case ignore -syn keyword lynxOption ACCEPT_ALL_COOKIES ALERTSECS ALWAYS_RESUBMIT_POSTS ALWAYS_TRUSTED_EXEC ASSUME_CHARSET ASSUMED_COLOR contained nextgroup=lynxDelimiter -syn keyword lynxOption ASSUMED_DOC_CHARSET_CHOICE ASSUME_LOCAL_CHARSET ASSUME_UNREC_CHARSET AUTO_UNCACHE_DIRLISTS contained nextgroup=lynxDelimiter -syn keyword lynxOption BIBP_BIBHOST BIBP_GLOBAL_SERVER BLOCK_MULTI_BOOKMARKS BOLD_H1 BOLD_HEADERS BOLD_NAME_ANCHORS contained nextgroup=lynxDelimiter -syn keyword lynxOption CASE_SENSITIVE_ALWAYS_ON CHARACTER_SET CHARSETS_DIRECTORY CHARSET_SWITCH_RULES CHECKMAIL contained nextgroup=lynxDelimiter -syn keyword lynxOption COLLAPSE_BR_TAGS COLOR CONNECT_TIMEOUT COOKIE_ACCEPT_DOMAINS COOKIE_FILE contained nextgroup=lynxDelimiter -syn keyword lynxOption COOKIE_LOOSE_INVALID_DOMAINS COOKIE_QUERY_INVALID_DOMAINS COOKIE_REJECT_DOMAINS COOKIE_SAVE_FILE contained nextgroup=lynxDelimiter -syn keyword lynxOption COOKIE_STRICT_INVALID_DOMAINS CSO_PROXY CSWING_PATH DEFAULT_BOOKMARK_FILE DEFAULT_CACHE_SIZE contained nextgroup=lynxDelimiter -syn keyword lynxOption DEFAULT_EDITOR DEFAULT_INDEX_FILE DEFAULT_KEYPAD_MODE DEFAULT_KEYPAD_MODE_IS_NUMBERS_AS_ARROWS contained nextgroup=lynxDelimiter -syn keyword lynxOption DEFAULT_USER_MODE DEFAULT_VIRTUAL_MEMORY_SIZE DIRED_MENU DISPLAY_CHARSET_CHOICE DOWNLOADER contained nextgroup=lynxDelimiter -syn keyword lynxOption EMACS_KEYS_ALWAYS_ON ENABLE_LYNXRC ENABLE_SCROLLBACK EXTERNAL FINGER_PROXY FOCUS_WINDOW contained nextgroup=lynxDelimiter -syn keyword lynxOption FORCE_8BIT_TOUPPER FORCE_EMPTY_HREFLESS_A FORCE_SSL_COOKIES_SECURE FORMS_OPTIONS FTP_PASSIVE contained nextgroup=lynxDelimiter -syn keyword lynxOption FTP_PROXY GLOBAL_EXTENSION_MAP GLOBAL_MAILCAP GOPHER_PROXY GOTOBUFFER HELPFILE HIDDEN_LINK_MARKER contained nextgroup=lynxDelimiter -syn keyword lynxOption HISTORICAL_COMMENTS HTMLSRC_ATTRNAME_XFORM HTMLSRC_TAGNAME_XFORM HTTP_PROXY HTTPS_PROXY INCLUDE contained nextgroup=lynxDelimiter -syn keyword lynxOption INFOSECS JUMPBUFFER JUMPFILE JUMP_PROMPT JUSTIFY JUSTIFY_MAX_VOID_PERCENT KEYBOARD_LAYOUT KEYMAP contained nextgroup=lynxDelimiter -syn keyword lynxOption LEFTARROW_IN_TEXTFIELD_PROMPT LIST_FORMAT LIST_NEWS_DATES LIST_NEWS_NUMBERS LOCAL_DOMAIN contained nextgroup=lynxDelimiter -syn keyword lynxOption LOCAL_EXECUTION_LINKS_ALWAYS_ON LOCAL_EXECUTION_LINKS_ON_BUT_NOT_REMOTE LOCALHOST_ALIAS contained nextgroup=lynxDelimiter -syn keyword lynxOption LYNXCGI_DOCUMENT_ROOT LYNXCGI_ENVIRONMENT LYNX_HOST_NAME LYNX_SIG_FILE MAIL_ADRS contained nextgroup=lynxDelimiter -syn keyword lynxOption MAIL_SYSTEM_ERROR_LOGGING MAKE_LINKS_FOR_ALL_IMAGES MAKE_PSEUDO_ALTS_FOR_INLINES MESSAGESECS contained nextgroup=lynxDelimiter -syn keyword lynxOption MINIMAL_COMMENTS MULTI_BOOKMARK_SUPPORT NCR_IN_BOOKMARKS NEWS_CHUNK_SIZE NEWS_MAX_CHUNK contained nextgroup=lynxDelimiter -syn keyword lynxOption NEWS_POSTING NEWSPOST_PROXY NEWS_PROXY NEWSREPLY_PROXY NNTP_PROXY NNTPSERVER NO_DOT_FILES contained nextgroup=lynxDelimiter -syn keyword lynxOption NO_FILE_REFERER NO_FORCED_CORE_DUMP NO_FROM_HEADER NO_ISMAP_IF_USEMAP NONRESTARTING_SIGWINCH contained nextgroup=lynxDelimiter -syn keyword lynxOption NO_PROXY NO_REFERER_HEADER NO_TABLE_CENTER OUTGOING_MAIL_CHARSET PARTIAL PARTIAL_THRES contained nextgroup=lynxDelimiter -syn keyword lynxOption PERSISTENT_COOKIES PERSONAL_EXTENSION_MAP PERSONAL_MAILCAP PREFERRED_CHARSET PREFERRED_LANGUAGE contained nextgroup=lynxDelimiter -syn keyword lynxOption PREPEND_BASE_TO_SOURCE PREPEND_CHARSET_TO_SOURCE PRETTYSRC PRETTYSRC_SPEC contained nextgroup=lynxDelimiter -syn keyword lynxOption PRETTYSRC_VIEW_NO_ANCHOR_NUMBERING PRINTER QUIT_DEFAULT_YES REFERER_WITH_QUERY REUSE_TEMPFILES contained nextgroup=lynxDelimiter -syn keyword lynxOption RULE RULESFILE SAVE_SPACE SCAN_FOR_BURIED_NEWS_REFS SCROLLBAR SCROLLBAR_ARROW SEEK_FRAG_AREA_IN_CUR contained nextgroup=lynxDelimiter -syn keyword lynxOption SEEK_FRAG_MAP_IN_CUR SET_COOKIES SHOW_CURSOR SHOW_KB_RATE SNEWSPOST_PROXY SNEWS_PROXY contained nextgroup=lynxDelimiter -syn keyword lynxOption SNEWSREPLY_PROXY SOFT_DQUOTES SOURCE_CACHE SOURCE_CACHE_FOR_ABORTED STARTFILE STRIP_DOTDOT_URLS contained nextgroup=lynxDelimiter -syn keyword lynxOption SUBSTITUTE_UNDERSCORES SUFFIX SUFFIX_ORDER SYSTEM_EDITOR SYSTEM_MAIL SYSTEM_MAIL_FLAGS TAGSOUP contained nextgroup=lynxDelimiter -syn keyword lynxOption TEXTFIELDS_NEED_ACTIVATION TIMEOUT TRIM_INPUT_FIELDS TRUSTED_EXEC TRUSTED_LYNXCGI UPLOADER contained nextgroup=lynxDelimiter -syn keyword lynxOption URL_DOMAIN_PREFIXES URL_DOMAIN_SUFFIXES USE_FIXED_RECORDS USE_MOUSE USE_SELECT_POPUPS VERBOSE_IMAGES contained nextgroup=lynxDelimiter -syn keyword lynxOption VIEWER VI_KEYS_ALWAYS_ON WAIS_PROXY XLOADIMAGE_COMMAND contained nextgroup=lynxDelimiter +syn keyword lynxOption ACCEPT_ALL_COOKIES ALERTSECS ALWAYS_RESUBMIT_POSTS ALWAYS_TRUSTED_EXEC ASSUME_CHARSET + \ ASSUMED_COLOR ASSUMED_DOC_CHARSET_CHOICE ASSUME_LOCAL_CHARSET ASSUME_UNREC_CHARSET AUTO_UNCACHE_DIRLISTS + \ BIBP_BIBHOST BIBP_GLOBAL_SERVER BLOCK_MULTI_BOOKMARKS BOLD_H1 BOLD_HEADERS + \ BOLD_NAME_ANCHORS CASE_SENSITIVE_ALWAYS_ON CHARACTER_SET CHARSETS_DIRECTORY CHARSET_SWITCH_RULES + \ CHECKMAIL COLLAPSE_BR_TAGS COLOR CONNECT_TIMEOUT COOKIE_ACCEPT_DOMAINS + \ COOKIE_FILE COOKIE_LOOSE_INVALID_DOMAINS COOKIE_QUERY_INVALID_DOMAINS COOKIE_REJECT_DOMAINS COOKIE_SAVE_FILE + \ COOKIE_STRICT_INVALID_DOMAINS CSO_PROXY CSWING_PATH DEBUGSECS DEFAULT_BOOKMARK_FILE + \ DEFAULT_CACHE_SIZE DEFAULT_EDITOR DEFAULT_INDEX_FILE DEFAULT_KEYPAD_MODE DEFAULT_KEYPAD_MODE_IS_NUMBERS_AS_ARROWS + \ DEFAULT_USER_MODE DEFAULT_VIRTUAL_MEMORY_SIZE DIRED_MENU DISPLAY_CHARSET_CHOICE DOWNLOADER + \ EMACS_KEYS_ALWAYS_ON ENABLE_LYNXRC ENABLE_SCROLLBACK EXTERNAL FINGER_PROXY + \ FOCUS_WINDOW FORCE_8BIT_TOUPPER FORCE_COOKIE_PROMPT FORCE_EMPTY_HREFLESS_A FORCE_SSL_COOKIES_SECURE + \ FORCE_SSL_PROMPT FORMS_OPTIONS FTP_PASSIVE FTP_PROXY GLOBAL_EXTENSION_MAP + \ GLOBAL_MAILCAP GOPHER_PROXY GOTOBUFFER HELPFILE HIDDEN_LINK_MARKER + \ HISTORICAL_COMMENTS HTMLSRC_ATTRNAME_XFORM HTMLSRC_TAGNAME_XFORM HTTP_PROXY HTTPS_PROXY + \ INCLUDE INFOSECS JUMPBUFFER JUMPFILE JUMP_PROMPT + \ JUSTIFY JUSTIFY_MAX_VOID_PERCENT KEYBOARD_LAYOUT KEYMAP LEFTARROW_IN_TEXTFIELD_PROMPT + \ LIST_FORMAT LIST_NEWS_DATES LIST_NEWS_NUMBERS LOCAL_DOMAIN LOCALE_CHARSET + \ LOCAL_EXECUTION_LINKS_ALWAYS_ON LOCAL_EXECUTION_LINKS_ON_BUT_NOT_REMOTE LOCALHOST_ALIAS LYNXCGI_DOCUMENT_ROOT LYNXCGI_ENVIRONMENT + \ LYNX_HOST_NAME LYNX_SIG_FILE MAIL_ADRS MAIL_SYSTEM_ERROR_LOGGING MAKE_LINKS_FOR_ALL_IMAGES + \ MAKE_PSEUDO_ALTS_FOR_INLINES MESSAGESECS MINIMAL_COMMENTS MULTI_BOOKMARK_SUPPORT NCR_IN_BOOKMARKS + \ NEWS_CHUNK_SIZE NEWS_MAX_CHUNK NEWS_POSTING NEWSPOST_PROXY NEWS_PROXY + \ NEWSREPLY_PROXY NNTP_PROXY NNTPSERVER NO_DOT_FILES NO_FILE_REFERER + \ NO_FORCED_CORE_DUMP NO_FROM_HEADER NO_ISMAP_IF_USEMAP NONRESTARTING_SIGWINCH NO_PROXY + \ NO_REFERER_HEADER NO_TABLE_CENTER NUMBER_FIELDS_ON_LEFT NUMBER_LINKS_ON_LEFT OUTGOING_MAIL_CHARSET + \ PARTIAL PARTIAL_THRES PERSISTENT_COOKIES PERSONAL_EXTENSION_MAP PERSONAL_MAILCAP + \ PREFERRED_CHARSET PREFERRED_LANGUAGE PREPEND_BASE_TO_SOURCE PREPEND_CHARSET_TO_SOURCE PRETTYSRC + \ PRETTYSRC_SPEC PRETTYSRC_VIEW_NO_ANCHOR_NUMBERING PRINTER QUIT_DEFAULT_YES REFERER_WITH_QUERY + \ REPLAYSECS REUSE_TEMPFILES RULE RULESFILE SAVE_SPACE + \ SCAN_FOR_BURIED_NEWS_REFS SCREEN_SIZE SCROLLBAR SCROLLBAR_ARROW SEEK_FRAG_AREA_IN_CUR + \ SEEK_FRAG_MAP_IN_CUR SET_COOKIES SHOW_CURSOR SHOW_KB_NAME SHOW_KB_RATE + \ SNEWSPOST_PROXY SNEWS_PROXY SNEWSREPLY_PROXY SOFT_DQUOTES SOURCE_CACHE + \ SOURCE_CACHE_FOR_ABORTED STARTFILE STRIP_DOTDOT_URLS SUBSTITUTE_UNDERSCORES SUFFIX + \ SUFFIX_ORDER SYSTEM_EDITOR SYSTEM_MAIL SYSTEM_MAIL_FLAGS TAGSOUP + \ TEXTFIELDS_NEED_ACTIVATION TIMEOUT TRIM_INPUT_FIELDS TRUSTED_EXEC TRUSTED_LYNXCGI + \ UNDERLINE_LINKS UPLOADER URL_DOMAIN_PREFIXES URL_DOMAIN_SUFFIXES USE_FIXED_RECORDS + \ USE_MOUSE USE_SELECT_POPUPS VERBOSE_IMAGES VIEWER VI_KEYS_ALWAYS_ON + \ WAIS_PROXY XLOADIMAGE_COMMAND contained nextgroup=lynxDelimiter +syn keyword lynxOption BZIP2_PATH CHMOD_PATH COMPRESS_PATH COPY_PATH GZIP_PATH + \ INSTALL_PATH MKDIR_PATH MV_PATH RLOGIN_PATH RMDIR_PATH + \ RM_PATH TAR_PATH TELNET_PATH TN3270_PATH TOUCH_PATH + \ UNCOMPRESS_PATH UNZIP_PATH UUDECODE_PATH ZCAT_PATH ZIP_PATH contained nextgroup=lynxDelimiter syn case match " NOTE: set this if you want the cfg2html.pl formatting directives to be highlighted @@ -71,28 +78,17 @@ if exists("lynx_formatting_directives") syn match lynxFormatDir "^\.fi$" endif -" Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_lynx_syn_inits") - if version < 508 - let did_lynx_syn_inits = 1 - command -nargs=+ HiLink hi link - else - command -nargs=+ HiLink hi def link - endif - - HiLink lynxBoolean Boolean - HiLink lynxComment Comment - HiLink lynxDelimiter Special - HiLink lynxFormatDir Special - HiLink lynxNumber Number - HiLink lynxOption Identifier - HiLink lynxTodo Todo - - delcommand HiLink -endif +hi def link lynxBoolean Boolean +hi def link lynxComment Comment +hi def link lynxDelimiter Special +hi def link lynxFormatDir Special +hi def link lynxNumber Number +hi def link lynxOption Identifier +hi def link lynxTodo Todo let b:current_syntax = "lynx" +let &cpo = s:cpo_save +unlet s:cpo_save + " vim: ts=8 diff --git a/runtime/syntax/make.vim b/runtime/syntax/make.vim index 4d3b0df45..5e72f4e69 100644 --- a/runtime/syntax/make.vim +++ b/runtime/syntax/make.vim @@ -2,7 +2,7 @@ " Language: Makefile " Maintainer: Claudio Fleiner " URL: http://www.fleiner.com/vim/syntax/make.vim -" Last Change: 2006 Apr 5 +" Last Change: 2007 Apr 30 " For version 5.x: Clear all syntax items " For version 6.x: Quit when a syntax file was already loaded @@ -63,14 +63,14 @@ syn match makeCmdNextLine "\\\n."he=e-1 contained " Statements / Functions (GNU make) -syn match makeStatement contained "(\(subst\|addprefix\|addsuffix\|basename\|call\|dir\|error\|filter-out\|filter\|findstring\|firstword\|foreach\|if\|join\|notdir\|origin\|patsubst\|shell\|sort\|strip\|suffix\|warning\|wildcard\|word\|wordlist\|words\)\>"ms=s+1 +syn match makeStatement contained "(\(subst\|addprefix\|addsuffix\|basename\|call\|dir\|error\|eval\|filter-out\|filter\|findstring\|firstword\|foreach\|if\|join\|notdir\|origin\|patsubst\|shell\|sort\|strip\|suffix\|warning\|wildcard\|word\|wordlist\|words\)\>"ms=s+1 " Comment if exists("make_microsoft") - syn match makeComment "#.*" contains=makeTodo + syn match makeComment "#.*" contains=@Spell,makeTodo elseif !exists("make_no_comments") - syn region makeComment start="#" end="^$" end="[^\\]$" keepend contains=makeTodo - syn match makeComment "#$" + syn region makeComment start="#" end="^$" end="[^\\]$" keepend contains=@Spell,makeTodo + syn match makeComment "#$" contains=@Spell endif syn keyword makeTodo TODO FIXME XXX contained diff --git a/runtime/syntax/maple.vim b/runtime/syntax/maple.vim index e21dc125c..37abf16fa 100644 --- a/runtime/syntax/maple.vim +++ b/runtime/syntax/maple.vim @@ -1,8 +1,8 @@ " Vim syntax file " Language: Maple V (based on release 4) " Maintainer: Dr. Charles E. Campbell, Jr. -" Last Change: Apr 12, 2006 -" Version: 8 +" Last Change: Sep 11, 2006 +" Version: 9 " URL: http://mysite.verizon.net/astronaut/vim/index.html#vimlinks_syntax " " Package Function Selection: {{{1 @@ -115,14 +115,14 @@ syn keyword mvPackage VectorCalculus Worksheet XMLTools " Language Support: {{{1 syn keyword mvTodo contained COMBAK FIXME TODO XXX if exists("g:mapleversion") && g:mapleversion < 9 - syn region mvString start=+`+ skip=+``+ end=+`+ keepend contains=mvTodo - syn region mvString start=+"+ skip=+""+ end=+"+ keepend + syn region mvString start=+`+ skip=+``+ end=+`+ keepend contains=mvTodo,@Spell + syn region mvString start=+"+ skip=+""+ end=+"+ keepend contains=@Spell syn region mvDelayEval start=+'+ end=+'+ keepend contains=ALLBUT,mvError,mvBraceError,mvCurlyError,mvParenError,mvSemiError syn match mvVarAssign "[a-zA-Z_][a-zA-Z_0-9]*[ \t]*:=" contains=mvAssign syn match mvAssign ":=" contained else syn region mvName start=+`+ skip=+``+ end=+`+ keepend contains=mvTodo - syn region mvString start=+"+ skip=+""+ end=+"+ keepend + syn region mvString start=+"+ skip=+""+ end=+"+ keepend contains=@Spell syn region mvDelayEval start=+'+ end=+'+ keepend contains=ALLBUT,mvError,mvBraceError,mvCurlyError,mvParenError syn match mvDelim "[;:]" display syn match mvAssign ":=" diff --git a/runtime/syntax/masm.vim b/runtime/syntax/masm.vim index e11a0293a..d7c1e7ea1 100644 --- a/runtime/syntax/masm.vim +++ b/runtime/syntax/masm.vim @@ -1,8 +1,8 @@ " Vim syntax file -" Language: Microsoft Assembler (80x86) -" Maintainer: Rob Brady +" Language: Microsoft Macro Assembler (80x86) +" Orig Author: Rob Brady +" Maintainer: Wu Yongwei " Last Change: $Date$ -" URL: http://www.datatone.com/~robb/vim/syntax/masm.vim " $Revision$ " For version 5.x: Clear all syntax items @@ -16,86 +16,209 @@ endif syn case ignore -" syn match masmType "\.word" - -syn match masmIdentifier "[a-z_$][a-z0-9_$]*" -syn match masmLabel "^[A-Z_$][A-Z0-9_$]*:"he=e-1 - -syn match masmDecimal "\d*" -syn match masmBinary "[0-1]\+b" "put this before hex or 0bfh dies! -syn match masmHexadecimal "[0-9]\x*h" -syn match masmFloat "[0-9]\x*r" - -syn match masmComment ";.*" -syn region masmString start=+'+ end=+'+ - -syn keyword masmOperator AND BYTE PTR CODEPTR DATAPTR DUP DWORD EQ FAR -syn keyword masmOperator FWORD GE GT HIGH LARGE LE LOW LT MOD NE NEAR -syn keyword masmOperator NOT OFFSET OR PROC PWORD QWORD SEG SHORT TBYTE -syn keyword masmOperator TYPE WORD PARA -syn keyword masmDirective ALIGN ARG ASSUME CODESEG COMM -syn keyword masmDirective CONST DATASEG DB DD DF DISPLAY DOSSEG DP -syn keyword masmDirective DQ DT DW ELSE ELSEIF EMUL END ENDIF ENDM ENDP -syn keyword masmDirective ENDS ENUM EQU PROC PUBLIC PUBLICDLL RADIX -syn keyword masmDirective EXTRN FARDATA GLOBAL RECORD SEGMENT SMALLSTACK -syn keyword masmDirective GROUP IF IF1 IF2 IFB IFDEF IFDIF IFDIFI -syn keyword masmDirective IFE IFIDN IFIDNI IFNB IFNDEF INCLUDE INCLUDLIB -syn keyword masmDirective LABEL LARGESTACK STACK STRUC SUBTTL TITLE -syn keyword masmDirective MODEL NAME NOEMUL UNION USES VERSION -syn keyword masmDirective ORG FLAT -syn match masmDirective "\.model" -syn match masmDirective "\.186" -syn match masmDirective "\.286" -syn match masmDirective "\.286c" -syn match masmDirective "\.286p" -syn match masmDirective "\.287" -syn match masmDirective "\.386" -syn match masmDirective "\.386c" -syn match masmDirective "\.386p" -syn match masmDirective "\.387" -syn match masmDirective "\.486" -syn match masmDirective "\.486c" -syn match masmDirective "\.486p" -syn match masmDirective "\.8086" -syn match masmDirective "\.8087" -syn match masmDirective "\.ALPHA" -syn match masmDirective "\.CODE" -syn match masmDirective "\.DATA" +syn match masmIdentifier "[@a-z_$?][@a-z0-9_$?]*" +syn match masmLabel "^\s*[@a-z_$?][@a-z0-9_$?]*:"he=e-1 + +syn match masmDecimal "[-+]\?\d\+[dt]\?" +syn match masmBinary "[-+]\?[0-1]\+[by]" "put this before hex or 0bfh dies! +syn match masmOctal "[-+]\?[0-7]\+[oq]" +syn match masmHexadecimal "[-+]\?[0-9]\x*h" +syn match masmFloatRaw "[-+]\?[0-9]\x*r" +syn match masmFloat "[-+]\?\d\+\.\(\d*\(E[-+]\?\d\+\)\?\)\?" + +syn match masmComment ";.*" contains=@Spell +syn region masmComment start=+COMMENT\s*\z(\S\)+ end=+\z1.*+ contains=@Spell +syn region masmString start=+'+ end=+'+ oneline contains=@Spell +syn region masmString start=+"+ end=+"+ oneline contains=@Spell + +syn region masmTitleArea start=+\" +syn match masmOperator "CARRY?" +syn match masmOperator "OVERFLOW?" +syn match masmOperator "PARITY?" +syn match masmOperator "SIGN?" +syn match masmOperator "ZERO?" +syn keyword masmDirective ALIAS ASSUME CATSTR COMM DB DD DF DOSSEG DQ DT +syn keyword masmDirective DW ECHO ELSE ELSEIF ELSEIF1 ELSEIF2 ELSEIFB +syn keyword masmDirective ELSEIFDEF ELSEIFDIF ELSEIFDIFI ELSEIFE +syn keyword masmDirective ELSEIFIDN ELSEIFIDNI ELSEIFNB ELSEIFNDEF END +syn keyword masmDirective ENDIF ENDM ENDP ENDS EQU EVEN EXITM EXTERN +syn keyword masmDirective EXTERNDEF EXTRN FOR FORC GOTO GROUP IF IF1 IF2 +syn keyword masmDirective IFB IFDEF IFDIF IFDIFI IFE IFIDN IFIDNI IFNB +syn keyword masmDirective IFNDEF INCLUDE INCLUDELIB INSTR INVOKE IRP +syn keyword masmDirective IRPC LABEL LOCAL MACRO NAME OPTION ORG PAGE +syn keyword masmDirective POPCONTEXT PROC PROTO PUBLIC PURGE PUSHCONTEXT +syn keyword masmDirective RECORD REPEAT REPT SEGMENT SIZESTR STRUC +syn keyword masmDirective STRUCT SUBSTR SUBTITLE SUBTTL TEXTEQU TITLE +syn keyword masmDirective TYPEDEF UNION WHILE +syn match masmDirective "\.8086\>" +syn match masmDirective "\.8087\>" +syn match masmDirective "\.NO87\>" +syn match masmDirective "\.186\>" +syn match masmDirective "\.286\>" +syn match masmDirective "\.286C\>" +syn match masmDirective "\.286P\>" +syn match masmDirective "\.287\>" +syn match masmDirective "\.386\>" +syn match masmDirective "\.386C\>" +syn match masmDirective "\.386P\>" +syn match masmDirective "\.387\>" +syn match masmDirective "\.486\>" +syn match masmDirective "\.486P\>" +syn match masmDirective "\.586\>" +syn match masmDirective "\.586P\>" +syn match masmDirective "\.686\>" +syn match masmDirective "\.686P\>" +syn match masmDirective "\.K3D\>" +syn match masmDirective "\.MMX\>" +syn match masmDirective "\.XMM\>" +syn match masmDirective "\.ALPHA\>" +syn match masmDirective "\.DOSSEG\>" +syn match masmDirective "\.SEQ\>" +syn match masmDirective "\.CODE\>" +syn match masmDirective "\.CONST\>" +syn match masmDirective "\.DATA\>" +syn match masmDirective "\.DATA?" +syn match masmDirective "\.EXIT\>" +syn match masmDirective "\.FARDATA\>" +syn match masmDirective "\.FARDATA?" +syn match masmDirective "\.MODEL\>" +syn match masmDirective "\.STACK\>" +syn match masmDirective "\.STARTUP\>" +syn match masmDirective "\.IF\>" +syn match masmDirective "\.ELSE\>" +syn match masmDirective "\.ELSEIF\>" +syn match masmDirective "\.ENDIF\>" +syn match masmDirective "\.REPEAT\>" +syn match masmDirective "\.UNTIL\>" +syn match masmDirective "\.UNTILCXZ\>" +syn match masmDirective "\.WHILE\>" +syn match masmDirective "\.ENDW\>" +syn match masmDirective "\.BREAK\>" +syn match masmDirective "\.CONTINUE\>" +syn match masmDirective "\.ERR\>" +syn match masmDirective "\.ERR1\>" +syn match masmDirective "\.ERR2\>" +syn match masmDirective "\.ERRB\>" +syn match masmDirective "\.ERRDEF\>" +syn match masmDirective "\.ERRDIF\>" +syn match masmDirective "\.ERRDIFI\>" +syn match masmDirective "\.ERRE\>" +syn match masmDirective "\.ERRIDN\>" +syn match masmDirective "\.ERRIDNI\>" +syn match masmDirective "\.ERRNB\>" +syn match masmDirective "\.ERRNDEF\>" +syn match masmDirective "\.ERRNZ\>" +syn match masmDirective "\.LALL\>" +syn match masmDirective "\.SALL\>" +syn match masmDirective "\.XALL\>" +syn match masmDirective "\.LFCOND\>" +syn match masmDirective "\.SFCOND\>" +syn match masmDirective "\.TFCOND\>" +syn match masmDirective "\.CREF\>" +syn match masmDirective "\.NOCREF\>" +syn match masmDirective "\.XCREF\>" +syn match masmDirective "\.LIST\>" +syn match masmDirective "\.NOLIST\>" +syn match masmDirective "\.XLIST\>" +syn match masmDirective "\.LISTALL\>" +syn match masmDirective "\.LISTIF\>" +syn match masmDirective "\.NOLISTIF\>" +syn match masmDirective "\.LISTMACRO\>" +syn match masmDirective "\.NOLISTMACRO\>" +syn match masmDirective "\.LISTMACROALL\>" +syn match masmDirective "\.FPO\>" +syn match masmDirective "\.RADIX\>" +syn match masmDirective "\.SAFESEH\>" +syn match masmDirective "%OUT\>" +syn match masmDirective "ALIGN\>" +syn match masmOption "ALIGN([0-9]\+)" syn keyword masmRegister AX BX CX DX SI DI BP SP -syn keyword masmRegister ES DS SS CS +syn keyword masmRegister CS DS SS ES FS GS syn keyword masmRegister AH BH CH DH AL BL CL DL syn keyword masmRegister EAX EBX ECX EDX ESI EDI EBP ESP +syn keyword masmRegister CR0 CR2 CR3 CR4 +syn keyword masmRegister DR0 DR1 DR2 DR3 DR6 DR7 +syn keyword masmRegister TR3 TR4 TR5 TR6 TR7 +syn match masmRegister "ST([0-7])" + + +" Instruction prefixes +syn keyword masmOpcode LOCK REP REPE REPNE REPNZ REPZ + +" 8086/8088 opcodes +syn keyword masmOpcode AAA AAD AAM AAS ADC ADD AND CALL CBW CLC CLD +syn keyword masmOpcode CLI CMC CMP CMPS CMPSB CMPSW CWD DAA DAS DEC +syn keyword masmOpcode DIV ESC HLT IDIV IMUL IN INC INT INTO IRET +syn keyword masmOpcode JCXZ JMP LAHF LDS LEA LES LODS LODSB LODSW +syn keyword masmOpcode LOOP LOOPE LOOPEW LOOPNE LOOPNEW LOOPNZ +syn keyword masmOpcode LOOPNZW LOOPW LOOPZ LOOPZW MOV MOVS MOVSB +syn keyword masmOpcode MOVSW MUL NEG NOP NOT OR OUT POP POPF PUSH +syn keyword masmOpcode PUSHF RCL RCR RET RETF RETN ROL ROR SAHF SAL +syn keyword masmOpcode SAR SBB SCAS SCASB SCASW SHL SHR STC STD STI +syn keyword masmOpcode STOS STOSB STOSW SUB TEST WAIT XCHG XLAT XLATB +syn keyword masmOpcode XOR +syn match masmOpcode "J\(P[EO]\|\(N\?\([ABGL]E\?\|[CEOPSZ]\)\)\)\>" + +" 80186 opcodes +syn keyword masmOpcode BOUND ENTER INS INSB INSW LEAVE OUTS OUTSB +syn keyword masmOpcode OUTSW POPA PUSHA PUSHW + +" 80286 opcodes +syn keyword masmOpcode ARPL LAR LSL SGDT SIDT SLDT SMSW STR VERR VERW +" 80286/80386 privileged opcodes +syn keyword masmOpcode CLTS LGDT LIDT LLDT LMSW LTR -" these are current as of the 486 - don't have any pentium manuals handy -syn keyword masmOpcode AAA AAD AAM AAS ADC ADD AND ARPL BOUND BSF -syn keyword masmOpcode BSR BSWAP BT BTC BTR BTS BSWAP BT BTC BTR -syn keyword masmOpcode BTS CALL CBW CDQ CLC CLD CLI CLTS CMC CMP -syn keyword masmOpcode CMPS CMPSB CMPSW CMPSD CMPXCHG CWD CWDE DAA -syn keyword masmOpcode DAS DEC DIV ENTER HLT IDIV IMUL IN INC INS -syn keyword masmOpcode INSB INSW INSD INT INTO INVD INVLPG IRET -syn keyword masmOpcode IRETD JA JAE JB JBE JC JCXZ JECXZ JE JZ JG -syn keyword masmOpcode JGE JL JLE JNA JNAE JNB JNBE JNC JNE JNG JNGE -syn keyword masmOpcode JNL JNLE JNO JNP JNS JNZ JO JP JPE JPO JS JZ -syn keyword masmOpcode JMP LAHF LAR LEA LEAVE LGDT LIDT LGS LSS LFS -syn keyword masmOpcode LODS LODSB LODSW LODSD LOOP LOOPE LOOPZ LOONE -syn keyword masmOpcode LOOPNE RETF RETN -syn keyword masmOpcode LDS LES LLDT LMSW LOCK LSL LTR MOV MOVS MOVSB -syn keyword masmOpcode MOVSW MOVSD MOVSX MOVZX MUL NEG NOP NOT OR -syn keyword masmOpcode OUT OUTS OUTSB OUTSW OUTSD POP POPA POPD -syn keyword masmOpcode POPF POPFD PUSH PUSHA PUSHAD PUSHF PUSHFD -syn keyword masmOpcode RCL RCR ROL ROR REP REPE REPZ REPNE REPNZ -syn keyword masmOpcode RET SAHF SAL SAR SHL SHR SBB SCAS SCASB -syn keyword masmOpcode SCASW SCASD SETA SETAE SETB SETBE SETC SETE -syn keyword masmOpcode SETG SETGE SETL SETLE SETNA SETNAE SETNB -syn keyword masmOpcode SETNBE SETNC SETNE SETNG SETNGE SETNL SETNLE -syn keyword masmOpcode SETNO SETNP SETNS SETNZ SETO SETP SETPE SETPO -syn keyword masmOpcode SETS SETZ SGDT SIDT SHLD SHRD SLDT SMSW STC -syn keyword masmOpcode STD STI STOS STOSB STOSW STOSD STR SUB TEST -syn keyword masmOpcode VERR VERW WAIT WBINVD XADD XCHG XLAT XLATB XOR - -" floating point coprocessor as of 487 +" 80386 opcodes +syn keyword masmOpcode BSF BSR BT BTC BTR BTS CDQ CMPSD CWDE INSD +syn keyword masmOpcode IRETD IRETDF IRETF JECXZ LFS LGS LODSD LOOPD +syn keyword masmOpcode LOOPED LOOPNED LOOPNZD LOOPZD LSS MOVSD MOVSX +syn keyword masmOpcode MOVZX OUTSD POPAD POPFD PUSHAD PUSHD PUSHFD +syn keyword masmOpcode SCASD SHLD SHRD STOSD +syn match masmOpcode "SET\(P[EO]\|\(N\?\([ABGL]E\?\|[CEOPSZ]\)\)\)\>" + +" 80486 opcodes +syn keyword masmOpcode BSWAP CMPXCHG INVD INVLPG WBINVD XADD + +" Floating-point opcodes as of 487 syn keyword masmOpFloat F2XM1 FABS FADD FADDP FBLD FBSTP FCHS FCLEX syn keyword masmOpFloat FNCLEX FCOM FCOMP FCOMPP FCOS FDECSTP FDISI syn keyword masmOpFloat FNDISI FDIV FDIVP FDIVR FDIVRP FENI FNENI @@ -103,13 +226,73 @@ syn keyword masmOpFloat FFREE FIADD FICOM FICOMP FIDIV FIDIVR FILD syn keyword masmOpFloat FIMUL FINCSTP FINIT FNINIT FIST FISTP FISUB syn keyword masmOpFloat FISUBR FLD FLDCW FLDENV FLDLG2 FLDLN2 FLDL2E syn keyword masmOpFloat FLDL2T FLDPI FLDZ FLD1 FMUL FMULP FNOP FPATAN -syn keyword masmOpFloat FPREM FPREM1 FPTAN FRNDINT FRSTOR FSAVE -syn keyword masmOpFloat FNSAVE FSCALE FSETPM FSIN FSINCOS FSQRT FST -syn keyword masmOpFloat FSTCW FNSTCW FSTENV FNSTENV FSTP FSTSW FNSTSW -syn keyword masmOpFloat FSUB FSUBP FSUBR FSUBRP FTST FUCOM FUCOMP -syn keyword masmOpFloat FUCOMPP FWAIT FXAM FXCH FXTRACT FYL2X FYL2XP1 -syn match masmOpFloat "FSTSW[ \t]\+AX" -syn match masmOpFloat "FNSTSW[ \t]\+AX" +syn keyword masmOpFloat FPREM FPREM1 FPTAN FRNDINT FRSTOR FSAVE FNSAVE +syn keyword masmOpFloat FSCALE FSETPM FSIN FSINCOS FSQRT FST FSTCW +syn keyword masmOpFloat FNSTCW FSTENV FNSTENV FSTP FSTSW FNSTSW FSUB +syn keyword masmOpFloat FSUBP FSUBR FSUBRP FTST FUCOM FUCOMP FUCOMPP +syn keyword masmOpFloat FWAIT FXAM FXCH FXTRACT FYL2X FYL2XP1 + +" Floating-point opcodes in Pentium and later processors +syn keyword masmOpFloat FCMOVE FCMOVNE FCMOVB FCMOVBE FCMOVNB FCMOVNBE +syn keyword masmOpFloat FCMOVU FCMOVNU FCOMI FUCOMI FCOMIP FUCOMIP +syn keyword masmOpFloat FXSAVE FXRSTOR + +" MMX opcodes (Pentium w/ MMX, Pentium II, and later) +syn keyword masmOpcode MOVD MOVQ PACKSSWB PACKSSDW PACKUSWB +syn keyword masmOpcode PUNPCKHBW PUNPCKHWD PUNPCKHDQ +syn keyword masmOpcode PUNPCKLBW PUNPCKLWD PUNPCKLDQ +syn keyword masmOpcode PADDB PADDW PADDD PADDSB PADDSW PADDUSB PADDUSW +syn keyword masmOpcode PSUBB PSUBW PSUBD PSUBSB PSUBSW PSUBUSB PSUBUSW +syn keyword masmOpcode PMULHW PMULLW PMADDWD +syn keyword masmOpcode PCMPEQB PCMPEQW PCMPEQD PCMPGTB PCMPGTW PCMPGTD +syn keyword masmOpcode PAND PANDN POR PXOR +syn keyword masmOpcode PSLLW PSLLD PSLLQ PSRLW PSRLD PSRLQ PSRAW PSRAD +syn keyword masmOpcode EMMS + +" SSE opcodes (Pentium III and later) +syn keyword masmOpcode MOVAPS MOVUPS MOVHPS MOVHLPS MOVLPS MOVLHPS +syn keyword masmOpcode MOVMSKPS MOVSS +syn keyword masmOpcode ADDPS ADDSS SUBPS SUBSS MULPS MULSS DIVPS DIVSS +syn keyword masmOpcode RCPPS RCPSS SQRTPS SQRTSS RSQRTPS RSQRTSS +syn keyword masmOpcode MAXPS MAXSS MINPS MINSS +syn keyword masmOpcode CMPPS CMPSS COMISS UCOMISS +syn keyword masmOpcode ANDPS ANDNPS ORPS XORPS +syn keyword masmOpcode SHUFPS UNPCKHPS UNPCKLPS +syn keyword masmOpcode CVTPI2PS CVTSI2SS CVTPS2PI CVTTPS2PI +syn keyword masmOpcode CVTSS2SI CVTTSS2SI +syn keyword masmOpcode LDMXCSR STMXCSR +syn keyword masmOpcode PAVGB PAVGW PEXTRW PINSRW PMAXUB PMAXSW +syn keyword masmOpcode PMINUB PMINSW PMOVMSKB PMULHUW PSADBW PSHUFW +syn keyword masmOpcode MASKMOVQ MOVNTQ MOVNTPS SFENCE +syn keyword masmOpcode PREFETCHT0 PREFETCHT1 PREFETCHT2 PREFETCHNTA + +" SSE2 opcodes (Pentium 4 and later) +syn keyword masmOpcode MOVAPD MOVUPD MOVHPD MOVLPD MOVMSKPD MOVSD +syn keyword masmOpcode ADDPD ADDSD SUBPD SUBSD MULPD MULSD DIVPD DIVSD +syn keyword masmOpcode SQRTPD SQRTSD MAXPD MAXSD MINPD MINSD +syn keyword masmOpcode ANDPD ANDNPD ORPD XORPD +syn keyword masmOpcode CMPPD CMPSD COMISD UCOMISD +syn keyword masmOpcode SHUFPD UNPCKHPD UNPCKLPD +syn keyword masmOpcode CVTPD2PI CVTTPD2PI CVTPI2PD CVTPD2DQ +syn keyword masmOpcode CVTTPD2DQ CVTDQ2PD CVTPS2PD CVTPD2PS +syn keyword masmOpcode CVTSS2SD CVTSD2SS CVTSD2SI CVTTSD2SI CVTSI2SD +syn keyword masmOpcode CVTDQ2PS CVTPS2DQ CVTTPS2DQ +syn keyword masmOpcode MOVDQA MOVDQU MOVQ2DQ MOVDQ2Q PMULUDQ +syn keyword masmOpcode PADDQ PSUBQ PSHUFLW PSHUFHW PSHUFD +syn keyword masmOpcode PSLLDQ PSRLDQ PUNPCKHQDQ PUNPCKLQDQ +syn keyword masmOpcode CLFLUSH LFENCE MFENCE PAUSE MASKMOVDQU +syn keyword masmOpcode MOVNTPD MOVNTDQ MOVNTI + +" SSE3 opcodes (Pentium 4 w/ Hyper-Threading and later) +syn keyword masmOpcode FISTTP LDDQU ADDSUBPS ADDSUBPD +syn keyword masmOpcode HADDPS HSUBPS HADDPD HSUBPD +syn keyword masmOpcode MOVSHDUP MOVSLDUP MOVDDUP MONITOR MWAIT + +" Other opcodes in Pentium and later processors +syn keyword masmOpcode CMPXCHG8B CPUID UD2 +syn keyword masmOpcode RSM RDMSR WRMSR RDPMC RDTSC SYSENTER SYSEXIT +syn match masmOpcode "CMOV\(P[EO]\|\(N\?\([ABGL]E\?\|[CEOPSZ]\)\)\)\>" + " Define the default highlighting. " For version 5.7 and earlier: only when not done already @@ -123,19 +306,30 @@ if version >= 508 || !exists("did_masm_syntax_inits") endif " The default methods for highlighting. Can be overridden later - HiLink masmLabel Label + HiLink masmLabel PreProc HiLink masmComment Comment HiLink masmDirective Statement - HiLink masmOperator Statement + HiLink masmType Type + HiLink masmOperator Type + HiLink masmOption Special + HiLink masmRegister Special HiLink masmString String + HiLink masmText String + HiLink masmTitle Title + HiLink masmOpcode Statement + HiLink masmOpFloat Statement HiLink masmHexadecimal Number HiLink masmDecimal Number + HiLink masmOctal Number HiLink masmBinary Number + HiLink masmFloatRaw Number HiLink masmFloat Number HiLink masmIdentifier Identifier + syntax sync minlines=50 + delcommand HiLink endif diff --git a/runtime/syntax/muttrc.vim b/runtime/syntax/muttrc.vim index cc77711a3..fb88f6afd 100644 --- a/runtime/syntax/muttrc.vim +++ b/runtime/syntax/muttrc.vim @@ -2,9 +2,9 @@ " Language: Mutt setup files " Original: Preben 'Peppe' Guldberg " Maintainer: Kyle Wheeler -" Last Change: 22 Apr 2006 +" Last Change: 5 Mar 2007 -" This file covers mutt version 1.5.11 +" This file covers mutt version 1.5.14 (and most of CVS HEAD) " Included are also a few features from 1.4.2.1 " For version 5.x: Clear all syntax items @@ -22,17 +22,19 @@ else setlocal isk=@,48-57,_,- endif -syn match muttrcComment "^#.*$" +syn match muttrcComment "^# .*$" contains=@Spell +syn match muttrcComment "^#[^ ].*$" +syn match muttrcComment "^#$" syn match muttrcComment "[^\\]#.*$"lc=1 " Escape sequences (back-tick and pipe goes here too) -syn match muttrcEscape +\\[#tnr"'Cc]+ +syn match muttrcEscape +\\[#tnr"'Cc ]+ syn match muttrcEscape +[`|]+ " The variables takes the following arguments syn match muttrcString "=\s*[^ #"'`]\+"lc=1 contains=muttrcEscape -syn region muttrcString start=+"+ms=e skip=+\\"+ end=+"+ contains=muttrcEscape,muttrcSet,muttrcUnset,muttrcReset,muttrcToggle,muttrcMacro,muttrcCommand,muttrcAction -syn region muttrcString start=+'+ms=e skip=+\\'+ end=+'+ contains=muttrcEscape,muttrcSet,muttrcUnset,muttrcReset,muttrcToggle,muttrcMacro,muttrcCommand,muttrcAction +syn region muttrcString start=+"+ms=e skip=+\\"+ end=+"+ contains=muttrcEscape,muttrcSet,muttrcUnset,muttrcReset,muttrcToggle,muttrcCommand,muttrcAction +syn region muttrcString start=+'+ms=e skip=+\\'+ end=+'+ contains=muttrcEscape,muttrcSet,muttrcUnset,muttrcReset,muttrcToggle,muttrcCommand,muttrcAction syn region muttrcShellString matchgroup=muttrcEscape keepend start=+`+ skip=+\\`+ end=+`+ contains=muttrcVarStr,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcCommand,muttrcSet @@ -41,8 +43,11 @@ syn match muttrcRXChars contained /[][|()][.*?+]*/ syn match muttrcRXChars contained /'^/ms=s+1 syn match muttrcRXChars contained /$'/me=e-1 syn match muttrcRXChars contained /\\/ +" Why does muttrcRXString2 work with one \ when muttrcRXString requires two? syn region muttrcRXString contained start=+'+ skip=+\\'+ end=+'+ contains=muttrcRXChars syn region muttrcRXString contained start=+"+ skip=+\\"+ end=+"+ contains=muttrcRXChars +syn region muttrcRXString2 contained start=+'+ skip=+\'+ end=+'+ contains=muttrcRXChars +syn region muttrcRXString2 contained start=+"+ skip=+\"+ end=+"+ contains=muttrcRXChars syn region muttrcRXPat contained start=+'+ skip=+\\'+ end=+'\s*+ keepend skipwhite contains=muttrcRXString nextgroup=muttrcRXPat syn region muttrcRXPat contained start=+"+ skip=+\\"+ end=+"\s*+ keepend skipwhite contains=muttrcRXString nextgroup=muttrcRXPat @@ -102,7 +107,7 @@ syn keyword muttrcVarBool contained save_empty save_name score sig_dashes sig_on syn keyword muttrcVarBool contained smart_wrap smime_ask_cert_label smime_decrypt_use_default_key syn keyword muttrcVarBool contained smime_is_default sort_re ssl_force_tls ssl_use_sslv2 syn keyword muttrcVarBool contained ssl_use_sslv3 ssl_use_tlsv1 ssl_usesystemcerts status_on_top -syn keyword muttrcVarBool contained strict_threads suspend text_flowed thorough_search +syn keyword muttrcVarBool contained strict_mime strict_threads suspend text_flowed thorough_search syn keyword muttrcVarBool contained thread_received tilde uncollapse_jump use_8bitmime syn keyword muttrcVarBool contained use_domain use_envelope_from use_from use_idn use_ipv6 syn keyword muttrcVarBool contained user_agent wait_key weed wrap_search write_bcc @@ -199,24 +204,26 @@ syn keyword muttrcVarQuad contained invpostpone invprint invquit invrecall invre syn keyword muttrcVarNum contained connect_timeout history imap_keepalive mail_check menu_context net_inc syn keyword muttrcVarNum contained pager_context pager_index_lines pgp_timeout pop_checkinterval read_inc -syn keyword muttrcVarNum contained score_threshold_delete score_threshold_flag score_threshold_read -syn keyword muttrcVarNum contained sendmail_wait sleep_time smime_timeout ssl_min_dh_prime_bits timeout -syn keyword muttrcVarNum contained wrapmargin write_inc +syn keyword muttrcVarNum contained save_history score_threshold_delete score_threshold_flag +syn keyword muttrcVarNum contained score_threshold_read sendmail_wait sleep_time smime_timeout +syn keyword muttrcVarNum contained ssl_min_dh_prime_bits timeout wrap wrapmargin write_inc -syn keyword muttrcVarStr contained alias_file alias_format attach_format attach_sep attribution +syn match muttrcVarStr contained 'my_[a-zA-Z0-9_]\+' +syn keyword muttrcVarStr contained alias_file alias_format assumed_charset attach_format attach_sep attribution syn keyword muttrcVarStr contained certificate_file charset compose_format config_charset content_type syn keyword muttrcVarStr contained date_format default_hook display_filter dotlock_program dsn_notify syn keyword muttrcVarStr contained dsn_return editor entropy_file envelope_from_address escape folder syn keyword muttrcVarStr contained folder_format forw_format forward_format from gecos_mask hdr_format -syn keyword muttrcVarStr contained header_cache header_cache_pagesize hostname imap_authenticators -syn keyword muttrcVarStr contained imap_delim_chars imap_headers imap_home_namespace imap_login imap_pass +syn keyword muttrcVarStr contained header_cache header_cache_pagesize history_file hostname imap_authenticators +syn keyword muttrcVarStr contained imap_delim_chars imap_headers imap_home_namespace imap_idle imap_login imap_pass syn keyword muttrcVarStr contained imap_user indent_str indent_string index_format ispell locale mailcap_path -syn keyword muttrcVarStr contained mask mbox mbox_type message_format mh_seq_flagged mh_seq_replied +syn keyword muttrcVarStr contained mask mbox mbox_type message_format message_cachedir mh_seq_flagged mh_seq_replied syn keyword muttrcVarStr contained mh_seq_unseen mix_entry_format mixmaster msg_format pager pager_format syn keyword muttrcVarStr contained pgp_clearsign_command pgp_decode_command pgp_decrypt_command syn keyword muttrcVarStr contained pgp_encrypt_only_command pgp_encrypt_sign_command pgp_entry_format syn keyword muttrcVarStr contained pgp_export_command pgp_getkeys_command pgp_good_sign pgp_import_command -syn keyword muttrcVarStr contained pgp_list_pubring_command pgp_list_secring_command pgp_sign_as +syn keyword muttrcVarStr contained pgp_list_pubring_command pgp_list_secring_command pgp_mime_signature_filename +syn keyword muttrcVarStr contained pgp_mime_signature_description pgp_sign_as syn keyword muttrcVarStr contained pgp_sign_command pgp_sort_keys pgp_verify_command pgp_verify_key_command syn keyword muttrcVarStr contained pipe_sep pop_authenticators pop_host pop_pass pop_user post_indent_str syn keyword muttrcVarStr contained post_indent_string postponed preconnect print_cmd print_command @@ -227,8 +234,8 @@ syn keyword muttrcVarStr contained smime_encrypt_command smime_encrypt_with smim syn keyword muttrcVarStr contained smime_get_cert_email_command smime_get_signer_cert_command syn keyword muttrcVarStr contained smime_import_cert_command smime_keys smime_pk7out_command smime_sign_as syn keyword muttrcVarStr contained smime_sign_command smime_sign_opaque_command smime_verify_command -syn keyword muttrcVarStr contained smime_verify_opaque_command sort sort_alias sort_aux sort_browser -syn keyword muttrcVarStr contained spam_separator spoolfile ssl_ca_certificates_file ssl_client_cert +syn keyword muttrcVarStr contained smime_verify_opaque_command smtp_url smtp_authenticators sort sort_alias sort_aux +syn keyword muttrcVarStr contained sort_browser spam_separator spoolfile ssl_ca_certificates_file ssl_client_cert syn keyword muttrcVarStr contained status_chars status_format tmpdir to_chars tunnel visual " Present in 1.4.2.1 (pgp_create_traditional was a bool then) @@ -243,10 +250,14 @@ syn match muttrcMenuCommas /,/ contained syn keyword muttrcCommand auto_view alternative_order charset-hook exec unalternative_order syn keyword muttrcCommand hdr_order iconv-hook ignore mailboxes my_hdr unmailboxes syn keyword muttrcCommand pgp-hook push score source unauto_view unhdr_order -syn keyword muttrcCommand unhook unignore unmono unmy_hdr unscore +syn keyword muttrcCommand unignore unmono unmy_hdr unscore syn keyword muttrcCommand mime_lookup unmime_lookup spam ungroup syn keyword muttrcCommand nospam unalternative_order +syn keyword muttrcHooks contained account-hook charset-hook iconv-hook message-hook folder-hook mbox-hook save-hook fcc-hook fcc-save-hook send-hook send2-hook reply-hook crypt-hook +syn keyword muttrcUnhook contained unhook +syn region muttrcUnhookLine keepend start=+^\s*unhook\s+ skip=+\\$+ end=+$+ contains=muttrcUnhook,muttrcHooks,muttrcUnHighlightSpace,muttrcComment + syn match muttrcAttachmentsMimeType contained "[*a-z0-9_-]\+/[*a-z0-9._-]\+\s*" skipwhite nextgroup=muttrcAttachmentsMimeType syn match muttrcAttachmentsFlag contained "[+-]\%([AI]\|inline\|attachment\)\s\+" skipwhite nextgroup=muttrcAttachmentsMimeType syn match muttrcAttachmentsLine "^\s*\%(un\)\?attachments\s\+" skipwhite nextgroup=muttrcAttachmentsFlag @@ -286,12 +297,12 @@ syn match muttrcFunction contained "\" syn match muttrcFunction contained "\" syn match muttrcFunction contained "\" -syn match muttrcFunction contained "\" +syn match muttrcFunction contained "\" syn match muttrcFunction contained "\" syn match muttrcFunction contained "\" syn match muttrcFunction contained "\" syn match muttrcFunction contained "\" -syn match muttrcFunction contained "\<\%(backspace\|backward-char\|bol\|bottom\|bottom-page\|buffy-cycle\|clear-flag\|complete\%(-query\)\?\|copy-file\|create-alias\|detach-file\|eol\|exit\|extract-keys\|\%(imap-\)\?fetch-mail\|forget-passphrase\|forward-char\|group-reply\|help\|ispell\|jump\|limit\|list-reply\|mail\|mail-key\|mark-as-new\|middle-page\|new-mime\|pgp-menu\|query\|query-append\|quit\|quote-char\|read-subthread\|redraw-screen\|refresh\|rename-file\|reply\|select-new\|set-flag\|shell-escape\|skip-quoted\|sort\|subscribe\|sync-mailbox\|top\|top-page\|transpose-chars\|unsubscribe\|untag-pattern\|verify-key\|write-fcc\)\>" +syn match muttrcFunction contained "\<\%(backspace\|backward-char\|bol\|bottom\|bottom-page\|buffy-cycle\|clear-flag\|complete\%(-query\)\?\|copy-file\|create-alias\|detach-file\|eol\|exit\|extract-keys\|\%(imap-\)\?fetch-mail\|forget-passphrase\|forward-char\|group-reply\|help\|ispell\|jump\|limit\|list-reply\|mail\|mail-key\|mark-as-new\|middle-page\|new-mime\|noop\|pgp-menu\|query\|query-append\|quit\|quote-char\|read-subthread\|redraw-screen\|refresh\|rename-file\|reply\|select-new\|set-flag\|shell-escape\|skip-quoted\|sort\|subscribe\|sync-mailbox\|top\|top-page\|transpose-chars\|unsubscribe\|untag-pattern\|verify-key\|what-key\|write-fcc\)\>" syn match muttrcAction contained "<[^>]\{-}>" contains=muttrcBadAction,muttrcFunction,muttrcKeyName syn keyword muttrcSet set skipwhite nextgroup=muttrcVar.* @@ -315,7 +326,15 @@ syn match muttrcBindMenuList contained /\S\+/ skipwhite contains=muttrcMenu,mutt syn match muttrcBindMenuListNL contained /\s*\\$/ skipwhite skipnl nextgroup=muttrcBindMenuList,muttrcBindMenuListNL syn match muttrcBind /^\s*bind\s\?/ skipwhite nextgroup=muttrcBindMenuList,muttrcBindMenuListNL -syn match muttrcMacroKey contained /\S\+/ skipwhite contains=muttrcKey +syn region muttrcMacroDescr contained keepend skipwhite start=+\s*\S+ms=e skip=+\\ + end=+ \|$+me=s +syn region muttrcMacroDescr contained keepend skipwhite start=+'+ms=e skip=+\\'+ end=+'+me=s +syn region muttrcMacroDescr contained keepend skipwhite start=+"+ms=e skip=+\\"+ end=+"+me=s +syn match muttrcMacroDescrNL contained /\s*\\$/ skipwhite skipnl nextgroup=muttrcMacroDescr,muttrcMacroDescrNL +syn region muttrcMacroBody contained skipwhite start="\S" skip='\\ \|\\$' end=' \|$' contains=muttrcEscape,muttrcSet,muttrcUnset,muttrcReset,muttrcToggle,muttrcCommand,muttrcAction nextgroup=muttrcMacroDescr,muttrcMacroDescrNL +syn region muttrcMacroBody matchgroup=Type contained skipwhite start=+'+ms=e skip=+\\'+ end=+'+me=s contains=muttrcEscape,muttrcSet,muttrcUnset,muttrcReset,muttrcToggle,muttrcCommand,muttrcAction nextgroup=muttrcMacroDescr,muttrcMacroDescrNL +syn region muttrcMacroBody matchgroup=Type contained skipwhite start=+"+ms=e skip=+\\"+ end=+"+me=s contains=muttrcEscape,muttrcSet,muttrcUnset,muttrcReset,muttrcToggle,muttrcCommand,muttrcAction nextgroup=muttrcMacroDescr,muttrcMacroDescrNL +syn match muttrcMacroBodyNL contained /\s*\\$/ skipwhite skipnl nextgroup=muttrcMacroBody,muttrcMacroBodyNL +syn match muttrcMacroKey contained /\S\+/ skipwhite contains=muttrcKey nextgroup=muttrcMacroBody,muttrcMacroBodyNL syn match muttrcMacroKeyNL contained /\s*\\$/ skipwhite skipnl nextgroup=muttrcMacroKey,muttrcMacroKeyNL syn match muttrcMacroMenuList contained /\S\+/ skipwhite contains=muttrcMenu,muttrcMenuCommas nextgroup=muttrcMacroKey,muttrcMacroKeyNL syn match muttrcMacroMenuListNL contained /\s*\\$/ skipwhite skipnl nextgroup=muttrcMacroMenuList,muttrcMacroMenuListNL @@ -332,32 +351,36 @@ syn region muttrcGroupDef contained start="-group\s\+" skip="\\$" end="\s" skipw syn keyword muttrcGroupKeyword contained group ungroup syn region muttrcGroupLine keepend start=+^\s*\%(un\)\?group\s+ skip=+\\$+ end=+$+ contains=muttrcGroupKeyword,muttrcGroupDef,muttrcAddrDef,muttrcRXDef,muttrcUnHighlightSpace,muttrcComment -syn match muttrcAliasGroupName contained /\w\+/ skipwhite nextgroup=muttrcAliasGroupDef,muttrcAliasAbbr,muttrcAliasNL +syn match muttrcAliasGroupName contained /\w\+/ skipwhite nextgroup=muttrcAliasGroupDef,muttrcAliasKey,muttrcAliasNL syn match muttrcAliasGroupDefNL contained /\s*\\$/ skipwhite skipnl nextgroup=muttrcAliasGroupName,muttrcAliasGroupDefNL syn match muttrcAliasGroupDef contained /\s*-group/ skipwhite nextgroup=muttrcAliasGroupName,muttrcAliasGroupDefNL contains=muttrcGroupFlag -syn match muttrcAliasEmail contained /\S\+@\S\+/ contains=muttrcEmail nextgroup=muttrcAliasName,muttrcAliasNameNL -syn match muttrcAliasEncEmail contained /<[^>]\+>/ contains=muttrcEmail +syn match muttrcAliasComma contained /,/ skipwhite nextgroup=muttrcAliasEmail,muttrcAliasEncEmail,muttrcAliasNameNoParens,muttrcAliasENNL +syn match muttrcAliasEmail contained /\S\+@\S\+/ contains=muttrcEmail nextgroup=muttrcAliasName,muttrcAliasNameNL skipwhite +syn match muttrcAliasEncEmail contained /<[^>]\+>/ contains=muttrcEmail nextgroup=muttrcAliasComma syn match muttrcAliasEncEmailNL contained /\s*\\$/ skipwhite skipnl nextgroup=muttrcAliasEncEmail,muttrcAliasEncEmailNL syn match muttrcAliasNameNoParens contained /[^<(@]\+\s\+/ nextgroup=muttrcAliasEncEmail,muttrcAliasEncEmailNL syn region muttrcAliasName contained matchgroup=Type start=/(/ end=/)/ skipwhite syn match muttrcAliasNameNL contained /\s*\\$/ skipwhite skipnl nextgroup=muttrcAliasName,muttrcAliasNameNL -syn match muttrcAliasENNL contained /\s*\\$/ skipwhite skipnl nextgroup=muttrcAliasEmail,muttrcAliasNameNoParens,muttrcAliasENNL -syn match muttrcAliasAbbr contained /\s*[^- \t]\S\+/ skipwhite nextgroup=muttrcAliasEmail,muttrcAliasNameNoParens,muttrcAliasENNL -syn match muttrcAliasNL contained /\s*\\$/ skipwhite skipnl nextgroup=muttrcAliasGroupDef,muttrcAliasAbbr,muttrcAliasNL -syn match muttrcAlias /^\s*alias\s/ skipwhite nextgroup=muttrcAliasGroupDef,muttrcAliasAbbr,muttrcAliasNL +syn match muttrcAliasENNL contained /\s*\\$/ skipwhite skipnl nextgroup=muttrcAliasEmail,muttrcAliasEncEmail,muttrcAliasNameNoParens,muttrcAliasENNL +syn match muttrcAliasKey contained /\s*[^- \t]\S\+/ skipwhite nextgroup=muttrcAliasEmail,muttrcAliasEncEmail,muttrcAliasNameNoParens,muttrcAliasENNL +syn match muttrcAliasNL contained /\s*\\$/ skipwhite skipnl nextgroup=muttrcAliasGroupDef,muttrcAliasKey,muttrcAliasNL +syn match muttrcAlias /^\s*alias\s/ skipwhite nextgroup=muttrcAliasGroupDef,muttrcAliasKey,muttrcAliasNL -syn match muttrcUnAliasAbbr contained "\s*\w\+\s*" skipwhite nextgroup=muttrcUnAliasAbbr,muttrcUnAliasNL -syn match muttrcUnAliasNL contained /\s*\\$/ skipwhite skipnl nextgroup=muttrcUnAliasAbbr,muttrcUnAliasNL -syn match muttrcUnAlias /^\s*unalias\s\?/ nextgroup=muttrcUnAliasAbbr,muttrcUnAliasNL +syn match muttrcUnAliasKey contained "\s*\w\+\s*" skipwhite nextgroup=muttrcUnAliasKey,muttrcUnAliasNL +syn match muttrcUnAliasNL contained /\s*\\$/ skipwhite skipnl nextgroup=muttrcUnAliasKey,muttrcUnAliasNL +syn match muttrcUnAlias /^\s*unalias\s\?/ nextgroup=muttrcUnAliasKey,muttrcUnAliasNL syn match muttrcSimplePat contained "!\?\^\?[~][ADEFgGklNOpPQRSTuUvV=$]" syn match muttrcSimplePat contained "!\?\^\?[~][mnXz]\s\+\%([<>-][0-9]\+\|[0-9]\+[-][0-9]*\)" -syn match muttrcSimplePat contained "!\?\^\?[~][dr]\s\+[0-9]\{2}\%(/[0-9]\{2}\%(/[0-9]\{2}\%([0-9]\{2}\)\)\?\)\?" +syn match muttrcSimplePat contained "!\?\^\?[~][dr]\s\+\%(\%(-\?[0-9]\{1,2}\%(/[0-9]\{1,2}\%(/[0-9]\{2}\%([0-9]\{2}\)\?\)\?\)\?\%([+*-][0-9]\+[ymwd]\)*\)\|\%(\%([0-9]\{1,2}\%(/[0-9]\{1,2}\%(/[0-9]\{2}\%([0-9]\{2}\)\?\)\?\)\?\%([+*-][0-9]\+[ymwd]\)*\)-\%([0-9]\{1,2}\%(/[0-9]\{1,2}\%(/[0-9]\{2}\%([0-9]\{2}\)\?\)\?\)\?\%([+*-][0-9]\+[ymwd]\)\?\)\?\)\|\%([<>=][0-9]\+[ymwd]\)\)" syn match muttrcSimplePat contained "!\?\^\?[~][bBcCefhHiLstxy]\s\+" nextgroup=muttrcSimplePatRXContainer -syn match muttrcSimplePat contained "!\?\^\?[%][bBcCefhHiLstxy]\s\+" nextgroup=muttrcSimplePatGroup +syn match muttrcSimplePat contained "!\?\^\?[%][bBcCefhHiLstxy]\s\+" nextgroup=muttrcSimplePatString +syn match muttrcSimplePat contained "!\?\^\?[=][bh]\s\+" nextgroup=muttrcSimplePatString "syn match muttrcSimplePat contained /"[^~=%][^"]*/ contains=muttrcRXPat "syn match muttrcSimplePat contained /'[^~=%][^']*/ contains=muttrcRXPat -syn match muttrcSimplePatGroup contained /[a-zA-Z0-9]\+/ +syn match muttrcSimplePatString contained /[a-zA-Z0-9]\+/ +syn region muttrcSimplePatString contained keepend start=+"+ end=+"+ skip=+\\"+ +syn region muttrcSimplePatString contained keepend start=+'+ end=+'+ skip=+\\'+ syn region muttrcSimplePatRXContainer contained keepend start=+"+ end=+"+ skip=+\\"+ contains=muttrcRXPat syn region muttrcSimplePatRXContainer contained keepend start=+'+ end=+'+ skip=+\\'+ contains=muttrcRXPat syn match muttrcSimplePatRXContainer contained /\S\+/ contains=muttrcRXPat @@ -372,32 +395,32 @@ syn region muttrcPatternInner contained keepend start=+'[~=%!(^]+ms=s+1 skip=+\\ " Colour definitions takes object, foreground and background arguments (regexps excluded). syn match muttrcColorMatchCount contained "[0-9]\+" syn match muttrcColorMatchCountNL contained skipwhite skipnl "\s*\\$" nextgroup=muttrcColorMatchCount,muttrcColorMatchCountNL -syn region muttrcColorRXPat contained start=+\s\+'+ skip=+\\'+ end=+'\s*+ keepend skipwhite contains=muttrcRXString nextgroup=muttrcColorMatchCount,muttrcColorMatchCountNL -syn region muttrcColorRXPat contained start=+\s\+"+ skip=+\\"+ end=+"\s*+ keepend skipwhite contains=muttrcRXString nextgroup=muttrcColorMatchCount,muttrcColorMatchCountNL +syn region muttrcColorRXPat contained start=+\s*'+ skip=+\\'+ end=+'\s*+ keepend skipwhite contains=muttrcRXString2 nextgroup=muttrcColorMatchCount,muttrcColorMatchCountNL +syn region muttrcColorRXPat contained start=+\s*"+ skip=+\\"+ end=+"\s*+ keepend skipwhite contains=muttrcRXString2 nextgroup=muttrcColorMatchCount,muttrcColorMatchCountNL syn keyword muttrcColorField contained attachment body bold error hdrdefault header index indicator markers message normal quoted search signature status tilde tree underline syn match muttrcColorField contained "\" syn keyword muttrcColor contained black blue cyan default green magenta red white yellow syn keyword muttrcColor contained brightblack brightblue brightcyan brightdefault brightgreen brightmagenta brightred brightwhite brightyellow syn match muttrcColor contained "\<\%(bright\)\=color\d\{1,2}\>" " Now for the structure of the color line -syn match muttrcColorRXNL contained skipwhite skipnl "\s*\\$" nextgroup=muttrcColorRXPat,muttrcColorRXNL -syn match muttrcColorBG contained skipwhite /\s*[$]\?\w\+/ contains=muttrcColor,muttrcVariable,muttrcUnHighlightSpace nextgroup=muttrcColorRXPat,muttrcColorRXNL -syn match muttrcColorBGNL contained skipwhite skipnl "\s*\\$" nextgroup=muttrcColorBG,muttrcColorBGNL -syn match muttrcColorFG contained skipwhite /\s*[$]\?\w\+/ contains=muttrcColor,muttrcVariable,muttrcUnHighlightSpace nextgroup=muttrcColorBG,muttrcColorBGNL -syn match muttrcColorFGNL contained skipwhite skipnl "\s*\\$" nextgroup=muttrcColorFG,muttrcColorFGNL -syn match muttrcColorContext contained skipwhite /\s*[$]\?\w\+/ contains=muttrcColorField,muttrcVariable,muttrcUnHighlightSpace nextgroup=muttrcColorFG,muttrcColorFGNL -syn match muttrcColorNL contained skipwhite skipnl "\s*\\$" nextgroup=muttrcColorContext,muttrcColorNL -syn match muttrcColorKeyword contained skipwhite /^\s*color\s\+/ nextgroup=muttrcColorContext,muttrcColorNL +syn match muttrcColorRXNL contained skipnl "\s*\\$" nextgroup=muttrcColorRXPat,muttrcColorRXNL +syn match muttrcColorBG contained /\s*[$]\?\w\+/ contains=muttrcColor,muttrcVariable,muttrcUnHighlightSpace nextgroup=muttrcColorRXPat,muttrcColorRXNL +syn match muttrcColorBGNL contained skipnl "\s*\\$" nextgroup=muttrcColorBG,muttrcColorBGNL +syn match muttrcColorFG contained /\s*[$]\?\w\+/ contains=muttrcColor,muttrcVariable,muttrcUnHighlightSpace nextgroup=muttrcColorBG,muttrcColorBGNL +syn match muttrcColorFGNL contained skipnl "\s*\\$" nextgroup=muttrcColorFG,muttrcColorFGNL +syn match muttrcColorContext contained /\s*[$]\?\w\+/ contains=muttrcColorField,muttrcVariable,muttrcUnHighlightSpace nextgroup=muttrcColorFG,muttrcColorFGNL +syn match muttrcColorNL contained skipnl "\s*\\$" nextgroup=muttrcColorContext,muttrcColorNL +syn match muttrcColorKeyword contained /^\s*color\s\+/ nextgroup=muttrcColorContext,muttrcColorNL syn region muttrcColorLine keepend start=/^\s*color\s\+\%(index\)\@!/ skip=+\\$+ end=+$+ contains=muttrcColorKeyword,muttrcComment,muttrcUnHighlightSpace " Now for the structure of the color index line -syn match muttrcPatternNL contained skipwhite skipnl "\s*\\$" nextgroup=muttrcPattern,muttrcPatternNL -syn match muttrcColorBGI contained skipwhite /\s*[$]\?\w\+\s*/ contains=muttrcColor,muttrcVariable,muttrcUnHighlightSpace nextgroup=muttrcPattern,muttrcPatternNL -syn match muttrcColorBGNLI contained skipwhite skipnl "\s*\\$" nextgroup=muttrcColorBGI,muttrcColorBGNLI -syn match muttrcColorFGI contained skipwhite /\s*[$]\?\w\+/ contains=muttrcColor,muttrcVariable,muttrcUnHighlightSpace nextgroup=muttrcColorBGI,muttrcColorBGNLI -syn match muttrcColorFGNLI contained skipwhite skipnl "\s*\\$" nextgroup=muttrcColorFGI,muttrcColorFGNLI -syn match muttrcColorContextI contained skipwhite /\s*index/ contains=muttrcUnHighlightSpace nextgroup=muttrcColorFGI,muttrcColorFGNLI -syn match muttrcColorNLI contained skipwhite skipnl "\s*\\$" nextgroup=muttrcColorContextI,muttrcColorNLI -syn match muttrcColorKeywordI contained skipwhite /^\s*color\s\+/ nextgroup=muttrcColorContextI,muttrcColorNLI +syn match muttrcPatternNL contained skipnl "\s*\\$" nextgroup=muttrcPattern,muttrcPatternNL +syn match muttrcColorBGI contained /\s*[$]\?\w\+\s*/ contains=muttrcColor,muttrcVariable,muttrcUnHighlightSpace nextgroup=muttrcPattern,muttrcPatternNL +syn match muttrcColorBGNLI contained skipnl "\s*\\$" nextgroup=muttrcColorBGI,muttrcColorBGNLI +syn match muttrcColorFGI contained /\s*[$]\?\w\+/ contains=muttrcColor,muttrcVariable,muttrcUnHighlightSpace nextgroup=muttrcColorBGI,muttrcColorBGNLI +syn match muttrcColorFGNLI contained skipnl "\s*\\$" nextgroup=muttrcColorFGI,muttrcColorFGNLI +syn match muttrcColorContextI contained /\s*index/ contains=muttrcUnHighlightSpace nextgroup=muttrcColorFGI,muttrcColorFGNLI +syn match muttrcColorNLI contained skipnl "\s*\\$" nextgroup=muttrcColorContextI,muttrcColorNLI +syn match muttrcColorKeywordI contained /^\s*color\s\+/ nextgroup=muttrcColorContextI,muttrcColorNLI syn region muttrcColorLine keepend start=/^\s*color\s\+index/ skip=+\\$+ end=+$+ contains=muttrcColorKeywordI,muttrcComment,muttrcUnHighlightSpace " And now color's brother: syn region muttrcUnColorPatterns contained skipwhite start=+\s*'+ end=+'+ skip=+\\'+ contains=muttrcPattern nextgroup=muttrcUnColorPatterns,muttrcUnColorPatNL @@ -432,15 +455,17 @@ if version >= 508 || !exists("did_muttrc_syntax_inits") HiLink muttrcRXChars SpecialChar HiLink muttrcString String HiLink muttrcRXString String + HiLink muttrcRXString2 String HiLink muttrcSpecial Special + HiLink muttrcHooks Type HiLink muttrcGroupFlag Type HiLink muttrcGroupDef Macro HiLink muttrcAddrDef muttrcGroupFlag HiLink muttrcRXDef muttrcGroupFlag HiLink muttrcRXPat String HiLink muttrcAliasGroupName Macro - HiLink muttrcAliasAbbr Identifier - HiLink muttrcUnAliasAbbr Identifier + HiLink muttrcAliasKey Identifier + HiLink muttrcUnAliasKey Identifier HiLink muttrcAliasEncEmail Identifier HiLink muttrcAliasParens Type HiLink muttrcNumber Number @@ -463,8 +488,11 @@ if version >= 508 || !exists("did_muttrc_syntax_inits") HiLink muttrcToggle muttrcCommand HiLink muttrcBind muttrcCommand HiLink muttrcMacro muttrcCommand + HiLink muttrcMacroDescr String HiLink muttrcAlias muttrcCommand HiLink muttrcUnAlias muttrcCommand + HiLink muttrcUnhook muttrcCommand + HiLink muttrcUnhookLine Error HiLink muttrcAction Macro HiLink muttrcBadAction Error HiLink muttrcBindFunction Error @@ -487,7 +515,7 @@ if version >= 508 || !exists("did_muttrc_syntax_inits") HiLink muttrcColorKeyword muttrcCommand HiLink muttrcColorKeywordI muttrcColorKeyword HiLink muttrcColorField Identifier - HiLink muttrcColor String + HiLink muttrcColor Type HiLink muttrcColorFG Error HiLink muttrcColorFGI Error HiLink muttrcColorBG Error @@ -495,7 +523,7 @@ if version >= 508 || !exists("did_muttrc_syntax_inits") HiLink muttrcMonoAttrib muttrcColor HiLink muttrcMono muttrcCommand HiLink muttrcSimplePat Identifier - HiLink muttrcSimplePatGroup Macro + HiLink muttrcSimplePatString Macro HiLink muttrcSimplePatMetas Special HiLink muttrcPattern Type HiLink muttrcPatternInner Error @@ -508,6 +536,29 @@ if version >= 508 || !exists("did_muttrc_syntax_inits") HiLink muttrcPatHooks muttrcCommand HiLink muttrcPatHookNot Type + HiLink muttrcBindFunctionNL SpecialChar + HiLink muttrcBindKeyNL SpecialChar + HiLink muttrcBindMenuListNL SpecialChar + HiLink muttrcMacroDescrNL SpecialChar + HiLink muttrcMacroBodyNL SpecialChar + HiLink muttrcMacroKeyNL SpecialChar + HiLink muttrcMacroMenuListNL SpecialChar + HiLink muttrcColorMatchCountNL SpecialChar + HiLink muttrcColorNL SpecialChar + HiLink muttrcColorRXNL SpecialChar + HiLink muttrcColorBGNL SpecialChar + HiLink muttrcColorFGNL SpecialChar + HiLink muttrcAliasNameNL SpecialChar + HiLink muttrcAliasENNL SpecialChar + HiLink muttrcAliasNL SpecialChar + HiLink muttrcUnAliasNL SpecialChar + HiLink muttrcAliasGroupDefNL SpecialChar + HiLink muttrcAliasEncEmailNL SpecialChar + HiLink muttrcPatternNL SpecialChar + HiLink muttrcUnColorPatNL SpecialChar + HiLink muttrcUnColorAPNL SpecialChar + HiLink muttrcUnColorIndexNL SpecialChar + delcommand HiLink endif diff --git a/runtime/syntax/named.vim b/runtime/syntax/named.vim index 6ba564a29..faec5f68e 100644 --- a/runtime/syntax/named.vim +++ b/runtime/syntax/named.vim @@ -1,17 +1,16 @@ " Vim syntax file -" Language: BIND 8.x configuration file -" Maintainer: glory hump -" Last change: Mon May 21 04:51:01 SAMST 2001 -" Updated: by Marcin Dalecki 2004-12-31 -" Filenames: named.conf -" URL: http://rnd.web-drive.ru/vim/syntax/named.vim [DEFUNCT] -" $Id$ +" Language: BIND configuration file +" Maintainer: Nick Hibma +" Last change: 2007-01-30 +" Filenames: named.conf, rndc.conf +" Location: http://www.van-laarhoven.org/vim/syntax/named.vim +" +" Previously maintained by glory hump and updated by Marcin +" Dalecki. +" +" This file could do with a lot of improvements, so comments are welcome. +" Please submit the named.conf (segment) with any comments. " -" NOTE -" it was not widely tested, i just tried it on my simple -" single-master-single-slave configuration. most syntax was borrowed -" directly from "BIND Configuration File Guide" without testing. - " For version 5.x: Clear all syntax items " For version 6.x: Quit when a syntax file was already loaded if version < 600 @@ -28,6 +27,10 @@ else set iskeyword=.,-,48-58,A-Z,a-z,_ endif +if version >= 600 + syn sync match namedSync grouphere NONE "^(zone|controls|acl|key)" +endif + let s:save_cpo = &cpo set cpo-=C @@ -79,6 +82,11 @@ syn keyword namedIntKeyword contained unix nextgroup=namedString skipwhite syn keyword namedIntKeyword contained port perm owner group nextgroup=namedNumber,namedNotNumber skipwhite syn keyword namedIntKeyword contained allow nextgroup=namedIntSection skipwhite +" + these keywords are contained within `update-policy' section only +syn keyword namedIntKeyword contained grant nextgroup=namedString skipwhite +syn keyword namedIntKeyword contained name self subdomain wildcard nextgroup=namedString skipwhite +syn keyword namedIntKeyword TXT A PTR NS SOA A6 CNAME MX ANY skipwhite + " --- options syn region namedOptSection contained start=+{+ end=+};+ contains=namedOption,namedCNOption,namedComment,namedParenError @@ -101,9 +109,10 @@ syn keyword namedOption contained notify recursion rfc2308-type1 syn keyword namedOption contained use-id-pool treat-cr-as-space \ nextgroup=namedBool,namedNotBool skipwhite syn keyword namedOption contained also-notify forwarders -\ nextgroup=namedIntSection skipwhite +\ nextgroup=namedIPlist skipwhite syn keyword namedOption contained forward check-names -syn keyword namedOption contained allow-query allow-transfer allow-recursion nextgroup=namedAML skipwhite +syn keyword namedOption contained allow-query allow-transfer allow-recursion +\ nextgroup=namedAML skipwhite syn keyword namedOption contained blackhole listen-on \ nextgroup=namedIntSection skipwhite syn keyword namedOption contained lame-ttl max-transfer-time-in @@ -159,8 +168,10 @@ syn keyword namedZoneType contained master slave stub forward hint syn keyword namedZoneOpt contained masters forwarders \ nextgroup=namedIPlist skipwhite syn region namedIPlist contained start=+{+ end=+};+ contains=namedIPaddr,namedIPerror,namedParenError,namedComment -syn match namedZoneOpt contained "\= 508 || !exists("did_named_syn_inits") HiLink namedQSKeywords Type HiLink namedCNKeywords Type HiLink namedLogCategory Type + HiLink namedIPaddr Number HiLink namedDomain Identifier HiLink namedZoneOpt namedKeyword HiLink namedZoneType Type diff --git a/runtime/syntax/netrw.vim b/runtime/syntax/netrw.vim index 8dee30383..e2baac888 100644 --- a/runtime/syntax/netrw.vim +++ b/runtime/syntax/netrw.vim @@ -1,7 +1,7 @@ " Language : Netrw Remote-Directory Listing Syntax " Maintainer : Charles E. Campbell, Jr. -" Last change: Aug 29, 2005 -" Version : 7 +" Last change: Nov 27, 2006 +" Version : 9 " --------------------------------------------------------------------- " Syntax Clearing: {{{1 @@ -19,10 +19,15 @@ syn match netrwSpecial "\%(\S\+ \)*\S\+[*|=]\ze\%(\s\{2,}\|$\)" contains=netrw syn match netrwDir "\.\{1,2}/" contains=netrwClassify syn match netrwDir "\%(\S\+ \)*\S\+/" contains=netrwClassify syn match netrwDir "^\S*/" contains=netrwClassify +syn match netrwSizeDate "\<\d\+\s\d\{1,2}/\d\{1,2}/\d\{4}\s" contains=netrwDateSep skipwhite nextgroup=netrwTime syn match netrwSymLink "\%(\S\+ \)*\S\+@\ze\%(\s\{2,}\|$\)" contains=netrwClassify -syn match netrwExe "\%(\S\+ \)*\S\+\*\ze\%(\s\{2,}\|$\)" contains=netrwClassify +syn match netrwExe "\%(\S\+ \)*\S\+\*\ze\%(\s\{2,}\|$\)" contains=netrwClassify,netrwTreeIgnore +syn match netrwTreeIgnore contained "^\%(| \)*" syn match netrwClassify "[*=|@/]\ze\%(\s\{2,}\|$\)" contained +syn match netrwDateSep "/" contained +syn match netrwTime "\d\{1,2}:\d\{2}:\d\{2}" contained contains=netrwTimeSep +syn match netrwTimeSep ":" syn match netrwComment '".*\%(\t\|$\)' contains=@NetrwGroup syn match netrwHide '^"\s*\(Hid\|Show\)ing:' skipwhite nextgroup=netrwHidePat @@ -53,7 +58,9 @@ if !exists("did_drchip_dbg_syntax") hi link netrwVersion Identifier hi link netrwSymLink Special hi link netrwExe PreProc + hi link netrwDateSep Delimiter + hi link netrwTimeSep netrwDateSep hi link netrwComma netrwComment hi link netrwHide netrwComment endif diff --git a/runtime/syntax/objc.vim b/runtime/syntax/objc.vim index 3aa1177b2..c575cf2ad 100644 --- a/runtime/syntax/objc.vim +++ b/runtime/syntax/objc.vim @@ -3,7 +3,7 @@ " Maintainer: Kazunobu Kuriyama " Ex-maintainer: Anthony Hodsdon " First Author: Valentino Kyriakides <1kyriaki@informatik.uni-hamburg.de> -" Last Change: 2006 Mar 4 +" Last Change: 2007 Feb 21 " For version 5.x: Clear all syntax items " For version 6.x: Quit when a syntax file was already loaded @@ -36,7 +36,7 @@ syn keyword objcConstant nil Nil " Match the ObjC #import directive (like C's #include) syn region objcImported display contained start=+"+ skip=+\\\\\|\\"+ end=+"+ -syn match objcImported display contained "<[_0-9a-zA-Z.\/]*>" +syn match objcImported display contained "<[-_0-9a-zA-Z.\/]*>" syn match objcImport display "^\s*\(%:\|#\)\s*import\>\s*["<]" contains=objcImported " Match the important ObjC directives diff --git a/runtime/syntax/ocaml.vim b/runtime/syntax/ocaml.vim index cdef8c38b..27eb3907e 100644 --- a/runtime/syntax/ocaml.vim +++ b/runtime/syntax/ocaml.vim @@ -5,9 +5,9 @@ " Karl-Heinz Sylla " Issac Trotts " URL: http://www.ocaml.info/vim/syntax/ocaml.vim -" Last Change: 2006 Apr 11 - Fixed an initialization bug (MM) -" 2005 May 18 - Added 'NOTE' to highlighted comment words (MM) -" 2005 Apr 14 - Fixed a small bug concerning 'include' (MM) +" Last Change: 2007 Apr 13 - Added highlighting of nativeints (MM) +" 2006 Oct 09 - More highlighting improvements to numbers (MM) +" 2006 Sep 19 - Improved highlighting of numbers (Florent Monnier) " A minor patch was applied to the official version so that object/end " can be distinguished from begin/end, which is used for indentation, @@ -30,6 +30,9 @@ syn match ocamlComment "^#!.*" " Scripting directives syn match ocamlScript "^#\<\(quit\|labels\|warnings\|directory\|cd\|load\|use\|install_printer\|remove_printer\|require\|thread\|trace\|untrace\|untrace_all\|print_depth\|print_length\)\>" +" Script headers highlighted like comments +syn match ocamlComment "^#!.*" + " lowercase identifier - the standard way to match syn match ocamlLCIdentifier /\<\(\l\|_\)\(\w\|'\)*\>/ @@ -213,11 +216,11 @@ else syn match ocamlOperator "<-" endif -syn match ocamlNumber "\<-\=\d\+[l|L]\?\>" -syn match ocamlNumber "\<-\=0[x|X]\x\+[l|L]\?\>" -syn match ocamlNumber "\<-\=0[o|O]\o\+[l|L]\?\>" -syn match ocamlNumber "\<-\=0[b|B][01]\+[l|L]\?\>" -syn match ocamlFloat "\<-\=\d\+\.\d*\([eE][-+]\=\d\+\)\=[fl]\=\>" +syn match ocamlNumber "\<-\=\d\(_\|\d\)*[l|L|n]\?\>" +syn match ocamlNumber "\<-\=0[x|X]\(\x\|_\)\+[l|L|n]\?\>" +syn match ocamlNumber "\<-\=0[o|O]\(\o\|_\)\+[l|L|n]\?\>" +syn match ocamlNumber "\<-\=0[b|B]\([01]\|_\)\+[l|L|n]\?\>" +syn match ocamlFloat "\<-\=\d\(_\|\d\)*\.\(_\|\d\)*\([eE][-+]\=\d\(_\|\d\)*\)\=\>" " Labels syn match ocamlLabel "\~\(\l\|_\)\(\w\|'\)*"lc=1 @@ -294,6 +297,7 @@ if version >= 508 || !exists("did_ocaml_syntax_inits") HiLink ocamlModPreRHS Keyword HiLink ocamlMPRestr2 Keyword HiLink ocamlKeyword Keyword + HiLink ocamlMethod Include HiLink ocamlFunDef Keyword HiLink ocamlRefAssign Keyword HiLink ocamlKeyChar Keyword diff --git a/runtime/syntax/php.vim b/runtime/syntax/php.vim index 46b547b41..4bcff1341 100644 --- a/runtime/syntax/php.vim +++ b/runtime/syntax/php.vim @@ -1,46 +1,68 @@ " Vim syntax file -" Language: php PHP 3/4/5 -" Maintainer: Debian VIM Maintainers -" Former Maintainer: Lutz Eymers -" Last Change: $LastChangedDate: 2006-04-16 22:06:40 -0400 (dom, 16 apr 2006) $ -" URL: http://svn.debian.org/wsvn/pkg-vim/trunk/runtime/syntax/php.vim?op=file&rev=0&sc=0 +" Language: php PHP 3/4/5 +" Maintainer: Peter Hodge +" Last Change: June 9, 2006 +" URL: http://www.vim.org/scripts/script.php?script_id=1571 " -" XXX This file is in need of a new maintainer, Debian VIM Maintainers maintain -" it only because patches have been submitted for it by Debian users and the -" former maintainer was MIA (Missing In Action), taking over its -" maintenance was thus the only way to include those patches. -" If you care about this file, and have time to maintain it please do so! +" Former Maintainer: Debian VIM Maintainers +" Former URL: http://svn.debian.org/wsvn/pkg-vim/trunk/runtime/syntax/php.vim?op=file&rev=0&sc=0 " -" Options php_sql_query = 1 for SQL syntax highlighting inside strings -" php_htmlInStrings = 1 for HTML syntax highlighting inside strings -" php_baselib = 1 for highlighting baselib functions -" php_asp_tags = 1 for highlighting ASP-style short tags -" php_parent_error_close = 1 for highlighting parent error ] or ) -" php_parent_error_open = 1 for skipping an php end tag, if there exists an open ( or [ without a closing one -" php_oldStyle = 1 for using old colorstyle -" php_noShortTags = 1 don't sync as php -" php_folding = 1 for folding classes and functions -" php_folding = 2 for folding all { } regions -" php_sync_method = x -" x=-1 to sync by search ( default ) -" x>0 to sync at least x lines backwards -" x=0 to sync from start - -" Note +" Note: If you are using a colour terminal with dark background, you will probably find +" the 'elflord' colorscheme is much better for PHP's syntax than the default +" colourscheme, because elflord's colours will better highlight the break-points +" (Statements) in your code. +" +" Options: php_sql_query = 1 for SQL syntax highlighting inside strings +" php_htmlInStrings = 1 for HTML syntax highlighting inside strings +" php_baselib = 1 for highlighting baselib functions +" php_asp_tags = 1 for highlighting ASP-style short tags +" php_parent_error_close = 1 for highlighting parent error ] or ) +" php_parent_error_open = 1 for skipping an php end tag, if there exists an open ( or [ without a closing one +" php_oldStyle = 1 for using old colorstyle +" php_noShortTags = 1 don't sync as php +" php_folding = 1 for folding classes and functions +" php_folding = 2 for folding all { } regions +" php_sync_method = x +" x=-1 to sync by search ( default ) +" x>0 to sync at least x lines backwards +" x=0 to sync from start +" +" Added by Peter Hodge On June 9, 2006: +" php_special_functions = 1|0 to highlight functions with abnormal behaviour +" php_alt_comparisons = 1|0 to highlight comparison operators in an alternate colour +" php_alt_assignByReference = 1|0 to highlight '= &' in an alternate colour +" +" Note: these all default to 1 (On), so you would set them to '0' to turn them off. +" E.g., in your .vimrc or _vimrc file: +" let php_special_functions = 0 +" let php_alt_comparisons = 0 +" let php_alt_assignByReference = 0 +" Unletting these variables will revert back to their default (On). +" +" +" Note: " Setting php_folding=1 will match a closing } by comparing the indent " before the class or function keyword with the indent of a matching }. " Setting php_folding=2 will match all of pairs of {,} ( see known " bugs ii ) -" Known bugs -" setting php_parent_error_close on and php_parent_error_open off -" has these two leaks: -" i) An closing ) or ] inside a string match to the last open ( or [ -" before the string, when the the closing ) or ] is on the same line -" where the string started. In this case a following ) or ] after -" the string would be highlighted as an error, what is incorrect. -" ii) Same problem if you are setting php_folding = 2 with a closing -" } inside an string on the first line of this string. +" Known Bugs: +" - setting php_parent_error_close on and php_parent_error_open off +" has these two leaks: +" i) A closing ) or ] inside a string match to the last open ( or [ +" before the string, when the the closing ) or ] is on the same line +" where the string started. In this case a following ) or ] after +" the string would be highlighted as an error, what is incorrect. +" ii) Same problem if you are setting php_folding = 2 with a closing +" } inside an string on the first line of this string. +" +" - A double-quoted string like this: +" "$foo->someVar->someOtherVar->bar" +" will highight '->someOtherVar->bar' as though they will be parsed +" as object member variables, but PHP only recognizes the first +" object member variable ($foo->someVar). +" +" " For version 5.x: Clear all syntax items " For version 6.x: Quit when a syntax file was already loaded @@ -100,334 +122,438 @@ endif syn case match " Env Variables -syn keyword phpEnvVar GATEWAY_INTERFACE SERVER_NAME SERVER_SOFTWARE SERVER_PROTOCOL REQUEST_METHOD QUERY_STRING DOCUMENT_ROOT HTTP_ACCEPT HTTP_ACCEPT_CHARSET HTTP_ENCODING HTTP_ACCEPT_LANGUAGE HTTP_CONNECTION HTTP_HOST HTTP_REFERER HTTP_USER_AGENT REMOTE_ADDR REMOTE_PORT SCRIPT_FILENAME SERVER_ADMIN SERVER_PORT SERVER_SIGNATURE PATH_TRANSLATED SCRIPT_NAME REQUEST_URI contained +syn keyword phpEnvVar GATEWAY_INTERFACE SERVER_NAME SERVER_SOFTWARE SERVER_PROTOCOL REQUEST_METHOD QUERY_STRING DOCUMENT_ROOT HTTP_ACCEPT HTTP_ACCEPT_CHARSET HTTP_ENCODING HTTP_ACCEPT_LANGUAGE HTTP_CONNECTION HTTP_HOST HTTP_REFERER HTTP_USER_AGENT REMOTE_ADDR REMOTE_PORT SCRIPT_FILENAME SERVER_ADMIN SERVER_PORT SERVER_SIGNATURE PATH_TRANSLATED SCRIPT_NAME REQUEST_URI contained " Internal Variables -syn keyword phpIntVar GLOBALS PHP_ERRMSG PHP_SELF HTTP_GET_VARS HTTP_POST_VARS HTTP_COOKIE_VARS HTTP_POST_FILES HTTP_ENV_VARS HTTP_SERVER_VARS HTTP_SESSION_VARS HTTP_RAW_POST_DATA HTTP_STATE_VARS _GET _POST _COOKIE _FILES _SERVER _ENV _SERVER _REQUEST _SESSION contained +syn keyword phpIntVar GLOBALS PHP_ERRMSG PHP_SELF HTTP_GET_VARS HTTP_POST_VARS HTTP_COOKIE_VARS HTTP_POST_FILES HTTP_ENV_VARS HTTP_SERVER_VARS HTTP_SESSION_VARS HTTP_RAW_POST_DATA HTTP_STATE_VARS _GET _POST _COOKIE _FILES _SERVER _ENV _SERVER _REQUEST _SESSION contained " Constants -syn keyword phpCoreConstant PHP_VERSION PHP_OS DEFAULT_INCLUDE_PATH PEAR_INSTALL_DIR PEAR_EXTENSION_DIR PHP_EXTENSION_DIR PHP_BINDIR PHP_LIBDIR PHP_DATADIR PHP_SYSCONFDIR PHP_LOCALSTATEDIR PHP_CONFIG_FILE_PATH PHP_OUTPUT_HANDLER_START PHP_OUTPUT_HANDLER_CONT PHP_OUTPUT_HANDLER_END E_ERROR E_WARNING E_PARSE E_NOTICE E_CORE_ERROR E_CORE_WARNING E_COMPILE_ERROR E_COMPILE_WARNING E_USER_ERROR E_USER_WARNING E_USER_NOTICE E_ALL contained +syn keyword phpCoreConstant PHP_VERSION PHP_OS DEFAULT_INCLUDE_PATH PEAR_INSTALL_DIR PEAR_EXTENSION_DIR PHP_EXTENSION_DIR PHP_BINDIR PHP_LIBDIR PHP_DATADIR PHP_SYSCONFDIR PHP_LOCALSTATEDIR PHP_CONFIG_FILE_PATH PHP_OUTPUT_HANDLER_START PHP_OUTPUT_HANDLER_CONT PHP_OUTPUT_HANDLER_END E_ERROR E_WARNING E_PARSE E_NOTICE E_CORE_ERROR E_CORE_WARNING E_COMPILE_ERROR E_COMPILE_WARNING E_USER_ERROR E_USER_WARNING E_USER_NOTICE E_ALL contained syn case ignore -syn keyword phpConstant __LINE__ __FILE__ __FUNCTION__ __METHOD__ __CLASS__ contained +syn keyword phpConstant __LINE__ __FILE__ __FUNCTION__ __METHOD__ __CLASS__ contained " Function and Methods ripped from php_manual_de.tar.gz Jan 2003 -syn keyword phpFunctions apache_child_terminate apache_get_modules apache_get_version apache_getenv apache_lookup_uri apache_note apache_request_headers apache_response_headers apache_setenv ascii2ebcdic ebcdic2ascii getallheaders virtual contained -syn keyword phpFunctions array_change_key_case array_chunk array_combine array_count_values array_diff_assoc array_diff_uassoc array_diff array_fill array_filter array_flip array_intersect_assoc array_intersect array_key_exists array_keys array_map array_merge_recursive array_merge array_multisort array_pad array_pop array_push array_rand array_reduce array_reverse array_search array_shift array_slice array_splice array_sum array_udiff_assoc array_udiff_uassoc array_udiff array_unique array_unshift array_values array_walk array arsort asort compact count current each end extract in_array key krsort ksort list natcasesort natsort next pos prev range reset rsort shuffle sizeof sort uasort uksort usort contained -syn keyword phpFunctions aspell_check aspell_new aspell_suggest contained -syn keyword phpFunctions bcadd bccomp bcdiv bcmod bcmul bcpow bcpowmod bcscale bcsqrt bcsub contained -syn keyword phpFunctions bzclose bzcompress bzdecompress bzerrno bzerror bzerrstr bzflush bzopen bzread bzwrite contained -syn keyword phpFunctions cal_days_in_month cal_from_jd cal_info cal_to_jd easter_date easter_days frenchtojd gregoriantojd jddayofweek jdmonthname jdtofrench jdtogregorian jdtojewish jdtojulian jdtounix jewishtojd juliantojd unixtojd contained -syn keyword phpFunctions ccvs_add ccvs_auth ccvs_command ccvs_count ccvs_delete ccvs_done ccvs_init ccvs_lookup ccvs_new ccvs_report ccvs_return ccvs_reverse ccvs_sale ccvs_status ccvs_textvalue ccvs_void contained -syn keyword phpFunctions call_user_method_array call_user_method class_exists get_class_methods get_class_vars get_class get_declared_classes get_object_vars get_parent_class is_a is_subclass_of method_exists contained -syn keyword phpFunctions com VARIANT com_addref com_get com_invoke com_isenum com_load_typelib com_load com_propget com_propput com_propset com_release com_set contained -syn keyword phpFunctions cpdf_add_annotation cpdf_add_outline cpdf_arc cpdf_begin_text cpdf_circle cpdf_clip cpdf_close cpdf_closepath_fill_stroke cpdf_closepath_stroke cpdf_closepath cpdf_continue_text cpdf_curveto cpdf_end_text cpdf_fill_stroke cpdf_fill cpdf_finalize_page cpdf_finalize cpdf_global_set_document_limits cpdf_import_jpeg cpdf_lineto cpdf_moveto cpdf_newpath cpdf_open cpdf_output_buffer cpdf_page_init cpdf_place_inline_image cpdf_rect cpdf_restore cpdf_rlineto cpdf_rmoveto cpdf_rotate_text cpdf_rotate cpdf_save_to_file cpdf_save cpdf_scale cpdf_set_action_url cpdf_set_char_spacing cpdf_set_creator cpdf_set_current_page cpdf_set_font_directories cpdf_set_font_map_file cpdf_set_font cpdf_set_horiz_scaling cpdf_set_keywords cpdf_set_leading cpdf_set_page_animation cpdf_set_subject cpdf_set_text_matrix cpdf_set_text_pos cpdf_set_text_rendering cpdf_set_text_rise cpdf_set_title cpdf_set_viewer_preferences cpdf_set_word_spacing cpdf_setdash cpdf_setflat cpdf_setgray_fill cpdf_setgray_stroke cpdf_setgray cpdf_setlinecap cpdf_setlinejoin cpdf_setlinewidth cpdf_setmiterlimit cpdf_setrgbcolor_fill cpdf_setrgbcolor_stroke cpdf_setrgbcolor cpdf_show_xy cpdf_show cpdf_stringwidth cpdf_stroke cpdf_text cpdf_translate contained -syn keyword phpFunctions crack_check crack_closedict crack_getlastmessage crack_opendict contained -syn keyword phpFunctions ctype_alnum ctype_alpha ctype_cntrl ctype_digit ctype_graph ctype_lower ctype_print ctype_punct ctype_space ctype_upper ctype_xdigit contained -syn keyword phpFunctions curl_close curl_errno curl_error curl_exec curl_getinfo curl_init curl_multi_add_handle curl_multi_close curl_multi_exec curl_multi_getcontent curl_multi_info_read curl_multi_init curl_multi_remove_handle curl_multi_select curl_setopt curl_version contained -syn keyword phpFunctions cybercash_base64_decode cybercash_base64_encode cybercash_decr cybercash_encr contained -syn keyword phpFunctions cyrus_authenticate cyrus_bind cyrus_close cyrus_connect cyrus_query cyrus_unbind contained -syn keyword phpFunctions checkdate date getdate gettimeofday gmdate gmmktime gmstrftime localtime microtime mktime strftime strtotime time contained -syn keyword phpFunctions dba_close dba_delete dba_exists dba_fetch dba_firstkey dba_handlers dba_insert dba_key_split dba_list dba_nextkey dba_open dba_optimize dba_popen dba_replace dba_sync contained -syn keyword phpFunctions dbase_add_record dbase_close dbase_create dbase_delete_record dbase_get_header_info dbase_get_record_with_names dbase_get_record dbase_numfields dbase_numrecords dbase_open dbase_pack dbase_replace_record contained -syn keyword phpFunctions dblist dbmclose dbmdelete dbmexists dbmfetch dbmfirstkey dbminsert dbmnextkey dbmopen dbmreplace contained -syn keyword phpFunctions dbplus_add dbplus_aql dbplus_chdir dbplus_close dbplus_curr dbplus_errcode dbplus_errno dbplus_find dbplus_first dbplus_flush dbplus_freealllocks dbplus_freelock dbplus_freerlocks dbplus_getlock dbplus_getunique dbplus_info dbplus_last dbplus_lockrel dbplus_next dbplus_open dbplus_prev dbplus_rchperm dbplus_rcreate dbplus_rcrtexact dbplus_rcrtlike dbplus_resolve dbplus_restorepos dbplus_rkeys dbplus_ropen dbplus_rquery dbplus_rrename dbplus_rsecindex dbplus_runlink dbplus_rzap dbplus_savepos dbplus_setindex dbplus_setindexbynumber dbplus_sql dbplus_tcl dbplus_tremove dbplus_undo dbplus_undoprepare dbplus_unlockrel dbplus_unselect dbplus_update dbplus_xlockrel dbplus_xunlockrel contained -syn keyword phpFunctions dbx_close dbx_compare dbx_connect dbx_error dbx_escape_string dbx_fetch_row dbx_query dbx_sort contained -syn keyword phpFunctions dio_close dio_fcntl dio_open dio_read dio_seek dio_stat dio_tcsetattr dio_truncate dio_write contained -syn keyword phpFunctions chdir chroot dir closedir getcwd opendir readdir rewinddir scandir contained -syn keyword phpFunctions domxml_new_doc domxml_open_file domxml_open_mem domxml_version domxml_xmltree domxml_xslt_stylesheet_doc domxml_xslt_stylesheet_file domxml_xslt_stylesheet xpath_eval_expression xpath_eval xpath_new_context xptr_eval xptr_new_context contained -syn keyword phpMethods name specified value create_attribute create_cdata_section create_comment create_element_ns create_element create_entity_reference create_processing_instruction create_text_node doctype document_element dump_file dump_mem get_element_by_id get_elements_by_tagname html_dump_mem xinclude entities internal_subset name notations public_id system_id get_attribute_node get_attribute get_elements_by_tagname has_attribute remove_attribute set_attribute tagname add_namespace append_child append_sibling attributes child_nodes clone_node dump_node first_child get_content has_attributes has_child_nodes insert_before is_blank_node last_child next_sibling node_name node_type node_value owner_document parent_node prefix previous_sibling remove_child replace_child replace_node set_content set_name set_namespace unlink_node data target process result_dump_file result_dump_mem contained -syn keyword phpFunctions dotnet_load contained -syn keyword phpFunctions debug_backtrace debug_print_backtrace error_log error_reporting restore_error_handler set_error_handler trigger_error user_error contained -syn keyword phpFunctions escapeshellarg escapeshellcmd exec passthru proc_close proc_get_status proc_nice proc_open proc_terminate shell_exec system contained -syn keyword phpFunctions fam_cancel_monitor fam_close fam_monitor_collection fam_monitor_directory fam_monitor_file fam_next_event fam_open fam_pending fam_resume_monitor fam_suspend_monitor contained -syn keyword phpFunctions fbsql_affected_rows fbsql_autocommit fbsql_change_user fbsql_close fbsql_commit fbsql_connect fbsql_create_blob fbsql_create_clob fbsql_create_db fbsql_data_seek fbsql_database_password fbsql_database fbsql_db_query fbsql_db_status fbsql_drop_db fbsql_errno fbsql_error fbsql_fetch_array fbsql_fetch_assoc fbsql_fetch_field fbsql_fetch_lengths fbsql_fetch_object fbsql_fetch_row fbsql_field_flags fbsql_field_len fbsql_field_name fbsql_field_seek fbsql_field_table fbsql_field_type fbsql_free_result fbsql_get_autostart_info fbsql_hostname fbsql_insert_id fbsql_list_dbs fbsql_list_fields fbsql_list_tables fbsql_next_result fbsql_num_fields fbsql_num_rows fbsql_password fbsql_pconnect fbsql_query fbsql_read_blob fbsql_read_clob fbsql_result fbsql_rollback fbsql_select_db fbsql_set_lob_mode fbsql_set_transaction fbsql_start_db fbsql_stop_db fbsql_tablename fbsql_username fbsql_warnings contained -syn keyword phpFunctions fdf_add_doc_javascript fdf_add_template fdf_close fdf_create fdf_enum_values fdf_errno fdf_error fdf_get_ap fdf_get_attachment fdf_get_encoding fdf_get_file fdf_get_flags fdf_get_opt fdf_get_status fdf_get_value fdf_get_version fdf_header fdf_next_field_name fdf_open_string fdf_open fdf_remove_item fdf_save_string fdf_save fdf_set_ap fdf_set_encoding fdf_set_file fdf_set_flags fdf_set_javascript_action fdf_set_opt fdf_set_status fdf_set_submit_form_action fdf_set_target_frame fdf_set_value fdf_set_version contained -syn keyword phpFunctions filepro_fieldcount filepro_fieldname filepro_fieldtype filepro_fieldwidth filepro_retrieve filepro_rowcount filepro contained -syn keyword phpFunctions basename chgrp chmod chown clearstatcache copy delete dirname disk_free_space disk_total_space diskfreespace fclose feof fflush fgetc fgetcsv fgets fgetss file_exists file_get_contents file_put_contents file fileatime filectime filegroup fileinode filemtime fileowner fileperms filesize filetype flock fnmatch fopen fpassthru fputs fread fscanf fseek fstat ftell ftruncate fwrite glob is_dir is_executable is_file is_link is_readable is_uploaded_file is_writable is_writeable link linkinfo lstat mkdir move_uploaded_file parse_ini_file pathinfo pclose popen readfile readlink realpath rename rewind rmdir set_file_buffer stat symlink tempnam tmpfile touch umask unlink contained -syn keyword phpFunctions fribidi_log2vis contained -syn keyword phpFunctions ftp_alloc ftp_cdup ftp_chdir ftp_chmod ftp_close ftp_connect ftp_delete ftp_exec ftp_fget ftp_fput ftp_get_option ftp_get ftp_login ftp_mdtm ftp_mkdir ftp_nb_continue ftp_nb_fget ftp_nb_fput ftp_nb_get ftp_nb_put ftp_nlist ftp_pasv ftp_put ftp_pwd ftp_quit ftp_raw ftp_rawlist ftp_rename ftp_rmdir ftp_set_option ftp_site ftp_size ftp_ssl_connect ftp_systype contained -syn keyword phpFunctions call_user_func_array call_user_func create_function func_get_arg func_get_args func_num_args function_exists get_defined_functions register_shutdown_function register_tick_function unregister_tick_function contained -syn keyword phpFunctions bind_textdomain_codeset bindtextdomain dcgettext dcngettext dgettext dngettext gettext ngettext textdomain contained -syn keyword phpFunctions gmp_abs gmp_add gmp_and gmp_clrbit gmp_cmp gmp_com gmp_div_q gmp_div_qr gmp_div_r gmp_div gmp_divexact gmp_fact gmp_gcd gmp_gcdext gmp_hamdist gmp_init gmp_intval gmp_invert gmp_jacobi gmp_legendre gmp_mod gmp_mul gmp_neg gmp_or gmp_perfect_square gmp_popcount gmp_pow gmp_powm gmp_prob_prime gmp_random gmp_scan0 gmp_scan1 gmp_setbit gmp_sign gmp_sqrt gmp_sqrtrem gmp_sqrtrm gmp_strval gmp_sub gmp_xor contained -syn keyword phpFunctions header headers_list headers_sent setcookie contained -syn keyword phpFunctions hw_api_attribute hwapi_hgcsp hw_api_content hw_api_object contained -syn keyword phpMethods key langdepvalue value values checkin checkout children mimetype read content copy dbstat dcstat dstanchors dstofsrcanchors count reason find ftstat hwstat identify info insert insertanchor insertcollection insertdocument link lock move assign attreditable count insert remove title value object objectbyanchor parents description type remove replace setcommitedversion srcanchors srcsofdst unlock user userlist contained -syn keyword phpFunctions hw_Array2Objrec hw_changeobject hw_Children hw_ChildrenObj hw_Close hw_Connect hw_connection_info hw_cp hw_Deleteobject hw_DocByAnchor hw_DocByAnchorObj hw_Document_Attributes hw_Document_BodyTag hw_Document_Content hw_Document_SetContent hw_Document_Size hw_dummy hw_EditText hw_Error hw_ErrorMsg hw_Free_Document hw_GetAnchors hw_GetAnchorsObj hw_GetAndLock hw_GetChildColl hw_GetChildCollObj hw_GetChildDocColl hw_GetChildDocCollObj hw_GetObject hw_GetObjectByQuery hw_GetObjectByQueryColl hw_GetObjectByQueryCollObj hw_GetObjectByQueryObj hw_GetParents hw_GetParentsObj hw_getrellink hw_GetRemote hw_getremotechildren hw_GetSrcByDestObj hw_GetText hw_getusername hw_Identify hw_InCollections hw_Info hw_InsColl hw_InsDoc hw_insertanchors hw_InsertDocument hw_InsertObject hw_mapid hw_Modifyobject hw_mv hw_New_Document hw_objrec2array hw_Output_Document hw_pConnect hw_PipeDocument hw_Root hw_setlinkroot hw_stat hw_Unlock hw_Who contained -syn keyword phpFunctions ibase_add_user ibase_affected_rows ibase_blob_add ibase_blob_cancel ibase_blob_close ibase_blob_create ibase_blob_echo ibase_blob_get ibase_blob_import ibase_blob_info ibase_blob_open ibase_close ibase_commit_ret ibase_commit ibase_connect ibase_delete_user ibase_drop_db ibase_errcode ibase_errmsg ibase_execute ibase_fetch_assoc ibase_fetch_object ibase_fetch_row ibase_field_info ibase_free_event_handler ibase_free_query ibase_free_result ibase_gen_id ibase_modify_user ibase_name_result ibase_num_fields ibase_num_params ibase_param_info ibase_pconnect ibase_prepare ibase_query ibase_rollback_ret ibase_rollback ibase_set_event_handler ibase_timefmt ibase_trans ibase_wait_event contained -syn keyword phpFunctions iconv_get_encoding iconv_mime_decode_headers iconv_mime_decode iconv_mime_encode iconv_set_encoding iconv_strlen iconv_strpos iconv_strrpos iconv_substr iconv ob_iconv_handler contained -syn keyword phpFunctions ifx_affected_rows ifx_blobinfile_mode ifx_byteasvarchar ifx_close ifx_connect ifx_copy_blob ifx_create_blob ifx_create_char ifx_do ifx_error ifx_errormsg ifx_fetch_row ifx_fieldproperties ifx_fieldtypes ifx_free_blob ifx_free_char ifx_free_result ifx_get_blob ifx_get_char ifx_getsqlca ifx_htmltbl_result ifx_nullformat ifx_num_fields ifx_num_rows ifx_pconnect ifx_prepare ifx_query ifx_textasvarchar ifx_update_blob ifx_update_char ifxus_close_slob ifxus_create_slob ifxus_free_slob ifxus_open_slob ifxus_read_slob ifxus_seek_slob ifxus_tell_slob ifxus_write_slob contained -syn keyword phpFunctions exif_imagetype exif_read_data exif_thumbnail gd_info getimagesize image_type_to_mime_type image2wbmp imagealphablending imageantialias imagearc imagechar imagecharup imagecolorallocate imagecolorallocatealpha imagecolorat imagecolorclosest imagecolorclosestalpha imagecolorclosesthwb imagecolordeallocate imagecolorexact imagecolorexactalpha imagecolormatch imagecolorresolve imagecolorresolvealpha imagecolorset imagecolorsforindex imagecolorstotal imagecolortransparent imagecopy imagecopymerge imagecopymergegray imagecopyresampled imagecopyresized imagecreate imagecreatefromgd2 imagecreatefromgd2part imagecreatefromgd imagecreatefromgif imagecreatefromjpeg imagecreatefrompng imagecreatefromstring imagecreatefromwbmp imagecreatefromxbm imagecreatefromxpm imagecreatetruecolor imagedashedline imagedestroy imageellipse imagefill imagefilledarc imagefilledellipse imagefilledpolygon imagefilledrectangle imagefilltoborder imagefontheight imagefontwidth imageftbbox imagefttext imagegammacorrect imagegd2 imagegd imagegif imageinterlace imageistruecolor imagejpeg imageline imageloadfont imagepalettecopy imagepng imagepolygon imagepsbbox imagepscopyfont imagepsencodefont imagepsextendfont imagepsfreefont imagepsloadfont imagepsslantfont imagepstext imagerectangle imagerotate imagesavealpha imagesetbrush imagesetpixel imagesetstyle imagesetthickness imagesettile imagestring imagestringup imagesx imagesy imagetruecolortopalette imagettfbbox imagettftext imagetypes imagewbmp iptcembed iptcparse jpeg2wbmp png2wbmp read_exif_data contained -syn keyword phpFunctions imap_8bit imap_alerts imap_append imap_base64 imap_binary imap_body imap_bodystruct imap_check imap_clearflag_full imap_close imap_createmailbox imap_delete imap_deletemailbox imap_errors imap_expunge imap_fetch_overview imap_fetchbody imap_fetchheader imap_fetchstructure imap_get_quota imap_get_quotaroot imap_getacl imap_getmailboxes imap_getsubscribed imap_header imap_headerinfo imap_headers imap_last_error imap_list imap_listmailbox imap_listscan imap_listsubscribed imap_lsub imap_mail_compose imap_mail_copy imap_mail_move imap_mail imap_mailboxmsginfo imap_mime_header_decode imap_msgno imap_num_msg imap_num_recent imap_open imap_ping imap_qprint imap_renamemailbox imap_reopen imap_rfc822_parse_adrlist imap_rfc822_parse_headers imap_rfc822_write_address imap_scanmailbox imap_search imap_set_quota imap_setacl imap_setflag_full imap_sort imap_status imap_subscribe imap_thread imap_timeout imap_uid imap_undelete imap_unsubscribe imap_utf7_decode imap_utf7_encode imap_utf8 contained -syn keyword phpFunctions assert_options assert dl extension_loaded get_cfg_var get_current_user get_defined_constants get_extension_funcs get_include_path get_included_files get_loaded_extensions get_magic_quotes_gpc get_magic_quotes_runtime get_required_files getenv getlastmod getmygid getmyinode getmypid getmyuid getopt getrusage ini_alter ini_get_all ini_get ini_restore ini_set main memory_get_usage php_ini_scanned_files php_logo_guid php_sapi_name php_uname phpcredits phpinfo phpversion putenv restore_include_path set_include_path set_magic_quotes_runtime set_time_limit version_compare zend_logo_guid zend_version contained -syn keyword phpFunctions ingres_autocommit ingres_close ingres_commit ingres_connect ingres_fetch_array ingres_fetch_object ingres_fetch_row ingres_field_length ingres_field_name ingres_field_nullable ingres_field_precision ingres_field_scale ingres_field_type ingres_num_fields ingres_num_rows ingres_pconnect ingres_query ingres_rollback contained -syn keyword phpFunctions ircg_channel_mode ircg_disconnect ircg_fetch_error_msg ircg_get_username ircg_html_encode ircg_ignore_add ircg_ignore_del ircg_is_conn_alive ircg_join ircg_kick ircg_lookup_format_messages ircg_msg ircg_nick ircg_nickname_escape ircg_nickname_unescape ircg_notice ircg_part ircg_pconnect ircg_register_format_messages ircg_set_current ircg_set_file ircg_set_on_die ircg_topic ircg_whois contained -syn keyword phpFunctions java_last_exception_clear java_last_exception_get contained -syn keyword phpFunctions ldap_8859_to_t61 ldap_add ldap_bind ldap_close ldap_compare ldap_connect ldap_count_entries ldap_delete ldap_dn2ufn ldap_err2str ldap_errno ldap_error ldap_explode_dn ldap_first_attribute ldap_first_entry ldap_first_reference ldap_free_result ldap_get_attributes ldap_get_dn ldap_get_entries ldap_get_option ldap_get_values_len ldap_get_values ldap_list ldap_mod_add ldap_mod_del ldap_mod_replace ldap_modify ldap_next_attribute ldap_next_entry ldap_next_reference ldap_parse_reference ldap_parse_result ldap_read ldap_rename ldap_search ldap_set_option ldap_set_rebind_proc ldap_sort ldap_start_tls ldap_t61_to_8859 ldap_unbind contained -syn keyword phpFunctions lzf_compress lzf_decompress lzf_optimized_for contained -syn keyword phpFunctions ezmlm_hash mail contained -syn keyword phpFunctions mailparse_determine_best_xfer_encoding mailparse_msg_create mailparse_msg_extract_part_file mailparse_msg_extract_part mailparse_msg_free mailparse_msg_get_part_data mailparse_msg_get_part mailparse_msg_get_structure mailparse_msg_parse_file mailparse_msg_parse mailparse_rfc822_parse_addresses mailparse_stream_encode mailparse_uudecode_all contained -syn keyword phpFunctions abs acos acosh asin asinh atan2 atan atanh base_convert bindec ceil cos cosh decbin dechex decoct deg2rad exp expm1 floor fmod getrandmax hexdec hypot is_finite is_infinite is_nan lcg_value log10 log1p log max min mt_getrandmax mt_rand mt_srand octdec pi pow rad2deg rand round sin sinh sqrt srand tan tanh contained -syn keyword phpFunctions mb_convert_case mb_convert_encoding mb_convert_kana mb_convert_variables mb_decode_mimeheader mb_decode_numericentity mb_detect_encoding mb_detect_order mb_encode_mimeheader mb_encode_numericentity mb_ereg_match mb_ereg_replace mb_ereg_search_getpos mb_ereg_search_getregs mb_ereg_search_init mb_ereg_search_pos mb_ereg_search_regs mb_ereg_search_setpos mb_ereg_search mb_ereg mb_eregi_replace mb_eregi mb_get_info mb_http_input mb_http_output mb_internal_encoding mb_language mb_output_handler mb_parse_str mb_preferred_mime_name mb_regex_encoding mb_regex_set_options mb_send_mail mb_split mb_strcut mb_strimwidth mb_strlen mb_strpos mb_strrpos mb_strtolower mb_strtoupper mb_strwidth mb_substitute_character mb_substr_count mb_substr contained -syn keyword phpFunctions mcal_append_event mcal_close mcal_create_calendar mcal_date_compare mcal_date_valid mcal_day_of_week mcal_day_of_year mcal_days_in_month mcal_delete_calendar mcal_delete_event mcal_event_add_attribute mcal_event_init mcal_event_set_alarm mcal_event_set_category mcal_event_set_class mcal_event_set_description mcal_event_set_end mcal_event_set_recur_daily mcal_event_set_recur_monthly_mday mcal_event_set_recur_monthly_wday mcal_event_set_recur_none mcal_event_set_recur_weekly mcal_event_set_recur_yearly mcal_event_set_start mcal_event_set_title mcal_expunge mcal_fetch_current_stream_event mcal_fetch_event mcal_is_leap_year mcal_list_alarms mcal_list_events mcal_next_recurrence mcal_open mcal_popen mcal_rename_calendar mcal_reopen mcal_snooze mcal_store_event mcal_time_valid mcal_week_of_year contained -syn keyword phpFunctions mcrypt_cbc mcrypt_cfb mcrypt_create_iv mcrypt_decrypt mcrypt_ecb mcrypt_enc_get_algorithms_name mcrypt_enc_get_block_size mcrypt_enc_get_iv_size mcrypt_enc_get_key_size mcrypt_enc_get_modes_name mcrypt_enc_get_supported_key_sizes mcrypt_enc_is_block_algorithm_mode mcrypt_enc_is_block_algorithm mcrypt_enc_is_block_mode mcrypt_enc_self_test mcrypt_encrypt mcrypt_generic_deinit mcrypt_generic_end mcrypt_generic_init mcrypt_generic mcrypt_get_block_size mcrypt_get_cipher_name mcrypt_get_iv_size mcrypt_get_key_size mcrypt_list_algorithms mcrypt_list_modes mcrypt_module_close mcrypt_module_get_algo_block_size mcrypt_module_get_algo_key_size mcrypt_module_get_supported_key_sizes mcrypt_module_is_block_algorithm_mode mcrypt_module_is_block_algorithm mcrypt_module_is_block_mode mcrypt_module_open mcrypt_module_self_test mcrypt_ofb mdecrypt_generic contained -syn keyword phpFunctions mcve_adduser mcve_adduserarg mcve_bt mcve_checkstatus mcve_chkpwd mcve_chngpwd mcve_completeauthorizations mcve_connect mcve_connectionerror mcve_deleteresponse mcve_deletetrans mcve_deleteusersetup mcve_deluser mcve_destroyconn mcve_destroyengine mcve_disableuser mcve_edituser mcve_enableuser mcve_force mcve_getcell mcve_getcellbynum mcve_getcommadelimited mcve_getheader mcve_getuserarg mcve_getuserparam mcve_gft mcve_gl mcve_gut mcve_initconn mcve_initengine mcve_initusersetup mcve_iscommadelimited mcve_liststats mcve_listusers mcve_maxconntimeout mcve_monitor mcve_numcolumns mcve_numrows mcve_override mcve_parsecommadelimited mcve_ping mcve_preauth mcve_preauthcompletion mcve_qc mcve_responseparam mcve_return mcve_returncode mcve_returnstatus mcve_sale mcve_setblocking mcve_setdropfile mcve_setip mcve_setssl_files mcve_setssl mcve_settimeout mcve_settle mcve_text_avs mcve_text_code mcve_text_cv mcve_transactionauth mcve_transactionavs mcve_transactionbatch mcve_transactioncv mcve_transactionid mcve_transactionitem mcve_transactionssent mcve_transactiontext mcve_transinqueue mcve_transnew mcve_transparam mcve_transsend mcve_ub mcve_uwait mcve_verifyconnection mcve_verifysslcert mcve_void contained -syn keyword phpFunctions mhash_count mhash_get_block_size mhash_get_hash_name mhash_keygen_s2k mhash contained -syn keyword phpFunctions mime_content_type contained -syn keyword phpFunctions ming_setcubicthreshold ming_setscale ming_useswfversion SWFAction SWFBitmap swfbutton_keypress SWFbutton SWFDisplayItem SWFFill SWFFont SWFGradient SWFMorph SWFMovie SWFShape SWFSprite SWFText SWFTextField contained -syn keyword phpMethods getHeight getWidth addAction addShape setAction setdown setHit setOver setUp addColor move moveTo multColor remove Rotate rotateTo scale scaleTo setDepth setName setRatio skewX skewXTo skewY skewYTo moveTo rotateTo scaleTo skewXTo skewYTo getwidth addEntry getshape1 getshape2 add nextframe output remove save setbackground setdimension setframes setrate streammp3 addFill drawCurve drawCurveTo drawLine drawLineTo movePen movePenTo setLeftFill setLine setRightFill add nextframe remove setframes addString getWidth moveTo setColor setFont setHeight setSpacing addstring align setbounds setcolor setFont setHeight setindentation setLeftMargin setLineSpacing setMargins setname setrightMargin contained -syn keyword phpFunctions connection_aborted connection_status connection_timeout constant define defined die eval exit get_browser highlight_file highlight_string ignore_user_abort pack show_source sleep uniqid unpack usleep contained -syn keyword phpFunctions udm_add_search_limit udm_alloc_agent udm_api_version udm_cat_list udm_cat_path udm_check_charset udm_check_stored udm_clear_search_limits udm_close_stored udm_crc32 udm_errno udm_error udm_find udm_free_agent udm_free_ispell_data udm_free_res udm_get_doc_count udm_get_res_field udm_get_res_param udm_load_ispell_data udm_open_stored udm_set_agent_param contained -syn keyword phpFunctions msession_connect msession_count msession_create msession_destroy msession_disconnect msession_find msession_get_array msession_get msession_getdata msession_inc msession_list msession_listvar msession_lock msession_plugin msession_randstr msession_set_array msession_set msession_setdata msession_timeout msession_uniq msession_unlock contained -syn keyword phpFunctions msql_affected_rows msql_close msql_connect msql_create_db msql_createdb msql_data_seek msql_dbname msql_drop_db msql_dropdb msql_error msql_fetch_array msql_fetch_field msql_fetch_object msql_fetch_row msql_field_seek msql_fieldflags msql_fieldlen msql_fieldname msql_fieldtable msql_fieldtype msql_free_result msql_freeresult msql_list_dbs msql_list_fields msql_list_tables msql_listdbs msql_listfields msql_listtables msql_num_fields msql_num_rows msql_numfields msql_numrows msql_pconnect msql_query msql_regcase msql_result msql_select_db msql_selectdb msql_tablename msql contained -syn keyword phpFunctions mssql_bind mssql_close mssql_connect mssql_data_seek mssql_execute mssql_fetch_array mssql_fetch_assoc mssql_fetch_batch mssql_fetch_field mssql_fetch_object mssql_fetch_row mssql_field_length mssql_field_name mssql_field_seek mssql_field_type mssql_free_result mssql_free_statement mssql_get_last_message mssql_guid_string mssql_init mssql_min_error_severity mssql_min_message_severity mssql_next_result mssql_num_fields mssql_num_rows mssql_pconnect mssql_query mssql_result mssql_rows_affected mssql_select_db contained -syn keyword phpFunctions muscat_close muscat_get muscat_give muscat_setup_net muscat_setup contained -syn keyword phpFunctions mysql_affected_rows mysql_change_user mysql_client_encoding mysql_close mysql_connect mysql_create_db mysql_data_seek mysql_db_name mysql_db_query mysql_drop_db mysql_errno mysql_error mysql_escape_string mysql_fetch_array mysql_fetch_assoc mysql_fetch_field mysql_fetch_lengths mysql_fetch_object mysql_fetch_row mysql_field_flags mysql_field_len mysql_field_name mysql_field_seek mysql_field_table mysql_field_type mysql_free_result mysql_get_client_info mysql_get_host_info mysql_get_proto_info mysql_get_server_info mysql_info mysql_insert_id mysql_list_dbs mysql_list_fields mysql_list_processes mysql_list_tables mysql_num_fields mysql_num_rows mysql_pconnect mysql_ping mysql_query mysql_real_escape_string mysql_result mysql_select_db mysql_stat mysql_tablename mysql_thread_id mysql_unbuffered_query contained -syn keyword phpFunctions mysqli_affected_rows mysqli_autocommit mysqli_bind_param mysqli_bind_result mysqli_change_user mysqli_character_set_name mysqli_close mysqli_commit mysqli_connect mysqli_data_seek mysqli_debug mysqli_disable_reads_from_master mysqli_disable_rpl_parse mysqli_dump_debug_info mysqli_enable_reads_from_master mysqli_enable_rpl_parse mysqli_errno mysqli_error mysqli_execute mysqli_fetch_array mysqli_fetch_assoc mysqli_fetch_field_direct mysqli_fetch_field mysqli_fetch_fields mysqli_fetch_lengths mysqli_fetch_object mysqli_fetch_row mysqli_fetch mysqli_field_count mysqli_field_seek mysqli_field_tell mysqli_free_result mysqli_get_client_info mysqli_get_host_info mysqli_get_proto_info mysqli_get_server_info mysqli_get_server_version mysqli_info mysqli_init mysqli_insert_id mysqli_kill mysqli_master_query mysqli_num_fields mysqli_num_rows mysqli_options mysqli_param_count mysqli_ping mysqli_prepare_result mysqli_prepare mysqli_profiler mysqli_query mysqli_read_query_result mysqli_real_connect mysqli_real_escape_string mysqli_real_query mysqli_reload mysqli_rollback mysqli_rpl_parse_enabled mysqli_rpl_probe mysqli_rpl_query_type mysqli_select_db mysqli_send_long_data mysqli_send_query mysqli_slave_query mysqli_ssl_set mysqli_stat mysqli_stmt_affected_rows mysqli_stmt_close mysqli_stmt_errno mysqli_stmt_error mysqli_stmt_store_result mysqli_store_result mysqli_thread_id mysqli_thread_safe mysqli_use_result mysqli_warning_count contained -syn keyword phpFunctions ncurses_addch ncurses_addchnstr ncurses_addchstr ncurses_addnstr ncurses_addstr ncurses_assume_default_colors ncurses_attroff ncurses_attron ncurses_attrset ncurses_baudrate ncurses_beep ncurses_bkgd ncurses_bkgdset ncurses_border ncurses_bottom_panel ncurses_can_change_color ncurses_cbreak ncurses_clear ncurses_clrtobot ncurses_clrtoeol ncurses_color_content ncurses_color_set ncurses_curs_set ncurses_def_prog_mode ncurses_def_shell_mode ncurses_define_key ncurses_del_panel ncurses_delay_output ncurses_delch ncurses_deleteln ncurses_delwin ncurses_doupdate ncurses_echo ncurses_echochar ncurses_end ncurses_erase ncurses_erasechar ncurses_filter ncurses_flash ncurses_flushinp ncurses_getch ncurses_getmaxyx ncurses_getmouse ncurses_getyx ncurses_halfdelay ncurses_has_colors ncurses_has_ic ncurses_has_il ncurses_has_key ncurses_hide_panel ncurses_hline ncurses_inch ncurses_init_color ncurses_init_pair ncurses_init ncurses_insch ncurses_insdelln ncurses_insertln ncurses_insstr ncurses_instr ncurses_isendwin ncurses_keyok ncurses_keypad ncurses_killchar ncurses_longname ncurses_meta ncurses_mouse_trafo ncurses_mouseinterval ncurses_mousemask ncurses_move_panel ncurses_move ncurses_mvaddch ncurses_mvaddchnstr ncurses_mvaddchstr ncurses_mvaddnstr ncurses_mvaddstr ncurses_mvcur ncurses_mvdelch ncurses_mvgetch ncurses_mvhline ncurses_mvinch ncurses_mvvline ncurses_mvwaddstr ncurses_napms ncurses_new_panel ncurses_newpad ncurses_newwin ncurses_nl ncurses_nocbreak ncurses_noecho ncurses_nonl ncurses_noqiflush ncurses_noraw ncurses_pair_content ncurses_panel_above ncurses_panel_below ncurses_panel_window ncurses_pnoutrefresh ncurses_prefresh ncurses_putp ncurses_qiflush ncurses_raw ncurses_refresh ncurses_replace_panel ncurses_reset_prog_mode ncurses_reset_shell_mode ncurses_resetty ncurses_savetty ncurses_scr_dump ncurses_scr_init ncurses_scr_restore ncurses_scr_set ncurses_scrl ncurses_show_panel ncurses_slk_attr ncurses_slk_attroff ncurses_slk_attron ncurses_slk_attrset ncurses_slk_clear ncurses_slk_color ncurses_slk_init ncurses_slk_noutrefresh ncurses_slk_refresh ncurses_slk_restore ncurses_slk_set ncurses_slk_touch ncurses_standend ncurses_standout ncurses_start_color ncurses_termattrs ncurses_termname ncurses_timeout ncurses_top_panel ncurses_typeahead ncurses_ungetch ncurses_ungetmouse ncurses_update_panels ncurses_use_default_colors ncurses_use_env ncurses_use_extended_names ncurses_vidattr ncurses_vline ncurses_waddch ncurses_waddstr ncurses_wattroff ncurses_wattron ncurses_wattrset ncurses_wborder ncurses_wclear ncurses_wcolor_set ncurses_werase ncurses_wgetch ncurses_whline ncurses_wmouse_trafo ncurses_wmove ncurses_wnoutrefresh ncurses_wrefresh ncurses_wstandend ncurses_wstandout ncurses_wvline contained -syn keyword phpFunctions checkdnsrr closelog debugger_off debugger_on define_syslog_variables dns_check_record dns_get_mx dns_get_record fsockopen gethostbyaddr gethostbyname gethostbynamel getmxrr getprotobyname getprotobynumber getservbyname getservbyport ip2long long2ip openlog pfsockopen socket_get_status socket_set_blocking socket_set_timeout syslog contained -syn keyword phpFunctions yp_all yp_cat yp_err_string yp_errno yp_first yp_get_default_domain yp_master yp_match yp_next yp_order contained -syn keyword phpFunctions notes_body notes_copy_db notes_create_db notes_create_note notes_drop_db notes_find_note notes_header_info notes_list_msgs notes_mark_read notes_mark_unread notes_nav_create notes_search notes_unread notes_version contained -syn keyword phpFunctions nsapi_request_headers nsapi_response_headers nsapi_virtual contained -syn keyword phpFunctions aggregate_info aggregate_methods_by_list aggregate_methods_by_regexp aggregate_methods aggregate_properties_by_list aggregate_properties_by_regexp aggregate_properties aggregate aggregation_info deaggregate contained -syn keyword phpFunctions ocibindbyname ocicancel ocicloselob ocicollappend ocicollassign ocicollassignelem ocicollgetelem ocicollmax ocicollsize ocicolltrim ocicolumnisnull ocicolumnname ocicolumnprecision ocicolumnscale ocicolumnsize ocicolumntype ocicolumntyperaw ocicommit ocidefinebyname ocierror ociexecute ocifetch ocifetchinto ocifetchstatement ocifreecollection ocifreecursor ocifreedesc ocifreestatement ociinternaldebug ociloadlob ocilogoff ocilogon ocinewcollection ocinewcursor ocinewdescriptor ocinlogon ocinumcols ociparse ociplogon ociresult ocirollback ocirowcount ocisavelob ocisavelobfile ociserverversion ocisetprefetch ocistatementtype ociwritelobtofile ociwritetemporarylob contained -syn keyword phpFunctions odbc_autocommit odbc_binmode odbc_close_all odbc_close odbc_columnprivileges odbc_columns odbc_commit odbc_connect odbc_cursor odbc_data_source odbc_do odbc_error odbc_errormsg odbc_exec odbc_execute odbc_fetch_array odbc_fetch_into odbc_fetch_object odbc_fetch_row odbc_field_len odbc_field_name odbc_field_num odbc_field_precision odbc_field_scale odbc_field_type odbc_foreignkeys odbc_free_result odbc_gettypeinfo odbc_longreadlen odbc_next_result odbc_num_fields odbc_num_rows odbc_pconnect odbc_prepare odbc_primarykeys odbc_procedurecolumns odbc_procedures odbc_result_all odbc_result odbc_rollback odbc_setoption odbc_specialcolumns odbc_statistics odbc_tableprivileges odbc_tables contained -syn keyword phpFunctions openssl_csr_export_to_file openssl_csr_export openssl_csr_new openssl_csr_sign openssl_error_string openssl_free_key openssl_get_privatekey openssl_get_publickey openssl_open openssl_pkcs7_decrypt openssl_pkcs7_encrypt openssl_pkcs7_sign openssl_pkcs7_verify openssl_pkey_export_to_file openssl_pkey_export openssl_pkey_get_private openssl_pkey_get_public openssl_pkey_new openssl_private_decrypt openssl_private_encrypt openssl_public_decrypt openssl_public_encrypt openssl_seal openssl_sign openssl_verify openssl_x509_check_private_key openssl_x509_checkpurpose openssl_x509_export_to_file openssl_x509_export openssl_x509_free openssl_x509_parse openssl_x509_read contained -syn keyword phpFunctions ora_bind ora_close ora_columnname ora_columnsize ora_columntype ora_commit ora_commitoff ora_commiton ora_do ora_error ora_errorcode ora_exec ora_fetch_into ora_fetch ora_getcolumn ora_logoff ora_logon ora_numcols ora_numrows ora_open ora_parse ora_plogon ora_rollback contained -syn keyword phpFunctions flush ob_clean ob_end_clean ob_end_flush ob_flush ob_get_clean ob_get_contents ob_get_flush ob_get_length ob_get_level ob_get_status ob_gzhandler ob_implicit_flush ob_list_handlers ob_start output_add_rewrite_var output_reset_rewrite_vars contained -syn keyword phpFunctions overload contained -syn keyword phpFunctions ovrimos_close ovrimos_commit ovrimos_connect ovrimos_cursor ovrimos_exec ovrimos_execute ovrimos_fetch_into ovrimos_fetch_row ovrimos_field_len ovrimos_field_name ovrimos_field_num ovrimos_field_type ovrimos_free_result ovrimos_longreadlen ovrimos_num_fields ovrimos_num_rows ovrimos_prepare ovrimos_result_all ovrimos_result ovrimos_rollback contained -syn keyword phpFunctions pcntl_exec pcntl_fork pcntl_signal pcntl_waitpid pcntl_wexitstatus pcntl_wifexited pcntl_wifsignaled pcntl_wifstopped pcntl_wstopsig pcntl_wtermsig contained -syn keyword phpFunctions preg_grep preg_match_all preg_match preg_quote preg_replace_callback preg_replace preg_split contained -syn keyword phpFunctions pdf_add_annotation pdf_add_bookmark pdf_add_launchlink pdf_add_locallink pdf_add_note pdf_add_outline pdf_add_pdflink pdf_add_thumbnail pdf_add_weblink pdf_arc pdf_arcn pdf_attach_file pdf_begin_page pdf_begin_pattern pdf_begin_template pdf_circle pdf_clip pdf_close_image pdf_close_pdi_page pdf_close_pdi pdf_close pdf_closepath_fill_stroke pdf_closepath_stroke pdf_closepath pdf_concat pdf_continue_text pdf_curveto pdf_delete pdf_end_page pdf_end_pattern pdf_end_template pdf_endpath pdf_fill_stroke pdf_fill pdf_findfont pdf_get_buffer pdf_get_font pdf_get_fontname pdf_get_fontsize pdf_get_image_height pdf_get_image_width pdf_get_majorversion pdf_get_minorversion pdf_get_parameter pdf_get_pdi_parameter pdf_get_pdi_value pdf_get_value pdf_initgraphics pdf_lineto pdf_makespotcolor pdf_moveto pdf_new pdf_open_CCITT pdf_open_file pdf_open_gif pdf_open_image_file pdf_open_image pdf_open_jpeg pdf_open_memory_image pdf_open_pdi_page pdf_open_pdi pdf_open_png pdf_open_tiff pdf_open pdf_place_image pdf_place_pdi_page pdf_rect pdf_restore pdf_rotate pdf_save pdf_scale pdf_set_border_color pdf_set_border_dash pdf_set_border_style pdf_set_char_spacing pdf_set_duration pdf_set_font pdf_set_horiz_scaling pdf_set_info_author pdf_set_info_creator pdf_set_info_keywords pdf_set_info_subject pdf_set_info_title pdf_set_info pdf_set_leading pdf_set_parameter pdf_set_text_matrix pdf_set_text_pos pdf_set_text_rendering pdf_set_text_rise pdf_set_value pdf_set_word_spacing pdf_setcolor pdf_setdash pdf_setflat pdf_setfont pdf_setgray_fill pdf_setgray_stroke pdf_setgray pdf_setlinecap pdf_setlinejoin pdf_setlinewidth pdf_setmatrix pdf_setmiterlimit pdf_setpolydash pdf_setrgbcolor_fill pdf_setrgbcolor_stroke pdf_setrgbcolor pdf_show_boxed pdf_show_xy pdf_show pdf_skew pdf_stringwidth pdf_stroke pdf_translate contained -syn keyword phpFunctions pfpro_cleanup pfpro_init pfpro_process_raw pfpro_process pfpro_version contained -syn keyword phpFunctions pg_affected_rows pg_cancel_query pg_client_encoding pg_close pg_connect pg_connection_busy pg_connection_reset pg_connection_status pg_convert pg_copy_from pg_copy_to pg_dbname pg_delete pg_end_copy pg_escape_bytea pg_escape_string pg_fetch_all pg_fetch_array pg_fetch_assoc pg_fetch_object pg_fetch_result pg_fetch_row pg_field_is_null pg_field_name pg_field_num pg_field_prtlen pg_field_size pg_field_type pg_free_result pg_get_notify pg_get_pid pg_get_result pg_host pg_insert pg_last_error pg_last_notice pg_last_oid pg_lo_close pg_lo_create pg_lo_export pg_lo_import pg_lo_open pg_lo_read_all pg_lo_read pg_lo_seek pg_lo_tell pg_lo_unlink pg_lo_write pg_meta_data pg_num_fields pg_num_rows pg_options pg_pconnect pg_ping pg_port pg_put_line pg_query pg_result_error pg_result_seek pg_result_status pg_select pg_send_query pg_set_client_encoding pg_trace pg_tty pg_unescape_bytea pg_untrace pg_update contained -syn keyword phpFunctions posix_ctermid posix_get_last_error posix_getcwd posix_getegid posix_geteuid posix_getgid posix_getgrgid posix_getgrnam posix_getgroups posix_getlogin posix_getpgid posix_getpgrp posix_getpid posix_getppid posix_getpwnam posix_getpwuid posix_getrlimit posix_getsid posix_getuid posix_isatty posix_kill posix_mkfifo posix_setegid posix_seteuid posix_setgid posix_setpgid posix_setsid posix_setuid posix_strerror posix_times posix_ttyname posix_uname contained -syn keyword phpFunctions printer_abort printer_close printer_create_brush printer_create_dc printer_create_font printer_create_pen printer_delete_brush printer_delete_dc printer_delete_font printer_delete_pen printer_draw_bmp printer_draw_chord printer_draw_elipse printer_draw_line printer_draw_pie printer_draw_rectangle printer_draw_roundrect printer_draw_text printer_end_doc printer_end_page printer_get_option printer_list printer_logical_fontheight printer_open printer_select_brush printer_select_font printer_select_pen printer_set_option printer_start_doc printer_start_page printer_write contained -syn keyword phpFunctions pspell_add_to_personal pspell_add_to_session pspell_check pspell_clear_session pspell_config_create pspell_config_ignore pspell_config_mode pspell_config_personal pspell_config_repl pspell_config_runtogether pspell_config_save_repl pspell_new_config pspell_new_personal pspell_new pspell_save_wordlist pspell_store_replacement pspell_suggest contained -syn keyword phpFunctions qdom_error qdom_tree contained -syn keyword phpFunctions readline_add_history readline_clear_history readline_completion_function readline_info readline_list_history readline_read_history readline_write_history readline contained -syn keyword phpFunctions recode_file recode_string recode contained -syn keyword phpFunctions ereg_replace ereg eregi_replace eregi split spliti sql_regcase contained -syn keyword phpFunctions ftok msg_get_queue msg_receive msg_remove_queue msg_send msg_set_queue msg_stat_queue sem_acquire sem_get sem_release sem_remove shm_attach shm_detach shm_get_var shm_put_var shm_remove_var shm_remove contained -syn keyword phpFunctions sesam_affected_rows sesam_commit sesam_connect sesam_diagnostic sesam_disconnect sesam_errormsg sesam_execimm sesam_fetch_array sesam_fetch_result sesam_fetch_row sesam_field_array sesam_field_name sesam_free_result sesam_num_fields sesam_query sesam_rollback sesam_seek_row sesam_settransaction contained -syn keyword phpFunctions session_cache_expire session_cache_limiter session_decode session_destroy session_encode session_get_cookie_params session_id session_is_registered session_module_name session_name session_regenerate_id session_register session_save_path session_set_cookie_params session_set_save_handler session_start session_unregister session_unset session_write_close contained -syn keyword phpFunctions shmop_close shmop_delete shmop_open shmop_read shmop_size shmop_write contained -syn keyword phpFunctions snmp_get_quick_print snmp_set_quick_print snmpget snmprealwalk snmpset snmpwalk snmpwalkoid contained -syn keyword phpFunctions socket_accept socket_bind socket_clear_error socket_close socket_connect socket_create_listen socket_create_pair socket_create socket_get_option socket_getpeername socket_getsockname socket_iovec_add socket_iovec_alloc socket_iovec_delete socket_iovec_fetch socket_iovec_free socket_iovec_set socket_last_error socket_listen socket_read socket_readv socket_recv socket_recvfrom socket_recvmsg socket_select socket_send socket_sendmsg socket_sendto socket_set_block socket_set_nonblock socket_set_option socket_shutdown socket_strerror socket_write socket_writev contained -syn keyword phpFunctions sqlite_array_query sqlite_busy_timeout sqlite_changes sqlite_close sqlite_column sqlite_create_aggregate sqlite_create_function sqlite_current sqlite_error_string sqlite_escape_string sqlite_fetch_array sqlite_fetch_single sqlite_fetch_string sqlite_field_name sqlite_has_more sqlite_last_error sqlite_last_insert_rowid sqlite_libencoding sqlite_libversion sqlite_next sqlite_num_fields sqlite_num_rows sqlite_open sqlite_popen sqlite_query sqlite_rewind sqlite_seek sqlite_udf_decode_binary sqlite_udf_encode_binary sqlite_unbuffered_query contained -syn keyword phpFunctions stream_context_create stream_context_get_options stream_context_set_option stream_context_set_params stream_copy_to_stream stream_filter_append stream_filter_prepend stream_filter_register stream_get_contents stream_get_filters stream_get_line stream_get_meta_data stream_get_transports stream_get_wrappers stream_register_wrapper stream_select stream_set_blocking stream_set_timeout stream_set_write_buffer stream_socket_accept stream_socket_client stream_socket_get_name stream_socket_recvfrom stream_socket_sendto stream_socket_server stream_wrapper_register contained -syn keyword phpFunctions addcslashes addslashes bin2hex chop chr chunk_split convert_cyr_string count_chars crc32 crypt echo explode fprintf get_html_translation_table hebrev hebrevc html_entity_decode htmlentities htmlspecialchars implode join levenshtein localeconv ltrim md5_file md5 metaphone money_format nl_langinfo nl2br number_format ord parse_str print printf quoted_printable_decode quotemeta rtrim setlocale sha1_file sha1 similar_text soundex sprintf sscanf str_ireplace str_pad str_repeat str_replace str_rot13 str_shuffle str_split str_word_count strcasecmp strchr strcmp strcoll strcspn strip_tags stripcslashes stripos stripslashes stristr strlen strnatcasecmp strnatcmp strncasecmp strncmp strpos strrchr strrev strripos strrpos strspn strstr strtok strtolower strtoupper strtr substr_compare substr_count substr_replace substr trim ucfirst ucwords vprintf vsprintf wordwrap contained -syn keyword phpFunctions swf_actiongeturl swf_actiongotoframe swf_actiongotolabel swf_actionnextframe swf_actionplay swf_actionprevframe swf_actionsettarget swf_actionstop swf_actiontogglequality swf_actionwaitforframe swf_addbuttonrecord swf_addcolor swf_closefile swf_definebitmap swf_definefont swf_defineline swf_definepoly swf_definerect swf_definetext swf_endbutton swf_enddoaction swf_endshape swf_endsymbol swf_fontsize swf_fontslant swf_fonttracking swf_getbitmapinfo swf_getfontinfo swf_getframe swf_labelframe swf_lookat swf_modifyobject swf_mulcolor swf_nextid swf_oncondition swf_openfile swf_ortho2 swf_ortho swf_perspective swf_placeobject swf_polarview swf_popmatrix swf_posround swf_pushmatrix swf_removeobject swf_rotate swf_scale swf_setfont swf_setframe swf_shapearc swf_shapecurveto3 swf_shapecurveto swf_shapefillbitmapclip swf_shapefillbitmaptile swf_shapefilloff swf_shapefillsolid swf_shapelinesolid swf_shapelineto swf_shapemoveto swf_showframe swf_startbutton swf_startdoaction swf_startshape swf_startsymbol swf_textwidth swf_translate swf_viewport contained -syn keyword phpFunctions sybase_affected_rows sybase_close sybase_connect sybase_data_seek sybase_deadlock_retry_count sybase_fetch_array sybase_fetch_assoc sybase_fetch_field sybase_fetch_object sybase_fetch_row sybase_field_seek sybase_free_result sybase_get_last_message sybase_min_client_severity sybase_min_error_severity sybase_min_message_severity sybase_min_server_severity sybase_num_fields sybase_num_rows sybase_pconnect sybase_query sybase_result sybase_select_db sybase_set_message_handler sybase_unbuffered_query contained -syn keyword phpFunctions tidy_access_count tidy_clean_repair tidy_config_count tidy_diagnose tidy_error_count tidy_get_body tidy_get_config tidy_get_error_buffer tidy_get_head tidy_get_html_ver tidy_get_html tidy_get_output tidy_get_release tidy_get_root tidy_get_status tidy_getopt tidy_is_xhtml tidy_load_config tidy_parse_file tidy_parse_string tidy_repair_file tidy_repair_string tidy_reset_config tidy_save_config tidy_set_encoding tidy_setopt tidy_warning_count contained -syn keyword phpMethods attributes children get_attr get_nodes has_children has_siblings is_asp is_comment is_html is_jsp is_jste is_text is_xhtml is_xml next prev tidy_node contained -syn keyword phpFunctions token_get_all token_name contained -syn keyword phpFunctions base64_decode base64_encode get_meta_tags http_build_query parse_url rawurldecode rawurlencode urldecode urlencode contained -syn keyword phpFunctions doubleval empty floatval get_defined_vars get_resource_type gettype import_request_variables intval is_array is_bool is_callable is_double is_float is_int is_integer is_long is_null is_numeric is_object is_real is_resource is_scalar is_string isset print_r serialize settype strval unserialize unset var_dump var_export contained -syn keyword phpFunctions vpopmail_add_alias_domain_ex vpopmail_add_alias_domain vpopmail_add_domain_ex vpopmail_add_domain vpopmail_add_user vpopmail_alias_add vpopmail_alias_del_domain vpopmail_alias_del vpopmail_alias_get_all vpopmail_alias_get vpopmail_auth_user vpopmail_del_domain_ex vpopmail_del_domain vpopmail_del_user vpopmail_error vpopmail_passwd vpopmail_set_user_quota contained -syn keyword phpFunctions w32api_deftype w32api_init_dtype w32api_invoke_function w32api_register_function w32api_set_call_method contained -syn keyword phpFunctions wddx_add_vars wddx_deserialize wddx_packet_end wddx_packet_start wddx_serialize_value wddx_serialize_vars contained -syn keyword phpFunctions utf8_decode utf8_encode xml_error_string xml_get_current_byte_index xml_get_current_column_number xml_get_current_line_number xml_get_error_code xml_parse_into_struct xml_parse xml_parser_create_ns xml_parser_create xml_parser_free xml_parser_get_option xml_parser_set_option xml_set_character_data_handler xml_set_default_handler xml_set_element_handler xml_set_end_namespace_decl_handler xml_set_external_entity_ref_handler xml_set_notation_decl_handler xml_set_object xml_set_processing_instruction_handler xml_set_start_namespace_decl_handler xml_set_unparsed_entity_decl_handler contained -syn keyword phpFunctions xmlrpc_decode_request xmlrpc_decode xmlrpc_encode_request xmlrpc_encode xmlrpc_get_type xmlrpc_parse_method_descriptions xmlrpc_server_add_introspection_data xmlrpc_server_call_method xmlrpc_server_create xmlrpc_server_destroy xmlrpc_server_register_introspection_callback xmlrpc_server_register_method xmlrpc_set_type contained -syn keyword phpFunctions xslt_create xslt_errno xslt_error xslt_free xslt_output_process xslt_set_base xslt_set_encoding xslt_set_error_handler xslt_set_log xslt_set_sax_handler xslt_set_sax_handlers xslt_set_scheme_handler xslt_set_scheme_handlers contained -syn keyword phpFunctions yaz_addinfo yaz_ccl_conf yaz_ccl_parse yaz_close yaz_connect yaz_database yaz_element yaz_errno yaz_error yaz_es_result yaz_get_option yaz_hits yaz_itemorder yaz_present yaz_range yaz_record yaz_scan_result yaz_scan yaz_schema yaz_search yaz_set_option yaz_sort yaz_syntax yaz_wait contained -syn keyword phpFunctions zip_close zip_entry_close zip_entry_compressedsize zip_entry_compressionmethod zip_entry_filesize zip_entry_name zip_entry_open zip_entry_read zip_open zip_read contained -syn keyword phpFunctions gzclose gzcompress gzdeflate gzencode gzeof gzfile gzgetc gzgets gzgetss gzinflate gzopen gzpassthru gzputs gzread gzrewind gzseek gztell gzuncompress gzwrite readgzfile zlib_get_coding_type contained +syn keyword phpFunctions apache_child_terminate apache_get_modules apache_get_version apache_getenv apache_lookup_uri apache_note apache_request_headers apache_response_headers apache_setenv ascii2ebcdic ebcdic2ascii getallheaders virtual contained +syn keyword phpFunctions array_change_key_case array_chunk array_combine array_count_values array_diff_assoc array_diff_uassoc array_diff array_fill array_filter array_flip array_intersect_assoc array_intersect array_key_exists array_keys array_map array_merge_recursive array_merge array_multisort array_pad array_pop array_push array_rand array_reduce array_reverse array_search array_shift array_slice array_splice array_sum array_udiff_assoc array_udiff_uassoc array_udiff array_unique array_unshift array_values array_walk array arsort asort compact count current each end extract in_array key krsort ksort list natcasesort natsort next pos prev range reset rsort shuffle sizeof sort uasort uksort usort contained +syn keyword phpFunctions aspell_check aspell_new aspell_suggest contained +syn keyword phpFunctions bcadd bccomp bcdiv bcmod bcmul bcpow bcpowmod bcscale bcsqrt bcsub contained +syn keyword phpFunctions bzclose bzcompress bzdecompress bzerrno bzerror bzerrstr bzflush bzopen bzread bzwrite contained +syn keyword phpFunctions cal_days_in_month cal_from_jd cal_info cal_to_jd easter_date easter_days frenchtojd gregoriantojd jddayofweek jdmonthname jdtofrench jdtogregorian jdtojewish jdtojulian jdtounix jewishtojd juliantojd unixtojd contained +syn keyword phpFunctions ccvs_add ccvs_auth ccvs_command ccvs_count ccvs_delete ccvs_done ccvs_init ccvs_lookup ccvs_new ccvs_report ccvs_return ccvs_reverse ccvs_sale ccvs_status ccvs_textvalue ccvs_void contained +syn keyword phpFunctions call_user_method_array call_user_method class_exists get_class_methods get_class_vars get_class get_declared_classes get_object_vars get_parent_class is_a is_subclass_of method_exists contained +syn keyword phpFunctions com VARIANT com_addref com_get com_invoke com_isenum com_load_typelib com_load com_propget com_propput com_propset com_release com_set contained +syn keyword phpFunctions cpdf_add_annotation cpdf_add_outline cpdf_arc cpdf_begin_text cpdf_circle cpdf_clip cpdf_close cpdf_closepath_fill_stroke cpdf_closepath_stroke cpdf_closepath cpdf_continue_text cpdf_curveto cpdf_end_text cpdf_fill_stroke cpdf_fill cpdf_finalize_page cpdf_finalize cpdf_global_set_document_limits cpdf_import_jpeg cpdf_lineto cpdf_moveto cpdf_newpath cpdf_open cpdf_output_buffer cpdf_page_init cpdf_place_inline_image cpdf_rect cpdf_restore cpdf_rlineto cpdf_rmoveto cpdf_rotate_text cpdf_rotate cpdf_save_to_file cpdf_save cpdf_scale cpdf_set_action_url cpdf_set_char_spacing cpdf_set_creator cpdf_set_current_page cpdf_set_font_directories cpdf_set_font_map_file cpdf_set_font cpdf_set_horiz_scaling cpdf_set_keywords cpdf_set_leading cpdf_set_page_animation cpdf_set_subject cpdf_set_text_matrix cpdf_set_text_pos cpdf_set_text_rendering cpdf_set_text_rise cpdf_set_title cpdf_set_viewer_preferences cpdf_set_word_spacing cpdf_setdash cpdf_setflat cpdf_setgray_fill cpdf_setgray_stroke cpdf_setgray cpdf_setlinecap cpdf_setlinejoin cpdf_setlinewidth cpdf_setmiterlimit cpdf_setrgbcolor_fill cpdf_setrgbcolor_stroke cpdf_setrgbcolor cpdf_show_xy cpdf_show cpdf_stringwidth cpdf_stroke cpdf_text cpdf_translate contained +syn keyword phpFunctions crack_check crack_closedict crack_getlastmessage crack_opendict contained +syn keyword phpFunctions ctype_alnum ctype_alpha ctype_cntrl ctype_digit ctype_graph ctype_lower ctype_print ctype_punct ctype_space ctype_upper ctype_xdigit contained +syn keyword phpFunctions curl_close curl_errno curl_error curl_exec curl_getinfo curl_init curl_multi_add_handle curl_multi_close curl_multi_exec curl_multi_getcontent curl_multi_info_read curl_multi_init curl_multi_remove_handle curl_multi_select curl_setopt curl_version contained +syn keyword phpFunctions cybercash_base64_decode cybercash_base64_encode cybercash_decr cybercash_encr contained +syn keyword phpFunctions cyrus_authenticate cyrus_bind cyrus_close cyrus_connect cyrus_query cyrus_unbind contained +syn keyword phpFunctions checkdate date getdate gettimeofday gmdate gmmktime gmstrftime localtime microtime mktime strftime strtotime time contained +syn keyword phpFunctions dba_close dba_delete dba_exists dba_fetch dba_firstkey dba_handlers dba_insert dba_key_split dba_list dba_nextkey dba_open dba_optimize dba_popen dba_replace dba_sync contained +syn keyword phpFunctions dbase_add_record dbase_close dbase_create dbase_delete_record dbase_get_header_info dbase_get_record_with_names dbase_get_record dbase_numfields dbase_numrecords dbase_open dbase_pack dbase_replace_record contained +syn keyword phpFunctions dblist dbmclose dbmdelete dbmexists dbmfetch dbmfirstkey dbminsert dbmnextkey dbmopen dbmreplace contained +syn keyword phpFunctions dbplus_add dbplus_aql dbplus_chdir dbplus_close dbplus_curr dbplus_errcode dbplus_errno dbplus_find dbplus_first dbplus_flush dbplus_freealllocks dbplus_freelock dbplus_freerlocks dbplus_getlock dbplus_getunique dbplus_info dbplus_last dbplus_lockrel dbplus_next dbplus_open dbplus_prev dbplus_rchperm dbplus_rcreate dbplus_rcrtexact dbplus_rcrtlike dbplus_resolve dbplus_restorepos dbplus_rkeys dbplus_ropen dbplus_rquery dbplus_rrename dbplus_rsecindex dbplus_runlink dbplus_rzap dbplus_savepos dbplus_setindex dbplus_setindexbynumber dbplus_sql dbplus_tcl dbplus_tremove dbplus_undo dbplus_undoprepare dbplus_unlockrel dbplus_unselect dbplus_update dbplus_xlockrel dbplus_xunlockrel contained +syn keyword phpFunctions dbx_close dbx_compare dbx_connect dbx_error dbx_escape_string dbx_fetch_row dbx_query dbx_sort contained +syn keyword phpFunctions dio_close dio_fcntl dio_open dio_read dio_seek dio_stat dio_tcsetattr dio_truncate dio_write contained +syn keyword phpFunctions chdir chroot dir closedir getcwd opendir readdir rewinddir scandir contained +syn keyword phpFunctions domxml_new_doc domxml_open_file domxml_open_mem domxml_version domxml_xmltree domxml_xslt_stylesheet_doc domxml_xslt_stylesheet_file domxml_xslt_stylesheet xpath_eval_expression xpath_eval xpath_new_context xptr_eval xptr_new_context contained +syn keyword phpMethods name specified value create_attribute create_cdata_section create_comment create_element_ns create_element create_entity_reference create_processing_instruction create_text_node doctype document_element dump_file dump_mem get_element_by_id get_elements_by_tagname html_dump_mem xinclude entities internal_subset name notations public_id system_id get_attribute_node get_attribute get_elements_by_tagname has_attribute remove_attribute set_attribute tagname add_namespace append_child append_sibling attributes child_nodes clone_node dump_node first_child get_content has_attributes has_child_nodes insert_before is_blank_node last_child next_sibling node_name node_type node_value owner_document parent_node prefix previous_sibling remove_child replace_child replace_node set_content set_name set_namespace unlink_node data target process result_dump_file result_dump_mem contained +syn keyword phpFunctions dotnet_load contained +syn keyword phpFunctions debug_backtrace debug_print_backtrace error_log error_reporting restore_error_handler set_error_handler trigger_error user_error contained +syn keyword phpFunctions escapeshellarg escapeshellcmd exec passthru proc_close proc_get_status proc_nice proc_open proc_terminate shell_exec system contained +syn keyword phpFunctions fam_cancel_monitor fam_close fam_monitor_collection fam_monitor_directory fam_monitor_file fam_next_event fam_open fam_pending fam_resume_monitor fam_suspend_monitor contained +syn keyword phpFunctions fbsql_affected_rows fbsql_autocommit fbsql_change_user fbsql_close fbsql_commit fbsql_connect fbsql_create_blob fbsql_create_clob fbsql_create_db fbsql_data_seek fbsql_database_password fbsql_database fbsql_db_query fbsql_db_status fbsql_drop_db fbsql_errno fbsql_error fbsql_fetch_array fbsql_fetch_assoc fbsql_fetch_field fbsql_fetch_lengths fbsql_fetch_object fbsql_fetch_row fbsql_field_flags fbsql_field_len fbsql_field_name fbsql_field_seek fbsql_field_table fbsql_field_type fbsql_free_result fbsql_get_autostart_info fbsql_hostname fbsql_insert_id fbsql_list_dbs fbsql_list_fields fbsql_list_tables fbsql_next_result fbsql_num_fields fbsql_num_rows fbsql_password fbsql_pconnect fbsql_query fbsql_read_blob fbsql_read_clob fbsql_result fbsql_rollback fbsql_select_db fbsql_set_lob_mode fbsql_set_transaction fbsql_start_db fbsql_stop_db fbsql_tablename fbsql_username fbsql_warnings contained +syn keyword phpFunctions fdf_add_doc_javascript fdf_add_template fdf_close fdf_create fdf_enum_values fdf_errno fdf_error fdf_get_ap fdf_get_attachment fdf_get_encoding fdf_get_file fdf_get_flags fdf_get_opt fdf_get_status fdf_get_value fdf_get_version fdf_header fdf_next_field_name fdf_open_string fdf_open fdf_remove_item fdf_save_string fdf_save fdf_set_ap fdf_set_encoding fdf_set_file fdf_set_flags fdf_set_javascript_action fdf_set_opt fdf_set_status fdf_set_submit_form_action fdf_set_target_frame fdf_set_value fdf_set_version contained +syn keyword phpFunctions filepro_fieldcount filepro_fieldname filepro_fieldtype filepro_fieldwidth filepro_retrieve filepro_rowcount filepro contained +syn keyword phpFunctions basename chgrp chmod chown clearstatcache copy delete dirname disk_free_space disk_total_space diskfreespace fclose feof fflush fgetc fgetcsv fgets fgetss file_exists file_get_contents file_put_contents file fileatime filectime filegroup fileinode filemtime fileowner fileperms filesize filetype flock fnmatch fopen fpassthru fputs fread fscanf fseek fstat ftell ftruncate fwrite glob is_dir is_executable is_file is_link is_readable is_uploaded_file is_writable is_writeable link linkinfo lstat mkdir move_uploaded_file parse_ini_file pathinfo pclose popen readfile readlink realpath rename rewind rmdir set_file_buffer stat symlink tempnam tmpfile touch umask unlink contained +syn keyword phpFunctions fribidi_log2vis contained +syn keyword phpFunctions ftp_alloc ftp_cdup ftp_chdir ftp_chmod ftp_close ftp_connect ftp_delete ftp_exec ftp_fget ftp_fput ftp_get_option ftp_get ftp_login ftp_mdtm ftp_mkdir ftp_nb_continue ftp_nb_fget ftp_nb_fput ftp_nb_get ftp_nb_put ftp_nlist ftp_pasv ftp_put ftp_pwd ftp_quit ftp_raw ftp_rawlist ftp_rename ftp_rmdir ftp_set_option ftp_site ftp_size ftp_ssl_connect ftp_systype contained +syn keyword phpFunctions call_user_func_array call_user_func create_function func_get_arg func_get_args func_num_args function_exists get_defined_functions register_shutdown_function register_tick_function unregister_tick_function contained +syn keyword phpFunctions bind_textdomain_codeset bindtextdomain dcgettext dcngettext dgettext dngettext gettext ngettext textdomain contained +syn keyword phpFunctions gmp_abs gmp_add gmp_and gmp_clrbit gmp_cmp gmp_com gmp_div_q gmp_div_qr gmp_div_r gmp_div gmp_divexact gmp_fact gmp_gcd gmp_gcdext gmp_hamdist gmp_init gmp_intval gmp_invert gmp_jacobi gmp_legendre gmp_mod gmp_mul gmp_neg gmp_or gmp_perfect_square gmp_popcount gmp_pow gmp_powm gmp_prob_prime gmp_random gmp_scan0 gmp_scan1 gmp_setbit gmp_sign gmp_sqrt gmp_sqrtrem gmp_sqrtrm gmp_strval gmp_sub gmp_xor contained +syn keyword phpFunctions header headers_list headers_sent setcookie contained +syn keyword phpFunctions hw_api_attribute hwapi_hgcsp hw_api_content hw_api_object contained +syn keyword phpMethods key langdepvalue value values checkin checkout children mimetype read content copy dbstat dcstat dstanchors dstofsrcanchors count reason find ftstat hwstat identify info insert insertanchor insertcollection insertdocument link lock move assign attreditable count insert remove title value object objectbyanchor parents description type remove replace setcommitedversion srcanchors srcsofdst unlock user userlist contained +syn keyword phpFunctions hw_Array2Objrec hw_changeobject hw_Children hw_ChildrenObj hw_Close hw_Connect hw_connection_info hw_cp hw_Deleteobject hw_DocByAnchor hw_DocByAnchorObj hw_Document_Attributes hw_Document_BodyTag hw_Document_Content hw_Document_SetContent hw_Document_Size hw_dummy hw_EditText hw_Error hw_ErrorMsg hw_Free_Document hw_GetAnchors hw_GetAnchorsObj hw_GetAndLock hw_GetChildColl hw_GetChildCollObj hw_GetChildDocColl hw_GetChildDocCollObj hw_GetObject hw_GetObjectByQuery hw_GetObjectByQueryColl hw_GetObjectByQueryCollObj hw_GetObjectByQueryObj hw_GetParents hw_GetParentsObj hw_getrellink hw_GetRemote hw_getremotechildren hw_GetSrcByDestObj hw_GetText hw_getusername hw_Identify hw_InCollections hw_Info hw_InsColl hw_InsDoc hw_insertanchors hw_InsertDocument hw_InsertObject hw_mapid hw_Modifyobject hw_mv hw_New_Document hw_objrec2array hw_Output_Document hw_pConnect hw_PipeDocument hw_Root hw_setlinkroot hw_stat hw_Unlock hw_Who contained +syn keyword phpFunctions ibase_add_user ibase_affected_rows ibase_blob_add ibase_blob_cancel ibase_blob_close ibase_blob_create ibase_blob_echo ibase_blob_get ibase_blob_import ibase_blob_info ibase_blob_open ibase_close ibase_commit_ret ibase_commit ibase_connect ibase_delete_user ibase_drop_db ibase_errcode ibase_errmsg ibase_execute ibase_fetch_assoc ibase_fetch_object ibase_fetch_row ibase_field_info ibase_free_event_handler ibase_free_query ibase_free_result ibase_gen_id ibase_modify_user ibase_name_result ibase_num_fields ibase_num_params ibase_param_info ibase_pconnect ibase_prepare ibase_query ibase_rollback_ret ibase_rollback ibase_set_event_handler ibase_timefmt ibase_trans ibase_wait_event contained +syn keyword phpFunctions iconv_get_encoding iconv_mime_decode_headers iconv_mime_decode iconv_mime_encode iconv_set_encoding iconv_strlen iconv_strpos iconv_strrpos iconv_substr iconv ob_iconv_handler contained +syn keyword phpFunctions ifx_affected_rows ifx_blobinfile_mode ifx_byteasvarchar ifx_close ifx_connect ifx_copy_blob ifx_create_blob ifx_create_char ifx_do ifx_error ifx_errormsg ifx_fetch_row ifx_fieldproperties ifx_fieldtypes ifx_free_blob ifx_free_char ifx_free_result ifx_get_blob ifx_get_char ifx_getsqlca ifx_htmltbl_result ifx_nullformat ifx_num_fields ifx_num_rows ifx_pconnect ifx_prepare ifx_query ifx_textasvarchar ifx_update_blob ifx_update_char ifxus_close_slob ifxus_create_slob ifxus_free_slob ifxus_open_slob ifxus_read_slob ifxus_seek_slob ifxus_tell_slob ifxus_write_slob contained +syn keyword phpFunctions exif_imagetype exif_read_data exif_thumbnail gd_info getimagesize image_type_to_mime_type image2wbmp imagealphablending imageantialias imagearc imagechar imagecharup imagecolorallocate imagecolorallocatealpha imagecolorat imagecolorclosest imagecolorclosestalpha imagecolorclosesthwb imagecolordeallocate imagecolorexact imagecolorexactalpha imagecolormatch imagecolorresolve imagecolorresolvealpha imagecolorset imagecolorsforindex imagecolorstotal imagecolortransparent imagecopy imagecopymerge imagecopymergegray imagecopyresampled imagecopyresized imagecreate imagecreatefromgd2 imagecreatefromgd2part imagecreatefromgd imagecreatefromgif imagecreatefromjpeg imagecreatefrompng imagecreatefromstring imagecreatefromwbmp imagecreatefromxbm imagecreatefromxpm imagecreatetruecolor imagedashedline imagedestroy imageellipse imagefill imagefilledarc imagefilledellipse imagefilledpolygon imagefilledrectangle imagefilltoborder imagefontheight imagefontwidth imageftbbox imagefttext imagegammacorrect imagegd2 imagegd imagegif imageinterlace imageistruecolor imagejpeg imageline imageloadfont imagepalettecopy imagepng imagepolygon imagepsbbox imagepscopyfont imagepsencodefont imagepsextendfont imagepsfreefont imagepsloadfont imagepsslantfont imagepstext imagerectangle imagerotate imagesavealpha imagesetbrush imagesetpixel imagesetstyle imagesetthickness imagesettile imagestring imagestringup imagesx imagesy imagetruecolortopalette imagettfbbox imagettftext imagetypes imagewbmp iptcembed iptcparse jpeg2wbmp png2wbmp read_exif_data contained +syn keyword phpFunctions imap_8bit imap_alerts imap_append imap_base64 imap_binary imap_body imap_bodystruct imap_check imap_clearflag_full imap_close imap_createmailbox imap_delete imap_deletemailbox imap_errors imap_expunge imap_fetch_overview imap_fetchbody imap_fetchheader imap_fetchstructure imap_get_quota imap_get_quotaroot imap_getacl imap_getmailboxes imap_getsubscribed imap_header imap_headerinfo imap_headers imap_last_error imap_list imap_listmailbox imap_listscan imap_listsubscribed imap_lsub imap_mail_compose imap_mail_copy imap_mail_move imap_mail imap_mailboxmsginfo imap_mime_header_decode imap_msgno imap_num_msg imap_num_recent imap_open imap_ping imap_qprint imap_renamemailbox imap_reopen imap_rfc822_parse_adrlist imap_rfc822_parse_headers imap_rfc822_write_address imap_scanmailbox imap_search imap_set_quota imap_setacl imap_setflag_full imap_sort imap_status imap_subscribe imap_thread imap_timeout imap_uid imap_undelete imap_unsubscribe imap_utf7_decode imap_utf7_encode imap_utf8 contained +syn keyword phpFunctions assert_options assert dl extension_loaded get_cfg_var get_current_user get_defined_constants get_extension_funcs get_include_path get_included_files get_loaded_extensions get_magic_quotes_gpc get_magic_quotes_runtime get_required_files getenv getlastmod getmygid getmyinode getmypid getmyuid getopt getrusage ini_alter ini_get_all ini_get ini_restore ini_set main memory_get_usage php_ini_scanned_files php_logo_guid php_sapi_name php_uname phpcredits phpinfo phpversion putenv restore_include_path set_include_path set_magic_quotes_runtime set_time_limit version_compare zend_logo_guid zend_version contained +syn keyword phpFunctions ingres_autocommit ingres_close ingres_commit ingres_connect ingres_fetch_array ingres_fetch_object ingres_fetch_row ingres_field_length ingres_field_name ingres_field_nullable ingres_field_precision ingres_field_scale ingres_field_type ingres_num_fields ingres_num_rows ingres_pconnect ingres_query ingres_rollback contained +syn keyword phpFunctions ircg_channel_mode ircg_disconnect ircg_fetch_error_msg ircg_get_username ircg_html_encode ircg_ignore_add ircg_ignore_del ircg_is_conn_alive ircg_join ircg_kick ircg_lookup_format_messages ircg_msg ircg_nick ircg_nickname_escape ircg_nickname_unescape ircg_notice ircg_part ircg_pconnect ircg_register_format_messages ircg_set_current ircg_set_file ircg_set_on_die ircg_topic ircg_whois contained +syn keyword phpFunctions java_last_exception_clear java_last_exception_get contained +syn keyword phpFunctions ldap_8859_to_t61 ldap_add ldap_bind ldap_close ldap_compare ldap_connect ldap_count_entries ldap_delete ldap_dn2ufn ldap_err2str ldap_errno ldap_error ldap_explode_dn ldap_first_attribute ldap_first_entry ldap_first_reference ldap_free_result ldap_get_attributes ldap_get_dn ldap_get_entries ldap_get_option ldap_get_values_len ldap_get_values ldap_list ldap_mod_add ldap_mod_del ldap_mod_replace ldap_modify ldap_next_attribute ldap_next_entry ldap_next_reference ldap_parse_reference ldap_parse_result ldap_read ldap_rename ldap_search ldap_set_option ldap_set_rebind_proc ldap_sort ldap_start_tls ldap_t61_to_8859 ldap_unbind contained +syn keyword phpFunctions lzf_compress lzf_decompress lzf_optimized_for contained +syn keyword phpFunctions ezmlm_hash mail contained +syn keyword phpFunctions mailparse_determine_best_xfer_encoding mailparse_msg_create mailparse_msg_extract_part_file mailparse_msg_extract_part mailparse_msg_free mailparse_msg_get_part_data mailparse_msg_get_part mailparse_msg_get_structure mailparse_msg_parse_file mailparse_msg_parse mailparse_rfc822_parse_addresses mailparse_stream_encode mailparse_uudecode_all contained +syn keyword phpFunctions abs acos acosh asin asinh atan2 atan atanh base_convert bindec ceil cos cosh decbin dechex decoct deg2rad exp expm1 floor fmod getrandmax hexdec hypot is_finite is_infinite is_nan lcg_value log10 log1p log max min mt_getrandmax mt_rand mt_srand octdec pi pow rad2deg rand round sin sinh sqrt srand tan tanh contained +syn keyword phpFunctions mb_convert_case mb_convert_encoding mb_convert_kana mb_convert_variables mb_decode_mimeheader mb_decode_numericentity mb_detect_encoding mb_detect_order mb_encode_mimeheader mb_encode_numericentity mb_ereg_match mb_ereg_replace mb_ereg_search_getpos mb_ereg_search_getregs mb_ereg_search_init mb_ereg_search_pos mb_ereg_search_regs mb_ereg_search_setpos mb_ereg_search mb_ereg mb_eregi_replace mb_eregi mb_get_info mb_http_input mb_http_output mb_internal_encoding mb_language mb_output_handler mb_parse_str mb_preferred_mime_name mb_regex_encoding mb_regex_set_options mb_send_mail mb_split mb_strcut mb_strimwidth mb_strlen mb_strpos mb_strrpos mb_strtolower mb_strtoupper mb_strwidth mb_substitute_character mb_substr_count mb_substr contained +syn keyword phpFunctions mcal_append_event mcal_close mcal_create_calendar mcal_date_compare mcal_date_valid mcal_day_of_week mcal_day_of_year mcal_days_in_month mcal_delete_calendar mcal_delete_event mcal_event_add_attribute mcal_event_init mcal_event_set_alarm mcal_event_set_category mcal_event_set_class mcal_event_set_description mcal_event_set_end mcal_event_set_recur_daily mcal_event_set_recur_monthly_mday mcal_event_set_recur_monthly_wday mcal_event_set_recur_none mcal_event_set_recur_weekly mcal_event_set_recur_yearly mcal_event_set_start mcal_event_set_title mcal_expunge mcal_fetch_current_stream_event mcal_fetch_event mcal_is_leap_year mcal_list_alarms mcal_list_events mcal_next_recurrence mcal_open mcal_popen mcal_rename_calendar mcal_reopen mcal_snooze mcal_store_event mcal_time_valid mcal_week_of_year contained +syn keyword phpFunctions mcrypt_cbc mcrypt_cfb mcrypt_create_iv mcrypt_decrypt mcrypt_ecb mcrypt_enc_get_algorithms_name mcrypt_enc_get_block_size mcrypt_enc_get_iv_size mcrypt_enc_get_key_size mcrypt_enc_get_modes_name mcrypt_enc_get_supported_key_sizes mcrypt_enc_is_block_algorithm_mode mcrypt_enc_is_block_algorithm mcrypt_enc_is_block_mode mcrypt_enc_self_test mcrypt_encrypt mcrypt_generic_deinit mcrypt_generic_end mcrypt_generic_init mcrypt_generic mcrypt_get_block_size mcrypt_get_cipher_name mcrypt_get_iv_size mcrypt_get_key_size mcrypt_list_algorithms mcrypt_list_modes mcrypt_module_close mcrypt_module_get_algo_block_size mcrypt_module_get_algo_key_size mcrypt_module_get_supported_key_sizes mcrypt_module_is_block_algorithm_mode mcrypt_module_is_block_algorithm mcrypt_module_is_block_mode mcrypt_module_open mcrypt_module_self_test mcrypt_ofb mdecrypt_generic contained +syn keyword phpFunctions mcve_adduser mcve_adduserarg mcve_bt mcve_checkstatus mcve_chkpwd mcve_chngpwd mcve_completeauthorizations mcve_connect mcve_connectionerror mcve_deleteresponse mcve_deletetrans mcve_deleteusersetup mcve_deluser mcve_destroyconn mcve_destroyengine mcve_disableuser mcve_edituser mcve_enableuser mcve_force mcve_getcell mcve_getcellbynum mcve_getcommadelimited mcve_getheader mcve_getuserarg mcve_getuserparam mcve_gft mcve_gl mcve_gut mcve_initconn mcve_initengine mcve_initusersetup mcve_iscommadelimited mcve_liststats mcve_listusers mcve_maxconntimeout mcve_monitor mcve_numcolumns mcve_numrows mcve_override mcve_parsecommadelimited mcve_ping mcve_preauth mcve_preauthcompletion mcve_qc mcve_responseparam mcve_return mcve_returncode mcve_returnstatus mcve_sale mcve_setblocking mcve_setdropfile mcve_setip mcve_setssl_files mcve_setssl mcve_settimeout mcve_settle mcve_text_avs mcve_text_code mcve_text_cv mcve_transactionauth mcve_transactionavs mcve_transactionbatch mcve_transactioncv mcve_transactionid mcve_transactionitem mcve_transactionssent mcve_transactiontext mcve_transinqueue mcve_transnew mcve_transparam mcve_transsend mcve_ub mcve_uwait mcve_verifyconnection mcve_verifysslcert mcve_void contained +syn keyword phpFunctions mhash_count mhash_get_block_size mhash_get_hash_name mhash_keygen_s2k mhash contained +syn keyword phpFunctions mime_content_type contained +syn keyword phpFunctions ming_setcubicthreshold ming_setscale ming_useswfversion SWFAction SWFBitmap swfbutton_keypress SWFbutton SWFDisplayItem SWFFill SWFFont SWFGradient SWFMorph SWFMovie SWFShape SWFSprite SWFText SWFTextField contained +syn keyword phpMethods getHeight getWidth addAction addShape setAction setdown setHit setOver setUp addColor move moveTo multColor remove Rotate rotateTo scale scaleTo setDepth setName setRatio skewX skewXTo skewY skewYTo moveTo rotateTo scaleTo skewXTo skewYTo getwidth addEntry getshape1 getshape2 add nextframe output remove save setbackground setdimension setframes setrate streammp3 addFill drawCurve drawCurveTo drawLine drawLineTo movePen movePenTo setLeftFill setLine setRightFill add nextframe remove setframes addString getWidth moveTo setColor setFont setHeight setSpacing addstring align setbounds setcolor setFont setHeight setindentation setLeftMargin setLineSpacing setMargins setname setrightMargin contained +syn keyword phpFunctions connection_aborted connection_status connection_timeout constant define defined die eval exit get_browser highlight_file highlight_string ignore_user_abort pack show_source sleep uniqid unpack usleep contained +syn keyword phpFunctions udm_add_search_limit udm_alloc_agent udm_api_version udm_cat_list udm_cat_path udm_check_charset udm_check_stored udm_clear_search_limits udm_close_stored udm_crc32 udm_errno udm_error udm_find udm_free_agent udm_free_ispell_data udm_free_res udm_get_doc_count udm_get_res_field udm_get_res_param udm_load_ispell_data udm_open_stored udm_set_agent_param contained +syn keyword phpFunctions msession_connect msession_count msession_create msession_destroy msession_disconnect msession_find msession_get_array msession_get msession_getdata msession_inc msession_list msession_listvar msession_lock msession_plugin msession_randstr msession_set_array msession_set msession_setdata msession_timeout msession_uniq msession_unlock contained +syn keyword phpFunctions msql_affected_rows msql_close msql_connect msql_create_db msql_createdb msql_data_seek msql_dbname msql_drop_db msql_dropdb msql_error msql_fetch_array msql_fetch_field msql_fetch_object msql_fetch_row msql_field_seek msql_fieldflags msql_fieldlen msql_fieldname msql_fieldtable msql_fieldtype msql_free_result msql_freeresult msql_list_dbs msql_list_fields msql_list_tables msql_listdbs msql_listfields msql_listtables msql_num_fields msql_num_rows msql_numfields msql_numrows msql_pconnect msql_query msql_regcase msql_result msql_select_db msql_selectdb msql_tablename msql contained +syn keyword phpFunctions mssql_bind mssql_close mssql_connect mssql_data_seek mssql_execute mssql_fetch_array mssql_fetch_assoc mssql_fetch_batch mssql_fetch_field mssql_fetch_object mssql_fetch_row mssql_field_length mssql_field_name mssql_field_seek mssql_field_type mssql_free_result mssql_free_statement mssql_get_last_message mssql_guid_string mssql_init mssql_min_error_severity mssql_min_message_severity mssql_next_result mssql_num_fields mssql_num_rows mssql_pconnect mssql_query mssql_result mssql_rows_affected mssql_select_db contained +syn keyword phpFunctions muscat_close muscat_get muscat_give muscat_setup_net muscat_setup contained +syn keyword phpFunctions mysql_affected_rows mysql_change_user mysql_client_encoding mysql_close mysql_connect mysql_create_db mysql_data_seek mysql_db_name mysql_db_query mysql_drop_db mysql_errno mysql_error mysql_escape_string mysql_fetch_array mysql_fetch_assoc mysql_fetch_field mysql_fetch_lengths mysql_fetch_object mysql_fetch_row mysql_field_flags mysql_field_len mysql_field_name mysql_field_seek mysql_field_table mysql_field_type mysql_free_result mysql_get_client_info mysql_get_host_info mysql_get_proto_info mysql_get_server_info mysql_info mysql_insert_id mysql_list_dbs mysql_list_fields mysql_list_processes mysql_list_tables mysql_num_fields mysql_num_rows mysql_pconnect mysql_ping mysql_query mysql_real_escape_string mysql_result mysql_select_db mysql_stat mysql_tablename mysql_thread_id mysql_unbuffered_query contained +syn keyword phpFunctions mysqli_affected_rows mysqli_autocommit mysqli_bind_param mysqli_bind_result mysqli_change_user mysqli_character_set_name mysqli_close mysqli_commit mysqli_connect mysqli_data_seek mysqli_debug mysqli_disable_reads_from_master mysqli_disable_rpl_parse mysqli_dump_debug_info mysqli_enable_reads_from_master mysqli_enable_rpl_parse mysqli_errno mysqli_error mysqli_execute mysqli_fetch_array mysqli_fetch_assoc mysqli_fetch_field_direct mysqli_fetch_field mysqli_fetch_fields mysqli_fetch_lengths mysqli_fetch_object mysqli_fetch_row mysqli_fetch mysqli_field_count mysqli_field_seek mysqli_field_tell mysqli_free_result mysqli_get_client_info mysqli_get_host_info mysqli_get_proto_info mysqli_get_server_info mysqli_get_server_version mysqli_info mysqli_init mysqli_insert_id mysqli_kill mysqli_master_query mysqli_num_fields mysqli_num_rows mysqli_options mysqli_param_count mysqli_ping mysqli_prepare_result mysqli_prepare mysqli_profiler mysqli_query mysqli_read_query_result mysqli_real_connect mysqli_real_escape_string mysqli_real_query mysqli_reload mysqli_rollback mysqli_rpl_parse_enabled mysqli_rpl_probe mysqli_rpl_query_type mysqli_select_db mysqli_send_long_data mysqli_send_query mysqli_slave_query mysqli_ssl_set mysqli_stat mysqli_stmt_affected_rows mysqli_stmt_close mysqli_stmt_errno mysqli_stmt_error mysqli_stmt_store_result mysqli_store_result mysqli_thread_id mysqli_thread_safe mysqli_use_result mysqli_warning_count contained +syn keyword phpFunctions ncurses_addch ncurses_addchnstr ncurses_addchstr ncurses_addnstr ncurses_addstr ncurses_assume_default_colors ncurses_attroff ncurses_attron ncurses_attrset ncurses_baudrate ncurses_beep ncurses_bkgd ncurses_bkgdset ncurses_border ncurses_bottom_panel ncurses_can_change_color ncurses_cbreak ncurses_clear ncurses_clrtobot ncurses_clrtoeol ncurses_color_content ncurses_color_set ncurses_curs_set ncurses_def_prog_mode ncurses_def_shell_mode ncurses_define_key ncurses_del_panel ncurses_delay_output ncurses_delch ncurses_deleteln ncurses_delwin ncurses_doupdate ncurses_echo ncurses_echochar ncurses_end ncurses_erase ncurses_erasechar ncurses_filter ncurses_flash ncurses_flushinp ncurses_getch ncurses_getmaxyx ncurses_getmouse ncurses_getyx ncurses_halfdelay ncurses_has_colors ncurses_has_ic ncurses_has_il ncurses_has_key ncurses_hide_panel ncurses_hline ncurses_inch ncurses_init_color ncurses_init_pair ncurses_init ncurses_insch ncurses_insdelln ncurses_insertln ncurses_insstr ncurses_instr ncurses_isendwin ncurses_keyok ncurses_keypad ncurses_killchar ncurses_longname ncurses_meta ncurses_mouse_trafo ncurses_mouseinterval ncurses_mousemask ncurses_move_panel ncurses_move ncurses_mvaddch ncurses_mvaddchnstr ncurses_mvaddchstr ncurses_mvaddnstr ncurses_mvaddstr ncurses_mvcur ncurses_mvdelch ncurses_mvgetch ncurses_mvhline ncurses_mvinch ncurses_mvvline ncurses_mvwaddstr ncurses_napms ncurses_new_panel ncurses_newpad ncurses_newwin ncurses_nl ncurses_nocbreak ncurses_noecho ncurses_nonl ncurses_noqiflush ncurses_noraw ncurses_pair_content ncurses_panel_above ncurses_panel_below ncurses_panel_window ncurses_pnoutrefresh ncurses_prefresh ncurses_putp ncurses_qiflush ncurses_raw ncurses_refresh ncurses_replace_panel ncurses_reset_prog_mode ncurses_reset_shell_mode ncurses_resetty ncurses_savetty ncurses_scr_dump ncurses_scr_init ncurses_scr_restore ncurses_scr_set ncurses_scrl ncurses_show_panel ncurses_slk_attr ncurses_slk_attroff ncurses_slk_attron ncurses_slk_attrset ncurses_slk_clear ncurses_slk_color ncurses_slk_init ncurses_slk_noutrefresh ncurses_slk_refresh ncurses_slk_restore ncurses_slk_set ncurses_slk_touch ncurses_standend ncurses_standout ncurses_start_color ncurses_termattrs ncurses_termname ncurses_timeout ncurses_top_panel ncurses_typeahead ncurses_ungetch ncurses_ungetmouse ncurses_update_panels ncurses_use_default_colors ncurses_use_env ncurses_use_extended_names ncurses_vidattr ncurses_vline ncurses_waddch ncurses_waddstr ncurses_wattroff ncurses_wattron ncurses_wattrset ncurses_wborder ncurses_wclear ncurses_wcolor_set ncurses_werase ncurses_wgetch ncurses_whline ncurses_wmouse_trafo ncurses_wmove ncurses_wnoutrefresh ncurses_wrefresh ncurses_wstandend ncurses_wstandout ncurses_wvline contained +syn keyword phpFunctions checkdnsrr closelog debugger_off debugger_on define_syslog_variables dns_check_record dns_get_mx dns_get_record fsockopen gethostbyaddr gethostbyname gethostbynamel getmxrr getprotobyname getprotobynumber getservbyname getservbyport ip2long long2ip openlog pfsockopen socket_get_status socket_set_blocking socket_set_timeout syslog contained +syn keyword phpFunctions yp_all yp_cat yp_err_string yp_errno yp_first yp_get_default_domain yp_master yp_match yp_next yp_order contained +syn keyword phpFunctions notes_body notes_copy_db notes_create_db notes_create_note notes_drop_db notes_find_note notes_header_info notes_list_msgs notes_mark_read notes_mark_unread notes_nav_create notes_search notes_unread notes_version contained +syn keyword phpFunctions nsapi_request_headers nsapi_response_headers nsapi_virtual contained +syn keyword phpFunctions aggregate_info aggregate_methods_by_list aggregate_methods_by_regexp aggregate_methods aggregate_properties_by_list aggregate_properties_by_regexp aggregate_properties aggregate aggregation_info deaggregate contained +syn keyword phpFunctions ocibindbyname ocicancel ocicloselob ocicollappend ocicollassign ocicollassignelem ocicollgetelem ocicollmax ocicollsize ocicolltrim ocicolumnisnull ocicolumnname ocicolumnprecision ocicolumnscale ocicolumnsize ocicolumntype ocicolumntyperaw ocicommit ocidefinebyname ocierror ociexecute ocifetch ocifetchinto ocifetchstatement ocifreecollection ocifreecursor ocifreedesc ocifreestatement ociinternaldebug ociloadlob ocilogoff ocilogon ocinewcollection ocinewcursor ocinewdescriptor ocinlogon ocinumcols ociparse ociplogon ociresult ocirollback ocirowcount ocisavelob ocisavelobfile ociserverversion ocisetprefetch ocistatementtype ociwritelobtofile ociwritetemporarylob contained +syn keyword phpFunctions odbc_autocommit odbc_binmode odbc_close_all odbc_close odbc_columnprivileges odbc_columns odbc_commit odbc_connect odbc_cursor odbc_data_source odbc_do odbc_error odbc_errormsg odbc_exec odbc_execute odbc_fetch_array odbc_fetch_into odbc_fetch_object odbc_fetch_row odbc_field_len odbc_field_name odbc_field_num odbc_field_precision odbc_field_scale odbc_field_type odbc_foreignkeys odbc_free_result odbc_gettypeinfo odbc_longreadlen odbc_next_result odbc_num_fields odbc_num_rows odbc_pconnect odbc_prepare odbc_primarykeys odbc_procedurecolumns odbc_procedures odbc_result_all odbc_result odbc_rollback odbc_setoption odbc_specialcolumns odbc_statistics odbc_tableprivileges odbc_tables contained +syn keyword phpFunctions openssl_csr_export_to_file openssl_csr_export openssl_csr_new openssl_csr_sign openssl_error_string openssl_free_key openssl_get_privatekey openssl_get_publickey openssl_open openssl_pkcs7_decrypt openssl_pkcs7_encrypt openssl_pkcs7_sign openssl_pkcs7_verify openssl_pkey_export_to_file openssl_pkey_export openssl_pkey_get_private openssl_pkey_get_public openssl_pkey_new openssl_private_decrypt openssl_private_encrypt openssl_public_decrypt openssl_public_encrypt openssl_seal openssl_sign openssl_verify openssl_x509_check_private_key openssl_x509_checkpurpose openssl_x509_export_to_file openssl_x509_export openssl_x509_free openssl_x509_parse openssl_x509_read contained +syn keyword phpFunctions ora_bind ora_close ora_columnname ora_columnsize ora_columntype ora_commit ora_commitoff ora_commiton ora_do ora_error ora_errorcode ora_exec ora_fetch_into ora_fetch ora_getcolumn ora_logoff ora_logon ora_numcols ora_numrows ora_open ora_parse ora_plogon ora_rollback contained +syn keyword phpFunctions flush ob_clean ob_end_clean ob_end_flush ob_flush ob_get_clean ob_get_contents ob_get_flush ob_get_length ob_get_level ob_get_status ob_gzhandler ob_implicit_flush ob_list_handlers ob_start output_add_rewrite_var output_reset_rewrite_vars contained +syn keyword phpFunctions overload contained +syn keyword phpFunctions ovrimos_close ovrimos_commit ovrimos_connect ovrimos_cursor ovrimos_exec ovrimos_execute ovrimos_fetch_into ovrimos_fetch_row ovrimos_field_len ovrimos_field_name ovrimos_field_num ovrimos_field_type ovrimos_free_result ovrimos_longreadlen ovrimos_num_fields ovrimos_num_rows ovrimos_prepare ovrimos_result_all ovrimos_result ovrimos_rollback contained +syn keyword phpFunctions pcntl_exec pcntl_fork pcntl_signal pcntl_waitpid pcntl_wexitstatus pcntl_wifexited pcntl_wifsignaled pcntl_wifstopped pcntl_wstopsig pcntl_wtermsig contained +syn keyword phpFunctions preg_grep preg_match_all preg_match preg_quote preg_replace_callback preg_replace preg_split contained +syn keyword phpFunctions pdf_add_annotation pdf_add_bookmark pdf_add_launchlink pdf_add_locallink pdf_add_note pdf_add_outline pdf_add_pdflink pdf_add_thumbnail pdf_add_weblink pdf_arc pdf_arcn pdf_attach_file pdf_begin_page pdf_begin_pattern pdf_begin_template pdf_circle pdf_clip pdf_close_image pdf_close_pdi_page pdf_close_pdi pdf_close pdf_closepath_fill_stroke pdf_closepath_stroke pdf_closepath pdf_concat pdf_continue_text pdf_curveto pdf_delete pdf_end_page pdf_end_pattern pdf_end_template pdf_endpath pdf_fill_stroke pdf_fill pdf_findfont pdf_get_buffer pdf_get_font pdf_get_fontname pdf_get_fontsize pdf_get_image_height pdf_get_image_width pdf_get_majorversion pdf_get_minorversion pdf_get_parameter pdf_get_pdi_parameter pdf_get_pdi_value pdf_get_value pdf_initgraphics pdf_lineto pdf_makespotcolor pdf_moveto pdf_new pdf_open_CCITT pdf_open_file pdf_open_gif pdf_open_image_file pdf_open_image pdf_open_jpeg pdf_open_memory_image pdf_open_pdi_page pdf_open_pdi pdf_open_png pdf_open_tiff pdf_open pdf_place_image pdf_place_pdi_page pdf_rect pdf_restore pdf_rotate pdf_save pdf_scale pdf_set_border_color pdf_set_border_dash pdf_set_border_style pdf_set_char_spacing pdf_set_duration pdf_set_font pdf_set_horiz_scaling pdf_set_info_author pdf_set_info_creator pdf_set_info_keywords pdf_set_info_subject pdf_set_info_title pdf_set_info pdf_set_leading pdf_set_parameter pdf_set_text_matrix pdf_set_text_pos pdf_set_text_rendering pdf_set_text_rise pdf_set_value pdf_set_word_spacing pdf_setcolor pdf_setdash pdf_setflat pdf_setfont pdf_setgray_fill pdf_setgray_stroke pdf_setgray pdf_setlinecap pdf_setlinejoin pdf_setlinewidth pdf_setmatrix pdf_setmiterlimit pdf_setpolydash pdf_setrgbcolor_fill pdf_setrgbcolor_stroke pdf_setrgbcolor pdf_show_boxed pdf_show_xy pdf_show pdf_skew pdf_stringwidth pdf_stroke pdf_translate contained +syn keyword phpFunctions pfpro_cleanup pfpro_init pfpro_process_raw pfpro_process pfpro_version contained +syn keyword phpFunctions pg_affected_rows pg_cancel_query pg_client_encoding pg_close pg_connect pg_connection_busy pg_connection_reset pg_connection_status pg_convert pg_copy_from pg_copy_to pg_dbname pg_delete pg_end_copy pg_escape_bytea pg_escape_string pg_fetch_all pg_fetch_array pg_fetch_assoc pg_fetch_object pg_fetch_result pg_fetch_row pg_field_is_null pg_field_name pg_field_num pg_field_prtlen pg_field_size pg_field_type pg_free_result pg_get_notify pg_get_pid pg_get_result pg_host pg_insert pg_last_error pg_last_notice pg_last_oid pg_lo_close pg_lo_create pg_lo_export pg_lo_import pg_lo_open pg_lo_read_all pg_lo_read pg_lo_seek pg_lo_tell pg_lo_unlink pg_lo_write pg_meta_data pg_num_fields pg_num_rows pg_options pg_pconnect pg_ping pg_port pg_put_line pg_query pg_result_error pg_result_seek pg_result_status pg_select pg_send_query pg_set_client_encoding pg_trace pg_tty pg_unescape_bytea pg_untrace pg_update contained +syn keyword phpFunctions posix_ctermid posix_get_last_error posix_getcwd posix_getegid posix_geteuid posix_getgid posix_getgrgid posix_getgrnam posix_getgroups posix_getlogin posix_getpgid posix_getpgrp posix_getpid posix_getppid posix_getpwnam posix_getpwuid posix_getrlimit posix_getsid posix_getuid posix_isatty posix_kill posix_mkfifo posix_setegid posix_seteuid posix_setgid posix_setpgid posix_setsid posix_setuid posix_strerror posix_times posix_ttyname posix_uname contained +syn keyword phpFunctions printer_abort printer_close printer_create_brush printer_create_dc printer_create_font printer_create_pen printer_delete_brush printer_delete_dc printer_delete_font printer_delete_pen printer_draw_bmp printer_draw_chord printer_draw_elipse printer_draw_line printer_draw_pie printer_draw_rectangle printer_draw_roundrect printer_draw_text printer_end_doc printer_end_page printer_get_option printer_list printer_logical_fontheight printer_open printer_select_brush printer_select_font printer_select_pen printer_set_option printer_start_doc printer_start_page printer_write contained +syn keyword phpFunctions pspell_add_to_personal pspell_add_to_session pspell_check pspell_clear_session pspell_config_create pspell_config_ignore pspell_config_mode pspell_config_personal pspell_config_repl pspell_config_runtogether pspell_config_save_repl pspell_new_config pspell_new_personal pspell_new pspell_save_wordlist pspell_store_replacement pspell_suggest contained +syn keyword phpFunctions qdom_error qdom_tree contained +syn keyword phpFunctions readline_add_history readline_clear_history readline_completion_function readline_info readline_list_history readline_read_history readline_write_history readline contained +syn keyword phpFunctions recode_file recode_string recode contained +syn keyword phpFunctions ereg_replace ereg eregi_replace eregi split spliti sql_regcase contained +syn keyword phpFunctions ftok msg_get_queue msg_receive msg_remove_queue msg_send msg_set_queue msg_stat_queue sem_acquire sem_get sem_release sem_remove shm_attach shm_detach shm_get_var shm_put_var shm_remove_var shm_remove contained +syn keyword phpFunctions sesam_affected_rows sesam_commit sesam_connect sesam_diagnostic sesam_disconnect sesam_errormsg sesam_execimm sesam_fetch_array sesam_fetch_result sesam_fetch_row sesam_field_array sesam_field_name sesam_free_result sesam_num_fields sesam_query sesam_rollback sesam_seek_row sesam_settransaction contained +syn keyword phpFunctions session_cache_expire session_cache_limiter session_decode session_destroy session_encode session_get_cookie_params session_id session_is_registered session_module_name session_name session_regenerate_id session_register session_save_path session_set_cookie_params session_set_save_handler session_start session_unregister session_unset session_write_close contained +syn keyword phpFunctions shmop_close shmop_delete shmop_open shmop_read shmop_size shmop_write contained +syn keyword phpFunctions snmp_get_quick_print snmp_set_quick_print snmpget snmprealwalk snmpset snmpwalk snmpwalkoid contained +syn keyword phpFunctions socket_accept socket_bind socket_clear_error socket_close socket_connect socket_create_listen socket_create_pair socket_create socket_get_option socket_getpeername socket_getsockname socket_iovec_add socket_iovec_alloc socket_iovec_delete socket_iovec_fetch socket_iovec_free socket_iovec_set socket_last_error socket_listen socket_read socket_readv socket_recv socket_recvfrom socket_recvmsg socket_select socket_send socket_sendmsg socket_sendto socket_set_block socket_set_nonblock socket_set_option socket_shutdown socket_strerror socket_write socket_writev contained +syn keyword phpFunctions sqlite_array_query sqlite_busy_timeout sqlite_changes sqlite_close sqlite_column sqlite_create_aggregate sqlite_create_function sqlite_current sqlite_error_string sqlite_escape_string sqlite_fetch_array sqlite_fetch_single sqlite_fetch_string sqlite_field_name sqlite_has_more sqlite_last_error sqlite_last_insert_rowid sqlite_libencoding sqlite_libversion sqlite_next sqlite_num_fields sqlite_num_rows sqlite_open sqlite_popen sqlite_query sqlite_rewind sqlite_seek sqlite_udf_decode_binary sqlite_udf_encode_binary sqlite_unbuffered_query contained +syn keyword phpFunctions stream_context_create stream_context_get_options stream_context_set_option stream_context_set_params stream_copy_to_stream stream_filter_append stream_filter_prepend stream_filter_register stream_get_contents stream_get_filters stream_get_line stream_get_meta_data stream_get_transports stream_get_wrappers stream_register_wrapper stream_select stream_set_blocking stream_set_timeout stream_set_write_buffer stream_socket_accept stream_socket_client stream_socket_get_name stream_socket_recvfrom stream_socket_sendto stream_socket_server stream_wrapper_register contained +syn keyword phpFunctions addcslashes addslashes bin2hex chop chr chunk_split convert_cyr_string count_chars crc32 crypt explode fprintf get_html_translation_table hebrev hebrevc html_entity_decode htmlentities htmlspecialchars implode join levenshtein localeconv ltrim md5_file md5 metaphone money_format nl_langinfo nl2br number_format ord parse_str print printf quoted_printable_decode quotemeta rtrim setlocale sha1_file sha1 similar_text soundex sprintf sscanf str_ireplace str_pad str_repeat str_replace str_rot13 str_shuffle str_split str_word_count strcasecmp strchr strcmp strcoll strcspn strip_tags stripcslashes stripos stripslashes stristr strlen strnatcasecmp strnatcmp strncasecmp strncmp strpos strrchr strrev strripos strrpos strspn strstr strtok strtolower strtoupper strtr substr_compare substr_count substr_replace substr trim ucfirst ucwords vprintf vsprintf wordwrap contained +syn keyword phpFunctions swf_actiongeturl swf_actiongotoframe swf_actiongotolabel swf_actionnextframe swf_actionplay swf_actionprevframe swf_actionsettarget swf_actionstop swf_actiontogglequality swf_actionwaitforframe swf_addbuttonrecord swf_addcolor swf_closefile swf_definebitmap swf_definefont swf_defineline swf_definepoly swf_definerect swf_definetext swf_endbutton swf_enddoaction swf_endshape swf_endsymbol swf_fontsize swf_fontslant swf_fonttracking swf_getbitmapinfo swf_getfontinfo swf_getframe swf_labelframe swf_lookat swf_modifyobject swf_mulcolor swf_nextid swf_oncondition swf_openfile swf_ortho2 swf_ortho swf_perspective swf_placeobject swf_polarview swf_popmatrix swf_posround swf_pushmatrix swf_removeobject swf_rotate swf_scale swf_setfont swf_setframe swf_shapearc swf_shapecurveto3 swf_shapecurveto swf_shapefillbitmapclip swf_shapefillbitmaptile swf_shapefilloff swf_shapefillsolid swf_shapelinesolid swf_shapelineto swf_shapemoveto swf_showframe swf_startbutton swf_startdoaction swf_startshape swf_startsymbol swf_textwidth swf_translate swf_viewport contained +syn keyword phpFunctions sybase_affected_rows sybase_close sybase_connect sybase_data_seek sybase_deadlock_retry_count sybase_fetch_array sybase_fetch_assoc sybase_fetch_field sybase_fetch_object sybase_fetch_row sybase_field_seek sybase_free_result sybase_get_last_message sybase_min_client_severity sybase_min_error_severity sybase_min_message_severity sybase_min_server_severity sybase_num_fields sybase_num_rows sybase_pconnect sybase_query sybase_result sybase_select_db sybase_set_message_handler sybase_unbuffered_query contained +syn keyword phpFunctions tidy_access_count tidy_clean_repair tidy_config_count tidy_diagnose tidy_error_count tidy_get_body tidy_get_config tidy_get_error_buffer tidy_get_head tidy_get_html_ver tidy_get_html tidy_get_output tidy_get_release tidy_get_root tidy_get_status tidy_getopt tidy_is_xhtml tidy_load_config tidy_parse_file tidy_parse_string tidy_repair_file tidy_repair_string tidy_reset_config tidy_save_config tidy_set_encoding tidy_setopt tidy_warning_count contained +syn keyword phpMethods attributes children get_attr get_nodes has_children has_siblings is_asp is_comment is_html is_jsp is_jste is_text is_xhtml is_xml next prev tidy_node contained +syn keyword phpFunctions token_get_all token_name contained +syn keyword phpFunctions base64_decode base64_encode get_meta_tags http_build_query parse_url rawurldecode rawurlencode urldecode urlencode contained +syn keyword phpFunctions doubleval empty floatval get_defined_vars get_resource_type gettype import_request_variables intval is_array is_bool is_callable is_double is_float is_int is_integer is_long is_null is_numeric is_object is_real is_resource is_scalar is_string isset print_r serialize settype strval unserialize unset var_dump var_export contained +syn keyword phpFunctions vpopmail_add_alias_domain_ex vpopmail_add_alias_domain vpopmail_add_domain_ex vpopmail_add_domain vpopmail_add_user vpopmail_alias_add vpopmail_alias_del_domain vpopmail_alias_del vpopmail_alias_get_all vpopmail_alias_get vpopmail_auth_user vpopmail_del_domain_ex vpopmail_del_domain vpopmail_del_user vpopmail_error vpopmail_passwd vpopmail_set_user_quota contained +syn keyword phpFunctions w32api_deftype w32api_init_dtype w32api_invoke_function w32api_register_function w32api_set_call_method contained +syn keyword phpFunctions wddx_add_vars wddx_deserialize wddx_packet_end wddx_packet_start wddx_serialize_value wddx_serialize_vars contained +syn keyword phpFunctions utf8_decode utf8_encode xml_error_string xml_get_current_byte_index xml_get_current_column_number xml_get_current_line_number xml_get_error_code xml_parse_into_struct xml_parse xml_parser_create_ns xml_parser_create xml_parser_free xml_parser_get_option xml_parser_set_option xml_set_character_data_handler xml_set_default_handler xml_set_element_handler xml_set_end_namespace_decl_handler xml_set_external_entity_ref_handler xml_set_notation_decl_handler xml_set_object xml_set_processing_instruction_handler xml_set_start_namespace_decl_handler xml_set_unparsed_entity_decl_handler contained +syn keyword phpFunctions xmlrpc_decode_request xmlrpc_decode xmlrpc_encode_request xmlrpc_encode xmlrpc_get_type xmlrpc_parse_method_descriptions xmlrpc_server_add_introspection_data xmlrpc_server_call_method xmlrpc_server_create xmlrpc_server_destroy xmlrpc_server_register_introspection_callback xmlrpc_server_register_method xmlrpc_set_type contained +syn keyword phpFunctions xslt_create xslt_errno xslt_error xslt_free xslt_output_process xslt_set_base xslt_set_encoding xslt_set_error_handler xslt_set_log xslt_set_sax_handler xslt_set_sax_handlers xslt_set_scheme_handler xslt_set_scheme_handlers contained +syn keyword phpFunctions yaz_addinfo yaz_ccl_conf yaz_ccl_parse yaz_close yaz_connect yaz_database yaz_element yaz_errno yaz_error yaz_es_result yaz_get_option yaz_hits yaz_itemorder yaz_present yaz_range yaz_record yaz_scan_result yaz_scan yaz_schema yaz_search yaz_set_option yaz_sort yaz_syntax yaz_wait contained +syn keyword phpFunctions zip_close zip_entry_close zip_entry_compressedsize zip_entry_compressionmethod zip_entry_filesize zip_entry_name zip_entry_open zip_entry_read zip_open zip_read contained +syn keyword phpFunctions gzclose gzcompress gzdeflate gzencode gzeof gzfile gzgetc gzgets gzgetss gzinflate gzopen gzpassthru gzputs gzread gzrewind gzseek gztell gzuncompress gzwrite readgzfile zlib_get_coding_type contained if exists( "php_baselib" ) - syn keyword phpMethods query next_record num_rows affected_rows nf f p np num_fields haltmsg seek link_id query_id metadata table_names nextid connect halt free register unregister is_registered delete url purl self_url pself_url hidden_session add_query padd_query reimport_get_vars reimport_post_vars reimport_cookie_vars set_container set_tokenname release_token put_headers get_id get_id put_id freeze thaw gc reimport_any_vars start url purl login_if is_authenticated auth_preauth auth_loginform auth_validatelogin auth_refreshlogin auth_registerform auth_doregister start check have_perm permsum perm_invalid contained - syn keyword phpFunctions page_open page_close sess_load sess_save contained + syn keyword phpMethods query next_record num_rows affected_rows nf f p np num_fields haltmsg seek link_id query_id metadata table_names nextid connect halt free register unregister is_registered delete url purl self_url pself_url hidden_session add_query padd_query reimport_get_vars reimport_post_vars reimport_cookie_vars set_container set_tokenname release_token put_headers get_id get_id put_id freeze thaw gc reimport_any_vars start url purl login_if is_authenticated auth_preauth auth_loginform auth_validatelogin auth_refreshlogin auth_registerform auth_doregister start check have_perm permsum perm_invalid contained + syn keyword phpFunctions page_open page_close sess_load sess_save contained endif " Conditional -syn keyword phpConditional declare else enddeclare endswitch elseif endif if switch contained +syn keyword phpConditional declare else enddeclare endswitch elseif endif if switch contained " Repeat -syn keyword phpRepeat as do endfor endforeach endwhile for foreach while contained +syn keyword phpRepeat as do endfor endforeach endwhile for foreach while contained " Repeat -syn keyword phpLabel case default switch contained +syn keyword phpLabel case default switch contained " Statement -syn keyword phpStatement return break continue exit contained +syn keyword phpStatement return break continue exit contained " Keyword -syn keyword phpKeyword var const contained +syn keyword phpKeyword var const contained " Type -syn keyword phpType bool[ean] int[eger] real double float string array object NULL contained +syn keyword phpType bool[ean] int[eger] real double float string array object NULL contained " Structure -syn keyword phpStructure extends implements instanceof parent self contained +syn keyword phpStructure extends implements instanceof parent self contained " Operator -syn match phpOperator "[-=+%^&|*!.~?:]" contained display -syn match phpOperator "[-+*/%^&|.]=" contained display -syn match phpOperator "/[^*/]"me=e-1 contained display -syn match phpOperator "\$" contained display -syn match phpOperator "&&\|\" contained display -syn match phpOperator "||\|\" contained display -syn match phpRelation "[!=<>]=" contained display -syn match phpRelation "[<>]" contained display -syn match phpMemberSelector "->" contained display -syn match phpVarSelector "\$" contained display +syn match phpOperator "[-=+%^&|*!.~?:]" contained display +syn match phpOperator "[-+*/%^&|.]=" contained display +syn match phpOperator "/[^*/]"me=e-1 contained display +syn match phpOperator "\$" contained display +syn match phpOperator "&&\|\" contained display +syn match phpOperator "||\|\" contained display +syn match phpRelation "[!=<>]=" contained display +syn match phpRelation "[<>]" contained display +syn match phpMemberSelector "->" contained display +syn match phpVarSelector "\$" contained display " Identifier -syn match phpIdentifier "$\h\w*" contained contains=phpEnvVar,phpIntVar,phpVarSelector display -syn match phpIdentifierSimply "${\h\w*}" contains=phpOperator,phpParent contained display -syn region phpIdentifierComplex matchgroup=phpParent start="{\$"rs=e-1 end="}" contains=phpIdentifier,phpMemberSelector,phpVarSelector,phpIdentifierComplexP contained extend -syn region phpIdentifierComplexP matchgroup=phpParent start="\[" end="]" contains=@phpClInside contained +syn match phpIdentifier "$\h\w*" contained contains=phpEnvVar,phpIntVar,phpVarSelector display +syn match phpIdentifierSimply "${\h\w*}" contains=phpOperator,phpParent contained display +syn region phpIdentifierComplex matchgroup=phpParent start="{\$"rs=e-1 end="}" contains=phpIdentifier,phpMemberSelector,phpVarSelector,phpIdentifierComplexP contained extend +syn region phpIdentifierComplexP matchgroup=phpParent start="\[" end="]" contains=@phpClInside contained " Methoden -syn match phpMethodsVar "->\h\w*" contained contains=phpMethods,phpMemberSelector display +syn match phpMethodsVar "->\h\w*" contained contains=phpMethods,phpMemberSelector display " Include -syn keyword phpInclude include require include_once require_once contained +syn keyword phpInclude include require include_once require_once contained +" Peter Hodge - added 'clone' keyword " Define -syn keyword phpDefine new contained +syn keyword phpDefine new clone contained " Boolean -syn keyword phpBoolean true false contained +syn keyword phpBoolean true false contained " Number -syn match phpNumber "-\=\<\d\+\>" contained display -syn match phpNumber "\<0x\x\{1,8}\>" contained display +syn match phpNumber "-\=\<\d\+\>" contained display +syn match phpNumber "\<0x\x\{1,8}\>" contained display " Float -syn match phpFloat "\(-\=\<\d+\|-\=\)\.\d\+\>" contained display +syn match phpFloat "\(-\=\<\d+\|-\=\)\.\d\+\>" contained display " SpecialChar -syn match phpSpecialChar "\\[abcfnrtyv\\]" contained display -syn match phpSpecialChar "\\\d\{3}" contained contains=phpOctalError display -syn match phpSpecialChar "\\x\x\{2}" contained display +syn match phpSpecialChar "\\[abcfnrtyv\\]" contained display +syn match phpSpecialChar "\\\d\{3}" contained contains=phpOctalError display +syn match phpSpecialChar "\\x\x\{2}" contained display " Error -syn match phpOctalError "[89]" contained display +syn match phpOctalError "[89]" contained display if exists("php_parent_error_close") - syn match phpParentError "[)\]}]" contained display + syn match phpParentError "[)\]}]" contained display endif " Todo -syn keyword phpTodo todo fixme xxx contained +syn keyword phpTodo todo fixme xxx contained " Comment if exists("php_parent_error_open") - syn region phpComment start="/\*" end="\*/" contained contains=phpTodo + syn region phpComment start="/\*" end="\*/" contained contains=phpTodo else - syn region phpComment start="/\*" end="\*/" contained contains=phpTodo extend + syn region phpComment start="/\*" end="\*/" contained contains=phpTodo extend endif if version >= 600 - syn match phpComment "#.\{-}\(?>\|$\)\@=" contained contains=phpTodo - syn match phpComment "//.\{-}\(?>\|$\)\@=" contained contains=phpTodo + syn match phpComment "#.\{-}\(?>\|$\)\@=" contained contains=phpTodo + syn match phpComment "//.\{-}\(?>\|$\)\@=" contained contains=phpTodo else - syn match phpComment "#.\{-}$" contained contains=phpTodo - syn match phpComment "#.\{-}?>"me=e-2 contained contains=phpTodo - syn match phpComment "//.\{-}$" contained contains=phpTodo - syn match phpComment "//.\{-}?>"me=e-2 contained contains=phpTodo + syn match phpComment "#.\{-}$" contained contains=phpTodo + syn match phpComment "#.\{-}?>"me=e-2 contained contains=phpTodo + syn match phpComment "//.\{-}$" contained contains=phpTodo + syn match phpComment "//.\{-}?>"me=e-2 contained contains=phpTodo endif " String if exists("php_parent_error_open") - syn region phpStringDouble matchgroup=None start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=@phpAddStrings,phpIdentifier,phpSpecialChar,phpIdentifierSimply,phpIdentifierComplex contained keepend - syn region phpBacktick matchgroup=None start=+`+ skip=+\\\\\|\\"+ end=+`+ contains=@phpAddStrings,phpIdentifier,phpSpecialChar,phpIdentifierSimply,phpIdentifierComplex contained keepend - syn region phpStringSingle matchgroup=None start=+'+ skip=+\\\\\|\\'+ end=+'+ contains=@phpAddStrings contained keepend + syn region phpStringDouble matchgroup=None start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=@phpAddStrings,phpIdentifier,phpSpecialChar,phpIdentifierSimply,phpIdentifierComplex contained keepend + syn region phpBacktick matchgroup=None start=+`+ skip=+\\\\\|\\"+ end=+`+ contains=@phpAddStrings,phpIdentifier,phpSpecialChar,phpIdentifierSimply,phpIdentifierComplex contained keepend + syn region phpStringSingle matchgroup=None start=+'+ skip=+\\\\\|\\'+ end=+'+ contains=@phpAddStrings contained keepend else - syn region phpStringDouble matchgroup=None start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=@phpAddStrings,phpIdentifier,phpSpecialChar,phpIdentifierSimply,phpIdentifierComplex contained extend keepend - syn region phpBacktick matchgroup=None start=+`+ skip=+\\\\\|\\"+ end=+`+ contains=@phpAddStrings,phpIdentifier,phpSpecialChar,phpIdentifierSimply,phpIdentifierComplex contained extend keepend - syn region phpStringSingle matchgroup=None start=+'+ skip=+\\\\\|\\'+ end=+'+ contains=@phpAddStrings contained keepend extend + syn region phpStringDouble matchgroup=None start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=@phpAddStrings,phpIdentifier,phpSpecialChar,phpIdentifierSimply,phpIdentifierComplex contained extend keepend + syn region phpBacktick matchgroup=None start=+`+ skip=+\\\\\|\\"+ end=+`+ contains=@phpAddStrings,phpIdentifier,phpSpecialChar,phpIdentifierSimply,phpIdentifierComplex contained extend keepend + syn region phpStringSingle matchgroup=None start=+'+ skip=+\\\\\|\\'+ end=+'+ contains=@phpAddStrings contained keepend extend endif " HereDoc if version >= 600 syn case match - syn region phpHereDoc matchgroup=Delimiter start="\(<<<\)\@<=\z(\I\i*\)$" end="^\z1\(;\=$\)\@=" contained contains=phpIdentifier,phpIdentifierSimply,phpIdentifierComplex,phpSpecialChar,phpMethodsVar keepend extend + syn region phpHereDoc matchgroup=Delimiter start="\(<<<\)\@<=\z(\I\i*\)$" end="^\z1\(;\=$\)\@=" contained contains=phpIdentifier,phpIdentifierSimply,phpIdentifierComplex,phpSpecialChar,phpMethodsVar keepend extend " including HTML,JavaScript,SQL even if not enabled via options - syn region phpHereDoc matchgroup=Delimiter start="\(<<<\)\@<=\z(\(\I\i*\)\=\(html\)\c\(\i*\)\)$" end="^\z1\(;\=$\)\@=" contained contains=@htmlTop,phpIdentifier,phpIdentifierSimply,phpIdentifierComplex,phpSpecialChar,phpMethodsVar keepend extend - syn region phpHereDoc matchgroup=Delimiter start="\(<<<\)\@<=\z(\(\I\i*\)\=\(sql\)\c\(\i*\)\)$" end="^\z1\(;\=$\)\@=" contained contains=@sqlTop,phpIdentifier,phpIdentifierSimply,phpIdentifierComplex,phpSpecialChar,phpMethodsVar keepend extend - syn region phpHereDoc matchgroup=Delimiter start="\(<<<\)\@<=\z(\(\I\i*\)\=\(javascript\)\c\(\i*\)\)$" end="^\z1\(;\=$\)\@=" contained contains=@htmlJavascript,phpIdentifierSimply,phpIdentifier,phpIdentifierComplex,phpSpecialChar,phpMethodsVar keepend extend + syn region phpHereDoc matchgroup=Delimiter start="\(<<<\)\@<=\z(\(\I\i*\)\=\(html\)\c\(\i*\)\)$" end="^\z1\(;\=$\)\@=" contained contains=@htmlTop,phpIdentifier,phpIdentifierSimply,phpIdentifierComplex,phpSpecialChar,phpMethodsVar keepend extend + syn region phpHereDoc matchgroup=Delimiter start="\(<<<\)\@<=\z(\(\I\i*\)\=\(sql\)\c\(\i*\)\)$" end="^\z1\(;\=$\)\@=" contained contains=@sqlTop,phpIdentifier,phpIdentifierSimply,phpIdentifierComplex,phpSpecialChar,phpMethodsVar keepend extend + syn region phpHereDoc matchgroup=Delimiter start="\(<<<\)\@<=\z(\(\I\i*\)\=\(javascript\)\c\(\i*\)\)$" end="^\z1\(;\=$\)\@=" contained contains=@htmlJavascript,phpIdentifierSimply,phpIdentifier,phpIdentifierComplex,phpSpecialChar,phpMethodsVar keepend extend syn case ignore endif " Parent if exists("php_parent_error_close") || exists("php_parent_error_open") - syn match phpParent "[{}]" contained - syn region phpParent matchgroup=Delimiter start="(" end=")" contained contains=@phpClInside transparent - syn region phpParent matchgroup=Delimiter start="\[" end="\]" contained contains=@phpClInside transparent + syn match phpParent "[{}]" contained + syn region phpParent matchgroup=Delimiter start="(" end=")" contained contains=@phpClInside transparent + syn region phpParent matchgroup=Delimiter start="\[" end="\]" contained contains=@phpClInside transparent if !exists("php_parent_error_close") - syn match phpParent "[\])]" contained + syn match phpParent "[\])]" contained endif else - syn match phpParent "[({[\]})]" contained + syn match phpParent "[({[\]})]" contained endif -syn cluster phpClConst contains=phpFunctions,phpIdentifier,phpConditional,phpRepeat,phpStatement,phpOperator,phpRelation,phpStringSingle,phpStringDouble,phpBacktick,phpNumber,phpFloat,phpKeyword,phpType,phpBoolean,phpStructure,phpMethodsVar,phpConstant,phpCoreConstant,phpException -syn cluster phpClInside contains=@phpClConst,phpComment,phpLabel,phpParent,phpParentError,phpInclude,phpHereDoc -syn cluster phpClFunction contains=@phpClInside,phpDefine,phpParentError,phpStorageClass -syn cluster phpClTop contains=@phpClFunction,phpFoldFunction,phpFoldClass,phpFoldInterface,phpFoldTry,phpFoldCatch +syn cluster phpClConst contains=phpFunctions,phpIdentifier,phpConditional,phpRepeat,phpStatement,phpOperator,phpRelation,phpStringSingle,phpStringDouble,phpBacktick,phpNumber,phpFloat,phpKeyword,phpType,phpBoolean,phpStructure,phpMethodsVar,phpConstant,phpCoreConstant,phpException +syn cluster phpClInside contains=@phpClConst,phpComment,phpLabel,phpParent,phpParentError,phpInclude,phpHereDoc +syn cluster phpClFunction contains=@phpClInside,phpDefine,phpParentError,phpStorageClass +syn cluster phpClTop contains=@phpClFunction,phpFoldFunction,phpFoldClass,phpFoldInterface,phpFoldTry,phpFoldCatch " Php Region if exists("php_parent_error_open") if exists("php_noShortTags") - syn region phpRegion matchgroup=Delimiter start="" contains=@phpClTop + syn region phpRegion matchgroup=Delimiter start="" contains=@phpClTop else - syn region phpRegion matchgroup=Delimiter start="" contains=@phpClTop + syn region phpRegion matchgroup=Delimiter start="" contains=@phpClTop endif - syn region phpRegionSc matchgroup=Delimiter start=++ contains=@phpClTop + syn region phpRegionSc matchgroup=Delimiter start=++ contains=@phpClTop if exists("php_asp_tags") - syn region phpRegionAsp matchgroup=Delimiter start="<%\(=\)\=" end="%>" contains=@phpClTop + syn region phpRegionAsp matchgroup=Delimiter start="<%\(=\)\=" end="%>" contains=@phpClTop endif else if exists("php_noShortTags") - syn region phpRegion matchgroup=Delimiter start="" contains=@phpClTop keepend + syn region phpRegion matchgroup=Delimiter start="" contains=@phpClTop keepend else - syn region phpRegion matchgroup=Delimiter start="" contains=@phpClTop keepend + syn region phpRegion matchgroup=Delimiter start="" contains=@phpClTop keepend endif - syn region phpRegionSc matchgroup=Delimiter start=++ contains=@phpClTop keepend + syn region phpRegionSc matchgroup=Delimiter start=++ contains=@phpClTop keepend if exists("php_asp_tags") - syn region phpRegionAsp matchgroup=Delimiter start="<%\(=\)\=" end="%>" contains=@phpClTop keepend + syn region phpRegionAsp matchgroup=Delimiter start="<%\(=\)\=" end="%>" contains=@phpClTop keepend endif endif " Fold if exists("php_folding") && php_folding==1 " match one line constructs here and skip them at folding - syn keyword phpSCKeyword abstract final private protected public static contained - syn keyword phpFCKeyword function contained - syn keyword phpStorageClass global contained - syn match phpDefine "\(\s\|^\)\(abstract\s\+\|final\s\+\|private\s\+\|protected\s\+\|public\s\+\|static\s\+\)*function\(\s\+.*[;}]\)\@=" contained contains=phpSCKeyword - syn match phpStructure "\(\s\|^\)\(abstract\s\+\|final\s\+\)*class\(\s\+.*}\)\@=" contained - syn match phpStructure "\(\s\|^\)interface\(\s\+.*}\)\@=" contained - syn match phpException "\(\s\|^\)try\(\s\+.*}\)\@=" contained - syn match phpException "\(\s\|^\)catch\(\s\+.*}\)\@=" contained + syn keyword phpSCKeyword abstract final private protected public static contained + syn keyword phpFCKeyword function contained + syn keyword phpStorageClass global contained + syn match phpDefine "\(\s\|^\)\(abstract\s\+\|final\s\+\|private\s\+\|protected\s\+\|public\s\+\|static\s\+\)*function\(\s\+.*[;}]\)\@=" contained contains=phpSCKeyword + syn match phpStructure "\(\s\|^\)\(abstract\s\+\|final\s\+\)*class\(\s\+.*}\)\@=" contained + syn match phpStructure "\(\s\|^\)interface\(\s\+.*}\)\@=" contained + syn match phpException "\(\s\|^\)try\(\s\+.*}\)\@=" contained + syn match phpException "\(\s\|^\)catch\(\s\+.*}\)\@=" contained set foldmethod=syntax - syn region phpFoldHtmlInside matchgroup=Delimiter start="?>" end="" end="" end="" end="\h\w*" contained contains=phpMethods,phpMemberSelector display containedin=phpStringDouble + +" highlight constant E_STRICT +syntax case match +syntax keyword phpCoreConstant E_STRICT contained +syntax case ignore + +" different syntax highlighting for 'echo', 'print', 'switch', 'die' and 'list' keywords +" to better indicate what they are. +syntax keyword phpDefine echo print contained +syntax keyword phpStructure list contained +syntax keyword phpConditional switch contained +syntax keyword phpStatement die contained + +" Highlighting for PHP5's user-definable magic class methods +syntax keyword phpSpecialFunction containedin=ALLBUT,phpComment,phpStringDouble,phpStringSingle,phpIdentifier + \ __construct __destruct __call __toString __sleep __wakeup __set __get __unset __isset __clone __set_state +" Highlighting for __autoload slightly different from line above +syntax keyword phpSpecialFunction containedin=ALLBUT,phpComment,phpStringDouble,phpStringSingle,phpIdentifier,phpMethodsVar + \ __autoload +highlight link phpSpecialFunction phpOperator + +" Highlighting for PHP5's built-in classes +" - built-in classes harvested from get_declared_classes() in 5.1.4 +syntax keyword phpClasses containedin=ALLBUT,phpComment,phpStringDouble,phpStringSingle,phpIdentifier,phpMethodsVar + \ stdClass __PHP_Incomplete_Class php_user_filter Directory ArrayObject + \ Exception ErrorException LogicException BadFunctionCallException BadMethodCallException DomainException + \ RecursiveIteratorIterator IteratorIterator FilterIterator RecursiveFilterIterator ParentIterator LimitIterator + \ CachingIterator RecursiveCachingIterator NoRewindIterator AppendIterator InfiniteIterator EmptyIterator + \ ArrayIterator RecursiveArrayIterator DirectoryIterator RecursiveDirectoryIterator + \ InvalidArgumentException LengthException OutOfRangeException RuntimeException OutOfBoundsException + \ OverflowException RangeException UnderflowException UnexpectedValueException + \ PDO PDOException PDOStatement PDORow + \ Reflection ReflectionFunction ReflectionParameter ReflectionMethod ReflectionClass + \ ReflectionObject ReflectionProperty ReflectionExtension ReflectionException + \ SplFileInfo SplFileObject SplTempFileObject SplObjectStorage + \ XMLWriter LibXMLError XMLReader SimpleXMLElement SimpleXMLIterator + \ DOMException DOMStringList DOMNameList DOMDomError DOMErrorHandler + \ DOMImplementation DOMImplementationList DOMImplementationSource + \ DOMNode DOMNameSpaceNode DOMDocumentFragment DOMDocument DOMNodeList DOMNamedNodeMap + \ DOMCharacterData DOMAttr DOMElement DOMText DOMComment DOMTypeinfo DOMUserDataHandler + \ DOMLocator DOMConfiguration DOMCdataSection DOMDocumentType DOMNotation DOMEntity + \ DOMEntityReference DOMProcessingInstruction DOMStringExtend DOMXPath +highlight link phpClasses phpFunctions + +" Highlighting for PHP5's built-in interfaces +" - built-in classes harvested from get_declared_interfaces() in 5.1.4 +syntax keyword phpInterfaces containedin=ALLBUT,phpComment,phpStringDouble,phpStringSingle,phpIdentifier,phpMethodsVar + \ Iterator IteratorAggregate RecursiveIterator OuterIterator SeekableIterator + \ Traversable ArrayAccess Serializable Countable SplObserver SplSubject Reflector +highlight link phpInterfaces phpConstant + +" option defaults: +if ! exists('php_special_functions') + let php_special_functions = 1 +endif +if ! exists('php_alt_comparisons') + let php_alt_comparisons = 1 +endif +if ! exists('php_alt_assignByReference') + let php_alt_assignByReference = 1 +endif + +if php_special_functions + " Highlighting for PHP built-in functions which exhibit special behaviours + " - isset()/unset()/empty() are not real functions. + " - compact()/extract() directly manipulate variables in the local scope where + " regular functions would not be able to. + " - eval() is the token 'make_your_code_twice_as_complex()' function for PHP. + " - user_error()/trigger_error() can be overloaded by set_error_handler and also + " have the capacity to terminate your script when type is E_USER_ERROR. + syntax keyword phpSpecialFunction containedin=ALLBUT,phpComment,phpStringDouble,phpStringSingle + \ user_error trigger_error isset unset eval extract compact empty +endif + +if php_alt_assignByReference + " special highlighting for '=&' operator + syntax match phpAssignByRef /=\s*&/ containedin=ALLBUT,phpComment,phpStringDouble,phpStringSingle + highlight link phpAssignByRef Type +endif + +if php_alt_comparisons + " highlight comparison operators differently + syntax match phpComparison "\v[=!]\=\=?" contained containedin=phpRegion + syntax match phpComparison "\v[=<>-]@]\=?[<>]@!" contained containedin=phpRegion + + " highlight the 'instanceof' operator as a comparison operator rather than a structure + syntax case ignore + syntax keyword phpComparison instanceof contained containedin=phpRegion + + hi link phpComparison Statement endif +" ================================================================ " Sync if php_sync_method==-1 @@ -461,54 +587,54 @@ if version >= 508 || !exists("did_php_syn_inits") command -nargs=+ HiLink hi def link endif - HiLink phpConstant Constant - HiLink phpCoreConstant Constant - HiLink phpComment Comment - HiLink phpException Exception - HiLink phpBoolean Boolean - HiLink phpStorageClass StorageClass - HiLink phpSCKeyword StorageClass - HiLink phpFCKeyword Define - HiLink phpStructure Structure - HiLink phpStringSingle String - HiLink phpStringDouble String - HiLink phpBacktick String - HiLink phpNumber Number - HiLink phpFloat Float - HiLink phpMethods Function - HiLink phpFunctions Function - HiLink phpBaselib Function - HiLink phpRepeat Repeat - HiLink phpConditional Conditional - HiLink phpLabel Label - HiLink phpStatement Statement - HiLink phpKeyword Statement - HiLink phpType Type - HiLink phpInclude Include - HiLink phpDefine Define - HiLink phpSpecialChar SpecialChar - HiLink phpParent Delimiter - HiLink phpIdentifierConst Delimiter - HiLink phpParentError Error - HiLink phpOctalError Error - HiLink phpTodo Todo - HiLink phpMemberSelector Structure + HiLink phpConstant Constant + HiLink phpCoreConstant Constant + HiLink phpComment Comment + HiLink phpException Exception + HiLink phpBoolean Boolean + HiLink phpStorageClass StorageClass + HiLink phpSCKeyword StorageClass + HiLink phpFCKeyword Define + HiLink phpStructure Structure + HiLink phpStringSingle String + HiLink phpStringDouble String + HiLink phpBacktick String + HiLink phpNumber Number + HiLink phpFloat Float + HiLink phpMethods Function + HiLink phpFunctions Function + HiLink phpBaselib Function + HiLink phpRepeat Repeat + HiLink phpConditional Conditional + HiLink phpLabel Label + HiLink phpStatement Statement + HiLink phpKeyword Statement + HiLink phpType Type + HiLink phpInclude Include + HiLink phpDefine Define + HiLink phpSpecialChar SpecialChar + HiLink phpParent Delimiter + HiLink phpIdentifierConst Delimiter + HiLink phpParentError Error + HiLink phpOctalError Error + HiLink phpTodo Todo + HiLink phpMemberSelector Structure if exists("php_oldStyle") - hi phpIntVar guifg=Red ctermfg=DarkRed - hi phpEnvVar guifg=Red ctermfg=DarkRed - hi phpOperator guifg=SeaGreen ctermfg=DarkGreen - hi phpVarSelector guifg=SeaGreen ctermfg=DarkGreen - hi phpRelation guifg=SeaGreen ctermfg=DarkGreen - hi phpIdentifier guifg=DarkGray ctermfg=Brown - hi phpIdentifierSimply guifg=DarkGray ctermfg=Brown + hi phpIntVar guifg=Red ctermfg=DarkRed + hi phpEnvVar guifg=Red ctermfg=DarkRed + hi phpOperator guifg=SeaGreen ctermfg=DarkGreen + hi phpVarSelector guifg=SeaGreen ctermfg=DarkGreen + hi phpRelation guifg=SeaGreen ctermfg=DarkGreen + hi phpIdentifier guifg=DarkGray ctermfg=Brown + hi phpIdentifierSimply guifg=DarkGray ctermfg=Brown else - HiLink phpIntVar Identifier - HiLink phpEnvVar Identifier - HiLink phpOperator Operator - HiLink phpVarSelector Operator - HiLink phpRelation Operator - HiLink phpIdentifier Identifier - HiLink phpIdentifierSimply Identifier + HiLink phpIntVar Identifier + HiLink phpEnvVar Identifier + HiLink phpOperator Operator + HiLink phpVarSelector Operator + HiLink phpRelation Operator + HiLink phpIdentifier Identifier + HiLink phpIdentifierSimply Identifier endif delcommand HiLink @@ -520,4 +646,4 @@ if main_syntax == 'php' unlet main_syntax endif -" vim: ts=8 +" vim: ts=8 sts=2 sw=2 expandtab diff --git a/runtime/syntax/privoxy.vim b/runtime/syntax/privoxy.vim new file mode 100644 index 000000000..9e6ff1df9 --- /dev/null +++ b/runtime/syntax/privoxy.vim @@ -0,0 +1,71 @@ +" Vim syntax file +" Language: Privoxy actions file +" Maintainer: Doug Kearns +" URL: http://gus.gscit.monash.edu.au/~djkea2/vim/syntax/privoxy.vim +" Last Change: 2007 Mar 30 + +" Privoxy 3.0.6 + +if exists("b:current_syntax") + finish +endif + +let s:cpo_save = &cpo +set cpo&vim + +setlocal iskeyword=@,48-57,_,- + +syn keyword privoxyTodo contained TODO FIXME XXX NOTE +syn match privoxyComment "#.*" contains=privoxyTodo,@Spell + +syn region privoxyActionLine matchgroup=privoxyActionLineDelimiter start="^\s*\zs{" end="}\ze\s*$" + \ contains=privoxyEnabledPrefix,privoxyDisabledPrefix + +syn match privoxyEnabledPrefix "\%(^\|\s\|{\)\@<=+\l\@=" nextgroup=privoxyAction,privoxyFilterAction contained +syn match privoxyDisabledPrefix "\%(^\|\s\|{\)\@<=-\l\@=" nextgroup=privoxyAction,privoxyFilterAction contained + +syn match privoxyAction "\%(add-header\|block\|content-type-overwrite\|crunch-client-header\|crunch-if-none-match\)\>" contained +syn match privoxyAction "\%(crunch-incoming-cookies\|crunch-outgoing-cookies\|crunch-server-header\|deanimate-gifs\)\>" contained +syn match privoxyAction "\%(downgrade-http-version\|fast-redirects\|filter-client-headers\|filter-server-headers\)\>" contained +syn match privoxyAction "\%(filter\|force-text-mode\|handle-as-empty-document\|handle-as-image\)\>" contained +syn match privoxyAction "\%(hide-accept-language\|hide-content-disposition\|hide-forwarded-for-headers\)\>" contained +syn match privoxyAction "\%(hide-from-header\|hide-if-modified-since\|hide-referrer\|hide-user-agent\|inspect-jpegs\)\>" contained +syn match privoxyAction "\%(kill-popups\|limit-connect\|overwrite-last-modified\|prevent-compression\|redirect\)\>" contained +syn match privoxyAction "\%(send-vanilla-wafer\|send-wafer\|session-cookies-only\|set-image-blocker\)\>" contained +syn match privoxyAction "\%(treat-forbidden-connects-like-blocks\)\>" + +syn match privoxyFilterAction "filter{[^}]*}" contained contains=privoxyFilterArg,privoxyActionBraces +syn match privoxyActionBraces "[{}]" contained +syn keyword privoxyFilterArg js-annoyances js-events html-annoyances content-cookies refresh-tags unsolicited-popups all-popups + \ img-reorder banners-by-size banners-by-link webbugs tiny-textforms jumping-windows frameset-borders demoronizer + \ shockwave-flash quicktime-kioskmode fun crude-parental ie-exploits site-specifics no-ping google yahoo msn blogspot + \ x-httpd-php-to-html html-to-xml xml-to-html hide-tor-exit-notation contained + +" Alternative spellings +syn match privoxyAction "\%(kill-popup\|hide-referer\|prevent-keeping-cookies\)\>" contained + +" Pre-3.0 compatibility +syn match privoxyAction "\%(no-cookie-read\|no-cookie-set\|prevent-reading-cookies\|prevent-setting-cookies\)\>" contained +syn match privoxyAction "\%(downgrade\|hide-forwarded\|hide-from\|image\|image-blocker\|no-compression\)\>" contained +syn match privoxyAction "\%(no-cookies-keep\|no-cookies-read\|no-cookies-set\|no-popups\|vanilla-wafer\|wafer\)\>" contained + +syn match privoxySetting "\" + +syn match privoxyHeader "^\s*\zs{{\%(alias\|settings\)}}\ze\s*$" + +hi def link privoxyAction Identifier +hi def link privoxyFilterAction Identifier +hi def link privoxyActionLineDelimiter Delimiter +hi def link privoxyDisabledPrefix SpecialChar +hi def link privoxyEnabledPrefix SpecialChar +hi def link privoxyHeader PreProc +hi def link privoxySetting Identifier +hi def link privoxyFilterArg Constant + +hi def link privoxyComment Comment +hi def link privoxyTodo Todo + +let b:current_syntax = "privoxy" + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/runtime/syntax/remind.vim b/runtime/syntax/remind.vim index 55d583ec3..001868e15 100644 --- a/runtime/syntax/remind.vim +++ b/runtime/syntax/remind.vim @@ -1,12 +1,12 @@ " Vim syntax file " Language: Remind -" Maintainer: Davide Alberani -" Last Change: 28 Apr 2001 -" Version: 0.2 -" URL: http://digilander.iol.it/alberanid/vim/syntax/remind.vim +" Maintainer: Davide Alberani +" Last Change: 10 May 2006 +" Version: 0.3 +" URL: http://erlug.linux.it/~da/vim/syntax/remind.vim " -" remind is a sophisticated reminder service -" you can download remind from http://www.roaringpenguin.com/remind.html +" remind is a sophisticated reminder service; you can download remind from: +" http://www.roaringpenguin.com/penguin/open_source_remind.php if version < 600 syntax clear @@ -32,6 +32,10 @@ syn keyword remindDebug DEBUG DUMPVARS DUMP ERRMSG FLUSH PRESERVE syn match remindVar "\$[_a-zA-Z][_a-zA-Z0-9]*" syn match remindSubst "%[^ ]" syn match remindAdvanceNumber "\(\*\|+\|-\|++\|--\)[0-9]\+" +" This will match trailing whitespaces that seem to break rem2ps. +" Courtesy of Michael Dunn. +syn match remindWarning display excludenl "\S\s\+$"ms=s+1 + if version >= 508 || !exists("did_remind_syn_inits") if version < 508 @@ -55,6 +59,7 @@ if version >= 508 || !exists("did_remind_syn_inits") HiLink remindVar Identifier HiLink remindSubst Constant HiLink remindAdvanceNumber Number + HiLink remindWarning Error delcommand HiLink endif diff --git a/runtime/syntax/ruby.vim b/runtime/syntax/ruby.vim index 94434aed3..c45aae2a1 100644 --- a/runtime/syntax/ruby.vim +++ b/runtime/syntax/ruby.vim @@ -32,13 +32,23 @@ if exists("ruby_space_errors") endif endif +" Operators +if exists("ruby_operators") + syn match rubyOperator "\%(\^\|\~\|\%(class\s*\)\@\|<=\|\%(<\|\>\|>=\|>\||\|-\|/\|\*\*\|\*\|&\|%\|+\)" + syn match rubyPseudoOperator "\%(-=\|/=\|\*\*=\|\*=\|&&\|&=\|&&=\|||\||=\|||=\|%=\|+=\|!\~\|!=\)" + syn region rubyBracketOperator matchgroup=rubyOperator start="\%([_[:lower:]]\w*[?!=]\=\|}\)\@<=\[\s*" end="\s*]" +endif + " Expression Substitution and Backslash Notation -syn match rubyEscape "\\\\\|\\[abefnrstv]\|\\\o\{1,3}\|\\x\x\{1,2}" contained display -syn match rubyEscape "\%(\\M-\\C-\|\\C-\\M-\|\\M-\\c\|\\c\\M-\|\\c\|\\C-\|\\M-\)\%(\\\o\{1,3}\|\\x\x\{1,2}\|\\\=\S\)" contained display -syn match rubyInterpolation "#{[^}]*}" contained -syn match rubyInterpolation "#\%(\$\|@@\=\)\w\+" contained display -syn match rubyNoInterpolation "\\#{[^}]*}" contained -syn match rubyNoInterpolation "\\#\%(\$\|@@\=\)\w\+" contained display +syn match rubyEscape "\\\\\|\\[abefnrstv]\|\\\o\{1,3}\|\\x\x\{1,2}" contained display +syn match rubyEscape "\%(\\M-\\C-\|\\C-\\M-\|\\M-\\c\|\\c\\M-\|\\c\|\\C-\|\\M-\)\%(\\\o\{1,3}\|\\x\x\{1,2}\|\\\=\S\)" contained display + +syn region rubyInterpolation matchgroup=rubyInterpolationDelimiter start="#{" end="}" contained contains=TOP +syn match rubyInterpolation "#\%(\$\|@@\=\)\w\+" display contained contains=rubyInterpolationDelimiter,rubyInstanceVariable,rubyClassVariable,rubyGlobalVariable,rubyPredefinedVariable +syn match rubyInterpolationDelimiter "#\ze\%(\$\|@@\=\)\w\+" display contained +syn region rubyNoInterpolation start="\\#{" end="}" contained +syn match rubyNoInterpolation "\\#{" display contained +syn match rubyNoInterpolation "\\#\%(\$\|@@\=\)\w\+" display contained syn match rubyDelimEscape "\\[(<{\[)>}\]]" transparent display contained contains=NONE @@ -63,7 +73,7 @@ syn match rubyFloat "\<\%(0\|[1-9]\d*\%(_\d\+\)*\)\%(\.\d\+\%(_\d\+\)*\)\=\%([eE syn match rubyLocalVariableOrMethod "\<[_[:lower:]][_[:alnum:]]*[?!=]\=" contains=NONE display transparent syn match rubyBlockArgument "&[_[:lower:]][_[:alnum:]]" contains=NONE display transparent -syn match rubyConstant "\%(\%(\.\@\%(\s*(\)\@!" +syn match rubyConstant "\%(\%([.@$]\@\|::\)\@=\%(\s*(\)\@!" syn match rubyClassVariable "@@\h\w*" display syn match rubyInstanceVariable "@\h\w*" display syn match rubyGlobalVariable "$\%(\h\w*\|-.\)" @@ -71,7 +81,12 @@ syn match rubySymbol ":\@\|<=\|<\|===\|==\|=\~\|>>\|>=\| syn match rubySymbol ":\@_,;:!?/.'"@$*\&+0]\)" syn match rubySymbol ":\@\|{\)\s*\)\@<=|\s*\zs[( ,a-zA-Z0-9_*)]\+\ze\s*|" display +syn region rubySymbol start=":\@\|{\)\s*\)|\s*\)\@<=[( ,a-zA-Z0-9_*)]\+\%(\s*|\)\@=" display +else + syn match rubyBlockParameter "\%(\%(\\|{\)\s*\)\@<=|\s*\zs[( ,a-zA-Z0-9_*)]\+\ze\s*|" display +endif syn match rubyPredefinedVariable #$[!$&"'*+,./0:;<=>?@\`~1-9]# syn match rubyPredefinedVariable "$_\>" display @@ -86,20 +101,20 @@ syn match rubyPredefinedConstant "\%(\%(\.\@" " Normal Regular Expression -syn region rubyString matchgroup=rubyStringDelimiter start="\%(\%(^\|\<\%(and\|or\|while\|until\|unless\|if\|elsif\|when\|not\|then\)\|[;\~=!|&(,[>]\)\s*\)\@<=/" end="/[iomx]*" skip="\\\\\|\\/" contains=@rubyStringSpecial -syn region rubyString matchgroup=rubyStringDelimiter start="\%(\<\%(split\|scan\|gsub\|sub\)\s*\)\@<=/" end="/[iomx]*" skip="\\\\\|\\/" contains=@rubyStringSpecial +syn region rubyRegexp matchgroup=rubyRegexpDelimiter start="\%(\%(^\|\<\%(and\|or\|while\|until\|unless\|if\|elsif\|when\|not\|then\)\|[;\~=!|&(,[>]\)\s*\)\@<=/" end="/[iomx]*" skip="\\\\\|\\/" contains=@rubyStringSpecial fold +syn region rubyRegexp matchgroup=rubyRegexpDelimiter start="\%(\<\%(split\|scan\|gsub\|sub\)\s*\)\@<=/" end="/[iomx]*" skip="\\\\\|\\/" contains=@rubyStringSpecial fold " Normal String and Shell Command Output -syn region rubyString matchgroup=rubyStringDelimiter start="\"" end="\"" skip="\\\\\|\\\"" contains=@rubyStringSpecial -syn region rubyString matchgroup=rubyStringDelimiter start="'" end="'" skip="\\\\\|\\'" -syn region rubyString matchgroup=rubyStringDelimiter start="`" end="`" skip="\\\\\|\\`" contains=@rubyStringSpecial +syn region rubyString matchgroup=rubyStringDelimiter start="\"" end="\"" skip="\\\\\|\\\"" contains=@rubyStringSpecial fold +syn region rubyString matchgroup=rubyStringDelimiter start="'" end="'" skip="\\\\\|\\'" fold +syn region rubyString matchgroup=rubyStringDelimiter start="`" end="`" skip="\\\\\|\\`" contains=@rubyStringSpecial fold " Generalized Regular Expression -syn region rubyString matchgroup=rubyStringDelimiter start="%r\z([~`!@#$%^&*_\-+=|\:;"',.?/]\)" end="\z1[iomx]*" skip="\\\\\|\\\z1" contains=@rubyStringSpecial fold -syn region rubyString matchgroup=rubyStringDelimiter start="%r{" end="}[iomx]*" skip="\\\\\|\\}" contains=@rubyStringSpecial,rubyNestedCurlyBraces,rubyDelimEscape fold -syn region rubyString matchgroup=rubyStringDelimiter start="%r<" end=">[iomx]*" skip="\\\\\|\\>" contains=@rubyStringSpecial,rubyNestedAngleBrackets,rubyDelimEscape fold -syn region rubyString matchgroup=rubyStringDelimiter start="%r\[" end="\][iomx]*" skip="\\\\\|\\\]" contains=@rubyStringSpecial,rubyNestedSquareBrackets,rubyDelimEscape fold -syn region rubyString matchgroup=rubyStringDelimiter start="%r(" end=")[iomx]*" skip="\\\\\|\\)" contains=@rubyStringSpecial,rubyNestedParentheses,rubyDelimEscape fold +syn region rubyRegexp matchgroup=rubyRegexpDelimiter start="%r\z([~`!@#$%^&*_\-+=|\:;"',.?/]\)" end="\z1[iomx]*" skip="\\\\\|\\\z1" contains=@rubyStringSpecial fold +syn region rubyRegexp matchgroup=rubyRegexpDelimiter start="%r{" end="}[iomx]*" skip="\\\\\|\\}" contains=@rubyStringSpecial,rubyNestedCurlyBraces,rubyDelimEscape fold +syn region rubyRegexp matchgroup=rubyRegexpDelimiter start="%r<" end=">[iomx]*" skip="\\\\\|\\>" contains=@rubyStringSpecial,rubyNestedAngleBrackets,rubyDelimEscape fold +syn region rubyRegexp matchgroup=rubyRegexpDelimiter start="%r\[" end="\][iomx]*" skip="\\\\\|\\\]" contains=@rubyStringSpecial,rubyNestedSquareBrackets,rubyDelimEscape fold +syn region rubyRegexp matchgroup=rubyRegexpDelimiter start="%r(" end=")[iomx]*" skip="\\\\\|\\)" contains=@rubyStringSpecial,rubyNestedParentheses,rubyDelimEscape fold " Generalized Single Quoted String, Symbol and Array of Strings syn region rubyString matchgroup=rubyStringDelimiter start="%[qsw]\z([~`!@#$%^&*_\-+=|\:;"',.?/]\)" end="\z1" skip="\\\\\|\\\z1" fold @@ -123,46 +138,58 @@ syn region rubyHeredocStart matchgroup=rubyStringDelimiter start=+\%(\%(class\s* syn region rubyHeredocStart matchgroup=rubyStringDelimiter start=+\%(\%(class\s*\|\%(\.\|::\)\)\_s*\)\@>\|[<>]=\=\|<=>\|===\|==\|=\~\|`\)\%([[:space:];#(]\|$\)\@=" contained containedin=rubyAliasDeclaration,rubyAliasDeclaration2,rubyMethodDeclaration " Expensive Mode - colorize *end* according to opening statement if !exists("b:ruby_no_expensive") && !exists("ruby_no_expensive") - syn region rubyFunction matchgroup=rubyDefine start="\" nextgroup=rubyAliasDeclaration skipwhite skipnl + syn match rubyDefine "\" nextgroup=rubyMethodDeclaration skipwhite skipnl + syn match rubyClass "\" nextgroup=rubyClassDeclaration skipwhite skipnl + syn match rubyModule "\" nextgroup=rubyModuleDeclaration skipwhite skipnl + syn region rubyBlock start="\" matchgroup=rubyDefine end="\%(\" contains=TOP fold + syn region rubyBlock start="\" matchgroup=rubyClass end="\" contains=TOP fold + syn region rubyBlock start="\" matchgroup=rubyModule end="\" contains=TOP fold " modifiers - syn match rubyControl "\<\%(if\|unless\|while\|until\)\>" display + syn match rubyConditional "\<\%(if\|unless\)\>" display + syn match rubyRepeat "\<\%(while\|until\)\>" display " *do* requiring *end* - syn region rubyDoBlock matchgroup=rubyControl start="\" end="\" contains=ALLBUT,@rubyExtendedStringSpecial,rubyTodo fold + syn region rubyDoBlock matchgroup=rubyControl start="\" end="\" contains=TOP fold " *{* requiring *}* - syn region rubyCurlyBlock start="{" end="}" contains=ALLBUT,@rubyExtendedStringSpecial,rubyTodo fold + syn region rubyCurlyBlock start="{" end="}" contains=TOP fold " statements without *do* - syn region rubyNoDoBlock matchgroup=rubyControl start="\<\%(case\|begin\)\>" start="\%(^\|\.\.\.\=\|[,;=([<>~\*/%!&^|+-]\)\s*\zs\%(if\|unless\)\>" end="\" contains=ALLBUT,@rubyExtendedStringSpecial,rubyTodo fold + syn region rubyNoDoBlock matchgroup=rubyControl start="\" end="\" contains=TOP fold + syn region rubyCaseBlock matchgroup=rubyConditional start="\" end="\" contains=TOP fold + syn region rubyConditionalBlock matchgroup=rubyConditional start="\%(\%(^\|\.\.\.\=\|[{:,;([<>~\*/%&^|+-]\|\%(\<[_[:lower:]][_[:alnum:]]*\)\@" end="\" contains=TOP fold + syn keyword rubyConditional then else when contained containedin=rubyCaseBlock + syn keyword rubyConditional then else elsif contained containedin=rubyConditionalBlock " statement with optional *do* - syn region rubyOptDoLine matchgroup=rubyControl start="\" start="\%(\%(^\|\.\.\.\=\|[?:,;=([<>~\*/%!&^|+-]\|\%(\<[_[:lower:]][_[:alnum:]]*\)\@" end="\%(\\|:\)" end="\ze\%(;\|$\)" oneline contains=ALLBUT,@rubyExtendedStringSpecial,rubyTodo - syn region rubyOptDoBlock start="\" start="\%(\%(^\|\.\.\.\=\|[:,;([<>~\*/%&^|+-]\|\%(\<[_[:lower:]][_[:alnum:]]*\)\@" matchgroup=rubyControl end="\" contains=ALLBUT,@rubyExtendedStringSpecial,rubyTodo nextgroup=rubyOptDoLine fold + syn region rubyOptDoLine matchgroup=rubyRepeat start="\" start="\%(\%(^\|\.\.\.\=\|[{:,;([<>~\*/%&^|+-]\|\%(\<[_[:lower:]][_[:alnum:]]*\)\@" end="\%(\\|:\)" end="\ze\%(;\|$\)" oneline contains=TOP + syn region rubyOptDoBlock start="\" start="\%(\%(^\|\.\.\.\=\|[{:,;([<>~\*/%&^|+-]\|\%(\<[_[:lower:]][_[:alnum:]]*\)\@" matchgroup=rubyRepeat end="\" contains=TOP nextgroup=rubyOptDoLine fold if !exists("ruby_minlines") let ruby_minlines = 50 @@ -170,19 +197,19 @@ if !exists("b:ruby_no_expensive") && !exists("ruby_no_expensive") exec "syn sync minlines=" . ruby_minlines else - syn region rubyFunction matchgroup=rubyControl start="\" nextgroup=rubyMethodDeclaration skipwhite skipnl + syn match rubyControl "\" nextgroup=rubyClassDeclaration skipwhite skipnl + syn match rubyControl "\" nextgroup=rubyModuleDeclaration skipwhite skipnl + syn keyword rubyControl case begin do for if unless while until else elsif then when end + syn keyword rubyKeyword alias endif " Keywords " Note: the following keywords have already been defined: " begin case class def do end for if module unless until while -syn keyword rubyControl and break else elsif ensure in next not or redo rescue retry return then when +syn keyword rubyControl and break ensure in next not or redo rescue retry return syn match rubyOperator "\" transparent contains=NONE @@ -231,33 +263,36 @@ if version >= 508 || !exists("did_ruby_syntax_inits") command -nargs=+ HiLink hi def link endif + HiLink rubyClass rubyDefine + HiLink rubyModule rubyDefine HiLink rubyDefine Define HiLink rubyFunction Function + HiLink rubyConditional Conditional + HiLink rubyRepeat Repeat HiLink rubyControl Statement HiLink rubyInclude Include HiLink rubyInteger Number - HiLink rubyASCIICode rubyInteger + HiLink rubyASCIICode Character HiLink rubyFloat Float - HiLink rubyBoolean rubyPseudoVariable + HiLink rubyBoolean Boolean HiLink rubyException Exception - HiLink rubyClass Type - HiLink rubyModule Type if !exists("ruby_no_identifiers") HiLink rubyIdentifier Identifier else HiLink rubyIdentifier NONE endif HiLink rubyClassVariable rubyIdentifier - HiLink rubyConstant rubyIdentifier + HiLink rubyConstant Type HiLink rubyGlobalVariable rubyIdentifier HiLink rubyBlockParameter rubyIdentifier HiLink rubyInstanceVariable rubyIdentifier HiLink rubyPredefinedIdentifier rubyIdentifier HiLink rubyPredefinedConstant rubyPredefinedIdentifier HiLink rubyPredefinedVariable rubyPredefinedIdentifier - HiLink rubySymbol rubyIdentifier + HiLink rubySymbol Constant HiLink rubyKeyword Keyword HiLink rubyOperator Operator + HiLink rubyPseudoOperator rubyOperator HiLink rubyBeginEnd Statement HiLink rubyAccess Statement HiLink rubyAttribute Statement @@ -269,10 +304,12 @@ if version >= 508 || !exists("did_ruby_syntax_inits") HiLink rubyDataDirective Delimiter HiLink rubyDocumentation Comment HiLink rubyEscape Special - HiLink rubyInterpolation Special + HiLink rubyInterpolationDelimiter Delimiter HiLink rubyNoInterpolation rubyString HiLink rubySharpBang PreProc + HiLink rubyRegexpDelimiter rubyStringDelimiter HiLink rubyStringDelimiter Delimiter + HiLink rubyRegexp rubyString HiLink rubyString String HiLink rubyTodo Todo @@ -284,4 +321,4 @@ endif let b:current_syntax = "ruby" -" vim: nowrap sw=2 sts=2 ts=8 ff=unix: +" vim: nowrap sw=2 sts=2 ts=8 noet ff=unix: diff --git a/runtime/syntax/sd.vim b/runtime/syntax/sd.vim new file mode 100644 index 000000000..bb201ca00 --- /dev/null +++ b/runtime/syntax/sd.vim @@ -0,0 +1,75 @@ +" Language: streaming descriptor file +" Maintainer: Puria Nafisi Azizi (pna) +" License: This file can be redistribued and/or modified under the same terms +" as Vim itself. +" URL: http://netstudent.polito.it/vim_syntax/ +" Last Change: 2006-09-27 + +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" Always ignore case +syn case ignore + +" Comments +syn match sdComment /\s*[#;].*$/ + +" IP Adresses +syn cluster sdIPCluster contains=sdIPError,sdIPSpecial +syn match sdIPError /\%(\d\{4,}\|25[6-9]\|2[6-9]\d\|[3-9]\d\{2}\)[\.0-9]*/ contained +syn match sdIPSpecial /\%(127\.\d\{1,3}\.\d\{1,3}\.\d\{1,3}\)/ contained +syn match sdIP contained /\%(\d\{1,4}\.\)\{3}\d\{1,4}/ contains=@sdIPCluster + +" Statements +syn keyword sdStatement AGGREGATE AUDIO_CHANNELS +syn keyword sdStatement BYTE_PER_PCKT BIT_PER_SAMPLE BITRATE +syn keyword sdStatement CLOCK_RATE CODING_TYPE CREATOR +syn match sdStatement /^\s*CODING_TYPE\>/ nextgroup=sdCoding skipwhite +syn match sdStatement /^\s*ENCODING_NAME\>/ nextgroup=sdEncoding skipwhite +syn keyword sdStatement FILE_NAME FRAME_LEN FRAME_RATE FORCE_FRAME_RATE +syn keyword sdStatement LICENSE +syn match sdStatement /^\s*MEDIA_SOURCE\>/ nextgroup=sdSource skipwhite +syn match sdStatement /^\s*MULTICAST\>/ nextgroup=sdIP skipwhite +syn keyword sdStatement PAYLOAD_TYPE PKT_LEN PRIORITY +syn keyword sdStatement SAMPLE_RATE +syn keyword sdStatement TITLE TWIN +syn keyword sdStatement VERIFY + +" Known Options +syn keyword sdEncoding H26L MPV MP2T MP4V-ES +syn keyword sdCoding FRAME SAMPLE +syn keyword sdSource STORED LIVE + +"Specials +syn keyword sdSpecial TRUE FALSE NULL +syn keyword sdDelimiter STREAM STREAM_END +syn match sdError /^search .\{257,}/ + +if version >= 508 || !exists("did_config_syntax_inits") + if version < 508 + let did_config_syntax_inits = 1 + command! -nargs=+ HiLink hi link + else + command! -nargs=+ HiLink hi def link + endif + + HiLink sdIP Number + HiLink sdHostname Type + HiLink sdEncoding Identifier + HiLink sdCoding Identifier + HiLink sdSource Identifier + HiLink sdComment Comment + HiLink sdIPError Error + HiLink sdError Error + HiLink sdStatement Statement + HiLink sdIPSpecial Special + HiLink sdSpecial Special + HiLink sdDelimiter Delimiter + + delcommand HiLink +endif + +let b:current_syntax = "sd" diff --git a/runtime/syntax/sh.vim b/runtime/syntax/sh.vim index 2c53f9fa4..4edff0461 100644 --- a/runtime/syntax/sh.vim +++ b/runtime/syntax/sh.vim @@ -2,8 +2,8 @@ " Language: shell (sh) Korn shell (ksh) bash (sh) " Maintainer: Dr. Charles E. Campbell, Jr. " Previous Maintainer: Lennart Schultz -" Last Change: Apr 12, 2006 -" Version: 84 +" Last Change: Sep 15, 2006 +" Version: 88 " URL: http://mysite.verizon.net/astronaut/vim/index.html#vimlinks_syntax " " Using the following VIM variables: {{{1 @@ -70,25 +70,25 @@ syn case match " Clusters: contains=@... clusters {{{1 "================================== -syn cluster shCaseEsacList contains=shCaseStart,shCase,shCaseBar,shCaseIn,shComment,shDeref,shDerefSimple,shCaseCommandSub,shCaseExSingleQuote,shCaseSingleQuote,shCaseDoubleQuote,shSpecial -syn cluster shCaseList contains=@shCommandSubList,shCaseEsac,shColon,shCommandSub,shCommandSub,shComment,shDo,shEcho,shExpr,shFor,shHereDoc,shIf,shRedir,shSetList,shSource,shStatement,shVariable,shSpecial +syn cluster shCaseEsacList contains=shCaseStart,shCase,shCaseBar,shCaseIn,shComment,shDeref,shDerefSimple,shCaseCommandSub,shCaseExSingleQuote,shCaseSingleQuote,shCaseDoubleQuote,shCtrlSeq +syn cluster shCaseList contains=@shCommandSubList,shCaseEsac,shColon,shCommandSub,shCommandSub,shComment,shDo,shEcho,shExpr,shFor,shHereDoc,shIf,shRedir,shSetList,shSource,shStatement,shVariable,shCtrlSeq syn cluster shColonList contains=@shCaseList -syn cluster shCommandSubList contains=shArithmetic,shDeref,shDerefSimple,shNumber,shOperator,shPosnParm,shSpecial,shExSingleQuote,shSingleQuote,shDoubleQuote,shStatement,shVariable,shSubSh,shAlias,shTest +syn cluster shCommandSubList contains=shArithmetic,shDeref,shDerefSimple,shNumber,shOperator,shPosnParm,shExSingleQuote,shSingleQuote,shDoubleQuote,shStatement,shVariable,shSubSh,shAlias,shTest,shCtrlSeq syn cluster shCurlyList contains=shNumber,shComma,shDeref,shDerefSimple,shDerefSpecial -syn cluster shDblQuoteList contains=shCommandSub,shDeref,shDerefSimple,shSpecial,shPosnParm +syn cluster shDblQuoteList contains=shCommandSub,shDeref,shDerefSimple,shPosnParm,shExSingleQuote,shCtrlSeq syn cluster shDerefList contains=shDeref,shDerefSimple,shDerefVar,shDerefSpecial,shDerefWordError,shDerefPPS syn cluster shDerefVarList contains=shDerefOp,shDerefVarArray,shDerefOpError -syn cluster shEchoList contains=shArithmetic,shCommandSub,shDeref,shDerefSimple,shExpr,shExSingleQuote,shSingleQuote,shDoubleQuote,shSpecial -syn cluster shExprList1 contains=shCharClass,shNumber,shOperator,shExSingleQuote,shSingleQuote,shDoubleQuote,shSpecial,shExpr,shDblBrace,shDeref,shDerefSimple +syn cluster shEchoList contains=shArithmetic,shCommandSub,shDeref,shDerefSimple,shExpr,shExSingleQuote,shSingleQuote,shDoubleQuote,shCtrlSeq +syn cluster shExprList1 contains=shCharClass,shNumber,shOperator,shExSingleQuote,shSingleQuote,shDoubleQuote,shExpr,shDblBrace,shDeref,shDerefSimple,shCtrlSeq syn cluster shExprList2 contains=@shExprList1,@shCaseList,shTest -syn cluster shFunctionList contains=@shCommandSubList,shCaseEsac,shColon,shCommandSub,shCommandSub,shComment,shDo,shEcho,shExpr,shFor,shHereDoc,shIf,shRedir,shSetList,shSource,shStatement,shVariable,shSpecial,shOperator,shFunctionStart +syn cluster shFunctionList contains=@shCommandSubList,shCaseEsac,shColon,shCommandSub,shCommandSub,shComment,shDo,shEcho,shExpr,shFor,shHereDoc,shIf,shRedir,shSetList,shSource,shStatement,shVariable,shOperator,shFunctionStart,shCtrlSeq syn cluster shHereBeginList contains=@shCommandSubList syn cluster shHereList contains=shBeginHere,shHerePayload syn cluster shHereListDQ contains=shBeginHere,@shDblQuoteList,shHerePayload -syn cluster shIdList contains=shCommandSub,shWrapLineOperator,shIdWhiteSpace,shDeref,shDerefSimple,shSpecial,shRedir,shExSingleQuote,shSingleQuote,shDoubleQuote,shExpr +syn cluster shIdList contains=shCommandSub,shWrapLineOperator,shIdWhiteSpace,shDeref,shDerefSimple,shRedir,shExSingleQuote,shSingleQuote,shDoubleQuote,shExpr,shCtrlSeq syn cluster shLoopList contains=@shCaseList,shTestOpr,shExpr,shDblBrace,shConditional,shCaseEsac,shTest syn cluster shSubShList contains=@shCaseList -syn cluster shTestList contains=shCharClass,shComment,shCommandSub,shDeref,shDerefSimple,shDoubleQuote,shExpr,shExpr,shNumber,shOperator,shExSingleQuote,shSingleQuote,shSpecial,shTestOpr,shTest +syn cluster shTestList contains=shCharClass,shComment,shCommandSub,shDeref,shDerefSimple,shDoubleQuote,shExpr,shExpr,shNumber,shOperator,shExSingleQuote,shSingleQuote,shTestOpr,shTest,shCtrlSeq " Echo: {{{1 @@ -98,7 +98,7 @@ syn region shEcho matchgroup=shStatement start="\" skip="\\$" matchgroup syn region shEcho matchgroup=shStatement start="\" skip="\\$" matchgroup=shOperator end="$" matchgroup=NONE end="[<>;&|()]"me=e-1 end="\d[<>]"me=e-2 end="#"me=e-1 contains=@shEchoList " This must be after the strings, so that bla \" be correct -syn region shEmbeddedEcho contained matchgroup=shStatement start="\" skip="\\$" matchgroup=shOperator end="$" matchgroup=NONE end="[<>;&|`)]"me=e-1 end="\d[<>]"me=e-2 end="#"me=e-1 contains=shNumber,shExSingleQuote,shSingleQuote,shDeref,shDerefSimple,shSpecialVar,shSpecial,shOperator,shDoubleQuote,shCharClass +syn region shEmbeddedEcho contained matchgroup=shStatement start="\" skip="\\$" matchgroup=shOperator end="$" matchgroup=NONE end="[<>;&|`)]"me=e-1 end="\d[<>]"me=e-2 end="#"me=e-1 contains=shNumber,shExSingleQuote,shSingleQuote,shDeref,shDerefSimple,shSpecialVar,shOperator,shDoubleQuote,shCharClass,shCtrlSeq " Alias: {{{1 " ===== @@ -142,9 +142,14 @@ syn region shSubSh transparent matchgroup=shSubShRegion start="(" end=")" contai " Tests: {{{1 "======= "syn region shExpr transparent matchgroup=shRange start="\[" skip=+\\\\\|\\$+ end="\]" contains=@shTestList -syn region shExpr matchgroup=shRange start="\[" skip=+\\\\\|\\$+ end="\]" contains=@shTestList -syn region shTest transparent matchgroup=shStatement start="\" skip=+\\\\\|\\$+ matchgroup=NONE end="[;&|]"me=e-1 end="$" contains=@shExprList1 -syn match shTestOpr contained "<=\|>=\|!=\|==\|-.\>\|-\(nt\|ot\|ef\|eq\|ne\|lt\|le\|gt\|ge\)\>\|[!=<>]" +syn region shExpr matchgroup=shRange start="\[" skip=+\\\\\|\\$+ end="\]" contains=@shTestList +syn region shTest transparent matchgroup=shStatement start="\" skip=+\\\\\|\\$+ matchgroup=NONE end="[;&|]"me=e-1 end="$" contains=@shExprList1 +syn match shTestOpr contained "<=\|>=\|!=\|==\|-.\>\|-\(nt\|ot\|ef\|eq\|ne\|lt\|le\|gt\|ge\)\>\|[!<>]" +syn match shTestOpr contained '=' skipwhite nextgroup=shTestDoubleQuote,shTestSingleQuote,shTestPattern +syn match shTestPattern contained '\w\+' +syn match shTestDoubleQuote contained '"[^"]*"' +syn match shTestSingleQuote contained '\\.' +syn match shTestSingleQuote contained "'[^']*'" if exists("b:is_kornshell") || exists("b:is_bash") syn region shDblBrace matchgroup=Delimiter start="\[\[" skip=+\\\\\|\\$+ end="\]\]" contains=@shTestList syn region shDblParen matchgroup=Delimiter start="((" skip=+\\\\\|\\$+ end="))" contains=@shTestList @@ -237,19 +242,18 @@ syn region shColon start="^\s*:" end="$\|" end="#"me=e-1 contains=@shColonList " String And Character Constants: {{{1 "================================ -syn match shNumber "-\=\<\d\+\>" +syn match shNumber "-\=\<\d\+\>#\=" +syn match shCtrlSeq "\\\d\d\d\|\\[abcfnrtv0]" contained if exists("b:is_bash") syn match shSpecial "\\\o\o\o\|\\x\x\x\|\\c.\|\\[abefnrtv]" contained -else - syn match shSpecial "\\\d\d\d\|\\[abcfnrtv0]" contained endif if exists("b:is_bash") syn region shExSingleQuote matchgroup=shOperator start=+\$'+ skip=+\\\\\|\\.+ end=+'+ contains=shStringSpecial,shSpecial else - syn region shExSingleQuote matchGroup=Error start=+\$'+ skip=+\\\\\|\\.+ end=+'+ contains=shStringSpecial,shSpecial + syn region shExSingleQuote matchGroup=Error start=+\$'+ skip=+\\\\\|\\.+ end=+'+ contains=shStringSpecial endif -syn region shSingleQuote matchgroup=shOperator start=+'+ end=+'+ contains=shStringSpecial -syn region shDoubleQuote matchgroup=shOperator start=+"+ skip=+\\"+ end=+"+ contains=@shDblQuoteList,shStringSpecial +syn region shSingleQuote matchgroup=shOperator start=+'+ end=+'+ contains=shStringSpecial,@Spell +syn region shDoubleQuote matchgroup=shOperator start=+"+ skip=+\\"+ end=+"+ contains=@shDblQuoteList,shStringSpecial,@Spell syn match shStringSpecial "[^[:print:]]" contained syn match shSpecial "\\[\\\"\'`$()#]" @@ -257,7 +261,8 @@ syn match shSpecial "\\[\\\"\'`$()#]" "========== syn cluster shCommentGroup contains=shTodo,@Spell syn keyword shTodo contained COMBAK FIXME TODO XXX -syn match shComment "#.*$" contains=@shCommentGroup +syn match shComment "^#.*$" contains=@shCommentGroup +syn match shComment "[^0-9]#.*$" contains=@shCommentGroup " File Redirection Highlighted As Operators: {{{1 "=========================================== @@ -277,7 +282,7 @@ if version < 600 syn region shHereDoc matchgroup=shRedir start="<<-\s*\**\.\**" matchgroup=shRedir end="^\s*\.$" contains=@shDblQuoteList elseif g:sh_fold_enabled - syn region shHereDoc matchgroup=shRedir fold start="<<\s*\z(\S*\)" matchgroup=shRedir end="^\z1\s*$" contains=@shDblQuoteList + syn region shHereDoc matchgroup=shRedir fold start="<<\s*\z(\S*\)" matchgroup=shRedir end="^\z1\s*$" contains=@shDblQuoteList syn region shHereDoc matchgroup=shRedir fold start="<<\s*\"\z(\S*\)\"" matchgroup=shRedir end="^\z1\s*$" syn region shHereDoc matchgroup=shRedir fold start="<<\s*'\z(\S*\)'" matchgroup=shRedir end="^\z1\s*$" syn region shHereDoc matchgroup=shRedir fold start="<<-\s*\z(\S*\)" matchgroup=shRedir end="^\s*\z1\s*$" contains=@shDblQuoteList @@ -289,6 +294,7 @@ elseif g:sh_fold_enabled syn region shHereDoc matchgroup=shRedir fold start="<<-\s*\\\_$\_s*\z(\S*\)" matchgroup=shRedir end="^\s*\z1\s*$" syn region shHereDoc matchgroup=shRedir fold start="<<-\s*\\\_$\_s*\"\z(\S*\)\"" matchgroup=shRedir end="^\s*\z1\s*$" syn region shHereDoc matchgroup=shRedir fold start="<<\s*\\\_$\_s*'\z(\S*\)'" matchgroup=shRedir end="^\z1\s*$" + syn region shHereDoc matchgroup=shRedir fold start="<<\\\z(\S*\)" matchgroup=shRedir end="^\z1\s*$" else syn region shHereDoc matchgroup=shRedir start="<<\s*\\\=\z(\S*\)" matchgroup=shRedir end="^\z1\s*$" contains=@shDblQuoteList @@ -303,6 +309,7 @@ else syn region shHereDoc matchgroup=shRedir start="<<\s*\\\_$\_s*'\z(\S*\)'" matchgroup=shRedir end="^\z1\s*$" syn region shHereDoc matchgroup=shRedir start="<<\s*\\\_$\_s*\"\z(\S*\)\"" matchgroup=shRedir end="^\z1\s*$" syn region shHereDoc matchgroup=shRedir start="<<-\s*\\\_$\_s*\"\z(\S*\)\"" matchgroup=shRedir end="^\s*\z1\s*$" + syn region shHereDoc matchgroup=shRedir start="<<\\\z(\S*\)" matchgroup=shRedir end="^\z1\s*$" endif " Here Strings: {{{1 @@ -317,16 +324,16 @@ syn match shVariable "\<\([bwglsav]:\)\=[a-zA-Z0-9.!@_%+,]*\ze=" nextgroup=shSe syn match shIdWhiteSpace contained "\s" syn match shSetIdentifier contained "=" nextgroup=shPattern,shDeref,shDerefSimple,shDoubleQuote,shSingleQuote,shExSingleQuote if exists("b:is_bash") - syn region shSetList matchgroup=shSet start="\<\(declare\|typeset\|local\|export\|unset\)\>\ze[^/]" end="$" matchgroup=shOperator end="[;&]"me=e-1 matchgroup=NONE end="#\|="me=e-1 contains=@shIdList - syn region shSetList matchgroup=shSet start="\[^/]"me=e-1 end="$" end="\\ze[|)]" matchgroup=shOperator end="[;&]"me=e-1 matchgroup=NONE end="[#=]"me=e-1 contains=@shIdList - syn match shSet "\<\(declare\|typeset\|local\|export\|set\|unset\)$" + syn region shSetList matchgroup=shSet start="\<\(declare\|typeset\|local\|export\|unset\)\>\ze[^/]" end="$" matchgroup=shOperator end="\ze[|);&]"me=e-1 matchgroup=NONE end="#\|="me=e-1 contains=@shIdList + syn region shSetList matchgroup=shSet start="\[^/]"me=e-1 end="$" end="\\ze[|)]" matchgroup=shOperator end="\ze[|);&]"me=e-1 matchgroup=NONE end="[#=]"me=e-1 contains=@shIdList + syn match shSet "\<\(declare\|typeset\|local\|export\|set\|unset\)\>" elseif exists("b:is_kornshell") - syn region shSetList matchgroup=shSet start="\<\(typeset\|export\|unset\)\>\ze[^/]" end="$" matchgroup=shOperator end="[;&]"me=e-1 matchgroup=NONE end="[#=]"me=e-1 contains=@shIdList - syn region shSetList matchgroup=shSet start="\\ze[^/]" end="$\|\ze[})]" matchgroup=shOperator end="[;&]"me=e-1 matchgroup=NONE end="[#=]"me=e-1 contains=@shIdList - syn match shSet "\<\(typeset\|set\|export\|unset\)$" + syn region shSetList matchgroup=shSet start="\<\(typeset\|export\|unset\)\>\ze[^/]" end="$" matchgroup=shOperator end="\ze[|);&]"me=e-1 matchgroup=NONE end="[#=]"me=e-1 contains=@shIdList + syn region shSetList matchgroup=shSet start="\\ze[^/]" end="$\|\ze[})]" matchgroup=shOperator end="\ze[|);&]"me=e-1 matchgroup=NONE end="[#=]"me=e-1 contains=@shIdList + syn match shSet "\<\(typeset\|set\|export\|unset\)\>" else - syn region shSetList matchgroup=shSet start="\<\(set\|export\|unset\)\>\ze[^/]" end="$\|\ze[|)]" matchgroup=shOperator end="[;&]" matchgroup=NONE end="[#=]"me=e-1 contains=@shIdList - syn match shStatement "\<\(set\|export\|unset\)$" + syn region shSetList matchgroup=shSet start="\<\(set\|export\|unset\)\>\ze[^/]" end="$\|\ze[|)]" matchgroup=shOperator end="\ze[|);&]" matchgroup=NONE end="[#=]"me=e-1 contains=@shIdList + syn match shStatement "\<\(set\|export\|unset\)\>" endif " Functions: {{{1 @@ -480,6 +487,9 @@ hi def link shSource shOperator hi def link shStringSpecial shSpecial hi def link shSubShRegion shOperator hi def link shTestOpr shConditional +hi def link shTestPattern shString +hi def link shTestDoubleQuote shString +hi def link shTestSingleQuote shString hi def link shVariable shSetList hi def link shWrapLineOperator shOperator @@ -518,6 +528,7 @@ hi def link shSnglCase Statement hi def link shCommandSub Special hi def link shComment Comment hi def link shConditional Conditional +hi def link shCtrlSeq Special hi def link shExprRegion Delimiter hi def link shFunctionKey Function hi def link shFunctionName Function diff --git a/runtime/syntax/tcsh.vim b/runtime/syntax/tcsh.vim index 12411e89b..83649a751 100644 --- a/runtime/syntax/tcsh.vim +++ b/runtime/syntax/tcsh.vim @@ -1,7 +1,7 @@ " Vim syntax file " Language: C-shell (tcsh) -" Maintainor: Gautam Iyer -" Last Modified: Sat 11 Mar 2006 11:16:47 AM CST +" Maintainer: Gautam Iyer +" Last Modified: Thu 16 Nov 2006 01:07:04 PM PST " " Description: We break up each statement into a "command" and an "end" part. " All groups are either a "command" or part of the "end" of a statement (ie @@ -48,9 +48,10 @@ syn keyword tcshSetEnv nextgroup=tcshEnvEnd setenv unsetenv syn region tcshEnvEnd contained transparent matchgroup=tcshBuiltins start='' skip="\\$" end="$\|;" contains=tcshEnvVar,@tcshStatementEnds " alias and unalias (contains special aliases) -syn keyword tcshAliases contained beemcmd cwdcmd jobcmd helpcommand periodic precmd postcmd shell -syn keyword tcshAlias nextgroup=tcshAliEnd alias unalias -syn region tcshAliEnd contained transparent matchgroup=tcshBuiltins start='' skip="\\$" end="$\|;" contains=tcshAliases,@tcshStatementEnds +syn keyword tcshAliases contained beepcmd cwdcmd jobcmd helpcommand periodic precmd postcmd shell +syn keyword tcshAlias nextgroup=tcshAliCmd skipwhite alias unalias +syn match tcshAliCmd contained nextgroup=tcshAliEnd skipwhite '\v[\w-]+' contains=tcshAliases +syn region tcshAliEnd contained transparent matchgroup=tcshBuiltins start='' skip="\\$" end="$\|;" contains=@tcshStatementEnds " if statements (contains expressions / operators) syn keyword tcshIf nextgroup=tcshIfEnd if @@ -72,10 +73,10 @@ syn match tcshExprEnd contained "\v.*$"hs=e+1 contains=tcshOperator,tcshNumber,@ syn match tcshExprEnd contained "\v.{-};"hs=e contains=tcshOperator,tcshNumber,@tcshVarList " ----- Comments: ----- -syn match tcshComment "#.*" contains=tcshTodo,tcshCommentTi,tcshCommentSp,@Spell -syn match tcshSharpBang "^#! .*$" +syn match tcshComment '#\s.*' contains=tcshTodo,tcshCommentTi,@Spell +syn match tcshComment '\v#($|\S.*)' contains=tcshTodo,tcshCommentTi +syn match tcshSharpBang '^#! .*$' syn match tcshCommentTi contained '\v#\s*\u\w*(\s+\u\w*)*:'hs=s+1 contains=tcshTodo -syn match tcshCommentSp contained '\v<\u{3,}>' contains=tcshTodo syn match tcshTodo contained '\v\c' " ----- Strings ----- @@ -152,6 +153,7 @@ hi def link tcshBuiltins statement hi def link tcshShellVar preproc hi def link tcshEnvVar tcshShellVar hi def link tcshAliases tcshShellVar +hi def link tcshAliCmd identifier hi def link tcshCommands identifier hi def link tcshSet tcshBuiltins hi def link tcshSetEnv tcshBuiltins @@ -165,7 +167,6 @@ hi def link tcshExprOp tcshOperator hi def link tcshExprEnd tcshOperator hi def link tcshComment comment hi def link tcshCommentTi preproc -hi def link tcshCommentSp tcshCommentTi hi def link tcshSharpBang tcshCommentTi hi def link tcshTodo todo hi def link tcshSQuote constant diff --git a/runtime/syntax/tex.vim b/runtime/syntax/tex.vim index 6452e725e..442cdf232 100644 --- a/runtime/syntax/tex.vim +++ b/runtime/syntax/tex.vim @@ -1,8 +1,8 @@ " Vim syntax file " Language: TeX " Maintainer: Dr. Charles E. Campbell, Jr. -" Last Change: Apr 18, 2006 -" Version: 35 +" Last Change: Feb 27, 2007 +" Version: 37 " URL: http://mysite.verizon.net/astronaut/vim/index.html#vimlinks_syntax " " Notes: {{{1 @@ -261,25 +261,25 @@ syn match texSpaceCodeChar "`\\\=.\(\^.\)\==\(\d\|\"\x\{1,6}\|`.\)" contained " Sections, subsections, etc: {{{1 if g:tex_fold_enabled && has("folding") - syn region texDocZone matchgroup=texSection start='\\begin\s*{\s*document\s*}' end='\\end\s*{\s*document\s*}' fold keepend contains=@texFoldGroup,@texDocGroup,@Spell - syn region texPartZone matchgroup=texSection start='\\part\>' end='\n\ze\s*\\part\>' fold keepend contains=@texFoldGroup,@texPartGroup,@Spell - syn region texChapterZone matchgroup=texSection start='\\chapter\>' end='\n\ze\s*\\chapter\>' fold keepend contains=@texFoldGroup,@texChapterGroup,@Spell - syn region texSectionZone matchgroup=texSection start='\\section\>' end='\n\ze\s*\\section\>' fold keepend contains=@texFoldGroup,@texSectionGroup,@Spell - syn region texSubSectionZone matchgroup=texSection start='\\subsection\>' end='\n\ze\s*\\subsection\>' fold keepend contains=@texFoldGroup,@texSubSectionGroup,@Spell - syn region texSubSubSectionZone matchgroup=texSection start='\\subsubsection\>' end='\n\ze\s*\\subsubsection\>' fold keepend contains=@texFoldGroup,@texSubSubSectionGroup,@Spell - syn region texParaZone matchgroup=texSection start='\\paragraph\>' end='\n\ze\s*\\paragraph\>' fold keepend contains=@texFoldGroup,@texParaGroup,@Spell - syn region texSubParaZone matchgroup=texSection start='\\subparagraph\>' end='\n\ze\s*\\subparagraph\>' fold keepend contains=@texFoldGroup,@Spell + syn region texDocZone matchgroup=texSection start='\\begin\s*{\s*document\s*}' end='\\end\s*{\s*document\s*}' fold contains=@texFoldGroup,@texDocGroup,@Spell + syn region texPartZone matchgroup=texSection start='\\part\>' end='\n\ze\s*\\part\>' fold contains=@texFoldGroup,@texPartGroup,@Spell + syn region texChapterZone matchgroup=texSection start='\\chapter\>' end='\n\ze\s*\\chapter\>' fold contains=@texFoldGroup,@texChapterGroup,@Spell + syn region texSectionZone matchgroup=texSection start='\\section\>' end='\n\ze\s*\\section\>' fold contains=@texFoldGroup,@texSectionGroup,@Spell + syn region texSubSectionZone matchgroup=texSection start='\\subsection\>' end='\n\ze\s*\\subsection\>' fold contains=@texFoldGroup,@texSubSectionGroup,@Spell + syn region texSubSubSectionZone matchgroup=texSection start='\\subsubsection\>' end='\n\ze\s*\\subsubsection\>' fold contains=@texFoldGroup,@texSubSubSectionGroup,@Spell + syn region texParaZone matchgroup=texSection start='\\paragraph\>' end='\n\ze\s*\\paragraph\>' fold contains=@texFoldGroup,@texParaGroup,@Spell + syn region texSubParaZone matchgroup=texSection start='\\subparagraph\>' end='\n\ze\s*\\subparagraph\>' fold contains=@texFoldGroup,@Spell syn region texTitle matchgroup=texSection start='\\\%(author\|title\)\>\s*{' end='}' fold contains=@texFoldGroup,@Spell syn region texAbstract matchgroup=texSection start='\\begin\s*{\s*abstract\s*}' end='\\end\s*{\s*abstract\s*}' fold contains=@texFoldGroup,@Spell else - syn region texDocZone matchgroup=texSection start='\\begin\s*{\s*document\s*}' end='\\end\s*{\s*document\s*}' keepend contains=@texFoldGroup,@texDocGroup,@Spell - syn region texPartZone matchgroup=texSection start='\\part\>' end='\n\ze\s*\\part\>' keepend contains=@texFoldGroup,@texPartGroup,@Spell - syn region texChapterZone matchgroup=texSection start='\\chapter\>' end='\n\ze\s*\\chapter\>' keepend contains=@texFoldGroup,@texChapterGroup,@Spell - syn region texSectionZone matchgroup=texSection start='\\section\>' end='\n\ze\s*\\section\>' keepend contains=@texFoldGroup,@texSectionGroup,@Spell - syn region texSubSectionZone matchgroup=texSection start='\\subsection\>' end='\n\ze\s*\\subsection\>' keepend contains=@texFoldGroup,@texSubSectionGroup,@Spell - syn region texSubSubSectionZone matchgroup=texSection start='\\subsubsection\>' end='\n\ze\s*\\subsubsection\>' keepend contains=@texFoldGroup,@texSubSubSectionGroup,@Spell - syn region texParaZone matchgroup=texSection start='\\paragraph\>' end='\n\ze\s*\\paragraph\>' keepend contains=@texFoldGroup,@texParaGroup,@Spell - syn region texSubParaZone matchgroup=texSection start='\\subparagraph\>' end='\n\ze\s*\\subparagraph\>' keepend contains=@texFoldGroup,@Spell + syn region texDocZone matchgroup=texSection start='\\begin\s*{\s*document\s*}' end='\\end\s*{\s*document\s*}' contains=@texFoldGroup,@texDocGroup,@Spell + syn region texPartZone matchgroup=texSection start='\\part\>' end='\n\ze\s*\\part\>' contains=@texFoldGroup,@texPartGroup,@Spell + syn region texChapterZone matchgroup=texSection start='\\chapter\>' end='\n\ze\s*\\chapter\>' contains=@texFoldGroup,@texChapterGroup,@Spell + syn region texSectionZone matchgroup=texSection start='\\section\>' end='\n\ze\s*\\section\>' contains=@texFoldGroup,@texSectionGroup,@Spell + syn region texSubSectionZone matchgroup=texSection start='\\subsection\>' end='\n\ze\s*\\subsection\>' contains=@texFoldGroup,@texSubSectionGroup,@Spell + syn region texSubSubSectionZone matchgroup=texSection start='\\subsubsection\>' end='\n\ze\s*\\subsubsection\>' contains=@texFoldGroup,@texSubSubSectionGroup,@Spell + syn region texParaZone matchgroup=texSection start='\\paragraph\>' end='\n\ze\s*\\paragraph\>' contains=@texFoldGroup,@texParaGroup,@Spell + syn region texSubParaZone matchgroup=texSection start='\\subparagraph\>' end='\n\ze\s*\\subparagraph\>' contains=@texFoldGroup,@Spell syn region texTitle matchgroup=texSection start='\\\%(author\|title\)\>\s*{' end='}' contains=@texFoldGroup,@Spell syn region texAbstract matchgroup=texSection start='\\begin\s*{\s*abstract\s*}' end='\\end\s*{\s*abstract\s*}' contains=@texFoldGroup,@Spell endif @@ -442,7 +442,7 @@ syn match texDefParms contained "#[^{]*" contains=texDefParm nextgroup=texCmdB syn match texDefParm contained "#\d\+" " TeX Lengths: {{{1 -syn match texLength "\<\d\+\(\.\d\+\)\=\s*\(true\)\=\s*\(bp\|cc\|cm\|dd\|em\|ex\|in\|mm\|pc\|pt\|sp\)\>" +syn match texLength "\<\d\+\([.,]\d\+\)\=\s*\(true\)\=\s*\(bp\|cc\|cm\|dd\|em\|ex\|in\|mm\|pc\|pt\|sp\)\>" " TeX String Delimiters: {{{1 syn match texString "\(``\|''\|,,\)" diff --git a/runtime/syntax/vim.vim b/runtime/syntax/vim.vim index 244e0b73e..d5694dae6 100644 --- a/runtime/syntax/vim.vim +++ b/runtime/syntax/vim.vim @@ -1,8 +1,8 @@ " Vim syntax file " Language: Vim 7.0 script " Maintainer: Dr. Charles E. Campbell, Jr. -" Last Change: May 02, 2006 -" Version: 7.0-50 +" Last Change: April 25, 2007 +" Version: 7.0-62 " Automatically generated keyword lists: {{{1 " Quit when a syntax file was already loaded {{{2 @@ -16,20 +16,20 @@ syn keyword vimTodo contained COMBAK FIXME TODO XXX syn cluster vimCommentGroup contains=vimTodo,@Spell " regular vim commands {{{2 -syn keyword vimCommand contained ab[breviate] abc[lear] abo[veleft] al[l] arga[dd] argd[elete] argdo arge[dit] argg[lobal] argl[ocal] ar[gs] argu[ment] as[cii] bad[d] ba[ll] bd[elete] be bel[owright] bf[irst] bl[ast] bm[odified] bn[ext] bN[ext] bo[tright] bp[revious] brea[k] breaka[dd] breakd[el] breakl[ist] br[ewind] bro[wse] bufdo b[uffer] buffers bun[load] bw[ipeout] ca[bbrev] cabc[lear] caddb[uffer] cad[dexpr] caddf[ile] cal[l] cat[ch] cb[uffer] cc ccl[ose] cd ce[nter] cex[pr] cf[ile] cfir[st] cgetb[uffer] cgete[xpr] cg[etfile] c[hange] changes chd[ir] che[ckpath] checkt[ime] cla[st] cl[ist] clo[se] cmapc[lear] cnew[er] cn[ext] cN[ext] cnf[ile] cNf[ile] cnorea[bbrev] col[der] colo[rscheme] comc[lear] comp[iler] conf[irm] con[tinue] cope[n] co[py] cpf[ile] cp[revious] cq[uit] cr[ewind] cuna[bbrev] cu[nmap] cw[indow] debugg[reedy] delc[ommand] d[elete] DeleteFirst delf[unction] delm[arks] diffg[et] diffoff diffpatch diffpu[t] diffsplit diffthis diffu[pdate] dig[raphs] di[splay] dj[ump] dl[ist] dr[op] ds[earch] dsp[lit] earlier echoe[rr] echom[sg] echon e[dit] el[se] elsei[f] em[enu] emenu* endfo[r] endf[unction] en[dif] endt[ry] endw[hile] ene[w] ex exi[t] Explore exu[sage] f[ile] files filetype fina[lly] fin[d] fini[sh] fir[st] fix[del] fo[ld] foldc[lose] folddoc[losed] foldd[oopen] foldo[pen] for fu[nction] go[to] gr[ep] grepa[dd] ha[rdcopy] h[elp] helpf[ind] helpg[rep] helpt[ags] Hexplore hid[e] his[tory] I ia[bbrev] iabc[lear] if ij[ump] il[ist] imapc[lear] inorea[bbrev] is[earch] isp[lit] iuna[bbrev] iu[nmap] j[oin] ju[mps] k keepalt keepj[umps] kee[pmarks] laddb[uffer] lad[dexpr] laddf[ile] lan[guage] la[st] later lb[uffer] lc[d] lch[dir] lcl[ose] le[ft] lefta[bove] lex[pr] lf[ile] lfir[st] lgetb[uffer] lgete[xpr] lg[etfile] lgr[ep] lgrepa[dd] lh[elpgrep] l[ist] ll lla[st] lli[st] lmak[e] lm[ap] lmapc[lear] lnew[er] lne[xt] lN[ext] lnf[ile] lNf[ile] ln[oremap] lo[adview] loc[kmarks] lockv[ar] lol[der] lop[en] lpf[ile] lp[revious] lr[ewind] ls lt[ag] lu[nmap] lv[imgrep] lvimgrepa[dd] lw[indow] mak[e] ma[rk] marks mat[ch] menut[ranslate] mk[exrc] mks[ession] mksp[ell] mkvie[w] mkv[imrc] mod[e] m[ove] mzf[ile] mz[scheme] nbkey NetrwSettings new n[ext] N[ext] nmapc[lear] noh[lsearch] norea[bbrev] Nread nu[mber] nun[map] Nw omapc[lear] on[ly] o[pen] opt[ions] ou[nmap] pc[lose] ped[it] pe[rl] perld[o] po[p] popu popu[p] pp[op] pre[serve] prev[ious] p[rint] P[rint] profd[el] prof[ile] prompt promptf[ind] promptr[epl] ps[earch] pta[g] ptf[irst] ptj[ump] ptl[ast] ptn[ext] ptN[ext] ptp[revious] ptr[ewind] pts[elect] pu[t] pw[d] pyf[ile] py[thon] qa[ll] q[uit] quita[ll] r[ead] rec[over] redi[r] red[o] redr[aw] redraws[tatus] reg[isters] res[ize] ret[ab] retu[rn] rew[ind] ri[ght] rightb[elow] rub[y] rubyd[o] rubyf[ile] ru[ntime] rv[iminfo] sal[l] san[dbox] sa[rgument] sav[eas] sba[ll] sbf[irst] sbl[ast] sbm[odified] sbn[ext] sbN[ext] sbp[revious] sbr[ewind] sb[uffer] scripte[ncoding] scrip[tnames] se[t] setf[iletype] setg[lobal] setl[ocal] Sexplore sf[ind] sfir[st] sh[ell] sign sil[ent] sim[alt] sla[st] sl[eep] sm[agic] sm[ap] smapc[lear] sme smenu sn[ext] sN[ext] sni[ff] sno[magic] snor[emap] snoreme snoremenu sor[t] so[urce] spelld[ump] spe[llgood] spelli[nfo] spellr[epall] spellu[ndo] spellw[rong] sp[lit] spr[evious] sre[wind] sta[g] startg[replace] star[tinsert] startr[eplace] stj[ump] st[op] stopi[nsert] sts[elect] sun[hide] sunm[ap] sus[pend] sv[iew] syncbind t tab tabc[lose] tabd[o] tabe[dit] tabf[ind] tabfir[st] tabl[ast] tabmove tabnew tabn[ext] tabN[ext] tabo[nly] tabp[revious] tabr[ewind] tabs ta[g] tags tc[l] tcld[o] tclf[ile] te[aroff] tf[irst] the th[row] tj[ump] tl[ast] tm tm[enu] tn[ext] tN[ext] to[pleft] tp[revious] tr[ewind] try ts[elect] tu tu[nmenu] una[bbreviate] u[ndo] undoj[oin] undol[ist] unh[ide] unlo[ckvar] unm[ap] up[date] verb[ose] ve[rsion] vert[ical] Vexplore vie[w] vim[grep] vimgrepa[dd] vi[sual] viu[sage] vmapc[lear] vne[w] vs[plit] vu[nmap] wa[ll] wh[ile] winc[md] windo winp[os] win[size] wn[ext] wN[ext] wp[revious] wq wqa[ll] w[rite] ws[verb] wv[iminfo] X xa[ll] x[it] xm[ap] xmapc[lear] xme xmenu XMLent XMLns xn[oremap] xnoreme xnoremenu xu[nmap] y[ank] +syn keyword vimCommand contained ab[breviate] abc[lear] abo[veleft] al[l] arga[dd] argd[elete] argdo arge[dit] argg[lobal] argl[ocal] ar[gs] argu[ment] as[cii] bad[d] ba[ll] bd[elete] be bel[owright] bf[irst] bl[ast] bm[odified] bn[ext] bN[ext] bo[tright] bp[revious] brea[k] breaka[dd] breakd[el] breakl[ist] br[ewind] bro[wse] bufdo b[uffer] buffers bun[load] bw[ipeout] ca[bbrev] cabc[lear] caddb[uffer] cad[dexpr] caddf[ile] cal[l] cat[ch] cb[uffer] cc ccl[ose] cd ce[nter] cex[pr] cf[ile] cfir[st] cgetb[uffer] cgete[xpr] cg[etfile] c[hange] changes chd[ir] che[ckpath] checkt[ime] cla[st] cl[ist] clo[se] cmapc[lear] cnew[er] cn[ext] cN[ext] cnf[ile] cNf[ile] cnorea[bbrev] col[der] colo[rscheme] comc[lear] comp[iler] conf[irm] con[tinue] cope[n] co[py] cpf[ile] cp[revious] cq[uit] cr[ewind] cuna[bbrev] cu[nmap] cw[indow] debugg[reedy] delc[ommand] d[elete] DeleteFirst delf[unction] delm[arks] diffg[et] diffoff diffpatch diffpu[t] diffsplit diffthis diffu[pdate] dig[raphs] di[splay] dj[ump] dl[ist] dr[op] ds[earch] dsp[lit] earlier echoe[rr] echom[sg] echon e[dit] el[se] elsei[f] em[enu] emenu* endfo[r] endf[unction] en[dif] endt[ry] endw[hile] ene[w] ex exi[t] Explore exu[sage] f[ile] files filetype fina[lly] fin[d] fini[sh] fir[st] fix[del] fo[ld] foldc[lose] folddoc[losed] foldd[oopen] foldo[pen] for fu[nction] go[to] gr[ep] grepa[dd] ha[rdcopy] h[elp] helpf[ind] helpg[rep] helpt[ags] Hexplore hid[e] his[tory] I ia[bbrev] iabc[lear] if ij[ump] il[ist] imapc[lear] inorea[bbrev] is[earch] isp[lit] iuna[bbrev] iu[nmap] j[oin] ju[mps] k keepalt keepj[umps] kee[pmarks] laddb[uffer] lad[dexpr] laddf[ile] lan[guage] la[st] later lb[uffer] lc[d] lch[dir] lcl[ose] le[ft] lefta[bove] lex[pr] lf[ile] lfir[st] lgetb[uffer] lgete[xpr] lg[etfile] lgr[ep] lgrepa[dd] lh[elpgrep] l[ist] ll lla[st] lli[st] lmak[e] lm[ap] lmapc[lear] lnew[er] lne[xt] lN[ext] lnf[ile] lNf[ile] ln[oremap] lo[adview] loc[kmarks] lockv[ar] lol[der] lop[en] lpf[ile] lp[revious] lr[ewind] ls lt[ag] lu[nmap] lv[imgrep] lvimgrepa[dd] lw[indow] mak[e] ma[rk] marks mat[ch] menut[ranslate] mk[exrc] mks[ession] mksp[ell] mkvie[w] mkv[imrc] mod[e] m[ove] mzf[ile] mz[scheme] nbkey NetrwSettings new n[ext] N[ext] nmapc[lear] noh[lsearch] norea[bbrev] Nread nu[mber] nun[map] Nw omapc[lear] on[ly] o[pen] opt[ions] ou[nmap] pc[lose] ped[it] pe[rl] perld[o] po[p] popu popu[p] pp[op] pre[serve] prev[ious] p[rint] P[rint] profd[el] prof[ile] prompt promptf[ind] promptr[epl] ps[earch] pta[g] ptf[irst] ptj[ump] ptl[ast] ptn[ext] ptN[ext] ptp[revious] ptr[ewind] pts[elect] pu[t] pw[d] pyf[ile] py[thon] qa[ll] q[uit] quita[ll] r[ead] rec[over] redi[r] red[o] redr[aw] redraws[tatus] reg[isters] res[ize] ret[ab] retu[rn] rew[ind] ri[ght] rightb[elow] rub[y] rubyd[o] rubyf[ile] ru[ntime] rv[iminfo] sal[l] san[dbox] sa[rgument] sav[eas] sba[ll] sbf[irst] sbl[ast] sbm[odified] sbn[ext] sbN[ext] sbp[revious] sbr[ewind] sb[uffer] scripte[ncoding] scrip[tnames] se[t] setf[iletype] setg[lobal] setl[ocal] Sexplore sf[ind] sfir[st] sh[ell] sign sil[ent] sim[alt] sla[st] sl[eep] sm[agic] sm[ap] smapc[lear] sme smenu sn[ext] sN[ext] sni[ff] sno[magic] snor[emap] snoreme snoremenu sor[t] so[urce] spelld[ump] spe[llgood] spelli[nfo] spellr[epall] spellu[ndo] spellw[rong] sp[lit] spr[evious] sre[wind] sta[g] startg[replace] star[tinsert] startr[eplace] stj[ump] st[op] stopi[nsert] sts[elect] sun[hide] sunm[ap] sus[pend] sv[iew] syncbind t tab tabc[lose] tabd[o] tabe[dit] tabf[ind] tabfir[st] tabl[ast] tabm[ove] tabnew tabn[ext] tabN[ext] tabo[nly] tabp[revious] tabr[ewind] tabs ta[g] tags tc[l] tcld[o] tclf[ile] te[aroff] tf[irst] the th[row] tj[ump] tl[ast] tm tm[enu] tn[ext] tN[ext] to[pleft] tp[revious] tr[ewind] try ts[elect] tu tu[nmenu] una[bbreviate] u[ndo] undoj[oin] undol[ist] unh[ide] unlo[ckvar] unm[ap] up[date] verb[ose] ve[rsion] vert[ical] Vexplore vie[w] vim[grep] vimgrepa[dd] vi[sual] viu[sage] vmapc[lear] vne[w] vs[plit] vu[nmap] wa[ll] wh[ile] winc[md] windo winp[os] win[size] wn[ext] wN[ext] wp[revious] wq wqa[ll] w[rite] ws[verb] wv[iminfo] X xa[ll] x[it] xm[ap] xmapc[lear] xme xmenu XMLent XMLns xn[oremap] xnoreme xnoremenu xu[nmap] y[ank] syn match vimCommand contained "\