Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

updated for version 7.2a

  • Loading branch information...
commit 490fa977229f7db630a7d4c08b1d7452220835b4 1 parent d87f8c5
vimboss authored
Showing with 39,117 additions and 1,365 deletions.
  1. +346 −273 runtime/autoload/getscript.vim
  2. +8 −6 runtime/autoload/syntaxcomplete.vim
  3. +6 −4 runtime/autoload/xmlcomplete.vim
  4. +1 −1  runtime/compiler/ruby.vim
  5. +12 −7 runtime/doc/cmdline.txt
  6. +1 −1  runtime/doc/debugger.txt
  7. +1 −1  runtime/doc/develop.txt
  8. +3 −3 runtime/doc/digraph.txt
  9. +14 −5 runtime/doc/editing.txt
  10. +1 −1  runtime/doc/gui_w16.txt
  11. +1 −1  runtime/doc/gui_w32.txt
  12. +1 −1  runtime/doc/if_mzsch.txt
  13. +1 −1  runtime/doc/if_ole.txt
  14. +1 −1  runtime/doc/if_perl.txt
  15. +1 −1  runtime/doc/if_pyth.txt
  16. +122 −8 runtime/doc/indent.txt
  17. +3 −3 runtime/doc/insert.txt
  18. +316 −201 runtime/doc/netbeans.txt
  19. +1 −1  runtime/doc/os_beos.txt
  20. +1 −1  runtime/doc/os_risc.txt
  21. +1 −1  runtime/doc/os_unix.txt
  22. +18 −11 runtime/doc/pattern.txt
  23. +8 −2 runtime/doc/pi_getscript.txt
  24. +24 −14 runtime/doc/pi_tar.txt
  25. +76 −13 runtime/doc/pi_vimball.txt
  26. +15 −7 runtime/doc/pi_zip.txt
  27. +26 −14 runtime/doc/quickref.txt
  28. +6 −6 runtime/doc/sponsor.txt
  29. +10 −11 runtime/doc/uganda.txt
  30. +1 −1  runtime/doc/usr_02.txt
  31. +1 −1  runtime/doc/usr_08.txt
  32. +1 −1  runtime/doc/usr_09.txt
  33. +31 −12 runtime/doc/usr_41.txt
  34. +4 −4 runtime/doc/usr_42.txt
  35. +1 −1  runtime/doc/usr_44.txt
  36. +1 −1  runtime/doc/usr_90.txt
  37. +73 −12 runtime/ftplugin/debchangelog.vim
  38. +40 −0 runtime/ftplugin/dtrace.vim
  39. +1 −1  runtime/ftplugin/eruby.vim
  40. +34 −0 runtime/ftplugin/git.vim
  41. +6 −0 runtime/ftplugin/gitsendemail.vim
  42. +40 −0 runtime/ftplugin/msmessages.vim
  43. +385 −189 runtime/ftplugin/ocaml.vim
  44. +17 −10 runtime/ftplugin/sql.vim
  45. +206 −0 runtime/indent/erlang.vim
  46. +2 −2 runtime/indent/eruby.vim
  47. +35 −0 runtime/indent/gitconfig.vim
  48. +19 −15 runtime/indent/lua.vim
  49. +84 −0 runtime/keymap/croatian_iso-8859-2.vim
  50. +89 −0 runtime/keymap/russian-dvorak.vim
  51. +6 −6 runtime/keymap/russian-yawerty.vim
  52. +92 −0 runtime/keymap/ukrainian-dvorak.vim
  53. +3 −0  runtime/lang/menu_eo_eo.utf-8.vim
  54. +3 −0  runtime/lang/menu_fi_fi.utf-8.vim
  55. +7 −2 runtime/macros/editexisting.vim
  56. +3 −3 runtime/plugin/zipPlugin.vim
  57. +2 −2 runtime/spell/nl/main.aap
  58. +31,193 −3 runtime/spell/nl/nl_NL.diff
  59. +29 −6 runtime/spell/pt/pt_PT.diff
  60. +2 −2 runtime/syntax/arch.vim
  61. +14 −15 runtime/syntax/automake.vim
  62. +6 −21 runtime/syntax/b.vim
  63. +17 −7 runtime/syntax/c.vim
  64. +194 −124 runtime/syntax/cf.vim
  65. +49 −11 runtime/syntax/conaryrecipe.vim
  66. +72 −0 runtime/syntax/cuda.vim
  67. +9 −6 runtime/syntax/debchangelog.vim
  68. +2 −2 runtime/syntax/elinks.vim
  69. +45 −18 runtime/syntax/forth.vim
  70. +31 −0 runtime/syntax/gitrebase.vim
  71. +2 −2 runtime/syntax/gpg.vim
  72. +2 −2 runtime/syntax/lftp.vim
  73. +53 −0 runtime/syntax/mmp.vim
  74. +5 −8 runtime/syntax/objcpp.vim
  75. +1 −1  runtime/syntax/php.vim
  76. +2 −2 runtime/syntax/pinfo.vim
  77. +4 −4 runtime/syntax/prolog.vim
  78. +60 −0 runtime/syntax/promela.vim
  79. +191 −0 runtime/syntax/reva.vim
  80. +2 −2 runtime/syntax/rnc.vim
  81. +6 −2 runtime/syntax/sh.vim
  82. +35 −25 runtime/syntax/tex.vim
  83. +140 −70 runtime/syntax/vim.vim
  84. +94 −0 runtime/syntax/voscm.vim
  85. +10 −4 runtime/syntax/xpm2.vim
  86. +132 −16 runtime/tutor/README.txt
  87. BIN  runtime/tutor/README_ami.txt.info
  88. BIN  runtime/tutor/README_amibin.txt.info
  89. +154 −0 runtime/tutor/README_dos.txt
  90. +8 −0 runtime/tutor/README_mac.txt
  91. BIN  runtime/tutor/runtime.info
  92. +66 −0 runtime/tutor/runtime/evim.vim
  93. +59 −0 runtime/tutor/runtime/gvimrc_example.vim
  94. BIN  runtime/tutor/runtime/icons.info
  95. +351 −0 runtime/tutor/runtime/scripts.vim
  96. +569 −0 runtime/tutor/runtime/synmenu.vim
  97. BIN  runtime/tutor/runtime/vim48x48.png
  98. +980 −0 runtime/tutor/tutor.de.utf-8
  99. +815 −0 runtime/tutor/tutor.el.cp737
  100. +972 −0 runtime/tutor/tutor.hr
  101. +80 −0 runtime/tutor/uninstal.txt
  102. +2 −2 src/GvimExt/GvimExt.reg
  103. +19 −7 src/Makefile
  104. +17 −5 src/feature.h
  105. +4 −7 src/fileio.c
  106. +3 −1 src/globals.h
  107. +1 −1  src/gui.c
  108. +1 −1  src/gui.h
  109. +1 −1  src/gui_athena.c
  110. +12 −6 src/mbyte.c
  111. +5 −0 src/msvc2008.bat
  112. +162 −9 src/os_unix.c
  113. +0 −3  src/os_win32.c
  114. +3 −0  src/os_win32.h
  115. +4 −0 src/po/Make_cyg.mak
  116. +8 −2 src/po/Makefile
  117. +177 −62 src/po/ja.po
  118. +10 −11 src/po/pl.UTF-8.po
  119. +7 −7 src/po/sk.po
  120. +2 −2 src/po/vi.po
  121. +1 −1  src/po/zh_CN.UTF-8.po
  122. +4 −4 src/po/zh_TW.UTF-8.po
  123. +6 −17 src/tag.c
