mirror of
https://github.com/zoriya/vim.git
synced 2025-12-24 08:05:19 +00:00
Compare commits
307 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a627c96182 | ||
|
|
98a22f4a63 | ||
|
|
9f733d1ffd | ||
|
|
447038a127 | ||
|
|
d960d76d5e | ||
|
|
a6f4d61af7 | ||
|
|
62951b1e0d | ||
|
|
a554a1933c | ||
|
|
38e2b0636b | ||
|
|
50f834dfb2 | ||
|
|
7f78bd73d6 | ||
|
|
52f8317926 | ||
|
|
314ed4b21a | ||
|
|
5302d9ebc1 | ||
|
|
ddab33232a | ||
|
|
821390843b | ||
|
|
15d6319b9d | ||
|
|
9e8edf6ee6 | ||
|
|
b5b5b895f7 | ||
|
|
ba4897e6e5 | ||
|
|
a971b82b16 | ||
|
|
52af96527c | ||
|
|
612af43cb6 | ||
|
|
9f1188152f | ||
|
|
868272f58e | ||
|
|
c42e7ed777 | ||
|
|
275648066d | ||
|
|
0d55ff1594 | ||
|
|
092e3c874f | ||
|
|
6dfff547a7 | ||
|
|
205b886a41 | ||
|
|
493c7a8541 | ||
|
|
01a78342e0 | ||
|
|
d3184b57d2 | ||
|
|
6c167c6451 | ||
|
|
6fabcbe260 | ||
|
|
39fc42ef9d | ||
|
|
03aa60826e | ||
|
|
9dc93ae43e | ||
|
|
2eba18255e | ||
|
|
c9927c136f | ||
|
|
792826c0c7 | ||
|
|
b8bf541f89 | ||
|
|
f6f4a01ab1 | ||
|
|
1db1f77d4a | ||
|
|
dc93555c0f | ||
|
|
c95e32635c | ||
|
|
12bc1b5c9f | ||
|
|
17fb0e891a | ||
|
|
8c85fa3b26 | ||
|
|
cf83973211 | ||
|
|
e78c206856 | ||
|
|
8a20b0f25e | ||
|
|
836082d398 | ||
|
|
213b10a57e | ||
|
|
d0988c50f3 | ||
|
|
1cb7e0976d | ||
|
|
ea35ef6888 | ||
|
|
e70172e1fc | ||
|
|
3f5f795f76 | ||
|
|
673214bb7d | ||
|
|
4c40223649 | ||
|
|
0b573a58e6 | ||
|
|
a171162356 | ||
|
|
d2221131cf | ||
|
|
d0c7ba57b1 | ||
|
|
0533443638 | ||
|
|
522f9aebff | ||
|
|
ce35c88ade | ||
|
|
e9edd7fbdd | ||
|
|
76f7fd3df3 | ||
|
|
b560983d2f | ||
|
|
9729301aa0 | ||
|
|
0acc5618f6 | ||
|
|
35ee452de0 | ||
|
|
01b2a23b95 | ||
|
|
44286ca3c4 | ||
|
|
3d64a3176c | ||
|
|
50f42cadb1 | ||
|
|
734d99804b | ||
|
|
37a02ca1c2 | ||
|
|
19fd09a78f | ||
|
|
54ee2b8741 | ||
|
|
4da95d377f | ||
|
|
f56a6de10b | ||
|
|
b5ce04dd28 | ||
|
|
80ae7b2287 | ||
|
|
4b9669f1dc | ||
|
|
03a807aaf4 | ||
|
|
5cfe2d760d | ||
|
|
0c7437a5d2 | ||
|
|
0baa7f1cd0 | ||
|
|
8b3e0330ba | ||
|
|
20892c1e68 | ||
|
|
d58ea07227 | ||
|
|
91805fc0db | ||
|
|
6e948a652d | ||
|
|
f9b4815918 | ||
|
|
67d441ba36 | ||
|
|
914968e66d | ||
|
|
54b08a5e78 | ||
|
|
251e191271 | ||
|
|
d6761c3cdf | ||
|
|
978287b8f8 | ||
|
|
5f8949656a | ||
|
|
c16756d829 | ||
|
|
26f3c637fc | ||
|
|
d44347f1e7 | ||
|
|
19e6094378 | ||
|
|
f85dae3c34 | ||
|
|
9a4d7fd214 | ||
|
|
015de43f70 | ||
|
|
12bde494a5 | ||
|
|
986a0039cb | ||
|
|
f7befa9f1d | ||
|
|
d9758e37ee | ||
|
|
6ec154b57d | ||
|
|
456f2bb24f | ||
|
|
03227eeb79 | ||
|
|
2f982e4fab | ||
|
|
536d95f617 | ||
|
|
d8644bd646 | ||
|
|
3ed16dc6b7 | ||
|
|
7154b326d0 | ||
|
|
6fa46363ad | ||
|
|
9b83c2f979 | ||
|
|
bd8608d979 | ||
|
|
ed38b0ac41 | ||
|
|
334adf0ae5 | ||
|
|
a660dc8f30 | ||
|
|
72952de239 | ||
|
|
9b486ca391 | ||
|
|
efa8e80c0b | ||
|
|
e659c95b01 | ||
|
|
496f9517cb | ||
|
|
1385c3ee7f | ||
|
|
9bd1a7ea28 | ||
|
|
0df1102698 | ||
|
|
2d5204ff88 | ||
|
|
b07269a548 | ||
|
|
20f90cf99a | ||
|
|
3a7d8c3adb | ||
|
|
e2bdce3f5c | ||
|
|
1bfb61e80b | ||
|
|
446beb48d9 | ||
|
|
1c2b2c12bb | ||
|
|
e60acc180b | ||
|
|
536681be5d | ||
|
|
bb99322ef9 | ||
|
|
18e0bfb07c | ||
|
|
5897e0c470 | ||
|
|
05da428462 | ||
|
|
9c520cb544 | ||
|
|
a4271d598b | ||
|
|
aede6ceba3 | ||
|
|
4ae06c1fa5 | ||
|
|
3c9c99cb2c | ||
|
|
948733a874 | ||
|
|
1701e4069b | ||
|
|
8f4ba6942d | ||
|
|
d236ac0d49 | ||
|
|
1c32dff7d6 | ||
|
|
85de20665f | ||
|
|
72bb0d6455 | ||
|
|
8e5af3e531 | ||
|
|
b453a53b59 | ||
|
|
877b97b953 | ||
|
|
d88e02def5 | ||
|
|
f844147747 | ||
|
|
cca92ec8cf | ||
|
|
8d2d71d4bb | ||
|
|
f1fda2d6e5 | ||
|
|
e962388eac | ||
|
|
d9462e394a | ||
|
|
ef9d6aa70d | ||
|
|
0d35e91abf | ||
|
|
4aa97427be | ||
|
|
367bec852e | ||
|
|
639304ddb1 | ||
|
|
32f649e1fc | ||
|
|
2dfb38659c | ||
|
|
10d77eb6ac | ||
|
|
e0659a680c | ||
|
|
adc2182c40 | ||
|
|
337ae06ff9 | ||
|
|
27b6056d85 | ||
|
|
96bcc5e6cd | ||
|
|
42431a7aa0 | ||
|
|
316dca03ca | ||
|
|
4228bec0ae | ||
|
|
30fec7bc7f | ||
|
|
21377c8d5f | ||
|
|
b3c5284c5b | ||
|
|
b05b10a3c0 | ||
|
|
cab49dff91 | ||
|
|
a29a37d533 | ||
|
|
0b2f94db23 | ||
|
|
662db673f9 | ||
|
|
e9d4b58dda | ||
|
|
fd30cd41dc | ||
|
|
f63c49d4e9 | ||
|
|
6eb634ef1f | ||
|
|
ec737235c7 | ||
|
|
b4b0a08c81 | ||
|
|
ba7cc9f83f | ||
|
|
4cf35c2fa4 | ||
|
|
0c1f3f4d49 | ||
|
|
c725c0ad9b | ||
|
|
ede547afcf | ||
|
|
128773b21d | ||
|
|
e698addf88 | ||
|
|
49789dc987 | ||
|
|
2f70a34e2e | ||
|
|
0065402f9a | ||
|
|
c30846f525 | ||
|
|
cab35ad26d | ||
|
|
c2b4c62d0b | ||
|
|
542512a3e5 | ||
|
|
b75d09d42b | ||
|
|
c41fc713ba | ||
|
|
e627fb00fc | ||
|
|
b292a2a04c | ||
|
|
4e509b6369 | ||
|
|
5ec3aea854 | ||
|
|
d58e929fa2 | ||
|
|
95474ca34c | ||
|
|
ba81e4660b | ||
|
|
b18919146d | ||
|
|
1d87f516f2 | ||
|
|
6145285c90 | ||
|
|
acf1728ef5 | ||
|
|
c98d5ee923 | ||
|
|
3c2d6534ef | ||
|
|
5e3d6ca435 | ||
|
|
f3d419d719 | ||
|
|
445edda2f9 | ||
|
|
4124e72373 | ||
|
|
164c60f5b1 | ||
|
|
d2c340a6a6 | ||
|
|
e279335752 | ||
|
|
48ac02c9eb | ||
|
|
2a8a3ecb67 | ||
|
|
13d831ff0c | ||
|
|
fd0e75683f | ||
|
|
6d0efdaab5 | ||
|
|
870b05c4c0 | ||
|
|
d91f704b03 | ||
|
|
7eb4652e74 | ||
|
|
b0d3f878a4 | ||
|
|
9980835c68 | ||
|
|
946ffd4606 | ||
|
|
657ae0bddd | ||
|
|
de1b092c77 | ||
|
|
7a8ef14c69 | ||
|
|
b57aa92d2c | ||
|
|
f82a2d2e5f | ||
|
|
9c26303293 | ||
|
|
0215e8e15b | ||
|
|
540fc6fbdb | ||
|
|
45d9d02d71 | ||
|
|
81af9250a7 | ||
|
|
7c5676b5d6 | ||
|
|
56f7804065 | ||
|
|
3d27070767 | ||
|
|
9c52c3a0a1 | ||
|
|
2e2e13ca14 | ||
|
|
e980d8a934 | ||
|
|
005c3c27ee | ||
|
|
bf9680e441 | ||
|
|
863053d1d4 | ||
|
|
94950a9ee0 | ||
|
|
4161dccada | ||
|
|
d4ddfafc2a | ||
|
|
df6b11e955 | ||
|
|
f666f0e5c0 | ||
|
|
ef2f028a66 | ||
|
|
0785ccf995 | ||
|
|
4dbbff57ba | ||
|
|
0818b87cbf | ||
|
|
96e5ceed93 | ||
|
|
166af9bb6f | ||
|
|
644d37b84d | ||
|
|
00b78c17b2 | ||
|
|
7ad7d01074 | ||
|
|
03531f79c3 | ||
|
|
3c53160348 | ||
|
|
66b4bf8980 | ||
|
|
bf55e1442d | ||
|
|
67b3f99eb0 | ||
|
|
a3e7b1f42b | ||
|
|
2a8caa414e | ||
|
|
37dd018cdd | ||
|
|
27d9eceb66 | ||
|
|
22e193ddd5 | ||
|
|
2d0860d06c | ||
|
|
dba01a0197 | ||
|
|
16a6165bb3 | ||
|
|
0536570fa2 | ||
|
|
2d73ff4500 | ||
|
|
b3ae56cf2b | ||
|
|
ee236d0d19 | ||
|
|
3ca71f1f1f | ||
|
|
beca055b0c | ||
|
|
22df3f90fc | ||
|
|
c395a3aac2 | ||
|
|
fc3c83e47e | ||
|
|
264e9fd61b |
13
.gitignore
vendored
13
.gitignore
vendored
@@ -5,14 +5,15 @@ src/xxd/xxd
|
||||
src/auto/if_perl.c
|
||||
src/tags
|
||||
|
||||
# We do need src/auto/configure and src/auto/config.mk.
|
||||
src/auto/osdef.h
|
||||
# We do need src/auto/configure.
|
||||
src/auto/config.aap
|
||||
src/auto/config.cache
|
||||
src/auto/config.h
|
||||
src/auto/config.log
|
||||
src/auto/config.mk
|
||||
src/auto/config.status
|
||||
src/auto/configure.aap
|
||||
src/auto/osdef.h
|
||||
src/auto/link.log
|
||||
src/auto/link.sed
|
||||
src/auto/pathdef.c
|
||||
@@ -40,3 +41,11 @@ gvimext.lib
|
||||
*.mo
|
||||
*.swp
|
||||
*~
|
||||
|
||||
# Generated by "make test"
|
||||
src/po/*.ck
|
||||
src/testdir/mbyte.vim
|
||||
src/testdir/mzscheme.vim
|
||||
src/testdir/small.vim
|
||||
src/testdir/tiny.vim
|
||||
src/testdir/test*.out
|
||||
|
||||
11
Filelist
11
Filelist
@@ -39,6 +39,7 @@ SRC_ALL = \
|
||||
src/mark.c \
|
||||
src/mbyte.c \
|
||||
src/memfile.c \
|
||||
src/memfile_test.c \
|
||||
src/memline.c \
|
||||
src/menu.c \
|
||||
src/message.c \
|
||||
@@ -261,6 +262,7 @@ SRC_DOS = \
|
||||
src/bigvim.bat \
|
||||
src/msvcsetup.bat \
|
||||
src/msvc2008.bat \
|
||||
src/msvc2010.bat \
|
||||
src/dimm.idl \
|
||||
src/dlldata.c \
|
||||
src/dosinst.c \
|
||||
@@ -426,9 +428,6 @@ SRC_EXTRA = \
|
||||
$(SRC_VMS) \
|
||||
README_os390.txt \
|
||||
src/Make_mint.mak \
|
||||
src/Make_ro.mak \
|
||||
src/gui_riscos.c \
|
||||
src/gui_riscos.h \
|
||||
src/if_sniff.c \
|
||||
src/infplist.xml \
|
||||
src/link.390 \
|
||||
@@ -436,10 +435,6 @@ SRC_EXTRA = \
|
||||
src/os_beos.h \
|
||||
src/os_beos.rsrc \
|
||||
src/os_mint.h \
|
||||
src/os_riscos.c \
|
||||
src/os_riscos.h \
|
||||
src/proto/gui_riscos.pro \
|
||||
src/proto/os_riscos.pro \
|
||||
src/os_vms_fix.com \
|
||||
src/toolbar.phi \
|
||||
|
||||
@@ -686,6 +681,8 @@ LANG_GEN = \
|
||||
runtime/tutor/tutor.utf-8 \
|
||||
runtime/tutor/tutor.?? \
|
||||
runtime/tutor/tutor.??.* \
|
||||
runtime/tutor/tutor.bar \
|
||||
runtime/tutor/tutor.bar.* \
|
||||
runtime/spell/README.txt \
|
||||
runtime/spell/??/*.diff \
|
||||
runtime/spell/??/main.aap \
|
||||
|
||||
6
Makefile
6
Makefile
@@ -23,6 +23,9 @@
|
||||
# has run can result in compiling with $(CC) empty.
|
||||
|
||||
first:
|
||||
@if test ! -f src/auto/config.mk; then \
|
||||
cp src/config.mk.dist src/auto/config.mk; \
|
||||
fi
|
||||
@echo "Starting make in the src directory."
|
||||
@echo "If there are problems, cd to the src directory and run make there"
|
||||
cd src && $(MAKE) $@
|
||||
@@ -30,6 +33,9 @@ first:
|
||||
# Some make programs use the last target for the $@ default; put the other
|
||||
# targets separately to always let $@ expand to "first" by default.
|
||||
all install uninstall tools config configure reconfig proto depend lint tags types test testclean clean distclean:
|
||||
@if test ! -f src/auto/config.mk; then \
|
||||
cp src/config.mk.dist src/auto/config.mk; \
|
||||
fi
|
||||
@echo "Starting make in the src directory."
|
||||
@echo "If there are problems, cd to the src directory and run make there"
|
||||
cd src && $(MAKE) $@
|
||||
|
||||
@@ -13,9 +13,6 @@ src/if_sniff.* Interface to SNiFF. If you don't know what SNiFF is,
|
||||
|
||||
src/os_amiga.* Files for the Amiga port.
|
||||
|
||||
src/gui_riscos.*
|
||||
src/os_riscos.* Files for the RISC OS port.
|
||||
|
||||
src/gui_beos.*
|
||||
src/os_beos.* Files for the BeOS port.
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
" ---------------------------------------------------------------------
|
||||
" getscript.vim
|
||||
" Author: Charles E. Campbell, Jr.
|
||||
" Date: Dec 28, 2009
|
||||
" Version: 32
|
||||
" Date: May 31, 2011
|
||||
" Version: 33
|
||||
" Installing: :help glvs-install
|
||||
" Usage: :help glvs
|
||||
"
|
||||
@@ -15,7 +15,7 @@
|
||||
if exists("g:loaded_getscript")
|
||||
finish
|
||||
endif
|
||||
let g:loaded_getscript= "v32"
|
||||
let g:loaded_getscript= "v33"
|
||||
if &cp
|
||||
echoerr "GetLatestVimScripts is not vi-compatible; not loaded (you need to set nocp)"
|
||||
finish
|
||||
@@ -519,6 +519,7 @@ fun! s:GetOneScript(...)
|
||||
" --------------------------------------------------------------------------
|
||||
" AutoInstall: only if doautoinstall has been requested by the plugin itself
|
||||
" --------------------------------------------------------------------------
|
||||
" call Decho("checking if plugin requested autoinstall: doautoinstall=".doautoinstall)
|
||||
if doautoinstall
|
||||
" call Decho(" ")
|
||||
" call Decho("Autoinstall: getcwd<".getcwd()."> filereadable(".sname.")=".filereadable(sname))
|
||||
@@ -526,7 +527,7 @@ fun! s:GetOneScript(...)
|
||||
" call Decho("<".sname."> is readable")
|
||||
" call Decho("exe silent !".g:GetLatestVimScripts_mv." ".shellescape(sname)." ".shellescape(s:autoinstall))
|
||||
exe "silent !".g:GetLatestVimScripts_mv." ".shellescape(sname)." ".shellescape(s:autoinstall)
|
||||
let curdir = escape(substitute(getcwd(),'\','/','ge'),"|[]*'\" #")
|
||||
let curdir = fnameescape(substitute(getcwd(),'\','/','ge'))
|
||||
let installdir= curdir."/Installed"
|
||||
if !isdirectory(installdir)
|
||||
call mkdir(installdir)
|
||||
@@ -557,6 +558,11 @@ fun! s:GetOneScript(...)
|
||||
exe "silent !gunzip ".shellescape(sname)
|
||||
let sname= substitute(sname,'\.gz$','','')
|
||||
" call Decho("decompress: new sname<".sname."> after gunzip")
|
||||
elseif sname =~ '\.xz$'
|
||||
" call Decho("decompress: attempt to unxz ".sname)
|
||||
exe "silent !unxz ".shellescape(sname)
|
||||
let sname= substitute(sname,'\.xz$','','')
|
||||
" call Decho("decompress: new sname<".sname."> after unxz")
|
||||
else
|
||||
" call Decho("no decompression needed")
|
||||
endif
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" Vim completion script
|
||||
" Language: HTML and XHTML
|
||||
" Maintainer: Mikolaj Machowski ( mikmach AT wp DOT pl )
|
||||
" Last Change: 2006 Oct 19
|
||||
" Last Change: 2011 Apr 28
|
||||
|
||||
function! htmlcomplete#CompleteTags(findstart, base)
|
||||
if a:findstart
|
||||
@@ -285,6 +285,7 @@ function! htmlcomplete#CompleteTags(findstart, base)
|
||||
let cssfiles = styletable + secimportfiles
|
||||
let classes = []
|
||||
for file in cssfiles
|
||||
let classlines = []
|
||||
if filereadable(file)
|
||||
let stylesheet = readfile(file)
|
||||
let stylefile = join(stylesheet, ' ')
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,13 +1,13 @@
|
||||
" tar.vim: Handles browsing tarfiles
|
||||
" AUTOLOAD PORTION
|
||||
" Date: Aug 09, 2010
|
||||
" Version: 26
|
||||
" Date: May 31, 2011
|
||||
" Version: 27
|
||||
" 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-2009 Charles E. Campbell, Jr. {{{1
|
||||
" Copyright: Copyright (C) 2005-2011 Charles E. Campbell, Jr. {{{1
|
||||
" Permission is hereby granted to use and distribute this code,
|
||||
" with or without modifications, provided that this copyright
|
||||
" notice is copied with it. Like anything else that's free,
|
||||
@@ -22,7 +22,7 @@
|
||||
if &cp || exists("g:loaded_tar")
|
||||
finish
|
||||
endif
|
||||
let g:loaded_tar= "v26"
|
||||
let g:loaded_tar= "v27"
|
||||
if v:version < 702
|
||||
echohl WarningMsg
|
||||
echo "***warning*** this version of tar needs vim 7.2"
|
||||
@@ -47,6 +47,17 @@ endif
|
||||
if !exists("g:tar_writeoptions")
|
||||
let g:tar_writeoptions= "uf"
|
||||
endif
|
||||
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
|
||||
if !exists("g:tar_copycmd")
|
||||
if !exists("g:netrw_localcopycmd")
|
||||
if has("win32") || has("win95") || has("win64") || has("win16")
|
||||
@@ -63,17 +74,6 @@ if !exists("g:tar_copycmd")
|
||||
endif
|
||||
let g:tar_copycmd= g:netrw_localcopycmd
|
||||
endif
|
||||
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
|
||||
if !exists("g:tar_extractcmd")
|
||||
let g:tar_extractcmd= "tar -xf"
|
||||
endif
|
||||
@@ -142,9 +142,9 @@ fun! tar#Browse(tarfile)
|
||||
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
|
||||
$
|
||||
keepj $put =''
|
||||
keepj 0d
|
||||
keepj $
|
||||
|
||||
let tarfile= a:tarfile
|
||||
if has("win32") && executable("cygpath")
|
||||
@@ -154,26 +154,26 @@ fun! tar#Browse(tarfile)
|
||||
let curlast= line("$")
|
||||
if tarfile =~# '\.\(gz\|tgz\)$'
|
||||
" call Decho("1: exe silent r! gzip -d -c -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_browseoptions." - ")
|
||||
exe "silent r! gzip -d -c -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_browseoptions." - "
|
||||
exe "sil! r! gzip -d -c -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_browseoptions." - "
|
||||
elseif tarfile =~# '\.lrp'
|
||||
" call Decho("2: exe silent r! cat -- ".shellescape(tarfile,1)."|gzip -d -c -|".g:tar_cmd." -".g:tar_browseoptions." - ")
|
||||
exe "silent r! cat -- ".shellescape(tarfile,1)."|gzip -d -c -|".g:tar_cmd." -".g:tar_browseoptions." - "
|
||||
exe "sil! r! cat -- ".shellescape(tarfile,1)."|gzip -d -c -|".g:tar_cmd." -".g:tar_browseoptions." - "
|
||||
elseif tarfile =~# '\.bz2$'
|
||||
" call Decho("3: exe silent r! bzip2 -d -c -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_browseoptions." - ")
|
||||
exe "silent r! bzip2 -d -c -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_browseoptions." - "
|
||||
exe "sil! r! bzip2 -d -c -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_browseoptions." - "
|
||||
elseif tarfile =~# '\.lzma$'
|
||||
" call Decho("3: exe silent r! lzma -d -c -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_browseoptions." - ")
|
||||
exe "silent r! lzma -d -c -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_browseoptions." - "
|
||||
exe "sil! r! lzma -d -c -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_browseoptions." - "
|
||||
elseif tarfile =~# '\.\(xz\|txz\)$'
|
||||
" call Decho("3: exe silent r! xz --decompress --stdout -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_browseoptions." - ")
|
||||
exe "silent r! xz --decompress --stdout -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_browseoptions." - "
|
||||
exe "sil! r! xz --decompress --stdout -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_browseoptions." - "
|
||||
else
|
||||
if tarfile =~ '^\s*-'
|
||||
" A file name starting with a dash is taken as an option. Prepend ./ to avoid that.
|
||||
let tarfile = substitute(tarfile, '-', './-', '')
|
||||
endif
|
||||
" call Decho("4: exe silent r! ".g:tar_cmd." -".g:tar_browseoptions." ".shellescape(tarfile,0))
|
||||
exe "silent r! ".g:tar_cmd." -".g:tar_browseoptions." ".shellescape(tarfile,1)
|
||||
exe "sil! r! ".g:tar_cmd." -".g:tar_browseoptions." ".shellescape(tarfile,1)
|
||||
endif
|
||||
if v:shell_error != 0
|
||||
redraw!
|
||||
@@ -184,12 +184,12 @@ fun! tar#Browse(tarfile)
|
||||
if line("$") == curlast || ( line("$") == (curlast + 1) && getline("$") =~ '\c\%(warning\|error\|inappropriate\|unrecognized\)')
|
||||
redraw!
|
||||
echohl WarningMsg | echo "***warning*** (tar#Browse) ".a:tarfile." doesn't appear to be a tar file" | echohl None
|
||||
silent %d
|
||||
keepj sil! %d
|
||||
let eikeep= &ei
|
||||
set ei=BufReadCmd,FileReadCmd
|
||||
exe "r ".fnameescape(a:tarfile)
|
||||
let &ei= eikeep
|
||||
1d
|
||||
keepj sil! 1d
|
||||
" call Dret("tar#Browse : a:tarfile<".a:tarfile.">")
|
||||
return
|
||||
endif
|
||||
@@ -286,19 +286,19 @@ fun! tar#Read(fname,mode)
|
||||
endif
|
||||
if tarfile =~# '\.bz2$'
|
||||
" call Decho("7: exe silent r! bzip2 -d -c ".shellescape(tarfile,1)."| ".g:tar_cmd." -".g:tar_readoptions." - ".tar_secure.shellescape(fname,1).decmp)
|
||||
exe "silent r! bzip2 -d -c -- ".shellescape(tarfile,1)."| ".g:tar_cmd." -".g:tar_readoptions." - ".tar_secure.shellescape(fname,1).decmp
|
||||
exe "sil! r! bzip2 -d -c -- ".shellescape(tarfile,1)."| ".g:tar_cmd." -".g:tar_readoptions." - ".tar_secure.shellescape(fname,1).decmp
|
||||
elseif tarfile =~# '\.\(gz\|tgz\)$'
|
||||
" call Decho("5: exe silent r! gzip -d -c -- ".shellescape(tarfile,1)."| ".g:tar_cmd.' -'.g:tar_readoptions.' - '.tar_secure.shellescape(fname,1))
|
||||
exe "silent r! gzip -d -c -- ".shellescape(tarfile,1)."| ".g:tar_cmd." -".g:tar_readoptions." - ".tar_secure.shellescape(fname,1).decmp
|
||||
exe "sil! r! gzip -d -c -- ".shellescape(tarfile,1)."| ".g:tar_cmd." -".g:tar_readoptions." - ".tar_secure.shellescape(fname,1).decmp
|
||||
elseif tarfile =~# '\.lrp$'
|
||||
" call Decho("6: exe silent r! cat ".shellescape(tarfile,1)." | gzip -d -c - | ".g:tar_cmd." -".g:tar_readoptions." - ".tar_secure.shellescape(fname,1).decmp)
|
||||
exe "silent r! cat -- ".shellescape(tarfile,1)." | gzip -d -c - | ".g:tar_cmd." -".g:tar_readoptions." - ".tar_secure.shellescape(fname,1).decmp
|
||||
exe "sil! r! cat -- ".shellescape(tarfile,1)." | gzip -d -c - | ".g:tar_cmd." -".g:tar_readoptions." - ".tar_secure.shellescape(fname,1).decmp
|
||||
elseif tarfile =~# '\.lzma$'
|
||||
" call Decho("7: exe silent r! lzma -d -c ".shellescape(tarfile,1)."| ".g:tar_cmd." -".g:tar_readoptions." - ".tar_secure.shellescape(fname,1).decmp)
|
||||
exe "silent r! lzma -d -c -- ".shellescape(tarfile,1)."| ".g:tar_cmd." -".g:tar_readoptions." - ".tar_secure.shellescape(fname,1).decmp
|
||||
exe "sil! r! lzma -d -c -- ".shellescape(tarfile,1)."| ".g:tar_cmd." -".g:tar_readoptions." - ".tar_secure.shellescape(fname,1).decmp
|
||||
elseif tarfile =~# '\.\(xz\|txz\)$'
|
||||
" call Decho("3: exe silent r! xz --decompress --stdout -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_readoptions." - ".tar_secure.shellescape(fname,1).decmp)
|
||||
exe "silent r! xz --decompress --stdout -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_readoptions." - ".tar_secure.shellescape(fname,1).decmp
|
||||
exe "sil! r! xz --decompress --stdout -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_readoptions." - ".tar_secure.shellescape(fname,1).decmp
|
||||
else
|
||||
if tarfile =~ '^\s*-'
|
||||
" A file name starting with a dash is taken as an option. Prepend ./ to avoid that.
|
||||
@@ -317,7 +317,7 @@ fun! tar#Read(fname,mode)
|
||||
exe "file tarfile::".fnameescape(fname)
|
||||
|
||||
" cleanup
|
||||
0d
|
||||
keepj sil! 0d
|
||||
set nomod
|
||||
|
||||
let &report= repkeep
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
" Vim autoload file for the tohtml plugin.
|
||||
" Maintainer: Ben Fritz <fritzophrenic@gmail.com>
|
||||
" Last Change: 2010 Aug 12
|
||||
" Last Change: 2011 Apr 05
|
||||
"
|
||||
" Additional contributors:
|
||||
"
|
||||
@@ -13,10 +13,284 @@
|
||||
let s:cpo_sav = &cpo
|
||||
set cpo-=C
|
||||
|
||||
func! tohtml#Convert2HTML(line1, line2)
|
||||
" Automatically find charsets from all encodings supported natively by Vim. With
|
||||
" the 8bit- and 2byte- prefixes, Vim can actually support more encodings than
|
||||
" this. Let the user specify these however since they won't be supported on
|
||||
" every system.
|
||||
"
|
||||
" Note, not all of Vim's supported encodings have a charset to use.
|
||||
"
|
||||
" Names in this list are from:
|
||||
" http://www.iana.org/assignments/character-sets
|
||||
" g:tohtml#encoding_to_charset: {{{
|
||||
let g:tohtml#encoding_to_charset = {
|
||||
\ 'latin1' : 'ISO-8859-1',
|
||||
\ 'iso-8859-2' : 'ISO-8859-2',
|
||||
\ 'iso-8859-3' : 'ISO-8859-3',
|
||||
\ 'iso-8859-4' : 'ISO-8859-4',
|
||||
\ 'iso-8859-5' : 'ISO-8859-5',
|
||||
\ 'iso-8859-6' : 'ISO-8859-6',
|
||||
\ 'iso-8859-7' : 'ISO-8859-7',
|
||||
\ 'iso-8859-8' : 'ISO-8859-8',
|
||||
\ 'iso-8859-9' : 'ISO-8859-9',
|
||||
\ 'iso-8859-10' : '',
|
||||
\ 'iso-8859-13' : 'ISO-8859-13',
|
||||
\ 'iso-8859-14' : '',
|
||||
\ 'iso-8859-15' : 'ISO-8859-15',
|
||||
\ 'koi8-r' : 'KOI8-R',
|
||||
\ 'koi8-u' : 'KOI8-U',
|
||||
\ 'macroman' : 'macintosh',
|
||||
\ 'cp437' : '',
|
||||
\ 'cp775' : '',
|
||||
\ 'cp850' : '',
|
||||
\ 'cp852' : '',
|
||||
\ 'cp855' : '',
|
||||
\ 'cp857' : '',
|
||||
\ 'cp860' : '',
|
||||
\ 'cp861' : '',
|
||||
\ 'cp862' : '',
|
||||
\ 'cp863' : '',
|
||||
\ 'cp865' : '',
|
||||
\ 'cp866' : 'IBM866',
|
||||
\ 'cp869' : '',
|
||||
\ 'cp874' : '',
|
||||
\ 'cp1250' : 'windows-1250',
|
||||
\ 'cp1251' : 'windows-1251',
|
||||
\ 'cp1253' : 'windows-1253',
|
||||
\ 'cp1254' : 'windows-1254',
|
||||
\ 'cp1255' : 'windows-1255',
|
||||
\ 'cp1256' : 'windows-1256',
|
||||
\ 'cp1257' : 'windows-1257',
|
||||
\ 'cp1258' : 'windows-1258',
|
||||
\ 'euc-jp' : 'EUC-JP',
|
||||
\ 'sjis' : 'Shift_JIS',
|
||||
\ 'cp932' : 'Shift_JIS',
|
||||
\ 'cp949' : '',
|
||||
\ 'euc-kr' : 'EUC-KR',
|
||||
\ 'cp936' : 'GBK',
|
||||
\ 'euc-cn' : 'GB2312',
|
||||
\ 'big5' : 'Big5',
|
||||
\ 'cp950' : 'Big5',
|
||||
\ 'utf-8' : 'UTF-8',
|
||||
\ 'ucs-2' : 'UTF-8',
|
||||
\ 'ucs-2le' : 'UTF-8',
|
||||
\ 'utf-16' : 'UTF-8',
|
||||
\ 'utf-16le' : 'UTF-8',
|
||||
\ 'ucs-4' : 'UTF-8',
|
||||
\ 'ucs-4le' : 'UTF-8',
|
||||
\ }
|
||||
lockvar g:tohtml#encoding_to_charset
|
||||
" Notes:
|
||||
" 1. All UCS/UTF are converted to UTF-8 because it is much better supported
|
||||
" 2. Any blank spaces are there because Vim supports it but at least one major
|
||||
" web browser does not according to http://wiki.whatwg.org/wiki/Web_Encodings.
|
||||
" }}}
|
||||
|
||||
" Only automatically find encodings supported natively by Vim, let the user
|
||||
" specify the encoding if it's not natively supported. This function is only
|
||||
" used when the user specifies the charset, they better know what they are
|
||||
" doing!
|
||||
"
|
||||
" Names in this list are from:
|
||||
" http://www.iana.org/assignments/character-sets
|
||||
" g:tohtml#charset_to_encoding: {{{
|
||||
let g:tohtml#charset_to_encoding = {
|
||||
\ 'iso_8859-1:1987' : 'latin1',
|
||||
\ 'iso-ir-100' : 'latin1',
|
||||
\ 'iso_8859-1' : 'latin1',
|
||||
\ 'iso-8859-1' : 'latin1',
|
||||
\ 'latin1' : 'latin1',
|
||||
\ 'l1' : 'latin1',
|
||||
\ 'ibm819' : 'latin1',
|
||||
\ 'cp819' : 'latin1',
|
||||
\ 'csisolatin1' : 'latin1',
|
||||
\ 'iso_8859-2:1987' : 'iso-8859-2',
|
||||
\ 'iso-ir-101' : 'iso-8859-2',
|
||||
\ 'iso_8859-2' : 'iso-8859-2',
|
||||
\ 'iso-8859-2' : 'iso-8859-2',
|
||||
\ 'latin2' : 'iso-8859-2',
|
||||
\ 'l2' : 'iso-8859-2',
|
||||
\ 'csisolatin2' : 'iso-8859-2',
|
||||
\ 'iso_8859-3:1988' : 'iso-8859-3',
|
||||
\ 'iso-ir-109' : 'iso-8859-3',
|
||||
\ 'iso_8859-3' : 'iso-8859-3',
|
||||
\ 'iso-8859-3' : 'iso-8859-3',
|
||||
\ 'latin3' : 'iso-8859-3',
|
||||
\ 'l3' : 'iso-8859-3',
|
||||
\ 'csisolatin3' : 'iso-8859-3',
|
||||
\ 'iso_8859-4:1988' : 'iso-8859-4',
|
||||
\ 'iso-ir-110' : 'iso-8859-4',
|
||||
\ 'iso_8859-4' : 'iso-8859-4',
|
||||
\ 'iso-8859-4' : 'iso-8859-4',
|
||||
\ 'latin4' : 'iso-8859-4',
|
||||
\ 'l4' : 'iso-8859-4',
|
||||
\ 'csisolatin4' : 'iso-8859-4',
|
||||
\ 'iso_8859-5:1988' : 'iso-8859-5',
|
||||
\ 'iso-ir-144' : 'iso-8859-5',
|
||||
\ 'iso_8859-5' : 'iso-8859-5',
|
||||
\ 'iso-8859-5' : 'iso-8859-5',
|
||||
\ 'cyrillic' : 'iso-8859-5',
|
||||
\ 'csisolatincyrillic' : 'iso-8859-5',
|
||||
\ 'iso_8859-6:1987' : 'iso-8859-6',
|
||||
\ 'iso-ir-127' : 'iso-8859-6',
|
||||
\ 'iso_8859-6' : 'iso-8859-6',
|
||||
\ 'iso-8859-6' : 'iso-8859-6',
|
||||
\ 'ecma-114' : 'iso-8859-6',
|
||||
\ 'asmo-708' : 'iso-8859-6',
|
||||
\ 'arabic' : 'iso-8859-6',
|
||||
\ 'csisolatinarabic' : 'iso-8859-6',
|
||||
\ 'iso_8859-7:1987' : 'iso-8859-7',
|
||||
\ 'iso-ir-126' : 'iso-8859-7',
|
||||
\ 'iso_8859-7' : 'iso-8859-7',
|
||||
\ 'iso-8859-7' : 'iso-8859-7',
|
||||
\ 'elot_928' : 'iso-8859-7',
|
||||
\ 'ecma-118' : 'iso-8859-7',
|
||||
\ 'greek' : 'iso-8859-7',
|
||||
\ 'greek8' : 'iso-8859-7',
|
||||
\ 'csisolatingreek' : 'iso-8859-7',
|
||||
\ 'iso_8859-8:1988' : 'iso-8859-8',
|
||||
\ 'iso-ir-138' : 'iso-8859-8',
|
||||
\ 'iso_8859-8' : 'iso-8859-8',
|
||||
\ 'iso-8859-8' : 'iso-8859-8',
|
||||
\ 'hebrew' : 'iso-8859-8',
|
||||
\ 'csisolatinhebrew' : 'iso-8859-8',
|
||||
\ 'iso_8859-9:1989' : 'iso-8859-9',
|
||||
\ 'iso-ir-148' : 'iso-8859-9',
|
||||
\ 'iso_8859-9' : 'iso-8859-9',
|
||||
\ 'iso-8859-9' : 'iso-8859-9',
|
||||
\ 'latin5' : 'iso-8859-9',
|
||||
\ 'l5' : 'iso-8859-9',
|
||||
\ 'csisolatin5' : 'iso-8859-9',
|
||||
\ 'iso-8859-10' : 'iso-8859-10',
|
||||
\ 'iso-ir-157' : 'iso-8859-10',
|
||||
\ 'l6' : 'iso-8859-10',
|
||||
\ 'iso_8859-10:1992' : 'iso-8859-10',
|
||||
\ 'csisolatin6' : 'iso-8859-10',
|
||||
\ 'latin6' : 'iso-8859-10',
|
||||
\ 'iso-8859-13' : 'iso-8859-13',
|
||||
\ 'iso-8859-14' : 'iso-8859-14',
|
||||
\ 'iso-ir-199' : 'iso-8859-14',
|
||||
\ 'iso_8859-14:1998' : 'iso-8859-14',
|
||||
\ 'iso_8859-14' : 'iso-8859-14',
|
||||
\ 'latin8' : 'iso-8859-14',
|
||||
\ 'iso-celtic' : 'iso-8859-14',
|
||||
\ 'l8' : 'iso-8859-14',
|
||||
\ 'iso-8859-15' : 'iso-8859-15',
|
||||
\ 'iso_8859-15' : 'iso-8859-15',
|
||||
\ 'latin-9' : 'iso-8859-15',
|
||||
\ 'koi8-r' : 'koi8-r',
|
||||
\ 'cskoi8r' : 'koi8-r',
|
||||
\ 'koi8-u' : 'koi8-u',
|
||||
\ 'macintosh' : 'macroman',
|
||||
\ 'mac' : 'macroman',
|
||||
\ 'csmacintosh' : 'macroman',
|
||||
\ 'ibm437' : 'cp437',
|
||||
\ 'cp437' : 'cp437',
|
||||
\ '437' : 'cp437',
|
||||
\ 'cspc8codepage437' : 'cp437',
|
||||
\ 'ibm775' : 'cp775',
|
||||
\ 'cp775' : 'cp775',
|
||||
\ 'cspc775baltic' : 'cp775',
|
||||
\ 'ibm850' : 'cp850',
|
||||
\ 'cp850' : 'cp850',
|
||||
\ '850' : 'cp850',
|
||||
\ 'cspc850multilingual' : 'cp850',
|
||||
\ 'ibm852' : 'cp852',
|
||||
\ 'cp852' : 'cp852',
|
||||
\ '852' : 'cp852',
|
||||
\ 'cspcp852' : 'cp852',
|
||||
\ 'ibm855' : 'cp855',
|
||||
\ 'cp855' : 'cp855',
|
||||
\ '855' : 'cp855',
|
||||
\ 'csibm855' : 'cp855',
|
||||
\ 'ibm857' : 'cp857',
|
||||
\ 'cp857' : 'cp857',
|
||||
\ '857' : 'cp857',
|
||||
\ 'csibm857' : 'cp857',
|
||||
\ 'ibm860' : 'cp860',
|
||||
\ 'cp860' : 'cp860',
|
||||
\ '860' : 'cp860',
|
||||
\ 'csibm860' : 'cp860',
|
||||
\ 'ibm861' : 'cp861',
|
||||
\ 'cp861' : 'cp861',
|
||||
\ '861' : 'cp861',
|
||||
\ 'cp-is' : 'cp861',
|
||||
\ 'csibm861' : 'cp861',
|
||||
\ 'ibm862' : 'cp862',
|
||||
\ 'cp862' : 'cp862',
|
||||
\ '862' : 'cp862',
|
||||
\ 'cspc862latinhebrew' : 'cp862',
|
||||
\ 'ibm863' : 'cp863',
|
||||
\ 'cp863' : 'cp863',
|
||||
\ '863' : 'cp863',
|
||||
\ 'csibm863' : 'cp863',
|
||||
\ 'ibm865' : 'cp865',
|
||||
\ 'cp865' : 'cp865',
|
||||
\ '865' : 'cp865',
|
||||
\ 'csibm865' : 'cp865',
|
||||
\ 'ibm866' : 'cp866',
|
||||
\ 'cp866' : 'cp866',
|
||||
\ '866' : 'cp866',
|
||||
\ 'csibm866' : 'cp866',
|
||||
\ 'ibm869' : 'cp869',
|
||||
\ 'cp869' : 'cp869',
|
||||
\ '869' : 'cp869',
|
||||
\ 'cp-gr' : 'cp869',
|
||||
\ 'csibm869' : 'cp869',
|
||||
\ 'windows-1250' : 'cp1250',
|
||||
\ 'windows-1251' : 'cp1251',
|
||||
\ 'windows-1253' : 'cp1253',
|
||||
\ 'windows-1254' : 'cp1254',
|
||||
\ 'windows-1255' : 'cp1255',
|
||||
\ 'windows-1256' : 'cp1256',
|
||||
\ 'windows-1257' : 'cp1257',
|
||||
\ 'windows-1258' : 'cp1258',
|
||||
\ 'extended_unix_code_packed_format_for_japanese' : 'euc-jp',
|
||||
\ 'cseucpkdfmtjapanese' : 'euc-jp',
|
||||
\ 'euc-jp' : 'euc-jp',
|
||||
\ 'shift_jis' : 'sjis',
|
||||
\ 'ms_kanji' : 'sjis',
|
||||
\ 'sjis' : 'sjis',
|
||||
\ 'csshiftjis' : 'sjis',
|
||||
\ 'ibm-thai' : 'cp874',
|
||||
\ 'csibmthai' : 'cp874',
|
||||
\ 'ks_c_5601-1987' : 'cp949',
|
||||
\ 'iso-ir-149' : 'cp949',
|
||||
\ 'ks_c_5601-1989' : 'cp949',
|
||||
\ 'ksc_5601' : 'cp949',
|
||||
\ 'korean' : 'cp949',
|
||||
\ 'csksc56011987' : 'cp949',
|
||||
\ 'euc-kr' : 'euc-kr',
|
||||
\ 'cseuckr' : 'euc-kr',
|
||||
\ 'gbk' : 'cp936',
|
||||
\ 'cp936' : 'cp936',
|
||||
\ 'ms936' : 'cp936',
|
||||
\ 'windows-936' : 'cp936',
|
||||
\ 'gb_2312-80' : 'euc-cn',
|
||||
\ 'iso-ir-58' : 'euc-cn',
|
||||
\ 'chinese' : 'euc-cn',
|
||||
\ 'csiso58gb231280' : 'euc-cn',
|
||||
\ 'big5' : 'big5',
|
||||
\ 'csbig5' : 'big5',
|
||||
\ 'utf-8' : 'utf-8',
|
||||
\ 'iso-10646-ucs-2' : 'ucs-2',
|
||||
\ 'csunicode' : 'ucs-2',
|
||||
\ 'utf-16' : 'utf-16',
|
||||
\ 'utf-16be' : 'utf-16',
|
||||
\ 'utf-16le' : 'utf-16le',
|
||||
\ 'utf-32' : 'ucs-4',
|
||||
\ 'utf-32be' : 'ucs-4',
|
||||
\ 'utf-32le' : 'ucs-4le',
|
||||
\ 'iso-10646-ucs-4' : 'ucs-4',
|
||||
\ 'csucs4' : 'ucs-4'
|
||||
\ }
|
||||
lockvar g:tohtml#charset_to_encoding
|
||||
"}}}
|
||||
|
||||
func! tohtml#Convert2HTML(line1, line2) "{{{
|
||||
let s:settings = tohtml#GetUserSettings()
|
||||
|
||||
if !&diff || s:settings.diff_one_file
|
||||
if !&diff || s:settings.diff_one_file "{{{
|
||||
if a:line2 >= a:line1
|
||||
let g:html_start_line = a:line1
|
||||
let g:html_end_line = a:line2
|
||||
@@ -24,31 +298,51 @@ func! tohtml#Convert2HTML(line1, line2)
|
||||
let g:html_start_line = a:line2
|
||||
let g:html_end_line = a:line1
|
||||
endif
|
||||
runtime syntax/2html.vim
|
||||
else
|
||||
runtime syntax/2html.vim "}}}
|
||||
else "{{{
|
||||
let win_list = []
|
||||
let buf_list = []
|
||||
windo | if &diff | call add(win_list, winbufnr(0)) | endif
|
||||
let s:settings.whole_filler = 1
|
||||
let g:html_diff_win_num = 0
|
||||
for window in win_list
|
||||
" switch to the next buffer to convert
|
||||
exe ":" . bufwinnr(window) . "wincmd w"
|
||||
|
||||
" figure out whether current charset and encoding will work, if not
|
||||
" default to UTF-8
|
||||
if !exists('g:html_use_encoding') &&
|
||||
\ (((&l:fileencoding=='' || (&l:buftype!='' && &l:buftype!=?'help'))
|
||||
\ && &encoding!=?s:settings.vim_encoding)
|
||||
\ || &l:fileencoding!='' && &l:fileencoding!=?s:settings.vim_encoding)
|
||||
echohl WarningMsg
|
||||
echomsg "TOhtml: mismatched file encodings in Diff buffers, using UTF-8"
|
||||
echohl None
|
||||
let s:settings.vim_encoding = 'utf-8'
|
||||
let s:settings.encoding = 'UTF-8'
|
||||
endif
|
||||
|
||||
" set up for diff-mode conversion
|
||||
let g:html_start_line = 1
|
||||
let g:html_end_line = line('$')
|
||||
let g:html_diff_win_num += 1
|
||||
|
||||
" convert this file
|
||||
runtime syntax/2html.vim
|
||||
|
||||
" remember the HTML buffer for later combination
|
||||
call add(buf_list, bufnr('%'))
|
||||
endfor
|
||||
unlet g:html_diff_win_num
|
||||
call tohtml#Diff2HTML(win_list, buf_list)
|
||||
endif
|
||||
endif "}}}
|
||||
|
||||
unlet g:html_start_line
|
||||
unlet g:html_end_line
|
||||
unlet s:settings
|
||||
endfunc
|
||||
endfunc "}}}
|
||||
|
||||
func! tohtml#Diff2HTML(win_list, buf_list)
|
||||
func! tohtml#Diff2HTML(win_list, buf_list) "{{{
|
||||
let xml_line = ""
|
||||
let tag_close = '>'
|
||||
|
||||
@@ -87,7 +381,7 @@ func! tohtml#Diff2HTML(win_list, buf_list)
|
||||
call add(html, '<head>')
|
||||
|
||||
" include encoding as close to the top as possible, but only if not already
|
||||
" contained in XML information (to avoid haggling over content type)
|
||||
" contained in XML information
|
||||
if s:settings.encoding != "" && !s:settings.use_xhtml
|
||||
call add(html, "<meta http-equiv=\"content-type\" content=\"text/html; charset=" . s:settings.encoding . '"' . tag_close)
|
||||
endif
|
||||
@@ -133,7 +427,8 @@ func! tohtml#Diff2HTML(win_list, buf_list)
|
||||
let s:body_end_line = getline('.')
|
||||
endif
|
||||
|
||||
" Grab the style information. Some of this will be duplicated...
|
||||
" Grab the style information. Some of this will be duplicated so only insert
|
||||
" it if it's not already there. {{{
|
||||
1
|
||||
let style_start = search('^<style type="text/css">')
|
||||
1
|
||||
@@ -151,8 +446,10 @@ func! tohtml#Diff2HTML(win_list, buf_list)
|
||||
let insert_index += 1
|
||||
endif
|
||||
endfor
|
||||
endif
|
||||
endif " }}}
|
||||
|
||||
" everything new will get added before the diff styles so diff highlight
|
||||
" properly overrides normal highlight
|
||||
if diff_style_start != 0
|
||||
let insert_index = diff_style_start
|
||||
endif
|
||||
@@ -203,6 +500,20 @@ func! tohtml#Diff2HTML(win_list, buf_list)
|
||||
" just in case some user autocmd creates content in the new buffer, make sure
|
||||
" it is empty before proceeding
|
||||
%d
|
||||
|
||||
" set the fileencoding to match the charset we'll be using
|
||||
let &l:fileencoding=s:settings.vim_encoding
|
||||
|
||||
" According to http://www.w3.org/TR/html4/charset.html#doc-char-set, the byte
|
||||
" order mark is highly recommend on the web when using multibyte encodings. But,
|
||||
" it is not a good idea to include it on UTF-8 files. Otherwise, let Vim
|
||||
" determine when it is actually inserted.
|
||||
if s:settings.vim_encoding == 'utf-8'
|
||||
setlocal nobomb
|
||||
else
|
||||
setlocal bomb
|
||||
endif
|
||||
|
||||
call append(0, html)
|
||||
|
||||
if len(style) > 0
|
||||
@@ -210,7 +521,7 @@ func! tohtml#Diff2HTML(win_list, buf_list)
|
||||
let style_start = search('^</head>')-1
|
||||
|
||||
" Insert javascript to toggle matching folds open and closed in all windows,
|
||||
" if dynamic folding is active.
|
||||
" if dynamic folding is active. {{{
|
||||
if s:settings.dynamic_folds
|
||||
call append(style_start, [
|
||||
\ "<script type='text/javascript'>",
|
||||
@@ -234,13 +545,13 @@ func! tohtml#Diff2HTML(win_list, buf_list)
|
||||
\ s:settings.use_xhtml ? '//]]>' : " -->",
|
||||
\ "</script>"
|
||||
\ ])
|
||||
endif
|
||||
endif "}}}
|
||||
|
||||
" Insert styles from all the generated html documents and additional styles
|
||||
" for the table-based layout of the side-by-side diff. The diff should take
|
||||
" up the full browser window (but not more), and be static in size,
|
||||
" horizontally scrollable when the lines are too long. Otherwise, the diff
|
||||
" is pretty useless for really long lines.
|
||||
" is pretty useless for really long lines. {{{
|
||||
if s:settings.use_css
|
||||
call append(style_start,
|
||||
\ ['<style type="text/css">']+
|
||||
@@ -252,28 +563,28 @@ func! tohtml#Diff2HTML(win_list, buf_list)
|
||||
\ 'td div { overflow: auto; }',
|
||||
\ s:settings.use_xhtml ? '' : '-->',
|
||||
\ '</style>'
|
||||
\ ])
|
||||
endif
|
||||
\])
|
||||
endif "}}}
|
||||
endif
|
||||
|
||||
let &paste = s:old_paste
|
||||
let &magic = s:old_magic
|
||||
endfunc
|
||||
endfunc "}}}
|
||||
|
||||
" Gets a single user option and sets it in the passed-in Dict, or gives it the
|
||||
" default value if the option doesn't actually exist.
|
||||
func! tohtml#GetOption(settings, option, default)
|
||||
func! tohtml#GetOption(settings, option, default) "{{{
|
||||
if exists('g:html_'.a:option)
|
||||
let a:settings[a:option] = g:html_{a:option}
|
||||
else
|
||||
let a:settings[a:option] = a:default
|
||||
endif
|
||||
endfunc
|
||||
endfunc "}}}
|
||||
|
||||
" returns a Dict containing the values of all user options for 2html, including
|
||||
" default values for those not given an explicit value by the user. Discards the
|
||||
" html_ prefix of the option for nicer looking code.
|
||||
func! tohtml#GetUserSettings()
|
||||
func! tohtml#GetUserSettings() "{{{
|
||||
if exists('s:settings')
|
||||
" just restore the known options if we've already retrieved them
|
||||
return s:settings
|
||||
@@ -289,21 +600,23 @@ func! tohtml#GetUserSettings()
|
||||
let g:html_use_xhtml = g:use_xhtml
|
||||
endif
|
||||
|
||||
" get current option settings with appropriate defaults
|
||||
call tohtml#GetOption(user_settings, 'no_progress', !has("statusline") )
|
||||
call tohtml#GetOption(user_settings, 'diff_one_file', 0 )
|
||||
call tohtml#GetOption(user_settings, 'number_lines', &number )
|
||||
call tohtml#GetOption(user_settings, 'use_css', 1 )
|
||||
call tohtml#GetOption(user_settings, 'ignore_conceal', 0 )
|
||||
call tohtml#GetOption(user_settings, 'ignore_folding', 0 )
|
||||
call tohtml#GetOption(user_settings, 'dynamic_folds', 0 )
|
||||
call tohtml#GetOption(user_settings, 'no_foldcolumn', 0 )
|
||||
call tohtml#GetOption(user_settings, 'hover_unfold', 0 )
|
||||
call tohtml#GetOption(user_settings, 'no_pre', 0 )
|
||||
call tohtml#GetOption(user_settings, 'whole_filler', 0 )
|
||||
call tohtml#GetOption(user_settings, 'use_xhtml', 0 )
|
||||
" get current option settings with appropriate defaults {{{
|
||||
call tohtml#GetOption(user_settings, 'no_progress', !has("statusline") )
|
||||
call tohtml#GetOption(user_settings, 'diff_one_file', 0 )
|
||||
call tohtml#GetOption(user_settings, 'number_lines', &number )
|
||||
call tohtml#GetOption(user_settings, 'pre_wrap', &wrap )
|
||||
call tohtml#GetOption(user_settings, 'use_css', 1 )
|
||||
call tohtml#GetOption(user_settings, 'ignore_conceal', 0 )
|
||||
call tohtml#GetOption(user_settings, 'ignore_folding', 0 )
|
||||
call tohtml#GetOption(user_settings, 'dynamic_folds', 0 )
|
||||
call tohtml#GetOption(user_settings, 'no_foldcolumn', 0 )
|
||||
call tohtml#GetOption(user_settings, 'hover_unfold', 0 )
|
||||
call tohtml#GetOption(user_settings, 'no_pre', 0 )
|
||||
call tohtml#GetOption(user_settings, 'whole_filler', 0 )
|
||||
call tohtml#GetOption(user_settings, 'use_xhtml', 0 )
|
||||
" }}}
|
||||
|
||||
" override those settings that need it
|
||||
" override those settings that need it {{{
|
||||
|
||||
" hover opening implies dynamic folding
|
||||
if user_settings.hover_unfold
|
||||
@@ -332,47 +645,114 @@ func! tohtml#GetUserSettings()
|
||||
let user_settings.no_pre = 1
|
||||
endif
|
||||
|
||||
" Figure out proper MIME charset from the 'encoding' option.
|
||||
if exists("g:html_use_encoding")
|
||||
let user_settings.encoding = g:html_use_encoding
|
||||
else
|
||||
let vim_encoding = &encoding
|
||||
if vim_encoding =~ '^8bit\|^2byte'
|
||||
let vim_encoding = substitute(vim_encoding, '^8bit-\|^2byte-', '', '')
|
||||
endif
|
||||
if vim_encoding == 'latin1'
|
||||
let user_settings.encoding = 'iso-8859-1'
|
||||
elseif vim_encoding =~ "^cp12"
|
||||
let user_settings.encoding = substitute(vim_encoding, 'cp', 'windows-', '')
|
||||
elseif vim_encoding == 'sjis' || vim_encoding == 'cp932'
|
||||
let user_settings.encoding = 'Shift_JIS'
|
||||
elseif vim_encoding == 'big5' || vim_encoding == 'cp950'
|
||||
let user_settings.encoding = "Big5"
|
||||
elseif vim_encoding == 'euc-cn'
|
||||
let user_settings.encoding = 'GB_2312-80'
|
||||
elseif vim_encoding == 'euc-tw'
|
||||
let user_settings.encoding = ""
|
||||
elseif vim_encoding =~ '^euc\|^iso\|^koi'
|
||||
let user_settings.encoding = substitute(vim_encoding, '.*', '\U\0', '')
|
||||
elseif vim_encoding == 'cp949'
|
||||
let user_settings.encoding = 'KS_C_5601-1987'
|
||||
elseif vim_encoding == 'cp936'
|
||||
let user_settings.encoding = 'GBK'
|
||||
elseif vim_encoding =~ '^ucs\|^utf'
|
||||
let user_settings.encoding = 'UTF-8'
|
||||
else
|
||||
let user_settings.encoding = ""
|
||||
endif
|
||||
" pre_wrap doesn't do anything if not using pre or not using CSS
|
||||
if user_settings.no_pre || !user_settings.use_css
|
||||
let user_settings.pre_wrap=0
|
||||
endif
|
||||
"}}}
|
||||
|
||||
" set up expand_tabs option after all the overrides so we know the
|
||||
" appropriate defaults {{{
|
||||
if user_settings.no_pre == 0
|
||||
call tohtml#GetOption(user_settings,
|
||||
\ 'expand_tabs',
|
||||
\ &expandtab || &ts != 8 || user_settings.number_lines ||
|
||||
\ (user_settings.dynamic_folds && !user_settings.no_foldcolumn))
|
||||
else
|
||||
let user_settings.expand_tabs = 1
|
||||
endif
|
||||
" }}}
|
||||
|
||||
if exists("g:html_use_encoding") "{{{
|
||||
" user specified the desired MIME charset, figure out proper
|
||||
" 'fileencoding' from it or warn the user if we cannot
|
||||
let user_settings.encoding = g:html_use_encoding
|
||||
let user_settings.vim_encoding = tohtml#EncodingFromCharset(g:html_use_encoding)
|
||||
if user_settings.vim_encoding == ''
|
||||
echohl WarningMsg
|
||||
echomsg "TOhtml: file encoding for"
|
||||
\ g:html_use_encoding
|
||||
\ "unknown, please set 'fileencoding'"
|
||||
echohl None
|
||||
endif
|
||||
else
|
||||
" Figure out proper MIME charset from 'fileencoding' if possible
|
||||
if &l:fileencoding != ''
|
||||
" If the buffer is not a "normal" type, the 'fileencoding' value may not
|
||||
" be trusted; since the buffer should not be written the fileencoding is
|
||||
" not intended to be used.
|
||||
if &l:buftype=='' || &l:buftype==?'help'
|
||||
let user_settings.vim_encoding = &l:fileencoding
|
||||
call tohtml#CharsetFromEncoding(user_settings)
|
||||
else
|
||||
let user_settings.encoding = '' " trigger detection using &encoding
|
||||
endif
|
||||
endif
|
||||
|
||||
" else from 'encoding' if possible
|
||||
if &l:fileencoding == '' || user_settings.encoding == ''
|
||||
let user_settings.vim_encoding = &encoding
|
||||
call tohtml#CharsetFromEncoding(user_settings)
|
||||
endif
|
||||
|
||||
" else default to UTF-8 and warn user
|
||||
if user_settings.encoding == ''
|
||||
let user_settings.vim_encoding = 'utf-8'
|
||||
let user_settings.encoding = 'UTF-8'
|
||||
echohl WarningMsg
|
||||
echomsg "TOhtml: couldn't determine MIME charset, using UTF-8"
|
||||
echohl None
|
||||
endif
|
||||
endif "}}}
|
||||
|
||||
" TODO: font
|
||||
|
||||
return user_settings
|
||||
endif
|
||||
endfunc
|
||||
endfunc "}}}
|
||||
|
||||
" get the proper HTML charset name from a Vim encoding option.
|
||||
function! tohtml#CharsetFromEncoding(settings) "{{{
|
||||
let l:vim_encoding = a:settings.vim_encoding
|
||||
if exists('g:html_charset_override') && has_key(g:html_charset_override, l:vim_encoding)
|
||||
let a:settings.encoding = g:html_charset_override[l:vim_encoding]
|
||||
else
|
||||
if l:vim_encoding =~ '^8bit\|^2byte'
|
||||
" 8bit- and 2byte- prefixes are to indicate encodings available on the
|
||||
" system that Vim will convert with iconv(), look up just the encoding name,
|
||||
" not Vim's prefix.
|
||||
let l:vim_encoding = substitute(l:vim_encoding, '^8bit-\|^2byte-', '', '')
|
||||
endif
|
||||
if has_key(g:tohtml#encoding_to_charset, l:vim_encoding)
|
||||
let a:settings.encoding = g:tohtml#encoding_to_charset[l:vim_encoding]
|
||||
else
|
||||
let a:settings.encoding = ""
|
||||
endif
|
||||
endif
|
||||
if a:settings.encoding != ""
|
||||
let l:vim_encoding = tohtml#EncodingFromCharset(a:settings.encoding)
|
||||
if l:vim_encoding != ""
|
||||
" if the Vim encoding to HTML encoding conversion is set up (by default or
|
||||
" by the user) to convert to a different encoding, we need to also change
|
||||
" the Vim encoding of the new buffer
|
||||
let a:settings.vim_encoding = l:vim_encoding
|
||||
endif
|
||||
endif
|
||||
endfun "}}}
|
||||
|
||||
" Get the proper Vim encoding option setting from an HTML charset name.
|
||||
function! tohtml#EncodingFromCharset(encoding) "{{{
|
||||
if exists('g:html_encoding_override') && has_key(g:html_encoding_override, a:encoding)
|
||||
return g:html_encoding_override[a:encoding]
|
||||
elseif has_key(g:tohtml#charset_to_encoding, tolower(a:encoding))
|
||||
return g:tohtml#charset_to_encoding[tolower(a:encoding)]
|
||||
else
|
||||
return ""
|
||||
endif
|
||||
endfun "}}}
|
||||
|
||||
let &cpo = s:cpo_sav
|
||||
unlet s:cpo_sav
|
||||
|
||||
" Make sure any patches will probably use consistent indent
|
||||
" vim: ts=8 sw=2 sts=2 noet
|
||||
" vim: ts=8 sw=2 sts=2 noet fdm=marker
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
" vimball.vim : construct a file containing both paths and files
|
||||
" Author: Charles E. Campbell, Jr.
|
||||
" Date: Apr 12, 2010
|
||||
" Version: 31
|
||||
" Date: Apr 02, 2011
|
||||
" Version: 33
|
||||
" GetLatestVimScripts: 1502 1 :AutoInstall: vimball.vim
|
||||
" Copyright: (c) 2004-2009 by Charles E. Campbell, Jr.
|
||||
" Copyright: (c) 2004-2011 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.
|
||||
@@ -14,7 +14,7 @@
|
||||
if &cp || exists("g:loaded_vimball")
|
||||
finish
|
||||
endif
|
||||
let g:loaded_vimball = "v31"
|
||||
let g:loaded_vimball = "v33"
|
||||
if v:version < 702
|
||||
echohl WarningMsg
|
||||
echo "***warning*** this version of vimball needs vim 7.2"
|
||||
@@ -67,10 +67,10 @@ endif
|
||||
" vimball#MkVimball: creates a vimball given a list of paths to files {{{2
|
||||
" 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
|
||||
" writelevel : if true, force a write to filename.vmb, 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:
|
||||
" filename : base name of file to be created (ie. filename.vmb)
|
||||
" Output: a filename.vmb using vimball format:
|
||||
" path
|
||||
" filesize
|
||||
" [file]
|
||||
@@ -80,12 +80,12 @@ endif
|
||||
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$'
|
||||
let vbname= substitute(a:1,'\.\a\{3}$','.vba','')
|
||||
let vbname= substitute(a:1,'\.\a\{3}$','.vmb','')
|
||||
else
|
||||
let vbname= a:1
|
||||
endif
|
||||
if vbname !~ '\.vba$'
|
||||
let vbname= vbname.'.vba'
|
||||
if vbname !~ '\.vmb$'
|
||||
let vbname= vbname.'.vmb'
|
||||
endif
|
||||
" call Decho("vbname<".vbname.">")
|
||||
if !a:writelevel && a:1 =~ '[\/]'
|
||||
@@ -134,7 +134,7 @@ fun! vimball#MkVimball(line1,line2,writelevel,...) range
|
||||
" create/switch to mkvimball tab
|
||||
if !exists("vbtabnr")
|
||||
tabnew
|
||||
silent! file Vimball
|
||||
sil! file Vimball
|
||||
let vbtabnr= tabpagenr()
|
||||
else
|
||||
exe "tabn ".vbtabnr
|
||||
@@ -195,8 +195,8 @@ fun! vimball#Vimball(really,...)
|
||||
" call Dfunc("vimball#Vimball(really=".a:really.") a:0=".a:0)
|
||||
|
||||
if v:version < 701 || (v:version == 701 && !exists('*fnameescape'))
|
||||
echoerr "your vim is missing the fnameescape() function"
|
||||
" call Dret("vimball#Vimball : needs 7.1 with patch 299")
|
||||
echoerr "your vim is missing the fnameescape() function (pls upgrade to vim 7.2 or later)"
|
||||
" call Dret("vimball#Vimball : needs 7.1 with patch 299 or later")
|
||||
return
|
||||
endif
|
||||
|
||||
@@ -214,7 +214,7 @@ fun! vimball#Vimball(really,...)
|
||||
" set up vimball tab
|
||||
" call Decho("setting up vimball tab")
|
||||
tabnew
|
||||
silent! file Vimball
|
||||
sil! file Vimball
|
||||
let vbtabnr= tabpagenr()
|
||||
let didhelp= ""
|
||||
|
||||
@@ -254,11 +254,10 @@ 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)+0
|
||||
let fsize = substitute(getline(linenr+1),'^\(\d\+\).\{-}$','\1','')+0
|
||||
let fenc = substitute(getline(linenr+1),'^\d\+\s*\(\S\+\)$','\1','')
|
||||
let fenc = substitute(getline(linenr+1),'^\d\+\s*\(\S\{-}\)$','\1','')
|
||||
let filecnt = filecnt + 1
|
||||
" call Decho("fname<".fname."> fsize=".fsize." filecnt=".filecnt)
|
||||
" call Decho("fname<".fname."> fsize=".fsize." filecnt=".filecnt. " fenc=".fenc)
|
||||
|
||||
if a:really
|
||||
echomsg "extracted <".fname.">: ".fsize." lines"
|
||||
@@ -306,20 +305,22 @@ fun! vimball#Vimball(really,...)
|
||||
let linenr = linenr + 2
|
||||
let lastline = linenr + fsize - 1
|
||||
" call Decho("exe ".linenr.",".lastline."yank a")
|
||||
exe "silent ".linenr.",".lastline."yank a"
|
||||
" no point in handling a zero-length file
|
||||
if lastline >= linenr
|
||||
exe "silent ".linenr.",".lastline."yank a"
|
||||
|
||||
" copy "a" buffer into tab
|
||||
" copy "a" buffer into tab
|
||||
" call Decho('copy "a buffer into tab#'.vbtabnr)
|
||||
exe "tabn ".vbtabnr
|
||||
setlocal ma
|
||||
silent! %d
|
||||
silent put a
|
||||
1
|
||||
silent d
|
||||
exe "tabn ".vbtabnr
|
||||
setlocal ma
|
||||
sil! %d
|
||||
silent put a
|
||||
1
|
||||
sil! d
|
||||
|
||||
" write tab to file
|
||||
if a:really
|
||||
let fnamepath= home."/".fname
|
||||
" write tab to file
|
||||
if a:really
|
||||
let fnamepath= home."/".fname
|
||||
" call Decho("exe w! ".fnameescape(fnamepath))
|
||||
if fenc != ""
|
||||
exe "silent w! ++enc=".fnameescape(fenc)." ".fnameescape(fnamepath)
|
||||
@@ -328,17 +329,18 @@ fun! vimball#Vimball(really,...)
|
||||
endif
|
||||
echo "wrote ".fnameescape(fnamepath)
|
||||
call s:RecordInVar(home,"call delete('".fnamepath."')")
|
||||
endif
|
||||
endif
|
||||
|
||||
" return to tab with vimball
|
||||
" return to tab with vimball
|
||||
" call Decho("exe tabn ".curtabnr)
|
||||
exe "tabn ".curtabnr
|
||||
exe "tabn ".curtabnr
|
||||
|
||||
" set up help if its a doc/*.txt file
|
||||
" set up help if its a doc/*.txt file
|
||||
" call Decho("didhelp<".didhelp."> fname<".fname.">")
|
||||
if a:really && didhelp == "" && fname =~ 'doc/[^/]\+\.\(txt\|..x\)$'
|
||||
let didhelp= substitute(fname,'^\(.*\<doc\)[/\\][^.]*\.\(txt\|..x\)$','\1','')
|
||||
if a:really && didhelp == "" && fname =~ 'doc/[^/]\+\.\(txt\|..x\)$'
|
||||
let didhelp= substitute(fname,'^\(.*\<doc\)[/\\][^.]*\.\(txt\|..x\)$','\1','')
|
||||
" call Decho("didhelp<".didhelp.">")
|
||||
endif
|
||||
endif
|
||||
|
||||
" update for next file
|
||||
@@ -400,7 +402,9 @@ fun! vimball#RmVimball(...)
|
||||
let curfile= a:1
|
||||
" call Decho("case a:0=".a:0.": curfile<".curfile.">")
|
||||
endif
|
||||
if curfile =~ '\.vba$'
|
||||
if curfile =~ '\.vmb$'
|
||||
let curfile= substitute(curfile,'\.vmb','','')
|
||||
elseif curfile =~ '\.vba$'
|
||||
let curfile= substitute(curfile,'\.vba','','')
|
||||
endif
|
||||
if a:0 >= 2
|
||||
@@ -418,13 +422,17 @@ fun! vimball#RmVimball(...)
|
||||
" call Decho(".VimballRecord is readable")
|
||||
" call Decho("curfile<".curfile.">")
|
||||
keepalt keepjumps 1split
|
||||
silent! keepalt keepjumps e .VimballRecord
|
||||
sil! keepalt keepjumps e .VimballRecord
|
||||
let keepsrch= @/
|
||||
" call Decho('search for ^\M'.curfile.'.\m: ')
|
||||
" call Decho('search for ^\M'.curfile.'.\mvba: ')
|
||||
" call Decho('search for ^\M'.curfile.'\m[-0-9.]*\.vba: ')
|
||||
" call Decho('search for ^\M'.curfile.'.\m{vba|vmb}: ')
|
||||
" call Decho('search for ^\M'.curfile.'\m[-0-9.]*\.{vba|vmb}: ')
|
||||
if search('^\M'.curfile."\m: ".'cw')
|
||||
let foundit= 1
|
||||
elseif search('^\M'.curfile.".\mvmb: ",'cw')
|
||||
let foundit= 2
|
||||
elseif search('^\M'.curfile.'\m[-0-9.]*\.vmb: ','cw')
|
||||
let foundit= 2
|
||||
elseif search('^\M'.curfile.".\mvba: ",'cw')
|
||||
let foundit= 1
|
||||
elseif search('^\M'.curfile.'\m[-0-9.]*\.vba: ','cw')
|
||||
@@ -433,25 +441,29 @@ fun! vimball#RmVimball(...)
|
||||
let foundit = 0
|
||||
endif
|
||||
if foundit
|
||||
let exestring = substitute(getline("."),'^\M'.curfile.'\m\S\{-}\.vba: ','','')
|
||||
if foundit == 1
|
||||
let exestring = substitute(getline("."),'^\M'.curfile.'\m\S\{-}\.vba: ','','')
|
||||
else
|
||||
let exestring = substitute(getline("."),'^\M'.curfile.'\m\S\{-}\.vmb: ','','')
|
||||
endif
|
||||
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
|
||||
sil! keepalt keepjumps exe exestring
|
||||
sil! keepalt keepjumps d
|
||||
let exestring= strlen(substitute(exestring,'call delete(.\{-})|\=',"D","g"))
|
||||
" call Decho("exestring<".exestring.">")
|
||||
echomsg "removed ".exestring." files"
|
||||
else
|
||||
let s:VBRstring= ''
|
||||
let curfile = substitute(curfile,'\.vba','','')
|
||||
let curfile = substitute(curfile,'\.vmb','','')
|
||||
" 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!
|
||||
sil! keepalt keepjumps g/^\s*$/d
|
||||
sil! keepalt keepjumps wq!
|
||||
let @/= keepsrch
|
||||
endif
|
||||
call s:ChgDir(curdir)
|
||||
@@ -599,7 +611,7 @@ fun! s:RecordInFile(home)
|
||||
let cmd= expand("%:tr").": "
|
||||
" call Decho("cmd<".cmd.">")
|
||||
|
||||
silent! keepalt keepjumps e .VimballRecord
|
||||
sil! keepalt keepjumps e .VimballRecord
|
||||
setlocal ma
|
||||
$
|
||||
if exists("s:recordfile") && exists("s:recorddir")
|
||||
@@ -616,8 +628,8 @@ fun! s:RecordInFile(home)
|
||||
|
||||
" put command into buffer, write .VimballRecord `file
|
||||
keepalt keepjumps put=cmd
|
||||
silent! keepalt keepjumps g/^\s*$/d
|
||||
silent! keepalt keepjumps wq!
|
||||
sil! keepalt keepjumps g/^\s*$/d
|
||||
sil! keepalt keepjumps wq!
|
||||
call s:ChgDir(curdir)
|
||||
|
||||
if exists("s:recorddir")
|
||||
@@ -693,10 +705,11 @@ fun! vimball#SaveSettings()
|
||||
let s:repkeep = &report
|
||||
let s:vekeep = &ve
|
||||
let s:ffkeep = &l:ff
|
||||
let s:swfkeep = &l:swf
|
||||
if exists("&acd")
|
||||
setlocal ei=all ve=all noacd nofen noic report=999 nohid bt= ma lz pm= ff=unix
|
||||
setlocal ei=all ve=all noacd nofen noic report=999 nohid bt= ma lz pm= ff=unix noswf
|
||||
else
|
||||
setlocal ei=all ve=all nofen noic report=999 nohid bt= ma lz pm= ff=unix
|
||||
setlocal ei=all ve=all nofen noic report=999 nohid bt= ma lz pm= ff=unix noswf
|
||||
endif
|
||||
" vimballs should be in unix format
|
||||
setlocal ff=unix
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
" zip.vim: Handles browsing zipfiles
|
||||
" AUTOLOAD PORTION
|
||||
" Date: Apr 12, 2010
|
||||
" Version: 23
|
||||
" Date: May 24, 2011
|
||||
" Version: 24
|
||||
" Maintainer: Charles E Campbell, Jr <NdrOchip@ScampbellPfamily.AbizM-NOSPAM>
|
||||
" License: Vim License (see vim's :help license)
|
||||
" Copyright: Copyright (C) 2005-2008 Charles E. Campbell, Jr. {{{1
|
||||
" Copyright: Copyright (C) 2005-2011 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,
|
||||
@@ -19,7 +19,7 @@
|
||||
if &cp || exists("g:loaded_zip")
|
||||
finish
|
||||
endif
|
||||
let g:loaded_zip= "v23"
|
||||
let g:loaded_zip= "v24"
|
||||
if v:version < 702
|
||||
echohl WarningMsg
|
||||
echo "***warning*** this version of zip needs vim 7.2"
|
||||
@@ -103,38 +103,26 @@ fun! zip#Browse(zipfile)
|
||||
set ft=tar
|
||||
|
||||
" give header
|
||||
let lastline= line("$")
|
||||
call setline(lastline+1,'" zip.vim version '.g:loaded_zip)
|
||||
call setline(lastline+2,'" Browsing zipfile '.a:zipfile)
|
||||
call setline(lastline+3,'" Select a file with cursor and press ENTER')
|
||||
$put =''
|
||||
0d
|
||||
$
|
||||
call append(0, ['" zip.vim version '.g:loaded_zip,
|
||||
\ '" Browsing zipfile '.a:zipfile,
|
||||
\ '" Select a file with cursor and press ENTER'])
|
||||
keepj $
|
||||
|
||||
" call Decho("exe silent r! ".g:zip_unzipcmd." -l -- ".s:Escape(a:zipfile,1))
|
||||
exe "silent r! ".g:zip_unzipcmd." -l -- ".s:Escape(a:zipfile,1)
|
||||
exe "silent r! ".g:zip_unzipcmd." -Z -1 -- ".s:Escape(a:zipfile,1)
|
||||
if v:shell_error != 0
|
||||
redraw!
|
||||
echohl WarningMsg | echo "***warning*** (zip#Browse) ".fnameescape(a:zipfile)." is not a zip file" | echohl None
|
||||
" call inputsave()|call input("Press <cr> to continue")|call inputrestore()
|
||||
silent %d
|
||||
keepj sil! %d
|
||||
let eikeep= &ei
|
||||
set ei=BufReadCmd,FileReadCmd
|
||||
exe "r ".fnameescape(a:zipfile)
|
||||
exe "keepj r ".fnameescape(a:zipfile)
|
||||
let &ei= eikeep
|
||||
1d
|
||||
keepj 1d
|
||||
" call Dret("zip#Browse")
|
||||
return
|
||||
endif
|
||||
" call Decho("line 6: ".getline(6))
|
||||
let namecol= stridx(getline(6),'Name') + 1
|
||||
" call Decho("namecol=".namecol)
|
||||
4,$g/^\s*----/d
|
||||
4,$g/^\s*\a/d
|
||||
$d
|
||||
if namecol > 0
|
||||
exe 'silent 4,$s/^.*\%'.namecol.'c//'
|
||||
endif
|
||||
|
||||
setlocal noma nomod ro
|
||||
noremap <silent> <buffer> <cr> :call <SID>ZipBrowseSelect()<cr>
|
||||
@@ -205,11 +193,12 @@ fun! zip#Read(fname,mode)
|
||||
" call Decho("zipfile<".zipfile.">")
|
||||
" call Decho("fname <".fname.">")
|
||||
|
||||
" call Decho("exe r! ".g:zip_unzipcmd." -p -- ".s:Escape(zipfile,1)." ".s:Escape(fname,1))
|
||||
exe "silent r! ".g:zip_unzipcmd." -p -- ".s:Escape(zipfile,1)." ".s:Escape(fname,1)
|
||||
" call Decho("exe r! ".g:zip_unzipcmd." -p -- ".s:Escape(zipfile,1)." ".s:Escape(fnameescape(fname),1))
|
||||
exe "keepj sil! r! ".g:zip_unzipcmd." -p -- ".s:Escape(zipfile,1)." ".s:Escape(fnameescape(fname),1)
|
||||
filetype detect
|
||||
|
||||
" cleanup
|
||||
0d
|
||||
keepj 0d
|
||||
set nomod
|
||||
|
||||
let &report= repkeep
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
" Vim compiler file
|
||||
" Compiler: ms C#
|
||||
" Maintainer: Joseph H. Yao (hyao@sina.com)
|
||||
" Last Change: 2004 Mar 27
|
||||
" Compiler: Microsoft Visual Studio C#
|
||||
" Maintainer: Zhou YiChao (broken.zhou@gmail.com)
|
||||
" Previous Maintainer: Joseph H. Yao (hyao@sina.com)
|
||||
" Last Change: 2011 Apr 21
|
||||
|
||||
if exists("current_compiler")
|
||||
finish
|
||||
@@ -12,8 +13,9 @@ if exists(":CompilerSet") != 2 " older Vim always used :setlocal
|
||||
command -nargs=* CompilerSet setlocal <args>
|
||||
endif
|
||||
|
||||
" default errorformat
|
||||
CompilerSet errorformat&
|
||||
CompilerSet errorformat+=%f(%l\\,%v):\ %t%*[^:]:\ %m,
|
||||
\%trror%*[^:]:\ %m,
|
||||
\%tarning%*[^:]:\ %m
|
||||
|
||||
" default make
|
||||
CompilerSet makeprg=csc\ %
|
||||
|
||||
23
runtime/compiler/g95.vim
Normal file
23
runtime/compiler/g95.vim
Normal file
@@ -0,0 +1,23 @@
|
||||
" Compiler: G95
|
||||
" Maintainer: H Xu <xuhdev@gmail.com>
|
||||
" Version: 0.1.3
|
||||
" Last Change: 2011 Apr 01
|
||||
" Homepage: http://www.vim.org/scripts/script.php?script_id=3492
|
||||
" https://bitbucket.org/xuhdev/compiler-g95.vim
|
||||
" License: Same as Vim
|
||||
|
||||
if exists('current_compiler')
|
||||
finish
|
||||
endif
|
||||
let current_compiler = 'g95'
|
||||
|
||||
if exists(":CompilerSet") != 2 " older Vim always used :setlocal
|
||||
command -nargs=* CompilerSet setlocal <args>
|
||||
endif
|
||||
|
||||
CompilerSet errorformat=
|
||||
\%AIn\ file\ %f:%l,
|
||||
\%-C%p1,
|
||||
\%-Z%trror:\ %m,
|
||||
\%-Z%tarning\ (%n):\ %m,
|
||||
\%-C%.%#
|
||||
22
runtime/compiler/gfortran.vim
Normal file
22
runtime/compiler/gfortran.vim
Normal file
@@ -0,0 +1,22 @@
|
||||
" Compiler: GNU Fortran Compiler
|
||||
" Maintainer: H Xu <xuhdev@gmail.com>
|
||||
" Version: 0.1.3
|
||||
" Last Change: 19 March 2011
|
||||
" Homepage: http://www.vim.org/scripts/script.php?script_id=3496
|
||||
" https://bitbucket.org/xuhdev/compiler-gfortran.vim
|
||||
" License: Same as Vim
|
||||
|
||||
if exists('current_compiler')
|
||||
finish
|
||||
endif
|
||||
let current_compiler = 'gfortran'
|
||||
|
||||
if exists(":CompilerSet") != 2 " older Vim always used :setlocal
|
||||
command -nargs=* CompilerSet setlocal <args>
|
||||
endif
|
||||
|
||||
CompilerSet errorformat=
|
||||
\%A%f:%l.%c:,
|
||||
\%-Z%trror:\ %m,
|
||||
\%-Z%tarning:\ %m,
|
||||
\%-C%.%#
|
||||
22
runtime/compiler/ifort.vim
Normal file
22
runtime/compiler/ifort.vim
Normal file
@@ -0,0 +1,22 @@
|
||||
" Compiler: Intel Fortran Compiler
|
||||
" Maintainer: H Xu <xuhdev@gmail.com>
|
||||
" Version: 0.1.1
|
||||
" Last Change: 19 March 2011
|
||||
" Homepage: http://www.vim.org/scripts/script.php?script_id=3497
|
||||
" https://bitbucket.org/xuhdev/compiler-ifort.vim
|
||||
" License: Same as Vim
|
||||
|
||||
if exists('current_compiler')
|
||||
finish
|
||||
endif
|
||||
let current_compiler = 'ifort'
|
||||
|
||||
if exists(":CompilerSet") != 2 " older Vim always used :setlocal
|
||||
command -nargs=* CompilerSet setlocal <args>
|
||||
endif
|
||||
|
||||
CompilerSet errorformat=
|
||||
\%A%f(%l):\ %trror\ \#%n:\ %m,
|
||||
\%A%f(%l):\ %tarning\ \#%n:\ %m,
|
||||
\%-Z%p^,
|
||||
\%-G%.%#
|
||||
@@ -1,4 +1,4 @@
|
||||
*arabic.txt* For Vim version 7.3. Last change: 2005 Mar 29
|
||||
*arabic.txt* For Vim version 7.3. Last change: 2010 Nov 13
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Nadim Shaikli
|
||||
@@ -146,7 +146,7 @@ o Enable Arabic settings [short-cut]
|
||||
:set arabic
|
||||
<
|
||||
The two above noted possible invocations are the preferred manner
|
||||
in which users are instructed to proceed. Baring an enabled 'termbidi'
|
||||
in which users are instructed to proceed. Barring an enabled 'termbidi'
|
||||
setting, both command options:
|
||||
|
||||
1. set the appropriate keymap
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*autocmd.txt* For Vim version 7.3. Last change: 2010 Jul 22
|
||||
*autocmd.txt* For Vim version 7.3. Last change: 2011 Aug 29
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -299,6 +299,8 @@ Name triggered by ~
|
||||
|InsertEnter| starting Insert mode
|
||||
|InsertChange| when typing <Insert> while in Insert or Replace mode
|
||||
|InsertLeave| when leaving Insert mode
|
||||
|InsertCharPre| when a character was typed in Insert mode, before
|
||||
inserting it
|
||||
|
||||
|ColorScheme| after loading a color scheme
|
||||
|
||||
@@ -446,6 +448,9 @@ BufWriteCmd Before writing the whole buffer to a file.
|
||||
'modified' if successful, unless '+' is in
|
||||
'cpo' and writing to another file |cpo-+|.
|
||||
The buffer contents should not be changed.
|
||||
When the command resets 'modified' the undo
|
||||
information is adjusted to mark older undo
|
||||
states as 'modified', like |:write| does.
|
||||
|Cmd-event|
|
||||
*BufWritePost*
|
||||
BufWritePost After writing the whole buffer to a file
|
||||
@@ -506,6 +511,7 @@ CursorMoved After the cursor was moved in Normal mode.
|
||||
not expect or that is slow.
|
||||
*CursorMovedI*
|
||||
CursorMovedI After the cursor was moved in Insert mode.
|
||||
Not triggered when the popup menu is visible.
|
||||
Otherwise the same as CursorMoved.
|
||||
*EncodingChanged*
|
||||
EncodingChanged Fires off after the 'encoding' option has been
|
||||
@@ -657,6 +663,17 @@ InsertChange When typing <Insert> while in Insert or
|
||||
indicates the new mode.
|
||||
Be careful not to move the cursor or do
|
||||
anything else that the user does not expect.
|
||||
*InsertCharPre*
|
||||
InsertCharPre When a character is typed in Insert mode,
|
||||
before inserting the char.
|
||||
The |v:char| variable indicates the char typed
|
||||
and can be changed during the event to insert
|
||||
a different character. When |v:char| is set
|
||||
to more than one character this text is
|
||||
inserted literally.
|
||||
It is not allowed to change the text |textlock|.
|
||||
The event is not triggered when 'paste' is
|
||||
set.
|
||||
*InsertEnter*
|
||||
InsertEnter Just before starting Insert mode. Also for
|
||||
Replace mode and Virtual Replace mode. The
|
||||
@@ -786,7 +803,10 @@ TermChanged After the value of 'term' has changed. Useful
|
||||
TermResponse After the response to |t_RV| is received from
|
||||
the terminal. The value of |v:termresponse|
|
||||
can be used to do things depending on the
|
||||
terminal version.
|
||||
terminal version. Note that this event may be
|
||||
triggered halfway executing another event,
|
||||
especially if file I/O, a shell command or
|
||||
anything else that takes time is involved.
|
||||
*User*
|
||||
User Never executed automatically. To be used for
|
||||
autocommands that are only executed with
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*change.txt* For Vim version 7.3. Last change: 2010 Jul 29
|
||||
*change.txt* For Vim version 7.3. Last change: 2011 Jun 19
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -522,11 +522,11 @@ comment (starting with '"') after the ":!" command.
|
||||
={motion} Filter {motion} lines through the external program
|
||||
given with the 'equalprg' option. When the 'equalprg'
|
||||
option is empty (this is the default), use the
|
||||
internal formatting function |C-indenting|. But when
|
||||
'indentexpr' is not empty, it will be used instead
|
||||
|indent-expression|. When Vim was compiled without
|
||||
internal formatting then the "indent" program is used
|
||||
as a last resort.
|
||||
internal formatting function |C-indenting| and
|
||||
|'lisp'|. But when 'indentexpr' is not empty, it will
|
||||
be used instead |indent-expression|. When Vim was
|
||||
compiled without internal formatting then the "indent"
|
||||
program is used as a last resort.
|
||||
|
||||
*==*
|
||||
== Filter [count] lines like with ={motion}.
|
||||
@@ -690,7 +690,8 @@ 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
|
||||
pattern from the last substitute or ":global" command. If there is none, but
|
||||
there is a previous search pattern, that one is used. With the [r] flag, the
|
||||
command uses the pattern from the last substitute, ":global", or search
|
||||
command.
|
||||
|
||||
@@ -716,11 +717,13 @@ Otherwise it works on whole lines anyway.
|
||||
|
||||
*sub-replace-special* *:s\=*
|
||||
When the {string} starts with "\=" it is evaluated as an expression, see
|
||||
|sub-replace-expression|. You can use that for any special characters.
|
||||
|sub-replace-expression|. You can use that for complex replacement or special
|
||||
characters.
|
||||
|
||||
Otherwise these characters in {string} have a special meaning:
|
||||
*:s%*
|
||||
When {string} is equal to "%" and '/' is included with the 'cpoptions' option,
|
||||
then the {string} of the previous substitute command is used. |cpo-/|
|
||||
then the {string} of the previous substitute command is used, see |cpo-/|
|
||||
|
||||
magic nomagic action ~
|
||||
& \& replaced with the whole matched pattern *s/\&*
|
||||
@@ -755,6 +758,14 @@ magic nomagic action ~
|
||||
\x where x is any character not mentioned above:
|
||||
Reserved for future expansion
|
||||
|
||||
The special meaning is also used inside the third argument {sub} of
|
||||
the |substitute()| function with the following exceptions:
|
||||
- A % inserts a percent literally without regard to 'cpoptions'.
|
||||
- magic is always set without regard to 'magic'.
|
||||
- A ~ inserts a tilde literally.
|
||||
- <CR> and \r inserts a carriage-return (CTRL-M).
|
||||
- \<CR> does not have a special meaning. it's just one of \x.
|
||||
|
||||
Examples: >
|
||||
:s/a\|b/xxx\0xxx/g modifies "a b" to "xxxaxxx xxxbxxx"
|
||||
:s/\([abc]\)\([efg]\)/\2\1/g modifies "af fa bg" to "fa fa gb"
|
||||
@@ -786,17 +797,19 @@ either the first or second pattern in parentheses did not match, so either
|
||||
Substitute with an expression *sub-replace-expression*
|
||||
*sub-replace-\=*
|
||||
When the substitute string starts with "\=" the remainder is interpreted as an
|
||||
expression. This does not work recursively: a substitute() function inside
|
||||
expression. This does not work recursively: a |substitute()| function inside
|
||||
the expression cannot use "\=" for the substitute string.
|
||||
|
||||
The special meaning for characters as mentioned at |sub-replace-special| does
|
||||
not apply except for "<CR>", "\<CR>" and "\\". Thus in the result of the
|
||||
expression you need to use two backslashes to get one, put a backslash before a
|
||||
<CR> you want to insert, and use a <CR> without a backslash where you want to
|
||||
break the line.
|
||||
not apply except for "<CR>". A <NL> character is used as a line break, you
|
||||
can get one with a double-quote string: "\n". Prepend a backslash to get a
|
||||
real <NL> character (which will be a NUL in the file).
|
||||
|
||||
For convenience a <NL> character is also used as a line break. Prepend a
|
||||
backslash to get a real <NL> character (which will be a NUL in the file).
|
||||
The "\=" notation can also be used inside the third argument {sub} of
|
||||
|substitute()| function. In this case, the special meaning for characters as
|
||||
mentioned at |sub-replace-special| does not apply at all. Especially, <CR> and
|
||||
<NL> are interpreted not as a line break but as a carriage-return and a
|
||||
new-line respectively.
|
||||
|
||||
When the result is a |List| then the items are joined with separating line
|
||||
breaks. Thus each item becomes a line, except that they can contain line
|
||||
@@ -916,8 +929,10 @@ inside of strings can change! Also see 'softtabstop' option. >
|
||||
{Visual}["x]Y Yank the highlighted lines [into register x] (for
|
||||
{Visual} see |Visual-mode|). {not in Vi}
|
||||
|
||||
*:y* *:yank*
|
||||
:[range]y[ank] [x] Yank [range] lines [into register x].
|
||||
*:y* *:yank* *E850*
|
||||
:[range]y[ank] [x] Yank [range] lines [into register x]. Yanking to the
|
||||
"* or "+ registers is possible only when the
|
||||
|+clipboard| feature is included.
|
||||
|
||||
:[range]y[ank] [x] {count}
|
||||
Yank {count} lines, starting with last line number
|
||||
@@ -1387,16 +1402,19 @@ before typing anything else on the new line. This will replace the
|
||||
middle-comment leader with the end-comment leader and apply any specified
|
||||
alignment, leaving just " */". There is no need to hit BackSpace first.
|
||||
|
||||
When there is a match with a middle part, but there also is a maching end part
|
||||
which is longer, the end part is used. This makes a C style comment work
|
||||
without requiring the middle part to end with a space.
|
||||
|
||||
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--->**
|
||||
******/
|
||||
(kind of looks like a 1 too). Consider comment string: >
|
||||
:set comments=sr:/***,m:**,ex-2:******/
|
||||
<
|
||||
/*** ~
|
||||
**<--right aligned from "r" flag ~
|
||||
** ~
|
||||
offset 2 spaces for the "-2" flag--->** ~
|
||||
******/ ~
|
||||
In this case, the first comment was typed, then return was pressed 4 times,
|
||||
then "/" was pressed to end the comment.
|
||||
|
||||
@@ -1414,8 +1432,8 @@ 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.
|
||||
indent alignments. However, 'indentexpr' has the ability to work better with
|
||||
three piece comments.
|
||||
|
||||
Other examples: >
|
||||
"b:*" Includes lines starting with "*", but not if the "*" is
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*cmdline.txt* For Vim version 7.3. Last change: 2010 Sep 18
|
||||
*cmdline.txt* For Vim version 7.3. Last change: 2011 Mar 27
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -83,9 +83,9 @@ CTRL-V Insert next non-digit literally. Up to three digits form the
|
||||
CTRL-Q Same as CTRL-V. But with some terminals it is used for
|
||||
control flow, it doesn't work then.
|
||||
|
||||
*c_<Left>*
|
||||
*c_<Left>* *c_Left*
|
||||
<Left> cursor left
|
||||
*c_<Right>*
|
||||
*c_<Right>* *c_Right*
|
||||
<Right> cursor right
|
||||
*c_<S-Left>*
|
||||
<S-Left> or <C-Left> *c_<C-Left>*
|
||||
@@ -93,18 +93,18 @@ CTRL-Q Same as CTRL-V. But with some terminals it is used for
|
||||
*c_<S-Right>*
|
||||
<S-Right> or <C-Right> *c_<C-Right>*
|
||||
cursor one WORD right
|
||||
CTRL-B or <Home> *c_CTRL-B* *c_<Home>*
|
||||
CTRL-B or <Home> *c_CTRL-B* *c_<Home>* *c_Home*
|
||||
cursor to beginning of command-line
|
||||
CTRL-E or <End> *c_CTRL-E* *c_<End>*
|
||||
CTRL-E or <End> *c_CTRL-E* *c_<End>* *c_End*
|
||||
cursor to end of command-line
|
||||
|
||||
*c_<LeftMouse>*
|
||||
<LeftMouse> Move the cursor to the position of the mouse click.
|
||||
|
||||
CTRL-H *c_<BS>* *c_CTRL-H*
|
||||
CTRL-H *c_<BS>* *c_CTRL-H* *c_BS*
|
||||
<BS> Delete the character in front of the cursor (see |:fixdel| if
|
||||
your <BS> key does not do what you want).
|
||||
*c_<Del>*
|
||||
*c_<Del>* *c_Del*
|
||||
<Del> Delete the character under the cursor (at end of line:
|
||||
character before the cursor) (see |:fixdel| if your <Del>
|
||||
key does not do what you want).
|
||||
@@ -118,7 +118,7 @@ CTRL-U Remove all characters between the cursor position and
|
||||
preferred behavior, add the following to your .vimrc: >
|
||||
:cnoremap <C-U> <C-E><C-U>
|
||||
<
|
||||
*c_<Insert>*
|
||||
*c_<Insert>* *c_Insert*
|
||||
<Insert> Toggle between insert and overstrike. {not in Vi}
|
||||
|
||||
{char1} <BS> {char2} or *c_digraph*
|
||||
@@ -224,9 +224,9 @@ CTRL-Y When there is a modeless selection, copy the selection into
|
||||
the clipboard. |modeless-selection|
|
||||
If there is no selection CTRL-Y is inserted as a character.
|
||||
|
||||
CTRL-J *c_CTRL-J* *c_<NL>* *c_<CR>*
|
||||
CTRL-J *c_CTRL-J* *c_<NL>* *c_<CR>* *c_CR*
|
||||
<CR> or <NL> start entered command
|
||||
*c_<Esc>*
|
||||
*c_<Esc>* *c_Esc*
|
||||
<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.
|
||||
@@ -235,12 +235,12 @@ CTRL-J *c_CTRL-J* *c_<NL>* *c_<CR>*
|
||||
*c_CTRL-C*
|
||||
CTRL-C quit command-line without executing
|
||||
|
||||
*c_<Up>*
|
||||
*c_<Up>* *c_Up*
|
||||
<Up> recall older command-line from history, whose beginning
|
||||
matches the current command-line (see below).
|
||||
{not available when compiled without the |+cmdline_hist|
|
||||
feature}
|
||||
*c_<Down>*
|
||||
*c_<Down>* *c_Down*
|
||||
<Down> recall more recent command-line from history, whose beginning
|
||||
matches the current command-line (see below).
|
||||
{not available when compiled without the |+cmdline_hist|
|
||||
@@ -372,10 +372,10 @@ word before the cursor. This is available for:
|
||||
- Mappings: Only after a ":map" or similar command.
|
||||
- Variable and function names: Only after a ":if", ":call" or similar command.
|
||||
|
||||
When Vim was compiled with the |+cmdline_compl| feature disabled, only file
|
||||
names, directories and help items can be completed. The number of help item
|
||||
matches is limited (currently to 300) to avoid a long delay when there are
|
||||
very many matches.
|
||||
When Vim was compiled without the |+cmdline_compl| feature only file names,
|
||||
directories and help items can be completed. The number of help item matches
|
||||
is limited (currently to 300) to avoid a long delay when there are very many
|
||||
matches.
|
||||
|
||||
These are the commands that can be used:
|
||||
|
||||
@@ -782,30 +782,34 @@ it, no matter how many backslashes.
|
||||
*:<cword>* *:<cWORD>* *:<cfile>* *<cfile>*
|
||||
*:<sfile>* *<sfile>* *:<afile>* *<afile>*
|
||||
*:<abuf>* *<abuf>* *:<amatch>* *<amatch>*
|
||||
*E495* *E496* *E497* *E498* *E499* *E500*
|
||||
*<slnum>* *E495* *E496* *E497* *E499* *E500*
|
||||
Note: these are typed literally, they are not special keys!
|
||||
<cword> is replaced with the word under the cursor (like |star|)
|
||||
<cWORD> is replaced with the WORD under the cursor (see |WORD|)
|
||||
<cfile> is replaced with the path name under the cursor (like what
|
||||
|gf| uses)
|
||||
<afile> when executing autocommands, is replaced with the file name
|
||||
for a file read or write
|
||||
<abuf> when executing autocommands, is replaced with the currently
|
||||
<afile> When executing autocommands, is replaced with the file name
|
||||
for a file read or write.
|
||||
<abuf> When executing autocommands, is replaced with the currently
|
||||
effective buffer number (for ":r file" and ":so file" it is
|
||||
the current buffer, the file being read/sourced is not in a
|
||||
buffer).
|
||||
<amatch> when executing autocommands, is replaced with the match for
|
||||
<amatch> When executing autocommands, is replaced with the match for
|
||||
which this autocommand was executed. It differs from
|
||||
<afile> only when the file name isn't used to match with
|
||||
(for FileType, Syntax and SpellFileMissing events).
|
||||
<sfile> when executing a ":source" command, is replaced with the
|
||||
file name of the sourced file;
|
||||
when executing a function, is replaced with
|
||||
<sfile> When executing a ":source" command, is replaced with the
|
||||
file name of the sourced file. *E498*
|
||||
When executing a function, is replaced with
|
||||
"function {function-name}"; function call nesting is
|
||||
indicated like this:
|
||||
"function {function-name1}..{function-name2}". Note that
|
||||
filename-modifiers are useless when <sfile> is used inside
|
||||
a function.
|
||||
<slnum> When executing a ":source" command, is replaced with the
|
||||
line number. *E842*
|
||||
When executing a function it's the line number relative to
|
||||
the start of the function.
|
||||
|
||||
*filename-modifiers*
|
||||
*:_%:* *::8* *::p* *::.* *::~* *::h* *::t* *::r* *::e* *::s* *::gs*
|
||||
@@ -861,7 +865,7 @@ These modifiers can be given, in this order:
|
||||
After this, the previous modifiers can be used again. For
|
||||
example ":p", to make a full path after the substitution.
|
||||
:gs?pat?sub?
|
||||
Substitute all occurrences of "path" with "sub". Otherwise
|
||||
Substitute all occurrences of "pat" with "sub". Otherwise
|
||||
this works like ":s".
|
||||
|
||||
Examples, when the file name is "src/version.c", current dir
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*debug.txt* For Vim version 7.3. Last change: 2010 Sep 14
|
||||
*debug.txt* For Vim version 7.3. Last change: 2010 Dec 22
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -21,8 +21,8 @@ When Vim crashes in one of the test files, and you are using gcc for
|
||||
compilation, here is what you can do to find out exactly where Vim crashes.
|
||||
This also applies when using the MingW tools.
|
||||
|
||||
1. Compile Vim with the "-g" option (there is a line in the Makefile for this,
|
||||
which you can uncomment). Also make sure "strip" is disabled (do not
|
||||
1. Compile Vim with the "-g" option (there is a line in the src/Makefile for
|
||||
this, which you can uncomment). Also make sure "strip" is disabled (do not
|
||||
install it, or use the line "STRIP = /bin/true").
|
||||
|
||||
2. Execute these commands (replace "11" with the test that fails): >
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*diff.txt* For Vim version 7.3. Last change: 2010 Sep 30
|
||||
*diff.txt* For Vim version 7.3. Last change: 2011 Apr 14
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -167,8 +167,8 @@ in diff mode in one window and "normal" in another window. It is also
|
||||
possible to view the changes you have made to a buffer since the file was
|
||||
loaded. Since Vim doesn't allow having two buffers for the same file, you
|
||||
need another buffer. This command is useful: >
|
||||
command DiffOrig vert new | set bt=nofile | r # | 0d_ | diffthis
|
||||
\ | wincmd p | diffthis
|
||||
command DiffOrig vert new | set bt=nofile | r ++edit # | 0d_
|
||||
\ | diffthis | wincmd p | diffthis
|
||||
(this is in |vimrc_example.vim|). Use ":DiffOrig" to see the differences
|
||||
between the current buffer and the file it was loaded from.
|
||||
|
||||
@@ -373,9 +373,9 @@ get an error message. Possible causes:
|
||||
If it's not clear what the problem is set the 'verbose' option to one or more
|
||||
to see more messages.
|
||||
|
||||
The self-installing Vim includes a diff program. If you don't have it you
|
||||
might want to download a diff.exe. For example from
|
||||
http://jlb.twu.net/code/unixkit.php.
|
||||
The self-installing Vim for MS-Windows includes a diff program. If you don't
|
||||
have it you might want to download a diff.exe. For example from
|
||||
http://gnuwin32.sourceforge.net/packages/diffutils.htm.
|
||||
|
||||
|
||||
USING PATCHES *diff-patchexpr*
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,4 +1,4 @@
|
||||
*editing.txt* For Vim version 7.3. Last change: 2010 Sep 18
|
||||
*editing.txt* For Vim version 7.3. Last change: 2011 Feb 26
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -276,10 +276,11 @@ If you want to keep the changed buffer without saving it, switch on the
|
||||
'readonly' option for this buffer. {not in Vi}
|
||||
|
||||
*CTRL-^* *CTRL-6*
|
||||
CTRL-^ Edit the alternate file (equivalent to ":e #").
|
||||
Mostly the alternate file is the previously edited
|
||||
file. This is a quick way to toggle between two
|
||||
files.
|
||||
CTRL-^ Edit the alternate file. Mostly the alternate file is
|
||||
the previously edited file. This is a quick way to
|
||||
toggle between two files. It is equivalent to ":e #",
|
||||
except that it also works when there is no file name.
|
||||
|
||||
If the 'autowrite' or 'autowriteall' option is on and
|
||||
the buffer was changed, write it.
|
||||
Mostly the ^ character is positioned on the 6 key,
|
||||
@@ -984,6 +985,11 @@ explanation of when the copy is made and when the file is renamed.
|
||||
If the creation of a backup file fails, the write is not done. If you want
|
||||
to write anyway add a '!' to the command.
|
||||
|
||||
*write-permissions*
|
||||
When writing a new file the permissions are read-write. For unix the mask is
|
||||
0666 with additionally umask applied. When writing a file that was read Vim
|
||||
will preserve the permissions, but clear the s-bit.
|
||||
|
||||
*write-readonly*
|
||||
When the 'cpoptions' option contains 'W', Vim will refuse to overwrite a
|
||||
readonly file. When 'W' is not present, ":w!" will overwrite a readonly file,
|
||||
@@ -1340,7 +1346,7 @@ Vim is able to write files encrypted, and read them back. The encrypted text
|
||||
cannot be read without the right key.
|
||||
{only available when compiled with the |+cryptv| feature} *E833*
|
||||
|
||||
The text in the swap file and the undo file is also encrypted.
|
||||
The text in the swap file and the undo file is also encrypted. *E843*
|
||||
|
||||
Note: The text in memory is not encrypted. A system administrator may be able
|
||||
to see your text while you are editing it. When filtering text with
|
||||
@@ -1382,6 +1388,8 @@ To set the default method, used for new files, use one of these in your
|
||||
|vimrc| file: >
|
||||
set cm=zip
|
||||
set cm=blowfish
|
||||
The message given for reading and writing a file will show "[crypted]" when
|
||||
using zip, "[blowfish]" when using blowfish.
|
||||
|
||||
When writing an undo file, the same key and method will be used for the text
|
||||
in the undo file. |persistent-undo|.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*eval.txt* For Vim version 7.3. Last change: 2010 Oct 18
|
||||
*eval.txt* For Vim version 7.3. Last change: 2011 Aug 29
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -39,7 +39,7 @@ done, the features in this document are not available. See |+eval| and
|
||||
*E712*
|
||||
There are six types of variables:
|
||||
|
||||
Number A 32 bit signed number. |expr-number| *Number*
|
||||
Number A 32 or 64 bit signed number. |expr-number| *Number*
|
||||
Examples: -123 0x10 0177
|
||||
|
||||
Float A floating point number. |floating-point-format| *Float*
|
||||
@@ -721,7 +721,8 @@ if it evaluates to true.
|
||||
*expr-<#* *expr-<=#* *expr-=~#* *expr-!~#*
|
||||
*expr-==?* *expr-!=?* *expr->?* *expr->=?*
|
||||
*expr-<?* *expr-<=?* *expr-=~?* *expr-!~?*
|
||||
*expr-is*
|
||||
*expr-is* *expr-isnot* *expr-is#* *expr-isnot#*
|
||||
*expr-is?* *expr-isnot?*
|
||||
use 'ignorecase' match case ignore case ~
|
||||
equal == ==# ==?
|
||||
not equal != !=# !=?
|
||||
@@ -731,8 +732,8 @@ smaller than < <# <?
|
||||
smaller than or equal <= <=# <=?
|
||||
regexp matches =~ =~# =~?
|
||||
regexp doesn't match !~ !~# !~?
|
||||
same instance is
|
||||
different instance isnot
|
||||
same instance is is# is?
|
||||
different instance isnot isnot# isnot?
|
||||
|
||||
Examples:
|
||||
"abc" ==# "Abc" evaluates to 0
|
||||
@@ -753,12 +754,14 @@ recursively. Ignoring case means case is ignored when comparing item values.
|
||||
A |Funcref| can only be compared with a |Funcref| and only "equal" and "not
|
||||
equal" can be used. Case is never ignored.
|
||||
|
||||
When using "is" or "isnot" with a |List| this checks if the expressions are
|
||||
referring to the same |List| instance. A copy of a |List| is different from
|
||||
the original |List|. When using "is" without a |List| it is equivalent to
|
||||
using "equal", using "isnot" equivalent to using "not equal". Except that a
|
||||
different type means the values are different. "4 == '4'" is true, "4 is '4'"
|
||||
is false.
|
||||
When using "is" or "isnot" with a |List| or a |Dictionary| this checks if the
|
||||
expressions are referring to the same |List| or |Dictionary| instance. A copy
|
||||
of a |List| is different from the original |List|. When using "is" without
|
||||
a |List| or a |Dictionary| it is equivalent to using "equal", using "isnot"
|
||||
equivalent to using "not equal". Except that a different type means the
|
||||
values are different: "4 == '4'" is true, "4 is '4'" is false and "0 is []" is
|
||||
false and not a error. "is#"/"isnot#" and "is?"/"isnot?" can be used to match
|
||||
and ignore case.
|
||||
|
||||
When comparing a String with a Number, the String is converted to a Number,
|
||||
and the comparison is done on Numbers. This means that "0 == 'x'" is TRUE,
|
||||
@@ -1286,11 +1289,14 @@ v:beval_text The text under or after the mouse pointer. Usually a word as
|
||||
|
||||
*v:beval_winnr* *beval_winnr-variable*
|
||||
v:beval_winnr The number of the window, over which the mouse pointer is. Only
|
||||
valid while evaluating the 'balloonexpr' option.
|
||||
valid while evaluating the 'balloonexpr' option. The first
|
||||
window has number zero (unlike most other places where a
|
||||
window gets a number).
|
||||
|
||||
*v:char* *char-variable*
|
||||
v:char Argument for evaluating 'formatexpr' and used for the typed
|
||||
character when using <expr> in an abbreviation |:map-<expr>|.
|
||||
It is also used by the |InsertCharPre| event.
|
||||
|
||||
*v:charconvert_from* *charconvert_from-variable*
|
||||
v:charconvert_from
|
||||
@@ -1542,8 +1548,11 @@ v:progname Contains the name (with path removed) with which Vim was
|
||||
Read-only.
|
||||
|
||||
*v:register* *register-variable*
|
||||
v:register The name of the register supplied to the last normal mode
|
||||
command. Empty if none were supplied. |getreg()| |setreg()|
|
||||
v:register The name of the register in effect for the current normal mode
|
||||
command. If none is supplied it is the default register '"',
|
||||
unless 'clipboard' contains "unnamed" or "unnamedplus", then
|
||||
it is '*' or '+'.
|
||||
Also see |getreg()| and |setreg()|
|
||||
|
||||
*v:scrollstart* *scrollstart-variable*
|
||||
v:scrollstart String describing the script or function that caused the
|
||||
@@ -1660,7 +1669,11 @@ v:warningmsg Last given warning message. It's allowed to set this variable.
|
||||
*v:windowid* *windowid-variable*
|
||||
v:windowid When any X11 based GUI is running or when running in a
|
||||
terminal and Vim connects to the X server (|-X|) this will be
|
||||
set to the window ID. Otherwise the value is zero.
|
||||
set to the window ID.
|
||||
When an MS-Windows GUI is running this will be set to the
|
||||
window handle.
|
||||
Otherwise the value is zero.
|
||||
Note: for windows inside Vim use |winnr()|.
|
||||
|
||||
==============================================================================
|
||||
4. Builtin Functions *functions*
|
||||
@@ -1909,14 +1922,15 @@ shellescape( {string} [, {special}])
|
||||
simplify( {filename}) String simplify filename as much as possible
|
||||
sin( {expr}) Float sine of {expr}
|
||||
sinh( {expr}) Float hyperbolic sine of {expr}
|
||||
sort( {list} [, {func}]) List sort {list}, using {func} to compare
|
||||
sort( {list} [, {func} [, {dict}]])
|
||||
List sort {list}, using {func} to compare
|
||||
soundfold( {word}) String sound-fold {word}
|
||||
spellbadword() String badly spelled word at cursor
|
||||
spellsuggest( {word} [, {max} [, {capital}]])
|
||||
List spelling suggestions
|
||||
split( {expr} [, {pat} [, {keepempty}]])
|
||||
List make |List| from {pat} separated {expr}
|
||||
sqrt( {expr} Float squar root of {expr}
|
||||
sqrt( {expr}) Float square root of {expr}
|
||||
str2float( {expr}) Float convert String to Float
|
||||
str2nr( {expr} [, {base}]) Number convert String to Number
|
||||
strchars( {expr}) Number character length of the String {expr}
|
||||
@@ -1932,7 +1946,7 @@ strridx( {haystack}, {needle} [, {start}])
|
||||
Number last index of {needle} in {haystack}
|
||||
strtrans( {expr}) String translate string to make it printable
|
||||
strwidth( {expr}) Number display cell length of the String {expr}
|
||||
submatch( {nr}) String specific match in ":substitute"
|
||||
submatch( {nr}) String specific match in ":s" or substitute()
|
||||
substitute( {expr}, {pat}, {sub}, {flags})
|
||||
String all {pat} in {expr} replaced with {sub}
|
||||
synID( {lnum}, {col}, {trans}) Number syntax ID at {lnum} and {col}
|
||||
@@ -1955,7 +1969,7 @@ tolower( {expr}) String the String {expr} switched to lowercase
|
||||
toupper( {expr}) String the String {expr} switched to uppercase
|
||||
tr( {src}, {fromstr}, {tostr}) String translate chars of {src} in {fromstr}
|
||||
to chars in {tostr}
|
||||
trunc( {expr} Float truncate Float {expr}
|
||||
trunc( {expr}) Float truncate Float {expr}
|
||||
type( {name}) Number type of variable {name}
|
||||
undofile( {name}) String undo file name for {name}
|
||||
undotree() List undo file tree
|
||||
@@ -2263,7 +2277,8 @@ char2nr({expr}) *char2nr()*
|
||||
< The current 'encoding' is used. Example for "utf-8": >
|
||||
char2nr("<22>") returns 225
|
||||
char2nr("<22>"[0]) returns 195
|
||||
< |nr2char()| does the opposite.
|
||||
< A combining character is a separate character.
|
||||
|nr2char()| does the opposite.
|
||||
|
||||
cindent({lnum}) *cindent()*
|
||||
Get the amount of indent for line {lnum} according the C
|
||||
@@ -2716,7 +2731,7 @@ exp({expr}) *exp()*
|
||||
|
||||
expand({expr} [, {flag}]) *expand()*
|
||||
Expand wildcards and the following special keywords in {expr}.
|
||||
The result is a String.
|
||||
The result is a String. 'wildignorecase' applies.
|
||||
|
||||
When there are several matches, they are separated by <NL>
|
||||
characters. [Note: in version 5.0 a space was used, which
|
||||
@@ -2737,6 +2752,7 @@ expand({expr} [, {flag}]) *expand()*
|
||||
<abuf> autocmd buffer number (as a String!)
|
||||
<amatch> autocmd matched name
|
||||
<sfile> sourced script file name
|
||||
<slnum> sourced script file line number
|
||||
<cword> word under the cursor
|
||||
<cWORD> WORD under the cursor
|
||||
<client> the {clientid} of the last received
|
||||
@@ -3430,6 +3446,7 @@ glob({expr} [, {flag}]) *glob()*
|
||||
the 'suffixes' and 'wildignore' options apply: Names matching
|
||||
one of the patterns in 'wildignore' will be skipped and
|
||||
'suffixes' affect the ordering of matches.
|
||||
'wildignorecase' always applies.
|
||||
If the expansion fails, the result is an empty string.
|
||||
A name for a non-existing file is not included.
|
||||
|
||||
@@ -4005,7 +4022,7 @@ maparg({name}[, {mode} [, {abbr} [, {dict}]]]) *maparg()*
|
||||
"lhs" The {lhs} of the mapping.
|
||||
"rhs" The {rhs} of the mapping as typed.
|
||||
"silent" 1 for a |:map-silent| mapping, else 0.
|
||||
"noremap" 1 if the {rhs} of the mapping is remappable.
|
||||
"noremap" 1 if the {rhs} of the mapping is not remappable.
|
||||
"expr" 1 for an expression mapping (|:map-<expr>|).
|
||||
"buffer" 1 for a buffer local mapping (|:map-local|).
|
||||
"mode" Modes for which the mapping is defined. In
|
||||
@@ -4013,9 +4030,9 @@ maparg({name}[, {mode} [, {abbr} [, {dict}]]]) *maparg()*
|
||||
characters will be used:
|
||||
" " Normal, Visual and Operator-pending
|
||||
"!" Insert and Commandline mode
|
||||
(|mapmpde-ic|)
|
||||
"sid" the Script local ID, used for <sid> mappings
|
||||
(|<SID>|)
|
||||
(|mapmode-ic|)
|
||||
"sid" The script local ID, used for <sid> mappings
|
||||
(|<SID>|).
|
||||
|
||||
The mappings local to the current buffer are checked first,
|
||||
then the global mappings.
|
||||
@@ -4065,6 +4082,7 @@ match({expr}, {pat}[, {start}[, {count}]]) *match()*
|
||||
{pat} matches.
|
||||
A match at the first character or |List| item returns zero.
|
||||
If there is no match -1 is returned.
|
||||
For getting submatches see |matchlist()|.
|
||||
Example: >
|
||||
:echo match("testing", "ing") " results in 4
|
||||
:echo match([1, 'x'], '\a') " results in 1
|
||||
@@ -5262,7 +5280,7 @@ sinh({expr}) *sinh()*
|
||||
{only available when compiled with the |+float| feature}
|
||||
|
||||
|
||||
sort({list} [, {func}]) *sort()* *E702*
|
||||
sort({list} [, {func} [, {dict}]]) *sort()* *E702*
|
||||
Sort the items in {list} in-place. Returns {list}. If you
|
||||
want a list to remain unmodified make a copy first: >
|
||||
:let sortedlist = sort(copy(mylist))
|
||||
@@ -5270,6 +5288,8 @@ sort({list} [, {func}]) *sort()* *E702*
|
||||
Numbers sort after Strings, |Lists| after Numbers.
|
||||
For sorting text in the current buffer use |:sort|.
|
||||
When {func} is given and it is one then case is ignored.
|
||||
{dict} is for functions with the "dict" attribute. It will be
|
||||
used to set the local variable "self". |Dictionary-function|
|
||||
When {func} is a |Funcref| or a function name, this function
|
||||
is called to compare items. The function is invoked with two
|
||||
items as argument and must return zero if they are equal, 1 or
|
||||
@@ -5450,8 +5470,8 @@ stridx({haystack}, {needle} [, {start}]) *stridx()*
|
||||
{haystack} of the first occurrence of the String {needle}.
|
||||
If {start} is specified, the search starts at index {start}.
|
||||
This can be used to find a second match: >
|
||||
:let comma1 = stridx(line, ",")
|
||||
:let comma2 = stridx(line, ",", comma1 + 1)
|
||||
:let colon1 = stridx(line, ":")
|
||||
:let colon2 = stridx(line, ":", colon1 + 1)
|
||||
< The search is done case-sensitive.
|
||||
For pattern searches use |match()|.
|
||||
-1 is returned if the {needle} does not occur in {haystack}.
|
||||
@@ -5541,9 +5561,11 @@ strwidth({expr}) *strwidth()*
|
||||
Also see |strlen()|, |strdisplaywidth()| and |strchars()|.
|
||||
|
||||
submatch({nr}) *submatch()*
|
||||
Only for an expression in a |:substitute| command. Returns
|
||||
the {nr}'th submatch of the matched text. When {nr} is 0
|
||||
the whole matched text is returned.
|
||||
Only for an expression in a |:substitute| command or
|
||||
substitute() function.
|
||||
Returns the {nr}'th submatch of the matched text. When {nr}
|
||||
is 0 the whole matched text is returned.
|
||||
Also see |sub-replace-expression|.
|
||||
Example: >
|
||||
:s/\d\+/\=submatch(0) + 1/
|
||||
< This finds the first number in the line and adds one to it.
|
||||
@@ -5551,26 +5573,35 @@ submatch({nr}) *submatch()*
|
||||
|
||||
substitute({expr}, {pat}, {sub}, {flags}) *substitute()*
|
||||
The result is a String, which is a copy of {expr}, in which
|
||||
the first match of {pat} is replaced with {sub}. This works
|
||||
like the ":substitute" command (without any flags). But the
|
||||
matching with {pat} is always done like the 'magic' option is
|
||||
set and 'cpoptions' is empty (to make scripts portable).
|
||||
'ignorecase' is still relevant. 'smartcase' is not used.
|
||||
See |string-match| for how {pat} is used.
|
||||
And a "~" in {sub} is not replaced with the previous {sub}.
|
||||
the first match of {pat} is replaced with {sub}.
|
||||
When {flags} is "g", all matches of {pat} in {expr} are
|
||||
replaced. Otherwise {flags} should be "".
|
||||
|
||||
This works like the ":substitute" command (without any flags).
|
||||
But the matching with {pat} is always done like the 'magic'
|
||||
option is set and 'cpoptions' is empty (to make scripts
|
||||
portable). 'ignorecase' is still relevant. 'smartcase' is
|
||||
not used. See |string-match| for how {pat} is used.
|
||||
|
||||
A "~" in {sub} is not replaced with the previous {sub}.
|
||||
Note that some codes in {sub} have a special meaning
|
||||
|sub-replace-special|. For example, to replace something with
|
||||
"\n" (two characters), use "\\\\n" or '\\n'.
|
||||
|
||||
When {pat} does not match in {expr}, {expr} is returned
|
||||
unmodified.
|
||||
When {flags} is "g", all matches of {pat} in {expr} are
|
||||
replaced. Otherwise {flags} should be "".
|
||||
|
||||
Example: >
|
||||
:let &path = substitute(&path, ",\\=[^,]*$", "", "")
|
||||
< This removes the last component of the 'path' option. >
|
||||
:echo substitute("testing", ".*", "\\U\\0", "")
|
||||
< results in "TESTING".
|
||||
|
||||
When {sub} starts with "\=", the remainder is interpreted as
|
||||
an expression. See |sub-replace-expression|. Example: >
|
||||
:echo substitute(s, '%\(\x\x\)',
|
||||
\ '\=nr2char("0x" . submatch(1))', 'g')
|
||||
|
||||
synID({lnum}, {col}, {trans}) *synID()*
|
||||
The result is a Number, which is the syntax ID at the position
|
||||
{lnum} and {col} in the current window.
|
||||
@@ -5938,7 +5969,7 @@ virtcol({expr}) *virtcol()*
|
||||
When 'virtualedit' is used {expr} can be [lnum, col, off], where
|
||||
"off" is the offset in screen columns from the start of the
|
||||
character. E.g., a position within a <Tab> or after the last
|
||||
character.
|
||||
character. When "off" is omitted zero is used.
|
||||
When Virtual editing is active in the current mode, a position
|
||||
beyond the end of the line can be returned. |'virtualedit'|
|
||||
The accepted positions are:
|
||||
@@ -6127,17 +6158,17 @@ cmdline_compl Compiled with |cmdline-completion| support.
|
||||
cmdline_hist Compiled with |cmdline-history| support.
|
||||
cmdline_info Compiled with 'showcmd' and 'ruler' support.
|
||||
comments Compiled with |'comments'| support.
|
||||
compatible Compiled to be very Vi compatible.
|
||||
cryptv Compiled with encryption support |encryption|.
|
||||
cscope Compiled with |cscope| support.
|
||||
compatible Compiled to be very Vi compatible.
|
||||
debug Compiled with "DEBUG" defined.
|
||||
dialog_con Compiled with console dialog support.
|
||||
dialog_gui Compiled with GUI dialog support.
|
||||
diff Compiled with |vimdiff| and 'diff' support.
|
||||
digraphs Compiled with support for digraphs.
|
||||
dnd Compiled with support for the "~ register |quote_~|.
|
||||
dos32 32 bits DOS (DJGPP) version of Vim.
|
||||
dos16 16 bits DOS version of Vim.
|
||||
dos32 32 bits DOS (DJGPP) version of Vim.
|
||||
ebcdic Compiled on a machine with ebcdic character set.
|
||||
emacs_tags Compiled with support for Emacs tags.
|
||||
eval Compiled with expression evaluation support. Always
|
||||
@@ -6160,15 +6191,15 @@ fork Compiled to use fork()/exec() instead of system().
|
||||
gettext Compiled with message translation |multi-lang|
|
||||
gui Compiled with GUI enabled.
|
||||
gui_athena Compiled with Athena GUI.
|
||||
gui_gnome Compiled with Gnome support (gui_gtk is also defined).
|
||||
gui_gtk Compiled with GTK+ GUI (any version).
|
||||
gui_gtk2 Compiled with GTK+ 2 GUI (gui_gtk is also defined).
|
||||
gui_gnome Compiled with Gnome support (gui_gtk is also defined).
|
||||
gui_mac Compiled with Macintosh GUI.
|
||||
gui_motif Compiled with Motif GUI.
|
||||
gui_photon Compiled with Photon GUI.
|
||||
gui_running Vim is running in the GUI, or it will start soon.
|
||||
gui_win32 Compiled with MS Windows Win32 GUI.
|
||||
gui_win32s idem, and Win32s system being used (Windows 3.1)
|
||||
gui_running Vim is running in the GUI, or it will start soon.
|
||||
hangul_input Compiled with Hangul input support. |hangul|
|
||||
iconv Can use iconv() for conversion.
|
||||
insert_expand Compiled with support for CTRL-X expansion commands in
|
||||
@@ -6190,30 +6221,30 @@ menu Compiled with support for |:menu|.
|
||||
mksession Compiled with support for |:mksession|.
|
||||
modify_fname Compiled with file name modifiers. |filename-modifiers|
|
||||
mouse Compiled with support mouse.
|
||||
mouseshape Compiled with support for 'mouseshape'.
|
||||
mouse_dec Compiled with support for Dec terminal mouse.
|
||||
mouse_gpm Compiled with support for gpm (Linux console mouse)
|
||||
mouse_netterm Compiled with support for netterm mouse.
|
||||
mouse_pterm Compiled with support for qnx pterm mouse.
|
||||
mouse_sysmouse Compiled with support for sysmouse (*BSD console mouse)
|
||||
mouse_xterm Compiled with support for xterm mouse.
|
||||
mouseshape Compiled with support for 'mouseshape'.
|
||||
multi_byte Compiled with support for 'encoding'
|
||||
multi_byte_encoding 'encoding' is set to a multi-byte encoding.
|
||||
multi_byte_ime Compiled with support for IME input method.
|
||||
multi_lang Compiled with support for multiple languages.
|
||||
mzscheme Compiled with MzScheme interface |mzscheme|.
|
||||
netbeans_intg Compiled with support for |netbeans|.
|
||||
netbeans_enabled Compiled with support for |netbeans| and connected.
|
||||
netbeans_intg Compiled with support for |netbeans|.
|
||||
ole Compiled with OLE automation support for Win32.
|
||||
os2 OS/2 version of Vim.
|
||||
osfiletype Compiled with support for osfiletypes |+osfiletype|
|
||||
path_extra Compiled with up/downwards search in 'path' and 'tags'
|
||||
perl Compiled with Perl interface.
|
||||
persistent_undo Compiled with support for persistent undo history.
|
||||
postscript Compiled with PostScript file printing.
|
||||
printer Compiled with |:hardcopy| support.
|
||||
profile Compiled with |:profile| support.
|
||||
python Compiled with Python interface.
|
||||
python Compiled with Python 2.x interface. |has-python|
|
||||
python3 Compiled with Python 3.x interface. |has-python|
|
||||
qnx QNX version of Vim.
|
||||
quickfix Compiled with |quickfix| support.
|
||||
reltime Compiled with |reltime()| support.
|
||||
@@ -6224,11 +6255,11 @@ showcmd Compiled with 'showcmd' support.
|
||||
signs Compiled with |:sign| support.
|
||||
smartindent Compiled with 'smartindent' support.
|
||||
sniff Compiled with SNiFF interface support.
|
||||
spell Compiled with spell checking support |spell|.
|
||||
startuptime Compiled with |--startuptime| support.
|
||||
statusline Compiled with support for 'statusline', 'rulerformat'
|
||||
and special formats of 'titlestring' and 'iconstring'.
|
||||
sun_workshop Compiled with support for Sun |workshop|.
|
||||
spell Compiled with spell checking support |spell|.
|
||||
syntax Compiled with syntax highlighting support |syntax|.
|
||||
syntax_items There are active syntax highlighting items for the
|
||||
current buffer.
|
||||
@@ -6249,9 +6280,9 @@ title Compiled with window title support |'title'|.
|
||||
toolbar Compiled with support for |gui-toolbar|.
|
||||
unix Unix version of Vim.
|
||||
user_commands User-defined commands.
|
||||
viminfo Compiled with viminfo support.
|
||||
vim_starting True while initial source'ing takes place. |startup|
|
||||
vertsplit Compiled with vertically split windows |:vsplit|.
|
||||
vim_starting True while initial source'ing takes place. |startup|
|
||||
viminfo Compiled with viminfo support.
|
||||
virtualedit Compiled with 'virtualedit' option.
|
||||
visual Compiled with Visual mode.
|
||||
visualextra Compiled with extra Visual mode commands.
|
||||
@@ -6260,13 +6291,14 @@ vms VMS version of Vim.
|
||||
vreplace Compiled with |gR| and |gr| commands.
|
||||
wildignore Compiled with 'wildignore' option.
|
||||
wildmenu Compiled with 'wildmenu' option.
|
||||
windows Compiled with support for more than one window.
|
||||
winaltkeys Compiled with 'winaltkeys' option.
|
||||
win16 Win16 version of Vim (MS-Windows 3.1).
|
||||
win32 Win32 version of Vim (MS-Windows 95/98/ME/NT/2000/XP).
|
||||
win64 Win64 version of Vim (MS-Windows 64 bit).
|
||||
win32 Win32 version of Vim (MS-Windows 95 and later, 32 or
|
||||
64 bits)
|
||||
win32unix Win32 version of Vim, using Unix files (Cygwin)
|
||||
win64 Win64 version of Vim (MS-Windows 64 bit).
|
||||
win95 Win32 version for MS-Windows 95/98/ME.
|
||||
winaltkeys Compiled with 'winaltkeys' option.
|
||||
windows Compiled with support for more than one window.
|
||||
writebackup Compiled with 'writebackup' default on.
|
||||
xfontset Compiled with X fontset support |xfontset|.
|
||||
xim Compiled with X input method support |xim|.
|
||||
@@ -7062,7 +7094,9 @@ This would call the function "my_func_whizz(parameter)".
|
||||
is terminated.
|
||||
Example: >
|
||||
:try | throw "oops" | catch /^oo/ | echo "caught" | endtry
|
||||
<
|
||||
< Note that "catch" may need to be on a separate line
|
||||
for when an error causes the parsing to skip the whole
|
||||
line and not see the "|" that separates the commands.
|
||||
|
||||
*:ec* *:echo*
|
||||
:ec[ho] {expr1} .. Echoes each {expr1}, with a space in between. The
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*filetype.txt* For Vim version 7.3. Last change: 2008 Jul 15
|
||||
*filetype.txt* For Vim version 7.3. Last change: 2011 Jun 19
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -270,6 +270,9 @@ directories!
|
||||
|
||||
|
||||
*autocmd-osfiletypes*
|
||||
NOTE: this code is currently disabled, as the RISC OS implementation was
|
||||
removed. In the future this will use the 'filetype' option.
|
||||
|
||||
On operating systems which support storing a file type with the file, you can
|
||||
specify that an autocommand should only be executed if the file is of a
|
||||
certain type.
|
||||
@@ -296,8 +299,6 @@ must both match): >
|
||||
|
||||
This will match files of type "&fff" whose names start with "diff".
|
||||
|
||||
Note that osfiletype checking is skipped if Vim is compiled without the
|
||||
|+osfiletype| feature.
|
||||
|
||||
*plugin-details*
|
||||
The "plugin" directory can be in any of the directories in the 'runtimepath'
|
||||
|
||||
@@ -60,7 +60,7 @@ level form a fold, with the lines with a higher level forming a nested fold.
|
||||
The nesting of folds is limited with 'foldnestmax'.
|
||||
|
||||
Some lines are ignored and get the fold level of the line above or below it,
|
||||
whatever is the lowest. These are empty or white lines and lines starting
|
||||
whichever is lower. These are empty or white lines and lines starting
|
||||
with a character in 'foldignore'. White space is skipped before checking for
|
||||
characters in 'foldignore'. For C use "#" to ignore preprocessor lines.
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*gui.txt* For Vim version 7.3. Last change: 2010 May 14
|
||||
*gui.txt* For Vim version 7.3. Last change: 2011 Jul 22
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -147,6 +147,15 @@ task bar with the 'guiheadroom' option.
|
||||
If you are running the X Window System, you can get information about the
|
||||
window Vim is running in with this command: >
|
||||
:!xwininfo -id $WINDOWID
|
||||
<
|
||||
*gui-IME* *iBus*
|
||||
Input methods for international characters in X that rely on the XIM
|
||||
framework, most notably iBus, have been known to produce undesirable results
|
||||
in gVim. These may include an inability to enter spaces, or long delays
|
||||
between typing a character and it being recognized by the application.
|
||||
|
||||
One workaround that has been successful, for unknown reasons, is to prevent
|
||||
gvim from forking into the background by starting it with the |-f| argument.
|
||||
|
||||
==============================================================================
|
||||
2. Scrollbars *gui-scrollbars*
|
||||
@@ -156,26 +165,26 @@ configure which ones appear with the 'guioptions' option.
|
||||
|
||||
The interface looks like this (with ":set guioptions=mlrb"):
|
||||
|
||||
+------------------------------+
|
||||
| File Edit Help | <- Menu bar (m)
|
||||
+-+--------------------------+-+
|
||||
|^| |^|
|
||||
|#| Text area. |#|
|
||||
| | | |
|
||||
|v|__________________________|v|
|
||||
Normal status line -> |-+ File.c 5,2 +-|
|
||||
between Vim windows |^|""""""""""""""""""""""""""|^|
|
||||
| | | |
|
||||
| | Another file buffer. | |
|
||||
| | | |
|
||||
|#| |#|
|
||||
Left scrollbar (l) -> |#| |#| <- Right
|
||||
|#| |#| scrollbar (r)
|
||||
| | | |
|
||||
|v| |v|
|
||||
+-+--------------------------+-+
|
||||
| |< #### >| | <- Bottom
|
||||
+-+--------------------------+-+ scrollbar (b)
|
||||
+------------------------------+ `
|
||||
| File Edit Help | <- Menu bar (m) `
|
||||
+-+--------------------------+-+ `
|
||||
|^| |^| `
|
||||
|#| Text area. |#| `
|
||||
| | | | `
|
||||
|v|__________________________|v| `
|
||||
Normal status line -> |-+ File.c 5,2 +-| `
|
||||
between Vim windows |^|""""""""""""""""""""""""""|^| `
|
||||
| | | | `
|
||||
| | Another file buffer. | | `
|
||||
| | | | `
|
||||
|#| |#| `
|
||||
Left scrollbar (l) -> |#| |#| <- Right `
|
||||
|#| |#| scrollbar (r) `
|
||||
| | | | `
|
||||
|v| |v| `
|
||||
+-+--------------------------+-+ `
|
||||
| |< #### >| | <- Bottom `
|
||||
+-+--------------------------+-+ scrollbar (b) `
|
||||
|
||||
Any of the scrollbar or menu components may be turned off by not putting the
|
||||
appropriate letter in the 'guioptions' string. The bottom scrollbar is
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*gui_w32.txt* For Vim version 7.3. Last change: 2007 Aug 30
|
||||
*gui_w32.txt* For Vim version 7.3. Last change: 2011 Jul 23
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -137,6 +137,9 @@ options:
|
||||
And if there already is a gvim running:
|
||||
"Edit with existing gvim" -- edit the file with the running gvim
|
||||
|
||||
The "edit with existing Vim" entries can be disabled by adding an entry in the
|
||||
registry under HKLM\Software\Vim\Gvim, named DisableEditWithExisting, and with
|
||||
any value.
|
||||
*install-registry*
|
||||
You can add the "Edit with Vim" menu entry in an easy way by using the
|
||||
"install.exe" program. It will add several registry entries for you.
|
||||
@@ -293,7 +296,9 @@ Normally, Vim waits for a command to complete before continuing (this makes
|
||||
sense for most shell commands which produce output for Vim to use). If you
|
||||
want Vim to start a program and return immediately, you can use the following
|
||||
syntax on W95 & NT: >
|
||||
:!start {command}
|
||||
:!start [/min] {command}
|
||||
The optional "/min" causes the window to be minimized.
|
||||
|
||||
On Win32s, you will have to go to another window instead. Don't forget that
|
||||
you must tell Windows 3.1x to keep executing a DOS command in the background
|
||||
while you switch back to Vim.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*gui_x11.txt* For Vim version 7.3. Last change: 2010 Jul 20
|
||||
*gui_x11.txt* For Vim version 7.3. Last change: 2011 Sep 14
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -53,6 +53,8 @@ When using "gvim -f" and then ":gui", Vim will run in the foreground. The
|
||||
":gui -b".
|
||||
|
||||
"gvim --nofork" does the same as "gvim -f".
|
||||
*E851* *E852*
|
||||
When starting the GUI fails Vim will try to continue running in the terminal.
|
||||
|
||||
If you want the GUI to run in the foreground always, include the 'f'
|
||||
flag in 'guioptions'. |-f|.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*if_cscop.txt* For Vim version 7.3. Last change: 2010 Sep 29
|
||||
*if_cscop.txt* For Vim version 7.3. Last change: 2011 Jun 12
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Andy Kahn
|
||||
@@ -264,12 +264,22 @@ seems to be useful: >
|
||||
:set cscopequickfix=s-,c-,d-,i-,t-,e-
|
||||
<
|
||||
*cscopetag* *cst*
|
||||
If 'cscopetag' set, the commands ":tag" and CTRL-] as well as "vim -t" will
|
||||
always use |:cstag| instead of the default :tag behavior. Effectively, by
|
||||
setting 'cst', you will always search your cscope databases as well as your
|
||||
tag files. The default is off. Examples: >
|
||||
If 'cscopetag' is set, the commands ":tag" and CTRL-] as well as "vim -t"
|
||||
will always use |:cstag| instead of the default :tag behavior. Effectively,
|
||||
by setting 'cst', you will always search your cscope databases as well as
|
||||
your tag files. The default is off. Examples: >
|
||||
:set cst
|
||||
:set nocst
|
||||
<
|
||||
*cscoperelative* *csre*
|
||||
If 'cscoperelative' is set, then in absence of a prefix given to cscope
|
||||
(prefix is the argument of -P option of cscope), basename of cscope.out
|
||||
location (usually the project root directory) will be used as the prefix
|
||||
to construct an absolute path. The default is off. Note: This option is
|
||||
only effective when cscope (cscopeprg) is initialized without a prefix
|
||||
path (-P). Examples: >
|
||||
:set csre
|
||||
:set nocsre
|
||||
<
|
||||
*cscopetagorder* *csto*
|
||||
The value of 'csto' determines the order in which |:cstag| performs a search.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*if_pyth.txt* For Vim version 7.3. Last change: 2010 Oct 20
|
||||
*if_pyth.txt* For Vim version 7.3. Last change: 2011 Aug 19
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Paul Moore
|
||||
@@ -377,6 +377,18 @@ To work around such problems there are these options:
|
||||
3. You undefine PY_NO_RTLD_GLOBAL in auto/config.h after configuration. This
|
||||
may crash Vim though.
|
||||
|
||||
*has-python*
|
||||
You can test what Python version is available with: >
|
||||
if has('python')
|
||||
echo 'there is Python 2.x'
|
||||
elseif has('python3')
|
||||
echo 'there is Python 3.x'
|
||||
endif
|
||||
|
||||
Note however, that when Python 2 and 3 are both available and loaded
|
||||
dynamically, these has() calls will try to load them. If only one can be
|
||||
loaded at a time, just checking if Python 2 or 3 are available will prevent
|
||||
the other one from being available.
|
||||
|
||||
==============================================================================
|
||||
vim:tw=78:ts=8:ft=help:norl:
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*if_ruby.txt* For Vim version 7.3. Last change: 2010 Jul 20
|
||||
*if_ruby.txt* For Vim version 7.3. Last change: 2010 Oct 27
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Shugo Maeda
|
||||
@@ -40,6 +40,9 @@ downloading Ruby there.
|
||||
wasn't compiled in. To avoid errors, see
|
||||
|script-here|.
|
||||
|
||||
Command to try it out: >
|
||||
:ruby print "Hello" # this is a comment
|
||||
|
||||
Example Vim script: >
|
||||
|
||||
function! RedGem()
|
||||
@@ -187,12 +190,12 @@ $curbuf The current buffer object.
|
||||
==============================================================================
|
||||
6. Dynamic loading *ruby-dynamic*
|
||||
|
||||
On MS-Windows the Ruby library can be loaded dynamically. The |:version|
|
||||
output then includes |+ruby/dyn|.
|
||||
On MS-Windows and Unix the Ruby library can be loaded dynamically. The
|
||||
|:version| output then includes |+ruby/dyn|.
|
||||
|
||||
This means that Vim will search for the Ruby DLL file only when needed. When
|
||||
you don't use the Ruby interface you don't need it, thus you can use Vim
|
||||
without this DLL file.
|
||||
This means that Vim will search for the Ruby DLL file or shared library only
|
||||
when needed. When you don't use the Ruby interface you don't need it, thus
|
||||
you can use Vim even though this library file is not on your system.
|
||||
|
||||
You need to install the right version of Ruby for this to work. You can find
|
||||
the package to download from:
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*indent.txt* For Vim version 7.3. Last change: 2010 Jul 30
|
||||
*indent.txt* For Vim version 7.3. Last change: 2011 Sep 02
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -128,13 +128,20 @@ have changed the indent by typing <BS>, <Tab>, or <Space> in the indent or
|
||||
used CTRL-T or CTRL-D.
|
||||
|
||||
*cinoptions-values*
|
||||
The 'cinoptions' option sets how Vim performs indentation. In the list below,
|
||||
The 'cinoptions' option sets how Vim performs indentation. The value after
|
||||
the option character can be one of these (N is any number):
|
||||
N indent N spaces
|
||||
-N indent N spaces to the left
|
||||
Ns N times 'shiftwidth' spaces
|
||||
-Ns N times 'shiftwidth' spaces to the left
|
||||
|
||||
In the list below,
|
||||
"N" represents a number of your choice (the number can be negative). When
|
||||
there is an 's' after the number, Vim multiplies the number by 'shiftwidth':
|
||||
"1s" is 'shiftwidth', "2s" is two times 'shiftwidth', etc. You can use a
|
||||
decimal point, too: "-0.5s" is minus half a 'shiftwidth'. The examples below
|
||||
assume a 'shiftwidth' of 4.
|
||||
|
||||
decimal point, too: "-0.5s" is minus half a 'shiftwidth'.
|
||||
The examples below assume a 'shiftwidth' of 4.
|
||||
*cino->*
|
||||
>N Amount added for "normal" indent. Used after a line that should
|
||||
increase the indent (lines starting with "if", an opening brace,
|
||||
etc.). (default 'shiftwidth').
|
||||
@@ -145,6 +152,7 @@ assume a 'shiftwidth' of 4.
|
||||
foo; foo; foo;
|
||||
} } }
|
||||
<
|
||||
*cino-e*
|
||||
eN Add N to the prevailing indent inside a set of braces if the
|
||||
opening brace at the End of the line (more precise: is not the
|
||||
first character in a line). This is useful if you want a
|
||||
@@ -160,6 +168,7 @@ assume a 'shiftwidth' of 4.
|
||||
bar; bar; bar;
|
||||
} } }
|
||||
<
|
||||
*cino-n*
|
||||
nN Add N to the prevailing indent for a statement after an "if",
|
||||
"while", etc., if it is NOT inside a set of braces. This is
|
||||
useful if you want a different indent when there is no '{'
|
||||
@@ -174,6 +183,7 @@ assume a 'shiftwidth' of 4.
|
||||
bar; bar; bar;
|
||||
} } }
|
||||
<
|
||||
*cino-f*
|
||||
fN Place the first opening brace of a function or other block in
|
||||
column N. This applies only for an opening brace that is not
|
||||
inside other braces and is at the start of the line. What comes
|
||||
@@ -184,6 +194,7 @@ assume a 'shiftwidth' of 4.
|
||||
{ { {
|
||||
int foo; int foo; int foo;
|
||||
<
|
||||
*cino-{*
|
||||
{N Place opening braces N characters from the prevailing indent.
|
||||
This applies only for opening braces that are inside other
|
||||
braces. (default 0).
|
||||
@@ -193,6 +204,7 @@ assume a 'shiftwidth' of 4.
|
||||
{ { {
|
||||
foo; foo; foo;
|
||||
<
|
||||
*cino-}*
|
||||
}N Place closing braces N characters from the matching opening
|
||||
brace. (default 0).
|
||||
|
||||
@@ -202,6 +214,7 @@ assume a 'shiftwidth' of 4.
|
||||
foo; foo; foo;
|
||||
} } }
|
||||
<
|
||||
*cino-^*
|
||||
^N Add N to the prevailing indent inside a set of braces if the
|
||||
opening brace is in column 0. This can specify a different
|
||||
indent for whole of a function (some may like to set it to a
|
||||
@@ -216,6 +229,7 @@ assume a 'shiftwidth' of 4.
|
||||
} } }
|
||||
} } }
|
||||
<
|
||||
*cino-L*
|
||||
LN Controls placement of jump labels. If N is negative, the label
|
||||
will be placed at column 1. If N is non-negative, the indent of
|
||||
the label will be the prevailing indent minus N. (default -1).
|
||||
@@ -229,6 +243,7 @@ assume a 'shiftwidth' of 4.
|
||||
} } }
|
||||
} } }
|
||||
<
|
||||
*cino-:*
|
||||
:N Place case labels N characters from the indent of the switch().
|
||||
(default 'shiftwidth').
|
||||
|
||||
@@ -240,6 +255,7 @@ assume a 'shiftwidth' of 4.
|
||||
default: default:
|
||||
} }
|
||||
<
|
||||
*cino-=*
|
||||
=N Place statements occurring after a case label N characters from
|
||||
the indent of the label. (default 'shiftwidth').
|
||||
|
||||
@@ -247,6 +263,7 @@ assume a 'shiftwidth' of 4.
|
||||
case 11: case 11: a = a + 1;
|
||||
a = a + 1; b = b + 1;
|
||||
<
|
||||
*cino-l*
|
||||
lN If N != 0 Vim will align with a case label instead of the
|
||||
statement after it in the same line.
|
||||
|
||||
@@ -256,8 +273,10 @@ assume a 'shiftwidth' of 4.
|
||||
break; break;
|
||||
} }
|
||||
<
|
||||
*cino-b*
|
||||
bN If N != 0 Vim will align a final "break" with the case label,
|
||||
so that case..break looks like a sort of block. (default: 0).
|
||||
When using 1, consider adding "0=break" to 'cinkeys'.
|
||||
|
||||
cino= cino=b1 >
|
||||
switch (x) switch(x)
|
||||
@@ -271,6 +290,7 @@ assume a 'shiftwidth' of 4.
|
||||
break; break;
|
||||
} }
|
||||
<
|
||||
*cino-g*
|
||||
gN Place C++ scope declarations N characters from the indent of the
|
||||
block they are in. (default 'shiftwidth'). A scope declaration
|
||||
can be "public:", "protected:" or "private:".
|
||||
@@ -282,6 +302,7 @@ assume a 'shiftwidth' of 4.
|
||||
private: private:
|
||||
} }
|
||||
<
|
||||
*cino-h*
|
||||
hN Place statements occurring after a C++ scope declaration N
|
||||
characters from the indent of the label. (default
|
||||
'shiftwidth').
|
||||
@@ -290,6 +311,21 @@ assume a 'shiftwidth' of 4.
|
||||
public: public: a = a + 1;
|
||||
a = a + 1; b = b + 1;
|
||||
<
|
||||
*cino-N*
|
||||
NN Indent inside C++ namespace N characters extra compared to a
|
||||
normal block. (default 0).
|
||||
|
||||
cino= cino=N-s >
|
||||
namespace { namespace {
|
||||
void function(); void function();
|
||||
} }
|
||||
|
||||
namespace my namespace my
|
||||
{ {
|
||||
void function(); void function();
|
||||
} }
|
||||
<
|
||||
*cino-p*
|
||||
pN Parameter declarations for K&R-style function declarations will
|
||||
be indented N characters from the margin. (default
|
||||
'shiftwidth').
|
||||
@@ -299,6 +335,7 @@ assume a 'shiftwidth' of 4.
|
||||
int a; int a; int a;
|
||||
char b; char b; char b;
|
||||
<
|
||||
*cino-t*
|
||||
tN Indent a function return type declaration N characters from the
|
||||
margin. (default 'shiftwidth').
|
||||
|
||||
@@ -306,6 +343,7 @@ assume a 'shiftwidth' of 4.
|
||||
int int int
|
||||
func() func() func()
|
||||
<
|
||||
*cino-i*
|
||||
iN Indent C++ base class declarations and constructor
|
||||
initializations, if they start in a new line (otherwise they
|
||||
are aligned at the right side of the ':').
|
||||
@@ -319,13 +357,18 @@ assume a 'shiftwidth' of 4.
|
||||
BaseClass(3) BaseClass(3)
|
||||
{} {}
|
||||
<
|
||||
+N Indent a continuation line (a line that spills onto the next) N
|
||||
additional characters. (default 'shiftwidth').
|
||||
*cino-+*
|
||||
+N Indent a continuation line (a line that spills onto the next)
|
||||
inside a function N additional characters. (default
|
||||
'shiftwidth').
|
||||
Outside of a function, when the previous line ended in a
|
||||
backslash, the 2 * N is used.
|
||||
|
||||
cino= cino=+10 >
|
||||
a = b + 9 * a = b + 9 *
|
||||
c; c;
|
||||
<
|
||||
*cino-c*
|
||||
cN Indent comment lines after the comment opener, when there is no
|
||||
other text with which to align, N characters from the comment
|
||||
opener. (default 3). See also |format-comments|.
|
||||
@@ -335,6 +378,7 @@ assume a 'shiftwidth' of 4.
|
||||
text. text.
|
||||
*/ */
|
||||
<
|
||||
*cino-C*
|
||||
CN When N is non-zero, indent comment lines by the amount specified
|
||||
with the c flag above even if there is other text behind the
|
||||
comment opener. (default 0).
|
||||
@@ -345,12 +389,14 @@ assume a 'shiftwidth' of 4.
|
||||
********/ ********/
|
||||
< (Example uses ":set comments& comments-=s1:/* comments^=s0:/*")
|
||||
|
||||
*cino-/*
|
||||
/N Indent comment lines N characters extra. (default 0).
|
||||
cino= cino=/4 >
|
||||
a = b; a = b;
|
||||
/* comment */ /* comment */
|
||||
c = d; c = d;
|
||||
<
|
||||
*cino-(*
|
||||
(N When in unclosed parentheses, indent N characters from the line
|
||||
with the unclosed parentheses. Add a 'shiftwidth' for every
|
||||
unclosed parentheses. When N is 0 or the unclosed parentheses
|
||||
@@ -366,6 +412,7 @@ assume a 'shiftwidth' of 4.
|
||||
(c2 || c3)) (c2 || c3))
|
||||
{ {
|
||||
<
|
||||
*cino-u*
|
||||
uN Same as (N, but for one level deeper. (default 'shiftwidth').
|
||||
|
||||
cino= cino=u2 >
|
||||
@@ -373,6 +420,7 @@ assume a 'shiftwidth' of 4.
|
||||
&& (c22345 && (c22345
|
||||
|| c3)) || c3))
|
||||
<
|
||||
*cino-U*
|
||||
UN When N is non-zero, do not ignore the indenting specified by
|
||||
( or u in case that the unclosed parentheses is the first
|
||||
non-white character in its line. (default 0).
|
||||
@@ -384,6 +432,7 @@ assume a 'shiftwidth' of 4.
|
||||
c3 c3
|
||||
) && c4; ) && c4;
|
||||
<
|
||||
*cino-w*
|
||||
wN When in unclosed parentheses and N is non-zero and either
|
||||
using "(0" or "u0", respectively, or using "U0" and the unclosed
|
||||
parentheses is the first non-white character in its line, line
|
||||
@@ -396,6 +445,7 @@ assume a 'shiftwidth' of 4.
|
||||
|| c3)) || c3))
|
||||
foo; foo;
|
||||
<
|
||||
*cino-W*
|
||||
WN When in unclosed parentheses and N is non-zero and either
|
||||
using "(0" or "u0", respectively and the unclosed parentheses is
|
||||
the last non-white character in its line and it is not the
|
||||
@@ -410,6 +460,7 @@ assume a 'shiftwidth' of 4.
|
||||
a_short_line(argument, a_short_line(argument,
|
||||
argument); argument);
|
||||
<
|
||||
*cino-m*
|
||||
mN When N is non-zero, line up a line starting with a closing
|
||||
parentheses with the first character of the line with the
|
||||
matching opening parentheses. (default 0).
|
||||
@@ -424,6 +475,7 @@ assume a 'shiftwidth' of 4.
|
||||
) )
|
||||
foo; foo;
|
||||
<
|
||||
*cino-M*
|
||||
MN When N is non-zero, line up a line starting with a closing
|
||||
parentheses with the first character of the previous line.
|
||||
(default 0).
|
||||
@@ -433,10 +485,11 @@ assume a 'shiftwidth' of 4.
|
||||
cond2 cond2
|
||||
) )
|
||||
<
|
||||
*java-cinoptions* *java-indenting*
|
||||
jN Indent java anonymous classes correctly. The value 'N' is
|
||||
currently unused but must be non-zero (e.g. 'j1'). 'j1' will
|
||||
indent for example the following code snippet correctly: >
|
||||
*java-cinoptions* *java-indenting* *cino-j*
|
||||
jN Indent Java anonymous classes correctly. Also works well for
|
||||
Javascript. The value 'N' is currently unused but must be
|
||||
non-zero (e.g. 'j1'). 'j1' will indent for example the
|
||||
following code snippet correctly: >
|
||||
|
||||
object.add(new ChangeListener() {
|
||||
public void stateChanged(ChangeEvent e) {
|
||||
@@ -444,10 +497,11 @@ assume a 'shiftwidth' of 4.
|
||||
}
|
||||
});
|
||||
<
|
||||
*javascript-cinoptions* *javascript-indenting*
|
||||
*javascript-cinoptions* *javascript-indenting* *cino-J*
|
||||
JN Indent JavaScript object declarations correctly by not confusing
|
||||
them with labels. The value 'N' is currently unused but must be
|
||||
non-zero (e.g. 'J1'). >
|
||||
non-zero (e.g. 'J1'). If you enable this you probably also want
|
||||
to set |cino-j|. >
|
||||
|
||||
var bar = {
|
||||
foo: {
|
||||
@@ -462,14 +516,19 @@ assume a 'shiftwidth' of 4.
|
||||
}
|
||||
}
|
||||
<
|
||||
*cino-)*
|
||||
)N Vim searches for unclosed parentheses at most N lines away.
|
||||
This limits the time needed to search for parentheses. (default
|
||||
20 lines).
|
||||
|
||||
*cino-star*
|
||||
*N Vim searches for unclosed comments at most N lines away. This
|
||||
limits the time needed to search for the start of a comment.
|
||||
If your /* */ comments stop indenting afer N lines this is the
|
||||
value you will want to change.
|
||||
(default 70 lines).
|
||||
|
||||
*cino-#*
|
||||
#N When N is non-zero recognize shell/Perl comments, starting with
|
||||
'#'. Default N is zero: don't recognizes '#' comments. Note
|
||||
that lines starting with # will still be seen as preprocessor
|
||||
@@ -477,7 +536,7 @@ assume a 'shiftwidth' of 4.
|
||||
|
||||
|
||||
The defaults, spelled out in full, are:
|
||||
cinoptions=>s,e0,n0,f0,{0,}0,^0,L-1,:s,=s,l0,b0,gs,hs,ps,ts,is,+s,
|
||||
cinoptions=>s,e0,n0,f0,{0,}0,^0,L-1,:s,=s,l0,b0,gs,hs,N0,ps,ts,is,+s,
|
||||
c3,C0,/0,(2s,us,U0,w0,W0,m0,j0,J0,)20,*70,#0
|
||||
|
||||
Vim puts a line in column 1 if:
|
||||
@@ -504,13 +563,15 @@ REMARKS ABOUT SPECIFIC INDENT FILES ~
|
||||
|
||||
FORTRAN *ft-fortran-indent*
|
||||
|
||||
Block if, select case, and where constructs are indented. Comments, labelled
|
||||
statements and continuation lines are indented if the Fortran is in free
|
||||
source form, whereas they are not indented if the Fortran is in fixed source
|
||||
form because of the left margin requirements. Hence manual indent corrections
|
||||
will be necessary for labelled statements and continuation lines when fixed
|
||||
source form is being used. For further discussion of the method used for the
|
||||
detection of source format see |ft-fortran-syntax|.
|
||||
Block if, select case, where, and forall constructs are indented. So are
|
||||
type, interface, associate, block, and enum constructs. The indenting of
|
||||
subroutines, functions, modules, and program blocks is optional. Comments,
|
||||
labelled statements and continuation lines are indented if the Fortran is in
|
||||
free source form, whereas they are not indented if the Fortran is in fixed
|
||||
source form because of the left margin requirements. Hence manual indent
|
||||
corrections will be necessary for labelled statements and continuation lines
|
||||
when fixed source form is being used. For further discussion of the method
|
||||
used for the detection of source format see |ft-fortran-syntax|.
|
||||
|
||||
Do loops ~
|
||||
All do loops are left unindented by default. Do loops can be unstructured in
|
||||
@@ -537,6 +598,20 @@ autocommand such as >
|
||||
to get do loops indented in .f90 files and left alone in Fortran files with
|
||||
other extensions such as .for.
|
||||
|
||||
Program units ~
|
||||
The indenting of program units (subroutines, functions, modules, and program
|
||||
blocks) is enabled by default but can be suppressed if a lighter, screen-width
|
||||
preserving indent style is desired. To suppress the indenting of program
|
||||
units for all fortran files set the global fortran_indent_less variable in
|
||||
your .vimrc as follows >
|
||||
|
||||
let fortran_indent_less=1
|
||||
|
||||
A finer level of suppression can be achieved by setting the corresponding
|
||||
buffer-local variable as follows >
|
||||
|
||||
let b:fortran_indent_less=1
|
||||
|
||||
|
||||
PHP *ft-php-indent* *php-indent* *php-indenting*
|
||||
|
||||
@@ -631,6 +706,43 @@ Indent for a continuation line: >
|
||||
let g:pyindent_continue = '&sw * 2'
|
||||
|
||||
|
||||
R *ft-r-indent*
|
||||
|
||||
Function arguments are aligned if they span for multiple lines. If you prefer
|
||||
do not have the arguments of functions aligned, put in your |vimrc|:
|
||||
>
|
||||
let r_indent_align_args = 0
|
||||
<
|
||||
All lines beginning with a comment character, #, get the same indentation
|
||||
level of the normal R code. Users of Emacs/ESS may be used to have lines
|
||||
beginning with a single # indented in the 40th column, ## indented as R code,
|
||||
and ### not indented. If you prefer that lines beginning with comment
|
||||
characters are aligned as they are by Emacs/ESS, put in your |vimrc|:
|
||||
>
|
||||
let r_indent_ess_comments = 1
|
||||
<
|
||||
If you prefer that lines beginning with a single # are aligned at a column
|
||||
different from the 40th one, you should set a new value to the variable
|
||||
r_indent_comment_column, as in the example below:
|
||||
>
|
||||
let r_indent_comment_column = 30
|
||||
<
|
||||
Any code after a line that ends with "<-" is indented. Emacs/ESS does not
|
||||
indent the code if it is a top level function. If you prefer that the
|
||||
Vim-R-plugin behaves like Emacs/ESS in this regard, put in your |vimrc|:
|
||||
>
|
||||
let r_indent_ess_compatible = 1
|
||||
<
|
||||
Below is an example of indentation with and without this option enabled:
|
||||
>
|
||||
### r_indent_ess_compatible = 1 ### r_indent_ess_compatible = 0
|
||||
foo <- foo <-
|
||||
function(x) function(x)
|
||||
{ {
|
||||
paste(x) paste(x)
|
||||
} }
|
||||
<
|
||||
|
||||
SHELL *ft-sh-indent*
|
||||
|
||||
The amount of indent applied under various circumstances in a shell file can
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*index.txt* For Vim version 7.3. Last change: 2010 Jul 21
|
||||
*index.txt* For Vim version 7.3. Last change: 2011 Aug 06
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -29,7 +29,7 @@ For a complete listing of all help items see |help-tags|.
|
||||
==============================================================================
|
||||
1. Insert mode *insert-index*
|
||||
|
||||
tag char action ~
|
||||
tag char action in Insert mode ~
|
||||
-----------------------------------------------------------------------
|
||||
|i_CTRL-@| CTRL-@ insert previously inserted text and stop
|
||||
insert
|
||||
@@ -459,7 +459,7 @@ tag char note action in Normal mode ~
|
||||
|
||||
These can be used after an operator or in Visual mode to select an object.
|
||||
|
||||
tag command action in Normal mode ~
|
||||
tag command action in op-pending and Visual mode ~
|
||||
------------------------------------------------------------------------------
|
||||
|v_aquote| a" double quoted string
|
||||
|v_a'| a' single quoted string
|
||||
@@ -721,6 +721,7 @@ tag char note action in Normal mode ~
|
||||
|gJ| gJ 2 join lines without inserting space
|
||||
|gP| ["x]gP 2 put the text [from register x] before the
|
||||
cursor N times, leave the cursor after it
|
||||
|gQ| gQ switch to "Ex" mode with Vim editing
|
||||
|gR| gR 2 enter Virtual Replace mode
|
||||
|gU| gU{motion} 2 make Nmove text uppercase
|
||||
|gV| gV don't reselect the previous Visual area
|
||||
@@ -951,11 +952,13 @@ Normal characters are inserted at the current cursor position.
|
||||
"Completion" below refers to context-sensitive completion. It will complete
|
||||
file names, tags, commands etc. as appropriate.
|
||||
|
||||
tag command action in Command-line editing mode ~
|
||||
------------------------------------------------------------------------------
|
||||
CTRL-@ not used
|
||||
|c_CTRL-A| CTRL-A do completion on the pattern in front of the
|
||||
cursor and insert all matches
|
||||
|c_CTRL-B| CTRL-B cursor to begin of command-line
|
||||
|c_CTRL-C| CTRL-C same as <ESC>
|
||||
|c_CTRL-C| CTRL-C same as <Esc>
|
||||
|c_CTRL-D| CTRL-D list completions that match the pattern in
|
||||
front of the cursor
|
||||
|c_CTRL-E| CTRL-E cursor to end of command-line
|
||||
@@ -1046,6 +1049,8 @@ This is a brief but complete listing of all the ":" commands, without
|
||||
mentioning any arguments. The optional part of the command name is inside [].
|
||||
The commands are sorted on the non-optional part of their name.
|
||||
|
||||
tag command action ~
|
||||
------------------------------------------------------------------------------
|
||||
|:!| :! filter lines or execute an external command
|
||||
|:!!| :!! repeat last ":!" command
|
||||
|:#| :# same as ":number"
|
||||
@@ -1256,7 +1261,7 @@ The commands are sorted on the non-optional part of their name.
|
||||
|:k| :k set a mark
|
||||
|:keepalt| :keepa[lt] following command keeps the alternate file
|
||||
|:keepmarks| :kee[pmarks] following command keeps marks where they are
|
||||
|:keepjumps| :keepj[jumps] following command keeps jumplist and marks
|
||||
|:keepjumps| :keepj[umps] following command keeps jumplist and marks
|
||||
|:lNext| :lN[ext] go to previous entry in location list
|
||||
|:lNfile| :lNf[ile] go to last entry in previous file
|
||||
|:list| :l[ist] print lines
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*insert.txt* For Vim version 7.3. Last change: 2010 Sep 29
|
||||
*insert.txt* For Vim version 7.3. Last change: 2011 Sep 14
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -382,6 +382,10 @@ mappings it's often better to use <Esc> (first put an "x" in the text, <Esc>
|
||||
will then always put the cursor on it). Or use CTRL-\ CTRL-O, but then
|
||||
beware of the cursor possibly being beyond the end of the line.
|
||||
|
||||
The CTRL-O command takes you to Normal mode. If you then use a command enter
|
||||
Insert mode again it doesn't nest. Thus when typing "a<C-O>a" and then <Esc>
|
||||
takes you back to Normal mode, you do not need to type <Esc> twice.
|
||||
|
||||
The shifted cursor keys are not available on all terminals.
|
||||
|
||||
Another side effect is that a count specified before the "i" or "a" command is
|
||||
@@ -1016,6 +1020,21 @@ On the second invocation the arguments are:
|
||||
The function must return a List with the matching words. These matches
|
||||
usually include the "a:base" text. When there are no matches return an empty
|
||||
List.
|
||||
|
||||
In order to return more information than the matching words, return a Dict
|
||||
that contains the List. The Dict can have these items:
|
||||
words The List of matching words (mandatory).
|
||||
refresh A string to control re-invocation of the function
|
||||
(optional).
|
||||
The only value currently recognized is "always", the
|
||||
effect is that the function is called whenever the
|
||||
leading text is changed.
|
||||
Other items are ignored.
|
||||
|
||||
For example, the function can contain this: >
|
||||
let matches = ... list of words ...
|
||||
return {'words': matches, 'refresh': 'always'}
|
||||
<
|
||||
*complete-items*
|
||||
Each list item can either be a string or a Dictionary. When it is a string it
|
||||
is used as the completion. When it is a Dictionary it can contain these
|
||||
@@ -1033,17 +1052,21 @@ items:
|
||||
items that only differ in case are added
|
||||
dup when non-zero this match will be added even when an
|
||||
item with the same word is already present.
|
||||
empty when non-zero this match will be added even when it is
|
||||
an empty string
|
||||
|
||||
All of these except 'icase' must be a string. If an item does not meet these
|
||||
requirements then an error message is given and further items in the list are
|
||||
not used. You can mix string and Dictionary items in the returned list.
|
||||
All of these except 'icase', 'dup' and 'empty' must be a string. If an item
|
||||
does not meet these requirements then an error message is given and further
|
||||
items in the list are not used. You can mix string and Dictionary items in
|
||||
the returned list.
|
||||
|
||||
The "menu" item is used in the popup menu and may be truncated, thus it should
|
||||
be relatively short. The "info" item can be longer, it will be displayed in
|
||||
the preview window when "preview" appears in 'completeopt'. The "info" item
|
||||
will also remain displayed after the popup menu has been removed. This is
|
||||
useful for function arguments. Use a single space for "info" to remove
|
||||
existing text in the preview window.
|
||||
existing text in the preview window. The size of the preview window is three
|
||||
lines, but 'previewheight' is used when it has a value of 1 or 2.
|
||||
|
||||
The "kind" item uses a single letter to indicate the kind of completion. This
|
||||
may be used to show the completion differently (different color or icon).
|
||||
@@ -1059,9 +1082,9 @@ match to the total list. These matches should then not appear in the returned
|
||||
list! Call |complete_check()| now and then to allow the user to press a key
|
||||
while still searching for matches. Stop searching when it returns non-zero.
|
||||
|
||||
The function is allowed to move the cursor, it is restored afterwards. This
|
||||
option cannot be set from a |modeline| or in the |sandbox|, for security
|
||||
reasons.
|
||||
*E839* *E840*
|
||||
The function is allowed to move the cursor, it is restored afterwards.
|
||||
The function is not allowed to move to another window or delete text.
|
||||
|
||||
An example that completes the names of the months: >
|
||||
fun! CompleteMonths(findstart, base)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*intro.txt* For Vim version 7.3. Last change: 2010 Sep 29
|
||||
*intro.txt* For Vim version 7.3. Last change: 2011 May 15
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -135,8 +135,10 @@ http://www.vim.org/maillist.php
|
||||
|
||||
Bug reports: *bugs* *bug-reports* *bugreport.vim*
|
||||
|
||||
Send bug reports to: Vim bugs <bugs@vim.org>
|
||||
This is not a maillist but the message is redirected to the Vim maintainer.
|
||||
Send bug reports to: Vim Developers <vim_dev@vim.org>
|
||||
This is a maillist, many people will see the message. If you don't want that,
|
||||
e.g. because it is a security issue, send it to <bugs@vim.org>, this only goes
|
||||
to the Vim maintainer (that's Bram).
|
||||
Please be brief; all the time that is spent on answering mail is subtracted
|
||||
from the time that is spent on improving Vim! Always give a reproducible
|
||||
example and try to find out which settings or other things influence the
|
||||
@@ -616,7 +618,6 @@ Replace <Esc> -- -- <Insert> -- --
|
||||
Command-line *3 -- -- :start -- --
|
||||
Ex :vi -- -- -- -- --
|
||||
|
||||
- NA
|
||||
-- not possible
|
||||
|
||||
*1 Go from Normal mode to Insert mode by giving the command "i", "I", "a",
|
||||
@@ -703,7 +704,7 @@ Lines longer than the window width will wrap, unless the 'wrap' option is off
|
||||
(see below). The 'linebreak' option can be set to wrap at a blank character.
|
||||
|
||||
If the window has room after the last line of the buffer, Vim will show '~' in
|
||||
the first column of the last lines in the window, like this: >
|
||||
the first column of the last lines in the window, like this:
|
||||
|
||||
+-----------------------+
|
||||
|some line |
|
||||
@@ -715,7 +716,7 @@ the first column of the last lines in the window, like this: >
|
||||
Thus the '~' lines indicate that the end of the buffer was reached.
|
||||
|
||||
If the last line in a window doesn't fit, Vim will indicate this with a '@' in
|
||||
the first column of the last lines in the window, like this: >
|
||||
the first column of the last lines in the window, like this:
|
||||
|
||||
+-----------------------+
|
||||
|first line |
|
||||
@@ -730,7 +731,7 @@ window.
|
||||
When the "lastline" flag is present in the 'display' option, you will not see
|
||||
'@' characters at the left side of window. If the last line doesn't fit
|
||||
completely, only the part that fits is shown, and the last three characters of
|
||||
the last line are replaced with "@@@", like this: >
|
||||
the last line are replaced with "@@@", like this:
|
||||
|
||||
+-----------------------+
|
||||
|first line |
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*map.txt* For Vim version 7.3. Last change: 2010 Sep 29
|
||||
*map.txt* For Vim version 7.3. Last change: 2011 Aug 19
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -107,6 +107,8 @@ modes.
|
||||
:cmapc[lear] |mapmode-c| *:cmapc* *:cmapclear*
|
||||
Remove ALL mappings for the modes where the map
|
||||
command applies. {not in Vi}
|
||||
Use the <buffer> argument to remove buffer-local
|
||||
mappings |:map-<buffer>|
|
||||
Warning: This also removes the default mappings.
|
||||
|
||||
:map |mapmode-nvo|
|
||||
@@ -226,7 +228,7 @@ text before the cursor and start omni completion when some condition is met.
|
||||
|
||||
For abbreviations |v:char| is set to the character that was typed to trigger
|
||||
the abbreviation. You can use this to decide how to expand the {lhs}. You
|
||||
can't change v:char and you should not insert it.
|
||||
should not either insert or change the v:char.
|
||||
|
||||
Be very careful about side effects! The expression is evaluated while
|
||||
obtaining characters, you may very well make the command dysfunctional.
|
||||
@@ -480,9 +482,9 @@ You can create an empty {rhs} by typing nothing after a single CTRL-V (you
|
||||
have to type CTRL-V two times). Unfortunately, you cannot do this in a vimrc
|
||||
file.
|
||||
*<Nop>*
|
||||
A easier way to get a mapping that doesn't produce anything, is to use "<Nop>"
|
||||
for the {rhs}. This only works when the |<>| notation is enabled. For
|
||||
example, to make sure that function key 8 does nothing at all: >
|
||||
An easier way to get a mapping that doesn't produce anything, is to use
|
||||
"<Nop>" for the {rhs}. This only works when the |<>| notation is enabled.
|
||||
For example, to make sure that function key 8 does nothing at all: >
|
||||
:map <F8> <Nop>
|
||||
:map! <F8> <Nop>
|
||||
<
|
||||
@@ -495,7 +497,7 @@ scenario: >
|
||||
: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> (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,
|
||||
two bytes 0xc3 0xa1. You don't want the 0xc3 byte to be mapped then or
|
||||
otherwise it would be impossible to type the <20> character.
|
||||
|
||||
*<Leader>* *mapleader*
|
||||
@@ -542,6 +544,7 @@ construct can be used:
|
||||
<Char-123> character 123
|
||||
<Char-033> character 27
|
||||
<Char-0x7f> character 127
|
||||
<S-Char-114> character 114 ('r') shifted ('R')
|
||||
This is useful to specify a (multi-byte) character in a 'keymap' file.
|
||||
Upper and lowercase differences are ignored.
|
||||
|
||||
@@ -934,11 +937,12 @@ See |:verbose-cmd| for more information.
|
||||
avoid that a typed {lhs} is expanded, since
|
||||
command-line abbreviations apply here.
|
||||
|
||||
:ab[breviate] [<expr>] {lhs} {rhs}
|
||||
:ab[breviate] [<expr>] [<buffer>] {lhs} {rhs}
|
||||
add abbreviation for {lhs} to {rhs}. If {lhs} already
|
||||
existed it is replaced with the new {rhs}. {rhs} may
|
||||
contain spaces.
|
||||
See |:map-<expr>| for the optional <expr> argument.
|
||||
See |:map-<buffer>| for the optional <buffer> argument.
|
||||
|
||||
*:una* *:unabbreviate*
|
||||
:una[bbreviate] {lhs} Remove abbreviation for {lhs} from the list. If none
|
||||
@@ -948,12 +952,12 @@ See |:verbose-cmd| for more information.
|
||||
expansion insert a CTRL-V (type it twice).
|
||||
|
||||
*:norea* *:noreabbrev*
|
||||
:norea[bbrev] [<expr>] [lhs] [rhs]
|
||||
:norea[bbrev] [<expr>] [<buffer>] [lhs] [rhs]
|
||||
same as ":ab", but no remapping for this {rhs} {not
|
||||
in Vi}
|
||||
|
||||
*:ca* *:cabbrev*
|
||||
:ca[bbrev] [<expr>] [lhs] [rhs]
|
||||
:ca[bbrev] [<expr>] [<buffer>] [lhs] [rhs]
|
||||
same as ":ab", but for Command-line mode only. {not
|
||||
in Vi}
|
||||
|
||||
@@ -962,12 +966,12 @@ See |:verbose-cmd| for more information.
|
||||
in Vi}
|
||||
|
||||
*:cnorea* *:cnoreabbrev*
|
||||
:cnorea[bbrev] [<expr>] [lhs] [rhs]
|
||||
:cnorea[bbrev] [<expr>] [<buffer>] [lhs] [rhs]
|
||||
same as ":ab", but for Command-line mode only and no
|
||||
remapping for this {rhs} {not in Vi}
|
||||
|
||||
*:ia* *:iabbrev*
|
||||
:ia[bbrev] [<expr>] [lhs] [rhs]
|
||||
:ia[bbrev] [<expr>] [<buffer>] [lhs] [rhs]
|
||||
same as ":ab", but for Insert mode only. {not in Vi}
|
||||
|
||||
*:iuna* *:iunabbrev*
|
||||
@@ -975,18 +979,18 @@ See |:verbose-cmd| for more information.
|
||||
Vi}
|
||||
|
||||
*:inorea* *:inoreabbrev*
|
||||
:inorea[bbrev] [<expr>] [lhs] [rhs]
|
||||
:inorea[bbrev] [<expr>] [<buffer>] [lhs] [rhs]
|
||||
same as ":ab", but for Insert mode only and no
|
||||
remapping for this {rhs} {not in Vi}
|
||||
|
||||
*:abc* *:abclear*
|
||||
:abc[lear] Remove all abbreviations. {not in Vi}
|
||||
:abc[lear] [<buffer>] Remove all abbreviations. {not in Vi}
|
||||
|
||||
*:iabc* *:iabclear*
|
||||
:iabc[lear] Remove all abbreviations for Insert mode. {not in Vi}
|
||||
:iabc[lear] [<buffer>] Remove all abbreviations for Insert mode. {not in Vi}
|
||||
|
||||
*:cabc* *:cabclear*
|
||||
:cabc[lear] Remove all abbreviations for Command-line mode. {not
|
||||
:cabc[lear] [<buffer>] Remove all abbreviations for Command-line mode. {not
|
||||
in Vi}
|
||||
|
||||
*using_CTRL-V*
|
||||
@@ -1093,16 +1097,20 @@ is executed, it is transformed into a normal Ex command and then executed.
|
||||
|
||||
For starters: See section |40.2| in the user manual.
|
||||
|
||||
*E183* *user-cmd-ambiguous*
|
||||
*E183* *E841* *user-cmd-ambiguous*
|
||||
All user defined commands must start with an uppercase letter, to avoid
|
||||
confusion with builtin commands. (There are a few builtin commands, notably
|
||||
:Next, :Print and :X, which do start with an uppercase letter. The builtin
|
||||
will always take precedence in these cases). The other characters of the user
|
||||
command can be uppercase letters, lowercase letters or digits. When using
|
||||
digits, note that other commands that take a numeric argument may become
|
||||
ambiguous. For example, the command ":Cc2" could be the user command ":Cc2"
|
||||
without an argument, or the command ":Cc" with argument "2". It is advised to
|
||||
put a space between the command name and the argument to avoid these problems.
|
||||
confusion with builtin commands. Exceptions are these builtin commands:
|
||||
:Next
|
||||
:X
|
||||
They cannot be used for a user defined command. ":Print" is also an existing
|
||||
command, but it is deprecated and can be overruled.
|
||||
|
||||
The other characters of the user command can be uppercase letters, lowercase
|
||||
letters or digits. When using digits, note that other commands that take a
|
||||
numeric argument may become ambiguous. For example, the command ":Cc2" could
|
||||
be the user command ":Cc2" without an argument, or the command ":Cc" with
|
||||
argument "2". It is advised to put a space between the command name and the
|
||||
argument to avoid these problems.
|
||||
|
||||
When using a user-defined command, the command can be abbreviated. However, if
|
||||
an abbreviation is not unique, an error will be issued. Furthermore, a
|
||||
@@ -1173,13 +1181,15 @@ reported if any are supplied). However, it is possible to specify that the
|
||||
command can take arguments, using the -nargs attribute. Valid cases are:
|
||||
|
||||
-nargs=0 No arguments are allowed (the default)
|
||||
-nargs=1 Exactly one argument is required
|
||||
-nargs=* Any number of arguments are allowed (0, 1, or many)
|
||||
-nargs=1 Exactly one argument is require, it includes spaces
|
||||
-nargs=* Any number of arguments are allowed (0, 1, or many),
|
||||
separated by white space
|
||||
-nargs=? 0 or 1 arguments are allowed
|
||||
-nargs=+ Arguments must be supplied, but any number are allowed
|
||||
|
||||
Arguments are considered to be separated by (unescaped) spaces or tabs in this
|
||||
context.
|
||||
context, except when there is one argument, then the white space is part of
|
||||
the argument.
|
||||
|
||||
Note that arguments are used as text, not as expressions. Specifically,
|
||||
"s:var" will use the script-local variable in the script where the command was
|
||||
@@ -1202,17 +1212,21 @@ completion can be enabled:
|
||||
|
||||
-complete=augroup autocmd groups
|
||||
-complete=buffer buffer names
|
||||
-complete=color color schemes
|
||||
-complete=command Ex command (and arguments)
|
||||
-complete=compiler compilers
|
||||
-complete=cscope |:cscope| suboptions
|
||||
-complete=dir directory names
|
||||
-complete=environment environment variable names
|
||||
-complete=event autocommand events
|
||||
-complete=expression Vim expression
|
||||
-complete=file file and directory names
|
||||
-complete=file_in_path file and directory names in |'path'|
|
||||
-complete=filetype filetype names |'filetype'|
|
||||
-complete=function function name
|
||||
-complete=help help subjects
|
||||
-complete=highlight highlight groups
|
||||
-complete=locale locale names (as output of locale -a)
|
||||
-complete=mapping mapping name
|
||||
-complete=menu menus
|
||||
-complete=option options
|
||||
@@ -1287,7 +1301,8 @@ Possible attributes are:
|
||||
-range Range allowed, default is current line
|
||||
-range=% Range allowed, default is whole file (1,$)
|
||||
-range=N A count (default N) which is specified in the line
|
||||
number position (like |:split|)
|
||||
number position (like |:split|); allows for zero line
|
||||
number.
|
||||
-count=N A count (default N) which is specified either in the line
|
||||
number position, or as an initial argument (like |:Next|).
|
||||
Specifying -count (without a default) acts like -count=0
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*mbyte.txt* For Vim version 7.3. Last change: 2010 Jul 26
|
||||
*mbyte.txt* For Vim version 7.3. Last change: 2011 Jul 18
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar et al.
|
||||
@@ -280,7 +280,7 @@ Note that all encodings must use ASCII for the characters up to 128 (except
|
||||
when compiled for EBCDIC).
|
||||
|
||||
Supported 'encoding' values are: *encoding-values*
|
||||
1 latin1 8-bit characters (ISO 8859-1)
|
||||
1 latin1 8-bit characters (ISO 8859-1, also used for cp1252)
|
||||
1 iso-8859-n ISO_8859 variant (n = 2 to 15)
|
||||
1 koi8-r Russian
|
||||
1 koi8-u Ukrainian
|
||||
@@ -336,7 +336,11 @@ For MS-Windows "cp{number}" means using codepage {number}.
|
||||
Examples: >
|
||||
:set encoding=8bit-cp1252
|
||||
:set encoding=2byte-cp932
|
||||
<
|
||||
|
||||
The MS-Windows codepage 1252 is very similar to latin1. For practical reasons
|
||||
the same encoding is used and it's called latin1. 'isprint' can be used to
|
||||
display the characters 0x80 - 0xA0 or not.
|
||||
|
||||
Several aliases can be used, they are translated to one of the names above.
|
||||
An incomplete list:
|
||||
|
||||
@@ -1302,8 +1306,8 @@ character. However, search patterns may not match on an overlong sequence.
|
||||
character.) An exception is NUL (zero) which is displayed as "<00>".
|
||||
|
||||
In the file and buffer the full range of Unicode characters can be used (31
|
||||
bits). However, displaying only works for 16 bit characters, and only for the
|
||||
characters present in the selected font.
|
||||
bits). However, displaying only works for the characters present in the
|
||||
selected font.
|
||||
|
||||
Useful commands:
|
||||
- "ga" shows the decimal, hexadecimal and octal value of the character under
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*message.txt* For Vim version 7.3. Last change: 2010 Sep 14
|
||||
*message.txt* For Vim version 7.3. Last change: 2011 May 10
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -27,8 +27,8 @@ The "g<" command can be used to see the last page of previous command output.
|
||||
This is especially useful if you accidentally typed <Space> at the hit-enter
|
||||
prompt. You are then back at the hit-enter prompt and can then scroll further
|
||||
back.
|
||||
Note: when you stopped the output with "q" at the more prompt only up to that
|
||||
point will be displayed.
|
||||
Note: If the output has been stopped with "q" at the more prompt, it will only
|
||||
be displayed up to this point.
|
||||
The previous command output is cleared when another command produces output.
|
||||
|
||||
If you are using translated messages, the first printed line tells who
|
||||
@@ -481,8 +481,10 @@ Also see |msdos-limitations|.
|
||||
*E339* >
|
||||
Pattern too long
|
||||
|
||||
This only happens on systems with 16 bit ints: The compiled regexp pattern is
|
||||
This happens on systems with 16 bit ints: The compiled regexp pattern is
|
||||
longer than about 65000 characters. Try using a shorter pattern.
|
||||
It also happens when the offset of a rule doesn't fit in the space available.
|
||||
Try simplifying the pattern.
|
||||
|
||||
*E45* >
|
||||
'readonly' option is set (add ! to override)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*mlang.txt* For Vim version 7.3. Last change: 2010 Jul 20
|
||||
*mlang.txt* For Vim version 7.3. Last change: 2010 Dec 11
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -68,7 +68,7 @@ use of "-" and "_".
|
||||
With the "ctype" argument the language used for
|
||||
character encoding is set. This affects the libraries
|
||||
that Vim was linked with. It's unusual to set this to
|
||||
a different value from 'encoding'. This sets
|
||||
a different value from 'encoding' or "C". This sets
|
||||
$LC_CTYPE.
|
||||
With the "time" argument the language used for time
|
||||
and date messages is set. This affects strftime().
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*motion.txt* For Vim version 7.3. Last change: 2010 May 14
|
||||
*motion.txt* For Vim version 7.3. Last change: 2011 Jul 19
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -269,11 +269,11 @@ T{char} Till after [count]'th occurrence of {char} to the
|
||||
{char} can be entered like with the |f| command.
|
||||
|
||||
*;*
|
||||
; Repeat latest f, t, F or T [count] times.
|
||||
; Repeat latest f, t, F or T [count] times. See |cpo-;|
|
||||
|
||||
*,*
|
||||
, Repeat latest f, t, F or T in opposite direction
|
||||
[count] times.
|
||||
[count] times. See also |cpo-;|
|
||||
|
||||
==============================================================================
|
||||
3. Up-down motions *up-down-motions*
|
||||
@@ -344,6 +344,8 @@ gg Goto line [count], default first line, on the first
|
||||
last number in it used as the byte count. End-of-line
|
||||
characters are counted depending on the current
|
||||
'fileformat' setting.
|
||||
Also see the |line2byte()| function, and the 'o'
|
||||
option in 'statusline'.
|
||||
{not in Vi}
|
||||
{not available when compiled without the
|
||||
|+byte_offset| feature}
|
||||
@@ -1015,8 +1017,6 @@ CTRL-O Go to [count] Older cursor position in jump list
|
||||
<Tab> or *CTRL-I* *<Tab>*
|
||||
CTRL-I Go to [count] newer cursor position in jump list
|
||||
(not a motion command).
|
||||
In a |quickfix-window| it takes you to the position of
|
||||
the error under the cursor.
|
||||
{not in Vi}
|
||||
{not available without the |+jumplist| feature}
|
||||
|
||||
@@ -1033,20 +1033,20 @@ The maximum number of entries is fixed at 100.
|
||||
|
||||
For example, after three jump commands you have this jump list:
|
||||
|
||||
jump line col file/line ~
|
||||
jump line col file/text ~
|
||||
3 1 0 some text ~
|
||||
2 70 0 another line ~
|
||||
1 1154 23 end. ~
|
||||
> ~
|
||||
|
||||
The "file/line" column shows the file name, or the text at the jump if it is
|
||||
The "file/text" column shows the file name, or the text at the jump if it is
|
||||
in the current file (an indent is removed and a long line is truncated to fit
|
||||
in the window).
|
||||
|
||||
You are currently in line 1167. If you then use the CTRL-O command, the
|
||||
cursor is put in line 1154. This results in:
|
||||
|
||||
jump line col file/line ~
|
||||
jump line col file/text ~
|
||||
2 1 0 some text ~
|
||||
1 70 0 another line ~
|
||||
> 0 1154 23 end. ~
|
||||
@@ -1076,7 +1076,7 @@ command. You can explicitly add a jump by setting the ' mark.
|
||||
After the CTRL-O command that got you into line 1154 you could give another
|
||||
jump command (e.g., "G"). The jump list would then become:
|
||||
|
||||
jump line col file/line ~
|
||||
jump line col file/text ~
|
||||
4 1 0 some text ~
|
||||
3 70 0 another line ~
|
||||
2 1167 0 foo bar ~
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*options.txt* For Vim version 7.3. Last change: 2010 Oct 20
|
||||
*options.txt* For Vim version 7.3. Last change: 2011 Sep 09
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -150,6 +150,18 @@ example, if Alt-b produces <Esc>b, use this: >
|
||||
(the ^[ is a real <Esc> here, use CTRL-V <Esc> to enter it)
|
||||
The advantage over a mapping is that it works in all situations.
|
||||
|
||||
You can define any key codes, e.g.: >
|
||||
:set t_xy=^[foo;
|
||||
There is no warning for using a name that isn't recognized. You can map these
|
||||
codes as you like: >
|
||||
:map <t_xy> something
|
||||
< *E846*
|
||||
When a key code is not set, it's like it does not exist. Trying to get its
|
||||
value will result in an error: >
|
||||
:set t_kb=
|
||||
:set t_kb
|
||||
E846: Key code not set: t_kb
|
||||
|
||||
The t_xx options cannot be set from a |modeline| or in the |sandbox|, for
|
||||
security reasons.
|
||||
|
||||
@@ -361,6 +373,7 @@ Setting the filetype
|
||||
settings and syntax files to be loaded.
|
||||
{not in Vi}
|
||||
|
||||
*option-window* *optwin*
|
||||
:bro[wse] se[t] *:set-browse* *:browse-set* *:opt* *:options*
|
||||
:opt[ions] Open a window for viewing and setting all options.
|
||||
Options are grouped by function.
|
||||
@@ -802,7 +815,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
been set.
|
||||
|
||||
*'background'* *'bg'*
|
||||
'background' 'bg' string (default "dark" or "light")
|
||||
'background' 'bg' string (default "dark" or "light", see below)
|
||||
global
|
||||
{not in Vi}
|
||||
When set to "dark", Vim will try to use colors that look good on a
|
||||
@@ -836,6 +849,12 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
color). To get around this, force the GUI window to be opened by
|
||||
putting a ":gui" command in the .gvimrc file, before where the value
|
||||
of 'background' is used (e.g., before ":syntax on").
|
||||
|
||||
For MS-DOS, Windows and OS/2 the default is "dark".
|
||||
For other systems "dark" is used when 'term' is "linux",
|
||||
"screen.linux", "cygwin" or "putty", or $COLORFGBG suggests a dark
|
||||
background. Otherwise the default is "light".
|
||||
|
||||
Normally this option would be set in the .vimrc file. Possibly
|
||||
depending on the terminal name. Example: >
|
||||
:if &term == "pcterm"
|
||||
@@ -1434,6 +1453,15 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
explicitly accessed using the "* notation. Also see
|
||||
|gui-clipboard|.
|
||||
|
||||
unnamedplus A variant of "unnamed" flag which uses the clipboard
|
||||
register '+' (|quoteplus|) instead of register '*' for
|
||||
all operations except yank. Yank shall copy the text
|
||||
into register '+' and also into '*' when "unnamed" is
|
||||
included.
|
||||
Only available with the |+X11| feature.
|
||||
Availability can be checked with: >
|
||||
if has('unnamedplus')
|
||||
<
|
||||
autoselect Works like the 'a' flag in 'guioptions': If present,
|
||||
then whenever Visual mode is started, or the Visual
|
||||
area extended, Vim tries to become the owner of the
|
||||
@@ -1699,7 +1727,8 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
with CTRL-X CTRL-U. |i_CTRL-X_CTRL-U|
|
||||
See |complete-functions| for an explanation of how the function is
|
||||
invoked and what it should return.
|
||||
|
||||
This option cannot be set from a |modeline| or in the |sandbox|, for
|
||||
security reasons.
|
||||
|
||||
*'completeopt'* *'cot'*
|
||||
'completeopt' 'cot' string (default: "menu,preview")
|
||||
@@ -2088,6 +2117,12 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
*cpo->*
|
||||
> When appending to a register, put a line break before
|
||||
the appended text.
|
||||
*cpo-;*
|
||||
; When using |,| or |;| to repeat the last |t| search
|
||||
and the cursor is right in front of the searched
|
||||
character, the cursor won't move. When not included,
|
||||
the cursor would skip over it and jump to the
|
||||
following occurence.
|
||||
|
||||
POSIX flags. These are not included in the Vi default value, except
|
||||
when $VIM_POSIX was set on startup. |posix|
|
||||
@@ -2180,6 +2215,16 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
Specifies whether to use quickfix window to show cscope results.
|
||||
See |cscopequickfix|.
|
||||
|
||||
*'cscoperelative'* *'csre'*
|
||||
'cscoperelative' 'csre' boolean (default off)
|
||||
global
|
||||
{not available when compiled without the |+cscope|
|
||||
feature}
|
||||
{not in Vi}
|
||||
In the absence of a prefix (-P) for cscope. setting this option enables
|
||||
to use the basename of cscope.out path as the prefix.
|
||||
See |cscoperelative|.
|
||||
|
||||
*'cscopetag'* *'cst'* *'nocscopetag'* *'nocst'*
|
||||
'cscopetag' 'cst' boolean (default off)
|
||||
global
|
||||
@@ -2843,6 +2888,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
"dos" is not present or no <CR><NL> is found in the file.
|
||||
Except: if "unix" was chosen, but there is a <CR> before
|
||||
the first <NL>, and there appear to be more <CR>s than <NL>s in
|
||||
the first few lines, "mac" is used.
|
||||
4. If 'fileformat' is still not set, the first name from
|
||||
'fileformats' is used.
|
||||
When reading a file into an existing buffer, the same is done, but
|
||||
@@ -2850,6 +2896,9 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
file only, the option is not changed.
|
||||
When 'binary' is set, the value of 'fileformats' is not used.
|
||||
|
||||
Note that when Vim starts up with an empty buffer this option is not
|
||||
used. Set 'fileformat' in your .vimrc instead.
|
||||
|
||||
For systems with a Dos-like <EOL> (<CR><NL>), when reading files that
|
||||
are ":source"ed and for vimrc files, automatic <EOL> detection may be
|
||||
done:
|
||||
@@ -2890,8 +2939,6 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
This will use the "c" filetype first, then the "doxygen" filetype.
|
||||
This works both for filetype plugins and for syntax files. More than
|
||||
one dot may appear.
|
||||
Do not confuse this option with 'osfiletype', which is for the file
|
||||
type that is actually stored with the file.
|
||||
This option is not copied to another buffer, independent of the 's' or
|
||||
'S' flag in 'cpoptions'.
|
||||
Only normal file name characters can be used, "/\*?[|<>" are illegal.
|
||||
@@ -3063,9 +3110,11 @@ 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 |+folding|
|
||||
feature}
|
||||
Sets the minimum number of screen lines for a fold to be displayed
|
||||
closed. Also for manually closed folds.
|
||||
Note that this only has an effect of what is displayed. After using
|
||||
Sets the number of screen lines above which a fold can be displayed
|
||||
closed. Also for manually closed folds. With the default value of
|
||||
one a fold can only be closed if it takes up two or more screen lines.
|
||||
Set to zero to be able to close folds of just one screen line.
|
||||
Note that this only has an effect on what is displayed. After using
|
||||
"zc" to close a fold, which is displayed open because it's smaller
|
||||
than 'foldminlines', a following "zc" may close a containing fold.
|
||||
|
||||
@@ -3089,6 +3138,10 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
Specifies for which type of commands folds will be opened, if the
|
||||
command moves the cursor into a closed fold. It is a comma separated
|
||||
list of items.
|
||||
NOTE: When the command is part of a mapping this option is not used.
|
||||
Add the |zv| command to the mapping to get the same effect.
|
||||
(rationale: the mapping may want to control opening folds itself)
|
||||
|
||||
item commands ~
|
||||
all any
|
||||
block "(", "{", "[[", "[{", etc.
|
||||
@@ -3103,8 +3156,6 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
Also for |[s| and |]s|.
|
||||
tag jumping to a tag: ":ta", CTRL-T, etc.
|
||||
undo undo or redo: "u" and CTRL-R
|
||||
When the command is part of a mapping this option is not used. Add
|
||||
the |zv| command to the mapping to get the same effect.
|
||||
When a movement command is used for an operator (e.g., "dl" or "y%")
|
||||
this option is not used. This means the operator will include the
|
||||
whole closed fold.
|
||||
@@ -3205,7 +3256,8 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
the internal format mechanism.
|
||||
|
||||
The expression may be evaluated in the |sandbox|, see
|
||||
|sandbox-option|.
|
||||
|sandbox-option|. That stops the option from working, since changing
|
||||
the buffer text is not allowed.
|
||||
|
||||
*'fsync'* *'fs'*
|
||||
'fsync' 'fs' boolean (default on)
|
||||
@@ -3357,7 +3409,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
:highlight Cursor gui=NONE guifg=bg guibg=fg
|
||||
<
|
||||
*'guifont'* *'gfn'*
|
||||
*E235* *E596* *E610* *E611*
|
||||
*E235* *E596*
|
||||
'guifont' 'gfn' string (default "")
|
||||
global
|
||||
{not in Vi}
|
||||
@@ -4066,7 +4118,8 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
It is used when a new line is created, for the |=| operator and
|
||||
in Insert mode as specified with the 'indentkeys' option.
|
||||
When this option is not empty, it overrules the 'cindent' and
|
||||
'smartindent' indenting.
|
||||
'smartindent' indenting. When 'lisp' is set, this option is
|
||||
overridden by the Lisp indentation algorithm.
|
||||
When 'paste' is set this option is not used for indenting.
|
||||
The expression is evaluated with |v:lnum| set to the line number for
|
||||
which the indent is to be computed. The cursor is also in this line
|
||||
@@ -4289,6 +4342,8 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
"echo &key". This is to avoid showing it to someone who shouldn't
|
||||
know. It also means you cannot see it yourself once you have set it,
|
||||
be careful not to make a typing error!
|
||||
You can use "&key" in an expression to detect whether encryption is
|
||||
enabled. When 'key' is set it returns "*****" (five stars).
|
||||
|
||||
*'keymap'* *'kmp'* *E544*
|
||||
'keymap' 'kmp' string (default "")
|
||||
@@ -4806,6 +4861,10 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
written. A ":set nomodified" command also resets the original
|
||||
values to the current values and the 'modified' option will be
|
||||
reset.
|
||||
This option is not set when a change is made to the buffer as the
|
||||
result of a BufNewFile, BufRead/BufReadPost, BufWritePost,
|
||||
FileAppendPost or VimLeave autocommand event. See |gzip-example| for
|
||||
an explanation.
|
||||
When 'buftype' is "nowrite" or "nofile" this option may be set, but
|
||||
will be ignored.
|
||||
|
||||
@@ -5072,20 +5131,12 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
security reasons.
|
||||
|
||||
|
||||
*'osfiletype'* *'oft'* *E366*
|
||||
'osfiletype' 'oft' string (RISC-OS default: "Text",
|
||||
others default: "")
|
||||
*'osfiletype'* *'oft'*
|
||||
'osfiletype' 'oft' string (default: "")
|
||||
local to buffer
|
||||
{not in Vi}
|
||||
{only available when compiled with the |+osfiletype|
|
||||
feature}
|
||||
Some operating systems store extra information about files besides
|
||||
name, datestamp and permissions. This option contains the extra
|
||||
information, the nature of which will vary between systems.
|
||||
The value of this option is usually set when the file is loaded, and
|
||||
is used to set the operating system file type when file is written.
|
||||
It can affect the pattern matching of the automatic commands.
|
||||
|autocmd-osfiletypes|
|
||||
This option was supported on RISC OS, which has been removed.
|
||||
|
||||
|
||||
*'paragraphs'* *'para'*
|
||||
'paragraphs' 'para' string (default "IPLPPPQPP TPHPLIPpLpItpplpipbp")
|
||||
@@ -5851,8 +5902,11 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
"bash.exe -c ls" or "command.com /c dir". For the MS-DOS-like
|
||||
systems, the default is set according to the value of 'shell', to
|
||||
reduce the need to set this option by the user. It's not used for
|
||||
OS/2 (EMX figures this out itself). See |option-backslash| about
|
||||
including spaces and backslashes. See |dos-shell|.
|
||||
OS/2 (EMX figures this out itself).
|
||||
On Unix it can have more than one flag. Each white space separated
|
||||
part is passed as an argument to the shell command.
|
||||
See |option-backslash| about including spaces and backslashes.
|
||||
Also see |dos-shell| for MS-DOS and MS-Windows.
|
||||
This option cannot be set from a |modeline| or in the |sandbox|, for
|
||||
security reasons.
|
||||
|
||||
@@ -5873,9 +5927,10 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
For Unix the default it "| tee". The stdout of the compiler is saved
|
||||
in a file and echoed to the screen. If the 'shell' option is "csh" or
|
||||
"tcsh" after initializations, the default becomes "|& tee". If the
|
||||
'shell' option is "sh", "ksh", "zsh" or "bash" the default becomes
|
||||
"2>&1| tee". This means that stderr is also included. Before using
|
||||
the 'shell' option a path is removed, thus "/bin/sh" uses "sh".
|
||||
'shell' option is "sh", "ksh", "mksh", "pdksh", "zsh" or "bash" the
|
||||
default becomes "2>&1| tee". This means that stderr is also included.
|
||||
Before using the 'shell' option a path is removed, thus "/bin/sh" uses
|
||||
"sh".
|
||||
The initialization of this option is done after reading the ".vimrc"
|
||||
and the other initializations, so that when the 'shell' option is set
|
||||
there, the 'shellpipe' option changes automatically, unless it was
|
||||
@@ -5954,7 +6009,8 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
{not in Vi}
|
||||
When on, use temp files for shell commands. When off use a pipe.
|
||||
When using a pipe is not possible temp files are used anyway.
|
||||
Currently a pipe is only supported on Unix. You can check it with: >
|
||||
Currently a pipe is only supported on Unix and MS-Windows 2K and
|
||||
later. You can check it with: >
|
||||
:if has("filterpipe")
|
||||
< The advantage of using a pipe is that nobody can read the temp file
|
||||
and the 'shell' command does not need to support redirection.
|
||||
@@ -6228,8 +6284,9 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
Do smart autoindenting when starting a new line. Works for C-like
|
||||
programs, but can also be used for other languages. 'cindent' does
|
||||
something like this, works better in most cases, but is more strict,
|
||||
see |C-indenting|. When 'cindent' is on, setting 'si' has no effect.
|
||||
'indentexpr' is a more advanced alternative.
|
||||
see |C-indenting|. When 'cindent' is on or 'indentexpr' is set,
|
||||
setting 'si' has no effect. 'indentexpr' is a more advanced
|
||||
alternative.
|
||||
Normally 'autoindent' should also be on when using 'smartindent'.
|
||||
An indent is automatically inserted:
|
||||
- After a line ending in '{'.
|
||||
@@ -6467,7 +6524,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
where it was the last time the buffer was edited.
|
||||
NOTE: This option is set when 'compatible' is set.
|
||||
|
||||
*'statusline'* *'stl'* *E540* *E541* *E542*
|
||||
*'statusline'* *'stl'* *E540* *E542*
|
||||
'statusline' 'stl' string (default empty)
|
||||
global or local to window |global-local|
|
||||
{not in Vi}
|
||||
@@ -6480,7 +6537,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
normal text. Each status line item is of the form:
|
||||
%-0{minwid}.{maxwid}{item}
|
||||
All fields except the {item} is optional. A single percent sign can
|
||||
be given as "%%". Up to 80 items can be specified.
|
||||
be given as "%%". Up to 80 items can be specified. *E541*
|
||||
|
||||
When the option starts with "%!" then it is used as an expression,
|
||||
evaluated and the result is used as the option value. Example: >
|
||||
@@ -6533,7 +6590,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
k S Value of "b:keymap_name" or 'keymap' when |:lmap| mappings are
|
||||
being used: "<keymap>"
|
||||
n N Buffer number.
|
||||
b N Value of byte under cursor.
|
||||
b N Value of character under cursor.
|
||||
B N As above, in hexadecimal.
|
||||
o N Byte number in file of byte under cursor, first byte is 1.
|
||||
Mnemonic: Offset from start of file (with one added)
|
||||
@@ -7531,8 +7588,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
with an uppercase letter, and don't contain a lowercase
|
||||
letter. Thus "KEEPTHIS and "K_L_M" are stored, but "KeepThis"
|
||||
and "_K_L_M" are not. Nested List and Dict items may not be
|
||||
read back correctly, you end up with a string representation
|
||||
instead.
|
||||
read back correctly, you end up with an empty item.
|
||||
" Maximum number of lines saved for each register. Old name of
|
||||
the '<' item, with the disadvantage that you need to put a
|
||||
backslash before the ", otherwise it will be recognized as the
|
||||
@@ -7748,6 +7804,17 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
a pattern from the list. This avoids problems when a future version
|
||||
uses another default.
|
||||
|
||||
|
||||
*'wildignorecase'* *'wic'* *'nowildignorecase'* *'nowic'*
|
||||
'wildignorecase' 'wic' boolean (default off)
|
||||
global
|
||||
{not in Vi}
|
||||
When set case is ignored when completing file names and directories.
|
||||
Has no effect on systems where file name case is generally ignored.
|
||||
Does not apply when the shell is used to expand wildcards, which
|
||||
happens when there are special characters.
|
||||
|
||||
|
||||
*'wildmenu'* *'wmnu'* *'nowildmenu'* *'nowmnu'*
|
||||
'wildmenu' 'wmnu' boolean (default off)
|
||||
global
|
||||
|
||||
@@ -1,322 +1,12 @@
|
||||
*os_risc.txt* For Vim version 7.3. Last change: 2010 Aug 07
|
||||
*os_risc.txt* For Vim version 7.3. Last change: 2011 May 10
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Thomas Leonard
|
||||
|
||||
|
||||
*riscos* *RISCOS* *RISC-OS*
|
||||
This file contains the particularities for the RISC OS version of Vim.
|
||||
The RISC OS support has been removed from Vim with patch 7.3.187.
|
||||
If you would like to use Vim on RISC OS get the files from before that patch.
|
||||
|
||||
The RISC OS port is a completely new port and is not based on the old "archi"
|
||||
port.
|
||||
|
||||
1. File locations |riscos-locations|
|
||||
2. Filename munging |riscos-munging|
|
||||
3. Command-line use |riscos-commandline|
|
||||
4. Desktop (GUI) use |riscos-gui|
|
||||
5. Remote use (telnet) |riscos-remote|
|
||||
6. Temporary files |riscos-temp-files|
|
||||
7. Interrupting |riscos-interrupt|
|
||||
8. Memory usage |riscos-memory|
|
||||
9. Filetypes |riscos-filetypes|
|
||||
10. The shell |riscos-shell|
|
||||
11. Porting new releases |riscos-porting|
|
||||
|
||||
If I've missed anything, email me and I'll try to fix it. In fact, even if I
|
||||
haven't missed anything then email me anyway to give me some confidence that it
|
||||
actually works!
|
||||
|
||||
Thomas Leonard <tal197@ecs.soton.ac.uk>
|
||||
|
||||
[these URLs no longer work...]
|
||||
Port homepage: http://www.ecs.soton.ac.uk/~tal197/
|
||||
or try: http://www.soton.ac.uk/~tal197/
|
||||
|
||||
==============================================================================
|
||||
*riscos-locations*
|
||||
1. File locations
|
||||
|
||||
The Vim executable and shared resource files are all stored inside the !Vim
|
||||
application directory.
|
||||
|
||||
When !Vim is first seen by the filer, it aliases the *vi and *ex commands to
|
||||
run the command-line versions of Vim (see |riscos-commandline|).
|
||||
|
||||
!Vim.Resources and !Vim.Resources2 contain the files from the standard Vim
|
||||
distribution, but modified slightly to work within the limits of ADFS, plus
|
||||
some extra files such as the window templates.
|
||||
|
||||
User choices are read from "Choices:*" and are saved to "<Choices$Write>.*".
|
||||
If you have the new !Boot structure then these should be set up already. If
|
||||
not, set Choices$Path to a list of directories to search when looking for
|
||||
user configuration files. Set Choices$Write to the directory you want files
|
||||
to be saved into (so your search patterns and marks can be remembered between
|
||||
sessions).
|
||||
|
||||
==============================================================================
|
||||
*riscos-munging*
|
||||
2. Filename munging
|
||||
|
||||
All pathname munging is disabled by default, so Vim should behave like a
|
||||
normal RISC OS application now. So, if you want to edit "doc/html" then you
|
||||
actually type "*vi doc/html".
|
||||
|
||||
The only times munging is done is when:
|
||||
|
||||
- Searching included files from C programs, since these are always munged.
|
||||
See |[I|.
|
||||
Note: make sure you are in the right directory when you use this
|
||||
command (i.e. the one with subdirectories "c" and "h").
|
||||
|
||||
- Sourcing files using |:so|.
|
||||
Paths starting "$VIM/" are munged like this:
|
||||
|
||||
$VIM/syntax/help.vim -> Vim:syntax.help
|
||||
|
||||
Also, files ending in ".vim" have their extensions removed, and slashes
|
||||
replaced with dots.
|
||||
|
||||
Some tag files and script files may have to be edited to work under this port.
|
||||
|
||||
==============================================================================
|
||||
*riscos-commandline*
|
||||
3. Command-line use
|
||||
|
||||
To use Vim from the command-line use the "*vi" command (or "*ex" for
|
||||
|Ex-mode|).
|
||||
|
||||
Type "*vi -h" for a list of options.
|
||||
|
||||
Running the command-line version of Vim in a large high-color mode may cause
|
||||
the scrolling to be very slow. Either change to a mode with fewer colors or
|
||||
use the GUI version.
|
||||
|
||||
Also, holding down Ctrl will slow it down even more, and Ctrl-Shift will
|
||||
freeze it, as usual for text programs.
|
||||
|
||||
==============================================================================
|
||||
*riscos-gui*
|
||||
4. Desktop use
|
||||
|
||||
Limitations:
|
||||
|
||||
- Left scrollbars don't work properly (right and bottom are fine).
|
||||
- Doesn't increase scroll speed if it gets behind.
|
||||
|
||||
You can resize the window by dragging the lower-right corner, even though
|
||||
there is no icon shown there.
|
||||
|
||||
You can use the --rows and --columns arguments to specify the initial size of
|
||||
the Vim window, like this: >
|
||||
|
||||
*Vi -g --rows 20 --columns 80
|
||||
|
||||
The global clipboard is supported, so you can select some text and then
|
||||
paste it directly into another application (provided it supports the
|
||||
clipboard too).
|
||||
|
||||
Clicking Menu now opens a menu like a normal RISC OS program. Hold down Shift
|
||||
when clicking Menu to paste (from the global clipboard).
|
||||
|
||||
Dragging a file to the window replaces the CURRENT buffer (the one with the
|
||||
cursor, NOT the one you dragged to) with the file.
|
||||
|
||||
Dragging with Ctrl held down causes a new Vim window to be opened for the
|
||||
file (see |:sp|).
|
||||
|
||||
Dragging a file in with Shift held down in insert mode inserts the pathname of
|
||||
the file.
|
||||
|
||||
:browse :w opens a standard RISC OS save box.
|
||||
:browse :e opens a directory viewer.
|
||||
|
||||
For fonts, you have the choice of the system font, an outline font, the system
|
||||
font via ZapRedraw and any of the Zap fonts via ZapRedraw: >
|
||||
|
||||
:set guifont=
|
||||
< To use the system font via the VDU drivers. Supports
|
||||
bold and underline.
|
||||
>
|
||||
:set guifont=Corpus.Medium
|
||||
< Use the named outline font. You can use any font, but
|
||||
only monospaced ones like Corpus look right.
|
||||
>
|
||||
:set guifont=Corpus.Medium:w8:h12:b:i
|
||||
< As before, but with size of 8 point by 12 point, and
|
||||
in bold italic.
|
||||
If only one of width and height is given then that
|
||||
value is used for both. If neither is given then 10
|
||||
point is used.
|
||||
|
||||
Thanks to John Kortink, Vim can use the ZapRedraw module. Start the font name
|
||||
with "!" (or "!!" for double height), like this: >
|
||||
|
||||
:set guifont=!!
|
||||
< Use the system font, but via ZapRedraw. This gives a
|
||||
faster redraw on StrongARM processors, but you can't
|
||||
get bold or italic text. Double height.
|
||||
>
|
||||
:set guifont=!script
|
||||
< Uses the named Zap font (a directory in VimFont$Path).
|
||||
The redraw is the same speed as for "!!", but you get
|
||||
a nicer looking font.
|
||||
Only the "man+" and "script" fonts are supplied
|
||||
currently, but you can use any of the Zap fonts if
|
||||
they are in VimFont$Path.
|
||||
Vim will try to load font files "0", "B", "I" and "IB"
|
||||
from the named directory. Only "0" (normal style) MUST
|
||||
be present. Link files are not currently supported.
|
||||
|
||||
Note that when using ZapRedraw the edit bar is drawn in front of the character
|
||||
you are on rather than behind it. Also redraw is incorrect for screen modes
|
||||
with eigen values of 0. If the font includes control characters then you can
|
||||
get Vim to display them by changing the 'isprint' option.
|
||||
|
||||
If you find the scrolling is too slow on your machine, try experimenting
|
||||
with the 'scrolljump' and 'ttyscroll' options.
|
||||
|
||||
In particular, StrongARM users may find that: >
|
||||
|
||||
:set ttyscroll=0
|
||||
|
||||
makes scrolling faster in high-color modes.
|
||||
|
||||
=============================================================================
|
||||
*riscos-remote*
|
||||
5. Remote use (telnet)
|
||||
|
||||
I have included a built-in termcap entry, but you can edit the termcap file to
|
||||
allow other codes to be used if you want to use Vim from a remote terminal.
|
||||
|
||||
Although I do not have an internet connection to my Acorn, I have managed to
|
||||
run Vim in a FreeTerm window using the loopback connection.
|
||||
|
||||
It seems to work pretty well now, using "*vi -T ansi".
|
||||
|
||||
==============================================================================
|
||||
*riscos-temp-files*
|
||||
6. Temporary files
|
||||
|
||||
If Vim crashes then the swap and backup files (if any) will be in the
|
||||
directories set with the 'directory' and 'bdir' options. By default the swap
|
||||
files are in <Wimp$ScrapDir> (i.e. inside !Scrap) and backups are in the
|
||||
directory you were saving to. Vim will allow you to try and recover the file
|
||||
when you next try to edit it.
|
||||
|
||||
To see a list of swap files, press <F12> and type "*vi -r".
|
||||
|
||||
Vim no longer brings up ATTENTION warnings if you try to edit two files with
|
||||
the same name in different directories.
|
||||
|
||||
However, it also no longer warns if you try to edit the same file twice (with
|
||||
two copies of Vim), though you will still be warned when you save that the
|
||||
datestamp has changed.
|
||||
|
||||
==============================================================================
|
||||
*riscos-interrupt*
|
||||
7. Interrupting
|
||||
|
||||
To break out of a looping macro, or similar, hold down Escape in the
|
||||
command-line version, or press CTRL-C in the GUI version.
|
||||
|
||||
==============================================================================
|
||||
*riscos-memory*
|
||||
8. Memory usage
|
||||
|
||||
Vim will use dynamic areas on RISC OS 3.5 or later. If you can use them on
|
||||
older machines then edit the !RunTxt and GVim files. I don't know what UnixLib
|
||||
does by default on these machines so I'm playing safe.
|
||||
|
||||
It doesn't work at all well without dynamic areas, since it can't change its
|
||||
memory allocation once running. Hence you should edit "!Vim.GVim" and
|
||||
"!Vim.!RunTxt" to choose the best size for you. You probably need at least
|
||||
about 1400K.
|
||||
|
||||
==============================================================================
|
||||
*riscos-filetypes*
|
||||
9. Filetypes
|
||||
|
||||
You can now specify that autocommands are only executed for files of certain
|
||||
types. The filetype is given in the form &xxx, when xxx is the filetype.
|
||||
|
||||
Filetypes must be specified by number (e.g. &fff for Text).
|
||||
|
||||
The system has changed from version 5.3. The new sequence of events is:
|
||||
|
||||
- A file is loaded. |'osfiletype'| is set to the RISC OS filetype.
|
||||
- Based on the filetype and pathname, Vim will try to set |'filetype'| to the
|
||||
Vim-type of the file.
|
||||
- Setting this option may load syntax files and perform other actions.
|
||||
- Saving the file will give it a filetype of |'osfiletype'|.
|
||||
|
||||
Some examples may make this clearer:
|
||||
|
||||
Kind of file loaded osfiletype filetype ~
|
||||
C code "c.hellow" Text (&fff) C
|
||||
LaTeX document LaTeX (&2a8) TeX
|
||||
Draw document DrawFile (&aff) (not changed)
|
||||
|
||||
==============================================================================
|
||||
*riscos-shell*
|
||||
10. The shell
|
||||
|
||||
- Bangs (!s) are only replaced if they are followed by a space or end-of-line,
|
||||
since many pathnames contain them.
|
||||
|
||||
- You can prefix the command with "~", which stops any output from being
|
||||
displayed. This also means that you don't have to press <Enter> afterwards,
|
||||
and stops the screen from being redrawn. {only in the GUI version}
|
||||
|
||||
==============================================================================
|
||||
*riscos-porting*
|
||||
11. Porting new releases to RISC OS
|
||||
|
||||
Downloading everything you need:
|
||||
|
||||
- Get the latest source distribution (see www.vim.org)
|
||||
- Get the runtime environment files (e.g. these help files)
|
||||
- Get the RISC OS binary distribution (if possible)
|
||||
|
||||
|
||||
Unarchiving:
|
||||
|
||||
- Create a raFS disk and put the archives on it
|
||||
- Un-gzip them
|
||||
- Un-tar them (*tar xELf 50 archive/tar)
|
||||
|
||||
|
||||
Recompiling the sources:
|
||||
|
||||
- Create c, s, and h directories.
|
||||
- Put all the header files in "h". \
|
||||
- Put all the C files in "c". | And lose the extensions
|
||||
- Put the assembler file ("swis/s") in "s". /
|
||||
- Rename all the files in "proto" to "h", like this:
|
||||
raFS::VimSrc.source.proto.file/pro
|
||||
becomes
|
||||
raFS::VimSrc.source.h.file_pro
|
||||
- In the files "h.proto" and "c.termlib", search and replace
|
||||
.pro"
|
||||
with
|
||||
_pro.h"
|
||||
- Create a simple Makefile if desired and do "*make -k".
|
||||
Use "CC = gcc -DRISCOS -DUSE_GUI -O2 -x c" in the Makefile.
|
||||
- Save the binary as !Vim.Vim in the binary distribution.
|
||||
|
||||
|
||||
Updating the run-time environment:
|
||||
|
||||
- Replace old or missing files inside !Vim.Resources with the
|
||||
new files.
|
||||
- Remove files in "doc" not ending in "/txt", except for "tags".
|
||||
- Lose the extensions from the files in "doc".
|
||||
- Edit the "doc.tags" file. Remove extensions from the second column: >
|
||||
:%s/^\(.[^\t]*\t.*\)\.txt\t/\1\t/
|
||||
- Remove extensions from the syntax files. Split them into two directories
|
||||
to avoid the 77 entry limit on old ADFS filesystems.
|
||||
- Edit "Vim:FileType" to match "*.c.*" as well as "*/c" and so on.
|
||||
Add filetype checking too.
|
||||
- Edit "Vim:Menu" and remove all the keys from the menus: >
|
||||
:%s/<Tab>[^ \t]*//
|
||||
<
|
||||
vim:tw=78:ts=8:ft=help:norl:
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*os_vms.txt* For Vim version 7.3. Last change: 2010 Aug 16
|
||||
*os_vms.txt* For Vim version 7.3. Last change: 2011 Aug 14
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL
|
||||
@@ -38,9 +38,6 @@ You can download the Vim source code by ftp from the official Vim site:
|
||||
Or use one of the mirrors:
|
||||
ftp://ftp.vim.org/pub/vim/MIRRORS
|
||||
|
||||
You will need both the Unix and Extra archives to build vim.exe for VMS.
|
||||
For using Vim's full power you will need the runtime files as well.
|
||||
|
||||
You can download precompiled executables from:
|
||||
http://www.polarhome.com/vim/
|
||||
ftp://ftp.polarhome.com/pub/vim/
|
||||
@@ -75,7 +72,7 @@ See the file [.SRC]INSTALLVMS.TXT.
|
||||
4. Problems *vms-problems*
|
||||
|
||||
The code has been tested under Open VMS 6.2 - 8.2 on Alpha, VAX and IA64
|
||||
platforms with the DEC C compiler. It should work without bigger problems.
|
||||
platforms with the DEC C compiler. It should work without big problems.
|
||||
If your system does not have some include libraries you can tune up in
|
||||
OS_VMS_CONF.H file.
|
||||
|
||||
@@ -88,11 +85,11 @@ Also GTK, XPM library paths should be configured in MAKE_VMS.MMS
|
||||
|
||||
Note: Under VAX it should work with the DEC C compiler without problems. The
|
||||
VAX C compiler is not fully ANSI C compatible in pre-processor directives
|
||||
semantics, therefore you have to use a converter program what will do the lion
|
||||
semantics, therefore you have to use a converter program that will do the lion
|
||||
part of the job. For detailed instructions read file INSTALLvms.txt
|
||||
|
||||
MMS_VIM.EXE is build together with VIM.EXE, but for XD.EXE you should
|
||||
change to subdirectory and build it separately.
|
||||
MMS_VIM.EXE is build together with VIM.EXE, but for XXD.EXE you should
|
||||
change to a subdirectory and build it separately.
|
||||
|
||||
CTAGS is not part of the Vim source distribution anymore, however the OpenVMS
|
||||
specific source might contain CTAGS source files as described above.
|
||||
@@ -184,9 +181,9 @@ You may want to create .vimrc and .gvimrc files in your home directory
|
||||
|
||||
The easiest way is just rename example files. You may leave the menu file
|
||||
(MENU.VIM) and files vimrc and gvimrc in the original $VIM directory. It will
|
||||
be default setup for all users, and for users it is enough just to have their
|
||||
own additions or resetting in their home directory in files .vimrc and .gvimrc.
|
||||
It should work without problems.
|
||||
be the default setup for all users, and for users it is enough to just have
|
||||
their own additions or resetting in their home directory in files .vimrc and
|
||||
.gvimrc. It should work without problems.
|
||||
|
||||
Note: Remember, system rc files (default for all users) don't have a leading
|
||||
".". So, system rc files are: >
|
||||
@@ -200,7 +197,7 @@ and user customized rc files are: >
|
||||
sys$login:.vimrc
|
||||
sys$login:.gvimrc
|
||||
|
||||
You can check that everything is on the right place with the :version command.
|
||||
You can check that everything is at the right place with the :version command.
|
||||
|
||||
Example LOGIN.COM: >
|
||||
|
||||
@@ -209,15 +206,15 @@ Example LOGIN.COM: >
|
||||
$ gv*im:== spawn/nowait/input=NLA0 mcr VIM:VIM.EXE -g -GEOMETRY 80x40
|
||||
$ set disp/create/node=192.168.5.223/trans=tcpip
|
||||
|
||||
Note: This set-up should be enough, if you are working on standalone server or
|
||||
clustered environment, but if you want to use Vim as internode editor in
|
||||
Note: This set-up should be enough, if you are working on a standalone server or
|
||||
clustered environment, but if you want to use Vim as an internode editor in
|
||||
DECNET environment, it will satisfy as well.
|
||||
You just have to define the "whole" path: >
|
||||
|
||||
$ define VIM "<server_name>[""user password""]::device:<path>"
|
||||
$ vi*m :== "mcr VIM:VIM.EXE"
|
||||
|
||||
As for example: >
|
||||
For example: >
|
||||
|
||||
$ define VIM "PLUTO::RF10:[UTIL.VIM]"
|
||||
$ define VIM "PLUTO""ZAY mypass""::RF10:[UTIL.VIM]" ! if passwd required
|
||||
@@ -300,12 +297,12 @@ For more information type $help set disp in VMS prompt.
|
||||
|
||||
4) If you are working on MS-Windows or some other non X/Window environment
|
||||
you need to set up one X server and run Vim as in point 2.
|
||||
For MS-Windows there are available free X servers as MIX , Omni X etc.,
|
||||
For MS-Windows there are available free X servers as MIX, Omni X etc.,
|
||||
as well as excellent commercial products as eXcursion or ReflectionX with
|
||||
built-in DEC support.
|
||||
|
||||
Please note, that executables without GUI are slightly faster during startup
|
||||
then with enabled GUI in character mode. Therefore, if you do not use GUI
|
||||
than with enabled GUI in character mode. Therefore, if you do not use GUI
|
||||
features, it is worth to choose non GUI executables.
|
||||
|
||||
==============================================================================
|
||||
@@ -326,8 +323,8 @@ features, it is worth to choose non GUI executables.
|
||||
8.12 diff-mode
|
||||
8.13 Allow '$' in C keywords
|
||||
8.14 VIMTUTOR for beginners
|
||||
8.15 Slow start in console mode issue
|
||||
8.16 Common VIM directory - different architectures
|
||||
8.15 Slow start in console mode issue
|
||||
8.16 Common VIM directory - different architectures
|
||||
|
||||
8.1 Backspace/delete
|
||||
|
||||
@@ -360,7 +357,7 @@ number, try these settings. >
|
||||
:set nowritebackup " does not have any purpose on VMS. It's the
|
||||
" default.
|
||||
|
||||
Recovery is working perfect as well from the default swap file.
|
||||
Recovery is working perfectly as well from the default swap file.
|
||||
Read more with :help swapfile
|
||||
|
||||
(Claude Marinier <ClaudeMarinier@xwavesolutions.com> Vim 5.5, Zoltan Arpadffy
|
||||
@@ -386,7 +383,7 @@ Note: You may use <,> brackets as well (device:<path>file.ext;version) as
|
||||
rf10:<user.zay.work>test.c;1
|
||||
|
||||
(David Elins <delins@foliage.com>, Jerome Lauret
|
||||
<JLAURET@mail.chem.sunysb.edu> Vim 5.6 )
|
||||
<JLAURET@mail.chem.sunysb.edu> Vim 5.6)
|
||||
|
||||
|
||||
8.5 Remote host invocation
|
||||
@@ -445,14 +442,14 @@ Terminal entry not found in termcap
|
||||
builtin_dumb
|
||||
defaulting to 'vt320'
|
||||
---
|
||||
The solution is to define default terminal name: >
|
||||
The solution is to define the default terminal name: >
|
||||
|
||||
$ ! unknown terminal name. Let us use vt320 or ansi instead.
|
||||
$ ! Note: it's case sensitive
|
||||
$ define term "vt320"
|
||||
|
||||
Terminals from VT100 to VT320 (as V300, VT220, VT200 ) do not need any extra
|
||||
keyboard mappings. They should work perfect as they are, including arrows,
|
||||
Terminals from VT100 to VT320 (as V300, VT220, VT200) do not need any extra
|
||||
keyboard mappings. They should work perfectly as they are, including arrows,
|
||||
Ins, Del buttons etc., except Backspace in GUI mode. To solve it, add to
|
||||
.gvimrc: >
|
||||
|
||||
@@ -465,8 +462,8 @@ your .vimrc file: >
|
||||
|
||||
set ttyfast " set fast terminal
|
||||
|
||||
Note: if you're using Vim on remote host or through very slow connection, it's
|
||||
recommended to avoid fast terminal option with: >
|
||||
Note: if you're using Vim on remote host or through a very slow connection, it's
|
||||
recommended to avoid the fast terminal option with: >
|
||||
|
||||
set nottyfast " set terminal to slow mode
|
||||
|
||||
@@ -483,8 +480,8 @@ special commands to execute executables: >
|
||||
|
||||
OpenVMS users always have to be aware that the Vim command :! "just" drop them
|
||||
to DCL prompt. This feature is possible to use without any problem with all
|
||||
DCL commands, but if we want to execute some program as XXD, CTAGS, JTAGS etc.
|
||||
we're running into trouble if we follow the Vim documentation (see: help
|
||||
DCL commands, but if we want to execute some programs such as XXD, CTAGS, JTAGS,
|
||||
etc. we're running into trouble if we follow the Vim documentation (see: help
|
||||
xxd).
|
||||
|
||||
Solution: Execute with the MC command and add the full path to the executable.
|
||||
@@ -534,7 +531,7 @@ Example: >
|
||||
|
||||
$define SYS$PRINT HP5ANSI
|
||||
|
||||
You can print out whole buffer or just the marked area.
|
||||
You can print out the whole buffer or just the marked area.
|
||||
More info under :help hardcopy
|
||||
|
||||
(Zoltan Arpadffy, Vim 6.0c)
|
||||
@@ -561,16 +558,16 @@ will be confused after a window-resize.
|
||||
From 6.0 diff functionality has been implemented, but OpenVMS does not use
|
||||
GNU/Unix like diff therefore built in diff does not work.
|
||||
There is a simple solution to solve this anomaly. Install a Unix like diff
|
||||
and Vim will work perfect in diff mode too. You just have to redefine your
|
||||
and Vim will work perfectly in diff mode too. You just have to redefine your
|
||||
diff program as: >
|
||||
|
||||
define /nolog diff <GNU_PATH>diff.exe
|
||||
|
||||
Another, more sophisticated solution is described below (8.12 diff-mode)
|
||||
There are some other programs as patch, make etc that may cause same problems.
|
||||
At www.polarhome.com is possible to download an GNU package for Alpha and VAX
|
||||
boxes that is meant to solve GNU problems on OpenVMS.
|
||||
( Zoltan Arpadffy, Vim 6.1)
|
||||
There are other programs such as patch, make etc that may cause the same
|
||||
problems. At www.polarhome.com is possible to download an GNU package for
|
||||
Alpha and VAX boxes that is meant to solve GNU problems on OpenVMS.
|
||||
(Zoltan Arpadffy, Vim 6.1)
|
||||
|
||||
|
||||
8.12 diff-mode
|
||||
@@ -632,7 +629,7 @@ You can now compare files in 4 ways: >
|
||||
3. VIM diff: $ VIMDIFF <FILE1> <FILE2>
|
||||
4. GVIM diff: $ GVIMDIFF <FILE1> <FILE2>
|
||||
|
||||
( Coen Engelbarts, Vim 6.1)
|
||||
(Coen Engelbarts, Vim 6.1)
|
||||
|
||||
|
||||
8.13 Allow '$' in C keywords
|
||||
@@ -653,35 +650,36 @@ Now word-based commands, e.g. the '*'-search-command and the CTRL-]
|
||||
tag-lookup, work on the whole identifier. (Ctags on VMS also supports '$' in
|
||||
C keywords since ctags version 5.1.)
|
||||
|
||||
( Coen Engelbarts, Vim 6.1)
|
||||
(Coen Engelbarts, Vim 6.1)
|
||||
|
||||
8.14 VIMTUTOR for beginners
|
||||
|
||||
It exits VIMTUTOR.COM DCL script that can help Vim beginners to learn/make
|
||||
first steps with Vim on OpenVMS. Depending of binary distribution you may
|
||||
start it with: >
|
||||
The VIMTUTOR.COM DCL script can help Vim beginners to learn/make their first
|
||||
steps with Vim on OpenVMS. Depending of binary distribution you may start it
|
||||
with: >
|
||||
|
||||
@vim:vimtutor
|
||||
|
||||
(Thomas.R.Wyant III, Vim 6.1)
|
||||
|
||||
8.14 Slow start in console mode issue
|
||||
8.16 Slow start in console mode issue
|
||||
|
||||
As GUI/GTK Vim works equally well in console mode, many administrators
|
||||
deploy those executables system wide.
|
||||
Unfortunately, on a remote slow connections GUI/GTK executables behave rather
|
||||
slow when user wants to run Vim just in the console mode - because of X environment detection timeout.
|
||||
slow when user wants to run Vim just in the console mode - because of X
|
||||
environment detection timeout.
|
||||
|
||||
Luckily, there is a simple solution for that. Administrators need to deploy
|
||||
both GUI/GTK build and just console build executables, like below: >
|
||||
|
||||
|- vim73
|
||||
|----- doc
|
||||
|----- syntax
|
||||
|----- syntax
|
||||
vimrc (system rc files)
|
||||
gvimrc
|
||||
gvim.exe (the renamed GUI or GTK built vim.exe)
|
||||
vim.exe (the console only executable)
|
||||
gvim.exe (the renamed GUI or GTK built vim.exe)
|
||||
vim.exe (the console only executable)
|
||||
|
||||
Define system symbols like below in for ex in LOGIN.COM or SYLOGIN.COM: >
|
||||
|
||||
@@ -692,7 +690,7 @@ Define system symbols like below in for ex in LOGIN.COM or SYLOGIN.COM: >
|
||||
$ gv*im :== spawn/nowait/input=NLA0 mcr VIM:GVIM.EXE -g -GEOMETRY 80x40
|
||||
|
||||
|
||||
Like this, users that do not have X environment and want to use Vim just in
|
||||
Like this, users that do not have X environment and want to use Vim just in
|
||||
console mode can avoid performance problems.
|
||||
|
||||
(Zoltan Arpadffy, Vim 7.2)
|
||||
@@ -714,8 +712,8 @@ View of Cluster from system ID 11655 node: TOR
|
||||
+---------------------------------+
|
||||
|
||||
It is convenient to have a common VIM directory but execute different
|
||||
executables.
|
||||
There are more solutions for this problem:
|
||||
executables.
|
||||
There are several solutions for this problem:
|
||||
|
||||
Solution 1. All executables in the same directory with different names
|
||||
This is easily done with the following script that can be added
|
||||
@@ -769,7 +767,7 @@ GNU_TOOLS.ZIP package downloadable from http://www.polarhome.com/vim/
|
||||
Version 7.3
|
||||
- CTAGS 5.8 included
|
||||
- VMS compile warnings fixed - floating-point overflow warning corrected on VAX
|
||||
- filepath completition corrected - too many chars were escaped in filename
|
||||
- filepath completion corrected - too many chars were escaped in filename
|
||||
and shell commands
|
||||
- the following plugins are included into VMS runtime:
|
||||
genutils 2.4, multiselect 2.2, multvals 3.1, selectbuf 4.3,
|
||||
@@ -784,10 +782,10 @@ Version 7.3
|
||||
Version 7.2 (2008 Aug 9)
|
||||
- VCF files write corrected
|
||||
- CTAGS 5.7 included
|
||||
- corrected make_vms.mms (on VAX gave syntax error)
|
||||
- corrected make_vms.mms (on VAX gave syntax error)
|
||||
|
||||
Version 7.1 (2007 Jun 15)
|
||||
- create TAGS file from menu
|
||||
- create TAGS file from menu
|
||||
|
||||
Version 7 (2006 May 8)
|
||||
- Improved low level char input (affects just console mode)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*os_win32.txt* For Vim version 7.3. Last change: 2010 Jul 20
|
||||
*os_win32.txt* For Vim version 7.3. Last change: 2011 Aug 14
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by George Reilly
|
||||
@@ -313,6 +313,37 @@ A. When using :! to run an external command, you can run it with "start": >
|
||||
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".
|
||||
There are two optional arguments (see the next Q):
|
||||
/min the window will be minimized.
|
||||
/b" no console window will be opened
|
||||
You can use only one of these flags at a time. A second one will be
|
||||
treated as the start of the command.
|
||||
|
||||
Q. How do I avoid getting a window for programs that I run asynchronously?
|
||||
A. You have two possible solutions depending on what you want:
|
||||
1) You may use the /min flag in order to run program in a minimized state
|
||||
with no other changes. It will work equally for console and GUI
|
||||
applications.
|
||||
2) You can use the /b flag to run console applications without creating a
|
||||
console window for them (GUI applications are not affected). But you
|
||||
should use this flag only if the application you run doesn't require any
|
||||
input. Otherwise it will get an EOF error because its input stream
|
||||
(stdin) would be redirected to \\.\NUL (stdout and stderr too).
|
||||
|
||||
Example for a console application, run Exuberant ctags: >
|
||||
:!start /min ctags -R .
|
||||
< When it has finished you should see file named "tags" in your current
|
||||
directory. You should notice the window title blinking on your taskbar.
|
||||
This is more noticable for commands that take longer.
|
||||
Now delete the "tags" file and run this command: >
|
||||
:!start /b ctags -R .
|
||||
< You should have the same "tags" file, but this time there will be no
|
||||
blinking on the taskbar.
|
||||
Example for a GUI application: >
|
||||
:!start /min notepad
|
||||
:!start /b notepad
|
||||
< The first command runs notepad minimized and the second one runs it
|
||||
normally.
|
||||
|
||||
Q. I'm using Win32s, and when I try to run an external command like "make",
|
||||
Vim doesn't wait for it to finish! Help!
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*pattern.txt* For Vim version 7.3. Last change: 2010 Jul 20
|
||||
*pattern.txt* For Vim version 7.3. Last change: 2011 Jul 20
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -214,7 +214,8 @@ The last used pattern and offset are remembered. They can be used to repeat
|
||||
the search, possibly in another direction or with another count. Note that
|
||||
two patterns are remembered: One for 'normal' search commands and one for the
|
||||
substitute command ":s". Each time an empty pattern is given, the previously
|
||||
used pattern is used.
|
||||
used pattern is used. However, if there is no previous search command, a
|
||||
previous substitute pattern is used, if possible.
|
||||
|
||||
The 'magic' option sticks with the last used pattern. If you change 'magic',
|
||||
this will not change how the last used pattern will be interpreted.
|
||||
@@ -634,7 +635,8 @@ overview.
|
||||
Like '(?!pattern)" in Perl.
|
||||
Example matches ~
|
||||
foo\(bar\)\@! any "foo" not followed by "bar"
|
||||
a.\{-}p\@! "a", "ap", "app", etc. not followed by a "p"
|
||||
a.\{-}p\@! "a", "ap", "aap", "app", etc. not immediately
|
||||
followed by a "p"
|
||||
if \(\(then\)\@!.\)*$ "if " not followed by "then"
|
||||
|
||||
Using "\@!" is tricky, because there are many places where a pattern
|
||||
@@ -650,6 +652,13 @@ overview.
|
||||
"foobar" you could use "\(foo\)\@!...bar", but that doesn't match a
|
||||
bar at the start of a line. Use "\(foo\)\@<!bar".
|
||||
|
||||
Useful example: to find "foo" in a line that does not contain "bar": >
|
||||
/^\%(.*bar\)\@!.*\zsfoo
|
||||
< This pattern first checks that there is not a single position in the
|
||||
line where "bar" matches. If ".*bar" matches somewhere the \@! will
|
||||
reject the pattern. When there is no match any "foo" will be found.
|
||||
The "\zs" is to have the match start just before "foo".
|
||||
|
||||
*/\@<=*
|
||||
\@<= Matches with zero width if the preceding atom matches just before what
|
||||
follows. |/zero-width| {not in Vi}
|
||||
@@ -1027,11 +1036,9 @@ x A single character, with no special meaning, matches itself
|
||||
These items only work for 8-bit characters.
|
||||
*/[[=* *[==]*
|
||||
- An equivalence class. This means that characters are matched that
|
||||
have almost the same meaning, e.g., when ignoring accents. The form
|
||||
is:
|
||||
have almost the same meaning, e.g., when ignoring accents. This
|
||||
only works for Unicode, latin1 and latin9. The form is:
|
||||
[=a=]
|
||||
Currently this is only implemented for latin1. Also works for the
|
||||
latin1 characters in utf-8 and latin9.
|
||||
*/[[.* *[..]*
|
||||
- A collation element. This currently simply accepts a single
|
||||
character in the form:
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
*pi_getscript.txt* For Vim version 7.3. Last change: 2009 Oct 14
|
||||
*pi_getscript.txt* For Vim version 7.0. Last change: 2011 May 31
|
||||
>
|
||||
GETSCRIPT REFERENCE MANUAL by Charles E. Campbell, Jr.
|
||||
<
|
||||
Authors: Charles E. Campbell, Jr. <NdrOchip@ScampbellPfamilyA.Mbiz>
|
||||
(remove NOSPAM from the email address)
|
||||
*GetLatestVimScripts-copyright*
|
||||
Copyright: (c) 2004-2009 by Charles E. Campbell, Jr. *glvs-copyright*
|
||||
Copyright: (c) 2004-2010 by Charles E. Campbell, Jr. *glvs-copyright*
|
||||
The VIM LICENSE applies to getscript.vim and
|
||||
pi_getscript.txt (see |copyright|) except use
|
||||
"getscript" instead of "Vim". No warranty, express or implied.
|
||||
@@ -77,7 +77,9 @@ Your computer needs to have wget or curl for GetLatestVimScripts to do its work.
|
||||
3. GetLatestVimScripts Usage *glvs-usage* *:GLVS*
|
||||
|
||||
Unless it has been defined elsewhere, >
|
||||
|
||||
:GLVS
|
||||
|
||||
will invoke GetLatestVimScripts(). If some other plugin has defined that
|
||||
command, then you may type
|
||||
>
|
||||
@@ -127,7 +129,8 @@ click on the script's link, you'll see a line resembling
|
||||
http://vim.sourceforge.net/scripts/script.php?script_id=40
|
||||
|
||||
The "40" happens to be a ScriptID that GetLatestVimScripts needs to
|
||||
download the associated page.
|
||||
download the associated page, and is assigned by vim.sf.net itself
|
||||
during initial uploading of the plugin.
|
||||
|
||||
The second number on each line gives the script's SourceID. The SourceID
|
||||
records the count of uploaded scripts as determined by vim.sf.net; hence it
|
||||
@@ -151,19 +154,39 @@ This comment line tells getscript.vim to check vimscript #884 and that the
|
||||
script is automatically installable. Getscript will also use this line to
|
||||
help build the GetLatestVimScripts.dat file, by including a line such as: >
|
||||
|
||||
884 1 AutoAlign.vim
|
||||
884 1 :AutoInstall: AutoAlign.vim
|
||||
<
|
||||
in it an AutoAlign.vim line isn't already in GetLatestVimScripts.dat file.
|
||||
assuming that such a line isn't already in GetLatestVimScripts.dat file.
|
||||
See |glvs-plugins| for more. Thus, GetLatestVimScripts thus provides a
|
||||
comprehensive ability to keep your plugins up-to-date!
|
||||
|
||||
In summary:
|
||||
|
||||
* Optionally tell getscript that it is allowed to build/append a
|
||||
GetLatestVimScripts.dat file based upon already installed plugins: >
|
||||
let g:GetLatestVimScripts_allowautoinstall=1
|
||||
<
|
||||
* A line such as >
|
||||
" GetLatestVimScripts: 884 1 :AutoInstall: AutoAlign.vim
|
||||
< in an already-downloaded plugin constitutes the concurrence of the
|
||||
plugin author that getscript may do AutoInstall. Not all plugins
|
||||
may be AutoInstall-able, and the plugin's author is best situated
|
||||
to know whether or not his/her plugin will AutoInstall properly.
|
||||
|
||||
* A line such as >
|
||||
884 1 :AutoInstall: AutoAlign.vim
|
||||
< in your GetLatestVimScripts.dat file constitutes your permission
|
||||
to getscript to do AutoInstall. AutoInstall requires both your
|
||||
and the plugin author's permission. See |GetLatestVimScripts_dat|.
|
||||
|
||||
|
||||
*GetLatestVimScripts_dat*
|
||||
As an example of a <GetLatestVimScripts.dat> file:
|
||||
>
|
||||
ScriptID SourceID Filename
|
||||
--------------------------
|
||||
294 1 Align.vim
|
||||
120 2 decho.vim
|
||||
294 1 :AutoInstall: Align.vim
|
||||
120 2 Decho.vim
|
||||
40 3 DrawIt.tar.gz
|
||||
451 4 EasyAccents.vim
|
||||
195 5 engspchk.vim
|
||||
@@ -201,8 +224,8 @@ are, then you may include :AutoInstall: just before "yourscriptname":
|
||||
^
|
||||
scriptid
|
||||
<
|
||||
NOTE: :AutoInstall: is a plugin-author option, not a GetLatestVimScripts.dat~
|
||||
entry!~
|
||||
NOTE: The :AutoInstall: feature requires both the plugin author's and~
|
||||
the user's permission to operate!~
|
||||
|
||||
GetLatestVimScripts commands for those scripts are then appended, if not
|
||||
already present, to the user's GetLatest/GetLatestVimScripts.dat file. It is
|
||||
@@ -210,7 +233,7 @@ a relatively painless way to automate the acquisition of any scripts your
|
||||
plugins depend upon.
|
||||
|
||||
Now, as an author, you probably don't want GetLatestVimScripts to download
|
||||
your own scripts for you yourself, thereby overwriting your not-yet-released
|
||||
your own scripts atop your own copy, thereby overwriting your not-yet-released
|
||||
hard work. GetLatestVimScripts provides a solution for this: put
|
||||
>
|
||||
0 0 yourscriptname
|
||||
@@ -351,6 +374,9 @@ The AutoInstall process will:
|
||||
==============================================================================
|
||||
9. GetLatestVimScripts History *getscript-history* *glvs-hist* {{{1
|
||||
|
||||
v33 May 31, 2011 : * using fnameescape() instead of escape()
|
||||
* *.xz support
|
||||
v32 Jun 19, 2010 : * (Jan Steffens) added support for xz compression
|
||||
v31 Jun 29, 2008 : * (Bill McCarthy) fixed having hls enabled with getscript
|
||||
* (David Schaefer) the acd option interferes with vimballs
|
||||
Solution: bypass the acd option
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*pi_netrw.txt* For Vim version 7.3. Last change: 2010 Jul 28
|
||||
*pi_netrw.txt* For Vim version 7.3. Last change: 2011 May 31
|
||||
|
||||
-----------------------------------------------------
|
||||
NETRW REFERENCE MANUAL by Charles E. Campbell, Jr.
|
||||
@@ -6,7 +6,7 @@
|
||||
Author: Charles E. Campbell, Jr. <NdrOchip@ScampbellPfamily.AbizM>
|
||||
(remove NOSPAM from Campbell's email first)
|
||||
|
||||
Copyright: Copyright (C) 1999-2010 Charles E Campbell, Jr *netrw-copyright*
|
||||
Copyright: Copyright (C) 1999-2011 Charles E Campbell, Jr *netrw-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, netrw.vim,
|
||||
@@ -41,7 +41,7 @@ Copyright: Copyright (C) 1999-2010 Charles E Campbell, Jr *netrw-copyright*
|
||||
NETRC..............................................|netrw-netrc|
|
||||
PASSWORD...........................................|netrw-passwd|
|
||||
5. Activation...........................................|netrw-activate|
|
||||
6. Transparent File Editing.............................|netrw-transparent|
|
||||
6. Transparent Remote File Editing......................|netrw-transparent|
|
||||
7. Ex Commands..........................................|netrw-ex|
|
||||
8. Variables and Options................................|netrw-var|
|
||||
9. Browsing.............................................|netrw-browse|
|
||||
@@ -65,6 +65,7 @@ Copyright: Copyright (C) 1999-2010 Charles E Campbell, Jr *netrw-copyright*
|
||||
Displaying Information About File..................|netrw-qf|
|
||||
Edit File Or Directory Hiding List.................|netrw-ctrl-h|
|
||||
Editing The Sorting Sequence.......................|netrw-S|
|
||||
Forcing treatment as a file or directory...........|netrw-gd| |netrw-gf|
|
||||
Going Up...........................................|netrw--|
|
||||
Hiding Files Or Directories........................|netrw-a|
|
||||
Improving Browsing.................................|netrw-ssh-hack|
|
||||
@@ -180,19 +181,19 @@ EXTERNAL APPLICATIONS AND PROTOCOLS *netrw-externapp* {{{2
|
||||
|
||||
Protocol Variable Default Value
|
||||
-------- ---------------- -------------
|
||||
dav: *g:netrw_dav_cmd* = "cadaver" if cadaver is executable
|
||||
dav: g:netrw_dav_cmd = "curl -o" elseif curl is available
|
||||
fetch: *g:netrw_fetch_cmd* = "fetch -o" if fetch is available
|
||||
ftp: *g:netrw_ftp_cmd* = "ftp"
|
||||
http: *g:netrw_http_cmd* = "elinks" if elinks is available
|
||||
dav: *g:netrw_dav_cmd* = "cadaver" if cadaver is executable
|
||||
dav: g:netrw_dav_cmd = "curl -o" elseif curl is available
|
||||
fetch: *g:netrw_fetch_cmd* = "fetch -o" if fetch is available
|
||||
ftp: *g:netrw_ftp_cmd* = "ftp"
|
||||
http: *g:netrw_http_cmd* = "elinks" if elinks is available
|
||||
http: g:netrw_http_cmd = "links" elseif links is available
|
||||
http: g:netrw_http_cmd = "curl" elseif curl is available
|
||||
http: g:netrw_http_cmd = "wget" elseif wget is available
|
||||
http: g:netrw_http_cmd = "fetch" elseif fetch is available
|
||||
rcp: *g:netrw_rcp_cmd* = "rcp"
|
||||
rsync: *g:netrw_rsync_cmd* = "rsync -a"
|
||||
scp: *g:netrw_scp_cmd* = "scp -q"
|
||||
sftp: *g:netrw_sftp_cmd* = "sftp"
|
||||
rcp: *g:netrw_rcp_cmd* = "rcp"
|
||||
rsync: *g:netrw_rsync_cmd* = "rsync -a"
|
||||
scp: *g:netrw_scp_cmd* = "scp -q"
|
||||
sftp: *g:netrw_sftp_cmd* = "sftp"
|
||||
|
||||
*g:netrw_http_xcmd* : the option string for http://... protocols are
|
||||
specified via this variable and may be independently overridden. By
|
||||
@@ -272,7 +273,7 @@ SOURCING *netrw-source* {{{2
|
||||
:Nsource "scp://[user@]machine[[:#]port]/path" uses scp
|
||||
:Nsource "sftp://[user@]machine/path" uses sftp
|
||||
|
||||
DIRECTORY LISTING *netrw-dirlist* {{{2
|
||||
DIRECTORY LISTING *netrw-trailingslash* *netrw-dirlist* {{{2
|
||||
|
||||
One may browse a directory to get a listing by simply attempting to
|
||||
edit the directory: >
|
||||
@@ -280,14 +281,15 @@ DIRECTORY LISTING *netrw-dirlist* {{{2
|
||||
:e scp://[user]@hostname/path/
|
||||
:e ftp://[user]@hostname/path/
|
||||
<
|
||||
For remote directories (ie. those using scp or ftp), that trailing
|
||||
"/" is necessary (the slash tells netrw to treat the argument as a
|
||||
directory to browse instead of a file to download).
|
||||
For remote directory listings (ie. those using scp or ftp), that
|
||||
trailing "/" is necessary (the slash tells netrw to treat the argument
|
||||
as a directory to browse instead of as a file to download).
|
||||
|
||||
However, the Nread command can also be used to accomplish this:
|
||||
|
||||
:Nread [protocol]://[user]@hostname/path/
|
||||
The Nread command may also be used to accomplish this (again, that
|
||||
trailing slash is necessary): >
|
||||
|
||||
:Nread [protocol]://[user]@hostname/path/
|
||||
<
|
||||
*netrw-login* *netrw-password*
|
||||
CHANGING USERID AND PASSWORD *netrw-chgup* *netrw-userpass* {{{2
|
||||
|
||||
@@ -500,7 +502,23 @@ that file. Your ftp must be able to use the <.netrc> file on its own, however.
|
||||
>
|
||||
vim ftp://[user@]machine[[:#]portnumber]/path
|
||||
<
|
||||
However, ftp will often need to query the user for the userid and password.
|
||||
Windows provides an ftp (typically c:\Windows\System32\ftp.exe) which uses
|
||||
an option, -s:filename (filename can and probably should be a full path)
|
||||
which contains ftp commands which will be automatically run whenever ftp
|
||||
starts. You may use this feature to enter a user and password for one site: >
|
||||
userid
|
||||
password
|
||||
If |g:netrw_ftp_cmd| contains -s:[path/]MACHINE, then (on Windows machines only)
|
||||
netrw will substitute the current machine name requested for ftp connection
|
||||
for MACHINE. Hence one can have multiple machine.ftp files containing login
|
||||
and password for ftp. Example: >
|
||||
|
||||
g:netrw_ftp_cmd= 'c:\Windows\System32\ftp -s:C:\Users\Myself\MACHINE'
|
||||
vim ftp://myhost.somewhere.net/
|
||||
will use a file >
|
||||
C:\Users\Myself\myhost.ftp
|
||||
<
|
||||
Often, ftp will need to query the user for the userid and password.
|
||||
The latter will be done "silently"; ie. asterisks will show up instead of
|
||||
the actually-typed-in password. Netrw will retain the userid and password
|
||||
for subsequent read/writes from the most recent transfer so subsequent
|
||||
@@ -624,7 +642,7 @@ your <.vimrc> customization file: >
|
||||
<
|
||||
|
||||
==============================================================================
|
||||
6. Transparent File Editing *netrw-transparent* {{{1
|
||||
6. Transparent Remote File Editing *netrw-transparent* {{{1
|
||||
|
||||
Transparent file transfers occur whenever a regular file read or write
|
||||
(invoked via an |:autocmd| for |BufReadCmd|, |BufWriteCmd|, or |SourceCmd|
|
||||
@@ -1225,7 +1243,7 @@ CHANGING TO A PREDECESSOR DIRECTORY *netrw-u* *netrw-updir* {{{2
|
||||
|
||||
Every time you change to a new directory (new for the current session),
|
||||
netrw will save the directory in a recently-visited directory history
|
||||
list (unless g:netrw_dirhistmax is zero; by default, it's ten). With the
|
||||
list (unless |g:netrw_dirhistmax| is zero; by default, it's ten). With the
|
||||
"u" map, one can change to an earlier directory (predecessor). To do
|
||||
the opposite, see |netrw-U|.
|
||||
|
||||
@@ -1527,6 +1545,19 @@ Related topics: |netrw-s| |netrw-S|
|
||||
Associated setting variables: |g:netrw_sort_sequence| |g:netrw_sort_options|
|
||||
|
||||
|
||||
FORCING TREATMENT AS A FILE OR DIRECTORY *netrw-gd* *netrw-gf* {{{2
|
||||
|
||||
Remote symbolic links (ie. those listed via ssh or ftp) are problematic
|
||||
in that it is difficult to tell whether they link to a file or to a
|
||||
directory.
|
||||
|
||||
To force treatment as a file: use >
|
||||
gd
|
||||
<
|
||||
To force treatment as a directory: use >
|
||||
gf
|
||||
<
|
||||
|
||||
GOING UP *netrw--* {{{2
|
||||
|
||||
To go up a directory, press "-" or press the <cr> when atop the ../ directory
|
||||
@@ -1740,6 +1771,16 @@ the cursor atop a marked file and press "mf". This process also works
|
||||
with <s-leftmouse> using gvim. One may unmark all files by pressing
|
||||
"mu" (see |netrw-mu|).
|
||||
|
||||
Marked files are highlighted using the "netrwMarkFile" highlighting group,
|
||||
which by default is linked to "Identifier" (see Identifier under
|
||||
|group-name|). You may change the highlighting group by putting something
|
||||
like >
|
||||
|
||||
highlight clear netrwMarkFile
|
||||
hi link netrwMarkFile ..whatever..
|
||||
<
|
||||
into $HOME/.vim/after/syntax/netrw.vim .
|
||||
|
||||
*markfilelist* *global_markfilelist* *local_markfilelist*
|
||||
All marked files are entered onto the global marked file list; there is only
|
||||
one such list. In addition, every netrw buffer also has its own local marked
|
||||
@@ -1789,7 +1830,8 @@ MARKED FILES: COPYING *netrw-mc* {{{2
|
||||
(Uses the global marked file list)
|
||||
|
||||
Select a target directory with mt (|netrw-mt|). Then change directory,
|
||||
select file(s) (see |netrw-mf|), and press "mc".
|
||||
select file(s) (see |netrw-mf|), and press "mc". The copy is done
|
||||
from the current window (where one does the mf) to the target.
|
||||
|
||||
Associated setting variable: |g:netrw_localcopycmd| |g:netrw_ssh_cmd|
|
||||
|
||||
@@ -1841,7 +1883,8 @@ MARKED FILES: MOVING *netrw-mm* {{{2
|
||||
Use at your own risk!
|
||||
|
||||
Select a target directory with mt (|netrw-mt|). Then change directory,
|
||||
select file(s) (see |netrw-mf|), and press "mm".
|
||||
select file(s) (see |netrw-mf|), and press "mm". The move is done
|
||||
from the current window (where one does the mf) to the target.
|
||||
|
||||
Associated setting variable: |g:netrw_localmovecmd| |g:netrw_ssh_cmd|
|
||||
|
||||
@@ -1922,21 +1965,21 @@ your browsing preferences. (see also: |netrw-settings|)
|
||||
--- -----------
|
||||
Var Explanation
|
||||
--- -----------
|
||||
< *g:netrw_alto* change from above splitting to below splitting
|
||||
< *g:netrw_alto* change from above splitting to below splitting
|
||||
by setting this variable (see |netrw-o|)
|
||||
default: =&sb (see |'sb'|)
|
||||
|
||||
*g:netrw_altv* change from left splitting to right splitting
|
||||
*g:netrw_altv* change from left splitting to right splitting
|
||||
by setting this variable (see |netrw-v|)
|
||||
default: =&spr (see |'spr'|)
|
||||
|
||||
*g:netrw_banner* enable/suppress the banner
|
||||
*g:netrw_banner* enable/suppress the banner
|
||||
=0: suppress the banner
|
||||
=1: banner is enabled (default)
|
||||
NOTE: suppressing the banner is a new feature
|
||||
which may cause problems.
|
||||
|
||||
*g:netrw_browse_split* when browsing, <cr> will open the file by:
|
||||
*g:netrw_browse_split* when browsing, <cr> will open the file by:
|
||||
=0: re-using the same window
|
||||
=1: horizontally splitting the window first
|
||||
=2: vertically splitting the window first
|
||||
@@ -1946,7 +1989,7 @@ your browsing preferences. (see also: |netrw-settings|)
|
||||
to get vertical splitting instead of
|
||||
horizontal splitting.
|
||||
|
||||
*g:netrw_browsex_viewer* specify user's preference for a viewer: >
|
||||
*g:netrw_browsex_viewer* specify user's preference for a viewer: >
|
||||
"kfmclient exec"
|
||||
"gnome-open"
|
||||
< If >
|
||||
@@ -1955,35 +1998,48 @@ your browsing preferences. (see also: |netrw-settings|)
|
||||
a script/function to handle the given
|
||||
extension. (see |netrw_filehandler|).
|
||||
|
||||
*g:netrw_chgperm* Unix/Linux: "chmod PERM FILENAME"
|
||||
*g:netrw_chgperm* Unix/Linux: "chmod PERM FILENAME"
|
||||
Windows: "cacls FILENAME /e /p PERM"
|
||||
Used to change access permission for a file.
|
||||
|
||||
*g:netrw_compress* ="gzip"
|
||||
*g:netrw_compress* ="gzip"
|
||||
Will compress marked files with this
|
||||
command
|
||||
|
||||
*g:netrw_ctags* ="ctags"
|
||||
*g:netrw_ctags* ="ctags"
|
||||
The default external program used to create tags
|
||||
|
||||
*g:netrw_cursorline* = 1 (default)
|
||||
will use the |'cursorline'| local setting when
|
||||
|g:netrw_liststyle| ==0 (thin listing) or
|
||||
|g:netrw_liststyle| ==1 (long listing) or
|
||||
|g:netrw_liststyle| ==3 (tree listing)
|
||||
(ie. doesn't affect the wide listing)
|
||||
=0: off
|
||||
=2: like ==1, but the wide listing gets both
|
||||
cursorline and |'cursorcolumn'|locally set
|
||||
*g:netrw_cursor* = 2 (default)
|
||||
This option controls the use of the
|
||||
|'cursorline'| (cul) and |'cursorcolumn'|
|
||||
(cuc) settings by netrw:
|
||||
|
||||
*g:netrw_decompress* = { ".gz" : "gunzip" ,
|
||||
Value Thin-Long-Tree Wide
|
||||
=0 u-cul u-cuc u-cul u-cuc
|
||||
=1 u-cul u-cuc cul u-cuc
|
||||
=2 cul u-cuc cul u-cuc
|
||||
=3 cul u-cuc cul cuc
|
||||
=4 cul cuc cul cuc
|
||||
|
||||
Where
|
||||
u-cul : user's |'cursorline'| setting used
|
||||
u-cuc : user's |'cursorcolumn'| setting used
|
||||
cul : |'cursorline'| locally set
|
||||
cuc : |'cursorcolumn'| locally set
|
||||
|
||||
*g:netrw_decompress* = { ".gz" : "gunzip" ,
|
||||
".bz2" : "bunzip2" ,
|
||||
".zip" : "unzip" ,
|
||||
".tar" : "tar -xf"}
|
||||
A dictionary mapping suffices to
|
||||
decompression programs.
|
||||
|
||||
*g:netrw_fastbrowse* =0: slow speed directory browsing;
|
||||
*g:netrw_dirhistmax* =10: controls maximum quantity of past
|
||||
history. May be zero to supppress
|
||||
history.
|
||||
(related: |netrw-qb| |netrw-u| |netrw-U|)
|
||||
|
||||
*g:netrw_fastbrowse* =0: slow speed directory browsing;
|
||||
never re-uses directory listings,
|
||||
always obtains directory listings.
|
||||
=1: medium speed directory browsing;
|
||||
@@ -2007,10 +2063,10 @@ your browsing preferences. (see also: |netrw-settings|)
|
||||
trading off accuracy (ie. up-to-date listing)
|
||||
versus speed.
|
||||
|
||||
*g:netrw_fname_escape* =' ?&;%'
|
||||
*g:netrw_fname_escape* =' ?&;%'
|
||||
Used on filenames before remote reading/writing
|
||||
|
||||
*g:netrw_ftp_browse_reject* ftp can produce a number of errors and warnings
|
||||
*g:netrw_ftp_browse_reject* ftp can produce a number of errors and warnings
|
||||
that can show up as "directories" and "files"
|
||||
in the listing. This pattern is used to
|
||||
remove such embedded messages. By default its
|
||||
@@ -2023,95 +2079,95 @@ your browsing preferences. (see also: |netrw-settings|)
|
||||
: connect to address [0-9a-fA-F:]*
|
||||
: No route to host$'
|
||||
|
||||
*g:netrw_ftp_list_cmd* options for passing along to ftp for directory
|
||||
*g:netrw_ftp_list_cmd* options for passing along to ftp for directory
|
||||
listing. Defaults:
|
||||
unix or g:netrw_cygwin set: : "ls -lF"
|
||||
otherwise "dir"
|
||||
|
||||
|
||||
*g:netrw_ftp_sizelist_cmd* options for passing along to ftp for directory
|
||||
*g:netrw_ftp_sizelist_cmd* options for passing along to ftp for directory
|
||||
listing, sorted by size of file.
|
||||
Defaults:
|
||||
unix or g:netrw_cygwin set: : "ls -slF"
|
||||
otherwise "dir"
|
||||
|
||||
*g:netrw_ftp_timelist_cmd* options for passing along to ftp for directory
|
||||
*g:netrw_ftp_timelist_cmd* options for passing along to ftp for directory
|
||||
listing, sorted by time of last modification.
|
||||
Defaults:
|
||||
unix or g:netrw_cygwin set: : "ls -tlF"
|
||||
otherwise "dir"
|
||||
|
||||
*g:netrw_glob_escape* ='[]*?`{~$' (unix)
|
||||
*g:netrw_glob_escape* ='[]*?`{~$' (unix)
|
||||
='[]*?`{$' (windows
|
||||
These characters in directory names are
|
||||
escaped before applying glob()
|
||||
|
||||
*g:netrw_hide* if true, the hiding list is used
|
||||
*g:netrw_hide* if true, the hiding list is used
|
||||
default: =0
|
||||
|
||||
*g:netrw_home* The home directory for where bookmarks and
|
||||
*g:netrw_home* The home directory for where bookmarks and
|
||||
history are saved (as .netrwbook and
|
||||
.netrwhist).
|
||||
default: the first directory on the
|
||||
|'runtimepath'|
|
||||
|
||||
*g:netrw_keepdir* =1 (default) keep current directory immune from
|
||||
*g:netrw_keepdir* =1 (default) keep current directory immune from
|
||||
the browsing directory.
|
||||
=0 keep the current directory the same as the
|
||||
browsing directory.
|
||||
The current browsing directory is contained in
|
||||
b:netrw_curdir (also see |netrw-c|)
|
||||
|
||||
*g:netrw_list_cmd* command for listing remote directories
|
||||
*g:netrw_list_cmd* command for listing remote directories
|
||||
default: (if ssh is executable)
|
||||
"ssh HOSTNAME ls -FLa"
|
||||
|
||||
*g:netrw_liststyle* Set the default listing style:
|
||||
*g:netrw_liststyle* Set the default listing style:
|
||||
= 0: thin listing (one file per line)
|
||||
= 1: long listing (one file per line with time
|
||||
stamp information and file size)
|
||||
= 2: wide listing (multiple files in columns)
|
||||
= 3: tree style listing
|
||||
*g:netrw_list_hide* comma separated pattern list for hiding files
|
||||
*g:netrw_list_hide* comma separated pattern list for hiding files
|
||||
Patterns are regular expressions (see |regexp|)
|
||||
Example: let g:netrw_list_hide= '.*\.swp$'
|
||||
default: ""
|
||||
|
||||
*g:netrw_localcopycmd* ="cp" Linux/Unix/MacOS/Cygwin
|
||||
*g:netrw_localcopycmd* ="cp" Linux/Unix/MacOS/Cygwin
|
||||
="copy" Windows
|
||||
Copies marked files (|netrw-mf|) to target
|
||||
directory (|netrw-mt|, |netrw-mc|)
|
||||
|
||||
*g:netrw_localmovecmd* ="mv" Linux/Unix/MacOS/Cygwin
|
||||
*g:netrw_localmovecmd* ="mv" Linux/Unix/MacOS/Cygwin
|
||||
="move" Windows
|
||||
Moves marked files (|netrw-mf|) to target
|
||||
directory (|netrw-mt|, |netrw-mm|)
|
||||
|
||||
*g:netrw_local_mkdir* command for making a local directory
|
||||
*g:netrw_local_mkdir* command for making a local directory
|
||||
default: "mkdir"
|
||||
|
||||
*g:netrw_local_rmdir* remove directory command (rmdir)
|
||||
*g:netrw_local_rmdir* remove directory command (rmdir)
|
||||
default: "rmdir"
|
||||
|
||||
*g:netrw_maxfilenamelen* =32 by default, selected so as to make long
|
||||
*g:netrw_maxfilenamelen* =32 by default, selected so as to make long
|
||||
listings fit on 80 column displays.
|
||||
If your screen is wider, and you have file
|
||||
or directory names longer than 32 bytes,
|
||||
you may set this option to keep listings
|
||||
columnar.
|
||||
|
||||
*g:netrw_mkdir_cmd* command for making a remote directory
|
||||
*g:netrw_mkdir_cmd* command for making a remote directory
|
||||
default: "ssh USEPORT HOSTNAME mkdir"
|
||||
|
||||
*g:netrw_mousemaps* =1 (default) enables the mouse buttons
|
||||
while browsing:
|
||||
*g:netrw_mousemaps* =1 (default) enables mouse buttons while
|
||||
browsing to:
|
||||
leftmouse : open file/directory
|
||||
shift-leftmouse : mark file
|
||||
middlemouse : same as P
|
||||
rightmouse : remove file/directory
|
||||
=0: disables mouse maps
|
||||
|
||||
*g:netrw_retmap* if it exists and is set to one, then:
|
||||
*g:netrw_retmap* if it exists and is set to one, then:
|
||||
* if in a netrw-selected file, AND
|
||||
* no normal-mode <2-leftmouse> mapping exists,
|
||||
then the <2-leftmouse> will be mapped for easy
|
||||
@@ -2130,22 +2186,22 @@ your browsing preferences. (see also: |netrw-settings|)
|
||||
|
||||
default: =0
|
||||
|
||||
*g:netrw_rm_cmd* command for removing files
|
||||
*g:netrw_rm_cmd* command for removing files
|
||||
default: "ssh USEPORT HOSTNAME rm"
|
||||
|
||||
*g:netrw_rmdir_cmd* command for removing directories
|
||||
*g:netrw_rmdir_cmd* command for removing directories
|
||||
default: "ssh USEPORT HOSTNAME rmdir"
|
||||
|
||||
*g:netrw_rmf_cmd* command for removing softlinks
|
||||
*g:netrw_rmf_cmd* command for removing softlinks
|
||||
default: "ssh USEPORT HOSTNAME rm -f"
|
||||
|
||||
*g:netrw_sort_by* sort by "name", "time", or "size"
|
||||
*g:netrw_sort_by* sort by "name", "time", or "size"
|
||||
default: "name"
|
||||
|
||||
*g:netrw_sort_direction* sorting direction: "normal" or "reverse"
|
||||
*g:netrw_sort_direction* sorting direction: "normal" or "reverse"
|
||||
default: "normal"
|
||||
|
||||
*g:netrw_sort_options* sorting is done using |:sort|; this
|
||||
*g:netrw_sort_options* sorting is done using |:sort|; this
|
||||
variable's value is appended to the
|
||||
sort command. Thus one may ignore case,
|
||||
for example, with the following in your
|
||||
@@ -2153,14 +2209,14 @@ your browsing preferences. (see also: |netrw-settings|)
|
||||
let g:netrw_sort_options="i"
|
||||
< default: ""
|
||||
|
||||
*g:netrw_sort_sequence* when sorting by name, first sort by the
|
||||
*g:netrw_sort_sequence* when sorting by name, first sort by the
|
||||
comma-separated pattern sequence. Note that
|
||||
the filigree added to indicate filetypes
|
||||
should be accounted for in your pattern.
|
||||
default: '[\/]$,*,\.bak$,\.o$,\.h$,
|
||||
\.info$,\.swp$,\.obj$'
|
||||
|
||||
*g:netrw_special_syntax* If true, then certain files will be shown
|
||||
*g:netrw_special_syntax* If true, then certain files will be shown
|
||||
in special syntax in the browser:
|
||||
|
||||
netrwBak : *.bak
|
||||
@@ -2171,7 +2227,7 @@ your browsing preferences. (see also: |netrw-settings|)
|
||||
netrwMakefile: [mM]akefile *.mak
|
||||
netrwObj : *.o *.obj
|
||||
netrwTags : tags ANmenu ANtags
|
||||
netrwTilde : *~
|
||||
netrwTilde : *~
|
||||
netrwTmp : tmp* *tmp
|
||||
|
||||
These syntax highlighting groups are linked
|
||||
@@ -2182,12 +2238,12 @@ your browsing preferences. (see also: |netrw-settings|)
|
||||
< into one's <.vimrc> to use one's own
|
||||
preferences.
|
||||
|
||||
*g:netrw_ssh_cmd* One may specify an executable command
|
||||
*g:netrw_ssh_cmd* One may specify an executable command
|
||||
to use instead of ssh for remote actions
|
||||
such as listing, file removal, etc.
|
||||
default: ssh
|
||||
|
||||
*g:netrw_ssh_browse_reject* ssh can sometimes produce unwanted lines,
|
||||
*g:netrw_ssh_browse_reject* ssh can sometimes produce unwanted lines,
|
||||
messages, banners, and whatnot that one doesn't
|
||||
want masquerading as "directories" and "files".
|
||||
Use this pattern to remove such embedded
|
||||
@@ -2195,11 +2251,11 @@ your browsing preferences. (see also: |netrw-settings|)
|
||||
'^total\s\+\d\+$'
|
||||
|
||||
|
||||
*g:netrw_tmpfile_escape* =' &;'
|
||||
*g:netrw_tmpfile_escape* =' &;'
|
||||
escape() is applied to all temporary files
|
||||
to escape these characters.
|
||||
|
||||
*g:netrw_timefmt* specify format string to vim's strftime().
|
||||
*g:netrw_timefmt* specify format string to vim's strftime().
|
||||
The default, "%c", is "the preferred date
|
||||
and time representation for the current
|
||||
locale" according to my manpage entry for
|
||||
@@ -2209,7 +2265,7 @@ your browsing preferences. (see also: |netrw-settings|)
|
||||
" %a %Y-%m-%d %I-%M-%S %p"
|
||||
default: "%c"
|
||||
|
||||
*g:netrw_use_noswf* netrw normally avoids writing swapfiles
|
||||
*g:netrw_use_noswf* netrw normally avoids writing swapfiles
|
||||
for browser buffers. However, under some
|
||||
systems this apparently is causing nasty
|
||||
ml_get errors to appear; if you're getting
|
||||
@@ -2217,12 +2273,15 @@ your browsing preferences. (see also: |netrw-settings|)
|
||||
let g:netrw_use_noswf= 0
|
||||
in your .vimrc.
|
||||
|
||||
*g:netrw_winsize* specify initial size of new windows made with
|
||||
*g:netrw_winsize* specify initial size of new windows made with
|
||||
"o" (see |netrw-o|), "v" (see |netrw-v|),
|
||||
|:Hexplore| or |:Vexplore|.
|
||||
default: ""
|
||||
|:Hexplore| or |:Vexplore|. The g:netrw_winsize
|
||||
is an integer describing the percentage of the
|
||||
current netrw buffer's window to be used for
|
||||
the new window.
|
||||
default: 50 (for 50%)
|
||||
|
||||
*g:netrw_xstrlen* Controls how netrw computes string lengths,
|
||||
*g:netrw_xstrlen* Controls how netrw computes string lengths,
|
||||
including multi-byte characters' string
|
||||
length. (thanks to N Weibull, T Mechelynck)
|
||||
=0: uses Vim's built-in strlen()
|
||||
@@ -2238,7 +2297,7 @@ your browsing preferences. (see also: |netrw-settings|)
|
||||
immediately preceded by lam, one
|
||||
otherwise, etc)
|
||||
|
||||
*g:NetrwTopLvlMenu* This variable specifies the top level
|
||||
*g:NetrwTopLvlMenu* This variable specifies the top level
|
||||
menu name; by default, it's "Netrw.". If
|
||||
you wish to change this, do so in your
|
||||
.vimrc.
|
||||
@@ -2254,7 +2313,7 @@ file you edit; this apparently also applies to directories. In other words,
|
||||
autochdir sets the current directory to that containing the "file" (even if
|
||||
that "file" is itself a directory).
|
||||
|
||||
NETRW SETTINGS *netrw-settings* {{{2
|
||||
NETRW BROWSER SETTINGS *netrw-settings* {{{2
|
||||
|
||||
With the NetrwSettings.vim plugin, >
|
||||
:NetrwSettings
|
||||
@@ -2298,6 +2357,7 @@ Related topics:
|
||||
directory, see |g:netrw_keepdir|.
|
||||
|
||||
|
||||
*netrw-createfile*
|
||||
OPEN A NEW FILE IN NETRW'S CURRENT DIRECTORY *netrw-%*
|
||||
|
||||
To open a file in netrw's current directory, press "%". This map will
|
||||
@@ -2604,7 +2664,7 @@ Associated setting variables: |g:netrw_chgwin|
|
||||
|
||||
*netrw-p11*
|
||||
P11. I want to have two windows; a thin one on the left and my editing
|
||||
window on the right. How can I do this?
|
||||
window on the right. How may I accomplish this?
|
||||
|
||||
* Put the following line in your <.vimrc>:
|
||||
let g:netrw_altv = 1
|
||||
@@ -2650,18 +2710,56 @@ Associated setting variables: |g:netrw_chgwin|
|
||||
"let g:netrw_sftp_cmd = "d:\\dev\\putty\\PSFTP.exe"
|
||||
"let g:netrw_scp_cmd = "d:\\dev\\putty\\PSCP.exe"
|
||||
<
|
||||
*netrw-p14*
|
||||
P14. I'd would like to speed up writes using Nwrite and scp/ssh
|
||||
style connections. How? (Thomer M. Gil)
|
||||
|
||||
Try using ssh's ControlMaster and ControlPath (see the ssh_config
|
||||
man page) to share multiple ssh connections over a single network
|
||||
connection. That cuts out the cryptographic handshake on each
|
||||
file write, sometimes speeding it up by an order of magnitude.
|
||||
(see http://thomer.com/howtos/netrw_ssh.html)
|
||||
(included by permission)
|
||||
|
||||
Add the following to your ~/.ssh/config: >
|
||||
|
||||
# you change "*" to the hostname you care about
|
||||
Host *
|
||||
ControlMaster auto
|
||||
ControlPath /tmp/%r@%h:%p
|
||||
|
||||
< Then create an ssh connection to the host and leave it running: >
|
||||
|
||||
ssh -N host.domain.com
|
||||
|
||||
< Now remotely open a file with Vim's Netrw and enjoy the
|
||||
zippiness: >
|
||||
|
||||
vim scp://host.domain.com//home/user/.bashrc
|
||||
<
|
||||
*netrw-p15*
|
||||
P15. How may I use a double-click instead of netrw's usual single click
|
||||
to open a file or directory? (Ben Fritz)
|
||||
|
||||
First, disable netrw's mapping with >
|
||||
let g:netrw_mousemaps= 0
|
||||
< and then create a netrw buffer only mapping in
|
||||
$HOME/.vim/after/ftplugin/netrw.vim: >
|
||||
nmap <buffer> <2-leftmouse> <CR>
|
||||
< Note that setting g:netrw_mousemaps to zero will turn off
|
||||
all netrw's mouse mappings, not just the <leftmouse> one.
|
||||
(see |g:netrw_mousemaps|)
|
||||
|
||||
==============================================================================
|
||||
11. Debugging Netrw Itself *netrw-debug* {{{1
|
||||
|
||||
The <netrw.vim> script is typically available as:
|
||||
The <netrw.vim> script is typically available as something like:
|
||||
>
|
||||
/usr/local/share/vim/vim6x/plugin/netrwPlugin.vim
|
||||
/usr/local/share/vim/vim6x/autoload/netrw.vim
|
||||
< -or- >
|
||||
/usr/local/share/vim/vim7x/plugin/netrwPlugin.vim
|
||||
/usr/local/share/vim/vim7x/autoload/netrw.vim
|
||||
< -or- >
|
||||
/usr/local/share/vim/vim6x/plugin/netrwPlugin.vim
|
||||
/usr/local/share/vim/vim6x/autoload/netrw.vim
|
||||
<
|
||||
which is loaded automatically at startup (assuming :set nocp).
|
||||
|
||||
@@ -2706,6 +2804,28 @@ which is loaded automatically at startup (assuming :set nocp).
|
||||
==============================================================================
|
||||
12. History *netrw-history* {{{1
|
||||
|
||||
v142: Apr 06, 2011 * I modified NetrwRemoteListing() to use
|
||||
shellescape(fnameescape(s:path),1) for
|
||||
the benefit of those using scp://.../
|
||||
with subdirectories having spaces.
|
||||
Problem reported by: Gilles Charron
|
||||
Apr 18, 2011 * s:NetrwMethod() attempts to issue an
|
||||
error message when given a malformed url
|
||||
Apr 29, 2011 * converted most mousemaps to use <Plug>s
|
||||
* |g:netrw_winsize|'s meaning changed
|
||||
v141: Aug 28, 2010 * added -s:... support for Windows ftp
|
||||
* restored 2-leftmouse for :Rex-like return
|
||||
* added balloon help for banner
|
||||
Oct 26, 2010 * :Texplore changed to start from netrw's idea
|
||||
of the current directory, not pwd's
|
||||
Feb 10, 2011 * netrwPlugin modified to use BufReadCmd
|
||||
when the "filename" ends with a "/" or a "\"
|
||||
Avoids "... is a directory" message, works
|
||||
inside a try-catch-endtry clause.
|
||||
Feb 22, 2011 * for menus, &go =~# used to insure correct case
|
||||
Apr 01, 2011 * changed g:netrw_cursorcolumn to g:netrw_cursor
|
||||
In addition, there's more supported settings for
|
||||
it.
|
||||
v140: Jul 27, 2010 * (Lech Lorens) unexpected change of window
|
||||
v139: May 14, 2010 * when viewing remote directory listings and
|
||||
changing listing style, going to tree listing
|
||||
@@ -2732,7 +2852,7 @@ which is loaded automatically at startup (assuming :set nocp).
|
||||
v137: Dec 28, 2009 * modified the preview window handling for
|
||||
vertically split windows. The preview
|
||||
window will take up all but g:netrw_winsize
|
||||
columns of the original window; those
|
||||
columns of the original window; those
|
||||
g:netrw_winsize columns will be used for
|
||||
the netrw listing.
|
||||
* (Simon Dambe) removed "~" from
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*pi_tar.txt* For Vim version 7.3. Last change: 2010 Aug 09
|
||||
*pi_tar.txt* For Vim version 7.3. Last change: 2011 May 31
|
||||
|
||||
+====================+
|
||||
| Tar File Interface |
|
||||
@@ -83,8 +83,12 @@ Copyright 2005-2010: The GPL (gnu public license) applies to *tar-copyright*
|
||||
4. History *tar-history*
|
||||
|
||||
|
||||
v27 May 31, 2011 * moved cygwin detection before g:tar_copycmd handling
|
||||
* inserted additional |:keepj| modifiers
|
||||
* changed silent to sil! (|:silent|)
|
||||
v26 Aug 09, 2010 * uses buffer-local instead of window variables to hold
|
||||
tarfile name
|
||||
* inserted keepj before 0d to protect jump list
|
||||
v25 Jun 19, 2010 * (Jan Steffens) added support for xz compression
|
||||
v24 Apr 07, 2009 * :Untarvim command implemented
|
||||
Sep 28, 2009 * Added lzma support
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*pi_vimball.txt* For Vim version 7.3. Last change: 2010 Apr 12
|
||||
*pi_vimball.txt* For Vim version 7.3. Last change: 2011 Aug 14
|
||||
|
||||
----------------
|
||||
Vimball Archiver
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
Author: Charles E. Campbell, Jr. <NdrOchip@ScampbellPfamily.AbizM>
|
||||
(remove NOSPAM from Campbell's email first)
|
||||
Copyright: (c) 2004-2009 by Charles E. Campbell, Jr. *Vimball-copyright*
|
||||
Copyright: (c) 2004-2011 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,6 +16,7 @@ Copyright: (c) 2004-2009 by Charles E. Campbell, Jr. *Vimball-copyright*
|
||||
1. Contents *vba* *vimball* *vimball-contents*
|
||||
|
||||
1. Contents......................................: |vimball-contents|
|
||||
2. Vimball Introduction..........................: |vimball-intro|
|
||||
3. Vimball Manual................................: |vimball-manual|
|
||||
MkVimball.....................................: |:MkVimball|
|
||||
UseVimball....................................: |:UseVimball|
|
||||
@@ -176,6 +177,22 @@ WINDOWS *vimball-windows*
|
||||
==============================================================================
|
||||
4. Vimball History *vimball-history* {{{1
|
||||
|
||||
33 : Apr 02, 2011 * Gave priority to *.vmb over *.vba
|
||||
* Changed silent! to sil! (shorter)
|
||||
* Safed |'swf'| setting (during vimball extraction,
|
||||
its now turned off)
|
||||
32 : May 19, 2010 * (Christian Brabrandt) :so someplugin.vba and
|
||||
:so someplugin.vba.gz (and the other supported
|
||||
compression types) now works
|
||||
* (Jan Steffens) added support for xz compression
|
||||
* fenc extraction was erroneously picking up the
|
||||
end of the line number when no file encoding
|
||||
was present. Fixed.
|
||||
* By request, beginning the switchover from the vba
|
||||
extension to vmb. Currently both are supported;
|
||||
MkVimball, however, now will create *.vmb files.
|
||||
Feb 11, 2011 * motoyakurotsu reported an error with vimball's
|
||||
handling of zero-length files
|
||||
30 : Dec 08, 2008 * fnameescape() inserted to protect error
|
||||
messaging using corrupted filenames from
|
||||
causing problems
|
||||
@@ -199,6 +216,8 @@ WINDOWS *vimball-windows*
|
||||
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
|
||||
(defunct: |fnameescape()| and |shellescape()|
|
||||
now used instead)
|
||||
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
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*pi_zip.txt* For Vim version 7.3. Last change: 2010 Sep 14
|
||||
*pi_zip.txt* For Vim version 7.3. Last change: 2011 Aug 14
|
||||
|
||||
+====================+
|
||||
| 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-2009 Charles E Campbell, Jr *zip-copyright*
|
||||
Copyright: Copyright (C) 2005-2011 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,
|
||||
@@ -17,14 +17,14 @@ Copyright: Copyright (C) 2005-2009 Charles E Campbell, Jr *zip-copyright*
|
||||
the use of this software.
|
||||
|
||||
==============================================================================
|
||||
1. Contents *zip* *zip-contents*
|
||||
1. Contents *zip* *zip-contents*
|
||||
1. Contents................................................|zip-contents|
|
||||
2. Usage...................................................|zip-usage|
|
||||
3. Additional Extensions...................................|zip-extension|
|
||||
4. History.................................................|zip-history|
|
||||
|
||||
==============================================================================
|
||||
2. Usage *zip-usage* *zip-manual*
|
||||
2. Usage *zip-usage* *zip-manual*
|
||||
|
||||
When one edits a *.zip file, this plugin will handle displaying a
|
||||
contents page. Select a file to edit by moving the cursor atop
|
||||
@@ -83,7 +83,11 @@ Copyright: Copyright (C) 2005-2009 Charles E Campbell, Jr *zip-copyright*
|
||||
should be treated as zip files.
|
||||
|
||||
==============================================================================
|
||||
4. History *zip-history* {{{1
|
||||
4. History *zip-history* {{{1
|
||||
v24 Jun 21, 2010 * (Cédric Bosdonnat) unzip seems to need its filenames
|
||||
fnameescape'd as well as shellquote'd
|
||||
* (Motoya Kurotsu) inserted keepj before 0d to protect
|
||||
jump list
|
||||
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
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*quickfix.txt* For Vim version 7.3. Last change: 2010 Oct 20
|
||||
*quickfix.txt* For Vim version 7.3. Last change: 2011 May 10
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -215,28 +215,29 @@ command with 'l'.
|
||||
|
||||
*:cex* *:cexpr* *E777*
|
||||
:cex[pr][!] {expr} Create a quickfix list using the result of {expr} and
|
||||
jump to the first error. If {expr} is a String, then
|
||||
each new-line terminated line in the String is
|
||||
processed using 'errorformat' and the result is added
|
||||
to the quickfix list. If {expr} is a List, then each
|
||||
String item in the list is processed and added to the
|
||||
quickfix list. Non String items in the List are
|
||||
ignored. See |:cc|
|
||||
for [!].
|
||||
jump to the first error.
|
||||
If {expr} is a String, then each new-line terminated
|
||||
line in the String is processed using the global value
|
||||
of 'errorformat' and the result is added to the
|
||||
quickfix list.
|
||||
If {expr} is a List, then each String item in the list
|
||||
is processed and added to the quickfix list. Non
|
||||
String items in the List are ignored.
|
||||
See |:cc| for [!].
|
||||
Examples: >
|
||||
:cexpr system('grep -n xyz *')
|
||||
:cexpr getline(1, '$')
|
||||
<
|
||||
*:lex* *:lexpr*
|
||||
:lex[pr][!] {expr} Same as ":cexpr", except the location list for the
|
||||
:lex[pr][!] {expr} Same as |:cexpr|, except the location list for the
|
||||
current window is used instead of the quickfix list.
|
||||
|
||||
*:cgete* *:cgetexpr*
|
||||
:cgete[xpr] {expr} Create a quickfix list using the result of {expr}.
|
||||
Just like ":cexpr", but don't jump to the first error.
|
||||
Just like |:cexpr|, but don't jump to the first error.
|
||||
|
||||
*:lgete* *:lgetexpr*
|
||||
:lgete[xpr] {expr} Same as ":cgetexpr", except the location list for the
|
||||
:lgete[xpr] {expr} Same as |:cgetexpr|, except the location list for the
|
||||
current window is used instead of the quickfix list.
|
||||
|
||||
*:cad* *:caddexpr*
|
||||
@@ -548,7 +549,7 @@ in the same files a lot faster.
|
||||
|
||||
Note that |:copen| (or |:lopen| for |:lgrep|) may be used to open a buffer
|
||||
containing the search results in linked form. The |:silent| command may be
|
||||
used to suppress the default full screen grep output. The |:grep!| form of
|
||||
used to suppress the default full screen grep output. The ":grep!" form of
|
||||
the |:grep| command doesn't jump to the first match automatically. These
|
||||
commands can be combined to create a NewGrep command: >
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*quickref.txt* For Vim version 7.3. Last change: 2010 Sep 14
|
||||
*quickref.txt* For Vim version 7.3. Last change: 2011 Jun 12
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -657,6 +657,7 @@ Short explanation of each option: *option-list*
|
||||
'cscopepathcomp' 'cspc' how many components of the path to show
|
||||
'cscopeprg' 'csprg' command to execute cscope
|
||||
'cscopequickfix' 'csqf' use quickfix window for cscope results
|
||||
'cscoperelative' 'csre' Use cscope.out path basename as prefix
|
||||
'cscopetag' 'cst' use cscope for tag commands
|
||||
'cscopetagorder' 'csto' determines ":cstag" search order
|
||||
'cscopeverbose' 'csverb' give messages when adding a cscope database
|
||||
@@ -800,7 +801,7 @@ Short explanation of each option: *option-list*
|
||||
'omnifunc' 'ofu' function for filetype-specific completion
|
||||
'opendevice' 'odev' allow reading/writing devices on MS-Windows
|
||||
'operatorfunc' 'opfunc' function to be called for |g@| operator
|
||||
'osfiletype' 'oft' operating system-specific filetype information
|
||||
'osfiletype' 'oft' no longer supported
|
||||
'paragraphs' 'para' nroff macros that separate paragraphs
|
||||
'paste' allow pasting text
|
||||
'pastetoggle' 'pt' key code that causes 'paste' to toggle
|
||||
@@ -934,6 +935,7 @@ Short explanation of each option: *option-list*
|
||||
'wildchar' 'wc' command-line character for wildcard expansion
|
||||
'wildcharm' 'wcm' like 'wildchar' but also works when mapped
|
||||
'wildignore' 'wig' files matching these patterns are not completed
|
||||
'wildignorecase' 'wic' ignore case when completing file names
|
||||
'wildmenu' 'wmnu' use menu for command line completion
|
||||
'wildmode' 'wim' mode for 'wildchar' command-line expansion
|
||||
'wildoptions' 'wop' specifies how command line completion is done
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*quotes.txt* For Vim version 7.3. Last change: 2006 Apr 24
|
||||
*quotes.txt* For Vim version 7.3. Last change: 2010 Nov 03
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -260,15 +260,16 @@ Eccettuato, Italy)
|
||||
|
||||
|
||||
In summary:
|
||||
__ ___ _ _ _ ___ _____
|
||||
\ \ / (_)_ __ ___ (_)___ | | | |/ _ \_ _|
|
||||
\ \ / /| | '_ ` _ \ | / __| | |_| | | | || |
|
||||
\ V / | | | | | | | | \__ \ | _ | |_| || |
|
||||
\_/ |_|_| |_| |_| |_|___/ |_| |_|\___/ |_|
|
||||
____ _____ _ _ _____ _____ _ _
|
||||
/ ___|_ _| | | | ___| ___| | |
|
||||
\___ \ | | | | | | |_ | |_ | | |
|
||||
___) || | | |_| | _| | _| |_|_|
|
||||
|____/ |_| \___/|_| |_| (_|_) (Tony Nugent, Australia)
|
||||
__ ___ _ _ _ ___ _____ `
|
||||
\ \ / (_)_ __ ___ (_)___ | | | |/ _ \_ _| `
|
||||
\ \ / /| | '_ ` _ \ | / __| | |_| | | | || | `
|
||||
\ V / | | | | | | | | \__ \ | _ | |_| || | `
|
||||
\_/ |_|_| |_| |_| |_|___/ |_| |_|\___/ |_| `
|
||||
____ _____ _ _ _____ _____ _ _ `
|
||||
/ ___|_ _| | | | ___| ___| | | `
|
||||
\___ \ | | | | | | |_ | |_ | | | `
|
||||
___) || | | |_| | _| | _| |_|_| `
|
||||
|____/ |_| \___/|_| |_| (_|_) (Tony Nugent, Australia) `
|
||||
|
||||
|
||||
vim:tw=78:ts=8:ft=help:norl:
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*repeat.txt* For Vim version 7.3. Last change: 2009 Nov 04
|
||||
*repeat.txt* For Vim version 7.3. Last change: 2011 Jan 06
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -102,7 +102,7 @@ To abort this type CTRL-C twice.
|
||||
q{0-9a-zA-Z"} Record typed characters into register {0-9a-zA-Z"}
|
||||
(uppercase to append). The 'q' command is disabled
|
||||
while executing a register, and it doesn't work inside
|
||||
a mapping. {Vi: no recording}
|
||||
a mapping and |:normal|. {Vi: no recording}
|
||||
|
||||
q Stops recording. (Implementation note: The 'q' that
|
||||
stops recording is not stored in the register, unless
|
||||
@@ -112,9 +112,13 @@ q Stops recording. (Implementation note: The 'q' that
|
||||
@{0-9a-z".=*} Execute the contents of register {0-9a-z".=*} [count]
|
||||
times. Note that register '%' (name of the current
|
||||
file) and '#' (name of the alternate file) cannot be
|
||||
used. For "@=" you are prompted to enter an
|
||||
expression. The result of the expression is then
|
||||
executed. See also |@:|. {Vi: only named registers}
|
||||
used.
|
||||
The register is executed like a mapping, that means
|
||||
that the difference between 'wildchar' and 'wildcharm'
|
||||
applies.
|
||||
For "@=" you are prompted to enter an expression. The
|
||||
result of the expression is then executed.
|
||||
See also |@:|. {Vi: only named registers}
|
||||
|
||||
*@@* *E748*
|
||||
@@ Repeat the previous @{0-9a-z":*} [count] times.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*spell.txt* For Vim version 7.3. Last change: 2010 Apr 11
|
||||
*spell.txt* For Vim version 7.3. Last change: 2011 May 25
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -335,6 +335,9 @@ A spell file might not be available in the current 'encoding'. See
|
||||
|spell-mkspell| about how to create a spell file. Converting a spell file
|
||||
with "iconv" will NOT work!
|
||||
|
||||
Note: on VMS ".{enc}.spl" is changed to "_{enc}.spl" to avoid trouble with
|
||||
filenames.
|
||||
|
||||
*spell-sug-file* *E781*
|
||||
If there is a file with exactly the same name as the ".spl" file but ending in
|
||||
".sug", that file will be used for giving better suggestions. It isn't loaded
|
||||
@@ -519,7 +522,7 @@ then Vim will try to guess.
|
||||
Up to eight regions can be combined. *E754* *E755*
|
||||
The REP and SAL items of the first .aff file where
|
||||
they appear are used. |spell-REP| |spell-SAL|
|
||||
|
||||
*E845*
|
||||
This command uses a lot of memory, required to find
|
||||
the optimal word tree (Polish, Italian and Hungarian
|
||||
require several hundred Mbyte). The final result will
|
||||
@@ -1241,6 +1244,7 @@ one or more groups, where each group can be:
|
||||
Optionally this may be followed by:
|
||||
* the group appears zero or more times, e.g., sm*e
|
||||
+ the group appears one or more times, e.g., c+
|
||||
? the group appears zero times or once, e.g., x?
|
||||
|
||||
This is similar to the regexp pattern syntax (but not the same!). A few
|
||||
examples with the sequence of word flags they require:
|
||||
@@ -1248,6 +1252,7 @@ examples with the sequence of word flags they require:
|
||||
COMPOUNDRULE yz yz
|
||||
COMPOUNDRULE x+z xz xxz xxxz etc.
|
||||
COMPOUNDRULE yx+ yx yxx yxxx etc.
|
||||
COMPOUNDRULE xy?z xz xyz
|
||||
|
||||
COMPOUNDRULE [abc]z az bz cz
|
||||
COMPOUNDRULE [abc]+z az aaz abaz bz baz bcbz cz caz cbaz etc.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*starting.txt* For Vim version 7.3. Last change: 2010 Sep 18
|
||||
*starting.txt* For Vim version 7.3. Last change: 2011 Jul 22
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -424,12 +424,7 @@ a slash. Thus "-R" means recovery and "-/R" readonly.
|
||||
"-d con:30/10/600/150". But you can also use it to start
|
||||
editing on another device, e.g., AUX:. {not in Vi}
|
||||
*-f*
|
||||
-f Amiga: Do not restart Vim to open a new window. This
|
||||
option should be used when Vim is started by a program that
|
||||
will wait for the edit session to finish (e.g., mail or
|
||||
readnews). See |amiga-window|.
|
||||
|
||||
GUI: Do not disconnect from the program that started Vim.
|
||||
-f GUI: Do not disconnect from the program that started Vim.
|
||||
'f' stands for "foreground". If omitted, the GUI forks a new
|
||||
process and exits the current one. "-f" should be used when
|
||||
gvim is started by a program that will wait for the edit
|
||||
@@ -437,8 +432,14 @@ a slash. Thus "-R" means recovery and "-/R" readonly.
|
||||
never to fork, include 'f' in 'guioptions' in your |gvimrc|.
|
||||
Careful: You can use "-gf" to start the GUI in the foreground,
|
||||
but "-fg" is used to specify the foreground color. |gui-fork|
|
||||
|
||||
Amiga: Do not restart Vim to open a new window. This
|
||||
option should be used when Vim is started by a program that
|
||||
will wait for the edit session to finish (e.g., mail or
|
||||
readnews). See |amiga-window|.
|
||||
{not in Vi}
|
||||
|
||||
|
||||
*--nofork*
|
||||
--nofork GUI: Do not fork. Same as |-f|.
|
||||
*-u* *E282*
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*syntax.txt* For Vim version 7.3. Last change: 2010 Sep 23
|
||||
*syntax.txt* For Vim version 7.3. Last change: 2011 Sep 21
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -390,10 +390,10 @@ Or use the ":TOhtml" user command. It is defined in a standard plugin.
|
||||
|
||||
:10,40TOhtml
|
||||
|
||||
Warning: This is slow! The script must process every character of every line.
|
||||
Because it is so slow, by default a progress bar is displayed in the
|
||||
statusline for each step that usually takes a long time. If you don't like
|
||||
seeing this progress bar, you can disable it and get a very minor speed
|
||||
Warning: This can be slow! The script must process every character of every
|
||||
line. Because it can take a long time, by default a progress bar is displayed
|
||||
in the statusline for each major step in the conversion process. If you don't
|
||||
like seeing this progress bar, you can disable it and get a very minor speed
|
||||
improvement with: >
|
||||
|
||||
let g:html_no_progress = 1
|
||||
@@ -468,47 +468,107 @@ disabled javascript to view closed folds. To use this option, use: >
|
||||
Setting html_no_foldcolumn with html_dynamic_folds will automatically set
|
||||
html_hover_unfold, because otherwise the folds wouldn't be dynamic.
|
||||
|
||||
By default "<pre>" and "</pre>" is used around the text. This makes it show
|
||||
up as you see it in Vim, but without wrapping. If you prefer wrapping, at the
|
||||
risk of making some things look a bit different, use: >
|
||||
By default "<pre>" and "</pre>" are used around the text. When 'wrap' is set
|
||||
in the window being converted, the CSS 2.0 "white-space:pre-wrap" value is
|
||||
used to wrap the text. You can explicitly enable the wrapping with: >
|
||||
:let g:html_pre_wrap = 1
|
||||
or disable with >
|
||||
:let g:html_pre_wrap = 0
|
||||
This generates HTML that looks very close to the Vim window, but unfortunately
|
||||
there can be minor differences such as the lack of a 'showbreak' option in in
|
||||
the HTML, or where line breaks can occur.
|
||||
|
||||
Another way to obtain text wrapping in the HTML, at the risk of making some
|
||||
things look even more different, is to use: >
|
||||
:let g:html_no_pre = 1
|
||||
This will use <br> at the end of each line and use " " for repeated
|
||||
spaces.
|
||||
spaces. Doing it this way is more compatible with old browsers, but modern
|
||||
browsers support the "white-space" method.
|
||||
|
||||
The current value of 'encoding' is used to specify the charset of the HTML
|
||||
file. This only works for those values of 'encoding' that have an equivalent
|
||||
HTML charset name. To overrule this set g:html_use_encoding to the name of
|
||||
the charset to be used: >
|
||||
:let g:html_use_encoding = "foobar"
|
||||
To omit the line that specifies the charset, set g:html_use_encoding to an
|
||||
empty string: >
|
||||
If you do stick with the default "<pre>" tags, <Tab> characters in the text
|
||||
are included in the generated output if they will have no effect on the
|
||||
appearance of the text and it looks like they are in the document
|
||||
intentionally. This allows for the HTML output to be copied and pasted from a
|
||||
browser without losing the actual whitespace used in the document.
|
||||
|
||||
Specifically, <Tab> characters will be included if the 'tabstop' option is set
|
||||
to the default of 8, 'expandtab' is not set, and if neither the foldcolumn nor
|
||||
the line numbers are included in the HTML output (see options above). When any
|
||||
of these conditions are not met, any <Tab> characters in the text are expanded
|
||||
to the appropriate number of spaces in the HTML output.
|
||||
|
||||
When "<pre>" is included, you can force |:TOhtml| to keep the tabs even if the
|
||||
other conditions are not met with: >
|
||||
:let g:html_expand_tabs = 0
|
||||
Note that this can easily break text alignment and indentation in the HTML.
|
||||
|
||||
Force tabs to be expanded even when they would be kept using: >
|
||||
:let g:html_expand_tabs = 1
|
||||
|
||||
For diff mode on a single file (with g:html_diff_one_file) a sequence of more
|
||||
than 3 filler lines is displayed as three lines with the middle line
|
||||
mentioning the total number of inserted lines. If you prefer to see all the
|
||||
inserted lines as with the side-by-side diff, use: >
|
||||
:let g:html_whole_filler = 1
|
||||
And to go back to displaying up to three lines again: >
|
||||
:unlet g:html_whole_filler
|
||||
|
||||
For most buffers, TOhtml uses the current value of 'fileencoding' if set, or
|
||||
'encoding' if not, to determine the charset and 'fileencoding' of the HTML
|
||||
file. 'encoding' is always used for certain 'buftype' values. In general, this
|
||||
works for the encodings mentioned specifically by name in |encoding-names|,
|
||||
but TOhtml will only automatically use those encodings which are widely
|
||||
supported. However, you can override this to support specific encodings that
|
||||
may not be automatically detected by default.
|
||||
|
||||
To overrule all automatic charset detection, set g:html_use_encoding to the
|
||||
name of the charset to be used. TOhtml will try to determine the appropriate
|
||||
'fileencoding' setting from the charset, but you may need to set it manually
|
||||
if TOhtml cannot determine the encoding. It is recommended to set this
|
||||
variable to something widely supported, like UTF-8, for anything you will be
|
||||
hosting on a webserver: >
|
||||
:let g:html_use_encoding = "UTF-8"
|
||||
You can also use this option to omit the line that specifies the charset
|
||||
entirely, by setting g:html_use_encoding to an empty string: >
|
||||
:let g:html_use_encoding = ""
|
||||
To go back to the automatic mechanism, delete the g:html_use_encoding
|
||||
variable: >
|
||||
:unlet g:html_use_encoding
|
||||
|
||||
If you specify a charset with g:html_use_encoding for which TOhtml cannot
|
||||
automatically detect the corresponding 'fileencoding' setting, you can use
|
||||
g:html_encoding_override to allow TOhtml to detect the correct encoding.
|
||||
This is a dictionary of charset-encoding pairs that will replace existing
|
||||
pairs automatically detected by TOhtml, or supplement with new pairs. For
|
||||
example, to allow TOhtml to detect the HTML charset "windows-1252" properly as
|
||||
the encoding "8bit-cp1252", use: >
|
||||
:let g:html_encoding_override = {'windows-1252': '8bit-cp1252'}
|
||||
<
|
||||
For diff mode a sequence of more than 3 filler lines is displayed as three
|
||||
lines with the middle line mentioning the total number of inserted lines. If
|
||||
you prefer to see all the inserted lines use: >
|
||||
:let g:html_whole_filler = 1
|
||||
And to go back to displaying up to three lines again: >
|
||||
:unlet g:html_whole_filler
|
||||
<
|
||||
The g:html_charset_override is similar, it allows TOhtml to detect the HTML
|
||||
charset for any 'fileencoding' or 'encoding' which is not detected
|
||||
automatically. You can also use it to override specific existing
|
||||
encoding-charset pairs. For example, TOhtml will by default use UTF-8 for all
|
||||
Unicode/UCS encodings. To use UTF-16 and UTF-32 instead, use: >
|
||||
:let g:html_charset_override = {'ucs-4': 'UTF-32', 'utf-16': 'UTF-16'}
|
||||
|
||||
Note that documents encoded in either UTF-32 or UTF-16 have known
|
||||
compatibility problems with at least one major browser.
|
||||
|
||||
*convert-to-XML* *convert-to-XHTML*
|
||||
An alternative is to have the script generate XHTML (XML compliant HTML). To
|
||||
do this set the "html_use_xhtml" variable: >
|
||||
If you do not like plain HTML, an alternative is to have the script generate
|
||||
XHTML (XML compliant HTML). To do this set the "html_use_xhtml" variable: >
|
||||
:let g:html_use_xhtml = 1
|
||||
|
||||
Any of these options can be enabled or disabled by setting them explicitly to
|
||||
the desired value, or restored to their default by removing the variable using
|
||||
|:unlet|.
|
||||
Any of the on/off options listed above can be enabled or disabled by setting
|
||||
them explicitly to the desired value, or restored to their default by removing
|
||||
the variable using |:unlet|.
|
||||
|
||||
Remarks:
|
||||
- This only works in a version with GUI support. If the GUI is not actually
|
||||
running (possible for X11) it still works, but not very well (the colors
|
||||
may be wrong).
|
||||
- Some truly ancient browsers may not show the background colors.
|
||||
- From most browsers you can also print the file (in color)!
|
||||
- This version of TOhtml may work with older versions of Vim, but some
|
||||
features such as conceal support will not function, and the colors may be
|
||||
incorrect for an old Vim without GUI support compiled in.
|
||||
|
||||
Here is an example how to run the script over all .c and .h files from a
|
||||
Unix shell: >
|
||||
@@ -806,13 +866,13 @@ used.
|
||||
Detecting whether a file is csh or tcsh is notoriously hard. Some systems
|
||||
symlink /bin/csh to /bin/tcsh, making it almost impossible to distinguish
|
||||
between csh and tcsh. In case VIM guesses wrong you can set the
|
||||
"filetype_csh" variable. For using csh: >
|
||||
|
||||
:let filetype_csh = "csh"
|
||||
"filetype_csh" variable. For using csh: *g:filetype_csh*
|
||||
>
|
||||
:let g:filetype_csh = "csh"
|
||||
|
||||
For using tcsh: >
|
||||
|
||||
:let filetype_csh = "tcsh"
|
||||
:let g:filetype_csh = "tcsh"
|
||||
|
||||
Any script with a tcsh extension or a standard tcsh filename (.tcshrc,
|
||||
tcsh.tcshrc, tcsh.login) will have filetype tcsh. All other tcsh/csh scripts
|
||||
@@ -872,8 +932,8 @@ line to your startup file: >
|
||||
|
||||
|
||||
DOCBOOK *docbk.vim* *ft-docbk-syntax* *docbook*
|
||||
DOCBOOK XML *docbkxml.vim* *ft-docbkxml-syntax*
|
||||
DOCBOOK SGML *docbksgml.vim* *ft-docbksgml-syntax*
|
||||
DOCBOOK XML *docbkxml.vim* *ft-docbkxml-syntax*
|
||||
DOCBOOK SGML *docbksgml.vim* *ft-docbksgml-syntax*
|
||||
|
||||
There are two types of DocBook files: SGML and XML. To specify what type you
|
||||
are using the "b:docbk_type" variable should be set. Vim does this for you
|
||||
@@ -1042,6 +1102,8 @@ your .vimrc: >
|
||||
FLEXWIKI *flexwiki.vim* *ft-flexwiki-syntax*
|
||||
|
||||
FlexWiki is an ASP.NET-based wiki package available at http://www.flexwiki.com
|
||||
NOTE: this site currently doesn't work, on Wikipedia is mentioned that
|
||||
development stopped in 2009.
|
||||
|
||||
Syntax highlighting is available for the most common elements of FlexWiki
|
||||
syntax. The associated ftplugin script sets some buffer-local options to make
|
||||
@@ -2310,6 +2372,12 @@ This will make the syntax synchronization start 50 lines before the first
|
||||
displayed line. The default value is 10. The disadvantage of using a larger
|
||||
number is that redrawing can become slow.
|
||||
|
||||
Vim tries to guess what type a ".r" file is. If it can't be detected (from
|
||||
comment lines), the default is "r". To make the default rexx add this line to
|
||||
your .vimrc: *g:filetype_r*
|
||||
>
|
||||
:let g:filetype_r = "r"
|
||||
|
||||
|
||||
RUBY *ruby.vim* *ft-ruby-syntax*
|
||||
|
||||
@@ -2537,8 +2605,41 @@ reduce this, the "sh_maxlines" internal variable can be set. Example: >
|
||||
The default is to use the twice sh_minlines. Set it to a smaller number to
|
||||
speed up displaying. The disadvantage is that highlight errors may appear.
|
||||
|
||||
*g:sh_isk* *g:sh_noisk*
|
||||
The shell languages appear to let "." be part of words, commands, etc;
|
||||
consequently it should be in the isk for sh.vim. As of v116 of syntax/sh.vim,
|
||||
syntax/sh.vim will append the "." to |'iskeyword'| by default; you may control
|
||||
this behavior with: >
|
||||
let g:sh_isk = '..whatever characters you want as part of iskeyword'
|
||||
let g:sh_noisk= 1 " otherwise, if this exists, the isk will NOT chg
|
||||
<
|
||||
*sh-embed* *sh-awk*
|
||||
Sh: EMBEDDING LANGUAGES~
|
||||
|
||||
SPEEDUP (AspenTech plant simulator) *spup.vim* *ft-spup-syntax*
|
||||
You may wish to embed languages into sh. I'll give an example courtesy of
|
||||
Lorance Stinson on how to do this with awk as an example. Put the following
|
||||
file into $HOME/.vim/after/syntax/sh/awkembed.vim: >
|
||||
|
||||
" AWK Embedding: {{{1
|
||||
" ==============
|
||||
" Shamelessly ripped from aspperl.vim by Aaron Hope.
|
||||
if exists("b:current_syntax")
|
||||
unlet b:current_syntax
|
||||
endif
|
||||
syn include @AWKScript syntax/awk.vim
|
||||
syn region AWKScriptCode matchgroup=AWKCommand start=+[=\\]\@<!'+ skip=+\\'+ end=+'+ contains=@AWKScript contained
|
||||
syn region AWKScriptEmbedded matchgroup=AWKCommand start=+\<awk\>+ skip=+\\$+ end=+[=\\]\@<!'+me=e-1 contains=@shIdList,@shExprList2 nextgroup=AWKScriptCode
|
||||
syn cluster shCommandSubList add=AWKScriptEmbedded
|
||||
hi def link AWKCommand Type
|
||||
<
|
||||
This code will then let the awk code in the single quotes: >
|
||||
awk '...awk code here...'
|
||||
be highlighted using the awk highlighting syntax. Clearly this may be
|
||||
extended to other languages.
|
||||
|
||||
|
||||
SPEEDUP *spup.vim* *ft-spup-syntax*
|
||||
(AspenTech plant simulator)
|
||||
|
||||
The Speedup syntax file has some options:
|
||||
|
||||
@@ -2621,6 +2722,8 @@ sections, subsections, etc are supported. Put >
|
||||
in your <.vimrc>, and :set fdm=syntax. I suggest doing the latter via a
|
||||
modeline at the end of your LaTeX file: >
|
||||
% vim: fdm=syntax
|
||||
If your system becomes too slow, then you might wish to look into >
|
||||
https://vimhelp.appspot.com/vim_faq.txt.html#faq-29.7
|
||||
<
|
||||
*tex-nospell*
|
||||
Tex: Don't Want Spell Checking In Comments? ~
|
||||
@@ -2661,6 +2764,9 @@ If you have a slow computer, you may wish to reduce the values for >
|
||||
increase them. This primarily affects synchronizing (i.e. just what group,
|
||||
if any, is the text at the top of the screen supposed to be in?).
|
||||
|
||||
Another cause of slow highlighting is due to syntax-driven folding; see
|
||||
|tex-folding| for a way around this.
|
||||
|
||||
*tex-morecommands* *tex-package*
|
||||
Tex: Want To Highlight More Commands? ~
|
||||
|
||||
@@ -3174,6 +3280,9 @@ DEFINING REGIONS *:syn-region* *:syn-start* *:syn-skip* *:syn-end*
|
||||
:hi par1 ctermfg=red guifg=red
|
||||
:hi par2 ctermfg=blue guifg=blue
|
||||
:hi par3 ctermfg=darkgreen guifg=darkgreen
|
||||
<
|
||||
*E849*
|
||||
The maximum number of syntax groups is 19999.
|
||||
|
||||
==============================================================================
|
||||
6. :syntax arguments *:syn-arguments*
|
||||
@@ -3218,11 +3327,12 @@ Whether or not they are actually concealed depends on the setting on the
|
||||
in this way when they have their own highlighting via "matchgroup"
|
||||
|
||||
cchar *:syn-cchar*
|
||||
|
||||
*E844*
|
||||
The "cchar" argument defines the character shown in place of the item
|
||||
when it is concealed (setting "cchar" only makes sense when the conceal
|
||||
argument is given.) If "cchar" is not set then the default conceal
|
||||
character defined in the 'listchars' option is used. Example: >
|
||||
character defined in the 'listchars' option is used. The character cannot be
|
||||
a control character such as Tab. Example: >
|
||||
:syntax match Entity "&" conceal cchar=&
|
||||
See |hl-Conceal| for highlighting.
|
||||
|
||||
@@ -3711,6 +3821,9 @@ This also has implications for nested clusters: >
|
||||
:syntax match Stuff "( aaa bbb )" contains=@BigGroup
|
||||
:syntax cluster BigGroup remove=B " no effect, since B isn't in BigGroup
|
||||
:syntax cluster SmallGroup remove=B " now bbb isn't matched within Stuff
|
||||
<
|
||||
*E848*
|
||||
The maximum number of clusters is 9767.
|
||||
|
||||
==============================================================================
|
||||
9. Including syntax files *:syn-include* *E397*
|
||||
@@ -3750,6 +3863,9 @@ two different ways:
|
||||
with his own version, without replacing the file that does the ":syn
|
||||
include".
|
||||
|
||||
*E847*
|
||||
The maximum number of includes is 999.
|
||||
|
||||
==============================================================================
|
||||
10. Synchronizing *:syn-sync* *E403* *E404*
|
||||
|
||||
|
||||
111
runtime/doc/tags
111
runtime/doc/tags
@@ -154,12 +154,14 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
|
||||
'cscopepathcomp' options.txt /*'cscopepathcomp'*
|
||||
'cscopeprg' options.txt /*'cscopeprg'*
|
||||
'cscopequickfix' options.txt /*'cscopequickfix'*
|
||||
'cscoperelative' options.txt /*'cscoperelative'*
|
||||
'cscopetag' options.txt /*'cscopetag'*
|
||||
'cscopetagorder' options.txt /*'cscopetagorder'*
|
||||
'cscopeverbose' options.txt /*'cscopeverbose'*
|
||||
'cspc' options.txt /*'cspc'*
|
||||
'csprg' options.txt /*'csprg'*
|
||||
'csqf' options.txt /*'csqf'*
|
||||
'csre' options.txt /*'csre'*
|
||||
'cst' options.txt /*'cst'*
|
||||
'csto' options.txt /*'csto'*
|
||||
'csverb' options.txt /*'csverb'*
|
||||
@@ -659,6 +661,8 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
|
||||
'noweirdinvert' options.txt /*'noweirdinvert'*
|
||||
'nowfh' options.txt /*'nowfh'*
|
||||
'nowfw' options.txt /*'nowfw'*
|
||||
'nowic' options.txt /*'nowic'*
|
||||
'nowildignorecase' options.txt /*'nowildignorecase'*
|
||||
'nowildmenu' options.txt /*'nowildmenu'*
|
||||
'nowinfixheight' options.txt /*'nowinfixheight'*
|
||||
'nowinfixwidth' options.txt /*'nowinfixwidth'*
|
||||
@@ -1064,10 +1068,12 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
|
||||
'wh' options.txt /*'wh'*
|
||||
'whichwrap' options.txt /*'whichwrap'*
|
||||
'wi' options.txt /*'wi'*
|
||||
'wic' options.txt /*'wic'*
|
||||
'wig' options.txt /*'wig'*
|
||||
'wildchar' options.txt /*'wildchar'*
|
||||
'wildcharm' options.txt /*'wildcharm'*
|
||||
'wildignore' options.txt /*'wildignore'*
|
||||
'wildignorecase' options.txt /*'wildignorecase'*
|
||||
'wildmenu' options.txt /*'wildmenu'*
|
||||
'wildmode' options.txt /*'wildmode'*
|
||||
'wildoptions' options.txt /*'wildoptions'*
|
||||
@@ -1187,7 +1193,6 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
|
||||
+mzscheme/dyn various.txt /*+mzscheme\/dyn*
|
||||
+netbeans_intg various.txt /*+netbeans_intg*
|
||||
+ole various.txt /*+ole*
|
||||
+osfiletype various.txt /*+osfiletype*
|
||||
+path_extra various.txt /*+path_extra*
|
||||
+perl various.txt /*+perl*
|
||||
+perl/dyn various.txt /*+perl\/dyn*
|
||||
@@ -3202,6 +3207,7 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
|
||||
<reg> map.txt /*<reg>*
|
||||
<register> map.txt /*<register>*
|
||||
<sfile> cmdline.txt /*<sfile>*
|
||||
<slnum> cmdline.txt /*<slnum>*
|
||||
<xCSI> intro.txt /*<xCSI>*
|
||||
<xDown> term.txt /*<xDown>*
|
||||
<xEnd> term.txt /*<xEnd>*
|
||||
@@ -3700,7 +3706,6 @@ E362 term.txt /*E362*
|
||||
E363 options.txt /*E363*
|
||||
E364 eval.txt /*E364*
|
||||
E365 print.txt /*E365*
|
||||
E366 options.txt /*E366*
|
||||
E367 autocmd.txt /*E367*
|
||||
E368 eval.txt /*E368*
|
||||
E369 pattern.txt /*E369*
|
||||
@@ -3965,8 +3970,6 @@ E607 eval.txt /*E607*
|
||||
E608 eval.txt /*E608*
|
||||
E609 if_cscop.txt /*E609*
|
||||
E61 pattern.txt /*E61*
|
||||
E610 options.txt /*E610*
|
||||
E611 options.txt /*E611*
|
||||
E612 sign.txt /*E612*
|
||||
E613 print.txt /*E613*
|
||||
E614 editing.txt /*E614*
|
||||
@@ -4216,8 +4219,22 @@ E835 options.txt /*E835*
|
||||
E836 if_pyth.txt /*E836*
|
||||
E837 if_pyth.txt /*E837*
|
||||
E838 netbeans.txt /*E838*
|
||||
E839 insert.txt /*E839*
|
||||
E84 windows.txt /*E84*
|
||||
E840 insert.txt /*E840*
|
||||
E841 map.txt /*E841*
|
||||
E842 cmdline.txt /*E842*
|
||||
E843 editing.txt /*E843*
|
||||
E844 syntax.txt /*E844*
|
||||
E845 spell.txt /*E845*
|
||||
E846 options.txt /*E846*
|
||||
E847 syntax.txt /*E847*
|
||||
E848 syntax.txt /*E848*
|
||||
E849 syntax.txt /*E849*
|
||||
E85 options.txt /*E85*
|
||||
E850 change.txt /*E850*
|
||||
E851 gui_x11.txt /*E851*
|
||||
E852 gui_x11.txt /*E852*
|
||||
E86 windows.txt /*E86*
|
||||
E87 windows.txt /*E87*
|
||||
E88 windows.txt /*E88*
|
||||
@@ -4287,6 +4304,7 @@ IME mbyte.txt /*IME*
|
||||
Insert insert.txt /*Insert*
|
||||
Insert-mode insert.txt /*Insert-mode*
|
||||
InsertChange autocmd.txt /*InsertChange*
|
||||
InsertCharPre autocmd.txt /*InsertCharPre*
|
||||
InsertEnter autocmd.txt /*InsertEnter*
|
||||
InsertLeave autocmd.txt /*InsertLeave*
|
||||
J change.txt /*J*
|
||||
@@ -4849,6 +4867,8 @@ c_<S-Tab> cmdline.txt /*c_<S-Tab>*
|
||||
c_<S-Up> cmdline.txt /*c_<S-Up>*
|
||||
c_<Tab> cmdline.txt /*c_<Tab>*
|
||||
c_<Up> cmdline.txt /*c_<Up>*
|
||||
c_BS cmdline.txt /*c_BS*
|
||||
c_CR cmdline.txt /*c_CR*
|
||||
c_CTRL-A cmdline.txt /*c_CTRL-A*
|
||||
c_CTRL-B cmdline.txt /*c_CTRL-B*
|
||||
c_CTRL-C cmdline.txt /*c_CTRL-C*
|
||||
@@ -4881,6 +4901,15 @@ c_CTRL-\_e cmdline.txt /*c_CTRL-\\_e*
|
||||
c_CTRL-] cmdline.txt /*c_CTRL-]*
|
||||
c_CTRL-^ cmdline.txt /*c_CTRL-^*
|
||||
c_CTRL-_ cmdline.txt /*c_CTRL-_*
|
||||
c_Del cmdline.txt /*c_Del*
|
||||
c_Down cmdline.txt /*c_Down*
|
||||
c_End cmdline.txt /*c_End*
|
||||
c_Esc cmdline.txt /*c_Esc*
|
||||
c_Home cmdline.txt /*c_Home*
|
||||
c_Insert cmdline.txt /*c_Insert*
|
||||
c_Left cmdline.txt /*c_Left*
|
||||
c_Right cmdline.txt /*c_Right*
|
||||
c_Up cmdline.txt /*c_Up*
|
||||
c_digraph cmdline.txt /*c_digraph*
|
||||
c_wildchar cmdline.txt /*c_wildchar*
|
||||
call() eval.txt /*call()*
|
||||
@@ -4931,6 +4960,40 @@ charset-conversion mbyte.txt /*charset-conversion*
|
||||
chill.vim syntax.txt /*chill.vim*
|
||||
cindent() eval.txt /*cindent()*
|
||||
cinkeys-format indent.txt /*cinkeys-format*
|
||||
cino-# indent.txt /*cino-#*
|
||||
cino-( indent.txt /*cino-(*
|
||||
cino-) indent.txt /*cino-)*
|
||||
cino-+ indent.txt /*cino-+*
|
||||
cino-/ indent.txt /*cino-\/*
|
||||
cino-: indent.txt /*cino-:*
|
||||
cino-= indent.txt /*cino-=*
|
||||
cino-> indent.txt /*cino->*
|
||||
cino-C indent.txt /*cino-C*
|
||||
cino-J indent.txt /*cino-J*
|
||||
cino-L indent.txt /*cino-L*
|
||||
cino-M indent.txt /*cino-M*
|
||||
cino-N indent.txt /*cino-N*
|
||||
cino-U indent.txt /*cino-U*
|
||||
cino-W indent.txt /*cino-W*
|
||||
cino-^ indent.txt /*cino-^*
|
||||
cino-b indent.txt /*cino-b*
|
||||
cino-c indent.txt /*cino-c*
|
||||
cino-e indent.txt /*cino-e*
|
||||
cino-f indent.txt /*cino-f*
|
||||
cino-g indent.txt /*cino-g*
|
||||
cino-h indent.txt /*cino-h*
|
||||
cino-i indent.txt /*cino-i*
|
||||
cino-j indent.txt /*cino-j*
|
||||
cino-l indent.txt /*cino-l*
|
||||
cino-m indent.txt /*cino-m*
|
||||
cino-n indent.txt /*cino-n*
|
||||
cino-p indent.txt /*cino-p*
|
||||
cino-star indent.txt /*cino-star*
|
||||
cino-t indent.txt /*cino-t*
|
||||
cino-u indent.txt /*cino-u*
|
||||
cino-w indent.txt /*cino-w*
|
||||
cino-{ indent.txt /*cino-{*
|
||||
cino-} indent.txt /*cino-}*
|
||||
cinoptions-values indent.txt /*cinoptions-values*
|
||||
clear-undo undo.txt /*clear-undo*
|
||||
clearmatches() eval.txt /*clearmatches()*
|
||||
@@ -5035,6 +5098,7 @@ cpo-+ options.txt /*cpo-+*
|
||||
cpo-- options.txt /*cpo--*
|
||||
cpo-. options.txt /*cpo-.*
|
||||
cpo-/ options.txt /*cpo-\/*
|
||||
cpo-; options.txt /*cpo-;*
|
||||
cpo-< options.txt /*cpo-<*
|
||||
cpo-> options.txt /*cpo->*
|
||||
cpo-A options.txt /*cpo-A*
|
||||
@@ -5104,6 +5168,7 @@ cscope_connection() eval.txt /*cscope_connection()*
|
||||
cscopepathcomp if_cscop.txt /*cscopepathcomp*
|
||||
cscopeprg if_cscop.txt /*cscopeprg*
|
||||
cscopequickfix if_cscop.txt /*cscopequickfix*
|
||||
cscoperelative if_cscop.txt /*cscoperelative*
|
||||
cscopetag if_cscop.txt /*cscopetag*
|
||||
cscopetagorder if_cscop.txt /*cscopetagorder*
|
||||
cscopeverbose if_cscop.txt /*cscopeverbose*
|
||||
@@ -5111,6 +5176,7 @@ csh.vim syntax.txt /*csh.vim*
|
||||
cspc if_cscop.txt /*cspc*
|
||||
csprg if_cscop.txt /*csprg*
|
||||
csqf if_cscop.txt /*csqf*
|
||||
csre if_cscop.txt /*csre*
|
||||
cst if_cscop.txt /*cst*
|
||||
csto if_cscop.txt /*csto*
|
||||
csverb if_cscop.txt /*csverb*
|
||||
@@ -5217,6 +5283,7 @@ digraph digraph.txt /*digraph*
|
||||
digraph-arg change.txt /*digraph-arg*
|
||||
digraph-encoding digraph.txt /*digraph-encoding*
|
||||
digraph-table digraph.txt /*digraph-table*
|
||||
digraph-table-mbyte digraph.txt /*digraph-table-mbyte*
|
||||
digraph.txt digraph.txt /*digraph.txt*
|
||||
digraphs digraph.txt /*digraphs*
|
||||
digraphs-changed version6.txt /*digraphs-changed*
|
||||
@@ -5387,6 +5454,11 @@ expr-env eval.txt /*expr-env*
|
||||
expr-env-expand eval.txt /*expr-env-expand*
|
||||
expr-function eval.txt /*expr-function*
|
||||
expr-is eval.txt /*expr-is*
|
||||
expr-is# eval.txt /*expr-is#*
|
||||
expr-is? eval.txt /*expr-is?*
|
||||
expr-isnot eval.txt /*expr-isnot*
|
||||
expr-isnot# eval.txt /*expr-isnot#*
|
||||
expr-isnot? eval.txt /*expr-isnot?*
|
||||
expr-nesting eval.txt /*expr-nesting*
|
||||
expr-number eval.txt /*expr-number*
|
||||
expr-option eval.txt /*expr-option*
|
||||
@@ -5620,6 +5692,7 @@ ft-ptcap-syntax syntax.txt /*ft-ptcap-syntax*
|
||||
ft-python-indent indent.txt /*ft-python-indent*
|
||||
ft-python-syntax syntax.txt /*ft-python-syntax*
|
||||
ft-quake-syntax syntax.txt /*ft-quake-syntax*
|
||||
ft-r-indent indent.txt /*ft-r-indent*
|
||||
ft-readline-syntax syntax.txt /*ft-readline-syntax*
|
||||
ft-rexx-syntax syntax.txt /*ft-rexx-syntax*
|
||||
ft-ruby-omni insert.txt /*ft-ruby-omni*
|
||||
@@ -5715,6 +5788,8 @@ g:decada.Error_Format ft_ada.txt /*g:decada.Error_Format*
|
||||
g:decada.Make() ft_ada.txt /*g:decada.Make()*
|
||||
g:decada.Make_Command ft_ada.txt /*g:decada.Make_Command*
|
||||
g:decada.Unit_Name() ft_ada.txt /*g:decada.Unit_Name()*
|
||||
g:filetype_csh syntax.txt /*g:filetype_csh*
|
||||
g:filetype_r syntax.txt /*g:filetype_r*
|
||||
g:gnat ft_ada.txt /*g:gnat*
|
||||
g:gnat.Error_Format ft_ada.txt /*g:gnat.Error_Format*
|
||||
g:gnat.Find() ft_ada.txt /*g:gnat.Find()*
|
||||
@@ -5737,10 +5812,11 @@ g:netrw_chgperm pi_netrw.txt /*g:netrw_chgperm*
|
||||
g:netrw_chgwin pi_netrw.txt /*g:netrw_chgwin*
|
||||
g:netrw_compress pi_netrw.txt /*g:netrw_compress*
|
||||
g:netrw_ctags pi_netrw.txt /*g:netrw_ctags*
|
||||
g:netrw_cursorline pi_netrw.txt /*g:netrw_cursorline*
|
||||
g:netrw_cursor pi_netrw.txt /*g:netrw_cursor*
|
||||
g:netrw_cygwin pi_netrw.txt /*g:netrw_cygwin*
|
||||
g:netrw_dav_cmd pi_netrw.txt /*g:netrw_dav_cmd*
|
||||
g:netrw_decompress pi_netrw.txt /*g:netrw_decompress*
|
||||
g:netrw_dirhistmax pi_netrw.txt /*g:netrw_dirhistmax*
|
||||
g:netrw_fastbrowse pi_netrw.txt /*g:netrw_fastbrowse*
|
||||
g:netrw_fetch_cmd pi_netrw.txt /*g:netrw_fetch_cmd*
|
||||
g:netrw_fname_escape pi_netrw.txt /*g:netrw_fname_escape*
|
||||
@@ -5949,6 +6025,7 @@ gtk-tooltip-colors gui_x11.txt /*gtk-tooltip-colors*
|
||||
gu change.txt /*gu*
|
||||
gugu change.txt /*gugu*
|
||||
gui gui.txt /*gui*
|
||||
gui-IME gui.txt /*gui-IME*
|
||||
gui-clipboard gui_w32.txt /*gui-clipboard*
|
||||
gui-colors syntax.txt /*gui-colors*
|
||||
gui-extras gui.txt /*gui-extras*
|
||||
@@ -6028,6 +6105,7 @@ hangul hangulin.txt /*hangul*
|
||||
hangulin.txt hangulin.txt /*hangulin.txt*
|
||||
has() eval.txt /*has()*
|
||||
has-patch eval.txt /*has-patch*
|
||||
has-python if_pyth.txt /*has-python*
|
||||
has_key() eval.txt /*has_key()*
|
||||
haskell.vim syntax.txt /*haskell.vim*
|
||||
haslocaldir() eval.txt /*haslocaldir()*
|
||||
@@ -6156,6 +6234,7 @@ i) motion.txt /*i)*
|
||||
i< motion.txt /*i<*
|
||||
i> motion.txt /*i>*
|
||||
iB motion.txt /*iB*
|
||||
iBus gui.txt /*iBus*
|
||||
iW motion.txt /*iW*
|
||||
i[ motion.txt /*i[*
|
||||
i] motion.txt /*i]*
|
||||
@@ -6697,6 +6776,7 @@ netrw-clean pi_netrw.txt /*netrw-clean*
|
||||
netrw-contents pi_netrw.txt /*netrw-contents*
|
||||
netrw-copyright pi_netrw.txt /*netrw-copyright*
|
||||
netrw-cr pi_netrw.txt /*netrw-cr*
|
||||
netrw-createfile pi_netrw.txt /*netrw-createfile*
|
||||
netrw-credits pi_netrw.txt /*netrw-credits*
|
||||
netrw-ctrl-h pi_netrw.txt /*netrw-ctrl-h*
|
||||
netrw-ctrl-l pi_netrw.txt /*netrw-ctrl-l*
|
||||
@@ -6720,7 +6800,9 @@ netrw-fixup pi_netrw.txt /*netrw-fixup*
|
||||
netrw-ftp pi_netrw.txt /*netrw-ftp*
|
||||
netrw-ftype pi_netrw.txt /*netrw-ftype*
|
||||
netrw-gb pi_netrw.txt /*netrw-gb*
|
||||
netrw-gd pi_netrw.txt /*netrw-gd*
|
||||
netrw-getftype pi_netrw.txt /*netrw-getftype*
|
||||
netrw-gf pi_netrw.txt /*netrw-gf*
|
||||
netrw-gh pi_netrw.txt /*netrw-gh*
|
||||
netrw-gp pi_netrw.txt /*netrw-gp*
|
||||
netrw-gx pi_netrw.txt /*netrw-gx*
|
||||
@@ -6773,6 +6855,8 @@ netrw-p10 pi_netrw.txt /*netrw-p10*
|
||||
netrw-p11 pi_netrw.txt /*netrw-p11*
|
||||
netrw-p12 pi_netrw.txt /*netrw-p12*
|
||||
netrw-p13 pi_netrw.txt /*netrw-p13*
|
||||
netrw-p14 pi_netrw.txt /*netrw-p14*
|
||||
netrw-p15 pi_netrw.txt /*netrw-p15*
|
||||
netrw-p2 pi_netrw.txt /*netrw-p2*
|
||||
netrw-p3 pi_netrw.txt /*netrw-p3*
|
||||
netrw-p4 pi_netrw.txt /*netrw-p4*
|
||||
@@ -6821,6 +6905,7 @@ netrw-start pi_netrw.txt /*netrw-start*
|
||||
netrw-t pi_netrw.txt /*netrw-t*
|
||||
netrw-texplore pi_netrw.txt /*netrw-texplore*
|
||||
netrw-todo pi_netrw.txt /*netrw-todo*
|
||||
netrw-trailingslash pi_netrw.txt /*netrw-trailingslash*
|
||||
netrw-transparent pi_netrw.txt /*netrw-transparent*
|
||||
netrw-u pi_netrw.txt /*netrw-u*
|
||||
netrw-updir pi_netrw.txt /*netrw-updir*
|
||||
@@ -6961,9 +7046,11 @@ operator-variable eval.txt /*operator-variable*
|
||||
option-backslash options.txt /*option-backslash*
|
||||
option-list quickref.txt /*option-list*
|
||||
option-summary options.txt /*option-summary*
|
||||
option-window options.txt /*option-window*
|
||||
options options.txt /*options*
|
||||
options-changed version5.txt /*options-changed*
|
||||
options.txt options.txt /*options.txt*
|
||||
optwin options.txt /*optwin*
|
||||
oracle ft_sql.txt /*oracle*
|
||||
os2 os_os2.txt /*os2*
|
||||
os2ansi os_os2.txt /*os2ansi*
|
||||
@@ -7243,17 +7330,6 @@ right-justify change.txt /*right-justify*
|
||||
rileft rileft.txt /*rileft*
|
||||
rileft.txt rileft.txt /*rileft.txt*
|
||||
riscos os_risc.txt /*riscos*
|
||||
riscos-commandline os_risc.txt /*riscos-commandline*
|
||||
riscos-filetypes os_risc.txt /*riscos-filetypes*
|
||||
riscos-gui os_risc.txt /*riscos-gui*
|
||||
riscos-interrupt os_risc.txt /*riscos-interrupt*
|
||||
riscos-locations os_risc.txt /*riscos-locations*
|
||||
riscos-memory os_risc.txt /*riscos-memory*
|
||||
riscos-munging os_risc.txt /*riscos-munging*
|
||||
riscos-porting os_risc.txt /*riscos-porting*
|
||||
riscos-remote os_risc.txt /*riscos-remote*
|
||||
riscos-shell os_risc.txt /*riscos-shell*
|
||||
riscos-temp-files os_risc.txt /*riscos-temp-files*
|
||||
rot13 change.txt /*rot13*
|
||||
round() eval.txt /*round()*
|
||||
rsync pi_netrw.txt /*rsync*
|
||||
@@ -8086,6 +8162,7 @@ v:val eval.txt /*v:val*
|
||||
v:var eval.txt /*v:var*
|
||||
v:version eval.txt /*v:version*
|
||||
v:warningmsg eval.txt /*v:warningmsg*
|
||||
v:windowid eval.txt /*v:windowid*
|
||||
v_! change.txt /*v_!*
|
||||
v_$ visual.txt /*v_$*
|
||||
v_: cmdline.txt /*v_:*
|
||||
@@ -8360,6 +8437,7 @@ window-size term.txt /*window-size*
|
||||
window-size-functions usr_41.txt /*window-size-functions*
|
||||
window-tag windows.txt /*window-tag*
|
||||
window-variable eval.txt /*window-variable*
|
||||
windowid-variable eval.txt /*windowid-variable*
|
||||
windows windows.txt /*windows*
|
||||
windows-3.1 os_win32.txt /*windows-3.1*
|
||||
windows-intro windows.txt /*windows-intro*
|
||||
@@ -8392,6 +8470,7 @@ write-fail editing.txt /*write-fail*
|
||||
write-filetype-plugin usr_41.txt /*write-filetype-plugin*
|
||||
write-library-script usr_41.txt /*write-library-script*
|
||||
write-local-help usr_41.txt /*write-local-help*
|
||||
write-permissions editing.txt /*write-permissions*
|
||||
write-plugin usr_41.txt /*write-plugin*
|
||||
write-plugin-quickload usr_41.txt /*write-plugin-quickload*
|
||||
write-quit editing.txt /*write-quit*
|
||||
|
||||
@@ -115,7 +115,7 @@ CTRL-T Jump to [count] older entry in the tag stack
|
||||
|
||||
The output of ":tags" looks like this:
|
||||
|
||||
# TO tag FROM line in file/line
|
||||
# TO tag FROM line in file/text
|
||||
1 1 main 1 harddisk2:text/vim/test
|
||||
> 2 2 FuncA 58 i = FuncA(10);
|
||||
3 1 FuncC 357 harddisk2:text/vim/src/amiga.c
|
||||
@@ -135,7 +135,7 @@ you were before the tag command. The line number will be correct, also when
|
||||
deleting/inserting lines, unless this was done by another program (e.g.
|
||||
another instance of Vim).
|
||||
|
||||
For the current file, the "file/line" column shows the text at the position.
|
||||
For the current file, the "file/text" column shows the text at the position.
|
||||
An indent is removed and a long line is truncated to fit in the window.
|
||||
|
||||
You can jump to previously used tags with several commands. Some examples:
|
||||
@@ -164,9 +164,9 @@ entry was not at the bottom, the entries below the last used one are
|
||||
deleted. This means that an old branch in the call graph is lost. After the
|
||||
commands explained above the tag stack will look like this:
|
||||
|
||||
# TO tag FROM line in file
|
||||
1 main 1 harddisk2:text/vim/test
|
||||
2 FuncB 59 harddisk2:text/vim/src/main.c
|
||||
# TO tag FROM line in file/text
|
||||
1 1 main 1 harddisk2:text/vim/test
|
||||
2 1 FuncB 59 harddisk2:text/vim/src/main.c
|
||||
|
||||
*E73*
|
||||
When you try to use the tag stack while it doesn't contain anything you will
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*term.txt* For Vim version 7.3. Last change: 2009 Nov 05
|
||||
*term.txt* For Vim version 7.3. Last change: 2011 Feb 16
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -665,6 +665,7 @@ When the X-server clipboard is available, the command server described in
|
||||
*xterm-copy-paste*
|
||||
NOTE: In some (older) xterms, it's not possible to move the cursor past column
|
||||
95. This is an xterm problem, not Vim's. Get a newer xterm |color-xterm|.
|
||||
Now the limit is 223 columns.
|
||||
|
||||
Copy/paste in xterm with (current mode NOT included in 'mouse'):
|
||||
1. Press left mouse button on first letter of text, move mouse pointer to last
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*todo.txt* For Vim version 7.3. Last change: 2010 Oct 20
|
||||
*todo.txt* For Vim version 7.3. Last change: 2011 Sep 21
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -27,83 +27,246 @@ Priority classification:
|
||||
See |develop.txt| for development plans. You can vote for which items should
|
||||
be worked on, but only if you sponsor Vim development. See |sponsor|.
|
||||
|
||||
Issues can also be entered online: http://code.google.com/p/vim/issues/list
|
||||
Updates will be forwarded to the vim_dev maillist. Issues entered there will
|
||||
not be repeated below, unless there is extra information.
|
||||
|
||||
*known-bugs*
|
||||
-------------------- Known bugs and current work -----------------------
|
||||
|
||||
'cursorline' is displayed too short when there are concealed characters and
|
||||
'list' is set, 'listchars' at default value. (Dennis Preiser, 2010 Aug 15)
|
||||
Patch for redirection. (Yasuhiro Matsumoto, 2011 Sep 15) 2nd patch.
|
||||
Another on Sep 15?
|
||||
|
||||
Conceal: using Tab for cchar causes problems. Should reject it. (ZyX, 2010
|
||||
Aug 25)
|
||||
Patch for DFLT_EFM. (Ben Boeckel, 2011 Sep 14)
|
||||
|
||||
Code style patch. (Elias Diem, 2011 Sep 19)
|
||||
|
||||
Patch for 'transparency' option. (Ben Boeckel, 2011 Sep 14)
|
||||
Do we want this? Also Sergiu Dotenco, 2011 Sep 17.
|
||||
|
||||
Patch for gui_w32.c: call DefWindowProc(). (Sergiu Dotenco, 2011 Sep 15, 17)
|
||||
|
||||
Patch to use task dialogs when available. (Sergiu Dotenco, 2011 Sep 15, 17)
|
||||
Addition Sep 16.
|
||||
|
||||
Patch for alpha-blended icons and toolbar height. (Sergiu Dotenco, 2011 Sep 15, 17)
|
||||
|
||||
Change to #ifdef for PDP_RETVAL. (Sergiu Dotenco, 2011 Sep 17, patch 2)
|
||||
|
||||
Patch for phpcomplete.vim (Benjamin Haskell) picked up by maintainer?
|
||||
|
||||
Add voting item: modern plugin management (automatic updates, handle
|
||||
dependencies).
|
||||
Add links to http://vimcasts.org/ and http://vimgolf.com/
|
||||
Read http://www.charlietanksley.net/philtex/sane-vim-plugin-management/
|
||||
|
||||
Go through more coverity reports.
|
||||
|
||||
Patch for Issue #9: http://code.google.com/p/vim/issues/detail?id=9
|
||||
C++ indenting. martin.gieseking
|
||||
|
||||
Using "." to repeat a Visual delete counts bytes, not characters. Can this be
|
||||
fixed? (Connor Lane Smith, 2011 Sep 1)
|
||||
|
||||
Patch to allow getchar() in expression mapping.
|
||||
Why was typeahead saved and restored? (James Vega, 2011 Aug 31)
|
||||
|
||||
Crash in autocomplete, valgrind log. (Greg Weber, 2011 Apr 22)
|
||||
|
||||
Discussion about canonicalization of Hebrew. (Ron Aaron, 2011 April 10)
|
||||
|
||||
Patch to fail if configure can't find an interface, such as Python.
|
||||
(Shlomi Fish, 2011 Jul 11)
|
||||
|
||||
Patch to support UTF-8 for Hangul. (Shawn Y.H. Kim, 2011 May 1)
|
||||
Needs more work.
|
||||
|
||||
Patch for glob() returning a list. (Christian Brabandt, 2011 Aug 24, second
|
||||
one)
|
||||
|
||||
Patch for: (Christian Brabandt, 2011 Aug 22)
|
||||
- Make it possible to enter "r<C-E>" and "r<C-Y>" (get character from line
|
||||
below/above).
|
||||
|
||||
Patch for: (Christian Brabandt, 2011 Aug 24, updated patch)
|
||||
8 ":sign unplace * file={filename}" should work. Also: ":sign unplace *
|
||||
buffer={bufnr}". So one can remove all signs for one file/buffer.
|
||||
|
||||
Problem with winfixheight and resizing. (Yukihiro Nakadaira, 2011 Sep 17)
|
||||
Patch Sep 18.
|
||||
|
||||
Problem with l: dictionary being locked in a function. (ZyX, 2011 Jul 21)
|
||||
|
||||
'cursorline' is displayed too short when there are concealed characters and
|
||||
'list' is set. (Dennis Preiser)
|
||||
Patch 7.3.116 was the wrong solution.
|
||||
Christian Brabandt has another incomplete patch. (2011 Jul 13)
|
||||
|
||||
With concealed text mouse click doesn't put the cursor in the right position.
|
||||
(Herb Sitz) Fix by Christian Brabandt, 2011 Jun 16. Doesn't work properly,
|
||||
need to make the change in where RET_WIN_BUF_CHARTABSIZE() is called.
|
||||
|
||||
Syntax region with 'concealends' and a 'cchar' value, 'conceallevel' set to 2,
|
||||
only one of the two ends gets the cchar displayed. (Brett Stahlman, 2010 Aug
|
||||
21, Ben Fritz, 2010 Sep 14)
|
||||
|
||||
Need to escape $HOME on Windows? (ZyX, 2011 Jul 21)
|
||||
|
||||
Bug in repeating Visual "u". (Lawrence Kesteloot, 2010 Dec 20)
|
||||
|
||||
With "unamedplus" in 'clipboard' pasting in Visual mode causes error for empty
|
||||
register. (Michael Seiwald, 2011 Jun 28) I can't reproduce it.
|
||||
|
||||
In GTK Gvim, setting 'lines' and 'columns' to 99999 causes a crash (Tony
|
||||
Mechelynck, 2011 Apr 25). Can reproduce the crash sometimes:
|
||||
gvim -N -u NONE --cmd 'set lines=99999 columns=99999'
|
||||
(gvim:25968): Gdk-WARNING **: Native Windows wider or taller than 65535 pixels are not supported
|
||||
The program 'gvim' received an X Window System error.
|
||||
This probably reflects a bug in the program.
|
||||
The error was 'RenderBadPicture (invalid Picture parameter)'.
|
||||
(Details: serial 313 error_code 161 request_code 149 minor_code 8)
|
||||
(Note to programmers: normally, X errors are reported asynchronously;
|
||||
that is, you will receive the error a while after causing it.
|
||||
To debug your program, run it with the --sync command line
|
||||
option to change this behavior. You can then get a meaningful
|
||||
backtrace from your debugger if you break on the gdk_x_error() function.)
|
||||
Check that number of pixels doesn't go above 65535?
|
||||
|
||||
popup completion menu closes quickly when there is a fold in the buffer. (Jan
|
||||
Christoph Ebersbach, 2011 Jul 3)
|
||||
|
||||
Windows keys not set properly on Windows 7? (cncyber, 2010 Aug 26)
|
||||
|
||||
This line hangs Vim, because of syntax HL:
|
||||
call append(line, "INFO ....12....18....24....30....36....42....48....54....60....66....72....78%$")
|
||||
|
||||
Patch to add v:windowid. (Christian J. Robinson, 2010 Oct 13, update by Lech
|
||||
Lorens, Oct 14)
|
||||
|
||||
maparg() doesn't return the flags, such as <buffer>, <script>, <silent>.
|
||||
These are needed to save and restore a mapping.
|
||||
Also: the rhs string is not always correct. (Hari Krishna Dara, 2009 Sept 29)
|
||||
Patch by Christian Brabandt, 2010 Sep 17.
|
||||
|
||||
Building the MingW version without clipboard but with multi-byte doesn't
|
||||
build. (Bill Lam, 2010 Sep 18)
|
||||
When using a Vim server, a # in the path causes an error message.
|
||||
(Jeff Lanzarotta, 2011 Feb 17)
|
||||
|
||||
Bug: E685 error for func_unref(). (ZyX, 2010 Aug 5)
|
||||
|
||||
Bug: Windows 7 64 bit system freezes when 'clipboard' set to "unnamed" and
|
||||
doing ":g/test/d". Putting every delete on the clipboard? (Robert Chan, 2011
|
||||
Jun 17)
|
||||
|
||||
Using ":break" or something else that stops executing commands inside a
|
||||
":finally" does not rethrow a previously uncaught exception. (ZyX, 2010 Oct
|
||||
15)
|
||||
|
||||
Patch to fix warning for accessing mediumVersion. (Dominique Pelle, 2010 Aug
|
||||
18)
|
||||
Vim using lots of memory when joining lines. (John Little, 2010 Dec 3)
|
||||
|
||||
Patch for 2html to support 'fileencoding'. (Benjamin Fritz, 2010 Sep 10)
|
||||
Changes to manpage plugin. (Elias Toivanen, 2011 Jul 25)
|
||||
|
||||
Patch to use 'previewheight' for popup menu. (Benjamin Haskell, 2010 Sep 29)
|
||||
|
||||
Three patches for undo persistence. (Christian Brabandt, 2010 Sep 4)
|
||||
|
||||
ml_get error for using :copen in a custom complete function. (Xavier
|
||||
Deguillard, 2010 Oct 19) Other way to reproduce it by Lech Lorens, Oct 20.
|
||||
On 64 bit MS-Windows "long" is only 32 bits, but we sometimes need to store a
|
||||
64 bits value. Change all number options to use nropt_T and define it to the
|
||||
right type.
|
||||
|
||||
string() can't parse back "inf" and "nan". Fix documentation or fix code?
|
||||
(ZyX, 2010 Aug 23)
|
||||
|
||||
Patch to use "--as-needed" instead of the link.sh functionality. (Kirill A.
|
||||
Shutemov, 2010 Aug 25)
|
||||
Make 'formatprg' global-local. (Sung Pae)
|
||||
|
||||
Patch to fix complete(). (Kikuchan, 2010 Oct 15)
|
||||
v:register doesn't work exactly as expected. (David Fishburn, 2011 Sep 20)
|
||||
|
||||
Ruby: Patch to load Gem module. Why is this needed? (Yasuhiro Matsumoto, 2010
|
||||
Oct 6)
|
||||
When doing "redir => s:foo" in a script and then "redir END" somewhere else
|
||||
(e.g. in a function) it can't find s:foo.
|
||||
|
||||
":command Print echo 'print'" works, but ":Print" doesn't. Builtin Print
|
||||
should be overruled. (Aaron Thoma)
|
||||
Patch by Christian Brabandt, 2010 Sep 5.
|
||||
When setqflist() uses a filename that triggers a BufReadCmd autocommand Vim
|
||||
doesn't jump to the correct line with :cfirst. (ZyX, 2011 Sep 18)
|
||||
|
||||
Comparing recursive structure loops forever. (ZyX, 2010 Aug 22, info from John
|
||||
Beckett Aug 23)
|
||||
Patch from Christian Brabandt, 2010 Oct 2
|
||||
7 Make "ga" show the digraph for a character, if it exists.
|
||||
Patch from Christian Brabandt, 2011 Aug 19.
|
||||
|
||||
":drop" does not respect 'autochdir'. (Peter Odding, 2010 Jul 24)
|
||||
Patch from Benjamin Fritz, 2010 Oct 13.
|
||||
maparg() does not show the <script> flag. When temporarily changing a
|
||||
mapping, how to restore the script ID?
|
||||
|
||||
Bug in try/catch: return with invalid compare throws error that isn't caught.
|
||||
(ZyX, 2011 Jan 26)
|
||||
|
||||
Highlighting stops working after changing it many times. Script to reproduce
|
||||
it: Pablo Contreras, 2010 Oct 12 Windows XP and 7. Font is never freed?
|
||||
|
||||
When setting a local option value from the global value, add a script ID that
|
||||
indicates this, so that ":verbose set" can give a hint. Check with options in
|
||||
the help file.
|
||||
|
||||
After patch 7.3.097 still get E15. (Yukihiro Nakadaira, 2011 Jan 18)
|
||||
Also for another example (ZyX, 2011 Jan 24)
|
||||
|
||||
Build problem with small features on Mac OS X 10.6. (Rainer, 2011 Jan 24)
|
||||
|
||||
"0g@$" puts '] on last byte of multi-byte. (ZyX, 2011 Jan 22)
|
||||
|
||||
Patch to support sorting on floating point number. (Alex Jakushev, 2010 Oct
|
||||
30)
|
||||
|
||||
Patch to addd TextDeletePost and TextYankPost events. (Philippe Vaucher, 2011
|
||||
May 24) Update May 26.
|
||||
|
||||
When a script contains "redir => s:foo" but doesn't end redirection, a
|
||||
following "redir" command gives an error for not being able to access s:foo.
|
||||
(ZyX, 2011 Mar 27)
|
||||
|
||||
Problem with "syn sync gouphere". (Gustavo Niemeyer, 2011 Jan 27)
|
||||
|
||||
Loading autoload script even when usage is inside "if 0". (Christian Brabandt,
|
||||
2010 Dec 18)
|
||||
|
||||
With a filler line in diff mode, it isn't displayed in the column with line
|
||||
number, but it is in the sign column. Doesn't look right. (ZyX 2011 Jun 5)
|
||||
Patch by Christian Brabandt, 2011 Jun 5. Introduces new problems.
|
||||
|
||||
8 Add a command to jump to the next character highlighted with "Error".
|
||||
Patch by Christian Brabandt, uses ]e [e ]t and [t. 2011 Aug 9.
|
||||
|
||||
8 Add an event like CursorHold that is triggered repeatedly, not just once
|
||||
after typing something.
|
||||
Need for CursorHold that retriggers. Use a key that doesn't do anything, or a
|
||||
function that resets did_cursorhold.
|
||||
Patch by Christian Brabandt, 2011 May 6.
|
||||
|
||||
7 Use "++--", "+++--" for different levels instead of "+---" "+----".
|
||||
Patch by Christian Brabandt, 2011 Jul 27.
|
||||
Update by Ben Fritz, with fix for TOhtml. (2011 Jul 30)
|
||||
|
||||
9 Add %F to 'errorformat': file name without spaces. Useful on Unix to
|
||||
avoid matching something up to a time 11:22:33.
|
||||
Patch by Christian Brabandt, 2011 Jul 27.
|
||||
|
||||
Patch to fix \%V item in regexp. (Christian Brabandt, 2010 Nov 8)
|
||||
Update Nov 19. James Vega: still not right. Christian: it's difficult.
|
||||
|
||||
Patch to add up to 99 match groups. (Christian Brabandt, 2010 Dec 22)
|
||||
Also add named groups: \%{name}(re) and \%{name}g
|
||||
|
||||
In the sandbox it's not allowed to do many things, but it's possible to change
|
||||
or set variables. Add a way to prevent variables from being changed in the
|
||||
sandbox? E.g.: ":protect g:restore_settings".
|
||||
|
||||
GTK: drawing a double-width combining character over single-width characters
|
||||
doesn't look right. (Dominique Pelle, 2010 Aug 8)
|
||||
|
||||
Using ":call" inside "if 0" does not see that a function returns a Dict and
|
||||
gives error for "." as string concatenation. (Yasuhiro Matsumoto, 2010 Oct 20)
|
||||
GTK: tear-off menu does not work. (Kurt Sonnenmoser, 2010 Oct 25)
|
||||
|
||||
Win32: tear-off menu does not work when menu language is German. (Markus
|
||||
Bossler, 2011 Mar 2) Fixed by 7.3.095?
|
||||
|
||||
Version of netbeans.c for use with MacVim. (Kazuki Sakamoto, 2010 Nov 18)
|
||||
|
||||
7.3.014 changed how backslash at end of line works, but still get a NUL when
|
||||
there is one backslash. (Ray Frush, 2010 Nov 18) What does the original ex
|
||||
do?
|
||||
|
||||
Searching mixed with Visual mode doesn't redraw properly. (James Vega, 2010 Nov
|
||||
22)
|
||||
|
||||
New esperanto spell file can't be processed. (Dominique Pelle, 2011 Jan 30)
|
||||
- move compflags to separate growarray?
|
||||
- instead of a regexp use a hashtable. Expand '?', '*", '+'. What would be
|
||||
the maximum repeat for * and +?
|
||||
|
||||
"L'Italie" noted as a spell error at start of the sentence. (Dominique Pelle,
|
||||
2011 Feb 27)
|
||||
|
||||
Copy/paste between Vim and Google chrome doesn't work well for multi-byte
|
||||
characters. (Ben Haskell, 2010 Sep 17)
|
||||
@@ -115,6 +278,19 @@ clear why it doesn't work.
|
||||
Editing a file with a ^M with 'ff' set to "mac", opening a help file, then the
|
||||
^M is displayed as ^J sometimes. Getting 'ff' value from wrong window/buffer?
|
||||
|
||||
When Vim is put in the background (SIGTSTP) and then gets a SIGHUP it doesn't
|
||||
exit. It exists as soon as back in the foreground. (Stephen Liang, 2011 Jan
|
||||
9) Caused by vim_handle_signal(SIGNAL_BLOCK); in ui.c.
|
||||
|
||||
g` not working correctly when using :edit. It works OK when editing a file on
|
||||
the command line. (Ingo Karkat, 2011 Jan 25)
|
||||
|
||||
Since patch 7.2.46 Yankring plugin has become very slow, eventually make Vim
|
||||
crash? (Raiwil, 2010 Nov 17)
|
||||
|
||||
Python: Adding line to buffer other than the current one doesn't work
|
||||
correctly. (Rozbujnik, 2010 Dec 19)
|
||||
|
||||
Patch to add 'systemencoding', convert between 'encoding' and this for file
|
||||
names, shell commands and the like. (Kikuchan, 2010 Oct 14)
|
||||
Assume the system converts between the actual encoding of the filesystem to
|
||||
@@ -123,18 +299,30 @@ the system encoding (usually utf-8).
|
||||
Problem producing tags file when hebrew.frx is present. It has a BOM.
|
||||
Results in E670. (Tony Mechelynck, 2010 May 2)
|
||||
|
||||
Patch for dynamic loading Ruby on Unix. (Jon, 2010 Aug 23)
|
||||
Included, but also need a change to configure.
|
||||
Ruby: ":ruby print $buffer.number" returns zero.
|
||||
|
||||
setpos() does not restore cursor position after :normal. (Tyru, 2010 Aug 11)
|
||||
|
||||
7 The 'directory' option supports changing path separators to "%" to make
|
||||
file names unique, also support this for 'backupdir'. (Mikolaj Machowski)
|
||||
Patch by Christian Brabandt, 2010 Oct 21.
|
||||
|
||||
getpos()/setpos() don't include curswant. getpos() could return a fifth
|
||||
element. setpos() could accept an optional fifth element.
|
||||
Patch by Christian Brabandt, 2010 Sep 6. Check that new argument is optional
|
||||
and that it's documented.
|
||||
|
||||
With "tw=55 fo+=a" typing space before ) doesn't work well. (Scott Mcdermott,
|
||||
2010 Oct 24)
|
||||
|
||||
Patch to add random number generator. (Hong Xu, 2010 Nov 8, update Nov 10)
|
||||
Alternative from Christian Brabandt. (2010 Sep 19)
|
||||
|
||||
Messages in message.txt are highlighted as examples.
|
||||
|
||||
When using cp850 the NBSP (0xff) is not drawn correctly. (Brett Stahlman, 2010
|
||||
Oct 22) 'isprint' is set to "@,161-255".
|
||||
|
||||
Test 73 fails on MS-Windows when compiled with DJGPP and run twice. How to
|
||||
delete the Xfind directory? Add an rmdir() function, just like we have
|
||||
mkdir().
|
||||
@@ -143,11 +331,14 @@ mkdir().
|
||||
|
||||
'cindent' not correct when 'list' is set. (Zdravi Korusef, 2010 Apr 15)
|
||||
|
||||
Windows installer: licence text should not use indent, causes bad word wrap.
|
||||
(Benjamin Fritz, 2010 Aug 16)
|
||||
When 'paste' is changed with 'pastetoggle', the ruler doesn't reflect this
|
||||
right away. (Samuel Ferencik, 2010 Dec 7)
|
||||
|
||||
Mac with X11: clipboard doesn't work properly. (Raf, 2010 Aug 16)
|
||||
|
||||
Using CompilerSet doesn't record where an option was set from. E.g., in the
|
||||
gcc compiler plugin. (Gary Johnson, 2010 Dec 13)
|
||||
|
||||
":helpgrep" does not put the cursor in the correct column when preceded by
|
||||
accented character. (Tony Mechelynck, 2010 Apr 15)
|
||||
|
||||
@@ -158,25 +349,40 @@ Echo starts in the wrong column:
|
||||
while 1 | let s = input('A') | echo 'R' | endw
|
||||
(Boyko Bantchev, 2010 Aug 9)
|
||||
|
||||
Patch: Let rare word highlighting overrule good word highlighting.
|
||||
(Jakson A. Aquino, 2010 Jul 30)
|
||||
Patch for GVimExt to show an icon. (Dominik Riebeling, 2010 Nov 7)
|
||||
|
||||
Patch to make more characters work in dialogs. (Yankwei Jia, 2010 Aug 4)
|
||||
When writing a file > 2Gbyte, the reported number of bytes is negative.
|
||||
(Antonio Colombo, 2010 Dec 18)
|
||||
|
||||
Patch: Let rare word highlighting overrule good word highlighting.
|
||||
(Jakson A. Aquino, 2010 Jul 30, again 2011 Jul 2)
|
||||
|
||||
When 'lines' is 25 and 'scrolloff' is 12, "j" scrolls zero or two lines
|
||||
instead of one. (Constantin Pan, 2010 Sep 10)
|
||||
|
||||
Crash in setqflist(). (Benoit Mortgat, 2010 Nov 18)
|
||||
|
||||
Gui menu edit/paste in block mode insert only inserts in one line (Bjorn
|
||||
Winckler, 2011 May 11)
|
||||
Requires a map mode for Insert mode started from blockwise Visual mode.
|
||||
|
||||
Writing nested List and Dict in viminfo gives error message and can't be read
|
||||
back. (Yukihiro Nakadaira, 2010 Nov 13)
|
||||
|
||||
Can 'undolevels' be a buffer-local option? Helps for making big changes in
|
||||
one file only, set 'ul' to -1 only for that buffer.
|
||||
Patch by Christian Brabandt, 2010 Dec 17. Needs test.
|
||||
|
||||
Problem with cursor in the wrong column. (SungHyun Nam, 2010 Mar 11)
|
||||
Additional info by Dominique Pelle. (also on 2010 Apr 10)
|
||||
|
||||
CreateFile and CreateFileW are used without sharing, filewritable() fails when
|
||||
the file was already open (e.g. script is being sourced). Add FILE_SHARE_READ|
|
||||
FILE_SHARE_WRITE in mch_access()? (Phillippe Vaucher, 2010 Nov 2)
|
||||
|
||||
Is ~/bin (literally) in $PATH supposed to work? (Paul, 2010 March 29)
|
||||
Looks like only bash can do it. (Yakov Lerner)
|
||||
|
||||
8 Add an event like CursorHold that is triggered repeatedly, not just once
|
||||
after typing something.
|
||||
Need for CursorHold that retriggers. Use a key that doesn't do anything, or a
|
||||
function that resets did_cursorhold.
|
||||
|
||||
Cscope "cs add" stopped working somewhat before 7.2.438. (Gary Johnson, 2010
|
||||
Jun 29) Caused by 7.2.433?
|
||||
|
||||
@@ -201,7 +407,8 @@ Shell not recognized properly if it ends in "csh -f". (James Vega, 2009 Nov 3)
|
||||
Find tail? Might have a / in argument. Find space? Might have space in
|
||||
path.
|
||||
|
||||
":sort n" treats empty line as higher than zero. (Beeyawned, 2010 Oct 13)
|
||||
Test 51 fails when language set to German. (Marco, 2011 Jan 9)
|
||||
Dominique can't reproduc it.
|
||||
|
||||
":function f(x) keepjumps" creates a function where every command is executed
|
||||
like it has ":keepjumps" before it.
|
||||
@@ -209,6 +416,12 @@ like it has ":keepjumps" before it.
|
||||
Coverity: ask someone to create new user: Dominique.
|
||||
Check if there are new reported defects: http://scan.coverity.com/rung2.html
|
||||
|
||||
Patch to support :undo absolute jump to file save number. (Christian Brabandt,
|
||||
2010 Nov 5)
|
||||
|
||||
Patch to use 'foldnextmax' also for "marker" foldmethod. (Arnaud Lacombe, 2011
|
||||
Jan 7)
|
||||
|
||||
When setting 'undofile' while the file is already loaded, but unchanged, try
|
||||
to read the undo file. Requires computing a checksum of the text. (Andy
|
||||
Wokula)
|
||||
@@ -218,28 +431,35 @@ Only with "vim -u NONE".
|
||||
|
||||
Problem with editing file in binary mode. (Ingo Krabbe, 2009 Oct 8)
|
||||
|
||||
With 'wildmode' set to "longest:full,full" and pressing Tab once the first
|
||||
entry in wildmenu is highlighted, that shouldn't happen. (Yuki Watanabe, 2011
|
||||
Feb 12)
|
||||
|
||||
Display error when 'tabline' that includes a file name with double-width
|
||||
characters. (2010 Aug 14, bootleq)
|
||||
|
||||
Problem with stop directory in findfile(). (Adam Simpkins, 2009 Aug 26)
|
||||
|
||||
Using ']' as the end of a range in a pattern requires double escaping:
|
||||
/[@-\\]] (Andy Wokula, 2011 Jun 28)
|
||||
|
||||
Undo problem: line not removed as expected when using setline() from Insert
|
||||
mode. (Israel Chauca, 2010 May 13, more in second msg)
|
||||
Break undo when CTRL-R = changes the text? Or save more lines?
|
||||
|
||||
Change to C syntax folding to make it work much faster, but a bit less
|
||||
reliable. (Lech Lorens, 2009 Nov 9) Enable with an option?
|
||||
Most time is spent in in_id_list().
|
||||
|
||||
Slow combination of folding and PHP syntax highlighting. Script to reproduce
|
||||
it. Caused by "syntax sync fromstart" in combination with patch 7.2.274.
|
||||
(Christian Brabandt, 2010 May 27)
|
||||
Generally, folding with 'foldmethod' set to "syntax" is slow. Do profiling to
|
||||
find out why.
|
||||
|
||||
Syntax priority problem. (Charles Campbell, 2011 Sep 15)
|
||||
|
||||
When completion inserts the first match, it may trigger the line to be folded.
|
||||
Disable updating folds while completion is active? (Peter Odding, 2010 Jun 9)
|
||||
|
||||
In command line window ":close" doesn't work properly. (Tony Mechelynck, 2009
|
||||
Jun 1)
|
||||
Using ":call foo#d.f()" doesn't autoload the "foo.vim" file. Works OK for
|
||||
echo, just not for ":call" and ":call call()". (Ted, 2011 Mar 17)
|
||||
|
||||
Cannot use getchar() inside :normal and using an expression mapping. Is this
|
||||
supposed to work? (XyX, 2010 Sep 22)
|
||||
@@ -258,6 +478,9 @@ Invalid read error in Farsi mode. (Dominique Pelle, 2009 Aug 2)
|
||||
For running gvim on an USB stick: avoid the OLE registration. Use a command
|
||||
line argument -noregister.
|
||||
|
||||
When using an expression in 'statusline' leading white space sometimes goes
|
||||
missing (but not always). (ZyX, 2010 Nov 1)
|
||||
|
||||
When a mapping exists both for insert mode and lang-insert mode, the last one
|
||||
doesn't work. (Tyru, 2010 May 6) Or is this intended?
|
||||
|
||||
@@ -396,21 +619,23 @@ very high. (Yegappan Lakshmanan, 2010 Jul 22, Michael Peeters, 2010 Jul 22)
|
||||
Directory wrong in session file, caused by ":lcd" in BufEnter autocommand.
|
||||
(Felix Kater, 2009 Mar 3)
|
||||
|
||||
Session file generates error upon loading, cause bu --remote-silent-tab.
|
||||
(7tommm (ytommm) 2010 Nov 24)
|
||||
|
||||
Using ~ works OK on 'a' with composing char, but not on 0x0418 with composing
|
||||
char 0x0301. (Tony Mechelynck, 2009 Mar 4)
|
||||
|
||||
A function on a dictionary is not profiled. (Zyx, 2010 Dec 25)
|
||||
|
||||
Inconsistent: starting with $LANG set to es_ES.utf-8 gives Spanish
|
||||
messages, even though locale is not supported. But ":lang messages
|
||||
es_ES.utf-8" gives an error and doesn't switch messages. (Dominique Pelle,
|
||||
2009 Jan 26)
|
||||
|
||||
When $HOME contains special characters, sich as a comma, escape them when used
|
||||
When $HOME contains special characters, such as a comma, escape them when used
|
||||
in an option. (Michael Hordijk, 2009 May 5)
|
||||
Turn "esc" argument of expand_env_esc() into string of chars to be escaped.
|
||||
|
||||
Can 'undolevels' be a buffer-local option? Helps for making big changes in
|
||||
one file only, set 'ul' to -1 only for that buffer.
|
||||
|
||||
Should make 'ignorecase' global-local, so that it makes sense setting it from
|
||||
a modeline.
|
||||
|
||||
@@ -429,6 +654,11 @@ correct. Don't use it in the swap file.
|
||||
Completion for ":buf" doesn't work properly on Win32 when 'shellslash' is off.
|
||||
(Henrik Ohman, 2009, Jan 29)
|
||||
|
||||
shellescape() depends on 'shellshash' for quoting. That doesn't work when
|
||||
'shellslash' is set but using cmd.exe. (Ben Fritz)
|
||||
Use a different option or let it depend on whether 'shell' looks like a
|
||||
unix-like shell?
|
||||
|
||||
Allow patches to add something to version.c, like with an official patch, so
|
||||
that :version output shows which patches have been applied.
|
||||
|
||||
@@ -478,11 +708,6 @@ Having "Syntax" in 'eventignore' for :bufdo may cause problems, e.g. for
|
||||
option only for when jumping to another buffer, not when the command argument
|
||||
is executed.
|
||||
|
||||
Crash with dragn-n-drop of file combined with netrw (Marius Gedminas, 2008 Jun
|
||||
11) I can't reproduce it. It's probably caused by a handle_drop() call
|
||||
in combination with autocommands that invoke a ":redraw" command.
|
||||
Another valgrind output Jun 30.
|
||||
|
||||
":pedit %" with a BufReadPre autocommand causes the cursor to move to the
|
||||
first line. (Ingo Karkat, 2008 Jul 1) Ian Kelling is working on this.
|
||||
|
||||
@@ -512,9 +737,6 @@ Patch for c.vim and cpp.vim syntax files. (Chung-chieh Shan, 2008 Nov 26)
|
||||
c.vim: XXX in a comment is colored yellow, but not when it's after "#if 0".
|
||||
(Ilya Dogolazky, 2009 Aug 7)
|
||||
|
||||
Win32: ":dis +" shows nothing, but "+p does insert text. Problem with "* and
|
||||
"+ being the same thing?
|
||||
|
||||
You can type ":w ++bad=x fname", but the ++bad argument is ignored. Give an
|
||||
error message? Or is this easy to implement? (Nathan Stratton Treadway, 2008
|
||||
Aug 20) This is in ucs2bytes(), search for 0xBF. Using the ++bad argument is
|
||||
@@ -551,9 +773,6 @@ When mapping : to ; and ; to :, @; doesn't work like @: and @: doesn't work
|
||||
either. Matt Wozniski: nv_at() calls do_execreg() which uses
|
||||
put_in_typebuf(). Char mapped twice?
|
||||
|
||||
8 Some file systems are case-sensitive, some are not. Turn
|
||||
CASE_INSENSITIVE_FILENAME into an option, at least for completion.
|
||||
|
||||
Despite adding save_subexpr() this still doesn't work properly:
|
||||
Regexp: matchlist('12a4aaa', '^\(.\{-}\)\(\%5c\@<=a\+\)\(.\+\)\?')
|
||||
Returns ['12a4', 'aaa', '4aaa'], should be ['12a4', 'aaa', '']
|
||||
@@ -571,11 +790,6 @@ an alternate solution, also for src/ex_getln.c.
|
||||
This also fails when the file or directory name contains "%". (Thoml, 2008
|
||||
July 7)
|
||||
|
||||
The str2special() function doesn't handle multi-byte characters properly.
|
||||
Patch from Vladimir Vichniakov, 2007 Apr 24.
|
||||
Should clean up the whole function. Also allow modifiers like <S-Char-32>?
|
||||
find_special_key() also has this problem.
|
||||
|
||||
Problem with 'langmap' being used on the rhs of a mapping. (Nikolai Weibull,
|
||||
2008 May 14)
|
||||
|
||||
@@ -609,6 +823,9 @@ try the Cocoa version.
|
||||
Mac: After a ":vsplit" the left scrollbar doesn't appear until 'columns' is
|
||||
changed or the window is resized.
|
||||
|
||||
GTK: when setting 'columns' in a startup script and doing ":vertical diffsplit"
|
||||
the window isn't redrawn properly, see two vertical bars.
|
||||
|
||||
Mac: Patch for configure: remove arch from ruby link args. (Knezevic, 2008
|
||||
Mar 5) Alternative: Kazuki Sakamoto, Mar 7.
|
||||
|
||||
@@ -646,7 +863,7 @@ each choice does. Similar to ":help swap-exists-choices"
|
||||
|
||||
try/catch not working for argument of return. (Matt Wozniski, 2008 Sep 15)
|
||||
|
||||
Recognize and ignore BOM in error file. (Aleksey Baibarin)
|
||||
try/catch not working when inside a for loop. (ZyX, 2011 Jan 25)
|
||||
|
||||
":tab help" always opens a new tab, while ":help" re-uses an existing window.
|
||||
Would be more consistent when an existing tab is re-used. (Tony Mechelynck)
|
||||
@@ -689,6 +906,9 @@ Gnome improvements: Edward Catmur, 2007 Jan 7
|
||||
|
||||
New PHP syntax file, use it? (Peter Hodge)
|
||||
|
||||
":echoe" in catch block stops processing, while this doesn't happen outside of
|
||||
a catch block. (ZyX, 2011 Jun 2)
|
||||
|
||||
'foldcolumn' in modeline applied to wrong window when using a session. (Teemu
|
||||
Likonen, March 19)
|
||||
|
||||
@@ -738,9 +958,6 @@ popup menu over it, first draw the new popup menu, remember its position and
|
||||
size and then redraw the text, skipping the characters under the popup menu.
|
||||
This should avoid flicker. Other solution by A.Politz, 2007 Aug 22.
|
||||
|
||||
When the popup menu is close to the edge of the window it is truncated. Patch
|
||||
to anchor the popup menu in a different way. (James Vega, 2008 Jul 30)
|
||||
|
||||
Windows 98: pasting from the clipboard with text from another application has
|
||||
a trailing NUL. (Joachim Hofmann) Perhaps the length specified for CF_TEXT
|
||||
isn't right?
|
||||
@@ -766,6 +983,9 @@ Jun 3)
|
||||
However, for backwards compatibility escaping might be necessary. Check if
|
||||
the user put quotes around the expanded item?
|
||||
|
||||
A throw in a function causes missing an endif below the call. (Spiros
|
||||
Bousbouras, 2011 May 16)
|
||||
|
||||
Error E324 can be given when a cron script has wiped out our temp directory.
|
||||
Give a clear error message about this (and tell them not to wipe out /tmp).
|
||||
|
||||
@@ -785,6 +1005,18 @@ go to Insert mode and add a few lines. Then backspacing every other time
|
||||
moves the cursor instead of deleting. (Chris Kaiser, 2007 Sep 25)
|
||||
|
||||
Patch to use Modern UI 2.0 for the Nsis installer. (Guopeng Wen, 2010 Jul 30)
|
||||
Latest version: 2011 May 18
|
||||
8 Windows install with NSIS: make it possible to do a silent install, see
|
||||
http://nsis.sourceforge.net/Docs/Chapter4.html#4.12
|
||||
Version from Guopeng Wen that does this (2010 Dec 27)
|
||||
|
||||
Windows installer: licence text should not use indent, causes bad word wrap.
|
||||
(Benjamin Fritz, 2010 Aug 16)
|
||||
|
||||
Dos uninstal may delete vim.bat from the wrong directory (e.g., when someone
|
||||
makes his own wrapper). Add a magic string with the version number to the
|
||||
.bat file and check for it in the uninstaller. E.g.
|
||||
# uninstall key: vim7.3*
|
||||
|
||||
Changes for Win32 makefile. (Mike Williams, 2007 Jan 22, Alexei Alexandrov,
|
||||
2007 Feb 8)
|
||||
@@ -864,9 +1096,6 @@ If the variable "g:x#y#z" exists completion after ":echo g:x#" doesn't work.
|
||||
Feature request: Command to go to previous tab, like what CTRL-W p does for
|
||||
windows. (Adam George)
|
||||
|
||||
When using input() in a loop and then ":echo" the display column isn't right.
|
||||
(Benjamin Fritz, 2008 Aug 28) Patch by Ben Schmidt, 2008 Sep 2.
|
||||
|
||||
F1 - F4 in an xterm produce a different escape sequence when used with a
|
||||
modifier key. Need to catch three different sequences. Use K_ZF1, like
|
||||
K_ZHOME? (Dickey, 2007 Dec 2)
|
||||
@@ -1033,6 +1262,12 @@ Completing with 'wildmenu' and using <Up> and <Down> to move through directory
|
||||
tree stops unexpectedly when using ":cd " and entering a directory that
|
||||
doesn't contain other directories.
|
||||
|
||||
Setting 'background' resets the Normal background color:
|
||||
highlight Normal ctermbg=DarkGray
|
||||
set background=dark
|
||||
This is undesired, 'background' is supposed to tell Vim what the background
|
||||
color is, not reset it.
|
||||
|
||||
Linux distributions:
|
||||
- Suggest compiling xterm with --enable-tcap-query, so that nr of colors is
|
||||
known to Vim. 88 colors instead of 16 works better. See ":help
|
||||
@@ -1101,6 +1336,9 @@ check the result of has("patch13").
|
||||
Cursor line at bottom of window instead of halfway after saving view and
|
||||
restoring. Only with 'nowrap'. (Robert Webb, 2008 Aug 25)
|
||||
|
||||
Netrw has trouble executing autocommands only for a directory. Add <isdir>
|
||||
and <notisdir> to autocommand patterns? Also <isfile>?
|
||||
|
||||
Add command modifier that skips wildcard expansion, so that you don't need to
|
||||
put backslashes before special chars, only for white space.
|
||||
|
||||
@@ -1110,14 +1348,17 @@ resulting in highlighted "{" in that window, not in the other.
|
||||
In mswin.vim: Instead of mapping <C-V> for Insert mode in a complicated way,
|
||||
can it be done like ":imap <C-V> <MiddleMouse>" without negative side effects?
|
||||
|
||||
Completion menu disappears when using 'cursorcolumn'. (Sven-Hendrik Haase,
|
||||
2011 May 23)
|
||||
|
||||
GTK: when the Tab pages bar appears or disappears while the window is
|
||||
maximized the window is no longer maximized. Patch that has some idea but
|
||||
doesn't work from Geoffrey Antos, 2008 May 5.
|
||||
Also: the window may no longer fit on the screen, thus the command line is not
|
||||
visible.
|
||||
|
||||
GTK: when setting 'columns' in a startup script and doing ":vertical diffsplit"
|
||||
the window isn't redrawn properly, see two vertical bars.
|
||||
When right after "vim file", "M" then CTRL-W v the windows are scrolled
|
||||
differently and unexpectedly. Caused by patch 7.2.398?
|
||||
|
||||
The magic clipboard format "VimClipboard2" appears in several places. Should
|
||||
be only one.
|
||||
@@ -1180,9 +1421,6 @@ In gvim the backspace key produces a backspace character, but on Linux the
|
||||
VERASE key is Delete. Set VERASE to Backspace? (patch by Stephane Chazelas,
|
||||
2007 Oct 16)
|
||||
|
||||
When entering a C /* comment, after typing <Enter> for 70 times the indent
|
||||
disappears. (Vincent Beffara, 2008 Jul 3)
|
||||
|
||||
TermResponse autocommand isn't always triggered when using vimdiff. (Aron
|
||||
Griffis, 2007 Sep 19)
|
||||
|
||||
@@ -1215,6 +1453,11 @@ Patch to support horizontal scroll wheel in GTK. Untested. (Bjorn Winckler,
|
||||
2010 Jun 30)
|
||||
|
||||
|
||||
At next release:
|
||||
- Rename src/Makefile and create a new one like toplevel Makefile that
|
||||
creates auto/config.mk when it's not there? (Ben Schmidt, 2011 Feb 11)
|
||||
|
||||
|
||||
More patches:
|
||||
- Another patch for Javascript indenting. (Hari Kumar, 2010 Jul 11)
|
||||
Needs a few tests.
|
||||
@@ -1278,6 +1521,7 @@ Awaiting updated patches:
|
||||
- Patch for 'breakindent' option: repeat indent for wrapped line. (Vaclav
|
||||
Smilauer, 2004 Sep 13, fix Oct 31, update 2007 May 30)
|
||||
Version for latest MacVim: Tobia Conforto, 2009 Nov 23
|
||||
More recent version: https://retracile.net/wiki/VimBreakIndent
|
||||
8 Add a few more command names to the menus. Patch from Jiri Brezina
|
||||
(28 feb 2002). Will mess the translations...
|
||||
7 ATTENTION dialog choices are more logical when "Delete it' appears
|
||||
@@ -1508,8 +1752,6 @@ Win32 GUI known bugs:
|
||||
scroll?
|
||||
7 Scrollbar width doesn't change when selecting other windows appearance.
|
||||
Also background color of Toolbar and rectangle below vert. scrollbar.
|
||||
7 "!start /min cmd" should run in a minimized window, instead of using
|
||||
"/min" as the command name. (Rogall)
|
||||
6 Drawing text transparently doesn't seem to work (when drawing part cursor).
|
||||
8 CTRL key doesn't always work in combination with ALT key. It does work
|
||||
for function keys, not for alphabetic characters. Perhaps this is because
|
||||
@@ -1556,6 +1798,8 @@ Athena and Motif:
|
||||
|
||||
|
||||
Athena GUI:
|
||||
9 The first event for any button in the menu or toolbar appears to get lost.
|
||||
The second click on a menu does work.
|
||||
9 When dragging the scrollbar thumb very fast, focus is only obtained in
|
||||
the scrollbar itself. And the thumb is no longer updated when moving
|
||||
through files.
|
||||
@@ -1606,7 +1850,7 @@ GUI:
|
||||
8 When translating menus ignore the part after the Tab, the shortcut. So
|
||||
that the same menu item with a different shortcut (e.g., for the Mac) are
|
||||
still translated.
|
||||
8 Add menu separators for Amiga, RISCOS.
|
||||
8 Add menu separators for Amiga.
|
||||
8 Add way to specify the file filter for the browse dialog. At least for
|
||||
browse().
|
||||
8 Add dialog for search/replace to other GUIs? Tk has something for this,
|
||||
@@ -1851,8 +2095,6 @@ Macintosh:
|
||||
6 Python: ":py raw_input('prompt')" doesn't work. (Manu Hack)
|
||||
8 Command line completion: buffers "foo.txt" and "../b/foo.txt", completing
|
||||
":buf foo<Tab>" doesn't find the second one. (George V. Reilly)
|
||||
7 Output for ":scriptnames" and ":breaklist" should shorten the file names:
|
||||
use "~/" when possible.
|
||||
7 mb_off2cells() doesn't work correctly on the tail byte of a double-byte
|
||||
character. (Yasuhiro Matsumoto) It should return 1 when used on a tail
|
||||
byte, like for utf-8. Store second byte of double-byte in ScreenLines2[]
|
||||
@@ -1879,13 +2121,6 @@ Macintosh:
|
||||
works.
|
||||
8 A very long message in confirm() can't be quit. Make this possible with
|
||||
CTRL-C.
|
||||
7 clip_x11_own_selection() uses CurrentTime, that is not allowed. VNC X
|
||||
server has a problem with this. (Mark Waggoner) Remembering the timestamp
|
||||
of events isn't always possible. We don't get them in an xterm. GTK
|
||||
doesn't obtain the selection again when the timestamp differs, thus it
|
||||
won't work for GTK anyway.
|
||||
8 When the clipboard isn't supported: ":yank*" gives a confusing error
|
||||
message. Specifically mention that the register name is invalid.
|
||||
8 "gf" always excludes trailing punctuation characters. file_name_in_line()
|
||||
is currently fixed to use ".,:;!". Add an option to make this
|
||||
configurable?
|
||||
@@ -1899,8 +2134,6 @@ Macintosh:
|
||||
is a multi-byte character.
|
||||
8 When appending to a file and 'patchmode' isn't empty, a backup file is
|
||||
always written, even when the original file already exists.
|
||||
7 When using "daw" on the last word in a file and this is a single letter,
|
||||
nothing is deleted. Should delete the letter and preceding white space.
|
||||
9 When getting focus while writing a large file, could warn for this file
|
||||
being changed outside of Vim. Avoid checking this while the file is being
|
||||
written.
|
||||
@@ -2150,6 +2383,9 @@ Problems that will (probably) not be solved:
|
||||
- Win32, MS-Windows XP: $HOME uses the wrong drive when the user profiles
|
||||
are not on the boot disk. This is caused by a wrong value of $HOMEDRIVE.
|
||||
This is a bug in XP, see MSKB article 818134.
|
||||
- Win32, MS-Windows: expanding plugin/**/*.vim also picks up
|
||||
dir/ctags.vim,v. This is because the short file name is something like
|
||||
"ctags~1.vim" and that matches the pattern.
|
||||
- SunOS 5.5.1 with Motif: The file open dialog does not have a horizontal
|
||||
scroll bar for the "files" selection. This is a problem in the Motif
|
||||
libraries, get a patch from Sun.
|
||||
@@ -2275,8 +2511,6 @@ Help:
|
||||
|
||||
|
||||
User Friendlier:
|
||||
8 Windows install with NSIS: make it possible to do a silent install, see
|
||||
http://nsis.sourceforge.net/Docs/Chapter4.html#4.12
|
||||
8 Windows install with install.exe: Use .exe instead of .bat files for
|
||||
links, so that command line arguments are passed on unmodified? (Walter
|
||||
Briscoe)
|
||||
@@ -2446,7 +2680,6 @@ Folding:
|
||||
8 Add "z/" and "z?" for searching in not folded text only.
|
||||
9 Add search pattern item to only match in closed or open fold and/or fold
|
||||
with certain level. Allows doing ":g/pat/cmd" to work on closed folds.
|
||||
7 Use "++--", "+++--" for different levels instead of "+---" "+----".
|
||||
8 When a closed fold is displayed open because of 'foldminlines', the
|
||||
behavior of commands is still like the fold is closed. How to make the
|
||||
user aware of this?
|
||||
@@ -2550,7 +2783,7 @@ Multi-byte characters:
|
||||
For Windows, the charset_pairs[] table could be used. But how do we know
|
||||
if a font exists?
|
||||
- Do keyboard conversion from 'termencoding' to 'encoding' with
|
||||
convert_input() for Mac GUI and RiscOS GUI.
|
||||
convert_input() for Mac GUI.
|
||||
- Add mnemonics from RFC1345 longer than two characters.
|
||||
Support CTRL-K _{mnemonic}_
|
||||
7 In "-- INSERT (lang) --" show the name of the keymap used instead of
|
||||
@@ -2626,7 +2859,6 @@ Syntax highlighting:
|
||||
8 Highlight the text between two matching parens (e.g., with a grey
|
||||
background) when on one of the parens or in between them.
|
||||
Option for the matchparen plugin?
|
||||
8 Add a command to jump to the next character highlighted with "Error".
|
||||
8 When using a cterm, and no ctermfg or ctermbg are defined, use start/stop
|
||||
sequences. Add remark in docs that :if 'term' == "term-name" should be
|
||||
used.
|
||||
@@ -2813,6 +3045,10 @@ Built-in script language:
|
||||
Patch by Ilya Sher, 2004 Mar 4.
|
||||
Return a list instead.
|
||||
char2hex() convert char string to hex string.
|
||||
crypt() encrypt string
|
||||
decrypt() decrypt string
|
||||
base64enc() base 64 encoding
|
||||
base64dec() base 64 decoding
|
||||
attributes() return file protection flags "drwxrwxrwx"
|
||||
filecopy(from, to) Copy a file
|
||||
shorten(fname) shorten a file name, like home_replace()
|
||||
@@ -3194,7 +3430,7 @@ Win32 GUI:
|
||||
|
||||
|
||||
GUI:
|
||||
8 Make inputdialog() work for Photon, Amiga, RiscOS.
|
||||
8 Make inputdialog() work for Photon, Amiga.
|
||||
- <C--> cannot be mapped. Should be possible to recognize this as a
|
||||
normal "-" with the Ctrl modifier.
|
||||
7 Implement ":popup" for other systems than Windows.
|
||||
@@ -3273,6 +3509,8 @@ GUI:
|
||||
|
||||
|
||||
Autocommands:
|
||||
9 Rework the code from FEAT_OSFILETYPE for autocmd-osfiletypes to use
|
||||
'filetype'. Only for when the current buffer is known.
|
||||
- Put autocommand event names in a hashtable for faster lookup?
|
||||
8 When the SwapExists event is triggered, provide information about the
|
||||
swap file, e.g., whether the process is running, file was modified, etc.
|
||||
@@ -3305,9 +3543,9 @@ Autocommands:
|
||||
handled (e.g., other font) (Ron Aaron)
|
||||
7 When trying to open a directory, trigger an OpenDirectory event.
|
||||
7 Add file type in front of file pattern: <d> for directory, <l> for link,
|
||||
<x> for executable, etc. <&xxx> for Risc OS. With commas to separate
|
||||
alternatives. The autocommand is only executed when both the file type
|
||||
AND the file pattern match. (Leonard)
|
||||
<x> for executable, etc. With commas to separate alternatives. The
|
||||
autocommand is only executed when both the file type AND the file pattern
|
||||
match. (Leonard)
|
||||
5 Add option that specifies extensions which are to be discarded from the
|
||||
file name. E.g. 'ausuffix', with ".gz,.orig". Such that file.c.gz will
|
||||
trigger the "*.c" autocommands. (Belabas)
|
||||
@@ -3335,10 +3573,6 @@ Autocommands:
|
||||
- Before/after ":cd" has been used (for changing the
|
||||
window title)
|
||||
ShutDown - when the system is about to shut down
|
||||
InsertCharPre - user typed character Insert mode, before inserting the
|
||||
char. Pattern is matched with text before the cursor.
|
||||
Set v:char to the character, can be changed.
|
||||
(not triggered when 'paste' is set).
|
||||
InsertCharPost - user typed a character in Insert mode, after inserting
|
||||
the char.
|
||||
BufModified - When a buffer becomes modified, or unmodified (for
|
||||
@@ -3549,6 +3783,7 @@ Insert mode:
|
||||
7 Use CTRL-G <count> to repeat what follows. Useful for inserting a
|
||||
character multiple times or repeating CTRL-Y.
|
||||
- Make 'revins' work in Replace mode.
|
||||
9 Can't use multi-byte characters for 'matchpairs'.
|
||||
7 Use 'matchpairs' for 'showmatch': When inserting a character check if it
|
||||
appears in the rhs of 'matchpairs'.
|
||||
- In Insert mode (and command line editing?): Allow undo of the last typed
|
||||
@@ -3568,12 +3803,10 @@ Insert mode:
|
||||
|
||||
|
||||
'cindent', 'smartindent':
|
||||
9 ") :" confuses continuation line: (Colin Bennett, 2007 Dec 14)
|
||||
cout << "a"
|
||||
<< ") :"
|
||||
<< "y";
|
||||
9 "} else" causes following lines to be indented too much. (Rouben
|
||||
Rostamian, 2008 Aug 30)
|
||||
9 Wrapping a variable initialization should have extra indent:
|
||||
char * veryLongName =
|
||||
"very long string"
|
||||
Also check if "cino=+10" is used correctly.
|
||||
8 Lisp indenting: "\\" confuses the indenter. (Dorai Sitaram, 2006 May 17)
|
||||
8 Why are continuation lines outside of a {} block not indented? E.g.:
|
||||
long_type foo =
|
||||
@@ -3879,6 +4112,8 @@ Searching:
|
||||
Use "&/" for searching the text in the Visual area?
|
||||
9 Add "v" offset: "/pat/v": search for pattern and start Visual mode on the
|
||||
matching text.
|
||||
8 Add a modifier to interpret a space like "\_s\+" to make it much easier to
|
||||
search for a phrase.
|
||||
8 Add a mechanism for recursiveness: "\@(([^()]*\@g[^()]*)\)". \@g stands
|
||||
for "go recursive here" and \@( \) marks the recursive part.
|
||||
Perl does it this way:
|
||||
@@ -4075,6 +4310,9 @@ Buffer list:
|
||||
should then mean the number of the last buffer. E.g.: "4,$bdel".
|
||||
7 Add an option to mostly use slashes in file names. Separately for
|
||||
internal use and for when executing an external program?
|
||||
8 Some file systems are case-sensitive, some are not. Besides
|
||||
'wildignorecase' there might be more parts inside
|
||||
CASE_INSENSITIVE_FILENAME that are useful on Unix.
|
||||
|
||||
|
||||
Swap (.swp) files:
|
||||
@@ -4257,10 +4495,8 @@ Marks:
|
||||
|
||||
|
||||
Digraphs:
|
||||
7 Make "ga" show the digraph for a character, if it exists.
|
||||
Also the keymap?
|
||||
- Make it possible to enter "r<C-E>" and "r<C-Y>" (get character from line
|
||||
below/above).
|
||||
7 Make "ga" show the keymap for a character, if it exists.
|
||||
Also show the code of the character after conversion to 'filenecoding'.
|
||||
- Use digraph table to tell Vim about the collating sequence of special
|
||||
characters?
|
||||
8 Add command to remove one or more (all) digraphs. (Brown)
|
||||
@@ -4278,8 +4514,6 @@ Writing files:
|
||||
8 'backupskip' doesn't write a backup file at all, a bit dangerous for some
|
||||
applications. Add 'backupelsewhere' to write a backup file in another
|
||||
directory? Or add a flag to 'backupdir'?
|
||||
7 The 'directory' option supports changing path separators to "%" to make
|
||||
file names unique, also support this for 'backupdir'. (Mikolaj Machowski)
|
||||
6 Add an option to write a new, numbered, backup file each time. Like
|
||||
'patchmode', e.g., 'backupmode'.
|
||||
6 Make it possible to write 'patchmode' files to a different directory.
|
||||
@@ -4378,8 +4612,8 @@ Debug mode:
|
||||
|
||||
|
||||
Various improvements:
|
||||
8 ":sign unplace * file={filename}" should work. Also: ":sign unplace *
|
||||
buffer={bufnr}". So one can remove all signs for one file/buffer.
|
||||
9 Python: be able to define a Python function that can be called directly
|
||||
from Vim script. Requires converting the arguments and return value.
|
||||
7 Add plugins for formatting? Should be able to make a choice depending on
|
||||
the language of a file (English/Korean/Japanese/etc.).
|
||||
Setting the 'langformat' option to "chinese" would load the
|
||||
@@ -4473,6 +4707,8 @@ Various improvements:
|
||||
3 Make "2d%" work like "d%d%" instead of "d2%"?
|
||||
7 "g CTRL-O" jumps back to last used buffer. Skip CTRL-O jumps in the same
|
||||
buffer. Make jumplist remember the last ten accessed buffers?
|
||||
7 Make it possible to set the size of the jumplist (also to a smaller number
|
||||
than the default). (Nikolai Weibull)
|
||||
- Add code to disable the CAPS key when going from Insert to Normal mode.
|
||||
- Set date/protection/etc. of the patchfile the same as the original file.
|
||||
- Use growarray for termcodes[] in term.c
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*undo.txt* For Vim version 7.3. Last change: 2010 Sep 30
|
||||
*undo.txt* For Vim version 7.3. Last change: 2011 Aug 02
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -35,8 +35,10 @@ CTRL-R Redo [count] changes which were undone. {Vi: redraw
|
||||
:red[o] Redo one change which was undone. {Vi: no redo}
|
||||
|
||||
*U*
|
||||
U Undo all latest changes on one line. {Vi: while not
|
||||
moved off of it}
|
||||
U Undo all latest changes on one line, the line where
|
||||
the latest change was made. |U| itself also counts as
|
||||
a change, and thus |U| undoes a previous |U|.
|
||||
{Vi: while not moved off of the last modified line}
|
||||
|
||||
The last changes are remembered. You can use the undo and redo commands above
|
||||
to revert the text to how it was before each change. You can also apply the
|
||||
@@ -125,16 +127,23 @@ This is explained in the user manual: |usr_32.txt|.
|
||||
|
||||
*:undol* *:undolist*
|
||||
:undol[ist] List the leafs in the tree of changes. Example:
|
||||
number changes time saved ~
|
||||
4 10 10:34:11
|
||||
18 4 11:01:46 7
|
||||
number changes when saved ~
|
||||
88 88 2010/01/04 14:25:53
|
||||
108 107 08/07 12:47:51
|
||||
136 46 13:33:01 7
|
||||
166 164 3 seconds ago
|
||||
|
||||
The "number" column is the change number. This number
|
||||
continuously increases and can be used to identify a
|
||||
specific undo-able change, see |:undo|.
|
||||
The "changes" column is the number of changes to this
|
||||
leaf from the root of the tree.
|
||||
The "time" column is the time this change was made.
|
||||
The "when" column is the date and time when this
|
||||
change was made. The four possible formats are:
|
||||
N seconds ago
|
||||
HH:MM:SS hour, minute, seconds
|
||||
MM/DD HH:MM:SS idem, with month and day
|
||||
YYYY/MM/DD HH:MM:SS idem, with year
|
||||
The "saved" column specifies, if this change was
|
||||
written to disk and which file write it was. This can
|
||||
be used with the |:later| and |:earlier| commands.
|
||||
@@ -239,7 +248,9 @@ Vim saves undo trees in a separate undo file, one for each edited file, using
|
||||
a simple scheme that maps filesystem paths directly to undo files. Vim will
|
||||
detect if an undo file is no longer synchronized with the file it was written
|
||||
for (with a hash of the file contents) and ignore it when the file was changed
|
||||
after the undo file was written, to prevent corruption.
|
||||
after the undo file was written, to prevent corruption. An undo file is also
|
||||
ignored if its owner differs from the owner of the edited file. Set 'verbose'
|
||||
to get a message about that.
|
||||
|
||||
Undo files are normally saved in the same directory as the file. This can be
|
||||
changed with the 'undodir' option.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*usr_01.txt* For Vim version 7.3. Last change: 2008 May 07
|
||||
*usr_01.txt* For Vim version 7.3. Last change: 2010 Nov 03
|
||||
|
||||
VIM USER MANUAL - by Bram Moolenaar
|
||||
|
||||
@@ -40,13 +40,20 @@ the commands and options used for it. Use these two commands:
|
||||
Press CTRL-] to jump to a subject under the cursor.
|
||||
Press CTRL-O to jump back (repeat to go further back).
|
||||
|
||||
Many links are in vertical bars, like this: |bars|. An option name, like
|
||||
'number', a command in double quotes like ":write" and any other word can also
|
||||
be used as a link. Try it out: Move the cursor to CTRL-] and press CTRL-]
|
||||
on it.
|
||||
Many links are in vertical bars, like this: |bars|. The bars themselves may
|
||||
be hidden or invisible, see below. An option name, like 'number', a command
|
||||
in double quotes like ":write" and any other word can also be used as a link.
|
||||
Try it out: Move the cursor to CTRL-] and press CTRL-] on it.
|
||||
|
||||
Other subjects can be found with the ":help" command, see |help.txt|.
|
||||
|
||||
The bars and stars are usually hidden with the |conceal| feature. They also
|
||||
use |hl-Ignore|, using the same color for the text as the background. You can
|
||||
make them visible with: >
|
||||
:set conceallevel=0
|
||||
:hi link HelpBar Normal
|
||||
:hi link HelpStar Normal
|
||||
|
||||
==============================================================================
|
||||
*01.2* Vim installed
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*usr_41.txt* For Vim version 7.3. Last change: 2010 Jul 20
|
||||
*usr_41.txt* For Vim version 7.3. Last change: 2011 Jun 19
|
||||
|
||||
VIM USER MANUAL - by Bram Moolenaar
|
||||
|
||||
@@ -313,7 +313,7 @@ The usual precedence is used. Example: >
|
||||
:echo 10 + 5 * 2
|
||||
< 20 ~
|
||||
|
||||
Grouping is done with braces. No surprises here. Example: >
|
||||
Grouping is done with parentheses. No surprises here. Example: >
|
||||
|
||||
:echo (10 + 5) * 2
|
||||
< 30 ~
|
||||
@@ -537,7 +537,7 @@ way. A few examples will be given in this section. You can find the whole
|
||||
list here: |functions|.
|
||||
|
||||
A function is called with the ":call" command. The parameters are passed in
|
||||
between braces, separated by commas. Example: >
|
||||
between parentheses separated by commas. Example: >
|
||||
|
||||
:call search("Date: ", "W")
|
||||
|
||||
@@ -597,7 +597,7 @@ String manipulation: *string-functions*
|
||||
strridx() last index of a short string in a long string
|
||||
strlen() length of a string
|
||||
substitute() substitute a pattern match with a string
|
||||
submatch() get a specific match in a ":substitute"
|
||||
submatch() get a specific match in ":s" and substitute()
|
||||
strpart() get part of a string
|
||||
expand() expand special keywords
|
||||
iconv() convert text from one encoding to another
|
||||
@@ -661,7 +661,14 @@ Floating point computation: *float-functions*
|
||||
sqrt() square root
|
||||
sin() sine
|
||||
cos() cosine
|
||||
tan() tangent
|
||||
asin() arc sine
|
||||
acos() arc cosine
|
||||
atan() arc tangent
|
||||
atan2() arc tangent
|
||||
sinh() hyperbolic sine
|
||||
cosh() hyperbolic cosine
|
||||
tanh() hyperbolic tangent
|
||||
|
||||
Variables: *var-functions*
|
||||
type() type of a variable
|
||||
@@ -793,6 +800,8 @@ Syntax and highlighting: *syntax-functions* *highlighting-functions*
|
||||
synID() get syntax ID at a specific position
|
||||
synIDattr() get a specific attribute of a syntax ID
|
||||
synIDtrans() get translated syntax ID
|
||||
synstack() get list of syntax IDs at a specific position
|
||||
synconcealed() get info about concealing
|
||||
diff_hlID() get highlight ID for diff mode at a position
|
||||
matchadd() define a pattern to highlight (a "match")
|
||||
matcharg() get info about |:match| arguments
|
||||
@@ -1015,7 +1024,7 @@ so on. The variable "a:0" contains the number of extra arguments.
|
||||
|
||||
:function Show(start, ...)
|
||||
: echohl Title
|
||||
: echo "Show is " . a:start
|
||||
: echo "start is " . a:start
|
||||
: echohl None
|
||||
: let index = 1
|
||||
: while index <= a:0
|
||||
@@ -1283,7 +1292,7 @@ local variable will then refer to that Dictionary.
|
||||
|
||||
split(a:line)
|
||||
|
||||
The split() function takes a string, chops it into white separated words
|
||||
The split() function takes a string, chops it into whitespace separated words
|
||||
and returns a list with these words. Thus in the example it returns: >
|
||||
|
||||
:echo split('three two five one')
|
||||
@@ -1400,7 +1409,7 @@ Let's start with an example: >
|
||||
|
||||
The ":read" command will fail if the file does not exist. Instead of
|
||||
generating an error message, this code catches the error and gives the user a
|
||||
nice message instead.
|
||||
nice message.
|
||||
|
||||
For the commands in between ":try" and ":endtry" errors are turned into
|
||||
exceptions. An exception is a string. In the case of an error the string
|
||||
@@ -1477,7 +1486,7 @@ escaped by a "\" (backslash) as in the following example: >
|
||||
|
||||
:set tags=my\ nice\ file
|
||||
|
||||
The same example written as >
|
||||
The same example written as: >
|
||||
|
||||
:set tags=my nice file
|
||||
|
||||
@@ -2095,7 +2104,7 @@ and that is not what a filetype plugin should do.
|
||||
When an option has a value that is a list of flags or items, consider using
|
||||
"+=" and "-=" to keep the existing value. Be aware that the user may have
|
||||
changed an option value already. First resetting to the default value and
|
||||
then changing it often a good idea. Example: >
|
||||
then changing it is often a good idea. Example: >
|
||||
|
||||
:setlocal formatoptions& formatoptions+=ro
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*various.txt* For Vim version 7.3. Last change: 2010 Sep 23
|
||||
*various.txt* For Vim version 7.3. Last change: 2011 May 19
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -101,13 +101,14 @@ g8 Print the hex values of the bytes used in the
|
||||
:[range]P[rint] [count] [flags]
|
||||
Just as ":print". Was apparently added to Vi for
|
||||
people that keep the shift key pressed too long...
|
||||
Note: A user command can overrule this command.
|
||||
See |ex-flags| for [flags].
|
||||
|
||||
*:l* *:list*
|
||||
:[range]l[ist] [count] [flags]
|
||||
Same as :print, but display unprintable characters
|
||||
with '^' and put $ after the line. This can be
|
||||
changed with the 'listchars' option.
|
||||
further changed with the 'listchars' option.
|
||||
See |ex-flags| for [flags].
|
||||
|
||||
*:nu* *:number*
|
||||
@@ -132,14 +133,14 @@ g8 Print the hex values of the bytes used in the
|
||||
specified with {range}, or around the current line
|
||||
if there is no {range}. If there is a {count}, that's
|
||||
how many lines you'll see; if there is only one window
|
||||
then the 'window' option is used, otherwise the
|
||||
current window size is used.
|
||||
then twice the value of the 'scroll' option is used,
|
||||
otherwise the current window height minus 3 is used.
|
||||
|
||||
:z can be used either alone or followed by any of
|
||||
several punctuation marks. These have the following
|
||||
effect:
|
||||
|
||||
mark first line last line new location ~
|
||||
mark first line last line new cursor line ~
|
||||
---- ---------- --------- ------------
|
||||
+ current line 1 scr forward 1 scr forward
|
||||
- 1 scr back current line current line
|
||||
@@ -359,8 +360,6 @@ m *+mzscheme* Mzscheme interface |mzscheme|
|
||||
m *+mzscheme/dyn* Mzscheme interface |mzscheme-dynamic| |/dyn|
|
||||
m *+netbeans_intg* |netbeans|
|
||||
m *+ole* Win32 GUI only: |ole-interface|
|
||||
*+osfiletype* Support for the 'osfiletype' option and filetype
|
||||
checking in automatic commands. |autocmd-osfiletypes|
|
||||
N *+path_extra* Up/downwards search in 'path' and 'tags'
|
||||
m *+perl* Perl interface |perl|
|
||||
m *+perl/dyn* Perl interface |perl-dynamic| |/dyn|
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*version7.txt* For Vim version 7.3. Last change: 2010 Oct 20
|
||||
*version7.txt* For Vim version 7.3. Last change: 2010 Nov 03
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -1673,7 +1673,7 @@ The GTK font dialog uses a font size zero when the font name doesn't include a
|
||||
size. Use a default size of 10.
|
||||
|
||||
This example in the documentation didn't work:
|
||||
:e `=foo . ".c" `
|
||||
:e `=foo . ".c"`
|
||||
Skip over the expression in `=expr` when looking for comments, |, % and #.
|
||||
|
||||
When ":helpgrep" doesn't find anything there is no error message.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*vi_diff.txt* For Vim version 7.3. Last change: 2010 Oct 11
|
||||
*vi_diff.txt* For Vim version 7.3. Last change: 2011 Aug 29
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -88,8 +88,8 @@ Maximum display width Unix and Win32: 1024 characters, otherwise 255
|
||||
characters
|
||||
Maximum lhs of a mapping 50 characters.
|
||||
Number of different highlighting types: over 30000
|
||||
Range of a Number variable: -2147483648 to 2147483647 (more on 64 bit
|
||||
systems)
|
||||
Range of a Number variable: -2147483648 to 2147483647 (might be more on 64
|
||||
bit systems)
|
||||
Maximum length of a line in a tags file: 512 bytes.
|
||||
|
||||
Information for undo and text in registers is kept in memory, thus when making
|
||||
|
||||
@@ -214,7 +214,7 @@ EOF
|
||||
}
|
||||
|
||||
# main
|
||||
usage() if $#ARGV < 2;
|
||||
usage() if $#ARGV < 1;
|
||||
|
||||
print "Processing tags...\n";
|
||||
readTagFile( $ARGV[ 0 ] );
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*windows.txt* For Vim version 7.3. Last change: 2010 Aug 15
|
||||
*windows.txt* For Vim version 7.3. Last change: 2011 Aug 14
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -246,7 +246,7 @@ window will appear.
|
||||
|
||||
These command modifiers can be combined to make a vertically split window
|
||||
occupy the full height. Example: >
|
||||
:vertical topleft edit tags
|
||||
:vertical topleft split tags
|
||||
Opens a vertically split, full-height window on the "tags" file at the far
|
||||
left of the Vim window.
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" Vim support file to detect file types
|
||||
"
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2010 Sep 29
|
||||
" Last Change: 2011 Sep 07
|
||||
|
||||
" Listen very carefully, I will say this only once
|
||||
if exists("did_load_filetypes")
|
||||
@@ -75,7 +75,7 @@ endfunc
|
||||
au BufNewFile,BufRead *.aap setf aap
|
||||
|
||||
" A2ps printing utility
|
||||
au BufNewFile,BufRead etc/a2ps.cfg,etc/a2ps/*.cfg,a2psrc,.a2psrc setf a2ps
|
||||
au BufNewFile,BufRead */etc/a2ps.cfg,*/etc/a2ps/*.cfg,a2psrc,.a2psrc setf a2ps
|
||||
|
||||
" ABAB/4
|
||||
au BufNewFile,BufRead *.abap setf abap
|
||||
@@ -110,8 +110,7 @@ au BufNewFile,BufRead build.xml setf ant
|
||||
au BufNewFile,BufRead proftpd.conf* call s:StarSetf('apachestyle')
|
||||
|
||||
" Apache config file
|
||||
au BufNewFile,BufRead .htaccess,/etc/httpd/*.conf setf apache
|
||||
au BufNewFile,BufRead httpd.conf*,srm.conf*,access.conf*,apache.conf*,apache2.conf*,/etc/apache2/*.conf*,/etc/httpd/conf.d/*.conf* call s:StarSetf('apache')
|
||||
au BufNewFile,BufRead .htaccess,*/etc/httpd/*.conf setf apache
|
||||
|
||||
" XA65 MOS6510 cross assembler
|
||||
au BufNewFile,BufRead *.a65 setf a65
|
||||
@@ -124,7 +123,7 @@ au BufNewFile,BufRead *.am
|
||||
\ if expand("<afile>") !~? 'Makefile.am\>' | setf elf | endif
|
||||
|
||||
" ALSA configuration
|
||||
au BufNewFile,BufRead ~/.asoundrc,/usr/share/alsa/alsa.conf,/etc/asound.conf setf alsaconf
|
||||
au BufNewFile,BufRead .asoundrc,*/usr/share/alsa/alsa.conf,*/etc/asound.conf setf alsaconf
|
||||
|
||||
" Arc Macro Language
|
||||
au BufNewFile,BufRead *.aml setf aml
|
||||
@@ -157,7 +156,7 @@ au BufNewFile,BufRead *.asp
|
||||
\ endif
|
||||
|
||||
" Grub (must be before catch *.lst)
|
||||
au BufNewFile,BufRead /boot/grub/menu.lst,/boot/grub/grub.conf,/etc/grub.conf setf grub
|
||||
au BufNewFile,BufRead */boot/grub/menu.lst,*/boot/grub/grub.conf,*/etc/grub.conf setf grub
|
||||
|
||||
" Assembly (all kinds)
|
||||
" *.lst is not pure assembly, it has two extra columns (address, byte codes)
|
||||
@@ -296,7 +295,7 @@ endfunc
|
||||
au BufNewFile,BufRead *.bl setf blank
|
||||
|
||||
" Blkid cache file
|
||||
au BufNewFile,BufRead /etc/blkid.tab,/etc/blkid.tab.old setf xml
|
||||
au BufNewFile,BufRead */etc/blkid.tab,*/etc/blkid.tab.old setf xml
|
||||
|
||||
" C or lpc
|
||||
au BufNewFile,BufRead *.c call s:FTlpc()
|
||||
@@ -317,21 +316,18 @@ endfunc
|
||||
|
||||
" Calendar
|
||||
au BufNewFile,BufRead calendar setf calendar
|
||||
au BufNewFile,BufRead */.calendar/*,
|
||||
\*/share/calendar/*/calendar.*,*/share/calendar/calendar.*
|
||||
\ call s:StarSetf('calendar')
|
||||
|
||||
" C#
|
||||
au BufNewFile,BufRead *.cs setf cs
|
||||
|
||||
" Cabal
|
||||
au BufNewFile,BufRead *.cabal setf cabal
|
||||
au BufNewFile,BufRead *.cabal setf cabal
|
||||
|
||||
" Cdrdao TOC
|
||||
au BufNewFile,BufRead *.toc setf cdrtoc
|
||||
|
||||
" Cdrdao config
|
||||
au BufNewFile,BufRead etc/cdrdao.conf,etc/defaults/cdrdao,etc/default/cdrdao,~/.cdrdao setf cdrdaoconf
|
||||
au BufNewFile,BufRead */etc/cdrdao.conf,*/etc/defaults/cdrdao,*/etc/default/cdrdao,.cdrdao setf cdrdaoconf
|
||||
|
||||
" Cfengine
|
||||
au BufNewFile,BufRead cfengine.conf setf cfengine
|
||||
@@ -488,7 +484,7 @@ au BufNewFile,BufRead *.prg
|
||||
au BufNewFile,BufRead CMakeLists.txt,*.cmake,*.cmake.in setf cmake
|
||||
|
||||
" Cmusrc
|
||||
au BufNewFile,BufRead ~/.cmus/{autosave,rc,command-history,*.theme} setf cmusrc
|
||||
au BufNewFile,BufRead */.cmus/{autosave,rc,command-history,*.theme} setf cmusrc
|
||||
au BufNewFile,BufRead */cmus/{rc,*.theme} setf cmusrc
|
||||
|
||||
" Cobol
|
||||
@@ -536,7 +532,7 @@ au BufNewFile,BufRead *.qc setf c
|
||||
au BufNewFile,BufRead *.cfg setf cfg
|
||||
|
||||
" Cucumber
|
||||
au BufNewFile,BufRead *.feature setf cucumber
|
||||
au BufNewFile,BufRead *.feature setf cucumber
|
||||
|
||||
" Communicating Sequential Processes
|
||||
au BufNewFile,BufRead *.csp,*.fdr setf csp
|
||||
@@ -553,11 +549,15 @@ au BufNewFile,BufRead control
|
||||
\| endif
|
||||
|
||||
" Debian Sources.list
|
||||
au BufNewFile,BufRead /etc/apt/sources.list setf debsources
|
||||
au BufNewFile,BufRead */etc/apt/sources.list setf debsources
|
||||
au BufNewFile,BufRead */etc/apt/sources.list.d/*.list setf debsources
|
||||
|
||||
" Deny hosts
|
||||
au BufNewFile,BufRead denyhosts.conf setf denyhosts
|
||||
|
||||
" dnsmasq(8) configuration files
|
||||
au BufNewFile,BufRead */etc/dnsmasq.conf setf dnsmasq
|
||||
|
||||
" ROCKLinux package description
|
||||
au BufNewFile,BufRead *.desc setf desc
|
||||
|
||||
@@ -586,7 +586,7 @@ au BufNewFile,BufRead dictd.conf setf dictdconf
|
||||
au BufNewFile,BufRead *.diff,*.rej,*.patch setf diff
|
||||
|
||||
" Dircolors
|
||||
au BufNewFile,BufRead .dir_colors,/etc/DIR_COLORS setf dircolors
|
||||
au BufNewFile,BufRead .dir_colors,.dircolors,*/etc/DIR_COLORS setf dircolors
|
||||
|
||||
" Diva (with Skill) or InstallShield
|
||||
au BufNewFile,BufRead *.rul
|
||||
@@ -678,7 +678,7 @@ au BufNewFile,BufRead *.exp setf expect
|
||||
au BufNewFile,BufRead exports setf exports
|
||||
|
||||
" Falcon
|
||||
au BufNewFile,BufRead *.fal setf falcon
|
||||
au BufNewFile,BufRead *.fal setf falcon
|
||||
|
||||
" Fantom
|
||||
au BufNewFile,BufRead *.fan,*.fwt setf fan
|
||||
@@ -728,14 +728,14 @@ au BufNewFile,BufRead *.mo,*.gdmo setf gdmo
|
||||
au BufNewFile,BufRead *.ged,lltxxxxx.txt setf gedcom
|
||||
|
||||
" Git
|
||||
autocmd BufNewFile,BufRead *.git/COMMIT_EDITMSG setf gitcommit
|
||||
autocmd BufNewFile,BufRead *.git/config,.gitconfig,.gitmodules setf gitconfig
|
||||
autocmd BufNewFile,BufRead git-rebase-todo setf gitrebase
|
||||
autocmd BufNewFile,BufRead .msg.[0-9]*
|
||||
au BufNewFile,BufRead *.git/COMMIT_EDITMSG setf gitcommit
|
||||
au BufNewFile,BufRead *.git/config,.gitconfig,.gitmodules setf gitconfig
|
||||
au BufNewFile,BufRead git-rebase-todo setf gitrebase
|
||||
au BufNewFile,BufRead .msg.[0-9]*
|
||||
\ if getline(1) =~ '^From.*# This line is ignored.$' |
|
||||
\ setf gitsendemail |
|
||||
\ endif
|
||||
autocmd BufNewFile,BufRead *.git/**
|
||||
au BufNewFile,BufRead *.git/**
|
||||
\ if getline(1) =~ '^\x\{40\}\>\|^ref: ' |
|
||||
\ setf git |
|
||||
\ endif
|
||||
@@ -749,7 +749,10 @@ au BufNewFile,BufRead *.gp,.gprc setf gp
|
||||
" GPG
|
||||
au BufNewFile,BufRead */.gnupg/options setf gpg
|
||||
au BufNewFile,BufRead */.gnupg/gpg.conf setf gpg
|
||||
au BufNewFile,BufRead /usr/**/gnupg/options.skel setf gpg
|
||||
au BufNewFile,BufRead */usr/**/gnupg/options.skel setf gpg
|
||||
|
||||
" gnash(1) configuration files
|
||||
au BufNewFile,BufRead gnashrc,.gnashrc,gnashpluginrc,.gnashpluginrc setf gnash
|
||||
|
||||
" Gnuplot scripts
|
||||
au BufNewFile,BufRead *.gpi setf gnuplot
|
||||
@@ -767,7 +770,7 @@ au BufNewFile,BufRead *.groovy setf groovy
|
||||
au BufNewFile,BufRead *.gsp setf gsp
|
||||
|
||||
" Group file
|
||||
au BufNewFile,BufRead /etc/group,/etc/group-,/etc/group.edit,/etc/gshadow,/etc/gshadow-,/etc/gshadow.edit,/var/backups/group.bak,/var/backups/gshadow.bak setf group
|
||||
au BufNewFile,BufRead */etc/group,*/etc/group-,*/etc/group.edit,*/etc/gshadow,*/etc/gshadow-,*/etc/gshadow.edit,*/var/backups/group.bak,*/var/backups/gshadow.bak setf group
|
||||
|
||||
" GTK RC
|
||||
au BufNewFile,BufRead .gtkrc,gtkrc setf gtkrc
|
||||
@@ -779,7 +782,7 @@ au BufNewFile,BufRead *.haml setf haml
|
||||
au BufNewFile,BufRead *.hsc,*.hsm setf hamster
|
||||
|
||||
" Haskell
|
||||
au BufNewFile,BufRead *.hs,*.hs-boot setf haskell
|
||||
au BufNewFile,BufRead *.hs,*.hs-boot setf haskell
|
||||
au BufNewFile,BufRead *.lhs setf lhaskell
|
||||
au BufNewFile,BufRead *.chs setf chaskell
|
||||
|
||||
@@ -826,10 +829,10 @@ au BufNewFile,BufRead *.html.m4 setf htmlm4
|
||||
au BufNewFile,BufRead *.tmpl setf htmlcheetah
|
||||
|
||||
" Host config
|
||||
au BufNewFile,BufRead /etc/host.conf setf hostconf
|
||||
au BufNewFile,BufRead */etc/host.conf setf hostconf
|
||||
|
||||
" Hosts access
|
||||
au BufNewFile,BufRead /etc/hosts.allow,/etc/hosts.deny setf hostsaccess
|
||||
au BufNewFile,BufRead */etc/hosts.allow,*/etc/hosts.deny setf hostsaccess
|
||||
|
||||
" Hyper Builder
|
||||
au BufNewFile,BufRead *.hb setf hb
|
||||
@@ -872,7 +875,9 @@ func! s:ProtoCheck(default)
|
||||
" Cproto files have a comment in the first line and a function prototype in
|
||||
" the second line, it always ends in ";". Indent files may also have
|
||||
" comments, thus we can't match comments to see the difference.
|
||||
if getline(2) =~ ';$'
|
||||
" IDL files can have a single ';' in the second line, require at least one
|
||||
" chacter before the ';'.
|
||||
if getline(2) =~ '.;$'
|
||||
setf cpp
|
||||
else
|
||||
exe 'setf ' . a:default
|
||||
@@ -887,7 +892,7 @@ au BufNewFile,BufRead indentrc setf indent
|
||||
au BufNewFile,BufRead *.inf,*.INF setf inform
|
||||
|
||||
" Initng
|
||||
au BufNewFile,BufRead /etc/initng/**/*.i,*.ii setf initng
|
||||
au BufNewFile,BufRead */etc/initng/**/*.i,*.ii setf initng
|
||||
|
||||
" Ipfilter
|
||||
au BufNewFile,BufRead ipf.conf,ipf6.conf,ipf.rules setf ipfilter
|
||||
@@ -917,7 +922,7 @@ au BufNewFile,BufRead *.java,*.jav setf java
|
||||
au BufNewFile,BufRead *.jj,*.jjt setf javacc
|
||||
|
||||
" JavaScript, ECMAScript
|
||||
au BufNewFile,BufRead *.js,*.javascript,*.es,*.jsx setf javascript
|
||||
au BufNewFile,BufRead *.js,*.javascript,*.es,*.jsx,*.json setf javascript
|
||||
|
||||
" Java Server Pages
|
||||
au BufNewFile,BufRead *.jsp setf jsp
|
||||
@@ -932,6 +937,9 @@ au BufNewFile,BufRead *.clp setf jess
|
||||
" Jgraph
|
||||
au BufNewFile,BufRead *.jgr setf jgraph
|
||||
|
||||
" Jovial
|
||||
au BufNewFile,BufRead *.jov,*.j73,*.jovial setf jovial
|
||||
|
||||
" Kixtart
|
||||
au BufNewFile,BufRead *.kix setf kix
|
||||
|
||||
@@ -951,7 +959,7 @@ au BufNewFile,BufRead *.ace,*.ACE setf lace
|
||||
au BufNewFile,BufRead *.latte,*.lte setf latte
|
||||
|
||||
" Limits
|
||||
au BufNewFile,BufRead /etc/limits setf limits
|
||||
au BufNewFile,BufRead */etc/limits,*/etc/*limits.conf,*/etc/*limits.d/*.conf setf limits
|
||||
|
||||
" LambdaProlog (*.mod too, see Modsim)
|
||||
au BufNewFile,BufRead *.sig setf lprolog
|
||||
@@ -966,10 +974,10 @@ au BufNewFile,BufRead *.ld setf ld
|
||||
au BufNewFile,BufRead *.lex,*.l setf lex
|
||||
|
||||
" Libao
|
||||
au BufNewFile,BufRead /etc/libao.conf,*/.libao setf libao
|
||||
au BufNewFile,BufRead */etc/libao.conf,*/.libao setf libao
|
||||
|
||||
" Libsensors
|
||||
au BufNewFile,BufRead /etc/sensors.conf setf sensors
|
||||
au BufNewFile,BufRead */etc/sensors.conf,*/etc/sensors3.conf setf sensors
|
||||
|
||||
" LFTP
|
||||
au BufNewFile,BufRead lftp.conf,.lftprc,*lftp/rc setf lftp
|
||||
@@ -978,7 +986,7 @@ au BufNewFile,BufRead lftp.conf,.lftprc,*lftp/rc setf lftp
|
||||
au BufNewFile,BufRead *.ll setf lifelines
|
||||
|
||||
" Lilo: Linux loader
|
||||
au BufNewFile,BufRead lilo.conf* call s:StarSetf('lilo')
|
||||
au BufNewFile,BufRead lilo.conf setf lilo
|
||||
|
||||
" Lisp (*.el = ELisp, *.cl = Common Lisp, *.jl = librep Lisp)
|
||||
if has("fname_case")
|
||||
@@ -1000,10 +1008,10 @@ au BufNewFile,BufRead *.lite,*.lt setf lite
|
||||
au BufNewFile,BufRead */LiteStep/*/*.rc setf litestep
|
||||
|
||||
" Login access
|
||||
au BufNewFile,BufRead /etc/login.access setf loginaccess
|
||||
au BufNewFile,BufRead */etc/login.access setf loginaccess
|
||||
|
||||
" Login defs
|
||||
au BufNewFile,BufRead /etc/login.defs setf logindefs
|
||||
au BufNewFile,BufRead */etc/login.defs setf logindefs
|
||||
|
||||
" Logtalk
|
||||
au BufNewFile,BufRead *.lgt setf logtalk
|
||||
@@ -1034,7 +1042,7 @@ au BufNewFile,BufRead *.mgp setf mgp
|
||||
au BufNewFile,BufRead snd.\d\+,.letter,.letter.\d\+,.followup,.article,.article.\d\+,pico.\d\+,mutt{ng,}-*-\w\+,mutt[[:alnum:]_-]\{6\},ae\d\+.txt,/tmp/SLRN[0-9A-Z.]\+,*.eml setf mail
|
||||
|
||||
" Mail aliases
|
||||
au BufNewFile,BufRead /etc/mail/aliases,/etc/aliases setf mailaliases
|
||||
au BufNewFile,BufRead */etc/mail/aliases,*/etc/aliases setf mailaliases
|
||||
|
||||
" Mailcap configuration file
|
||||
au BufNewFile,BufRead .mailcap,mailcap setf mailcap
|
||||
@@ -1049,7 +1057,7 @@ au BufNewFile,BufRead *.ist,*.mst setf ist
|
||||
au BufNewFile,BufRead *.man setf man
|
||||
|
||||
" Man config
|
||||
au BufNewFile,BufRead /etc/man.conf,man.config setf manconf
|
||||
au BufNewFile,BufRead */etc/man.conf,man.config setf manconf
|
||||
|
||||
" Maple V
|
||||
au BufNewFile,BufRead *.mv,*.mpl,*.mws setf maple
|
||||
@@ -1100,8 +1108,8 @@ au BufNewFile,BufRead *.mel setf mel
|
||||
" Mercurial config (looks like generic config file)
|
||||
au BufNewFile,BufRead *.hgrc,*hgrc setf cfg
|
||||
|
||||
" Messages
|
||||
au BufNewFile,BufRead /var/log/messages,/var/log/messages.*[0-9] setf messages
|
||||
" Messages (logs mostly)
|
||||
au BufNewFile,BufRead */log/{auth,cron,daemon,debug,kern,lpr,mail,messages,news/news,syslog,user}{,.log,.err,.info,.warn,.crit,.notice}{,.[0-9]*,-[0-9]*} setf messages
|
||||
|
||||
" Metafont
|
||||
au BufNewFile,BufRead *.mf setf mf
|
||||
@@ -1157,11 +1165,7 @@ au BufNewFile,BufRead *.isc,*.monk,*.ssc,*.tsc setf monk
|
||||
au BufNewFile,BufRead *.moo setf moo
|
||||
|
||||
" Modconf
|
||||
au BufNewFile,BufRead /etc/modules.conf,/etc/conf.modules setf modconf
|
||||
au BufNewFile,BufRead /etc/modutils/*
|
||||
\ if executable(expand("<afile>")) != 1
|
||||
\| call s:StarSetf('modconf')
|
||||
\|endif
|
||||
au BufNewFile,BufRead */etc/modules.conf,*/etc/modules,*/etc/conf.modules setf modconf
|
||||
|
||||
" Mplayer config
|
||||
au BufNewFile,BufRead mplayer.conf,*/.mplayer/config setf mplayerconf
|
||||
@@ -1178,6 +1182,9 @@ au BufNewFile,BufRead *.msql setf msql
|
||||
" Mysql
|
||||
au BufNewFile,BufRead *.mysql setf mysql
|
||||
|
||||
" Mutt setup files (must be before catch *.rc)
|
||||
au BufNewFile,BufRead */etc/Muttrc.d/* call s:StarSetf('muttrc')
|
||||
|
||||
" M$ Resource files
|
||||
au BufNewFile,BufRead *.rc setf rc
|
||||
|
||||
@@ -1191,7 +1198,7 @@ au BufNewFile,BufRead *.mush setf mush
|
||||
au BufNewFile,BufRead Mutt{ng,}rc setf muttrc
|
||||
|
||||
" Nano
|
||||
au BufNewFile,BufRead /etc/nanorc,.nanorc setf nanorc
|
||||
au BufNewFile,BufRead */etc/nanorc,.nanorc setf nanorc
|
||||
|
||||
" Nastran input/DMAP
|
||||
"au BufNewFile,BufRead *.dat setf nastran
|
||||
@@ -1267,13 +1274,13 @@ au BufNewFile,BufRead *.ora setf ora
|
||||
au BufNewFile,BufRead pf.conf setf pf
|
||||
|
||||
" Pam conf
|
||||
au BufNewFile,BufRead /etc/pam.conf setf pamconf
|
||||
au BufNewFile,BufRead */etc/pam.conf setf pamconf
|
||||
|
||||
" PApp
|
||||
au BufNewFile,BufRead *.papp,*.pxml,*.pxsl setf papp
|
||||
|
||||
" Password file
|
||||
au BufNewFile,BufRead /etc/passwd,/etc/passwd-,/etc/passwd.edit,/etc/shadow,/etc/shadow-,/var/backups/passwd.bak,/var/backups/shadow.bak setf passwd
|
||||
au BufNewFile,BufRead */etc/passwd,*/etc/passwd-,*/etc/passwd.edit,*/etc/shadow,*/etc/shadow-,*/etc/shadow.edit,*/var/backups/passwd.bak,*/var/backups/shadow.bak setf passwd
|
||||
|
||||
" Pascal (also *.p)
|
||||
au BufNewFile,BufRead *.pas setf pascal
|
||||
@@ -1405,7 +1412,7 @@ au BufNewFile,BufRead *.it,*.ih setf ppwiz
|
||||
|
||||
" Obj 3D file format
|
||||
" TODO: is there a way to avoid MS-Windows Object files?
|
||||
au BufNewFile,BufRead *.obj setf obj
|
||||
au BufNewFile,BufRead *.obj setf obj
|
||||
|
||||
" Oracle Pro*C/C++
|
||||
au BufNewFile,BufRead *.pc setf proc
|
||||
@@ -1500,7 +1507,7 @@ au BufNewFile,BufRead *.pdb setf prolog
|
||||
au BufNewFile,BufRead *.pml setf promela
|
||||
|
||||
" Protocols
|
||||
au BufNewFile,BufRead /etc/protocols setf protocols
|
||||
au BufNewFile,BufRead */etc/protocols setf protocols
|
||||
|
||||
" Pyrex
|
||||
au BufNewFile,BufRead *.pyx,*.pxd setf pyrex
|
||||
@@ -1581,13 +1588,17 @@ func! s:FTr()
|
||||
endif
|
||||
endfor
|
||||
|
||||
" Nothing recognized, assume Rexx
|
||||
setf rexx
|
||||
" Nothing recognized, use user default or assume Rexx
|
||||
if exists("g:filetype_r")
|
||||
exe "setf " . g:filetype_r
|
||||
else
|
||||
" Rexx used to be the default, but R appears to be much more popular.
|
||||
setf r
|
||||
endif
|
||||
endfunc
|
||||
|
||||
" Remind
|
||||
au BufNewFile,BufRead .reminders* call s:StarSetf('remind')
|
||||
au BufNewFile,BufRead *.remind,*.rem setf remind
|
||||
au BufNewFile,BufRead .reminders,*.remind,*.rem setf remind
|
||||
|
||||
" Resolv.conf
|
||||
au BufNewFile,BufRead resolv.conf setf resolv
|
||||
@@ -1614,7 +1625,16 @@ au BufNewFile,BufRead *.rtf setf rtf
|
||||
au BufNewFile,BufRead .irbrc,irbrc setf ruby
|
||||
|
||||
" Ruby
|
||||
au BufNewFile,BufRead *.rb,*.rbw,*.gem,*.gemspec setf ruby
|
||||
au BufNewFile,BufRead *.rb,*.rbw setf ruby
|
||||
|
||||
" RubyGems
|
||||
au BufNewFile,BufRead *.gemspec setf ruby
|
||||
|
||||
" Rackup
|
||||
au BufNewFile,BufRead *.ru setf ruby
|
||||
|
||||
" Bundler
|
||||
au BufNewFile,BufRead Gemfile setf ruby
|
||||
|
||||
" Ruby on Rails
|
||||
au BufNewFile,BufRead *.builder,*.rxml,*.rjs setf ruby
|
||||
@@ -1641,7 +1661,7 @@ au BufNewFile,BufRead *.sa setf sather
|
||||
au BufNewFile,BufRead *.sci,*.sce setf scilab
|
||||
|
||||
" SCSS
|
||||
au BufNewFile,BufRead *.scss setf scss
|
||||
au BufNewFile,BufRead *.scss setf scss
|
||||
|
||||
" SD: Streaming Descriptors
|
||||
au BufNewFile,BufRead *.sd setf sd
|
||||
@@ -1678,19 +1698,19 @@ func! s:McSetf()
|
||||
endfunc
|
||||
|
||||
" Services
|
||||
au BufNewFile,BufRead /etc/services setf services
|
||||
au BufNewFile,BufRead */etc/services setf services
|
||||
|
||||
" Service Location config
|
||||
au BufNewFile,BufRead /etc/slp.conf setf slpconf
|
||||
au BufNewFile,BufRead */etc/slp.conf setf slpconf
|
||||
|
||||
" Service Location registration
|
||||
au BufNewFile,BufRead /etc/slp.reg setf slpreg
|
||||
au BufNewFile,BufRead */etc/slp.reg setf slpreg
|
||||
|
||||
" Service Location SPI
|
||||
au BufNewFile,BufRead /etc/slp.spi setf slpspi
|
||||
au BufNewFile,BufRead */etc/slp.spi setf slpspi
|
||||
|
||||
" Setserial config
|
||||
au BufNewFile,BufRead /etc/serial.conf setf setserial
|
||||
au BufNewFile,BufRead */etc/serial.conf setf setserial
|
||||
|
||||
" SGML
|
||||
au BufNewFile,BufRead *.sgm,*.sgml
|
||||
@@ -1717,7 +1737,7 @@ au BufNewFile,BufRead sgml.catalog* call s:StarSetf('catalog')
|
||||
" Gentoo ebuilds are actually bash scripts
|
||||
au BufNewFile,BufRead .bashrc*,bashrc,bash.bashrc,.bash_profile*,.bash_logout*,*.bash,*.ebuild call SetFileTypeSH("bash")
|
||||
au BufNewFile,BufRead .kshrc*,*.ksh call SetFileTypeSH("ksh")
|
||||
au BufNewFile,BufRead /etc/profile,.profile*,*.sh,*.env call SetFileTypeSH(getline(1))
|
||||
au BufNewFile,BufRead */etc/profile,.profile*,*.sh,*.env call SetFileTypeSH(getline(1))
|
||||
|
||||
" Also called from scripts.vim.
|
||||
func! SetFileTypeSH(name)
|
||||
@@ -1800,9 +1820,9 @@ func! s:CSH()
|
||||
endfunc
|
||||
|
||||
" Z-Shell script
|
||||
au BufNewFile,BufRead .zprofile,/etc/zprofile,.zfbfmarks setf zsh
|
||||
au BufNewFile,BufRead .zprofile,*/etc/zprofile,.zfbfmarks setf zsh
|
||||
au BufNewFile,BufRead .zsh*,.zlog*,.zcompdump* call s:StarSetf('zsh')
|
||||
au BufNewFile,BufRead *.zsh setf zsh
|
||||
au BufNewFile,BufRead *.zsh setf zsh
|
||||
|
||||
" Scheme
|
||||
au BufNewFile,BufRead *.scm,*.ss setf scheme
|
||||
@@ -1871,7 +1891,7 @@ au BufNewFile,BufRead *.rules call s:FTRules()
|
||||
let s:ft_rules_udev_rules_pattern = '^\s*\cudev_rules\s*=\s*"\([^"]\{-1,}\)/*".*'
|
||||
func! s:FTRules()
|
||||
let path = expand('<amatch>:p')
|
||||
if path =~ '^/etc/udev/\%(rules\.d/\)\=.*\.rules$'
|
||||
if path =~ '^/\(etc/udev/\%(rules\.d/\)\=.*\.rules\|lib/udev/\%(rules\.d/\)\=.*\.rules\)$'
|
||||
setf udevrules
|
||||
return
|
||||
endif
|
||||
@@ -1959,13 +1979,13 @@ au BufNewFile,BufRead *.sml setf sml
|
||||
au BufNewFile,BufRead *.cm setf voscm
|
||||
|
||||
" Sysctl
|
||||
au BufNewFile,BufRead /etc/sysctl.conf setf sysctl
|
||||
au BufNewFile,BufRead */etc/sysctl.conf,*/etc/sysctl.d/*.conf setf sysctl
|
||||
|
||||
" Synopsys Design Constraints
|
||||
au BufNewFile,BufRead *.sdc setf sdc
|
||||
|
||||
" Sudoers
|
||||
au BufNewFile,BufRead /etc/sudoers,sudoers.tmp setf sudoers
|
||||
au BufNewFile,BufRead */etc/sudoers,sudoers.tmp setf sudoers
|
||||
|
||||
" SVG (Scalable Vector Graphics)
|
||||
au BufNewFile,BufRead *.svg setf svg
|
||||
@@ -2092,6 +2112,9 @@ au BufNewFile,BufRead *.tf,.tfrc,tfrc setf tf
|
||||
" TPP - Text Presentation Program
|
||||
au BufNewFile,BufReadPost *.tpp setf tpp
|
||||
|
||||
" Treetop
|
||||
au BufRead,BufNewFile *.treetop setf treetop
|
||||
|
||||
" Trustees
|
||||
au BufNewFile,BufRead trustees.conf setf trustees
|
||||
|
||||
@@ -2108,19 +2131,23 @@ au BufNewFile,BufReadPost *.tsscl setf tsscl
|
||||
au BufNewFile,BufRead *.uit,*.uil setf uil
|
||||
|
||||
" Udev conf
|
||||
au BufNewFile,BufRead /etc/udev/udev.conf setf udevconf
|
||||
au BufNewFile,BufRead */etc/udev/udev.conf setf udevconf
|
||||
|
||||
" Udev permissions
|
||||
au BufNewFile,BufRead /etc/udev/permissions.d/*.permissions setf udevperm
|
||||
au BufNewFile,BufRead */etc/udev/permissions.d/*.permissions setf udevperm
|
||||
"
|
||||
" Udev symlinks config
|
||||
au BufNewFile,BufRead /etc/udev/cdsymlinks.conf setf sh
|
||||
au BufNewFile,BufRead */etc/udev/cdsymlinks.conf setf sh
|
||||
|
||||
" UnrealScript
|
||||
au BufNewFile,BufRead *.uc setf uc
|
||||
|
||||
" Updatedb
|
||||
au BufNewFile,BufRead /etc/updatedb.conf setf updatedb
|
||||
au BufNewFile,BufRead */etc/updatedb.conf setf updatedb
|
||||
|
||||
" Upstart (init(8)) config files
|
||||
au BufNewFile,BufRead */etc/init/*.conf,*/.init/*.conf setf upstart
|
||||
au BufNewFile,BufRead */etc/init/*.override,*/.init/*.override setf upstart
|
||||
|
||||
" Vera
|
||||
au BufNewFile,BufRead *.vr,*.vri,*.vrh setf vera
|
||||
@@ -2212,15 +2239,18 @@ au BufEnter *.xpm2 setf xpm2
|
||||
" XFree86 config
|
||||
au BufNewFile,BufRead XF86Config
|
||||
\ if getline(1) =~ '\<XConfigurator\>' |
|
||||
\ let b:xf86c_xfree86_version = 3 |
|
||||
\ let b:xf86conf_xfree86_version = 3 |
|
||||
\ endif |
|
||||
\ setf xf86conf
|
||||
au BufNewFile,BufRead */xorg.conf.d/*.conf
|
||||
\ let b:xf86conf_xfree86_version = 4 |
|
||||
\ setf xf86conf
|
||||
|
||||
" Xorg config
|
||||
au BufNewFile,BufRead xorg.conf,xorg.conf-4 let b:xf86c_xfree86_version = 4 | setf xf86conf
|
||||
au BufNewFile,BufRead xorg.conf,xorg.conf-4 let b:xf86conf_xfree86_version = 4 | setf xf86conf
|
||||
|
||||
" Xinetd conf
|
||||
au BufNewFile,BufRead /etc/xinetd.conf setf xinetd
|
||||
au BufNewFile,BufRead */etc/xinetd.conf setf xinetd
|
||||
|
||||
" XS Perl extension interface language
|
||||
au BufNewFile,BufRead *.xs setf xs
|
||||
@@ -2267,7 +2297,7 @@ au BufNewFile,BufRead *.ts,*.ui setf xml
|
||||
au BufNewFile,BufRead *.tpm setf xml
|
||||
|
||||
" Xdg menus
|
||||
au BufNewFile,BufRead /etc/xdg/menus/*.menu setf xml
|
||||
au BufNewFile,BufRead */etc/xdg/menus/*.menu setf xml
|
||||
|
||||
" ATI graphics driver configuration
|
||||
au BufNewFile,BufRead fglrxrc setf xml
|
||||
@@ -2315,6 +2345,9 @@ endfunc
|
||||
" Yaml
|
||||
au BufNewFile,BufRead *.yaml,*.yml setf yaml
|
||||
|
||||
" yum conf (close enough to dosini)
|
||||
au BufNewFile,BufRead */etc/yum.conf setf dosini
|
||||
|
||||
" Zope
|
||||
" dtml (zope dynamic template markup language), pt (zope page template),
|
||||
" cpt (zope form controller page template)
|
||||
@@ -2351,8 +2384,9 @@ au StdinReadPost * if !did_filetype() | runtime! scripts.vim | endif
|
||||
" Most of these should call s:StarSetf() to avoid names ending in .gz and the
|
||||
" like are used.
|
||||
|
||||
" More Apache files.
|
||||
au BufNewFile,BufRead /etc/apache2/conf.*/*,/etc/apache2/sites-*/*,/etc/apache2/mods-*/* call s:StarSetf('apache')
|
||||
" More Apache config files
|
||||
au BufNewFile,BufRead access.conf*,apache.conf*,apache2.conf*,httpd.conf*,srm.conf* call s:StarSetf('apache')
|
||||
au BufNewFile,BufRead */etc/apache2/*.conf*,*/etc/apache2/conf.*/*,*/etc/apache2/mods-*/*,*/etc/apache2/sites-*/*,*/etc/httpd/conf.d/*.conf* call s:StarSetf('apache')
|
||||
|
||||
" Asterisk config file
|
||||
au BufNewFile,BufRead *asterisk/*.conf* call s:StarSetf('asterisk')
|
||||
@@ -2364,6 +2398,11 @@ au BufNewFile,BufRead bzr_log.* setf bzr
|
||||
" BIND zone
|
||||
au BufNewFile,BufRead */named/db.*,*/bind/db.* call s:StarSetf('bindzone')
|
||||
|
||||
" Calendar
|
||||
au BufNewFile,BufRead */.calendar/*,
|
||||
\*/share/calendar/*/calendar.*,*/share/calendar/calendar.*
|
||||
\ call s:StarSetf('calendar')
|
||||
|
||||
" Changelog
|
||||
au BufNewFile,BufRead [cC]hange[lL]og*
|
||||
\ if getline(1) =~ '; urgency='
|
||||
@@ -2373,10 +2412,10 @@ au BufNewFile,BufRead [cC]hange[lL]og*
|
||||
\|endif
|
||||
|
||||
" Crontab
|
||||
au BufNewFile,BufRead crontab,crontab.*,/etc/cron.d/* call s:StarSetf('crontab')
|
||||
au BufNewFile,BufRead crontab,crontab.*,*/etc/cron.d/* call s:StarSetf('crontab')
|
||||
|
||||
" Debian Sources.list
|
||||
au BufNewFile,BufRead /etc/apt/sources.list.d/* call s:StarSetf('debsources')
|
||||
" dnsmasq(8) configuration
|
||||
au BufNewFile,BufRead */etc/dnsmasq.d/* call s:StarSetf('dnsmasq')
|
||||
|
||||
" Dracula
|
||||
au BufNewFile,BufRead drac.* call s:StarSetf('dracula')
|
||||
@@ -2393,7 +2432,7 @@ au BufNewFile,BufRead *fvwm2rc*
|
||||
\|endif
|
||||
|
||||
" Gedcom
|
||||
au BufNewFile,BufRead /tmp/lltmp* call s:StarSetf('gedcom')
|
||||
au BufNewFile,BufRead */tmp/lltmp* call s:StarSetf('gedcom')
|
||||
|
||||
" GTK RC
|
||||
au BufNewFile,BufRead .gtkrc*,gtkrc* call s:StarSetf('gtkrc')
|
||||
@@ -2410,8 +2449,11 @@ au! BufNewFile,BufRead *jarg*
|
||||
" Kconfig
|
||||
au BufNewFile,BufRead Kconfig.* call s:StarSetf('kconfig')
|
||||
|
||||
" Lilo: Linux loader
|
||||
au BufNewFile,BufRead lilo.conf* call s:StarSetf('lilo')
|
||||
|
||||
" Logcheck
|
||||
au BufNewFile,BufRead /etc/logcheck/*.d*/* call s:StarSetf('logcheck')
|
||||
au BufNewFile,BufRead */etc/logcheck/*.d*/* call s:StarSetf('logcheck')
|
||||
|
||||
" Makefile
|
||||
au BufNewFile,BufRead [mM]akefile* call s:StarSetf('make')
|
||||
@@ -2423,7 +2465,11 @@ au BufNewFile,BufRead [rR]akefile* call s:StarSetf('ruby')
|
||||
au BufNewFile,BufRead mutt[[:alnum:]._-]\{6\} setf mail
|
||||
|
||||
" Modconf
|
||||
au BufNewFile,BufRead /etc/modprobe.* call s:StarSetf('modconf')
|
||||
au BufNewFile,BufRead */etc/modutils/*
|
||||
\ if executable(expand("<afile>")) != 1
|
||||
\| call s:StarSetf('modconf')
|
||||
\|endif
|
||||
au BufNewFile,BufRead */etc/modprobe.* call s:StarSetf('modconf')
|
||||
|
||||
" Mutt setup file
|
||||
au BufNewFile,BufRead .mutt{ng,}rc*,*/.mutt{ng,}/mutt{ng,}rc* call s:StarSetf('muttrc')
|
||||
@@ -2433,7 +2479,7 @@ au BufNewFile,BufRead mutt{ng,}rc*,Mutt{ng,}rc* call s:StarSetf('muttrc')
|
||||
au BufNewFile,BufRead tmac.* call s:StarSetf('nroff')
|
||||
|
||||
" Pam conf
|
||||
au BufNewFile,BufRead /etc/pam.d/* call s:StarSetf('pamconf')
|
||||
au BufNewFile,BufRead */etc/pam.d/* call s:StarSetf('pamconf')
|
||||
|
||||
" Printcap and Termcap
|
||||
au BufNewFile,BufRead *printcap*
|
||||
@@ -2445,6 +2491,9 @@ au BufNewFile,BufRead *termcap*
|
||||
\| let b:ptcap_type = "term" | call s:StarSetf('ptcap')
|
||||
\|endif
|
||||
|
||||
" Remind
|
||||
au BufNewFile,BufRead .reminders* call s:StarSetf('remind')
|
||||
|
||||
" Vim script
|
||||
au BufNewFile,BufRead *vimrc* call s:StarSetf('vim')
|
||||
|
||||
@@ -2456,10 +2505,10 @@ au BufNewFile,BufRead Xresources*,*/app-defaults/*,*/Xresources/* call s:StarSet
|
||||
|
||||
" XFree86 config
|
||||
au BufNewFile,BufRead XF86Config-4*
|
||||
\ let b:xf86c_xfree86_version = 4 | call s:StarSetf('xf86conf')
|
||||
\ let b:xf86conf_xfree86_version = 4 | call s:StarSetf('xf86conf')
|
||||
au BufNewFile,BufRead XF86Config*
|
||||
\ if getline(1) =~ '\<XConfigurator\>'
|
||||
\| let b:xf86c_xfree86_version = 3
|
||||
\| let b:xf86conf_xfree86_version = 3
|
||||
\|endif
|
||||
\|call s:StarSetf('xf86conf')
|
||||
|
||||
@@ -2467,7 +2516,10 @@ au BufNewFile,BufRead XF86Config*
|
||||
au BufNewFile,BufRead *xmodmap* call s:StarSetf('xmodmap')
|
||||
|
||||
" Xinetd conf
|
||||
au BufNewFile,BufRead /etc/xinetd.d/* call s:StarSetf('xinetd')
|
||||
au BufNewFile,BufRead */etc/xinetd.d/* call s:StarSetf('xinetd')
|
||||
|
||||
" yum conf (close enough to dosini)
|
||||
au BufNewFile,BufRead */etc/yum.repos.d/* call s:StarSetf('dosini')
|
||||
|
||||
" Z-Shell script
|
||||
au BufNewFile,BufRead zsh*,zlog* call s:StarSetf('zsh')
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: C
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2007 Sep 25
|
||||
" Last Change: 2011 Aug 04
|
||||
|
||||
" Only do this when not done yet for this buffer
|
||||
if exists("b:did_ftplugin")
|
||||
@@ -36,7 +36,7 @@ endif
|
||||
|
||||
" When the matchit plugin is loaded, this makes the % command skip parens and
|
||||
" braces in comments.
|
||||
let b:match_words = &matchpairs
|
||||
let b:match_words = &matchpairs . ',^\s*#\s*if\(\|def\|ndef\)\>:^\s*#\s*elif\>:^\s*#\s*else\>:^\s*#\s*endif\>'
|
||||
let b:match_skip = 's:comment\|string\|character'
|
||||
|
||||
" Win32 can filter files in the browse dialog
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: generic Changelog file
|
||||
" Maintainer: Nikolai Weibull <now@bitwi.se>
|
||||
" Latest Revision: 2010-08-17
|
||||
" Latest Revision: 2011-05-02
|
||||
" Variables:
|
||||
" g:changelog_timeformat (deprecated: use g:changelog_dateformat instead) -
|
||||
" description: the timeformat used in ChangeLog entries.
|
||||
@@ -99,8 +99,9 @@ if &filetype == 'changelog'
|
||||
function! s:try_reading_file(path)
|
||||
try
|
||||
return readfile(a:path)
|
||||
catch
|
||||
return []
|
||||
endtry
|
||||
return []
|
||||
endfunction
|
||||
|
||||
function! s:passwd_field(line, field)
|
||||
@@ -170,7 +171,7 @@ if &filetype == 'changelog'
|
||||
endfunction
|
||||
|
||||
" Internal function to create a new entry in the ChangeLog.
|
||||
function! s:new_changelog_entry(...)
|
||||
function! s:new_changelog_entry()
|
||||
" Deal with 'paste' option.
|
||||
let save_paste = &paste
|
||||
let &paste = 1
|
||||
@@ -178,7 +179,7 @@ if &filetype == 'changelog'
|
||||
" Look for an entry for today by our user.
|
||||
let date = strftime(g:changelog_dateformat)
|
||||
let search = s:substitute_items(g:changelog_date_entry_search, date,
|
||||
\ g:changelog_username)
|
||||
\ s:username())
|
||||
if search(search) > 0
|
||||
" Ok, now we look for the end of the date entry, and add an entry.
|
||||
call cursor(nextnonblank(line('.') + 1), 1)
|
||||
@@ -197,7 +198,7 @@ if &filetype == 'changelog'
|
||||
|
||||
" No entry today, so create a date-user header and insert an entry.
|
||||
let todays_entry = s:substitute_items(g:changelog_new_date_format,
|
||||
\ date, g:changelog_username)
|
||||
\ date, s:username())
|
||||
" Make sure we have a cursor positioning.
|
||||
if stridx(todays_entry, '{cursor}') == -1
|
||||
let todays_entry = todays_entry . '{cursor}'
|
||||
|
||||
@@ -13,7 +13,10 @@ set cpo&vim
|
||||
|
||||
let b:undo_ftplugin = "setl fo< tw< cole< cocu<"
|
||||
|
||||
setlocal formatoptions+=tcroql textwidth=78 cole=2 cocu=nc
|
||||
setlocal formatoptions+=tcroql textwidth=78
|
||||
if has("conceal")
|
||||
setlocal cole=2 cocu=nc
|
||||
endif
|
||||
|
||||
let &cpo = s:cpo_save
|
||||
unlet s:cpo_save
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: man
|
||||
" Maintainer: SungHyun Nam <goweol@gmail.com>
|
||||
" Last Change: 2008 Sep 17
|
||||
" Last Change: 2011 Jul 25
|
||||
|
||||
" To make the ":Man" command available before editing a manual page, source
|
||||
" this script from your startup vimrc file.
|
||||
@@ -15,6 +15,12 @@ if &filetype == "man"
|
||||
endif
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
" Ensure Vim is not recursively invoked (man-db does this)
|
||||
" when doing ctrl-[ on a man page reference.
|
||||
if exists("$MANPAGER")
|
||||
let $MANPAGER = ""
|
||||
endif
|
||||
|
||||
" allow dot and dash in manual page name.
|
||||
setlocal iskeyword+=\.,-
|
||||
|
||||
|
||||
@@ -1,14 +1,19 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: pascal
|
||||
" Maintainer: Dan Sharp <dwsharp at users dot sourceforge dot net>
|
||||
" Last Changed: 20 Jan 2009
|
||||
" Last Changed: 11 Apr 2011
|
||||
" URL: http://dwsharp.users.sourceforge.net/vim/ftplugin
|
||||
|
||||
if exists("b:did_ftplugin") | finish | endif
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
if exists("loaded_matchit")
|
||||
let b:match_words='\<\%(begin\|case\|try\)\>:\<end\>'
|
||||
let b:match_ignorecase = 1 " (pascal is case-insensitive)
|
||||
|
||||
let b:match_words = '\<\%(begin\|case\|record\|object\|try\)\>'
|
||||
let b:match_words .= ':\<^\s*\%(except\|finally\)\>:\<end\>'
|
||||
let b:match_words .= ',\<repeat\>:\<until\>'
|
||||
let b:match_words .= ',\<if\>:\<else\>'
|
||||
endif
|
||||
|
||||
" Undo the stuff we changed.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: Vim's quickfix window
|
||||
" Maintainer: Lech Lorens <Lech.Lorens@gmail.com>
|
||||
" Last Changed: 22 Jul 2010
|
||||
" Last Changed: 18 Dec 2010
|
||||
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
@@ -10,7 +10,7 @@ endif
|
||||
" Don't load another plugin for this buffer
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
let b:undo_ftplugin = "setl stl<"
|
||||
let b:undo_ftplugin = "set stl<"
|
||||
|
||||
" Display the command that produced the list in the quickfix window:
|
||||
setlocal stl=%q%{exists('w:quickfix_title')?\ '\ '.w:quickfix_title\ :\ ''}
|
||||
setlocal stl=%t%{exists('w:quickfix_title')?\ '\ '.w:quickfix_title\ :\ ''}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
" SQL filetype plugin file
|
||||
" Language: SQL (Common for Oracle, Microsoft SQL Server, Sybase)
|
||||
" Version: 7.0
|
||||
" Maintainer: David Fishburn <fishburn at ianywhere dot com>
|
||||
" Last Change: 2010 Jun 11
|
||||
" Version: 8.0
|
||||
" Maintainer: David Fishburn <dfishburn dot vim at gmail dot com>
|
||||
" Last Change: 2011 Apr 01
|
||||
" Download: http://vim.sourceforge.net/script.php?script_id=454
|
||||
|
||||
" For more details please use:
|
||||
@@ -36,6 +36,10 @@
|
||||
"
|
||||
" History
|
||||
"
|
||||
" Version 8.0
|
||||
"
|
||||
" NF: Improved the matchit plugin regex (Talek)
|
||||
"
|
||||
" Version 7.0
|
||||
"
|
||||
" NF: Calls the sqlcomplete#ResetCacheSyntax() function when calling
|
||||
@@ -290,6 +294,7 @@ if !exists("b:match_words")
|
||||
" WHEN OTHERS THEN
|
||||
"
|
||||
" create[ or replace] procedure|function|event
|
||||
" \ '^\s*\<\%(do\|for\|while\|loop\)\>.*:'.
|
||||
|
||||
let b:match_words =
|
||||
\ '\<begin\>:\<end\>\W*$,'.
|
||||
@@ -298,12 +303,9 @@ if !exists("b:match_words")
|
||||
\ '\<elsif\>\|\<elseif\>\|\<else\>:'.
|
||||
\ '\<end\s\+if\>,'.
|
||||
\
|
||||
\ '\<do\>\|'.
|
||||
\ '\<while\>\|'.
|
||||
\ '\%(' . s:notend . '\<loop\>\)\|'.
|
||||
\ '\%(' . s:notend . '\<for\>\):'.
|
||||
\ '\<exit\>\|\<leave\>\|\<break\>\|\<continue\>:'.
|
||||
\ '\%(\<end\s\+\%(for\|loop\>\)\)\|\<doend\>,'.
|
||||
\ '\(^\s*\)\@<=\(\<\%(do\|for\|while\|loop\)\>.*\):'.
|
||||
\ '\%(\<exit\>\|\<leave\>\|\<break\>\|\<continue\>\):'.
|
||||
\ '\%(\<doend\>\|\%(\<end\s\+\%(for\|while\|loop\>\)\)\),'.
|
||||
\
|
||||
\ '\%('. s:notend . '\<case\>\):'.
|
||||
\ '\%('.s:when_no_matched_or_others.'\):'.
|
||||
|
||||
19
runtime/ftplugin/treetop.vim
Normal file
19
runtime/ftplugin/treetop.vim
Normal file
@@ -0,0 +1,19 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: Treetop
|
||||
" Maintainer: Nikolai Weibull <now@bitwi.se>
|
||||
" Latest Revision: 2011-03-14
|
||||
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
endif
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
let s:cpo_save = &cpo
|
||||
set cpo&vim
|
||||
|
||||
setlocal comments=b:# commentstring=#\ %s formatoptions-=tcroq formatoptions+=l
|
||||
|
||||
let b:undo_ftplugin = "setl com< cms< fo<"
|
||||
|
||||
let &cpo = s:cpo_save
|
||||
unlet s:cpo_save
|
||||
@@ -1,7 +1,7 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: Zsh shell script
|
||||
" Maintainer: Nikolai Weibull <now@bitwi.se>
|
||||
" Latest Revision: 2008-07-09
|
||||
" Latest Revision: 2011-01-23
|
||||
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
@@ -15,5 +15,12 @@ let b:undo_ftplugin = "setl com< cms< fo<"
|
||||
|
||||
setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql
|
||||
|
||||
let b:match_words =
|
||||
\ &matchpairs
|
||||
\ . ',\<if\>:\<elif\>:\<else\>:\<fi\>'
|
||||
\ . ',\<case\>:^\s*([^)]*):\<esac\>'
|
||||
\ . ',\<\%(select\|while\|until\|repeat\|for\%(each\)\=\)\>:\<done\>'
|
||||
let b:match_skip = 's:comment\|string\|heredoc\|subst'
|
||||
|
||||
let &cpo = s:cpo_save
|
||||
unlet s:cpo_save
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
" 26-04-2002 Got initial version working reasonably well
|
||||
" 29-04-2002 Fixed problems in function headers and max line width
|
||||
" Added support for two-line if's without curly braces
|
||||
" Fixed hang: 2011 Aug 31
|
||||
|
||||
" Only load this indent file when no other was loaded.
|
||||
if exists("b:did_indent")
|
||||
@@ -118,7 +119,7 @@ function! GetAwkIndent()
|
||||
|
||||
" Case 1
|
||||
if prev_data =~ ')' && brace_balance < 0
|
||||
while brace_balance != 0
|
||||
while brace_balance != 0 && prev_lineno > 0
|
||||
let prev_lineno = s:Get_prev_line( prev_lineno )
|
||||
let prev_data = getline( prev_lineno )
|
||||
let brace_balance=brace_balance+s:Get_brace_balance(prev_data,'(',')' )
|
||||
@@ -188,6 +189,9 @@ endfunction
|
||||
|
||||
function! s:Seems_continuing( line )
|
||||
" Unfinished lines
|
||||
if a:line =~ '\(--\|++\)\s*$'
|
||||
return 0
|
||||
endif
|
||||
if a:line =~ '[\\,\|\&\+\-\*\%\^]\s*$'
|
||||
return 1
|
||||
endif
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" Vim indent file
|
||||
" Language: CSS
|
||||
" Maintainer: Nikolai Weibull <now@bitwi.se>
|
||||
" Latest Revision: 2006-12-20
|
||||
" Latest Revision: 2010-12-22
|
||||
|
||||
if exists("b:did_indent")
|
||||
finish
|
||||
@@ -64,8 +64,6 @@ function GetCSSIndent()
|
||||
let line = getline(v:lnum)
|
||||
if line =~ '^\s*\*'
|
||||
return cindent(v:lnum)
|
||||
elseif line =~ '^\s*}'
|
||||
return indent(v:lnum) - &sw
|
||||
endif
|
||||
|
||||
let pnum = s:prevnonblanknoncomment(v:lnum - 1)
|
||||
@@ -73,12 +71,6 @@ function GetCSSIndent()
|
||||
return 0
|
||||
endif
|
||||
|
||||
let ind = indent(pnum) + s:count_braces(pnum, 1) * &sw
|
||||
|
||||
let pline = getline(pnum)
|
||||
if pline =~ '}\s*$'
|
||||
let ind -= (s:count_braces(pnum, 0) - (pline =~ '^\s*}' ? 1 : 0)) * &sw
|
||||
endif
|
||||
|
||||
return ind
|
||||
return indent(pnum) + s:count_braces(pnum, 1) * &sw
|
||||
\ - s:count_braces(v:lnum, 0) * &sw
|
||||
endfunction
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" Vim indent file
|
||||
" Language: DTD (Document Type Definition for XML)
|
||||
" Maintainer: Nikolai Weibull <now@bitwi.se>
|
||||
" Latest Revision: 2010-09-21
|
||||
" Latest Revision: 2011-07-08
|
||||
|
||||
let s:cpo_save = &cpo
|
||||
set cpo&vim
|
||||
@@ -52,7 +52,7 @@ function s:indent_to_innermost_parentheses(line, end)
|
||||
let end = a:end
|
||||
let parentheses = [end - 1]
|
||||
while token != ""
|
||||
let [token, end] = s:lex(a:line, end, '^\%([(),|]\|[A-Za-z0-9_-]\+\|#PCDATA\|%[A-Za-z0-9_-]\+;\)[?*+]\=')
|
||||
let [token, end] = s:lex(a:line, end, '^\%([(),|]\|[A-Za-z0-9_-]\+\|#P\=CDATA\|%[A-Za-z0-9_-]\+;\)[?*+]\=')
|
||||
if token[0] == '('
|
||||
call add(parentheses, end - 1)
|
||||
elseif token[0] == ')'
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" Vim indent file
|
||||
" Language: Fortran95 (and Fortran90, Fortran77, F and elf90)
|
||||
" Version: 0.38
|
||||
" Last Change: 2010 July 21
|
||||
" Version: 0.39
|
||||
" Last Change: 2011 May 30
|
||||
" Maintainer: Ajit J. Thakkar <ajit@unb.ca>; <http://www.unb.ca/chem/ajit/>
|
||||
" Usage: Do :help fortran-indent from Vim
|
||||
|
||||
@@ -12,8 +12,14 @@ endif
|
||||
let b:did_indent = 1
|
||||
|
||||
setlocal indentkeys+==~end,=~case,=~if,=~else,=~do,=~where,=~elsewhere,=~select
|
||||
setlocal indentkeys+==~endif,=~enddo,=~endwhere,=~endselect
|
||||
setlocal indentkeys+==~type,=~interface
|
||||
setlocal indentkeys+==~endif,=~enddo,=~endwhere,=~endselect,=~elseif
|
||||
setlocal indentkeys+==~type,=~interface,=~forall,=~associate,=~block,=~enum
|
||||
setlocal indentkeys+==~endforall,=~endassociate,=~endblock,=~endenum
|
||||
if exists("b:fortran_indent_more") || exists("g:fortran_indent_more")
|
||||
setlocal indentkeys+==~function,=~subroutine,=~module,=~contains,=~program
|
||||
setlocal indentkeys+==~endfunction,=~endsubroutine,=~endmodule
|
||||
setlocal indentkeys+==~endprogram
|
||||
endif
|
||||
|
||||
" Determine whether this is a fixed or free format source file
|
||||
" if this hasn't been done yet
|
||||
@@ -69,6 +75,8 @@ function FortranGetIndent(lnum)
|
||||
let prevline=getline(a:lnum)
|
||||
" Strip tail comment
|
||||
let prevstat=substitute(prevline, '!.*$', '', '')
|
||||
let prev2line=getline(a:lnum-1)
|
||||
let prev2stat=substitute(prev2line, '!.*$', '', '')
|
||||
|
||||
"Indent do loops only if they are all guaranteed to be of do/end do type
|
||||
if exists("b:fortran_do_enddo") || exists("g:fortran_do_enddo")
|
||||
@@ -80,31 +88,62 @@ function FortranGetIndent(lnum)
|
||||
endif
|
||||
endif
|
||||
|
||||
"Add a shiftwidth to statements following if, else, case,
|
||||
"where, elsewhere, type and interface statements
|
||||
if prevstat =~? '^\s*\(\d\+\s\)\=\s*\(else\|case\|where\|elsewhere\)\>'
|
||||
\ ||prevstat =~? '^\s*\(\d\+\s\)\=\s*\(type\|interface\)\>'
|
||||
\ || prevstat =~? '^\s*\(\d\+\s\)\=\s*\(\a\w*\s*:\)\=\s*if\>'
|
||||
"Add a shiftwidth to statements following if, else, else if, case,
|
||||
"where, else where, forall, type, interface and associate statements
|
||||
if prevstat =~? '^\s*\(case\|else\|else\s*if\|else\s*where\)\>'
|
||||
\ ||prevstat=~? '^\s*\(type\|interface\|associate\|enum\)\>'
|
||||
\ ||prevstat=~?'^\s*\(\d\+\s\)\=\s*\(\a\w*\s*:\)\=\s*\(forall\|where\|block\)\>'
|
||||
\ ||prevstat=~? '^\s*\(\d\+\s\)\=\s*\(\a\w*\s*:\)\=\s*if\>'
|
||||
let ind = ind + &sw
|
||||
" Remove unwanted indent after logical and arithmetic ifs
|
||||
if prevstat =~? '\<if\>' && prevstat !~? '\<then\>'
|
||||
let ind = ind - &sw
|
||||
endif
|
||||
" Remove unwanted indent after type( statements
|
||||
if prevstat =~? '\<type\s*('
|
||||
if prevstat =~? '^\s*type\s*('
|
||||
let ind = ind - &sw
|
||||
endif
|
||||
endif
|
||||
|
||||
"Subtract a shiftwidth from else, elsewhere, case, end if,
|
||||
" end where, end select, end interface and end type statements
|
||||
if getline(v:lnum) =~? '^\s*\(\d\+\s\)\=\s*'
|
||||
\. '\(else\|elsewhere\|case\|end\s*\(if\|where\|select\|interface\|type\)\)\>'
|
||||
let ind = ind - &sw
|
||||
" Fix indent for case statement immediately after select
|
||||
if prevstat =~? '\<select\>'
|
||||
"Indent program units unless instructed otherwise
|
||||
if !exists("b:fortran_indent_less") && !exists("g:fortran_indent_less")
|
||||
let prefix='\(\(pure\|impure\|elemental\|recursive\)\s\+\)\{,2}'
|
||||
let type='\(\(integer\|real\|double\s\+precision\|complex\|logical'
|
||||
\.'\|character\|type\|class\)\s*\S*\s\+\)\='
|
||||
if prevstat =~? '^\s*\(module\|contains\|program\)\>'
|
||||
\ ||prevstat =~? '^\s*'.prefix.'subroutine\>'
|
||||
\ ||prevstat =~? '^\s*'.prefix.type.'function\>'
|
||||
\ ||prevstat =~? '^\s*'.type.prefix.'function\>'
|
||||
let ind = ind + &sw
|
||||
endif
|
||||
if getline(v:lnum) =~? '^\s*contains\>'
|
||||
\ ||getline(v:lnum)=~? '^\s*end\s*'
|
||||
\ .'\(function\|subroutine\|module\|program\)\>'
|
||||
let ind = ind - &sw
|
||||
endif
|
||||
endif
|
||||
|
||||
"Subtract a shiftwidth from else, else if, elsewhere, case, end if,
|
||||
" end where, end select, end forall, end interface, end associate,
|
||||
" end enum, and end type statements
|
||||
if getline(v:lnum) =~? '^\s*\(\d\+\s\)\=\s*'
|
||||
\. '\(else\|else\s*if\|else\s*where\|case\|'
|
||||
\. 'end\s*\(if\|where\|select\|interface\|'
|
||||
\. 'type\|forall\|associate\|enum\)\)\>'
|
||||
let ind = ind - &sw
|
||||
" Fix indent for case statement immediately after select
|
||||
if prevstat =~? '\<select\s\+\(case\|type\)\>'
|
||||
let ind = ind + &sw
|
||||
endif
|
||||
endif
|
||||
|
||||
"First continuation line
|
||||
if prevstat =~ '&\s*$' && prev2stat !~ '&\s*$'
|
||||
let ind = ind + &sw
|
||||
endif
|
||||
"Line after last continuation line
|
||||
if prevstat !~ '&\s*$' && prev2stat =~ '&\s*$'
|
||||
let ind = ind - &sw
|
||||
endif
|
||||
|
||||
return ind
|
||||
|
||||
@@ -2,7 +2,11 @@
|
||||
" Language: Pascal
|
||||
" Maintainer: Neil Carter <n.carter@swansea.ac.uk>
|
||||
" Created: 2004 Jul 13
|
||||
" Last Change: 2005 Jul 05
|
||||
" Last Change: 2011 Apr 01
|
||||
"
|
||||
" This is version 2.0, a complete rewrite.
|
||||
"
|
||||
" For further documentation, see http://psy.swansea.ac.uk/staff/carter/vim/
|
||||
|
||||
|
||||
if exists("b:did_indent")
|
||||
@@ -38,7 +42,15 @@ function! s:GetPrevNonCommentLineNum( line_num )
|
||||
endfunction
|
||||
|
||||
|
||||
function! s:PurifyCode( line_num )
|
||||
" Strip any trailing comments and whitespace
|
||||
let pureline = 'TODO'
|
||||
return pureline
|
||||
endfunction
|
||||
|
||||
|
||||
function! GetPascalIndent( line_num )
|
||||
|
||||
" Line 0 always goes at column 0
|
||||
if a:line_num == 0
|
||||
return 0
|
||||
@@ -46,128 +58,171 @@ function! GetPascalIndent( line_num )
|
||||
|
||||
let this_codeline = getline( a:line_num )
|
||||
|
||||
" If in the middle of a three-part comment
|
||||
|
||||
" SAME INDENT
|
||||
|
||||
" Middle of a three-part comment
|
||||
if this_codeline =~ '^\s*\*'
|
||||
return indent( a:line_num )
|
||||
return indent( a:line_num - 1)
|
||||
endif
|
||||
|
||||
|
||||
" COLUMN 1 ALWAYS
|
||||
|
||||
" Last line of the program
|
||||
if this_codeline =~ '^\s*end\.'
|
||||
return 0
|
||||
endif
|
||||
|
||||
" Compiler directives, allowing "(*" and "{"
|
||||
"if this_codeline =~ '^\s*\({\|(\*\)$\(IFDEF\|IFNDEF\|ELSE\|ENDIF\)'
|
||||
if this_codeline =~ '^\s*\({\|(\*\)\$'
|
||||
return 0
|
||||
endif
|
||||
|
||||
" section headers
|
||||
if this_codeline =~ '^\s*\(program\|procedure\|function\|type\)\>'
|
||||
return 0
|
||||
endif
|
||||
|
||||
" Subroutine separators, lines ending with "const" or "var"
|
||||
if this_codeline =~ '^\s*\((\*\ _\+\ \*)\|\(const\|var\)\)$'
|
||||
return 0
|
||||
endif
|
||||
|
||||
|
||||
" OTHERWISE, WE NEED TO LOOK FURTHER BACK...
|
||||
|
||||
let prev_codeline_num = s:GetPrevNonCommentLineNum( a:line_num )
|
||||
let prev_codeline = getline( prev_codeline_num )
|
||||
let indnt = indent( prev_codeline_num )
|
||||
|
||||
" Compiler directives should always go in column zero.
|
||||
if this_codeline =~ '^\s*{\(\$IFDEF\|\$ELSE\|\$ENDIF\)'
|
||||
return 0
|
||||
|
||||
" INCREASE INDENT
|
||||
|
||||
" If the PREVIOUS LINE ended in these items, always indent
|
||||
if prev_codeline =~ '\<\(type\|const\|var\)$'
|
||||
return indnt + &shiftwidth
|
||||
endif
|
||||
|
||||
" These items have nothing before or after (not even a comment), and
|
||||
" go on column 0. Make sure that the ^\s* is followed by \( to make
|
||||
" ORs work properly, and not include the start of line (this must
|
||||
" always appear).
|
||||
" The bracketed expression with the underline is a routine
|
||||
" separator. This is one case where we do indent comment lines.
|
||||
if this_codeline =~ '^\s*\((\*\ _\+\ \*)\|\<\(const\|var\)\>\)$'
|
||||
return 0
|
||||
endif
|
||||
|
||||
" These items may have text after them, and go on column 0 (in most
|
||||
" cases). The problem is that "function" and "procedure" keywords
|
||||
" should be indented if within a class declaration.
|
||||
if this_codeline =~ '^\s*\<\(program\|type\|uses\|procedure\|function\)\>'
|
||||
return 0
|
||||
endif
|
||||
|
||||
" BEGIN
|
||||
" If the begin does not come after "if", "for", or "else", then it
|
||||
" goes in column 0
|
||||
if this_codeline =~ '^\s*begin\>' && prev_codeline !~ '^\s*\<\(if\|for\|else\)\>'
|
||||
return 0
|
||||
endif
|
||||
|
||||
" These keywords are indented once only.
|
||||
if this_codeline =~ '^\s*\<\(private\)\>'
|
||||
return &shiftwidth
|
||||
endif
|
||||
|
||||
" If the PREVIOUS LINE contained these items, the current line is
|
||||
" always indented once.
|
||||
if prev_codeline =~ '^\s*\<\(type\|uses\)\>'
|
||||
return &shiftwidth
|
||||
endif
|
||||
|
||||
" These keywords are indented once only. Possibly surrounded by
|
||||
" other chars.
|
||||
if this_codeline =~ '^.\+\<\(object\|record\)\>'
|
||||
return &shiftwidth
|
||||
endif
|
||||
|
||||
" If the previous line was indenting...
|
||||
if prev_codeline =~ '^\s*\<\(for\|if\|case\|else\|end\ else\)\>'
|
||||
" then indent.
|
||||
let indnt = indnt + &shiftwidth
|
||||
" BUT... if this is the start of a multistatement block then we
|
||||
" need to align the begin with the previous line.
|
||||
if this_codeline =~ '^\s*begin\>'
|
||||
return indnt - &shiftwidth
|
||||
endif
|
||||
|
||||
" We also need to keep the indentation level constant if the
|
||||
" whole if-then statement was on one line.
|
||||
if prev_codeline =~ '\<then\>.\+'
|
||||
let indnt = indnt - &shiftwidth
|
||||
endif
|
||||
endif
|
||||
|
||||
" PREVIOUS-LINE BEGIN
|
||||
" If the previous line was an indenting keyword then indent once...
|
||||
if prev_codeline =~ '^\s*\<\(const\|var\|begin\|repeat\|private\)\>'
|
||||
" But only if this is another var in a list.
|
||||
if this_codeline !~ '^\s*var\>'
|
||||
if prev_codeline =~ '\<repeat$'
|
||||
if this_codeline !~ '^\s*until\>'
|
||||
return indnt + &shiftwidth
|
||||
else
|
||||
return indnt
|
||||
endif
|
||||
endif
|
||||
|
||||
" PREVIOUS-LINE BEGIN
|
||||
" Indent code after a case statement begin
|
||||
if prev_codeline =~ '\:\ begin\>'
|
||||
if prev_codeline =~ '\<\(begin\|record\)$'
|
||||
if this_codeline !~ '^\s*end\>'
|
||||
return indnt + &shiftwidth
|
||||
else
|
||||
return indnt
|
||||
endif
|
||||
endif
|
||||
|
||||
" If the PREVIOUS LINE ended with these items, indent if not
|
||||
" followed by "begin"
|
||||
if prev_codeline =~ '\<\(\|else\|then\|do\)$' || prev_codeline =~ ':$'
|
||||
if this_codeline !~ '^\s*begin\>'
|
||||
return indnt + &shiftwidth
|
||||
else
|
||||
" If it does start with "begin" then keep the same indent
|
||||
"return indnt + &shiftwidth
|
||||
return indnt
|
||||
endif
|
||||
endif
|
||||
|
||||
" Inside a parameter list (i.e. a "(" without a ")"). ???? Considers
|
||||
" only the line before the current one. TODO: Get it working for
|
||||
" parameter lists longer than two lines.
|
||||
if prev_codeline =~ '([^)]\+$'
|
||||
return indnt + &shiftwidth
|
||||
endif
|
||||
|
||||
" These words may have text before them on the line (hence the .*)
|
||||
" but are followed by nothing. Always indent once only.
|
||||
if prev_codeline =~ '^\(.*\|\s*\)\<\(object\|record\)\>$'
|
||||
return indnt + &shiftwidth
|
||||
endif
|
||||
|
||||
" If we just closed a bracket that started on a previous line, then
|
||||
" unindent. But don't return yet -- we need to check for further
|
||||
" unindentation (for end/until/else)
|
||||
if prev_codeline =~ '^[^(]*[^*])'
|
||||
let indnt = indnt - &shiftwidth
|
||||
endif
|
||||
" DECREASE INDENT
|
||||
|
||||
" At the end of a block, we have to unindent both the current line
|
||||
" (the "end" for instance) and the newly-created line.
|
||||
if this_codeline =~ '^\s*\<\(end\|until\|else\)\>'
|
||||
" Lines starting with "else", but not following line ending with
|
||||
" "end".
|
||||
if this_codeline =~ '^\s*else\>' && prev_codeline !~ '\<end$'
|
||||
return indnt - &shiftwidth
|
||||
endif
|
||||
|
||||
" If we have opened a bracket and it continues over one line,
|
||||
" then indent once.
|
||||
"
|
||||
" RE = an opening bracket followed by any amount of anything other
|
||||
" than a closing bracket and then the end-of-line.
|
||||
"
|
||||
" If we didn't include the end of line, this RE would match even
|
||||
" closed brackets, since it would match everything up to the closing
|
||||
" bracket.
|
||||
"
|
||||
" This test isn't clever enough to handle brackets inside strings or
|
||||
" comments.
|
||||
if prev_codeline =~ '([^*]\=[^)]*$'
|
||||
" Lines after a single-statement branch/loop.
|
||||
" Two lines before ended in "then", "else", or "do"
|
||||
" Previous line didn't end in "begin"
|
||||
let prev2_codeline_num = s:GetPrevNonCommentLineNum( prev_codeline_num )
|
||||
let prev2_codeline = getline( prev2_codeline_num )
|
||||
if prev2_codeline =~ '\<\(then\|else\|do\)$' && prev_codeline !~ '\<begin$'
|
||||
" If the next code line after a single statement branch/loop
|
||||
" starts with "end", "except" or "finally", we need an
|
||||
" additional unindentation.
|
||||
if this_codeline =~ '^\s*\(end;\|except\|finally\|\)$'
|
||||
" Note that we don't return from here.
|
||||
return indnt - &shiftwidth - &shiftwidth
|
||||
endif
|
||||
return indnt - &shiftwidth
|
||||
endif
|
||||
|
||||
" Lines starting with "until" or "end". This rule must be overridden
|
||||
" by the one for "end" after a single-statement branch/loop. In
|
||||
" other words that rule should come before this one.
|
||||
if this_codeline =~ '^\s*\(end\|until\)\>'
|
||||
return indnt - &shiftwidth
|
||||
endif
|
||||
|
||||
|
||||
" MISCELLANEOUS THINGS TO CATCH
|
||||
|
||||
" Most "begin"s will have been handled by now. Any remaining
|
||||
" "begin"s on their own line should go in column 1.
|
||||
if this_codeline =~ '^\s*begin$'
|
||||
return 0
|
||||
endif
|
||||
|
||||
|
||||
" ____________________________________________________________________
|
||||
" Object/Borland Pascal/Delphi Extensions
|
||||
"
|
||||
" Note that extended-pascal is handled here, unless it is simpler to
|
||||
" handle them in the standard-pascal section above.
|
||||
|
||||
|
||||
" COLUMN 1 ALWAYS
|
||||
|
||||
" section headers at start of line.
|
||||
if this_codeline =~ '^\s*\(interface\|implementation\|uses\|unit\)\>'
|
||||
return 0
|
||||
endif
|
||||
|
||||
|
||||
" INDENT ONCE
|
||||
|
||||
" If the PREVIOUS LINE ended in these items, always indent.
|
||||
if prev_codeline =~ '^\s*\(unit\|uses\|try\|except\|finally\|private\|protected\|public\|published\)$'
|
||||
return indnt + &shiftwidth
|
||||
endif
|
||||
|
||||
" ???? Indent "procedure" and "functions" if they appear within an
|
||||
" class/object definition. But that means overriding standard-pascal
|
||||
" rule where these words always go in column 1.
|
||||
|
||||
|
||||
" UNINDENT ONCE
|
||||
|
||||
if this_codeline =~ '^\s*\(except\|finally\)$'
|
||||
return indnt - &shiftwidth
|
||||
endif
|
||||
|
||||
if this_codeline =~ '^\s*\(private\|protected\|public\|published\)$'
|
||||
return indnt - &shiftwidth
|
||||
endif
|
||||
|
||||
|
||||
" ____________________________________________________________________
|
||||
|
||||
" If nothing changed, return same indent.
|
||||
return indnt
|
||||
endfunction
|
||||
|
||||
|
||||
482
runtime/indent/r.vim
Normal file
482
runtime/indent/r.vim
Normal file
@@ -0,0 +1,482 @@
|
||||
" Vim indent file
|
||||
" Language: R
|
||||
" Author: Jakson Alves de Aquino <jalvesaq@gmail.com>
|
||||
" Last Change: Wed Aug 31, 2011 12:24AM
|
||||
|
||||
|
||||
" Only load this indent file when no other was loaded.
|
||||
if exists("b:did_r_indent")
|
||||
finish
|
||||
endif
|
||||
let b:did_r_indent = 1
|
||||
|
||||
setlocal indentkeys=0{,0},:,!^F,o,O,e
|
||||
setlocal indentexpr=GetRIndent()
|
||||
|
||||
" Only define the function once.
|
||||
if exists("*GetRIndent")
|
||||
finish
|
||||
endif
|
||||
|
||||
" Options to make the indentation more similar to Emacs/ESS:
|
||||
if !exists("g:r_indent_align_args")
|
||||
let g:r_indent_align_args = 1
|
||||
endif
|
||||
if !exists("g:r_indent_ess_comments")
|
||||
let g:r_indent_ess_comments = 0
|
||||
endif
|
||||
if !exists("g:r_indent_comment_column")
|
||||
let g:r_indent_comment_column = 40
|
||||
endif
|
||||
if ! exists("g:r_indent_ess_compatible")
|
||||
let g:r_indent_ess_compatible = 0
|
||||
endif
|
||||
|
||||
function s:RDelete_quotes(line)
|
||||
let i = 0
|
||||
let j = 0
|
||||
let line1 = ""
|
||||
let llen = strlen(a:line)
|
||||
while i < llen
|
||||
if a:line[i] == '"'
|
||||
let i += 1
|
||||
let line1 = line1 . 's'
|
||||
while !(a:line[i] == '"' && ((i > 1 && a:line[i-1] == '\' && a:line[i-2] == '\') || a:line[i-1] != '\')) && i < llen
|
||||
let i += 1
|
||||
endwhile
|
||||
if a:line[i] == '"'
|
||||
let i += 1
|
||||
endif
|
||||
else
|
||||
if a:line[i] == "'"
|
||||
let i += 1
|
||||
let line1 = line1 . 's'
|
||||
while !(a:line[i] == "'" && ((i > 1 && a:line[i-1] == '\' && a:line[i-2] == '\') || a:line[i-1] != '\')) && i < llen
|
||||
let i += 1
|
||||
endwhile
|
||||
if a:line[i] == "'"
|
||||
let i += 1
|
||||
endif
|
||||
else
|
||||
if a:line[i] == "`"
|
||||
let i += 1
|
||||
let line1 = line1 . 's'
|
||||
while a:line[i] != "`" && i < llen
|
||||
let i += 1
|
||||
endwhile
|
||||
if a:line[i] == "`"
|
||||
let i += 1
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
if i == llen
|
||||
break
|
||||
endif
|
||||
let line1 = line1 . a:line[i]
|
||||
let j += 1
|
||||
let i += 1
|
||||
endwhile
|
||||
return line1
|
||||
endfunction
|
||||
|
||||
" Convert foo(bar()) int foo()
|
||||
function s:RDelete_parens(line)
|
||||
if s:Get_paren_balance(a:line, "(", ")") != 0
|
||||
return a:line
|
||||
endif
|
||||
let i = 0
|
||||
let j = 0
|
||||
let line1 = ""
|
||||
let llen = strlen(a:line)
|
||||
while i < llen
|
||||
let line1 = line1 . a:line[i]
|
||||
if a:line[i] == '('
|
||||
let nop = 1
|
||||
while nop > 0 && i < llen
|
||||
let i += 1
|
||||
if a:line[i] == ')'
|
||||
let nop -= 1
|
||||
else
|
||||
if a:line[i] == '('
|
||||
let nop += 1
|
||||
endif
|
||||
endif
|
||||
endwhile
|
||||
let line1 = line1 . a:line[i]
|
||||
endif
|
||||
let i += 1
|
||||
endwhile
|
||||
return line1
|
||||
endfunction
|
||||
|
||||
function! s:Get_paren_balance(line, o, c)
|
||||
let line2 = substitute(a:line, a:o, "", "g")
|
||||
let openp = strlen(a:line) - strlen(line2)
|
||||
let line3 = substitute(line2, a:c, "", "g")
|
||||
let closep = strlen(line2) - strlen(line3)
|
||||
return openp - closep
|
||||
endfunction
|
||||
|
||||
function! s:Get_matching_brace(linenr, o, c, delbrace)
|
||||
let line = SanitizeRLine(getline(a:linenr))
|
||||
if a:delbrace == 1
|
||||
let line = substitute(line, '{$', "", "")
|
||||
endif
|
||||
let pb = s:Get_paren_balance(line, a:o, a:c)
|
||||
let i = a:linenr
|
||||
while pb != 0 && i > 1
|
||||
let i -= 1
|
||||
let pb += s:Get_paren_balance(SanitizeRLine(getline(i)), a:o, a:c)
|
||||
endwhile
|
||||
return i
|
||||
endfunction
|
||||
|
||||
" This function is buggy because there 'if's without 'else'
|
||||
" It must be rewritten relying more on indentation
|
||||
function! s:Get_matching_if(linenr, delif)
|
||||
" let filenm = expand("%")
|
||||
" call writefile([filenm], "/tmp/matching_if_" . a:linenr)
|
||||
let line = SanitizeRLine(getline(a:linenr))
|
||||
if a:delif
|
||||
let line = substitute(line, "if", "", "g")
|
||||
endif
|
||||
let elsenr = 0
|
||||
let i = a:linenr
|
||||
let ifhere = 0
|
||||
while i > 0
|
||||
let line2 = substitute(line, '\<else\>', "xxx", "g")
|
||||
let elsenr += strlen(line) - strlen(line2)
|
||||
if line =~ '.*\s*if\s*()' || line =~ '.*\s*if\s*()'
|
||||
let elsenr -= 1
|
||||
if elsenr == 0
|
||||
let ifhere = i
|
||||
break
|
||||
endif
|
||||
endif
|
||||
let i -= 1
|
||||
let line = SanitizeRLine(getline(i))
|
||||
endwhile
|
||||
if ifhere
|
||||
return ifhere
|
||||
else
|
||||
return a:linenr
|
||||
endif
|
||||
endfunction
|
||||
|
||||
function! s:Get_last_paren_idx(line, o, c, pb)
|
||||
let blc = a:pb
|
||||
let line = substitute(a:line, '\t', s:curtabstop, "g")
|
||||
let theidx = -1
|
||||
let llen = strlen(line)
|
||||
let idx = 0
|
||||
while idx < llen
|
||||
if line[idx] == a:o
|
||||
let blc -= 1
|
||||
if blc == 0
|
||||
let theidx = idx
|
||||
endif
|
||||
else
|
||||
if line[idx] == a:c
|
||||
let blc += 1
|
||||
endif
|
||||
endif
|
||||
let idx += 1
|
||||
endwhile
|
||||
return theidx + 1
|
||||
endfunction
|
||||
|
||||
" Get previous relevant line. Search back until getting a line that isn't
|
||||
" comment or blank
|
||||
function s:Get_prev_line(lineno)
|
||||
let lnum = a:lineno - 1
|
||||
let data = getline( lnum )
|
||||
while lnum > 0 && (data =~ '^\s*#' || data =~ '^\s*$')
|
||||
let lnum = lnum - 1
|
||||
let data = getline( lnum )
|
||||
endwhile
|
||||
return lnum
|
||||
endfunction
|
||||
|
||||
" This function is also used by r-plugin/common_global.vim
|
||||
" Delete from '#' to the end of the line, unless the '#' is inside a string.
|
||||
function SanitizeRLine(line)
|
||||
let newline = s:RDelete_quotes(a:line)
|
||||
let newline = s:RDelete_parens(newline)
|
||||
let newline = substitute(newline, '#.*', "", "")
|
||||
let newline = substitute(newline, '\s*$', "", "")
|
||||
return newline
|
||||
endfunction
|
||||
|
||||
function GetRIndent()
|
||||
|
||||
let clnum = line(".") " current line
|
||||
|
||||
let cline = getline(clnum)
|
||||
if cline =~ '^\s*#'
|
||||
if g:r_indent_ess_comments == 1
|
||||
if cline =~ '^\s*###'
|
||||
return 0
|
||||
endif
|
||||
if cline !~ '^\s*##'
|
||||
return g:r_indent_comment_column
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
let cline = SanitizeRLine(cline)
|
||||
|
||||
if cline =~ '^\s*}' || cline =~ '^\s*}\s*)$'
|
||||
let indline = s:Get_matching_brace(clnum, '{', '}', 1)
|
||||
if indline > 0 && indline != clnum
|
||||
let iline = SanitizeRLine(getline(indline))
|
||||
if s:Get_paren_balance(iline, "(", ")") == 0 || iline =~ '(\s*{$'
|
||||
return indent(indline)
|
||||
else
|
||||
let indline = s:Get_matching_brace(indline, '(', ')', 1)
|
||||
return indent(indline)
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
" Find the first non blank line above the current line
|
||||
let lnum = s:Get_prev_line(clnum)
|
||||
" Hit the start of the file, use zero indent.
|
||||
if lnum == 0
|
||||
return 0
|
||||
endif
|
||||
|
||||
let line = SanitizeRLine(getline(lnum))
|
||||
|
||||
if &filetype == "rhelp"
|
||||
if cline =~ '^\\dontshow{' || cline =~ '^\\dontrun{' || cline =~ '^\\donttest{' || cline =~ '^\\testonly{'
|
||||
return 0
|
||||
endif
|
||||
if line =~ '^\\examples{' || line =~ '^\\usage{' || line =~ '^\\dontshow{' || line =~ '^\\dontrun{' || line =~ '^\\donttest{' || line =~ '^\\testonly{'
|
||||
return 0
|
||||
endif
|
||||
if line =~ '^\\method{.*}{.*}(.*'
|
||||
let line = substitute(line, '^\\method{\(.*\)}{.*}', '\1', "")
|
||||
endif
|
||||
endif
|
||||
|
||||
if cline =~ '^\s*{'
|
||||
if g:r_indent_ess_compatible && line =~ ')$'
|
||||
let nlnum = lnum
|
||||
let nline = line
|
||||
while s:Get_paren_balance(nline, '(', ')') < 0
|
||||
let nlnum = s:Get_prev_line(nlnum)
|
||||
let nline = SanitizeRLine(getline(nlnum)) . nline
|
||||
endwhile
|
||||
if nline =~ '^\s*function\s*(' && indent(nlnum) == &sw
|
||||
return 0
|
||||
endif
|
||||
endif
|
||||
if s:Get_paren_balance(line, "(", ")") == 0
|
||||
return indent(lnum)
|
||||
endif
|
||||
endif
|
||||
|
||||
" line is an incomplete command:
|
||||
if line =~ '\<\(if\|while\|for\|function\)\s*()$' || line =~ '\<else$' || line =~ '<-$'
|
||||
return indent(lnum) + &sw
|
||||
endif
|
||||
|
||||
" Deal with () and []
|
||||
|
||||
let pb = s:Get_paren_balance(line, '(', ')')
|
||||
|
||||
if line =~ '^\s*{$' || line =~ '(\s*{' || (pb == 0 && (line =~ '{$' || line =~ '(\s*{$'))
|
||||
return indent(lnum) + &sw
|
||||
endif
|
||||
|
||||
let bb = s:Get_paren_balance(line, '[', ']')
|
||||
|
||||
let s:curtabstop = repeat(' ', &tabstop)
|
||||
if g:r_indent_align_args == 1
|
||||
|
||||
if pb == 0 && bb == 0 && (line =~ '.*[,&|\-\*+<>]$' || cline =~ '^\s*[,&|\-\*+<>]')
|
||||
return indent(lnum)
|
||||
endif
|
||||
|
||||
if pb > 0
|
||||
if &filetype == "rhelp"
|
||||
let ind = s:Get_last_paren_idx(line, '(', ')', pb)
|
||||
else
|
||||
let ind = s:Get_last_paren_idx(getline(lnum), '(', ')', pb)
|
||||
endif
|
||||
return ind
|
||||
endif
|
||||
|
||||
if pb < 0 && line =~ '.*[,&|\-\*+<>]$'
|
||||
let lnum = s:Get_prev_line(lnum)
|
||||
while pb < 1 && lnum > 0
|
||||
let line = SanitizeRLine(getline(lnum))
|
||||
let line = substitute(line, '\t', s:curtabstop, "g")
|
||||
let ind = strlen(line)
|
||||
while ind > 0
|
||||
if line[ind] == ')'
|
||||
let pb -= 1
|
||||
else
|
||||
if line[ind] == '('
|
||||
let pb += 1
|
||||
endif
|
||||
endif
|
||||
if pb == 1
|
||||
return ind + 1
|
||||
endif
|
||||
let ind -= 1
|
||||
endwhile
|
||||
let lnum -= 1
|
||||
endwhile
|
||||
return 0
|
||||
endif
|
||||
|
||||
if bb > 0
|
||||
let ind = s:Get_last_paren_idx(getline(lnum), '[', ']', bb)
|
||||
return ind
|
||||
endif
|
||||
endif
|
||||
|
||||
let post_block = 0
|
||||
if line =~ '}$'
|
||||
let lnum = s:Get_matching_brace(lnum, '{', '}', 0)
|
||||
let line = SanitizeRLine(getline(lnum))
|
||||
if lnum > 0 && line =~ '^\s*{'
|
||||
let lnum = s:Get_prev_line(lnum)
|
||||
let line = SanitizeRLine(getline(lnum))
|
||||
endif
|
||||
let pb = s:Get_paren_balance(line, '(', ')')
|
||||
let post_block = 1
|
||||
endif
|
||||
|
||||
let post_fun = 0
|
||||
if pb < 0 && line !~ ')\s*[,&|\-\*+<>]$'
|
||||
let post_fun = 1
|
||||
while pb < 0 && lnum > 0
|
||||
let lnum -= 1
|
||||
let linepiece = SanitizeRLine(getline(lnum))
|
||||
let pb += s:Get_paren_balance(linepiece, "(", ")")
|
||||
let line = linepiece . line
|
||||
endwhile
|
||||
if line =~ '{$' && post_block == 0
|
||||
return indent(lnum) + &sw
|
||||
endif
|
||||
|
||||
" Now we can do some tests again
|
||||
if cline =~ '^\s*{'
|
||||
return indent(lnum)
|
||||
endif
|
||||
if post_block == 0
|
||||
let newl = SanitizeRLine(line)
|
||||
if newl =~ '\<\(if\|while\|for\|function\)\s*()$' || newl =~ '\<else$' || newl =~ '<-$'
|
||||
return indent(lnum) + &sw
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
if cline =~ '^\s*else'
|
||||
if line =~ '<-\s*if\s*()'
|
||||
return indent(lnum) + &sw
|
||||
else
|
||||
if line =~ '\<if\s*()'
|
||||
return indent(lnum)
|
||||
else
|
||||
return indent(lnum) - &sw
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
if bb < 0 && line =~ '.*]'
|
||||
while bb < 0 && lnum > 0
|
||||
let lnum -= 1
|
||||
let linepiece = SanitizeRLine(getline(lnum))
|
||||
let bb += s:Get_paren_balance(linepiece, "[", "]")
|
||||
let line = linepiece . line
|
||||
endwhile
|
||||
let line = s:RDelete_parens(line)
|
||||
endif
|
||||
|
||||
let plnum = s:Get_prev_line(lnum)
|
||||
let ppost_else = 0
|
||||
if plnum > 0
|
||||
let pline = SanitizeRLine(getline(plnum))
|
||||
let ppost_block = 0
|
||||
if pline =~ '}$'
|
||||
let ppost_block = 1
|
||||
let plnum = s:Get_matching_brace(plnum, '{', '}', 0)
|
||||
let pline = SanitizeRLine(getline(plnum))
|
||||
if pline =~ '^\s*{$' && plnum > 0
|
||||
let plnum = s:Get_prev_line(plnum)
|
||||
let pline = SanitizeRLine(getline(plnum))
|
||||
endif
|
||||
endif
|
||||
|
||||
if pline =~ 'else$'
|
||||
let ppost_else = 1
|
||||
let plnum = s:Get_matching_if(plnum, 0)
|
||||
let pline = SanitizeRLine(getline(plnum))
|
||||
endif
|
||||
|
||||
if pline =~ '^\s*else\s*if\s*('
|
||||
let pplnum = s:Get_prev_line(plnum)
|
||||
let ppline = SanitizeRLine(getline(pplnum))
|
||||
while ppline =~ '^\s*else\s*if\s*(' || ppline =~ '^\s*if\s*()\s*\S$'
|
||||
let plnum = pplnum
|
||||
let pline = ppline
|
||||
let pplnum = s:Get_prev_line(plnum)
|
||||
let ppline = SanitizeRLine(getline(pplnum))
|
||||
endwhile
|
||||
while ppline =~ '\<\(if\|while\|for\|function\)\s*()$' || ppline =~ '\<else$' || ppline =~ '<-$'
|
||||
let plnum = pplnum
|
||||
let pline = ppline
|
||||
let pplnum = s:Get_prev_line(plnum)
|
||||
let ppline = SanitizeRLine(getline(pplnum))
|
||||
endwhile
|
||||
endif
|
||||
|
||||
let ppb = s:Get_paren_balance(pline, '(', ')')
|
||||
if ppb < 0 && (pline =~ ')\s*{$' || pline =~ ')$')
|
||||
while ppb < 0 && plnum > 0
|
||||
let plnum -= 1
|
||||
let linepiece = SanitizeRLine(getline(plnum))
|
||||
let ppb += s:Get_paren_balance(linepiece, "(", ")")
|
||||
let pline = linepiece . pline
|
||||
endwhile
|
||||
let pline = s:RDelete_parens(pline)
|
||||
endif
|
||||
endif
|
||||
|
||||
let ind = indent(lnum)
|
||||
let pind = indent(plnum)
|
||||
|
||||
if g:r_indent_align_args == 0 && pb != 0
|
||||
let ind += pb * &sw
|
||||
return ind
|
||||
endif
|
||||
|
||||
if ind == pind || (ind == (pind + &sw) && pline =~ '{$' && ppost_else == 0)
|
||||
return ind
|
||||
endif
|
||||
|
||||
while pind < ind && plnum > 0 && ppb == 0
|
||||
let ind = pind
|
||||
let plnum = s:Get_prev_line(plnum)
|
||||
let pline = getline(plnum)
|
||||
let ppb = s:Get_paren_balance(pline, '(', ')')
|
||||
while pline =~ '^\s*else'
|
||||
let plnum = s:Get_matching_if(plnum, 1)
|
||||
let pline = getline(plnum)
|
||||
let ppb = s:Get_paren_balance(pline, '(', ')')
|
||||
endwhile
|
||||
let pind = indent(plnum)
|
||||
if ind == (pind + &sw) && pline =~ '{$'
|
||||
return ind
|
||||
endif
|
||||
endwhile
|
||||
|
||||
return ind
|
||||
|
||||
endfunction
|
||||
|
||||
" vim: sw=4
|
||||
@@ -1,7 +1,7 @@
|
||||
" Vim indent file
|
||||
" Language: reStructuredText Documentation Format
|
||||
" Maintainer: Nikolai Weibull <now@bitwi.se>
|
||||
" Latest Revision: 2006-12-20
|
||||
" Latest Revision: 2011-08-03
|
||||
|
||||
if exists("b:did_indent")
|
||||
finish
|
||||
@@ -16,6 +16,9 @@ if exists("*GetRSTIndent")
|
||||
finish
|
||||
endif
|
||||
|
||||
let s:itemization_pattern = '^\s*[-*+]\s'
|
||||
let s:enumeration_pattern = '^\s*\%(\d\+\|#\)\.\s\+'
|
||||
|
||||
function GetRSTIndent()
|
||||
let lnum = prevnonblank(v:lnum - 1)
|
||||
if lnum == 0
|
||||
@@ -25,27 +28,30 @@ function GetRSTIndent()
|
||||
let ind = indent(lnum)
|
||||
let line = getline(lnum)
|
||||
|
||||
if line =~ '^\s*[-*+]\s'
|
||||
let ind = ind + 2
|
||||
elseif line =~ '^\s*\d\+.\s'
|
||||
let ind = ind + matchend(substitute(line, '^\s*', '', ''), '\d\+.\s\+')
|
||||
if line =~ s:itemization_pattern
|
||||
let ind += 2
|
||||
elseif line =~ s:enumeration_pattern
|
||||
let ind += matchend(line, s:enumeration_pattern)
|
||||
endif
|
||||
|
||||
let line = getline(v:lnum - 1)
|
||||
|
||||
" Indent :FIELD: lines. Don’t match if there is no text after the field or
|
||||
" if the text ends with a sent-ender.
|
||||
if line =~ '^:.\+:\s\{-1,\}\S.\+[^.!?:]$'
|
||||
return matchend(line, '^:.\{-1,}:\s\+')
|
||||
endif
|
||||
|
||||
if line =~ '^\s*$'
|
||||
execute lnum
|
||||
call search('^\s*\%([-*+]\s\|\d\+.\s\|\.\.\|$\)', 'bW')
|
||||
call search('^\s*\%([-*+]\s\|\%(\d\+\|#\)\.\s\|\.\.\|$\)', 'bW')
|
||||
let line = getline('.')
|
||||
if line =~ '^\s*[-*+]'
|
||||
let ind = ind - 2
|
||||
elseif line =~ '^\s*\d\+\.\s'
|
||||
let ind = ind - matchend(substitute(line, '^\s*', '', ''),
|
||||
\ '\d\+\.\s\+')
|
||||
if line =~ s:itemization_pattern
|
||||
let ind -= 2
|
||||
elseif line =~ s:enumeration_pattern
|
||||
let ind -= matchend(line, s:enumeration_pattern)
|
||||
elseif line =~ '^\s*\.\.'
|
||||
let ind = ind - 3
|
||||
else
|
||||
let ind = ind
|
||||
let ind -= 3
|
||||
endif
|
||||
endif
|
||||
|
||||
|
||||
38
runtime/indent/treetop.vim
Normal file
38
runtime/indent/treetop.vim
Normal file
@@ -0,0 +1,38 @@
|
||||
" Vim indent file
|
||||
" Language: Treetop
|
||||
" Maintainer: Nikolai Weibull <now@bitwi.se>
|
||||
" Latest Revision: 2011-03-14
|
||||
|
||||
if exists("b:did_indent")
|
||||
finish
|
||||
endif
|
||||
let b:did_indent = 1
|
||||
|
||||
setlocal indentexpr=GetTreetopIndent()
|
||||
setlocal indentkeys=0{,0},!^F,o,O,=end
|
||||
setlocal nosmartindent
|
||||
|
||||
if exists("*GetTreetopIndent")
|
||||
finish
|
||||
endif
|
||||
|
||||
function GetTreetopIndent()
|
||||
let pnum = prevnonblank(v:lnum - 1)
|
||||
if pnum == 0
|
||||
return 0
|
||||
endif
|
||||
|
||||
let ind = indent(pnum)
|
||||
let line = getline(pnum)
|
||||
|
||||
if line =~ '^\s*\%(grammar\|module\|rule\)\>'
|
||||
let ind += &sw
|
||||
endif
|
||||
|
||||
let line = getline(v:lnum)
|
||||
if line =~ '^\s*end\>'
|
||||
let ind -= &sw
|
||||
end
|
||||
|
||||
retur ind
|
||||
endfunction
|
||||
@@ -1,7 +1,7 @@
|
||||
" Vim indent file
|
||||
" Language: Vim script
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2005 Jul 06
|
||||
" Last Change: 2011 Mar 22
|
||||
|
||||
" Only load this indent file when no other was loaded.
|
||||
if exists("b:did_indent")
|
||||
@@ -44,10 +44,18 @@ function GetVimIndent()
|
||||
else
|
||||
let ind = ind + &sw * 3
|
||||
endif
|
||||
elseif getline(lnum) =~ '\(^\||\)\s*\(if\|wh\%[ile]\|for\|try\|cat\%[ch]\|fina\%[lly]\|fu\%[nction]\|el\%[seif]\)\>'
|
||||
let ind = ind + &sw
|
||||
elseif getline(lnum) =~ '^\s*aug\%[roup]' && getline(lnum) !~ '^\s*aug\%[roup]\s*!\=\s\+END'
|
||||
let ind = ind + &sw
|
||||
else
|
||||
let line = getline(lnum)
|
||||
let i = match(line, '\(^\||\)\s*\(if\|wh\%[ile]\|for\|try\|cat\%[ch]\|fina\%[lly]\|fu\%[nction]\|el\%[seif]\)\>')
|
||||
if i >= 0
|
||||
let ind += &sw
|
||||
if strpart(line, i, 1) == '|' && has('syntax_items')
|
||||
\ && synIDattr(synID(lnum, i, 1), "name") =~ '\(Comment\|String\)$'
|
||||
let ind -= &sw
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
" If the previous line contains an "end" after a pipe, but not in an ":au"
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
" vi:set ts=8 sts=8 sw=8 tw=0:
|
||||
"
|
||||
" Menu Translations: Japanese (EUC-JP)
|
||||
" Translated By: MURAOKA Taro <koron@tka.att.ne.jp>
|
||||
" Last Change: 18-Apr-2006.
|
||||
" Translated By: MURAOKA Taro <koron.kaoriya@gmail.com>
|
||||
" Last Change: 21-Mar-2011.
|
||||
|
||||
" Quit when menu translations have already been done.
|
||||
if exists("did_menu_trans")
|
||||
@@ -99,6 +99,8 @@ let g:menutrans_tags_dialog = "
|
||||
menutrans F&ile\ Settings <09>ե<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>(&I)
|
||||
menutrans Toggle\ Line\ &Numbering<Tab>:set\ nu!
|
||||
\ <09><><EFBFBD>ֹ<EFBFBD>ɽ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>(&N)<Tab>:set\ nu!
|
||||
menutrans Toggle\ relati&ve\ Line\ Numbering<Tab>:set\ rnu!
|
||||
\ <09><><EFBFBD>й<EFBFBD><EFBFBD>ֹ<EFBFBD>ɽ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>(&V)<Tab>:set\ rnu!
|
||||
menutrans Toggle\ &List\ Mode<Tab>:set\ list!
|
||||
\ <20>ꥹ<EFBFBD>ȥ⡼<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>(&L)<Tab>:set\ list!
|
||||
menutrans Toggle\ Line\ &Wrap<Tab>:set\ wrap!
|
||||
@@ -149,7 +151,7 @@ menutrans Se&T\ Compiler
|
||||
" Tools.Spelling Menu
|
||||
menutrans &Spelling <09><><EFBFBD>ڥ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>(&S)
|
||||
menutrans &Spell\ Check\ On <09><><EFBFBD>ڥ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>å<EFBFBD>ͭ<EFBFBD><EFBFBD>(&S)
|
||||
menutrans Spell\ Check\ &Off <09><><EFBFBD>ڥ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>å<EFBFBD>ͭ<EFBFBD><EFBFBD>(&O)
|
||||
menutrans Spell\ Check\ &Off <09><><EFBFBD>ڥ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>å<EFBFBD>̵<EFBFBD><EFBFBD>(&O)
|
||||
menutrans To\ &Next\ error<Tab>]s <09><><EFBFBD>Υ<EFBFBD><EFBFBD>顼(&N)<Tab>]s
|
||||
menutrans To\ &Previous\ error<Tab>[s <09><><EFBFBD>Υ<EFBFBD><EFBFBD>顼(&P)<Tab>[s
|
||||
menutrans Suggest\ &Corrections<Tab>z= <09><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>(&C)<Tab>z=
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
" vi:set ts=8 sts=8 sw=8 tw=0:
|
||||
"
|
||||
" Menu Translations: Japanese (UTF-8)
|
||||
" Translated By: MURAOKA Taro <koron@tka.att.ne.jp>
|
||||
" Last Change: 18-Apr-2006.
|
||||
" Translated By: MURAOKA Taro <koron.kaoriya@gmail.com>
|
||||
" Last Change: 21-Mar-2011.
|
||||
|
||||
" Quit when menu translations have already been done.
|
||||
if exists("did_menu_trans")
|
||||
@@ -99,6 +99,8 @@ let g:menutrans_tags_dialog = "タグファイルの名前を入力してくだ
|
||||
menutrans F&ile\ Settings ファイル設定(&I)
|
||||
menutrans Toggle\ Line\ &Numbering<Tab>:set\ nu!
|
||||
\ 行番号表示切替(&N)<Tab>:set\ nu!
|
||||
menutrans Toggle\ relati&ve\ Line\ Numbering<Tab>:set\ rnu!
|
||||
\ 相対行番号表示切替(&V)<Tab>:set\ rnu!
|
||||
menutrans Toggle\ &List\ Mode<Tab>:set\ list!
|
||||
\ リストモード切替(&L)<Tab>:set\ list!
|
||||
menutrans Toggle\ Line\ &Wrap<Tab>:set\ wrap!
|
||||
@@ -149,7 +151,7 @@ menutrans Se&T\ Compiler コンパイラ設定(&T)
|
||||
" Tools.Spelling Menu
|
||||
menutrans &Spelling スペリング(&S)
|
||||
menutrans &Spell\ Check\ On スペルチェック有効(&S)
|
||||
menutrans Spell\ Check\ &Off スペルチェック有効(&O)
|
||||
menutrans Spell\ Check\ &Off スペルチェック無効(&O)
|
||||
menutrans To\ &Next\ error<Tab>]s 次のエラー(&N)<Tab>]s
|
||||
menutrans To\ &Previous\ error<Tab>[s 前のエラー(&P)<Tab>[s
|
||||
menutrans Suggest\ &Corrections<Tab>z= 修正候補(&C)<Tab>z=
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
" vi:set ts=8 sts=8 sw=8 tw=0:
|
||||
"
|
||||
" Menu Translations: Japanese (CP932)
|
||||
" Translated By: MURAOKA Taro <koron@tka.att.ne.jp>
|
||||
" Last Change: 18-Apr-2006.
|
||||
" Translated By: MURAOKA Taro <koron.kaoriya@gmail.com>
|
||||
" Last Change: 21-Mar-2011.
|
||||
|
||||
" Quit when menu translations have already been done.
|
||||
if exists("did_menu_trans")
|
||||
@@ -99,6 +99,8 @@ let g:menutrans_tags_dialog = "
|
||||
menutrans F&ile\ Settings <09>t<EFBFBD>@<40>C<EFBFBD><EFBFBD><EFBFBD>ݒ<EFBFBD>(&I)
|
||||
menutrans Toggle\ Line\ &Numbering<Tab>:set\ nu!
|
||||
\ <09>s<EFBFBD>ԍ<EFBFBD><EFBFBD>\<5C><><EFBFBD>ؑ<EFBFBD>(&N)<Tab>:set\ nu!
|
||||
menutrans Toggle\ relati&ve\ Line\ Numbering<Tab>:set\ rnu!
|
||||
\ <09><><EFBFBD>s<EFBFBD>ԍ<EFBFBD><EFBFBD>\<5C><><EFBFBD>ؑ<EFBFBD>(&V)<Tab>:set\ rnu!
|
||||
menutrans Toggle\ &List\ Mode<Tab>:set\ list!
|
||||
\ <20><><EFBFBD>X<EFBFBD>g<EFBFBD><EFBFBD><EFBFBD>[<5B>h<EFBFBD>ؑ<EFBFBD>(&L)<Tab>:set\ list!
|
||||
menutrans Toggle\ Line\ &Wrap<Tab>:set\ wrap!
|
||||
@@ -149,7 +151,7 @@ menutrans Se&T\ Compiler
|
||||
" Tools.Spelling Menu
|
||||
menutrans &Spelling <09>X<EFBFBD>y<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>O(&S)
|
||||
menutrans &Spell\ Check\ On <09>X<EFBFBD>y<EFBFBD><EFBFBD><EFBFBD>`<60>F<EFBFBD>b<EFBFBD>N<EFBFBD>L<EFBFBD><EFBFBD>(&S)
|
||||
menutrans Spell\ Check\ &Off <09>X<EFBFBD>y<EFBFBD><EFBFBD><EFBFBD>`<60>F<EFBFBD>b<EFBFBD>N<EFBFBD>L<EFBFBD><EFBFBD>(&O)
|
||||
menutrans Spell\ Check\ &Off <09>X<EFBFBD>y<EFBFBD><EFBFBD><EFBFBD>`<60>F<EFBFBD>b<EFBFBD>N<EFBFBD><EFBFBD><EFBFBD><EFBFBD>(&O)
|
||||
menutrans To\ &Next\ error<Tab>]s <09><><EFBFBD>̃G<EFBFBD><EFBFBD><EFBFBD>[(&N)<Tab>]s
|
||||
menutrans To\ &Previous\ error<Tab>[s <09>O<EFBFBD>̃G<EFBFBD><EFBFBD><EFBFBD>[(&P)<Tab>[s
|
||||
menutrans Suggest\ &Corrections<Tab>z= <09>C<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>(&C)<Tab>z=
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
" Menu Translations: Korean
|
||||
" Maintainer: SungHyun Nam <goweol@gmail.com>
|
||||
" Last Change: 2010 Feb 18
|
||||
" Last Change: 2011 Mar 22
|
||||
|
||||
" Quit when menu translations have already been done.
|
||||
if exists("did_menu_trans")
|
||||
@@ -42,7 +42,7 @@ menutrans E&xit<Tab>:qa
|
||||
" Edit menu
|
||||
menutrans &Edit <09><><EFBFBD><EFBFBD>(&E)
|
||||
menutrans &Undo<Tab>u <09><><EFBFBD><EFBFBD>(&U)<Tab>u
|
||||
menutrans &Redo<Tab>^R <09>ٽ<EFBFBD> <20><><EFBFBD><EFBFBD>(&R)<Tab>^R
|
||||
menutrans &Redo<Tab>^R <09>ٽ<EFBFBD>\ <20><><EFBFBD><EFBFBD>(&R)<Tab>^R
|
||||
menutrans Rep&eat<Tab>\. <09><>Ǯ<EFBFBD><EFBFBD>(&e)<Tab>\.
|
||||
menutrans Cu&t<Tab>"+x <09>ڸ<EFBFBD><DAB8><EFBFBD>(&t)<Tab>"+x
|
||||
menutrans &Copy<Tab>"+y <09><><EFBFBD><EFBFBD>(&C)<Tab>"+y
|
||||
@@ -63,7 +63,7 @@ menutrans Toggle\ &Ignore-case<Tab>:set\ ic!
|
||||
menutrans Toggle\ &Showmatch<Tab>:set\ sm! Showmatch\ <20><><EFBFBD><EFBFBD>(&S)<Tab>:set\ sm!
|
||||
menutrans &Context\ lines <09><><EFBFBD>ؽ<EFBFBD>Ʈ\ <20><>(&C)
|
||||
menutrans &Virtual\ Edit <09><><EFBFBD><EFBFBD>\ <20><><EFBFBD><EFBFBD>(&V)
|
||||
menutrans Never <09><><EFBFBD><EFBFBD> <20><> <20><>
|
||||
menutrans Never <09><><EFBFBD><EFBFBD>\ <20><>\ <20><>
|
||||
menutrans Block\ Selection <09><><EFBFBD><EFBFBD>\ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
menutrans Insert\ mode <09><><EFBFBD><EFBFBD>\ <20><><EFBFBD><EFBFBD>
|
||||
menutrans Block\ and\ Insert <09><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ <20><><EFBFBD><EFBFBD>
|
||||
@@ -92,7 +92,7 @@ menutrans Toggle\ &auto-indent<Tab>:set\ ai!
|
||||
menutrans Toggle\ &C-indenting<Tab>:set\ cin! C-<EFBFBD>ε<EFBFBD><EFBFBD><EFBFBD>\ <20><><EFBFBD><EFBFBD>(&C)<Tab>:set\ cin!
|
||||
|
||||
" other options
|
||||
menutrans &Shiftwidth <09><><EFBFBD><EFBFBD>Ʈ <20>ʺ<EFBFBD>(&S)
|
||||
menutrans &Shiftwidth <09><><EFBFBD><EFBFBD>Ʈ\ <20>ʺ<EFBFBD>(&S)
|
||||
menutrans Soft\ &Tabstop <09><><EFBFBD><EFBFBD>Ʈ\ <20>ǽ<EFBFBD><EFBFBD><EFBFBD>(&T)
|
||||
menutrans Te&xt\ Width\.\.\. <09>ؽ<EFBFBD>Ʈ\ <20>ʺ<EFBFBD>(&x)\.\.\.
|
||||
menutrans &File\ Format\.\.\. <09><><EFBFBD><EFBFBD>\ <20><><EFBFBD><EFBFBD>(&F)\.\.\.
|
||||
@@ -125,12 +125,12 @@ menutrans &Find\ More\ Languages
|
||||
" Tools.Fold Menu
|
||||
menutrans &Folding <09><><EFBFBD><EFBFBD>(&F)
|
||||
" open close folds
|
||||
menutrans &Enable/Disable\ folds<Tab>zi <09><><EFBFBD><EFBFBD>\ <20><><EFBFBD><EFBFBD>\ <20><><EFBFBD><EFBFBD>\ <20><><EFBFBD><EFBFBD>(&E)<Tab>zi
|
||||
menutrans &Enable/Disable\ folds<Tab>zi <09><><EFBFBD><EFBFBD>\ <20><><EFBFBD><EFBFBD>\ <20><><EFBFBD><EFBFBD>(&E)<Tab>zi
|
||||
menutrans &View\ Cursor\ Line<Tab>zv Ŀ<EFBFBD><EFBFBD>\ <20><>\ <20><><EFBFBD><EFBFBD>(&V)<Tab>zv
|
||||
menutrans Vie&w\ Cursor\ Line\ only<Tab>zMzx Ŀ<EFBFBD><EFBFBD>\ <20>ٸ<EFBFBD>\ <20><><EFBFBD><EFBFBD>(&w)<Tab>zMzx
|
||||
menutrans C&lose\ more\ folds<Tab>zm <09><>\ <20><><EFBFBD><EFBFBD>\ <20><><EFBFBD><EFBFBD>\ <20>ݱ<EFBFBD>(&l)<Tab>zm
|
||||
menutrans &Close\ all\ folds<Tab>zM <09><><EFBFBD><EFBFBD>\ <20>κ<EFBFBD>\ <EFBFBD><EFBFBD><EFBFBD><EFBFBD>\ <20><EFBFBD><EFBFBD><EFBFBD>(&C)<Tab>zM
|
||||
menutrans O&pen\ more\ folds<Tab>zr <09><> <20><><EFBFBD><EFBFBD>\ <20><><EFBFBD><EFBFBD>\ <20><><EFBFBD><EFBFBD>(&p)<Tab>zr
|
||||
menutrans &Close\ all\ folds<Tab>zM <09><><EFBFBD><EFBFBD>\ <20><><EFBFBD><EFBFBD>\ <20>ݱ<EFBFBD>(&C)<Tab>zM
|
||||
menutrans O&pen\ more\ folds<Tab>zr <09><>\ <20><><EFBFBD><EFBFBD>\ <20><><EFBFBD><EFBFBD>\ <20><><EFBFBD><EFBFBD>(&p)<Tab>zr
|
||||
menutrans &Open\ all\ folds<Tab>zR <09><><EFBFBD><EFBFBD>\ <20>κ<EFBFBD>\ <20><><EFBFBD><EFBFBD>\ <20><><EFBFBD><EFBFBD>(&O)<Tab>zR
|
||||
" fold method
|
||||
menutrans Fold\ Met&hod <09><><EFBFBD><EFBFBD>\ <20><><EFBFBD><EFBFBD>(&h)
|
||||
@@ -141,11 +141,11 @@ menutrans S&yntax
|
||||
"menutrans &Diff &Diff
|
||||
menutrans Ma&rker <09><><EFBFBD><EFBFBD>ǥ(&r)
|
||||
" create and delete folds
|
||||
menutrans Create\ &Fold<Tab>zf <09><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>(&F)<Tab>zf
|
||||
menutrans &Delete\ Fold<Tab>zd <09><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>(&D)<Tab>zd
|
||||
menutrans Delete\ &All\ Folds<Tab>zD <09><><EFBFBD><EFBFBD>\ <20><><EFBFBD><EFBFBD>(&A)<Tab>zD
|
||||
menutrans Create\ &Fold<Tab>zf <09><><EFBFBD><EFBFBD>\ <20><><EFBFBD><EFBFBD>(&F)<Tab>zf
|
||||
menutrans &Delete\ Fold<Tab>zd <09><><EFBFBD><EFBFBD>\ <20><><EFBFBD><EFBFBD>(&D)<Tab>zd
|
||||
menutrans Delete\ &All\ Folds<Tab>zD <09><><EFBFBD><EFBFBD>\ <20><><EFBFBD><EFBFBD>\ <20><><EFBFBD><EFBFBD>(&A)<Tab>zD
|
||||
" moving around in folds
|
||||
menutrans Fold\ column\ &width <09><><EFBFBD><EFBFBD>\ ĭ\ <20>ʺ<EFBFBD>(&w)
|
||||
menutrans Fold\ column\ &width <09><><EFBFBD><EFBFBD>\ <EFBFBD>÷<EFBFBD>\ <20>ʺ<EFBFBD>(&w)
|
||||
|
||||
"menutrans &Diff &Diff
|
||||
menutrans &Update <09><><EFBFBD><EFBFBD>(&U)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
" Menu Translations: Korean
|
||||
" Maintainer: SungHyun Nam <goweol@gmail.com>
|
||||
" Last Change: 2010 Feb 18
|
||||
" Last Change: 2011 Mar 22
|
||||
|
||||
" Quit when menu translations have already been done.
|
||||
if exists("did_menu_trans")
|
||||
@@ -42,7 +42,7 @@ menutrans E&xit<Tab>:qa 끝내기(&x)<Tab>:qa
|
||||
" Edit menu
|
||||
menutrans &Edit 편집(&E)
|
||||
menutrans &Undo<Tab>u 취소(&U)<Tab>u
|
||||
menutrans &Redo<Tab>^R 다시 실행(&R)<Tab>^R
|
||||
menutrans &Redo<Tab>^R 다시\ 실행(&R)<Tab>^R
|
||||
menutrans Rep&eat<Tab>\. 되풀이(&e)<Tab>\.
|
||||
menutrans Cu&t<Tab>"+x 자르기(&t)<Tab>"+x
|
||||
menutrans &Copy<Tab>"+y 복사(&C)<Tab>"+y
|
||||
@@ -63,7 +63,7 @@ menutrans Toggle\ &Ignore-case<Tab>:set\ ic! 대소문자\ 구분\ 토글(&I)<Ta
|
||||
menutrans Toggle\ &Showmatch<Tab>:set\ sm! Showmatch\ 토글(&S)<Tab>:set\ sm!
|
||||
menutrans &Context\ lines 콘텍스트\ 줄(&C)
|
||||
menutrans &Virtual\ Edit 가상\ 편집(&V)
|
||||
menutrans Never 사용 안 함
|
||||
menutrans Never 사용\ 안\ 함
|
||||
menutrans Block\ Selection 블럭\ 고르기
|
||||
menutrans Insert\ mode 삽입\ 모드
|
||||
menutrans Block\ and\ Insert 블럭과\ 삽입
|
||||
@@ -92,7 +92,7 @@ menutrans Toggle\ &auto-indent<Tab>:set\ ai! 자동인덴트\ 토글(&a)<Tab>:se
|
||||
menutrans Toggle\ &C-indenting<Tab>:set\ cin! C-인덴팅\ 토글(&C)<Tab>:set\ cin!
|
||||
|
||||
" other options
|
||||
menutrans &Shiftwidth 쉬프트 너비(&S)
|
||||
menutrans &Shiftwidth 쉬프트\ 너비(&S)
|
||||
menutrans Soft\ &Tabstop 소프트\ 탭스톱(&T)
|
||||
menutrans Te&xt\ Width\.\.\. 텍스트\ 너비(&x)\.\.\.
|
||||
menutrans &File\ Format\.\.\. 파일\ 형식(&F)\.\.\.
|
||||
@@ -125,12 +125,12 @@ menutrans &Find\ More\ Languages 다른\ 언어\ 찾기(&F)
|
||||
" Tools.Fold Menu
|
||||
menutrans &Folding 접기(&F)
|
||||
" open close folds
|
||||
menutrans &Enable/Disable\ folds<Tab>zi 접는\ 기능\ 사용\ 토글(&E)<Tab>zi
|
||||
menutrans &Enable/Disable\ folds<Tab>zi 접기\ 사용\ 토글(&E)<Tab>zi
|
||||
menutrans &View\ Cursor\ Line<Tab>zv 커서\ 줄\ 보기(&V)<Tab>zv
|
||||
menutrans Vie&w\ Cursor\ Line\ only<Tab>zMzx 커서\ 줄만\ 보기(&w)<Tab>zMzx
|
||||
menutrans C&lose\ more\ folds<Tab>zm 더\ 많은\ 접기\ 닫기(&l)<Tab>zm
|
||||
menutrans &Close\ all\ folds<Tab>zM 접힌\ 부분\ 모두\ 접기(&C)<Tab>zM
|
||||
menutrans O&pen\ more\ folds<Tab>zr 더 많은\ 접기\ 열기(&p)<Tab>zr
|
||||
menutrans &Close\ all\ folds<Tab>zM 모든\ 접기\ 닫기(&C)<Tab>zM
|
||||
menutrans O&pen\ more\ folds<Tab>zr 더\ 많은\ 접기\ 열기(&p)<Tab>zr
|
||||
menutrans &Open\ all\ folds<Tab>zR 접힌\ 부분\ 모두\ 펴기(&O)<Tab>zR
|
||||
" fold method
|
||||
menutrans Fold\ Met&hod 접는\ 방법(&h)
|
||||
@@ -141,11 +141,11 @@ menutrans S&yntax 신택스(&y)
|
||||
"menutrans &Diff &Diff
|
||||
menutrans Ma&rker 꼬리표(&r)
|
||||
" create and delete folds
|
||||
menutrans Create\ &Fold<Tab>zf 새로 접기(&F)<Tab>zf
|
||||
menutrans &Delete\ Fold<Tab>zd 완전히 펴기(&D)<Tab>zd
|
||||
menutrans Delete\ &All\ Folds<Tab>zD 모두\ 펴기(&A)<Tab>zD
|
||||
menutrans Create\ &Fold<Tab>zf 접기\ 생성(&F)<Tab>zf
|
||||
menutrans &Delete\ Fold<Tab>zd 접기\ 삭제(&D)<Tab>zd
|
||||
menutrans Delete\ &All\ Folds<Tab>zD 모든\ 접기\ 삭제(&A)<Tab>zD
|
||||
" moving around in folds
|
||||
menutrans Fold\ column\ &width 접을\ 칸\ 너비(&w)
|
||||
menutrans Fold\ column\ &width 접기\ 컬럼\ 너비(&w)
|
||||
|
||||
"menutrans &Diff &Diff
|
||||
menutrans &Update 갱신(&U)
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
" You can also use this as a start for your own set of menus.
|
||||
"
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2009 Feb 26
|
||||
" Last Change: 2011 Mar 22
|
||||
|
||||
" Note that ":an" (short for ":anoremenu") is often used to make a menu work
|
||||
" in all modes and avoid side effects from mappings defined by the user.
|
||||
@@ -101,7 +101,7 @@ an 10.320 &File.Sp&lit-Open\.\.\.<Tab>:sp :browse sp<CR>
|
||||
an 10.320 &File.Open\ Tab\.\.\.<Tab>:tabnew :browse tabnew<CR>
|
||||
an 10.325 &File.&New<Tab>:enew :confirm enew<CR>
|
||||
an <silent> 10.330 &File.&Close<Tab>:close
|
||||
\ :if winheight(2) < 0 <Bar>
|
||||
\ :if winheight(2) < 0 && tabpagewinnr(2) == 0 <Bar>
|
||||
\ confirm enew <Bar>
|
||||
\ else <Bar>
|
||||
\ confirm close <Bar>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" These commands create the option window.
|
||||
"
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2010 Jul 24
|
||||
" Last Change: 2011 Jun 13
|
||||
|
||||
" If there already is an option window, jump to that one.
|
||||
if bufwinnr("option-window") > 0
|
||||
@@ -10,7 +10,7 @@ if bufwinnr("option-window") > 0
|
||||
if @% == "option-window"
|
||||
finish
|
||||
endif
|
||||
exe "norm! \<C-W>w"
|
||||
wincmd w
|
||||
if s:thiswin == winnr()
|
||||
break
|
||||
endif
|
||||
@@ -26,12 +26,8 @@ set cpo&vim
|
||||
fun! <SID>CR()
|
||||
|
||||
" If on a continued comment line, go back to the first comment line
|
||||
let lnum = line(".")
|
||||
let lnum = search("^[^\t]", 'bWcn')
|
||||
let line = getline(lnum)
|
||||
while line[0] == "\t"
|
||||
let lnum = lnum - 1
|
||||
let line = getline(lnum)
|
||||
endwhile
|
||||
|
||||
" <CR> on a "set" line executes the option line
|
||||
if match(line, "^ \tset ") >= 0
|
||||
@@ -82,11 +78,11 @@ fun! <SID>Find(lnum)
|
||||
if getline(a:lnum - 1) =~ "(local to"
|
||||
let local = 1
|
||||
let thiswin = winnr()
|
||||
exe "norm! \<C-W>p"
|
||||
wincmd p
|
||||
if exists("b:current_syntax") && b:current_syntax == "help"
|
||||
exe "norm! \<C-W>j"
|
||||
wincmd j
|
||||
if winnr() == thiswin
|
||||
exe "norm! \<C-W>j"
|
||||
wincmd j
|
||||
endif
|
||||
endif
|
||||
else
|
||||
@@ -111,10 +107,10 @@ fun! <SID>Update(lnum, line, local, thiswin)
|
||||
if name == "pt" && &pt =~ "\x80"
|
||||
let val = <SID>PTvalue()
|
||||
else
|
||||
exe "let val = substitute(&" . name . ', "[ \\t\\\\\"|]", "\\\\\\0", "g")'
|
||||
let val = escape(eval('&' . name), " \t\\\"|")
|
||||
endif
|
||||
if a:local
|
||||
exe "norm! " . a:thiswin . "\<C-W>w"
|
||||
exe a:thiswin . "wincmd w"
|
||||
endif
|
||||
if match(a:line, "=") >= 0 || (val != "0" && val != "1")
|
||||
call setline(a:lnum, " \tset " . name . "=" . val)
|
||||
@@ -139,7 +135,7 @@ set notitle noicon nosc noru
|
||||
" Relies on syntax highlighting to be switched on.
|
||||
let s:thiswin = winnr()
|
||||
while exists("b:current_syntax") && b:current_syntax == "help"
|
||||
exe "norm! \<C-W>w"
|
||||
wincmd w
|
||||
if s:thiswin == winnr()
|
||||
break
|
||||
endif
|
||||
@@ -147,7 +143,7 @@ endwhile
|
||||
|
||||
" Open the window
|
||||
new option-window
|
||||
setlocal ts=15 tw=0 noro
|
||||
setlocal ts=15 tw=0 noro buftype=nofile
|
||||
|
||||
" Insert help and a "set" command for each option.
|
||||
call append(0, '" Each "set" line shows the current value of an option (on the left).')
|
||||
@@ -162,9 +158,7 @@ call append(6, '" Hit <Space> on a "set" line to refresh it.')
|
||||
|
||||
" Init a local binary option
|
||||
fun! <SID>BinOptionL(name)
|
||||
exe "norm! \<C-W>p"
|
||||
exe "let val = &" . a:name
|
||||
exe "norm! \<C-W>p"
|
||||
let val = getwinvar(winnr('#'), '&' . a:name)
|
||||
call append("$", substitute(substitute(" \tset " . val . a:name . "\t" .
|
||||
\!val . a:name, "0", "no", ""), "1", "", ""))
|
||||
endfun
|
||||
@@ -177,16 +171,13 @@ endfun
|
||||
|
||||
" Init a local string option
|
||||
fun! <SID>OptionL(name)
|
||||
exe "norm! \<C-W>p"
|
||||
exe "let val = substitute(&" . a:name . ', "[ \\t\\\\\"|]", "\\\\\\0", "g")'
|
||||
exe "norm! \<C-W>p"
|
||||
let val = escape(getwinvar(winnr('#'), '&' . a:name), " \t\\\"|")
|
||||
call append("$", " \tset " . a:name . "=" . val)
|
||||
endfun
|
||||
|
||||
" Init a global string option
|
||||
fun! <SID>OptionG(name, val)
|
||||
call append("$", " \tset " . a:name . "=" . substitute(a:val, '[ \t\\"|]',
|
||||
\ '\\\0', "g"))
|
||||
call append("$", " \tset " . a:name . "=" . escape(a:val, " \t\\\"|"))
|
||||
endfun
|
||||
|
||||
let s:idx = 1
|
||||
@@ -315,6 +306,8 @@ if has("cscope")
|
||||
call append("$", " \tset cspc=" . &cspc)
|
||||
call append("$", "cscopequickfix\twhen to open a quickfix window for cscope")
|
||||
call <SID>OptionG("csqf", &csqf)
|
||||
call append("$", "cscoperelative\tfile names in a cscope file are relative to that file")
|
||||
call <SID>BinOptionG("csre", &csre)
|
||||
endif
|
||||
|
||||
|
||||
@@ -1042,6 +1035,8 @@ if has("wildignore")
|
||||
call append("$", "wildignore\tlist of patterns to ignore files for file name completion")
|
||||
call <SID>OptionG("wig", &wig)
|
||||
endif
|
||||
call append("$", "wildignorecase\tignore case when completing file names")
|
||||
call <SID>BinOptionG("wic", &wic)
|
||||
if has("wildmenu")
|
||||
call append("$", "wildmenu\tcommand-line completion shows a list of matches")
|
||||
call <SID>BinOptionG("wmnu", &wmnu)
|
||||
@@ -1340,3 +1335,5 @@ let &ru = s:old_ru
|
||||
let &sc = s:old_sc
|
||||
let &cpo = s:cpo_save
|
||||
unlet s:old_title s:old_icon s:old_ru s:old_sc s:cpo_save s:idx s:lnum
|
||||
|
||||
" vim: ts=8 sw=2 sts=2
|
||||
|
||||
@@ -19,7 +19,7 @@ if &cp || exists("g:loaded_getscriptPlugin")
|
||||
endif
|
||||
finish
|
||||
endif
|
||||
let g:loaded_getscriptPlugin = "v32"
|
||||
let g:loaded_getscriptPlugin = "v33"
|
||||
let s:keepcpo = &cpo
|
||||
set cpo&vim
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
" Vim plugin for showing matching parens
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2008 Sep 03
|
||||
" Last Change: 2011 Aug 27
|
||||
|
||||
" Exit quickly when:
|
||||
" - this plugin was already loaded (or disabled)
|
||||
@@ -82,8 +82,9 @@ function! s:Highlight_Matching_Pair()
|
||||
endif
|
||||
|
||||
" When not in a string or comment ignore matches inside them.
|
||||
" We match "escape" for special items, such as lispEscapeSpecial.
|
||||
let s_skip ='synIDattr(synID(line("."), col("."), 0), "name") ' .
|
||||
\ '=~? "string\\|character\\|singlequote\\|comment"'
|
||||
\ '=~? "string\\|character\\|singlequote\\|escape\\|comment"'
|
||||
execute 'if' s_skip '| let s_skip = 0 | endif'
|
||||
|
||||
" Limit the search to lines visible in the window.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
" netrwPlugin.vim: Handles file transfer and remote directory listing across a network
|
||||
" PLUGIN SECTION
|
||||
" Date: Jul 27, 2010
|
||||
" Date: Feb 10, 2011
|
||||
" Maintainer: Charles E Campbell, Jr <NdrOchip@ScampbellPfamily.AbizM-NOSPAM>
|
||||
" GetLatestVimScripts: 1075 1 :AutoInstall: netrw.vim
|
||||
" Copyright: Copyright (C) 1999-2008 Charles E. Campbell, Jr. {{{1
|
||||
@@ -20,7 +20,7 @@
|
||||
if &cp || exists("g:loaded_netrwPlugin")
|
||||
finish
|
||||
endif
|
||||
let g:loaded_netrwPlugin = "v140"
|
||||
let g:loaded_netrwPlugin = "v142"
|
||||
if v:version < 702
|
||||
echohl WarningMsg | echo "***netrw*** you need vim version 7.2 for this version of netrw" | echohl None
|
||||
finish
|
||||
@@ -34,10 +34,13 @@ set cpo&vim
|
||||
" Local Browsing: {{{2
|
||||
augroup FileExplorer
|
||||
au!
|
||||
au BufEnter * silent! call s:LocalBrowse(expand("<amatch>"))
|
||||
au VimEnter * silent! call s:VimEnter(expand("<amatch>"))
|
||||
" au BufReadCmd *[/\\] sil! call s:LocalBrowse(expand("<amatch>"))
|
||||
" au BufEnter *[^/\\] sil! call s:LocalBrowse(expand("<amatch>"))
|
||||
" au VimEnter *[^/\\] sil! call s:VimEnter(expand("<amatch>"))
|
||||
au BufEnter * sil! call s:LocalBrowse(expand("<amatch>"))
|
||||
au VimEnter * sil! call s:VimEnter(expand("<amatch>"))
|
||||
if has("win32") || has("win95") || has("win64") || has("win16")
|
||||
au BufEnter .* silent! call s:LocalBrowse(expand("<amatch>"))
|
||||
au BufEnter .* sil! call s:LocalBrowse(expand("<amatch>"))
|
||||
endif
|
||||
augroup END
|
||||
|
||||
@@ -45,10 +48,10 @@ augroup END
|
||||
augroup Network
|
||||
au!
|
||||
if has("win32") || has("win95") || has("win64") || has("win16")
|
||||
au BufReadCmd file://* exe "silent doau BufReadPre ".fnameescape(netrw#RFC2396(expand("<amatch>")))|exe 'e '.fnameescape(substitute(netrw#RFC2396(expand("<amatch>")),'file://\(.*\)','\1',""))|exe "bwipe ".fnameescape(expand("<amatch>"))|exe "silent doau BufReadPost ".fnameescape(netrw#RFC2396(expand("<amatch>")))
|
||||
au BufReadCmd file://* call netrw#FileUrlRead(expand("<amatch>"))
|
||||
else
|
||||
au BufReadCmd file://* exe "silent doau BufReadPre ".fnameescape(netrw#RFC2396(expand("<amatch>")))|exe 'e '.fnameescape(substitute(netrw#RFC2396(expand("<amatch>")),'file://\(.*\)','\1',""))|exe "bwipe ".fnameescape(expand("<amatch>"))|exe "silent doau BufReadPost ".fnameescape(netrw#RFC2396(expand("<amatch>")))
|
||||
au BufReadCmd file://localhost/* exe "silent doau BufReadPre ".fnameescape(netrw#RFC2396(expand("<amatch>")))|exe 'e '.fnameescape(substitute(netrw#RFC2396(expand("<amatch>")),'file://localhost/\(.*\)','\1',""))|exe "bwipe ".fnameescape(substitute(expand("<amatch>"),'file://\(\k\+@\)\=','',''))|exe "silent doau BufReadPost ".fnameescape(netrw#RFC2396(expand("<amatch>")))
|
||||
au BufReadCmd file://* call netrw#FileUrlRead(expand("<amatch>"))
|
||||
au BufReadCmd file://localhost/* call netrw#FileUrlRead(substitute(expand("<amatch>")),'file://localhost/','file:///','')
|
||||
endif
|
||||
au BufReadCmd ftp://*,rcp://*,scp://*,http://*,dav://*,davs://*,rsync://*,sftp://* exe "silent doau BufReadPre ".fnameescape(expand("<amatch>"))|call netrw#Nread(2,expand("<amatch>"))|exe "silent doau BufReadPost ".fnameescape(expand("<amatch>"))
|
||||
au FileReadCmd ftp://*,rcp://*,scp://*,http://*,dav://*,davs://*,rsync://*,sftp://* exe "silent doau FileReadPre ".fnameescape(expand("<amatch>"))|call netrw#Nread(1,expand("<amatch>"))|exe "silent doau FileReadPost ".fnameescape(expand("<amatch>"))
|
||||
@@ -100,11 +103,11 @@ fun! s:LocalBrowse(dirname)
|
||||
" string is the current directory and not checking would break
|
||||
" things such as the help command.
|
||||
if a:dirname != '' && isdirectory(a:dirname)
|
||||
silent! call netrw#LocalBrowseCheck(a:dirname)
|
||||
sil! call netrw#LocalBrowseCheck(a:dirname)
|
||||
endif
|
||||
elseif isdirectory(a:dirname)
|
||||
" echomsg "dirname<".dirname."> isdir"
|
||||
silent! call netrw#LocalBrowseCheck(a:dirname)
|
||||
sil! call netrw#LocalBrowseCheck(a:dirname)
|
||||
endif
|
||||
" not a directory, ignore it
|
||||
endfun
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
if &cp || exists("g:loaded_tarPlugin")
|
||||
finish
|
||||
endif
|
||||
let g:loaded_tarPlugin = "v26"
|
||||
let g:loaded_tarPlugin = "v27"
|
||||
let s:keepcpo = &cpo
|
||||
set cpo&vim
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user