mirror of
https://github.com/zoriya/vim.git
synced 2026-01-09 08:08:05 +00:00
Compare commits
49 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8c8de83932 | ||
|
|
864207de08 | ||
|
|
c1a11ed54c | ||
|
|
446cb837a0 | ||
|
|
3577c6fafb | ||
|
|
a7241f5f19 | ||
|
|
f233048a12 | ||
|
|
176dd1e03c | ||
|
|
88f3d3a267 | ||
|
|
bf820723f5 | ||
|
|
b64bb6e3a5 | ||
|
|
196b3b09ad | ||
|
|
f982106440 | ||
|
|
38f12a9e2b | ||
|
|
ba79b4e389 | ||
|
|
9ecd023206 | ||
|
|
98385dc027 | ||
|
|
e7cb9cf672 | ||
|
|
48be32b61e | ||
|
|
e82080179b | ||
|
|
4678465a4b | ||
|
|
7c94c26fb2 | ||
|
|
fde483c865 | ||
|
|
7d96acd66b | ||
|
|
ff064e1698 | ||
|
|
595f51cb22 | ||
|
|
847abc2747 | ||
|
|
f453d35dbe | ||
|
|
c4ea3f46e8 | ||
|
|
63ce8c03d6 | ||
|
|
2c45e945a3 | ||
|
|
bbb7972f6c | ||
|
|
c24dca26ac | ||
|
|
bcebfb6925 | ||
|
|
59fb5aaacb | ||
|
|
0356c8c90e | ||
|
|
497683bc34 | ||
|
|
a6b1a7e182 | ||
|
|
aebaf89fd4 | ||
|
|
7a98925587 | ||
|
|
ec80df74ac | ||
|
|
588ebeb7a5 | ||
|
|
2b57078d73 | ||
|
|
a9aafe5c31 | ||
|
|
7a91a4a12e | ||
|
|
34cbfdf8f8 | ||
|
|
91519e4d6b | ||
|
|
6a5d2ac1d0 | ||
|
|
2a32974646 |
1
Filelist
1
Filelist
@@ -193,6 +193,7 @@ SRC_UNIX = \
|
||||
src/vim_icon.xbm \
|
||||
src/vim_mask.xbm \
|
||||
src/vimtutor \
|
||||
src/gvimtutor \
|
||||
src/which.sh \
|
||||
src/workshop.c \
|
||||
src/workshop.h \
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
!define HAVE_NLS
|
||||
|
||||
!define VER_MAJOR 7
|
||||
!define VER_MINOR 1
|
||||
!define VER_MINOR 2a
|
||||
|
||||
# ----------- No configurable settings below this line -----------
|
||||
|
||||
@@ -139,7 +139,7 @@ FunctionEnd
|
||||
Function .onInstSuccess
|
||||
WriteUninstaller vim${VER_MAJOR}${VER_MINOR}\uninstall-gui.exe
|
||||
MessageBox MB_YESNO|MB_ICONQUESTION \
|
||||
"The installation process has been successfull. Happy Vimming! \
|
||||
"The installation process has been successful. Happy Vimming! \
|
||||
$\n$\n Do you want to see the README file now?" IDNO NoReadme
|
||||
Exec '$0\gvim.exe -R "$0\README.txt"'
|
||||
NoReadme:
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" Vim completion script
|
||||
" Language: C
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2006 May 08
|
||||
" Last Change: 2007 Aug 30
|
||||
|
||||
|
||||
" This function is used for the 'omnifunc' option.
|
||||
@@ -119,6 +119,27 @@ function! ccomplete#Complete(findstart, base)
|
||||
" TODO: join previous line if it makes sense
|
||||
let line = getline('.')
|
||||
let col = col('.')
|
||||
if stridx(strpart(line, 0, col), ';') != -1
|
||||
" Handle multiple declarations on the same line.
|
||||
let col2 = col - 1
|
||||
while line[col2] != ';'
|
||||
let col2 -= 1
|
||||
endwhile
|
||||
let line = strpart(line, col2 + 1)
|
||||
let col -= col2
|
||||
endif
|
||||
if stridx(strpart(line, 0, col), ',') != -1
|
||||
" Handle multiple declarations on the same line in a function
|
||||
" declaration.
|
||||
let col2 = col - 1
|
||||
while line[col2] != ','
|
||||
let col2 -= 1
|
||||
endwhile
|
||||
if strpart(line, col2 + 1, col - col2 - 1) =~ ' *[^ ][^ ]* *[^ ]'
|
||||
let line = strpart(line, col2 + 1)
|
||||
let col -= col2
|
||||
endif
|
||||
endif
|
||||
if len(items) == 1
|
||||
" Completing one word and it's a local variable: May add '[', '.' or
|
||||
" '->'.
|
||||
@@ -140,7 +161,7 @@ function! ccomplete#Complete(findstart, base)
|
||||
let res = [{'match': match, 'tagline' : '', 'kind' : kind, 'info' : line}]
|
||||
else
|
||||
" Completing "var.", "var.something", etc.
|
||||
let res = s:Nextitem(strpart(line, 0, col), items[1:], 0, 1)
|
||||
let res = s:Nextitem(strpart(line, 0, col), items[-1], 0, 1)
|
||||
endif
|
||||
endif
|
||||
|
||||
|
||||
@@ -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
|
||||
" allow user to change the command for obtaining scripts (does fetch work?)
|
||||
" ---------------------------
|
||||
" 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
|
||||
|
||||
" wget vs curl {{{2
|
||||
if !exists("g:GetLatestVimScripts_wget")
|
||||
if executable("wget")
|
||||
let g:GetLatestVimScripts_wget= "wget"
|
||||
@@ -93,262 +126,6 @@ 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\<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
|
||||
@@ -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
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
" Vim autoload file for editing compressed files.
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2007 May 10
|
||||
" Last Change: 2008 May 29
|
||||
|
||||
" These functions are used by the gzip plugin.
|
||||
|
||||
@@ -73,8 +73,15 @@ fun gzip#read(cmd)
|
||||
let empty = line("'[") == 1 && line("']") == line("$")
|
||||
let tmp = tempname()
|
||||
let tmpe = tmp . "." . expand("<afile>:e")
|
||||
if exists('*fnameescape')
|
||||
let tmp_esc = fnameescape(tmp)
|
||||
let tmpe_esc = fnameescape(tmpe)
|
||||
else
|
||||
let tmp_esc = escape(tmp, ' ')
|
||||
let tmpe_esc = escape(tmpe, ' ')
|
||||
endif
|
||||
" write the just read lines to a temp file "'[,']w tmp.gz"
|
||||
execute "silent '[,']w " . escape(tmpe, ' ')
|
||||
execute "silent '[,']w " . tmpe_esc
|
||||
" uncompress the temp file: call system("gzip -dn tmp.gz")
|
||||
call system(a:cmd . " " . s:escape(tmpe))
|
||||
if !filereadable(tmp)
|
||||
@@ -95,12 +102,12 @@ fun gzip#read(cmd)
|
||||
setlocal nobin
|
||||
if exists(":lockmarks")
|
||||
if empty
|
||||
execute "silent lockmarks " . l . "r ++edit " . tmp
|
||||
execute "silent lockmarks " . l . "r ++edit " . tmp_esc
|
||||
else
|
||||
execute "silent lockmarks " . l . "r " . tmp
|
||||
execute "silent lockmarks " . l . "r " . tmp_esc
|
||||
endif
|
||||
else
|
||||
execute "silent " . l . "r " . tmp
|
||||
execute "silent " . l . "r " . tmp_esc
|
||||
endif
|
||||
|
||||
" if buffer became empty, delete trailing blank line
|
||||
@@ -110,8 +117,8 @@ fun gzip#read(cmd)
|
||||
endif
|
||||
" delete the temp file and the used buffers
|
||||
call delete(tmp)
|
||||
silent! exe "bwipe " . tmp
|
||||
silent! exe "bwipe " . tmpe
|
||||
silent! exe "bwipe " . tmp_esc
|
||||
silent! exe "bwipe " . tmpe_esc
|
||||
endif
|
||||
|
||||
" Restore saved option values.
|
||||
@@ -124,10 +131,15 @@ fun gzip#read(cmd)
|
||||
|
||||
" When uncompressed the whole buffer, do autocommands
|
||||
if ok && empty
|
||||
if &verbose >= 8
|
||||
execute "doau BufReadPost " . expand("%:r")
|
||||
if exists('*fnameescape')
|
||||
let fname = fnameescape(expand("%:r"))
|
||||
else
|
||||
execute "silent! doau BufReadPost " . expand("%:r")
|
||||
let fname = escape(expand("%:r"), " \t\n*?[{`$\\%#'\"|!<")
|
||||
endif
|
||||
if &verbose >= 8
|
||||
execute "doau BufReadPost " . fname
|
||||
else
|
||||
execute "silent! doau BufReadPost " . fname
|
||||
endif
|
||||
endif
|
||||
endfun
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,7 +1,7 @@
|
||||
" netrwSettings.vim: makes netrw settings simpler
|
||||
" Date: Mar 26, 2007
|
||||
" Date: Mar 11, 2008
|
||||
" Maintainer: Charles E Campbell, Jr <drchipNOSPAM at campbellfamily dot biz>
|
||||
" Version: 9
|
||||
" Version: 11
|
||||
" Copyright: Copyright (C) 1999-2007 Charles E. Campbell, Jr. {{{1
|
||||
" Permission is hereby granted to use and distribute this code,
|
||||
" with or without modifications, provided that this copyright
|
||||
@@ -19,13 +19,13 @@
|
||||
if exists("g:loaded_netrwSettings") || &cp
|
||||
finish
|
||||
endif
|
||||
let g:loaded_netrwSettings = "v9"
|
||||
let g:loaded_netrwSettings = "v11"
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" NetrwSettings: {{{1
|
||||
fun! netrwSettings#NetrwSettings()
|
||||
" this call is here largely just to insure that netrw has been loaded
|
||||
call netrw#NetSavePosn()
|
||||
call netrw#NetrwSavePosn()
|
||||
if !exists("g:loaded_netrw")
|
||||
echohl WarningMsg | echomsg "***sorry*** netrw needs to be loaded prior to using NetrwSettings" | echohl None
|
||||
return
|
||||
@@ -101,23 +101,36 @@ fun! netrwSettings#NetrwSettings()
|
||||
else
|
||||
put = 'let g:netrw_browsex_viewer = (not defined)'
|
||||
endif
|
||||
let cdescline= line("$")
|
||||
put ='let g:netrw_cd_escape...'
|
||||
put = 'let g:netrw_compress = '.g:netrw_compress
|
||||
let decompressline= line("$")
|
||||
put ='let g:netrw_decompress...'
|
||||
put = 'let g:netrw_dirhistmax = '.g:netrw_dirhistmax
|
||||
put = 'let g:netrw_fastbrowse = '.g:netrw_fastbrowse
|
||||
let fnameescline= line("$")
|
||||
put = 'let g:netrw_fname_escape...'
|
||||
put = 'let g:netrw_ftp_browse_reject = '.g:netrw_ftp_browse_reject
|
||||
put = 'let g:netrw_ftp_list_cmd = '.g:netrw_ftp_list_cmd
|
||||
put = 'let g:netrw_ftp_sizelist_cmd = '.g:netrw_ftp_sizelist_cmd
|
||||
put = 'let g:netrw_ftp_timelist_cmd = '.g:netrw_ftp_timelist_cmd
|
||||
let globescline= line("$")
|
||||
put ='let g:netrw_glob_escape...'
|
||||
put = 'let g:netrw_hide = '.g:netrw_hide
|
||||
put = 'let g:netrw_keepdir = '.g:netrw_keepdir
|
||||
put = 'let g:netrw_list_cmd = '.g:netrw_list_cmd
|
||||
put = 'let g:netrw_list_hide = '.g:netrw_list_hide
|
||||
put = 'let g:netrw_local_mkdir = '.g:netrw_local_mkdir
|
||||
put = 'let g:netrw_local_rmdir = '.g:netrw_local_rmdir
|
||||
put = 'let g:netrw_liststyle = '.g:netrw_liststyle
|
||||
put = 'let g:netrw_localcopycmd = '.g:netrw_localcopycmd
|
||||
put = 'let g:netrw_local_mkdir = '.g:netrw_local_mkdir
|
||||
put = 'let g:netrw_localmovecmd = '.g:netrw_localmovecmd
|
||||
put = 'let g:netrw_local_rmdir = '.g:netrw_local_rmdir
|
||||
put = 'let g:netrw_maxfilenamelen = '.g:netrw_maxfilenamelen
|
||||
put = 'let g:netrw_menu = '.g:netrw_menu
|
||||
put = 'let g:netrw_mkdir_cmd = '.g:netrw_mkdir_cmd
|
||||
put = 'let g:netrw_preview = '.g:netrw_preview
|
||||
put = 'let g:netrw_rename_cmd = '.g:netrw_rename_cmd
|
||||
put = 'let g:netrw_retmap = '.g:netrw_retmap
|
||||
put = 'let g:netrw_rm_cmd = '.g:netrw_rm_cmd
|
||||
put = 'let g:netrw_rmdir_cmd = '.g:netrw_rmdir_cmd
|
||||
put = 'let g:netrw_rmf_cmd = '.g:netrw_rmf_cmd
|
||||
@@ -125,11 +138,15 @@ fun! netrwSettings#NetrwSettings()
|
||||
put = 'let g:netrw_sort_by = '.g:netrw_sort_by
|
||||
put = 'let g:netrw_sort_direction = '.g:netrw_sort_direction
|
||||
put = 'let g:netrw_sort_sequence = '.g:netrw_sort_sequence
|
||||
put = 'let g:netrw_special_syntax = '.g:netrw_special_syntax
|
||||
put = 'let g:netrw_ssh_browse_reject = '.g:netrw_ssh_browse_reject
|
||||
put = 'let g:netrw_scpport = '.g:netrw_scpport
|
||||
put = 'let g:netrw_sshport = '.g:netrw_sshport
|
||||
put = 'let g:netrw_timefmt = '.g:netrw_timefmt
|
||||
let tmpfileescline= line("$")
|
||||
put ='let g:netrw_tmpfile_escape...'
|
||||
put = 'let g:netrw_use_noswf = '.g:netrw_use_noswf
|
||||
put = 'let g:netrw_xstrlen = '.g:netrw_xstrlen
|
||||
put = 'let g:netrw_winsize = '.g:netrw_winsize
|
||||
|
||||
put =''
|
||||
@@ -142,13 +159,18 @@ fun! netrwSettings#NetrwSettings()
|
||||
silent %s/= $/= ''/e
|
||||
1
|
||||
|
||||
" Put in shq setting.
|
||||
" Put in g:netrw_shq setting and g:netrw_cd_escape
|
||||
" (deferred so as to avoid the quote manipulation just preceding)
|
||||
if g:netrw_shq == "'"
|
||||
call setline(shqline,'let g:netrw_shq = "'.g:netrw_shq.'"')
|
||||
call setline(shqline, 'let g:netrw_shq = "'.g:netrw_shq.'"')
|
||||
else
|
||||
call setline(shqline,"let g:netrw_shq = '".g:netrw_shq."'")
|
||||
call setline(shqline, "let g:netrw_shq = '".g:netrw_shq."'")
|
||||
endif
|
||||
call setline(cdescline, "let g:netrw_cd_escape = ".'"'.escape(g:netrw_cd_escape,'\"').'"')
|
||||
call setline(decompressline,"let g:netrw_decompress = ".substitute(string(g:netrw_decompress),"^'\\(.*\\)'$",'\1',''))
|
||||
call setline(fnameescline, "let g:netrw_fname_escape = '".escape(g:netrw_fname_escape,"'")."'")
|
||||
call setline(globescline, "let g:netrw_glob_escape = '".escape(g:netrw_glob_escape,"'")."'")
|
||||
call setline(tmpfileescline,"let g:netrw_tmpfile_escape = '".escape(g:netrw_tmpfile_escape,"'")."'")
|
||||
|
||||
set nomod
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@ if !exists("g:rubycomplete_classes_in_global")
|
||||
endif
|
||||
|
||||
if !exists("g:rubycomplete_buffer_loading")
|
||||
let g:rubycomplete_classes_in_global = 0
|
||||
let g:rubycomplete_buffer_loading = 0
|
||||
endif
|
||||
|
||||
if !exists("g:rubycomplete_include_object")
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
" Vim script to download a missing spell file
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2007 May 08
|
||||
" Last Change: 2008 May 29
|
||||
|
||||
if !exists('g:spellfile_URL')
|
||||
let g:spellfile_URL = 'ftp://ftp.vim.org/pub/vim/runtime/spell'
|
||||
@@ -106,7 +106,12 @@ function! spellfile#LoadFile(lang)
|
||||
endfor
|
||||
let dirchoice = confirm(msg, dirchoices) - 2
|
||||
if dirchoice >= 0
|
||||
exe "write " . escape(dirlist[dirchoice], ' ') . '/' . fname
|
||||
if exists('*fnameescape')
|
||||
let dirname = fnameescape(dirlist[dirchoice])
|
||||
else
|
||||
let dirname = escape(dirlist[dirchoice], ' ')
|
||||
endif
|
||||
exe "write " . dirname . '/' . fname
|
||||
|
||||
" Also download the .sug file, if the user wants to.
|
||||
let msg = "Do you want me to try getting the .sug file?\n"
|
||||
@@ -119,7 +124,7 @@ function! spellfile#LoadFile(lang)
|
||||
call spellfile#Nread(fname)
|
||||
if getline(2) =~ 'VIMsug'
|
||||
1d
|
||||
exe "write " . escape(dirlist[dirchoice], ' ') . '/' . fname
|
||||
exe "write " . dirname . '/' . fname
|
||||
set nomod
|
||||
else
|
||||
echo 'Sorry, downloading failed'
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
" Vim OMNI completion script for SQL
|
||||
" Language: SQL
|
||||
" Maintainer: David Fishburn <fishburn@ianywhere.com>
|
||||
" Version: 5.0
|
||||
" Last Change: Mon Jun 05 2006 3:30:04 PM
|
||||
" Version: 6.0
|
||||
" Last Change: Thu 03 Apr 2008 10:37:54 PM Eastern Daylight Time
|
||||
" Usage: For detailed help
|
||||
" ":help sql.txt"
|
||||
" or ":help ft-sql-omni"
|
||||
@@ -106,7 +106,7 @@ function! sqlcomplete#Complete(findstart, base)
|
||||
let begindot = 1
|
||||
endif
|
||||
while start > 0
|
||||
if line[start - 1] =~ '\w'
|
||||
if line[start - 1] =~ '\(\w\|\s\+\)'
|
||||
let start -= 1
|
||||
elseif line[start - 1] =~ '\.' &&
|
||||
\ compl_type =~ 'column\|table\|view\|procedure'
|
||||
@@ -178,11 +178,10 @@ function! sqlcomplete#Complete(findstart, base)
|
||||
|
||||
" Allow the user to override the dbext plugin to specify whether
|
||||
" the owner/creator should be included in the list
|
||||
let saved_dbext_show_owner = 1
|
||||
if exists('g:dbext_default_dict_show_owner')
|
||||
let saved_dbext_show_owner = g:dbext_default_dict_show_owner
|
||||
if g:loaded_dbext >= 300
|
||||
let saveSetting = DB_listOption('dict_show_owner')
|
||||
exec 'DBSetOption dict_show_owner='.(g:omni_sql_include_owner==1?'1':'0')
|
||||
endif
|
||||
let g:dbext_default_dict_show_owner = g:omni_sql_include_owner
|
||||
|
||||
let compl_type_uc = substitute(compl_type, '\w\+', '\u&', '')
|
||||
if s:sql_file_{compl_type} == ""
|
||||
@@ -192,18 +191,12 @@ function! sqlcomplete#Complete(findstart, base)
|
||||
if s:sql_file_{compl_type} != ""
|
||||
if filereadable(s:sql_file_{compl_type})
|
||||
let compl_list = readfile(s:sql_file_{compl_type})
|
||||
" let dic_list = readfile(s:sql_file_{compl_type})
|
||||
" if !empty(dic_list)
|
||||
" for elem in dic_list
|
||||
" let kind = (compl_type=='table'?'m':(compl_type=='procedure'?'f':'v'))
|
||||
" let item = {'word':elem, 'menu':elem, 'kind':kind, 'info':compl_type}
|
||||
" let compl_list += [item]
|
||||
" endfor
|
||||
" endif
|
||||
endif
|
||||
endif
|
||||
|
||||
let g:dbext_default_dict_show_owner = saved_dbext_show_owner
|
||||
if g:loaded_dbext > 300
|
||||
exec 'DBSetOption dict_show_owner='.saveSetting
|
||||
endif
|
||||
elseif compl_type =~? 'column'
|
||||
|
||||
" This type of completion relies upon the dbext.vim plugin
|
||||
@@ -450,8 +443,8 @@ function! s:SQLCCheck4dbext()
|
||||
" Leave time for the user to read the error message
|
||||
:sleep 2
|
||||
return -1
|
||||
elseif g:loaded_dbext < 300
|
||||
let msg = "The dbext plugin must be at least version 3.00 " .
|
||||
elseif g:loaded_dbext < 600
|
||||
let msg = "The dbext plugin must be at least version 5.30 " .
|
||||
\ " for dynamic SQL completion"
|
||||
call s:SQLCErrorMsg(msg)
|
||||
" Leave time for the user to read the error message
|
||||
@@ -514,34 +507,42 @@ endfunction
|
||||
function! s:SQLCGetObjectOwner(object)
|
||||
" The owner regex matches a word at the start of the string which is
|
||||
" followed by a dot, but doesn't include the dot in the result.
|
||||
" ^ - from beginning of line
|
||||
" "\? - ignore any quotes
|
||||
" \zs - start the match now
|
||||
" \w\+ - get owner name
|
||||
" \ze - end the match
|
||||
" "\? - ignore any quotes
|
||||
" \. - must by followed by a .
|
||||
let owner = matchstr( a:object, '^"\?\zs\w\+\ze"\?\.' )
|
||||
" ^ - from beginning of line
|
||||
" \("\|\[\)\? - ignore any quotes
|
||||
" \zs - start the match now
|
||||
" .\{-} - get owner name
|
||||
" \ze - end the match
|
||||
" \("\|\[\)\? - ignore any quotes
|
||||
" \. - must by followed by a .
|
||||
" let owner = matchstr( a:object, '^\s*\zs.*\ze\.' )
|
||||
let owner = matchstr( a:object, '^\("\|\[\)\?\zs\.\{-}\ze\("\|\]\)\?\.' )
|
||||
return owner
|
||||
endfunction
|
||||
|
||||
function! s:SQLCGetColumns(table_name, list_type)
|
||||
" Check if the table name was provided as part of the column name
|
||||
let table_name = matchstr(a:table_name, '^[a-zA-Z0-9_]\+\ze\.\?')
|
||||
let table_name = matchstr(a:table_name, '^["\[\]a-zA-Z0-9_ ]\+\ze\.\?')
|
||||
let table_cols = []
|
||||
let table_alias = ''
|
||||
let move_to_top = 1
|
||||
|
||||
let table_name = substitute(table_name, '\s*\(.\{-}\)\s*$', '\1', 'g')
|
||||
|
||||
" If the table name was given as:
|
||||
" where c.
|
||||
let table_name = substitute(table_name, '^\c\(WHERE\|AND\|OR\)\s\+', '', '')
|
||||
if g:loaded_dbext >= 300
|
||||
let saveSettingAlias = DB_listOption('use_tbl_alias')
|
||||
exec 'DBSetOption use_tbl_alias=n'
|
||||
endif
|
||||
|
||||
let table_name_stripped = substitute(table_name, '["\[\]]*', '', 'g')
|
||||
|
||||
" Check if we have already cached the column list for this table
|
||||
" by its name
|
||||
let list_idx = index(s:tbl_name, table_name, 0, &ignorecase)
|
||||
let list_idx = index(s:tbl_name, table_name_stripped, 0, &ignorecase)
|
||||
if list_idx > -1
|
||||
let table_cols = split(s:tbl_cols[list_idx])
|
||||
let table_cols = split(s:tbl_cols[list_idx], '\n')
|
||||
else
|
||||
" Check if we have already cached the column list for this table
|
||||
" by its alias, assuming the table_name provided was actually
|
||||
@@ -549,11 +550,11 @@ function! s:SQLCGetColumns(table_name, list_type)
|
||||
" select *
|
||||
" from area a
|
||||
" where a.
|
||||
let list_idx = index(s:tbl_alias, table_name, 0, &ignorecase)
|
||||
let list_idx = index(s:tbl_alias, table_name_stripped, 0, &ignorecase)
|
||||
if list_idx > -1
|
||||
let table_alias = table_name
|
||||
let table_alias = table_name_stripped
|
||||
let table_name = s:tbl_name[list_idx]
|
||||
let table_cols = split(s:tbl_cols[list_idx])
|
||||
let table_cols = split(s:tbl_cols[list_idx], '\n')
|
||||
endif
|
||||
endif
|
||||
|
||||
@@ -609,8 +610,8 @@ function! s:SQLCGetColumns(table_name, list_type)
|
||||
" '.*' - Exclude the rest of the line in the match
|
||||
let table_name_new = matchstr(@y,
|
||||
\ 'from.\{-}'.
|
||||
\ '\zs\(\(\<\w\+\>\)\.\)\?'.
|
||||
\ '\<\w\+\>\ze'.
|
||||
\ '\zs\(\("\|\[\)\?.\{-}\("\|\]\)\.\)\?'.
|
||||
\ '\("\|\[\)\?.\{-}\("\|\]\)\ze'.
|
||||
\ '\s\+\%(as\s\+\)\?\<'.
|
||||
\ matchstr(table_name, '.\{-}\ze\.\?$').
|
||||
\ '\>'.
|
||||
@@ -618,6 +619,7 @@ function! s:SQLCGetColumns(table_name, list_type)
|
||||
\ '\(\<where\>\|$\)'.
|
||||
\ '.*'
|
||||
\ )
|
||||
|
||||
if table_name_new != ''
|
||||
let table_alias = table_name
|
||||
let table_name = table_name_new
|
||||
@@ -668,7 +670,7 @@ function! s:SQLCGetColumns(table_name, list_type)
|
||||
let s:tbl_name = add( s:tbl_name, table_name )
|
||||
let s:tbl_alias = add( s:tbl_alias, table_alias )
|
||||
let s:tbl_cols = add( s:tbl_cols, table_cols_str )
|
||||
let table_cols = split(table_cols_str)
|
||||
let table_cols = split(table_cols_str, '\n')
|
||||
endif
|
||||
|
||||
endif
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -1,21 +1,21 @@
|
||||
" tar.vim: Handles browsing tarfiles
|
||||
" AUTOLOAD PORTION
|
||||
" Date: Sep 29, 2006
|
||||
" Version: 11
|
||||
" Date: Jun 12, 2008
|
||||
" Version: 16
|
||||
" Maintainer: Charles E Campbell, Jr <NdrOchip@ScampbellPfamily.AbizM-NOSPAM>
|
||||
" License: Vim License (see vim's :help license)
|
||||
"
|
||||
" Contains many ideas from Michael Toren's <tar.vim>
|
||||
"
|
||||
" Copyright: Copyright (C) 2005 Charles E. Campbell, Jr. {{{1
|
||||
" Copyright: Copyright (C) 2005-2008 Charles E. Campbell, Jr. {{{1
|
||||
" Permission is hereby granted to use and distribute this code,
|
||||
" with or without modifications, provided that this copyright
|
||||
" notice is copied with it. Like anything else that's free,
|
||||
" tarPlugin.vim is provided *as is* and comes with no warranty
|
||||
" of any kind, either expressed or implied. By using this
|
||||
" plugin, you agree that in no event will the copyright
|
||||
" holder be liable for any damages resulting from the use
|
||||
" of this software.
|
||||
" tar.vim and tarPlugin.vim are provided *as is* and comes
|
||||
" with no warranty of any kind, either expressed or implied.
|
||||
" By using this plugin, you agree that in no event will the
|
||||
" copyright holder be liable for any damages resulting from
|
||||
" the use of this software.
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" Load Once: {{{1
|
||||
@@ -24,8 +24,11 @@ set cpo&vim
|
||||
if &cp || exists("g:loaded_tar") || v:version < 700
|
||||
finish
|
||||
endif
|
||||
let g:loaded_tar= "v11"
|
||||
let g:loaded_tar= "v16"
|
||||
"call Decho("loading autoload/tar.vim")
|
||||
if v:version < 701 || (v:version == 701 && !has("patch299"))
|
||||
echoerr "(autoload/tar.vim) need vim v7.1 with patchlevel 299"
|
||||
endif
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" Default Settings: {{{1
|
||||
@@ -41,14 +44,35 @@ endif
|
||||
if !exists("g:tar_writeoptions")
|
||||
let g:tar_writeoptions= "uf"
|
||||
endif
|
||||
if !exists("g:tar_shq")
|
||||
if has("unix")
|
||||
let g:tar_shq= "'"
|
||||
|
||||
if !exists("g:netrw_cygwin")
|
||||
if has("win32") || has("win95") || has("win64") || has("win16")
|
||||
if &shell =~ '\%(\<bash\>\|\<zsh\>\)\%(\.exe\)\=$'
|
||||
let g:netrw_cygwin= 1
|
||||
else
|
||||
let g:netrw_cygwin= 0
|
||||
endif
|
||||
else
|
||||
let g:tar_shq= '"'
|
||||
let g:netrw_cygwin= 0
|
||||
endif
|
||||
endif
|
||||
|
||||
" set up shell quoting character
|
||||
if !exists("g:tar_shq")
|
||||
if exists("&shq") && &shq != ""
|
||||
let g:tar_shq= &shq
|
||||
elseif has("win32") || has("win95") || has("win64") || has("win16")
|
||||
if exists("g:netrw_cygwin") && g:netrw_cygwin
|
||||
let g:tar_shq= "'"
|
||||
else
|
||||
let g:tar_shq= '"'
|
||||
endif
|
||||
else
|
||||
let g:tar_shq= "'"
|
||||
endif
|
||||
" call Decho("g:tar_shq<".g:tar_shq.">")
|
||||
endif
|
||||
|
||||
" ----------------
|
||||
" Functions: {{{1
|
||||
" ----------------
|
||||
@@ -95,27 +119,32 @@ fun! tar#Browse(tarfile)
|
||||
|
||||
" give header
|
||||
" call Decho("printing header")
|
||||
exe "$put ='".'\"'." tar.vim version ".g:loaded_tar."'"
|
||||
exe "$put ='".'\"'." Browsing tarfile ".a:tarfile."'"
|
||||
exe "$put ='".'\"'." Select a file with cursor and press ENTER"."'"
|
||||
let lastline= line("$")
|
||||
call setline(lastline+1,'" tar.vim version '.g:loaded_tar)
|
||||
call setline(lastline+2,'" Browsing tarfile '.a:tarfile)
|
||||
call setline(lastline+3,'" Select a file with cursor and press ENTER')
|
||||
$put =''
|
||||
0d
|
||||
$
|
||||
|
||||
let tarfile= a:tarfile
|
||||
if has("win32") && executable("cygpath")
|
||||
" assuming cygwin
|
||||
let tarfile=substitute(system("cygpath -u ".tarfile),'\n$','','e')
|
||||
let tarfile=substitute(system("cygpath -u ".s:Escape(tarfile)),'\n$','','e')
|
||||
endif
|
||||
let curlast= line("$")
|
||||
if tarfile =~# '\.\(gz\|tgz\)$'
|
||||
" call Decho("exe silent r! gzip -d -c ".g:tar_shq.tarfile.g:tar_shq."| ".g:tar_cmd." -".g:tar_browseoptions." - ")
|
||||
exe "silent r! gzip -d -c ".g:tar_shq.tarfile.g:tar_shq."| ".g:tar_cmd." -".g:tar_browseoptions." - "
|
||||
" call Decho("1: exe silent r! gzip -d -c ".s:Escape(tarfile)." | ".g:tar_cmd." -".g:tar_browseoptions." - ")
|
||||
exe "silent r! gzip -d -c -- ".s:Escape(tarfile)." | ".g:tar_cmd." -".g:tar_browseoptions." - "
|
||||
elseif tarfile =~# '\.lrp'
|
||||
" call Decho("2: exe silent r! cat -- ".s:Escape(tarfile)."|gzip -d -c -|".g:tar_cmd." -".g:tar_browseoptions." - ")
|
||||
exe "silent r! cat -- ".s:Escape(tarfile)."|gzip -d -c -|".g:tar_cmd." -".g:tar_browseoptions." - "
|
||||
elseif tarfile =~# '\.bz2$'
|
||||
" call Decho("exe silent r! bzip2 -d -c ".g:tar_shq.tarfile.g:tar_shq."| ".g:tar_cmd." -".g:tar_browseoptions." - ")
|
||||
exe "silent r! bzip2 -d -c ".g:tar_shq.tarfile.g:tar_shq."| ".g:tar_cmd." -".g:tar_browseoptions." - "
|
||||
" call Decho("3: exe silent r! bzip2 -d -c ".s:Escape(tarfile)." | ".g:tar_cmd." -".g:tar_browseoptions." - ")
|
||||
exe "silent r! bzip2 -d -c -- ".s:Escape(tarfile)." | ".g:tar_cmd." -".g:tar_browseoptions." - "
|
||||
else
|
||||
" call Decho("exe silent r! ".g:tar_cmd." -".g:tar_browseoptions." ".g:tar_shq.tarfile.g:tar_shq)
|
||||
exe "silent r! ".g:tar_cmd." -".g:tar_browseoptions." ".g:tar_shq.tarfile.g:tar_shq
|
||||
" call Decho("4: exe silent r! ".g:tar_cmd." -".g:tar_browseoptions." ".s:Escape(tarfile))
|
||||
exe "silent r! ".g:tar_cmd." -".g:tar_browseoptions." ".s:Escape(tarfile)
|
||||
endif
|
||||
if v:shell_error != 0
|
||||
redraw!
|
||||
@@ -166,13 +195,15 @@ fun! s:TarBrowseSelect()
|
||||
let curfile= expand("%")
|
||||
if has("win32") && executable("cygpath")
|
||||
" assuming cygwin
|
||||
let tarfile=substitute(system("cygpath -u ".tarfile),'\n$','','e')
|
||||
let tarfile=substitute(system("cygpath -u ".s:Escape(tarfile)),'\n$','','e')
|
||||
endif
|
||||
|
||||
new
|
||||
wincmd _
|
||||
if !exists("g:tar_nomax") || g:tar_nomax == 0
|
||||
wincmd _
|
||||
endif
|
||||
let s:tblfile_{winnr()}= curfile
|
||||
call tar#Read("tarfile:".tarfile.':'.fname,1)
|
||||
call tar#Read("tarfile:".tarfile.'::'.fname,1)
|
||||
filetype detect
|
||||
|
||||
let &report= repkeep
|
||||
@@ -185,27 +216,50 @@ fun! tar#Read(fname,mode)
|
||||
" call Dfunc("tar#Read(fname<".a:fname.">,mode=".a:mode.")")
|
||||
let repkeep= &report
|
||||
set report=10
|
||||
let tarfile = substitute(a:fname,'tarfile:\(.\{-}\):.*$','\1','')
|
||||
let fname = substitute(a:fname,'tarfile:.\{-}:\(.*\)$','\1','')
|
||||
let tarfile = substitute(a:fname,'tarfile:\(.\{-}\)::.*$','\1','')
|
||||
let fname = substitute(a:fname,'tarfile:.\{-}::\(.*\)$','\1','')
|
||||
if has("win32") && executable("cygpath")
|
||||
" assuming cygwin
|
||||
let tarfile=substitute(system("cygpath -u ".tarfile),'\n$','','e')
|
||||
let tarfile=substitute(system("cygpath -u ".s:Escape(tarfile)),'\n$','','e')
|
||||
endif
|
||||
" call Decho("tarfile<".tarfile.">")
|
||||
" call Decho("fname<".fname.">")
|
||||
|
||||
if tarfile =~# '\.\(gz\|tgz\)$'
|
||||
" call Decho("exe silent r! gzip -d -c ".g:tar_shq.tarfile.g:tar_shq."| ".g:tar_cmd." -OPxf - '".fname."'")
|
||||
exe "silent r! gzip -d -c ".g:tar_shq.tarfile.g:tar_shq."| ".g:tar_cmd." -".g:tar_readoptions." - '".fname."'"
|
||||
elseif tarfile =~# '\.bz2$'
|
||||
" call Decho("exe silent r! bzip2 -d -c ".g:tar_shq.tarfile.g:tar_shq."| ".g:tar_cmd." -".g:tar_readoptions." - '".fname."'")
|
||||
exe "silent r! bzip2 -d -c ".g:tar_shq.tarfile.g:tar_shq."| ".g:tar_cmd." -".g:tar_readoptions." - '".fname."'"
|
||||
if fname =~ '\.gz$' && executable("zcat")
|
||||
let decmp= "|zcat"
|
||||
let doro = 1
|
||||
elseif fname =~ '\.bz2$' && executable("bzcat")
|
||||
let decmp= "|bzcat"
|
||||
let doro = 1
|
||||
else
|
||||
" call Decho("exe silent r! ".g:tar_cmd." -".g:tar_readoptions." ".g:tar_shq.tarfile.g:tar_shq." ".g:tar_shq.fname.g:tar_shq)
|
||||
exe "silent r! ".g:tar_cmd." -".g:tar_readoptions." ".g:tar_shq.tarfile.g:tar_shq." ".g:tar_shq.fname.g:tar_shq
|
||||
let decmp=""
|
||||
let doro = 0
|
||||
if fname =~ '\.gz$\|\.bz2$\|\.Z$\|\.zip$'
|
||||
setlocal bin
|
||||
endif
|
||||
endif
|
||||
|
||||
if tarfile =~# '\.\(gz\|tgz\)$'
|
||||
" call Decho("5: exe silent r! gzip -d -c -- ".s:Escape(tarfile)."| ".g:tar_cmd.' -'.g:tar_readoptions.' - '.s:Escape(fname))
|
||||
exe "silent r! gzip -d -c -- ".s:Escape(tarfile)."| ".g:tar_cmd." -".g:tar_readoptions." - ".s:Escape(fname).decmp
|
||||
elseif tarfile =~# '\.lrp$'
|
||||
" call Decho("6: exe silent r! cat ".s:Escape(tarfile)." | gzip -d -c - | ".g:tar_cmd." -".g:tar_readoptions." - ".s:Escape(fname).decmp)
|
||||
exe "silent r! cat -- ".s:Escape(tarfile)." | gzip -d -c - | ".g:tar_cmd." -".g:tar_readoptions." - ".s:Escape(fname).decmp
|
||||
elseif tarfile =~# '\.bz2$'
|
||||
" call Decho("7: exe silent r! bzip2 -d -c ".s:Escape(tarfile)."| ".g:tar_cmd." -".g:tar_readoptions." - ".s:Escape(fname).decmp)
|
||||
exe "silent r! bzip2 -d -c -- ".s:Escape(tarfile)."| ".g:tar_cmd." -".g:tar_readoptions." - ".s:Escape(fname).decmp
|
||||
else
|
||||
" call Decho("8: exe silent r! ".g:tar_cmd." -".g:tar_readoptions." -- ".s:Escape(tarfile)." ".s:Escape(fname))
|
||||
exe "silent r! ".g:tar_cmd." -".g:tar_readoptions." ".s:Escape(tarfile)." -- ".s:Escape(fname).decmp
|
||||
endif
|
||||
|
||||
if doro
|
||||
" because the reverse process of compressing changed files back into the tarball is not currently supported
|
||||
setlocal ro
|
||||
endif
|
||||
|
||||
let w:tarfile= a:fname
|
||||
exe "file tarfile:".fname
|
||||
exe "file tarfile::".fname
|
||||
|
||||
" cleanup
|
||||
0d
|
||||
@@ -251,7 +305,7 @@ fun! tar#Write(fname)
|
||||
|
||||
" attempt to change to the indicated directory
|
||||
try
|
||||
exe "cd ".escape(tmpdir,' \')
|
||||
exe "cd ".fnameescape(tmpdir)
|
||||
catch /^Vim\%((\a\+)\)\=:E344/
|
||||
redraw!
|
||||
echohl Error | echo "***error*** (tar#Write) cannot cd to temporary directory" | Echohl None
|
||||
@@ -270,24 +324,26 @@ fun! tar#Write(fname)
|
||||
cd _ZIPVIM_
|
||||
" call Decho("current directory now: ".getcwd())
|
||||
|
||||
let tarfile = substitute(w:tarfile,'tarfile:\(.\{-}\):.*$','\1','')
|
||||
let fname = substitute(w:tarfile,'tarfile:.\{-}:\(.*\)$','\1','')
|
||||
let tarfile = substitute(w:tarfile,'tarfile:\(.\{-}\)::.*$','\1','')
|
||||
let fname = substitute(w:tarfile,'tarfile:.\{-}::\(.*\)$','\1','')
|
||||
|
||||
" handle compressed archives
|
||||
if tarfile =~# '\.gz'
|
||||
call system("gzip -d ".tarfile)
|
||||
call system("gzip -d -- ".tarfile)
|
||||
let tarfile = substitute(tarfile,'\.gz','','e')
|
||||
let compress= "gzip '".tarfile."'"
|
||||
let compress= "gzip ".s:Escape(tarfile)
|
||||
elseif tarfile =~# '\.tgz'
|
||||
call system("gzip -d ".tarfile)
|
||||
call system("gzip -d -- ".s:Escape(tarfile))
|
||||
let tarfile = substitute(tarfile,'\.tgz','.tar','e')
|
||||
let compress= "gzip '".tarfile."'"
|
||||
let compress= "gzip -- ".s:Escape(tarfile)
|
||||
let tgz = 1
|
||||
elseif tarfile =~# '\.bz2'
|
||||
call system("bzip2 -d ".tarfile)
|
||||
call system("bzip2 -d -- ".s:Escape(tarfile))
|
||||
let tarfile = substitute(tarfile,'\.bz2','','e')
|
||||
let compress= "bzip2 '".tarfile."'"
|
||||
let compress= "bzip2 -- ".s:Escape(tarfile)
|
||||
endif
|
||||
" call Decho("tarfile<".tarfile.">")
|
||||
" call Decho("compress<".compress.">")
|
||||
|
||||
if v:shell_error != 0
|
||||
redraw!
|
||||
@@ -309,26 +365,26 @@ fun! tar#Write(fname)
|
||||
endif
|
||||
" call Decho("tarfile<".tarfile."> fname<".fname.">")
|
||||
|
||||
exe "w! ".fname
|
||||
exe "w! ".fnameescape(fname)
|
||||
if executable("cygpath")
|
||||
let tarfile = substitute(system("cygpath ".tarfile),'\n','','e')
|
||||
let tarfile = substitute(system("cygpath ".s:Escape(tarfile)),'\n','','e')
|
||||
endif
|
||||
|
||||
" delete old file from tarfile
|
||||
" call Decho("tar --delete -f '".tarfile."' '".fname."'")
|
||||
call system("tar --delete -f '".tarfile."' '".fname."'")
|
||||
" call Decho("system(tar --delete -f ".s:Escape(tarfile)." -- ".s:Escape(fname).")")
|
||||
call system("tar --delete -f ".s:Escape(tarfile)." -- ".s:Escape(fname))
|
||||
if v:shell_error != 0
|
||||
redraw!
|
||||
echohl Error | echo "***error*** (tar#Write) sorry, unable to update ".tarfile." with ".fname | echohl None
|
||||
echohl Error | echo "***error*** (tar#Write) sorry, unable to update ".fnameescape(tarfile)." with ".fnameescape(fname) | echohl None
|
||||
" call inputsave()|call input("Press <cr> to continue")|call inputrestore()
|
||||
else
|
||||
|
||||
" update tarfile with new file
|
||||
" call Decho("tar -".g:tar_writeoptions." '".tarfile."' '".fname."'")
|
||||
call system("tar -".g:tar_writeoptions." '".tarfile."' '".fname."'")
|
||||
" call Decho("tar -".g:tar_writeoptions." ".s:Escape(tarfile)." -- ".s:Escape(fname))
|
||||
call system("tar -".g:tar_writeoptions." ".s:Escape(tarfile)." -- ".s:Escape(fname))
|
||||
if v:shell_error != 0
|
||||
redraw!
|
||||
echohl Error | echo "***error*** (tar#Write) sorry, unable to update ".tarfile." with ".fname | echohl None
|
||||
echohl Error | echo "***error*** (tar#Write) sorry, unable to update ".fnameescape(tarfile)." with ".fnameescape(fname) | echohl None
|
||||
" call inputsave()|call input("Press <cr> to continue")|call inputrestore()
|
||||
elseif exists("compress")
|
||||
" call Decho("call system(".compress.")")
|
||||
@@ -372,19 +428,31 @@ endfun
|
||||
fun! s:Rmdir(fname)
|
||||
" call Dfunc("Rmdir(fname<".a:fname.">)")
|
||||
if has("unix")
|
||||
call system("/bin/rm -rf ".a:fname)
|
||||
call system("/bin/rm -rf -- ".s:Escape(a:fname))
|
||||
elseif has("win32") || has("win95") || has("win64") || has("win16")
|
||||
if &shell =~? "sh$"
|
||||
call system("/bin/rm -rf ".a:fname)
|
||||
call system("/bin/rm -rf -- ".s:Escape(a:fname))
|
||||
else
|
||||
call system("del /S ".a:fname)
|
||||
call system("del /S ".s:Escape(a:fname))
|
||||
endif
|
||||
endif
|
||||
" call Dret("Rmdir")
|
||||
endfun
|
||||
|
||||
" ------------------------------------------------------------------------
|
||||
" ---------------------------------------------------------------------
|
||||
" s:Escape: {{{2
|
||||
fun s:Escape(name)
|
||||
" shellescape() was added by patch 7.0.111
|
||||
if exists("*shellescape")
|
||||
let qnameq= shellescape(a:name)
|
||||
else
|
||||
let qnameq= g:tar_shq . a:name . g:tar_shq
|
||||
endif
|
||||
return qnameq
|
||||
endfun
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" Modelines And Restoration: {{{1
|
||||
let &cpo= s:keepcpo
|
||||
unlet s:keepcpo
|
||||
" vim:ts=8 fdm=marker
|
||||
" vim:ts=8 fdm=marker
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
" vimball.vim : construct a file containing both paths and files
|
||||
" Author: Charles E. Campbell, Jr.
|
||||
" Date: May 07, 2007
|
||||
" Version: 22
|
||||
" Date: Jun 05, 2008
|
||||
" Version: 27
|
||||
" GetLatestVimScripts: 1502 1 :AutoInstall: vimball.vim
|
||||
" Copyright: (c) 2004-2006 by Charles E. Campbell, Jr.
|
||||
" Copyright: (c) 2004-2008 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.
|
||||
@@ -15,8 +15,9 @@ if &cp || exists("g:loaded_vimball") || v:version < 700
|
||||
finish
|
||||
endif
|
||||
let s:keepcpo = &cpo
|
||||
let g:loaded_vimball = "v22"
|
||||
let g:loaded_vimball = "v27"
|
||||
set cpo&vim
|
||||
"DechoTabOn
|
||||
|
||||
" =====================================================================
|
||||
" Constants: {{{1
|
||||
@@ -24,6 +25,57 @@ if !exists("s:USAGE")
|
||||
let s:USAGE = 0
|
||||
let s:WARNING = 1
|
||||
let s:ERROR = 2
|
||||
|
||||
" determine if cygwin is in use or not
|
||||
if !exists("g:netrw_cygwin")
|
||||
if has("win32") || has("win95") || has("win64") || has("win16")
|
||||
if &shell =~ '\%(\<bash\>\|\<zsh\>\)\%(\.exe\)\=$'
|
||||
let g:netrw_cygwin= 1
|
||||
else
|
||||
let g:netrw_cygwin= 0
|
||||
endif
|
||||
else
|
||||
let g:netrw_cygwin= 0
|
||||
endif
|
||||
endif
|
||||
|
||||
" set up g:vimball_mkdir if the mkdir() call isn't defined
|
||||
if !exists("*mkdir")
|
||||
if exists("g:netrw_local_mkdir")
|
||||
let g:vimball_mkdir= g:netrw_local_mkdir
|
||||
elseif executable("mkdir")
|
||||
let g:vimball_mkdir= "mkdir"
|
||||
elseif executable("makedir")
|
||||
let g:vimball_mkdir= "makedir"
|
||||
endif
|
||||
if !exists(g:vimball_mkdir)
|
||||
call vimball#ShowMesg(s:WARNING,"(vimball) g:vimball_mkdir undefined")
|
||||
endif
|
||||
endif
|
||||
|
||||
" set up shell quoting character
|
||||
if exists("g:vimball_shq") && !exists("g:netrw_shq")
|
||||
let g:netrw_shq= g:vimball_shq
|
||||
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
|
||||
|
||||
" set up escape string (used to protect paths)
|
||||
if !exists("g:vimball_path_escape")
|
||||
let g:vimball_path_escape= ' ;#%'
|
||||
endif
|
||||
endif
|
||||
|
||||
" =====================================================================
|
||||
@@ -31,7 +83,12 @@ endif
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" vimball#MkVimball: creates a vimball given a list of paths to files {{{2
|
||||
" Vimball Format:
|
||||
" Input:
|
||||
" line1,line2: a range of lines containing paths to files to be included in the vimball
|
||||
" writelevel : if true, force a write to filename.vba, even if it exists
|
||||
" (usually accomplished with :MkVimball! ...
|
||||
" filename : base name of file to be created (ie. filename.vba)
|
||||
" Output: a filename.vba using vimball format:
|
||||
" path
|
||||
" filesize
|
||||
" [file]
|
||||
@@ -40,7 +97,7 @@ endif
|
||||
" [file]
|
||||
fun! vimball#MkVimball(line1,line2,writelevel,...) range
|
||||
" call Dfunc("MkVimball(line1=".a:line1." line2=".a:line2." writelevel=".a:writelevel." vimballname<".a:1.">) a:0=".a:0)
|
||||
if a:1 =~ '.vim' || a:1 =~ '.txt'
|
||||
if a:1 =~ '\.vim$' || a:1 =~ '\.txt$'
|
||||
let vbname= substitute(a:1,'\.\a\{3}$','.vba','')
|
||||
else
|
||||
let vbname= a:1
|
||||
@@ -61,7 +118,7 @@ fun! vimball#MkVimball(line1,line2,writelevel,...) range
|
||||
endif
|
||||
|
||||
" user option bypass
|
||||
call s:SaveSettings()
|
||||
call vimball#SaveSettings()
|
||||
|
||||
if a:0 >= 2
|
||||
" allow user to specify where to get the files
|
||||
@@ -87,7 +144,7 @@ fun! vimball#MkVimball(line1,line2,writelevel,...) range
|
||||
if !filereadable(svfile)
|
||||
call vimball#ShowMesg(s:ERROR,"unable to read file<".svfile.">")
|
||||
call s:ChgDir(curdir)
|
||||
call s:RestoreSettings()
|
||||
call vimball#RestoreSettings()
|
||||
" call Dret("MkVimball")
|
||||
return
|
||||
endif
|
||||
@@ -113,8 +170,8 @@ fun! vimball#MkVimball(line1,line2,writelevel,...) range
|
||||
|
||||
" write the file from the tab
|
||||
let svfilepath= s:Path(svfile,'')
|
||||
" call Decho("exe $r ".svfilepath)
|
||||
exe "$r ".svfilepath
|
||||
" call Decho("exe $r ".fnameescape(svfilepath))
|
||||
exe "$r ".fnameescape(svfilepath)
|
||||
|
||||
call setline(lastline+1,line("$") - lastline - 1)
|
||||
" call Decho("lastline=".lastline." line$=".line("$"))
|
||||
@@ -127,14 +184,15 @@ fun! vimball#MkVimball(line1,line2,writelevel,...) range
|
||||
" write the vimball
|
||||
exe "tabn ".vbtabnr
|
||||
call s:ChgDir(curdir)
|
||||
setlocal ff=unix
|
||||
if a:writelevel
|
||||
let vbnamepath= s:Path(vbname,'')
|
||||
" call Decho("exe w! ".vbnamepath)
|
||||
exe "w! ".vbnamepath
|
||||
" call Decho("exe w! ".fnameescape(vbnamepath))
|
||||
exe "w! ".fnameescape(vbnamepath)
|
||||
else
|
||||
let vbnamepath= s:Path(vbname,'')
|
||||
" call Decho("exe w ".vbnamepath)
|
||||
exe "w ".vbnamepath
|
||||
" call Decho("exe w ".fnameescape(vbnamepath))
|
||||
exe "w ".fnameescape(vbnamepath)
|
||||
endif
|
||||
" call Decho("Vimball<".vbname."> created")
|
||||
echo "Vimball<".vbname."> created"
|
||||
@@ -145,16 +203,24 @@ fun! vimball#MkVimball(line1,line2,writelevel,...) range
|
||||
exe "tabc ".vbtabnr
|
||||
|
||||
" restore options
|
||||
call s:RestoreSettings()
|
||||
call vimball#RestoreSettings()
|
||||
|
||||
" call Dret("MkVimball")
|
||||
endfun
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" vimball#Vimball: extract and distribute contents from a vimball {{{2
|
||||
" (invoked the the UseVimball command embedded in
|
||||
" vimballs' prologue)
|
||||
fun! vimball#Vimball(really,...)
|
||||
" call Dfunc("vimball#Vimball(really=".a:really.") a:0=".a:0)
|
||||
|
||||
if v:version < 701 || (v:version == 701 && !has("patch299"))
|
||||
echoerr "This version of vimball requires vim 7.1 with patch 299"
|
||||
" call Dret("vimball#Vimball : needs 7.1 with patch 299")
|
||||
return
|
||||
endif
|
||||
|
||||
if getline(1) !~ '^" Vimball Archiver by Charles E. Campbell, Jr., Ph.D.$'
|
||||
echoerr "(Vimball) The current file does not appear to be a Vimball!"
|
||||
" call Dret("vimball#Vimball")
|
||||
@@ -162,8 +228,9 @@ fun! vimball#Vimball(really,...)
|
||||
endif
|
||||
|
||||
" set up standard settings
|
||||
call s:SaveSettings()
|
||||
let curtabnr = tabpagenr()
|
||||
call vimball#SaveSettings()
|
||||
let curtabnr = tabpagenr()
|
||||
let vimballfile = expand("%:tr")
|
||||
|
||||
" set up vimball tab
|
||||
" call Decho("setting up vimball tab")
|
||||
@@ -186,16 +253,18 @@ fun! vimball#Vimball(really,...)
|
||||
" call Decho("curdir<".curdir.">")
|
||||
|
||||
call s:ChgDir(home)
|
||||
call vimball#RmVimball()
|
||||
let s:ok_unablefind= 1
|
||||
call vimball#RmVimball(vimballfile)
|
||||
unlet s:ok_unablefind
|
||||
|
||||
let linenr = 4
|
||||
let filecnt = 0
|
||||
|
||||
" give title to listing of (extracted) files from Vimball Archive
|
||||
if a:really
|
||||
echohl Title | echomsg "Vimball Archive" | echohl None
|
||||
else
|
||||
echohl Title | echomsg "Vimball Archive Listing" | echohl None
|
||||
echohl Title | echomsg "Vimball Archive" | echohl None
|
||||
else
|
||||
echohl Title | echomsg "Vimball Archive Listing" | echohl None
|
||||
echohl Statement | echomsg "files would be placed under: ".home | echohl None
|
||||
endif
|
||||
|
||||
@@ -206,7 +275,7 @@ fun! vimball#Vimball(really,...)
|
||||
while 1 < linenr && linenr < line("$")
|
||||
let fname = substitute(getline(linenr),'\t\[\[\[1$','','')
|
||||
let fname = substitute(fname,'\\','/','g')
|
||||
let fsize = getline(linenr+1)
|
||||
let fsize = getline(linenr+1)+0
|
||||
let filecnt = filecnt + 1
|
||||
" call Decho("fname<".fname."> fsize=".fsize." filecnt=".filecnt)
|
||||
|
||||
@@ -219,10 +288,10 @@ fun! vimball#Vimball(really,...)
|
||||
" call Decho("using L#".(linenr+1).": fsize=".fsize)
|
||||
|
||||
" Allow AsNeeded/ directory to take place of plugin/ directory
|
||||
" when AsNeeded/filename is filereadable
|
||||
" when AsNeeded/filename is filereadable or was present in VimballRecord
|
||||
if fname =~ '\<plugin/'
|
||||
let anfname= substitute(fname,'\<plugin/','AsNeeded/','')
|
||||
if filereadable(anfname)
|
||||
if filereadable(anfname) || (exists("s:VBRstring") && s:VBRstring =~ anfname)
|
||||
" call Decho("using anfname<".anfname."> instead of <".fname.">")
|
||||
let fname= anfname
|
||||
endif
|
||||
@@ -240,7 +309,11 @@ fun! vimball#Vimball(really,...)
|
||||
" call Decho("dirname<".dirname.">")
|
||||
if !isdirectory(dirname)
|
||||
" call Decho("making <".dirname.">")
|
||||
call mkdir(dirname)
|
||||
if exists("g:vimball_mkdir")
|
||||
call system(g:vimball_mkdir." ".s:Escape(dirname))
|
||||
else
|
||||
call mkdir(dirname)
|
||||
endif
|
||||
call s:RecordInVar(home,"rmdir('".dirname."')")
|
||||
endif
|
||||
endwhile
|
||||
@@ -257,6 +330,7 @@ fun! vimball#Vimball(really,...)
|
||||
" copy "a" buffer into tab
|
||||
" call Decho('copy "a buffer into tab#'.vbtabnr)
|
||||
exe "tabn ".vbtabnr
|
||||
setlocal ma
|
||||
silent! %d
|
||||
silent put a
|
||||
1
|
||||
@@ -265,10 +339,10 @@ fun! vimball#Vimball(really,...)
|
||||
" write tab to file
|
||||
if a:really
|
||||
let fnamepath= s:Path(home."/".fname,'')
|
||||
" call Decho("exe w! ".fnamepath)
|
||||
exe "silent w! ".fnamepath
|
||||
" call Decho("exe w! ".fnameescape(fnamepath))
|
||||
exe "silent w! ".fnameescape(fnamepath)
|
||||
echo "wrote ".fnamepath
|
||||
call s:RecordInVar(home,"call delete('".fnamepath."')")
|
||||
call s:RecordInVar(home,"call delete('".fnameescape(fnamepath)."')")
|
||||
endif
|
||||
|
||||
" return to tab with vimball
|
||||
@@ -277,21 +351,20 @@ fun! vimball#Vimball(really,...)
|
||||
|
||||
" set up help if its a doc/*.txt file
|
||||
" call Decho("didhelp<".didhelp."> fname<".fname.">")
|
||||
if a:really && didhelp == "" && fname =~ 'doc/[^/]\+\.txt$'
|
||||
let didhelp= substitute(fname,'^\(.*\<doc\)[/\\][^.]*\.txt$','\1','')
|
||||
if a:really && didhelp == "" && fname =~ 'doc/[^/]\+\.\(txt\|..x\)$'
|
||||
let didhelp= substitute(fname,'^\(.*\<doc\)[/\\][^.]*\.\(txt\|..x\)$','\1','')
|
||||
" call Decho("didhelp<".didhelp.">")
|
||||
endif
|
||||
|
||||
" update for next file
|
||||
" let oldlinenr = linenr " Decho
|
||||
let linenr = linenr + fsize
|
||||
" call Decho("update linenr= [linenr=".oldlinenr."] + [fsize=".fsize."] = ".linenr)
|
||||
" call Decho("update linenr= [linenr=".linenr."] + [fsize=".fsize."] = ".(linenr+fsize))
|
||||
let linenr= linenr + fsize
|
||||
endwhile
|
||||
|
||||
" set up help
|
||||
" call Decho("about to set up help: didhelp<".didhelp.">")
|
||||
if didhelp != ""
|
||||
let htpath= escape(substitute(s:Path(home."/".didhelp,'"'),'"','','g'),' ')
|
||||
let htpath= s:Path(home."/".didhelp,"")
|
||||
" call Decho("exe helptags ".htpath)
|
||||
exe "helptags ".htpath
|
||||
echo "did helptags"
|
||||
@@ -311,7 +384,7 @@ fun! vimball#Vimball(really,...)
|
||||
setlocal nomod bh=wipe
|
||||
exe "tabn ".curtabnr
|
||||
exe "tabc ".vbtabnr
|
||||
call s:RestoreSettings()
|
||||
call vimball#RestoreSettings()
|
||||
call s:ChgDir(curdir)
|
||||
|
||||
" call Dret("vimball#Vimball")
|
||||
@@ -329,12 +402,10 @@ fun! vimball#RmVimball(...)
|
||||
" call Dret("vimball#RmVimball : (g:vimball_norecord)")
|
||||
return
|
||||
endif
|
||||
let eikeep= &ei
|
||||
set ei=all
|
||||
" call Decho("turned off all events")
|
||||
|
||||
if a:0 == 0
|
||||
let curfile= '^'.expand("%:tr")
|
||||
let curfile= expand("%:tr")
|
||||
" call Decho("case a:0=0: curfile<".curfile."> (used expand(%:tr))")
|
||||
else
|
||||
if a:1 =~ '[\/]'
|
||||
call vimball#ShowMesg(s:USAGE,"RmVimball vimballname [path]")
|
||||
@@ -342,11 +413,10 @@ fun! vimball#RmVimball(...)
|
||||
return
|
||||
endif
|
||||
let curfile= a:1
|
||||
" call Decho("case a:0=".a:0.": curfile<".curfile.">")
|
||||
endif
|
||||
if curfile !~ '.vba$'
|
||||
let curfile= curfile.".vba: "
|
||||
else
|
||||
let curfile= curfile.": "
|
||||
if curfile =~ '\.vba$'
|
||||
let curfile= substitute(curfile,'\.vba','','')
|
||||
endif
|
||||
if a:0 >= 2
|
||||
let home= expand(a:2)
|
||||
@@ -365,13 +435,34 @@ fun! vimball#RmVimball(...)
|
||||
keepalt keepjumps 1split
|
||||
silent! keepalt keepjumps e .VimballRecord
|
||||
let keepsrch= @/
|
||||
if search(curfile,'cw')
|
||||
let exestring= substitute(getline("."),curfile,'','')
|
||||
" call Decho("search for ^".curfile.".vba:")
|
||||
" call Decho("search for ^".curfile."[-0-9.]*.vba:")
|
||||
if search('^'.curfile.": ".'cw')
|
||||
let foundit= 1
|
||||
elseif search('^'.curfile.".vba: ",'cw')
|
||||
let foundit= 1
|
||||
elseif search('^'.curfile.'[-0-9.]*.vba: ','cw')
|
||||
let foundit= 1
|
||||
else
|
||||
let foundit = 0
|
||||
endif
|
||||
if foundit
|
||||
let exestring = substitute(getline("."),'^'.curfile.'\S\{-}\.vba: ','','')
|
||||
let s:VBRstring= substitute(exestring,'call delete(','','g')
|
||||
let s:VBRstring= substitute(s:VBRstring,"[')]",'','g')
|
||||
" call Decho("exe ".exestring)
|
||||
silent! keepalt keepjumps exe exestring
|
||||
silent! keepalt keepjumps d
|
||||
let exestring= strlen(substitute(exestring,'call delete(.\{-})|\=',"D","g"))
|
||||
" call Decho("exestring<".exestring.">")
|
||||
echomsg "removed ".exestring." files"
|
||||
else
|
||||
" call Decho("unable to find <".curfile."> in .VimballRecord")
|
||||
let s:VBRstring= ''
|
||||
let curfile = substitute(curfile,'\.vba','','')
|
||||
" call Decho("unable to find <".curfile."> in .VimballRecord")
|
||||
if !exists("s:ok_unablefind")
|
||||
call vimball#ShowMesg(s:WARNING,"(RmVimball) unable to find <".curfile."> in .VimballRecord")
|
||||
endif
|
||||
endif
|
||||
silent! keepalt keepjumps g/^\s*$/d
|
||||
silent! keepalt keepjumps wq!
|
||||
@@ -379,10 +470,6 @@ fun! vimball#RmVimball(...)
|
||||
endif
|
||||
call s:ChgDir(curdir)
|
||||
|
||||
" restoring events
|
||||
" call Decho("restoring events")
|
||||
let &ei= eikeep
|
||||
|
||||
" call Dret("vimball#RmVimball")
|
||||
endfun
|
||||
|
||||
@@ -393,21 +480,56 @@ fun! vimball#Decompress(fname)
|
||||
|
||||
" decompression:
|
||||
if expand("%") =~ '.*\.gz' && executable("gunzip")
|
||||
exe "!gunzip ".a:fname
|
||||
" handle *.gz with gunzip
|
||||
silent exe "!gunzip ".s:Escape(a:fname)
|
||||
if v:shell_error != 0
|
||||
call vimball#ShowMesg(s:WARNING,"(vimball#Decompress) gunzip may have failed with <".a:fname.">")
|
||||
endif
|
||||
let fname= substitute(a:fname,'\.gz$','','')
|
||||
exe "e ".escape(fname,' \')
|
||||
call vimball#ShowMesg(s:USAGE,"Source this file to extract it! (:so %)")
|
||||
|
||||
elseif expand("%") =~ '.*\.gz' && executable("gzip")
|
||||
" handle *.gz with gzip -d
|
||||
silent exe "!gzip -d ".s:Escape(a:fname)
|
||||
if v:shell_error != 0
|
||||
call vimball#ShowMesg(s:WARNING,'(vimball#Decompress) "gzip -d" may have failed with <'.a:fname.">")
|
||||
endif
|
||||
let fname= substitute(a:fname,'\.gz$','','')
|
||||
exe "e ".escape(fname,' \')
|
||||
call vimball#ShowMesg(s:USAGE,"Source this file to extract it! (:so %)")
|
||||
|
||||
elseif expand("%") =~ '.*\.bz2' && executable("bunzip2")
|
||||
exe "!bunzip2 ".a:fname
|
||||
" handle *.bz2 with bunzip2
|
||||
silent exe "!bunzip2 ".s:Escape(a:fname)
|
||||
if v:shell_error != 0
|
||||
call vimball#ShowMesg(s:WARNING,"(vimball#Decompress) bunzip2 may have failed with <".a:fname.">")
|
||||
endif
|
||||
let fname= substitute(a:fname,'\.bz2$','','')
|
||||
exe "e ".escape(fname,' \')
|
||||
call vimball#ShowMesg(s:USAGE,"Source this file to extract it! (:so %)")
|
||||
|
||||
elseif expand("%") =~ '.*\.bz2' && executable("bzip2")
|
||||
" handle *.bz2 with bzip2 -d
|
||||
silent exe "!bzip2 -d ".s:Escape(a:fname)
|
||||
if v:shell_error != 0
|
||||
call vimball#ShowMesg(s:WARNING,'(vimball#Decompress) "bzip2 -d" may have failed with <'.a:fname.">")
|
||||
endif
|
||||
let fname= substitute(a:fname,'\.bz2$','','')
|
||||
exe "e ".escape(fname,' \')
|
||||
call vimball#ShowMesg(s:USAGE,"Source this file to extract it! (:so %)")
|
||||
|
||||
elseif expand("%") =~ '.*\.zip' && executable("unzip")
|
||||
exe "!unzip ".a:fname
|
||||
" handle *.zip with unzip
|
||||
silent exe "!unzip ".s:Escape(a:fname)
|
||||
if v:shell_error != 0
|
||||
call vimball#ShowMesg(s:WARNING,"(vimball#Decompress) unzip may have failed with <".a:fname.">")
|
||||
endif
|
||||
let fname= substitute(a:fname,'\.zip$','','')
|
||||
exe "e ".escape(fname,' \')
|
||||
call vimball#ShowMesg(s:USAGE,"Source this file to extract it! (:so %)")
|
||||
endif
|
||||
|
||||
set noma bt=nofile fmr=[[[,]]] fdm=marker
|
||||
|
||||
" call Dret("Decompress")
|
||||
@@ -443,34 +565,35 @@ fun! vimball#ShowMesg(level,msg)
|
||||
|
||||
" call Dret("vimball#ShowMesg")
|
||||
endfun
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
let &cpo= s:keepcpo
|
||||
unlet s:keepcpo
|
||||
" =====================================================================
|
||||
" s:ChgDir: change directory (in spite of Windoze) {{{2
|
||||
fun! s:ChgDir(newdir)
|
||||
" call Dfunc("ChgDir(newdir<".a:newdir.">)")
|
||||
if (has("win32") || has("win95") || has("win64") || has("win16"))
|
||||
exe 'silent cd '.escape(substitute(a:newdir,'/','\\','g'),' ')
|
||||
exe 'silent cd '.fnameescape(substitute(a:newdir,'/','\\','g'))
|
||||
else
|
||||
exe 'silent cd '.escape(a:newdir,' ')
|
||||
exe 'silent cd '.fnameescape(a:newdir)
|
||||
endif
|
||||
" call Dret("ChgDir")
|
||||
" call Dret("ChgDir : curdir<".getcwd().">")
|
||||
endfun
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" s:Path: prepend and append quotes, do escaping, as necessary {{{2
|
||||
" s:Path: prepend and append quotes and do escaping {{{2
|
||||
fun! s:Path(cmd,quote)
|
||||
" call Dfunc("Path(cmd<".a:cmd."> quote<".a:quote.">)")
|
||||
" call Dfunc("Path(cmd<".a:cmd."> quote<".a:quote.">) vimball_path_escape<".g:vimball_path_escape.">")
|
||||
if (has("win32") || has("win95") || has("win64") || has("win16"))
|
||||
let cmdpath= a:quote.substitute(a:cmd,'/','\\','g').a:quote
|
||||
" let cmdpath= a:quote.substitute(a:cmd,'/','\\','g').a:quote
|
||||
let cmdpath= a:quote.substitute(a:cmd,'\\','/','g').a:quote
|
||||
" call Decho("cmdpath<".cmdpath."> (win32 mod)")
|
||||
else
|
||||
let cmdpath= a:quote.a:cmd.a:quote
|
||||
" call Decho("cmdpath<".cmdpath."> (not-win32 mod)")
|
||||
endif
|
||||
if a:quote == ""
|
||||
if a:quote == "" && g:vimball_path_escape !~ ' '
|
||||
let cmdpath= escape(cmdpath,' ')
|
||||
" call Decho("cmdpath<".cmdpath."> (empty quote case)")
|
||||
endif
|
||||
let cmdpath= escape(cmdpath,g:vimball_path_escape)
|
||||
" call Dret("Path <".cmdpath.">")
|
||||
return cmdpath
|
||||
endfun
|
||||
@@ -485,23 +608,20 @@ fun! s:RecordInVar(home,cmd)
|
||||
" else
|
||||
" let s:recorddir= s:recorddir."|".substitute(a:cmd,'^rmdir',"call s:Rmdir",'')
|
||||
" endif
|
||||
" call Decho("recorddir=".s:recorddir)
|
||||
elseif !exists("s:recordfile")
|
||||
let s:recordfile= a:cmd
|
||||
" call Decho("recordfile=".s:recordfile)
|
||||
else
|
||||
let s:recordfile= s:recordfile."|".a:cmd
|
||||
" call Decho("recordfile=".s:recordfile)
|
||||
endif
|
||||
" call Dret("RecordInVar")
|
||||
" call Dret("RecordInVar : s:recordfile<".(exists("s:recordfile")? s:recordfile : "")."> s:recorddir<".(exists("s:recorddir")? s:recorddir : "").">")
|
||||
endfun
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" s:RecordInFile: {{{2
|
||||
fun! s:RecordInFile(home)
|
||||
" call Dfunc("RecordInFile()")
|
||||
" call Dfunc("s:RecordInFile()")
|
||||
if exists("g:vimball_norecord")
|
||||
" call Dret("RecordInFile : (g:vimball_norecord)")
|
||||
" call Dret("s:RecordInFile : g:vimball_norecord")
|
||||
return
|
||||
endif
|
||||
|
||||
@@ -509,8 +629,12 @@ fun! s:RecordInFile(home)
|
||||
let curdir= getcwd()
|
||||
call s:ChgDir(a:home)
|
||||
keepalt keepjumps 1split
|
||||
|
||||
let cmd= expand("%:tr").": "
|
||||
" call Decho("cmd<".cmd.">")
|
||||
|
||||
silent! keepalt keepjumps e .VimballRecord
|
||||
setlocal ma
|
||||
$
|
||||
if exists("s:recordfile") && exists("s:recorddir")
|
||||
let cmd= cmd.s:recordfile."|".s:recorddir
|
||||
@@ -519,34 +643,32 @@ fun! s:RecordInFile(home)
|
||||
elseif exists("s:recordfile")
|
||||
let cmd= cmd.s:recordfile
|
||||
else
|
||||
" call Dret("RecordInFile")
|
||||
" call Dret("s:RecordInFile : neither recordfile nor recorddir exist")
|
||||
return
|
||||
endif
|
||||
" call Decho("cmd<".cmd.">")
|
||||
|
||||
" put command into buffer, write .VimballRecord `file
|
||||
keepalt keepjumps put=cmd
|
||||
silent! keepalt keepjumps g/^\s*$/d
|
||||
silent! keepalt keepjumps wq!
|
||||
call s:ChgDir(curdir)
|
||||
if exists("s:recorddir") |unlet s:recorddir |endif
|
||||
if exists("s:recordfile")|unlet s:recordfile|endif
|
||||
|
||||
if exists("s:recorddir")
|
||||
" call Decho("unlet s:recorddir<".s:recorddir.">")
|
||||
unlet s:recorddir
|
||||
endif
|
||||
if exists("s:recordfile")
|
||||
" call Decho("unlet s:recordfile<".s:recordfile.">")
|
||||
unlet s:recordfile
|
||||
endif
|
||||
else
|
||||
" call Decho("s:record[file|dir] doesn't exist")
|
||||
endif
|
||||
|
||||
" call Dret("RecordInFile")
|
||||
" call Dret("s:RecordInFile")
|
||||
endfun
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" s:Rmdir: {{{2
|
||||
"fun! s:Rmdir(dirname)
|
||||
"" call Dfunc("s:Rmdir(dirname<".a:dirname.">)")
|
||||
" if (has("win32") || has("win95") || has("win64") || has("win16")) && &shell !~? 'sh$'
|
||||
" call system("del ".a:dirname)
|
||||
" else
|
||||
" call system("rmdir ".a:dirname)
|
||||
" endif
|
||||
"" call Dret("s:Rmdir")
|
||||
"endfun
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" s:VimballHome: determine/get home directory path (usually from rtp) {{{2
|
||||
fun! s:VimballHome()
|
||||
@@ -557,6 +679,11 @@ fun! s:VimballHome()
|
||||
" go to vim plugin home
|
||||
for home in split(&rtp,',') + ['']
|
||||
if isdirectory(home) && filewritable(home) | break | endif
|
||||
let basehome= substitute(home,'[/\\]\.vim$','','')
|
||||
if isdirectory(basehome) && filewritable(basehome)
|
||||
let home= basehome."/.vim"
|
||||
break
|
||||
endif
|
||||
endfor
|
||||
if home == ""
|
||||
" just pick the first directory
|
||||
@@ -566,13 +693,25 @@ fun! s:VimballHome()
|
||||
let home= substitute(home,'/','\\','g')
|
||||
endif
|
||||
endif
|
||||
" insure that the home directory exists
|
||||
" call Decho("picked home<".home.">")
|
||||
if !isdirectory(home)
|
||||
if exists("g:vimball_mkdir")
|
||||
" call Decho("home<".home."> isn't a directory -- making it now with g:vimball_mkdir<".g:vimball_mkdir.">")
|
||||
" call Decho("system(".g:vimball_mkdir." ".s:Escape(home).")")
|
||||
call system(g:vimball_mkdir." ".s:Escape(home))
|
||||
else
|
||||
" call Decho("home<".home."> isn't a directory -- making it now with mkdir()")
|
||||
call mkdir(home)
|
||||
endif
|
||||
endif
|
||||
" call Dret("VimballHome <".home.">")
|
||||
return home
|
||||
endfun
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" s:SaveSettings: {{{2
|
||||
fun! s:SaveSettings()
|
||||
" vimball#SaveSettings: {{{2
|
||||
fun! vimball#SaveSettings()
|
||||
" call Dfunc("SaveSettings()")
|
||||
let s:makeep = getpos("'a")
|
||||
let s:regakeep= @a
|
||||
@@ -587,17 +726,20 @@ fun! s:SaveSettings()
|
||||
let s:pmkeep = &pm
|
||||
let s:repkeep = &report
|
||||
let s:vekeep = &ve
|
||||
let s:ffkeep = &ff
|
||||
if exists("&acd")
|
||||
set ei=all ve=all noacd nofen noic report=999 nohid bt= ma lz pm=
|
||||
setlocal ei=all ve=all noacd nofen noic report=999 nohid bt= ma lz pm= ff=unix
|
||||
else
|
||||
set ei=all ve=all nofen noic report=999 nohid bt= ma lz pm=
|
||||
setlocal ei=all ve=all nofen noic report=999 nohid bt= ma lz pm= ff=unix
|
||||
endif
|
||||
" vimballs should be in unix format
|
||||
setlocal ff=unix
|
||||
" call Dret("SaveSettings")
|
||||
endfun
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" s:RestoreSettings: {{{2
|
||||
fun! s:RestoreSettings()
|
||||
" vimball#RestoreSettings: {{{2
|
||||
fun! vimball#RestoreSettings()
|
||||
" call Dfunc("RestoreSettings()")
|
||||
let @a = s:regakeep
|
||||
if exists("&acd")
|
||||
@@ -611,20 +753,34 @@ fun! s:RestoreSettings()
|
||||
let &report = s:repkeep
|
||||
let &ve = s:vekeep
|
||||
let &ei = s:eikeep
|
||||
let &ff = s:ffkeep
|
||||
if s:makeep[0] != 0
|
||||
" restore mark a
|
||||
" call Decho("restore mark-a: makeep=".string(makeep))
|
||||
call setpos("'a",s:makeep)
|
||||
endif
|
||||
if exists("&acd")
|
||||
unlet s:regakeep s:acdkeep s:eikeep s:fenkeep s:hidkeep s:ickeep s:repkeep s:vekeep s:makeep s:lzkeep s:pmkeep
|
||||
else
|
||||
unlet s:regakeep s:eikeep s:fenkeep s:hidkeep s:ickeep s:repkeep s:vekeep s:makeep s:lzkeep s:pmkeep
|
||||
unlet s:acdkeep
|
||||
endif
|
||||
set bt=nofile noma
|
||||
unlet s:regakeep s:eikeep s:fenkeep s:hidkeep s:ickeep s:repkeep s:vekeep s:makeep s:lzkeep s:pmkeep s:ffkeep
|
||||
" call Dret("RestoreSettings")
|
||||
endfun
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" s:Escape: {{{2
|
||||
fun s:Escape(name)
|
||||
" shellescape() was added by patch 7.0.111
|
||||
if exists("*shellescape")
|
||||
return shellescape(a:name)
|
||||
endif
|
||||
return g:netrw_shq . a:name . g:netrw_shq
|
||||
endfun
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" Restore:
|
||||
let &cpo= s:keepcpo
|
||||
unlet s:keepcpo
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" Modelines: {{{1
|
||||
" vim: fdm=marker
|
||||
|
||||
@@ -381,4 +381,3 @@ let g:xmldata_html32 = {
|
||||
\ 'param': ['/>', ''],
|
||||
\ }
|
||||
\ }
|
||||
" vim:ft=vim:ff=unix
|
||||
|
||||
@@ -466,4 +466,3 @@ let g:xmldata_html401t = {
|
||||
\ 'param': ['/>', ''],
|
||||
\ }
|
||||
\ }
|
||||
" vim:ft=vim:ff=unix
|
||||
|
||||
@@ -408,4 +408,3 @@ let g:xmldata_html401s = {
|
||||
\ 'param': ['/>', ''],
|
||||
\ }
|
||||
\ }
|
||||
" vim:ft=vim:ff=unix
|
||||
|
||||
@@ -458,4 +458,3 @@ let g:xmldata_html401t = {
|
||||
\ 'param': ['/>', ''],
|
||||
\ }
|
||||
\ }
|
||||
" vim:ft=vim:ff=unix
|
||||
|
||||
@@ -466,4 +466,3 @@ let g:xmldata_html40t = {
|
||||
\ 'param': ['/>', ''],
|
||||
\ }
|
||||
\ }
|
||||
" vim:ft=vim:ff=unix
|
||||
|
||||
@@ -408,4 +408,3 @@ let g:xmldata_html40s = {
|
||||
\ 'param': ['/>', ''],
|
||||
\ }
|
||||
\ }
|
||||
" vim:ft=vim:ff=unix
|
||||
|
||||
@@ -458,4 +458,3 @@ let g:xmldata_html40t = {
|
||||
\ 'param': ['/>', ''],
|
||||
\ }
|
||||
\ }
|
||||
" vim:ft=vim:ff=unix
|
||||
|
||||
@@ -467,4 +467,3 @@ let g:xmldata_xhtml10f = {
|
||||
\ 'param': ['/>', ''],
|
||||
\ }
|
||||
\ }
|
||||
" vim:ft=vim:ff=unix
|
||||
|
||||
@@ -408,4 +408,3 @@ let g:xmldata_xhtml10s = {
|
||||
\ 'param': ['/>', ''],
|
||||
\ }
|
||||
\ }
|
||||
" vim:ft=vim:ff=unix
|
||||
|
||||
@@ -458,4 +458,3 @@ let g:xmldata_xhtml10t = {
|
||||
\ 'param': ['/>', ''],
|
||||
\ }
|
||||
\ }
|
||||
" vim:ft=vim:ff=unix
|
||||
|
||||
@@ -432,4 +432,3 @@ let g:xmldata_xhtml11 = {
|
||||
\ 'param': ['/>', ''],
|
||||
\ }
|
||||
\ }
|
||||
" vim:ft=vim:ff=unix
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
" zip.vim: Handles browsing zipfiles
|
||||
" AUTOLOAD PORTION
|
||||
" Date: May 08, 2007
|
||||
" Version: 14
|
||||
" Date: Jun 12, 2008
|
||||
" Version: 18
|
||||
" Maintainer: Charles E Campbell, Jr <NdrOchip@ScampbellPfamily.AbizM-NOSPAM>
|
||||
" License: Vim License (see vim's :help license)
|
||||
" Copyright: Copyright (C) 2005 Charles E. Campbell, Jr. {{{1
|
||||
" Copyright: Copyright (C) 2005-2008 Charles E. Campbell, Jr. {{{1
|
||||
" Permission is hereby granted to use and distribute this code,
|
||||
" with or without modifications, provided that this copyright
|
||||
" notice is copied with it. Like anything else that's free,
|
||||
" zipPlugin.vim is provided *as is* and comes with no warranty
|
||||
" of any kind, either expressed or implied. By using this
|
||||
" plugin, you agree that in no event will the copyright
|
||||
" zip.vim and zipPlugin.vim are provided *as is* and comes with
|
||||
" no warranty of any kind, either expressed or implied. By using
|
||||
" this plugin, you agree that in no event will the copyright
|
||||
" holder be liable for any damages resulting from the use
|
||||
" of this software.
|
||||
|
||||
@@ -22,7 +22,7 @@ if &cp || exists("g:loaded_zip") || v:version < 700
|
||||
finish
|
||||
endif
|
||||
|
||||
let g:loaded_zip = "v14"
|
||||
let g:loaded_zip = "v18"
|
||||
let s:zipfile_escape = ' ?&;\'
|
||||
let s:ERROR = 2
|
||||
let s:WARNING = 1
|
||||
@@ -31,7 +31,9 @@ let s:NOTE = 0
|
||||
" ---------------------------------------------------------------------
|
||||
" Global Values: {{{1
|
||||
if !exists("g:zip_shq")
|
||||
if has("unix")
|
||||
if &shq != ""
|
||||
let g:zip_shq= &shq
|
||||
elseif has("unix")
|
||||
let g:zip_shq= "'"
|
||||
else
|
||||
let g:zip_shq= '"'
|
||||
@@ -160,7 +162,9 @@ fun! s:ZipBrowseSelect()
|
||||
" call Decho("curfile<".curfile.">")
|
||||
|
||||
new
|
||||
wincmd _
|
||||
if !exists("g:zip_nomax") || g:zip_nomax == 0
|
||||
wincmd _
|
||||
endif
|
||||
let s:zipfile_{winnr()}= curfile
|
||||
" call Decho("exe e zipfile:".escape(zipfile,s:zipfile_escape).'::'.escape(fname,s:zipfile_escape))
|
||||
exe "e zipfile:".escape(zipfile,s:zipfile_escape).'::'.escape(fname,s:zipfile_escape)
|
||||
@@ -319,8 +323,13 @@ 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
|
||||
if has("*shellescape")
|
||||
let qnameq= shellescape(a:fname)
|
||||
else
|
||||
let qnameq= g:zip_shq.escape(a:fname,g:zip_shq).g:zip_shq
|
||||
endif
|
||||
" call Dret("QuoteFileDir <".qnameq.">")
|
||||
return qnameq
|
||||
endfun
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
|
||||
@@ -50,6 +50,9 @@ If you think you have a color scheme that is good enough to be used by others,
|
||||
please check the following items:
|
||||
|
||||
- Does it work in a color terminal as well as in the GUI?
|
||||
- Is "g:colors_name" set to a meaningful value? In case of doubt you can do
|
||||
it this way:
|
||||
let g:colors_name = expand('<sfile>:t:r')
|
||||
- Is 'background' either used or appropriately set to "light" or "dark"?
|
||||
- Try setting 'hlsearch' and searching for a pattern, is the match easy to
|
||||
spot?
|
||||
|
||||
@@ -9,6 +9,7 @@ if version > 580
|
||||
syntax reset
|
||||
endif
|
||||
endif
|
||||
let colors_name = "slate"
|
||||
:hi Normal guifg=White guibg=grey15
|
||||
:hi Cursor guibg=khaki guifg=slategrey
|
||||
:hi VertSplit guibg=#c2bfa5 guifg=grey40 gui=none cterm=reverse
|
||||
|
||||
@@ -38,4 +38,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:
|
||||
|
||||
@@ -11,7 +11,7 @@ let current_compiler = "gcc"
|
||||
let s:cpo_save = &cpo
|
||||
set cpo-=C
|
||||
|
||||
setlocal errorformat=
|
||||
CompilerSet errorformat=
|
||||
\%*[^\"]\"%f\"%*\\D%l:\ %m,
|
||||
\\"%f\"%*\\D%l:\ %m,
|
||||
\%-G%f:%l:\ %trror:\ (Each\ undeclared\ identifier\ is\ reported\ only\ once,
|
||||
@@ -25,7 +25,7 @@ setlocal errorformat=
|
||||
\%DMaking\ %*\\a\ in\ %f
|
||||
|
||||
if exists('g:compiler_gcc_ignore_unmatched_lines')
|
||||
let &errorformat .= ',%-G%.%#'
|
||||
CompilerSet errorformat+=%-G%.%#
|
||||
endif
|
||||
|
||||
let &cpo = s:cpo_save
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" Vim Compiler File
|
||||
" Compiler: Perl syntax checks (perl -Wc)
|
||||
" Maintainer: Christian J. Robinson <infynity@onewest.net>
|
||||
" Last Change: 2004 Mar 27
|
||||
" Last Change: 2006 Aug 13
|
||||
|
||||
if exists("current_compiler")
|
||||
finish
|
||||
@@ -15,12 +15,20 @@ endif
|
||||
let s:savecpo = &cpo
|
||||
set cpo&vim
|
||||
|
||||
if getline(1) =~# '-[^ ]*T'
|
||||
CompilerSet makeprg=perl\ -WTc\ %
|
||||
if exists('g:perl_compiler_force_warnings') && g:perl_compiler_force_warnings == 0
|
||||
let s:warnopt = 'w'
|
||||
else
|
||||
CompilerSet makeprg=perl\ -Wc\ %
|
||||
let s:warnopt = 'W'
|
||||
endif
|
||||
|
||||
if getline(1) =~# '-[^ ]*T'
|
||||
let s:taintopt = 'T'
|
||||
else
|
||||
let s:taintopt = ''
|
||||
endif
|
||||
|
||||
exe 'CompilerSet makeprg=perl\ -' . s:warnopt . s:taintopt . 'c\ %'
|
||||
|
||||
CompilerSet errorformat=
|
||||
\%-G%.%#had\ compilation\ errors.,
|
||||
\%-G%.%#syntax\ OK,
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -32,4 +32,4 @@ CompilerSet errorformat=\%W\ %\\+%\\d%\\+)\ Failure:,
|
||||
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:
|
||||
|
||||
@@ -14,13 +14,12 @@ VIMEXE = vim
|
||||
include ../../src/auto/config.mk
|
||||
|
||||
DOCS = \
|
||||
ada.txt \
|
||||
arabic.txt \
|
||||
autocmd.txt \
|
||||
change.txt \
|
||||
cmdline.txt \
|
||||
debugger.txt \
|
||||
debug.txt \
|
||||
debugger.txt \
|
||||
develop.txt \
|
||||
diff.txt \
|
||||
digraph.txt \
|
||||
@@ -29,6 +28,8 @@ DOCS = \
|
||||
farsi.txt \
|
||||
filetype.txt \
|
||||
fold.txt \
|
||||
ft_ada.txt \
|
||||
ft_sql.txt \
|
||||
gui.txt \
|
||||
gui_w16.txt \
|
||||
gui_w32.txt \
|
||||
@@ -50,10 +51,10 @@ DOCS = \
|
||||
insert.txt \
|
||||
intro.txt \
|
||||
map.txt \
|
||||
message.txt \
|
||||
motion.txt \
|
||||
mbyte.txt \
|
||||
message.txt \
|
||||
mlang.txt \
|
||||
motion.txt \
|
||||
netbeans.txt \
|
||||
options.txt \
|
||||
os_390.txt \
|
||||
@@ -89,10 +90,9 @@ DOCS = \
|
||||
russian.txt \
|
||||
scroll.txt \
|
||||
sign.txt \
|
||||
spell.txt \
|
||||
sponsor.txt \
|
||||
starting.txt \
|
||||
spell.txt \
|
||||
sql.txt \
|
||||
syntax.txt \
|
||||
tabpage.txt \
|
||||
tagsrch.txt \
|
||||
@@ -145,7 +145,6 @@ DOCS = \
|
||||
workshop.txt
|
||||
|
||||
HTMLS = \
|
||||
ada.html \
|
||||
arabic.html \
|
||||
autocmd.html \
|
||||
change.html \
|
||||
@@ -160,6 +159,8 @@ HTMLS = \
|
||||
farsi.html \
|
||||
filetype.html \
|
||||
fold.html \
|
||||
ft_ada.html \
|
||||
ft_sql.html \
|
||||
gui.html \
|
||||
gui_w16.html \
|
||||
gui_w32.html \
|
||||
@@ -177,14 +178,13 @@ HTMLS = \
|
||||
if_tcl.html \
|
||||
indent.html \
|
||||
index.html \
|
||||
vimindex.html \
|
||||
insert.html \
|
||||
intro.html \
|
||||
map.html \
|
||||
message.html \
|
||||
motion.html \
|
||||
mbyte.html \
|
||||
message.html \
|
||||
mlang.html \
|
||||
motion.html \
|
||||
netbeans.html \
|
||||
options.html \
|
||||
os_390.html \
|
||||
@@ -220,10 +220,9 @@ HTMLS = \
|
||||
russian.html \
|
||||
scroll.html \
|
||||
sign.html \
|
||||
spell.html \
|
||||
sponsor.html \
|
||||
starting.html \
|
||||
spell.html \
|
||||
sql.html \
|
||||
syntax.html \
|
||||
tabpage.html \
|
||||
tags.html \
|
||||
@@ -272,6 +271,7 @@ HTMLS = \
|
||||
version6.html \
|
||||
version7.html \
|
||||
vi_diff.html \
|
||||
vimindex.html \
|
||||
visual.html \
|
||||
windows.html \
|
||||
workshop.html
|
||||
@@ -291,7 +291,7 @@ CONVERTED = \
|
||||
evim-ru.UTF-8.1 \
|
||||
vimdiff-ru.UTF-8.1 \
|
||||
vimtutor-ru.UTF-8.1 \
|
||||
xxd-ru.UTF-8.1 \
|
||||
xxd-ru.UTF-8.1
|
||||
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .c .o .txt .html
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*arabic.txt* For Vim version 7.1. Last change: 2005 Mar 29
|
||||
*arabic.txt* For Vim version 7.2a. Last change: 2005 Mar 29
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Nadim Shaikli
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*autocmd.txt* For Vim version 7.1. Last change: 2007 Mar 27
|
||||
*autocmd.txt* For Vim version 7.2a. Last change: 2008 Jun 24
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -104,7 +104,7 @@ local to the script and use mappings local to the script. When the event is
|
||||
triggered and the command executed, it will run in the context of the script
|
||||
it was defined in. This matters if |<SID>| is used in a command.
|
||||
|
||||
When executing the commands, the messages from one command overwrites a
|
||||
When executing the commands, the message from one command overwrites a
|
||||
previous message. This is different from when executing the commands
|
||||
manually. Mostly the screen will not scroll up, thus there is no hit-enter
|
||||
prompt. When one command outputs two messages this can happen anyway.
|
||||
@@ -334,7 +334,7 @@ BufDelete Before deleting a buffer from the buffer list.
|
||||
list is renamed.
|
||||
NOTE: When this autocommand is executed, the
|
||||
current buffer "%" may be different from the
|
||||
buffer being deleted "<afile>".
|
||||
buffer being deleted "<afile>" and "<abuf>".
|
||||
*BufEnter*
|
||||
BufEnter After entering a buffer. Useful for setting
|
||||
options for a file type. Also executed when
|
||||
@@ -400,10 +400,15 @@ BufUnload Before unloading a buffer. This is when the
|
||||
*BufWinEnter*
|
||||
BufWinEnter After a buffer is displayed in a window. This
|
||||
can be when the buffer is loaded (after
|
||||
processing the modelines), when a hidden
|
||||
processing the modelines) or when a hidden
|
||||
buffer is displayed in a window (and is no
|
||||
longer hidden) or a buffer already visible in
|
||||
a window is also displayed in another window.
|
||||
longer hidden).
|
||||
Does not happen for |:split| without
|
||||
arguments, since you keep editing the same
|
||||
buffer, or ":split" with a file that's already
|
||||
open in a window. But it does happen for
|
||||
a ":split" with the name of the current
|
||||
buffer, since it reloads that buffer.
|
||||
*BufWinLeave*
|
||||
BufWinLeave Before a buffer is removed from a window.
|
||||
Not when it's still visible in another window.
|
||||
@@ -677,7 +682,7 @@ QuickFixCmdPre Before a quickfix command is run (|:make|,
|
||||
*QuickFixCmdPost*
|
||||
QuickFixCmdPost Like QuickFixCmdPre, but after a quickfix
|
||||
command is run, before jumping to the first
|
||||
location.
|
||||
location. See |QuickFixCmdPost-example|.
|
||||
*RemoteReply*
|
||||
RemoteReply When a reply from a Vim that functions as
|
||||
server was received |server2client()|. The
|
||||
@@ -848,7 +853,7 @@ This autocommand will for example be executed for "/tmp/doc/xx.txt" and
|
||||
|
||||
|
||||
The file name that the pattern is matched against is after expanding
|
||||
wildcards. Thus is you issue this command: >
|
||||
wildcards. Thus if you issue this command: >
|
||||
:e $ROOTDIR/main.$EXT
|
||||
The argument is first expanded to: >
|
||||
/usr/root/main.py
|
||||
@@ -927,7 +932,7 @@ simply use the special string instead of the pattern. Examples: >
|
||||
" current buffer
|
||||
:au! * <buffer=33> " remove buffer-local autocommands for
|
||||
" buffer #33
|
||||
:dobuf :au! CursorHold <buffer> " remove autocmd for given event for all
|
||||
:bufdo :au! CursorHold <buffer> " remove autocmd for given event for all
|
||||
" buffers
|
||||
:au * <buffer> " list buffer-local autocommands for
|
||||
" current buffer
|
||||
@@ -1031,8 +1036,9 @@ option will not cause any commands to be executed.
|
||||
undefined group name, Vim gives you an error message.
|
||||
|
||||
After applying the autocommands the modelines are
|
||||
processed, so that their overrule the settings from
|
||||
autocommands, like what happens when editing a file.
|
||||
processed, so that their settings overrule the
|
||||
settings from autocommands, like what happens when
|
||||
editing a file.
|
||||
|
||||
*:doautoa* *:doautoall*
|
||||
:doautoa[ll] [group] {event} [fname]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*change.txt* For Vim version 7.1. Last change: 2007 Jan 07
|
||||
*change.txt* For Vim version 7.2a. Last change: 2008 Jun 22
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -229,16 +229,18 @@ key restores the original text (if there was any). (See section "Insert and
|
||||
Replace mode" |mode-ins-repl|).
|
||||
|
||||
*cw* *cW*
|
||||
Special case: "cw" and "cW" work the same as "ce" and "cE" if the cursor is
|
||||
on a non-blank. This is because Vim interprets "cw" as change-word, and a
|
||||
word does not include the following white space. {Vi: "cw" when on a blank
|
||||
followed by other blanks changes only the first blank; this is probably a
|
||||
bug, because "dw" deletes all the blanks; use the 'w' flag in 'cpoptions' to
|
||||
make it work like Vi anyway}
|
||||
Special case: When the cursor is in a word, "cw" and "cW" do not include the
|
||||
white space after a word, they only change up to the end of the word. This is
|
||||
because Vim interprets "cw" as change-word, and a word does not include the
|
||||
following white space.
|
||||
{Vi: "cw" when on a blank followed by other blanks changes only the first
|
||||
blank; this is probably a bug, because "dw" deletes all the blanks; use the
|
||||
'w' flag in 'cpoptions' to make it work like Vi anyway}
|
||||
|
||||
If you prefer "cw" to include the space after a word, use this mapping: >
|
||||
:map cw dwi
|
||||
<
|
||||
Or use "caw" (see |aw|).
|
||||
|
||||
*:c* *:ch* *:change*
|
||||
:{range}c[hange][!] Replace lines of text with some different text.
|
||||
Type a line containing only "." to stop replacing.
|
||||
@@ -345,6 +347,10 @@ g?{motion} Rot13 encode {motion} text. {not in Vi}
|
||||
g?g? *g?g?* *g??*
|
||||
g?? Rot13 encode current line. {not in Vi}.
|
||||
|
||||
To turn one line into title caps, make every first letter of a word
|
||||
uppercase: >
|
||||
:s/\v<(.)(\w*)/\u\1\L\2/g
|
||||
|
||||
|
||||
Adding and subtracting ~
|
||||
*CTRL-A*
|
||||
@@ -474,7 +480,7 @@ For example: >
|
||||
|
||||
A filter is a program that accepts text at standard input, changes it in some
|
||||
way, and sends it to standard output. You can use the commands below to send
|
||||
some text through a filter, so that it is replace by the filter output.
|
||||
some text through a filter, so that it is replaced by the filter output.
|
||||
Examples of filters are "sort", which sorts lines alphabetically, and
|
||||
"indent", which formats C program files (you need a version of indent that
|
||||
works like a filter; not all versions do). The 'shell' option specifies the
|
||||
@@ -661,9 +667,9 @@ The flags that you can use for the substitute commands:
|
||||
{not in Vi}
|
||||
|
||||
Note that there is no flag to change the "magicness" of the pattern. A
|
||||
different command is used instead. The reason is that the flags can only be
|
||||
found by skipping the pattern, and in order to skip the pattern the
|
||||
"magicness" must be known. Catch 22!
|
||||
different command is used instead, or you can use |/\v| and friends. The
|
||||
reason is that the flags can only be found by skipping the pattern, and in
|
||||
order to skip the pattern the "magicness" must be known. Catch 22!
|
||||
|
||||
If the {pattern} for the substitute command is empty, the command uses the
|
||||
pattern from the last substitute or ":global" command. With the [r] flag, the
|
||||
@@ -686,7 +692,9 @@ can use any other single-byte character, but not an alphanumeric character,
|
||||
pattern or replacement string. Example: >
|
||||
:s+/+//+
|
||||
|
||||
For the definition of a pattern, see |pattern|.
|
||||
For the definition of a pattern, see |pattern|. In Visual block mode, use
|
||||
|/\%V| in the pattern to have the substitute work in the block only.
|
||||
Otherwise it works on whole lines anyway.
|
||||
|
||||
*sub-replace-special* *:s\=*
|
||||
When the {string} starts with "\=" it is evaluated as an expression, see
|
||||
@@ -1128,7 +1136,10 @@ nothing is returned. {not in Vi}
|
||||
Contains the most recent search-pattern. This is used for "n" and 'hlsearch'.
|
||||
It is writable with ":let", you can change it to have 'hlsearch' highlight
|
||||
other matches without actually searching. You can't yank or delete into this
|
||||
register. {not in Vi}
|
||||
register. The search direction is available in |v:searchforward|.
|
||||
Note that the valued is restored when returning from a function
|
||||
|function-search-undo|.
|
||||
{not in Vi}
|
||||
|
||||
*@/*
|
||||
You can write to a register with a ":let" command |:let-@|. Example: >
|
||||
@@ -1253,9 +1264,11 @@ an external command, like "par" (e.g.: "!}par" to format until the end of the
|
||||
paragraph) or set 'formatprg' to "par".
|
||||
|
||||
*format-comments*
|
||||
Vim can format comments in a special way. Vim recognizes a comment by a
|
||||
specific string at the start of the line (ignoring white space). Three types
|
||||
of comments can be used:
|
||||
An overview of comment formatting is in section |30.6| of the user manual.
|
||||
|
||||
Vim can automatically insert and format comments in a special way. Vim
|
||||
recognizes a comment by a specific string at the start of the line (ignoring
|
||||
white space). Three types of comments can be used:
|
||||
|
||||
- A comment string that repeats at the start of each line. An example is the
|
||||
type of comment used in shell scripts, starting with "#".
|
||||
@@ -1263,7 +1276,7 @@ of comments can be used:
|
||||
lines. An example is this list with dashes.
|
||||
- Three-piece comments that have a start string, an end string, and optional
|
||||
lines in between. The strings for the start, middle and end are different.
|
||||
An example is the C-style comment:
|
||||
An example is the C style comment:
|
||||
/*
|
||||
* this is a C comment
|
||||
*/
|
||||
@@ -1289,23 +1302,24 @@ type of comment string. A part consists of:
|
||||
|
||||
e End of a three-piece comment
|
||||
|
||||
l Left adjust middle with start or end (default). Only recognized when
|
||||
used together with 's' or 'e'.
|
||||
l Left align. Used together with 's' or 'e', the leftmost character of
|
||||
start or end will line up with the leftmost character from the middle.
|
||||
This is the default and can be omitted. See below for more details.
|
||||
|
||||
r Right adjust middle with start or end. Only recognized when used
|
||||
together with 's' or 'e'.
|
||||
r Right align. Same as above but rightmost instead of leftmost. See
|
||||
below for more details.
|
||||
|
||||
O Don't use this one for the "O" command.
|
||||
O Don't consider this comment for the "O" command.
|
||||
|
||||
x Allows three-piece comments to be ended by just typing the last
|
||||
character of the end-comment string as the first character on a new
|
||||
line, when the middle-comment string has already been inserted
|
||||
automatically. See below for more details.
|
||||
character of the end-comment string as the first action on a new
|
||||
line when the middle-comment string has been inserted automatically.
|
||||
See below for more details.
|
||||
|
||||
{digits}
|
||||
When together with 's' or 'e': add extra indent for the middle part.
|
||||
This can be used to left-align the middle part with the start or end
|
||||
and then add an offset.
|
||||
When together with 's' or 'e': add {digit} amount of offset to an
|
||||
automatically inserted middle or end comment leader. The offset begins
|
||||
from a left alignment. See below for more details.
|
||||
|
||||
-{digits}
|
||||
Like {digits} but reduce the indent. This only works when there is
|
||||
@@ -1334,12 +1348,42 @@ have a middle string because otherwise Vim can't recognize the middle lines.
|
||||
|
||||
Notice the use of the "x" flag in the above three-piece comment definition.
|
||||
When you hit Return in a C-comment, Vim will insert the middle comment leader
|
||||
for the new line, e.g. " * ". To close this comment you just have to type "/"
|
||||
for the new line: " * ". To close this comment you just have to type "/"
|
||||
before typing anything else on the new line. This will replace the
|
||||
middle-comment leader with the end-comment leader, leaving just " */". There
|
||||
is no need to hit BackSpace first.
|
||||
middle-comment leader with the end-comment leader and apply any specified
|
||||
alignment, leaving just " */". There is no need to hit BackSpace first.
|
||||
|
||||
Examples: >
|
||||
|
||||
Here is an example of alignment flags at work to make a comment stand out
|
||||
(kind of looks like a 1 too). Consider comment string >
|
||||
sr:/***,m:**,ex2:******/
|
||||
|
||||
/***
|
||||
**<--right aligned from "r" flag
|
||||
**
|
||||
offset 2 spaces from the "2" flag--->**
|
||||
******/
|
||||
In this case, the first comment was typed, then return was pressed 4 times,
|
||||
then "/" was pressed to end the comment.
|
||||
|
||||
Here are some finer points of three part comments. There are three times when
|
||||
alignment and offset flags are taken into consideration: opening a new line
|
||||
after a start-comment, opening a new line before an end-comment, and
|
||||
automatically ending a three-piece comment. The end alignment flag has a
|
||||
backwards perspective; the result is that the same alignment flag used with
|
||||
"s" and "e" will result in the same indent for the starting and ending pieces.
|
||||
Only one alignment per comment part is meant to be used, but an offset number
|
||||
will override the "r" and "l" flag.
|
||||
|
||||
Enabling 'cindent' will override the alignment flags in many cases.
|
||||
Reindenting using a different method like |gq| or |=| will not consult
|
||||
alignment flags either. The same behaviour can be defined in those other
|
||||
formatting options. One consideration is that 'cindent' has additional options
|
||||
for context based indenting of comments but cannot replicate many three piece
|
||||
indent alignments. However, 'indentexpr' is has the ability to work better
|
||||
with three piece comments.
|
||||
|
||||
Other examples: >
|
||||
"b:*" Includes lines starting with "*", but not if the "*" is
|
||||
followed by a non-blank. This avoids a pointer dereference
|
||||
like "*str" to be recognized as a comment.
|
||||
@@ -1350,17 +1394,6 @@ By default, "b:#" is included. This means that a line that starts with
|
||||
"#include" is not recognized as a comment line. But a line that starts with
|
||||
"# define" is recognized. This is a compromise.
|
||||
|
||||
Often the alignment can be changed from right alignment to a left alignment
|
||||
with an additional space. For example, for Javadoc comments, this can be
|
||||
used (insert a backslash before the space when using ":set"): >
|
||||
s1:/*,mb:*,ex:*/
|
||||
Note that an offset is included with start, so that the middle part is left
|
||||
aligned with the start and then an offset of one character added. This makes
|
||||
it possible to left align the start and middle for this construction: >
|
||||
/**
|
||||
* comment
|
||||
*/
|
||||
|
||||
{not available when compiled without the |+comments| feature}
|
||||
|
||||
*fo-table*
|
||||
@@ -1391,7 +1424,7 @@ a Automatic formatting of paragraphs. Every time text is inserted or
|
||||
n When formatting text, recognize numbered lists. This actually uses
|
||||
the 'formatlistpat' option, thus any kind of list can be used. The
|
||||
indent of the text after the number is used for the next line. The
|
||||
default is to find a number, optionally be followed by '.', ':', ')',
|
||||
default is to find a number, optionally followed by '.', ':', ')',
|
||||
']' or '}'. Note that 'autoindent' must be set too. Doesn't work
|
||||
well together with "2".
|
||||
Example: >
|
||||
@@ -1555,9 +1588,10 @@ found here: |sort()|.
|
||||
:sort /.*\%10v/
|
||||
< To sort on the first number in the line, no matter
|
||||
what is in front of it: >
|
||||
:sort /.*\ze\d/
|
||||
|
||||
< With [r] sorting is done on the matching {pattern}
|
||||
:sort /.\{-}\ze\d/
|
||||
< (Explanation: ".\{-}" matches any text, "\ze" sets the
|
||||
end of the match and \d matches a digit.)
|
||||
With [r] sorting is done on the matching {pattern}
|
||||
instead of skipping past it as described above.
|
||||
For example, to sort on only the first three letters
|
||||
of each line: >
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*debug.txt* For Vim version 7.1. Last change: 2006 May 01
|
||||
*debug.txt* For Vim version 7.2a. Last change: 2006 May 01
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*diff.txt* For Vim version 7.1. Last change: 2006 Oct 02
|
||||
*diff.txt* For Vim version 7.2a. Last change: 2006 Oct 02
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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.
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,4 +1,4 @@
|
||||
*farsi.txt* For Vim version 7.1. Last change: 2005 Mar 29
|
||||
*farsi.txt* For Vim version 7.2a. Last change: 2005 Mar 29
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Mortaza Ghassab Shiran
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*filetype.txt* For Vim version 7.1. Last change: 2007 May 10
|
||||
*filetype.txt* For Vim version 7.2a. Last change: 2008 Jun 21
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -122,7 +122,7 @@ The file types are also used for syntax highlighting. If the ":syntax on"
|
||||
command is used, the file type detection is installed too. There is no need
|
||||
to do ":filetype on" after ":syntax on".
|
||||
|
||||
To disable one of the file types, add a line in the your filetype file, see
|
||||
To disable one of the file types, add a line in your filetype file, see
|
||||
|remove-filetype|.
|
||||
|
||||
*filetype-detect*
|
||||
@@ -502,6 +502,13 @@ For further discussion of fortran_have_tabs and the method used for the
|
||||
detection of source format see |ft-fortran-syntax|.
|
||||
|
||||
|
||||
GIT COMMIT *ft-gitcommit-plugin*
|
||||
|
||||
One command, :DiffGitCached, is provided to show a diff of the current commit
|
||||
in the preview window. It is equivalent to calling "git diff --cached" plus
|
||||
any arguments given to the command.
|
||||
|
||||
|
||||
MAIL *ft-mail-plugin*
|
||||
|
||||
Options:
|
||||
@@ -546,6 +553,20 @@ CTRL-] Jump to the manual page for the word under the cursor.
|
||||
CTRL-T Jump back to the previous manual page.
|
||||
|
||||
|
||||
PDF *ft-pdf-plugin*
|
||||
|
||||
Two maps, <C-]> and <C-T>, are provided to simulate a tag stack for navigating
|
||||
the PDF. The following are treated as tags:
|
||||
|
||||
- The byte offset after "startxref" to the xref table
|
||||
- The byte offset after the /Prev key in the trailer to an earlier xref table
|
||||
- A line of the form "0123456789 00000 n" in the xref table
|
||||
- An object reference like "1 0 R" anywhere in the PDF
|
||||
|
||||
These maps can be disabled with >
|
||||
:let g:no_pdf_maps = 1
|
||||
<
|
||||
|
||||
RPM SPEC *ft-spec-plugin*
|
||||
|
||||
Since the text for this plugin is rather long it has been put in a separate
|
||||
@@ -555,7 +576,7 @@ file: |pi_spec.txt|.
|
||||
SQL *ft-sql*
|
||||
|
||||
Since the text for this plugin is rather long it has been put in a separate
|
||||
file: |sql.txt|.
|
||||
file: |ft_sql.txt|.
|
||||
|
||||
|
||||
TEX *ft-tex-plugin*
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*fold.txt* For Vim version 7.1. Last change: 2007 May 11
|
||||
*fold.txt* For Vim version 7.2a. Last change: 2007 May 11
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
|
||||
515
runtime/doc/ft_ada.txt
Normal file
515
runtime/doc/ft_ada.txt
Normal file
@@ -0,0 +1,515 @@
|
||||
*ft_ada.txt* For Vim version 7.2a. Last change: 2008 Jun 21
|
||||
|
||||
|
||||
ADA FILE TYPE PLUG-INS REFERENCE MANUAL~
|
||||
|
||||
ADA *ada.vim*
|
||||
|
||||
1. Syntax Highlighting |ft-ada-syntax|
|
||||
2. Plug-in |ft-ada-plugin|
|
||||
3. Omni Completion |ft-ada-omni|
|
||||
3.1 Omni Completion with "gnat xref" |gnat-xref|
|
||||
3.2 Omni Completion with "ctags" |ada-ctags|
|
||||
4. Compiler Support |ada-compiler|
|
||||
4.1 GNAT |compiler-gnat|
|
||||
4.1 Dec Ada |compiler-decada|
|
||||
5. References |ada-reference|
|
||||
5.1 Options |ft-ada-options|
|
||||
5.2 Functions |ft-ada-functions|
|
||||
5.3 Commands |ft-ada-commands|
|
||||
5.4 Variables |ft-ada-variables|
|
||||
5.5 Constants |ft-ada-constants|
|
||||
8. Extra Plug-ins |ada-extra-plugins|
|
||||
|
||||
==============================================================================
|
||||
1. Syntax Highlighting ~
|
||||
*ft-ada-syntax*
|
||||
|
||||
This mode is designed for the 2005 edition of Ada ("Ada 2005"), which includes
|
||||
support for objected-programming, protected types, and so on. It handles code
|
||||
written for the original Ada language ("Ada83", "Ada87", "Ada95") as well,
|
||||
though code which uses Ada 2005-only keywords will be wrongly colored (such
|
||||
code should be fixed anyway). For more information about Ada, see
|
||||
http://www.adapower.com.
|
||||
|
||||
The Ada mode handles a number of situations cleanly.
|
||||
|
||||
For example, it knows that the "-" in "-5" is a number, but the same character
|
||||
in "A-5" is an operator. Normally, a "with" or "use" clause referencing
|
||||
another compilation unit is coloured the same way as C's "#include" is coloured.
|
||||
If you have "Conditional" or "Repeat" groups coloured differently, then "end
|
||||
if" and "end loop" will be coloured as part of those respective groups.
|
||||
|
||||
You can set these to different colours using vim's "highlight" command (e.g.,
|
||||
to change how loops are displayed, enter the command ":hi Repeat" followed by
|
||||
the colour specification; on simple terminals the colour specification
|
||||
ctermfg=White often shows well).
|
||||
|
||||
There are several options you can select in this Ada mode. See|ft-ada-options|
|
||||
for a complete list.
|
||||
|
||||
To enable them, assign a value to the option. For example, to turn one on:
|
||||
>
|
||||
> let g:ada_standard_types = 1
|
||||
>
|
||||
To disable them use ":unlet". Example:
|
||||
>
|
||||
> unlet g:ada_standard_types
|
||||
|
||||
You can just use ":" and type these into the command line to set these
|
||||
temporarily before loading an Ada file. You can make these option settings
|
||||
permanent by adding the "let" command(s), without a colon, to your "~/.vimrc"
|
||||
file.
|
||||
|
||||
Even on a slow (90Mhz) PC this mode works quickly, but if you find the
|
||||
performance unacceptable, turn on |g:ada_withuse_ordinary|.
|
||||
|
||||
Syntax folding instructions (|fold-syntax|) are added when |g:ada_folding| is
|
||||
set.
|
||||
|
||||
==============================================================================
|
||||
2. File type Plug-in ~
|
||||
*ft-ada-indent* *ft-ada-plugin*
|
||||
|
||||
The Ada plug-in provides support for:
|
||||
|
||||
- auto indenting (|indent.txt|)
|
||||
- insert completion (|i_CTRL-N|)
|
||||
- user completion (|i_CTRL-X_CTRL-U|)
|
||||
- tag searches (|tagsrch.txt|)
|
||||
- Quick Fix (|quickfix.txt|)
|
||||
- backspace handling (|'backspace'|)
|
||||
- comment handling (|'comments'|, |'commentstring'|)
|
||||
|
||||
The plug-in only activates the features of the Ada mode whenever an Ada
|
||||
files is opened and add adds Ada related entries to the main and pop-up menu.
|
||||
|
||||
==============================================================================
|
||||
3. Omni Completion ~
|
||||
*ft-ada-omni*
|
||||
|
||||
The Ada omni-completions (|i_CTRL-X_CTRL-O|) uses tags database created either
|
||||
by "gnat xref -v" or the "exuberant Ctags (http://ctags.sourceforge.net). The
|
||||
complete function will automatically detect which tool was used to create the
|
||||
tags file.
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
3.1 Omni Completion with "gnat xref" ~
|
||||
*gnat-xref*
|
||||
|
||||
GNAT XREF uses the compiler internal information (ali-files) to produce the
|
||||
tags file. This has the advantage to be 100% correct and the option of deep
|
||||
nested analysis. However the code must compile, the generator is quite
|
||||
slow and the created tags file contains only the basic Ctags information for
|
||||
each entry - not enough for some of the more advanced Vim code browser
|
||||
plug-ins.
|
||||
|
||||
NOTE: "gnat xref -v" is very tricky to use as it has almost no diagnostic
|
||||
output - If nothing is printed then usually the parameters are wrong.
|
||||
Here some important tips:
|
||||
|
||||
1) You need to compile your code first and use the "-aO" option to point to
|
||||
your .ali files.
|
||||
2) "gnat xref -v ../Include/adacl.ads" won't work - use the "gnat xref -v
|
||||
-aI../Include adacl.ads" instead.
|
||||
3) "gnat xref -v -aI../Include *.ad?" won't work - use "cd ../Include" and
|
||||
then "gnat xref -v *.ad?"
|
||||
4) Project manager support is completely broken - don't even try "gnat xref
|
||||
-Padacl.gpr".
|
||||
5) VIM is faster when the tags file is sorted - use "sort --unique
|
||||
--ignore-case --output=tags tags" .
|
||||
6) Remember to insert "!_TAG_FILE_SORTED 2 %sort ui" as first line to mark
|
||||
the file assorted.
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
3.2 Omni Completion with "ctags"~
|
||||
*ada-ctags*
|
||||
|
||||
Exuberant Ctags uses its own multi-language code parser. The parser is quite
|
||||
fast, produces a lot of extra information (hence the name "Exuberant Ctags")
|
||||
and can run on files which currently do not compile.
|
||||
|
||||
There are also lots of other Vim-tools which use exuberant Ctags.
|
||||
|
||||
You will need to install a version of the Exuberant Ctags which has Ada
|
||||
support patched in. Such a version is available from the GNU Ada Project
|
||||
(http://gnuada.sourceforge.net).
|
||||
|
||||
The Ada parser for Exuberant Ctags is fairly new - don't expect complete
|
||||
support yet.
|
||||
|
||||
==============================================================================
|
||||
4. Compiler Support ~
|
||||
*ada-compiler*
|
||||
|
||||
The Ada mode supports more then one Ada compiler and will automatically load the
|
||||
compiler set in|g:ada_default_compiler|whenever an Ada source is opened. The
|
||||
provided compiler plug-ins are split into the actual compiler plug-in and a
|
||||
collection of support functions and variables. This allows the easy
|
||||
development of specialized compiler plug-ins fine tuned to your development
|
||||
environment.
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
4.1 GNAT ~
|
||||
*compiler-gnat*
|
||||
|
||||
GNAT is the only free (beer and speech) Ada compiler available. There are
|
||||
several version available which differentiate in the licence terms used.
|
||||
|
||||
The GNAT compiler plug-in will perform a compile on pressing <F7> and then
|
||||
immediately shows the result. You can set the project file to be used by
|
||||
setting:
|
||||
>
|
||||
> call g:gnat.Set_Project_File ('my_project.gpr')
|
||||
|
||||
Setting a project file will also create a Vim session (|views-sessions|) so -
|
||||
like with the GPS - opened files, window positions etc. will remembered
|
||||
separately for all projects.
|
||||
|
||||
*gnat_members*
|
||||
GNAT OBJECT ~
|
||||
|
||||
*g:gnat.Make()*
|
||||
g:gnat.Make()
|
||||
Calls|g:gnat.Make_Command|and displays the result inside a
|
||||
|quickfix| window.
|
||||
|
||||
*g:gnat.Pretty()*
|
||||
g:gnat.Pretty()
|
||||
Calls|g:gnat.Pretty_Command|
|
||||
|
||||
*g:gnat.Find()*
|
||||
g:gnat.Find()
|
||||
Calls|g:gnat.Find_Command|
|
||||
|
||||
*g:gnat.Tags()*
|
||||
g:gnat.Tags()
|
||||
Calls|g:gnat.Tags_Command|
|
||||
|
||||
*g:gnat.Set_Project_File()*
|
||||
g:gnat.Set_Project_File([{file}])
|
||||
Set gnat project file and load associated session. An open
|
||||
project will be closed and the session written. If called
|
||||
without file name the file selector opens for selection of a
|
||||
project file. If called with an empty string then the project
|
||||
and associated session are closed.
|
||||
|
||||
*g:gnat.Project_File*
|
||||
g:gnat.Project_File string
|
||||
Current project file.
|
||||
|
||||
*g:gnat.Make_Command*
|
||||
g:gnat.Make_Command string
|
||||
External command used for|g:gnat.Make()| (|'makeprg'|).
|
||||
|
||||
*g:gnat.Pretty_Program*
|
||||
g:gnat.Pretty_Program string
|
||||
External command used for|g:gnat.Pretty()|
|
||||
|
||||
*g:gnat.Find_Program*
|
||||
g:gnat.Find_Program string
|
||||
External command used for|g:gnat.Find()|
|
||||
|
||||
*g:gnat.Tags_Command*
|
||||
g:gnat.Tags_Command string
|
||||
External command used for|g:gnat.Tags()|
|
||||
|
||||
*g:gnat.Error_Format*
|
||||
g:gnat.Error_Format string
|
||||
Error format (|'errorformat'|)
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
4.2 Dec Ada ~
|
||||
*compiler-hpada* *compiler-decada*
|
||||
*compiler-vaxada* *compiler-compaqada*
|
||||
|
||||
Dec Ada (also known by - in chronological order - VAX Ada, Dec Ada, Compaq Ada
|
||||
and HP Ada) is a fairly dated Ada 83 compiler. Support is basic: <F7> will
|
||||
compile the current unit.
|
||||
|
||||
The Dec Ada compiler expects the package name and not the file name to be
|
||||
passed a parameter. The compiler plug-in supports the usual file name
|
||||
convention to convert the file into a unit name. For separates both '-' and
|
||||
'__' are allowed.
|
||||
|
||||
*decada_members*
|
||||
DEC ADA OBJECT ~
|
||||
|
||||
*g:decada.Make()*
|
||||
g:decada.Make() function
|
||||
Calls|g:decada.Make_Command|and displays the result inside a
|
||||
|quickfix| window.
|
||||
|
||||
*g:decada.Unit_Name()*
|
||||
g:decada.Unit_Name() function
|
||||
Get the Unit name for the current file.
|
||||
|
||||
*g:decada.Make_Command*
|
||||
g:decada.Make_Command string
|
||||
External command used for|g:decadat.Make()| (|'makeprg'|).
|
||||
|
||||
*g:decada.Error_Format*
|
||||
g:decada.Error_Format| string
|
||||
Error format (|'errorformat'|).
|
||||
|
||||
==============================================================================
|
||||
5. References ~
|
||||
*ada-reference*
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
5.1 Options ~
|
||||
*ft-ada-options*
|
||||
|
||||
*g:ada_standard_types*
|
||||
g:ada_standard_types bool (true when exists)
|
||||
Highlight types in package Standard (e.g., "Float")
|
||||
|
||||
*g:ada_space_errors*
|
||||
*g:ada_no_trail_space_error*
|
||||
*g:ada_no_tab_space_error*
|
||||
*g:ada_all_tab_usage*
|
||||
g:ada_space_errors bool (true when exists)
|
||||
Highlight extraneous errors in spaces ...
|
||||
g:ada_no_trail_space_error
|
||||
- but ignore trailing spaces at the end of a line
|
||||
g:ada_no_tab_space_error
|
||||
- but ignore tabs after spaces
|
||||
g:ada_all_tab_usage
|
||||
- highlight all tab use
|
||||
|
||||
*g:ada_line_errors*
|
||||
g:ada_line_errors bool (true when exists)
|
||||
Highlight lines which are to long. Note: This highlighting
|
||||
option is quite CPU intensive.
|
||||
|
||||
*g:ada_rainbow_color*
|
||||
g:ada_rainbow_color bool (true when exists)
|
||||
Use rainbow colours for '(' and ')'. You need the
|
||||
rainbow_parenthesis for this to work
|
||||
|
||||
*g:ada_folding*
|
||||
g:ada_folding set ('sigpft')
|
||||
Use folding for Ada sources.
|
||||
's': activate syntax folding on load
|
||||
'p': fold packages
|
||||
'f': fold functions and procedures
|
||||
't': fold types
|
||||
'c': fold conditionals
|
||||
'g': activate gnat pretty print folding on load
|
||||
'i': lone 'is' folded with line above
|
||||
'b': lone 'begin' folded with line above
|
||||
'p': lone 'private' folded with line above
|
||||
'x': lone 'exception' folded with line above
|
||||
'i': activate indent folding on load
|
||||
|
||||
Note: Syntax folding is in an early (unusable) stage and
|
||||
indent or gnat pretty folding is suggested.
|
||||
|
||||
For gnat pretty folding to work the following settings are
|
||||
suggested: -cl3 -M79 -c2 -c3 -c4 -A1 -A2 -A3 -A4 -A5
|
||||
|
||||
For indent folding to work the following settings are
|
||||
suggested: shiftwidth=3 softtabstop=3
|
||||
|
||||
*g:ada_abbrev*
|
||||
g:ada_abbrev bool (true when exists)
|
||||
Add some abbreviations. This feature more or less superseded
|
||||
by the various completion methods.
|
||||
|
||||
*g:ada_withuse_ordinary*
|
||||
g:ada_withuse_ordinary bool (true when exists)
|
||||
Show "with" and "use" as ordinary keywords (when used to
|
||||
reference other compilation units they're normally highlighted
|
||||
specially).
|
||||
|
||||
*g:ada_begin_preproc*
|
||||
g:ada_begin_preproc bool (true when exists)
|
||||
Show all begin-like keywords using the colouring of C
|
||||
preprocessor commands.
|
||||
|
||||
*g:ada_omni_with_keywords*
|
||||
g:ada_omni_with_keywords
|
||||
Add Keywords, Pragmas, Attributes to omni-completions
|
||||
(|compl-omni|). Note: You can always complete then with user
|
||||
completion (|i_CTRL-X_CTRL-U|).
|
||||
|
||||
*g:ada_extended_tagging*
|
||||
g:ada_extended_tagging enum ('jump', 'list')
|
||||
use extended tagging, two options are available
|
||||
'jump': use tjump to jump.
|
||||
'list': add tags quick fix list.
|
||||
Normal tagging does not support function or operator
|
||||
overloading as these features are not available in C and
|
||||
tagging was originally developed for C.
|
||||
|
||||
*g:ada_extended_completion*
|
||||
g:ada_extended_completion
|
||||
Uses extended completion for <C-N> and <C-R> completions
|
||||
(|i_CTRL-N|). In this mode the '.' is used as part of the
|
||||
identifier so that 'Object.Method' or 'Package.Procedure' are
|
||||
completed together.
|
||||
|
||||
*g:ada_gnat_extensions*
|
||||
g:ada_gnat_extensions bool (true when exists)
|
||||
Support GNAT extensions.
|
||||
|
||||
*g:ada_with_gnat_project_files*
|
||||
g:ada_with_gnat_project_files bool (true when exists)
|
||||
Add gnat project file keywords and Attributes.
|
||||
|
||||
*g:ada_default_compiler*
|
||||
g:ada_default_compiler string
|
||||
set default compiler. Currently supported is 'gnat' and
|
||||
'decada'.
|
||||
|
||||
An "exists" type is a boolean is considered true when the variable is defined
|
||||
and false when the variable is undefined. The value which the variable is
|
||||
set makes no difference.
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
5.3 Commands ~
|
||||
*ft-ada-commands*
|
||||
|
||||
:AdaRainbow *:AdaRainbow*
|
||||
Toggles rainbow colour (|g:ada_rainbow_color|) mode for
|
||||
'(' and ')'
|
||||
|
||||
:AdaLines *:AdaLines*
|
||||
Toggles line error (|g:ada_line_errors|) display
|
||||
|
||||
:AdaSpaces *:AdaSpaces*
|
||||
Toggles space error (|g:ada_space_errors|) display.
|
||||
|
||||
:AdaTagDir *:AdaTagDir*
|
||||
Creates tags file for the directory of the current file.
|
||||
|
||||
:AdaTagFile *:AdaTagFile*
|
||||
Creates tags file for the current file.
|
||||
|
||||
:AdaTypes *:AdaTypes*
|
||||
Toggles standard types (|g:ada_standard_types|) colour.
|
||||
|
||||
:GnatFind *:GnatFind*
|
||||
Calls |g:gnat.Find()|
|
||||
|
||||
:GnatPretty *:GnatPretty*
|
||||
Calls |g:gnat.Pretty()|
|
||||
|
||||
:GnatTags *:GnatTags*
|
||||
Calls |g:gnat.Tags()|
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
5.3 Variables ~
|
||||
*ft-ada-variables*
|
||||
|
||||
*g:gnat*
|
||||
g:gnat object
|
||||
Control object which manages GNAT compiles. The object
|
||||
is created when the first Ada source code is loaded provided
|
||||
that |g:ada_default_compiler|is set to 'gnat'. See|gnat_members|
|
||||
for details.
|
||||
|
||||
*g:decada*
|
||||
g:decada object
|
||||
Control object which manages Dec Ada compiles. The object
|
||||
is created when the first Ada source code is loaded provided
|
||||
that |g:ada_default_compiler|is set to 'decada'. See
|
||||
|decada_members|for details.
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
5.4 Constants ~
|
||||
*ft-ada-constants*
|
||||
|
||||
All constants are locked. See |:lockvar| for details.
|
||||
|
||||
*g:ada#WordRegex*
|
||||
g:ada#WordRegex string
|
||||
Regular expression to search for Ada words
|
||||
|
||||
*g:ada#DotWordRegex*
|
||||
g:ada#DotWordRegex string
|
||||
Regular expression to search for Ada words separated by dots.
|
||||
|
||||
*g:ada#Comment*
|
||||
g:ada#Comment string
|
||||
Regular expression to search for Ada comments
|
||||
|
||||
*g:ada#Keywords*
|
||||
g:ada#Keywords list of dictionaries
|
||||
List of keywords, attributes etc. pp. in the format used by
|
||||
omni completion. See |complete-items| for details.
|
||||
|
||||
*g:ada#Ctags_Kinds*
|
||||
g:ada#Ctags_Kinds dictionary of lists
|
||||
Dictionary of the various kinds of items which the Ada support
|
||||
for Ctags generates.
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
5.2 Functions ~
|
||||
*ft-ada-functions*
|
||||
|
||||
ada#Word([{line}, {col}]) *ada#Word()*
|
||||
Return full name of Ada entity under the cursor (or at given
|
||||
line/column), stripping white space/newlines as necessary.
|
||||
|
||||
ada#List_Tag([{line}, {col}]) *ada#Listtags()*
|
||||
List all occurrences of the Ada entity under the cursor (or at
|
||||
given line/column) inside the quick-fix window
|
||||
|
||||
ada#Jump_Tag ({ident}, {mode}) *ada#Jump_Tag()*
|
||||
List all occurrences of the Ada entity under the cursor (or at
|
||||
given line/column) in the tag jump list. Mode can either be
|
||||
'tjump' or 'stjump'.
|
||||
|
||||
ada#Create_Tags ({option}) *ada#Create_Tags()*
|
||||
Creates tag file using Ctags. The option can either be 'file'
|
||||
for the current file, 'dir' for the directory of the current
|
||||
file or a file name.
|
||||
|
||||
gnat#Insert_Tags_Header() *gnat#Insert_Tags_Header()*
|
||||
Adds the tag file header (!_TAG_) information to the current
|
||||
file which are missing from the GNAT XREF output.
|
||||
|
||||
ada#Switch_Syntax_Option ({option}) *ada#Switch_Syntax_Option()*
|
||||
Toggles highlighting options on or off. Used for the Ada menu.
|
||||
|
||||
*gnat#New()*
|
||||
gnat#New ()
|
||||
Create a new gnat object. See |g:gnat| for details.
|
||||
|
||||
|
||||
==============================================================================
|
||||
8. Extra Plugins ~
|
||||
*ada-extra-plugins*
|
||||
|
||||
You can optionally install the following extra plug-in. They work well with Ada
|
||||
and enhance the ability of the Ada mode.:
|
||||
|
||||
backup.vim
|
||||
http://www.vim.org/scripts/script.php?script_id=1537
|
||||
Keeps as many backups as you like so you don't have to.
|
||||
|
||||
rainbow_parenthsis.vim
|
||||
http://www.vim.org/scripts/script.php?script_id=1561
|
||||
Very helpful since Ada uses only '(' and ')'.
|
||||
|
||||
nerd_comments.vim
|
||||
http://www.vim.org/scripts/script.php?script_id=1218
|
||||
Excellent commenting and uncommenting support for almost any
|
||||
programming language.
|
||||
|
||||
matchit.vim
|
||||
http://www.vim.org/scripts/script.php?script_id=39
|
||||
'%' jumping for any language. The normal '%' jump only works for '{}'
|
||||
style languages. The Ada mode will set the needed search patters.
|
||||
|
||||
taglist.vim
|
||||
http://www.vim.org/scripts/script.php?script_id=273
|
||||
Source code explorer sidebar. There is a patch for Ada available.
|
||||
|
||||
The GNU Ada Project distribution (http://gnuada.sourceforge.net) of Vim
|
||||
contains all of the above.
|
||||
|
||||
==============================================================================
|
||||
vim: textwidth=78 nowrap tabstop=8 shiftwidth=4 softtabstop=4 noexpandtab
|
||||
vim: filetype=help
|
||||
763
runtime/doc/ft_sql.txt
Normal file
763
runtime/doc/ft_sql.txt
Normal file
@@ -0,0 +1,763 @@
|
||||
*ft_sql.txt* For Vim version 7.2a. Last change: Wed Apr 26 2006 3:05:33 PM
|
||||
|
||||
by David Fishburn
|
||||
|
||||
This is a filetype plugin to work with SQL files.
|
||||
|
||||
The Structured Query Language (SQL) is a standard which specifies statements
|
||||
that allow a user to interact with a relational database. Vim includes
|
||||
features for navigation, indentation and syntax highlighting.
|
||||
|
||||
1. Navigation |sql-navigation|
|
||||
1.1 Matchit |sql-matchit|
|
||||
1.2 Text Object Motions |sql-object-motions|
|
||||
1.3 Predefined Object Motions |sql-predefined-objects|
|
||||
1.4 Macros |sql-macros|
|
||||
2. SQL Dialects |sql-dialects|
|
||||
2.1 SQLSetType |SQLSetType|
|
||||
2.2 SQL Dialect Default |sql-type-default|
|
||||
3. Adding new SQL Dialects |sql-adding-dialects|
|
||||
4. OMNI SQL Completion |sql-completion|
|
||||
4.1 Static mode |sql-completion-static|
|
||||
4.2 Dynamic mode |sql-completion-dynamic|
|
||||
4.3 Tutorial |sql-completion-tutorial|
|
||||
4.3.1 Complete Tables |sql-completion-tables|
|
||||
4.3.2 Complete Columns |sql-completion-columns|
|
||||
4.3.3 Complete Procedures |sql-completion-procedures|
|
||||
4.3.4 Complete Views |sql-completion-views|
|
||||
4.4 Completion Customization |sql-completion-customization|
|
||||
4.5 SQL Maps |sql-completion-maps|
|
||||
4.6 Using with other filetypes |sql-completion-filetypes|
|
||||
|
||||
==============================================================================
|
||||
1. Navigation *sql-navigation*
|
||||
|
||||
The SQL ftplugin provides a number of options to assist with file
|
||||
navigation.
|
||||
|
||||
|
||||
1.1 Matchit *sql-matchit*
|
||||
-----------
|
||||
The matchit plugin (http://www.vim.org/scripts/script.php?script_id=39)
|
||||
provides many additional features and can be customized for different
|
||||
languages. The matchit plugin is configured by defining a local
|
||||
buffer variable, b:match_words. Pressing the % key while on various
|
||||
keywords will move the cursor to its match. For example, if the cursor
|
||||
is on an "if", pressing % will cycle between the "else", "elseif" and
|
||||
"end if" keywords.
|
||||
|
||||
The following keywords are supported: >
|
||||
if
|
||||
elseif | elsif
|
||||
else [if]
|
||||
end if
|
||||
|
||||
[while condition] loop
|
||||
leave
|
||||
break
|
||||
continue
|
||||
exit
|
||||
end loop
|
||||
|
||||
for
|
||||
leave
|
||||
break
|
||||
continue
|
||||
exit
|
||||
end loop
|
||||
|
||||
do
|
||||
statements
|
||||
doend
|
||||
|
||||
case
|
||||
when
|
||||
when
|
||||
default
|
||||
end case
|
||||
|
||||
merge
|
||||
when not matched
|
||||
when matched
|
||||
|
||||
create[ or replace] procedure|function|event
|
||||
returns
|
||||
|
||||
|
||||
1.2 Text Object Motions *sql-object-motions*
|
||||
-----------------------
|
||||
Vim has a number of predefined keys for working with text |object-motions|.
|
||||
This filetype plugin attempts to translate these keys to maps which make sense
|
||||
for the SQL language.
|
||||
|
||||
The following |Normal| mode and |Visual| mode maps exist (when you edit a SQL
|
||||
file): >
|
||||
]] move forward to the next 'begin'
|
||||
[[ move backwards to the previous 'begin'
|
||||
][ move forward to the next 'end'
|
||||
[] move backwards to the previous 'end'
|
||||
|
||||
|
||||
1.3 Predefined Object Motions *sql-predefined-objects*
|
||||
-----------------------------
|
||||
Most relational databases support various standard features, tables, indices,
|
||||
triggers and stored procedures. Each vendor also has a variety of proprietary
|
||||
objects. The next set of maps have been created to help move between these
|
||||
objects. Depends on which database vendor you are using, the list of objects
|
||||
must be configurable. The filetype plugin attempts to define many of the
|
||||
standard objects, plus many additional ones. In order to make this as
|
||||
flexible as possible, you can override the list of objects from within your
|
||||
|vimrc| with the following: >
|
||||
let g:ftplugin_sql_objects = 'function,procedure,event,table,trigger' .
|
||||
\ ',schema,service,publication,database,datatype,domain' .
|
||||
\ ',index,subscription,synchronization,view,variable'
|
||||
|
||||
The following |Normal| mode and |Visual| mode maps have been created which use
|
||||
the above list: >
|
||||
]} move forward to the next 'create <object name>'
|
||||
[{ move backward to the previous 'create <object name>'
|
||||
|
||||
Repeatedly pressing ]} will cycle through each of these create statements: >
|
||||
create table t1 (
|
||||
...
|
||||
);
|
||||
|
||||
create procedure p1
|
||||
begin
|
||||
...
|
||||
end;
|
||||
|
||||
create index i1 on t1 (c1);
|
||||
|
||||
The default setting for g:ftplugin_sql_objects is: >
|
||||
let g:ftplugin_sql_objects = 'function,procedure,event,' .
|
||||
\ '\\(existing\\\\|global\\s\\+temporary\\s\\+\\)\\\{,1}' .
|
||||
\ 'table,trigger' .
|
||||
\ ',schema,service,publication,database,datatype,domain' .
|
||||
\ ',index,subscription,synchronization,view,variable'
|
||||
|
||||
The above will also handle these cases: >
|
||||
create table t1 (
|
||||
...
|
||||
);
|
||||
create existing table t2 (
|
||||
...
|
||||
);
|
||||
create global temporary table t3 (
|
||||
...
|
||||
);
|
||||
|
||||
By default, the ftplugin only searches for CREATE statements. You can also
|
||||
override this via your |vimrc| with the following: >
|
||||
let g:ftplugin_sql_statements = 'create,alter'
|
||||
|
||||
The filetype plugin defines three types of comments: >
|
||||
1. --
|
||||
2. //
|
||||
3. /*
|
||||
*
|
||||
*/
|
||||
|
||||
The following |Normal| mode and |Visual| mode maps have been created to work
|
||||
with comments: >
|
||||
]" move forward to the beginning of a comment
|
||||
[" move forward to the end of a comment
|
||||
|
||||
|
||||
|
||||
1.4 Macros *sql-macros*
|
||||
----------
|
||||
Vim's feature to find macro definitions, |'define'|, is supported using this
|
||||
regular expression: >
|
||||
\c\<\(VARIABLE\|DECLARE\|IN\|OUT\|INOUT\)\>
|
||||
|
||||
This addresses the following code: >
|
||||
CREATE VARIABLE myVar1 INTEGER;
|
||||
|
||||
CREATE PROCEDURE sp_test(
|
||||
IN myVar2 INTEGER,
|
||||
OUT myVar3 CHAR(30),
|
||||
INOUT myVar4 NUMERIC(20,0)
|
||||
)
|
||||
BEGIN
|
||||
DECLARE myVar5 INTEGER;
|
||||
|
||||
SELECT c1, c2, c3
|
||||
INTO myVar2, myVar3, myVar4
|
||||
FROM T1
|
||||
WHERE c4 = myVar1;
|
||||
END;
|
||||
|
||||
Place your cursor on "myVar1" on this line: >
|
||||
WHERE c4 = myVar1;
|
||||
^
|
||||
|
||||
Press any of the following keys: >
|
||||
[d
|
||||
[D
|
||||
[CTRL-D
|
||||
|
||||
|
||||
==============================================================================
|
||||
2. SQL Dialects *sql-dialects* *sql-types*
|
||||
*sybase* *TSQL* *Transact-SQL*
|
||||
*sqlanywhere*
|
||||
*oracle* *plsql* *sqlj*
|
||||
*sqlserver*
|
||||
*mysql* *postgres* *psql*
|
||||
*informix*
|
||||
|
||||
All relational databases support SQL. There is a portion of SQL that is
|
||||
portable across vendors (ex. CREATE TABLE, CREATE INDEX), but there is a
|
||||
great deal of vendor specific extensions to SQL. Oracle supports the
|
||||
"CREATE OR REPLACE" syntax, column defaults specified in the CREATE TABLE
|
||||
statement and the procedural language (for stored procedures and triggers).
|
||||
|
||||
The default Vim distribution ships with syntax highlighting based on Oracle's
|
||||
PL/SQL. The default SQL indent script works for Oracle and SQL Anywhere.
|
||||
The default filetype plugin works for all vendors and should remain vendor
|
||||
neutral, but extendable.
|
||||
|
||||
Vim currently has support for a variety of different vendors, currently this
|
||||
is via syntax scripts. Unfortunately, to flip between different syntax rules
|
||||
you must either create:
|
||||
1. New filetypes
|
||||
2. Custom autocmds
|
||||
3. Manual steps / commands
|
||||
|
||||
The majority of people work with only one vendor's database product, it would
|
||||
be nice to specify a default in your |vimrc|.
|
||||
|
||||
|
||||
2.1 SQLSetType *sqlsettype* *SQLSetType*
|
||||
--------------
|
||||
For the people that work with many different databases, it would be nice to be
|
||||
able to flip between the various vendors rules (indent, syntax) on a per
|
||||
buffer basis, at any time. The ftplugin/sql.vim file defines this function: >
|
||||
SQLSetType
|
||||
|
||||
Executing this function without any parameters will set the indent and syntax
|
||||
scripts back to their defaults, see |sql-type-default|. If you have turned
|
||||
off Vi's compatibility mode, |'compatible'|, you can use the <Tab> key to
|
||||
complete the optional parameter.
|
||||
|
||||
After typing the function name and a space, you can use the completion to
|
||||
supply a parameter. The function takes the name of the Vim script you want to
|
||||
source. Using the |cmdline-completion| feature, the SQLSetType function will
|
||||
search the |'runtimepath'| for all Vim scripts with a name containing 'sql'.
|
||||
This takes the guess work out of the spelling of the names. The following are
|
||||
examples: >
|
||||
:SQLSetType
|
||||
:SQLSetType sqloracle
|
||||
:SQLSetType sqlanywhere
|
||||
:SQLSetType sqlinformix
|
||||
:SQLSetType mysql
|
||||
|
||||
The easiest approach is to the use <Tab> character which will first complete
|
||||
the command name (SQLSetType), after a space and another <Tab>, display a list
|
||||
of available Vim script names: >
|
||||
:SQL<Tab><space><Tab>
|
||||
|
||||
|
||||
2.2 SQL Dialect Default *sql-type-default*
|
||||
-----------------------
|
||||
As mentioned earlier, the default syntax rules for Vim is based on Oracle
|
||||
(PL/SQL). You can override this default by placing one of the following in
|
||||
your |vimrc|: >
|
||||
let g:sql_type_default = 'sqlanywhere'
|
||||
let g:sql_type_default = 'sqlinformix'
|
||||
let g:sql_type_default = 'mysql'
|
||||
|
||||
If you added the following to your |vimrc|: >
|
||||
let g:sql_type_default = 'sqlinformix'
|
||||
|
||||
The next time edit a SQL file the following scripts will be automatically
|
||||
loaded by Vim: >
|
||||
ftplugin/sql.vim
|
||||
syntax/sqlinformix.vim
|
||||
indent/sql.vim
|
||||
>
|
||||
Notice indent/sqlinformix.sql was not loaded. There is no indent file
|
||||
for Informix, Vim loads the default files if the specified files does not
|
||||
exist.
|
||||
|
||||
|
||||
==============================================================================
|
||||
3. Adding new SQL Dialects *sql-adding-dialects*
|
||||
|
||||
If you begin working with a SQL dialect which does not have any customizations
|
||||
available with the default Vim distribution you can check http://www.vim.org
|
||||
to see if any customization currently exist. If not, you can begin by cloning
|
||||
an existing script. Read |filetype-plugins| for more details.
|
||||
|
||||
To help identify these scripts, try to create the files with a "sql" prefix.
|
||||
If you decide you wish to create customizations for the SQLite database, you
|
||||
can create any of the following: >
|
||||
Unix
|
||||
~/.vim/syntax/sqlite.vim
|
||||
~/.vim/indent/sqlite.vim
|
||||
Windows
|
||||
$VIM/vimfiles/syntax/sqlite.vim
|
||||
$VIM/vimfiles/indent/sqlite.vim
|
||||
|
||||
No changes are necessary to the SQLSetType function. It will automatically
|
||||
pickup the new SQL files and load them when you issue the SQLSetType command.
|
||||
|
||||
|
||||
==============================================================================
|
||||
4. OMNI SQL Completion *sql-completion*
|
||||
*omni-sql-completion*
|
||||
|
||||
Vim 7 includes a code completion interface and functions which allows plugin
|
||||
developers to build in code completion for any language. Vim 7 includes
|
||||
code completion for the SQL language.
|
||||
|
||||
There are two modes to the SQL completion plugin, static and dynamic. The
|
||||
static mode populates the popups with the data generated from current syntax
|
||||
highlight rules. The dynamic mode populates the popups with data retrieved
|
||||
directly from a database. This includes, table lists, column lists,
|
||||
procedures names and more.
|
||||
|
||||
4.1 Static Mode *sql-completion-static*
|
||||
---------------
|
||||
The static popups created contain items defined by the active syntax rules
|
||||
while editing a file with a filetype of SQL. The plugin defines (by default)
|
||||
various maps to help the user refine the list of items to be displayed.
|
||||
The defaults static maps are: >
|
||||
imap <buffer> <C-C>a <C-\><C-O>:call sqlcomplete#Map('syntax')<CR><C-X><C-O>
|
||||
imap <buffer> <C-C>k <C-\><C-O>:call sqlcomplete#Map('sqlKeyword')<CR><C-X><C-O>
|
||||
imap <buffer> <C-C>f <C-\><C-O>:call sqlcomplete#Map('sqlFunction')<CR><C-X><C-O>
|
||||
imap <buffer> <C-C>o <C-\><C-O>:call sqlcomplete#Map('sqlOption')<CR><C-X><C-O>
|
||||
imap <buffer> <C-C>T <C-\><C-O>:call sqlcomplete#Map('sqlType')<CR><C-X><C-O>
|
||||
imap <buffer> <C-C>s <C-\><C-O>:call sqlcomplete#Map('sqlStatement')<CR><C-X><C-O>
|
||||
|
||||
The static maps (which are based on the syntax highlight groups) follow this
|
||||
format: >
|
||||
imap <buffer> <C-C>k <C-\><C-O>:call sqlcomplete#Map('sqlKeyword')<CR><C-X><C-O>
|
||||
|
||||
This command breaks down as: >
|
||||
imap - Create an insert map
|
||||
<buffer> - Only for this buffer
|
||||
<C-C>k - Your choice of key map
|
||||
<C-\><C-O> - Execute one command, return to Insert mode
|
||||
:call sqlcomplete#Map( - Allows the SQL completion plugin to perform some
|
||||
housekeeping functions to allow it to be used in
|
||||
conjunction with other completion plugins.
|
||||
Indicate which item you want the SQL completion
|
||||
plugin to complete.
|
||||
In this case we are asking the plugin to display
|
||||
items from the syntax highlight group
|
||||
'sqlKeyword'.
|
||||
You can view a list of highlight group names to
|
||||
choose from by executing the
|
||||
:syntax list
|
||||
command while editing a SQL file.
|
||||
'sqlKeyword' - Display the items for the sqlKeyword highlight
|
||||
group
|
||||
)<CR> - Execute the :let command
|
||||
<C-X><C-O> - Trigger the standard omni completion key stroke.
|
||||
Passing in 'sqlKeyword' instructs the SQL
|
||||
completion plugin to populate the popup with
|
||||
items from the sqlKeyword highlight group. The
|
||||
plugin will also cache this result until Vim is
|
||||
restarted. The syntax list is retrieved using
|
||||
the syntaxcomplete plugin.
|
||||
|
||||
Using the 'syntax' keyword is a special case. This instructs the
|
||||
syntaxcomplete plugin to retrieve all syntax items. So this will effectively
|
||||
work for any of Vim's SQL syntax files. At the time of writing this includes
|
||||
10 different syntax files for the different dialects of SQL (see section 3
|
||||
above, |sql-dialects|).
|
||||
|
||||
Here are some examples of the entries which are pulled from the syntax files: >
|
||||
All
|
||||
- Contains the contents of all syntax highlight groups
|
||||
Statements
|
||||
- Select, Insert, Update, Delete, Create, Alter, ...
|
||||
Functions
|
||||
- Min, Max, Trim, Round, Date, ...
|
||||
Keywords
|
||||
- Index, Database, Having, Group, With
|
||||
Options
|
||||
- Isolation_level, On_error, Qualify_owners, Fire_triggers, ...
|
||||
Types
|
||||
- Integer, Char, Varchar, Date, DateTime, Timestamp, ...
|
||||
|
||||
|
||||
4.2 Dynamic Mode *sql-completion-dynamic*
|
||||
----------------
|
||||
Dynamic mode populates the popups with data directly from a database. In
|
||||
order for the dynamic feature to be enabled you must have the dbext.vim
|
||||
plugin installed, (http://vim.sourceforge.net/script.php?script_id=356).
|
||||
|
||||
Dynamic mode is used by several features of the SQL completion plugin.
|
||||
After installing the dbext plugin see the dbext-tutorial for additional
|
||||
configuration and usage. The dbext plugin allows the SQL completion plugin
|
||||
to display a list of tables, procedures, views and columns. >
|
||||
Table List
|
||||
- All tables for all schema owners
|
||||
Procedure List
|
||||
- All stored procedures for all schema owners
|
||||
View List
|
||||
- All stored procedures for all schema owners
|
||||
Column List
|
||||
- For the selected table, the columns that are part of the table
|
||||
|
||||
To enable the popup, while in INSERT mode, use the following key combinations
|
||||
for each group (where <C-C> means hold the CTRL key down while pressing
|
||||
the space bar):
|
||||
Table List - <C-C>t
|
||||
- <C-X><C-O> (the default map assumes tables)
|
||||
Stored Procedure List - <C-C>p
|
||||
View List - <C-C>v
|
||||
Column List - <C-C>c
|
||||
|
||||
Windows platform only - When viewing a popup window displaying the list
|
||||
of tables, you can press <C-Right>, this will
|
||||
replace the table currently highlighted with
|
||||
the column list for that table.
|
||||
- When viewing a popup window displaying the list
|
||||
of columns, you can press <C-Left>, this will
|
||||
replace the column list with the list of tables.
|
||||
- This allows you to quickly drill down into a
|
||||
table to view it's columns and back again.
|
||||
|
||||
The SQL completion plugin caches various lists that are displayed in
|
||||
the popup window. This makes the re-displaying of these lists very
|
||||
fast. If new tables or columns are added to the database it may become
|
||||
necessary to clear the plugins cache. The default map for this is: >
|
||||
imap <buffer> <C-C>R <C-\><C-O>:call sqlcomplete#Map('ResetCache')<CR><C-X><C-O>
|
||||
|
||||
|
||||
4.3 SQL Tutorial *sql-completion-tutorial*
|
||||
----------------
|
||||
|
||||
This tutorial is designed to take you through the common features of the SQL
|
||||
completion plugin so that: >
|
||||
a) You gain familiarity with the plugin
|
||||
b) You are introduced to some of the more common features
|
||||
c) Show how to customize it to your preferences
|
||||
d) Demonstrate "Best of Use" of the plugin (easiest way to configure).
|
||||
|
||||
First, create a new buffer: >
|
||||
:e tutorial.sql
|
||||
|
||||
|
||||
Static features
|
||||
---------------
|
||||
To take you through the various lists, simply enter insert mode, hit:
|
||||
<C-C>s (show SQL statements)
|
||||
At this point, you can page down through the list until you find "select".
|
||||
If you are familiar with the item you are looking for, for example you know
|
||||
the statement begins with the letter "s". You can type ahead (without the
|
||||
quotes) "se" then press:
|
||||
<C-Space>t
|
||||
Assuming "select" is highlighted in the popup list press <Enter> to choose
|
||||
the entry. Now type:
|
||||
* fr<C-C>a (show all syntax items)
|
||||
choose "from" from the popup list.
|
||||
|
||||
When writing stored procedures using the "type" list is useful. It contains
|
||||
a list of all the database supported types. This may or may not be true
|
||||
depending on the syntax file you are using. The SQL Anywhere syntax file
|
||||
(sqlanywhere.vim) has support for this: >
|
||||
BEGIN
|
||||
DECLARE customer_id <C-C>T <-- Choose a type from the list
|
||||
|
||||
|
||||
Dynamic features
|
||||
----------------
|
||||
To take advantage of the dynamic features you must first install the
|
||||
dbext.vim plugin (http://vim.sourceforge.net/script.php?script_id=356). It
|
||||
also comes with a tutorial. From the SQL completion plugin's perspective,
|
||||
the main feature dbext provides is a connection to a database. dbext
|
||||
connection profiles are the most efficient mechanism to define connection
|
||||
information. Once connections have been setup, the SQL completion plugin
|
||||
uses the features of dbext in the background to populate the popups.
|
||||
|
||||
What follows assumes dbext.vim has been correctly configured, a simple test
|
||||
is to run the command, :DBListTable. If a list of tables is shown, you know
|
||||
dbext.vim is working as expected. If not, please consult the dbext.txt
|
||||
documentation.
|
||||
|
||||
Assuming you have followed the dbext-tutorial you can press <C-C>t to
|
||||
display a list of tables. There is a delay while dbext is creating the table
|
||||
list. After the list is displayed press <C-W>. This will remove both the
|
||||
popup window and the table name already chosen when the list became active. >
|
||||
|
||||
4.3.1 Table Completion: *sql-completion-tables*
|
||||
|
||||
Press <C-C>t to display a list of tables from within the database you
|
||||
have connected via the dbext plugin.
|
||||
NOTE: All of the SQL completion popups support typing a prefix before pressing
|
||||
the key map. This will limit the contents of the popup window to just items
|
||||
beginning with those characters. >
|
||||
|
||||
4.3.2 Column Completion: *sql-completion-columns*
|
||||
|
||||
The SQL completion plugin can also display a list of columns for particular
|
||||
tables. The column completion is trigger via <C-C>c.
|
||||
|
||||
NOTE: The following example uses <C-Right> to trigger a column list while
|
||||
the popup window is active. This map is only available on the Windows
|
||||
platforms since *nix does not recognize CTRL and the right arrow held down
|
||||
together. If you wish to enable this functionality on a *nix platform choose
|
||||
a key and create one of these mappings (see |sql-completion-maps| for further
|
||||
details on where to create this imap): >
|
||||
imap <buffer> <your_keystroke> <C-R>=sqlcomplete#DrillIntoTable()<CR>
|
||||
imap <buffer> <your_keystroke> <C-Y><C-\><C-O>:call sqlcomplete#Map('column')<CR><C-X><C-O>
|
||||
|
||||
Example of using column completion:
|
||||
- Press <C-C>t again to display the list of tables.
|
||||
- When the list is displayed in the completion window, press <C-Right>,
|
||||
this will replace the list of tables, with a list of columns for the
|
||||
table highlighted (after the same short delay).
|
||||
- If you press <C-Left>, this will again replace the column list with the
|
||||
list of tables. This allows you to drill into tables and column lists
|
||||
very quickly.
|
||||
- Press <C-Right> again while the same table is highlighted. You will
|
||||
notice there is no delay since the column list has been cached. If you
|
||||
change the schema of a cached table you can press <C-C>R, which
|
||||
clears the SQL completion cache.
|
||||
- NOTE: <C-Right> and <C-Left> have been designed to work while the
|
||||
completion window is active. If the completion popup window is
|
||||
not active, a normal <C-Right> or <C-Left> will be executed.
|
||||
|
||||
Lets look how we can build a SQL statement dynamically. A select statement
|
||||
requires a list of columns. There are two ways to build a column list using
|
||||
the SQL completion plugin. >
|
||||
One column at a time:
|
||||
< 1. After typing SELECT press <C-C>t to display a list of tables.
|
||||
2. Choose a table from the list.
|
||||
3. Press <C-Right> to display a list of columns.
|
||||
4. Choose the column from the list and press enter.
|
||||
5. Enter a "," and press <C-C>c. Generating a column list
|
||||
generally requires having the cursor on a table name. The plugin
|
||||
uses this name to determine what table to retrieve the column list.
|
||||
In this step, since we are pressing <C-C>c without the cursor
|
||||
on a table name the column list displayed will be for the previous
|
||||
table. Choose a different column and move on.
|
||||
6. Repeat step 5 as often as necessary. >
|
||||
All columns for a table:
|
||||
< 1. After typing SELECT press <C-C>t to display a list of tables.
|
||||
2. Highlight the table you need the column list for.
|
||||
3. Press <Enter> to choose the table from the list.
|
||||
4. Press <C-C>l to request a comma separated list of all columns
|
||||
for this table.
|
||||
5. Based on the table name chosen in step 3, the plugin attempts to
|
||||
decide on a reasonable table alias. You are then prompted to
|
||||
either accept of change the alias. Press OK.
|
||||
6. The table name is replaced with the column list of the table is
|
||||
replaced with the comma separate list of columns with the alias
|
||||
prepended to each of the columns.
|
||||
7. Step 3 and 4 can be replaced by pressing <C-C>L, which has
|
||||
a <C-Y> embedded in the map to choose the currently highlighted
|
||||
table in the list.
|
||||
|
||||
There is a special provision when writing select statements. Consider the
|
||||
following statement: >
|
||||
select *
|
||||
from customer c,
|
||||
contact cn,
|
||||
department as dp,
|
||||
employee e,
|
||||
site_options so
|
||||
where c.
|
||||
|
||||
In INSERT mode after typing the final "c." which is an alias for the
|
||||
"customer" table, you can press either <C-C>c or <C-X><C-O>. This will
|
||||
popup a list of columns for the customer table. It does this by looking back
|
||||
to the beginning of the select statement and finding a list of the tables
|
||||
specified in the FROM clause. In this case it notes that in the string
|
||||
"customer c", "c" is an alias for the customer table. The optional "AS"
|
||||
keyword is also supported, "customer AS c". >
|
||||
|
||||
|
||||
4.3.3 Procedure Completion: *sql-completion-procedures*
|
||||
|
||||
Similar to the table list, <C-C>p, will display a list of stored
|
||||
procedures stored within the database. >
|
||||
|
||||
4.3.4 View Completion: *sql-completion-views*
|
||||
|
||||
Similar to the table list, <C-C>v, will display a list of views in the
|
||||
database.
|
||||
|
||||
|
||||
4.4 Completion Customization *sql-completion-customization*
|
||||
----------------------------
|
||||
|
||||
The SQL completion plugin can be customized through various options set in
|
||||
your |vimrc|: >
|
||||
omni_sql_no_default_maps
|
||||
< - Default: This variable is not defined
|
||||
- If this variable is defined, no maps are created for OMNI
|
||||
completion. See |sql-completion-maps| for further discussion.
|
||||
>
|
||||
omni_sql_use_tbl_alias
|
||||
< - Default: a
|
||||
- This setting is only used when generating a comma separated
|
||||
column list. By default the map is <C-C>l. When generating
|
||||
a column list, an alias can be prepended to the beginning of each
|
||||
column, for example: e.emp_id, e.emp_name. This option has three
|
||||
settings: >
|
||||
n - do not use an alias
|
||||
d - use the default (calculated) alias
|
||||
a - ask to confirm the alias name
|
||||
<
|
||||
An alias is determined following a few rules:
|
||||
1. If the table name has an '_', then use it as a separator: >
|
||||
MY_TABLE_NAME --> MTN
|
||||
my_table_name --> mtn
|
||||
My_table_NAME --> MtN
|
||||
< 2. If the table name does NOT contain an '_', but DOES use
|
||||
mixed case then the case is used as a separator: >
|
||||
MyTableName --> MTN
|
||||
< 3. If the table name does NOT contain an '_', and does NOT
|
||||
use mixed case then the first letter of the table is used: >
|
||||
mytablename --> m
|
||||
MYTABLENAME --> M
|
||||
|
||||
omni_sql_ignorecase
|
||||
< - Default: Current setting for|ignorecase|
|
||||
- Valid settings are 0 or 1.
|
||||
- When entering a few letters before initiating completion, the list
|
||||
will be filtered to display only the entries which begin with the
|
||||
list of characters. When this option is set to 0, the list will be
|
||||
filtered using case sensitivity. >
|
||||
|
||||
omni_sql_include_owner
|
||||
< - Default: 0, unless dbext.vim 3.00 has been installed
|
||||
- Valid settings are 0 or 1.
|
||||
- When completing tables, procedure or views and using dbext.vim 3.00
|
||||
or higher the list of objects will also include the owner name.
|
||||
When completing these objects and omni_sql_include_owner is enabled
|
||||
the owner name will be replaced. >
|
||||
|
||||
omni_sql_precache_syntax_groups
|
||||
< - Default:
|
||||
['syntax','sqlKeyword','sqlFunction','sqlOption','sqlType','sqlStatement']
|
||||
- sqlcomplete can be used in conjunction with other completion
|
||||
plugins. This is outlined at |sql-completion-filetypes|. When the
|
||||
filetype is changed temporarily to SQL, the sqlcompletion plugin
|
||||
will cache the syntax groups listed in the List specified in this
|
||||
option.
|
||||
>
|
||||
|
||||
4.5 SQL Maps *sql-completion-maps*
|
||||
------------
|
||||
|
||||
The default SQL maps have been described in other sections of this document in
|
||||
greater detail. Here is a list of the maps with a brief description of each.
|
||||
|
||||
Static Maps
|
||||
-----------
|
||||
These are maps which use populate the completion list using Vim's syntax
|
||||
highlighting rules. >
|
||||
<C-C>a
|
||||
< - Displays all SQL syntax items. >
|
||||
<C-C>k
|
||||
< - Displays all SQL syntax items defined as 'sqlKeyword'. >
|
||||
<C-C>f
|
||||
< - Displays all SQL syntax items defined as 'sqlFunction. >
|
||||
<C-C>o
|
||||
< - Displays all SQL syntax items defined as 'sqlOption'. >
|
||||
<C-C>T
|
||||
< - Displays all SQL syntax items defined as 'sqlType'. >
|
||||
<C-C>s
|
||||
< - Displays all SQL syntax items defined as 'sqlStatement'. >
|
||||
|
||||
Dynamic Maps
|
||||
------------
|
||||
These are maps which use populate the completion list using the dbext.vim
|
||||
plugin. >
|
||||
<C-C>t
|
||||
< - Displays a list of tables. >
|
||||
<C-C>p
|
||||
< - Displays a list of procedures. >
|
||||
<C-C>v
|
||||
< - Displays a list of views. >
|
||||
<C-C>c
|
||||
< - Displays a list of columns for a specific table. >
|
||||
<C-C>l
|
||||
< - Displays a comma separated list of columns for a specific table. >
|
||||
<C-C>L
|
||||
< - Displays a comma separated list of columns for a specific table.
|
||||
This should only be used when the completion window is active. >
|
||||
<C-Right>
|
||||
< - Displays a list of columns for the table currently highlighted in
|
||||
the completion window. <C-Right> is not recognized on most Unix
|
||||
systems, so this maps is only created on the Windows platform.
|
||||
If you would like the same feature on Unix, choose a different key
|
||||
and make the same map in your vimrc. >
|
||||
<C-Left>
|
||||
< - Displays the list of tables.
|
||||
<C-Left> is not recognized on most Unix systems, so this maps is
|
||||
only created on the Windows platform. If you would like the same
|
||||
feature on Unix, choose a different key and make the same map in
|
||||
your vimrc. >
|
||||
<C-C>R
|
||||
< - This maps removes all cached items and forces the SQL completion
|
||||
to regenerate the list of items.
|
||||
|
||||
Customizing Maps
|
||||
----------------
|
||||
You can create as many additional key maps as you like. Generally, the maps
|
||||
will be specifying different syntax highlight groups.
|
||||
|
||||
If you do not wish the default maps created or the key choices do not work on
|
||||
your platform (often a case on *nix) you define the following variable in
|
||||
your |vimrc|: >
|
||||
let g:omni_sql_no_default_maps = 1
|
||||
|
||||
Do no edit ftplugin/sql.vim directly! If you change this file your changes
|
||||
will be over written on future updates. Vim has a special directory structure
|
||||
which allows you to make customizations without changing the files that are
|
||||
included with the Vim distribution. If you wish to customize the maps
|
||||
create an after/ftplugin/sql.vim (see |after-directory|) and place the same
|
||||
maps from the ftplugin/sql.vim in it using your own key strokes. <C-C> was
|
||||
chosen since it will work on both Windows and *nix platforms. On the windows
|
||||
platform you can also use <C-Space> or ALT keys.
|
||||
|
||||
|
||||
4.6 Using with other filetypes *sql-completion-filetypes*
|
||||
------------------------------
|
||||
|
||||
Many times SQL can be used with different filetypes. For example Perl, Java,
|
||||
PHP, Javascript can all interact with a database. Often you need both the SQL
|
||||
completion as well as the completion capabilities for the current language you
|
||||
are editing.
|
||||
|
||||
This can be enabled easily with the following steps (assuming a Perl file): >
|
||||
1. :e test.pl
|
||||
2. :set filetype=sql
|
||||
3. :set ft=perl
|
||||
|
||||
Step 1
|
||||
------
|
||||
Begins by editing a Perl file. Vim automatically sets the filetype to
|
||||
"perl". By default, Vim runs the appropriate filetype file
|
||||
ftplugin/perl.vim. If you are using the syntax completion plugin by following
|
||||
the directions at |ft-syntax-omni| then the |'omnifunc'| option has been set to
|
||||
"syntax#Complete". Pressing <C-X><C-O> will display the omni popup containing
|
||||
the syntax items for Perl.
|
||||
|
||||
Step 2
|
||||
------
|
||||
Manually setting the filetype to 'sql' will also fire the appropriate filetype
|
||||
files ftplugin/sql.vim. This file will define a number of buffer specific
|
||||
maps for SQL completion, see |sql-completion-maps|. Now these maps have
|
||||
been created and the SQL completion plugin has been initialized. All SQL
|
||||
syntax items have been cached in preparation. The SQL filetype script detects
|
||||
we are attempting to use two different completion plugins. Since the SQL maps
|
||||
begin with <C-C>, the maps will toggle the |'omnifunc'| when in use. So you
|
||||
can use <C-X><C-O> to continue using the completion for Perl (using the syntax
|
||||
completion plugin) and <C-C> to use the SQL completion features.
|
||||
|
||||
Step 3
|
||||
------
|
||||
Setting the filetype back to Perl sets all the usual "perl" related items back
|
||||
as they were.
|
||||
|
||||
|
||||
vim:tw=78:ts=8:ft=help:norl:
|
||||
@@ -1,4 +1,4 @@
|
||||
*gui.txt* For Vim version 7.1. Last change: 2007 May 11
|
||||
*gui.txt* For Vim version 7.2a. Last change: 2008 Jun 14
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -325,16 +325,22 @@ A different kind of selection is used when:
|
||||
- at the |hit-enter| prompt
|
||||
- whenever the current mode is not in the 'mouse' option
|
||||
- when holding the CTRL and SHIFT keys in the GUI
|
||||
|
||||
Since Vim continues like the selection isn't there, and there is no mode
|
||||
associated with the selection, this is called modeless selection. Any text in
|
||||
the Vim window can be selected. Select the text by pressing the left mouse
|
||||
button at the start, drag to the end and release. To extend the selection,
|
||||
use the right mouse button when 'mousemodel' is "extend", or the left mouse
|
||||
button with the shift key pressed when 'mousemodel' is "popup".
|
||||
The middle mouse button pastes the text.
|
||||
The selection is removed when the selected text is scrolled or changed.
|
||||
|
||||
On the command line CTRL-Y can be used to copy the selection into the
|
||||
clipboard. To do this from Insert mode, use CTRL-O : CTRL-Y <CR>.
|
||||
clipboard. To do this from Insert mode, use CTRL-O : CTRL-Y <CR>. When
|
||||
'guioptions' contains a or A (default on X11), the selection is automatically
|
||||
copied to the "* register.
|
||||
|
||||
The middle mouse button can then paste the text. On non-X11 systems, you can
|
||||
use CTRL-R +.
|
||||
|
||||
|
||||
3.4 Using Mouse on Status Lines *gui-mouse-status*
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*gui_x11.txt* For Vim version 7.1. Last change: 2006 Jul 12
|
||||
*gui_x11.txt* For Vim version 7.2a. Last change: 2007 Dec 09
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -426,7 +426,7 @@ means in detail:
|
||||
- The session file is stored to a separate directory (usually $HOME/.gnome2).
|
||||
- 'sessionoptions' is ignored, and a hardcoded set of appropriate flags is
|
||||
used instead: >
|
||||
blank,curdir,folds,globals,help,options,winsize
|
||||
blank,curdir,folds,globals,help,options,tabpages,winsize
|
||||
- The internal variable |v:this_session| is not changed when storing the
|
||||
session. Also, it is restored to its old value when logging in again.
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*hangulin.txt* For Vim version 7.1. Last change: 2006 Apr 02
|
||||
*hangulin.txt* For Vim version 7.2a. Last change: 2006 Apr 02
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Chi-Deok Hwang and Sung-Hyun Nam
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*hebrew.txt* For Vim version 7.1. Last change: 2003 May 11
|
||||
*hebrew.txt* For Vim version 7.2a. Last change: 2007 Jun 14
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Ron Aaron (and Avner Lottem)
|
||||
@@ -7,11 +7,8 @@
|
||||
Hebrew Language support (options & mapping) for Vim *hebrew*
|
||||
|
||||
The supporting 'rightleft' functionality was originally created by Avner
|
||||
Lottem:
|
||||
E-mail: alottem@iil.intel.com
|
||||
Phone: +972-4-8307322
|
||||
|
||||
Ron Aaron <ron@ronware.org> is currently helping support these features.
|
||||
Lottem. <alottem at gmail dot com> Ron Aaron <ron at ronware dot org> is
|
||||
currently helping support these features.
|
||||
|
||||
{Vi does not have any of these commands}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*help.txt* For Vim version 7.1. Last change: 2006 Nov 07
|
||||
*help.txt* For Vim version 7.2a. Last change: 2008 Jun 21
|
||||
|
||||
VIM - main help file
|
||||
k
|
||||
@@ -143,7 +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
|
||||
|ft_ada.txt| Ada (the programming language) support
|
||||
|hangulin.txt| Hangul (Korean) input mode
|
||||
|rileft.txt| right-to-left editing mode
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*howto.txt* For Vim version 7.1. Last change: 2006 Apr 02
|
||||
*howto.txt* For Vim version 7.2a. Last change: 2006 Apr 02
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*if_cscop.txt* For Vim version 7.1. Last change: 2005 Mar 29
|
||||
*if_cscop.txt* For Vim version 7.2a. Last change: 2005 Mar 29
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Andy Kahn
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*if_ruby.txt* For Vim version 7.1. Last change: 2006 Apr 30
|
||||
*if_ruby.txt* For Vim version 7.2a. Last change: 2006 Apr 30
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Shugo Maeda
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*if_sniff.txt* For Vim version 7.1. Last change: 2005 Mar 29
|
||||
*if_sniff.txt* For Vim version 7.2a. Last change: 2005 Mar 29
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*if_tcl.txt* For Vim version 7.1. Last change: 2006 Mar 06
|
||||
*if_tcl.txt* For Vim version 7.2a. Last change: 2006 Mar 06
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Ingo Wilken
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*index.txt* For Vim version 7.1. Last change: 2007 May 05
|
||||
*index.txt* For Vim version 7.2a. Last change: 2008 May 04
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -467,6 +467,7 @@ tag command action in Normal mode ~
|
||||
|v_ab| ab "a block" from "[(" to "])" (with braces)
|
||||
|v_ap| ap "a paragraph" (with white space)
|
||||
|v_as| as "a sentence" (with white space)
|
||||
|v_at| at "a tag block" (with white space)
|
||||
|v_aw| aw "a word" (with white space)
|
||||
|v_a{| a{ same as aB
|
||||
|v_a}| a} same as aB
|
||||
@@ -484,6 +485,7 @@ tag command action in Normal mode ~
|
||||
|v_ib| ib "inner block" from "[(" to "])"
|
||||
|v_ip| ip "inner paragraph"
|
||||
|v_is| is "inner sentence"
|
||||
|v_it| it "inner tag block"
|
||||
|v_iw| iw "inner word"
|
||||
|v_i{| i{ same as iB
|
||||
|v_i}| i} same as iB
|
||||
@@ -874,6 +876,10 @@ tag command note action in Visual mode ~
|
||||
mode
|
||||
|v_X| X 2 delete the highlighted lines
|
||||
|v_Y| Y yank the highlighted lines
|
||||
|v_aquote| a" extend highlighted area with a double
|
||||
quoted string
|
||||
|v_a'| a' extend highlighted area with a single
|
||||
quoted string
|
||||
|v_a(| a( same as ab
|
||||
|v_a)| a) same as ab
|
||||
|v_a<| a< extend highlighted area with a <> block
|
||||
@@ -882,9 +888,12 @@ tag command note action in Visual mode ~
|
||||
|v_aW| aW extend highlighted area with "a WORD"
|
||||
|v_a[| a[ extend highlighted area with a [] block
|
||||
|v_a]| a] same as a[
|
||||
|v_a`| a` extend highlighted area with a backtick
|
||||
quoted string
|
||||
|v_ab| ab extend highlighted area with a () block
|
||||
|v_ap| ap extend highlighted area with a paragraph
|
||||
|v_as| as extend highlighted area with a sentence
|
||||
|v_at| at extend highlighted area with a tag block
|
||||
|v_aw| aw extend highlighted area with "a word"
|
||||
|v_a{| a{ same as aB
|
||||
|v_a}| a} same as aB
|
||||
@@ -895,6 +904,10 @@ tag command note action in Visual mode ~
|
||||
|v_gq| gq 2 format the highlighted lines
|
||||
|v_gv| gv exchange current and previous highlighted
|
||||
area
|
||||
|v_iquote| i" extend highlighted area with a double
|
||||
quoted string (without quotes)
|
||||
|v_i'| i' extend highlighted area with a single
|
||||
quoted string (without quotes)
|
||||
|v_i(| i( same as ib
|
||||
|v_i)| i) same as ib
|
||||
|v_i<| i< extend highlighted area with inner <> block
|
||||
@@ -903,9 +916,12 @@ tag command note action in Visual mode ~
|
||||
|v_iW| iW extend highlighted area with "inner WORD"
|
||||
|v_i[| i[ extend highlighted area with inner [] block
|
||||
|v_i]| i] same as i[
|
||||
|v_i`| i` extend highlighted area with a backtick
|
||||
quoted string (without the backticks)
|
||||
|v_ib| ib extend highlighted area with inner () block
|
||||
|v_ip| ip extend highlighted area with inner paragraph
|
||||
|v_is| is extend highlighted area with inner sentence
|
||||
|v_it| it extend highlighted area with inner tag block
|
||||
|v_iw| iw extend highlighted area with "inner word"
|
||||
|v_i{| i{ same as iB
|
||||
|v_i}| i} same as iB
|
||||
@@ -1339,16 +1355,14 @@ The commands are sorted on the non-optional part of their name.
|
||||
|:print| :p[rint] print lines
|
||||
|:profdel| :profd[el] stop profiling a function or script
|
||||
|:profile| :prof[ile] profiling functions and scripts
|
||||
|:promptfind| :pro[mtfind] open GUI dialog for searching
|
||||
|:promptrepl| :promtr[epl] open GUI dialog for search/replace
|
||||
|:promptfind| :pro[mptfind] open GUI dialog for searching
|
||||
|:promptrepl| :promptr[epl] open GUI dialog for search/replace
|
||||
|:perldo| :perld[o] execute Perl command for each line
|
||||
|:pop| :po[p] jump to older entry in tag stack
|
||||
|:popup| :pop[up] popup a menu by name
|
||||
|:ppop| :pp[op] ":pop" in preview window
|
||||
|:preserve| :pre[serve] write all text to swap file
|
||||
|:previous| :prev[ious] go to previous file in argument list
|
||||
|:promptfind| :pro[mptfind] Search dialog
|
||||
|:promptrepl| :promptr[epl] Search/Replace dialog
|
||||
|:psearch| :ps[earch] like ":ijump" but shows match in preview window
|
||||
|:ptag| :pt[ag] show tag in preview window
|
||||
|:ptNext| :ptN[ext] |:tNext| in preview window
|
||||
@@ -1454,7 +1468,7 @@ The commands are sorted on the non-optional part of their name.
|
||||
|:startinsert| :star[tinsert] start Insert mode
|
||||
|:startgreplace| :startg[replace] start Virtual Replace mode
|
||||
|:startreplace| :startr[eplace] start Replace mode
|
||||
|:stopinsert|| :stopi[nsert] stop Insert mode
|
||||
|:stopinsert| :stopi[nsert] stop Insert mode
|
||||
|:stjump| :stj[ump] do ":tjump" and split window
|
||||
|:stselect| :sts[elect] do ":tselect" and split window
|
||||
|:sunhide| :sun[hide] same as ":unhide"
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*intro.txt* For Vim version 7.1. Last change: 2007 May 07
|
||||
*intro.txt* For Vim version 7.2a. Last change: 2008 Jun 24
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -120,27 +120,13 @@ NOTE:
|
||||
|
||||
*subscribe-maillist*
|
||||
If you want to join, send a message to
|
||||
<vim-help@vim.org>
|
||||
<vim-subscribe@vim.org>
|
||||
Make sure that your "From:" address is correct. Then the list server will
|
||||
give you help on how to subscribe.
|
||||
|
||||
You can retrieve old messages from the maillist software, and an index of
|
||||
messages. Ask vim-help for instructions.
|
||||
|
||||
Archives are kept at: *maillist-archive*
|
||||
http://groups.yahoo.com/group/vim
|
||||
http://groups.yahoo.com/group/vimdev
|
||||
http://groups.yahoo.com/group/vimannounce
|
||||
http://groups.yahoo.com/group/vim-multibyte
|
||||
http://groups.yahoo.com/group/vim-mac
|
||||
|
||||
|
||||
Additional maillists:
|
||||
|
||||
<vim-fr@club.voila.fr> *french-maillist*
|
||||
Vim list in the French language. Subscribe by sending a message to
|
||||
<vim-fr-subscribe@club.voila.fr>
|
||||
Or go to http://groups.yahoo.com/group/vim-fr.
|
||||
*maillist-archive*
|
||||
For more information and archives look on the Vim maillist page:
|
||||
http://www.vim.org/maillist.php
|
||||
|
||||
|
||||
Bug reports: *bugs* *bug-reports* *bugreport.vim*
|
||||
@@ -220,6 +206,7 @@ Vim would never have become what it is now, without the help of these people!
|
||||
Eric Fischer Mac port, 'cindent', and other improvements
|
||||
Benji Fisher Answering lots of user questions
|
||||
Bill Foster Athena GUI port
|
||||
Google Lets me work on Vim one day a week
|
||||
Loic Grenie xvim (ideas for multi windows version)
|
||||
Sven Guckes Vim promotor and previous WWW page maintainer
|
||||
Darren Hiebert Exuberant ctags
|
||||
@@ -231,7 +218,7 @@ Vim would never have become what it is now, without the help of these people!
|
||||
Steve Kirkendall Elvis
|
||||
Roger Knobbe original port to Windows NT
|
||||
Sergey Laskavy Vim's help from Moscow
|
||||
Felix von Leitner Maintainer of Vim Mailing Lists
|
||||
Felix von Leitner Previous maintainer of Vim Mailing Lists
|
||||
David Leonard Port of Python extensions to Unix
|
||||
Avner Lottem Edit in right-to-left windows
|
||||
Flemming Madsen X11 client-server, various features and patches
|
||||
@@ -241,6 +228,8 @@ Vim would never have become what it is now, without the help of these people!
|
||||
Sung-Hyun Nam Work on multi-byte versions
|
||||
Vince Negri Win32 GUI and generic console enhancements
|
||||
Steve Oualline Author of the first Vim book |frombook|
|
||||
Dominique Pelle figuring out valgrind reports and fixes
|
||||
A.Politz Many bug reports and some fixes
|
||||
George V. Reilly Win32 port, Win32 GUI start-off
|
||||
Stephen Riehm bug collector
|
||||
Stefan Roemer various patches and help to users
|
||||
@@ -560,7 +549,7 @@ Ex mode Like Command-line mode, but after entering a command
|
||||
you remain in Ex mode. Very limited editing of the
|
||||
command line. |Ex-mode|
|
||||
|
||||
There are five ADDITIONAL modes. These are variants of the BASIC modes:
|
||||
There are six ADDITIONAL modes. These are variants of the BASIC modes:
|
||||
|
||||
*Operator-pending* *Operator-pending-mode*
|
||||
Operator-pending mode This is like Normal mode, but after an operator
|
||||
@@ -574,6 +563,12 @@ Replace mode Replace mode is a special case of Insert mode. You
|
||||
If the 'showmode' option is on "-- REPLACE --" is
|
||||
shown at the bottom of the window.
|
||||
|
||||
Virtual Replace mode Virtual Replace mode is similar to Replace mode, but
|
||||
instead of file characters you are replacing screen
|
||||
real estate. See |Virtual-Replace-mode|.
|
||||
If the 'showmode' option is on "-- VREPLACE --" is
|
||||
shown at the bottom of the window.
|
||||
|
||||
Insert Normal mode Entered when CTRL-O given in Insert mode. This is
|
||||
like Normal mode, but after executing one command Vim
|
||||
returns to Insert mode.
|
||||
@@ -608,7 +603,7 @@ CTRL-O in Insert mode you get a beep but you are still in Insert mode, type
|
||||
TO mode ~
|
||||
Normal Visual Select Insert Replace Cmd-line Ex ~
|
||||
FROM mode ~
|
||||
Normal v V ^V *4 *1 R : / ? ! Q
|
||||
Normal v V ^V *4 *1 R gR : / ? ! Q
|
||||
Visual *2 ^G c C -- : --
|
||||
Select *5 ^O ^G *6 -- -- --
|
||||
Insert <Esc> -- -- <Insert> -- --
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*map.txt* For Vim version 7.1. Last change: 2007 May 11
|
||||
*map.txt* For Vim version 7.2a. Last change: 2008 Jun 21
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -266,12 +266,13 @@ as a special key.
|
||||
|
||||
|
||||
1.3 MAPPING AND MODES *:map-modes*
|
||||
*mapmode-nvo* *mapmode-n* *mapmode-v* *mapmode-o*
|
||||
|
||||
There are five sets of mappings
|
||||
- For Normal mode: When typing commands.
|
||||
- For Visual mode: When typing commands while the Visual area is highlighted.
|
||||
- For Operator-pending mode: When an operator is pending (after "d", "y", "c",
|
||||
etc.). Example: ":omap { w" makes "y{" work like "yw" and "d{" like "dw".
|
||||
etc.). See below: |omap-info|.
|
||||
- For Insert mode. These are also used in Replace mode.
|
||||
- For Command-line mode: When entering a ":" or "/" command.
|
||||
|
||||
@@ -282,7 +283,6 @@ to type a count with a zero.
|
||||
*map-overview* *map-modes*
|
||||
Overview of which map command works in which mode:
|
||||
|
||||
*mapmode-nvo* *mapmode-n* *mapmode-v* *mapmode-o*
|
||||
commands: modes: ~
|
||||
Normal Visual+Select Operator-pending ~
|
||||
:map :noremap :unmap :mapclear yes yes yes
|
||||
@@ -318,6 +318,19 @@ Therefore the ":map" and ":map!" commands enter and display mappings for
|
||||
several modes. In Vim you can use the ":nmap", ":vmap", ":omap", ":cmap" and
|
||||
":imap" commands to enter mappings for each mode separately.
|
||||
|
||||
*omap-info*
|
||||
Operator-pending mappings can be used to define a movement command that can be
|
||||
used with any operator. Simple example: ":omap { w" makes "y{" work like "yw"
|
||||
and "d{" like "dw".
|
||||
|
||||
To ignore the starting cursor position and select different text, you can have
|
||||
the omap start Visual mode to select the text to be operated upon. Example
|
||||
that operates on a function name in the current line: >
|
||||
onoremap <silent> F :<C-U>normal! 0f(hviw<CR>
|
||||
The CTRL-U (<C-U>) is used to remove the range that Vim may insert. The
|
||||
Normal mode commands find the first '(' character and select the first word
|
||||
before it. That usually is the function name.
|
||||
|
||||
To enter a mapping for Normal and Visual mode, but not Operator-pending mode,
|
||||
first define it for all three modes, then unmap it for Operator-pending mode:
|
||||
:map xx something-difficult
|
||||
@@ -473,7 +486,7 @@ scenario: >
|
||||
:imap <M-C> foo
|
||||
:set encoding=utf-8
|
||||
The mapping for <M-C> is defined with the latin1 encoding, resulting in a 0xc3
|
||||
byte. If you type the character <20> (0xea <M-a>) in UTF-8 encoding this is the
|
||||
byte. If you type the character <20> (0xe1 <M-a>) in UTF-8 encoding this is the
|
||||
two bytes 0xc3 0xa1. You don't want the 0xc3 byte to be mapped then,
|
||||
otherwise it would be impossible to type the <20> character.
|
||||
|
||||
@@ -494,9 +507,9 @@ defined. Changing "mapleader" after that has no effect for already defined
|
||||
mappings.
|
||||
|
||||
*<LocalLeader>* *maplocalleader*
|
||||
Just like <Leader>, except that it uses "maplocalleader" instead of
|
||||
"mapleader". <LocalLeader> is to be used for mappings which are local to a
|
||||
buffer. Example: >
|
||||
<LocalLeader> is just like <Leader>, except that it uses "maplocalleader"
|
||||
instead of "mapleader". <LocalLeader> is to be used for mappings which are
|
||||
local to a buffer. Example: >
|
||||
:map <LocalLeader>q \DoItNow
|
||||
<
|
||||
In a global plugin <Leader> should be used and in a filetype plugin
|
||||
@@ -1167,7 +1180,7 @@ defined, not where it is invoked! Example:
|
||||
:source script1.vim
|
||||
:let s:error = "Wrong!"
|
||||
:Error s:error
|
||||
Executing script2.vim will result in "None" to be echoed. Not what you
|
||||
Executing script2.vim will result in "None" being echoed. Not what you
|
||||
intended! Calling a function may be an alternative.
|
||||
|
||||
Completion behavior *:command-completion* *E179*
|
||||
@@ -1203,7 +1216,7 @@ Custom completion *:command-completion-custom*
|
||||
*E467* *E468*
|
||||
It is possible to define customized completion schemes via the "custom,{func}"
|
||||
or the "customlist,{func}" completion argument. The {func} part should be a
|
||||
function with the following prototype >
|
||||
function with the following signature: >
|
||||
|
||||
:function {func}(ArgLead, CmdLine, CursorPos)
|
||||
|
||||
@@ -1370,10 +1383,10 @@ This will invoke: >
|
||||
|
||||
:" A more substantial example
|
||||
:function Allargs(command)
|
||||
: let i = 0
|
||||
: while i < argc()
|
||||
: if filereadable(argv(i))
|
||||
: execute "e " . argv(i)
|
||||
: let i = 0
|
||||
: while i < argc()
|
||||
: if filereadable(argv(i))
|
||||
: execute "e " . argv(i)
|
||||
: execute a:command
|
||||
: endif
|
||||
: let i = i + 1
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*mbyte.txt* For Vim version 7.1. Last change: 2006 Aug 11
|
||||
*mbyte.txt* For Vim version 7.2a. Last change: 2008 Jun 21
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar et al.
|
||||
@@ -235,7 +235,7 @@ You could make a small shell script for this.
|
||||
==============================================================================
|
||||
3. Encoding *mbyte-encoding*
|
||||
|
||||
Vim uses the 'encoding' option to specify how characters identified and
|
||||
Vim uses the 'encoding' option to specify how characters are identified and
|
||||
encoded when they are used inside Vim. This applies to all the places where
|
||||
text is used, including buffers (files loaded into memory), registers and
|
||||
variables.
|
||||
@@ -351,6 +351,8 @@ u unicode same as ucs-2
|
||||
u ucs2be same as ucs-2 (big endian)
|
||||
u ucs-2be same as ucs-2 (big endian)
|
||||
u ucs-4be same as ucs-4 (big endian)
|
||||
u utf-32 same as ucs-4
|
||||
u utf-32le same as ucs-4le
|
||||
default stands for the default value of 'encoding', depends on the
|
||||
environment
|
||||
|
||||
@@ -966,11 +968,11 @@ WHAT IS GLOBAL IME *global-ime*
|
||||
- Active Input Method Manager (Global IME)
|
||||
http://msdn.microsoft.com/workshop/misc/AIMM/aimm.asp
|
||||
|
||||
Support Global IME is a experimental feature.
|
||||
Support for Global IME is an experimental feature.
|
||||
|
||||
NOTE: For IME to work you must make sure the input locales of your language
|
||||
are added to your system. The exact location of this depends on the version
|
||||
of Windows you use. For example, on my W2P box:
|
||||
of Windows you use. For example, on my Windows 2000 box:
|
||||
1. Control Panel
|
||||
2. Regional Options
|
||||
3. Input Locales Tab
|
||||
@@ -1295,7 +1297,7 @@ Useful commands:
|
||||
characters, as hex numbers.
|
||||
- ":set encoding=utf-8 fileencodings=" forces using UTF-8 for all files. The
|
||||
default is to use the current locale for 'encoding' and set 'fileencodings'
|
||||
to automatically the encoding of a file.
|
||||
to automatically detect the encoding of a file.
|
||||
|
||||
|
||||
STARTING VIM
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*message.txt* For Vim version 7.1. Last change: 2007 Mar 20
|
||||
*message.txt* For Vim version 7.2a. Last change: 2007 Aug 19
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -53,7 +53,7 @@ If you are lazy, it also works without the shift key: >
|
||||
:help e72
|
||||
|
||||
==============================================================================
|
||||
2. Error messages *error-messages*
|
||||
2. Error messages *error-messages* *errors*
|
||||
|
||||
When an error message is displayed, but it is removed before you could read
|
||||
it, you can see it again with: >
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*mlang.txt* For Vim version 7.1. Last change: 2006 Jul 12
|
||||
*mlang.txt* For Vim version 7.2a. Last change: 2008 Jun 08
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -73,6 +73,9 @@ use of "-" and "_".
|
||||
This sets $LC_TIME.
|
||||
Without an argument both are set, and additionally
|
||||
$LANG is set.
|
||||
When compiled with the |+float| feature the LC_NUMERIC
|
||||
value will always be set to "C", so that floating
|
||||
point numbers use '.' as the decimal point.
|
||||
This will make a difference for items that depend on
|
||||
the language (some messages, time and date format).
|
||||
Not fully supported on all systems
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*motion.txt* For Vim version 7.1. Last change: 2006 Dec 07
|
||||
*motion.txt* For Vim version 7.2a. Last change: 2008 May 02
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -366,9 +366,11 @@ W [count] WORDS forward. |exclusive| motion.
|
||||
|
||||
*e*
|
||||
e Forward to the end of word [count] |inclusive|.
|
||||
Does not stop in an empty line.
|
||||
|
||||
*E*
|
||||
E Forward to the end of WORD [count] |inclusive|.
|
||||
Does not stop in an empty line.
|
||||
|
||||
<S-Left> or *<S-Left>* *b*
|
||||
b [count] words backward. |exclusive| motion.
|
||||
@@ -465,9 +467,9 @@ The definition of a sentence cannot be changed.
|
||||
*paragraph*
|
||||
A paragraph begins after each empty line, and also at each of a set of
|
||||
paragraph macros, specified by the pairs of characters in the 'paragraphs'
|
||||
option. The default is "IPLPPPQPP LIpplpipbp", which corresponds to the
|
||||
macros ".IP", ".LP", etc. (These are nroff macros, so the dot must be in the
|
||||
first column). A section boundary is also a paragraph boundary.
|
||||
option. The default is "IPLPPPQPP TPHPLIPpLpItpplpipbp", which corresponds to
|
||||
the macros ".IP", ".LP", etc. (These are nroff macros, so the dot must be in
|
||||
the first column). A section boundary is also a paragraph boundary.
|
||||
Note that a blank line (only containing white space) is NOT a paragraph
|
||||
boundary.
|
||||
Also note that this does not include a '{' or '}' in the first column. When
|
||||
@@ -809,10 +811,6 @@ Lowercase marks 'a to 'z are remembered as long as the file remains in the
|
||||
buffer list. If you remove the file from the buffer list, all its marks are
|
||||
lost. If you delete a line that contains a mark, that mark is erased.
|
||||
|
||||
To delete a mark: Create a new line, position the mark there, delete the line.
|
||||
E.g.: "o<Esc>mxdd". This does change the file though. Using "u" won't work,
|
||||
it also restores marks.
|
||||
|
||||
Lowercase marks can be used in combination with operators. For example: "d't"
|
||||
deletes the lines from the cursor position to mark 't'. Hint: Use mark 't' for
|
||||
Top, 'b' for Bottom, etc.. Lowercase marks are restored when using undo and
|
||||
@@ -1173,13 +1171,15 @@ remembered.
|
||||
cursor is on the # or no ([{
|
||||
following)
|
||||
For other items the matchit plugin can be used, see
|
||||
|matchit-install|.
|
||||
|matchit-install|. This plugin also helps to skip
|
||||
matches in comments.
|
||||
|
||||
When 'cpoptions' contains "M" |cpo-M| backslashes
|
||||
before parens and braces are ignored. Without "M" the
|
||||
number of backslashes matters: an even number doesn't
|
||||
match with an odd number. Thus in "( \) )" and "\( (
|
||||
\)" the first and last parenthesis match.
|
||||
|
||||
When the '%' character is not present in 'cpoptions'
|
||||
|cpo-%|, parens and braces inside double quotes are
|
||||
ignored, unless the number of parens/braces in a line
|
||||
@@ -1188,8 +1188,13 @@ remembered.
|
||||
are also ignored (parens and braces inside single
|
||||
quotes). Note that this works fine for C, but not for
|
||||
Perl, where single quotes are used for strings.
|
||||
No count is allowed ({count}% jumps to a line {count}
|
||||
percentage down the file |N%|). Using '%' on
|
||||
|
||||
Nothing special is done for matches in comments. You
|
||||
can either use the matchit plugin |matchit-install| or
|
||||
put quotes around matches.
|
||||
|
||||
No count is allowed, {count}% jumps to a line {count}
|
||||
percentage down the file |N%|. Using '%' on
|
||||
#if/#else/#endif makes the movement linewise.
|
||||
|
||||
*[(*
|
||||
|
||||
@@ -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*
|
||||
4. Error Messages *netbeans-messages*
|
||||
|
||||
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|.
|
||||
|
||||
==============================================================================
|
||||
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.
|
||||
==============================================================================
|
||||
9. Running Vim from NetBeans *netbeans-run*
|
||||
which is read-only and becomes confused if Vim does this.
|
||||
So Vim does not allow modifications to files when run
|
||||
in NetBeans mode.
|
||||
|
||||
NetBeans starts Vim with the |-nb| argument. Three forms can be used, that
|
||||
==============================================================================
|
||||
5. Running Vim in NetBeans mode *netbeans-run*
|
||||
|
||||
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".
|
||||
|
||||
==============================================================================
|
||||
10. NetBeans protocol *netbeans-protocol*
|
||||
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.
|
||||
|
||||
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".
|
||||
|
||||
==============================================================================
|
||||
6. NetBeans protocol *netbeans-protocol*
|
||||
|
||||
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:
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*options.txt* For Vim version 7.1. Last change: 2008 Feb 24
|
||||
*options.txt* For Vim version 7.2a. Last change: 2008 Jun 24
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -111,19 +111,31 @@ and the following arguments will be ignored.
|
||||
When 'verbose' is non-zero, displaying an option value will also tell where it
|
||||
was last set. Example: >
|
||||
:verbose set shiftwidth cindent?
|
||||
shiftwidth=4
|
||||
Last set from modeline
|
||||
cindent
|
||||
Last set from /usr/local/share/vim/vim60/ftplugin/c.vim
|
||||
This is only done when specific option values are requested, not for ":set
|
||||
all" or ":set" without an argument.
|
||||
When the option was set by hand there is no "Last set" message. There is only
|
||||
one value for all local options with the same name. Thus the message applies
|
||||
to the option name, not necessarily its value.
|
||||
< shiftwidth=4 ~
|
||||
Last set from modeline ~
|
||||
cindent ~
|
||||
Last set from /usr/local/share/vim/vim60/ftplugin/c.vim ~
|
||||
This is only done when specific option values are requested, not for ":verbose
|
||||
set all" or ":verbose set" without an argument.
|
||||
When the option was set by hand there is no "Last set" message.
|
||||
When the option was set while executing a function, user command or
|
||||
autocommand, the script in which it was defined is reported.
|
||||
Note that an option may also have been set as a side effect of setting
|
||||
'compatible'.
|
||||
A few special texts:
|
||||
Last set from modeline ~
|
||||
Option was set in a |modeline|.
|
||||
Last set from --cmd argument ~
|
||||
Option was set with command line argument |--cmd| or +.
|
||||
Last set from -c argument ~
|
||||
Option was set with command line argument |-c|, +, |-S| or
|
||||
|-q|.
|
||||
Last set from environment variable ~
|
||||
Option was set from an environment variable, $VIMINIT,
|
||||
$GVIMINIT or $EXINIT.
|
||||
Last set from error handler ~
|
||||
Option was cleared when evaluating it resulted in an error.
|
||||
|
||||
{not available when compiled without the +eval feature}
|
||||
|
||||
*:set-termcap* *E522*
|
||||
@@ -265,7 +277,10 @@ You will not get back the 'list' value as it was the last time you edited
|
||||
Without argument: Display all local option's local
|
||||
values which are different from the default.
|
||||
When displaying a specific local option, show the
|
||||
local value. For a global option the global value is
|
||||
local value. For a global/local boolean option, when
|
||||
the global value is being used, "--" is displayed
|
||||
before the option name.
|
||||
For a global option the global value is
|
||||
shown (but that might change in the future).
|
||||
{not in Vi}
|
||||
|
||||
@@ -797,7 +812,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
|
||||
When 'background' is set Vim will adjust the default color groups for
|
||||
the new value. But the colors used for syntax highlighting will not
|
||||
change.
|
||||
change. *g:colors_name*
|
||||
When a color scheme is loaded (the "colors_name" variable is set)
|
||||
setting 'background' will cause the color scheme to be reloaded. If
|
||||
the color scheme adjusts to the value of 'background' this will work.
|
||||
@@ -1148,9 +1163,11 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
*'browsedir'* *'bsdir'*
|
||||
'browsedir' 'bsdir' string (default: "last")
|
||||
global
|
||||
{not in Vi} {only for Motif and Win32 GUI}
|
||||
{not in Vi} {only for Motif, Athena, GTK, Mac and
|
||||
Win32 GUI}
|
||||
Which directory to use for the file browser:
|
||||
last Use same directory as with last file browser.
|
||||
last Use same directory as with last file browser, where a
|
||||
file was opened or saved.
|
||||
buffer Use the directory of the related buffer.
|
||||
current Use the current directory.
|
||||
{path} Use the specified directory
|
||||
@@ -1343,7 +1360,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
{not in Vi}
|
||||
{not available when compiled without the |+cindent|
|
||||
feature}
|
||||
Enables automatic C program indenting See 'cinkeys' to set the keys
|
||||
Enables automatic C program indenting. See 'cinkeys' to set the keys
|
||||
that trigger reindenting in insert mode and 'cinoptions' to set your
|
||||
preferred indent style.
|
||||
If 'indentexpr' is not empty, it overrules 'cindent'.
|
||||
@@ -1711,7 +1728,8 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
tabs followed by spaces as required (unless |'expandtab'| is enabled,
|
||||
in which case only spaces are used). Enabling this option makes the
|
||||
new line copy whatever characters were used for indenting on the
|
||||
existing line. If the new indent is greater than on the existing
|
||||
existing line. 'expandtab' has no effect on these characters, a Tab
|
||||
remains a Tab. If the new indent is greater than on the existing
|
||||
line, the remaining space is filled in the normal manner.
|
||||
NOTE: 'copyindent' is reset when 'compatible' is set.
|
||||
Also see 'preserveindent'.
|
||||
@@ -2423,8 +2441,8 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
global or local to buffer |global-local|
|
||||
{not in Vi}
|
||||
External program to use for "=" command. When this option is empty
|
||||
the internal formatting functions are used ('lisp', 'cindent' or
|
||||
'indentexpr').
|
||||
the internal formatting functions are used; either 'lisp', 'cindent'
|
||||
or 'indentexpr'.
|
||||
Environment variables are expanded |:set_env|. See |option-backslash|
|
||||
about including spaces and backslashes.
|
||||
This option cannot be set from a |modeline| or in the |sandbox|, for
|
||||
@@ -3362,7 +3380,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
'guitablabel' can be used to change the text in the labels.
|
||||
When 'e' is missing a non-GUI tab pages line may be used.
|
||||
The GUI tabs are only supported on some systems, currently
|
||||
GTK, Motif and MS-Windows.
|
||||
GTK, Motif, Mac OS/X and MS-Windows.
|
||||
*'go-f'*
|
||||
'f' Foreground: Don't use fork() to detach the GUI from the shell
|
||||
where it was started. Use this for programs that wait for the
|
||||
@@ -3618,7 +3636,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
When you get bored looking at the highlighted matches, you can turn it
|
||||
off with |:nohlsearch|. As soon as you use a search command, the
|
||||
highlighting comes back.
|
||||
'redrawtime' specifies the maximum time spend on finding matches.
|
||||
'redrawtime' specifies the maximum time spent on finding matches.
|
||||
When the search pattern can match an end-of-line, Vim will try to
|
||||
highlight all of the matched text. However, this depends on where the
|
||||
search starts. This will be the first line in the window or the first
|
||||
@@ -3917,12 +3935,13 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
local to buffer
|
||||
{not in Vi}
|
||||
When doing keyword completion in insert mode |ins-completion|, and
|
||||
'ignorecase' is also on, the case of the match is adjusted. If the
|
||||
typed text contains a lowercase letter where the match has an upper
|
||||
case letter, the completed part is made lowercase. If the typed text
|
||||
has no lowercase letters and the match has a lowercase letter where
|
||||
the typed text has an uppercase letter, and there is a letter before
|
||||
it, the completed part is made uppercase.
|
||||
'ignorecase' is also on, the case of the match is adjusted depending
|
||||
on the typed text. If the typed text contains a lowercase letter
|
||||
where the match has an upper case letter, the completed part is made
|
||||
lowercase. If the typed text has no lowercase letters and the match
|
||||
has a lowercase letter where the typed text has an uppercase letter,
|
||||
and there is a letter before it, the completed part is made uppercase.
|
||||
With 'noinfercase' the match is used as-is.
|
||||
|
||||
*'insertmode'* *'im'* *'noinsertmode'* *'noim'*
|
||||
'insertmode' 'im' boolean (default off)
|
||||
@@ -3967,6 +3986,10 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
Multi-byte characters 256 and above are always included, only the
|
||||
characters up to 255 are specified with this option.
|
||||
For UTF-8 the characters 0xa0 to 0xff are included as well.
|
||||
Think twice before adding white space to this option. Although a
|
||||
space may appear inside a file name, the effect will be that Vim
|
||||
doesn't know where a file name starts or ends when doing completion.
|
||||
It most likely works better without a space in 'isfname'.
|
||||
|
||||
Note that on systems using a backslash as path separator, Vim tries to
|
||||
do its best to make it work as you would expect. That is a bit
|
||||
@@ -3993,7 +4016,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
are included. Normally these are the characters a to z and A to Z,
|
||||
plus accented characters. To include '@' itself use "@-@". Examples:
|
||||
"@,^a-z" All alphabetic characters, excluding lower
|
||||
case letters.
|
||||
case ASCII letters.
|
||||
"a-z,A-Z,@-@" All letters plus the '@' character.
|
||||
A comma can be included by using it where a character number is
|
||||
expected. Example:
|
||||
@@ -4617,8 +4640,9 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
global
|
||||
{not in Vi}
|
||||
Enable the use of the mouse. Only works for certain terminals
|
||||
(xterm, MS-DOS, Win32 |win32-mouse|, QNX pterm, and Linux console
|
||||
with gpm). For using the mouse in the GUI, see |gui-mouse|.
|
||||
(xterm, MS-DOS, Win32 |win32-mouse|, QNX pterm, *BSD console with
|
||||
sysmouse and Linux console with gpm). For using the mouse in the
|
||||
GUI, see |gui-mouse|.
|
||||
The mouse can be enabled for different modes:
|
||||
n Normal mode
|
||||
v Visual mode
|
||||
@@ -4948,6 +4972,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
Note that typing <F10> in paste mode inserts "<F10>", since in paste
|
||||
mode everything is inserted literally, except the 'pastetoggle' key
|
||||
sequence.
|
||||
When the value has several bytes 'ttimeoutlen' applies.
|
||||
|
||||
*'pex'* *'patchexpr'*
|
||||
'patchexpr' 'pex' string (default "")
|
||||
@@ -5054,6 +5079,8 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
enabled, in which case only spaces are used). Enabling this option
|
||||
means the indent will preserve as many existing characters as possible
|
||||
for indenting, and only add additional tabs or spaces as required.
|
||||
'expandtab' does not apply to the preserved white space, a Tab remains
|
||||
a Tab.
|
||||
NOTE: When using ">>" multiple times the resulting indent is a mix of
|
||||
tabs and spaces. You might not like this.
|
||||
NOTE: 'preserveindent' is reset when 'compatible' is set.
|
||||
@@ -5894,6 +5921,9 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
pattern (if there is one) as possible matches. Thus, if you have
|
||||
matched a C function, you can see a template for what arguments are
|
||||
required (coding style permitting).
|
||||
Note that this doesn't work well together with having "longest" in
|
||||
'completeopt', because the completion from the search pattern may not
|
||||
match the typed text.
|
||||
|
||||
*'showmatch'* *'sm'* *'noshowmatch'* *'nosm'*
|
||||
'showmatch' 'sm' boolean (default off)
|
||||
@@ -6478,6 +6508,8 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
split If included, split the current window before loading
|
||||
a buffer. Otherwise: do not split, use current window.
|
||||
Supported in |quickfix| commands that display errors.
|
||||
newtab Like "split", but open a new tab page. Overrules
|
||||
"split" when both are present.
|
||||
|
||||
*'synmaxcol'* *'smc'*
|
||||
'synmaxcol' 'smc' number (default 3000)
|
||||
@@ -6602,7 +6634,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
|
||||
Linear searching is done anyway, for one file, when Vim finds a line
|
||||
at the start of the file indicating that it's not sorted: >
|
||||
!_TAG_FILE_SORTED 0 /some command/
|
||||
!_TAG_FILE_SORTED 0 /some comment/
|
||||
< [The whitespace before and after the '0' must be a single <Tab>]
|
||||
|
||||
When a binary search was done and no match was found in any of the
|
||||
@@ -7089,7 +7121,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
"xterm", when the terminal name doesn't start with "xterm", but it can
|
||||
handle xterm mouse codes.
|
||||
The "xterm2" value will be set if the xterm version is reported to be
|
||||
95 of higher. This only works when compiled with the |+termresponse|
|
||||
95 or higher. This only works when compiled with the |+termresponse|
|
||||
feature and if |t_RV| is set to the escape sequence to request the
|
||||
xterm version number. Otherwise "xterm2" must be set explicitly.
|
||||
If you do not want 'ttymouse' to be set to "xterm2" automatically, set
|
||||
@@ -7424,6 +7456,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
{not in Vi}
|
||||
Character you have to type to start wildcard expansion in the
|
||||
command-line, as specified with 'wildmode'.
|
||||
More info here: |cmdline-completion|.
|
||||
The character is not recognized when used inside a macro. See
|
||||
'wildcharm' for that.
|
||||
Although 'wc' is a number option, you can set it to a special key: >
|
||||
@@ -7441,7 +7474,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
you'll never actually type 'wildcharm', just use it in mappings that
|
||||
automatically invoke completion mode, e.g.: >
|
||||
:set wcm=<C-Z>
|
||||
:cmap ss so $vim/sessions/*.vim<C-Z>
|
||||
:cnoremap ss so $vim/sessions/*.vim<C-Z>
|
||||
< Then after typing :ss you can use CTRL-P & CTRL-N.
|
||||
|
||||
*'wildignore'* *'wig'*
|
||||
@@ -7536,6 +7569,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
< List all matches without completing, then each full match >
|
||||
:set wildmode=longest,list
|
||||
< Complete longest common string, then list alternatives.
|
||||
More info here: |cmdline-completion|.
|
||||
|
||||
*'wildoptions'* *'wop'*
|
||||
'wildoptions' 'wop' string (default "")
|
||||
@@ -7596,13 +7630,17 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
feature}
|
||||
Minimal number of lines for the current window. This is not a hard
|
||||
minimum, Vim will use fewer lines if there is not enough room. If the
|
||||
current window is smaller, its size is increased, at the cost of the
|
||||
height of other windows. Set it to 999 to make the current window
|
||||
always fill the screen (although this has the drawback that ":all"
|
||||
will create only two windows). Set it to a small number for normal
|
||||
editing.
|
||||
Minimum value is 1.
|
||||
The height is not adjusted after one of the commands to change the
|
||||
focus goes to a window that is smaller, its size is increased, at the
|
||||
cost of the height of other windows.
|
||||
Set 'winheight' to a small number for normal editing.
|
||||
Set it to 999 to make the current window fill most of the screen.
|
||||
Other windows will be only 'winminheight' high. This has the drawback
|
||||
that ":all" will create only two windows. To avoid "vim -o 1 2 3 4"
|
||||
to create only two windows, set the option after startup is done,
|
||||
using the |VimEnter| event: >
|
||||
au VimEnter * set winheight=999
|
||||
< Minimum value is 1.
|
||||
The height is not adjusted after one of the commands that change the
|
||||
height of the current window.
|
||||
'winheight' applies to the current window. Use 'winminheight' to set
|
||||
the minimal height for other windows.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*os_390.txt* For Vim version 7.1. Last change: 2005 Mar 29
|
||||
*os_390.txt* For Vim version 7.2a. Last change: 2005 Mar 29
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Ralf Schandl
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*os_amiga.txt* For Vim version 7.1. Last change: 2005 Mar 29
|
||||
*os_amiga.txt* For Vim version 7.2a. Last change: 2005 Mar 29
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*os_dos.txt* For Vim version 7.1. Last change: 2006 Mar 30
|
||||
*os_dos.txt* For Vim version 7.2a. Last change: 2006 Mar 30
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*os_mac.txt* For Vim version 7.1. Last change: 2006 Apr 30
|
||||
*os_mac.txt* For Vim version 7.2a. Last change: 2006 Apr 30
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar et al.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*os_mint.txt* For Vim version 7.1. Last change: 2005 Mar 29
|
||||
*os_mint.txt* For Vim version 7.2a. Last change: 2005 Mar 29
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Jens M. Felderhoff
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*os_msdos.txt* For Vim version 7.1. Last change: 2005 Mar 29
|
||||
*os_msdos.txt* For Vim version 7.2a. Last change: 2005 Mar 29
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*os_os2.txt* For Vim version 7.1. Last change: 2007 Apr 22
|
||||
*os_os2.txt* For Vim version 7.2a. Last change: 2007 Apr 22
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Paul Slootman
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*os_qnx.txt* For Vim version 7.1. Last change: 2005 Mar 29
|
||||
*os_qnx.txt* For Vim version 7.2a. Last change: 2005 Mar 29
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Julian Kinraid
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*os_vms.txt* For Vim version 7.1. Last change: 2006 Nov 18
|
||||
*os_vms.txt* For Vim version 7.2a. Last change: 2006 Nov 18
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*os_win32.txt* For Vim version 7.1. Last change: 2007 Apr 22
|
||||
*os_win32.txt* For Vim version 7.2a. Last change: 2008 May 02
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by George Reilly
|
||||
@@ -306,7 +306,7 @@ A. When using :! to run an external command, you can run it with "start": >
|
||||
:!start winfile.exe<CR>
|
||||
< Using "start" stops Vim switching to another screen, opening a new console,
|
||||
or waiting for the program to complete; it indicates that you are running a
|
||||
program that does not effect the files you are editing. Programs begun
|
||||
program that does not affect the files you are editing. Programs begun
|
||||
with :!start do not get passed Vim's open file handles, which means they do
|
||||
not have to be closed before Vim.
|
||||
To avoid this special treatment, use ":! start".
|
||||
|
||||
@@ -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|.
|
||||
|
||||
@@ -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 (#...)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*pi_gzip.txt* For Vim version 7.1. Last change: 2002 Oct 29
|
||||
*pi_gzip.txt* For Vim version 7.2a. Last change: 2002 Oct 29
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,4 +1,4 @@
|
||||
*pi_paren.txt* For Vim version 7.1. Last change: 2006 Jun 14
|
||||
*pi_paren.txt* For Vim version 7.2a. Last change: 2008 Jun 16
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -15,6 +15,7 @@ You can avoid loading this plugin by setting the "loaded_matchparen" variable: >
|
||||
The plugin installs CursorMoved, CursorMovedI and WinEnter autocommands to
|
||||
redefine the match highlighting.
|
||||
|
||||
*:NoMatchParen* *:DoMatchParen*
|
||||
To disable the plugin after it was loaded use this command: >
|
||||
|
||||
:NoMatchParen
|
||||
@@ -46,5 +47,11 @@ are:
|
||||
- 'synmaxcol' times 2 bytes before or after the cursor to avoid a delay
|
||||
in a long line with syntax highlighting.
|
||||
|
||||
|
||||
If you would like the |%| command to work better, the matchit plugin can be
|
||||
used, see |matchit-install|. This plugin also helps to skip matches in
|
||||
comments. This is unrelated to the matchparen highlighting, they use a
|
||||
different mechanism.
|
||||
|
||||
==============================================================================
|
||||
vim:tw=78:ts=8:ft=help:norl:
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*pi_spec.txt* For Vim version 7.1. Last change: 2006 Apr 24
|
||||
*pi_spec.txt* For Vim version 7.2a. Last change: 2006 Apr 24
|
||||
|
||||
by Gustavo Niemeyer ~
|
||||
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
*pi_tar.txt* For Vim version 7.1. Last change: 2006 Sep 29
|
||||
*pi_tar.txt* For Vim version 7.2a. Last change: 2008 Jun 12
|
||||
|
||||
+====================+
|
||||
| Tar File Interface |
|
||||
+====================+
|
||||
+====================+
|
||||
| Tar File Interface |
|
||||
+====================+
|
||||
|
||||
Author: Charles E. Campbell, Jr. <NdrOchip@ScampbellPfamily.AbizM>
|
||||
(remove NOSPAM from Campbell's email first)
|
||||
Copyright: The GPL (gnu public license) applies to *tar-copyright*
|
||||
tarPlugin.vim, and pi_tar.txt.
|
||||
Copyright 2005-2008: The GPL (gnu public license) applies to *tar-copyright*
|
||||
tar.vim, tarPlugin.vim, and pi_tar.txt.
|
||||
No warranty, express or implied. Use At-Your-Own-Risk.
|
||||
|
||||
==============================================================================
|
||||
@@ -36,32 +36,42 @@ Copyright: The GPL (gnu public license) applies to *tar-copyright*
|
||||
*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_nomax* 0 if true, file window will not be maximized
|
||||
*g:tar_writeoptions* "uf" used to update/replace a file
|
||||
|
||||
|
||||
==============================================================================
|
||||
4. History *tar-history*
|
||||
|
||||
v16 Jun 06, 2008 * tarfile:: used instead of tarfile: when editing files
|
||||
inside tarballs. Fixes a problem with tarballs called
|
||||
things like c:\abc.tar. (tnx to Bill McCarthy)
|
||||
v14 May 09, 2008 * arno caught a security bug
|
||||
May 28, 2008 * various security improvements. Now requires patch 299
|
||||
which provides the fnameescape() function
|
||||
May 30, 2008 * allows one to view *.gz and *.bz2 files that are in
|
||||
*.tar files.
|
||||
v12 Sep 07, 2007 * &shq now used if not the empty string for g:tar_shq
|
||||
v10 May 02, 2006 * now using "redraw then echo" to show messages, instead
|
||||
of "echo and prompt user"
|
||||
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,
|
||||
its "tar".
|
||||
of the tar program to be used. By default, of course,
|
||||
it's "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 * <amatch> used instead of <afile> in autocmds
|
||||
Oct 18, 2005 * handles writing to compressed archives
|
||||
Nov 03, 2005 * handles writing tarfiles across a network using
|
||||
netrw#NetWrite()
|
||||
netrw#NetWrite()
|
||||
v2 * converted to use Vim7's new autoload feature by
|
||||
Bram Moolenaar
|
||||
Bram Moolenaar
|
||||
v1 (original) * Michael Toren (see http://michael.toren.net/code/)
|
||||
|
||||
==============================================================================
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*pi_vimball.txt* For Vim version 7.1. Last change: 2007 May 11
|
||||
*pi_vimball.txt* For Vim version 7.2a. Last change: 2008 Jun 05
|
||||
|
||||
----------------
|
||||
Vimball Archiver
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
Author: Charles E. Campbell, Jr. <NdrOchip@ScampbellPfamily.AbizM>
|
||||
(remove NOSPAM from Campbell's email first)
|
||||
Copyright: (c) 2004-2006 by Charles E. Campbell, Jr. *Vimball-copyright*
|
||||
Copyright: (c) 2004-2008 by Charles E. Campbell, Jr. *Vimball-copyright*
|
||||
The VIM LICENSE applies to Vimball.vim, and Vimball.txt
|
||||
(see |copyright|) except use "Vimball" instead of "Vim".
|
||||
No warranty, express or implied.
|
||||
@@ -16,21 +16,51 @@ Copyright: (c) 2004-2006 by Charles E. Campbell, Jr. *Vimball-copyright*
|
||||
1. Contents *vba* *vimball* *vimball-contents*
|
||||
|
||||
1. Contents......................................: |vimball-contents|
|
||||
2. Vimball Manual................................: |vimball-manual|
|
||||
3. Vimball Manual................................: |vimball-manual|
|
||||
MkVimball.....................................: |:MkVimball|
|
||||
UseVimball....................................: |:UseVimball|
|
||||
RmVimball.....................................: |:RmVimball|
|
||||
3. Vimball History...............................: |vimball-history|
|
||||
4. Vimball History...............................: |vimball-history|
|
||||
|
||||
|
||||
==============================================================================
|
||||
2. Vimball Manual *vimball-manual*
|
||||
2. Vimball Introduction *vimball-intro*
|
||||
|
||||
Vimball is intended to make life simpler for users of plugins. All
|
||||
a user needs to do with a vimball is: >
|
||||
vim someplugin.vba
|
||||
:so %
|
||||
:q
|
||||
< and the plugin and all its components will be installed into their
|
||||
appropriate directories. Note that one doesn't need to be in any
|
||||
particular directory when one does this. Plus, any help for the
|
||||
plugin will also be automatically installed.
|
||||
|
||||
If a user has decided to use the AsNeeded plugin, vimball is smart
|
||||
enough to put scripts nominally intended for .vim/plugin/ into
|
||||
.vim/AsNeeded/ instead.
|
||||
|
||||
Removing a plugin that was installed with vimball is really easy: >
|
||||
vim
|
||||
:RmVimball someplugin
|
||||
< This operation is not at all easy for zips and tarballs, for example.
|
||||
|
||||
Vimball examines the user's |'runtimepath'| to determine where to put
|
||||
the scripts. The first directory mentioned on the runtimepath is
|
||||
usually used if possible. Use >
|
||||
:echo &rtp
|
||||
< to see that directory.
|
||||
|
||||
|
||||
==============================================================================
|
||||
3. Vimball Manual *vimball-manual*
|
||||
|
||||
*:MkVimball*
|
||||
:[range]MkVimball[!] filename [path]
|
||||
|
||||
The range is composed of lines holding paths to files to be included
|
||||
in your new vimball. As an example: >
|
||||
in your new vimball, omitting the portion of the paths that is
|
||||
normally specified by the runtimepath (|'rtp'|). As an example: >
|
||||
plugin/something.vim
|
||||
doc/something.txt
|
||||
< using >
|
||||
@@ -44,14 +74,34 @@ Copyright: (c) 2004-2006 by Charles E. Campbell, Jr. *Vimball-copyright*
|
||||
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
|
||||
behavior resembles that for |:w|.
|
||||
|
||||
*g:vimball_mkdir*
|
||||
First, the |mkdir()| command is tried (not all systems support it).
|
||||
|
||||
If it doesn't exist, then g:vimball_mkdir doesn't exist, it is set to:
|
||||
|g:netrw_local_mkdir|, if it exists
|
||||
"mkdir", if it is executable
|
||||
"makedir", if it is executable
|
||||
Otherwise, it is undefined.
|
||||
One may explicitly specify the directory making command using
|
||||
g:vimball_mkdir. This command is used to make directories that
|
||||
are needed as indicated by the vimball.
|
||||
|
||||
*g:vimball_home*
|
||||
You may override the use of the |'runtimepath'| by specifying a
|
||||
variable, g:vimball_home.
|
||||
|
||||
Path Preprocessing *g:vimball_path_escape*
|
||||
|
||||
Paths used in vimball are preprocessed by s:Path(); in addition,
|
||||
certain characters are escaped (by prepending a backslash). The
|
||||
characters are in g:vimball_path_escape, and may be overridden by
|
||||
the user in his/her .vimrc initialization script.
|
||||
|
||||
*vimball-extract*
|
||||
vim filename.vba
|
||||
|
||||
@@ -88,8 +138,21 @@ Copyright: (c) 2004-2006 by Charles E. Campbell, Jr. *Vimball-copyright*
|
||||
|
||||
|
||||
==============================================================================
|
||||
3. Vimball History *vimball-history* {{{1
|
||||
4. Vimball History *vimball-history* {{{1
|
||||
|
||||
26 : May 27, 2008 * g:vimball_mkdir usage installed. Makes the
|
||||
$HOME/.vim (or $HOME\vimfiles) directory if
|
||||
necessary.
|
||||
May 30, 2008 * (tnx to Bill McCarthy) found and fixed a bug:
|
||||
vimball wasn't updating plugins to AsNeeded/
|
||||
when it should
|
||||
25 : Mar 24, 2008 * changed vimball#Vimball() to recognize doc/*.??x
|
||||
files as help files, too.
|
||||
Apr 18, 2008 * RmVimball command is now protected by saving and
|
||||
restoring settings -- in particular, acd was
|
||||
causing problems as reported by Zhang Shuhan
|
||||
24 : Nov 15, 2007 * |g:vimball_path_escape| used by s:Path() to
|
||||
prevent certain characters from causing trouble
|
||||
22 : Mar 21, 2007 * uses setlocal instead of set during BufEnter
|
||||
21 : Nov 27, 2006 * (tnx to Bill McCarthy) vimball had a header
|
||||
handling problem and it now changes \s to /s
|
||||
@@ -101,7 +164,7 @@ Copyright: (c) 2004-2006 by Charles E. Campbell, Jr. *Vimball-copyright*
|
||||
will extract plugin/somefile to the AsNeeded/
|
||||
directory
|
||||
17 : Jun 28, 2006 * changes all \s to /s internally for Windows
|
||||
16 : Jun 15, 2006 * A. Mechelynck's idea to allow users to specify
|
||||
16 : Jun 15, 2006 * A. Mechylynck's idea to allow users to specify
|
||||
installation root paths implemented for
|
||||
UseVimball, MkVimball, and RmVimball.
|
||||
* RmVimball implemented
|
||||
@@ -115,7 +178,7 @@ Copyright: (c) 2004-2006 by Charles E. Campbell, Jr. *Vimball-copyright*
|
||||
10 : Apr 27, 2006 * moved all setting saving/restoration to a pair of
|
||||
functions. Included some more settings in them
|
||||
which frequently cause trouble.
|
||||
9 : Apr 26, 2006 * various changes to support Windows predilection
|
||||
9 : Apr 26, 2006 * various changes to support Windows' predilection
|
||||
for backslashes and spaces in file and directory
|
||||
names.
|
||||
7 : Apr 25, 2006 * bypasses foldenable
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*pi_zip.txt* For Vim version 7.1. Last change: 2007 May 11
|
||||
*pi_zip.txt* For Vim version 7.2a. Last change: 2008 Jun 12
|
||||
|
||||
+====================+
|
||||
| Zip File Interface |
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
Author: Charles E. Campbell, Jr. <NdrOchip@ScampbellPfamily.AbizM>
|
||||
(remove NOSPAM from Campbell's email first)
|
||||
Copyright: Copyright (C) 2005,2006 Charles E Campbell, Jr *zip-copyright*
|
||||
Copyright: Copyright (C) 2005-2008 Charles E Campbell, Jr *zip-copyright*
|
||||
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,
|
||||
@@ -33,7 +33,13 @@ Copyright: Copyright (C) 2005,2006 Charles E Campbell, Jr *zip-copyright*
|
||||
zip archives via the plugin.
|
||||
|
||||
OPTIONS
|
||||
*zip_shq*
|
||||
|
||||
*g:zip_nomax*
|
||||
|
||||
If this variable exists and is true, the file window will not be
|
||||
automatically maximized when opened.
|
||||
|
||||
*g:zip_shq*
|
||||
Different operating systems may use one or more shells to execute
|
||||
commands. Zip will try to guess the correct quoting mechanism to
|
||||
allow spaces and whatnot in filenames; however, if it is incorrectly
|
||||
@@ -45,12 +51,12 @@ Copyright: Copyright (C) 2005,2006 Charles E Campbell, Jr *zip-copyright*
|
||||
|
||||
*g:zip_unzipcmd*
|
||||
Use this option to specify the program which does the duty of "unzip".
|
||||
Its used during browsing. By default: >
|
||||
It's used during browsing. By default: >
|
||||
let g:zip_unzipcmd= "unzip"
|
||||
<
|
||||
*g:zip_zipcmd*
|
||||
Use this option to specify the program which does the duty of "zip".
|
||||
Its used during the writing (updating) of a file already in a zip
|
||||
It's used during the writing (updating) of a file already in a zip
|
||||
file; by default: >
|
||||
let g:zip_zipcmd= "zip"
|
||||
<
|
||||
@@ -64,11 +70,13 @@ Copyright: Copyright (C) 2005,2006 Charles E Campbell, Jr *zip-copyright*
|
||||
|
||||
au BufReadCmd *.jar,*.xpi call zip#Browse(expand("<amatch>"))
|
||||
<
|
||||
One can simply extend this line to accommodate additional extensions that
|
||||
are actually zip files.
|
||||
One simply can extend this line to accomodate additional extensions that
|
||||
should be treated as zip files.
|
||||
|
||||
==============================================================================
|
||||
4. History *zip-history* {{{1
|
||||
v17 May 09, 2008 * arno caught a security bug
|
||||
v15 Sep 07, 2007 * &shq now used if not the empty string for g:zip_shq
|
||||
v14 May 07, 2007 * using b:zipfile instead of w:zipfile to avoid problem
|
||||
when editing alternate file to bring up a zipfile
|
||||
v10 May 02, 2006 * now using "redraw then echo" to show messages, instead
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*print.txt* For Vim version 7.1. Last change: 2007 Apr 22
|
||||
*print.txt* For Vim version 7.2a. Last change: 2008 Apr 30
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -26,6 +26,9 @@ systems a PostScript file is produced. This can be directly sent to a
|
||||
PostScript printer. For other printers a program like ghostscript needs to be
|
||||
used.
|
||||
|
||||
Note: If you have problems printing with |:hardcopy|, an alternative is to use
|
||||
|:TOhtml| and print the resulting html file from a browser.
|
||||
|
||||
*:ha* *:hardcopy* *E237* *E238* *E324*
|
||||
:[range]ha[rdcopy][!] [arguments]
|
||||
Send [range] lines (default whole file) to the
|
||||
@@ -193,7 +196,8 @@ the font. When omitted, the point size is 10.
|
||||
This defines the format of the header produced in |:hardcopy| output. The
|
||||
option is defined in the same way as the 'statusline' option. If Vim has not
|
||||
been compiled with the |+statusline| feature, this option has no effect and a
|
||||
simple default header is used, which shows the page number.
|
||||
simple default header is used, which shows the page number. The same simple
|
||||
header is used when this option is empty.
|
||||
|
||||
*pmbcs-option*
|
||||
'printmbcharset' 'pmbcs' string (default "")
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user