View
619 runtime/autoload/getscript.vim
@@ -1,8 +1,8 @@
" ---------------------------------------------------------------------
" getscript.vim
" Author: Charles E. Campbell, Jr.
-" Date: May 11, 2007
-" Version: 27
+" Date: May 30, 2008
+" Version: 30
" Installing: :help glvs-install
" Usage: :help glvs
"
@@ -11,7 +11,7 @@
" ---------------------------------------------------------------------
" Initialization: {{{1
" if you're sourcing this file, surely you can't be
-" expecting vim to be in its vi-compatible mode
+" 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
@@ -23,11 +23,44 @@ set cpo&vim
if exists("g:loaded_getscript")
finish
endif
-let g:loaded_getscript= "v27"
+let g:loaded_getscript= "v30"
+
+" ---------------------------
+" Global Variables: {{{1
+" ---------------------------
+" Cygwin Detection ------- {{{2
+if !exists("g:getscript_cygwin")
+ if has("win32") || has("win95") || has("win64") || has("win16")
+ if &shell =~ '\%(\<bash\>\|\<zsh\>\)\%(\.exe\)\=$'
+ let g:getscript_cygwin= 1
+ else
+ let g:getscript_cygwin= 0
+ endif
+ else
+ let g:getscript_cygwin= 0
+ endif
+endif
+" shell quoting character {{{2
+if exists("g:netrw_shq") && !exists("g:getscript_shq")
+ let g:getscript_shq= g:netrw_shq
+elseif !exists("g:getscript_shq")
+ if exists("&shq") && &shq != ""
+ let g:getscript_shq= &shq
+ elseif exists("&sxq") && &sxq != ""
+ let g:getscript_shq= &sxq
+ elseif has("win32") || has("win95") || has("win64") || has("win16")
+ if g:getscript_cygwin
+ let g:getscript_shq= "'"
+ else
+ let g:getscript_shq= '"'
+ endif
+ else
+ let g:getscript_shq= "'"
+ endif
+" call Decho("g:getscript_shq<".g:getscript_shq.">")
+endif
-" ---------------------------------------------------------------------
-" Global Variables: {{{1
-" allow user to change the command for obtaining scripts (does fetch work?)
+" wget vs curl {{{2
if !exists("g:GetLatestVimScripts_wget")
if executable("wget")
let g:GetLatestVimScripts_wget= "wget"
@@ -94,262 +127,6 @@ 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\<CR>"
- 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 up to 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*<td class.*src_id=\(\d\+\)">\([^<]\+\)<.*$'
- let latestsrcid= substitute(getline("."),srcidpat,'\1','')
- let sname = substitute(getline("."),srcidpat,'\2','') " script name actually downloaded
-" call Decho("srcidpat<".srcidpat."> latestsrcid<".latestsrcid."> sname<".sname.">")
- 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." sname<".sname.">")
-
- " has the plugin's most-recent srcid increased, which indicates
- " that it has been updated
- if latestsrcid > srcid
-" call Decho("[latestsrcid=".latestsrcid."] <= [srcid=".srcid."]: need to update <".sname.">")
-
- let s:downloads= s:downloads + 1
- if sname == bufname("%")
- " GetLatestVimScript has to be careful about downloading itself
- let sname= "NEW_".sname
- endif
-
- " the plugin has been updated since we last obtained it, so download a new copy
-" call Decho("...downloading new <".sname.">")
- echomsg "...downloading new <".sname.">"
- 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." ".sname.' "'.'http://vim.sf.net/scripts/download_script.php?src_id='.latestsrcid.'"')
- exe "silent !".g:GetLatestVimScripts_wget." ".g:GetLatestVimScripts_options." ".sname.' "'.'http://vim.sf.net/scripts/download_script.php?src_id='.latestsrcid.'"'
- else
-" call Decho("unix: silent !".g:GetLatestVimScripts_wget." ".g:GetLatestVimScripts_options." ".sname." '".'http://vim.sf.net/scripts/download_script.php?src_id='.latestsrcid."'")
- exe "silent !".g:GetLatestVimScripts_wget." ".g:GetLatestVimScripts_options." ".sname." '".'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(".sname.")=".filereadable(sname))
- if filereadable(sname)
-" call Decho("move <".sname."> to ".s:autoinstall)
- exe "silent !".g:GetLatestVimScripts_mv." ".sname." ".s:autoinstall
- let curdir= escape(substitute(getcwd(),'\','/','ge'),"|[]*'\" #")
-" call Decho("exe cd ".s:autoinstall)
- exe "cd ".s:autoinstall
-
- " decompress
- if sname =~ '\.bz2$'
-" call Decho("decompress: attempt to bunzip2 ".sname)
- exe "silent !bunzip2 ".sname
- let sname= substitute(sname,'\.bz2$','','')
-" call Decho("decompress: new sname<".sname."> after bunzip2")
- elseif sname =~ '\.gz$'
-" call Decho("decompress: attempt to gunzip ".sname)
- exe "silent !gunzip ".sname
- let sname= substitute(sname,'\.gz$','','')
-" call Decho("decompress: new sname<".sname."> after gunzip")
- endif
-
- " distribute archive(.zip, .tar, .vba) contents
- if sname =~ '\.zip$'
-" call Decho("dearchive: attempt to unzip ".sname)
- exe "silent !unzip -o ".sname
- elseif sname =~ '\.tar$'
-" call Decho("dearchive: attempt to untar ".sname)
- exe "silent !tar -xvf ".sname
- elseif sname =~ '\.vba$'
-" call Decho("dearchive: attempt to handle a vimball: ".sname)
- silent 1split
- exe "silent e ".sname
- silent so %
- silent q
- endif
-
- if sname =~ '.vim$'
-" call Decho("dearchive: attempt to simply move ".sname." to plugin")
- exe "silent !".g:GetLatestVimScripts_mv." ".sname." plugin"
- endif
-
- " helptags step
- let docdir= substitute(&rtp,',.*','','e')."/doc"
-" call Decho("helptags: docdir<".docdir.">")
- exe "helptags ".docdir
- exe "cd ".curdir
- endif
- if fname !~ ':AutoInstall:'
- let modline=scriptid." ".latestsrcid." :AutoInstall: ".fname.cmmnt
- else
- let modline=scriptid." ".latestsrcid." ".fname.cmmnt
- endif
- else
- let modline=scriptid." ".latestsrcid." ".fname.cmmnt
- endif
-
- " update the data in the <GetLatestVimScripts.dat> file
- call setline(line("."),modline)
-" call Decho("update data in ".expand("%")."#".line(".").": modline<".modline.">")
-" else " Decho
-" call Decho("[latestsrcid=".latestsrcid."] <= [srcid=".srcid."], no need to update")
- 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
@@ -409,9 +186,11 @@ fun! getscript#GetLatestVimScripts()
" record current directory, change to datadir, open split window with
" datafile
let origdir= getcwd()
- exe "cd ".escape(substitute(datadir,'\','/','ge'),"|[]*'\" #")
+" call Decho("exe cd ".fnameescape(substitute(datadir,'\','/','ge')))
+ exe "cd ".fnameescape(substitute(datadir,'\','/','ge'))
split
- exe "e ".escape(substitute(datafile,'\','/','ge'),"|[]*'\" #")
+" call Decho("exe e ".fnameescape(substitute(datafile,'\','/','ge')))
+ exe "e ".fnameescape(substitute(datafile,'\','/','ge'))
res 1000
let s:downloads = 0
let s:downerrors= 0
@@ -421,36 +200,41 @@ fun! getscript#GetLatestVimScripts()
" call Decho("searching plugins for GetLatestVimScripts dependencies")
let lastline = line("$")
" call Decho("lastline#".lastline)
- let plugins = split(globpath(&rtp,"plugin/*.vim"))
+ let plugins = split(globpath(&rtp,"plugin/*.vim"),'\n')
let foundscript = 0
let firstdir= ""
for plugin in plugins
+" call Decho("plugin<".plugin.">")
" don't process plugins in system directories
if firstdir == ""
let firstdir= substitute(plugin,'[/\\][^/\\]\+$','','')
-" call Decho("firstdir<".firstdir.">")
+" call Decho("setting firstdir<".firstdir.">")
else
let curdir= substitute(plugin,'[/\\][^/\\]\+$','','')
" call Decho("curdir<".curdir.">")
if curdir != firstdir
+" call Decho("skipping subsequent plugins: curdir<".curdir."> != firstdir<".firstdir.">")
break
endif
endif
" read plugin in
+ " evidently a :r creates a new buffer (the "#" buffer) that is subsequently unused -- bwiping it
$
" call Decho(" ")
" call Decho(".dependency checking<".plugin."> line$=".line("$"))
- exe "silent r ".plugin
+" call Decho("exe silent r ".fnameescape(plugin))
+ exe "silent r ".fnameescape(plugin)
+ exe "silent bwipe ".bufnr("#")
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
" call Decho("..newscript<".newscript.">")
- " don't process ""GetLatestVimScripts lines
+ " don't process ""GetLatestVimScripts lines -- those that have been doubly-commented out
if newscript !~ '^"'
" found a "GetLatestVimScripts: # #" line in the script; check if its already in the datafile
let curline = line(".")
@@ -485,14 +269,15 @@ fun! getscript#GetLatestVimScripts()
endfor
" call Decho("--- end dependency checking loop --- foundscript=".foundscript)
" call Decho(" ")
+" call Dredir("BUFFER TEST (GetLatestVimScripts 1)","ls!")
if foundscript == 0
- set nomod
+ setlocal nomod
endif
" Check on out-of-date scripts using GetLatest/GetLatestVimScripts.dat
" call Decho("begin: checking out-of-date scripts using datafile<".datafile.">")
- set lz
+ setlocal lz
1
" /^-----/,$g/^\s*\d/call Decho(getline("."))
1
@@ -529,14 +314,302 @@ fun! getscript#GetLatestVimScripts()
q
" restore events and current directory
- exe "cd ".escape(substitute(origdir,'\','/','ge'),"|[]*'\" #")
+ exe "cd ".fnameescape(substitute(origdir,'\','/','ge'))
let &ei= eikeep
- set nolz
+ setlocal nolz
+" call Dredir("BUFFER TEST (GetLatestVimScripts 2)","ls!")
" call Dret("GetLatestVimScripts : did ".s:downloads." downloads")
endfun
+
+" ---------------------------------------------------------------------
+" 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 rega= @a
+ 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*#'
+ let @a= rega
+" 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
+ let @a= rega
+" call Dret("GetOneScript : skipping a scriptid==srcid==0 line")
+ return
+ endif
+
+ let doautoinstall= 0
+ if fname =~ ":AutoInstall:"
+" call Decho("case AutoInstall: fname<".fname.">")
+ 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\<CR>"
+ redraw!
+" call Decho('considering <'.aicmmnt.'> scriptid='.scriptid.' srcid='.srcid)
+ echo '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 up to 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("new|exe silent r!".g:GetLatestVimScripts_wget." ".g:GetLatestVimScripts_options." ".s:Escape(tmpfile).' '.s:Escape(scriptaddr)."|bw!")
+ new|exe "silent r!".g:GetLatestVimScripts_wget." ".g:GetLatestVimScripts_options." ".s:Escape(tmpfile).' '.s:Escape(scriptaddr)|bw!
+ else
+" call Decho("exe silent !".g:GetLatestVimScripts_wget." ".g:GetLatestVimScripts_options." ".s:Escape(tmpfile)." ".s:Escape(scriptaddr))
+ exe "silent !".g:GetLatestVimScripts_wget." ".g:GetLatestVimScripts_options." ".s:Escape(tmpfile)." ".s:Escape(scriptaddr)
+ endif
+ if itry == 1
+ exe "silent vsplit ".fnameescape(tmpfile)
+ else
+ silent! e %
+ endif
+ setlocal bh=wipe
+
+ " 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")
+ let @a= rega
+ 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.">"
+ let @a= rega
+" call Dret("GetOneScript : srch for /src_id/ failed")
+ return
+ endif
+" call Decho('found "src_id=" in description page')
+
+ let srcidpat = '^\s*<td class.*src_id=\(\d\+\)">\([^<]\+\)<.*$'
+ let latestsrcid= substitute(getline("."),srcidpat,'\1','')
+ let sname = substitute(getline("."),srcidpat,'\2','') " script name actually downloaded
+" call Decho("srcidpat<".srcidpat."> latestsrcid<".latestsrcid."> sname<".sname.">")
+ 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." sname<".sname.">")
+
+ " has the plugin's most-recent srcid increased, which indicates
+ " that it has been updated
+ if latestsrcid > srcid
+" call Decho("[latestsrcid=".latestsrcid."] <= [srcid=".srcid."]: need to update <".sname.">")
+
+ let s:downloads= s:downloads + 1
+ if sname == bufname("%")
+ " GetLatestVimScript has to be careful about downloading itself
+ let sname= "NEW_".sname
+ endif
+
+ " the plugin has been updated since we last obtained it, so download a new copy
+" call Decho("...downloading new <".sname.">")
+ echomsg "...downloading new <".sname.">"
+ if has("win32") || has("win16") || has("win95")
+" call Decho("new|exe silent r!".g:GetLatestVimScripts_wget." ".g:GetLatestVimScripts_options." ".s:Escape(sname)." ".s:Escape('http://vim.sf.net/scripts/download_script.php?src_id='.latestsrcid)."|q")
+ new|exe "silent r!".g:GetLatestVimScripts_wget." ".g:GetLatestVimScripts_options." ".s:Escape(sname)." ".s:Escape('http://vim.sf.net/scripts/download_script.php?src_id='.latestsrcid)|q
+ else
+" call Decho("exe silent !".g:GetLatestVimScripts_wget." ".g:GetLatestVimScripts_options." ".s:Escape(sname)." ".s:Escape('http://vim.sf.net/scripts/download_script.php?src_id='))
+ exe "silent !".g:GetLatestVimScripts_wget." ".g:GetLatestVimScripts_options." ".s:Escape(sname)." ".s:Escape('http://vim.sf.net/scripts/download_script.php?src_id=')
+ endif
+
+ " AutoInstall: only if doautoinstall has been requested by the plugin itself
+ if doautoinstall
+" call Decho("attempting to do autoinstall: getcwd<".getcwd()."> filereadable(".sname.")=".filereadable(sname))
+ if filereadable(sname)
+ call Decho("exe silent !".g:GetLatestVimScripts_mv." ".s:Escape(sname)." ".s:Escape(s:autoinstall))
+ exe "silent !".g:GetLatestVimScripts_mv." ".s:Escape(sname)." ".s:Escape(s:autoinstall)
+ let curdir = escape(substitute(getcwd(),'\','/','ge'),"|[]*'\" #")
+ let installdir= curdir."/Installed"
+ if !isdirectory(installdir)
+ call mkdir(installdir)
+ endif
+" call Decho("exe cd ".fnameescape(s:autoinstall))
+ exe "cd ".fnameescape(s:autoinstall)
+
+ " decompress
+ if sname =~ '\.bz2$'
+" call Decho("decompress: attempt to bunzip2 ".sname)
+ exe "silent !bunzip2 ".s:Escape(sname)
+ let sname= substitute(sname,'\.bz2$','','')
+" call Decho("decompress: new sname<".sname."> after bunzip2")
+ elseif sname =~ '\.gz$'
+" call Decho("decompress: attempt to gunzip ".sname)
+ exe "silent !gunzip ".s:Escape(sname)
+ let sname= substitute(sname,'\.gz$','','')
+" call Decho("decompress: new sname<".sname."> after gunzip")
+ endif
+
+ " distribute archive(.zip, .tar, .vba) contents
+ if sname =~ '\.zip$'
+" call Decho("dearchive: attempt to unzip ".sname)
+ exe "silent !unzip -o ".s:Escape(sname)
+ elseif sname =~ '\.tar$'
+" call Decho("dearchive: attempt to untar ".sname)
+ exe "silent !tar -xvf ".s:Escape(sname)
+ elseif sname =~ '\.vba$'
+" call Decho("dearchive: attempt to handle a vimball: ".sname)
+ silent 1split
+ exe "silent e ".fnameescape(sname)
+ silent so %
+ silent q
+ endif
+
+ if sname =~ '.vim$'
+" call Decho("dearchive: attempt to simply move ".sname." to plugin")
+ exe "silent !".g:GetLatestVimScripts_mv." ".s:Escape(sname)." plugin"
+ else
+" call Decho("dearchive: move <".sname."> to installdir<".installdir.">")
+ exe "silent !".g:GetLatestVimScripts_mv." ".s:Escape(sname)." ".installdir
+ endif
+
+ " helptags step
+ let docdir= substitute(&rtp,',.*','','e')."/doc"
+" call Decho("helptags: docdir<".docdir.">")
+ exe "helptags ".fnameescape(docdir)
+ exe "cd ".fnameescape(curdir)
+ endif
+ if fname !~ ':AutoInstall:'
+ let modline=scriptid." ".latestsrcid." :AutoInstall: ".fname.cmmnt
+ else
+ let modline=scriptid." ".latestsrcid." ".fname.cmmnt
+ endif
+ else
+ let modline=scriptid." ".latestsrcid." ".fname.cmmnt
+ endif
+
+ " update the data in the <GetLatestVimScripts.dat> file
+ call setline(line("."),modline)
+" call Decho("update data in ".expand("%")."#".line(".").": modline<".modline.">")
+" else " Decho
+" call Decho("[latestsrcid=".latestsrcid."] <= [srcid=".srcid."], no need to update")
+ endif
+
+ " restore options
+ let &t_ti = t_ti
+ let &t_te = t_te
+ let &rs = rs
+ let @a = rega
+" call Dredir("BUFFER TEST (GetOneScript)","ls!")
+
+" call Dret("GetOneScript")
+endfun
+
" ---------------------------------------------------------------------
+" s:Escape: makes a string safe&suitable for the shell {{{2
+fun! s:Escape(name)
+" call Dfunc("s:Escape(name<".a:name.">)")
+ if exists("*shellescape")
+ " shellescape() was added by patch 7.0.111
+ let name= shellescape(a:name)
+ else
+ let name= g:getscript_shq . a:name . g:getscript_shq
+ endif
+" call Dret("s:Escape ".name)
+ return name
+endfun
+" ---------------------------------------------------------------------
" Restore Options: {{{1
let &cpo= s:keepcpo
+unlet s:keepcpo
+" ---------------------------------------------------------------------
+" Modelines: {{{1
" vim: ts=8 sts=2 fdm=marker nowrap
View
14 runtime/autoload/syntaxcomplete.vim
@@ -1,8 +1,8 @@
" Vim completion script
" Language: All languages, uses existing syntax highlighting rules
-" Maintainer: David Fishburn <fishburn@ianywhere.com>
-" Version: 3.0
-" Last Change: Wed Nov 08 2006 10:46:46 AM
+" Maintainer: David Fishburn <dfishburn.vim@gmail.com>
+" Version: 4.0
+" Last Change: Fri 26 Oct 2007 05:27:03 PM Eastern Daylight Time
" Usage: For detailed help, ":help ft-syntax-omni"
" Set completion with CTRL-X CTRL-O to autoloaded function.
@@ -19,7 +19,7 @@ endif
if exists('g:loaded_syntax_completion')
finish
endif
-let g:loaded_syntax_completion = 30
+let g:loaded_syntax_completion = 40
" Set ignorecase to the ftplugin standard
" This is the default setting, but if you define a buffer local
@@ -353,9 +353,11 @@ function! s:SyntaxCSyntaxGroupItems( group_name, syntax_full )
else
let accept_chars = ','.&iskeyword.','
" Remove all character ranges
- let accept_chars = substitute(accept_chars, ',[^,]\+-[^,]\+,', ',', 'g')
+ " let accept_chars = substitute(accept_chars, ',[^,]\+-[^,]\+,', ',', 'g')
+ let accept_chars = substitute(accept_chars, ',\@<=[^,]\+-[^,]\+,', '', 'g')
" Remove all numeric specifications
- let accept_chars = substitute(accept_chars, ',\d\{-},', ',', 'g')
+ " let accept_chars = substitute(accept_chars, ',\d\{-},', ',', 'g')
+ let accept_chars = substitute(accept_chars, ',\@<=\d\{-},', '', 'g')
" Remove all commas
let accept_chars = substitute(accept_chars, ',', '', 'g')
" Escape special regex characters
View
10 runtime/autoload/xmlcomplete.vim
@@ -1,10 +1,12 @@
" Vim completion script
" Language: XML
" Maintainer: Mikolaj Machowski ( mikmach AT wp DOT pl )
-" Last Change: 2006 Jul 18
-" Version: 1.8
+" Last Change: 2006 Aug 15
+" Version: 1.9
"
" Changelog:
+" 1.9 - 2007 Aug 15
+" - fix closing of namespaced tags (Johannes Weiss)
" 1.8 - 2006 Jul 18
" - allow for closing of xml tags even when data file isn't available
@@ -413,12 +415,12 @@ function! xmlcomplete#GetLastOpenTag(unaryTagsStack)
if exists("b:xml_namespace")
if b:xml_namespace == 'DEFAULT'
- let tagpat='</\=\(\k\|[.-]\)\+\|/>'
+ let tagpat='</\=\(\k\|[.:-]\)\+\|/>'
else
let tagpat='</\='.b:xml_namespace.':\(\k\|[.-]\)\+\|/>'
endif
else
- let tagpat='</\=\(\k\|[.-]\)\+\|/>'
+ let tagpat='</\=\(\k\|[.:-]\)\+\|/>'
endif
while (linenum>0)
let line=getline(linenum)
View
2  runtime/compiler/ruby.vim
@@ -65,4 +65,4 @@ CompilerSet errorformat=
let &cpo = s:cpo_save
unlet s:cpo_save
-" vim: nowrap sw=2 sts=2 ts=8 ff=unix:
+" vim: nowrap sw=2 sts=2 ts=8:
View
19 runtime/doc/cmdline.txt
@@ -1,4 +1,4 @@
-*cmdline.txt* For Vim version 7.1. Last change: 2008 Jan 04
+*cmdline.txt* For Vim version 7.2a. Last change: 2008 Jun 21
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -62,7 +62,7 @@ Notes:
old one is removed (to avoid repeated commands moving older commands out of
the history).
- Only commands that are typed are remembered. Ones that completely come from
- mappings are not put in the history
+ mappings are not put in the history.
- All searches are put in the search history, including the ones that come
from commands like "*" and "#". But for a mapping, only the last search is
remembered (to avoid that long mappings trash the history).
@@ -226,6 +226,8 @@ CTRL-J *c_CTRL-J* *c_<NL>* *c_<CR>*
<Esc> When typed and 'x' not present in 'cpoptions', quit
Command-line mode without executing. In macros or when 'x'
present in 'cpoptions', start entered command.
+ Note: If your <Esc> key is hard to hit on your keyboard, train
+ yourself to use CTRL-[.
*c_CTRL-C*
CTRL-C quit command-line without executing
@@ -482,7 +484,7 @@ argument.
line. If you want to use '|' in an argument, precede it with '\'.
These commands see the '|' as their argument, and can therefore not be
-followed by another command:
+followed by another Vim command:
:argdo
:autocmd
:bufdo
@@ -718,6 +720,9 @@ to insert special things while typing you can use the CTRL-R command. For
example, "%" stands for the current file name, while CTRL-R % inserts the
current file name right away. See |c_CTRL-R|.
+Note: If you want to avoid the special characters in a Vim script you may want
+to use |fnameescape()|.
+
In Ex commands, at places where a file name can be used, the following
characters have a special meaning. These can also be used in the expression
@@ -893,10 +898,10 @@ Examples: (alternate file name is "?readme?")
:cd <cfile>* :cd {file name under cursor plus "*" and then expanded}
When the expanded argument contains a "!" and it is used for a shell command
-(":!cmd", ":r !cmd" or ":w !cmd"), it is escaped with a backslash to avoid it
-being expanded into a previously used command. When the 'shell' option
-contains "sh", this is done twice, to avoid the shell trying to expand the
-"!".
+(":!cmd", ":r !cmd" or ":w !cmd"), the "!" is escaped with a backslash to
+avoid it being expanded into a previously used command. When the 'shell'
+option contains "sh", this is done twice, to avoid the shell trying to expand
+the "!".
*filename-backslash*
For filesystems that use a backslash as directory separator (MS-DOS, Windows,
View
2  runtime/doc/debugger.txt
@@ -1,4 +1,4 @@
-*debugger.txt* For Vim version 7.1. Last change: 2005 Mar 29
+*debugger.txt* For Vim version 7.2a. Last change: 2005 Mar 29
VIM REFERENCE MANUAL by Gordon Prieur
View
2  runtime/doc/develop.txt
@@ -1,4 +1,4 @@
-*develop.txt* For Vim version 7.1. Last change: 2007 May 11
+*develop.txt* For Vim version 7.2a. Last change: 2007 May 11
VIM REFERENCE MANUAL by Bram Moolenaar
View
6 runtime/doc/digraph.txt
@@ -1,4 +1,4 @@
-*digraph.txt* For Vim version 7.1. Last change: 2006 Jul 18
+*digraph.txt* For Vim version 7.2a. Last change: 2007 Sep 10
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -130,10 +130,10 @@ a standard meaning:
Exclamation mark ! Grave
Apostrophe ' Acute accent
Greater-Than sign > Circumflex accent
- Question Mark ? tilde
+ Question mark ? Tilde
Hyphen-Minus - Macron
Left parenthesis ( Breve
- Full Stop . Dot Above
+ Full stop . Dot above
Colon : Diaeresis
Comma , Cedilla
Underline _ Underline
View
19 runtime/doc/editing.txt
@@ -1,4 +1,4 @@
-*editing.txt* For Vim version 7.1. Last change: 2007 May 11
+*editing.txt* For Vim version 7.2a. Last change: 2008 Apr 29
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -364,6 +364,9 @@ all over again. The ":e" command is only useful if you have changed the
current file name.
*:filename* *{file}*
+Besides the things mentioned here, more special items for where a filename is
+expected are mentioned at |cmdline-special|.
+
Note for systems other than Unix and MS-DOS: When using a command that
accepts a single file name (like ":edit file") spaces in the file name are
allowed, but trailing spaces are ignored. This is useful on systems that
@@ -888,8 +891,10 @@ Note: When the 'write' option is off, you are not able to write any file.
the previous command |:!|.
The default [range] for the ":w" command is the whole buffer (1,$). If you
-write the whole buffer, it is no longer considered changed. Also when you
-write it to a different file with ":w somefile"!
+write the whole buffer, it is no longer considered changed. When you
+write it to a different file with ":w somefile" it depends on the "+" flag in
+'cpoptions'. When included, the write command will reset the 'modified' flag,
+even though the buffer itself may still be different from its file.
If a file name is given with ":w" it becomes the alternate file. This can be
used, for example, when the write fails and you want to try again later with
@@ -1105,6 +1110,8 @@ MULTIPLE WINDOWS AND BUFFERS *window-exit*
changed. See |:confirm|. {not in Vi}
:qa[ll]! Exit Vim. Any changes to buffers are lost. {not in Vi}
+ Also see |:cquit|, it does the same but exits with a non-zero
+ value.
*:quita* *:quitall*
:quita[ll][!] Same as ":qall". {not in Vi}
@@ -1478,7 +1485,9 @@ There are three different types of searching:
supported by your operating system. '*' and '**' are handled inside Vim, so
they work on all operating systems.
- The usage of '*' is quite simple: It matches 0 or more characters.
+ The usage of '*' is quite simple: It matches 0 or more characters. In a
+ search pattern this would be ".*". Note that the "." is not used for file
+ searching.
'**' is more sophisticated:
- It ONLY matches directories.
@@ -1498,7 +1507,7 @@ There are three different types of searching:
levels.
The allowed number range is 0 ('**0' is removed) to 255.
If the given number is smaller than 0 it defaults to 30, if it's
- bigger than 255 it defaults to 255.
+ bigger than 255 then 255 is used.
- '**' can only be at the end of the path or be followed by a path
separator or by a number and a path separator.
View
2  runtime/doc/gui_w16.txt
@@ -1,4 +1,4 @@
-*gui_w16.txt* For Vim version 7.1. Last change: 2005 Mar 29
+*gui_w16.txt* For Vim version 7.2a. Last change: 2005 Mar 29
VIM REFERENCE MANUAL by Bram Moolenaar
View
2  runtime/doc/gui_w32.txt
@@ -1,4 +1,4 @@
-*gui_w32.txt* For Vim version 7.1. Last change: 2007 Aug 14
+*gui_w32.txt* For Vim version 7.2a. Last change: 2007 Aug 30
VIM REFERENCE MANUAL by Bram Moolenaar
View
2  runtime/doc/if_mzsch.txt
@@ -1,4 +1,4 @@
-*if_mzsch.txt* For Vim version 7.1. Last change: 2007 May 03
+*if_mzsch.txt* For Vim version 7.2a. Last change: 2007 May 03
VIM REFERENCE MANUAL by Sergey Khorev
View
2  runtime/doc/if_ole.txt
@@ -1,4 +1,4 @@
-*if_ole.txt* For Vim version 7.1. Last change: 2007 May 10
+*if_ole.txt* For Vim version 7.2a. Last change: 2007 May 10
VIM REFERENCE MANUAL by Paul Moore
View
2  runtime/doc/if_perl.txt
@@ -1,4 +1,4 @@
-*if_perl.txt* For Vim version 7.1. Last change: 2006 Mar 06
+*if_perl.txt* For Vim version 7.2a. Last change: 2006 Mar 06
VIM REFERENCE MANUAL by Sven Verdoolaege
View
2  runtime/doc/if_pyth.txt
@@ -1,4 +1,4 @@
-*if_pyth.txt* For Vim version 7.1. Last change: 2006 Apr 30
+*if_pyth.txt* For Vim version 7.2a. Last change: 2006 Apr 30
VIM REFERENCE MANUAL by Paul Moore
View
130 runtime/doc/indent.txt
@@ -1,4 +1,4 @@
-*indent.txt* For Vim version 7.1. Last change: 2007 May 11
+*indent.txt* For Vim version 7.2a. Last change: 2008 Jun 21
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -6,22 +6,27 @@
This file is about indenting C programs and other files.
-1. Indenting C programs |C-indenting|
+1. Indenting C style programs |C-indenting|
2. Indenting by expression |indent-expression|
==============================================================================
-1. Indenting C programs *C-indenting*
+1. Indenting C style programs *C-indenting*
-The basics for C indenting are explained in section |30.2| of the user manual.
+The basics for C style indenting are explained in section |30.2| of the user
+manual.
-Vim has options for automatically indenting C program files. These options
-affect only the indent and do not perform other formatting. For comment
-formatting, see |format-comments|.
+Vim has options for automatically indenting C style program files. Many
+programming languages including Java and C++ follow very closely the
+formatting conventions established with C. These options affect only the
+indent and do not perform other formatting. There are additional options that
+affect other kinds of formatting as well as indenting, see |format-comments|,
+|fo-table|, |gq| and |formatting| for the main ones.
Note that this will not work when the |+smartindent| or |+cindent| features
have been disabled at compile time.
-There are in fact four methods available for indentation:
+There are in fact four main methods available for indentation, each one
+overrides the previous if it is enabled, or non-empty for 'indentexpr':
'autoindent' uses the indent from the previous line.
'smartindent' is like 'autoindent' but also recognizes some C syntax to
increase/reduce the indent where appropriate.
@@ -572,6 +577,115 @@ In addition, you can turn the verbose mode for debug issue: >
Make sure to do ":set cmdheight=2" first to allow the display of the message.
+VHDL *ft-vhdl-indent*
+
+Alignment of generic/port mapping statements are performed by default. This
+causes the following alignment example: >
+
+ ENTITY sync IS
+ PORT (
+ clk : IN STD_LOGIC;
+ reset_n : IN STD_LOGIC;
+ data_input : IN STD_LOGIC;
+ data_out : OUT STD_LOGIC
+ );
+ END ENTITY sync;
+
+To turn this off, add >
+
+ let g:vhdl_indent_genportmap = 0
+
+to the .vimrc file, which causes the previous alignment example to change: >
+
+ ENTITY sync IS
+ PORT (
+ clk : IN STD_LOGIC;
+ reset_n : IN STD_LOGIC;
+ data_input : IN STD_LOGIC;
+ data_out : OUT STD_LOGIC
+ );
+ END ENTITY sync;
+
+----------------------------------------
+
+Alignment of right-hand side assignment "<=" statements are performed by
+default. This causes the following alignment example: >
+
+ sig_out <= (bus_a(1) AND
+ (sig_b OR sig_c)) OR
+ (bus_a(0) AND sig_d);
+
+To turn this off, add >
+
+ let g:vhdl_indent_rhsassign = 0
+
+to the .vimrc file, which causes the previous alignment example to change: >
+
+ sig_out <= (bus_a(1) AND
+ (sig_b OR sig_c)) OR
+ (bus_a(0) AND sig_d);
+
+----------------------------------------
+
+Full-line comments (lines that begin with "--") are indented to be aligned with
+the very previous line's comment, PROVIDED that a whitespace follows after
+"--".
+
+For example: >
+
+ sig_a <= sig_b; -- start of a comment
+ -- continuation of the comment
+ -- more of the same comment
+
+While in Insert mode, after typing "-- " (note the space " "), hitting CTRL-F
+will align the current "-- " with the previous line's "--".
+
+If the very previous line does not contain "--", THEN the full-line comment
+will be aligned with the start of the next non-blank line that is NOT a
+full-line comment.
+
+Indenting the following code: >
+
+ sig_c <= sig_d; -- comment 0
+ -- comment 1
+ -- comment 2
+ --debug_code:
+ --PROCESS(debug_in)
+ --BEGIN
+ -- FOR i IN 15 DOWNTO 0 LOOP
+ -- debug_out(8*i+7 DOWNTO 8*i) <= debug_in(15-i);
+ -- END LOOP;
+ --END PROCESS debug_code;
+
+ -- comment 3
+ sig_e <= sig_f; -- comment 4
+ -- comment 5
+
+results in: >
+
+ sig_c <= sig_d; -- comment 0
+ -- comment 1
+ -- comment 2
+ --debug_code:
+ --PROCESS(debug_in)
+ --BEGIN
+ -- FOR i IN 15 DOWNTO 0 LOOP
+ -- debug_out(8*i+7 DOWNTO 8*i) <= debug_in(15-i);
+ -- END LOOP;
+ --END PROCESS debug_code;
+
+ -- comment 3
+ sig_e <= sig_f; -- comment 4
+ -- comment 5
+
+Notice that "--debug_code:" does not align with "-- comment 2"
+because there is no whitespace that follows after "--" in "--debug_code:".
+
+Given the dynamic nature of indenting comments, indenting should be done TWICE.
+On the first pass, code will be indented. On the second pass, full-line
+comments will be indented according to the correctly indented code.
+
+
VIM *ft-vim-indent*
For indenting Vim scripts there is one variable that specifies the amount of
View
6 runtime/doc/insert.txt
@@ -1,4 +1,4 @@
-*insert.txt* For Vim version 7.1. Last change: 2007 May 07
+*insert.txt* For Vim version 7.2a. Last change: 2008 Jun 21
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -882,12 +882,12 @@ a Vim script.
CTRL-X CTRL-V Guess what kind of item is in front of the cursor and
find the first match for it.
Note: When CTRL-V is mapped you can often use CTRL-Q
- instead |i_CTRL-Q|.
+ instead of |i_CTRL-Q|.
CTRL-V or
CTRL-N Search forwards for next match. This match replaces
the previous one.
- CTRL-P Search backward for previous match. This match
+ CTRL-P Search backwards for previous match. This match
replaces the previous one.
CTRL-X CTRL-V Further use of CTRL-X CTRL-V will do the same as
View
517 runtime/doc/netbeans.txt
@@ -1,23 +1,28 @@
-*netbeans.txt* For Vim version 7.1. Last change: 2006 Nov 14
+*netbeans.txt* For Vim version 7.2a. Last change: 2008 Jun 22
- VIM REFERENCE MANUAL by Gordon Prieur
+ VIM REFERENCE MANUAL by Gordon Prieur et al.
-NetBeans ExternalEditor Integration Features *netbeans*
- *netbeans-support*
+ *socket-interface* *netbeans* *netbeans-support*
+
+Vim NetBeans Protocol: a socket interface for Vim integration into an IDE.
+
1. Introduction |netbeans-intro|
-2. NetBeans Key Bindings |netbeans-keybindings|
+2. Integration features |netbeans-integration|
3. Configuring Vim for NetBeans |netbeans-configure|
-4. Downloading NetBeans |netbeans-download|
-5. Preparing NetBeans for Vim |netbeans-preparation|
-6. Obtaining the External Editor Module |obtaining-exted|
-7. Setting up NetBeans to run with Vim |netbeans-setup|
-8. Messages |netbeans-messages|
-9. Running Vim from NetBeans |netbeans-run|
-10. NetBeans protocol |netbeans-protocol|
-11. NetBeans commands |netbeans-commands|
-12. Known problems |netbeans-problems|
+4. Error Messages |netbeans-messages|
+5. Running Vim in NetBeans mode |netbeans-run|
+6. NetBeans protocol |netbeans-protocol|
+7. NetBeans key |netbeans-key|
+8. Known problems |netbeans-problems|
+9. Debugging NetBeans protocol |netbeans-debugging|
+10. NetBeans External Editor
+ 10.1. Downloading NetBeans |netbeans-download|
+ 10.2. NetBeans Key Bindings |netbeans-keybindings|
+ 10.3. Preparing NetBeans for Vim |netbeans-preparation|
+ 10.4. Obtaining the External Editor Module |obtaining-exted|
+ 10.5. Setting up NetBeans to run with Vim |netbeans-setup|
{Vi does not have any of these features}
{only available when compiled with the |+netbeans_intg| feature}
@@ -25,13 +30,47 @@ NetBeans ExternalEditor Integration Features *netbeans*
==============================================================================
1. Introduction *netbeans-intro*
+The NetBeans interface was initially developed to integrate Vim into the
+NetBeans Java IDE, using the external editor plugin. This NetBeans plugin no
+longer exists for recent versions of NetBeans but the protocol was developed
+in such a way that any IDE can use it to integrate Vim.
+
+The NetBeans protocol of Vim is a text based communication protocol, over a
+classical TCP socket. There is no dependency on Java or NetBeans. Any language
+or environment providing a socket interface can control Vim using this
+protocol. There are existing implementations in C, C++, Python and Java. The
+name NetBeans is kept today for historical reasons.
+
+Current projects using the NetBeans protocol of Vim are:
+- VimIntegration, description of various projects doing Vim Integration:
+ http://www.freehackers.org/VimIntegration
+- Agide, an IDE for the AAP project, written in Python:
+ http://www.a-a-p.org
+- Clewn, a gdb integration into Vim, written in C:
+ http://clewn.sourceforge.net/
+- VimPlugin, integration of Vim inside Eclipse:
+ http://vimplugin.sourceforge.net/wiki/pmwiki.php
+- PIDA, IDE written in Python integrating Vim:
+ http://pida.co.uk/
+- VimWrapper, library to easy Vim integration into IDE:
+ http://www.freehackers.org/VimWrapper
+
+Check the specific project pages to see how to use Vim with these projects.
+
+In the rest of this help page, we will use the term "Vim Controller" to
+describe the program controlling Vim through the NetBeans socket interface.
+
+
+About the NetBeans IDE ~
+
NetBeans is an open source Integrated Development Environment developed
jointly by Sun Microsystems, Inc. and the netbeans.org developer community.
Initially just a Java IDE, NetBeans has had C, C++, and Fortran support added
in recent releases.
-For more information visit the main NetBeans web site http://www.netbeans.org
-or the NetBeans External Editor site at http://externaleditor.netbeans.org.
+For more information visit the main NetBeans web site http://www.netbeans.org.
+The External Editor is now, unfortunately, declared Obsolte. See
+ http://externaleditor.netbeans.org.
Sun Microsystems, Inc. also ships NetBeans under the name Sun ONE Studio.
Visit http://www.sun.com for more information regarding the Sun ONE Studio
@@ -41,37 +80,32 @@ Current releases of NetBeans provide full support for Java and limited support
for C, C++, and Fortran. Current releases of Sun ONE Studio provide full
support for Java, C, C++, and Fortran.
-The interface to NetBeans is also supported by Agide, the A-A-P GUI IDE.
-Agide is very different from NetBeans:
-- Based on Python instead of Java, much smaller footprint and fast startup.
-- Agide is a framework in which many different tools can work together.
-See the A-A-P website for information: http://www.A-A-P.org.
-
==============================================================================
-2. NetBeans Key Bindings *netbeans-keybindings*
+2. Integration features *netbeans-integration*
-Vim understands a number of key bindings that execute NetBeans commands.
-These are typically all the Function key combinations. To execute a NetBeans
-command, the user must press the Pause key followed by a NetBeans key binding.
-For example, in order to compile a Java file, the NetBeans key binding is
-"F9". So, while in vim, press "Pause F9" to compile a java file. To toggle a
-breakpoint at the current line, press "Pause Shift F8".
+The NetBeans socket interface of Vim allows to get information from Vim or to
+ask Vim to perform specific actions:
+- get information about buffer: buffer name, cursor position, buffer content,
+ etc.
+- be notified when buffers are open or closed
+- be notified of how the buffer content is modified
+- load and save files
+- modify the buffer content
+- installing special key bindings
+- raise the window, control the window geometry
-The Pause key is Function key 21. If you don't have a working Pause key and
-want to use F8 instead, use: >
+For sending key strokes to Vim or for evaluating functions in Vim, you must
+use the |clientserver| interface.
- :map <F8> <F21>
-
-The External Editor module dynamically reads the NetBeans key bindings so vim
-should always have the latest key bindings, even when NetBeans changes them.
==============================================================================
3. Configuring Vim for NetBeans *netbeans-configure*
-For more help installing vim, please read |usr_90.txt| in the Vim User Manual.
+For more help installing Vim, please read |usr_90.txt| in the Vim User Manual.
-On Unix
+On Unix:
+--------
When running configure without arguments the NetBeans interface should be
included. That is, if the configure check to find out if your system supports
@@ -80,15 +114,16 @@ the required features succeeds.
In case you do not want the NetBeans interface you can disable it by
uncommenting a line with "--disable-netbeans" in the Makefile.
-Currently, only gvim is supported in this integration as NetBeans does not
-have means to supply a terminal emulator for the vim command. Furthermore,
+Currently, only GVim is supported in this integration as NetBeans does not
+have means to supply a terminal emulator for the Vim command. Furthermore,
there is only GUI support for GTK, GNOME, and Motif.
If Motif support is required the user must supply XPM libraries. See
|workshop-xpm| for details on obtaining the latest version of XPM.
-On MS-Windows
+On MS-Windows:
+--------------
The Win32 support is now in beta stage.
@@ -96,121 +131,56 @@ To use XPM signs on Win32 (e.g. when using with NetBeans) you can compile
XPM by yourself or use precompiled libraries from http://iamphet.nm.ru/misc/
(for MS Visual C++) or http://gnuwin32.sourceforge.net (for MinGW).
-==============================================================================
-4. Downloading NetBeans *netbeans-download*
+Enable debugging:
+-----------------
-The NetBeans IDE is available for download from netbeans.org. You can download
-a released version, download sources, or use CVS to download the current
-source tree. If you choose to download sources, follow directions from
-netbeans.org on building NetBeans.
-
-Depending on the version of NetBeans you download, you may need to do further
-work to get the required External Editor module. This is the module which lets
-NetBeans work with gvim (or xemacs :-). See http://externaleditor.netbeans.org
-for details on downloading this module if your NetBeans release does not have
-it.
-
-For C, C++, and Fortran support you will also need the cpp module. See
-http://cpp.netbeans.org for information regarding this module.
-
-You can also download Sun ONE Studio from Sun Microsystems, Inc for a 30 day
-free trial. See http://www.sun.com for further details.
+To enable debugging of Vim and of the NetBeans protocol, the "NBDEBUG" macro
+needs to be defined. Search in the Makefile of the platform you are using for
+"NBDEBUG" to see what line needs to be uncommented. This effectively adds
+"-DNBDEBUG" to the compile command. Also see |netbeans-debugging|
==============================================================================
-5. Preparing NetBeans for Vim *netbeans-preparation*
-
-In order for NetBeans to work with vim, the NetBeans External Editor module
-must be loaded and enabled. If you have a Sun ONE Studio Enterprise Edition
-then this module should be loaded and enabled. If you have a NetBeans release
-you may need to find another way of obtaining this open source module.
+4. Error Messages *netbeans-messages*
-You can check if you have this module by opening the Tools->Options dialog
-and drilling down to the "Modules" list (IDE Configuration->System->Modules).
-If your Modules list has an entry for "External Editor" you must make sure
-it is enabled (the "Enabled" property should have the value "True"). If your
-Modules list has no External Editor see the next section on |obtaining-exted|.
-
-==============================================================================
-6. Obtaining the External Editor Module *obtaining-exted*
-
-There are 2 ways of obtaining the External Editor module. The easiest way
-is to use the NetBeans Update Center to download and install the module.
-Unfortunately, some versions do not have this module in their update
-center. If you cannot download via the update center you will need to
-download sources and build the module. I will try and get the module
-available from the NetBeans Update Center so building will be unnecessary.
-Also check http://externaleditor.netbeans.org for other availability options.
-
-To download the External Editor sources via CVS and build your own module,
-see http://externaleditor.netbeans.org and http://www.netbeans.org.
-Unfortunately, this is not a trivial procedure.
-
-==============================================================================
-7. Setting up NetBeans to run with Vim *netbeans-setup*
-
-Assuming you have loaded and enabled the NetBeans External Editor module
-as described in |netbeans-preparation| all you need to do is verify that
-the gvim command line is properly configured for your environment.
-
-Open the Tools->Options dialog and open the Editing category. Select the
-External Editor. The right hand pane should contain a Properties tab and
-an Expert tab. In the Properties tab make sure the "Editor Type" is set
-to "Vim". In the Expert tab make sure the "Vim Command" is correct.
-
-You should be careful if you change the "Vim Command". There are command
-line options there which must be there for the connection to be properly
-set up. You can change the command name but that's about it. If your gvim
-can be found by your $PATH then the VIM Command can start with "gvim". If
-you don't want gvim searched from your $PATH then hard code in the full
-Unix path name. At this point you should get a gvim for any source file
-you open in NetBeans.
-
-If some files come up in gvim and others (with different file suffixes) come
-up in the default NetBeans editor you should verify the MIME type in the
-Expert tab MIME Type property. NetBeans is MIME oriented and the External
-Editor will only open MIME types specified in this property.
-
-==============================================================================
-8. Messages *netbeans-messages*
-
-These messages are specific for NetBeans:
+These error messages are specific to NetBeans socket protocol:
*E463*
Region is guarded, cannot modify
- NetBeans defines guarded areas in the text, which you cannot
- change.
- Also sets the current buffer, if necessary.
+ The Vim Controller has defined guarded areas in the text,
+ which you cannot change. Also sets the current buffer, if
+ necessary.
*E656*
-NetBeans disallows writes of unmodified buffers
- NetBeans does not support writes of unmodified buffers that
- were opened from NetBeans.
+Writes of unmodified buffers forbidden
+ Writes of unmodified buffers that were opened from the
+ Vim Controller are not possible.
*E657*
-Partial writes disallowed for NetBeans buffers
- NetBeans does not support partial writes for buffers that were
- opened from NetBeans.
+Partial writes disallowed
+ Partial writes for buffers that were opened from the
+ Vim Controller are not allowed.
*E658*
-NetBeans connection lost for this buffer
- NetBeans has become confused about the state of this file.
- Rather than risk data corruption, NetBeans has severed the
- connection for this file. Vim will take over responsibility
- for saving changes to this file and NetBeans will no longer
- know of these changes.
+Connection lost for this buffer
+ The Vim Controller has become confused about the state of
+ this file. Rather than risk data corruption, it has severed
+ the connection for this file. Vim will take over
+ responsibility for saving changes to this file and the
+ Vim Controller will no longer know of these changes.
*E744*
-NetBeans does not allow changes in read-only files
+Read-only file
Vim normally allows changes to a read-only file and only
enforces the read-only rule if you try to write the file.
However, NetBeans does not let you make changes to a file
- which is read-only and becomes confused if vim does this.
- So vim does not allow modifications to files when run with
- NetBeans.
+ which is read-only and becomes confused if Vim does this.
+ So Vim does not allow modifications to files when run
+ in NetBeans mode.
+
==============================================================================
-9. Running Vim from NetBeans *netbeans-run*
+5. Running Vim in NetBeans mode *netbeans-run*
-NetBeans starts Vim with the |-nb| argument. Three forms can be used, that
+Vim must be started with the |-nb| argument. Three forms can be used, that
differ in the way the information for the connection is specified:
-nb={fname} from a file
@@ -231,23 +201,29 @@ lines, in any order:
Other lines are ignored. The caller of Vim is responsible for deleting the
file afterwards.
-{hostname} is the name of the machine where NetBeans is running. When omitted
-the environment variable "__NETBEANS_HOST" is used or the default "localhost".
+{hostname} is the name of the machine where Vim Controller is running. When
+omitted the environment variable "__NETBEANS_HOST" is used or the default
+"localhost".
-{addr} is the port number for NetBeans. When omitted the environment variable
-"__NETBEANS_SOCKET" is used or the default 3219.
+{addr} is the port number for the NetBeans interface. When omitted the
+environment variable "__NETBEANS_SOCKET" is used or the default 3219.
{password} is the password for connecting to NetBeans. When omitted the
environment variable "__NETBEANS_VIM_PASSWORD" is used or "changeme".
+Vim will initiate a socket connection (client side) to the specified host and
+port upon startup. The password will be sent with the AUTH event when the
+connection has been established.
+
+
==============================================================================
-10. NetBeans protocol *netbeans-protocol*
+6. NetBeans protocol *netbeans-protocol*
-The communication between NetBeans and Vim uses plain text messages. This
-protocol was first designed to work with the external editor module of
-NetBeans (see http://externaleditor.netbeans.org). Later it was extended to
-work with Agide (A-A-P GUI IDE, see http://www.a-a-p.org). The extensions are
-marked with "version 2.1".
+The communication between the Vim Controller and Vim uses plain text
+messages. This protocol was first designed to work with the external editor
+module of NetBeans. Later it was extended to work with Agide (A-A-P GUI IDE,
+see http://www.a-a-p.org) and then with other IDE. The extensions are marked
+with "version 2.1".
Version 2.2 of the protocol has several minor changes which should only affect
NetBeans users (ie, not Agide users). However, a bug was fixed which could
@@ -266,26 +242,16 @@ The messages are currently sent over a socket. Since the messages are in
plain UTF-8 text this protocol could also be used with any other communication
mechanism.
-To see an example implementation look at the gvim tool in Agide. Currently
-found here:
- http://cvs.sf.net/viewcvs.py/a-a-p/Agide/Tools/GvimTool.py?view=markup
-
+6.1 Kinds of messages |nb-messages|
+6.2 Terms |nb-terms|
+6.3 Commands |nb-commands|
+6.4 Functions and Replies |nb-functions|
+6.5 Events |nb-events|
+6.6 Special messages |nb-special|
+6.7 Protocol errors |nb-protocol_errors|
-10.1 Kinds of messages |nb-messages|
-10.2 Terms |nb-terms|
-10.3 Commands |nb-commands|
-10.4 Functions and Replies |nb-functions|
-10.5 Events |nb-events|
-10.6 Special messages |nb-special|
-
-*E627* *E628* *E629* *E630* *E631* *E632* *E633* *E634* *E635* *E636*
-*E637* *E638* *E639* *E640* *E641* *E642* *E643* *E644* *E645* *E646*
-*E647* *E648* *E649* *E650* *E651* *E652* *E653* *E654*
-These errors occur when a message violates the protocol.
-
-
-10.1 Kinds of messages *nb-messages*
+6.1 Kinds of messages *nb-messages*
There are four kinds of messages:
@@ -303,10 +269,11 @@ kind first item example ~
Command bufID:name!seqno 11:showBalloon!123 "text"
Function bufID:name/seqno 11:getLength/123
Reply seqno 123 5000
-Event bufID:name=123 11:keyCommand=123 "S-F2"
+Event bufID:name=seqno 11:keyCommand=123 "S-F2"
-10.2 Terms *nb-terms*
+
+6.2 Terms *nb-terms*
bufID Buffer number. A message may be either for a specific buffer
or generic. Generic messages use a bufID of zero. NOTE: this
@@ -353,7 +320,7 @@ lnum/col Argument with a line number and column number position. The
pathname String argument: file name with full path.
-10.3 Commands *nb-commands*
+6.3 Commands *nb-commands*
actionMenuItem Not implemented.
@@ -381,8 +348,8 @@ close Close the buffer. This leaves us without current buffer, very
create Creates a buffer without a name. Replaces the current buffer
(it's hidden when it was changed).
- NetBeans uses this as the first command for a file that is
- being opened. The sequence of commands could be:
+ The Vim Controller should use this as the first command for a
+ file that is being opened. The sequence of commands could be:
create
setCaretListener (ignored)
setModified (no effect)
@@ -413,9 +380,14 @@ defineAnnoType typeNum typeName tooltip glyphFile fg bg
editFile pathname
Set the name for the buffer and edit the file "pathname", a
string argument.
- Normal way for the IDE to tell the editor to edit a file. If
- the IDE is going to pass the file text to the editor use these
- commands instead:
+ Normal way for the IDE to tell the editor to edit a file.
+
+ You must set a bufId different of 0 with this command to
+ assign a bufId to the buffer. It will trigger an event
+ fileOpened with a bufId of 0 but the buffer has been assigned.
+
+ If the IDE is going to pass the file text to the editor use
+ these commands instead:
setFullName
insert
initDone
@@ -437,10 +409,10 @@ initDone Mark the buffer as ready for use. Implicitly makes the buffer
the current buffer. Fires the BufReadPost autocommand event.
insertDone
- Sent by NetBeans to tell vim an initial file insert is done.
- This triggers a read message being printed. Prior to version
- 2.3, no read messages were displayed after opening a file.
- New in version 2.3.
+ Sent by Vim Controller to tell Vim an initial file insert is
+ done. This triggers a read message being printed. Prior to
+ version 2.3, no read messages were displayed after opening a
+ file. New in version 2.3.
moveAnnoToFront serNum
Not implemented.
@@ -476,9 +448,9 @@ save Save the buffer when it was modified. The other side of the
New in version 2.2.
saveDone
- Sent by NetBeans to tell vim a save is done. This triggers
- a save message being printed. Prior to version 2.3, no save
- messages were displayed after a save.
+ Sent by Vim Controller to tell Vim a save is done. This
+ triggers a save message being printed. Prior to version 2.3,
+ no save messages were displayed after a save.
New in version 2.3.
setAsUser Not implemented.
@@ -525,19 +497,20 @@ setModified modified
modified, when it is "F" mark it as unmodified.
setModtime time
- Update a buffers modification time after NetBeans saves the
- file.
+ Update a buffers modification time after the file has been
+ saved directly by the Vim Controller.
New in version 2.3.
setReadOnly
- Passed by NetBeans to tell vim a file is readonly.
- Implemented in verion 2.3.
+ Set a file as readonly
+ Implemented in version 2.3.
setStyle Not implemented.
setTitle name
Set the title for the buffer to "name", a string argument.
- The title is only used for NetBeans functions, not by Vim.
+ The title is only used for the Vim Controller functions, not
+ by Vim.
setVisible visible
When the boolean argument "visible" is "T", goto the buffer.
@@ -551,8 +524,8 @@ showBalloon text
specialKeys
Map a set of keys (mostly function keys) to be passed back
- to NetBeans for processing. This lets NetBeans hotkeys be
- used from vim.
+ to the Vim Controller for processing. This lets regular IDE
+ hotkeys be used from Vim.
Implemented in version 2.3.
startAtomic Begin an atomic operation. The screen will not be updated
@@ -583,7 +556,7 @@ unguard off len
version Not implemented.
-10.4 Functions and Replies *nb-functions*
+6.4 Functions and Replies *nb-functions*
getDot Not implemented.
@@ -630,7 +603,7 @@ getText Return the contents of the buffer as a string.
insert off text
Insert "text" before position "off". "text" is a string
argument, "off" a number.
- "off" should have a "\n" (newline) at the end of each line.
+ "text" should have a "\n" (newline) at the end of each line.
Or "\r\n" when 'fileformat' is "dos". When using "insert" in
an empty buffer Vim will set 'fileformat' accordingly.
When "off" points to the start of a line the text is inserted
@@ -665,7 +638,7 @@ saveAndExit Perform the equivalent of closing Vim: ":confirm qall".
New in version 2.1.
-10.5 Events *nb-events*
+6.5 Events *nb-events*
balloonEval off len type
The mouse pointer rests on text for a short while. When "len"
@@ -685,15 +658,15 @@ balloonText text
buttonRelease button lnum col
Report which button was pressed and the location of the cursor
at the time of the release. Only for buffers that are owned
- by NetBeans. This event is not sent if the button was
- released while the mouse was in the status line or in a
+ by the Vim Controller. This event is not sent if the button
+ was released while the mouse was in the status line or in a
separator line. If col is less than 1 the button release was
in the sign area.
New in version 2.2.
disconnect
- Tell NetBeans that vim is exiting and not to try and read or
- write more commands.
+ Tell the Vim Controller that Vim is exiting and not to try and
+ read or write more commands.
New in version 2.3.
fileClosed Not implemented.
@@ -776,10 +749,10 @@ unmodified The buffer is now unmodified.
Only fired when enabled, see "startDocumentListen".
version vers Report the version of the interface implementation. Vim
- reports "2.2" (including the quotes).
+ reports "2.4" (including the quotes).
-10.6 Special messages *nb-special*
+6.6 Special messages *nb-special*
These messages do not follow the style of the messages above. They are
terminated by a newline character.
@@ -801,22 +774,164 @@ DETACH IDE -> editor: break the connection without exiting the
REJECT Not used.
+
+6.7 Protocol errors *nb-protocol_errors*
+
+These errors occur when a message violates the protocol:
+*E627* *E628* *E629* *E630* *E631* *E632* *E633* *E634* *E635* *E636*
+*E637* *E638* *E639* *E640* *E641* *E642* *E643* *E644* *E645* *E646*
+*E647* *E648* *E649* *E650* *E651* *E652* *E653* *E654*
+
+
==============================================================================
-11. NetBeans Commands *netbeans-commands*
+7. NetBeans key *netbeans-key*
*:nbkey*
-:nbkey key Pass the key to NetBeans for processing
+:nbkey key Pass the key to the Vim Controller for processing
+
+When a hot-key has been installed with the specialKeys command, this command
+can be used to generate a hotkey messages to the Vim Controller. The events
+newDotAndMark, keyCommand and keyAtPos are generated (in this order).
-Pass the key to NetBeans for hot-key processing. You should not need to use
-this command directly. However, NetBeans passes a list of hot-keys to Vim at
-startup and when one of these keys is pressed, this command is generated to
-send the key press back to NetBeans.
==============================================================================
-12. Known problems *netbeans-problems*
+8. Known problems *netbeans-problems*
NUL bytes are not possible. For editor -> IDE they will appear as NL
characters. For IDE -> editor they cannot be inserted.
+==============================================================================
+9. Debugging NetBeans protocol *netbeans-debugging*
+
+To debug the Vim protocol, you must first compile Vim with debugging support
+and NetBeans debugging support. See |netbeans-configure| for instructions
+about Vim compiling and how to enable debug support.
+
+When running Vim, set the following environment variables:
+
+ export SPRO_GVIM_DEBUG=netbeans.log
+ export SPRO_GVIM_DLEVEL=0xffffffff
+
+Vim will then log all the incoming and outgoing messages of the NetBeans
+protocol to the file netbeans.log .
+
+The content of netbeans.log after a session looks like this:
+Tue May 20 17:19:27 2008
+EVT: 0:startupDone=0
+CMD 1: (1) create
+CMD 2: (1) setTitle "testfile1.txt"
+CMD 3: (1) setFullName "testfile1.txt"
+EVT(suppressed): 1:remove=3 0 -1
+EVT: 1:fileOpened=0 "d:\\work\\vimWrapper\\vimWrapper2\\pyvimwrapper\\tests\\testfile1.txt" T F
+CMD 4: (1) initDone
+FUN 5: (0) getCursor
+REP 5: 1 1 0 0
+CMD 6: (2) create
+CMD 7: (2) setTitle "testfile2.txt"
+CMD 8: (2) setFullName "testfile2.txt"
+EVT(suppressed): 2:remove=8 0 -1
+EVT: 2:fileOpened=0 "d:\\work\\vimWrapper\\vimWrapper2\\pyvimwrapper\\tests\\testfile2.txt" T F
+CMD 9: (2) initDone
+
+
+==============================================================================
+10. NetBeans External Editor
+
+NOTE: This information is obsolete! Only relevant if you are using an old
+version of NetBeans.
+
+
+10.1. Downloading NetBeans *netbeans-download*
+
+The NetBeans IDE is available for download from netbeans.org. You can download
+a released version, download sources, or use CVS to download the current
+source tree. If you choose to download sources, follow directions from
+netbeans.org on building NetBeans.
+
+Depending on the version of NetBeans you download, you may need to do further
+work to get the required External Editor module. This is the module which lets
+NetBeans work with gvim (or xemacs :-). See http://externaleditor.netbeans.org
+for details on downloading this module if your NetBeans release does not have
+it.
+
+For C, C++, and Fortran support you will also need the cpp module. See
+http://cpp.netbeans.org for information regarding this module.
+
+You can also download Sun ONE Studio from Sun Microsystems, Inc for a 30 day
+free trial. See http://www.sun.com for further details.
+
+
+10.2. NetBeans Key Bindings *netbeans-keybindings*
+
+Vim understands a number of key bindings that execute NetBeans commands.
+These are typically all the Function key combinations. To execute a NetBeans
+command, the user must press the Pause key followed by a NetBeans key binding.
+For example, in order to compile a Java file, the NetBeans key binding is
+"F9". So, while in vim, press "Pause F9" to compile a java file. To toggle a
+breakpoint at the current line, press "Pause Shift F8".
+
+The Pause key is Function key 21. If you don't have a working Pause key and
+want to use F8 instead, use: >
+
+ :map <F8> <F21>
+
+The External Editor module dynamically reads the NetBeans key bindings so vim
+should always have the latest key bindings, even when NetBeans changes them.
+
+
+10.3. Preparing NetBeans for Vim *netbeans-preparation*
+
+In order for NetBeans to work with vim, the NetBeans External Editor module
+must be loaded and enabled. If you have a Sun ONE Studio Enterprise Edition
+then this module should be loaded and enabled. If you have a NetBeans release
+you may need to find another way of obtaining this open source module.
+
+You can check if you have this module by opening the Tools->Options dialog
+and drilling down to the "Modules" list (IDE Configuration->System->Modules).
+If your Modules list has an entry for "External Editor" you must make sure
+it is enabled (the "Enabled" property should have the value "True"). If your
+Modules list has no External Editor see the next section on |obtaining-exted|.
+
+
+10.4. Obtaining the External Editor Module *obtaining-exted*
+
+There are 2 ways of obtaining the External Editor module. The easiest way
+is to use the NetBeans Update Center to download and install the module.
+Unfortunately, some versions do not have this module in their update
+center. If you cannot download via the update center you will need to
+download sources and build the module. I will try and get the module
+available from the NetBeans Update Center so building will be unnecessary.
+Also check http://externaleditor.netbeans.org for other availability options.
+
+To download the External Editor sources via CVS and build your own module,
+see http://externaleditor.netbeans.org and http://www.netbeans.org.
+Unfortunately, this is not a trivial procedure.
+
+
+10.5. Setting up NetBeans to run with Vim *netbeans-setup*
+
+Assuming you have loaded and enabled the NetBeans External Editor module
+as described in |netbeans-preparation| all you need to do is verify that
+the gvim command line is properly configured for your environment.
+
+Open the Tools->Options dialog and open the Editing category. Select the
+External Editor. The right hand pane should contain a Properties tab and
+an Expert tab. In the Properties tab make sure the "Editor Type" is set
+to "Vim". In the Expert tab make sure the "Vim Command" is correct.
+
+You should be careful if you change the "Vim Command". There are command
+line options there which must be there for the connection to be properly
+set up. You can change the command name but that's about it. If your gvim
+can be found by your $PATH then the VIM Command can start with "gvim". If
+you don't want gvim searched from your $PATH then hard code in the full
+Unix path name. At this point you should get a gvim for any source file
+you open in NetBeans.
+
+If some files come up in gvim and others (with different file suffixes) come
+up in the default NetBeans editor you should verify the MIME type in the
+Expert tab MIME Type property. NetBeans is MIME oriented and the External
+Editor will only open MIME types specified in this property.
+
+
vim:tw=78:ts=8:ft=help:norl:
View
2  runtime/doc/os_beos.txt
@@ -1,4 +1,4 @@
-*os_beos.txt* For Vim version 7.1. Last change: 2005 Mar 29
+*os_beos.txt* For Vim version 7.2a. Last change: 2005 Mar 29
VIM REFERENCE MANUAL by Bram Moolenaar
View
2  runtime/doc/os_risc.txt
@@ -1,4 +1,4 @@
-*os_risc.txt* For Vim version 7.1. Last change: 2005 Mar 29
+*os_risc.txt* For Vim version 7.2a. Last change: 2005 Mar 29
VIM REFERENCE MANUAL by Thomas Leonard
View
2  runtime/doc/os_unix.txt
@@ -1,4 +1,4 @@
-*os_unix.txt* For Vim version 7.1. Last change: 2005 Mar 29
+*os_unix.txt* For Vim version 7.2a. Last change: 2005 Mar 29
VIM REFERENCE MANUAL by Bram Moolenaar
View
29 runtime/doc/pattern.txt
@@ -1,4 +1,4 @@
-*pattern.txt* For Vim version 7.1. Last change: 2007 May 11
+*pattern.txt* For Vim version 7.2a. Last change: 2008 Jun 21
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -138,6 +138,7 @@ CTRL-C Interrupt current (search) command. Use CTRL-Break on
This command doesn't work in an autocommand, because
the highlighting state is saved and restored when
executing autocommands |autocmd-searchpat|.
+ Same thing for when invoking a user function.
While typing the search pattern the current match will be shown if the
'incsearch' option is on. Remember that you still have to finish the search
@@ -497,8 +498,8 @@ Character classes {not in Vi}: */character-classes*
|/[]| [] \[] any character specified inside the []
|/\%[]| \%[] \%[] a sequence of optionally matched atoms
-|/\c| \c \c ignore case
-|/\C| \C \C match case
+|/\c| \c \c ignore case, do not use the 'ignorecase' option
+|/\C| \C \C match case, do not use the 'ignorecase' option
|/\m| \m \m 'magic' on for the following chars in the pattern
|/\M| \M \M 'magic' off for the following chars in the pattern
|/\v| \v \v the following chars in the pattern are "very magic"
@@ -596,9 +597,9 @@ overview.
Example matches ~
ab\{2,3}c "abbc" or "abbbc"
- a\{5} "aaaaa".
- ab\{2,}c "abbc", "abbbc", "abbbbc", etc
- ab\{,3}c "ac", "abc", "abbc" or "abbbc".
+ a\{5} "aaaaa"
+ ab\{2,}c "abbc", "abbbc", "abbbbc", etc.
+ ab\{,3}c "ac", "abc", "abbc" or "abbbc"
a[bc]\{3}d "abbbd", "abbcd", "acbcd", "acccd", etc.
a\(bc\)\{1,2}d "abcd" or "abcbcd"
a[bc]\{-}[cd] "abc" in "abcd"
@@ -681,11 +682,11 @@ overview.
for a match).
Example matches ~
\(foo\)\@<!bar any "bar" that's not in "foobar"
- \(\/\/.*\)\@\<!in "in" which is not after "//"
+ \(\/\/.*\)\@<!in "in" which is not after "//"
*/\@>*
\@> Matches the preceding atom like matching a whole pattern. {not in Vi}
- Like '(?>pattern)" in Perl.
+ Like "(?>pattern)" in Perl.
Example matches ~
\(a*\)\@>a nothing (the "a*" takes all the "a"'s, there can't be
another one following)
@@ -720,7 +721,7 @@ An ordinary atom can be:
start-of-line
*/$*
-$ At end of pattern or in front of "\|" or "\)" ("|" or ")" after "\v"):
+$ At end of pattern or in front of "\|", "\)" or "\n" ('magic' on):
matches end-of-line <EOL>; at other positions, matches literal '$'.
|/zero-width|
@@ -870,7 +871,7 @@ $ At end of pattern or in front of "\|" or "\)" ("|" or ")" after "\v"):
WARNING: When inserting or deleting text Vim does not automatically
update highlighted matches. This means Syntax highlighting quickly
becomes wrong.
- Example, to highlight the all characters after virtual column 72: >
+ Example, to highlight all the characters after virtual column 72: >
/\%>72v.*
< When 'hlsearch' is set and you move the cursor around and make changes
this will clearly show when the match is updated or not.
@@ -1071,6 +1072,9 @@ x A single character, with no special meaning, matches itself
< Matches the words "r", "re", "ro", "rea", "roa", "read" and "road".
There can be no \(\), \%(\) or \z(\) items inside the [] and \%[] does
not nest.
+ To include a "[" use "[[]" and for "]" use []]", e.g.,: >
+ /index\%[[[]0[]]]
+< matches "index" "index[", "index[0" and "index[0]".
{not available when compiled without the +syntax feature}
*/\%d* */\%x* */\%o* */\%u* */\%U* *E678*
@@ -1225,11 +1229,14 @@ Finally, these constructs are unique to Perl:
'ignorecase' does not apply, use |/\c| in the pattern to
ignore case. Otherwise case is not ignored.
+ 'redrawtime' defines the maximum time searched for pattern
+ matches.
+
When matching end-of-line and Vim redraws only part of the
display you may get unexpected results. That is because Vim
looks for a match in the line where redrawing starts.
- Also see |matcharg()|and |getmatches()|. The former returns
+ Also see |matcharg()| and |getmatches()|. The former returns
the highlight group and pattern of a previous |:match|
command. The latter returns a list with highlight groups and
patterns defined by both |matchadd()| and |:match|.
View
10 runtime/doc/pi_getscript.txt
@@ -1,4 +1,4 @@
-*pi_getscript.txt* For Vim version 7.1. Last change: 2007 May 08
+*pi_getscript.txt* For Vim version 7.2a. Last change: 2008 Jan 07
>
GETSCRIPT REFERENCE MANUAL by Charles E. Campbell, Jr.
<
@@ -136,7 +136,7 @@ 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 it's greater than the one stored in the
+vim.sf.net; whenever its greater than the one stored in the
GetLatestVimScripts.dat file, the script will be downloaded
(see |GetLatestVimScripts_dat|).
@@ -335,6 +335,12 @@ The AutoInstall process will:
==============================================================================
9. GetLatestVimScripts History *getscript-history* *glvs-hist* {{{1
+v29 Jan 07, 2008 : * Bram M pointed out that cpo is a global option and that
+ getscriptPlugin.vim was setting it but not restoring it.
+v28 Jan 02, 2008 : * improved shell quoting character handling, cygwin
+ interface, register-a bypass
+ Oct 29, 2007 * Bill McCarthy suggested a change to getscript that avoids
+ creating pop-up windows
v24 Apr 16, 2007 : * removed save&restore of the fo option during script
loading
v23 Nov 03, 2006 : * ignores comments (#...)