mirror of
https://github.com/zoriya/vim.git
synced 2026-01-03 04:48:15 +00:00
Compare commits
150 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3ec3261980 | ||
|
|
ae2fe73abc | ||
|
|
86ae720d75 | ||
|
|
694cac7a35 | ||
|
|
2c61ec65e8 | ||
|
|
efcabd6892 | ||
|
|
b6be1e2390 | ||
|
|
42a4512f62 | ||
|
|
ae94b7718a | ||
|
|
5c5c9801b1 | ||
|
|
5f1e68b7bc | ||
|
|
46fd4df719 | ||
|
|
2693ca21ce | ||
|
|
4392996461 | ||
|
|
fafeee6b9e | ||
|
|
92abe859ed | ||
|
|
9bb1930af9 | ||
|
|
6a57cce048 | ||
|
|
1f860d8590 | ||
|
|
4921c24b31 | ||
|
|
979243b990 | ||
|
|
e5401220b0 | ||
|
|
5081d20247 | ||
|
|
9514b1f9a1 | ||
|
|
fa67fbe6b8 | ||
|
|
b5c3265521 | ||
|
|
367fbf17da | ||
|
|
641e48c224 | ||
|
|
3a304b2382 | ||
|
|
74db34cc91 | ||
|
|
66312acf14 | ||
|
|
70b5a5f5b9 | ||
|
|
280a868a24 | ||
|
|
0e7c4b99c6 | ||
|
|
6a7e2a668b | ||
|
|
e2db6c975b | ||
|
|
b8c890035e | ||
|
|
01cf376da1 | ||
|
|
0fce425772 | ||
|
|
cf0213ef7e | ||
|
|
c004bc2726 | ||
|
|
a594d77ffc | ||
|
|
a7b7b1cef9 | ||
|
|
541f92d6cf | ||
|
|
c7a0d32c83 | ||
|
|
acc39888cd | ||
|
|
d710e0d247 | ||
|
|
6e8d3b0d41 | ||
|
|
b878bbbca6 | ||
|
|
e2e4b98622 | ||
|
|
d009e86826 | ||
|
|
d68f2219b5 | ||
|
|
f2571c61d5 | ||
|
|
d0d0fe09cf | ||
|
|
7098ee5c37 | ||
|
|
bc56336bb4 | ||
|
|
0481fee488 | ||
|
|
4270496716 | ||
|
|
9c60161888 | ||
|
|
1fd3e30ce9 | ||
|
|
659c94d483 | ||
|
|
7bc25aed33 | ||
|
|
4032cfdf17 | ||
|
|
73284b973a | ||
|
|
d59c099120 | ||
|
|
f300ad230b | ||
|
|
c4dc286fe6 | ||
|
|
81278efadf | ||
|
|
1cd5e613b0 | ||
|
|
cad2fc9935 | ||
|
|
2186ffa2c7 | ||
|
|
069dd08d8d | ||
|
|
ea98f8b4d6 | ||
|
|
1510f996c5 | ||
|
|
4c6b3b20dd | ||
|
|
7927836733 | ||
|
|
40ce3a4e1f | ||
|
|
77354e78a8 | ||
|
|
3cbac309f7 | ||
|
|
5b14f89164 | ||
|
|
bbc1a592a0 | ||
|
|
d82a2a990b | ||
|
|
f9bde2b152 | ||
|
|
d39a751280 | ||
|
|
ec45c4a6df | ||
|
|
ba172f2eab | ||
|
|
0a63dedf99 | ||
|
|
d5f6933d5c | ||
|
|
05b20fb14e | ||
|
|
9bc174b69d | ||
|
|
d94682ffb4 | ||
|
|
50ab994ab3 | ||
|
|
7c94ce910f | ||
|
|
83d1b19015 | ||
|
|
29d54df5cd | ||
|
|
5a5f45917d | ||
|
|
695baeefe1 | ||
|
|
de1502f2b4 | ||
|
|
f630387827 | ||
|
|
da6365774d | ||
|
|
d87c36ea5e | ||
|
|
478c46e50f | ||
|
|
1e7813a187 | ||
|
|
7d2757a472 | ||
|
|
0e462411ca | ||
|
|
e5c421cfd7 | ||
|
|
1ca2e361a8 | ||
|
|
09deeb7c94 | ||
|
|
dbcf19dc49 | ||
|
|
71371b1579 | ||
|
|
310f2d59b2 | ||
|
|
6383b92d8c | ||
|
|
f11ce667b0 | ||
|
|
a161e26d55 | ||
|
|
6c927557e2 | ||
|
|
eab316bdf9 | ||
|
|
77b7710d4e | ||
|
|
e7154eb5c3 | ||
|
|
5837f1f447 | ||
|
|
b5971141df | ||
|
|
4df702999d | ||
|
|
dcefba9934 | ||
|
|
3b7b83649c | ||
|
|
825e7ab423 | ||
|
|
fbc25b20cb | ||
|
|
b1fc2bf29c | ||
|
|
76feaf1bfe | ||
|
|
6b31467aa7 | ||
|
|
404c942fb8 | ||
|
|
438b64ab71 | ||
|
|
6c5bdb751c | ||
|
|
c7dc1f4a53 | ||
|
|
488eb26ec7 | ||
|
|
0f8dd840fc | ||
|
|
ab11a5914b | ||
|
|
d8b77f7dc0 | ||
|
|
b6c2735c56 | ||
|
|
a245bc79b4 | ||
|
|
e421450a5e | ||
|
|
4dcdf29910 | ||
|
|
4f36dc3bf7 | ||
|
|
5d3fbf3bfe | ||
|
|
cf48767cd1 | ||
|
|
f3c2afb77f | ||
|
|
2b8388bd01 | ||
|
|
bac203ea2d | ||
|
|
13cf77ba17 | ||
|
|
e25bb90b2e | ||
|
|
8da9bbfd02 | ||
|
|
ba17ed6797 |
2
.gitignore
vendored
2
.gitignore
vendored
@@ -69,5 +69,7 @@ src/testdir/lua.vim
|
||||
src/testdir/small.vim
|
||||
src/testdir/tiny.vim
|
||||
src/testdir/test*.out
|
||||
src/testdir/test*.failed
|
||||
src/testdir/test.log
|
||||
src/testdir/dostmp/*
|
||||
src/memfile_test
|
||||
|
||||
1
Filelist
1
Filelist
@@ -481,6 +481,7 @@ SRC_EXTRA = \
|
||||
# runtime files for all distributions
|
||||
RT_ALL = \
|
||||
README.txt \
|
||||
README.md \
|
||||
runtime/bugreport.vim \
|
||||
runtime/doc/*.awk \
|
||||
runtime/doc/*.pl \
|
||||
|
||||
112
README.md
Normal file
112
README.md
Normal file
@@ -0,0 +1,112 @@
|
||||
`README.md` for version 7.4 of Vim: Vi IMproved.
|
||||
|
||||
|
||||
## What is VIM ##
|
||||
|
||||
Vim is an almost compatible version of the UNIX editor Vi. Many new features
|
||||
have been added: multi-level undo, syntax highlighting, command line history,
|
||||
on-line help, spell checking, filename completion, block operations, etc.
|
||||
There is also a Graphical User Interface (GUI) available. See
|
||||
`runtime/doc/vi_diff.txt` for differences with Vi.
|
||||
|
||||
This editor is very useful for editing programs and other plain text files.
|
||||
All commands are given with normal keyboard characters, so those who can type
|
||||
with ten fingers can work very fast. Additionally, function keys can be
|
||||
defined by the user, and the mouse can be used.
|
||||
|
||||
Vim runs under Amiga DOS, MS-DOS, MS-Windows (95, 98, Me, NT, 2000, XP, Vista,
|
||||
7), Atari MiNT, Macintosh, BeOS, VMS, RISC OS, OS/2 and almost all flavours of
|
||||
UNIX. Porting to other systems should not be very difficult.
|
||||
|
||||
|
||||
## Distribution ##
|
||||
|
||||
There are separate distributions for Unix, PC, Amiga and some other systems.
|
||||
This `README.md` file comes with the runtime archive. It includes the
|
||||
documentation, syntax files and other files that are used at runtime. To run
|
||||
Vim you must get either one of the binary archives or a source archive.
|
||||
Which one you need depends on the system you want to run it on and whether you
|
||||
want or must compile it yourself. Check http://www.vim.org/download.php for
|
||||
an overview of currently available distributions.
|
||||
|
||||
|
||||
## Documentation ##
|
||||
|
||||
The vim tutor is a one hour training course for beginners. Mostly it can be
|
||||
started as `vimtutor`. See `:help tutor` for more information.
|
||||
|
||||
The best is to use `:help` in Vim. If you don't have an executable yet, read
|
||||
`runtime/doc/help.txt`. It contains pointers to the other documentation
|
||||
files. The User Manual reads like a book and is recommended to learn to use
|
||||
Vim. See `:help user-manual`.
|
||||
|
||||
|
||||
## Copying ##
|
||||
|
||||
Vim is Charityware. You can use and copy it as much as you like, but you are
|
||||
encouraged to make a donation to help orphans in Uganda. Please read the file
|
||||
`runtime/doc/uganda.txt` for details (do `:help uganda` inside Vim).
|
||||
|
||||
Summary of the license: There are no restrictions on using or distributing an
|
||||
unmodified copy of Vim. Parts of Vim may also be distributed, but the license
|
||||
text must always be included. For modified versions a few restrictions apply.
|
||||
The license is GPL compatible, you may compile Vim with GPL libraries and
|
||||
distribute it.
|
||||
|
||||
|
||||
## Sponsoring ##
|
||||
|
||||
Fixing bugs and adding new features takes a lot of time and effort. To show
|
||||
your appreciation for the work and motivate Bram and others to continue
|
||||
working on Vim please send a donation.
|
||||
|
||||
Since Bram is back to a paid job the money will now be used to help children
|
||||
in Uganda. See `runtime/doc/uganda.txt`. But at the same time donations
|
||||
increase Bram's motivation to keep working on Vim!
|
||||
|
||||
For the most recent information about sponsoring look on the Vim web site:
|
||||
http://www.vim.org/sponsor/
|
||||
|
||||
|
||||
## Compiling ##
|
||||
|
||||
If you obtained a binary distribution you don't need to compile Vim. If you
|
||||
obtained a source distribution, all the stuff for compiling Vim is in the
|
||||
`src` directory. See `src/INSTALL` for instructions.
|
||||
|
||||
|
||||
## Installation ##
|
||||
|
||||
See one of these files for system-specific instructions:
|
||||
|
||||
README_ami.txt Amiga
|
||||
README_unix.txt Unix
|
||||
README_dos.txt MS-DOS and MS-Windows
|
||||
README_os2.txt OS/2
|
||||
README_mac.txt Macintosh
|
||||
README_vms.txt VMS
|
||||
|
||||
There are more `README_*.txt` files, depending on the distribution you used.
|
||||
|
||||
|
||||
## Information ##
|
||||
|
||||
The latest news about Vim can be found on the Vim home page:
|
||||
http://www.vim.org/
|
||||
|
||||
If you have problems, have a look at the Vim documentation or tips:
|
||||
http://www.vim.org/docs.php
|
||||
http://vim.wikia.com/wiki/Vim_Tips_Wiki
|
||||
|
||||
If you still have problems or any other questions, use one of the mailing
|
||||
lists to discuss them with Vim users and developers:
|
||||
http://www.vim.org/maillist.php
|
||||
|
||||
If nothing else works, report bugs directly:
|
||||
Bram Moolenaar <Bram@vim.org>
|
||||
|
||||
|
||||
## Main author ##
|
||||
|
||||
Send any other comments, patches, flowers and suggestions to:
|
||||
Bram Moolenaar <Bram@vim.org>
|
||||
@@ -94,8 +94,9 @@ INFORMATION
|
||||
The latest news about Vim can be found on the Vim home page:
|
||||
http://www.vim.org/
|
||||
|
||||
If you have problems, have a look at the Vim FAQ:
|
||||
http://vimdoc.sf.net/vimfaq.html
|
||||
If you have problems, have a look at the Vim documentation or tips:
|
||||
http://www.vim.org/docs.php
|
||||
http://vim.wikia.com/wiki/Vim_Tips_Wiki
|
||||
|
||||
If you still have problems or any other questions, use one of the mailing
|
||||
lists to discuss them with Vim users and developers:
|
||||
@@ -110,6 +111,3 @@ MAIN AUTHOR
|
||||
Send any other comments, patches, flowers and suggestions to:
|
||||
|
||||
Bram Moolenaar E-mail: Bram@vim.org
|
||||
Finsterruetihof 1
|
||||
8134 Adliswil
|
||||
Switzerland
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
" Maintainer: Dávid Szabó ( complex857 AT gmail DOT com )
|
||||
" Previous Maintainer: Mikolaj Machowski ( mikmach AT wp DOT pl )
|
||||
" URL: https://github.com/shawncplus/phpcomplete.vim
|
||||
" Last Change: 2014 Dec 01
|
||||
" Last Change: 2015 Jul 03
|
||||
"
|
||||
" OPTIONS:
|
||||
"
|
||||
@@ -141,71 +141,80 @@ function! phpcomplete#CompletePHP(findstart, base) " {{{
|
||||
if a:base != ""
|
||||
let context = substitute(context, '\s*[$a-zA-Z_0-9\x7f-\xff]*$', '', '')
|
||||
end
|
||||
else
|
||||
let context = ''
|
||||
end
|
||||
|
||||
let [current_namespace, imports] = phpcomplete#GetCurrentNameSpace(getline(0, line('.')))
|
||||
try
|
||||
let winheight = winheight(0)
|
||||
let winnr = winnr()
|
||||
|
||||
if context =~? '^use\s'
|
||||
return phpcomplete#CompleteUse(a:base)
|
||||
endif
|
||||
let [current_namespace, imports] = phpcomplete#GetCurrentNameSpace(getline(0, line('.')))
|
||||
|
||||
if context =~ '\(->\|::\)$'
|
||||
" {{{
|
||||
" Get name of the class
|
||||
let classname = phpcomplete#GetClassName(line('.'), context, current_namespace, imports)
|
||||
if context =~? '^use\s' || context ==? 'use'
|
||||
return phpcomplete#CompleteUse(a:base)
|
||||
endif
|
||||
|
||||
" Get location of class definition, we have to iterate through all
|
||||
if classname != ''
|
||||
if classname =~ '\'
|
||||
" split the last \ segment as a classname, everything else is the namespace
|
||||
let classname_parts = split(classname, '\')
|
||||
let namespace = join(classname_parts[0:-2], '\')
|
||||
let classname = classname_parts[-1]
|
||||
if context =~ '\(->\|::\)$'
|
||||
" {{{
|
||||
" Get name of the class
|
||||
let classname = phpcomplete#GetClassName(line('.'), context, current_namespace, imports)
|
||||
|
||||
" Get location of class definition, we have to iterate through all
|
||||
if classname != ''
|
||||
if classname =~ '\'
|
||||
" split the last \ segment as a classname, everything else is the namespace
|
||||
let classname_parts = split(classname, '\')
|
||||
let namespace = join(classname_parts[0:-2], '\')
|
||||
let classname = classname_parts[-1]
|
||||
else
|
||||
let namespace = '\'
|
||||
endif
|
||||
let classlocation = phpcomplete#GetClassLocation(classname, namespace)
|
||||
else
|
||||
let namespace = '\'
|
||||
let classlocation = ''
|
||||
endif
|
||||
let classlocation = phpcomplete#GetClassLocation(classname, namespace)
|
||||
|
||||
if classlocation != ''
|
||||
if classlocation == 'VIMPHP_BUILTINOBJECT' && has_key(g:php_builtin_classes, tolower(classname))
|
||||
return phpcomplete#CompleteBuiltInClass(context, classname, a:base)
|
||||
endif
|
||||
|
||||
if filereadable(classlocation)
|
||||
let classfile = readfile(classlocation)
|
||||
let classcontent = ''
|
||||
let classcontent .= "\n".phpcomplete#GetClassContents(classlocation, classname)
|
||||
let sccontent = split(classcontent, "\n")
|
||||
let visibility = expand('%:p') == fnamemodify(classlocation, ':p') ? 'private' : 'public'
|
||||
|
||||
return phpcomplete#CompleteUserClass(context, a:base, sccontent, visibility)
|
||||
endif
|
||||
endif
|
||||
|
||||
return phpcomplete#CompleteUnknownClass(a:base, context)
|
||||
" }}}
|
||||
elseif context =~? 'implements'
|
||||
return phpcomplete#CompleteClassName(a:base, ['i'], current_namespace, imports)
|
||||
elseif context =~? 'extends\s\+.\+$' && a:base == ''
|
||||
return ['implements']
|
||||
elseif context =~? 'extends'
|
||||
let kinds = context =~? 'class\s' ? ['c'] : ['i']
|
||||
return phpcomplete#CompleteClassName(a:base, kinds, current_namespace, imports)
|
||||
elseif context =~? 'class [a-zA-Z_\x7f-\xff\\][a-zA-Z_0-9\x7f-\xff\\]*'
|
||||
" special case when you've typed the class keyword and the name too, only extends and implements allowed there
|
||||
return filter(['extends', 'implements'], 'stridx(v:val, a:base) == 0')
|
||||
elseif context =~? 'new'
|
||||
return phpcomplete#CompleteClassName(a:base, ['c'], current_namespace, imports)
|
||||
endif
|
||||
|
||||
if a:base =~ '^\$'
|
||||
return phpcomplete#CompleteVariable(a:base)
|
||||
else
|
||||
let classlocation = ''
|
||||
return phpcomplete#CompleteGeneral(a:base, current_namespace, imports)
|
||||
endif
|
||||
|
||||
if classlocation != ''
|
||||
if classlocation == 'VIMPHP_BUILTINOBJECT' && has_key(g:php_builtin_classes, tolower(classname))
|
||||
return phpcomplete#CompleteBuiltInClass(context, classname, a:base)
|
||||
endif
|
||||
|
||||
if filereadable(classlocation)
|
||||
let classfile = readfile(classlocation)
|
||||
let classcontent = ''
|
||||
let classcontent .= "\n".phpcomplete#GetClassContents(classlocation, classname)
|
||||
let sccontent = split(classcontent, "\n")
|
||||
let visibility = expand('%:p') == fnamemodify(classlocation, ':p') ? 'private' : 'public'
|
||||
|
||||
return phpcomplete#CompleteUserClass(context, a:base, sccontent, visibility)
|
||||
endif
|
||||
endif
|
||||
|
||||
return phpcomplete#CompleteUnknownClass(a:base, context)
|
||||
" }}}
|
||||
elseif context =~? 'implements'
|
||||
return phpcomplete#CompleteClassName(a:base, ['i'], current_namespace, imports)
|
||||
elseif context =~? 'extends\s\+.\+$'
|
||||
return ['implements']
|
||||
elseif context =~? 'extends'
|
||||
let kinds = context =~? 'class\s' ? ['c'] : ['i']
|
||||
return phpcomplete#CompleteClassName(a:base, kinds, current_namespace, imports)
|
||||
elseif context =~? 'class [a-zA-Z_\x7f-\xff\\][a-zA-Z_0-9\x7f-\xff\\]*'
|
||||
" special case when you've typed the class keyword and the name too, only extends and implements allowed there
|
||||
return filter(['extends', 'implements'], 'stridx(v:val, a:base) == 0')
|
||||
elseif context =~? 'new'
|
||||
return phpcomplete#CompleteClassName(a:base, ['c'], current_namespace, imports)
|
||||
endif
|
||||
|
||||
if a:base =~ '^\$'
|
||||
return phpcomplete#CompleteVariable(a:base)
|
||||
else
|
||||
return phpcomplete#CompleteGeneral(a:base, current_namespace, imports)
|
||||
endif
|
||||
finally
|
||||
silent! exec winnr.'resize '.winheight
|
||||
endtry
|
||||
endfunction
|
||||
" }}}
|
||||
|
||||
@@ -244,12 +253,13 @@ function! phpcomplete#CompleteUse(base) " {{{
|
||||
if has_key(tag, 'namespace')
|
||||
let patched_ctags_detected = 1
|
||||
endif
|
||||
|
||||
if tag.kind ==? 'n' && tag.name =~? '^'.namespace_match_pattern
|
||||
let patched_ctags_detected = 1
|
||||
call add(namespaced_matches, {'word': tag.name, 'kind': 'n', 'menu': tag.filename, 'info': tag.filename })
|
||||
elseif has_key(tag, 'namespace') && (tag.kind ==? 'c' || tag.kind ==? 'i') && tag.namespace ==? namespace_for_class
|
||||
elseif has_key(tag, 'namespace') && (tag.kind ==? 'c' || tag.kind ==? 'i' || tag.kind ==? 't') && tag.namespace ==? namespace_for_class
|
||||
call add(namespaced_matches, {'word': namespace_for_class.'\'.tag.name, 'kind': tag.kind, 'menu': tag.filename, 'info': tag.filename })
|
||||
elseif (tag.kind ==? 'c' || tag.kind ==? 'i')
|
||||
elseif (tag.kind ==? 'c' || tag.kind ==? 'i' || tag.kind ==? 't')
|
||||
call add(no_namespace_matches, {'word': namespace_for_class.'\'.tag.name, 'kind': tag.kind, 'menu': tag.filename, 'info': tag.filename })
|
||||
endif
|
||||
endfor
|
||||
@@ -272,6 +282,10 @@ function! phpcomplete#CompleteUse(base) " {{{
|
||||
endfor
|
||||
endif
|
||||
|
||||
for comp in res
|
||||
let comp.word = substitute(comp.word, '^\\', '', '')
|
||||
endfor
|
||||
|
||||
return res
|
||||
endfunction
|
||||
" }}}
|
||||
@@ -326,6 +340,7 @@ function! phpcomplete#CompleteGeneral(base, current_namespace, imports) " {{{
|
||||
let ext_functions = {}
|
||||
let ext_constants = {}
|
||||
let ext_classes = {}
|
||||
let ext_traits = {}
|
||||
let ext_interfaces = {}
|
||||
let ext_namespaces = {}
|
||||
|
||||
@@ -420,7 +435,7 @@ function! phpcomplete#CompleteGeneral(base, current_namespace, imports) " {{{
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
elseif tag.kind ==? 'c' || tag.kind ==? 'i'
|
||||
elseif tag.kind ==? 'c' || tag.kind ==? 'i' || tag.kind ==? 't'
|
||||
let info = ' - '.tag.filename
|
||||
|
||||
let key = ''
|
||||
@@ -441,6 +456,8 @@ function! phpcomplete#CompleteGeneral(base, current_namespace, imports) " {{{
|
||||
let ext_classes[key] = info
|
||||
elseif tag.kind ==? 'i'
|
||||
let ext_interfaces[key] = info
|
||||
elseif tag.kind ==? 't'
|
||||
let ext_traits[key] = info
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
@@ -463,7 +480,7 @@ function! phpcomplete#CompleteGeneral(base, current_namespace, imports) " {{{
|
||||
endfor
|
||||
for [interfacename, info] in items(g:php_builtin_interfacenames)
|
||||
if interfacename =~? '^'.base
|
||||
let builtin_interfaces[leading_slash.interfacename] = info
|
||||
let builtin_interfaces[leading_slash.g:php_builtin_interfaces[tolower(interfacename)].name] = info
|
||||
endif
|
||||
endfor
|
||||
endif
|
||||
@@ -511,6 +528,8 @@ function! phpcomplete#CompleteGeneral(base, current_namespace, imports) " {{{
|
||||
else
|
||||
let ext_interfaces[imported_name] = ' '.import.name.' - '.import.filename
|
||||
endif
|
||||
elseif import.kind ==? 't'
|
||||
let ext_traits[imported_name] = ' '.import.name.' - '.import.filename
|
||||
endif
|
||||
|
||||
" no builtin interfaces
|
||||
@@ -540,6 +559,9 @@ function! phpcomplete#CompleteGeneral(base, current_namespace, imports) " {{{
|
||||
" Add external interfaces
|
||||
call extend(all_values, ext_interfaces)
|
||||
|
||||
" Add external traits
|
||||
call extend(all_values, ext_traits)
|
||||
|
||||
" Add built-in classes
|
||||
call extend(all_values, builtin_classnames)
|
||||
|
||||
@@ -566,6 +588,8 @@ function! phpcomplete#CompleteGeneral(base, current_namespace, imports) " {{{
|
||||
elseif has_key(ext_interfaces, i) || has_key(builtin_interfaces, i)
|
||||
let info = has_key(ext_interfaces, i) ? ext_interfaces[i] : builtin_interfaces[i].' - builtin'
|
||||
let final_list += [{'word':i, 'kind': 'i', 'menu': info, 'info': i.info}]
|
||||
elseif has_key(ext_traits, i)
|
||||
let final_list += [{'word':i, 'kind': 't', 'menu': ext_traits[i], 'info': ext_traits[i]}]
|
||||
elseif has_key(int_constants, i) || has_key(builtin_constants, i)
|
||||
let info = has_key(int_constants, i) ? int_constants[i] : ' - builtin'
|
||||
let final_list += [{'word':i, 'kind': 'd', 'menu': info, 'info': i.info}]
|
||||
@@ -784,7 +808,7 @@ function! phpcomplete#CompleteClassName(base, kinds, current_namespace, imports)
|
||||
|
||||
let tags = []
|
||||
if len(tag_match_pattern) >= g:phpcomplete_min_num_of_chars_for_namespace_completion
|
||||
let tags = phpcomplete#GetTaglist('^'.tag_match_pattern)
|
||||
let tags = phpcomplete#GetTaglist('^\c'.tag_match_pattern)
|
||||
endif
|
||||
|
||||
if len(tags)
|
||||
@@ -861,6 +885,39 @@ function! phpcomplete#CompareCompletionRow(i1, i2) " {{{
|
||||
endfunction
|
||||
" }}}
|
||||
|
||||
function! s:getNextCharWithPos(filelines, current_pos) " {{{
|
||||
let line_no = a:current_pos[0]
|
||||
let col_no = a:current_pos[1]
|
||||
let last_line = a:filelines[len(a:filelines) - 1]
|
||||
let end_pos = [len(a:filelines) - 1, strlen(last_line) - 1]
|
||||
if line_no > end_pos[0] || line_no == end_pos[0] && col_no > end_pos[1]
|
||||
return ['EOF', 'EOF']
|
||||
endif
|
||||
|
||||
" we've not reached the end of the current line break
|
||||
if col_no + 1 < strlen(a:filelines[line_no])
|
||||
let col_no += 1
|
||||
else
|
||||
" we've reached the end of the current line, jump to the next
|
||||
" non-blank line (blank lines have no position where we can read from,
|
||||
" not even a whitespace. The newline char does not positionable by vim
|
||||
let line_no += 1
|
||||
while strlen(a:filelines[line_no]) == 0
|
||||
let line_no += 1
|
||||
endwhile
|
||||
|
||||
let col_no = 0
|
||||
endif
|
||||
|
||||
" return 'EOF' string to signal end of file, normal results only one char
|
||||
" in length
|
||||
if line_no == end_pos[0] && col_no > end_pos[1]
|
||||
return ['EOF', 'EOF']
|
||||
endif
|
||||
|
||||
return [[line_no, col_no], a:filelines[line_no][col_no]]
|
||||
endfunction " }}}
|
||||
|
||||
function! phpcomplete#EvaluateModifiers(modifiers, required_modifiers, prohibited_modifiers) " {{{
|
||||
" if theres no modifier, and no modifier is allowed and no modifier is required
|
||||
if len(a:modifiers) == 0 && len(a:required_modifiers) == 0
|
||||
@@ -1475,21 +1532,19 @@ function! phpcomplete#GetClassName(start_line, context, current_namespace, impor
|
||||
return ''
|
||||
endif
|
||||
|
||||
if line =~? '\v^\s*(abstract\s+|final\s+)*\s*class'
|
||||
let class_name = matchstr(line, '\c\s*class\s*\zs'.class_name_pattern.'\ze')
|
||||
if line =~? '\v^\s*(abstract\s+|final\s+)*\s*class\s'
|
||||
let class_name = matchstr(line, '\cclass\s\+\zs'.class_name_pattern.'\ze')
|
||||
let extended_class = matchstr(line, '\cclass\s\+'.class_name_pattern.'\s\+extends\s\+\zs'.class_name_pattern.'\ze')
|
||||
|
||||
let classname_candidate = a:context =~? 'parent::' ? extended_class : class_name
|
||||
else
|
||||
let i += 1
|
||||
continue
|
||||
if classname_candidate != ''
|
||||
let [classname_candidate, class_candidate_namespace] = phpcomplete#GetCallChainReturnType(classname_candidate, class_candidate_namespace, class_candidate_imports, methodstack)
|
||||
" return absolute classname, without leading \
|
||||
return (class_candidate_namespace == '\' || class_candidate_namespace == '') ? classname_candidate : class_candidate_namespace.'\'.classname_candidate
|
||||
endif
|
||||
endif
|
||||
|
||||
if classname_candidate != ''
|
||||
let [classname_candidate, class_candidate_namespace] = phpcomplete#GetCallChainReturnType(classname_candidate, class_candidate_namespace, class_candidate_imports, methodstack)
|
||||
" return absolute classname, without leading \
|
||||
return (class_candidate_namespace == '\' || class_candidate_namespace == '') ? classname_candidate : class_candidate_namespace.'\'.classname_candidate
|
||||
endif
|
||||
let i += 1
|
||||
endwhile
|
||||
elseif a:context =~? '(\s*new\s\+'.class_name_pattern.'\s*)->'
|
||||
let classname_candidate = matchstr(a:context, '\cnew\s\+\zs'.class_name_pattern.'\ze')
|
||||
@@ -1602,26 +1657,26 @@ function! phpcomplete#GetClassName(start_line, context, current_namespace, impor
|
||||
endif
|
||||
endif
|
||||
|
||||
" in-file lookup for typehinted function arguments
|
||||
" - the function can have a name or be anonymous (e.g., function qux() { ... } vs. function () { ... })
|
||||
" - the type-hinted argument can be anywhere in the arguments list.
|
||||
if line =~? 'function\(\s\+'.function_name_pattern.'\)\?\s*(.\{-}'.class_name_pattern.'\s\+'.object && !object_is_array
|
||||
let f_args = matchstr(line, '\cfunction\(\s\+'.function_name_pattern.'\)\?\s*(\zs.\{-}\ze)')
|
||||
let args = split(f_args, '\s*\zs,\ze\s*')
|
||||
for arg in args
|
||||
if arg =~# object.'\(,\|$\)'
|
||||
let classname_candidate = matchstr(arg, '\s*\zs'.class_name_pattern.'\ze\s\+'.object)
|
||||
let [classname_candidate, class_candidate_namespace] = phpcomplete#ExpandClassName(classname_candidate, a:current_namespace, a:imports)
|
||||
" function declaration line
|
||||
if line =~? 'function\(\s\+'.function_name_pattern.'\)\?\s*('
|
||||
let function_lines = join(reverse(copy(lines)), " ")
|
||||
" search for type hinted arguments
|
||||
if function_lines =~? 'function\(\s\+'.function_name_pattern.'\)\?\s*(.\{-}'.class_name_pattern.'\s\+'.object && !object_is_array
|
||||
let f_args = matchstr(function_lines, '\cfunction\(\s\+'.function_name_pattern.'\)\?\s*(\zs.\{-}\ze)')
|
||||
let args = split(f_args, '\s*\zs,\ze\s*')
|
||||
for arg in args
|
||||
if arg =~# object.'\(,\|$\)'
|
||||
let classname_candidate = matchstr(arg, '\s*\zs'.class_name_pattern.'\ze\s\+'.object)
|
||||
let [classname_candidate, class_candidate_namespace] = phpcomplete#ExpandClassName(classname_candidate, a:current_namespace, a:imports)
|
||||
break
|
||||
endif
|
||||
endfor
|
||||
if classname_candidate != ''
|
||||
break
|
||||
endif
|
||||
endfor
|
||||
if classname_candidate != ''
|
||||
break
|
||||
endif
|
||||
endif
|
||||
|
||||
" if we see a function declaration, try loading the docblock for it and look for matching @params
|
||||
if line =~? 'function\(\s\+'.function_name_pattern.'\)\?\s*(.\{-}'.object
|
||||
" search for docblock for the function
|
||||
let match_line = substitute(line, '\\', '\\\\', 'g')
|
||||
let sccontent = getline(0, a:start_line - i)
|
||||
let doc_str = phpcomplete#GetDocBlock(sccontent, match_line)
|
||||
@@ -1641,13 +1696,14 @@ function! phpcomplete#GetClassName(start_line, context, current_namespace, impor
|
||||
endif
|
||||
|
||||
" assignment for the variable in question with a variable on the right hand side
|
||||
if line =~# '^\s*'.object.'\s*=&\?\s*'.variable_name_pattern
|
||||
if line =~# '^\s*'.object.'\s*=&\?\s\+\(clone\)\?\s*'.variable_name_pattern
|
||||
|
||||
" try to find the next non-comment or string ";" char
|
||||
let start_col = match(line, '^\s*'.object.'\C\s*=\zs&\?\s*'.variable_name_pattern)
|
||||
let filelines = reverse(lines)
|
||||
let start_col = match(line, '^\s*'.object.'\C\s*=\zs&\?\s\+\(clone\)\?\s*'.variable_name_pattern)
|
||||
let filelines = reverse(copy(lines))
|
||||
let [pos, char] = s:getNextCharWithPos(filelines, [a:start_line - i - 1, start_col])
|
||||
let chars_read = 1
|
||||
let last_pos = pos
|
||||
" read while end of the file
|
||||
while char != 'EOF' && chars_read < 1000
|
||||
let last_pos = pos
|
||||
@@ -1689,6 +1745,7 @@ function! phpcomplete#GetClassName(start_line, context, current_namespace, impor
|
||||
let filelines = reverse(lines)
|
||||
let [pos, char] = s:getNextCharWithPos(filelines, [a:start_line - i - 1, start_col])
|
||||
let chars_read = 1
|
||||
let last_pos = pos
|
||||
" read while end of the file
|
||||
while char != 'EOF' && chars_read < 1000
|
||||
let last_pos = pos
|
||||
@@ -1819,7 +1876,7 @@ function! phpcomplete#GetClassLocation(classname, namespace) " {{{
|
||||
let i = 1
|
||||
while i < line('.')
|
||||
let line = getline(line('.')-i)
|
||||
if line =~? '^\s*\(abstract\s\+\|final\s\+\)*\s*class\s*'.a:classname.'\(\s\+\|$\)' && tolower(current_namespace) == search_namespace
|
||||
if line =~? '^\s*\(abstract\s\+\|final\s\+\)*\s*\(class\|interface\|trait\)\s*'.a:classname.'\(\s\+\|$\|{\)' && tolower(current_namespace) == search_namespace
|
||||
return expand('%:p')
|
||||
else
|
||||
let i += 1
|
||||
@@ -1831,7 +1888,9 @@ function! phpcomplete#GetClassLocation(classname, namespace) " {{{
|
||||
let no_namespace_candidate = ''
|
||||
let tags = phpcomplete#GetTaglist('^'.a:classname.'$')
|
||||
for tag in tags
|
||||
if tag.kind == 'c' || tag.kind == 'i'
|
||||
" We'll allow interfaces and traits to be handled classes since you
|
||||
" can't have colliding names with different kinds anyway
|
||||
if tag.kind == 'c' || tag.kind == 'i' || tag.kind == 't'
|
||||
if !has_key(tag, 'namespace')
|
||||
let no_namespace_candidate = tag.filename
|
||||
else
|
||||
@@ -1981,7 +2040,7 @@ function! phpcomplete#GetClassContentsStructure(file_path, file_lines, class_nam
|
||||
|
||||
silent! below 1new
|
||||
silent! 0put =cfile
|
||||
call search('\(class\|interface\)\_s\+'.a:class_name.'\(\>\|$\)')
|
||||
call search('\c\(class\|interface\|trait\)\_s\+'.a:class_name.'\(\>\|$\)')
|
||||
let cfline = line('.')
|
||||
call search('{')
|
||||
let endline = line('.')
|
||||
@@ -1994,8 +2053,48 @@ function! phpcomplete#GetClassContentsStructure(file_path, file_lines, class_nam
|
||||
let extends_class = ''
|
||||
endif
|
||||
call searchpair('{', '', '}', 'W')
|
||||
let classcontent = join(getline(cfline, line('.')), "\n")
|
||||
let class_closing_bracket_line = line('.')
|
||||
let classcontent = join(getline(cfline, class_closing_bracket_line), "\n")
|
||||
|
||||
let used_traits = []
|
||||
" move back to the line next to the class's definition
|
||||
call cursor(endline + 1, 1)
|
||||
let keep_searching = 1
|
||||
while keep_searching != 0
|
||||
" try to grab "use..." keywords
|
||||
let [lnum, col] = searchpos('\c^\s\+use\s\+'.class_name_pattern, 'cW', class_closing_bracket_line)
|
||||
let syn_name = synIDattr(synID(lnum, col, 0), "name")
|
||||
if syn_name =~? 'string\|comment'
|
||||
call cursor(lnum + 1, 1)
|
||||
continue
|
||||
endif
|
||||
|
||||
let trait_line = getline(lnum)
|
||||
if trait_line !~? ';'
|
||||
" try to find the next line containing ';'
|
||||
let l = lnum
|
||||
let search_line = trait_line
|
||||
|
||||
" add lines from the file until theres no ';' in them
|
||||
while search_line !~? ';' && l > 0
|
||||
" file lines are reversed so we need to go backwards
|
||||
let l += 1
|
||||
let search_line = getline(l)
|
||||
let trait_line .= ' '.substitute(search_line, '\(^\s\+\|\s\+$\)', '', 'g')
|
||||
endwhile
|
||||
endif
|
||||
let use_expression = matchstr(trait_line, '^\s*use\s\+\zs.\{-}\ze;')
|
||||
let use_parts = map(split(use_expression, '\s*,\s*'), 'substitute(v:val, "\\s+", " ", "g")')
|
||||
let used_traits += map(use_parts, 'substitute(v:val, "\\s", "", "g")')
|
||||
call cursor(lnum + 1, 1)
|
||||
|
||||
if [lnum, col] == [0, 0]
|
||||
let keep_searching = 0
|
||||
endif
|
||||
endwhile
|
||||
|
||||
silent! bw! %
|
||||
|
||||
let [current_namespace, imports] = phpcomplete#GetCurrentNameSpace(a:file_lines[0:cfline])
|
||||
" go back to original window
|
||||
exe phpcomplete_original_window.'wincmd w'
|
||||
@@ -2008,21 +2107,27 @@ function! phpcomplete#GetClassContentsStructure(file_path, file_lines, class_nam
|
||||
\ 'mtime': getftime(full_file_path),
|
||||
\ })
|
||||
|
||||
let all_extends = used_traits
|
||||
if extends_class != ''
|
||||
let [extends_class, namespace] = phpcomplete#ExpandClassName(extends_class, current_namespace, imports)
|
||||
if namespace == ''
|
||||
let namespace = '\'
|
||||
endif
|
||||
let classlocation = phpcomplete#GetClassLocation(extends_class, namespace)
|
||||
if classlocation == "VIMPHP_BUILTINOBJECT"
|
||||
let result += [phpcomplete#GenerateBuiltinClassStub(g:php_builtin_classes[tolower(extends_class)])]
|
||||
elseif classlocation != '' && filereadable(classlocation)
|
||||
let full_file_path = fnamemodify(classlocation, ':p')
|
||||
let result += phpcomplete#GetClassContentsStructure(full_file_path, readfile(full_file_path), extends_class)
|
||||
elseif tolower(current_namespace) == tolower(namespace)
|
||||
" try to find the declaration in the same file.
|
||||
let result += phpcomplete#GetClassContentsStructure(full_file_path, a:file_lines, extends_class)
|
||||
endif
|
||||
call add(all_extends, extends_class)
|
||||
endif
|
||||
if len(all_extends) > 0
|
||||
for class in all_extends
|
||||
let [class, namespace] = phpcomplete#ExpandClassName(class, current_namespace, imports)
|
||||
if namespace == ''
|
||||
let namespace = '\'
|
||||
endif
|
||||
let classlocation = phpcomplete#GetClassLocation(class, namespace)
|
||||
if classlocation == "VIMPHP_BUILTINOBJECT"
|
||||
let result += [phpcomplete#GenerateBuiltinClassStub(g:php_builtin_classes[tolower(class)])]
|
||||
elseif classlocation != '' && filereadable(classlocation)
|
||||
let full_file_path = fnamemodify(classlocation, ':p')
|
||||
let result += phpcomplete#GetClassContentsStructure(full_file_path, readfile(full_file_path), class)
|
||||
elseif tolower(current_namespace) == tolower(namespace) && match(join(a:file_lines, "\n"), '\c\(class\|interface\|trait\)\_s\+'.class.'\(\>\|$\)') != -1
|
||||
" try to find the declaration in the same file.
|
||||
let result += phpcomplete#GetClassContentsStructure(full_file_path, a:file_lines, class)
|
||||
endif
|
||||
endfor
|
||||
endif
|
||||
|
||||
return result
|
||||
@@ -2270,19 +2375,40 @@ endfunction!
|
||||
" }}}
|
||||
|
||||
function! phpcomplete#GetCurrentNameSpace(file_lines) " {{{
|
||||
let original_window = winnr()
|
||||
|
||||
silent! below 1new
|
||||
silent! 0put =a:file_lines
|
||||
normal! G
|
||||
|
||||
" clear out classes, functions and other blocks
|
||||
while 1
|
||||
let block_start_pos = searchpos('\c\(class\|trait\|function\|interface\)\s\+\_.\{-}\zs{', 'Web')
|
||||
if block_start_pos == [0, 0]
|
||||
break
|
||||
endif
|
||||
let block_end_pos = searchpairpos('{', '', '}\|\%$', 'W', 'synIDattr(synID(line("."), col("."), 0), "name") =~? "string\\|comment"')
|
||||
silent! exec block_start_pos[0].','.block_end_pos[0].'d'
|
||||
endwhile
|
||||
normal! G
|
||||
|
||||
" grab the remains
|
||||
let file_lines = reverse(getline(1, line('.') - 1))
|
||||
|
||||
silent! bw! %
|
||||
exe original_window.'wincmd w'
|
||||
|
||||
let namespace_name_pattern = '[a-zA-Z_\x7f-\xff\\][a-zA-Z_0-9\x7f-\xff\\]*'
|
||||
let file_lines = reverse(copy(a:file_lines))
|
||||
let i = 0
|
||||
let file_length = len(file_lines)
|
||||
let imports = {}
|
||||
|
||||
let current_namespace = '\'
|
||||
|
||||
while i < file_length
|
||||
let line = file_lines[i]
|
||||
|
||||
if line =~? '^\s*namespace\s*'.namespace_name_pattern
|
||||
let current_namespace = matchstr(line, '^\s*namespace\s*\zs'.namespace_name_pattern.'\ze')
|
||||
if line =~? '^\(<?php\)\?\s*namespace\s*'.namespace_name_pattern
|
||||
let current_namespace = matchstr(line, '\c^\(<?php\)\?\s*namespace\s*\zs'.namespace_name_pattern.'\ze')
|
||||
break
|
||||
endif
|
||||
|
||||
@@ -2303,11 +2429,11 @@ function! phpcomplete#GetCurrentNameSpace(file_lines) " {{{
|
||||
let use_line .= ' '.substitute(search_line, '\(^\s\+\|\s\+$\)', '', 'g')
|
||||
endwhile
|
||||
endif
|
||||
let use_expression = matchstr(use_line, '^\s*use\s\+\zs.\{-}\ze;')
|
||||
let use_expression = matchstr(use_line, '^\c\s*use\s\+\zs.\{-}\ze;')
|
||||
let use_parts = map(split(use_expression, '\s*,\s*'), 'substitute(v:val, "\\s+", " ", "g")')
|
||||
for part in use_parts
|
||||
if part =~? '\s\+as\s\+'
|
||||
let [object, name] = split(part, '\s\+as\s\+')
|
||||
let [object, name] = split(part, '\s\+as\s\+\c')
|
||||
let object = substitute(object, '^\\', '', '')
|
||||
let name = substitute(name, '^\\', '', '')
|
||||
else
|
||||
@@ -2343,7 +2469,7 @@ function! phpcomplete#GetCurrentNameSpace(file_lines) " {{{
|
||||
break
|
||||
endif
|
||||
" if the name matches with the extracted classname and namespace
|
||||
if (tag.kind == 'c' || tag.kind == 'i') && tag.name == classname
|
||||
if (tag.kind == 'c' || tag.kind == 'i' || tag.kind == 't') && tag.name == classname
|
||||
if has_key(tag, 'namespace')
|
||||
let patched_ctags_detected = 1
|
||||
if tag.namespace == namespace_for_classes
|
||||
@@ -2386,7 +2512,7 @@ function! phpcomplete#GetCurrentNameSpace(file_lines) " {{{
|
||||
let tags = phpcomplete#GetTaglist('^'.import['name'].'$')
|
||||
for tag in tags
|
||||
" search for the first matchin namespace, class, interface with no namespace
|
||||
if !has_key(tag, 'namespace') && (tag.kind == 'n' || tag.kind == 'c' || tag.kind == 'i')
|
||||
if !has_key(tag, 'namespace') && (tag.kind == 'n' || tag.kind == 'c' || tag.kind == 'i' || tag.kind == 't')
|
||||
call extend(import, tag)
|
||||
let import['builtin'] = 0
|
||||
break
|
||||
@@ -2445,7 +2571,7 @@ endfunction
|
||||
|
||||
function! phpcomplete#ExpandClassName(classname, current_namespace, imports) " {{{
|
||||
" if there's an imported class, just use that class's information
|
||||
if has_key(a:imports, a:classname) && (a:imports[a:classname].kind == 'c' || a:imports[a:classname].kind == 'i')
|
||||
if has_key(a:imports, a:classname) && (a:imports[a:classname].kind == 'c' || a:imports[a:classname].kind == 'i' || a:imports[a:classname].kind == 't')
|
||||
let namespace = has_key(a:imports[a:classname], 'namespace') ? a:imports[a:classname].namespace : ''
|
||||
return [a:imports[a:classname].name, namespace]
|
||||
endif
|
||||
|
||||
@@ -75,6 +75,7 @@ DOCS = \
|
||||
pattern.txt \
|
||||
pi_getscript.txt \
|
||||
pi_gzip.txt \
|
||||
pi_logipat.txt \
|
||||
pi_netrw.txt \
|
||||
pi_paren.txt \
|
||||
pi_spec.txt \
|
||||
@@ -207,6 +208,7 @@ HTMLS = \
|
||||
pattern.html \
|
||||
pi_getscript.html \
|
||||
pi_gzip.html \
|
||||
pi_logipat.html \
|
||||
pi_netrw.html \
|
||||
pi_paren.html \
|
||||
pi_spec.html \
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*autocmd.txt* For Vim version 7.4. Last change: 2014 Sep 23
|
||||
*autocmd.txt* For Vim version 7.4. Last change: 2015 Jul 10
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -505,6 +505,8 @@ ColorScheme After loading a color scheme. |:colorscheme|
|
||||
CompleteDone After Insert mode completion is done. Either
|
||||
when something was completed or abandoning
|
||||
completion. |ins-completion|
|
||||
The |v:completed_item| variable contains
|
||||
information about the completed item.
|
||||
|
||||
*CursorHold*
|
||||
CursorHold When the user doesn't press a key for the time
|
||||
@@ -933,6 +935,13 @@ WinLeave Before leaving a window. If the window to be
|
||||
==============================================================================
|
||||
6. Patterns *autocmd-patterns* *{pat}*
|
||||
|
||||
The {pat} argument can be a comma separated list. This works as if the
|
||||
command was given with each pattern separately. Thus this command: >
|
||||
:autocmd BufRead *.txt,*.info set et
|
||||
Is equivalent to: >
|
||||
:autocmd BufRead *.txt set et
|
||||
:autocmd BufRead *.info set et
|
||||
|
||||
The file pattern {pat} is tested for a match against the file name in one of
|
||||
two ways:
|
||||
1. When there is no '/' in the pattern, Vim checks for a match against only
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*change.txt* For Vim version 7.4. Last change: 2015 Jan 27
|
||||
*change.txt* For Vim version 7.4. Last change: 2015 Jun 25
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -379,10 +379,43 @@ Adding and subtracting ~
|
||||
CTRL-A Add [count] to the number or alphabetic character at
|
||||
or after the cursor. {not in Vi}
|
||||
|
||||
*v_CTRL-A*
|
||||
{Visual}CTRL-A Add [count] to the number or alphabetic character in
|
||||
the highlighted text. {not in Vi}
|
||||
|
||||
*v_g_CTRL-A*
|
||||
{Visual}g CTRL-A Add [count] to the number or alphabetic character in
|
||||
the highlighted text. If several lines are
|
||||
highlighted, each one will be incremented by an
|
||||
additional [count] (so effectively creating a
|
||||
[count] incrementing sequence). {not in Vi}
|
||||
For Example, if you have this list of numbers:
|
||||
1. ~
|
||||
1. ~
|
||||
1. ~
|
||||
1. ~
|
||||
Move to the second "1." and Visually select three
|
||||
lines, pressing g CTRL-A results in:
|
||||
1. ~
|
||||
2. ~
|
||||
3. ~
|
||||
4. ~
|
||||
|
||||
*CTRL-X*
|
||||
CTRL-X Subtract [count] from the number or alphabetic
|
||||
character at or after the cursor. {not in Vi}
|
||||
|
||||
*v_CTRL-X*
|
||||
{Visual}CTRL-X Subtract [count] from the number or alphabetic
|
||||
character in the highlighted text. {not in Vi}
|
||||
|
||||
*v_g_CTRL-X*
|
||||
{Visual}g CTRL-X Subtract [count] from the number or alphabetic
|
||||
character in the highlighted text. If several lines
|
||||
are highlighted, each value will be decremented by an
|
||||
additional [count] (so effectively creating a [count]
|
||||
decrementing sequence). {not in Vi}
|
||||
|
||||
The CTRL-A and CTRL-X commands work for (signed) decimal numbers, unsigned
|
||||
octal and hexadecimal numbers and alphabetic characters. This depends on the
|
||||
'nrformats' option.
|
||||
@@ -399,6 +432,10 @@ octal and hexadecimal numbers and alphabetic characters. This depends on the
|
||||
under or after the cursor. This is useful to make lists with an alphabetic
|
||||
index.
|
||||
|
||||
For decimals a leading negative sign is considered for incrementing/
|
||||
decrementing, for octal and hex values, it won't be considered.
|
||||
To ignore the sign Visually select the number before using CTRL-A or CTRL-X.
|
||||
|
||||
For numbers with leading zeros (including all octal and hexadecimal numbers),
|
||||
Vim preserves the number of characters in the number when possible. CTRL-A on
|
||||
"0077" results in "0100", CTRL-X on "0x100" results in "0x0ff".
|
||||
@@ -1192,12 +1229,14 @@ if none of buffers matches the given name.
|
||||
7. Expression register "= *quote_=* *quote=* *@=*
|
||||
This is not really a register that stores text, but is a way to use an
|
||||
expression in commands which use a register. The expression register is
|
||||
read-only; you cannot put text into it. After the '=', the cursor moves to
|
||||
the command-line, where you can enter any expression (see |expression|). All
|
||||
normal command-line editing commands are available, including a special
|
||||
history for expressions. When you end the command-line by typing <CR>, Vim
|
||||
computes the result of the expression. If you end it with <Esc>, Vim abandons
|
||||
the expression. If you do not enter an expression, Vim uses the previous
|
||||
read-write.
|
||||
|
||||
When typing the '=' after " or CTRL-R the cursor moves to the command-line,
|
||||
where you can enter any expression (see |expression|). All normal
|
||||
command-line editing commands are available, including a special history for
|
||||
expressions. When you end the command-line by typing <CR>, Vim computes the
|
||||
result of the expression. If you end it with <Esc>, Vim abandons the
|
||||
expression. If you do not enter an expression, Vim uses the previous
|
||||
expression (like with the "/" command).
|
||||
|
||||
The expression must evaluate to a String. A Number is always automatically
|
||||
@@ -1242,7 +1281,7 @@ Contains the most recent search-pattern. This is used for "n" and 'hlsearch'.
|
||||
It is writable with `:let`, you can change it to have 'hlsearch' highlight
|
||||
other matches without actually searching. You can't yank or delete into this
|
||||
register. The search direction is available in |v:searchforward|.
|
||||
Note that the valued is restored when returning from a function
|
||||
Note that the value is restored when returning from a function
|
||||
|function-search-undo|.
|
||||
{not in Vi}
|
||||
|
||||
@@ -1457,10 +1496,10 @@ When you hit Return in a C-comment, Vim will insert the middle comment leader
|
||||
for the new line: " * ". To close this comment you just have to type "/"
|
||||
before typing anything else on the new line. This will replace the
|
||||
middle-comment leader with the end-comment leader and apply any specified
|
||||
alignment, leaving just " */". There is no need to hit BackSpace first.
|
||||
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
|
||||
When there is a match with a middle part, but there also is a matching 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
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*diff.txt* For Vim version 7.4. Last change: 2015 Feb 03
|
||||
*diff.txt* For Vim version 7.4. Last change: 2015 Jul 03
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -132,8 +132,9 @@ file for a moment and come back to the same file and be in diff mode again.
|
||||
if the current window does not have 'diff' set then no options
|
||||
in it are changed.
|
||||
|
||||
The ":diffoff" command resets the relevant options to the values they had when
|
||||
using |:diffsplit|, |:diffpatch| , |:diffthis|. or starting Vim in diff mode.
|
||||
The `:diffoff` command resets the relevant options to the values they had when
|
||||
using `:diffsplit`, `:diffpatch` , `:diffthis`. or starting Vim in diff mode.
|
||||
When using `:diffoff` twice the last saved values are restored.
|
||||
Otherwise they are set to their default value:
|
||||
|
||||
'diff' off
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*editing.txt* For Vim version 7.4. Last change: 2015 Jan 04
|
||||
*editing.txt* For Vim version 7.4. Last change: 2015 Feb 27
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -304,7 +304,8 @@ CTRL-^ Edit the alternate file. Mostly the alternate file is
|
||||
Mnemonic: "goto file".
|
||||
Uses the 'isfname' option to find out which characters
|
||||
are supposed to be in a file name. Trailing
|
||||
punctuation characters ".,:;!" are ignored.
|
||||
punctuation characters ".,:;!" are ignored. Escaped
|
||||
spaces "\ " are reduced to a single space.
|
||||
Uses the 'path' option as a list of directory names to
|
||||
look for the file. See the 'path' option for details
|
||||
about relative directories and wildcards.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*eval.txt* For Vim version 7.4. Last change: 2015 Jan 29
|
||||
*eval.txt* For Vim version 7.4. Last change: 2015 Jul 10
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -525,7 +525,7 @@ Funcref to a Dictionary, but the "self" variable is not available then.
|
||||
To avoid the extra name for the function it can be defined and directly
|
||||
assigned to a Dictionary in this way: >
|
||||
:let mydict = {'data': [0, 1, 2, 3]}
|
||||
:function mydict.len() dict
|
||||
:function mydict.len()
|
||||
: return len(self.data)
|
||||
:endfunction
|
||||
:echo mydict.len()
|
||||
@@ -1005,7 +1005,7 @@ function. Example: >
|
||||
|
||||
|
||||
|
||||
string *string* *expr-string* *E114*
|
||||
string *string* *String* *expr-string* *E114*
|
||||
------
|
||||
"string" string constant *expr-quote*
|
||||
|
||||
@@ -1021,7 +1021,7 @@ A string constant accepts these special characters:
|
||||
\X. same as \x.
|
||||
\u.... character specified with up to 4 hex numbers, stored according to the
|
||||
current value of 'encoding' (e.g., "\u02a4")
|
||||
\U.... same as \u....
|
||||
\U.... same as \u but allows up to 8 hex numbers.
|
||||
\b backspace <BS>
|
||||
\e escape <Esc>
|
||||
\f formfeed <FF>
|
||||
@@ -1330,6 +1330,12 @@ v:cmdbang Set like v:cmdarg for a file read/write command. When a "!"
|
||||
can only be used in autocommands. For user commands |<bang>|
|
||||
can be used.
|
||||
|
||||
*v:completed_item* *completed_item-variable*
|
||||
v:completed_item
|
||||
|Dictionary| containing the |complete-items| for the most
|
||||
recently completed word after |CompleteDone|. The
|
||||
|Dictionary| is empty if the completion failed.
|
||||
|
||||
*v:count* *count-variable*
|
||||
v:count The count given for the last Normal mode command. Can be used
|
||||
to get the count before a mapping. Read-only. Example: >
|
||||
@@ -1462,7 +1468,9 @@ v:hlsearch Variable that indicates whether search highlighting is on.
|
||||
requires |+extra_search|. Setting this variable to zero acts
|
||||
the like |:nohlsearch| command, setting it to one acts like >
|
||||
let &hlsearch = &hlsearch
|
||||
<
|
||||
< Note that the value is restored when returning from a
|
||||
function. |function-search-undo|.
|
||||
|
||||
*v:insertmode* *insertmode-variable*
|
||||
v:insertmode Used for the |InsertEnter| and |InsertChange| autocommand
|
||||
events. Values:
|
||||
@@ -1834,9 +1842,10 @@ getwinposx() Number X coord in pixels of GUI Vim window
|
||||
getwinposy() Number Y coord in pixels of GUI Vim window
|
||||
getwinvar( {nr}, {varname} [, {def}])
|
||||
any variable {varname} in window {nr}
|
||||
glob( {expr} [, {nosuf} [, {list}]])
|
||||
glob( {expr} [, {nosuf} [, {list} [, {alllinks}]]])
|
||||
any expand file wildcards in {expr}
|
||||
globpath( {path}, {expr} [, {nosuf} [, {list}]])
|
||||
glob2regpat( {expr}) String convert a glob pat into a search pat
|
||||
globpath( {path}, {expr} [, {nosuf} [, {list} [, {alllinks}]]])
|
||||
String do glob({expr}) for all dirs in {path}
|
||||
has( {feature}) Number TRUE if feature {feature} supported
|
||||
has_key( {dict}, {key}) Number TRUE if {dict} has entry {key}
|
||||
@@ -1984,7 +1993,7 @@ split( {expr} [, {pat} [, {keepempty}]])
|
||||
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}
|
||||
strchars( {expr} [, {skipcc}]) Number character length of the String {expr}
|
||||
strdisplaywidth( {expr} [, {col}]) Number display length of the String {expr}
|
||||
strftime( {format}[, {time}]) String time in specified format
|
||||
stridx( {haystack}, {needle}[, {start}])
|
||||
@@ -2960,6 +2969,8 @@ extend({expr1}, {expr2} [, {expr3}]) *extend()*
|
||||
{expr1} is changed when {expr2} is not empty. If necessary
|
||||
make a copy of {expr1} first.
|
||||
{expr2} remains unchanged.
|
||||
When {expr1} is locked and {expr2} is not empty the operation
|
||||
fails.
|
||||
Returns {expr1}.
|
||||
|
||||
|
||||
@@ -3314,7 +3325,7 @@ getchar([expr]) *getchar()*
|
||||
: endwhile
|
||||
:endfunction
|
||||
<
|
||||
You may also receive syntetic characters, such as
|
||||
You may also receive synthetic characters, such as
|
||||
|<CursorHold>|. Often you will want to ignore this and get
|
||||
another character: >
|
||||
:function GetKey()
|
||||
@@ -3638,7 +3649,7 @@ getwinvar({winnr}, {varname} [, {def}]) *getwinvar()*
|
||||
:let list_is_on = getwinvar(2, '&list')
|
||||
:echo "myvar = " . getwinvar(1, 'myvar')
|
||||
<
|
||||
glob({expr} [, {nosuf} [, {list}]]) *glob()*
|
||||
glob({expr} [, {nosuf} [, {list} [, {alllinks}]]]) *glob()*
|
||||
Expand the file wildcards in {expr}. See |wildcards| for the
|
||||
use of special characters.
|
||||
|
||||
@@ -3655,8 +3666,11 @@ glob({expr} [, {nosuf} [, {list}]]) *glob()*
|
||||
matches, they are separated by <NL> characters.
|
||||
|
||||
If the expansion fails, the result is an empty String or List.
|
||||
|
||||
A name for a non-existing file is not included. A symbolic
|
||||
link is only included if it points to an existing file.
|
||||
However, when the {alllinks} argument is present and it is
|
||||
non-zero then all symbolic links are included.
|
||||
|
||||
For most systems backticks can be used to get files names from
|
||||
any external command. Example: >
|
||||
@@ -3668,7 +3682,16 @@ glob({expr} [, {nosuf} [, {list}]]) *glob()*
|
||||
See |expand()| for expanding special Vim variables. See
|
||||
|system()| for getting the raw output of an external command.
|
||||
|
||||
globpath({path}, {expr} [, {nosuf} [, {list}]]) *globpath()*
|
||||
glob2regpat({expr}) *glob2regpat()*
|
||||
Convert a file pattern, as used by glob(), into a search
|
||||
pattern. The result can be used to match with a string that
|
||||
is a file name. E.g. >
|
||||
if filename =~ glob2regpat('Make*.mak')
|
||||
< This is equivalent to: >
|
||||
if filename =~ '^Make.*\.mak$'
|
||||
<
|
||||
*globpath()*
|
||||
globpath({path}, {expr} [, {nosuf} [, {list} [, {allinks}]]])
|
||||
Perform glob() on all directories in {path} and concatenate
|
||||
the results. Example: >
|
||||
:echo globpath(&rtp, "syntax/c.vim")
|
||||
@@ -3694,6 +3717,8 @@ globpath({path}, {expr} [, {nosuf} [, {list}]]) *globpath()*
|
||||
they are separated by <NL> characters. Example: >
|
||||
:echo globpath(&rtp, "syntax/c.vim", 0, 1)
|
||||
<
|
||||
{allinks} is used as with |glob()|.
|
||||
|
||||
The "**" item can be used to search in a directory tree.
|
||||
For example, to find all "README.txt" files in the directories
|
||||
in 'runtimepath' and below: >
|
||||
@@ -4828,7 +4853,7 @@ py3eval({expr}) *py3eval()*
|
||||
Evaluate Python expression {expr} and return its result
|
||||
converted to Vim data structures.
|
||||
Numbers and strings are returned as they are (strings are
|
||||
copied though, unicode strings are additionally converted to
|
||||
copied though, Unicode strings are additionally converted to
|
||||
'encoding').
|
||||
Lists are represented as Vim |List| type.
|
||||
Dictionaries are represented as Vim |Dictionary| type with
|
||||
@@ -4872,7 +4897,7 @@ readfile({fname} [, {binary} [, {max}]])
|
||||
separated with CR will result in a single long line (unless a
|
||||
NL appears somewhere).
|
||||
All NUL characters are replaced with a NL character.
|
||||
When {binary/append} contains "b" binary mode is used:
|
||||
When {binary} contains "b" binary mode is used:
|
||||
- When the last line ends in a NL an extra empty list item is
|
||||
added.
|
||||
- No CR characters are removed.
|
||||
@@ -5567,7 +5592,7 @@ setwinvar({nr}, {varname}, {val}) *setwinvar()*
|
||||
:call setwinvar(2, "myvar", "foobar")
|
||||
|
||||
sha256({string}) *sha256()*
|
||||
Returns a String with 64 hex charactes, which is the SHA256
|
||||
Returns a String with 64 hex characters, which is the SHA256
|
||||
checksum of {string}.
|
||||
{only available when compiled with the |+cryptv| feature}
|
||||
|
||||
@@ -5822,15 +5847,35 @@ str2nr( {expr} [, {base}]) *str2nr()*
|
||||
Text after the number is silently ignored.
|
||||
|
||||
|
||||
strchars({expr}) *strchars()*
|
||||
strchars({expr} [, {skipcc}]) *strchars()*
|
||||
The result is a Number, which is the number of characters
|
||||
String {expr} occupies. Composing characters are counted
|
||||
separately.
|
||||
in String {expr}.
|
||||
When {skipcc} is omitted or zero, composing characters are
|
||||
counted separately.
|
||||
When {skipcc} set to 1, Composing characters are ignored.
|
||||
Also see |strlen()|, |strdisplaywidth()| and |strwidth()|.
|
||||
|
||||
|
||||
{skipcc} is only available after 7.4.755. For backward
|
||||
compatibility, you can define a wrapper function: >
|
||||
if has("patch-7.4.755")
|
||||
function s:strchars(str, skipcc)
|
||||
return strchars(a:str, a:skipcc)
|
||||
endfunction
|
||||
else
|
||||
function s:strchars(str, skipcc)
|
||||
if a:skipcc
|
||||
return strlen(substitute(a:str, ".", "x", "g"))
|
||||
else
|
||||
return strchars(a:str)
|
||||
endif
|
||||
endfunction
|
||||
endif
|
||||
<
|
||||
|
||||
strdisplaywidth({expr}[, {col}]) *strdisplaywidth()*
|
||||
The result is a Number, which is the number of display cells
|
||||
String {expr} occupies on the screen when it starts a {col}.
|
||||
String {expr} occupies on the screen when it starts at {col}.
|
||||
When {col} is omitted zero is used. Otherwise it is the
|
||||
screen column where to start. This matters for Tab
|
||||
characters.
|
||||
@@ -5896,15 +5941,11 @@ string({expr}) Return {expr} converted to a String. If {expr} is a Number,
|
||||
*strlen()*
|
||||
strlen({expr}) The result is a Number, which is the length of the String
|
||||
{expr} in bytes.
|
||||
If you want to count the number of multi-byte characters (not
|
||||
counting composing characters) use something like this: >
|
||||
|
||||
:let len = strlen(substitute(str, ".", "x", "g"))
|
||||
<
|
||||
If the argument is a Number it is first converted to a String.
|
||||
For other types an error is given.
|
||||
Also see |len()|, |strchars()|, |strdisplaywidth()| and
|
||||
|strwidth()|.
|
||||
If you want to count the number of multi-byte characters use
|
||||
|strchars()|.
|
||||
Also see |len()|, |strdisplaywidth()| and |strwidth()|.
|
||||
|
||||
strpart({src}, {start}[, {len}]) *strpart()*
|
||||
The result is a String, which is part of {src}, starting from
|
||||
@@ -8280,7 +8321,7 @@ You can catch all Vim errors by the pattern >
|
||||
*catch-text*
|
||||
NOTE: You should never catch the error message text itself: >
|
||||
:catch /No such variable/
|
||||
only works in the english locale, but not when the user has selected
|
||||
only works in the English locale, but not when the user has selected
|
||||
a different language by the |:language| command. It is however helpful to
|
||||
cite the message text in a comment: >
|
||||
:catch /^Vim(\a\+):E108:/ " No such variable
|
||||
|
||||
@@ -365,7 +365,7 @@ zX Undo manually opened and closed folds: re-apply 'foldlevel'.
|
||||
Also forces recomputing folds, like |zx|.
|
||||
|
||||
*zm*
|
||||
zm Fold more: Subtract one from 'foldlevel'. If 'foldlevel' was
|
||||
zm Fold more: Subtract |v:count1| from 'foldlevel'. If 'foldlevel' was
|
||||
already zero nothing happens.
|
||||
'foldenable' will be set.
|
||||
|
||||
@@ -374,7 +374,7 @@ zM Close all folds: set 'foldlevel' to 0.
|
||||
'foldenable' will be set.
|
||||
|
||||
*zr*
|
||||
zr Reduce folding: Add one to 'foldlevel'.
|
||||
zr Reduce folding: Add |v:count1| to 'foldlevel'.
|
||||
|
||||
*zR*
|
||||
zR Open all folds. This sets 'foldlevel' to highest fold level.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*help.txt* For Vim version 7.4. Last change: 2012 Dec 06
|
||||
*help.txt* For Vim version 7.4. Last change: 2015 Jun 21
|
||||
|
||||
VIM - main help file
|
||||
k
|
||||
@@ -24,6 +24,7 @@ Get specific help: It is possible to go directly to whatever you want help
|
||||
Command-line editing c_ :help c_<Del>
|
||||
Vim command argument - :help -r
|
||||
Option ' :help 'textwidth'
|
||||
Regular expression / :help /[
|
||||
Search for help: Type ":help word", then hit CTRL-D to see matching
|
||||
help entries for "word".
|
||||
Or use ":helpgrep word". |:helpgrep|
|
||||
@@ -196,6 +197,7 @@ Remarks about specific systems ~
|
||||
Standard plugins ~
|
||||
|pi_getscript.txt| Downloading latest version of Vim scripts
|
||||
|pi_gzip.txt| Reading and writing compressed files
|
||||
|pi_logipat.txt| Logical operators on patterns
|
||||
|pi_netrw.txt| Reading and writing files over a network
|
||||
|pi_paren.txt| Highlight matching parens
|
||||
|pi_tar.txt| Tar file explorer
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*if_ruby.txt* For Vim version 7.4. Last change: 2012 Aug 02
|
||||
*if_ruby.txt* For Vim version 7.4. Last change: 2015 Feb 22
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Shugo Maeda
|
||||
@@ -120,9 +120,13 @@ VIM::command({cmd})
|
||||
*ruby-evaluate*
|
||||
VIM::evaluate({expr})
|
||||
Evaluates {expr} using the vim internal expression evaluator (see
|
||||
|expression|). Returns the expression result as a string.
|
||||
A |List| is turned into a string by joining the items and inserting
|
||||
line breaks.
|
||||
|expression|). Returns the expression result as:
|
||||
- a Integer if the Vim expression evaluates to a number
|
||||
- a Float if the Vim expression evaluates to a float
|
||||
- a String if the Vim expression evaluates to a string
|
||||
- a Array if the Vim expression evaluates to a Vim list
|
||||
- a Hash if the Vim expression evaluates to a Vim dictionary
|
||||
Dictionaries and lists are recursively expanded.
|
||||
|
||||
==============================================================================
|
||||
3. VIM::Buffer objects *ruby-buffer*
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*index.txt* For Vim version 7.4. Last change: 2015 Jan 07
|
||||
*index.txt* For Vim version 7.4. Last change: 2015 Feb 12
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -702,12 +702,16 @@ tag char note action in Normal mode ~
|
||||
|g'| g'{mark} 1 like |'| but without changing the jumplist
|
||||
|g`| g`{mark} 1 like |`| but without changing the jumplist
|
||||
|gstar| g* 1 like "*", but without using "\<" and "\>"
|
||||
|g+| g+ go to newer text state N times
|
||||
|g,| g, 1 go to N newer position in change list
|
||||
|g-| g- go to older text state N times
|
||||
|g0| g0 1 when 'wrap' off go to leftmost character of
|
||||
the current line that is on the screen;
|
||||
when 'wrap' on go to the leftmost character
|
||||
of the current screen line
|
||||
|g8| g8 print hex value of bytes used in UTF-8
|
||||
character under the cursor
|
||||
|g;| g; 1 go to N older position in change list
|
||||
|g<| g< display previous command output
|
||||
|g?| g? 2 Rot13 encoding operator
|
||||
|g?g?| g?? 2 Rot13 encode current line
|
||||
@@ -736,6 +740,7 @@ tag char note action in Normal mode ~
|
||||
the screen; when 'wrap' on go to the
|
||||
leftmost non-white character of the current
|
||||
screen line
|
||||
|g_| g_ 1 cursor to the last CHAR N - 1 lines lower
|
||||
|ga| ga print ascii value of character under the
|
||||
cursor
|
||||
|gd| gd 1 go to definition of word under the cursor
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*insert.txt* For Vim version 7.4. Last change: 2014 Aug 04
|
||||
*insert.txt* For Vim version 7.4. Last change: 2015 Jun 20
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -81,9 +81,11 @@ CTRL-W Delete the word before the cursor (see |i_backspacing| about
|
||||
joining lines). See the section "word motions",
|
||||
|word-motions|, for the definition of a word.
|
||||
*i_CTRL-U*
|
||||
CTRL-U Delete all entered characters in the current line (see
|
||||
|i_backspacing| about joining lines).
|
||||
|
||||
CTRL-U Delete all entered characters before the cursor in the current
|
||||
line. If there are no newly entered characters and
|
||||
'backspace' is not empty, delete all characters before the
|
||||
cursor in the current line.
|
||||
See |i_backspacing| about joining lines.
|
||||
*i_CTRL-I* *i_<Tab>* *i_Tab*
|
||||
<Tab> or CTRL-I Insert a tab. If the 'expandtab' option is on, the
|
||||
equivalent number of spaces is inserted (use CTRL-V <Tab> to
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*motion.txt* For Vim version 7.4. Last change: 2014 Feb 11
|
||||
*motion.txt* For Vim version 7.4. Last change: 2015 Jun 06
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -172,6 +172,8 @@ CTRL-H or *CTRL-H* *<BS>*
|
||||
l or *l*
|
||||
<Right> or *<Right>* *<Space>*
|
||||
<Space> [count] characters to the right. |exclusive| motion.
|
||||
See the 'whichwrap' option for adjusting the behavior
|
||||
at end of line
|
||||
|
||||
*0*
|
||||
0 To the first character of the line. |exclusive|
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*netbeans.txt* For Vim version 7.4. Last change: 2012 Jan 26
|
||||
*netbeans.txt* For Vim version 7.4. Last change: 2015 Mar 14
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Gordon Prieur et al.
|
||||
@@ -306,7 +306,12 @@ bufID Buffer number. A message may be either for a specific buffer
|
||||
or generic. Generic messages use a bufID of zero. NOTE: this
|
||||
buffer ID is assigned by the IDE, it is not Vim's buffer
|
||||
number. The bufID must be a sequentially rising number,
|
||||
starting at one.
|
||||
starting at one. When the 'switchbuf' option is set to
|
||||
"usetab" and the "bufID" buffer is not found in the current
|
||||
tab page, the netbeans commands and functions that set this
|
||||
buffer as the current buffer will jump to the first open
|
||||
window that contains this buffer in other tab pages instead of
|
||||
replacing the buffer in the current window.
|
||||
|
||||
seqno The IDE uses a sequence number for Commands and Functions. A
|
||||
Reply must use the sequence number of the Function that it is
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*options.txt* For Vim version 7.4. Last change: 2015 Jan 27
|
||||
*options.txt* For Vim version 7.4. Last change: 2015 Jul 10
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -536,11 +536,11 @@ number can be specified where "vim:" or "Vim:" is used:
|
||||
vim<{vers}: version before {vers}
|
||||
vim={vers}: version {vers}
|
||||
vim>{vers}: version after {vers}
|
||||
{vers} is 600 for Vim 6.0 (hundred times the major version plus minor).
|
||||
For example, to use a modeline only for Vim 6.0 and later:
|
||||
/* vim600: set foldmethod=marker: */ ~
|
||||
To use a modeline for Vim before version 5.7:
|
||||
/* vim<570: set sw=4: */ ~
|
||||
{vers} is 700 for Vim 7.0 (hundred times the major version plus minor).
|
||||
For example, to use a modeline only for Vim 7.0:
|
||||
/* vim700: set foldmethod=marker */ ~
|
||||
To use a modeline for Vim after version 7.2:
|
||||
/* vim>702: set cole=2: */ ~
|
||||
There can be no blanks between "vim" and the ":".
|
||||
|
||||
|
||||
@@ -1316,8 +1316,9 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
nofile only: The buffer name is fixed, it is not handled like a
|
||||
file name. It is not modified in response to a |:cd|
|
||||
command.
|
||||
nofile only: When using ":e bufname" and already editing "bufname"
|
||||
nothing changes, since there is no file to edit.
|
||||
both: When using ":e bufname" and already editing "bufname"
|
||||
the buffer is made empty and autocommands are
|
||||
triggered as usual for |:edit|.
|
||||
*E676*
|
||||
"acwrite" implies that the buffer name is not related to a file, like
|
||||
"nofile", but it will be written. Thus, in contrast to "nofile" and
|
||||
@@ -1818,6 +1819,14 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
completion in the preview window. Only works in
|
||||
combination with "menu" or "menuone".
|
||||
|
||||
noinsert Do not insert any text for a match until the user selects
|
||||
a match from the menu. Only works in combination with
|
||||
"menu" or "menuone". No effect if "longest" is present.
|
||||
|
||||
noselect Do not select a match in the menu, force the user to
|
||||
select one from the menu. Only works in combination with
|
||||
"menu" or "menuone".
|
||||
|
||||
|
||||
*'concealcursor'* *'cocu'*
|
||||
'concealcursor' 'cocu' string (default: "")
|
||||
@@ -2950,8 +2959,8 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
2. If a <NL> is found and 'fileformats' includes "unix", 'fileformat'
|
||||
is set to "unix". Note that when a <NL> is found without a
|
||||
preceding <CR>, "unix" is preferred over "dos".
|
||||
3. If 'fileformat' has not yet been set, and if 'fileformats'
|
||||
includes "mac", 'fileformat' is set to "mac".
|
||||
3. If 'fileformat' has not yet been set, and if a <CR> is found, and
|
||||
if 'fileformats' includes "mac", 'fileformat' is set to "mac".
|
||||
This means that "mac" is only chosen when:
|
||||
"unix" is not present or no <NL> is found in the file, and
|
||||
"dos" is not present or no <CR><NL> is found in the file.
|
||||
@@ -3419,7 +3428,8 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
the height of the cursor can be changed. This can be done by
|
||||
specifying a block cursor, or a percentage for a vertical or
|
||||
horizontal cursor.
|
||||
For a console the 't_SI' and 't_EI' escape sequences are used.
|
||||
For a console the 't_SI', 't_SR', and 't_EI' escape sequences are
|
||||
used.
|
||||
|
||||
The option is a comma separated list of parts. Each part consist of a
|
||||
mode-list and an argument-list:
|
||||
@@ -4715,33 +4725,38 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
{not in Vi}
|
||||
Strings to use in 'list' mode and for the |:list| command. It is a
|
||||
comma separated list of string settings.
|
||||
*lcs-eol*
|
||||
*lcs-eol*
|
||||
eol:c Character to show at the end of each line. When
|
||||
omitted, there is no extra character at the end of the
|
||||
line.
|
||||
*lcs-tab*
|
||||
*lcs-tab*
|
||||
tab:xy Two characters to be used to show a tab. The first
|
||||
char is used once. The second char is repeated to
|
||||
fill the space that the tab normally occupies.
|
||||
"tab:>-" will show a tab that takes four spaces as
|
||||
">---". When omitted, a tab is show as ^I.
|
||||
*lcs-trail*
|
||||
*lcs-space*
|
||||
space:c Character to show for a space. When omitted, spaces
|
||||
are left blank.
|
||||
*lcs-trail*
|
||||
trail:c Character to show for trailing spaces. When omitted,
|
||||
trailing spaces are blank.
|
||||
*lcs-extends*
|
||||
trailing spaces are blank. Overrides the "space"
|
||||
setting for trailing spaces.
|
||||
*lcs-extends*
|
||||
extends:c Character to show in the last column, when 'wrap' is
|
||||
off and the line continues beyond the right of the
|
||||
screen.
|
||||
*lcs-precedes*
|
||||
*lcs-precedes*
|
||||
precedes:c Character to show in the first column, when 'wrap'
|
||||
is off and there is text preceding the character
|
||||
visible in the first column.
|
||||
*lcs-conceal*
|
||||
*lcs-conceal*
|
||||
conceal:c Character to show in place of concealed text, when
|
||||
'conceallevel' is set to 1.
|
||||
*lcs-nbsp*
|
||||
nbsp:c Character to show for a non-breakable space (character
|
||||
0xA0, 160). Left blank when omitted.
|
||||
*lcs-nbsp*
|
||||
nbsp:c Character to show for a non-breakable space character
|
||||
(0xA0 (160 decimal) and U+202F). Left blank when
|
||||
omitted.
|
||||
|
||||
The characters ':' and ',' should not be used. UTF-8 characters can
|
||||
be used when 'encoding' is "utf-8", otherwise only printable
|
||||
@@ -4752,7 +4767,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
:set lcs=tab:>-,eol:<,nbsp:%
|
||||
:set lcs=extends:>,precedes:<
|
||||
< The "NonText" highlighting will be used for "eol", "extends" and
|
||||
"precedes". "SpecialKey" for "nbsp", "tab" and "trail".
|
||||
"precedes". "SpecialKey" for "nbsp", "space", "tab" and "trail".
|
||||
|hl-NonText| |hl-SpecialKey|
|
||||
|
||||
*'lpl'* *'nolpl'* *'loadplugins'* *'noloadplugins'*
|
||||
@@ -7060,6 +7075,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
split If included, split the current window before loading
|
||||
a buffer for a |quickfix| command that display errors.
|
||||
Otherwise: do not split, use current window.
|
||||
vsplit Just like "split" but split vertically.
|
||||
newtab Like "split", but open a new tab page. Overrules
|
||||
"split" when both are present.
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*pattern.txt* For Vim version 7.4. Last change: 2014 Sep 06
|
||||
*pattern.txt* For Vim version 7.4. Last change: 2015 Mar 16
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -59,6 +59,8 @@ explanations are in chapter 27 |usr_27.txt|.
|
||||
|
||||
*n*
|
||||
n Repeat the latest "/" or "?" [count] times.
|
||||
If the cursor doesn't move the search is repeated with
|
||||
count + 1.
|
||||
|last-pattern| {Vi: no count}
|
||||
|
||||
*N*
|
||||
@@ -1058,7 +1060,10 @@ x A single character, with no special meaning, matches itself
|
||||
*E769*
|
||||
When the ']' is not there Vim will not give an error message but
|
||||
assume no collection is used. Useful to search for '['. However, you
|
||||
do get E769 for internal searching.
|
||||
do get E769 for internal searching. And be aware that in a
|
||||
`:substitute` command the whole command becomes the pattern. E.g.
|
||||
":s/[/x/" searches for "[/x" and replaces it with nothing. It does
|
||||
not search for "[" and replaces it with "x"!
|
||||
|
||||
If the sequence begins with "^", it matches any single character NOT
|
||||
in the collection: "[^xyz]" matches anything but 'x', 'y' and 'z'.
|
||||
|
||||
117
runtime/doc/pi_logipat.txt
Normal file
117
runtime/doc/pi_logipat.txt
Normal file
@@ -0,0 +1,117 @@
|
||||
*pi_logipat.txt* Logical Patterns Mar 13, 2013
|
||||
|
||||
Author: Charles E. Campbell <NdrOchip@ScampbellPfamily.AbizM>
|
||||
Copyright: (c) 2004-2013 by Charles E. Campbell *logipat-copyright*
|
||||
The VIM LICENSE applies to LogiPat.vim and LogiPat.txt
|
||||
(see |copyright|) except use "LogiPat" instead of "Vim"
|
||||
No warranty, express or implied. Use At-Your-Own-Risk.
|
||||
|
||||
==============================================================================
|
||||
1. Contents *logipat* *logipat-contents*
|
||||
|
||||
1. Contents.................: |logipat-contents|
|
||||
2. LogiPat Manual...........: |logipat-manual|
|
||||
3. LogiPat Examples.........: |logipat-examples|
|
||||
4. Caveat...................: |logipat-caveat|
|
||||
5. LogiPat History..........: |logipat-history|
|
||||
|
||||
==============================================================================
|
||||
2. LogiPat Manual *logipat-manual* *logipat-man*
|
||||
|
||||
|
||||
*logipat-arg* *logipat-input* *logipat-pattern* *logipat-operators*
|
||||
Boolean logic patterns are composed of
|
||||
|
||||
operators ! = not
|
||||
| = logical-or
|
||||
& = logical-and
|
||||
grouping ( ... )
|
||||
patterns "pattern"
|
||||
|
||||
:LogiPat {boolean-logic pattern} *:LogiPat*
|
||||
:LogiPat is a command which takes a boolean-logic
|
||||
argument (|logipat-arg|).
|
||||
|
||||
:LP {boolean-logic pattern} *:LP*
|
||||
:LP is a shorthand command version of :LogiPat
|
||||
(|:LogiPat|).
|
||||
|
||||
:ELP {boolean-logic pattern} *:ELP*
|
||||
No search is done, but the conversion from the
|
||||
boolean logic pattern to the regular expression
|
||||
is performed and echoed onto the display.
|
||||
|
||||
:LogiPatFlags {search flags} *LogiPat-flags*
|
||||
:LogiPatFlags {search flags}
|
||||
LogiPat uses the |search()| command. The flags
|
||||
passed to that call to search() may be specified
|
||||
by the :LogiPatFlags command.
|
||||
|
||||
:LPF {search flags} *:LPF*
|
||||
:LPF is a shorthand version of :LogiPatFlags.
|
||||
|
||||
:let pat=LogiPat({boolean-logic pattern}) *LogiPat()*
|
||||
If one calls LogiPat() directly, no search
|
||||
is done, but the transformation from the boolean
|
||||
logic pattern into a regular expression pattern
|
||||
is performed and returned.
|
||||
|
||||
To get a " inside a pattern, as opposed to having it delimit
|
||||
the pattern, double it.
|
||||
|
||||
==============================================================================
|
||||
3. LogiPat Examples *logipat-examples*
|
||||
|
||||
LogiPat takes Boolean logic arguments and produces a regular
|
||||
expression which implements the choices. A series of examples
|
||||
follows:
|
||||
>
|
||||
:LogiPat "abc"
|
||||
< will search for lines containing the string :abc:
|
||||
>
|
||||
:LogiPat "ab""cd"
|
||||
< will search for lines containing the string :ab"c:
|
||||
>
|
||||
:LogiPat !"abc"
|
||||
< will search for lines which don't contain the string :abc:
|
||||
>
|
||||
:LogiPat "abc"|"def"
|
||||
< will search for lines which contain either the string
|
||||
:abc: or the string :def:
|
||||
>
|
||||
:LogiPat !("abc"|"def")
|
||||
< will search for lines which don't contain either
|
||||
of the strings :abc: or :def:
|
||||
>
|
||||
:LogiPat "abc"&"def"
|
||||
< will search for lines which contain both of the strings
|
||||
:abc: and :def:
|
||||
>
|
||||
:let pat= LogiPat('!"abc"')
|
||||
< will return the regular expression which will match
|
||||
all lines not containing :abc: . The double quotes
|
||||
are needed to pass normal patterns to LogiPat, and
|
||||
differentiate such patterns from boolean logic
|
||||
operators.
|
||||
|
||||
|
||||
==============================================================================
|
||||
4. Caveat *logipat-caveat*
|
||||
|
||||
The "not" operator may be fragile; ie. it may not always play well
|
||||
with the & (logical-and) and | (logical-or) operators. Please try out
|
||||
your patterns, possibly with :set hls, to insure that what is matching
|
||||
is what you want.
|
||||
|
||||
==============================================================================
|
||||
3. LogiPat History *logipat-history*
|
||||
|
||||
v3 Sep 25, 2006 * LP_Or() fixed; it now encapsulates its output
|
||||
in \%(...\) parentheses
|
||||
Dec 12, 2011 * |:ELP| added
|
||||
* "" is mapped to a single " and left inside patterns
|
||||
v2 May 31, 2005 * LPF and LogiPatFlags commands weren't working
|
||||
v1 May 23, 2005 * initial release
|
||||
|
||||
==============================================================================
|
||||
vim:tw=78:ts=8:ft=help
|
||||
@@ -1,4 +1,4 @@
|
||||
*remote.txt* For Vim version 7.4. Last change: 2008 May 24
|
||||
*remote.txt* For Vim version 7.4. Last change: 2015 Mar 01
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -36,7 +36,8 @@ The following command line arguments are available:
|
||||
The remote Vim is raised. If you don't want
|
||||
this use >
|
||||
vim --remote-send "<C-\><C-N>:n filename<CR>"
|
||||
< --remote-silent [+{cmd}] {file} ... *--remote-silent*
|
||||
<
|
||||
--remote-silent [+{cmd}] {file} ... *--remote-silent*
|
||||
As above, but don't complain if there is no
|
||||
server and the file is edited locally.
|
||||
--remote-wait [+{cmd}] {file} ... *--remote-wait*
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*repeat.txt* For Vim version 7.4. Last change: 2015 Jan 07
|
||||
*repeat.txt* For Vim version 7.4. Last change: 2015 Apr 13
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -600,6 +600,7 @@ For example, to profile the one_script.vim script file: >
|
||||
|
||||
:prof[ile] start {fname} *:prof* *:profile* *E750*
|
||||
Start profiling, write the output in {fname} upon exit.
|
||||
"~/" and environment variables in {fname} will be expanded.
|
||||
If {fname} already exists it will be silently overwritten.
|
||||
The variable |v:profiling| is set to one.
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*syntax.txt* For Vim version 7.4. Last change: 2015 Feb 03
|
||||
*syntax.txt* For Vim version 7.4. Last change: 2015 Mar 29
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -211,7 +211,8 @@ thing. These are then linked to a highlight group that specifies the color.
|
||||
A syntax group name doesn't specify any color or attributes itself.
|
||||
|
||||
The name for a highlight or syntax group must consist of ASCII letters, digits
|
||||
and the underscore. As a regexp: "[a-zA-Z0-9_]*"
|
||||
and the underscore. As a regexp: "[a-zA-Z0-9_]*". However, Vim does not give
|
||||
an error when using other characters.
|
||||
|
||||
To be able to allow each user to pick his favorite set of colors, there must
|
||||
be preferred names for highlight groups that are common for many languages.
|
||||
@@ -3321,6 +3322,32 @@ must not click outside of the pixel strings, but feel free to improve it.
|
||||
It will look much better with a font in a quadratic cell size, e.g. for X: >
|
||||
:set guifont=-*-clean-medium-r-*-*-8-*-*-*-*-80-*
|
||||
|
||||
|
||||
YAML *yaml.vim* *ft-yaml-syntax*
|
||||
|
||||
*g:yaml_schema* *b:yaml_schema*
|
||||
A YAML schema is a combination of a set of tags and a mechanism for resolving
|
||||
non-specific tags. For user this means that YAML parser may, depending on
|
||||
plain scalar contents, treat plain scalar (which can actually be only string
|
||||
and nothing else) as a value of the other type: null, boolean, floating-point,
|
||||
integer. `g:yaml_schema` option determines according to which schema values
|
||||
will be highlighted specially. Supported schemas are
|
||||
|
||||
Schema Description ~
|
||||
failsafe No additional highlighting.
|
||||
json Supports JSON-style numbers, booleans and null.
|
||||
core Supports more number, boolean and null styles.
|
||||
pyyaml In addition to core schema supports highlighting timestamps,
|
||||
but there are some differences in what is recognized as
|
||||
numbers and many additional boolean values not present in core
|
||||
schema.
|
||||
|
||||
Default schema is `core`.
|
||||
|
||||
Note that schemas are not actually limited to plain scalars, but this is the
|
||||
only difference between schemas defined in YAML specification and the only
|
||||
difference defined in the syntax file.
|
||||
|
||||
==============================================================================
|
||||
5. Defining a syntax *:syn-define* *E410*
|
||||
|
||||
@@ -4253,7 +4280,7 @@ If the "maxlines={N}" argument is given, the number of lines that are searched
|
||||
for a comment or syncing pattern is restricted to N lines backwards (after
|
||||
adding "minlines"). This is useful if you have few things to sync on and a
|
||||
slow machine. Example: >
|
||||
:syntax sync ccomment maxlines=500
|
||||
:syntax sync maxlines=500 ccomment
|
||||
<
|
||||
*:syn-sync-linebreaks*
|
||||
When using a pattern that matches multiple lines, a change in one line may
|
||||
@@ -4647,6 +4674,8 @@ ctermbg={color-nr} *highlight-ctermbg*
|
||||
Note that for some color terminals these names may result in the wrong
|
||||
colors!
|
||||
|
||||
You can also use "NONE" to remove the color.
|
||||
|
||||
*:hi-normal-cterm*
|
||||
When setting the "ctermfg" or "ctermbg" colors for the Normal group,
|
||||
these will become the colors used for the non-highlighted text.
|
||||
|
||||
@@ -202,23 +202,29 @@ REORDERING TAB PAGES:
|
||||
Move the current tab page to after tab page N. Use zero to
|
||||
make the current tab page the first one. Without N the tab
|
||||
page is made the last one. >
|
||||
:.tabmove " do nothing
|
||||
:-tabmove " move the tab page to the left
|
||||
:tabmove " move the tab page to the right
|
||||
:.tabmove " as above
|
||||
:+tabmove " as above
|
||||
:+tabmove " move the tab page to the right
|
||||
:0tabmove " move the tab page to the beginning of the tab
|
||||
" list
|
||||
:$tabmove " move the tab page to the end of the tab list
|
||||
<
|
||||
:tabmove 0 " as above
|
||||
:tabmove " move the tab page to the last
|
||||
:$tabmove " as above
|
||||
:tabmove $ " as above
|
||||
|
||||
:tabm[ove] +[N]
|
||||
:tabm[ove] -[N]
|
||||
Move the current tab page N places to the right (with +) or to
|
||||
the left (with -).
|
||||
the left (with -). >
|
||||
:tabmove - " move the tab page to the left
|
||||
:tabmove -1 " as above
|
||||
:tabmove + " move the tab page to the right
|
||||
:tabmove +1 " as above
|
||||
|
||||
|
||||
Note that although it is possible to move a tab behind the N-th one by using
|
||||
:Ntabmove, it is impossible to move it by N places by using :+Ntabmove. For
|
||||
clarification what +N means in this context see |[range]|.
|
||||
:Ntabmove. And move it by N places by using :+Ntabmove. For clarification what
|
||||
+N means in this context see |[range]|.
|
||||
|
||||
|
||||
LOOPING OVER TAB PAGES:
|
||||
|
||||
@@ -929,9 +929,11 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
|
||||
't_KJ' term.txt /*'t_KJ'*
|
||||
't_KK' term.txt /*'t_KK'*
|
||||
't_KL' term.txt /*'t_KL'*
|
||||
't_RB' term.txt /*'t_RB'*
|
||||
't_RI' term.txt /*'t_RI'*
|
||||
't_RV' term.txt /*'t_RV'*
|
||||
't_SI' term.txt /*'t_SI'*
|
||||
't_SR' term.txt /*'t_SR'*
|
||||
't_Sb' term.txt /*'t_Sb'*
|
||||
't_Sf' term.txt /*'t_Sf'*
|
||||
't_WP' term.txt /*'t_WP'*
|
||||
@@ -995,6 +997,7 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
|
||||
't_ve' term.txt /*'t_ve'*
|
||||
't_vi' term.txt /*'t_vi'*
|
||||
't_vs' term.txt /*'t_vs'*
|
||||
't_xn' term.txt /*'t_xn'*
|
||||
't_xs' term.txt /*'t_xs'*
|
||||
'ta' options.txt /*'ta'*
|
||||
'tabline' options.txt /*'tabline'*
|
||||
@@ -1835,6 +1838,7 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
|
||||
:CompilerSet usr_41.txt /*:CompilerSet*
|
||||
:DiffOrig diff.txt /*:DiffOrig*
|
||||
:DoMatchParen pi_paren.txt /*:DoMatchParen*
|
||||
:ELP pi_logipat.txt /*:ELP*
|
||||
:Explore pi_netrw.txt /*:Explore*
|
||||
:GLVS pi_getscript.txt /*:GLVS*
|
||||
:GetLatestVimScripts_dat pi_getscript.txt /*:GetLatestVimScripts_dat*
|
||||
@@ -1842,7 +1846,10 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
|
||||
:GnatPretty ft_ada.txt /*:GnatPretty*
|
||||
:GnatTags ft_ada.txt /*:GnatTags*
|
||||
:Hexplore pi_netrw.txt /*:Hexplore*
|
||||
:LP pi_logipat.txt /*:LP*
|
||||
:LPF pi_logipat.txt /*:LPF*
|
||||
:Lexplore pi_netrw.txt /*:Lexplore*
|
||||
:LogiPat pi_logipat.txt /*:LogiPat*
|
||||
:Man filetype.txt /*:Man*
|
||||
:MkVimball pi_vimball.txt /*:MkVimball*
|
||||
:N editing.txt /*:N*
|
||||
@@ -4419,6 +4426,8 @@ L motion.txt /*L*
|
||||
Linux-backspace options.txt /*Linux-backspace*
|
||||
List eval.txt /*List*
|
||||
Lists eval.txt /*Lists*
|
||||
LogiPat() pi_logipat.txt /*LogiPat()*
|
||||
LogiPat-flags pi_logipat.txt /*LogiPat-flags*
|
||||
Lua if_lua.txt /*Lua*
|
||||
M motion.txt /*M*
|
||||
MDI starting.txt /*MDI*
|
||||
@@ -4554,6 +4563,7 @@ SourcePre autocmd.txt /*SourcePre*
|
||||
SpellFileMissing autocmd.txt /*SpellFileMissing*
|
||||
StdinReadPost autocmd.txt /*StdinReadPost*
|
||||
StdinReadPre autocmd.txt /*StdinReadPre*
|
||||
String eval.txt /*String*
|
||||
SwapExists autocmd.txt /*SwapExists*
|
||||
Syntax autocmd.txt /*Syntax*
|
||||
T motion.txt /*T*
|
||||
@@ -4873,6 +4883,7 @@ b:current_syntax-variable syntax.txt /*b:current_syntax-variable*
|
||||
b:netrw_lastfile pi_netrw.txt /*b:netrw_lastfile*
|
||||
b:tex_stylish syntax.txt /*b:tex_stylish*
|
||||
b:var eval.txt /*b:var*
|
||||
b:yaml_schema syntax.txt /*b:yaml_schema*
|
||||
baan-folding syntax.txt /*baan-folding*
|
||||
baan-syntax syntax.txt /*baan-syntax*
|
||||
baan.vim syntax.txt /*baan.vim*
|
||||
@@ -5199,6 +5210,7 @@ complete_CTRL-E insert.txt /*complete_CTRL-E*
|
||||
complete_CTRL-Y insert.txt /*complete_CTRL-Y*
|
||||
complete_add() eval.txt /*complete_add()*
|
||||
complete_check() eval.txt /*complete_check()*
|
||||
completed_item-variable eval.txt /*completed_item-variable*
|
||||
completion-functions usr_41.txt /*completion-functions*
|
||||
complex-change change.txt /*complex-change*
|
||||
complex-repeat repeat.txt /*complex-repeat*
|
||||
@@ -5882,6 +5894,7 @@ ft-xhtml-omni insert.txt /*ft-xhtml-omni*
|
||||
ft-xml-omni insert.txt /*ft-xml-omni*
|
||||
ft-xml-syntax syntax.txt /*ft-xml-syntax*
|
||||
ft-xpm-syntax syntax.txt /*ft-xpm-syntax*
|
||||
ft-yaml-syntax syntax.txt /*ft-yaml-syntax*
|
||||
ft_ada.txt ft_ada.txt /*ft_ada.txt*
|
||||
ft_sql.txt ft_sql.txt /*ft_sql.txt*
|
||||
ftdetect filetype.txt /*ftdetect*
|
||||
@@ -6111,6 +6124,7 @@ g:vimsyn_folding syntax.txt /*g:vimsyn_folding*
|
||||
g:vimsyn_maxlines syntax.txt /*g:vimsyn_maxlines*
|
||||
g:vimsyn_minlines syntax.txt /*g:vimsyn_minlines*
|
||||
g:vimsyn_noerror syntax.txt /*g:vimsyn_noerror*
|
||||
g:yaml_schema syntax.txt /*g:yaml_schema*
|
||||
g:zip_nomax pi_zip.txt /*g:zip_nomax*
|
||||
g:zip_shq pi_zip.txt /*g:zip_shq*
|
||||
g:zip_unzipcmd pi_zip.txt /*g:zip_unzipcmd*
|
||||
@@ -6201,6 +6215,7 @@ gi insert.txt /*gi*
|
||||
gj motion.txt /*gj*
|
||||
gk motion.txt /*gk*
|
||||
glob() eval.txt /*glob()*
|
||||
glob2regpat() eval.txt /*glob2regpat()*
|
||||
global-ime mbyte.txt /*global-ime*
|
||||
global-local options.txt /*global-local*
|
||||
global-variable eval.txt /*global-variable*
|
||||
@@ -6727,6 +6742,7 @@ lcs-eol options.txt /*lcs-eol*
|
||||
lcs-extends options.txt /*lcs-extends*
|
||||
lcs-nbsp options.txt /*lcs-nbsp*
|
||||
lcs-precedes options.txt /*lcs-precedes*
|
||||
lcs-space options.txt /*lcs-space*
|
||||
lcs-tab options.txt /*lcs-tab*
|
||||
lcs-trail options.txt /*lcs-trail*
|
||||
left-right-motions motion.txt /*left-right-motions*
|
||||
@@ -6774,6 +6790,18 @@ location-list quickfix.txt /*location-list*
|
||||
location-list-window quickfix.txt /*location-list-window*
|
||||
log() eval.txt /*log()*
|
||||
log10() eval.txt /*log10()*
|
||||
logipat pi_logipat.txt /*logipat*
|
||||
logipat-arg pi_logipat.txt /*logipat-arg*
|
||||
logipat-caveat pi_logipat.txt /*logipat-caveat*
|
||||
logipat-contents pi_logipat.txt /*logipat-contents*
|
||||
logipat-copyright pi_logipat.txt /*logipat-copyright*
|
||||
logipat-examples pi_logipat.txt /*logipat-examples*
|
||||
logipat-history pi_logipat.txt /*logipat-history*
|
||||
logipat-input pi_logipat.txt /*logipat-input*
|
||||
logipat-man pi_logipat.txt /*logipat-man*
|
||||
logipat-manual pi_logipat.txt /*logipat-manual*
|
||||
logipat-operators pi_logipat.txt /*logipat-operators*
|
||||
logipat-pattern pi_logipat.txt /*logipat-pattern*
|
||||
long-lines version5.txt /*long-lines*
|
||||
love intro.txt /*love*
|
||||
lowercase change.txt /*lowercase*
|
||||
@@ -7417,6 +7445,7 @@ php3.vim syntax.txt /*php3.vim*
|
||||
phtml.vim syntax.txt /*phtml.vim*
|
||||
pi_getscript.txt pi_getscript.txt /*pi_getscript.txt*
|
||||
pi_gzip.txt pi_gzip.txt /*pi_gzip.txt*
|
||||
pi_logipat.txt pi_logipat.txt /*pi_logipat.txt*
|
||||
pi_netrw.txt pi_netrw.txt /*pi_netrw.txt*
|
||||
pi_paren.txt pi_paren.txt /*pi_paren.txt*
|
||||
pi_spec.txt pi_spec.txt /*pi_spec.txt*
|
||||
@@ -8098,9 +8127,11 @@ t_KI term.txt /*t_KI*
|
||||
t_KJ term.txt /*t_KJ*
|
||||
t_KK term.txt /*t_KK*
|
||||
t_KL term.txt /*t_KL*
|
||||
t_RB term.txt /*t_RB*
|
||||
t_RI term.txt /*t_RI*
|
||||
t_RV term.txt /*t_RV*
|
||||
t_SI term.txt /*t_SI*
|
||||
t_SR term.txt /*t_SR*
|
||||
t_Sb term.txt /*t_Sb*
|
||||
t_Sf term.txt /*t_Sf*
|
||||
t_WP term.txt /*t_WP*
|
||||
@@ -8203,6 +8234,7 @@ t_vb term.txt /*t_vb*
|
||||
t_ve term.txt /*t_ve*
|
||||
t_vi term.txt /*t_vi*
|
||||
t_vs term.txt /*t_vs*
|
||||
t_xn term.txt /*t_xn*
|
||||
t_xs term.txt /*t_xs*
|
||||
tab intro.txt /*tab*
|
||||
tab-page tabpage.txt /*tab-page*
|
||||
@@ -8461,6 +8493,7 @@ v:charconvert_from eval.txt /*v:charconvert_from*
|
||||
v:charconvert_to eval.txt /*v:charconvert_to*
|
||||
v:cmdarg eval.txt /*v:cmdarg*
|
||||
v:cmdbang eval.txt /*v:cmdbang*
|
||||
v:completed_item eval.txt /*v:completed_item*
|
||||
v:count eval.txt /*v:count*
|
||||
v:count1 eval.txt /*v:count1*
|
||||
v:ctype eval.txt /*v:ctype*
|
||||
@@ -8519,11 +8552,13 @@ v_<Esc> visual.txt /*v_<Esc>*
|
||||
v_= change.txt /*v_=*
|
||||
v_> change.txt /*v_>*
|
||||
v_C change.txt /*v_C*
|
||||
v_CTRL-A change.txt /*v_CTRL-A*
|
||||
v_CTRL-C visual.txt /*v_CTRL-C*
|
||||
v_CTRL-G visual.txt /*v_CTRL-G*
|
||||
v_CTRL-H change.txt /*v_CTRL-H*
|
||||
v_CTRL-O visual.txt /*v_CTRL-O*
|
||||
v_CTRL-V visual.txt /*v_CTRL-V*
|
||||
v_CTRL-X change.txt /*v_CTRL-X*
|
||||
v_CTRL-Z starting.txt /*v_CTRL-Z*
|
||||
v_CTRL-\_CTRL-G intro.txt /*v_CTRL-\\_CTRL-G*
|
||||
v_CTRL-\_CTRL-N intro.txt /*v_CTRL-\\_CTRL-N*
|
||||
@@ -8579,7 +8614,9 @@ v_gJ change.txt /*v_gJ*
|
||||
v_gN visual.txt /*v_gN*
|
||||
v_gV visual.txt /*v_gV*
|
||||
v_g] tagsrch.txt /*v_g]*
|
||||
v_g_CTRL-A change.txt /*v_g_CTRL-A*
|
||||
v_g_CTRL-G editing.txt /*v_g_CTRL-G*
|
||||
v_g_CTRL-X change.txt /*v_g_CTRL-X*
|
||||
v_g_CTRL-] tagsrch.txt /*v_g_CTRL-]*
|
||||
v_gf editing.txt /*v_gf*
|
||||
v_gn visual.txt /*v_gn*
|
||||
@@ -8884,6 +8921,7 @@ xterm-screens tips.txt /*xterm-screens*
|
||||
xterm-scroll-region term.txt /*xterm-scroll-region*
|
||||
xterm-shifted-keys term.txt /*xterm-shifted-keys*
|
||||
y change.txt /*y*
|
||||
yaml.vim syntax.txt /*yaml.vim*
|
||||
yank change.txt /*yank*
|
||||
ye-option-gone version4.txt /*ye-option-gone*
|
||||
year-2000 intro.txt /*year-2000*
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*term.txt* For Vim version 7.4. Last change: 2014 May 13
|
||||
*term.txt* For Vim version 7.4. Last change: 2015 Jun 25
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -283,8 +283,8 @@ OUTPUT CODES
|
||||
*t_xs* *'t_xs'*
|
||||
t_xs if non-empty, standout not erased by overwriting (hpterm)
|
||||
*t_xn* *'t_xn'*
|
||||
t_xn if non-empty, character writing at the last cell of screen
|
||||
didn't causes scrolling
|
||||
t_xn if non-empty, writing a character at the last screen cell
|
||||
does not cause scrolling
|
||||
t_ZH italics mode *t_ZH* *'t_ZH'*
|
||||
t_ZR italics end *t_ZR* *'t_ZR'*
|
||||
|
||||
@@ -294,12 +294,15 @@ Added by Vim (there are no standard codes for these):
|
||||
t_WP set window position (Y, X) in pixels *t_WP* *'t_WP'*
|
||||
t_WS set window size (height, width) in characters *t_WS* *'t_WS'*
|
||||
t_SI start insert mode (bar cursor shape) *t_SI* *'t_SI'*
|
||||
t_EI end insert mode (block cursor shape) *t_EI* *'t_EI'*
|
||||
t_SR start replace mode (underline cursor shape) *t_SR* *'t_SR'*
|
||||
t_EI end insert or replace mode (block cursor shape) *t_EI* *'t_EI'*
|
||||
|termcap-cursor-shape|
|
||||
t_RV request terminal version string (for xterm) *t_RV* *'t_RV'*
|
||||
|xterm-8bit| |v:termresponse| |'ttymouse'| |xterm-codes|
|
||||
t_u7 request cursor position (for xterm) *t_u7* *'t_u7'*
|
||||
see |'ambiwidth'|
|
||||
t_RB request terminal background color *t_RB* *'t_RB'*
|
||||
see |'ambiwidth'|
|
||||
|
||||
KEY CODES
|
||||
Note: Use the <> form if possible
|
||||
@@ -438,13 +441,16 @@ If one of these is not available, 't_Sb' and 't_Sf' are used. 't_me' is used
|
||||
to reset to the default colors.
|
||||
|
||||
*termcap-cursor-shape* *termcap-cursor-color*
|
||||
When Vim enters Insert mode the 't_SI' escape sequence is sent. When leaving
|
||||
Insert mode 't_EI' is used. But only if both are defined. This can be used
|
||||
to change the shape or color of the cursor in Insert mode. These are not
|
||||
standard termcap/terminfo entries, you need to set them yourself.
|
||||
When Vim enters Insert mode the 't_SI' escape sequence is sent. When Vim
|
||||
enters Replace mode the 't_SR' escape sequence is sent if it is set, otherwise
|
||||
't_SI' is sent. When leaving Insert mode or Replace mode 't_EI' is used. This
|
||||
can be used to change the shape or color of the cursor in Insert or Replace
|
||||
mode. These are not standard termcap/terminfo entries, you need to set them
|
||||
yourself.
|
||||
Example for an xterm, this changes the color of the cursor: >
|
||||
if &term =~ "xterm"
|
||||
let &t_SI = "\<Esc>]12;purple\x7"
|
||||
let &t_SR = "\<Esc>]12;red\x7"
|
||||
let &t_EI = "\<Esc>]12;blue\x7"
|
||||
endif
|
||||
NOTE: When Vim exits the shape for Normal mode will remain. The shape from
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*todo.txt* For Vim version 7.4. Last change: 2015 Feb 03
|
||||
*todo.txt* For Vim version 7.4. Last change: 2015 Jul 10
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -35,6 +35,8 @@ not be repeated below, unless there is extra information.
|
||||
-------------------- Known bugs and current work -----------------------
|
||||
|
||||
Regexp problems:
|
||||
- The old engine does not find a match for "/\%#=1\(\)\{80}", the new engine
|
||||
matches everywhere.
|
||||
- Using win_linetabsize() can still be slow. Cache the result, store col and
|
||||
vcol. Reset them when moving to another line.
|
||||
- Very slow with a long line and Ruby highlighting. (John Whitley, 2014 Dec 4)
|
||||
@@ -51,9 +53,15 @@ Regexp problems:
|
||||
- Does not work with NFA regexp engine:
|
||||
\%u, \%x, \%o, \%d followed by a composing character
|
||||
- Bug relating to back references. (Ingo Karkat, 2014 Jul 24)
|
||||
- New RE does not give an error for empty group: "\(\)\{2}" (Dominique Pelle,
|
||||
2015 Feb 7)
|
||||
- Using back reference before the capturing group sometimes works with the old
|
||||
engine, can we do this with the new engine? E.g. with
|
||||
"/\%(<\1>\)\@<=.*\%(<\/\(\w\+\)>\)\@=" matching text inside HTML tags.
|
||||
This problem is probably the same: "\%(^\1.*$\n\)\@<=\(\d\+\).*$".
|
||||
(guotuofeng, 2015 Jun 22)
|
||||
- Strange matching with "\(Hello\n\)\@<=A". (Anas Syed, 2015 Feb 12)
|
||||
- Problem with \v(A)@<=b+\1c. (Issue 334)
|
||||
- Diff highlighting can be very slow. (Issue 309)
|
||||
- Using %> for a virtual column has a check based on 'tabsize'. Better would
|
||||
be to cache the result of win_linetabsize(col), storing both col and vcol,
|
||||
@@ -65,79 +73,107 @@ Regexp problems:
|
||||
Still using freed memory after using setloclist(). (lcd, 2014 Jul 23)
|
||||
More info Jul 24. Not clear why.
|
||||
|
||||
Docs: "= register is writable. (Christian Brabandt, 2015 Jan 28)
|
||||
Better .ico file for Windows. (Pat Suwalski, 2015 Feb 13)
|
||||
Waiting for response on remark from Edward Fox.
|
||||
|
||||
New syntax file for pfmain. (Anton Shestakov, 2015 Feb 2)
|
||||
Add Tera Term language plugins. (Ken Takata, 2015 Jul 3)
|
||||
|
||||
Patch to make getregtype() return the right size for non-linux systems.
|
||||
(Yasuhiro Matsumoto, 2014 Jul 8)
|
||||
Breaks test_eval. Inefficient, can we only compute y_width when needed?
|
||||
RXVT sends a different background color response. (Higashi, 2015 Jul 5)
|
||||
|
||||
More tests for :diffoff. Olaf Dabrunz, (2015 Jul 4)
|
||||
|
||||
Problem that a previous silent ":throw" causes a following try/catch not to
|
||||
work. (ZyX, 2013 Sep 28)
|
||||
|
||||
Problem using ":try" inside ":execute". (ZyX, 2013 Sep 15)
|
||||
|
||||
Regression for v_b_A. (Ingo Karkat, 2015 May 18)
|
||||
|
||||
":cd C:\Windows\System32\drivers\etc*" does not work, even though the
|
||||
directory exists. (Sergio Gallelli, 2013 Dec 29)
|
||||
|
||||
Invalid memory access in regexp.c. (Dominique Pelle, 2015 May 23)
|
||||
|
||||
Using ":windo" to set options in all windows has the side effect that it
|
||||
changes the window layout and the current window. Make a variant that saves
|
||||
and restores. Use in the matchparen plugin.
|
||||
Perhaps we can use ":silent window"?
|
||||
|
||||
C indent: should recognize C11 raw strings. (Mark Lodato, 2015 Mar 1)
|
||||
Need to recognize R"string" for 'cindent'.
|
||||
|
||||
Crash when changing the 'tags' option from a remote command.
|
||||
(Benjamin Fritz, 2015 Mar 18, stack trace Mar 20)
|
||||
|
||||
Gvim: when both Tab and CTRL-I are mapped, use CTRL-I not for Tab.
|
||||
|
||||
Can src/GvimExt/Make_cyg.mak be removed?
|
||||
Same for src/xxd/Make_cyg.mak
|
||||
|
||||
Python: ":py raw_input('prompt')" doesn't work. (Manu Hack)
|
||||
|
||||
MS-Windows: When editing a file with a leading space, writing it uses the
|
||||
wrong name. (Aram, 2014 Nov 7) Vim 7.4.
|
||||
|
||||
Can't recognize the $ProgramFiles(x86) environment variable. Recognize it
|
||||
specifically? First try with the parens, then without.
|
||||
|
||||
Patch for multi-byte characters in langmap and applying a mapping on them.
|
||||
(Christian Brabandt, 2015 Jun 12)
|
||||
Is this the right solution?
|
||||
|
||||
Patch to add grepfile(). (Scott Prager, 2015 May 26)
|
||||
Work in progress.
|
||||
|
||||
Patch to make getregtype() return the right size for non-linux systems.
|
||||
(Yasuhiro Matsumoto, 2014 Jul 8)
|
||||
Breaks test_eval. Inefficient, can we only compute y_width when needed?
|
||||
|
||||
Value returned by virtcol() changes depending on how lines wrap. This is
|
||||
inconsistent with the documentation.
|
||||
|
||||
Better greek spell checking. Issue 299.
|
||||
|
||||
On MS-Windows running tests with Mercurial has problems when the fileformat of
|
||||
the input files are changed. (Ken Takata, Taro Muraoka, 2014 Sep 25)
|
||||
Update Nov 5.
|
||||
Add 'fixeol' option, default on, so that people who have problems with fixing
|
||||
the missing EOL can switch it off?
|
||||
|
||||
When complete() first argument is before where insert started and 'backspace'
|
||||
is Vi compatible, the completion fails. (Hirohito Higashi, 2015 Feb 19)
|
||||
|
||||
Patch to fix equivalence classes in regexp. (Dominique Pelle, 2015 Jun 2)
|
||||
|
||||
Test 44 fails when [[=A=]] is changed to [[=À=]]. Caused by getcmdline() not
|
||||
handling the 0x80 as a second byte correctly? (Dominique Pelle, 2015 Jun 10)
|
||||
|
||||
Weird encryption problems on Windows. (Ben Fritz, 2015 Feb 13)
|
||||
Goes away when disabling the swap file. (might1, Feb 16)
|
||||
|
||||
Patch to add an OptionSet autocommand event. (Christian Brabandt, 2015 Jun 25)
|
||||
|
||||
MS-Windows: Crash opening very long file name starting with "\\".
|
||||
(Christian Brock, 2012 Jun 29)
|
||||
|
||||
Patch to add "tn" termcap feature, whether Vim can write in the last screen
|
||||
cell. (Hayaki Saito, 2015 Jan 28)
|
||||
The argument for "-S" is not taken literally, the ":so" command expands
|
||||
wildcards. Add a ":nowild" command modifier? (ZyX, 2015 March 4)
|
||||
|
||||
Patch to fix getting buffer number for autocommand. (Lech Lorens, 2015 Jan 27)
|
||||
|
||||
Add a few features to xxd. (Vadim Vygonets, 2013 Nov 11)
|
||||
Patches: 2013 Nov 19
|
||||
1: Add -e: little endian hexdump
|
||||
2: Add -o: add offset to displayed position
|
||||
3: Change displayed file position width to 8 chars
|
||||
|
||||
Undo messes up text. Issue 324.
|
||||
Patch from Christian on the issue.
|
||||
|
||||
Using CTRL-L while popup menu is visible behaves like CTRL-P, which is wrong.
|
||||
Patch by Yasuhiro Matsumoto, 2015 Jan 5.
|
||||
Is this right? Comment from Amadeus Demarzi.
|
||||
Another patch from Christian, Jan 6.
|
||||
Comment from Hirohito Higashi, Jan 6.
|
||||
|
||||
Cursorline background color not mixed with character highlight.
|
||||
Patch by Yasuhiro Matsumoto, 2014 Dec 3.
|
||||
|
||||
Problem using diff syntax with cp932 encoding. Idea from Yasuhiro Matsumoto,
|
||||
patch from Ken Takata (2014 Nov 6)
|
||||
Build with Python on Mac does not always use the right library.
|
||||
(Kazunobu Kuriyama, 2015 Mar 28)
|
||||
|
||||
ml_updatechunk() is slow when retrying for another encoding. (John Little,
|
||||
2014 Sep 11)
|
||||
|
||||
Patch to add counts to zr and zm. (Marcin Szamotulski, 2015 Jan 28)
|
||||
Patch to use different terminal mode settings for system(). (Hayaki Saito)
|
||||
Does this work for everybody?
|
||||
|
||||
Patch to add a different escape sequence for replace mode.
|
||||
(Omar Sandoval, 2014 Nov 30)
|
||||
Patch to fix that wide characters do not work properly after exiting.
|
||||
(Yasuhiro Matsumoto, 2015 May 24) Better patch to come.
|
||||
|
||||
Patch on Issue 166, popup drawing with '$' in 'cpo'.
|
||||
Patch for man.vim. (SungHyun Nam, 2015 May 20)
|
||||
Doesn't work completely (Dominique Orban)
|
||||
|
||||
Calling setreg() with an empty list doesn't work.
|
||||
Patch by Yasuhiro Matsumoto, 2014 Dec 14.
|
||||
When a session file is created and there are "nofile" buffers, these are not
|
||||
filled. Need to trigger BufReadCmd autocommands. Also handle deleting the
|
||||
initial empty buffer better. (ZyX, 2015 March 8)
|
||||
|
||||
Extended file attributes lost on write (backupcopy=no). Issue 306.
|
||||
|
||||
@@ -146,29 +182,24 @@ Patch to add an argument to ":ls" for specific kinds of buffers.
|
||||
|
||||
Crash when using R syntax. (Jakson Alves de Aquino, 2015 Jan 30)
|
||||
Memory freed by ":syn clear" but still referenced, syntax items referenced
|
||||
from two windows?
|
||||
from two windows? Stopped happening (Feb 5).
|
||||
|
||||
Window height computed incorrectly when Vim is minimized.
|
||||
Patch to fix this. (Ingo Karkat, 2014 Dec 19)
|
||||
Patch for an extra argument to matchadd() for conceal. (Christian Brabandt,
|
||||
2015 Feb 17, update Feb 19)
|
||||
|
||||
Patch to fix CTRL-W handling in Insert mode for multi-byte characters.
|
||||
(Yasuhiro Matsumoto, 2015 Jan 29, update with test)
|
||||
|
||||
Patch to allow values greater than 255 for ctermfg/ctermbg on Windows.
|
||||
(Yasuhiro Matsumoto, 2014 Dec 5)
|
||||
Patch to add :lockjumps. (Carlo Baldassi, 2015 May 25)
|
||||
OK to not block marks?
|
||||
|
||||
Mixup of highlighting when there is a match and SpellBad. (ZyX, 2015 Jan 1)
|
||||
|
||||
Problem caused by patch 7.3.638: window->open does not update window
|
||||
correctly. Issue 91. With patch.
|
||||
Patch on issue 79: use 'path' option for filename completion.
|
||||
|
||||
Patch to add 'belloff' option. (Christian Brabandt, 2015 Jan 31)
|
||||
Update Feb 6.
|
||||
|
||||
Patch for drag&drop reordering of GUI tab pages reordering.
|
||||
(Ken Takata, 2013 Nov 22, second one, also by Masamichi Abe)
|
||||
|
||||
'ff' is wrong for one-line file without EOL. (Patch on Issue 77)
|
||||
|
||||
Patch on Issue 72: 'autochdir' causes problems for :vimgrep.
|
||||
|
||||
When 'balloonexpr' returns a list the result has a trailing newline.
|
||||
@@ -192,6 +223,9 @@ lines. (Marco Hinz, 2014 Nov 2)
|
||||
|
||||
Adding "~" to 'cdpath' doesn't work for completion? (Davido, 2013 Aug 19)
|
||||
|
||||
Should be easy to highlight all matches with 'incsearch'. Idea by Itchyny,
|
||||
2015 Feb 6.
|
||||
|
||||
Plugins need to make a lot of effort, lots of mappings, to know what happened
|
||||
before pressing the key that triggers a plugin action. How about keeping the
|
||||
last N pressed keys, so that they do not need to be mapped?
|
||||
@@ -205,11 +239,24 @@ With test, Nov 23.
|
||||
Wrong scrolling when using incsearch. Patch by Christian Brabandt, 2014 Dec 4.
|
||||
Is this a good solution?
|
||||
|
||||
Patch to allow setting w:quickfix_title via setqflist() and setloclist()
|
||||
functions. (Christian Brabandt, 2013 May 8, update May 21)
|
||||
Patch to add getlocstack() / setlocstack(). (Christian Brabandt, 2013 May 14)
|
||||
Second one. Update May 22.
|
||||
Update by Daniel Hahler, 2014 Jul 4, Aug 14, Oct 14, Oct 15.
|
||||
|
||||
Patch: Let rare word highlighting overrule good word highlighting.
|
||||
(Jakson A. Aquino, 2010 Jul 30, again 2011 Jul 2)
|
||||
|
||||
Patch to add digits argument to round(). (Yasuhiro Matsumoto, 2015 Apr 26)
|
||||
|
||||
Can assign to s:type when a function s:type has been defined.
|
||||
Also the other way around: define a function while a variable with that name
|
||||
was already defined.
|
||||
(Yasuhiro Matsumoto, 2014 Nov 3)
|
||||
|
||||
Patch for ordered dict. (Ozaki Kiichi, 2015 May 7)
|
||||
|
||||
Patch to make closed folds line up. (Charles Campbell, 2014 Sep 12)
|
||||
Remark from Roland Eggner: does it cause crashes? (2014 Dec 12)
|
||||
Updated patch by Roland Eggner, Dec 16
|
||||
@@ -249,8 +296,10 @@ Patch to add argument to :cquit. (Thinca, 2014 Oct 12)
|
||||
|
||||
No error for missing endwhile. (ZyX, 2014 Mar 20)
|
||||
|
||||
The entries added by matchaddpos() are returned by getmatches() but can't be
|
||||
set with setmatches(). (lcd47, 2014 Jun 29)
|
||||
Patch to make extend() fail early when it might fail at some point.
|
||||
(Olaf Dabrunz, 2015 May 2) Makes extend() slower, do we still want it?
|
||||
Perhaps only the checks that can be done without looping over the dict or
|
||||
arguments.
|
||||
|
||||
Patch to add :arglocal and :arglists. (Marcin Szamotulski, 2014 Aug 6)
|
||||
|
||||
@@ -343,7 +392,7 @@ Editing an ascii file as ucs-2 or ucs-4 causes display errors.
|
||||
":Next 1 some-arg" does not complain about trailing argument. Also for
|
||||
various other commands. (ZyX, 2014 Mar 30)
|
||||
|
||||
patch to skip sort if no line matches the expression.
|
||||
Patch to skip sort if no line matches the expression.
|
||||
(Christian Brabandt, 2014 Jun 25)
|
||||
|
||||
Patch to add sortuniq(). (Cade Forester, 2014 Mar 19)
|
||||
@@ -370,8 +419,6 @@ Remark on the docs. Should not be a compile time feature. But then what?
|
||||
Completion of ":e" is ":earlier", should be ":edit". Complete to the matching
|
||||
command instead of doing this alphabetically. (Mikel Jorgensen)
|
||||
|
||||
Patch to add v:completed_item. (Shougo Matsu, 2013 Nov 29).
|
||||
|
||||
Patch to get MSVC version in a nicer way. (Ken Takata, 2014 Jul 24)
|
||||
|
||||
Patch to define macros for hardcoded values. (Elias Diem, 2013 Dec 14)
|
||||
@@ -379,10 +426,8 @@ Patch to define macros for hardcoded values. (Elias Diem, 2013 Dec 14)
|
||||
Several syntax file match "^\s*" which may get underlined if that's in the
|
||||
highlight group. Add a "\zs" after it?
|
||||
|
||||
Patch to fix temp directories for Windows, so that it works without tweaking.
|
||||
Issue 28.
|
||||
|
||||
Go through more coverity reports.
|
||||
The undo file name can get too long. (Issue 346)
|
||||
For the path use a hash instead of dir%dir%dir%name hash%name.
|
||||
|
||||
Patch to add ":undorecover", get as much text out of the undo file as
|
||||
possible. (Christian Brabandt, 2014 Mar 12, update Aug 22)
|
||||
@@ -434,9 +479,6 @@ When evaluating expression in backticks, autoload doesn't work.
|
||||
Using <nr>ifoobar<esc> can slow down Vim. Patch by Christian Brabandt, 2013
|
||||
Dec 13.
|
||||
|
||||
Fold can't be opened after ":move". (Ein Brown)
|
||||
Patch from Christian Brabandt doesn't fix it completely.
|
||||
|
||||
Patch from Christian Brabandt to preserve upper case marks when wiping out a
|
||||
buffer. (2013 Dec 9)
|
||||
|
||||
@@ -509,12 +551,6 @@ Dialog is too big on Linux too. (David Fishburn, 2013 Sep 2)
|
||||
Patch to check whether a buffer is quickfix or a location list.
|
||||
(Yasuhiro Matsumoto, 2014 Dec 9)
|
||||
|
||||
Patch to allow setting w:quickfix_title via setqflist() and setloclist()
|
||||
functions. (Christian Brabandt, 2013 May 8, update May 21)
|
||||
Patch to add getlocstack() / setlocstack(). (Christian Brabandt, 2013 May 14)
|
||||
Second one. Update May 22.
|
||||
Update by Daniel Hahler, 2014 Jul 4, Aug 14, Oct 14, Oct 15.
|
||||
|
||||
Patch to make fold updates much faster. (Christian Brabandt, 2012 Dec)
|
||||
|
||||
Issue 54: document behavior of -complete, also expands arg.
|
||||
@@ -563,10 +599,6 @@ signs? Patch by Christian Brabandt, 2013 Aug 22.
|
||||
|
||||
Patch to remove flicker from popup menu. (Yasuhiro Matsumoto, 2013 Aug 15)
|
||||
|
||||
Patch to add 'completeselect' option. Specifies how to select a candidate in
|
||||
insert completion. (Shougo, 2013 May 29)
|
||||
Update to add to existing 'completeopt'. 2013 May 30
|
||||
|
||||
Problem with refresh:always in completion. (Tyler Wade, 2013 Mar 17)
|
||||
|
||||
b:undo_ftplugin cannot call a script-local function. (Boris Danilov, 2013 Jan
|
||||
@@ -600,7 +632,9 @@ line are opened again, but from the wrong directory. Apply 'autochdir' only
|
||||
after starting up?
|
||||
|
||||
Patch to add ":ldo" and ":cdo", execute commands over quickfix list and
|
||||
location list. (Yegappan Lakshmanan, 2013 Jun 2)
|
||||
location list. (Yegappan Lakshmanan, 2013 Jun 2, update 2015 Mar 21)
|
||||
Update by Florian Walch, 2015 Jul 1.
|
||||
Yegappan will send an update in July.
|
||||
|
||||
8 "stl" and "stlnc" in 'fillchars' don't work for multi-byte characters.
|
||||
Patch by Christian Wellenbrock, 2013 Jul 5.
|
||||
@@ -993,9 +1027,6 @@ Patch for GVimExt to show an icon. (Dominik Riebeling, 2010 Nov 7)
|
||||
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)
|
||||
|
||||
@@ -1053,8 +1084,8 @@ Dominique can't reproduce it.
|
||||
":function f(x) keepjumps" creates a function where every command is executed
|
||||
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
|
||||
Coverity: Check if there are new reported defects:
|
||||
https://scan.coverity.com/projects/241
|
||||
|
||||
Patch to support :undo absolute jump to file save number. (Christian Brabandt,
|
||||
2010 Nov 5)
|
||||
@@ -1090,7 +1121,7 @@ string value.
|
||||
|
||||
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
|
||||
For running gvim on a USB stick: avoid the OLE registration. Use a command
|
||||
line argument -noregister.
|
||||
|
||||
When using an expression in 'statusline' leading white space sometimes goes
|
||||
@@ -1404,6 +1435,7 @@ Kondakoff, 2009 May 13)
|
||||
|
||||
Problem with 'langmap' being used on the rhs of a mapping. (Nikolai Weibull,
|
||||
2008 May 14)
|
||||
Possibly related problem: Alexey Muranov, 2015 Apr 2
|
||||
|
||||
Problem with CTRL-F. (Charles Campbell, 2008 March 21)
|
||||
Only happens with "gvim -geometry "160x26+4+27" -u NONE -U NONE prop.c".
|
||||
@@ -2108,8 +2140,6 @@ Awaiting updated patches:
|
||||
Search in 'runtimepath'?
|
||||
More docs needed about how to use this.
|
||||
How to get the messages into the .po files?
|
||||
strchars() Like strlen() and strwidth() but counting characters
|
||||
instead of bytes.
|
||||
confirm() add "flags" argument, with 'v' for vertical
|
||||
layout and 'c' for console dialog. (Haegg)
|
||||
Flemming Madsen has a patch for the 'c' flag
|
||||
@@ -4659,7 +4689,6 @@ Searching:
|
||||
should be ignored (like "*/" or "#endif" inside /* */).
|
||||
Also: use "%" to jump from start to end of syntax region and back.
|
||||
Alternative: use matchit.vim
|
||||
8 "/:/e+1" gets stuck on a match at the end of the line. Do we care?
|
||||
8 A pattern like "\([^a]\+\)\+" takes an awful long time. Recognize that
|
||||
the recursive "\+" is meaningless and optimize for it.
|
||||
This one is also very slow on "/* some comment */": "^\/\*\(.*[^/]\)*$".
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*usr_02.txt* For Vim version 7.4. Last change: 2010 Jul 20
|
||||
*usr_02.txt* For Vim version 7.4. Last change: 2015 Apr 12
|
||||
|
||||
VIM USER MANUAL - by Bram Moolenaar
|
||||
|
||||
@@ -527,9 +527,11 @@ Summary: *help-summary* >
|
||||
:help subject()
|
||||
< Function "subject". >
|
||||
:help -subject
|
||||
< Command-line option "-subject". >
|
||||
< Command-line argument "-subject". >
|
||||
:help +subject
|
||||
< Compile-time feature "+subject". >
|
||||
:help /*
|
||||
< Regular expression item "*" >
|
||||
:help EventName
|
||||
< Autocommand event "EventName". >
|
||||
:help digraphs.txt
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
VIM(1) VIM(1)
|
||||
VIM(1) General Commands Manual VIM(1)
|
||||
|
||||
|
||||
|
||||
@@ -21,13 +21,13 @@ DESCRIPTION
|
||||
to edit all kinds of plain text. It is especially useful for editing
|
||||
programs.
|
||||
|
||||
There are a lot of enhancements above Vi: multi level undo, multi win-
|
||||
There are a lot of enhancements above Vi: multi level undo, multi win‐
|
||||
dows and buffers, syntax highlighting, command line editing, filename
|
||||
completion, on-line help, visual selection, etc.. See ":help
|
||||
vi_diff.txt" for a summary of the differences between Vim and Vi.
|
||||
|
||||
While running Vim a lot of help can be obtained from the on-line help
|
||||
system, with the ":help" command. See the ON-LINE HELP section below.
|
||||
system, with the ":help" command. See the ON-LINE HELP section below.
|
||||
|
||||
Most often Vim is started to edit a single file with the command
|
||||
|
||||
@@ -38,44 +38,44 @@ DESCRIPTION
|
||||
vim [options] [filelist]
|
||||
|
||||
If the filelist is missing, the editor will start with an empty buffer.
|
||||
Otherwise exactly one out of the following four may be used to choose
|
||||
Otherwise exactly one out of the following four may be used to choose
|
||||
one or more files to be edited.
|
||||
|
||||
file .. A list of filenames. The first one will be the current
|
||||
file and read into the buffer. The cursor will be posi-
|
||||
file .. A list of filenames. The first one will be the current
|
||||
file and read into the buffer. The cursor will be posi‐
|
||||
tioned on the first line of the buffer. You can get to the
|
||||
other files with the ":next" command. To edit a file that
|
||||
other files with the ":next" command. To edit a file that
|
||||
starts with a dash, precede the filelist with "--".
|
||||
|
||||
- The file to edit is read from stdin. Commands are read
|
||||
- The file to edit is read from stdin. Commands are read
|
||||
from stderr, which should be a tty.
|
||||
|
||||
-t {tag} The file to edit and the initial cursor position depends on
|
||||
a "tag", a sort of goto label. {tag} is looked up in the
|
||||
a "tag", a sort of goto label. {tag} is looked up in the
|
||||
tags file, the associated file becomes the current file and
|
||||
the associated command is executed. Mostly this is used
|
||||
for C programs, in which case {tag} could be a function
|
||||
the associated command is executed. Mostly this is used
|
||||
for C programs, in which case {tag} could be a function
|
||||
name. The effect is that the file containing that function
|
||||
becomes the current file and the cursor is positioned on
|
||||
becomes the current file and the cursor is positioned on
|
||||
the start of the function. See ":help tag-commands".
|
||||
|
||||
-q [errorfile]
|
||||
Start in quickFix mode. The file [errorfile] is read and
|
||||
the first error is displayed. If [errorfile] is omitted,
|
||||
Start in quickFix mode. The file [errorfile] is read and
|
||||
the first error is displayed. If [errorfile] is omitted,
|
||||
the filename is obtained from the 'errorfile' option
|
||||
(defaults to "AztecC.Err" for the Amiga, "errors.err" on
|
||||
other systems). Further errors can be jumped to with the
|
||||
(defaults to "AztecC.Err" for the Amiga, "errors.err" on
|
||||
other systems). Further errors can be jumped to with the
|
||||
":cn" command. See ":help quickfix".
|
||||
|
||||
Vim behaves differently, depending on the name of the command (the exe-
|
||||
Vim behaves differently, depending on the name of the command (the exe‐
|
||||
cutable may still be the same file).
|
||||
|
||||
vim The "normal" way, everything is default.
|
||||
|
||||
ex Start in Ex mode. Go to Normal mode with the ":vi" command.
|
||||
ex Start in Ex mode. Go to Normal mode with the ":vi" command.
|
||||
Can also be done with the "-e" argument.
|
||||
|
||||
view Start in read-only mode. You will be protected from writing
|
||||
view Start in read-only mode. You will be protected from writing
|
||||
the files. Can also be done with the "-R" argument.
|
||||
|
||||
gvim gview
|
||||
@@ -87,102 +87,102 @@ DESCRIPTION
|
||||
be done with the "-y" argument.
|
||||
|
||||
rvim rview rgvim rgview
|
||||
Like the above, but with restrictions. It will not be possi-
|
||||
ble to start shell commands, or suspend Vim. Can also be
|
||||
Like the above, but with restrictions. It will not be possi‐
|
||||
ble to start shell commands, or suspend Vim. Can also be
|
||||
done with the "-Z" argument.
|
||||
|
||||
OPTIONS
|
||||
The options may be given in any order, before or after filenames.
|
||||
The options may be given in any order, before or after filenames.
|
||||
Options without an argument can be combined after a single dash.
|
||||
|
||||
+[num] For the first file the cursor will be positioned on line
|
||||
"num". If "num" is missing, the cursor will be positioned
|
||||
+[num] For the first file the cursor will be positioned on line
|
||||
"num". If "num" is missing, the cursor will be positioned
|
||||
on the last line.
|
||||
|
||||
+/{pat} For the first file the cursor will be positioned on the
|
||||
first occurrence of {pat}. See ":help search-pattern" for
|
||||
the available search patterns.
|
||||
+/{pat} For the first file the cursor will be positioned in the
|
||||
line with the first occurrence of {pat}. See ":help
|
||||
search-pattern" for the available search patterns.
|
||||
|
||||
+{command}
|
||||
|
||||
-c {command}
|
||||
{command} will be executed after the first file has been
|
||||
read. {command} is interpreted as an Ex command. If the
|
||||
{command} contains spaces it must be enclosed in double
|
||||
quotes (this depends on the shell that is used). Example:
|
||||
{command} will be executed after the first file has been
|
||||
read. {command} is interpreted as an Ex command. If the
|
||||
{command} contains spaces it must be enclosed in double
|
||||
quotes (this depends on the shell that is used). Example:
|
||||
Vim "+set si" main.c
|
||||
Note: You can use up to 10 "+" or "-c" commands.
|
||||
|
||||
-S {file} {file} will be sourced after the first file has been read.
|
||||
This is equivalent to -c "source {file}". {file} cannot
|
||||
-S {file} {file} will be sourced after the first file has been read.
|
||||
This is equivalent to -c "source {file}". {file} cannot
|
||||
start with '-'. If {file} is omitted "Session.vim" is used
|
||||
(only works when -S is the last argument).
|
||||
|
||||
--cmd {command}
|
||||
Like using "-c", but the command is executed just before
|
||||
processing any vimrc file. You can use up to 10 of these
|
||||
Like using "-c", but the command is executed just before
|
||||
processing any vimrc file. You can use up to 10 of these
|
||||
commands, independently from "-c" commands.
|
||||
|
||||
-A If Vim has been compiled with ARABIC support for editing
|
||||
right-to-left oriented files and Arabic keyboard mapping,
|
||||
this option starts Vim in Arabic mode, i.e. 'arabic' is
|
||||
-A If Vim has been compiled with ARABIC support for editing
|
||||
right-to-left oriented files and Arabic keyboard mapping,
|
||||
this option starts Vim in Arabic mode, i.e. 'arabic' is
|
||||
set. Otherwise an error message is given and Vim aborts.
|
||||
|
||||
-b Binary mode. A few options will be set that makes it pos-
|
||||
-b Binary mode. A few options will be set that makes it pos‐
|
||||
sible to edit a binary or executable file.
|
||||
|
||||
-C Compatible. Set the 'compatible' option. This will make
|
||||
Vim behave mostly like Vi, even though a .vimrc file
|
||||
-C Compatible. Set the 'compatible' option. This will make
|
||||
Vim behave mostly like Vi, even though a .vimrc file
|
||||
exists.
|
||||
|
||||
-d Start in diff mode. There should be two, three or four
|
||||
file name arguments. Vim will open all the files and show
|
||||
-d Start in diff mode. There should be two, three or four
|
||||
file name arguments. Vim will open all the files and show
|
||||
differences between them. Works like vimdiff(1).
|
||||
|
||||
-d {device} Open {device} for use as a terminal. Only on the Amiga.
|
||||
-d {device} Open {device} for use as a terminal. Only on the Amiga.
|
||||
Example: "-d con:20/30/600/150".
|
||||
|
||||
-D Debugging. Go to debugging mode when executing the first
|
||||
-D Debugging. Go to debugging mode when executing the first
|
||||
command from a script.
|
||||
|
||||
-e Start Vim in Ex mode, just like the executable was called
|
||||
-e Start Vim in Ex mode, just like the executable was called
|
||||
"ex".
|
||||
|
||||
-E Start Vim in improved Ex mode, just like the executable was
|
||||
called "exim".
|
||||
|
||||
-f Foreground. For the GUI version, Vim will not fork and
|
||||
-f Foreground. For the GUI version, Vim will not fork and
|
||||
detach from the shell it was started in. On the Amiga, Vim
|
||||
is not restarted to open a new window. This option should
|
||||
be used when Vim is executed by a program that will wait
|
||||
for the edit session to finish (e.g. mail). On the Amiga
|
||||
is not restarted to open a new window. This option should
|
||||
be used when Vim is executed by a program that will wait
|
||||
for the edit session to finish (e.g. mail). On the Amiga
|
||||
the ":sh" and ":!" commands will not work.
|
||||
|
||||
--nofork Foreground. For the GUI version, Vim will not fork and
|
||||
--nofork Foreground. For the GUI version, Vim will not fork and
|
||||
detach from the shell it was started in.
|
||||
|
||||
-F If Vim has been compiled with FKMAP support for editing
|
||||
right-to-left oriented files and Farsi keyboard mapping,
|
||||
this option starts Vim in Farsi mode, i.e. 'fkmap' and
|
||||
'rightleft' are set. Otherwise an error message is given
|
||||
and Vim aborts.
|
||||
|
||||
-g If Vim has been compiled with GUI support, this option
|
||||
enables the GUI. If no GUI support was compiled in, an
|
||||
error message is given and Vim aborts.
|
||||
|
||||
-h Give a bit of help about the command line arguments and
|
||||
options. After this Vim exits.
|
||||
|
||||
-H If Vim has been compiled with RIGHTLEFT support for editing
|
||||
right-to-left oriented files and Hebrew keyboard mapping,
|
||||
this option starts Vim in Hebrew mode, i.e. 'hkmap' and
|
||||
-F If Vim has been compiled with FKMAP support for editing
|
||||
right-to-left oriented files and Farsi keyboard mapping,
|
||||
this option starts Vim in Farsi mode, i.e. 'fkmap' and
|
||||
'rightleft' are set. Otherwise an error message is given
|
||||
and Vim aborts.
|
||||
|
||||
-g If Vim has been compiled with GUI support, this option
|
||||
enables the GUI. If no GUI support was compiled in, an
|
||||
error message is given and Vim aborts.
|
||||
|
||||
-h Give a bit of help about the command line arguments and
|
||||
options. After this Vim exits.
|
||||
|
||||
-H If Vim has been compiled with RIGHTLEFT support for editing
|
||||
right-to-left oriented files and Hebrew keyboard mapping,
|
||||
this option starts Vim in Hebrew mode, i.e. 'hkmap' and
|
||||
'rightleft' are set. Otherwise an error message is given
|
||||
and Vim aborts.
|
||||
|
||||
-i {viminfo}
|
||||
When using the viminfo file is enabled, this option sets
|
||||
the filename to use, instead of the default "~/.viminfo".
|
||||
When using the viminfo file is enabled, this option sets
|
||||
the filename to use, instead of the default "~/.viminfo".
|
||||
This can also be used to skip the use of the .viminfo file,
|
||||
by giving the name "NONE".
|
||||
|
||||
@@ -190,92 +190,92 @@ OPTIONS
|
||||
|
||||
-l Lisp mode. Sets the 'lisp' and 'showmatch' options on.
|
||||
|
||||
-m Modifying files is disabled. Resets the 'write' option.
|
||||
You can still modify the buffer, but writing a file is not
|
||||
-m Modifying files is disabled. Resets the 'write' option.
|
||||
You can still modify the buffer, but writing a file is not
|
||||
possible.
|
||||
|
||||
-M Modifications not allowed. The 'modifiable' and 'write'
|
||||
options will be unset, so that changes are not allowed and
|
||||
files can not be written. Note that these options can be
|
||||
-M Modifications not allowed. The 'modifiable' and 'write'
|
||||
options will be unset, so that changes are not allowed and
|
||||
files can not be written. Note that these options can be
|
||||
set to enable making modifications.
|
||||
|
||||
-N No-compatible mode. Reset the 'compatible' option. This
|
||||
will make Vim behave a bit better, but less Vi compatible,
|
||||
-N No-compatible mode. Reset the 'compatible' option. This
|
||||
will make Vim behave a bit better, but less Vi compatible,
|
||||
even though a .vimrc file does not exist.
|
||||
|
||||
-n No swap file will be used. Recovery after a crash will be
|
||||
impossible. Handy if you want to edit a file on a very
|
||||
slow medium (e.g. floppy). Can also be done with ":set
|
||||
-n No swap file will be used. Recovery after a crash will be
|
||||
impossible. Handy if you want to edit a file on a very
|
||||
slow medium (e.g. floppy). Can also be done with ":set
|
||||
uc=0". Can be undone with ":set uc=200".
|
||||
|
||||
-nb Become an editor server for NetBeans. See the docs for
|
||||
-nb Become an editor server for NetBeans. See the docs for
|
||||
details.
|
||||
|
||||
-o[N] Open N windows stacked. When N is omitted, open one window
|
||||
for each file.
|
||||
|
||||
-O[N] Open N windows side by side. When N is omitted, open one
|
||||
-O[N] Open N windows side by side. When N is omitted, open one
|
||||
window for each file.
|
||||
|
||||
-p[N] Open N tab pages. When N is omitted, open one tab page for
|
||||
each file.
|
||||
|
||||
-R Read-only mode. The 'readonly' option will be set. You
|
||||
can still edit the buffer, but will be prevented from acci-
|
||||
dently overwriting a file. If you do want to overwrite a
|
||||
file, add an exclamation mark to the Ex command, as in
|
||||
":w!". The -R option also implies the -n option (see
|
||||
below). The 'readonly' option can be reset with ":set
|
||||
-R Read-only mode. The 'readonly' option will be set. You
|
||||
can still edit the buffer, but will be prevented from acci‐
|
||||
dently overwriting a file. If you do want to overwrite a
|
||||
file, add an exclamation mark to the Ex command, as in
|
||||
":w!". The -R option also implies the -n option (see
|
||||
below). The 'readonly' option can be reset with ":set
|
||||
noro". See ":help 'readonly'".
|
||||
|
||||
-r List swap files, with information about using them for
|
||||
-r List swap files, with information about using them for
|
||||
recovery.
|
||||
|
||||
-r {file} Recovery mode. The swap file is used to recover a crashed
|
||||
editing session. The swap file is a file with the same
|
||||
-r {file} Recovery mode. The swap file is used to recover a crashed
|
||||
editing session. The swap file is a file with the same
|
||||
filename as the text file with ".swp" appended. See ":help
|
||||
recovery".
|
||||
|
||||
-s Silent mode. Only when started as "Ex" or when the "-e"
|
||||
-s Silent mode. Only when started as "Ex" or when the "-e"
|
||||
option was given before the "-s" option.
|
||||
|
||||
-s {scriptin}
|
||||
The script file {scriptin} is read. The characters in the
|
||||
file are interpreted as if you had typed them. The same
|
||||
The script file {scriptin} is read. The characters in the
|
||||
file are interpreted as if you had typed them. The same
|
||||
can be done with the command ":source! {scriptin}". If the
|
||||
end of the file is reached before the editor exits, further
|
||||
characters are read from the keyboard.
|
||||
|
||||
-T {terminal}
|
||||
Tells Vim the name of the terminal you are using. Only
|
||||
required when the automatic way doesn't work. Should be a
|
||||
terminal known to Vim (builtin) or defined in the termcap
|
||||
Tells Vim the name of the terminal you are using. Only
|
||||
required when the automatic way doesn't work. Should be a
|
||||
terminal known to Vim (builtin) or defined in the termcap
|
||||
or terminfo file.
|
||||
|
||||
-u {vimrc} Use the commands in the file {vimrc} for initializations.
|
||||
All the other initializations are skipped. Use this to
|
||||
edit a special kind of files. It can also be used to skip
|
||||
all initializations by giving the name "NONE". See ":help
|
||||
-u {vimrc} Use the commands in the file {vimrc} for initializations.
|
||||
All the other initializations are skipped. Use this to
|
||||
edit a special kind of files. It can also be used to skip
|
||||
all initializations by giving the name "NONE". See ":help
|
||||
initialization" within vim for more details.
|
||||
|
||||
-U {gvimrc} Use the commands in the file {gvimrc} for GUI initializa-
|
||||
tions. All the other GUI initializations are skipped. It
|
||||
can also be used to skip all GUI initializations by giving
|
||||
the name "NONE". See ":help gui-init" within vim for more
|
||||
-U {gvimrc} Use the commands in the file {gvimrc} for GUI initializa‐
|
||||
tions. All the other GUI initializations are skipped. It
|
||||
can also be used to skip all GUI initializations by giving
|
||||
the name "NONE". See ":help gui-init" within vim for more
|
||||
details.
|
||||
|
||||
-V[N] Verbose. Give messages about which files are sourced and
|
||||
for reading and writing a viminfo file. The optional num-
|
||||
-V[N] Verbose. Give messages about which files are sourced and
|
||||
for reading and writing a viminfo file. The optional num‐
|
||||
ber N is the value for 'verbose'. Default is 10.
|
||||
|
||||
-v Start Vim in Vi mode, just like the executable was called
|
||||
"vi". This only has effect when the executable is called
|
||||
-v Start Vim in Vi mode, just like the executable was called
|
||||
"vi". This only has effect when the executable is called
|
||||
"ex".
|
||||
|
||||
-w {scriptout}
|
||||
All the characters that you type are recorded in the file
|
||||
{scriptout}, until you exit Vim. This is useful if you
|
||||
want to create a script file to be used with "vim -s" or
|
||||
All the characters that you type are recorded in the file
|
||||
{scriptout}, until you exit Vim. This is useful if you
|
||||
want to create a script file to be used with "vim -s" or
|
||||
":source!". If the {scriptout} file exists, characters are
|
||||
appended.
|
||||
|
||||
@@ -285,27 +285,27 @@ OPTIONS
|
||||
-x Use encryption when writing files. Will prompt for a crypt
|
||||
key.
|
||||
|
||||
-X Don't connect to the X server. Shortens startup time in a
|
||||
terminal, but the window title and clipboard will not be
|
||||
-X Don't connect to the X server. Shortens startup time in a
|
||||
terminal, but the window title and clipboard will not be
|
||||
used.
|
||||
|
||||
-y Start Vim in easy mode, just like the executable was called
|
||||
"evim" or "eview". Makes Vim behave like a click-and-type
|
||||
"evim" or "eview". Makes Vim behave like a click-and-type
|
||||
editor.
|
||||
|
||||
-Z Restricted mode. Works like the executable starts with
|
||||
-Z Restricted mode. Works like the executable starts with
|
||||
"r".
|
||||
|
||||
-- Denotes the end of the options. Arguments after this will
|
||||
be handled as a file name. This can be used to edit a
|
||||
-- Denotes the end of the options. Arguments after this will
|
||||
be handled as a file name. This can be used to edit a
|
||||
filename that starts with a '-'.
|
||||
|
||||
--echo-wid GTK GUI only: Echo the Window ID on stdout.
|
||||
|
||||
--help Give a help message and exit, just like "-h".
|
||||
|
||||
--literal Take file name arguments literally, do not expand wild-
|
||||
cards. This has no effect on Unix where the shell expands
|
||||
--literal Take file name arguments literally, do not expand wild‐
|
||||
cards. This has no effect on Unix where the shell expands
|
||||
wildcards.
|
||||
|
||||
--noplugin Skip loading plugins. Implied by -u NONE.
|
||||
@@ -315,18 +315,18 @@ OPTIONS
|
||||
is given and the files are edited in the current Vim.
|
||||
|
||||
--remote-expr {expr}
|
||||
Connect to a Vim server, evaluate {expr} in it and print
|
||||
Connect to a Vim server, evaluate {expr} in it and print
|
||||
the result on stdout.
|
||||
|
||||
--remote-send {keys}
|
||||
Connect to a Vim server and send {keys} to it.
|
||||
|
||||
--remote-silent
|
||||
As --remote, but without the warning when no server is
|
||||
As --remote, but without the warning when no server is
|
||||
found.
|
||||
|
||||
--remote-wait
|
||||
As --remote, but Vim does not exit until the files have
|
||||
As --remote, but Vim does not exit until the files have
|
||||
been edited.
|
||||
|
||||
--remote-wait-silent
|
||||
@@ -337,31 +337,31 @@ OPTIONS
|
||||
List the names of all Vim servers that can be found.
|
||||
|
||||
--servername {name}
|
||||
Use {name} as the server name. Used for the current Vim,
|
||||
Use {name} as the server name. Used for the current Vim,
|
||||
unless used with a --remote argument, then it's the name of
|
||||
the server to connect to.
|
||||
|
||||
--socketid {id}
|
||||
GTK GUI only: Use the GtkPlug mechanism to run gvim in
|
||||
GTK GUI only: Use the GtkPlug mechanism to run gvim in
|
||||
another window.
|
||||
|
||||
--version Print version information and exit.
|
||||
|
||||
ON-LINE HELP
|
||||
Type ":help" in Vim to get started. Type ":help subject" to get help
|
||||
on a specific subject. For example: ":help ZZ" to get help for the
|
||||
"ZZ" command. Use <Tab> and CTRL-D to complete subjects (":help cmd-
|
||||
line-completion"). Tags are present to jump from one place to another
|
||||
Type ":help" in Vim to get started. Type ":help subject" to get help
|
||||
on a specific subject. For example: ":help ZZ" to get help for the
|
||||
"ZZ" command. Use <Tab> and CTRL-D to complete subjects (":help cmd‐
|
||||
line-completion"). Tags are present to jump from one place to another
|
||||
(sort of hypertext links, see ":help"). All documentation files can be
|
||||
viewed in this way, for example ":help syntax.txt".
|
||||
|
||||
FILES
|
||||
/usr/local/lib/vim/doc/*.txt
|
||||
The Vim documentation files. Use ":help doc-file-list"
|
||||
The Vim documentation files. Use ":help doc-file-list"
|
||||
to get the complete list.
|
||||
|
||||
/usr/local/lib/vim/doc/tags
|
||||
The tags file used for finding information in the docu-
|
||||
The tags file used for finding information in the docu‐
|
||||
mentation files.
|
||||
|
||||
/usr/local/lib/vim/syntax/syntax.vim
|
||||
@@ -381,7 +381,7 @@ FILES
|
||||
~/.gvimrc Your personal gvim initializations.
|
||||
|
||||
/usr/local/lib/vim/optwin.vim
|
||||
Script used for the ":options" command, a nice way to
|
||||
Script used for the ":options" command, a nice way to
|
||||
view and set options.
|
||||
|
||||
/usr/local/lib/vim/menu.vim
|
||||
@@ -391,11 +391,11 @@ FILES
|
||||
Script to generate a bug report. See ":help bugs".
|
||||
|
||||
/usr/local/lib/vim/filetype.vim
|
||||
Script to detect the type of a file by its name. See
|
||||
Script to detect the type of a file by its name. See
|
||||
":help 'filetype'".
|
||||
|
||||
/usr/local/lib/vim/scripts.vim
|
||||
Script to detect the type of a file by its contents.
|
||||
Script to detect the type of a file by its contents.
|
||||
See ":help 'filetype'".
|
||||
|
||||
/usr/local/lib/vim/print/*.ps
|
||||
@@ -410,8 +410,8 @@ SEE ALSO
|
||||
AUTHOR
|
||||
Most of Vim was made by Bram Moolenaar, with a lot of help from others.
|
||||
See ":help credits" in Vim.
|
||||
Vim is based on Stevie, worked on by: Tim Thompson, Tony Andrews and
|
||||
G.R. (Fred) Walter. Although hardly any of the original code remains.
|
||||
Vim is based on Stevie, worked on by: Tim Thompson, Tony Andrews and
|
||||
G.R. (Fred) Walter. Although hardly any of the original code remains.
|
||||
|
||||
BUGS
|
||||
Probably. See ":help todo" for a list of known problems.
|
||||
|
||||
@@ -76,6 +76,16 @@ Change the character encoding in the righthand column from ASCII to EBCDIC.
|
||||
This does not change the hexadecimal representation. The option is
|
||||
meaningless in combinations with \-r, \-p or \-i.
|
||||
.TP
|
||||
.IR \-e
|
||||
Switch to little-endian hexdump.
|
||||
This option treats byte groups as words in little-endian byte order.
|
||||
The default grouping of 4 bytes may be changed using
|
||||
.RI "" \-g .
|
||||
This option only applies to hexdump, leaving the ASCII (or EBCDIC)
|
||||
representation unchanged.
|
||||
The command line switches
|
||||
\-r, \-p, \-i do not work with this mode.
|
||||
.TP
|
||||
.IR "\-g bytes " | " \-groupsize bytes"
|
||||
separate the output of every
|
||||
.RI < bytes >
|
||||
@@ -84,7 +94,7 @@ Specify
|
||||
.I \-g 0
|
||||
to suppress grouping.
|
||||
.RI < Bytes "> defaults to " 2
|
||||
in normal mode and \fI1\fP in bits mode.
|
||||
in normal mode, \fI4\fP in little-endian mode and \fI1\fP in bits mode.
|
||||
Grouping does not apply to postscript or include style.
|
||||
.TP
|
||||
.IR \-h " | " \-help
|
||||
@@ -99,6 +109,11 @@ stop after writing
|
||||
.RI < len >
|
||||
octets.
|
||||
.TP
|
||||
.I \-o offset
|
||||
add
|
||||
.RI < offset >
|
||||
to the displayed file position.
|
||||
.TP
|
||||
.IR \-p " | " \-ps " | " \-postscript " | " \-plain
|
||||
output in postscript continuous hexdump style. Also known as plain hexdump
|
||||
style.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
XXD(1) XXD(1)
|
||||
XXD(1) General Commands Manual XXD(1)
|
||||
|
||||
|
||||
|
||||
@@ -14,30 +14,29 @@ DESCRIPTION
|
||||
xxd creates a hex dump of a given file or standard input. It can also
|
||||
convert a hex dump back to its original binary form. Like uuencode(1)
|
||||
and uudecode(1) it allows the transmission of binary data in a `mail-
|
||||
safe' ASCII representation, but has the advantage of decoding to stan-
|
||||
safe' ASCII representation, but has the advantage of decoding to stan‐
|
||||
dard output. Moreover, it can be used to perform binary file patching.
|
||||
|
||||
OPTIONS
|
||||
If no infile is given, standard input is read. If infile is specified
|
||||
as a `-' character, then input is taken from standard input. If no
|
||||
If no infile is given, standard input is read. If infile is specified
|
||||
as a `-' character, then input is taken from standard input. If no
|
||||
outfile is given (or a `-' character is in its place), results are sent
|
||||
to standard output.
|
||||
|
||||
Note that a "lazy" parser is used which does not check for more than
|
||||
the first option letter, unless the option is followed by a parameter.
|
||||
Spaces between a single option letter and its parameter are optional.
|
||||
Note that a "lazy" parser is used which does not check for more than
|
||||
the first option letter, unless the option is followed by a parameter.
|
||||
Spaces between a single option letter and its parameter are optional.
|
||||
Parameters to options can be specified in decimal, hexadecimal or octal
|
||||
notation. Thus -c8, -c 8, -c 010 and -cols 8 are all equivalent.
|
||||
|
||||
|
||||
-a | -autoskip
|
||||
toggle autoskip: A single '*' replaces nul-lines. Default off.
|
||||
toggle autoskip: A single '*' replaces nul-lines. Default off.
|
||||
|
||||
-b | -bits
|
||||
Switch to bits (binary digits) dump, rather than hexdump. This
|
||||
option writes octets as eight digits "1"s and "0"s instead of a
|
||||
normal hexadecimal dump. Each line is preceded by a line number
|
||||
in hexadecimal and followed by an ascii (or ebcdic) representa-
|
||||
in hexadecimal and followed by an ascii (or ebcdic) representa‐
|
||||
tion. The command line switches -r, -p, -i do not work with this
|
||||
mode.
|
||||
|
||||
@@ -50,25 +49,34 @@ OPTIONS
|
||||
to EBCDIC. This does not change the hexadecimal representation.
|
||||
The option is meaningless in combinations with -r, -p or -i.
|
||||
|
||||
-e Switch to little-endian hexdump. This option treats byte groups
|
||||
as words in little-endian byte order. The default grouping of 4
|
||||
bytes may be changed using -g. This option only applies to hex‐
|
||||
dump, leaving the ASCII (or EBCDIC) representation unchanged.
|
||||
The command line switches -r, -p, -i do not work with this mode.
|
||||
|
||||
-g bytes | -groupsize bytes
|
||||
separate the output of every <bytes> bytes (two hex characters
|
||||
or eight bit-digits each) by a whitespace. Specify -g 0 to sup-
|
||||
press grouping. <Bytes> defaults to 2 in normal mode and 1 in
|
||||
bits mode. Grouping does not apply to postscript or include
|
||||
style.
|
||||
or eight bit-digits each) by a whitespace. Specify -g 0 to sup‐
|
||||
press grouping. <Bytes> defaults to 2 in normal mode, 4 in lit‐
|
||||
tle-endian mode and 1 in bits mode. Grouping does not apply to
|
||||
postscript or include style.
|
||||
|
||||
-h | -help
|
||||
print a summary of available commands and exit. No hex dumping
|
||||
is performed.
|
||||
|
||||
-i | -include
|
||||
output in C include file style. A complete static array defini-
|
||||
output in C include file style. A complete static array defini‐
|
||||
tion is written (named after the input file), unless xxd reads
|
||||
from stdin.
|
||||
|
||||
-l len | -len len
|
||||
stop after writing <len> octets.
|
||||
|
||||
-o offset
|
||||
add <offset> to the displayed file position.
|
||||
|
||||
-p | -ps | -postscript | -plain
|
||||
output in postscript continuous hexdump style. Also known as
|
||||
plain hexdump style.
|
||||
@@ -76,8 +84,8 @@ OPTIONS
|
||||
-r | -revert
|
||||
reverse operation: convert (or patch) hexdump into binary. If
|
||||
not writing to stdout, xxd writes into its output file without
|
||||
truncating it. Use the combination -r -p to read plain hexadeci-
|
||||
mal dumps without line number information and without a particu-
|
||||
truncating it. Use the combination -r -p to read plain hexadeci‐
|
||||
mal dumps without line number information and without a particu‐
|
||||
lar column layout. Additional Whitespace and line-breaks are
|
||||
allowed anywhere.
|
||||
|
||||
@@ -101,7 +109,7 @@ OPTIONS
|
||||
CAVEATS
|
||||
xxd -r has some builtin magic while evaluating line number information.
|
||||
If the output file is seekable, then the linenumbers at the start of
|
||||
each hexdump line may be out of order, lines may be missing, or over-
|
||||
each hexdump line may be out of order, lines may be missing, or over‐
|
||||
lapping. In these cases xxd will lseek(2) to the next position. If the
|
||||
output file is not seekable, only gaps are allowed, which will be
|
||||
filled by null-bytes.
|
||||
@@ -112,8 +120,8 @@ CAVEATS
|
||||
input line after reading enough columns of hexadecimal data (see option
|
||||
-c). This also means, that changes to the printable ascii (or ebcdic)
|
||||
columns are always ignored. Reverting a plain (or postscript) style
|
||||
hexdump with xxd -r -p does not depend on the correct number of col-
|
||||
umns. Here anything that looks like a pair of hex-digits is inter-
|
||||
hexdump with xxd -r -p does not depend on the correct number of col‐
|
||||
umns. Here anything that looks like a pair of hex-digits is inter‐
|
||||
preted.
|
||||
|
||||
Note the difference between
|
||||
@@ -218,7 +226,6 @@ EXAMPLES
|
||||
% stty < /dev/term/b -echo -opost -isig -icanon min 1
|
||||
% echo -n foo > /dev/term/b
|
||||
|
||||
|
||||
RETURN VALUES
|
||||
The following error values are returned:
|
||||
|
||||
@@ -256,7 +263,4 @@ AUTHOR
|
||||
<tony@sctnugen.ppp.gu.edu.au> <T.Nugent@sct.gu.edu.au>
|
||||
Small changes by Bram Moolenaar. Edited by Juergen Weigert.
|
||||
|
||||
|
||||
|
||||
|
||||
Manual page for xxd August 1996 XXD(1)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" Vim support file to detect file types
|
||||
"
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2015 Jan 14
|
||||
" Last Change: 2015 Jun 06
|
||||
|
||||
" Listen very carefully, I will say this only once
|
||||
if exists("did_load_filetypes")
|
||||
@@ -499,7 +499,7 @@ au BufNewFile,BufRead *.prg
|
||||
\ endif
|
||||
|
||||
" Clojure
|
||||
au BufNewFile,BufRead *.clj,*.cljs setf clojure
|
||||
au BufNewFile,BufRead *.clj,*.cljs,*.cljx,*.cljc setf clojure
|
||||
|
||||
" Cmake
|
||||
au BufNewFile,BufRead CMakeLists.txt,*.cmake,*.cmake.in setf cmake
|
||||
@@ -776,10 +776,9 @@ au BufNewFile,BufRead *.mo,*.gdmo setf gdmo
|
||||
au BufNewFile,BufRead *.ged,lltxxxxx.txt setf gedcom
|
||||
|
||||
" Git
|
||||
au BufNewFile,BufRead *.git/COMMIT_EDITMSG setf gitcommit
|
||||
au BufNewFile,BufRead *.git/MERGE_MSG setf gitcommit
|
||||
au BufNewFile,BufRead COMMIT_EDITMSG setf gitcommit
|
||||
au BufNewFile,BufRead MERGE_MSG setf gitcommit
|
||||
au BufNewFile,BufRead *.git/config,.gitconfig,.gitmodules setf gitconfig
|
||||
au BufNewFile,BufRead *.git/modules/*/COMMIT_EDITMSG setf gitcommit
|
||||
au BufNewFile,BufRead *.git/modules/*/config setf gitconfig
|
||||
au BufNewFile,BufRead */.config/git/config setf gitconfig
|
||||
if !empty($XDG_CONFIG_HOME)
|
||||
@@ -1267,8 +1266,8 @@ au BufNewFile,BufRead */etc/modules.conf,*/etc/modules,*/etc/conf.modules setf m
|
||||
" Mplayer config
|
||||
au BufNewFile,BufRead mplayer.conf,*/.mplayer/config setf mplayerconf
|
||||
|
||||
" Moterola S record
|
||||
au BufNewFile,BufRead *.s19,*.s28,*.s37 setf srec
|
||||
" Motorola S record
|
||||
au BufNewFile,BufRead *.s19,*.s28,*.s37,*.mot,*.srec setf srec
|
||||
|
||||
" Mrxvtrc
|
||||
au BufNewFile,BufRead mrxvtrc,.mrxvtrc setf mrxvtrc
|
||||
@@ -1295,7 +1294,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
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
" Language: J
|
||||
" Maintainer: David Bürgin <676c7473@gmail.com>
|
||||
" URL: https://github.com/glts/vim-j
|
||||
" Last Change: 2015-01-11
|
||||
" Last Change: 2015-03-27
|
||||
|
||||
if exists('b:did_ftplugin')
|
||||
finish
|
||||
@@ -16,12 +16,9 @@ setlocal iskeyword=48-57,A-Z,_,a-z
|
||||
setlocal comments=:NB.
|
||||
setlocal commentstring=NB.\ %s
|
||||
setlocal formatoptions-=t
|
||||
setlocal shiftwidth=2
|
||||
setlocal softtabstop=2
|
||||
setlocal expandtab
|
||||
setlocal matchpairs=(:)
|
||||
|
||||
let b:undo_ftplugin = 'setlocal matchpairs< expandtab< softtabstop< shiftwidth< formatoptions< commentstring< comments< iskeyword<'
|
||||
let b:undo_ftplugin = 'setlocal matchpairs< formatoptions< commentstring< comments< iskeyword<'
|
||||
|
||||
" Section movement with ]] ][ [[ []. The start/end patterns below are amended
|
||||
" inside the function in order to avoid matching on the current cursor line.
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
" Vim filetype plugin file
|
||||
" Maintainer: Nikolai Weibull <now@bitwi.se>
|
||||
" Latest Revision: 2008-07-09
|
||||
" Vim syntax file
|
||||
" Maintainer: Christian Brabandt <cb@256bit.org>
|
||||
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
|
||||
" Latest Revision: 2015-05-29
|
||||
" License: Vim (see :h license)
|
||||
" Repository: https://github.com/chrisbra/vim-kconfig
|
||||
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
@@ -14,5 +18,10 @@ let b:undo_ftplugin = "setl com< cms< fo<"
|
||||
|
||||
setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql
|
||||
|
||||
" For matchit.vim
|
||||
if exists("loaded_matchit")
|
||||
let b:match_words = '^\<menu\>:\<endmenu\>,^\<if\>:\<endif\>,^\<choice\>:\<endchoice\>'
|
||||
endif
|
||||
|
||||
let &cpo = s:cpo_save
|
||||
unlet s:cpo_save
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
" Filename: spec.vim
|
||||
" Maintainer: Igor Gnatenko i.gnatenko.brain@gmail.com
|
||||
" Former Maintainer: Gustavo Niemeyer <niemeyer@conectiva.com> (until March 2014)
|
||||
" Last Change: Sun Mar 2 11:24 MSK 2014 Igor Gnatenko
|
||||
" Last Change: Mon Jun 01 21:15 MSK 2015 Igor Gnatenko
|
||||
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
@@ -18,13 +18,40 @@ if !exists("no_plugin_maps") && !exists("no_spec_maps")
|
||||
endif
|
||||
endif
|
||||
|
||||
noremap <buffer> <unique> <script> <Plug>SpecChangelog :call <SID>SpecChangelog("")<CR>
|
||||
if !hasmapto("call <SID>SpecChangelog(\"\")<CR>")
|
||||
noremap <buffer> <unique> <script> <Plug>SpecChangelog :call <SID>SpecChangelog("")<CR>
|
||||
endif
|
||||
|
||||
if !exists("*s:GetRelVer")
|
||||
function! s:GetRelVer()
|
||||
if has('python')
|
||||
python << PYEND
|
||||
import sys, datetime, shutil, tempfile
|
||||
import vim
|
||||
|
||||
try:
|
||||
import rpm
|
||||
except ImportError:
|
||||
pass
|
||||
else:
|
||||
specfile = vim.current.buffer.name
|
||||
if specfile:
|
||||
spec = rpm.spec(specfile)
|
||||
headers = spec.packages[0].header
|
||||
version = headers['Version']
|
||||
release = ".".join(headers['Release'].split(".")[:-1])
|
||||
vim.command("let ver = " + version)
|
||||
vim.command("let rel = " + release)
|
||||
PYEND
|
||||
endif
|
||||
endfunction
|
||||
endif
|
||||
|
||||
if !exists("*s:SpecChangelog")
|
||||
function s:SpecChangelog(format)
|
||||
if strlen(a:format) == 0
|
||||
if !exists("g:spec_chglog_format")
|
||||
let email = input("Email address: ")
|
||||
let email = input("Name <email address>: ")
|
||||
let g:spec_chglog_format = "%a %b %d %Y " . l:email
|
||||
echo "\r"
|
||||
endif
|
||||
@@ -69,6 +96,9 @@ if !exists("*s:SpecChangelog")
|
||||
else
|
||||
let include_release_info = 0
|
||||
endif
|
||||
|
||||
call s:GetRelVer()
|
||||
|
||||
if (chgline == -1)
|
||||
let option = confirm("Can't find %changelog. Create one? ","&End of file\n&Here\n&Cancel",3)
|
||||
if (option == 1)
|
||||
@@ -83,7 +113,7 @@ if !exists("*s:SpecChangelog")
|
||||
endif
|
||||
endif
|
||||
if (chgline != -1)
|
||||
let parsed_format = "* ".strftime(format)
|
||||
let parsed_format = "* ".strftime(format)." - ".ver."-".rel
|
||||
let release_info = "+ ".name."-".ver."-".rel
|
||||
let wrong_format = 0
|
||||
let wrong_release = 0
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: Zsh shell script
|
||||
" Maintainer: Nikolai Weibull <now@bitwi.se>
|
||||
" Latest Revision: 2011-01-23
|
||||
" Language: Zsh shell script
|
||||
" Maintainer: Christian Brabandt <cb@256bit.org>
|
||||
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
|
||||
" Latest Revision: 2015-05-29
|
||||
" License: Vim (see :h license)
|
||||
" Repository: https://github.com/chrisbra/vim-zsh
|
||||
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
" Header: "{{{
|
||||
" Maintainer: Bram Moolenaar
|
||||
" Original Author: Andy Wokula <anwoku@yahoo.de>
|
||||
" Last Change: 2015 Jan 11
|
||||
" Last Change: 2015 Jun 12
|
||||
" Version: 1.0
|
||||
" Description: HTML indent script with cached state for faster indenting on a
|
||||
" range of lines.
|
||||
@@ -94,7 +94,7 @@ func! HtmlIndent_CheckUserSettings()
|
||||
let autotags = g:html_indent_autotags
|
||||
endif
|
||||
let b:hi_removed_tags = {}
|
||||
if autotags
|
||||
if len(autotags) > 0
|
||||
call s:RemoveITags(b:hi_removed_tags, split(autotags, ","))
|
||||
endif
|
||||
|
||||
@@ -245,6 +245,10 @@ call s:AddITags(s:indent_tags, [
|
||||
\ 'header', 'group', 'keygen', 'mark', 'math', 'meter', 'nav', 'output',
|
||||
\ 'progress', 'ruby', 'section', 'svg', 'texture', 'time', 'video',
|
||||
\ 'wbr', 'text'])
|
||||
|
||||
" Tags added for web components:
|
||||
call s:AddITags(s:indent_tags, [
|
||||
\ 'content', 'shadow', 'template'])
|
||||
"}}}
|
||||
|
||||
" Add Block Tags: these contain alien content
|
||||
@@ -287,7 +291,7 @@ func! s:CountITags(text)
|
||||
let s:nextrel = 0 " relative indent steps for next line [unit &sw]:
|
||||
let s:block = 0 " assume starting outside of a block
|
||||
let s:countonly = 1 " don't change state
|
||||
call substitute(a:text, '<\zs/\=\w\+\>\|<!--\|-->', '\=s:CheckTag(submatch(0))', 'g')
|
||||
call substitute(a:text, '<\zs/\=\w\+\(-\w\+\)*\>\|<!--\|-->', '\=s:CheckTag(submatch(0))', 'g')
|
||||
let s:countonly = 0
|
||||
endfunc "}}}
|
||||
|
||||
@@ -299,7 +303,7 @@ func! s:CountTagsAndState(text)
|
||||
let s:nextrel = 0 " relative indent steps for next line [unit &sw]:
|
||||
|
||||
let s:block = b:hi_newstate.block
|
||||
let tmp = substitute(a:text, '<\zs/\=\w\+\>\|<!--\|-->', '\=s:CheckTag(submatch(0))', 'g')
|
||||
let tmp = substitute(a:text, '<\zs/\=\w\+\(-\w\+\)*\>\|<!--\|-->', '\=s:CheckTag(submatch(0))', 'g')
|
||||
if s:block == 3
|
||||
let b:hi_newstate.scripttype = s:GetScriptType(matchstr(tmp, '\C.*<SCRIPT\>\zs[^>]*'))
|
||||
endif
|
||||
@@ -311,6 +315,9 @@ func! s:CheckTag(itag)
|
||||
"{{{
|
||||
" Returns an empty string or "SCRIPT".
|
||||
" a:itag can be "tag" or "/tag" or "<!--" or "-->"
|
||||
if (s:CheckCustomTag(a:itag))
|
||||
return ""
|
||||
endif
|
||||
let ind = s:get_tag(a:itag)
|
||||
if ind == -1
|
||||
" closing tag
|
||||
@@ -365,6 +372,36 @@ func! s:CheckBlockTag(blocktag, ind)
|
||||
return ""
|
||||
endfunc "}}}
|
||||
|
||||
" Used by s:CheckTag().
|
||||
func! s:CheckCustomTag(ctag)
|
||||
"{{{
|
||||
" Returns 1 if ctag is the tag for a custom element, 0 otherwise.
|
||||
" a:ctag can be "tag" or "/tag" or "<!--" or "-->"
|
||||
let pattern = '\%\(\w\+-\)\+\w\+'
|
||||
if match(a:ctag, pattern) == -1
|
||||
return 0
|
||||
endif
|
||||
if matchstr(a:ctag, '\/\ze.\+') == "/"
|
||||
" closing tag
|
||||
if s:block != 0
|
||||
" ignore ctag within a block
|
||||
return 1
|
||||
endif
|
||||
if s:nextrel == 0
|
||||
let s:curind -= 1
|
||||
else
|
||||
let s:nextrel -= 1
|
||||
endif
|
||||
else
|
||||
" opening tag
|
||||
if s:block != 0
|
||||
return 1
|
||||
endif
|
||||
let s:nextrel += 1
|
||||
endif
|
||||
return 1
|
||||
endfunc "}}}
|
||||
|
||||
" Return the <script> type: either "javascript" or ""
|
||||
func! s:GetScriptType(str)
|
||||
"{{{
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" Vim indent file
|
||||
" Language: Javascript
|
||||
" Maintainer: None! Wanna improve this?
|
||||
" Last Change: 2007 Jan 22
|
||||
" Maintainer: Going to be Darrick Wiebe
|
||||
" Last Change: 2015 Jun 09
|
||||
|
||||
" Only load this indent file when no other was loaded.
|
||||
if exists("b:did_indent")
|
||||
@@ -12,5 +12,7 @@ let b:did_indent = 1
|
||||
" C indenting is not too bad.
|
||||
setlocal cindent
|
||||
setlocal cinoptions+=j1,J1
|
||||
setlocal cinkeys-=0#
|
||||
setlocal cinkeys+=0]
|
||||
|
||||
let b:undo_indent = "setl cin<"
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
" Vim indent file
|
||||
" Language: R
|
||||
" Author: Jakson Alves de Aquino <jalvesaq@gmail.com>
|
||||
" Last Change: Fri Feb 15, 2013 08:11PM
|
||||
" Last Change: Thu Mar 26, 2015 05:36PM
|
||||
|
||||
|
||||
" Only load this indent file when no other was loaded.
|
||||
if exists("b:did_indent")
|
||||
finish
|
||||
finish
|
||||
endif
|
||||
let b:did_indent = 1
|
||||
|
||||
@@ -15,478 +15,501 @@ setlocal indentexpr=GetRIndent()
|
||||
|
||||
" Only define the function once.
|
||||
if exists("*GetRIndent")
|
||||
finish
|
||||
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
|
||||
let g:r_indent_align_args = 1
|
||||
endif
|
||||
if !exists("g:r_indent_ess_comments")
|
||||
let g:r_indent_ess_comments = 0
|
||||
let g:r_indent_ess_comments = 0
|
||||
endif
|
||||
if !exists("g:r_indent_comment_column")
|
||||
let g:r_indent_comment_column = 40
|
||||
let g:r_indent_comment_column = 40
|
||||
endif
|
||||
if ! exists("g:r_indent_ess_compatible")
|
||||
let g:r_indent_ess_compatible = 0
|
||||
let g:r_indent_ess_compatible = 0
|
||||
endif
|
||||
if ! exists("g:r_indent_op_pattern")
|
||||
let g:r_indent_op_pattern = '\(+\|-\|\*\|/\|=\|\~\|%\)$'
|
||||
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 = 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
|
||||
return line1
|
||||
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
|
||||
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
|
||||
endwhile
|
||||
return line1
|
||||
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
|
||||
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
|
||||
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
|
||||
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
|
||||
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 lnum = a:lineno - 1
|
||||
let data = getline( lnum )
|
||||
while lnum > 0 && (data =~ '^\s*#' || data =~ '^\s*$')
|
||||
let lnum = lnum - 1
|
||||
let data = getline( lnum )
|
||||
while lnum > 0 && (data =~ '^\s*#' || data =~ '^\s*$')
|
||||
let lnum = lnum - 1
|
||||
let data = getline( lnum )
|
||||
endwhile
|
||||
return 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
|
||||
let newline = s:RDelete_quotes(a:line)
|
||||
let newline = s:RDelete_parens(newline)
|
||||
let newline = substitute(newline, '#.*', "", "")
|
||||
let newline = substitute(newline, '\s*$', "", "")
|
||||
if &filetype == "rhelp" && newline =~ '^\\method{.*}{.*}(.*'
|
||||
let newline = substitute(newline, '^\\method{\(.*\)}{.*}', '\1', "")
|
||||
endif
|
||||
return newline
|
||||
endfunction
|
||||
|
||||
function GetRIndent()
|
||||
|
||||
let clnum = line(".") " current line
|
||||
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
|
||||
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 line = SanitizeRLine(getline(lnum))
|
||||
let cline = SanitizeRLine(cline)
|
||||
|
||||
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
|
||||
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
|
||||
|
||||
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
|
||||
" 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
|
||||
|
||||
" line is an incomplete command:
|
||||
if line =~ '\<\(if\|while\|for\|function\)\s*()$' || line =~ '\<else$' || line =~ '<-$'
|
||||
return indent(lnum) + &sw
|
||||
if line =~ '^\\examples{' || line =~ '^\\usage{' || line =~ '^\\dontshow{' || line =~ '^\\dontrun{' || line =~ '^\\donttest{' || line =~ '^\\testonly{'
|
||||
return 0
|
||||
endif
|
||||
endif
|
||||
|
||||
" Deal with () and []
|
||||
if &filetype == "rnoweb" && line =~ "^<<.*>>="
|
||||
return 0
|
||||
endif
|
||||
|
||||
let pb = s:Get_paren_balance(line, '(', ')')
|
||||
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
|
||||
|
||||
if line =~ '^\s*{$' || line =~ '(\s*{' || (pb == 0 && (line =~ '{$' || line =~ '(\s*{$'))
|
||||
return indent(lnum) + &sw
|
||||
" 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 s:curtabstop = repeat(' ', &tabstop)
|
||||
|
||||
if g:r_indent_align_args == 1
|
||||
if pb > 0 && line =~ '{$'
|
||||
return s:Get_last_paren_idx(line, '(', ')', pb) + &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
|
||||
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
|
||||
|
||||
let post_block = 0
|
||||
if line =~ '}$'
|
||||
let lnum = s:Get_matching_brace(lnum, '{', '}', 0)
|
||||
if pb < 0 && line =~ '.*[,&|\-\*+<>]$'
|
||||
let lnum = s:Get_prev_line(lnum)
|
||||
while pb < 1 && 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
|
||||
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
|
||||
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
|
||||
endif
|
||||
if pb == 1
|
||||
return ind + 1
|
||||
endif
|
||||
let ind -= 1
|
||||
endwhile
|
||||
let line = s:RDelete_parens(line)
|
||||
let lnum -= 1
|
||||
endwhile
|
||||
return 0
|
||||
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
|
||||
if bb > 0
|
||||
let ind = s:Get_last_paren_idx(getline(lnum), '[', ']', bb)
|
||||
return ind
|
||||
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
|
||||
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
|
||||
|
||||
if g:r_indent_align_args == 0 && bb != 0
|
||||
let ind += bb * &sw
|
||||
return ind
|
||||
" Indent after operator pattern
|
||||
let olnum = s:Get_prev_line(lnum)
|
||||
let oline = getline(olnum)
|
||||
if olnum > 0
|
||||
if line =~ g:r_indent_op_pattern
|
||||
if oline =~ g:r_indent_op_pattern
|
||||
return indent(lnum)
|
||||
else
|
||||
return indent(lnum) + &sw
|
||||
endif
|
||||
else
|
||||
if oline =~ g:r_indent_op_pattern
|
||||
return indent(lnum) - &sw
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
if ind == pind || (ind == (pind + &sw) && pline =~ '{$' && ppost_else == 0)
|
||||
return ind
|
||||
endif
|
||||
|
||||
let pline = getline(plnum)
|
||||
let pbb = s:Get_paren_balance(pline, '[', ']')
|
||||
|
||||
while pind < ind && plnum > 0 && ppb == 0 && pbb == 0
|
||||
let ind = pind
|
||||
let plnum = s:Get_prev_line(plnum)
|
||||
let pline = getline(plnum)
|
||||
let ppb = s:Get_paren_balance(pline, '(', ')')
|
||||
let pbb = 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, '(', ')')
|
||||
let pbb = s:Get_paren_balance(pline, '[', ']')
|
||||
endwhile
|
||||
let pind = indent(plnum)
|
||||
if ind == (pind + &sw) && pline =~ '{$'
|
||||
return ind
|
||||
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
|
||||
|
||||
let bb = s:Get_paren_balance(line, '[', ']')
|
||||
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 g:r_indent_align_args == 0 && bb != 0
|
||||
let ind += bb * &sw
|
||||
return ind
|
||||
endif
|
||||
|
||||
if ind == pind || (ind == (pind + &sw) && pline =~ '{$' && ppost_else == 0)
|
||||
return ind
|
||||
endif
|
||||
|
||||
let pline = getline(plnum)
|
||||
let pbb = s:Get_paren_balance(pline, '[', ']')
|
||||
|
||||
while pind < ind && plnum > 0 && ppb == 0 && pbb == 0
|
||||
let ind = pind
|
||||
let plnum = s:Get_prev_line(plnum)
|
||||
let pline = getline(plnum)
|
||||
let ppb = s:Get_paren_balance(pline, '(', ')')
|
||||
let pbb = 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, '(', ')')
|
||||
let pbb = 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
|
||||
" vim: sw=2
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" Vim indent file
|
||||
" Language: R Documentation (Help), *.Rd
|
||||
" Author: Jakson Alves de Aquino <jalvesaq@gmail.com>
|
||||
" Last Change: Wed Jul 09, 2014 07:34PM
|
||||
" Last Change: Thu Oct 16, 2014 07:07AM
|
||||
|
||||
|
||||
" Only load this indent file when no other was loaded.
|
||||
@@ -12,22 +12,18 @@ runtime indent/r.vim
|
||||
let s:RIndent = function(substitute(&indentexpr, "()", "", ""))
|
||||
let b:did_indent = 1
|
||||
|
||||
setlocal indentkeys=0{,0},:,!^F,o,O,e
|
||||
setlocal indentexpr=GetRHelpIndent()
|
||||
|
||||
" Only define the function once.
|
||||
if exists("*GetRHelpIndent")
|
||||
finish
|
||||
endif
|
||||
|
||||
setlocal noautoindent
|
||||
setlocal nocindent
|
||||
setlocal nosmartindent
|
||||
setlocal nolisp
|
||||
|
||||
setlocal indentkeys=0{,0},:,!^F,o,O,e
|
||||
setlocal indentexpr=GetCorrectRHelpIndent()
|
||||
|
||||
" Only define the functions once.
|
||||
if exists("*GetRHelpIndent")
|
||||
finish
|
||||
endif
|
||||
|
||||
function s:SanitizeRHelpLine(line)
|
||||
let newline = substitute(a:line, '\\\\', "x", "g")
|
||||
let newline = substitute(newline, '\\{', "x", "g")
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" Vim indent file
|
||||
" Language: Rmd
|
||||
" Author: Jakson Alves de Aquino <jalvesaq@gmail.com>
|
||||
" Last Change: Wed Jul 09, 2014 07:33PM
|
||||
" Last Change: Thu Jul 10, 2014 07:11PM
|
||||
|
||||
|
||||
" Only load this indent file when no other was loaded.
|
||||
@@ -33,10 +33,10 @@ function GetMdIndent()
|
||||
endfunction
|
||||
|
||||
function GetRmdIndent()
|
||||
if getline(".") =~ '^```{r .*}$' || getline(".") =~ '^```$'
|
||||
if getline(".") =~ '^[ \t]*```{r .*}$' || getline(".") =~ '^[ \t]*```$'
|
||||
return 0
|
||||
endif
|
||||
if search('^```{r', "bncW") > search('^```$', "bncW")
|
||||
if search('^[ \t]*```{r', "bncW") > search('^[ \t]*```$', "bncW")
|
||||
return s:RIndent()
|
||||
else
|
||||
return GetMdIndent()
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" Vim indent file
|
||||
" Language: Rnoweb
|
||||
" Author: Jakson Alves de Aquino <jalvesaq@gmail.com>
|
||||
" Last Change: Wed Jul 09, 2014 07:28PM
|
||||
" Last Change: Sun Mar 22, 2015 09:28AM
|
||||
|
||||
|
||||
" Only load this indent file when no other was loaded.
|
||||
@@ -23,7 +23,8 @@ if exists("*GetRnowebIndent")
|
||||
endif
|
||||
|
||||
function GetRnowebIndent()
|
||||
if getline(".") =~ "^<<.*>>=$"
|
||||
let curline = getline(".")
|
||||
if curline =~ '^<<.*>>=$' || curline =~ '^\s*@$'
|
||||
return 0
|
||||
endif
|
||||
if search("^<<", "bncW") > search("^@", "bncW")
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
" Vim indent file
|
||||
" Language: Shell Script
|
||||
" Maintainer: Peter Aronoff <telemachus@arpinum.org>
|
||||
" Maintainer: Currently unmaintained. If you want to take it, please
|
||||
" email Bram
|
||||
" Previous Maintainer: Peter Aronoff <telemachus@arpinum.org>
|
||||
" Original Author: Nikolai Weibull <now@bitwi.se>
|
||||
" Latest Revision: 2014-08-22
|
||||
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
" Vim indent file
|
||||
" Language: Zsh Shell Script
|
||||
" Maintainer: Nikolai Weibull <now@bitwi.se>
|
||||
" Latest Revision: 2006-04-19
|
||||
" Language: Zsh shell script
|
||||
" Maintainer: Christian Brabandt <cb@256bit.org>
|
||||
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
|
||||
" Latest Revision: 2015-05-29
|
||||
" License: Vim (see :h license)
|
||||
" Repository: https://github.com/chrisbra/vim-zsh
|
||||
|
||||
if exists("b:did_indent")
|
||||
finish
|
||||
|
||||
104
runtime/keymap/russian-jcukenwintype.vim
Normal file
104
runtime/keymap/russian-jcukenwintype.vim
Normal file
@@ -0,0 +1,104 @@
|
||||
" Vim Keymap file for russian characters, layout 'jcuken', MS Windows variant
|
||||
" (slightly incompatible with XFree86 'ru' keymap - makes use of NUMERO SIGN)
|
||||
" Useful mainly with utf-8 but may work with other encodings
|
||||
|
||||
" Derived from russian-jcuken.vim by Artem Chuprina <ran@ran.pp.ru>
|
||||
" Typewriter variant of standart russian layout
|
||||
" Maintainer: Denis Proskurin <danwerspb@gmail.com>
|
||||
" Last Changed: 2015 May 15
|
||||
|
||||
" All characters are given literally, conversion to another encoding (e.g.,
|
||||
" UTF-8) should work.
|
||||
|
||||
scriptencoding utf-8
|
||||
|
||||
let b:keymap_name = "ru"
|
||||
|
||||
loadkeymap
|
||||
~ + CYRILLIC CAPITAL LETTER IO
|
||||
` | CYRILLIC SMALL LETTER IO
|
||||
F А CYRILLIC CAPITAL LETTER A
|
||||
< Б CYRILLIC CAPITAL LETTER BE
|
||||
D В CYRILLIC CAPITAL LETTER VE
|
||||
U Г CYRILLIC CAPITAL LETTER GHE
|
||||
L Д CYRILLIC CAPITAL LETTER DE
|
||||
T Е CYRILLIC CAPITAL LETTER IE
|
||||
: Ж CYRILLIC CAPITAL LETTER ZHE
|
||||
P З CYRILLIC CAPITAL LETTER ZE
|
||||
B И CYRILLIC CAPITAL LETTER I
|
||||
Q Й CYRILLIC CAPITAL LETTER SHORT I
|
||||
R К CYRILLIC CAPITAL LETTER KA
|
||||
K Л CYRILLIC CAPITAL LETTER EL
|
||||
V М CYRILLIC CAPITAL LETTER EM
|
||||
Y Н CYRILLIC CAPITAL LETTER EN
|
||||
J О CYRILLIC CAPITAL LETTER O
|
||||
G П CYRILLIC CAPITAL LETTER PE
|
||||
H Р CYRILLIC CAPITAL LETTER ER
|
||||
C С CYRILLIC CAPITAL LETTER ES
|
||||
N Т CYRILLIC CAPITAL LETTER TE
|
||||
E У CYRILLIC CAPITAL LETTER U
|
||||
A Ф CYRILLIC CAPITAL LETTER EF
|
||||
{ Х CYRILLIC CAPITAL LETTER HA
|
||||
W Ц CYRILLIC CAPITAL LETTER TSE
|
||||
X Ч CYRILLIC CAPITAL LETTER CHE
|
||||
I Ш CYRILLIC CAPITAL LETTER SHA
|
||||
O Щ CYRILLIC CAPITAL LETTER SHCHA
|
||||
} Ъ CYRILLIC CAPITAL LETTER HARD SIGN
|
||||
S Ы CYRILLIC CAPITAL LETTER YERU
|
||||
M Ь CYRILLIC CAPITAL LETTER SOFT SIGN
|
||||
\" Э CYRILLIC CAPITAL LETTER E
|
||||
> Ю CYRILLIC CAPITAL LETTER YU
|
||||
Z Я CYRILLIC CAPITAL LETTER YA
|
||||
f а CYRILLIC SMALL LETTER A
|
||||
, б CYRILLIC SMALL LETTER BE
|
||||
d в CYRILLIC SMALL LETTER VE
|
||||
u г CYRILLIC SMALL LETTER GHE
|
||||
l д CYRILLIC SMALL LETTER DE
|
||||
t е CYRILLIC SMALL LETTER IE
|
||||
; ж CYRILLIC SMALL LETTER ZHE
|
||||
p з CYRILLIC SMALL LETTER ZE
|
||||
b и CYRILLIC SMALL LETTER I
|
||||
q й CYRILLIC SMALL LETTER SHORT I
|
||||
r к CYRILLIC SMALL LETTER KA
|
||||
k л CYRILLIC SMALL LETTER EL
|
||||
v м CYRILLIC SMALL LETTER EM
|
||||
y н CYRILLIC SMALL LETTER EN
|
||||
j о CYRILLIC SMALL LETTER O
|
||||
g п CYRILLIC SMALL LETTER PE
|
||||
h р CYRILLIC SMALL LETTER ER
|
||||
c с CYRILLIC SMALL LETTER ES
|
||||
n т CYRILLIC SMALL LETTER TE
|
||||
e у CYRILLIC SMALL LETTER U
|
||||
a ф CYRILLIC SMALL LETTER EF
|
||||
[ х CYRILLIC SMALL LETTER HA
|
||||
w ц CYRILLIC SMALL LETTER TSE
|
||||
x ч CYRILLIC SMALL LETTER CHE
|
||||
i ш CYRILLIC SMALL LETTER SHA
|
||||
o щ CYRILLIC SMALL LETTER SHCHA
|
||||
] ъ CYRILLIC SMALL LETTER HARD SIGN
|
||||
s ы CYRILLIC SMALL LETTER YERU
|
||||
m ь CYRILLIC SMALL LETTER SOFT SIGN
|
||||
' э CYRILLIC SMALL LETTER E
|
||||
. ю CYRILLIC SMALL LETTER YU
|
||||
z я CYRILLIC SMALL LETTER YA
|
||||
@ "
|
||||
# № NUMERO SIGN
|
||||
$ ;
|
||||
^ :
|
||||
& ?
|
||||
/ ё
|
||||
? Ё
|
||||
1 №
|
||||
2 -
|
||||
3 /
|
||||
4 "
|
||||
5 :
|
||||
6 ,
|
||||
7 .
|
||||
8 _
|
||||
9 ?
|
||||
0 %
|
||||
- !
|
||||
= ;
|
||||
\\ )
|
||||
\| (
|
||||
@@ -5,6 +5,7 @@ Look in the file for hints on how it can be disabled without deleting it.
|
||||
|
||||
getscriptPlugin.vim get latest version of Vim scripts
|
||||
gzip.vim edit compressed files
|
||||
logiPat.vim logical operators on patterns
|
||||
matchparen.vim highlight paren matching the one under the cursor
|
||||
netrwPlugin.vim edit files over a network and browse (remote) directories
|
||||
rrhelper.vim used for --remote-wait editing
|
||||
|
||||
335
runtime/plugin/logiPat.vim
Normal file
335
runtime/plugin/logiPat.vim
Normal file
@@ -0,0 +1,335 @@
|
||||
" LogiPat:
|
||||
" Author: Charles E. Campbell
|
||||
" Date: Mar 13, 2013
|
||||
" Version: 3
|
||||
" Purpose: to do Boolean-logic based regular expression pattern matching
|
||||
" Copyright: Copyright (C) 1999-2011 Charles E. Campbell {{{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 most anything else that's free,
|
||||
" LogiPat.vim is provided *as is* and comes with no warranty
|
||||
" of any kind, either expressed or implied. By using this
|
||||
" plugin, you agree that in no event will the copyright
|
||||
" holder be liable for any damages resulting from the use
|
||||
" of this software.
|
||||
"
|
||||
" Usage: {{{1
|
||||
" :LogiPat ...
|
||||
"
|
||||
" Boolean logic supported:
|
||||
" () grouping operators
|
||||
" ! not the following pattern
|
||||
" | logical or
|
||||
" & logical and
|
||||
" "..pattern.."
|
||||
" Example: {{{1
|
||||
" :LogiPat !("january"|"february")
|
||||
" would match all strings not containing the strings january
|
||||
" or february
|
||||
" GetLatestVimScripts: 1290 1 :AutoInstall: LogiPat.vim
|
||||
"
|
||||
" Behold, you will conceive in your womb, and bring forth a son, {{{1
|
||||
" and will call his name Jesus. He will be great, and will be
|
||||
" called the Son of the Most High. The Lord God will give him the
|
||||
" throne of his father, David, and he will reign over the house of
|
||||
" Jacob forever. There will be no end to his kingdom. (Luke 1:31-33 WEB)
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" Load Once: {{{1
|
||||
if &cp || exists("loaded_logipat")
|
||||
finish
|
||||
endif
|
||||
let g:loaded_LogiPat = "v3"
|
||||
let s:keepcpo = &cpo
|
||||
set cpo&vim
|
||||
"DechoRemOn
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" Public Interface: {{{1
|
||||
com! -nargs=* LogiPat call LogiPat(<q-args>,1)
|
||||
silent! com -nargs=* LP call LogiPat(<q-args>,1)
|
||||
com! -nargs=+ ELP echomsg LogiPat(<q-args>)
|
||||
com! -nargs=+ LogiPatFlags let s:LogiPatFlags="<args>"
|
||||
silent! com -nargs=+ LPF let s:LogiPatFlags="<args>"
|
||||
|
||||
" =====================================================================
|
||||
" Functions: {{{1
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" LogiPat: this function interprets the boolean-logic pattern {{{2
|
||||
fun! LogiPat(pat,...)
|
||||
" call Dfunc("LogiPat(pat<".a:pat.">)")
|
||||
|
||||
" LogiPat(pat,dosearch)
|
||||
if a:0 > 0
|
||||
let dosearch= a:1
|
||||
else
|
||||
let dosearch= 0
|
||||
endif
|
||||
|
||||
let s:npatstack = 0
|
||||
let s:nopstack = 0
|
||||
let s:preclvl = 0
|
||||
let expr = a:pat
|
||||
|
||||
" Lexer/Parser
|
||||
while expr != ""
|
||||
" call Decho("expr<".expr.">")
|
||||
|
||||
if expr =~ '^"'
|
||||
" push a Pattern; accept "" as a single " in the pattern
|
||||
let expr = substitute(expr,'^\s*"','','')
|
||||
let pat = substitute(expr,'^\(\%([^"]\|\"\"\)\{-}\)"\([^"].*$\|$\)','\1','')
|
||||
let pat = substitute(pat,'""','"','g')
|
||||
let expr = substitute(expr,'^\(\%([^"]\|\"\"\)\{-}\)"\([^"].*$\|$\)','\2','')
|
||||
let expr = substitute(expr,'^\s*','','')
|
||||
" call Decho("pat<".pat."> expr<".expr.">")
|
||||
|
||||
call s:LP_PatPush('.*'.pat.'.*')
|
||||
|
||||
elseif expr =~ '^[!()|&]'
|
||||
" push an operator
|
||||
let op = strpart(expr,0,1)
|
||||
let expr = strpart(expr,strlen(op))
|
||||
" allow for those who can't resist doubling their and/or operators
|
||||
if op =~ '[|&]' && expr[0] == op
|
||||
let expr = strpart(expr,strlen(op))
|
||||
endif
|
||||
call s:LP_OpPush(op)
|
||||
|
||||
elseif expr =~ '^\s'
|
||||
" skip whitespace
|
||||
let expr= strpart(expr,1)
|
||||
|
||||
else
|
||||
echoerr "operator<".strpart(expr,0,1)."> not supported (yet)"
|
||||
let expr= strpart(expr,1)
|
||||
endif
|
||||
|
||||
endwhile
|
||||
|
||||
" Final Execution
|
||||
call s:LP_OpPush('Z')
|
||||
|
||||
let result= s:LP_PatPop(1)
|
||||
" call Decho("result=".result)
|
||||
|
||||
" sanity checks and cleanup
|
||||
if s:npatstack > 0
|
||||
echoerr s:npatstack." patterns left on stack!"
|
||||
let s:npatstack= 0
|
||||
endif
|
||||
if s:nopstack > 0
|
||||
echoerr s:nopstack." operators left on stack!"
|
||||
let s:nopstack= 0
|
||||
endif
|
||||
|
||||
" perform the indicated search
|
||||
if dosearch
|
||||
if exists("s:LogiPatFlags")
|
||||
" call Decho("search(result<".result."> LogiPatFlags<".s:LogiPatFlags.">)")
|
||||
call search(result,s:LogiPatFlags)
|
||||
else
|
||||
" call Decho("search(result<".result.">)")
|
||||
call search(result)
|
||||
endif
|
||||
let @/= result
|
||||
endif
|
||||
|
||||
" call Dret("LogiPat ".result)
|
||||
return result
|
||||
endfun
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" s:String: Vim6.4 doesn't have string() {{{2
|
||||
func! s:String(str)
|
||||
return "'".escape(a:str, '"')."'"
|
||||
endfunc
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" LP_PatPush: {{{2
|
||||
fun! s:LP_PatPush(pat)
|
||||
" call Dfunc("LP_PatPush(pat<".a:pat.">)")
|
||||
let s:npatstack = s:npatstack + 1
|
||||
let s:patstack_{s:npatstack} = a:pat
|
||||
" call s:StackLook("patpush") "Decho
|
||||
" call Dret("LP_PatPush : npatstack=".s:npatstack)
|
||||
endfun
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" LP_PatPop: pop a number/variable from LogiPat's pattern stack {{{2
|
||||
fun! s:LP_PatPop(lookup)
|
||||
" call Dfunc("LP_PatPop(lookup=".a:lookup.")")
|
||||
if s:npatstack > 0
|
||||
let ret = s:patstack_{s:npatstack}
|
||||
let s:npatstack = s:npatstack - 1
|
||||
else
|
||||
let ret= "---error---"
|
||||
echoerr "(LogiPat) invalid expression"
|
||||
endif
|
||||
" call s:StackLook("patpop") "Decho
|
||||
" call Dret("LP_PatPop ".ret)
|
||||
return ret
|
||||
endfun
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" LP_OpPush: {{{2
|
||||
fun! s:LP_OpPush(op)
|
||||
" call Dfunc("LP_OpPush(op<".a:op.">)")
|
||||
|
||||
" determine new operator's precedence level
|
||||
if a:op == '('
|
||||
let s:preclvl= s:preclvl + 10
|
||||
let preclvl = s:preclvl
|
||||
elseif a:op == ')'
|
||||
let s:preclvl= s:preclvl - 10
|
||||
if s:preclvl < 0
|
||||
let s:preclvl= 0
|
||||
echoerr "too many )s"
|
||||
endif
|
||||
let preclvl= s:preclvl
|
||||
elseif a:op =~ '|'
|
||||
let preclvl= s:preclvl + 2
|
||||
elseif a:op =~ '&'
|
||||
let preclvl= s:preclvl + 4
|
||||
elseif a:op == '!'
|
||||
let preclvl= s:preclvl + 6
|
||||
elseif a:op == 'Z'
|
||||
let preclvl= -1
|
||||
else
|
||||
echoerr "expr<".expr."> not supported (yet)"
|
||||
let preclvl= s:preclvl
|
||||
endif
|
||||
" call Decho("new operator<".a:op."> preclvl=".preclvl)
|
||||
|
||||
" execute higher-precdence operators
|
||||
" call Decho("execute higher-precedence operators")
|
||||
call s:LP_Execute(preclvl)
|
||||
|
||||
" push new operator onto operator-stack
|
||||
" call Decho("push new operator<".a:op."> onto stack with preclvl=".preclvl." at nopstack=".(s:nopstack+1))
|
||||
if a:op =~ '!'
|
||||
let s:nopstack = s:nopstack + 1
|
||||
let s:opprec_{s:nopstack} = preclvl
|
||||
let s:opstack_{s:nopstack} = a:op
|
||||
elseif a:op =~ '|'
|
||||
let s:nopstack = s:nopstack + 1
|
||||
let s:opprec_{s:nopstack} = preclvl
|
||||
let s:opstack_{s:nopstack} = a:op
|
||||
elseif a:op == '&'
|
||||
let s:nopstack = s:nopstack + 1
|
||||
let s:opprec_{s:nopstack} = preclvl
|
||||
let s:opstack_{s:nopstack} = a:op
|
||||
endif
|
||||
|
||||
" call s:StackLook("oppush") "Decho
|
||||
" call Dret("LP_OpPush : s:preclvl=".s:preclvl)
|
||||
endfun
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" LP_Execute: execute operators from opstack using pattern stack {{{2
|
||||
fun! s:LP_Execute(preclvl)
|
||||
" call Dfunc("LP_Execute(preclvl=".a:preclvl.") npatstack=".s:npatstack." nopstack=".s:nopstack)
|
||||
|
||||
" execute all higher precedence operators
|
||||
while s:nopstack > 0 && a:preclvl < s:opprec_{s:nopstack}
|
||||
let op= s:opstack_{s:nopstack}
|
||||
" call Decho("op<".op."> nop=".s:nopstack." [preclvl=".a:preclvl."] < [opprec_".s:nopstack."=".s:opprec_{s:nopstack}."]")
|
||||
|
||||
let s:nopstack = s:nopstack - 1
|
||||
|
||||
if op == '!'
|
||||
let n1= s:LP_PatPop(1)
|
||||
call s:LP_PatPush(s:LP_Not(n1))
|
||||
|
||||
elseif op == '|'
|
||||
let n1= s:LP_PatPop(1)
|
||||
let n2= s:LP_PatPop(1)
|
||||
call s:LP_PatPush(s:LP_Or(n2,n1))
|
||||
|
||||
elseif op =~ '&'
|
||||
let n1= s:LP_PatPop(1)
|
||||
let n2= s:LP_PatPop(1)
|
||||
call s:LP_PatPush(s:LP_And(n2,n1))
|
||||
endif
|
||||
|
||||
" call s:StackLook("execute") "Decho
|
||||
endwhile
|
||||
|
||||
" call Dret("LP_Execute")
|
||||
endfun
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" LP_Not: writes a logical-not for a pattern {{{2
|
||||
fun! s:LP_Not(pat)
|
||||
" call Dfunc("LP_Not(pat<".a:pat.">)")
|
||||
if a:pat =~ '^\.\*' && a:pat =~ '\.\*$'
|
||||
let pat= substitute(a:pat,'^\.\*\(.*\)\.\*$','\1','')
|
||||
let ret= '^\%(\%('.pat.'\)\@!.\)*$'
|
||||
else
|
||||
let ret= '^\%(\%('.a:pat.'\)\@!.\)*$'
|
||||
endif
|
||||
" call Dret("LP_Not ".ret)
|
||||
return ret
|
||||
endfun
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" LP_Or: writes a logical-or branch using two patterns {{{2
|
||||
fun! s:LP_Or(pat1,pat2)
|
||||
" call Dfunc("LP_Or(pat1<".a:pat1."> pat2<".a:pat2.">)")
|
||||
let ret= '\%('.a:pat1.'\|'.a:pat2.'\)'
|
||||
" call Dret("LP_Or ".ret)
|
||||
return ret
|
||||
endfun
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" LP_And: writes a logical-and concat using two patterns {{{2
|
||||
fun! s:LP_And(pat1,pat2)
|
||||
" call Dfunc("LP_And(pat1<".a:pat1."> pat2<".a:pat2.">)")
|
||||
let ret= '\%('.a:pat1.'\&'.a:pat2.'\)'
|
||||
" call Dret("LP_And ".ret)
|
||||
return ret
|
||||
endfun
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" StackLook: {{{2
|
||||
fun! s:StackLook(description)
|
||||
" call Dfunc("StackLook(description<".a:description.">)")
|
||||
let iop = 1
|
||||
let ifp = 1
|
||||
" call Decho("Pattern Operator")
|
||||
|
||||
" print both pattern and operator
|
||||
while ifp <= s:npatstack && iop <= s:nopstack
|
||||
let fp = s:patstack_{ifp}
|
||||
let op = s:opstack_{iop}." (P".s:opprec_{s:nopstack}.')'
|
||||
let fplen= strlen(fp)
|
||||
if fplen < 30
|
||||
let fp= fp.strpart(" ",1,30-fplen)
|
||||
endif
|
||||
" call Decho(fp.op)
|
||||
let ifp = ifp + 1
|
||||
let iop = iop + 1
|
||||
endwhile
|
||||
|
||||
" print just pattern
|
||||
while ifp <= s:npatstack
|
||||
let fp = s:patstack_{ifp}
|
||||
" call Decho(fp)
|
||||
let ifp = ifp + 1
|
||||
endwhile
|
||||
|
||||
" print just operator
|
||||
while iop <= s:nopstack
|
||||
let op = s:opstack_{iop}." (P".s:opprec_{s:nopstack}.')'
|
||||
" call Decho(" ".op)
|
||||
let iop = iop + 1
|
||||
endwhile
|
||||
" call Dret("StackLook")
|
||||
endfun
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" Cleanup And Modeline: {{{1
|
||||
let &cpo= s:keepcpo
|
||||
unlet s:keepcpo
|
||||
" vim: ts=4 fdm=marker
|
||||
@@ -1,8 +1,9 @@
|
||||
" Vim syntax file
|
||||
" Language: Asterisk config file
|
||||
" Maintainer: brc007
|
||||
" Maintainer: Jean Aunis <jean.aunis@yahoo.fr>
|
||||
" Previous Maintainer: brc007
|
||||
" Updated for 1.2 by Tilghman Lesher (Corydon76)
|
||||
" Last Change: 2006 Mar 20
|
||||
" Last Change: 2015 Feb 27
|
||||
" version 0.4
|
||||
"
|
||||
if version < 600
|
||||
@@ -17,18 +18,19 @@ syn sync fromstart
|
||||
syn keyword asteriskTodo TODO contained
|
||||
syn match asteriskComment ";.*" contains=asteriskTodo
|
||||
syn match asteriskContext "\[.\{-}\]"
|
||||
syn match asteriskExten "^\s*exten\s*=>\?\s*[^,]\+" contains=asteriskPattern
|
||||
syn match asteriskExten "^\s*\zsexten\s*=>\?\s*[^,]\+\ze," contains=asteriskPattern nextgroup=asteriskPriority
|
||||
syn match asteriskExten "^\s*\zssame\s*=>\?\s*\ze" nextgroup=asteriskPriority
|
||||
syn match asteriskExten "^\s*\(register\|channel\|ignorepat\|include\|\(no\)\?load\)\s*=>\?"
|
||||
syn match asteriskPattern "_\(\[[[:alnum:]#*\-]\+\]\|[[:alnum:]#*]\)*\.\?" contained
|
||||
syn match asteriskPattern "[^A-Za-z0-9,]\zs[[:alnum:]#*]\+\ze" contained
|
||||
syn match asteriskApp ",\zs[a-zA-Z]\+\ze$"
|
||||
syn match asteriskApp ",\zs[a-zA-Z]\+\ze("
|
||||
" Digits plus oldlabel (newlabel)
|
||||
syn match asteriskPriority ",\zs[[:digit:]]\+\(+[[:alpha:]][[:alnum:]_]*\)\?\(([[:alpha:]][[:alnum:]_]*)\)\?\ze," contains=asteriskLabel
|
||||
syn match asteriskPriority "\zs[[:digit:]]\+\(+[[:alpha:]][[:alnum:]_]*\)\?\(([[:alpha:]][[:alnum:]_]*)\)\?\ze," contains=asteriskLabel
|
||||
" oldlabel plus digits (newlabel)
|
||||
syn match asteriskPriority ",\zs[[:alpha:]][[:alnum:]_]*+[[:digit:]]\+\(([[:alpha:]][[:alnum:]_]*)\)\?\ze," contains=asteriskLabel
|
||||
syn match asteriskPriority "\zs[[:alpha:]][[:alnum:]_]*+[[:digit:]]\+\(([[:alpha:]][[:alnum:]_]*)\)\?\ze," contains=asteriskLabel
|
||||
" s or n plus digits (newlabel)
|
||||
syn match asteriskPriority ",\zs[sn]\(+[[:digit:]]\+\)\?\(([[:alpha:]][[:alnum:]_]*)\)\?\ze," contains=asteriskLabel
|
||||
syn match asteriskPriority "\zs[sn]\(+[[:digit:]]\+\)\?\(([[:alpha:]][[:alnum:]_]*)\)\?\ze," contains=asteriskLabel
|
||||
syn match asteriskLabel "(\zs[[:alpha:]][[:alnum:]]*\ze)" contained
|
||||
syn match asteriskError "^\s*#\s*[[:alnum:]]*"
|
||||
syn match asteriskInclude "^\s*#\s*\(include\|exec\)\s.*"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" Vim syntax file
|
||||
" Language: C
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2014 Nov 13
|
||||
" Last Change: 2015 Mar 05
|
||||
|
||||
" Quit when a (custom) syntax file was already loaded
|
||||
if exists("b:current_syntax")
|
||||
@@ -47,16 +47,17 @@ if !exists("c_no_cformat")
|
||||
endif
|
||||
|
||||
" cCppString: same as cString, but ends at end of line
|
||||
if s:ft ==# "cpp" && !exists("cpp_no_cpp11")
|
||||
if s:ft ==# "cpp" && !exists("cpp_no_cpp11") && !exists("c_no_cformat")
|
||||
" ISO C++11
|
||||
syn region cString start=+\(L\|u\|u8\|U\|R\|LR\|u8R\|uR\|UR\)\="+ skip=+\\\\\|\\"+ end=+"+ contains=cSpecial,cFormat,@Spell extend
|
||||
syn region cCppString start=+\(L\|u\|u8\|U\|R\|LR\|u8R\|uR\|UR\)\="+ skip=+\\\\\|\\"\|\\$+ excludenl end=+"+ end='$' contains=cSpecial,cFormat,@Spell
|
||||
elseif s:ft ==# "c" && !exists("c_no_c11")
|
||||
elseif s:ft ==# "c" && !exists("c_no_c11") && !exists("c_no_cformat")
|
||||
" ISO C99
|
||||
syn region cString start=+\%(L\|U\|u8\)\="+ skip=+\\\\\|\\"+ end=+"+ contains=cSpecial,cFormat,@Spell extend
|
||||
syn region cCppString start=+\%(L\|U\|u8\)\="+ skip=+\\\\\|\\"\|\\$+ excludenl end=+"+ end='$' contains=cSpecial,cFormat,@Spell
|
||||
else
|
||||
" older C or C++
|
||||
syn match cFormat display "%%" contained
|
||||
syn region cString start=+L\="+ skip=+\\\\\|\\"+ end=+"+ contains=cSpecial,cFormat,@Spell extend
|
||||
syn region cCppString start=+L\="+ skip=+\\\\\|\\"\|\\$+ excludenl end=+"+ end='$' contains=cSpecial,cFormat,@Spell
|
||||
endif
|
||||
@@ -80,7 +81,11 @@ syn match cSpecialCharacter display "L'\\x\x\+'"
|
||||
|
||||
if (s:ft ==# "c" && !exists("c_no_c11")) || (s:ft ==# "cpp" && !exists("cpp_no_cpp11"))
|
||||
" ISO C11 or ISO C++ 11
|
||||
syn region cString start=+\%(U\|u8\=\)"+ skip=+\\\\\|\\"+ end=+"+ contains=cSpecial,cFormat,@Spell extend
|
||||
if exists("c_no_cformat")
|
||||
syn region cString start=+\%(U\|u8\=\)"+ skip=+\\\\\|\\"+ end=+"+ contains=cSpecial,@Spell extend
|
||||
else
|
||||
syn region cString start=+\%(U\|u8\=\)"+ skip=+\\\\\|\\"+ end=+"+ contains=cSpecial,cFormat,@Spell extend
|
||||
endif
|
||||
syn match cCharacter "[Uu]'[^\\]'"
|
||||
syn match cCharacter "[Uu]'[^']*'" contains=cSpecial
|
||||
if exists("c_gnu")
|
||||
@@ -330,6 +335,8 @@ if !exists("c_no_ansi") || exists("c_ansi_constants") || exists("c_gnu")
|
||||
" POSIX 2001
|
||||
syn keyword cConstant SIGBUS SIGPOLL SIGPROF SIGSYS SIGURG
|
||||
syn keyword cConstant SIGVTALRM SIGXCPU SIGXFSZ
|
||||
" non-POSIX signals
|
||||
syn keyword cConstant SIGWINCH SIGINFO
|
||||
" Add POSIX errors as well
|
||||
syn keyword cConstant E2BIG EACCES EAGAIN EBADF EBADMSG EBUSY
|
||||
syn keyword cConstant ECANCELED ECHILD EDEADLK EDOM EEXIST EFAULT
|
||||
@@ -387,8 +394,13 @@ endif
|
||||
syn cluster cLabelGroup contains=cUserLabel
|
||||
syn match cUserCont display "^\s*\I\i*\s*:$" contains=@cLabelGroup
|
||||
syn match cUserCont display ";\s*\I\i*\s*:$" contains=@cLabelGroup
|
||||
syn match cUserCont display "^\s*\I\i*\s*:[^:]"me=e-1 contains=@cLabelGroup
|
||||
syn match cUserCont display ";\s*\I\i*\s*:[^:]"me=e-1 contains=@cLabelGroup
|
||||
if s:ft ==# 'cpp'
|
||||
syn match cUserCont display "^\s*\%(class\|struct\|enum\)\@!\I\i*\s*:[^:]"me=e-1 contains=@cLabelGroup
|
||||
syn match cUserCont display ";\s*\%(class\|struct\|enum\)\@!\I\i*\s*:[^:]"me=e-1 contains=@cLabelGroup
|
||||
else
|
||||
syn match cUserCont display "^\s*\I\i*\s*:[^:]"me=e-1 contains=@cLabelGroup
|
||||
syn match cUserCont display ";\s*\I\i*\s*:[^:]"me=e-1 contains=@cLabelGroup
|
||||
endif
|
||||
|
||||
syn match cUserLabel display "\I\i*" contained
|
||||
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
" Vim syntax file
|
||||
" Language: COBOL
|
||||
" Maintainer: Tim Pope <vimNOSPAM@tpope.info>
|
||||
" Language: COBOL
|
||||
" Maintainer: Tim Pope <vimNOSPAM@tpope.org>
|
||||
" (formerly Davyd Ondrejko <vondraco@columbus.rr.com>)
|
||||
" (formerly Sitaram Chamarty <sitaram@diac.com> and
|
||||
" James Mitchell <james_mitchell@acm.org>)
|
||||
" $Id: cobol.vim,v 1.2 2007/05/05 18:23:43 vimboss Exp $
|
||||
" James Mitchell <james_mitchell@acm.org>)
|
||||
" Last Change: 2015 Feb 13
|
||||
|
||||
" For version 5.x: Clear all syntax items
|
||||
" For version 6.x: Quit when a syntax file was already loaded
|
||||
@@ -145,7 +145,7 @@ syn match cobolString /'[^']*\('\|$\)/
|
||||
syn match cobolIndicator "\%7c[D-]" contained
|
||||
|
||||
if exists("cobol_legacy_code")
|
||||
syn region cobolCondFlow contains=ALLBUT,cobolLine start="\<\(IF\|INVALID\|END\|EOP\)\>" skip=/\('\|"\)[^"]\{-}\("\|'\|$\)/ end="\." keepend
|
||||
syn region cobolCondFlow contains=ALLBUT,cobolLine,cobolBadLine start="\<\(IF\|INVALID\|END\|EOP\)\>" skip=/\('\|"\)[^"]\{-}\("\|'\|$\)/ end="\." keepend
|
||||
endif
|
||||
|
||||
" many legacy sources have junk in columns 1-6: must be before others
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
" Vim syntax file
|
||||
" Language: C++
|
||||
" Current Maintainer: vim-jp (https://github.com/vim-jp/cpp-vim)
|
||||
" Current Maintainer: vim-jp (https://github.com/vim-jp/vim-cpp)
|
||||
" Previous Maintainer: Ken Shan <ccshan@post.harvard.edu>
|
||||
" Last Change: 2014 May 14
|
||||
" Last Change: 2015 May 04
|
||||
|
||||
" For version 5.x: Clear all syntax items
|
||||
" For version 6.x: Quit when a syntax file was already loaded
|
||||
@@ -32,14 +32,21 @@ syn match cppCast "\<\(const\|static\|dynamic\|reinterpret\)_cast\s*$"
|
||||
syn keyword cppStorageClass mutable
|
||||
syn keyword cppStructure class typename template namespace
|
||||
syn keyword cppBoolean true false
|
||||
syn keyword cppConstant __cplusplus
|
||||
|
||||
" C++ 11 extensions
|
||||
if !exists("cpp_no_cpp11")
|
||||
syn keyword cppType override final
|
||||
syn keyword cppExceptions noexcept
|
||||
syn keyword cppStorageClass constexpr decltype
|
||||
syn keyword cppStorageClass constexpr decltype thread_local
|
||||
syn keyword cppConstant nullptr
|
||||
syn region cppRawString matchgroup=cppRawDelimiter start=+\%(u8\|[uLU]\)\=R"\z([[:alnum:]_{}[\]#<>%:;.?*\+\-/\^&|~!=,"']\{,16}\)(+ end=+)\z1"+ contains=@Spell
|
||||
syn keyword cppConstant ATOMIC_FLAG_INIT ATOMIC_VAR_INIT
|
||||
syn keyword cppConstant ATOMIC_BOOL_LOCK_FREE ATOMIC_CHAR_LOCK_FREE
|
||||
syn keyword cppConstant ATOMIC_CHAR16_T_LOCK_FREE ATOMIC_CHAR32_T_LOCK_FREE
|
||||
syn keyword cppConstant ATOMIC_WCHAR_T_LOCK_FREE ATOMIC_SHORT_LOCK_FREE
|
||||
syn keyword cppConstant ATOMIC_INT_LOCK_FREE ATOMIC_LONG_LOCK_FREE
|
||||
syn keyword cppConstant ATOMIC_LLONG_LOCK_FREE ATOMIC_POINTER_LOCK_FREE
|
||||
syn region cppRawString matchgroup=cppRawStringDelimiter start=+\%(u8\|[uLU]\)\=R"\z([[:alnum:]_{}[\]#<>%:;.?*\+\-/\^&|~!=,"']\{,16}\)(+ end=+)\z1"+ contains=@Spell
|
||||
endif
|
||||
|
||||
" The minimum and maximum operators in GNU C++
|
||||
@@ -63,7 +70,7 @@ if version >= 508 || !exists("did_cpp_syntax_inits")
|
||||
HiLink cppStructure Structure
|
||||
HiLink cppBoolean Boolean
|
||||
HiLink cppConstant Constant
|
||||
HiLink cppRawDelimiter Delimiter
|
||||
HiLink cppRawStringDelimiter Delimiter
|
||||
HiLink cppRawString String
|
||||
delcommand HiLink
|
||||
endif
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
" Vim syntax file
|
||||
" Language: C-shell (csh)
|
||||
" Maintainer: Charles E. Campbell <NdrOchipS@PcampbellAfamily.Mbiz>
|
||||
" Version: 11
|
||||
" Last Change: Oct 23, 2014
|
||||
" Version: 11
|
||||
" URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_CSH
|
||||
|
||||
" For version 5.x: Clear all syntax items
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
" Nikolai Weibull (Add CSS2 support)
|
||||
" Maintainer: Jules Wang <w.jq0722@gmail.com>
|
||||
" URL: https://github.com/JulesWang/css.vim
|
||||
" Last Change: 2013 Nov.27
|
||||
" Last Change: 2015 Apr.17
|
||||
|
||||
" For version 5.x: Clear all syntax items
|
||||
" For version 6.x: Quit when a syntax file was already loaded
|
||||
@@ -26,18 +26,19 @@ set cpo&vim
|
||||
|
||||
syn case ignore
|
||||
|
||||
" All HTML4 tags
|
||||
syn keyword cssTagName abbr acronym address applet area a b base
|
||||
syn keyword cssTagName basefont bdo big blockquote body br button
|
||||
syn keyword cssTagName caption center cite code col colgroup dd del
|
||||
syn keyword cssTagName dfn dir div dl dt em fieldset font form frame
|
||||
syn keyword cssTagName frameset h1 h2 h3 h4 h5 h6 head hr html img i
|
||||
syn keyword cssTagName iframe img input ins isindex kbd label legend li
|
||||
syn keyword cssTagName link map menu meta noframes noscript ol optgroup
|
||||
syn keyword cssTagName option p param pre q s samp script select small
|
||||
syn keyword cssTagName span strike strong style sub sup table tbody td
|
||||
syn keyword cssTagName textarea tfoot th thead title tr tt ul u var
|
||||
" HTML4 tags
|
||||
syn keyword cssTagName abbr address area a b base
|
||||
syn keyword cssTagName bdo blockquote body br button
|
||||
syn keyword cssTagName caption cite code col colgroup dd del
|
||||
syn keyword cssTagName dfn div dl dt em fieldset form
|
||||
syn keyword cssTagName h1 h2 h3 h4 h5 h6 head hr html img i
|
||||
syn keyword cssTagName iframe input ins isindex kbd label legend li
|
||||
syn keyword cssTagName link map menu meta noscript ol optgroup
|
||||
syn keyword cssTagName option p param pre q s samp script small
|
||||
syn keyword cssTagName span strong sub sup tbody td
|
||||
syn keyword cssTagName textarea tfoot th thead title tr ul u var
|
||||
syn keyword cssTagName object svg
|
||||
syn match cssTagName /\<select\>\|\<style\>\|\<table\>/
|
||||
|
||||
" 34 HTML5 tags
|
||||
syn keyword cssTagName article aside audio bdi canvas command data
|
||||
@@ -47,8 +48,8 @@ syn keyword cssTagName output progress rt rp ruby section
|
||||
syn keyword cssTagName source summary time track video wbr
|
||||
|
||||
" Tags not supported in HTML5
|
||||
syn keyword cssDeprecated acronym applet basefont big center dir
|
||||
syn keyword cssDeprecated font frame frameset noframes strike tt
|
||||
" acronym applet basefont big center dir
|
||||
" font frame frameset noframes strike tt
|
||||
|
||||
syn match cssTagName "\*"
|
||||
|
||||
@@ -70,13 +71,13 @@ endtry
|
||||
" digits
|
||||
syn match cssValueInteger contained "[-+]\=\d\+" contains=cssUnitDecorators
|
||||
syn match cssValueNumber contained "[-+]\=\d\+\(\.\d*\)\=" contains=cssUnitDecorators
|
||||
syn match cssValueLength contained "[-+]\=\d\+\(\.\d*\)\=\(%\|mm\|cm\|in\|pt\|pc\|em\|ex\|px\|rem\|dpi\|dppx\|dpcm\)" contains=cssUnitDecorators
|
||||
syn match cssValueAngle contained "[-+]\=\d\+\(\.\d*\)\=\(deg\|grad\|rad\)" contains=cssUnitDecorators
|
||||
syn match cssValueTime contained "+\=\d\+\(\.\d*\)\=\(ms\|s\)" contains=cssUnitDecorators
|
||||
syn match cssValueFrequency contained "+\=\d\+\(\.\d*\)\=\(Hz\|kHz\)" contains=cssUnitDecorators
|
||||
syn match cssValueLength contained "[-+]\=\d\+\(\.\d*\)\=\(%\|mm\|cm\|in\|pt\|pc\|em\|ex\|px\|rem\|dpi\|dppx\|dpcm\)\>" contains=cssUnitDecorators
|
||||
syn match cssValueAngle contained "[-+]\=\d\+\(\.\d*\)\=\(deg\|grad\|rad\)\>" contains=cssUnitDecorators
|
||||
syn match cssValueTime contained "+\=\d\+\(\.\d*\)\=\(ms\|s\)\>" contains=cssUnitDecorators
|
||||
syn match cssValueFrequency contained "+\=\d\+\(\.\d*\)\=\(Hz\|kHz\)\>" contains=cssUnitDecorators
|
||||
|
||||
|
||||
syn match cssIncludeKeyword /@\(-[a-z]+-\)\=\(media\|keyframes\|import\|charset\|namespace\|page\)/ contained
|
||||
syn match cssIncludeKeyword /@\(-[a-z]\+-\)\=\(media\|keyframes\|import\|charset\|namespace\|page\)/ contained
|
||||
" @media
|
||||
syn region cssInclude start=/@media\>/ end=/\ze{/ skipwhite skipnl contains=cssMediaProp,cssValueLength,cssMediaKeyword,cssValueInteger,cssMediaAttr,cssVendor,cssMediaType,cssIncludeKeyword,cssMediaComma,cssComment nextgroup=cssMediaBlock
|
||||
syn keyword cssMediaType contained screen print aural braille embossed handheld projection tty tv speech all contained skipwhite skipnl
|
||||
@@ -86,7 +87,7 @@ syn match cssMediaComma "," skipwhite skipnl contained
|
||||
|
||||
" Reference: http://www.w3.org/TR/css3-mediaqueries/
|
||||
syn keyword cssMediaProp contained width height orientation scan grid
|
||||
syn match cssMediaProp contained /\(\(device\)-\)\=aspect-ratio/
|
||||
syn match cssMediaProp contained /\(\(max\|min\)-\)\=\(\(device\)-\)\=aspect-ratio/
|
||||
syn match cssMediaProp contained /\(\(max\|min\)-\)\=device-pixel-ratio/
|
||||
syn match cssMediaProp contained /\(\(max\|min\)-\)\=device-\(height\|width\)/
|
||||
syn match cssMediaProp contained /\(\(max\|min\)-\)\=\(height\|width\|resolution\|monochrome\|color\(-index\)\=\)/
|
||||
@@ -104,7 +105,7 @@ syn keyword cssPageProp contained orphans widows
|
||||
|
||||
" @keyframe
|
||||
" http://www.w3.org/TR/css3-animations/#keyframes
|
||||
syn match cssKeyFrame "@\(-[a-z]+-\)\=keyframes\>[^{]*{\@=" nextgroup=cssKeyFrameWrap contains=cssVendor,cssIncludeKeyword skipwhite skipnl transparent
|
||||
syn match cssKeyFrame "@\(-[a-z]\+-\)\=keyframes\>[^{]*{\@=" nextgroup=cssKeyFrameWrap contains=cssVendor,cssIncludeKeyword skipwhite skipnl transparent
|
||||
syn region cssKeyFrameWrap contained transparent matchgroup=cssBraces start="{" end="}" contains=cssKeyFrameSelector
|
||||
syn match cssKeyFrameSelector /\(\d*%\|from\|to\)\=/ contained skipwhite skipnl nextgroup=cssDefinition
|
||||
|
||||
@@ -116,15 +117,27 @@ syn region cssInclude start=/@namespace\>/ end=/\ze;/ transparent contains=cssSt
|
||||
" @font-face
|
||||
" http://www.w3.org/TR/css3-fonts/#at-font-face-rule
|
||||
syn match cssFontDescriptor "@font-face\>" nextgroup=cssFontDescriptorBlock skipwhite skipnl
|
||||
syn region cssFontDescriptorBlock contained transparent matchgroup=cssBraces start="{" end="}" contains=cssComment,cssError,cssUnicodeEscape,cssFontProp,cssFontAttr,cssCommonAttr,cssStringQ,cssStringQQ,cssFontDescriptorProp,cssValue.*,cssFontDescriptorFunction,cssUnicodeRange,cssFontDescriptorAttr
|
||||
"syn match cssFontDescriptorProp contained "\<\(unicode-range\|unit-per-em\|panose-1\|cap-height\|x-height\|definition-src\)\>"
|
||||
"syn keyword cssFontDescriptorProp contained src stemv stemh slope ascent descent widths bbox baseline centerline mathline topline
|
||||
syn region cssFontDescriptorBlock contained transparent matchgroup=cssBraces start="{" end="}" contains=cssComment,cssError,cssUnicodeEscape,cssCommonAttr,cssFontDescriptorProp,cssValue.*,cssFontDescriptorFunction,cssFontDescriptorAttr,cssNoise
|
||||
|
||||
syn match cssFontDescriptorProp contained "\<font-family\>"
|
||||
syn keyword cssFontDescriptorProp contained src
|
||||
syn match cssFontDescriptorProp contained "\<font-\(style\|weight\|stretch\)\>"
|
||||
syn match cssFontDescriptorProp contained "\<unicode-range\>"
|
||||
syn keyword cssFontDescriptorAttr contained all
|
||||
syn match cssFontDescriptorProp contained "\<font-\(variant\|feature-settings\)\>"
|
||||
|
||||
" src functions
|
||||
syn region cssFontDescriptorFunction contained matchgroup=cssFunctionName start="\<\(uri\|url\|local\|format\)\s*(" end=")" contains=cssStringQ,cssStringQQ oneline keepend
|
||||
syn match cssUnicodeRange contained "U+[0-9A-Fa-f?]\+"
|
||||
syn match cssUnicodeRange contained "U+\x\+-\x\+"
|
||||
" font-sytle and font-weight attributes
|
||||
syn keyword cssFontDescriptorAttr contained normal italic oblique bold
|
||||
" font-stretch attributes
|
||||
syn match cssFontDescriptorAttr contained "\<\(\(ultra\|extra\|semi\)-\)\=\(condensed\|expanded\)\>"
|
||||
" unicode-range attributes
|
||||
syn match cssFontDescriptorAttr contained "U+[0-9A-Fa-f?]\+"
|
||||
syn match cssFontDescriptorAttr contained "U+\x\+-\x\+"
|
||||
" font-feature-settings attributes
|
||||
syn keyword cssFontDescriptorAttr contained on off
|
||||
|
||||
|
||||
|
||||
" The 16 basic color names
|
||||
syn keyword cssColor contained aqua black blue fuchsia gray green lime maroon navy olive purple red silver teal yellow
|
||||
@@ -133,23 +146,23 @@ syn keyword cssColor contained aqua black blue fuchsia gray green lime maroon na
|
||||
syn keyword cssColor contained aliceblue antiquewhite aquamarine azure
|
||||
syn keyword cssColor contained beige bisque blanchedalmond blueviolet brown burlywood
|
||||
syn keyword cssColor contained cadetblue chartreuse chocolate coral cornflowerblue cornsilk crimson cyan
|
||||
syn match cssColor contained /dark\(blue\|cyan\|goldenrod\|gray\|green\|grey\|khaki\)/
|
||||
syn match cssColor contained /dark\(magenta\|olivegreen\|orange\|orchid\|red\|salmon\|seagreen\)/
|
||||
syn match cssColor contained /darkslate\(blue\|gray\|grey\)/
|
||||
syn match cssColor contained /dark\(turquoise\|violet\)/
|
||||
syn match cssColor contained /\<dark\(blue\|cyan\|goldenrod\|gray\|green\|grey\|khaki\)\>/
|
||||
syn match cssColor contained /\<dark\(magenta\|olivegreen\|orange\|orchid\|red\|salmon\|seagreen\)\>/
|
||||
syn match cssColor contained /\<darkslate\(blue\|gray\|grey\)\>/
|
||||
syn match cssColor contained /\<dark\(turquoise\|violet\)\>/
|
||||
syn keyword cssColor contained deeppink deepskyblue dimgray dimgrey dodgerblue firebrick
|
||||
syn keyword cssColor contained floralwhite forestgreen gainsboro ghostwhite gold
|
||||
syn keyword cssColor contained goldenrod greenyellow grey honeydew hotpink
|
||||
syn keyword cssColor contained indianred indigo ivory khaki lavender lavenderblush lawngreen
|
||||
syn keyword cssColor contained lemonchiffon limegreen linen magenta
|
||||
syn match cssColor contained /light\(blue\|coral\|cyan\|goldenrodyellow\|gray\|green\)/
|
||||
syn match cssColor contained /light\(grey\|pink\|salmon\|seagreen\|skyblue\|yellow\)/
|
||||
syn match cssColor contained /light\(slategray\|slategrey\|steelblue\)/
|
||||
syn match cssColor contained /medium\(aquamarine\|blue\|orchid\|purple\|seagreen\)/
|
||||
syn match cssColor contained /medium\(slateblue\|springgreen\|turquoise\|violetred\)/
|
||||
syn match cssColor contained /\<light\(blue\|coral\|cyan\|goldenrodyellow\|gray\|green\)\>/
|
||||
syn match cssColor contained /\<light\(grey\|pink\|salmon\|seagreen\|skyblue\|yellow\)\>/
|
||||
syn match cssColor contained /\<light\(slategray\|slategrey\|steelblue\)\>/
|
||||
syn match cssColor contained /\<medium\(aquamarine\|blue\|orchid\|purple\|seagreen\)\>/
|
||||
syn match cssColor contained /\<medium\(slateblue\|springgreen\|turquoise\|violetred\)\>/
|
||||
syn keyword cssColor contained midnightblue mintcream mistyrose moccasin navajowhite
|
||||
syn keyword cssColor contained oldlace olivedrab orange orangered orchid
|
||||
syn match cssColor contained /pale\(goldenrod\|green\|turquoise\|violetred\)/
|
||||
syn match cssColor contained /\<pale\(goldenrod\|green\|turquoise\|violetred\)\>/
|
||||
syn keyword cssColor contained papayawhip peachpuff peru pink plum powderblue
|
||||
syn keyword cssColor contained rosybrown royalblue saddlebrown salmon sandybrown
|
||||
syn keyword cssColor contained seagreen seashell sienna skyblue slateblue
|
||||
@@ -167,11 +180,12 @@ syn case ignore
|
||||
syn match cssImportant contained "!\s*important\>"
|
||||
|
||||
syn match cssColor contained "\<transparent\>"
|
||||
syn match cssColor contained "\<currentColor\>"
|
||||
syn match cssColor contained "\<white\>"
|
||||
syn match cssColor contained "#[0-9A-Fa-f]\{3\}\>" contains=cssUnitDecorators
|
||||
syn match cssColor contained "#[0-9A-Fa-f]\{6\}\>" contains=cssUnitDecorators
|
||||
|
||||
syn region cssURL contained matchgroup=cssFunctionName start="\<url\s*(" end=")" oneline extend
|
||||
syn region cssURL contained matchgroup=cssFunctionName start="\<url\s*(" end=")" contains=cssStringQ,cssStringQQ oneline
|
||||
syn region cssFunction contained matchgroup=cssFunctionName start="\<\(rgb\|clip\|attr\|counter\|rect\|cubic-bezier\|steps\)\s*(" end=")" oneline contains=cssValueInteger,cssValueNumber,cssValueLength,cssFunctionComma
|
||||
syn region cssFunction contained matchgroup=cssFunctionName start="\<\(rgba\|hsl\|hsla\|color-stop\|from\|to\)\s*(" end=")" oneline contains=cssColor,cssValueInteger,cssValueNumber,cssValueLength,cssFunctionComma,cssFunction
|
||||
syn region cssFunction contained matchgroup=cssFunctionName start="\<\(linear-\|radial-\)\=\gradient\s*(" end=")" oneline contains=cssColor,cssValueInteger,cssValueNumber,cssValueLength,cssFunction,cssGradientAttr,cssFunctionComma
|
||||
@@ -196,6 +210,9 @@ syn keyword cssAnimationAttr contained forwards backwards both
|
||||
|
||||
" animation-play-state attributes
|
||||
syn keyword cssAnimationAttr contained running paused
|
||||
|
||||
" animation-iteration-count attributes
|
||||
syn keyword cssAnimationAttr contained infinite
|
||||
"------------------------------------------------
|
||||
" CSS Backgrounds and Borders Module Level 3
|
||||
" http://www.w3.org/TR/css3-background/
|
||||
@@ -253,7 +270,7 @@ syn keyword cssDimensionProp contained width
|
||||
syn match cssFlexibleBoxProp contained "\<box-\(align\|direction\|flex\|ordinal-group\|orient\|pack\|shadow\|sizing\)\>"
|
||||
syn keyword cssFlexibleBoxAttr contained start end baseline
|
||||
syn keyword cssFlexibleBoxAttr contained reverse
|
||||
syn keyword cssFlexibleBoxAttr contained single mulitple
|
||||
syn keyword cssFlexibleBoxAttr contained single multiple
|
||||
syn keyword cssFlexibleBoxAttr contained horizontal
|
||||
syn match cssFlexibleBoxAttr contained "\<vertical\(-align\)\@!\>" "escape vertical-align
|
||||
syn match cssFlexibleBoxAttr contained "\<\(inline\|block\)-axis\>"
|
||||
@@ -261,6 +278,7 @@ syn match cssFlexibleBoxAttr contained "\<\(inline\|block\)-axis\>"
|
||||
" CSS Fonts Module Level 3
|
||||
" http://www.w3.org/TR/css-fonts-3/
|
||||
syn match cssFontProp contained "\<font\(-\(family\|\|feature-settings\|kerning\|language-override\|size\(-adjust\)\=\|stretch\|style\|synthesis\|variant\(-\(alternates\|caps\|east-asian\|ligatures\|numeric\|position\)\)\=\|weight\)\)\=\>"
|
||||
|
||||
" font attributes
|
||||
syn keyword cssFontAttr contained icon menu caption
|
||||
syn match cssFontAttr contained "\<small-\(caps\|caption\)\>"
|
||||
@@ -268,27 +286,21 @@ syn match cssFontAttr contained "\<message-box\>"
|
||||
syn match cssFontAttr contained "\<status-bar\>"
|
||||
syn keyword cssFontAttr contained larger smaller
|
||||
syn match cssFontAttr contained "\<\(x\{1,2\}-\)\=\(large\|small\)\>"
|
||||
|
||||
" font-family attributes
|
||||
syn match cssFontAttr contained "\<\(sans-\)\=serif\>"
|
||||
syn keyword cssFontAttr contained Antiqua Arial Black Book Charcoal Comic Courier Dingbats Gadget Geneva Georgia Grande Helvetica Impact Linotype Lucida MS Monaco Neue New Palatino Roboto Roman Symbol Tahoma Times Trebuchet Unicode Verdana Webdings Wingdings York Zapf
|
||||
syn keyword cssFontAttr contained Antiqua Arial Black Book Charcoal Comic Courier Dingbats Gadget Geneva Georgia Grande Helvetica Impact Linotype Lucida MS Monaco Neue New Palatino Roboto Roman Symbol Tahoma Times Trebuchet Verdana Webdings Wingdings York Zapf
|
||||
syn keyword cssFontAttr contained cursive fantasy monospace
|
||||
|
||||
" font-feature-settings attributes
|
||||
syn keyword cssFontAttr contained on off
|
||||
|
||||
" font-stretch attributes
|
||||
syn match cssFontAttr contained "\<\(\(ultra\|extra\|semi\)-\)\=\(condensed\|expanded\)\>"
|
||||
|
||||
" font-style attributes
|
||||
syn keyword cssFontAttr contained italic oblique
|
||||
|
||||
" font-variant-caps attributes
|
||||
syn match cssFontAttr contained "\<\(all-\)\=\(small-\|petite-\|titling-\)caps\>"
|
||||
syn keyword cssFontAttr contained unicase
|
||||
|
||||
" font-synthesis attributes
|
||||
syn keyword cssFontAttr contained weight style
|
||||
" font-weight attributes
|
||||
syn keyword cssFontAttr contained bold bolder lighter
|
||||
" TODO: font-variant-* attributes
|
||||
"------------------------------------------------
|
||||
|
||||
" Webkit specific property/attributes
|
||||
@@ -448,7 +460,7 @@ syn match cssMobileTextProp contained "\<text-size-adjust\>"
|
||||
|
||||
syn match cssBraces contained "[{}]"
|
||||
syn match cssError contained "{@<>"
|
||||
syn region cssDefinition transparent matchgroup=cssBraces start='{' end='}' contains=cssAttrRegion,css.*Prop,cssComment,cssValue.*,cssColor,cssURL,cssImportant,cssError,cssStringQ,cssStringQQ,cssFunction,cssUnicodeEscape,cssVendor,cssDefinition,cssHacks keepend fold
|
||||
syn region cssDefinition transparent matchgroup=cssBraces start='{' end='}' contains=cssAttrRegion,css.*Prop,cssComment,cssValue.*,cssColor,cssURL,cssImportant,cssError,cssStringQ,cssStringQQ,cssFunction,cssUnicodeEscape,cssVendor,cssDefinition,cssHacks,cssNoise fold
|
||||
syn match cssBraceError "}"
|
||||
syn match cssAttrComma ","
|
||||
|
||||
@@ -466,6 +478,9 @@ syn match cssPseudoClassId contained "\<selection\>"
|
||||
syn match cssPseudoClassId contained "\<focus\(-inner\)\=\>"
|
||||
syn match cssPseudoClassId contained "\<\(input-\)\=placeholder\>"
|
||||
|
||||
" Misc highlight groups
|
||||
syntax match cssUnitDecorators /\(#\|-\|%\|mm\|cm\|in\|pt\|pc\|em\|ex\|px\|ch\|rem\|vh\|vw\|vmin\|vmax\|dpi\|dppx\|dpcm\|Hz\|kHz\|s\|ms\|deg\|grad\|rad\)/ contained
|
||||
syntax match cssNoise contained /\(:\|;\|\/\)/
|
||||
|
||||
" Comment
|
||||
syn region cssComment start="/\*" end="\*/" contains=@Spell fold
|
||||
@@ -487,17 +502,13 @@ syn match cssVendor contained "\(-\(webkit\|moz\|o\|ms\)-\)"
|
||||
" http://www.paulirish.com/2009/browser-specific-css-hacks/
|
||||
syn match cssHacks contained /\(_\|*\)/
|
||||
|
||||
" Misc highlight groups
|
||||
syntax match cssUnitDecorators /\(#\|-\|%\|mm\|cm\|in\|pt\|pc\|em\|ex\|px\|rem\|dpi\|dppx\|dpcm\|Hz\|kHz\|s\|ms\|deg\|grad\|rad\)/ contained
|
||||
syntax match cssNoise contained /\(:\|;\|\/\)/
|
||||
|
||||
" Attr Enhance
|
||||
" Some keywords are both Prop and Attr, so we have to handle them
|
||||
syn region cssAttrRegion start=/:/ end=/;/ contained keepend contains=css.*Attr,cssColor,cssImportant,cssValue.*,cssFunction,cssString.*,cssURL,cssComment,cssUnicodeEscape,cssVendor,cssError,cssAttrComma,cssNoise
|
||||
syn region cssAttrRegion start=/:/ end=/\ze\(;\|)\|}\)/ contained contains=css.*Attr,cssColor,cssImportant,cssValue.*,cssFunction,cssString.*,cssURL,cssComment,cssUnicodeEscape,cssVendor,cssError,cssAttrComma,cssNoise
|
||||
|
||||
" Hack for transition
|
||||
" The 'transition' Prop has Props after ':'.
|
||||
syn region cssAttrRegion start=/transition\s*:/ end=/;/ contained keepend contains=css.*Prop,css.*Attr,cssColor,cssImportant,cssValue.*,cssFunction,cssString.*,cssURL,cssComment,cssUnicodeEscape,cssVendor,cssError,cssAttrComma,cssNoise
|
||||
" 'transition' has Props after ':'.
|
||||
syn region cssAttrRegion start=/transition\s*:/ end=/\ze\(;\|)\|}\)/ contained contains=css.*Prop,css.*Attr,cssColor,cssImportant,cssValue.*,cssFunction,cssString.*,cssURL,cssComment,cssUnicodeEscape,cssVendor,cssError,cssAttrComma,cssNoise
|
||||
|
||||
|
||||
if main_syntax == "css"
|
||||
@@ -635,7 +646,7 @@ if version >= 508 || !exists("did_css_syn_inits")
|
||||
HiLink cssAttr Constant
|
||||
HiLink cssUnitDecorators Number
|
||||
HiLink cssNoise Noise
|
||||
HiLink atKeyword Comment
|
||||
HiLink atKeyword PreProc
|
||||
delcommand HiLink
|
||||
endif
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
" Maintainer: Debian Vim Maintainers <pkg-vim-maintainers@lists.alioth.debian.org>
|
||||
" Former Maintainers: Gerfried Fuchs <alfie@ist.org>
|
||||
" Wichert Akkerman <wakkerma@debian.org>
|
||||
" Last Change: 2014 Jul 11
|
||||
" Last Change: 2015 Apr 30
|
||||
" URL: http://anonscm.debian.org/hg/pkg-vim/vim/raw-file/unstable/runtime/syntax/debchangelog.vim
|
||||
|
||||
" Standard syntax initialization
|
||||
@@ -16,10 +16,14 @@ endif
|
||||
" Case doesn't matter for us
|
||||
syn case ignore
|
||||
|
||||
let urgency='urgency=\(low\|medium\|high\|critical\)\( [^[:space:],][^,]*\)\='
|
||||
let binNMU='binary-only=yes'
|
||||
|
||||
" Define some common expressions we can use later on
|
||||
syn match debchangelogName contained "^[[:alnum:]][[:alnum:].+-]\+ "
|
||||
syn match debchangelogUrgency contained "; urgency=\(low\|medium\|high\|critical\|emergency\)\( \S.*\)\="
|
||||
syn match debchangelogTarget contained "\v %(frozen|unstable|%(testing|%(old)=stable)%(-proposed-updates|-security)=|experimental|squeeze-%(backports%(-sloppy)=|volatile)|wheezy-backports|%(devel|lucid|precise|trusty|utopic)%(-%(security|proposed|updates|backports|commercial|partner))=)+"
|
||||
exe 'syn match debchangelogFirstKV contained "; \('.urgency.'\|'.binNMU.'\)"'
|
||||
exe 'syn match debchangelogOtherKV contained ", \('.urgency.'\|'.binNMU.'\)"'
|
||||
syn match debchangelogTarget contained "\v %(frozen|unstable|sid|%(testing|%(old)=stable)%(-proposed-updates|-security)=|experimental|squeeze-%(backports%(-sloppy)=|volatile|lts|security)|wheezy-%(backports%(-sloppy)=|security)|jessie%(-backports|-security)=|stretch|%(devel|lucid|precise|trusty|utopic)%(-%(security|proposed|updates|backports|commercial|partner))=)+"
|
||||
syn match debchangelogVersion contained "(.\{-})"
|
||||
syn match debchangelogCloses contained "closes:\_s*\(bug\)\=#\=\_s\=\d\+\(,\_s*\(bug\)\=#\=\_s\=\d\+\)*"
|
||||
syn match debchangelogLP contained "\clp:\s\+#\d\+\(,\s*#\d\+\)*"
|
||||
@@ -27,7 +31,7 @@ syn match debchangelogEmail contained "[_=[:alnum:].+-]\+@[[:alnum:]./\-]\+"
|
||||
syn match debchangelogEmail contained "<.\{-}>"
|
||||
|
||||
" Define the entries that make up the changelog
|
||||
syn region debchangelogHeader start="^[^ ]" end="$" contains=debchangelogName,debchangelogUrgency,debchangelogTarget,debchangelogVersion oneline
|
||||
syn region debchangelogHeader start="^[^ ]" end="$" contains=debchangelogName,debchangelogFirstKV,debchangelogOtherKV,debchangelogTarget,debchangelogVersion,debchangelogBinNMU oneline
|
||||
syn region debchangelogFooter start="^ [^ ]" end="$" contains=debchangelogEmail oneline
|
||||
syn region debchangelogEntry start="^ " end="$" contains=debchangelogCloses,debchangelogLP oneline
|
||||
|
||||
@@ -45,7 +49,8 @@ if version >= 508 || !exists("did_debchangelog_syn_inits")
|
||||
HiLink debchangelogEntry Normal
|
||||
HiLink debchangelogCloses Statement
|
||||
HiLink debchangelogLP Statement
|
||||
HiLink debchangelogUrgency Identifier
|
||||
HiLink debchangelogFirstKV Identifier
|
||||
HiLink debchangelogOtherKV Identifier
|
||||
HiLink debchangelogName Comment
|
||||
HiLink debchangelogVersion Identifier
|
||||
HiLink debchangelogTarget Identifier
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
" Maintainer: Debian Vim Maintainers <pkg-vim-maintainers@lists.alioth.debian.org>
|
||||
" Former Maintainers: Gerfried Fuchs <alfie@ist.org>
|
||||
" Wichert Akkerman <wakkerma@debian.org>
|
||||
" Last Change: 2014 May 01
|
||||
" Last Change: 2014 Oct 08
|
||||
" URL: http://anonscm.debian.org/hg/pkg-vim/vim/raw-file/unstable/runtime/syntax/debcontrol.vim
|
||||
|
||||
" Standard syntax initialization
|
||||
@@ -50,7 +50,7 @@ syn match debcontrolDmUpload contained "\cyes"
|
||||
syn match debcontrolHTTPUrl contained "\vhttps?://[[:alnum:]][-[:alnum:]]*[[:alnum:]]?(\.[[:alnum:]][-[:alnum:]]*[[:alnum:]]?)*\.[[:alpha:]][-[:alnum:]]*[[:alpha:]]?(:\d+)?(/[^[:space:]]*)?$"
|
||||
syn match debcontrolVcsSvn contained "\vsvn%(\+ssh)?://[[:alnum:]][-[:alnum:]]*[[:alnum:]]?(\.[[:alnum:]][-[:alnum:]]*[[:alnum:]]?)*\.[[:alpha:]][-[:alnum:]]*[[:alpha:]]?(:\d+)?(/[^[:space:]]*)?$"
|
||||
syn match debcontrolVcsCvs contained "\v%(\-d *)?:pserver:[^@]+\@[[:alnum:]][-[:alnum:]]*[[:alnum:]]?(\.[[:alnum:]][-[:alnum:]]*[[:alnum:]]?)*\.[[:alpha:]][-[:alnum:]]*[[:alpha:]]?:/[^[:space:]]*%( [^[:space:]]+)?$"
|
||||
syn match debcontrolVcsGit contained "\v%(git|http)://[[:alnum:]][-[:alnum:]]*[[:alnum:]]?(\.[[:alnum:]][-[:alnum:]]*[[:alnum:]]?)*\.[[:alpha:]][-[:alnum:]]*[[:alpha:]]?(:\d+)?(/[^[:space:]]*)?%(\s+-b\s+[^ ~^:?*[\\]+)?$"
|
||||
syn match debcontrolVcsGit contained "\v%(git|https?)://[[:alnum:]][-[:alnum:]]*[[:alnum:]]?(\.[[:alnum:]][-[:alnum:]]*[[:alnum:]]?)*\.[[:alpha:]][-[:alnum:]]*[[:alpha:]]?(:\d+)?(/[^[:space:]]*)?%(\s+-b\s+[^ ~^:?*[\\]+)?$"
|
||||
|
||||
" An email address
|
||||
syn match debcontrolEmail "[_=[:alnum:]\.+-]\+@[[:alnum:]\./\-]\+"
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
" Language: Debian sources.list
|
||||
" Maintainer: Debian Vim Maintainers <pkg-vim-maintainers@lists.alioth.debian.org>
|
||||
" Former Maintainer: Matthijs Mohlmann <matthijs@cacholong.nl>
|
||||
" Last Change: 2014 Jul 11
|
||||
" Last Change: 2015 May 25
|
||||
" URL: http://anonscm.debian.org/hg/pkg-vim/vim/raw-file/unstable/runtime/syntax/debsources.vim
|
||||
|
||||
" Standard syntax initialization
|
||||
@@ -21,15 +21,35 @@ syn match debsourcesKeyword /\(deb-src\|deb\|main\|contrib\|non-free\|res
|
||||
" Match comments
|
||||
syn match debsourcesComment /#.*/ contains=@Spell
|
||||
|
||||
let s:cpo = &cpo
|
||||
set cpo-=C
|
||||
let s:supported = [
|
||||
\ 'oldstable', 'stable', 'testing', 'unstable', 'experimental',
|
||||
\ 'squeeze', 'wheezy', 'jessie', 'stretch', 'sid', 'rc-buggy',
|
||||
\
|
||||
\ 'precise', 'trusty', 'utopic', 'vivid', 'wily', 'devel'
|
||||
\ ]
|
||||
let s:unsupported = [
|
||||
\ 'buzz', 'rex', 'bo', 'hamm', 'slink', 'potato',
|
||||
\ 'woody', 'sarge', 'etch', 'lenny',
|
||||
\
|
||||
\ 'warty', 'hoary', 'breezy', 'dapper', 'edgy', 'feisty',
|
||||
\ 'gutsy', 'hardy', 'intrepid', 'jaunty', 'karmic', 'lucid',
|
||||
\ 'maverick', 'natty', 'oneiric', 'quantal', 'raring', 'saucy'
|
||||
\ ]
|
||||
let &cpo=s:cpo
|
||||
|
||||
" Match uri's
|
||||
syn match debsourcesUri +\(http://\|ftp://\|[rs]sh://\|debtorrent://\|\(cdrom\|copy\|file\):\)[^' <>"]\++
|
||||
syn match debsourcesDistrKeyword +\([[:alnum:]_./]*\)\(squeeze\|wheezy\|jessie\|\(old\)\=stable\|testing\|unstable\|sid\|rc-buggy\|experimental\|devel\|lucid\|precise\|trusty\|utopic\)\([-[:alnum:]_./]*\)+
|
||||
exe 'syn match debsourcesDistrKeyword +\([[:alnum:]_./]*\)\('. join(s:supported, '\|'). '\)\([-[:alnum:]_./]*\)+'
|
||||
exe 'syn match debsourcesUnsupportedDistrKeyword +\([[:alnum:]_./]*\)\('. join(s:unsupported, '\|') .'\)\([-[:alnum:]_./]*\)+'
|
||||
|
||||
" Associate our matches and regions with pretty colours
|
||||
hi def link debsourcesLine Error
|
||||
hi def link debsourcesKeyword Statement
|
||||
hi def link debsourcesDistrKeyword Type
|
||||
hi def link debsourcesComment Comment
|
||||
hi def link debsourcesUri Constant
|
||||
hi def link debsourcesLine Error
|
||||
hi def link debsourcesKeyword Statement
|
||||
hi def link debsourcesDistrKeyword Type
|
||||
hi def link debsourcesUnsupportedDistrKeyword WarningMsg
|
||||
hi def link debsourcesComment Comment
|
||||
hi def link debsourcesUri Constant
|
||||
|
||||
let b:current_syntax = "debsources"
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
" Language: Groovy
|
||||
" Original Author: Alessio Pace <billy.corgan@tiscali.it>
|
||||
" Maintainer: Tobias Rapp <yahuxo@gmx.de>
|
||||
" Version: 0.1.13
|
||||
" Version: 0.1.14
|
||||
" URL: http://www.vim.org/scripts/script.php?script_id=945
|
||||
" Last Change: 2013 Apr 24
|
||||
" Last Change: 2015 Apr 21
|
||||
|
||||
" THE ORIGINAL AUTHOR'S NOTES:
|
||||
"
|
||||
@@ -157,7 +157,7 @@ syn match groovyOperator "\.\."
|
||||
syn match groovyOperator "<\{2,3}"
|
||||
syn match groovyOperator ">\{2,3}"
|
||||
syn match groovyOperator "->"
|
||||
syn match groovyExternal '^#!.*[/\\]groovy\>'
|
||||
syn match groovyLineComment '^\%1l#!.*' " Shebang line
|
||||
syn match groovyExceptions "\<Exception\>\|\<[A-Z]\{1,}[a-zA-Z0-9]*Exception\>"
|
||||
|
||||
" Groovy JDK stuff
|
||||
@@ -220,7 +220,6 @@ syn region groovyComment start="/\*" end="\*/" contains=@groovyCommen
|
||||
syn match groovyCommentStar contained "^\s*\*[^/]"me=e-1
|
||||
syn match groovyCommentStar contained "^\s*\*$"
|
||||
syn match groovyLineComment "//.*" contains=@groovyCommentSpecial2,groovyTodo,@Spell
|
||||
syn match groovyLineComment "#.*" contains=@groovyCommentSpecial2,groovyTodo,@Spell
|
||||
GroovyHiLink groovyCommentString groovyString
|
||||
GroovyHiLink groovyComment2String groovyString
|
||||
GroovyHiLink groovyCommentCharacter groovyCharacter
|
||||
|
||||
@@ -1,7 +1,29 @@
|
||||
" Vim syntax file
|
||||
" Language: Intel hex MCS51
|
||||
" Maintainer: Sams Ricahrd <sams@ping.at>
|
||||
" Last Change: 2003 Apr 25
|
||||
" Language: Intel HEX
|
||||
" Maintainer: Markus Heidelberg <markus.heidelberg@web.de>
|
||||
" Previous version: Sams Ricahrd <sams@ping.at>
|
||||
" Last Change: 2015 Feb 24
|
||||
|
||||
" Each record (line) is built as follows:
|
||||
"
|
||||
" field digits states
|
||||
"
|
||||
" +----------+
|
||||
" | start | 1 (':') hexRecStart
|
||||
" +----------+
|
||||
" | count | 2 hexDataByteCount
|
||||
" +----------+
|
||||
" | address | 4 hexNoAddress, hexDataAddress, (hexAddressFieldUnknown)
|
||||
" +----------+
|
||||
" | type | 2 hexRecType, (hexRecTypeUnknown)
|
||||
" +----------+
|
||||
" | data | 0..510 hexDataOdd, hexDataEven, hexExtendedAddress, hexStartAddress, (hexDataFieldUnknown, hexDataUnexpected)
|
||||
" +----------+
|
||||
" | checksum | 2 hexChecksum
|
||||
" +----------+
|
||||
"
|
||||
" States in parentheses in the upper format description indicate that they
|
||||
" should not appear in a valid file.
|
||||
|
||||
" For version 5.x: Clear all syntax items
|
||||
" For version 6.x: Quit when a syntax file was already loaded
|
||||
@@ -11,21 +33,39 @@ elseif exists("b:current_syntax")
|
||||
finish
|
||||
endif
|
||||
|
||||
syn case ignore
|
||||
syn match hexRecStart "^:"
|
||||
|
||||
" storage types
|
||||
syn match hexDataByteCount "^:[0-9a-fA-F]\{2}" contains=hexRecStart nextgroup=hexAddress
|
||||
|
||||
syn match hexChecksum "[0-9a-fA-F]\{2}$"
|
||||
syn match hexAdress "^:[0-9a-fA-F]\{6}" contains=hexDataByteCount
|
||||
syn match hexRecType "^:[0-9a-fA-F]\{8}" contains=hexAdress
|
||||
syn match hexDataByteCount contained "^:[0-9a-fA-F]\{2}" contains=hexStart
|
||||
syn match hexStart contained "^:"
|
||||
syn match hexExtAdrRec "^:02000002[0-9a-fA-F]\{4}" contains=hexSpecRec
|
||||
syn match hexExtLinAdrRec "^:02000004[0-9a-fA-F]\{4}" contains=hexSpecRec
|
||||
syn match hexSpecRec contained "^:0[02]00000[124]" contains=hexStart
|
||||
syn match hexEOF "^:00000001" contains=hexStart
|
||||
syn match hexAddress "[0-9a-fA-F]\{4}" transparent contained nextgroup=hexRecTypeUnknown,hexRecType
|
||||
" The address field groups include the record type field in the last 2
|
||||
" characters, the proper match for highlighting follows below.
|
||||
syn match hexAddressFieldUnknown "^:[0-9a-fA-F]\{8}" contains=hexDataByteCount nextgroup=hexDataFieldUnknown,hexChecksum
|
||||
syn match hexDataAddress "^:[0-9a-fA-F]\{6}00" contains=hexDataByteCount nextgroup=hexDataOdd,hexChecksum
|
||||
syn match hexNoAddress "^:[0-9a-fA-F]\{6}01" contains=hexDataByteCount nextgroup=hexDataUnexpected,hexChecksum
|
||||
syn match hexNoAddress "^:[0-9a-fA-F]\{6}0[24]" contains=hexDataByteCount nextgroup=hexExtendedAddress
|
||||
syn match hexNoAddress "^:[0-9a-fA-F]\{6}0[35]" contains=hexDataByteCount nextgroup=hexStartAddress
|
||||
|
||||
syn case match
|
||||
syn match hexRecTypeUnknown "[0-9a-fA-F]\{2}" contained
|
||||
syn match hexRecType "0[0-5]" contained
|
||||
|
||||
syn match hexDataFieldUnknown "[0-9a-fA-F]\{2}" contained nextgroup=hexDataFieldUnknown,hexChecksum
|
||||
" alternating highlight per byte for easier reading
|
||||
syn match hexDataOdd "[0-9a-fA-F]\{2}" contained nextgroup=hexDataEven,hexChecksum
|
||||
syn match hexDataEven "[0-9a-fA-F]\{2}" contained nextgroup=hexDataOdd,hexChecksum
|
||||
" data bytes which should not exist
|
||||
syn match hexDataUnexpected "[0-9a-fA-F]\{2}" contained nextgroup=hexDataUnexpected,hexChecksum
|
||||
" Data digit pair regex usage also results in only highlighting the checksum
|
||||
" if the number of data characters is even.
|
||||
|
||||
" special data fields
|
||||
syn match hexExtendedAddress "[0-9a-fA-F]\{4}" contained nextgroup=hexDataUnexpected,hexChecksum
|
||||
syn match hexStartAddress "[0-9a-fA-F]\{8}" contained nextgroup=hexDataUnexpected,hexChecksum
|
||||
|
||||
syn match hexChecksum "[0-9a-fA-F]\{2}$" contained
|
||||
|
||||
" Folding Data Records below an Extended Segment/Linear Address Record
|
||||
syn region hexExtAdrBlock start="^:[0-9a-fA-F]\{7}[24]" skip="^:[0-9a-fA-F]\{7}0" end="^:"me=s-1 fold transparent
|
||||
|
||||
" Define the default highlighting.
|
||||
" For version 5.7 and earlier: only when not done already
|
||||
@@ -38,16 +78,21 @@ if version >= 508 || !exists("did_hex_syntax_inits")
|
||||
command -nargs=+ HiLink hi def link <args>
|
||||
endif
|
||||
|
||||
" The default methods for highlighting. Can be overridden later
|
||||
HiLink hexStart SpecialKey
|
||||
HiLink hexDataByteCount Constant
|
||||
HiLink hexAdress Comment
|
||||
HiLink hexRecType WarningMsg
|
||||
HiLink hexChecksum Search
|
||||
HiLink hexExtAdrRec hexAdress
|
||||
HiLink hexEOF hexSpecRec
|
||||
HiLink hexExtLinAdrRec hexAdress
|
||||
HiLink hexSpecRec DiffAdd
|
||||
" The default methods for highlighting. Can be overridden later
|
||||
HiLink hexRecStart hexRecType
|
||||
HiLink hexDataByteCount Constant
|
||||
hi def hexAddressFieldUnknown term=italic cterm=italic gui=italic
|
||||
HiLink hexDataAddress Comment
|
||||
HiLink hexNoAddress DiffAdd
|
||||
HiLink hexRecTypeUnknown hexRecType
|
||||
HiLink hexRecType WarningMsg
|
||||
hi def hexDataFieldUnknown term=italic cterm=italic gui=italic
|
||||
hi def hexDataOdd term=bold cterm=bold gui=bold
|
||||
hi def hexDataEven term=NONE cterm=NONE gui=NONE
|
||||
HiLink hexDataUnexpected Error
|
||||
HiLink hexExtendedAddress hexDataAddress
|
||||
HiLink hexStartAddress hexDataAddress
|
||||
HiLink hexChecksum DiffChange
|
||||
|
||||
delcommand HiLink
|
||||
endif
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
" Language: Java
|
||||
" Maintainer: Claudio Fleiner <claudio@fleiner.com>
|
||||
" URL: http://www.fleiner.com/vim/syntax/java.vim
|
||||
" Last Change: 2012 Oct 05
|
||||
" Last Change: 2015 March 01
|
||||
|
||||
" Please check :help java.vim for comments on some of the options available.
|
||||
|
||||
@@ -30,7 +30,7 @@ endif
|
||||
|
||||
" some characters that cannot be in a java program (outside a string)
|
||||
syn match javaError "[\\@`]"
|
||||
syn match javaError "<<<\|\.\.\|=>\|||=\|&&=\|[^-]->\|\*\/"
|
||||
syn match javaError "<<<\|\.\.\|=>\|||=\|&&=\|\*\/"
|
||||
|
||||
syn match javaOK "\.\.\."
|
||||
|
||||
@@ -63,7 +63,7 @@ syn match javaTypedef "\.\s*\<class\>"ms=s+1
|
||||
syn keyword javaClassDecl enum
|
||||
syn match javaClassDecl "^class\>"
|
||||
syn match javaClassDecl "[^.]\s*\<class\>"ms=s+1
|
||||
syn match javaAnnotation "@\([_$a-zA-Z][_$a-zA-Z0-9]*\.\)*[_$a-zA-Z][_$a-zA-Z0-9]*\>"
|
||||
syn match javaAnnotation "@\([_$a-zA-Z][_$a-zA-Z0-9]*\.\)*[_$a-zA-Z][_$a-zA-Z0-9]*\>\(([^)]*)\)\=" contains=javaString
|
||||
syn match javaClassDecl "@interface\>"
|
||||
syn keyword javaBranch break continue nextgroup=javaUserLabelRef skipwhite
|
||||
syn match javaUserLabelRef "\k\+" contained
|
||||
@@ -121,7 +121,7 @@ if exists("java_space_errors")
|
||||
endif
|
||||
endif
|
||||
|
||||
syn region javaLabelRegion transparent matchgroup=javaLabel start="\<case\>" matchgroup=NONE end=":" contains=javaNumber,javaCharacter
|
||||
syn region javaLabelRegion transparent matchgroup=javaLabel start="\<case\>" matchgroup=NONE end=":" contains=javaNumber,javaCharacter,javaString
|
||||
syn match javaUserLabel "^\s*[_$a-zA-Z][_$a-zA-Z0-9_]*\s*:"he=e-1 contains=javaLabel
|
||||
syn keyword javaLabel default
|
||||
|
||||
@@ -188,10 +188,10 @@ syn region javaString start=+"+ end=+"+ end=+$+ contains=javaSpecialChar,javaS
|
||||
syn match javaCharacter "'[^']*'" contains=javaSpecialChar,javaSpecialCharError
|
||||
syn match javaCharacter "'\\''" contains=javaSpecialChar
|
||||
syn match javaCharacter "'[^\\]'"
|
||||
syn match javaNumber "\<\(0[0-7]*\|0[xX]\x\+\|\d\+\)[lL]\=\>"
|
||||
syn match javaNumber "\(\<\d\+\.\d*\|\.\d\+\)\([eE][-+]\=\d\+\)\=[fFdD]\="
|
||||
syn match javaNumber "\<\d\+[eE][-+]\=\d\+[fFdD]\=\>"
|
||||
syn match javaNumber "\<\d\+\([eE][-+]\=\d\+\)\=[fFdD]\>"
|
||||
syn match javaNumber "\<\(0[bB][0-1]\+\|0[0-7]*\|0[xX]\x\+\|\d\(\d\|_\d\)*\)[lL]\=\>"
|
||||
syn match javaNumber "\(\<\d\(\d\|_\d\)*\.\(\d\(\d\|_\d\)*\)\=\|\.\d\(\d\|_\d\)*\)\([eE][-+]\=\d\(\d\|_\d\)*\)\=[fFdD]\="
|
||||
syn match javaNumber "\<\d\(\d\|_\d\)*[eE][-+]\=\d\(\d\|_\d\)*[fFdD]\=\>"
|
||||
syn match javaNumber "\<\d\(\d\|_\d\)*\([eE][-+]\=\d\(\d\|_\d\)*\)\=[fFdD]\>"
|
||||
|
||||
" unicode characters
|
||||
syn match javaSpecial "\\u\d\{4\}"
|
||||
@@ -200,19 +200,21 @@ syn cluster javaTop add=javaString,javaCharacter,javaNumber,javaSpecial,javaStri
|
||||
|
||||
if exists("java_highlight_functions")
|
||||
if java_highlight_functions == "indent"
|
||||
syn match javaFuncDef "^\(\t\| \{8\}\)[_$a-zA-Z][_$a-zA-Z0-9_. \[\]]*([^-+*/()]*)" contains=javaScopeDecl,javaType,javaStorageClass,@javaClasses
|
||||
syn region javaFuncDef start=+^\(\t\| \{8\}\)[$_a-zA-Z][$_a-zA-Z0-9_. \[\]]*([^-+*/()]*,\s*+ end=+)+ contains=javaScopeDecl,javaType,javaStorageClass,@javaClasses
|
||||
syn match javaFuncDef "^ [$_a-zA-Z][$_a-zA-Z0-9_. \[\]]*([^-+*/()]*)" contains=javaScopeDecl,javaType,javaStorageClass,@javaClasses
|
||||
syn region javaFuncDef start=+^ [$_a-zA-Z][$_a-zA-Z0-9_. \[\]]*([^-+*/()]*,\s*+ end=+)+ contains=javaScopeDecl,javaType,javaStorageClass,@javaClasses
|
||||
syn match javaFuncDef "^\(\t\| \{8\}\)[_$a-zA-Z][_$a-zA-Z0-9_. \[\]<>]*([^-+*/]*)" contains=javaScopeDecl,javaType,javaStorageClass,@javaClasses,javaAnnotation
|
||||
syn region javaFuncDef start=+^\(\t\| \{8\}\)[$_a-zA-Z][$_a-zA-Z0-9_. \[\]<>]*([^-+*/]*,\s*+ end=+)+ contains=javaScopeDecl,javaType,javaStorageClass,@javaClasses,javaAnnotation
|
||||
syn match javaFuncDef "^ [$_a-zA-Z][$_a-zA-Z0-9_. \[\]<>]*([^-+*/]*)" contains=javaScopeDecl,javaType,javaStorageClass,@javaClasses,javaAnnotation
|
||||
syn region javaFuncDef start=+^ [$_a-zA-Z][$_a-zA-Z0-9_. \[\]<>]*([^-+*/]*,\s*+ end=+)+ contains=javaScopeDecl,javaType,javaStorageClass,@javaClasses,javaAnnotation
|
||||
else
|
||||
" This line catches method declarations at any indentation>0, but it assumes
|
||||
" two things:
|
||||
" 1. class names are always capitalized (ie: Button)
|
||||
" 2. method names are never capitalized (except constructors, of course)
|
||||
syn region javaFuncDef start=+^\s\+\(\(public\|protected\|private\|static\|abstract\|final\|native\|synchronized\)\s\+\)*\(\(void\|boolean\|char\|byte\|short\|int\|long\|float\|double\|\([A-Za-z_][A-Za-z0-9_$]*\.\)*[A-Z][A-Za-z0-9_$]*\)\(<[^>]*>\)\=\(\[\]\)*\s\+[a-z][A-Za-z0-9_$]*\|[A-Z][A-Za-z0-9_$]*\)\s*([^0-9]+ end=+)+ contains=javaScopeDecl,javaType,javaStorageClass,javaComment,javaLineComment,@javaClasses
|
||||
"syn region javaFuncDef start=+^\s\+\(\(public\|protected\|private\|static\|abstract\|final\|native\|synchronized\)\s\+\)*\(\(void\|boolean\|char\|byte\|short\|int\|long\|float\|double\|\([A-Za-z_][A-Za-z0-9_$]*\.\)*[A-Z][A-Za-z0-9_$]*\)\(<[^>]*>\)\=\(\[\]\)*\s\+[a-z][A-Za-z0-9_$]*\|[A-Z][A-Za-z0-9_$]*\)\s*([^0-9]+ end=+)+ contains=javaScopeDecl,javaType,javaStorageClass,javaComment,javaLineComment,@javaClasses
|
||||
syn region javaFuncDef start=+^\s\+\(\(public\|protected\|private\|static\|abstract\|final\|native\|synchronized\)\s\+\)*\(<.*>\s\+\)\?\(\(void\|boolean\|char\|byte\|short\|int\|long\|float\|double\|\([A-Za-z_][A-Za-z0-9_$]*\.\)*[A-Z][A-Za-z0-9_$]*\)\(<[^(){}]*>\)\=\(\[\]\)*\s\+[a-z][A-Za-z0-9_$]*\|[A-Z][A-Za-z0-9_$]*\)\s*(+ end=+)+ contains=javaScopeDecl,javaType,javaStorageClass,javaComment,javaLineComment,@javaClasses,javaAnnotation
|
||||
endif
|
||||
syn match javaLambdaDef "[a-zA-Z_][a-zA-Z0-9_]*\s*->"
|
||||
syn match javaBraces "[{}]"
|
||||
syn cluster javaTop add=javaFuncDef,javaBraces
|
||||
syn cluster javaTop add=javaFuncDef,javaBraces,javaLambdaDef
|
||||
endif
|
||||
|
||||
if exists("java_highlight_debug")
|
||||
@@ -266,18 +268,23 @@ if exists("java_mark_braces_in_parens_as_errors")
|
||||
endif
|
||||
|
||||
" catch errors caused by wrong parenthesis
|
||||
syn region javaParenT transparent matchgroup=javaParen start="(" end=")" contains=@javaTop,javaParenT1
|
||||
syn region javaParenT transparent matchgroup=javaParen start="(" end=")" contains=@javaTop,javaParenT1
|
||||
syn region javaParenT1 transparent matchgroup=javaParen1 start="(" end=")" contains=@javaTop,javaParenT2 contained
|
||||
syn region javaParenT2 transparent matchgroup=javaParen2 start="(" end=")" contains=@javaTop,javaParenT contained
|
||||
syn match javaParenError ")"
|
||||
" catch errors caused by wrong square parenthesis
|
||||
syn region javaParenT transparent matchgroup=javaParen start="\[" end="\]" contains=@javaTop,javaParenT1
|
||||
syn region javaParenT transparent matchgroup=javaParen start="\[" end="\]" contains=@javaTop,javaParenT1
|
||||
syn region javaParenT1 transparent matchgroup=javaParen1 start="\[" end="\]" contains=@javaTop,javaParenT2 contained
|
||||
syn region javaParenT2 transparent matchgroup=javaParen2 start="\[" end="\]" contains=@javaTop,javaParenT contained
|
||||
syn match javaParenError "\]"
|
||||
|
||||
JavaHiLink javaParenError javaError
|
||||
|
||||
if exists("java_highlight_functions")
|
||||
syn match javaLambdaDef "([a-zA-Z0-9_<>\[\], \t]*)\s*->"
|
||||
" needs to be defined after the parenthesis error catcher to work
|
||||
endif
|
||||
|
||||
if !exists("java_minlines")
|
||||
let java_minlines = 10
|
||||
endif
|
||||
@@ -288,6 +295,7 @@ if version >= 508 || !exists("did_java_syn_inits")
|
||||
if version < 508
|
||||
let did_java_syn_inits = 1
|
||||
endif
|
||||
JavaHiLink javaLambdaDef Function
|
||||
JavaHiLink javaFuncDef Function
|
||||
JavaHiLink javaVarArg Function
|
||||
JavaHiLink javaBraces Function
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
" Vim syntax file
|
||||
" Maintainer: Nikolai Weibull <now@bitwi.se>
|
||||
" Latest Revision: 2009-05-25
|
||||
" Maintainer: Christian Brabandt <cb@256bit.org>
|
||||
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
|
||||
" Latest Revision: 2015-05-29
|
||||
" License: Vim (see :h license)
|
||||
" Repository: https://github.com/chrisbra/vim-kconfig
|
||||
|
||||
if exists("b:current_syntax")
|
||||
finish
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
" Language: Makefile
|
||||
" Maintainer: Claudio Fleiner <claudio@fleiner.com>
|
||||
" URL: http://www.fleiner.com/vim/syntax/make.vim
|
||||
" Last Change: 2012 Oct 05
|
||||
" Last Change: 2015 Feb 28
|
||||
|
||||
" For version 5.x: Clear all syntax items
|
||||
" For version 6.x: Quit when a syntax file was already loaded
|
||||
@@ -43,8 +43,8 @@ syn region makeIdent start="\$(" skip="\\)\|\\\\" end=")" contains=makeStatement
|
||||
syn region makeIdent start="\${" skip="\\}\|\\\\" end="}" contains=makeStatement,makeIdent,makeSString,makeDString
|
||||
syn match makeIdent "\$\$\w*"
|
||||
syn match makeIdent "\$[^({]"
|
||||
syn match makeIdent "^ *\a\w*\s*[:+?!*]="me=e-2
|
||||
syn match makeIdent "^ *\a\w*\s*="me=e-1
|
||||
syn match makeIdent "^ *[^:#= \t]*\s*[:+?!*]="me=e-2
|
||||
syn match makeIdent "^ *[^:#= \t]*\s*="me=e-1
|
||||
syn match makeIdent "%"
|
||||
|
||||
" Makefile.in variables
|
||||
@@ -55,11 +55,11 @@ syn match makeConfig "@[A-Za-z0-9_]\+@"
|
||||
syn match makeImplicit "^\.[A-Za-z0-9_./\t -]\+\s*:$"me=e-1 nextgroup=makeSource
|
||||
syn match makeImplicit "^\.[A-Za-z0-9_./\t -]\+\s*:[^=]"me=e-2 nextgroup=makeSource
|
||||
|
||||
syn region makeTarget transparent matchgroup=makeTarget start="^[A-Za-z0-9_./$()%-][A-Za-z0-9_./\t $()%-]*:\{1,2}[^:=]"rs=e-1 end=";"re=e-1,me=e-1 end="[^\\]$" keepend contains=makeIdent,makeSpecTarget,makeNextLine skipnl nextGroup=makeCommands
|
||||
syn match makeTarget "^[A-Za-z0-9_./$()%*@-][A-Za-z0-9_./\t $()%*@-]*::\=\s*$" contains=makeIdent,makeSpecTarget skipnl nextgroup=makeCommands,makeCommandError
|
||||
syn region makeTarget transparent matchgroup=makeTarget start="^[~A-Za-z0-9_./$()%-][A-Za-z0-9_./\t $()%-]*:\{1,2}[^:=]"rs=e-1 end=";"re=e-1,me=e-1 end="[^\\]$" keepend contains=makeIdent,makeSpecTarget,makeNextLine,makeComment skipnl nextGroup=makeCommands
|
||||
syn match makeTarget "^[~A-Za-z0-9_./$()%*@-][A-Za-z0-9_./\t $()%*@-]*::\=\s*$" contains=makeIdent,makeSpecTarget,makeComment skipnl nextgroup=makeCommands,makeCommandError
|
||||
|
||||
syn region makeSpecTarget transparent matchgroup=makeSpecTarget start="^\.\(SUFFIXES\|PHONY\|DEFAULT\|PRECIOUS\|IGNORE\|SILENT\|EXPORT_ALL_VARIABLES\|KEEP_STATE\|LIBPATTERNS\|NOTPARALLEL\|DELETE_ON_ERROR\|INTERMEDIATE\|POSIX\|SECONDARY\)\>\s*:\{1,2}[^:=]"rs=e-1 end="[^\\]$" keepend contains=makeIdent,makeSpecTarget,makeNextLine skipnl nextGroup=makeCommands
|
||||
syn match makeSpecTarget "^\.\(SUFFIXES\|PHONY\|DEFAULT\|PRECIOUS\|IGNORE\|SILENT\|EXPORT_ALL_VARIABLES\|KEEP_STATE\|LIBPATTERNS\|NOTPARALLEL\|DELETE_ON_ERROR\|INTERMEDIATE\|POSIX\|SECONDARY\)\>\s*::\=\s*$" contains=makeIdent skipnl nextgroup=makeCommands,makeCommandError
|
||||
syn region makeSpecTarget transparent matchgroup=makeSpecTarget start="^\.\(SUFFIXES\|PHONY\|DEFAULT\|PRECIOUS\|IGNORE\|SILENT\|EXPORT_ALL_VARIABLES\|KEEP_STATE\|LIBPATTERNS\|NOTPARALLEL\|DELETE_ON_ERROR\|INTERMEDIATE\|POSIX\|SECONDARY\)\>\s*:\{1,2}[^:=]"rs=e-1 end="[^\\]$" keepend contains=makeIdent,makeSpecTarget,makeNextLine,makeComment skipnl nextGroup=makeCommands
|
||||
syn match makeSpecTarget "^\.\(SUFFIXES\|PHONY\|DEFAULT\|PRECIOUS\|IGNORE\|SILENT\|EXPORT_ALL_VARIABLES\|KEEP_STATE\|LIBPATTERNS\|NOTPARALLEL\|DELETE_ON_ERROR\|INTERMEDIATE\|POSIX\|SECONDARY\)\>\s*::\=\s*$" contains=makeIdent,makeComment skipnl nextgroup=makeCommands,makeCommandError
|
||||
|
||||
syn match makeCommandError "^\s\+\S.*" contained
|
||||
syn region makeCommands start=";"hs=s+1 start="^\t" end="^[^\t#]"me=e-1,re=e-1 end="^$" contained contains=makeCmdNextLine,makeSpecial,makeComment,makeIdent,makePreCondit,makeDefine,makeDString,makeSString nextgroup=makeCommandError
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
" Vim syntax file
|
||||
" Language: Postfix main.cf configuration
|
||||
" Maintainer: KELEMEN Peter <Peter dot Kelemen at cern dot ch>
|
||||
" Last Update: Hong Xu
|
||||
" Last Change: 2011 May 14
|
||||
" Last Updates: Anton Shestakov, Hong Xu
|
||||
" Last Change: 2015 Feb 10
|
||||
" Version: 0.40
|
||||
" URL: http://cern.ch/fuji/vim/syntax/pfmain.vim
|
||||
" Comment: Based on Postfix 2.9 defaults.
|
||||
" Comment: Based on Postfix 2.12/3.0 postconf.5.html.
|
||||
|
||||
if version < 600
|
||||
syntax clear
|
||||
@@ -41,6 +41,7 @@ syntax keyword pfmainConf address_verify_relayhost
|
||||
syntax keyword pfmainConf address_verify_sender
|
||||
syntax keyword pfmainConf address_verify_sender_dependent_default_transport_maps
|
||||
syntax keyword pfmainConf address_verify_sender_dependent_relayhost_maps
|
||||
syntax keyword pfmainConf address_verify_sender_ttl
|
||||
syntax keyword pfmainConf address_verify_service_name
|
||||
syntax keyword pfmainConf address_verify_transport_maps
|
||||
syntax keyword pfmainConf address_verify_virtual_transport
|
||||
@@ -52,6 +53,7 @@ syntax keyword pfmainConf allow_min_user
|
||||
syntax keyword pfmainConf allow_percent_hack
|
||||
syntax keyword pfmainConf allow_untrusted_routing
|
||||
syntax keyword pfmainConf alternate_config_directories
|
||||
syntax keyword pfmainConf always_add_missing_headers
|
||||
syntax keyword pfmainConf always_bcc
|
||||
syntax keyword pfmainConf anvil_rate_time_unit
|
||||
syntax keyword pfmainConf anvil_status_update_time
|
||||
@@ -61,6 +63,7 @@ syntax keyword pfmainConf application_event_drain_time
|
||||
syntax keyword pfmainConf authorized_flush_users
|
||||
syntax keyword pfmainConf authorized_mailq_users
|
||||
syntax keyword pfmainConf authorized_submit_users
|
||||
syntax keyword pfmainConf authorized_verp_clients
|
||||
syntax keyword pfmainConf backwards_bounce_logfile_compatibility
|
||||
syntax keyword pfmainConf berkeley_db_create_buffer_size
|
||||
syntax keyword pfmainConf berkeley_db_read_buffer_size
|
||||
@@ -81,7 +84,9 @@ syntax keyword pfmainConf command_directory
|
||||
syntax keyword pfmainConf command_execution_directory
|
||||
syntax keyword pfmainConf command_expansion_filter
|
||||
syntax keyword pfmainConf command_time_limit
|
||||
syntax keyword pfmainConf compatibility_level
|
||||
syntax keyword pfmainConf config_directory
|
||||
syntax keyword pfmainConf confirm_delay_cleared
|
||||
syntax keyword pfmainConf connection_cache_protocol_timeout
|
||||
syntax keyword pfmainConf connection_cache_service_name
|
||||
syntax keyword pfmainConf connection_cache_status_update_time
|
||||
@@ -89,14 +94,17 @@ syntax keyword pfmainConf connection_cache_ttl_limit
|
||||
syntax keyword pfmainConf content_filter
|
||||
syntax keyword pfmainConf cyrus_sasl_config_path
|
||||
syntax keyword pfmainConf daemon_directory
|
||||
syntax keyword pfmainConf daemon_table_open_error_is_fatal
|
||||
syntax keyword pfmainConf daemon_timeout
|
||||
syntax keyword pfmainConf data_directory
|
||||
syntax keyword pfmainConf debug_peer_level
|
||||
syntax keyword pfmainConf debug_peer_list
|
||||
syntax keyword pfmainConf debugger_command
|
||||
syntax keyword pfmainConf default_database_type
|
||||
syntax keyword pfmainConf default_delivery_slot_cost
|
||||
syntax keyword pfmainConf default_delivery_slot_discount
|
||||
syntax keyword pfmainConf default_delivery_slot_loan
|
||||
syntax keyword pfmainConf default_delivery_status_filter
|
||||
syntax keyword pfmainConf default_destination_concurrency_failed_cohort_limit
|
||||
syntax keyword pfmainConf default_destination_concurrency_limit
|
||||
syntax keyword pfmainConf default_destination_concurrency_negative_feedback
|
||||
@@ -137,6 +145,7 @@ syntax keyword pfmainConf duplicate_filter_limit
|
||||
syntax keyword pfmainConf empty_address_default_transport_maps_lookup_key
|
||||
syntax keyword pfmainConf empty_address_recipient
|
||||
syntax keyword pfmainConf empty_address_relayhost_maps_lookup_key
|
||||
syntax keyword pfmainConf enable_errors_to
|
||||
syntax keyword pfmainConf enable_long_queue_ids
|
||||
syntax keyword pfmainConf enable_original_recipient
|
||||
syntax keyword pfmainConf error_notice_recipient
|
||||
@@ -144,6 +153,8 @@ syntax keyword pfmainConf error_service_name
|
||||
syntax keyword pfmainConf execution_directory_expansion_filter
|
||||
syntax keyword pfmainConf expand_owner_alias
|
||||
syntax keyword pfmainConf export_environment
|
||||
syntax keyword pfmainConf extract_recipient_limit
|
||||
syntax keyword pfmainConf fallback_relay
|
||||
syntax keyword pfmainConf fallback_transport
|
||||
syntax keyword pfmainConf fallback_transport_maps
|
||||
syntax keyword pfmainConf fast_flush_domains
|
||||
@@ -177,25 +188,33 @@ syntax keyword pfmainConf ipc_idle
|
||||
syntax keyword pfmainConf ipc_timeout
|
||||
syntax keyword pfmainConf ipc_ttl
|
||||
syntax keyword pfmainConf line_length_limit
|
||||
syntax keyword pfmainConf lmdb_map_size
|
||||
syntax keyword pfmainConf lmtp_address_preference
|
||||
syntax keyword pfmainConf lmtp_address_verify_target
|
||||
syntax keyword pfmainConf lmtp_assume_final
|
||||
syntax keyword pfmainConf lmtp_bind_address
|
||||
syntax keyword pfmainConf lmtp_bind_address6
|
||||
syntax keyword pfmainConf lmtp_body_checks
|
||||
syntax keyword pfmainConf lmtp_cache_connection
|
||||
syntax keyword pfmainConf lmtp_cname_overrides_servername
|
||||
syntax keyword pfmainConf lmtp_connect_timeout
|
||||
syntax keyword pfmainConf lmtp_connection_cache_destinations
|
||||
syntax keyword pfmainConf lmtp_connection_cache_on_demand
|
||||
syntax keyword pfmainConf lmtp_connection_cache_time_limit
|
||||
syntax keyword pfmainConf lmtp_connection_reuse_count_limit
|
||||
syntax keyword pfmainConf lmtp_connection_reuse_time_limit
|
||||
syntax keyword pfmainConf lmtp_data_done_timeout
|
||||
syntax keyword pfmainConf lmtp_data_init_timeout
|
||||
syntax keyword pfmainConf lmtp_data_xfer_timeout
|
||||
syntax keyword pfmainConf lmtp_defer_if_no_mx_address_found
|
||||
syntax keyword pfmainConf lmtp_delivery_status_filter
|
||||
syntax keyword pfmainConf lmtp_destination_concurrency_limit
|
||||
syntax keyword pfmainConf lmtp_destination_recipient_limit
|
||||
syntax keyword pfmainConf lmtp_discard_lhlo_keyword_address_maps
|
||||
syntax keyword pfmainConf lmtp_discard_lhlo_keywords
|
||||
syntax keyword pfmainConf lmtp_dns_reply_filter
|
||||
syntax keyword pfmainConf lmtp_dns_resolver_options
|
||||
syntax keyword pfmainConf lmtp_dns_support_level
|
||||
syntax keyword pfmainConf lmtp_enforce_tls
|
||||
syntax keyword pfmainConf lmtp_generic_maps
|
||||
syntax keyword pfmainConf lmtp_header_checks
|
||||
@@ -230,9 +249,11 @@ syntax keyword pfmainConf lmtp_sasl_security_options
|
||||
syntax keyword pfmainConf lmtp_sasl_tls_security_options
|
||||
syntax keyword pfmainConf lmtp_sasl_tls_verified_security_options
|
||||
syntax keyword pfmainConf lmtp_sasl_type
|
||||
syntax keyword pfmainConf lmtp_send_dummy_mail_auth
|
||||
syntax keyword pfmainConf lmtp_send_xforward_command
|
||||
syntax keyword pfmainConf lmtp_sender_dependent_authentication
|
||||
syntax keyword pfmainConf lmtp_skip_5xx_greeting
|
||||
syntax keyword pfmainConf lmtp_skip_quit_response
|
||||
syntax keyword pfmainConf lmtp_starttls_timeout
|
||||
syntax keyword pfmainConf lmtp_tcp_port
|
||||
syntax keyword pfmainConf lmtp_tls_CAfile
|
||||
@@ -248,6 +269,7 @@ syntax keyword pfmainConf lmtp_tls_enforce_peername
|
||||
syntax keyword pfmainConf lmtp_tls_exclude_ciphers
|
||||
syntax keyword pfmainConf lmtp_tls_fingerprint_cert_match
|
||||
syntax keyword pfmainConf lmtp_tls_fingerprint_digest
|
||||
syntax keyword pfmainConf lmtp_tls_force_insecure_host_tlsa_lookup
|
||||
syntax keyword pfmainConf lmtp_tls_key_file
|
||||
syntax keyword pfmainConf lmtp_tls_loglevel
|
||||
syntax keyword pfmainConf lmtp_tls_mandatory_ciphers
|
||||
@@ -262,10 +284,12 @@ syntax keyword pfmainConf lmtp_tls_secure_cert_match
|
||||
syntax keyword pfmainConf lmtp_tls_security_level
|
||||
syntax keyword pfmainConf lmtp_tls_session_cache_database
|
||||
syntax keyword pfmainConf lmtp_tls_session_cache_timeout
|
||||
syntax keyword pfmainConf lmtp_tls_trust_anchor_file
|
||||
syntax keyword pfmainConf lmtp_tls_verify_cert_match
|
||||
syntax keyword pfmainConf lmtp_use_tls
|
||||
syntax keyword pfmainConf lmtp_xforward_timeout
|
||||
syntax keyword pfmainConf local_command_shell
|
||||
syntax keyword pfmainConf local_delivery_status_filter
|
||||
syntax keyword pfmainConf local_destination_concurrency_limit
|
||||
syntax keyword pfmainConf local_destination_recipient_limit
|
||||
syntax keyword pfmainConf local_header_rewrite_clients
|
||||
@@ -287,17 +311,19 @@ syntax keyword pfmainConf mailq_path
|
||||
syntax keyword pfmainConf manpage_directory
|
||||
syntax keyword pfmainConf maps_rbl_domains
|
||||
syntax keyword pfmainConf maps_rbl_reject_code
|
||||
syntax keyword pfmainConf master_service_disable
|
||||
syntax keyword pfmainConf masquerade_classes
|
||||
syntax keyword pfmainConf masquerade_domains
|
||||
syntax keyword pfmainConf masquerade_exceptions
|
||||
syntax keyword pfmainConf master_service_disable
|
||||
syntax keyword pfmainConf max_idle
|
||||
syntax keyword pfmainConf max_use
|
||||
syntax keyword pfmainConf maximal_backoff_time
|
||||
syntax keyword pfmainConf maximal_queue_lifetime
|
||||
syntax keyword pfmainConf message_drop_headers
|
||||
syntax keyword pfmainConf message_reject_characters
|
||||
syntax keyword pfmainConf message_size_limit
|
||||
syntax keyword pfmainConf message_strip_characters
|
||||
syntax keyword pfmainConf meta_directory
|
||||
syntax keyword pfmainConf milter_command_timeout
|
||||
syntax keyword pfmainConf milter_connect_macros
|
||||
syntax keyword pfmainConf milter_connect_timeout
|
||||
@@ -335,10 +361,12 @@ syntax keyword pfmainConf newaliases_path
|
||||
syntax keyword pfmainConf non_fqdn_reject_code
|
||||
syntax keyword pfmainConf non_smtpd_milters
|
||||
syntax keyword pfmainConf notify_classes
|
||||
syntax keyword pfmainConf nullmx_reject_code
|
||||
syntax keyword pfmainConf owner_request_special
|
||||
syntax keyword pfmainConf parent_domain_matches_subdomains
|
||||
syntax keyword pfmainConf permit_mx_backup_networks
|
||||
syntax keyword pfmainConf pickup_service_name
|
||||
syntax keyword pfmainConf pipe_delivery_status_filter
|
||||
syntax keyword pfmainConf plaintext_reject_code
|
||||
syntax keyword pfmainConf postmulti_control_commands
|
||||
syntax keyword pfmainConf postmulti_start_commands
|
||||
@@ -362,7 +390,9 @@ syntax keyword pfmainConf postscreen_dnsbl_action
|
||||
syntax keyword pfmainConf postscreen_dnsbl_reply_map
|
||||
syntax keyword pfmainConf postscreen_dnsbl_sites
|
||||
syntax keyword pfmainConf postscreen_dnsbl_threshold
|
||||
syntax keyword pfmainConf postscreen_dnsbl_timeout
|
||||
syntax keyword pfmainConf postscreen_dnsbl_ttl
|
||||
syntax keyword pfmainConf postscreen_dnsbl_whitelist_threshold
|
||||
syntax keyword pfmainConf postscreen_enforce_tls
|
||||
syntax keyword pfmainConf postscreen_expansion_filter
|
||||
syntax keyword pfmainConf postscreen_forbidden_commands
|
||||
@@ -381,6 +411,8 @@ syntax keyword pfmainConf postscreen_post_queue_limit
|
||||
syntax keyword pfmainConf postscreen_pre_queue_limit
|
||||
syntax keyword pfmainConf postscreen_reject_footer
|
||||
syntax keyword pfmainConf postscreen_tls_security_level
|
||||
syntax keyword pfmainConf postscreen_upstream_proxy_protocol
|
||||
syntax keyword pfmainConf postscreen_upstream_proxy_timeout
|
||||
syntax keyword pfmainConf postscreen_use_tls
|
||||
syntax keyword pfmainConf postscreen_watchdog_timeout
|
||||
syntax keyword pfmainConf postscreen_whitelist_interfaces
|
||||
@@ -395,7 +427,9 @@ syntax keyword pfmainConf proxy_write_maps
|
||||
syntax keyword pfmainConf proxymap_service_name
|
||||
syntax keyword pfmainConf proxywrite_service_name
|
||||
syntax keyword pfmainConf qmgr_clog_warn_time
|
||||
syntax keyword pfmainConf qmgr_daemon_timeout
|
||||
syntax keyword pfmainConf qmgr_fudge_factor
|
||||
syntax keyword pfmainConf qmgr_ipc_timeout
|
||||
syntax keyword pfmainConf qmgr_message_active_limit
|
||||
syntax keyword pfmainConf qmgr_message_recipient_limit
|
||||
syntax keyword pfmainConf qmgr_message_recipient_minimum
|
||||
@@ -435,17 +469,21 @@ syntax keyword pfmainConf resolve_numeric_domain
|
||||
syntax keyword pfmainConf rewrite_service_name
|
||||
syntax keyword pfmainConf sample_directory
|
||||
syntax keyword pfmainConf send_cyrus_sasl_authzid
|
||||
syntax keyword pfmainConf sender_based_routing
|
||||
syntax keyword pfmainConf sender_bcc_maps
|
||||
syntax keyword pfmainConf sender_canonical_classes
|
||||
syntax keyword pfmainConf sender_canonical_maps
|
||||
syntax keyword pfmainConf sender_dependent_default_transport_maps
|
||||
syntax keyword pfmainConf sender_dependent_relayhost_maps
|
||||
syntax keyword pfmainConf sendmail_fix_line_endings
|
||||
syntax keyword pfmainConf sendmail_path
|
||||
syntax keyword pfmainConf service_throttle_time
|
||||
syntax keyword pfmainConf setgid_group
|
||||
syntax keyword pfmainConf shlib_directory
|
||||
syntax keyword pfmainConf show_user_unknown_table_name
|
||||
syntax keyword pfmainConf showq_service_name
|
||||
syntax keyword pfmainConf smtp_address_preference
|
||||
syntax keyword pfmainConf smtp_address_verify_target
|
||||
syntax keyword pfmainConf smtp_always_send_ehlo
|
||||
syntax keyword pfmainConf smtp_bind_address
|
||||
syntax keyword pfmainConf smtp_bind_address6
|
||||
@@ -455,16 +493,20 @@ syntax keyword pfmainConf smtp_connect_timeout
|
||||
syntax keyword pfmainConf smtp_connection_cache_destinations
|
||||
syntax keyword pfmainConf smtp_connection_cache_on_demand
|
||||
syntax keyword pfmainConf smtp_connection_cache_time_limit
|
||||
syntax keyword pfmainConf smtp_connection_reuse_count_limit
|
||||
syntax keyword pfmainConf smtp_connection_reuse_time_limit
|
||||
syntax keyword pfmainConf smtp_data_done_timeout
|
||||
syntax keyword pfmainConf smtp_data_init_timeout
|
||||
syntax keyword pfmainConf smtp_data_xfer_timeout
|
||||
syntax keyword pfmainConf smtp_defer_if_no_mx_address_found
|
||||
syntax keyword pfmainConf smtp_delivery_status_filter
|
||||
syntax keyword pfmainConf smtp_destination_concurrency_limit
|
||||
syntax keyword pfmainConf smtp_destination_recipient_limit
|
||||
syntax keyword pfmainConf smtp_discard_ehlo_keyword_address_maps
|
||||
syntax keyword pfmainConf smtp_discard_ehlo_keywords
|
||||
syntax keyword pfmainConf smtp_dns_reply_filter
|
||||
syntax keyword pfmainConf smtp_dns_resolver_options
|
||||
syntax keyword pfmainConf smtp_dns_support_level
|
||||
syntax keyword pfmainConf smtp_enforce_tls
|
||||
syntax keyword pfmainConf smtp_fallback_relay
|
||||
syntax keyword pfmainConf smtp_generic_maps
|
||||
@@ -479,6 +521,7 @@ syntax keyword pfmainConf smtp_mx_address_limit
|
||||
syntax keyword pfmainConf smtp_mx_session_limit
|
||||
syntax keyword pfmainConf smtp_nested_header_checks
|
||||
syntax keyword pfmainConf smtp_never_send_ehlo
|
||||
syntax keyword pfmainConf smtp_per_record_deadline
|
||||
syntax keyword pfmainConf smtp_pix_workaround_delay_time
|
||||
syntax keyword pfmainConf smtp_pix_workaround_maps
|
||||
syntax keyword pfmainConf smtp_pix_workaround_threshold_time
|
||||
@@ -500,8 +543,10 @@ syntax keyword pfmainConf smtp_sasl_security_options
|
||||
syntax keyword pfmainConf smtp_sasl_tls_security_options
|
||||
syntax keyword pfmainConf smtp_sasl_tls_verified_security_options
|
||||
syntax keyword pfmainConf smtp_sasl_type
|
||||
syntax keyword pfmainConf smtp_send_dummy_mail_auth
|
||||
syntax keyword pfmainConf smtp_send_xforward_command
|
||||
syntax keyword pfmainConf smtp_sender_dependent_authentication
|
||||
syntax keyword pfmainConf smtp_skip_4xx_greeting
|
||||
syntax keyword pfmainConf smtp_skip_5xx_greeting
|
||||
syntax keyword pfmainConf smtp_skip_quit_response
|
||||
syntax keyword pfmainConf smtp_starttls_timeout
|
||||
@@ -519,6 +564,7 @@ syntax keyword pfmainConf smtp_tls_enforce_peername
|
||||
syntax keyword pfmainConf smtp_tls_exclude_ciphers
|
||||
syntax keyword pfmainConf smtp_tls_fingerprint_cert_match
|
||||
syntax keyword pfmainConf smtp_tls_fingerprint_digest
|
||||
syntax keyword pfmainConf smtp_tls_force_insecure_host_tlsa_lookup
|
||||
syntax keyword pfmainConf smtp_tls_key_file
|
||||
syntax keyword pfmainConf smtp_tls_loglevel
|
||||
syntax keyword pfmainConf smtp_tls_mandatory_ciphers
|
||||
@@ -533,7 +579,9 @@ syntax keyword pfmainConf smtp_tls_secure_cert_match
|
||||
syntax keyword pfmainConf smtp_tls_security_level
|
||||
syntax keyword pfmainConf smtp_tls_session_cache_database
|
||||
syntax keyword pfmainConf smtp_tls_session_cache_timeout
|
||||
syntax keyword pfmainConf smtp_tls_trust_anchor_file
|
||||
syntax keyword pfmainConf smtp_tls_verify_cert_match
|
||||
syntax keyword pfmainConf smtp_tls_wrappermode
|
||||
syntax keyword pfmainConf smtp_use_tls
|
||||
syntax keyword pfmainConf smtp_xforward_timeout
|
||||
syntax keyword pfmainConf smtpd_authorized_verp_clients
|
||||
@@ -554,6 +602,7 @@ syntax keyword pfmainConf smtpd_delay_open_until_valid_rcpt
|
||||
syntax keyword pfmainConf smtpd_delay_reject
|
||||
syntax keyword pfmainConf smtpd_discard_ehlo_keyword_address_maps
|
||||
syntax keyword pfmainConf smtpd_discard_ehlo_keywords
|
||||
syntax keyword pfmainConf smtpd_dns_reply_filter
|
||||
syntax keyword pfmainConf smtpd_end_of_data_restrictions
|
||||
syntax keyword pfmainConf smtpd_enforce_tls
|
||||
syntax keyword pfmainConf smtpd_error_sleep_time
|
||||
@@ -565,14 +614,19 @@ syntax keyword pfmainConf smtpd_helo_required
|
||||
syntax keyword pfmainConf smtpd_helo_restrictions
|
||||
syntax keyword pfmainConf smtpd_history_flush_threshold
|
||||
syntax keyword pfmainConf smtpd_junk_command_limit
|
||||
syntax keyword pfmainConf smtpd_log_access_permit_actions
|
||||
syntax keyword pfmainConf smtpd_milters
|
||||
syntax keyword pfmainConf smtpd_noop_commands
|
||||
syntax keyword pfmainConf smtpd_null_access_lookup_key
|
||||
syntax keyword pfmainConf smtpd_peername_lookup
|
||||
syntax keyword pfmainConf smtpd_per_record_deadline
|
||||
syntax keyword pfmainConf smtpd_policy_service_default_action
|
||||
syntax keyword pfmainConf smtpd_policy_service_max_idle
|
||||
syntax keyword pfmainConf smtpd_policy_service_max_ttl
|
||||
syntax keyword pfmainConf smtpd_policy_service_request_limit
|
||||
syntax keyword pfmainConf smtpd_policy_service_retry_delay
|
||||
syntax keyword pfmainConf smtpd_policy_service_timeout
|
||||
syntax keyword pfmainConf smtpd_policy_service_try_limit
|
||||
syntax keyword pfmainConf smtpd_proxy_ehlo
|
||||
syntax keyword pfmainConf smtpd_proxy_filter
|
||||
syntax keyword pfmainConf smtpd_proxy_options
|
||||
@@ -583,13 +637,16 @@ syntax keyword pfmainConf smtpd_recipient_restrictions
|
||||
syntax keyword pfmainConf smtpd_reject_footer
|
||||
syntax keyword pfmainConf smtpd_reject_unlisted_recipient
|
||||
syntax keyword pfmainConf smtpd_reject_unlisted_sender
|
||||
syntax keyword pfmainConf smtpd_relay_restrictions
|
||||
syntax keyword pfmainConf smtpd_restriction_classes
|
||||
syntax keyword pfmainConf smtpd_sasl_application_name
|
||||
syntax keyword pfmainConf smtpd_sasl_auth_enable
|
||||
syntax keyword pfmainConf smtpd_sasl_authenticated_header
|
||||
syntax keyword pfmainConf smtpd_sasl_exceptions_networks
|
||||
syntax keyword pfmainConf smtpd_sasl_local_domain
|
||||
syntax keyword pfmainConf smtpd_sasl_path
|
||||
syntax keyword pfmainConf smtpd_sasl_security_options
|
||||
syntax keyword pfmainConf smtpd_sasl_service
|
||||
syntax keyword pfmainConf smtpd_sasl_tls_security_options
|
||||
syntax keyword pfmainConf smtpd_sasl_type
|
||||
syntax keyword pfmainConf smtpd_sender_login_maps
|
||||
@@ -628,21 +685,21 @@ syntax keyword pfmainConf smtpd_tls_security_level
|
||||
syntax keyword pfmainConf smtpd_tls_session_cache_database
|
||||
syntax keyword pfmainConf smtpd_tls_session_cache_timeout
|
||||
syntax keyword pfmainConf smtpd_tls_wrappermode
|
||||
syntax keyword pfmainConf smtpd_upstream_proxy_protocol
|
||||
syntax keyword pfmainConf smtpd_upstream_proxy_timeout
|
||||
syntax keyword pfmainConf smtpd_use_tls
|
||||
syntax keyword pfmainConf smtputf8_autodetect_classes
|
||||
syntax keyword pfmainConf smtputf8_enable
|
||||
syntax keyword pfmainConf soft_bounce
|
||||
syntax keyword pfmainConf stale_lock_time
|
||||
syntax keyword pfmainConf stress
|
||||
syntax keyword pfmainConf strict_7bit_headers
|
||||
syntax keyword pfmainConf strict_8bitmime
|
||||
syntax keyword pfmainConf strict_8bitmime_body
|
||||
syntax keyword pfmainConf strict_mime_encoding_domain
|
||||
syntax keyword pfmainConf strict_rfc821_envelopes
|
||||
syntax keyword pfmainConf strict_7bit_headers
|
||||
syntax keyword pfmainConf strict_8bitmime
|
||||
syntax keyword pfmainConf strict_8bitmime_body
|
||||
syntax keyword pfmainConf strict_mailbox_ownership
|
||||
syntax keyword pfmainConf strict_mime_encoding_domain
|
||||
syntax keyword pfmainConf strict_rfc821_envelopes
|
||||
syntax keyword pfmainConf strict_smtputf8
|
||||
syntax keyword pfmainConf sun_mailtool_compatibility
|
||||
syntax keyword pfmainConf swap_bangpath
|
||||
syntax keyword pfmainConf syslog_facility
|
||||
@@ -650,11 +707,15 @@ syntax keyword pfmainConf syslog_name
|
||||
syntax keyword pfmainConf tcp_windowsize
|
||||
syntax keyword pfmainConf tls_append_default_CA
|
||||
syntax keyword pfmainConf tls_daemon_random_bytes
|
||||
syntax keyword pfmainConf tls_dane_digest_agility
|
||||
syntax keyword pfmainConf tls_dane_digests
|
||||
syntax keyword pfmainConf tls_dane_trust_anchor_digest_enable
|
||||
syntax keyword pfmainConf tls_disable_workarounds
|
||||
syntax keyword pfmainConf tls_eecdh_strong_curve
|
||||
syntax keyword pfmainConf tls_eecdh_ultra_curve
|
||||
syntax keyword pfmainConf tls_export_cipherlist
|
||||
syntax keyword pfmainConf tls_high_cipherlist
|
||||
syntax keyword pfmainConf tls_legacy_public_key_fingerprints
|
||||
syntax keyword pfmainConf tls_low_cipherlist
|
||||
syntax keyword pfmainConf tls_medium_cipherlist
|
||||
syntax keyword pfmainConf tls_null_cipherlist
|
||||
@@ -664,6 +725,10 @@ syntax keyword pfmainConf tls_random_exchange_name
|
||||
syntax keyword pfmainConf tls_random_prng_update_period
|
||||
syntax keyword pfmainConf tls_random_reseed_period
|
||||
syntax keyword pfmainConf tls_random_source
|
||||
syntax keyword pfmainConf tls_session_ticket_cipher
|
||||
syntax keyword pfmainConf tls_ssl_options
|
||||
syntax keyword pfmainConf tls_wildcard_matches_multiple_labels
|
||||
syntax keyword pfmainConf tlsmgr_service_name
|
||||
syntax keyword pfmainConf tlsproxy_enforce_tls
|
||||
syntax keyword pfmainConf tlsproxy_service_name
|
||||
syntax keyword pfmainConf tlsproxy_tls_CAfile
|
||||
@@ -711,6 +776,7 @@ syntax keyword pfmainConf transport_recipient_limit
|
||||
syntax keyword pfmainConf transport_recipient_refill_delay
|
||||
syntax keyword pfmainConf transport_recipient_refill_limit
|
||||
syntax keyword pfmainConf transport_retry_time
|
||||
syntax keyword pfmainConf transport_time_limit
|
||||
syntax keyword pfmainConf trigger_timeout
|
||||
syntax keyword pfmainConf undisclosed_recipients_header
|
||||
syntax keyword pfmainConf unknown_address_reject_code
|
||||
@@ -731,10 +797,12 @@ syntax keyword pfmainConf unverified_sender_reject_code
|
||||
syntax keyword pfmainConf unverified_sender_reject_reason
|
||||
syntax keyword pfmainConf unverified_sender_tempfail_action
|
||||
syntax keyword pfmainConf verp_delimiter_filter
|
||||
syntax keyword pfmainConf virtual_alias_address_length_limit
|
||||
syntax keyword pfmainConf virtual_alias_domains
|
||||
syntax keyword pfmainConf virtual_alias_expansion_limit
|
||||
syntax keyword pfmainConf virtual_alias_maps
|
||||
syntax keyword pfmainConf virtual_alias_recursion_limit
|
||||
syntax keyword pfmainConf virtual_delivery_status_filter
|
||||
syntax keyword pfmainConf virtual_destination_concurrency_limit
|
||||
syntax keyword pfmainConf virtual_destination_recipient_limit
|
||||
syntax keyword pfmainConf virtual_gid_maps
|
||||
@@ -743,6 +811,7 @@ syntax keyword pfmainConf virtual_mailbox_domains
|
||||
syntax keyword pfmainConf virtual_mailbox_limit
|
||||
syntax keyword pfmainConf virtual_mailbox_lock
|
||||
syntax keyword pfmainConf virtual_mailbox_maps
|
||||
syntax keyword pfmainConf virtual_maps
|
||||
syntax keyword pfmainConf virtual_minimum_uid
|
||||
syntax keyword pfmainConf virtual_transport
|
||||
syntax keyword pfmainConf virtual_uid_maps
|
||||
@@ -765,6 +834,7 @@ syntax match pfmainRef "$\<address_verify_relayhost\>"
|
||||
syntax match pfmainRef "$\<address_verify_sender\>"
|
||||
syntax match pfmainRef "$\<address_verify_sender_dependent_default_transport_maps\>"
|
||||
syntax match pfmainRef "$\<address_verify_sender_dependent_relayhost_maps\>"
|
||||
syntax match pfmainRef "$\<address_verify_sender_ttl\>"
|
||||
syntax match pfmainRef "$\<address_verify_service_name\>"
|
||||
syntax match pfmainRef "$\<address_verify_transport_maps\>"
|
||||
syntax match pfmainRef "$\<address_verify_virtual_transport\>"
|
||||
@@ -776,6 +846,7 @@ syntax match pfmainRef "$\<allow_min_user\>"
|
||||
syntax match pfmainRef "$\<allow_percent_hack\>"
|
||||
syntax match pfmainRef "$\<allow_untrusted_routing\>"
|
||||
syntax match pfmainRef "$\<alternate_config_directories\>"
|
||||
syntax match pfmainRef "$\<always_add_missing_headers\>"
|
||||
syntax match pfmainRef "$\<always_bcc\>"
|
||||
syntax match pfmainRef "$\<anvil_rate_time_unit\>"
|
||||
syntax match pfmainRef "$\<anvil_status_update_time\>"
|
||||
@@ -785,6 +856,7 @@ syntax match pfmainRef "$\<application_event_drain_time\>"
|
||||
syntax match pfmainRef "$\<authorized_flush_users\>"
|
||||
syntax match pfmainRef "$\<authorized_mailq_users\>"
|
||||
syntax match pfmainRef "$\<authorized_submit_users\>"
|
||||
syntax match pfmainRef "$\<authorized_verp_clients\>"
|
||||
syntax match pfmainRef "$\<backwards_bounce_logfile_compatibility\>"
|
||||
syntax match pfmainRef "$\<berkeley_db_create_buffer_size\>"
|
||||
syntax match pfmainRef "$\<berkeley_db_read_buffer_size\>"
|
||||
@@ -805,7 +877,9 @@ syntax match pfmainRef "$\<command_directory\>"
|
||||
syntax match pfmainRef "$\<command_execution_directory\>"
|
||||
syntax match pfmainRef "$\<command_expansion_filter\>"
|
||||
syntax match pfmainRef "$\<command_time_limit\>"
|
||||
syntax match pfmainRef "$\<compatibility_level\>"
|
||||
syntax match pfmainRef "$\<config_directory\>"
|
||||
syntax match pfmainRef "$\<confirm_delay_cleared\>"
|
||||
syntax match pfmainRef "$\<connection_cache_protocol_timeout\>"
|
||||
syntax match pfmainRef "$\<connection_cache_service_name\>"
|
||||
syntax match pfmainRef "$\<connection_cache_status_update_time\>"
|
||||
@@ -813,14 +887,17 @@ syntax match pfmainRef "$\<connection_cache_ttl_limit\>"
|
||||
syntax match pfmainRef "$\<content_filter\>"
|
||||
syntax match pfmainRef "$\<cyrus_sasl_config_path\>"
|
||||
syntax match pfmainRef "$\<daemon_directory\>"
|
||||
syntax match pfmainRef "$\<daemon_table_open_error_is_fatal\>"
|
||||
syntax match pfmainRef "$\<daemon_timeout\>"
|
||||
syntax match pfmainRef "$\<data_directory\>"
|
||||
syntax match pfmainRef "$\<debug_peer_level\>"
|
||||
syntax match pfmainRef "$\<debug_peer_list\>"
|
||||
syntax match pfmainRef "$\<debugger_command\>"
|
||||
syntax match pfmainRef "$\<default_database_type\>"
|
||||
syntax match pfmainRef "$\<default_delivery_slot_cost\>"
|
||||
syntax match pfmainRef "$\<default_delivery_slot_discount\>"
|
||||
syntax match pfmainRef "$\<default_delivery_slot_loan\>"
|
||||
syntax match pfmainRef "$\<default_delivery_status_filter\>"
|
||||
syntax match pfmainRef "$\<default_destination_concurrency_failed_cohort_limit\>"
|
||||
syntax match pfmainRef "$\<default_destination_concurrency_limit\>"
|
||||
syntax match pfmainRef "$\<default_destination_concurrency_negative_feedback\>"
|
||||
@@ -861,6 +938,7 @@ syntax match pfmainRef "$\<duplicate_filter_limit\>"
|
||||
syntax match pfmainRef "$\<empty_address_default_transport_maps_lookup_key\>"
|
||||
syntax match pfmainRef "$\<empty_address_recipient\>"
|
||||
syntax match pfmainRef "$\<empty_address_relayhost_maps_lookup_key\>"
|
||||
syntax match pfmainRef "$\<enable_errors_to\>"
|
||||
syntax match pfmainRef "$\<enable_long_queue_ids\>"
|
||||
syntax match pfmainRef "$\<enable_original_recipient\>"
|
||||
syntax match pfmainRef "$\<error_notice_recipient\>"
|
||||
@@ -868,6 +946,8 @@ syntax match pfmainRef "$\<error_service_name\>"
|
||||
syntax match pfmainRef "$\<execution_directory_expansion_filter\>"
|
||||
syntax match pfmainRef "$\<expand_owner_alias\>"
|
||||
syntax match pfmainRef "$\<export_environment\>"
|
||||
syntax match pfmainRef "$\<extract_recipient_limit\>"
|
||||
syntax match pfmainRef "$\<fallback_relay\>"
|
||||
syntax match pfmainRef "$\<fallback_transport\>"
|
||||
syntax match pfmainRef "$\<fallback_transport_maps\>"
|
||||
syntax match pfmainRef "$\<fast_flush_domains\>"
|
||||
@@ -901,25 +981,33 @@ syntax match pfmainRef "$\<ipc_idle\>"
|
||||
syntax match pfmainRef "$\<ipc_timeout\>"
|
||||
syntax match pfmainRef "$\<ipc_ttl\>"
|
||||
syntax match pfmainRef "$\<line_length_limit\>"
|
||||
syntax match pfmainRef "$\<lmdb_map_size\>"
|
||||
syntax match pfmainRef "$\<lmtp_address_preference\>"
|
||||
syntax match pfmainRef "$\<lmtp_address_verify_target\>"
|
||||
syntax match pfmainRef "$\<lmtp_assume_final\>"
|
||||
syntax match pfmainRef "$\<lmtp_bind_address\>"
|
||||
syntax match pfmainRef "$\<lmtp_bind_address6\>"
|
||||
syntax match pfmainRef "$\<lmtp_body_checks\>"
|
||||
syntax match pfmainRef "$\<lmtp_cache_connection\>"
|
||||
syntax match pfmainRef "$\<lmtp_cname_overrides_servername\>"
|
||||
syntax match pfmainRef "$\<lmtp_connect_timeout\>"
|
||||
syntax match pfmainRef "$\<lmtp_connection_cache_destinations\>"
|
||||
syntax match pfmainRef "$\<lmtp_connection_cache_on_demand\>"
|
||||
syntax match pfmainRef "$\<lmtp_connection_cache_time_limit\>"
|
||||
syntax match pfmainRef "$\<lmtp_connection_reuse_count_limit\>"
|
||||
syntax match pfmainRef "$\<lmtp_connection_reuse_time_limit\>"
|
||||
syntax match pfmainRef "$\<lmtp_data_done_timeout\>"
|
||||
syntax match pfmainRef "$\<lmtp_data_init_timeout\>"
|
||||
syntax match pfmainRef "$\<lmtp_data_xfer_timeout\>"
|
||||
syntax match pfmainRef "$\<lmtp_defer_if_no_mx_address_found\>"
|
||||
syntax match pfmainRef "$\<lmtp_delivery_status_filter\>"
|
||||
syntax match pfmainRef "$\<lmtp_destination_concurrency_limit\>"
|
||||
syntax match pfmainRef "$\<lmtp_destination_recipient_limit\>"
|
||||
syntax match pfmainRef "$\<lmtp_discard_lhlo_keyword_address_maps\>"
|
||||
syntax match pfmainRef "$\<lmtp_discard_lhlo_keywords\>"
|
||||
syntax match pfmainRef "$\<lmtp_dns_reply_filter\>"
|
||||
syntax match pfmainRef "$\<lmtp_dns_resolver_options\>"
|
||||
syntax match pfmainRef "$\<lmtp_dns_support_level\>"
|
||||
syntax match pfmainRef "$\<lmtp_enforce_tls\>"
|
||||
syntax match pfmainRef "$\<lmtp_generic_maps\>"
|
||||
syntax match pfmainRef "$\<lmtp_header_checks\>"
|
||||
@@ -954,9 +1042,11 @@ syntax match pfmainRef "$\<lmtp_sasl_security_options\>"
|
||||
syntax match pfmainRef "$\<lmtp_sasl_tls_security_options\>"
|
||||
syntax match pfmainRef "$\<lmtp_sasl_tls_verified_security_options\>"
|
||||
syntax match pfmainRef "$\<lmtp_sasl_type\>"
|
||||
syntax match pfmainRef "$\<lmtp_send_dummy_mail_auth\>"
|
||||
syntax match pfmainRef "$\<lmtp_send_xforward_command\>"
|
||||
syntax match pfmainRef "$\<lmtp_sender_dependent_authentication\>"
|
||||
syntax match pfmainRef "$\<lmtp_skip_5xx_greeting\>"
|
||||
syntax match pfmainRef "$\<lmtp_skip_quit_response\>"
|
||||
syntax match pfmainRef "$\<lmtp_starttls_timeout\>"
|
||||
syntax match pfmainRef "$\<lmtp_tcp_port\>"
|
||||
syntax match pfmainRef "$\<lmtp_tls_CAfile\>"
|
||||
@@ -972,6 +1062,7 @@ syntax match pfmainRef "$\<lmtp_tls_enforce_peername\>"
|
||||
syntax match pfmainRef "$\<lmtp_tls_exclude_ciphers\>"
|
||||
syntax match pfmainRef "$\<lmtp_tls_fingerprint_cert_match\>"
|
||||
syntax match pfmainRef "$\<lmtp_tls_fingerprint_digest\>"
|
||||
syntax match pfmainRef "$\<lmtp_tls_force_insecure_host_tlsa_lookup\>"
|
||||
syntax match pfmainRef "$\<lmtp_tls_key_file\>"
|
||||
syntax match pfmainRef "$\<lmtp_tls_loglevel\>"
|
||||
syntax match pfmainRef "$\<lmtp_tls_mandatory_ciphers\>"
|
||||
@@ -982,11 +1073,16 @@ syntax match pfmainRef "$\<lmtp_tls_per_site\>"
|
||||
syntax match pfmainRef "$\<lmtp_tls_policy_maps\>"
|
||||
syntax match pfmainRef "$\<lmtp_tls_protocols\>"
|
||||
syntax match pfmainRef "$\<lmtp_tls_scert_verifydepth\>"
|
||||
syntax match pfmainRef "$\<lmtp_tls_secure_cert_match\>"
|
||||
syntax match pfmainRef "$\<lmtp_tls_security_level\>"
|
||||
syntax match pfmainRef "$\<lmtp_tls_session_cache_database\>"
|
||||
syntax match pfmainRef "$\<lmtp_tls_session_cache_timeout\>"
|
||||
syntax match pfmainRef "$\<lmtp_tls_trust_anchor_file\>"
|
||||
syntax match pfmainRef "$\<lmtp_tls_verify_cert_match\>"
|
||||
syntax match pfmainRef "$\<lmtp_use_tls\>"
|
||||
syntax match pfmainRef "$\<lmtp_xforward_timeout\>"
|
||||
syntax match pfmainRef "$\<local_command_shell\>"
|
||||
syntax match pfmainRef "$\<local_delivery_status_filter\>"
|
||||
syntax match pfmainRef "$\<local_destination_concurrency_limit\>"
|
||||
syntax match pfmainRef "$\<local_destination_recipient_limit\>"
|
||||
syntax match pfmainRef "$\<local_header_rewrite_clients\>"
|
||||
@@ -1008,17 +1104,19 @@ syntax match pfmainRef "$\<mailq_path\>"
|
||||
syntax match pfmainRef "$\<manpage_directory\>"
|
||||
syntax match pfmainRef "$\<maps_rbl_domains\>"
|
||||
syntax match pfmainRef "$\<maps_rbl_reject_code\>"
|
||||
syntax match pfmainRef "$\<master_service_disable\>"
|
||||
syntax match pfmainRef "$\<masquerade_classes\>"
|
||||
syntax match pfmainRef "$\<masquerade_domains\>"
|
||||
syntax match pfmainRef "$\<masquerade_exceptions\>"
|
||||
syntax match pfmainRef "$\<master_service_disable\>"
|
||||
syntax match pfmainRef "$\<max_idle\>"
|
||||
syntax match pfmainRef "$\<max_use\>"
|
||||
syntax match pfmainRef "$\<maximal_backoff_time\>"
|
||||
syntax match pfmainRef "$\<maximal_queue_lifetime\>"
|
||||
syntax match pfmainRef "$\<message_drop_headers\>"
|
||||
syntax match pfmainRef "$\<message_reject_characters\>"
|
||||
syntax match pfmainRef "$\<message_size_limit\>"
|
||||
syntax match pfmainRef "$\<message_strip_characters\>"
|
||||
syntax match pfmainRef "$\<meta_directory\>"
|
||||
syntax match pfmainRef "$\<milter_command_timeout\>"
|
||||
syntax match pfmainRef "$\<milter_connect_macros\>"
|
||||
syntax match pfmainRef "$\<milter_connect_timeout\>"
|
||||
@@ -1056,10 +1154,12 @@ syntax match pfmainRef "$\<newaliases_path\>"
|
||||
syntax match pfmainRef "$\<non_fqdn_reject_code\>"
|
||||
syntax match pfmainRef "$\<non_smtpd_milters\>"
|
||||
syntax match pfmainRef "$\<notify_classes\>"
|
||||
syntax match pfmainRef "$\<nullmx_reject_code\>"
|
||||
syntax match pfmainRef "$\<owner_request_special\>"
|
||||
syntax match pfmainRef "$\<parent_domain_matches_subdomains\>"
|
||||
syntax match pfmainRef "$\<permit_mx_backup_networks\>"
|
||||
syntax match pfmainRef "$\<pickup_service_name\>"
|
||||
syntax match pfmainRef "$\<pipe_delivery_status_filter\>"
|
||||
syntax match pfmainRef "$\<plaintext_reject_code\>"
|
||||
syntax match pfmainRef "$\<postmulti_control_commands\>"
|
||||
syntax match pfmainRef "$\<postmulti_start_commands\>"
|
||||
@@ -1083,7 +1183,9 @@ syntax match pfmainRef "$\<postscreen_dnsbl_action\>"
|
||||
syntax match pfmainRef "$\<postscreen_dnsbl_reply_map\>"
|
||||
syntax match pfmainRef "$\<postscreen_dnsbl_sites\>"
|
||||
syntax match pfmainRef "$\<postscreen_dnsbl_threshold\>"
|
||||
syntax match pfmainRef "$\<postscreen_dnsbl_timeout\>"
|
||||
syntax match pfmainRef "$\<postscreen_dnsbl_ttl\>"
|
||||
syntax match pfmainRef "$\<postscreen_dnsbl_whitelist_threshold\>"
|
||||
syntax match pfmainRef "$\<postscreen_enforce_tls\>"
|
||||
syntax match pfmainRef "$\<postscreen_expansion_filter\>"
|
||||
syntax match pfmainRef "$\<postscreen_forbidden_commands\>"
|
||||
@@ -1102,9 +1204,8 @@ syntax match pfmainRef "$\<postscreen_post_queue_limit\>"
|
||||
syntax match pfmainRef "$\<postscreen_pre_queue_limit\>"
|
||||
syntax match pfmainRef "$\<postscreen_reject_footer\>"
|
||||
syntax match pfmainRef "$\<postscreen_tls_security_level\>"
|
||||
syntax match pfmainRef "$\<lmtp_tls_secure_cert_match\>"
|
||||
syntax match pfmainRef "$\<lmtp_tls_security_level\>"
|
||||
syntax match pfmainRef "$\<lmtp_tls_session_cache_database\>"
|
||||
syntax match pfmainRef "$\<postscreen_upstream_proxy_protocol\>"
|
||||
syntax match pfmainRef "$\<postscreen_upstream_proxy_timeout\>"
|
||||
syntax match pfmainRef "$\<postscreen_use_tls\>"
|
||||
syntax match pfmainRef "$\<postscreen_watchdog_timeout\>"
|
||||
syntax match pfmainRef "$\<postscreen_whitelist_interfaces\>"
|
||||
@@ -1119,7 +1220,9 @@ syntax match pfmainRef "$\<proxy_write_maps\>"
|
||||
syntax match pfmainRef "$\<proxymap_service_name\>"
|
||||
syntax match pfmainRef "$\<proxywrite_service_name\>"
|
||||
syntax match pfmainRef "$\<qmgr_clog_warn_time\>"
|
||||
syntax match pfmainRef "$\<qmgr_daemon_timeout\>"
|
||||
syntax match pfmainRef "$\<qmgr_fudge_factor\>"
|
||||
syntax match pfmainRef "$\<qmgr_ipc_timeout\>"
|
||||
syntax match pfmainRef "$\<qmgr_message_active_limit\>"
|
||||
syntax match pfmainRef "$\<qmgr_message_recipient_limit\>"
|
||||
syntax match pfmainRef "$\<qmgr_message_recipient_minimum\>"
|
||||
@@ -1159,17 +1262,21 @@ syntax match pfmainRef "$\<resolve_numeric_domain\>"
|
||||
syntax match pfmainRef "$\<rewrite_service_name\>"
|
||||
syntax match pfmainRef "$\<sample_directory\>"
|
||||
syntax match pfmainRef "$\<send_cyrus_sasl_authzid\>"
|
||||
syntax match pfmainRef "$\<sender_based_routing\>"
|
||||
syntax match pfmainRef "$\<sender_bcc_maps\>"
|
||||
syntax match pfmainRef "$\<sender_canonical_classes\>"
|
||||
syntax match pfmainRef "$\<sender_canonical_maps\>"
|
||||
syntax match pfmainRef "$\<sender_dependent_default_transport_maps\>"
|
||||
syntax match pfmainRef "$\<sender_dependent_relayhost_maps\>"
|
||||
syntax match pfmainRef "$\<sendmail_fix_line_endings\>"
|
||||
syntax match pfmainRef "$\<sendmail_path\>"
|
||||
syntax match pfmainRef "$\<service_throttle_time\>"
|
||||
syntax match pfmainRef "$\<setgid_group\>"
|
||||
syntax match pfmainRef "$\<shlib_directory\>"
|
||||
syntax match pfmainRef "$\<show_user_unknown_table_name\>"
|
||||
syntax match pfmainRef "$\<showq_service_name\>"
|
||||
syntax match pfmainRef "$\<smtp_address_preference\>"
|
||||
syntax match pfmainRef "$\<smtp_address_verify_target\>"
|
||||
syntax match pfmainRef "$\<smtp_always_send_ehlo\>"
|
||||
syntax match pfmainRef "$\<smtp_bind_address\>"
|
||||
syntax match pfmainRef "$\<smtp_bind_address6\>"
|
||||
@@ -1179,16 +1286,20 @@ syntax match pfmainRef "$\<smtp_connect_timeout\>"
|
||||
syntax match pfmainRef "$\<smtp_connection_cache_destinations\>"
|
||||
syntax match pfmainRef "$\<smtp_connection_cache_on_demand\>"
|
||||
syntax match pfmainRef "$\<smtp_connection_cache_time_limit\>"
|
||||
syntax match pfmainRef "$\<smtp_connection_reuse_count_limit\>"
|
||||
syntax match pfmainRef "$\<smtp_connection_reuse_time_limit\>"
|
||||
syntax match pfmainRef "$\<smtp_data_done_timeout\>"
|
||||
syntax match pfmainRef "$\<smtp_data_init_timeout\>"
|
||||
syntax match pfmainRef "$\<smtp_data_xfer_timeout\>"
|
||||
syntax match pfmainRef "$\<smtp_defer_if_no_mx_address_found\>"
|
||||
syntax match pfmainRef "$\<smtp_delivery_status_filter\>"
|
||||
syntax match pfmainRef "$\<smtp_destination_concurrency_limit\>"
|
||||
syntax match pfmainRef "$\<smtp_destination_recipient_limit\>"
|
||||
syntax match pfmainRef "$\<smtp_discard_ehlo_keyword_address_maps\>"
|
||||
syntax match pfmainRef "$\<smtp_discard_ehlo_keywords\>"
|
||||
syntax match pfmainRef "$\<smtp_dns_reply_filter\>"
|
||||
syntax match pfmainRef "$\<smtp_dns_resolver_options\>"
|
||||
syntax match pfmainRef "$\<smtp_dns_support_level\>"
|
||||
syntax match pfmainRef "$\<smtp_enforce_tls\>"
|
||||
syntax match pfmainRef "$\<smtp_fallback_relay\>"
|
||||
syntax match pfmainRef "$\<smtp_generic_maps\>"
|
||||
@@ -1203,6 +1314,7 @@ syntax match pfmainRef "$\<smtp_mx_address_limit\>"
|
||||
syntax match pfmainRef "$\<smtp_mx_session_limit\>"
|
||||
syntax match pfmainRef "$\<smtp_nested_header_checks\>"
|
||||
syntax match pfmainRef "$\<smtp_never_send_ehlo\>"
|
||||
syntax match pfmainRef "$\<smtp_per_record_deadline\>"
|
||||
syntax match pfmainRef "$\<smtp_pix_workaround_delay_time\>"
|
||||
syntax match pfmainRef "$\<smtp_pix_workaround_maps\>"
|
||||
syntax match pfmainRef "$\<smtp_pix_workaround_threshold_time\>"
|
||||
@@ -1224,8 +1336,10 @@ syntax match pfmainRef "$\<smtp_sasl_security_options\>"
|
||||
syntax match pfmainRef "$\<smtp_sasl_tls_security_options\>"
|
||||
syntax match pfmainRef "$\<smtp_sasl_tls_verified_security_options\>"
|
||||
syntax match pfmainRef "$\<smtp_sasl_type\>"
|
||||
syntax match pfmainRef "$\<smtp_send_dummy_mail_auth\>"
|
||||
syntax match pfmainRef "$\<smtp_send_xforward_command\>"
|
||||
syntax match pfmainRef "$\<smtp_sender_dependent_authentication\>"
|
||||
syntax match pfmainRef "$\<smtp_skip_4xx_greeting\>"
|
||||
syntax match pfmainRef "$\<smtp_skip_5xx_greeting\>"
|
||||
syntax match pfmainRef "$\<smtp_skip_quit_response\>"
|
||||
syntax match pfmainRef "$\<smtp_starttls_timeout\>"
|
||||
@@ -1243,6 +1357,7 @@ syntax match pfmainRef "$\<smtp_tls_enforce_peername\>"
|
||||
syntax match pfmainRef "$\<smtp_tls_exclude_ciphers\>"
|
||||
syntax match pfmainRef "$\<smtp_tls_fingerprint_cert_match\>"
|
||||
syntax match pfmainRef "$\<smtp_tls_fingerprint_digest\>"
|
||||
syntax match pfmainRef "$\<smtp_tls_force_insecure_host_tlsa_lookup\>"
|
||||
syntax match pfmainRef "$\<smtp_tls_key_file\>"
|
||||
syntax match pfmainRef "$\<smtp_tls_loglevel\>"
|
||||
syntax match pfmainRef "$\<smtp_tls_mandatory_ciphers\>"
|
||||
@@ -1257,7 +1372,9 @@ syntax match pfmainRef "$\<smtp_tls_secure_cert_match\>"
|
||||
syntax match pfmainRef "$\<smtp_tls_security_level\>"
|
||||
syntax match pfmainRef "$\<smtp_tls_session_cache_database\>"
|
||||
syntax match pfmainRef "$\<smtp_tls_session_cache_timeout\>"
|
||||
syntax match pfmainRef "$\<smtp_tls_trust_anchor_file\>"
|
||||
syntax match pfmainRef "$\<smtp_tls_verify_cert_match\>"
|
||||
syntax match pfmainRef "$\<smtp_tls_wrappermode\>"
|
||||
syntax match pfmainRef "$\<smtp_use_tls\>"
|
||||
syntax match pfmainRef "$\<smtp_xforward_timeout\>"
|
||||
syntax match pfmainRef "$\<smtpd_authorized_verp_clients\>"
|
||||
@@ -1278,6 +1395,7 @@ syntax match pfmainRef "$\<smtpd_delay_open_until_valid_rcpt\>"
|
||||
syntax match pfmainRef "$\<smtpd_delay_reject\>"
|
||||
syntax match pfmainRef "$\<smtpd_discard_ehlo_keyword_address_maps\>"
|
||||
syntax match pfmainRef "$\<smtpd_discard_ehlo_keywords\>"
|
||||
syntax match pfmainRef "$\<smtpd_dns_reply_filter\>"
|
||||
syntax match pfmainRef "$\<smtpd_end_of_data_restrictions\>"
|
||||
syntax match pfmainRef "$\<smtpd_enforce_tls\>"
|
||||
syntax match pfmainRef "$\<smtpd_error_sleep_time\>"
|
||||
@@ -1289,14 +1407,19 @@ syntax match pfmainRef "$\<smtpd_helo_required\>"
|
||||
syntax match pfmainRef "$\<smtpd_helo_restrictions\>"
|
||||
syntax match pfmainRef "$\<smtpd_history_flush_threshold\>"
|
||||
syntax match pfmainRef "$\<smtpd_junk_command_limit\>"
|
||||
syntax match pfmainRef "$\<smtpd_log_access_permit_actions\>"
|
||||
syntax match pfmainRef "$\<smtpd_milters\>"
|
||||
syntax match pfmainRef "$\<smtpd_noop_commands\>"
|
||||
syntax match pfmainRef "$\<smtpd_null_access_lookup_key\>"
|
||||
syntax match pfmainRef "$\<smtpd_peername_lookup\>"
|
||||
syntax match pfmainRef "$\<smtpd_per_record_deadline\>"
|
||||
syntax match pfmainRef "$\<smtpd_policy_service_default_action\>"
|
||||
syntax match pfmainRef "$\<smtpd_policy_service_max_idle\>"
|
||||
syntax match pfmainRef "$\<smtpd_policy_service_max_ttl\>"
|
||||
syntax match pfmainRef "$\<smtpd_policy_service_request_limit\>"
|
||||
syntax match pfmainRef "$\<smtpd_policy_service_retry_delay\>"
|
||||
syntax match pfmainRef "$\<smtpd_policy_service_timeout\>"
|
||||
syntax match pfmainRef "$\<smtpd_policy_service_try_limit\>"
|
||||
syntax match pfmainRef "$\<smtpd_proxy_ehlo\>"
|
||||
syntax match pfmainRef "$\<smtpd_proxy_filter\>"
|
||||
syntax match pfmainRef "$\<smtpd_proxy_options\>"
|
||||
@@ -1307,13 +1430,16 @@ syntax match pfmainRef "$\<smtpd_recipient_restrictions\>"
|
||||
syntax match pfmainRef "$\<smtpd_reject_footer\>"
|
||||
syntax match pfmainRef "$\<smtpd_reject_unlisted_recipient\>"
|
||||
syntax match pfmainRef "$\<smtpd_reject_unlisted_sender\>"
|
||||
syntax match pfmainRef "$\<smtpd_relay_restrictions\>"
|
||||
syntax match pfmainRef "$\<smtpd_restriction_classes\>"
|
||||
syntax match pfmainRef "$\<smtpd_sasl_application_name\>"
|
||||
syntax match pfmainRef "$\<smtpd_sasl_auth_enable\>"
|
||||
syntax match pfmainRef "$\<smtpd_sasl_authenticated_header\>"
|
||||
syntax match pfmainRef "$\<smtpd_sasl_exceptions_networks\>"
|
||||
syntax match pfmainRef "$\<smtpd_sasl_local_domain\>"
|
||||
syntax match pfmainRef "$\<smtpd_sasl_path\>"
|
||||
syntax match pfmainRef "$\<smtpd_sasl_security_options\>"
|
||||
syntax match pfmainRef "$\<smtpd_sasl_service\>"
|
||||
syntax match pfmainRef "$\<smtpd_sasl_tls_security_options\>"
|
||||
syntax match pfmainRef "$\<smtpd_sasl_type\>"
|
||||
syntax match pfmainRef "$\<smtpd_sender_login_maps\>"
|
||||
@@ -1352,21 +1478,21 @@ syntax match pfmainRef "$\<smtpd_tls_security_level\>"
|
||||
syntax match pfmainRef "$\<smtpd_tls_session_cache_database\>"
|
||||
syntax match pfmainRef "$\<smtpd_tls_session_cache_timeout\>"
|
||||
syntax match pfmainRef "$\<smtpd_tls_wrappermode\>"
|
||||
syntax match pfmainRef "$\<smtpd_upstream_proxy_protocol\>"
|
||||
syntax match pfmainRef "$\<smtpd_upstream_proxy_timeout\>"
|
||||
syntax match pfmainRef "$\<smtpd_use_tls\>"
|
||||
syntax match pfmainRef "$\<smtputf8_autodetect_classes\>"
|
||||
syntax match pfmainRef "$\<smtputf8_enable\>"
|
||||
syntax match pfmainRef "$\<soft_bounce\>"
|
||||
syntax match pfmainRef "$\<stale_lock_time\>"
|
||||
syntax match pfmainRef "$\<stress\>"
|
||||
syntax match pfmainRef "$\<strict_7bit_headers\>"
|
||||
syntax match pfmainRef "$\<strict_8bitmime\>"
|
||||
syntax match pfmainRef "$\<strict_8bitmime_body\>"
|
||||
syntax match pfmainRef "$\<strict_mime_encoding_domain\>"
|
||||
syntax match pfmainRef "$\<strict_rfc821_envelopes\>"
|
||||
syntax match pfmainRef "$\<strict_7bit_headers\>"
|
||||
syntax match pfmainRef "$\<strict_8bitmime\>"
|
||||
syntax match pfmainRef "$\<strict_8bitmime_body\>"
|
||||
syntax match pfmainRef "$\<strict_mailbox_ownership\>"
|
||||
syntax match pfmainRef "$\<strict_mime_encoding_domain\>"
|
||||
syntax match pfmainRef "$\<strict_rfc821_envelopes\>"
|
||||
syntax match pfmainRef "$\<strict_smtputf8\>"
|
||||
syntax match pfmainRef "$\<sun_mailtool_compatibility\>"
|
||||
syntax match pfmainRef "$\<swap_bangpath\>"
|
||||
syntax match pfmainRef "$\<syslog_facility\>"
|
||||
@@ -1374,11 +1500,15 @@ syntax match pfmainRef "$\<syslog_name\>"
|
||||
syntax match pfmainRef "$\<tcp_windowsize\>"
|
||||
syntax match pfmainRef "$\<tls_append_default_CA\>"
|
||||
syntax match pfmainRef "$\<tls_daemon_random_bytes\>"
|
||||
syntax match pfmainRef "$\<tls_dane_digest_agility\>"
|
||||
syntax match pfmainRef "$\<tls_dane_digests\>"
|
||||
syntax match pfmainRef "$\<tls_dane_trust_anchor_digest_enable\>"
|
||||
syntax match pfmainRef "$\<tls_disable_workarounds\>"
|
||||
syntax match pfmainRef "$\<tls_eecdh_strong_curve\>"
|
||||
syntax match pfmainRef "$\<tls_eecdh_ultra_curve\>"
|
||||
syntax match pfmainRef "$\<tls_export_cipherlist\>"
|
||||
syntax match pfmainRef "$\<tls_high_cipherlist\>"
|
||||
syntax match pfmainRef "$\<tls_legacy_public_key_fingerprints\>"
|
||||
syntax match pfmainRef "$\<tls_low_cipherlist\>"
|
||||
syntax match pfmainRef "$\<tls_medium_cipherlist\>"
|
||||
syntax match pfmainRef "$\<tls_null_cipherlist\>"
|
||||
@@ -1388,6 +1518,10 @@ syntax match pfmainRef "$\<tls_random_exchange_name\>"
|
||||
syntax match pfmainRef "$\<tls_random_prng_update_period\>"
|
||||
syntax match pfmainRef "$\<tls_random_reseed_period\>"
|
||||
syntax match pfmainRef "$\<tls_random_source\>"
|
||||
syntax match pfmainRef "$\<tls_session_ticket_cipher\>"
|
||||
syntax match pfmainRef "$\<tls_ssl_options\>"
|
||||
syntax match pfmainRef "$\<tls_wildcard_matches_multiple_labels\>"
|
||||
syntax match pfmainRef "$\<tlsmgr_service_name\>"
|
||||
syntax match pfmainRef "$\<tlsproxy_enforce_tls\>"
|
||||
syntax match pfmainRef "$\<tlsproxy_service_name\>"
|
||||
syntax match pfmainRef "$\<tlsproxy_tls_CAfile\>"
|
||||
@@ -1435,6 +1569,7 @@ syntax match pfmainRef "$\<transport_recipient_limit\>"
|
||||
syntax match pfmainRef "$\<transport_recipient_refill_delay\>"
|
||||
syntax match pfmainRef "$\<transport_recipient_refill_limit\>"
|
||||
syntax match pfmainRef "$\<transport_retry_time\>"
|
||||
syntax match pfmainRef "$\<transport_time_limit\>"
|
||||
syntax match pfmainRef "$\<trigger_timeout\>"
|
||||
syntax match pfmainRef "$\<undisclosed_recipients_header\>"
|
||||
syntax match pfmainRef "$\<unknown_address_reject_code\>"
|
||||
@@ -1455,10 +1590,12 @@ syntax match pfmainRef "$\<unverified_sender_reject_code\>"
|
||||
syntax match pfmainRef "$\<unverified_sender_reject_reason\>"
|
||||
syntax match pfmainRef "$\<unverified_sender_tempfail_action\>"
|
||||
syntax match pfmainRef "$\<verp_delimiter_filter\>"
|
||||
syntax match pfmainRef "$\<virtual_alias_address_length_limit\>"
|
||||
syntax match pfmainRef "$\<virtual_alias_domains\>"
|
||||
syntax match pfmainRef "$\<virtual_alias_expansion_limit\>"
|
||||
syntax match pfmainRef "$\<virtual_alias_maps\>"
|
||||
syntax match pfmainRef "$\<virtual_alias_recursion_limit\>"
|
||||
syntax match pfmainRef "$\<virtual_delivery_status_filter\>"
|
||||
syntax match pfmainRef "$\<virtual_destination_concurrency_limit\>"
|
||||
syntax match pfmainRef "$\<virtual_destination_recipient_limit\>"
|
||||
syntax match pfmainRef "$\<virtual_gid_maps\>"
|
||||
@@ -1467,39 +1604,62 @@ syntax match pfmainRef "$\<virtual_mailbox_domains\>"
|
||||
syntax match pfmainRef "$\<virtual_mailbox_limit\>"
|
||||
syntax match pfmainRef "$\<virtual_mailbox_lock\>"
|
||||
syntax match pfmainRef "$\<virtual_mailbox_maps\>"
|
||||
syntax match pfmainRef "$\<virtual_maps\>"
|
||||
syntax match pfmainRef "$\<virtual_minimum_uid\>"
|
||||
syntax match pfmainRef "$\<virtual_transport\>"
|
||||
syntax match pfmainRef "$\<virtual_uid_maps\>"
|
||||
|
||||
syntax keyword pfmainWord accept
|
||||
syntax keyword pfmainWord all
|
||||
syntax keyword pfmainWord always
|
||||
syntax keyword pfmainWord check_address_map
|
||||
syntax keyword pfmainWord check_ccert_access
|
||||
syntax keyword pfmainWord check_client_a_access
|
||||
syntax keyword pfmainWord check_client_access
|
||||
syntax keyword pfmainWord check_client_mx_access
|
||||
syntax keyword pfmainWord check_client_ns_access
|
||||
syntax keyword pfmainWord check_etrn_access
|
||||
syntax keyword pfmainWord check_helo_a_access
|
||||
syntax keyword pfmainWord check_helo_access
|
||||
syntax keyword pfmainWord check_helo_mx_access
|
||||
syntax keyword pfmainWord check_helo_ns_access
|
||||
syntax keyword pfmainWord check_policy_service
|
||||
syntax keyword pfmainWord check_recipient_a_access
|
||||
syntax keyword pfmainWord check_recipient_access
|
||||
syntax keyword pfmainWord check_recipient_maps
|
||||
syntax keyword pfmainWord check_recipient_mx_access
|
||||
syntax keyword pfmainWord check_recipient_ns_access
|
||||
syntax keyword pfmainWord check_relay_domains
|
||||
syntax keyword pfmainWord check_reverse_client_hostname_a_access
|
||||
syntax keyword pfmainWord check_reverse_client_hostname_access
|
||||
syntax keyword pfmainWord check_reverse_client_hostname_mx_access
|
||||
syntax keyword pfmainWord check_reverse_client_hostname_ns_access
|
||||
syntax keyword pfmainWord check_sasl_access
|
||||
syntax keyword pfmainWord check_sender_a_access
|
||||
syntax keyword pfmainWord check_sender_access
|
||||
syntax keyword pfmainWord check_sender_mx_access
|
||||
syntax keyword pfmainWord check_sender_ns_access
|
||||
syntax keyword pfmainWord class
|
||||
syntax keyword pfmainWord client_address
|
||||
syntax keyword pfmainWord client_port
|
||||
syntax keyword pfmainWord dane
|
||||
syntax keyword pfmainWord dane-only
|
||||
syntax keyword pfmainWord defer
|
||||
syntax keyword pfmainWord defer_if_permit
|
||||
syntax keyword pfmainWord defer_if_reject
|
||||
syntax keyword pfmainWord defer_unauth_destination
|
||||
syntax keyword pfmainWord disabled
|
||||
syntax keyword pfmainWord dns
|
||||
syntax keyword pfmainWord dnssec
|
||||
syntax keyword pfmainWord drop
|
||||
syntax keyword pfmainWord dunno
|
||||
syntax keyword pfmainWord enabled
|
||||
syntax keyword pfmainWord encrypt
|
||||
syntax keyword pfmainWord enforce
|
||||
syntax keyword pfmainWord envelope_recipient
|
||||
syntax keyword pfmainWord envelope_sender
|
||||
syntax keyword pfmainWord export
|
||||
syntax keyword pfmainWord fingerprint
|
||||
syntax keyword pfmainWord header_recipient
|
||||
syntax keyword pfmainWord header_sender
|
||||
syntax keyword pfmainWord high
|
||||
@@ -1509,22 +1669,37 @@ syntax keyword pfmainWord ipv4
|
||||
syntax keyword pfmainWord ipv6
|
||||
syntax keyword pfmainWord localtime
|
||||
syntax keyword pfmainWord low
|
||||
syntax keyword pfmainWord may
|
||||
syntax keyword pfmainWord maybe
|
||||
syntax keyword pfmainWord medium
|
||||
syntax keyword pfmainWord native
|
||||
syntax keyword pfmainWord never
|
||||
syntax keyword pfmainWord no_address_mappings
|
||||
syntax keyword pfmainWord no_header_body_checks
|
||||
syntax keyword pfmainWord no_header_reply
|
||||
syntax keyword pfmainWord no_milters
|
||||
syntax keyword pfmainWord no_unknown_recipient_checks
|
||||
syntax keyword pfmainWord none
|
||||
syntax keyword pfmainWord null
|
||||
syntax keyword pfmainWord off
|
||||
syntax keyword pfmainWord on
|
||||
syntax keyword pfmainWord permit
|
||||
syntax keyword pfmainWord permit_auth_destination
|
||||
syntax keyword pfmainWord permit_dnswl_client
|
||||
syntax keyword pfmainWord permit_inet_interfaces
|
||||
syntax keyword pfmainWord permit_mx_backup
|
||||
syntax keyword pfmainWord permit_mynetworks
|
||||
syntax keyword pfmainWord permit_naked_ip_address
|
||||
syntax keyword pfmainWord permit_rhswl_client
|
||||
syntax keyword pfmainWord permit_sasl_authenticated
|
||||
syntax keyword pfmainWord permit_tls_all_clientcerts
|
||||
syntax keyword pfmainWord permit_tls_clientcerts
|
||||
syntax keyword pfmainWord quarantine
|
||||
syntax keyword pfmainWord reject
|
||||
syntax keyword pfmainWord reject_authenticated_sender_login_mismatch
|
||||
syntax keyword pfmainWord reject_invalid_helo_hostname
|
||||
syntax keyword pfmainWord reject_invalid_hostname
|
||||
syntax keyword pfmainWord reject_known_sender_login_mismatch
|
||||
syntax keyword pfmainWord reject_maps_rbl
|
||||
syntax keyword pfmainWord reject_multi_recipient_bounce
|
||||
syntax keyword pfmainWord reject_non_fqdn_helo_hostname
|
||||
@@ -1537,10 +1712,12 @@ syntax keyword pfmainWord reject_rbl_client
|
||||
syntax keyword pfmainWord reject_rhsbl_client
|
||||
syntax keyword pfmainWord reject_rhsbl_helo
|
||||
syntax keyword pfmainWord reject_rhsbl_recipient
|
||||
syntax keyword pfmainWord reject_rhsbl_reverse_client
|
||||
syntax keyword pfmainWord reject_rhsbl_sender
|
||||
syntax keyword pfmainWord reject_sender_login_mismatch
|
||||
syntax keyword pfmainWord reject_unauth_destination
|
||||
syntax keyword pfmainWord reject_unauth_pipelining
|
||||
syntax keyword pfmainWord reject_unauthenticated_sender_login_mismatch
|
||||
syntax keyword pfmainWord reject_unknown_address
|
||||
syntax keyword pfmainWord reject_unknown_client
|
||||
syntax keyword pfmainWord reject_unknown_client_hostname
|
||||
@@ -1554,11 +1731,15 @@ syntax keyword pfmainWord reject_unlisted_recipient
|
||||
syntax keyword pfmainWord reject_unlisted_sender
|
||||
syntax keyword pfmainWord reject_unverified_recipient
|
||||
syntax keyword pfmainWord reject_unverified_sender
|
||||
syntax keyword pfmainWord secure
|
||||
syntax keyword pfmainWord server_name
|
||||
syntax keyword pfmainWord sleep
|
||||
syntax keyword pfmainWord smtpd_access_maps
|
||||
syntax keyword pfmainWord server_name
|
||||
syntax keyword pfmainWord speed_adjust
|
||||
syntax keyword pfmainWord strong
|
||||
syntax keyword pfmainWord subnet
|
||||
syntax keyword pfmainWord tempfail
|
||||
syntax keyword pfmainWord ultra
|
||||
syntax keyword pfmainWord warn_if_reject
|
||||
syntax keyword pfmainWord CRYPTOPRO_TLSEXT_BUG
|
||||
syntax keyword pfmainWord DONT_INSERT_EMPTY_FRAGMENTS
|
||||
@@ -1574,7 +1755,7 @@ syntax keyword pfmainWord TLS_BLOCK_PADDING_BUG
|
||||
syntax keyword pfmainWord TLS_D5_BUG
|
||||
syntax keyword pfmainWord TLS_ROLLBACK_BUG
|
||||
|
||||
syntax keyword pfmainDict btree cidr environ hash nis pcre proxy regexp sdbm sdbm static tcp unix
|
||||
syntax keyword pfmainDict btree cidr environ hash nis pcre proxy regexp sdbm static tcp unix
|
||||
syntax keyword pfmainQueueDir incoming active deferred corrupt hold
|
||||
syntax keyword pfmainTransport smtp lmtp unix local relay uucp virtual
|
||||
syntax keyword pfmainLock fcntl flock dotlock
|
||||
@@ -1588,26 +1769,50 @@ syntax match pfmainVariable "\$\w\+" contains=pfmainRef
|
||||
|
||||
syntax match pfmainSpecial "\<alias\>"
|
||||
syntax match pfmainSpecial "\<canonical\>"
|
||||
syntax match pfmainSpecial "\<forward\>"
|
||||
syntax match pfmainSpecial "\<generic\>"
|
||||
syntax match pfmainSpecial "\<include\>"
|
||||
syntax match pfmainSpecial "\<virtual\>"
|
||||
|
||||
syntax match pfmainSpecial "\<delay_dotcrlf\>"
|
||||
syntax match pfmainSpecial "\<disable_esmtp\>"
|
||||
|
||||
syntax match pfmainSpecial "\<res_defnames\>"
|
||||
syntax match pfmainSpecial "\<res_dnsrch\>"
|
||||
|
||||
syntax match pfmainSpecial "\<command\>"
|
||||
syntax match pfmainSpecial "\<file\>"
|
||||
syntax match pfmainSpecial "\<forward\>"
|
||||
|
||||
syntax match pfmainSpecial "\<forward_secrecy\>"
|
||||
syntax match pfmainSpecial "\<mutual_auth\>"
|
||||
syntax match pfmainSpecial "\<noactive\>"
|
||||
syntax match pfmainSpecial "\<noanonymous\>"
|
||||
syntax match pfmainSpecial "\<nodictionary\>"
|
||||
syntax match pfmainSpecial "\<noplaintext\>"
|
||||
|
||||
syntax match pfmainSpecial "\<bounce\>"
|
||||
syntax match pfmainSpecial "\<2bounce\>"
|
||||
syntax match pfmainSpecial "\<data\>"
|
||||
syntax match pfmainSpecial "\<delay\>"
|
||||
syntax match pfmainSpecial "\<policy\>"
|
||||
syntax match pfmainSpecial "\<protocol\>"
|
||||
syntax match pfmainSpecial "\<resource\>"
|
||||
syntax match pfmainSpecial "\<software\>"
|
||||
|
||||
syntax match pfmainSpecial "\<bounce\>"
|
||||
syntax match pfmainSpecial "\<cleanup\>"
|
||||
syntax match pfmainSpecial "\<cyrus\>"
|
||||
syntax match pfmainSpecial "\<defer\>"
|
||||
syntax match pfmainSpecial "\<error\>"
|
||||
syntax match pfmainSpecial "\<flush\>"
|
||||
syntax match pfmainSpecial "\<notify\>"
|
||||
syntax match pfmainSpecial "\<pickup\>"
|
||||
syntax match pfmainSpecial "\<postdrop\>"
|
||||
syntax match pfmainSpecial "\<qmgr\>"
|
||||
syntax match pfmainSpecial "\<qmqpd\>"
|
||||
syntax match pfmainSpecial "\<rewrite\>"
|
||||
syntax match pfmainSpecial "\<scache\>"
|
||||
syntax match pfmainSpecial "\<sendmail\>"
|
||||
syntax match pfmainSpecial "\<showq\>"
|
||||
syntax match pfmainSpecial "\<smtpd\>"
|
||||
syntax match pfmainSpecial "\<trace\>"
|
||||
syntax match pfmainSpecial "\<verify\>"
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
" Vim syntax file
|
||||
" Language: php PHP 3/4/5
|
||||
" Maintainer: Jason Woofenden <jason@jasonwoof.com>
|
||||
" Last Change: Sep 18, 2014
|
||||
" URL: https://gitorious.org/jasonwoof/vim-syntax/blobs/master/php.vim
|
||||
" Last Change: Mar 24, 2015
|
||||
" URL: https://jasonwoof.com/gitweb/?p=vim-syntax.git;a=blob;f=php.vim;hb=HEAD
|
||||
" Former Maintainers: Peter Hodge <toomuchphp-vim@yahoo.com>
|
||||
" Debian VIM Maintainers <pkg-vim-maintainers@lists.alioth.debian.org>
|
||||
"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" Vim syntax file
|
||||
" Language: po (gettext)
|
||||
" Maintainer: Dwayne Bailey <dwayne@translate.org.za>
|
||||
" Last Change: 2012 Apr 30
|
||||
" Last Change: 2015 Jun 07
|
||||
" Contributors: Dwayne Bailey (Most advanced syntax highlighting)
|
||||
" Leonardo Fontenelle (Spell checking)
|
||||
" Nam SungHyun <namsh@kldp.org> (Original maintainer)
|
||||
@@ -52,6 +52,9 @@ syn match poCommentTranslator "^# .*$" contains=poCopyrightUnset
|
||||
syn match poCommentAutomatic "^#\..*$"
|
||||
syn match poCommentSources "^#:.*$"
|
||||
syn match poCommentFlags "^#,.*$" contains=poFlagFuzzy
|
||||
syn match poDiffOld '\(^#| "[^{]*+}\|{+[^}]*+}\|{+[^}]*\|"$\)' contained
|
||||
syn match poDiffNew '\(^#| "[^{]*-}\|{-[^}]*-}\|{-[^}]*\|"$\)' contained
|
||||
syn match poCommentDiff "^#|.*$" contains=poDiffOld,poDiffNew
|
||||
|
||||
" Translations (also includes header fields as they appear in a translation msgstr)
|
||||
syn region poCommentKDE start=+"_: +ms=s+1 end="\\n" end="\"\n^msgstr"me=s-1 contained
|
||||
@@ -94,8 +97,11 @@ if version >= 508 || !exists("did_po_syn_inits")
|
||||
HiLink poCommentAutomatic Comment
|
||||
HiLink poCommentTranslator Comment
|
||||
HiLink poCommentFlags Special
|
||||
HiLink poCommentDiff Comment
|
||||
HiLink poCopyrightUnset Todo
|
||||
HiLink poFlagFuzzy Todo
|
||||
HiLink poDiffOld Todo
|
||||
HiLink poDiffNew Special
|
||||
HiLink poObsolete Comment
|
||||
|
||||
HiLink poStatementMsgid Statement
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
" Vim syntax file
|
||||
" Language: Python
|
||||
" Maintainer: Neil Schemenauer <nas@python.ca>
|
||||
" Last Change: 2014 Jul 16
|
||||
" Credits: Zvezdan Petkovic <zpetkovic@acm.org>
|
||||
" Neil Schemenauer <nas@python.ca>
|
||||
" Maintainer: Zvezdan Petkovic <zpetkovic@acm.org>
|
||||
" Last Change: 2015 Jun 19
|
||||
" Credits: Neil Schemenauer <nas@python.ca>
|
||||
" Dmitry Vasiliev
|
||||
"
|
||||
" This version is a major rewrite by Zvezdan Petkovic.
|
||||
@@ -95,16 +94,16 @@ syn match pythonComment "#.*$" contains=pythonTodo,@Spell
|
||||
syn keyword pythonTodo FIXME NOTE NOTES TODO XXX contained
|
||||
|
||||
" Triple-quoted strings can contain doctests.
|
||||
syn region pythonString
|
||||
syn region pythonString matchgroup=pythonQuotes
|
||||
\ start=+[uU]\=\z(['"]\)+ end="\z1" skip="\\\\\|\\\z1"
|
||||
\ contains=pythonEscape,@Spell
|
||||
syn region pythonString
|
||||
syn region pythonString matchgroup=pythonTripleQuotes
|
||||
\ start=+[uU]\=\z('''\|"""\)+ end="\z1" keepend
|
||||
\ contains=pythonEscape,pythonSpaceError,pythonDoctest,@Spell
|
||||
syn region pythonRawString
|
||||
syn region pythonRawString matchgroup=pythonQuotes
|
||||
\ start=+[uU]\=[rR]\z(['"]\)+ end="\z1" skip="\\\\\|\\\z1"
|
||||
\ contains=@Spell
|
||||
syn region pythonRawString
|
||||
syn region pythonRawString matchgroup=pythonTripleQuotes
|
||||
\ start=+[uU]\=[rR]\z('''\|"""\)+ end="\z1" keepend
|
||||
\ contains=pythonSpaceError,pythonDoctest,@Spell
|
||||
|
||||
@@ -113,7 +112,7 @@ syn match pythonEscape "\\\o\{1,3}" contained
|
||||
syn match pythonEscape "\\x\x\{2}" contained
|
||||
syn match pythonEscape "\%(\\u\x\{4}\|\\U\x\{8}\)" contained
|
||||
" Python allows case-insensitive Unicode IDs: http://www.unicode.org/charts/
|
||||
syn match pythonEscape "\\N{.\{-}}" contained
|
||||
syn match pythonEscape "\\N{\a\+\%(\s\a\+\)*}" contained
|
||||
syn match pythonEscape "\\$"
|
||||
|
||||
if exists("python_highlight_all")
|
||||
@@ -274,6 +273,8 @@ if version >= 508 || !exists("did_python_syn_inits")
|
||||
HiLink pythonTodo Todo
|
||||
HiLink pythonString String
|
||||
HiLink pythonRawString String
|
||||
HiLink pythonQuotes String
|
||||
HiLink pythonTripleQuotes pythonQuotes
|
||||
HiLink pythonEscape Special
|
||||
if !exists("python_no_number_highlight")
|
||||
HiLink pythonNumber Number
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
" Vim syntax file
|
||||
" Language: M$ Resource files (*.rc)
|
||||
" Maintainer: Heiko Erhardt <Heiko.Erhardt@munich.netsurf.de>
|
||||
" Last Change: 2001 May 09
|
||||
" Maintainer: Christian Brabandt
|
||||
" Last Change: 2015-05-29
|
||||
" Repository: https://github.com/chrisbra/vim-rc-syntax
|
||||
" License: Vim (see :h license)
|
||||
" Previous Maintainer: Heiko Erhardt <Heiko.Erhardt@munich.netsurf.de>
|
||||
|
||||
" This file is based on the c.vim
|
||||
|
||||
@@ -21,7 +24,7 @@ syn keyword rcMainObject MENU ACCELERATORS TOOLBAR DIALOG
|
||||
syn keyword rcMainObject STRINGTABLE MESSAGETABLE RCDATA DLGINIT DESIGNINFO
|
||||
|
||||
syn keyword rcSubObject POPUP MENUITEM SEPARATOR
|
||||
syn keyword rcSubObject CONTROL LTEXT CTEXT EDITTEXT
|
||||
syn keyword rcSubObject CONTROL LTEXT CTEXT RTEXT EDITTEXT
|
||||
syn keyword rcSubObject BUTTON PUSHBUTTON DEFPUSHBUTTON GROUPBOX LISTBOX COMBOBOX
|
||||
syn keyword rcSubObject FILEVERSION PRODUCTVERSION FILEFLAGSMASK FILEFLAGS FILEOS
|
||||
syn keyword rcSubObject FILETYPE FILESUBTYPE
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
" Language: shell (sh) Korn shell (ksh) bash (sh)
|
||||
" Maintainer: Charles E. Campbell <NdrOchipS@PcampbellAfamily.Mbiz>
|
||||
" Previous Maintainer: Lennart Schultz <Lennart.Schultz@ecmwf.int>
|
||||
" Last Change: Jan 08, 2015
|
||||
" Version: 134
|
||||
" Last Change: May 29, 2015
|
||||
" Version: 137
|
||||
" URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_SH
|
||||
" For options and settings, please use: :help ft-sh-syntax
|
||||
" This file includes many ideas from ?ric Brunet (eric.brunet@ens.fr)
|
||||
@@ -17,7 +17,7 @@ elseif exists("b:current_syntax")
|
||||
endif
|
||||
|
||||
" AFAICT "." should be considered part of the iskeyword. Using iskeywords in
|
||||
" syntax is dicey, so the following code permits the user to prevent/override
|
||||
" syntax is dicey, so the following code permits the user to
|
||||
" g:sh_isk set to a string : specify iskeyword.
|
||||
" g:sh_noisk exists : don't change iskeyword
|
||||
" g:sh_noisk does not exist : (default) append "." to iskeyword
|
||||
@@ -104,12 +104,11 @@ syn cluster shErrorList contains=shDoError,shIfError,shInError,shCaseError,shEsa
|
||||
if exists("b:is_kornshell")
|
||||
syn cluster ErrorList add=shDTestError
|
||||
endif
|
||||
syn cluster shArithParenList contains=shArithmetic,shCaseEsac,shComment,shDeref,shDerefSimple,shDo,shEcho,shEscape,shIf,shFor,shNumber,shOperator,shPosnParm,shExSingleQuote,shExDoubleQuote,shRedir,shSingleQuote,shDoubleQuote,shStatement,shVariable,shAlias,shTest,shCtrlSeq,shSpecial,shParen,bashSpecialVariables,bashStatement
|
||||
syn cluster shArithParenList contains=shArithmetic,shCaseEsac,shComment,shDeref,shDo,shDerefSimple,shEcho,shEscape,shNumber,shOperator,shPosnParm,shExSingleQuote,shExDoubleQuote,shRedir,shSingleQuote,shDoubleQuote,shStatement,shVariable,shAlias,shTest,shCtrlSeq,shSpecial,shParen,bashSpecialVariables,bashStatement,shIf,shFor
|
||||
syn cluster shArithList contains=@shArithParenList,shParenError
|
||||
syn cluster shCaseEsacList contains=shCaseStart,shCase,shCaseBar,shCaseIn,shComment,shDeref,shDerefSimple,shCaseCommandSub,shCaseExSingleQuote,shCaseSingleQuote,shCaseDoubleQuote,shCtrlSeq,@shErrorList,shStringSpecial,shCaseRange
|
||||
syn cluster shCaseList contains=@shCommandSubList,shCaseEsac,shColon,shCommandSub,shComment,shDo,shEcho,shExpr,shFor,shHereDoc,shIf,shRedir,shSetList,shSource,shStatement,shVariable,shCtrlSeq
|
||||
"syn cluster shColonList contains=@shCaseList
|
||||
syn cluster shCommandSubList contains=shArithmetic,shDeref,shDerefSimple,shEcho,shEscape,shNumber,shOption,shPosnParm,shExSingleQuote,shSingleQuote,shExDoubleQuote,shDoubleQuote,shStatement,shVariable,shSubSh,shAlias,shTest,shCtrlSeq,shSpecial,shCmdParenRegion
|
||||
syn cluster shCommandSubList contains=shAlias,shArithmetic,shCmdParenRegion,shCtrlSeq,shDeref,shDerefSimple,shDoubleQuote,shEcho,shEscape,shExDoubleQuote,shExpr,shExSingleQuote,shNumber,shOperator,shOption,shPosnParm,shSingleQuote,shSpecial,shStatement,shSubSh,shTest,shVariable
|
||||
syn cluster shCurlyList contains=shNumber,shComma,shDeref,shDerefSimple,shDerefSpecial
|
||||
syn cluster shDblQuoteList contains=shCommandSub,shDeref,shDerefSimple,shEscape,shPosnParm,shCtrlSeq,shSpecial
|
||||
syn cluster shDerefList contains=shDeref,shDerefSimple,shDerefVar,shDerefSpecial,shDerefWordError,shDerefPPS
|
||||
@@ -127,9 +126,9 @@ syn cluster shHereList contains=shBeginHere,shHerePayload
|
||||
syn cluster shHereListDQ contains=shBeginHere,@shDblQuoteList,shHerePayload
|
||||
syn cluster shIdList contains=shCommandSub,shWrapLineOperator,shSetOption,shDeref,shDerefSimple,shRedir,shExSingleQuote,shExDoubleQuote,shSingleQuote,shDoubleQuote,shExpr,shCtrlSeq,shStringSpecial,shAtExpr
|
||||
syn cluster shIfList contains=@shLoopList,shDblBrace,shDblParen,shFunctionKey,shFunctionOne,shFunctionTwo
|
||||
syn cluster shLoopList contains=@shCaseList,shIf,shFor,shForPP,shTestOpr,shExpr,shDblBrace,shConditional,shCaseEsac,shTest,@shErrorList,shSet,shOption
|
||||
syn cluster shLoopList contains=@shCaseList,@shErrorList,shCaseEsac,shConditional,shDblBrace,shExpr,shFor,shForPP,shIf,shOption,shSet,shTest,shTestOpr
|
||||
syn cluster shSubShList contains=@shCommandSubList,shCaseEsac,shColon,shCommandSub,shComment,shDo,shEcho,shExpr,shFor,shIf,shRedir,shSetList,shSource,shStatement,shVariable,shCtrlSeq,shOperator
|
||||
syn cluster shTestList contains=shCharClass,shComment,shCommandSub,shDeref,shDerefSimple,shExDoubleQuote,shDoubleQuote,shExpr,shNumber,shOperator,shExSingleQuote,shSingleQuote,shTestOpr,shTest,shCtrlSeq
|
||||
syn cluster shTestList contains=shCharClass,shCommandSub,shComment,shCtrlSeq,shDeref,shDerefSimple,shDoubleQuote,shExDoubleQuote,shExpr,shExSingleQuote,shNumber,shOperator,shSingleQuote,shTest,shTestOpr
|
||||
" Echo: {{{1
|
||||
" ====
|
||||
" This one is needed INSIDE a CommandSub, so that `echo bla` be correct
|
||||
@@ -182,7 +181,7 @@ syn match shRedir "\d<<-\="
|
||||
syn match shOperator "<<\|>>" contained
|
||||
syn match shOperator "[!&;|]" contained
|
||||
syn match shOperator "\[[[^:]\|\]]" contained
|
||||
syn match shOperator "!\==" skipwhite nextgroup=shPattern
|
||||
syn match shOperator "[-=/*+%]\==" skipwhite nextgroup=shPattern
|
||||
syn match shPattern "\<\S\+\())\)\@=" contained contains=shExSingleQuote,shSingleQuote,shExDoubleQuote,shDoubleQuote,shDeref
|
||||
|
||||
" Subshells: {{{1
|
||||
@@ -194,16 +193,15 @@ syn region shSubSh transparent matchgroup=shSubShRegion start="[^(]\zs(" end=")"
|
||||
"=======
|
||||
syn region shExpr matchgroup=shRange start="\[" skip=+\\\\\|\\$\|\[+ end="\]" contains=@shTestList,shSpecial
|
||||
syn region shTest transparent matchgroup=shStatement start="\<test\s" skip=+\\\\\|\\$+ matchgroup=NONE end="[;&|]"me=e-1 end="$" contains=@shExprList1
|
||||
syn match shTestOpr contained '[^-+/%]\zs=' skipwhite nextgroup=shTestDoubleQuote,shTestSingleQuote,shTestPattern
|
||||
syn match shTestOpr contained "<=\|>=\|!=\|==\|-.\>\|-\(nt\|ot\|ef\|eq\|ne\|lt\|le\|gt\|ge\)\>\|[!<>]"
|
||||
syn match shTestOpr contained '=' skipwhite nextgroup=shTestDoubleQuote,shTestSingleQuote,shTestPattern
|
||||
syn match shTestPattern contained '\w\+'
|
||||
syn region shTestDoubleQuote contained start='"' skip='\\"' end='"' contains=shBQpairs
|
||||
syn region shTestDoubleQuote contained start='\%(\%(\\\\\)*\\\)\@<!"' skip=+\\\\\|\\"+ end='"'
|
||||
syn match shTestSingleQuote contained '\\.'
|
||||
syn match shTestSingleQuote contained "'[^']*'"
|
||||
syn match shBQpairs contained '\\\\'
|
||||
if exists("b:is_kornshell") || exists("b:is_bash")
|
||||
syn region shDblBrace matchgroup=Delimiter start="\[\[" skip=+\\\\\|\\$+ end="\]\]" contains=@shTestList
|
||||
syn region shDblParen matchgroup=Delimiter start="((" skip=+\\\\\|\\$+ end="))" contains=@shTestList
|
||||
syn region shDblBrace matchgroup=Delimiter start="\[\[" skip=+\\\\\|\\$+ end="\]\]" contains=@shTestList,shComment
|
||||
syn region shDblParen matchgroup=Delimiter start="((" skip=+\\\\\|\\$+ end="))" contains=@shTestList,shComment
|
||||
endif
|
||||
|
||||
" Character Class In Range: {{{1
|
||||
@@ -213,15 +211,16 @@ syn match shCharClass contained "\[:\(backspace\|escape\|return\|xdigit\|alnum
|
||||
" Loops: do, if, while, until {{{1
|
||||
" ======
|
||||
if s:sh_fold_ifdofor
|
||||
syn region shDo fold transparent matchgroup=shConditional start="\<do\>" matchgroup=shConditional end="\<done\>" contains=@shLoopList
|
||||
syn region shIf fold transparent matchgroup=shConditional start="\<if\_s" matchgroup=shConditional skip=+-fi\>+ end="\<;\_s*then\>" end="\<fi\>" contains=@shIfList
|
||||
syn region shFor fold matchgroup=shLoop start="\<for\ze\_s\s*\%(((\)\@!" end="\<in\_s" end="\<do\>"me=e-2 contains=@shLoopList,shDblParen skipwhite nextgroup=shCurlyIn
|
||||
syn region shDo fold transparent matchgroup=shConditional start="\<do\>" matchgroup=shConditional end="\<done\>" contains=@shLoopList
|
||||
syn region shIf fold transparent matchgroup=shConditional start="\<if\_s" matchgroup=shConditional skip=+-fi\>+ end="\<;\_s*then\>" end="\<fi\>" contains=@shIfList
|
||||
syn region shFor fold matchgroup=shLoop start="\<for\ze\_s\s*\%(((\)\@!" end="\<in\_s" end="\<do\>"me=e-2 contains=@shLoopList,shDblParen skipwhite nextgroup=shCurlyIn
|
||||
syn region shForPP fold matchgroup=shLoop start='\<for\>\_s*((' end='))' contains=shTestOpr
|
||||
else
|
||||
syn region shDo transparent matchgroup=shConditional start="\<do\>" matchgroup=shConditional end="\<done\>" contains=@shLoopList
|
||||
syn region shIf transparent matchgroup=shConditional start="\<if\_s" matchgroup=shConditional skip=+-fi\>+ end="\<;\_s*then\>" end="\<fi\>" contains=@shIfList
|
||||
syn region shFor matchgroup=shLoop start="\<for\ze\_s\s*\%(((\)\@!" end="\<in\>" end="\<do\>"me=e-2 contains=@shLoopList,shDblParen skipwhite nextgroup=shCurlyIn
|
||||
syn region shDo transparent matchgroup=shConditional start="\<do\>" matchgroup=shConditional end="\<done\>" contains=@shLoopList
|
||||
syn region shIf transparent matchgroup=shConditional start="\<if\_s" matchgroup=shConditional skip=+-fi\>+ end="\<;\_s*then\>" end="\<fi\>" contains=@shIfList
|
||||
syn region shFor matchgroup=shLoop start="\<for\ze\_s\s*\%(((\)\@!" end="\<in\>" end="\<do\>"me=e-2 contains=@shLoopList,shDblParen skipwhite nextgroup=shCurlyIn
|
||||
syn region shForPP matchgroup=shLoop start='\<for\>\_s*((' end='))' contains=shTestOpr
|
||||
endif
|
||||
syn region shForPP matchgroup=shLoop start='\<for\>\_s*((' end='))' contains=shTestOpr
|
||||
if exists("b:is_kornshell") || exists("b:is_bash")
|
||||
syn cluster shCaseList add=shRepeat
|
||||
syn cluster shFunctionList add=shRepeat
|
||||
@@ -322,12 +321,13 @@ elseif !exists("g:sh_no_error")
|
||||
endif
|
||||
syn region shSingleQuote matchgroup=shQuote start=+'+ end=+'+ contains=@Spell
|
||||
syn region shDoubleQuote matchgroup=shQuote start=+\%(\%(\\\\\)*\\\)\@<!"+ skip=+\\"+ end=+"+ contains=@shDblQuoteList,shStringSpecial,@Spell
|
||||
"syn region shDoubleQuote matchgroup=shQuote start=+"+ skip=+\\"+ end=+"+ contains=@shDblQuoteList,shStringSpecial,@Spell
|
||||
syn match shStringSpecial "[^[:print:] \t]" contained
|
||||
syn region shDoubleQuote matchgroup=shQuote start=+"+ skip=+\\"+ end=+"+ contains=@shDblQuoteList,shStringSpecial,@Spell
|
||||
syn match shStringSpecial "[^[:print:] \t]" contained
|
||||
syn match shStringSpecial "\%(\\\\\)*\\[\\"'`$()#]"
|
||||
syn match shSpecial "[^\\]\zs\%(\\\\\)*\\[\\"'`$()#]" nextgroup=shMoreSpecial,shComment
|
||||
syn match shSpecial "^\%(\\\\\)*\\[\\"'`$()#]" nextgroup=shComment
|
||||
syn match shMoreSpecial "\%(\\\\\)*\\[\\"'`$()#]" nextgroup=shMoreSpecial contained
|
||||
" COMBAK: why is ,shComment on next line???
|
||||
syn match shSpecial "[^\\]\zs\%(\\\\\)*\\[\\"'`$()#]" nextgroup=shMoreSpecial,shComment
|
||||
syn match shSpecial "^\%(\\\\\)*\\[\\"'`$()#]" nextgroup=shComment
|
||||
syn match shMoreSpecial "\%(\\\\\)*\\[\\"'`$()#]" nextgroup=shMoreSpecial contained
|
||||
|
||||
" Comments: {{{1
|
||||
"==========
|
||||
@@ -341,42 +341,42 @@ syn match shQuickComment contained "#.*$"
|
||||
" Here Documents: {{{1
|
||||
" =========================================
|
||||
if version < 600
|
||||
syn region shHereDoc matchgroup=shRedir01 start="<<\s*\**END[a-zA-Z_0-9]*\**" matchgroup=shRedir01 end="^END[a-zA-Z_0-9]*$" contains=@shDblQuoteList
|
||||
syn region shHereDoc matchgroup=shRedir02 start="<<-\s*\**END[a-zA-Z_0-9]*\**" matchgroup=shRedir02 end="^\s*END[a-zA-Z_0-9]*$" contains=@shDblQuoteList
|
||||
syn region shHereDoc matchgroup=shRedir03 start="<<\s*\**EOF\**" matchgroup=shRedir03 end="^EOF$" contains=@shDblQuoteList
|
||||
syn region shHereDoc matchgroup=shRedir04 start="<<-\s*\**EOF\**" matchgroup=shRedir04 end="^\s*EOF$" contains=@shDblQuoteList
|
||||
syn region shHereDoc matchgroup=shRedir05 start="<<\s*\**\.\**" matchgroup=shRedir05 end="^\.$" contains=@shDblQuoteList
|
||||
syn region shHereDoc matchgroup=shRedir06 start="<<-\s*\**\.\**" matchgroup=shRedir06 end="^\s*\.$" contains=@shDblQuoteList
|
||||
syn region shHereDoc matchgroup=shHereDoc01 start="<<\s*\**END[a-zA-Z_0-9]*\**" matchgroup=shHereDoc01 end="^END[a-zA-Z_0-9]*$" contains=@shDblQuoteList
|
||||
syn region shHereDoc matchgroup=shHereDoc02 start="<<-\s*\**END[a-zA-Z_0-9]*\**" matchgroup=shHereDoc02 end="^\s*END[a-zA-Z_0-9]*$" contains=@shDblQuoteList
|
||||
syn region shHereDoc matchgroup=shHereDoc03 start="<<\s*\**EOF\**" matchgroup=shHereDoc03 end="^EOF$" contains=@shDblQuoteList
|
||||
syn region shHereDoc matchgroup=shHereDoc04 start="<<-\s*\**EOF\**" matchgroup=shHereDoc04 end="^\s*EOF$" contains=@shDblQuoteList
|
||||
syn region shHereDoc matchgroup=shHereDoc05 start="<<\s*\**\.\**" matchgroup=shHereDoc05 end="^\.$" contains=@shDblQuoteList
|
||||
syn region shHereDoc matchgroup=shHereDoc06 start="<<-\s*\**\.\**" matchgroup=shHereDoc06 end="^\s*\.$" contains=@shDblQuoteList
|
||||
|
||||
elseif s:sh_fold_heredoc
|
||||
syn region shHereDoc matchgroup=shRedir07 fold start="<<\s*\z([^ \t|]*\)" matchgroup=shRedir07 end="^\z1\s*$" contains=@shDblQuoteList
|
||||
syn region shHereDoc matchgroup=shRedir08 fold start="<<\s*\"\z([^ \t|]*\)\"" matchgroup=shRedir08 end="^\z1\s*$"
|
||||
syn region shHereDoc matchgroup=shRedir09 fold start="<<\s*'\z([^ \t|]*\)'" matchgroup=shRedir09 end="^\z1\s*$"
|
||||
syn region shHereDoc matchgroup=shRedir10 fold start="<<-\s*\z([^ \t|]*\)" matchgroup=shRedir10 end="^\s*\z1\s*$" contains=@shDblQuoteList
|
||||
syn region shHereDoc matchgroup=shRedir11 fold start="<<-\s*\"\z([^ \t|]*\)\"" matchgroup=shRedir11 end="^\s*\z1\s*$"
|
||||
syn region shHereDoc matchgroup=shRedir12 fold start="<<-\s*'\z([^ \t|]*\)'" matchgroup=shRedir12 end="^\s*\z1\s*$"
|
||||
syn region shHereDoc matchgroup=shRedir13 fold start="<<\s*\\\_$\_s*\z([^ \t|]*\)" matchgroup=shRedir13 end="^\z1\s*$"
|
||||
syn region shHereDoc matchgroup=shRedir14 fold start="<<\s*\\\_$\_s*\"\z([^ \t|]*\)\"" matchgroup=shRedir14 end="^\z1\s*$"
|
||||
syn region shHereDoc matchgroup=shRedir15 fold start="<<-\s*\\\_$\_s*'\z([^ \t|]*\)'" matchgroup=shRedir15 end="^\s*\z1\s*$"
|
||||
syn region shHereDoc matchgroup=shRedir16 fold start="<<-\s*\\\_$\_s*\z([^ \t|]*\)" matchgroup=shRedir16 end="^\s*\z1\s*$"
|
||||
syn region shHereDoc matchgroup=shRedir17 fold start="<<-\s*\\\_$\_s*\"\z([^ \t|]*\)\"" matchgroup=shRedir17 end="^\s*\z1\s*$"
|
||||
syn region shHereDoc matchgroup=shRedir18 fold start="<<\s*\\\_$\_s*'\z([^ \t|]*\)'" matchgroup=shRedir18 end="^\z1\s*$"
|
||||
syn region shHereDoc matchgroup=shRedir19 fold start="<<\\\z([^ \t|]*\)" matchgroup=shRedir19 end="^\z1\s*$"
|
||||
syn region shHereDoc matchgroup=shHereDoc07 fold start="<<\s*\z([^ \t|]*\)" matchgroup=shHereDoc07 end="^\z1\s*$" contains=@shDblQuoteList
|
||||
syn region shHereDoc matchgroup=shHereDoc08 fold start="<<\s*\"\z([^ \t|]*\)\"" matchgroup=shHereDoc08 end="^\z1\s*$"
|
||||
syn region shHereDoc matchgroup=shHereDoc09 fold start="<<\s*'\z([^ \t|]*\)'" matchgroup=shHereDoc09 end="^\z1\s*$"
|
||||
syn region shHereDoc matchgroup=shHereDoc10 fold start="<<-\s*\z([^ \t|]*\)" matchgroup=shHereDoc10 end="^\s*\z1\s*$" contains=@shDblQuoteList
|
||||
syn region shHereDoc matchgroup=shHereDoc11 fold start="<<-\s*\"\z([^ \t|]*\)\"" matchgroup=shHereDoc11 end="^\s*\z1\s*$"
|
||||
syn region shHereDoc matchgroup=shHereDoc12 fold start="<<-\s*'\z([^ \t|]*\)'" matchgroup=shHereDoc12 end="^\s*\z1\s*$"
|
||||
syn region shHereDoc matchgroup=shHereDoc13 fold start="<<\s*\\\_$\_s*\z([^ \t|]*\)" matchgroup=shHereDoc13 end="^\z1\s*$"
|
||||
syn region shHereDoc matchgroup=shHereDoc14 fold start="<<\s*\\\_$\_s*\"\z([^ \t|]*\)\"" matchgroup=shHereDoc14 end="^\z1\s*$"
|
||||
syn region shHereDoc matchgroup=shHereDoc15 fold start="<<-\s*\\\_$\_s*'\z([^ \t|]*\)'" matchgroup=shHereDoc15 end="^\s*\z1\s*$"
|
||||
syn region shHereDoc matchgroup=shHereDoc16 fold start="<<-\s*\\\_$\_s*\z([^ \t|]*\)" matchgroup=shHereDoc16 end="^\s*\z1\s*$"
|
||||
syn region shHereDoc matchgroup=shHereDoc17 fold start="<<-\s*\\\_$\_s*\"\z([^ \t|]*\)\"" matchgroup=shHereDoc17 end="^\s*\z1\s*$"
|
||||
syn region shHereDoc matchgroup=shHereDoc18 fold start="<<\s*\\\_$\_s*'\z([^ \t|]*\)'" matchgroup=shHereDoc18 end="^\z1\s*$"
|
||||
syn region shHereDoc matchgroup=shHereDoc19 fold start="<<\\\z([^ \t|]*\)" matchgroup=shHereDoc19 end="^\z1\s*$"
|
||||
|
||||
else
|
||||
syn region shHereDoc matchgroup=shRedir20 start="<<\s*\\\=\z([^ \t|]*\)" matchgroup=shRedir20 end="^\z1\s*$" contains=@shDblQuoteList
|
||||
syn region shHereDoc matchgroup=shRedir21 start="<<\s*\"\z([^ \t|]*\)\"" matchgroup=shRedir21 end="^\z1\s*$"
|
||||
syn region shHereDoc matchgroup=shRedir22 start="<<-\s*\z([^ \t|]*\)" matchgroup=shRedir22 end="^\s*\z1\s*$" contains=@shDblQuoteList
|
||||
syn region shHereDoc matchgroup=shRedir23 start="<<-\s*'\z([^ \t|]*\)'" matchgroup=shRedir23 end="^\s*\z1\s*$"
|
||||
syn region shHereDoc matchgroup=shRedir24 start="<<\s*'\z([^ \t|]*\)'" matchgroup=shRedir24 end="^\z1\s*$"
|
||||
syn region shHereDoc matchgroup=shRedir25 start="<<-\s*\"\z([^ \t|]*\)\"" matchgroup=shRedir25 end="^\s*\z1\s*$"
|
||||
syn region shHereDoc matchgroup=shRedir26 start="<<\s*\\\_$\_s*\z([^ \t|]*\)" matchgroup=shRedir26 end="^\z1\s*$"
|
||||
syn region shHereDoc matchgroup=shRedir27 start="<<-\s*\\\_$\_s*\z([^ \t|]*\)" matchgroup=shRedir27 end="^\s*\z1\s*$"
|
||||
syn region shHereDoc matchgroup=shRedir28 start="<<-\s*\\\_$\_s*'\z([^ \t|]*\)'" matchgroup=shRedir28 end="^\s*\z1\s*$"
|
||||
syn region shHereDoc matchgroup=shRedir29 start="<<\s*\\\_$\_s*'\z([^ \t|]*\)'" matchgroup=shRedir29 end="^\z1\s*$"
|
||||
syn region shHereDoc matchgroup=shRedir30 start="<<\s*\\\_$\_s*\"\z([^ \t|]*\)\"" matchgroup=shRedir30 end="^\z1\s*$"
|
||||
syn region shHereDoc matchgroup=shRedir31 start="<<-\s*\\\_$\_s*\"\z([^ \t|]*\)\"" matchgroup=shRedir31 end="^\s*\z1\s*$"
|
||||
syn region shHereDoc matchgroup=shRedir32 start="<<\\\z([^ \t|]*\)" matchgroup=shRedir32 end="^\z1\s*$"
|
||||
syn region shHereDoc matchgroup=shHereDoc20 start="<<\s*\\\=\z([^ \t|]*\)" matchgroup=shHereDoc20 end="^\z1\s*$" contains=@shDblQuoteList
|
||||
syn region shHereDoc matchgroup=shHereDoc21 start="<<\s*\"\z([^ \t|]*\)\"" matchgroup=shHereDoc21 end="^\z1\s*$"
|
||||
syn region shHereDoc matchgroup=shHereDoc22 start="<<-\s*\z([^ \t|]*\)" matchgroup=shHereDoc22 end="^\s*\z1\s*$" contains=@shDblQuoteList
|
||||
syn region shHereDoc matchgroup=shHereDoc23 start="<<-\s*'\z([^ \t|]*\)'" matchgroup=shHereDoc23 end="^\s*\z1\s*$"
|
||||
syn region shHereDoc matchgroup=shHereDoc24 start="<<\s*'\z([^ \t|]*\)'" matchgroup=shHereDoc24 end="^\z1\s*$"
|
||||
syn region shHereDoc matchgroup=shHereDoc25 start="<<-\s*\"\z([^ \t|]*\)\"" matchgroup=shHereDoc25 end="^\s*\z1\s*$"
|
||||
syn region shHereDoc matchgroup=shHereDoc26 start="<<\s*\\\_$\_s*\z([^ \t|]*\)" matchgroup=shHereDoc26 end="^\z1\s*$"
|
||||
syn region shHereDoc matchgroup=shHereDoc27 start="<<-\s*\\\_$\_s*\z([^ \t|]*\)" matchgroup=shHereDoc27 end="^\s*\z1\s*$"
|
||||
syn region shHereDoc matchgroup=shHereDoc28 start="<<-\s*\\\_$\_s*'\z([^ \t|]*\)'" matchgroup=shHereDoc28 end="^\s*\z1\s*$"
|
||||
syn region shHereDoc matchgroup=shHereDoc29 start="<<\s*\\\_$\_s*'\z([^ \t|]*\)'" matchgroup=shHereDoc29 end="^\z1\s*$"
|
||||
syn region shHereDoc matchgroup=shHereDoc30 start="<<\s*\\\_$\_s*\"\z([^ \t|]*\)\"" matchgroup=shHereDoc30 end="^\z1\s*$"
|
||||
syn region shHereDoc matchgroup=shHereDoc31 start="<<-\s*\\\_$\_s*\"\z([^ \t|]*\)\"" matchgroup=shHereDoc31 end="^\s*\z1\s*$"
|
||||
syn region shHereDoc matchgroup=shHereDoc32 start="<<\\\z([^ \t|]*\)" matchgroup=shHereDoc32 end="^\z1\s*$"
|
||||
endif
|
||||
|
||||
" Here Strings: {{{1
|
||||
@@ -389,8 +389,8 @@ endif
|
||||
" Identifiers: {{{1
|
||||
"=============
|
||||
syn match shSetOption "\s\zs[-+][a-zA-Z0-9]\+\>" contained
|
||||
syn match shVariable "\<\([bwglsav]:\)\=[a-zA-Z0-9.!@_%+,]*\ze=" nextgroup=shSetIdentifier
|
||||
syn match shSetIdentifier "=" contained nextgroup=shCmdParenRegion,shPattern,shDeref,shDerefSimple,shDoubleQuote,shExDoubleQuote,shSingleQuote,shExSingleQuote
|
||||
syn match shVariable "\<\([bwglsav]:\)\=[a-zA-Z0-9.!@_%+,]*\ze=" nextgroup=shVarAssign
|
||||
syn match shVarAssign "=" contained nextgroup=shCmdParenRegion,shPattern,shDeref,shDerefSimple,shDoubleQuote,shExDoubleQuote,shSingleQuote,shExSingleQuote
|
||||
syn region shAtExpr contained start="@(" end=")" contains=@shIdList
|
||||
if exists("b:is_bash")
|
||||
syn region shSetList oneline matchgroup=shSet start="\<\(declare\|typeset\|local\|export\|unset\)\>\ze[^/]" end="$" matchgroup=shSetListDelim end="\ze[}|);&]" matchgroup=NONE end="\ze\s\+#\|=" contains=@shIdList
|
||||
@@ -409,19 +409,27 @@ endif
|
||||
|
||||
if exists("b:is_bash")
|
||||
if s:sh_fold_functions
|
||||
syn region shFunctionOne fold matchgroup=shFunction start="^\s*\h[-a-zA-Z_0-9]*\s*()\_s*{" end="}" contains=@shFunctionList skipwhite skipnl nextgroup=shFunctionStart,shQuickComment
|
||||
syn region shFunctionTwo fold matchgroup=shFunction start="\h[-a-zA-Z_0-9]*\s*\%(()\)\=\_s*{" end="}" contains=shFunctionKey,@shFunctionList contained skipwhite skipnl nextgroup=shFunctionStart,shQuickComment
|
||||
syn region shFunctionOne fold matchgroup=shFunction start="^\s*\h[-a-zA-Z_0-9]*\s*()\_s*{" end="}" contains=@shFunctionList skipwhite skipnl nextgroup=shFunctionStart,shQuickComment
|
||||
syn region shFunctionTwo fold matchgroup=shFunction start="\h[-a-zA-Z_0-9]*\s*\%(()\)\=\_s*{" end="}" contains=shFunctionKey,@shFunctionList contained skipwhite skipnl nextgroup=shFunctionStart,shQuickComment
|
||||
syn region shFunctionThree fold matchgroup=shFunction start="^\s*\h[-a-zA-Z_0-9]*\s*()\_s*(" end=")" contains=@shFunctionList skipwhite skipnl nextgroup=shFunctionStart,shQuickComment
|
||||
syn region shFunctionFour fold matchgroup=shFunction start="\h[-a-zA-Z_0-9]*\s*\%(()\)\=\_s*)" end=")" contains=shFunctionKey,@shFunctionList contained skipwhite skipnl nextgroup=shFunctionStart,shQuickComment
|
||||
else
|
||||
syn region shFunctionOne matchgroup=shFunction start="^\s*\h[-a-zA-Z_0-9]*\s*()\_s*{" end="}" contains=@shFunctionList
|
||||
syn region shFunctionTwo matchgroup=shFunction start="\h[-a-zA-Z_0-9]*\s*\%(()\)\=\_s*{" end="}" contains=shFunctionKey,@shFunctionList contained
|
||||
syn region shFunctionOne matchgroup=shFunction start="^\s*\h[-a-zA-Z_0-9]*\s*()\_s*{" end="}" contains=@shFunctionList
|
||||
syn region shFunctionTwo matchgroup=shFunction start="\h[-a-zA-Z_0-9]*\s*\%(()\)\=\_s*{" end="}" contains=shFunctionKey,@shFunctionList contained
|
||||
syn region shFunctionThree matchgroup=shFunction start="^\s*\h[-a-zA-Z_0-9]*\s*()\_s*(" end=")" contains=@shFunctionList
|
||||
syn region shFunctionFour matchgroup=shFunction start="\h[-a-zA-Z_0-9]*\s*\%(()\)\=\_s*(" end=")" contains=shFunctionKey,@shFunctionList contained
|
||||
endif
|
||||
else
|
||||
if s:sh_fold_functions
|
||||
syn region shFunctionOne fold matchgroup=shFunction start="^\s*\h\w*\s*()\_s*{" end="}" contains=@shFunctionList skipwhite skipnl nextgroup=shFunctionStart,shQuickComment
|
||||
syn region shFunctionTwo fold matchgroup=shFunction start="\h\w*\s*\%(()\)\=\_s*{" end="}" contains=shFunctionKey,@shFunctionList contained skipwhite skipnl nextgroup=shFunctionStart,shQuickComment
|
||||
syn region shFunctionOne fold matchgroup=shFunction start="^\s*\h\w*\s*()\_s*{" end="}" contains=@shFunctionList skipwhite skipnl nextgroup=shFunctionStart,shQuickComment
|
||||
syn region shFunctionTwo fold matchgroup=shFunction start="\h\w*\s*\%(()\)\=\_s*{" end="}" contains=shFunctionKey,@shFunctionList contained skipwhite skipnl nextgroup=shFunctionStart,shQuickComment
|
||||
syn region shFunctionThree fold matchgroup=shFunction start="^\s*\h\w*\s*()\_s*(" end=")" contains=@shFunctionList skipwhite skipnl nextgroup=shFunctionStart,shQuickComment
|
||||
syn region shFunctionFour fold matchgroup=shFunction start="\h\w*\s*\%(()\)\=\_s*(" end=")" contains=shFunctionKey,@shFunctionList contained skipwhite skipnl nextgroup=shFunctionStart,shQuickComment
|
||||
else
|
||||
syn region shFunctionOne matchgroup=shFunction start="^\s*\h\w*\s*()\_s*{" end="}" contains=@shFunctionList
|
||||
syn region shFunctionTwo matchgroup=shFunction start="\h\w*\s*\%(()\)\=\_s*{" end="}" contains=shFunctionKey,@shFunctionList contained
|
||||
syn region shFunctionOne matchgroup=shFunction start="^\s*\h\w*\s*()\_s*{" end="}" contains=@shFunctionList
|
||||
syn region shFunctionTwo matchgroup=shFunction start="\h\w*\s*\%(()\)\=\_s*{" end="}" contains=shFunctionKey,@shFunctionList contained
|
||||
syn region shFunctionThree matchgroup=shFunction start="^\s*\h\w*\s*()\_s*(" end=")" contains=@shFunctionList
|
||||
syn region shFunctionFour matchgroup=shFunction start="\h\w*\s*\%(()\)\=\_s*(" end=")" contains=shFunctionKey,@shFunctionList contained
|
||||
endif
|
||||
endif
|
||||
|
||||
@@ -577,7 +585,7 @@ hi def link shDoubleQuote shString
|
||||
hi def link shEcho shString
|
||||
hi def link shEchoDelim shOperator
|
||||
hi def link shEchoQuote shString
|
||||
"hi def link shForPP shLoop
|
||||
hi def link shForPP shLoop
|
||||
hi def link shEmbeddedEcho shString
|
||||
hi def link shEscape shCommandSub
|
||||
hi def link shExDoubleQuote shDoubleQuote
|
||||
@@ -604,7 +612,6 @@ hi def link shTestOpr shConditional
|
||||
hi def link shTestPattern shString
|
||||
hi def link shTestDoubleQuote shString
|
||||
hi def link shTestSingleQuote shString
|
||||
hi def link shBQpairs shString
|
||||
hi def link shVariable shSetList
|
||||
hi def link shWrapLineOperator shOperator
|
||||
|
||||
@@ -661,38 +668,38 @@ hi def link shStatement Statement
|
||||
hi def link shString String
|
||||
hi def link shTodo Todo
|
||||
hi def link shAlias Identifier
|
||||
hi def link shRedir01 shRedir
|
||||
hi def link shRedir02 shRedir
|
||||
hi def link shRedir03 shRedir
|
||||
hi def link shRedir04 shRedir
|
||||
hi def link shRedir05 shRedir
|
||||
hi def link shRedir06 shRedir
|
||||
hi def link shRedir07 shRedir
|
||||
hi def link shRedir08 shRedir
|
||||
hi def link shRedir09 shRedir
|
||||
hi def link shRedir10 shRedir
|
||||
hi def link shRedir11 shRedir
|
||||
hi def link shRedir12 shRedir
|
||||
hi def link shRedir13 shRedir
|
||||
hi def link shRedir14 shRedir
|
||||
hi def link shRedir15 shRedir
|
||||
hi def link shRedir16 shRedir
|
||||
hi def link shRedir17 shRedir
|
||||
hi def link shRedir18 shRedir
|
||||
hi def link shRedir19 shRedir
|
||||
hi def link shRedir20 shRedir
|
||||
hi def link shRedir21 shRedir
|
||||
hi def link shRedir22 shRedir
|
||||
hi def link shRedir23 shRedir
|
||||
hi def link shRedir24 shRedir
|
||||
hi def link shRedir25 shRedir
|
||||
hi def link shRedir26 shRedir
|
||||
hi def link shRedir27 shRedir
|
||||
hi def link shRedir28 shRedir
|
||||
hi def link shRedir29 shRedir
|
||||
hi def link shRedir30 shRedir
|
||||
hi def link shRedir31 shRedir
|
||||
hi def link shRedir32 shRedir
|
||||
hi def link shHereDoc01 shRedir
|
||||
hi def link shHereDoc02 shRedir
|
||||
hi def link shHereDoc03 shRedir
|
||||
hi def link shHereDoc04 shRedir
|
||||
hi def link shHereDoc05 shRedir
|
||||
hi def link shHereDoc06 shRedir
|
||||
hi def link shHereDoc07 shRedir
|
||||
hi def link shHereDoc08 shRedir
|
||||
hi def link shHereDoc09 shRedir
|
||||
hi def link shHereDoc10 shRedir
|
||||
hi def link shHereDoc11 shRedir
|
||||
hi def link shHereDoc12 shRedir
|
||||
hi def link shHereDoc13 shRedir
|
||||
hi def link shHereDoc14 shRedir
|
||||
hi def link shHereDoc15 shRedir
|
||||
hi def link shHereDoc16 shRedir
|
||||
hi def link shHereDoc17 shRedir
|
||||
hi def link shHereDoc18 shRedir
|
||||
hi def link shHereDoc19 shRedir
|
||||
hi def link shHereDoc20 shRedir
|
||||
hi def link shHereDoc21 shRedir
|
||||
hi def link shHereDoc22 shRedir
|
||||
hi def link shHereDoc23 shRedir
|
||||
hi def link shHereDoc24 shRedir
|
||||
hi def link shHereDoc25 shRedir
|
||||
hi def link shHereDoc26 shRedir
|
||||
hi def link shHereDoc27 shRedir
|
||||
hi def link shHereDoc28 shRedir
|
||||
hi def link shHereDoc29 shRedir
|
||||
hi def link shHereDoc30 shRedir
|
||||
hi def link shHereDoc31 shRedir
|
||||
hi def link shHereDoc32 shRedir
|
||||
|
||||
" Set Current Syntax: {{{1
|
||||
" ===================
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
" Vim syntax file
|
||||
" Language: sendmail
|
||||
" Maintainer: Charles E. Campbell <NdrOchipS@PcampbellAfamily.Mbiz>
|
||||
" Last Change: Jan 13, 2015
|
||||
" Version: 6
|
||||
" Last Change: Oct 23, 2014
|
||||
" Version: 7
|
||||
" URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_SM
|
||||
|
||||
if exists("b:current_syntax")
|
||||
|
||||
96
runtime/syntax/srec.vim
Normal file
96
runtime/syntax/srec.vim
Normal file
@@ -0,0 +1,96 @@
|
||||
" Vim syntax file
|
||||
" Language: Motorola S-Record
|
||||
" Maintainer: Markus Heidelberg <markus.heidelberg@web.de>
|
||||
" Last Change: 2015 Feb 24
|
||||
|
||||
" Each record (line) is built as follows:
|
||||
"
|
||||
" field digits states
|
||||
"
|
||||
" +----------+
|
||||
" | start | 1 ('S') srecRecStart
|
||||
" +----------+
|
||||
" | type | 1 srecRecType, (srecRecTypeUnknown)
|
||||
" +----------+
|
||||
" | count | 2 srecByteCount
|
||||
" +----------+
|
||||
" | address | 4/6/8 srecNoAddress, srecDataAddress, srecRecCount, srecStartAddress, (srecAddressFieldUnknown)
|
||||
" +----------+
|
||||
" | data | 0..504/502/500 srecDataOdd, srecDataEven, (srecDataUnexpected)
|
||||
" +----------+
|
||||
" | checksum | 2 srecChecksum
|
||||
" +----------+
|
||||
"
|
||||
" States in parentheses in the upper format description indicate that they
|
||||
" should not appear in a valid file.
|
||||
|
||||
" For version 5.x: Clear all syntax items
|
||||
" For version 6.x: Quit when a syntax file was already loaded
|
||||
if version < 600
|
||||
syntax clear
|
||||
elseif exists("b:current_syntax")
|
||||
finish
|
||||
endif
|
||||
|
||||
syn match srecRecStart "^S"
|
||||
|
||||
syn match srecRecTypeUnknown "^S." contains=srecRecStart
|
||||
syn match srecRecType "^S[0-35-9]" contains=srecRecStart
|
||||
|
||||
syn match srecByteCount "^S.[0-9a-fA-F]\{2}" contains=srecRecTypeUnknown nextgroup=srecAddressFieldUnknown,srecChecksum
|
||||
syn match srecByteCount "^S[0-35-9][0-9a-fA-F]\{2}" contains=srecRecType
|
||||
|
||||
syn match srecAddressFieldUnknown "[0-9a-fA-F]\{2}" contained nextgroup=srecAddressFieldUnknown,srecChecksum
|
||||
|
||||
syn match srecNoAddress "^S0[0-9a-fA-F]\{6}" contains=srecByteCount nextgroup=srecDataOdd,srecChecksum
|
||||
syn match srecDataAddress "^S1[0-9a-fA-F]\{6}" contains=srecByteCount nextgroup=srecDataOdd,srecChecksum
|
||||
syn match srecDataAddress "^S2[0-9a-fA-F]\{8}" contains=srecByteCount nextgroup=srecDataOdd,srecChecksum
|
||||
syn match srecDataAddress "^S3[0-9a-fA-F]\{10}" contains=srecByteCount nextgroup=srecDataOdd,srecChecksum
|
||||
syn match srecRecCount "^S5[0-9a-fA-F]\{6}" contains=srecByteCount nextgroup=srecDataUnexpected,srecChecksum
|
||||
syn match srecRecCount "^S6[0-9a-fA-F]\{8}" contains=srecByteCount nextgroup=srecDataUnexpected,srecChecksum
|
||||
syn match srecStartAddress "^S7[0-9a-fA-F]\{10}" contains=srecByteCount nextgroup=srecDataUnexpected,srecChecksum
|
||||
syn match srecStartAddress "^S8[0-9a-fA-F]\{8}" contains=srecByteCount nextgroup=srecDataUnexpected,srecChecksum
|
||||
syn match srecStartAddress "^S9[0-9a-fA-F]\{6}" contains=srecByteCount nextgroup=srecDataUnexpected,srecChecksum
|
||||
|
||||
" alternating highlight per byte for easier reading
|
||||
syn match srecDataOdd "[0-9a-fA-F]\{2}" contained nextgroup=srecDataEven,srecChecksum
|
||||
syn match srecDataEven "[0-9a-fA-F]\{2}" contained nextgroup=srecDataOdd,srecChecksum
|
||||
" data bytes which should not exist
|
||||
syn match srecDataUnexpected "[0-9a-fA-F]\{2}" contained nextgroup=srecDataUnexpected,srecChecksum
|
||||
" Data digit pair regex usage also results in only highlighting the checksum
|
||||
" if the number of data characters is even.
|
||||
|
||||
syn match srecChecksum "[0-9a-fA-F]\{2}$" contained
|
||||
|
||||
" Define the default highlighting.
|
||||
" For version 5.7 and earlier: only when not done already
|
||||
" For version 5.8 and later: only when an item doesn't have highlighting yet
|
||||
if version >= 508 || !exists("did_srec_syntax_inits")
|
||||
if version < 508
|
||||
let did_srec_syntax_inits = 1
|
||||
command -nargs=+ HiLink hi link <args>
|
||||
else
|
||||
command -nargs=+ HiLink hi def link <args>
|
||||
endif
|
||||
|
||||
" The default methods for highlighting. Can be overridden later
|
||||
HiLink srecRecStart srecRecType
|
||||
HiLink srecRecTypeUnknown srecRecType
|
||||
HiLink srecRecType WarningMsg
|
||||
HiLink srecByteCount Constant
|
||||
hi def srecAddressFieldUnknown term=italic cterm=italic gui=italic
|
||||
HiLink srecNoAddress DiffAdd
|
||||
HiLink srecDataAddress Comment
|
||||
HiLink srecRecCount srecNoAddress
|
||||
HiLink srecStartAddress srecDataAddress
|
||||
hi def srecDataOdd term=bold cterm=bold gui=bold
|
||||
hi def srecDataEven term=NONE cterm=NONE gui=NONE
|
||||
HiLink srecDataUnexpected Error
|
||||
HiLink srecChecksum DiffChange
|
||||
|
||||
delcommand HiLink
|
||||
endif
|
||||
|
||||
let b:current_syntax = "srec"
|
||||
|
||||
" vim: ts=8
|
||||
@@ -1,8 +1,8 @@
|
||||
" Vim syntax file
|
||||
" Language: TeX
|
||||
" Maintainer: Charles E. Campbell <NdrchipO@ScampbellPfamily.AbizM>
|
||||
" Last Change: Nov 18, 2014
|
||||
" Version: 83
|
||||
" Last Change: Jun 11, 2015
|
||||
" Version: 87
|
||||
" URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_TEX
|
||||
"
|
||||
" Notes: {{{1
|
||||
@@ -207,7 +207,7 @@ if s:tex_fast =~ 'M'
|
||||
if !exists("s:tex_no_error") || !s:tex_no_error
|
||||
syn match texMathError "}" contained
|
||||
endif
|
||||
syn region texMathMatcher matchgroup=Delimiter start="{" skip="\\\\\|\\}" end="}" end="%stopzone\>" contained contains=@texMathMatchGroup
|
||||
syn region texMathMatcher matchgroup=Delimiter start="{" skip="\(\\\\\)*\\}" end="}" end="%stopzone\>" contained contains=@texMathMatchGroup
|
||||
endif
|
||||
endif
|
||||
|
||||
@@ -226,7 +226,7 @@ endif
|
||||
" TeX/LaTeX delimiters: {{{1
|
||||
syn match texDelimiter "&"
|
||||
syn match texDelimiter "\\\\"
|
||||
syn match texDelimiter "[{}]"
|
||||
"%syn match texDelimiter "[{}]"
|
||||
|
||||
" Tex/Latex Options: {{{1
|
||||
syn match texOption "[^\\]\zs#\d\+\|^#\d\+"
|
||||
@@ -247,7 +247,7 @@ syn match texLigature "\\\([ijolL]\|ae\|oe\|ss\|AA\|AE\|OE\)$"
|
||||
" \begin{}/\end{} section markers: {{{1
|
||||
syn match texBeginEnd "\\begin\>\|\\end\>" nextgroup=texBeginEndName
|
||||
if s:tex_fast =~ 'm'
|
||||
syn region texBeginEndName matchgroup=Delimiter start="{" end="}" contained nextgroup=texBeginEndModifier contains=texComment
|
||||
syn region texBeginEndName matchgroup=Delimiter start="{" end="}" contained nextgroup=texBeginEndModifier contains=texComment
|
||||
syn region texBeginEndModifier matchgroup=Delimiter start="\[" end="]" contained contains=texComment,@NoSpell
|
||||
endif
|
||||
|
||||
@@ -391,16 +391,23 @@ endif
|
||||
" particular support for bold and italic {{{1
|
||||
if s:tex_fast =~ 'b'
|
||||
if s:tex_conceal =~ 'b'
|
||||
syn region texBoldStyle matchgroup=texTypeStyle start="\\textbf\s*{" end="}" concealends contains=@texBoldGroup
|
||||
syn region texBoldItalStyle matchgroup=texTypeStyle start="\\textit\s*{" end="}" concealends contains=@texItalGroup
|
||||
syn region texItalStyle matchgroup=texTypeStyle start="\\textit\s*{" end="}" concealends contains=@texItalGroup
|
||||
syn region texItalBoldStyle matchgroup=texTypeStyle start="\\textbf\s*{" end="}" concealends contains=@texBoldGroup
|
||||
if !exists("g:tex_nospell") || !g:tex_nospell
|
||||
syn region texBoldStyle matchgroup=texTypeStyle start="\\textbf\s*{" matchgroup=texTypeStyle end="}" concealends contains=@texBoldGroup,@Spell
|
||||
syn region texBoldItalStyle matchgroup=texTypeStyle start="\\textit\s*{" matchgroup=texTypeStyle end="}" concealends contains=@texItalGroup,@Spell
|
||||
syn region texItalStyle matchgroup=texTypeStyle start="\\textit\s*{" matchgroup=texTypeStyle end="}" concealends contains=@texItalGroup,@Spell
|
||||
syn region texItalBoldStyle matchgroup=texTypeStyle start="\\textbf\s*{" matchgroup=texTypeStyle end="}" concealends contains=@texBoldGroup,@Spell
|
||||
else
|
||||
syn region texBoldStyle matchgroup=texTypeStyle start="\\textbf\s*{" matchgroup=texTypeStyle end="}" concealends contains=@texBoldGroup
|
||||
syn region texBoldItalStyle matchgroup=texTypeStyle start="\\textit\s*{" matchgroup=texTypeStyle end="}" concealends contains=@texItalGroup
|
||||
syn region texItalStyle matchgroup=texTypeStyle start="\\textit\s*{" matchgroup=texTypeStyle end="}" concealends contains=@texItalGroup
|
||||
syn region texItalBoldStyle matchgroup=texTypeStyle start="\\textbf\s*{" matchgroup=texTypeStyle end="}" concealends contains=@texBoldGroup
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
" Bad Math (mismatched): {{{1
|
||||
if !exists("g:tex_no_math") && (!exists("s:tex_no_error") || !s:tex_no_error)
|
||||
syn match texBadMath "\\end\s*{\s*\(array\|gathered\|bBpvV]matrix\|split\|subequations\|smallmatrix\|xxalignat\)\s*}"
|
||||
syn match texBadMath "\\end\s*{\s*\(array\|gathered\|bBpvV]matrix\|split\|smallmatrix\|xxalignat\)\s*}"
|
||||
syn match texBadMath "\\end\s*{\s*\(align\|alignat\|displaymath\|displaymath\|eqnarray\|equation\|flalign\|gather\|math\|multline\|xalignat\)\*\=\s*}"
|
||||
syn match texBadMath "\\[\])]"
|
||||
endif
|
||||
@@ -449,24 +456,23 @@ if !exists("g:tex_no_math")
|
||||
call TexNewMathZone("G","gather",1)
|
||||
call TexNewMathZone("H","math",1)
|
||||
call TexNewMathZone("I","multline",1)
|
||||
call TexNewMathZone("J","subequations",0)
|
||||
call TexNewMathZone("K","xalignat",1)
|
||||
call TexNewMathZone("L","xxalignat",0)
|
||||
call TexNewMathZone("J","xalignat",1)
|
||||
call TexNewMathZone("K","xxalignat",0)
|
||||
|
||||
" Inline Math Zones: {{{2
|
||||
if s:tex_fast =~ 'M'
|
||||
if has("conceal") && &enc == 'utf-8' && s:tex_conceal =~ 'd'
|
||||
syn region texMathZoneV matchgroup=Delimiter start="\\(" matchgroup=Delimiter end="\\)\|%stopzone\>" keepend concealends contains=@texMathZoneGroup
|
||||
syn region texMathZoneW matchgroup=Delimiter start="\\\[" matchgroup=Delimiter end="\\]\|%stopzone\>" keepend concealends contains=@texMathZoneGroup
|
||||
syn region texMathZoneX matchgroup=Delimiter start="\$" skip="\\\\\|\\\$" matchgroup=Delimiter end="\$" end="%stopzone\>" concealends contains=@texMathZoneGroup
|
||||
syn region texMathZoneY matchgroup=Delimiter start="\$\$" matchgroup=Delimiter end="\$\$" end="%stopzone\>" concealends keepend contains=@texMathZoneGroup
|
||||
syn region texMathZoneV matchgroup=Delimiter start="\\(" matchgroup=Delimiter end="\\)\|%stopzone\>" keepend concealends contains=@texMathZoneGroup
|
||||
syn region texMathZoneW matchgroup=Delimiter start="\\\[" matchgroup=Delimiter end="\\]\|%stopzone\>" keepend concealends contains=@texMathZoneGroup
|
||||
syn region texMathZoneX matchgroup=Delimiter start="\$" skip="\\\\\|\\\$" matchgroup=Delimiter end="\$" end="%stopzone\>" concealends contains=@texMathZoneGroup
|
||||
syn region texMathZoneY matchgroup=Delimiter start="\$\$" matchgroup=Delimiter end="\$\$" end="%stopzone\>" keepend concealends contains=@texMathZoneGroup
|
||||
else
|
||||
syn region texMathZoneV matchgroup=Delimiter start="\\(" matchgroup=Delimiter end="\\)\|%stopzone\>" keepend contains=@texMathZoneGroup
|
||||
syn region texMathZoneW matchgroup=Delimiter start="\\\[" matchgroup=Delimiter end="\\]\|%stopzone\>" keepend contains=@texMathZoneGroup
|
||||
syn region texMathZoneX matchgroup=Delimiter start="\$" skip="\\\\\|\\\$" matchgroup=Delimiter end="\$" end="%stopzone\>" contains=@texMathZoneGroup
|
||||
syn region texMathZoneY matchgroup=Delimiter start="\$\$" matchgroup=Delimiter end="\$\$" end="%stopzone\>" keepend contains=@texMathZoneGroup
|
||||
syn region texMathZoneV matchgroup=Delimiter start="\\(" matchgroup=Delimiter end="\\)\|%stopzone\>" keepend contains=@texMathZoneGroup
|
||||
syn region texMathZoneW matchgroup=Delimiter start="\\\[" matchgroup=Delimiter end="\\]\|%stopzone\>" keepend contains=@texMathZoneGroup
|
||||
syn region texMathZoneX matchgroup=Delimiter start="\$" skip="\\\\\|\\\$" matchgroup=Delimiter end="\$" end="%stopzone\>" contains=@texMathZoneGroup
|
||||
syn region texMathZoneY matchgroup=Delimiter start="\$\$" matchgroup=Delimiter end="\$\$" end="%stopzone\>" keepend contains=@texMathZoneGroup
|
||||
endif
|
||||
syn region texMathZoneZ matchgroup=texStatement start="\\ensuremath\s*{" matchgroup=texStatement end="}" end="%stopzone\>" contains=@texMathZoneGroup
|
||||
syn region texMathZoneZ matchgroup=texStatement start="\\ensuremath\s*{" matchgroup=texStatement end="}" end="%stopzone\>" contains=@texMathZoneGroup
|
||||
endif
|
||||
|
||||
syn match texMathOper "[_^=]" contained
|
||||
@@ -576,14 +582,14 @@ else
|
||||
syn match texComment "%.*$" contains=@texCommentGroup
|
||||
if s:tex_fast =~ 'c'
|
||||
syn region texComment start="^\zs\s*%.*\_s*%" skip="^\s*%" end='^\ze\s*[^%]' fold
|
||||
syn region texNoSpell contained matchgroup=texComment start="%\s*nospell\s*{" end="%\s*nospell\s*}" fold contains=@texFoldGroup,@NoSpell
|
||||
syn region texSpellZone matchgroup=texComment start="%\s*spellzone_start" end="%\s*spellzone_end" fold contains=@Spell,@texFoldGroup
|
||||
syn region texNoSpell contained matchgroup=texComment start="%\s*nospell\s*{" end="%\s*nospell\s*}" fold contains=@texFoldGroup,@NoSpell
|
||||
syn region texSpellZone matchgroup=texComment start="%\s*spellzone_start" end="%\s*spellzone_end" fold contains=@Spell,@texFoldGroup
|
||||
endif
|
||||
else
|
||||
syn match texComment "%.*$" contains=@texCommentGroup
|
||||
syn match texComment "%.*$" contains=@texCommentGroup
|
||||
if s:tex_fast =~ 'c'
|
||||
syn region texNoSpell contained matchgroup=texComment start="%\s*nospell\s*{" end="%\s*nospell\s*}" contains=@texFoldGroup,@NoSpell
|
||||
syn region texSpellZone matchgroup=texComment start="%\s*spellzone_start" end="%\s*spellzone_end" contains=@Spell,@texFoldGroup
|
||||
syn region texNoSpell contained matchgroup=texComment start="%\s*nospell\s*{" end="%\s*nospell\s*}" contains=@texFoldGroup,@NoSpell
|
||||
syn region texSpellZone matchgroup=texComment start="%\s*spellzone_start" end="%\s*spellzone_end" contains=@Spell,@texFoldGroup
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
@@ -1055,11 +1061,12 @@ if has("conceal") && &enc == 'utf-8'
|
||||
syn region texSuperscript matchgroup=Delimiter start='\^{' skip="\\\\\|\\[{}]" end='}' contained concealends contains=texSpecialChar,texSuperscripts,texStatement,texSubscript,texSuperscript,texMathMatcher
|
||||
syn region texSubscript matchgroup=Delimiter start='_{' skip="\\\\\|\\[{}]" end='}' contained concealends contains=texSpecialChar,texSubscripts,texStatement,texSubscript,texSuperscript,texMathMatcher
|
||||
endif
|
||||
" s:SuperSub:
|
||||
fun! s:SuperSub(group,leader,pat,cchar)
|
||||
if a:pat =~ '^\\' || (a:leader == '\^' && a:pat =~ g:tex_superscripts) || (a:leader == '_' && a:pat =~ g:tex_subscripts)
|
||||
" call Decho("SuperSub: group<".a:group."> leader<".a:leader."> pat<".a:pat."> cchar<".a:cchar.">")
|
||||
exe 'syn match '.a:group." '".a:leader.a:pat."' contained conceal cchar=".a:cchar
|
||||
exe 'syn match '.a:group."s '".a:pat."' contained conceal cchar=".a:cchar.' nextgroup='.a:group.'s'
|
||||
exe 'syn match '.a:group."s '".a:pat ."' contained conceal cchar=".a:cchar.' nextgroup='.a:group.'s'
|
||||
endif
|
||||
endfun
|
||||
call s:SuperSub('texSuperscript','\^','0','⁰')
|
||||
|
||||
@@ -1,13 +1,14 @@
|
||||
" Vim syntax file
|
||||
" Language: Innovation Data Processing upstream.dat file
|
||||
" Maintainer: Rob Owens <rowens@fdrinnovation.com>
|
||||
" Latest Revision: 2013-06-17
|
||||
" Latest Revision: 2013-11-27
|
||||
|
||||
" Quit when a syntax file was already loaded
|
||||
if exists("b:current_syntax")
|
||||
finish
|
||||
endif
|
||||
|
||||
" Parameters:
|
||||
syn keyword upstreamdat_Parameter ACCEPTPCREMOTE
|
||||
syn keyword upstreamdat_Parameter ACCEPTREMOTE
|
||||
syn keyword upstreamdat_Parameter ACTION
|
||||
@@ -291,6 +292,14 @@ syn keyword upstreamdat_Parameter XFERECORDSIZE
|
||||
syn keyword upstreamdat_Parameter XFERRECSEP
|
||||
syn keyword upstreamdat_Parameter XFERRECUSECR
|
||||
|
||||
" File Specs:
|
||||
syn match upstreamdat_Filespec /file spec\c \d\{1,3}.*/
|
||||
|
||||
" Comments:
|
||||
syn match upstreamdat_Comment /^#.*/
|
||||
|
||||
hi def link upstreamdat_Parameter Type
|
||||
"hi def link upstreamdat_Filespec Underlined
|
||||
hi def link upstreamdat_Comment Comment
|
||||
|
||||
let b:current_syntax = "upstreamdat"
|
||||
|
||||
310
runtime/syntax/upstreamrpt.vim
Normal file
310
runtime/syntax/upstreamrpt.vim
Normal file
@@ -0,0 +1,310 @@
|
||||
" Vim syntax file
|
||||
" Language: Innovation Data Processing upstream.rpt file
|
||||
" Maintainer: Rob Owens <rowens@fdrinnovation.com>
|
||||
" Latest Revision: 2014-03-13
|
||||
|
||||
" Quit when a syntax file was already loaded
|
||||
if exists("b:current_syntax")
|
||||
finish
|
||||
endif
|
||||
|
||||
setlocal foldmethod=syntax
|
||||
|
||||
" Parameters:
|
||||
syn keyword upstreamdat_Parameter ACCEPTPCREMOTE
|
||||
syn keyword upstreamdat_Parameter ACCEPTREMOTE
|
||||
syn keyword upstreamdat_Parameter ACTION
|
||||
syn keyword upstreamdat_Parameter ACTIVATEONENTRY
|
||||
syn keyword upstreamdat_Parameter ARCHIVEBIT
|
||||
syn keyword upstreamdat_Parameter ARCHIVEBIT
|
||||
syn keyword upstreamdat_Parameter ASCTOEBC
|
||||
syn keyword upstreamdat_Parameter ASRBACKUP
|
||||
syn keyword upstreamdat_Parameter ATTENDED
|
||||
syn keyword upstreamdat_Parameter AUTHORITATIVE
|
||||
syn keyword upstreamdat_Parameter AUTHORITATIVERESTORE
|
||||
syn keyword upstreamdat_Parameter AUTHORITATIVERESTORE
|
||||
syn keyword upstreamdat_Parameter BACKUPPROFILE
|
||||
syn keyword upstreamdat_Parameter BACKUPPROFILE2
|
||||
syn keyword upstreamdat_Parameter BACKUPREPARSEFILES
|
||||
syn keyword upstreamdat_Parameter BACKUPREPARSEFILES
|
||||
syn keyword upstreamdat_Parameter BACKUPVERIFY
|
||||
syn keyword upstreamdat_Parameter BLANKTRUNC
|
||||
syn keyword upstreamdat_Parameter CALCDASDSIZE
|
||||
syn keyword upstreamdat_Parameter CHANGEDIRATTRIBS
|
||||
syn keyword upstreamdat_Parameter CHANGEDIRATTRIBS
|
||||
syn keyword upstreamdat_Parameter COMPRESSLEVEL
|
||||
syn keyword upstreamdat_Parameter CONTROLFILE
|
||||
syn keyword upstreamdat_Parameter DASDOVERRIDE
|
||||
syn keyword upstreamdat_Parameter DATELIMIT
|
||||
syn keyword upstreamdat_Parameter DATELIMIT
|
||||
syn keyword upstreamdat_Parameter DAYSOLD
|
||||
syn keyword upstreamdat_Parameter DAYSOLD
|
||||
syn keyword upstreamdat_Parameter DELETED
|
||||
syn keyword upstreamdat_Parameter DELETED
|
||||
syn keyword upstreamdat_Parameter DELETEPROMPTS
|
||||
syn keyword upstreamdat_Parameter DELETEPROMPTS
|
||||
syn keyword upstreamdat_Parameter DESTINATION
|
||||
syn keyword upstreamdat_Parameter DESTINATION
|
||||
syn keyword upstreamdat_Parameter DIRDELETE
|
||||
syn keyword upstreamdat_Parameter DIRECTORVMC
|
||||
syn keyword upstreamdat_Parameter DIRONLYRESTOREOK
|
||||
syn keyword upstreamdat_Parameter DIRSONLY
|
||||
syn keyword upstreamdat_Parameter DIRSONLY
|
||||
syn keyword upstreamdat_Parameter DISASTERRECOVERY
|
||||
syn keyword upstreamdat_Parameter DISPLAY
|
||||
syn keyword upstreamdat_Parameter DRIVEALIAS
|
||||
syn keyword upstreamdat_Parameter DRIVEALIAS
|
||||
syn keyword upstreamdat_Parameter DUALCOPY
|
||||
syn keyword upstreamdat_Parameter DUPDAYS
|
||||
syn keyword upstreamdat_Parameter DUPLICATE
|
||||
syn keyword upstreamdat_Parameter EBCTOASC
|
||||
syn keyword upstreamdat_Parameter ENCRYPT
|
||||
syn keyword upstreamdat_Parameter ENCRYPTLEVEL
|
||||
syn keyword upstreamdat_Parameter EXCLUDELISTNAME
|
||||
syn keyword upstreamdat_Parameter FAILBACKUPONERROR
|
||||
syn keyword upstreamdat_Parameter FAILBACKUPONERROR
|
||||
syn keyword upstreamdat_Parameter FAILIFNOFILES
|
||||
syn keyword upstreamdat_Parameter FAILIFNOFILES
|
||||
syn keyword upstreamdat_Parameter FAILIFSKIP
|
||||
syn keyword upstreamdat_Parameter FAILJOB
|
||||
syn keyword upstreamdat_Parameter FAILRESTOREONERROR
|
||||
syn keyword upstreamdat_Parameter FAILRESTOREONERROR
|
||||
syn keyword upstreamdat_Parameter FILEDATE
|
||||
syn keyword upstreamdat_Parameter FILEDATE
|
||||
syn keyword upstreamdat_Parameter FILEDELETE
|
||||
syn keyword upstreamdat_Parameter FILEDELETE
|
||||
syn keyword upstreamdat_Parameter FILES
|
||||
syn keyword upstreamdat_Parameter FILES
|
||||
syn keyword upstreamdat_Parameter FILESOPENFORUPDAT
|
||||
syn keyword upstreamdat_Parameter FILESOPENFORUPDAT
|
||||
syn keyword upstreamdat_Parameter FILETRANSFER
|
||||
syn keyword upstreamdat_Parameter GETREMOTEFILES
|
||||
syn keyword upstreamdat_Parameter HARDLINKDB
|
||||
syn keyword upstreamdat_Parameter HARDLINKS
|
||||
syn keyword upstreamdat_Parameter HARDLINKS
|
||||
syn keyword upstreamdat_Parameter HIDDENFILES
|
||||
syn keyword upstreamdat_Parameter HIDDENFILES
|
||||
syn keyword upstreamdat_Parameter HOLDTAPE
|
||||
syn keyword upstreamdat_Parameter HOLDUSERDIRS
|
||||
syn keyword upstreamdat_Parameter HOSTFILENAME
|
||||
syn keyword upstreamdat_Parameter HOSTRECORD
|
||||
syn keyword upstreamdat_Parameter HOSTSORT
|
||||
syn keyword upstreamdat_Parameter IGNOREPLUGINSFORRESTORE
|
||||
syn keyword upstreamdat_Parameter INCRDB
|
||||
syn keyword upstreamdat_Parameter INCRDBARCHIVEBIT
|
||||
syn keyword upstreamdat_Parameter INCRDBDELETEDFILES
|
||||
syn keyword upstreamdat_Parameter INCREMENTAL
|
||||
syn keyword upstreamdat_Parameter INCREMENTAL
|
||||
syn keyword upstreamdat_Parameter INQOPTIONS
|
||||
syn keyword upstreamdat_Parameter INSTALLWIN2KAGENT
|
||||
syn keyword upstreamdat_Parameter INSTALLWIN2KAGENT
|
||||
syn keyword upstreamdat_Parameter JOBOPTIONS
|
||||
syn keyword upstreamdat_Parameter JOBRETURNCODEMAP
|
||||
syn keyword upstreamdat_Parameter JOBWAITTIMELIMIT
|
||||
syn keyword upstreamdat_Parameter KEEPALIVE
|
||||
syn keyword upstreamdat_Parameter LANINTERFACE
|
||||
syn keyword upstreamdat_Parameter LANWSNAME
|
||||
syn keyword upstreamdat_Parameter LANWSPASSWORD
|
||||
syn keyword upstreamdat_Parameter LASTACCESS
|
||||
syn keyword upstreamdat_Parameter LASTACCESS
|
||||
syn keyword upstreamdat_Parameter LATESTDATE
|
||||
syn keyword upstreamdat_Parameter LATESTDATE
|
||||
syn keyword upstreamdat_Parameter LATESTTIME
|
||||
syn keyword upstreamdat_Parameter LATESTTIME
|
||||
syn keyword upstreamdat_Parameter LATESTVERSION
|
||||
syn keyword upstreamdat_Parameter LINEBLOCK
|
||||
syn keyword upstreamdat_Parameter LINETRUNC
|
||||
syn keyword upstreamdat_Parameter LISTENFORREMOTE
|
||||
syn keyword upstreamdat_Parameter LOCALBACKUP
|
||||
syn keyword upstreamdat_Parameter LOCALBACKUPDIR
|
||||
syn keyword upstreamdat_Parameter LOCALBACKUPMAX
|
||||
syn keyword upstreamdat_Parameter LOCALBACKUPMAXFILESIZE
|
||||
syn keyword upstreamdat_Parameter LOCALBACKUPMAXSIZE
|
||||
syn keyword upstreamdat_Parameter LOCALEXCLUDEFILE
|
||||
syn keyword upstreamdat_Parameter LOCALPARAMETERS
|
||||
syn keyword upstreamdat_Parameter LOCALPASSWORD
|
||||
syn keyword upstreamdat_Parameter LOCALRESTORE
|
||||
syn keyword upstreamdat_Parameter LOCALUSER
|
||||
syn keyword upstreamdat_Parameter LOFS
|
||||
syn keyword upstreamdat_Parameter LOGNONFATAL
|
||||
syn keyword upstreamdat_Parameter MAXBACKUPFILESFAIL
|
||||
syn keyword upstreamdat_Parameter MAXBACKUPTIME
|
||||
syn keyword upstreamdat_Parameter MAXDUPS
|
||||
syn keyword upstreamdat_Parameter MAXFILENAMESIZE
|
||||
syn keyword upstreamdat_Parameter MAXKFILESIZE
|
||||
syn keyword upstreamdat_Parameter MAXLOGDAYS
|
||||
syn keyword upstreamdat_Parameter MAXRESTOREFILESFAIL
|
||||
syn keyword upstreamdat_Parameter MAXRESTORETIME
|
||||
syn keyword upstreamdat_Parameter MAXRETRY
|
||||
syn keyword upstreamdat_Parameter MAXRPTDAYS
|
||||
syn keyword upstreamdat_Parameter MERGE
|
||||
syn keyword upstreamdat_Parameter MIGRBITS
|
||||
syn keyword upstreamdat_Parameter MIGRBITS
|
||||
syn keyword upstreamdat_Parameter MINCOMPRESSSIZE
|
||||
syn keyword upstreamdat_Parameter MINIMIZE
|
||||
syn keyword upstreamdat_Parameter MODIFYFILE
|
||||
syn keyword upstreamdat_Parameter MOUNTPOINTS
|
||||
syn keyword upstreamdat_Parameter MOUNTPOINTS
|
||||
syn keyword upstreamdat_Parameter NDS
|
||||
syn keyword upstreamdat_Parameter NDS
|
||||
syn keyword upstreamdat_Parameter NEWFILECOMPARE
|
||||
syn keyword upstreamdat_Parameter NFSBELOW
|
||||
syn keyword upstreamdat_Parameter NODATAOK
|
||||
syn keyword upstreamdat_Parameter NODIRFORINCREMENTAL
|
||||
syn keyword upstreamdat_Parameter NODIRFORINCREMENTAL
|
||||
syn keyword upstreamdat_Parameter NONFILEDATABITMAP
|
||||
syn keyword upstreamdat_Parameter NONFILEDATABITMAP
|
||||
syn keyword upstreamdat_Parameter NOPOINTRESTORE
|
||||
syn keyword upstreamdat_Parameter NOSPECINHERITANCE
|
||||
syn keyword upstreamdat_Parameter NOTIFYEVENTS
|
||||
syn keyword upstreamdat_Parameter NOTIFYFAILUREATTACHMENT
|
||||
syn keyword upstreamdat_Parameter NOTIFYSUCCESSATTACHMENT
|
||||
syn keyword upstreamdat_Parameter NOTIFYTARGETS
|
||||
syn keyword upstreamdat_Parameter NOUIDGIDNAMES
|
||||
syn keyword upstreamdat_Parameter NOUIDGIDNAMES
|
||||
syn keyword upstreamdat_Parameter NOVELLMIGRATE
|
||||
syn keyword upstreamdat_Parameter NOVELLMIGRATE
|
||||
syn keyword upstreamdat_Parameter NOVELLMIGRATEADDEXT
|
||||
syn keyword upstreamdat_Parameter NOVELLMIGRATEADDEXT
|
||||
syn keyword upstreamdat_Parameter NOVELLPROFILE
|
||||
syn keyword upstreamdat_Parameter NOVELLRECALL
|
||||
syn keyword upstreamdat_Parameter NTFSADDPERMISSION
|
||||
syn keyword upstreamdat_Parameter NTFSADDPERMISSION
|
||||
syn keyword upstreamdat_Parameter NTREGRESTORE
|
||||
syn keyword upstreamdat_Parameter OSTYPE
|
||||
syn keyword upstreamdat_Parameter OUTPORT
|
||||
syn keyword upstreamdat_Parameter PACKFLUSHAFTERFILE
|
||||
syn keyword upstreamdat_Parameter PACKRECSIZE
|
||||
syn keyword upstreamdat_Parameter PARAMETER
|
||||
syn keyword upstreamdat_Parameter PASSWORD
|
||||
syn keyword upstreamdat_Parameter PATHNAME
|
||||
syn keyword upstreamdat_Parameter PATHNAME
|
||||
syn keyword upstreamdat_Parameter PERFORMBITMAP
|
||||
syn keyword upstreamdat_Parameter PERFORMNUMRECORDS
|
||||
syn keyword upstreamdat_Parameter PERFORMRECORDSIZE
|
||||
syn keyword upstreamdat_Parameter PLUGIN
|
||||
syn keyword upstreamdat_Parameter PLUGIN
|
||||
syn keyword upstreamdat_Parameter PLUGINPARAMETERS
|
||||
syn keyword upstreamdat_Parameter PLUGINPARAMETERS
|
||||
syn keyword upstreamdat_Parameter POSTJOB
|
||||
syn keyword upstreamdat_Parameter PREJOB
|
||||
syn keyword upstreamdat_Parameter PRTYCLASS
|
||||
syn keyword upstreamdat_Parameter PRTYLEVEL
|
||||
syn keyword upstreamdat_Parameter RECALLCLEANUP
|
||||
syn keyword upstreamdat_Parameter RECALLOFFLINEFILES
|
||||
syn keyword upstreamdat_Parameter RECALLOFFLINEFILES
|
||||
syn keyword upstreamdat_Parameter RECORDSIZE
|
||||
syn keyword upstreamdat_Parameter REMOTEADDR
|
||||
syn keyword upstreamdat_Parameter REMOTEAPPLPREF
|
||||
syn keyword upstreamdat_Parameter REMOTEAPPLRETRY
|
||||
syn keyword upstreamdat_Parameter REMOTECONNECTTYPE
|
||||
syn keyword upstreamdat_Parameter REMOTEFLAGS
|
||||
syn keyword upstreamdat_Parameter REMOTEIPADAPTER
|
||||
syn keyword upstreamdat_Parameter REMOTELOCALPARAMETERS
|
||||
syn keyword upstreamdat_Parameter REMOTELOGMODE
|
||||
syn keyword upstreamdat_Parameter REMOTELUNAME
|
||||
syn keyword upstreamdat_Parameter REMOTEMAXRETRIES
|
||||
syn keyword upstreamdat_Parameter REMOTEMODENAME
|
||||
syn keyword upstreamdat_Parameter REMOTEPARAMETERFILE
|
||||
syn keyword upstreamdat_Parameter REMOTEPORT
|
||||
syn keyword upstreamdat_Parameter REMOTEREQUEST
|
||||
syn keyword upstreamdat_Parameter REMOTERESTART
|
||||
syn keyword upstreamdat_Parameter REMOTEROUTE
|
||||
syn keyword upstreamdat_Parameter REMOTETARGETNAME
|
||||
syn keyword upstreamdat_Parameter REMOTETCP
|
||||
syn keyword upstreamdat_Parameter REMOTETIMEOUT
|
||||
syn keyword upstreamdat_Parameter REMOTETMAXRETRY
|
||||
syn keyword upstreamdat_Parameter REMOTETPN
|
||||
syn keyword upstreamdat_Parameter REMOTEUSAPPL
|
||||
syn keyword upstreamdat_Parameter REMOTEVERIFY
|
||||
syn keyword upstreamdat_Parameter REMOTEWTOCOMP
|
||||
syn keyword upstreamdat_Parameter REPORTNAME
|
||||
syn keyword upstreamdat_Parameter REPORTOPTIONS
|
||||
syn keyword upstreamdat_Parameter RESTARTLASTFILE
|
||||
syn keyword upstreamdat_Parameter RESTART
|
||||
syn keyword upstreamdat_Parameter RESTARTTYPE
|
||||
syn keyword upstreamdat_Parameter RESTARTVERSIONDATE
|
||||
syn keyword upstreamdat_Parameter RESTOREARCHIVEBIT
|
||||
syn keyword upstreamdat_Parameter RESTORECHECKPOINT
|
||||
syn keyword upstreamdat_Parameter RESTOREDATELIMIT
|
||||
syn keyword upstreamdat_Parameter RESTOREDATELIMIT
|
||||
syn keyword upstreamdat_Parameter RESTOREFILEFAIL
|
||||
syn keyword upstreamdat_Parameter RESTOREMOUNTPOINTS
|
||||
syn keyword upstreamdat_Parameter RESTOREMOUNTPOINTS
|
||||
syn keyword upstreamdat_Parameter RESTORESEGMENTS
|
||||
syn keyword upstreamdat_Parameter RESTORESEGMENTS
|
||||
syn keyword upstreamdat_Parameter RESTORETODIFFFS
|
||||
syn keyword upstreamdat_Parameter RETAIN
|
||||
syn keyword upstreamdat_Parameter RETAIN
|
||||
syn keyword upstreamdat_Parameter ROOTENTRY
|
||||
syn keyword upstreamdat_Parameter ROOTENTRY
|
||||
syn keyword upstreamdat_Parameter SAN
|
||||
syn keyword upstreamdat_Parameter SCHEDULENAME
|
||||
syn keyword upstreamdat_Parameter SEGMENTEDFILESIZE
|
||||
syn keyword upstreamdat_Parameter SEGMENTEDFILESIZE
|
||||
syn keyword upstreamdat_Parameter SEGMENTSIZE
|
||||
syn keyword upstreamdat_Parameter SEGMENTSIZE
|
||||
syn keyword upstreamdat_Parameter SENDHOSTDETAILS
|
||||
syn keyword upstreamdat_Parameter SINGLEFS
|
||||
syn keyword upstreamdat_Parameter SIZETRC
|
||||
syn keyword upstreamdat_Parameter SKIP
|
||||
syn keyword upstreamdat_Parameter SKIPBACKUPSCAN
|
||||
syn keyword upstreamdat_Parameter SKIPOLD
|
||||
syn keyword upstreamdat_Parameter SKIPOLD
|
||||
syn keyword upstreamdat_Parameter SMSTARGETSERVICENAME
|
||||
syn keyword upstreamdat_Parameter SMSTSA
|
||||
syn keyword upstreamdat_Parameter SOLO
|
||||
syn keyword upstreamdat_Parameter SORTBACKUP
|
||||
syn keyword upstreamdat_Parameter SOSDISK
|
||||
syn keyword upstreamdat_Parameter SOSDISK
|
||||
syn keyword upstreamdat_Parameter SOSTIMESTAMP
|
||||
syn keyword upstreamdat_Parameter SOSTIMESTAMP
|
||||
syn keyword upstreamdat_Parameter SOSTIMESTAMPPATH
|
||||
syn keyword upstreamdat_Parameter SOSTIMESTAMPPATH
|
||||
syn keyword upstreamdat_Parameter SPECNUMBER
|
||||
syn keyword upstreamdat_Parameter SPECNUMBER
|
||||
syn keyword upstreamdat_Parameter SPECTYPE
|
||||
syn keyword upstreamdat_Parameter SPECTYPE
|
||||
syn keyword upstreamdat_Parameter STARTTIME
|
||||
syn keyword upstreamdat_Parameter STORAGETYPE
|
||||
syn keyword upstreamdat_Parameter SUBDIRECTORIES
|
||||
syn keyword upstreamdat_Parameter SUBDIRECTORIES
|
||||
syn keyword upstreamdat_Parameter SWITCHTOTAPEMB
|
||||
syn keyword upstreamdat_Parameter TCPADDRESS
|
||||
syn keyword upstreamdat_Parameter TCPTIMEOUT
|
||||
syn keyword upstreamdat_Parameter TIMEOVERRIDE
|
||||
syn keyword upstreamdat_Parameter TRACE
|
||||
syn keyword upstreamdat_Parameter TRANSLATE
|
||||
syn keyword upstreamdat_Parameter ULTRACOMP
|
||||
syn keyword upstreamdat_Parameter ULTREG
|
||||
syn keyword upstreamdat_Parameter ULTUPD
|
||||
syn keyword upstreamdat_Parameter UNCMACHINEALIAS
|
||||
syn keyword upstreamdat_Parameter UNCMACHINEALIAS
|
||||
syn keyword upstreamdat_Parameter USEALEBRA
|
||||
syn keyword upstreamdat_Parameter USECONTROLFILE
|
||||
syn keyword upstreamdat_Parameter USEGID
|
||||
syn keyword upstreamdat_Parameter USERID
|
||||
syn keyword upstreamdat_Parameter USEUID
|
||||
syn keyword upstreamdat_Parameter USNOUIDGIDERRORS
|
||||
syn keyword upstreamdat_Parameter UTF8
|
||||
syn keyword upstreamdat_Parameter VAULTNUMBER
|
||||
syn keyword upstreamdat_Parameter VERSIONDATE
|
||||
syn keyword upstreamdat_Parameter WRITESPARSE
|
||||
syn keyword upstreamdat_Parameter XFERECORDSIZE
|
||||
syn keyword upstreamdat_Parameter XFERRECSEP
|
||||
syn keyword upstreamdat_Parameter XFERRECUSECR
|
||||
|
||||
" File Specs:
|
||||
syn match upstreamdat_Filespec /file spec\c \d\{1,3}.*/
|
||||
|
||||
" Comments:
|
||||
syn match upstreamdat_Comment /^#.*/
|
||||
|
||||
" List Of Parameters:
|
||||
syn region upstreamdat_Parms start="Current Parameters:" end="End Of Parameters" transparent fold
|
||||
|
||||
hi def link upstreamdat_Parameter Type
|
||||
"hi def link upstreamdat_Filespec Underlined
|
||||
hi def link upstreamdat_Comment Comment
|
||||
|
||||
let b:current_syntax = "upstreamdat"
|
||||
@@ -1,7 +1,7 @@
|
||||
" Vim syntax file
|
||||
" Language: Innovation Data Processing USW2KAgt.log file
|
||||
" Maintainer: Rob Owens <rowens@fdrinnovation.com>
|
||||
" Latest Revision: 2013-09-19
|
||||
" Latest Revision: 2014-04-01
|
||||
|
||||
" Quit when a syntax file was already loaded
|
||||
if exists("b:current_syntax")
|
||||
@@ -17,8 +17,12 @@ syn match usw2kagtlog_MsgI /Msg #\(Agt\|PC\|Srv\)\d\{4,5}I/ nextgroup=usw2kagtlo
|
||||
syn match usw2kagtlog_MsgW /Msg #\(Agt\|PC\|Srv\)\d\{4,5}W/ nextgroup=usw2kagtlog_Process skipwhite
|
||||
" Processes:
|
||||
syn region usw2kagtlog_Process start="(" end=")" contained
|
||||
syn region usw2kagtlog_Process start="Starting the processing for a \zs\"" end="\ze client request"
|
||||
syn region usw2kagtlog_Process start="Ending the processing for a \zs\"" end="\ze client request"
|
||||
"syn region usw2kagtlog_Process start="Starting the processing for a \zs\"" end="\ze client request"
|
||||
"syn region usw2kagtlog_Process start="Ending the processing for a \zs\"" end="\ze client request"
|
||||
"syn region usw2kagtlog_Process start="Starting the processing for a \zs\"" end="\ze client\s\{0,1}\r\{0,1}\s\{1,9}request"
|
||||
"syn region usw2kagtlog_Process start="Ending the processing for a \zs\"" end="\ze client\s\{0,1}\r\{0,1}\s\{1,9}request"
|
||||
syn region usw2kagtlog_Process start="Starting the processing for a \zs\"" end="\ze client"
|
||||
syn region usw2kagtlog_Process start="Ending the processing for a \zs\"" end="\ze client"
|
||||
" IP Address:
|
||||
syn match usw2kagtlog_IPaddr / \d\{1,3}\.\d\{1,3}\.\d\{1,3}\.\d\{1,3}/
|
||||
" Profile:
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
" Maintainer: Daniel Kho <daniel.kho@tauhop.com>
|
||||
" Previous Maintainer: Czo <Olivier.Sirol@lip6.fr>
|
||||
" Credits: Stephan Hegel <stephan.hegel@snc.siemens.com.cn>
|
||||
" Last Changed: 2012 Feb 03 by Thilo Six
|
||||
" Last Changed: 2015 Apr 25 by Daniel Kho
|
||||
" $Id: vhdl.vim,v 1.1 2004/06/13 15:34:56 vimboss Exp $
|
||||
|
||||
" VHSIC (Very High Speed Integrated Circuit) Hardware Description Language
|
||||
@@ -160,10 +160,20 @@ syn match vhdlSpecial "[().,;]"
|
||||
syn match vhdlTime "\<\d\+\s\+\(\([fpnum]s\)\|\(sec\)\|\(min\)\|\(hr\)\)\>"
|
||||
syn match vhdlTime "\<\d\+\.\d\+\s\+\(\([fpnum]s\)\|\(sec\)\|\(min\)\|\(hr\)\)\>"
|
||||
|
||||
syn keyword vhdlTodo contained TODO FIXME
|
||||
syn keyword vhdlTodo contained TODO NOTE
|
||||
syn keyword vhdlFixme contained FIXME
|
||||
|
||||
syn region vhdlComment start="/\*" end="\*/" contains=vhdlTodo,@Spell
|
||||
syn match vhdlComment "--.*" contains=vhdlTodo,@Spell
|
||||
" Regex for space is '\s'
|
||||
" Any number of spaces: \s*
|
||||
" At least one space: \s+
|
||||
syn region vhdlComment start="/\*" end="\*/" contains=vhdlTodo,vhdlFixme,@Spell
|
||||
syn match vhdlComment "--.*" contains=vhdlTodo,vhdlFixme,@Spell
|
||||
syn match vhdlPreProc "/\* synthesis .* \*/"
|
||||
syn match vhdlPreProc "/\* pragma .* \*/"
|
||||
syn match vhdlPreProc "/\* synopsys .* \*/"
|
||||
syn match vhdlPreProc "--\s*synthesis .*"
|
||||
syn match vhdlPreProc "--\s*pragma .*"
|
||||
syn match vhdlPreProc "--\s*synopsys .*"
|
||||
" syn match vhdlGlobal "[\'$#~!%@?\^\[\]{}\\]"
|
||||
|
||||
"Modify the following as needed. The trade-off is performance versus functionality.
|
||||
@@ -180,21 +190,22 @@ if version >= 508 || !exists("did_vhdl_syntax_inits")
|
||||
command -nargs=+ HiLink hi def link <args>
|
||||
endif
|
||||
|
||||
" HiLink cDefine PreProc
|
||||
HiLink vhdlSpecial Special
|
||||
HiLink vhdlStatement Statement
|
||||
HiLink vhdlCharacter Character
|
||||
HiLink vhdlString String
|
||||
HiLink vhdlVector Number
|
||||
HiLink vhdlBoolean Number
|
||||
HiLink vhdlTodo Todo
|
||||
HiLink vhdlComment Comment
|
||||
HiLink vhdlNumber Number
|
||||
HiLink vhdlTime Number
|
||||
HiLink vhdlType Type
|
||||
HiLink vhdlOperator Special
|
||||
HiLink vhdlSpecial Special
|
||||
HiLink vhdlStatement Statement
|
||||
HiLink vhdlCharacter Character
|
||||
HiLink vhdlString String
|
||||
HiLink vhdlVector Number
|
||||
HiLink vhdlBoolean Number
|
||||
HiLink vhdlTodo Todo
|
||||
HiLink vhdlFixme Fixme
|
||||
HiLink vhdlComment Comment
|
||||
HiLink vhdlNumber Number
|
||||
HiLink vhdlTime Number
|
||||
HiLink vhdlType Type
|
||||
HiLink vhdlOperator Operator
|
||||
" HiLink vhdlGlobal Error
|
||||
HiLink vhdlAttribute Type
|
||||
HiLink vhdlAttribute Special
|
||||
HiLink vhdlPreProc PreProc
|
||||
|
||||
delcommand HiLink
|
||||
endif
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
" Vim syntax file
|
||||
" Language: Vim 7.4 script
|
||||
" Maintainer: Charles E. Campbell <NdrOchipS@PcampbellAfamily.Mbiz>
|
||||
" Last Change: Jan 13, 2015
|
||||
" Version: 7.4-28
|
||||
" Last Change: Apr 02, 2015
|
||||
" Version: 7.4-33
|
||||
" Automatically generated keyword lists: {{{1
|
||||
|
||||
" Quit when a syntax file was already loaded {{{2
|
||||
@@ -18,23 +18,24 @@ syn keyword vimTodo contained COMBAK FIXME TODO XXX
|
||||
syn cluster vimCommentGroup contains=vimTodo,@Spell
|
||||
|
||||
" regular vim commands {{{2
|
||||
syn keyword vimCommand contained a arga[dd] ar[gs] bd[elete] bN[ext] breakl[ist] b[uffer] cad cb[uffer] cf[ile] changes cl[ist] cn[ext] col[der] conf[irm] cq[uit] cw[indow] delc[ommand] deletl delp diffpu[t] dir doau ea e[dit] endfo[r] ene[w] files fini[sh] foldd[oopen] g h helpt[ags] iabc[lear] intro k l lan lc[d] lefta[bove] lg[etfile] lla[st] lnew[er] lNf[ile] lockv[ar] ls lvimgrepa[dd] mat[ch] mk[exrc] mo n n[ext] nu[mber] opt[ions] pe[rl] pr prof[ile] ptj[ump] ptp[revious] py3 q r[ead] redr[aw] retu[rn] rub[y] rv[iminfo] sba[ll] sbN[ext] scripte[ncoding] setf[iletype] sh[ell] sim[alt] sm[ap] sni[ff] sor[t] spelli[nfo] spr[evious] start st[op] sunmenu syn ta tabf[ind] tabnew tabr[ewind] tcld[o] tj[ump] tN tr tu[nmenu] undoj[oin] uns[ilent] ve[rsion] vimgrepa[dd] vs[plit] winc[md] wN[ext] ws[verb] x[it] xnoremenu
|
||||
syn keyword vimCommand contained ab argd[elete] argu[ment] bel[owright] bo[tright] br[ewind] buffers caddb[uffer] cc cfir[st] chd[ir] clo[se] cN[ext] colo[rscheme] con[tinue] cr[ewind] d delel deletp dep diffs[plit] di[splay] dp earlier el[se] endfun ex filet fir[st] foldo[pen] go[to] ha[rdcopy] hi if is[earch] keepa la lan[guage] lch[dir] lex[pr] lgr[ep] lli[st] lne[xt] lo lol[der] lt[ag] lw[indow] menut mks[ession] mod[e] nbc[lose] nmapc[lear] o ownsyntax perld[o] pre[serve] promptf[ind] ptl[ast] ptr[ewind] py3do qa[ll] rec[over] redraws[tatus] rew[ind] rubyd[o] sal[l] sbf[irst] sbp[revious] scrip[tnames] setg[lobal] si sl sme sno[magic] so[urce] spellr[epall] sre[wind] startg[replace] stopi[nsert] sus[pend] sync tab tabfir[st] tabn[ext] tabs tclf[ile] tl[ast] tn[ext] tr[ewind] u undol[ist] up[date] vert[ical] vi[sual] w windo wp[revious] wundo xmapc[lear] xunme
|
||||
syn keyword vimCommand contained abc[lear] argdo as[cii] bf[irst] bp[revious] bro[wse] bun[load] cad[dexpr] ccl[ose] cgetb[uffer] che[ckpath] cmapc[lear] cnf com cope[n] cs de delep delf di difft[his] dj[ump] dr[op] ec elsei[f] endf[unction] exi[t] filetype fix[del] for gr[ep] h[elp] hid[e] ij[ump] isp[lit] keepalt lad la[st] lcl[ose] lf[ile] lgrepa[dd] lmak[e] lN[ext] loadk lop[en] lua ma menut[ranslate] mksp[ell] m[ove] nb[key] noa ol[dfiles] p po[p] prev[ious] promptr[epl] ptn pts[elect] pydo q[uit] red reg[isters] ri[ght] rubyf[ile] san[dbox] sbl[ast] sbr[ewind] scs setl[ocal] sig sla[st] smenu snoreme spe spellu[ndo] st star[tinsert] sts[elect] sv[iew] syncbind tabc[lose] tabl[ast] tabN[ext] ta[g] te[aroff] tm tN[ext] try un unh[ide] v vi viu[sage] wa[ll] winp[os] wq wv[iminfo] xme xunmenu
|
||||
syn keyword vimCommand contained abo[veleft] arge[dit] au bl[ast] brea[k] bu bw[ipeout] caddf[ile] cd cgete[xpr] checkt[ime] cn cNf comc[lear] co[py] cscope debug d[elete] delf[unction] diffg[et] diffu[pdate] dl ds[earch] echoe[rr] em[enu] en[dif] exu[sage] fin fo[ld] fu grepa[dd] helpc[lose] his[tory] il[ist] iuna[bbrev] keepj[umps] laddb[uffer] lat lcs lfir[st] lh[elpgrep] lmapc[lear] lnf loadkeymap lpf[ile] luado mak[e] mes mkv mz nbs[tart] noautocmd omapc[lear] pc[lose] popu p[rint] ps[earch] ptN pu[t] pyf[ile] quita[ll] redi[r] res[ize] rightb[elow] rundo sa[rgument] sbm[odified] sb[uffer] scscope sf[ind] sign sl[eep] sn[ext] snoremenu spelld[ump] spellw[rong] sta[g] startr[eplace] sun[hide] sw[apname] syntime tabd[o] tabm[ove] tabo[nly] tags tf[irst] tm[enu] to[pleft] ts[elect] una[bbreviate] unl ve vie[w] vmapc[lear] wh[ile] win[size] wqa[ll] x xmenu xwininfo
|
||||
syn keyword vimCommand contained al[l] argg[lobal] bad[d] bm[odified] breaka[dd] buf c cal[l] ce[nter] cg[etfile] cl cN cnf[ile] comp[iler] cpf[ile] cstag debugg[reedy] deletel dell diffo[ff] dig dli[st] dsp[lit] echom[sg] en endt[ry] f fina[lly] foldc[lose] fun gui helpf[ind] i imapc[lear] j[oin] kee[pmarks] lad[dexpr] later lcscope lgetb[uffer] l[ist] lN lNf lo[adview] lp[revious] luafile ma[rk] messages mkvie[w] mzf[ile] ne noh[lsearch] on[ly] pe popu[p] pro pta[g] ptn[ext] pw[d] py[thon] r red[o] ret[ab] ru ru[ntime] sav[eas] sbn[ext] scrip se[t] sfir[st] sil[ent] sm[agic] sN[ext] so spe[llgood] sp[lit] star stj[ump] sunme sy t tabe[dit] tabN tabp[revious] tc[l] th[row] tn tp[revious] tu u[ndo] unlo[ckvar] verb[ose] vim[grep] vne[w] win wn[ext] w[rite] xa[ll] xnoreme y[ank]
|
||||
syn keyword vimCommand contained ar argl[ocal] ba[ll] bn[ext] breakd[el] bufdo cabc[lear] cat[ch] cex[pr] c[hange] cla[st] cnew[er] cNf[ile] con cp[revious] cuna[bbrev] del deletep delm[arks] diffp[atch] dig[raphs] do e echon endf endw[hile] f[ile] fin[d] folddoc[losed] fu[nction] gvim helpg[rep] ia in ju[mps] keepp[atterns] laddf[ile] lb[uffer] le[ft] lgete[xpr] ll lne lnf[ile] loc[kmarks] lr[ewind] lv[imgrep] marks mk mkv[imrc] mz[scheme] new noswap[file] o[pen] ped[it] pp[op] profd[el] ptf[irst] ptN[ext] py python3 re
|
||||
syn keyword vimCommand contained a arga[dd] argl[ocal] ba[ll] bn[ext] breakd[el] bufdo cabc[lear] cb[uffer] cf[ile] changes cl[ist] cn[ext] col[der] conf[irm] cq[uit] cw[indow] delc[ommand] deletl delp diffpu[t] dir doau ea e[dit] endfo[r] ene[w] files fini[sh] foldd[oopen] g h helpt[ags] iabc[lear] intro k l lan lc[d] lefta[bove] lg[etfile] lla[st] lnew[er] lNf[ile] lockv[ar] ls lvimgrepa[dd] mat[ch] mk[exrc] mo n n[ext] nore on[ly] pe popu[p] pro pta[g] ptn[ext] pw[d] py[thon] r red[o] retu[rn] rub[y] rv[iminfo] sba[ll] sbN[ext] scripte[ncoding] setf[iletype] sh[ell] sl sme sno[magic] so[urce] spellr[epall] sre[wind] startg[replace] stopi[nsert] sus[pend] sync tab tabfir[st] tabn[ext] tabs tclf[ile] tl[ast] tn[ext] tr[ewind] u undol[ist] up[date] vert[ical] vi[sual] w windo wp[revious] wundo xmapc[lear] xprop
|
||||
syn keyword vimCommand contained ab argd ar[gs] bd[elete] bN[ext] breakl[ist] b[uffer] cad[dbuffer] cc cfir[st] chd[ir] clo[se] cN[ext] colo[rscheme] con[tinue] cr[ewind] d delel deletp dep diffs[plit] di[splay] dp earlier el[se] endfun ex filet fir[st] foldo[pen] go[to] ha[rdcopy] hi if is[earch] keepa la lan[guage] lch[dir] lex[pr] lgr[ep] lli[st] lne[xt] lo lol[der] lt[ag] lw[indow] menut mks[ession] mod[e] nbc[lose] nmapc[lear] nos[wapfile] o[pen] ped[it] pp[op] profd[el] ptf[irst] ptN[ext] py python3 re redr[aw] rew[ind] rubyd[o] sal[l] sbf[irst] sbp[revious] scr[iptnames] setg[lobal] sig sla[st] smenu snoreme spe spellu[ndo] st star[tinsert] sts[elect] sv[iew] syncbind tabc[lose] tabl[ast] tabN[ext] ta[g] te[aroff] tm tN[ext] try un unh[ide] v vi viu[sage] wa[ll] winp[os] wq wv[iminfo] xme xunme
|
||||
syn keyword vimCommand contained abc[lear] argd[elete] argu[ment] bel[owright] bo[tright] br[ewind] buffers cadde[xpr] ccl[ose] cgetb[uffer] che[ckpath] cmapc[lear] cnf com cope[n] cs de delep delf di difft[his] dj[ump] dr[op] ec elsei[f] endf[unction] exi[t] filetype fix[del] for gr[ep] h[elp] hid[e] ij[ump] isp[lit] keepalt lad la[st] lcl[ose] lf[ile] lgrepa[dd] lmak[e] lN[ext] loadk lop[en] lua ma menut[ranslate] mksp[ell] m[ove] nb[key] noa nu[mber] opt[ions] pe[rl] pr prof[ile] ptj[ump] ptp[revious] py3 q r[ead] redraws[tatus] ri[ght] rubyf[ile] san[dbox] sbl[ast] sbr[ewind] scs setl[ocal] sign sl[eep] sn[ext] snoremenu spelld[ump] spellw[rong] sta[g] startr[eplace] sun[hide] sw[apname] syntime tabd[o] tabm[ove] tabo[nly] tags tf[irst] tm[enu] to[pleft] ts[elect] una[bbreviate] unl ve vie[w] vmapc[lear] wh[ile] win[size] wqa[ll] x xmenu xunmenu
|
||||
syn keyword vimCommand contained abo[veleft] argdo as[cii] bf[irst] bp[revious] bro[wse] bun[load] caddf[ile] cd cgete[xpr] checkt[ime] cn cNf comc[lear] co[py] cscope debug d[elete] delf[unction] diffg[et] diffu[pdate] dl ds[earch] echoe[rr] em[enu] en[dif] exu[sage] fin fo[ld] fu grepa[dd] helpc[lose] his[tory] il[ist] iuna[bbrev] keepj[umps] laddb[uffer] lat lcs lfir[st] lh[elpgrep] lmapc[lear] lnf loadkeymap lpf[ile] luado mak[e] mes mkv mz nbs[tart] noautocmd o ownsyntax perld[o] pre[serve] promptf[ind] ptl[ast] ptr[ewind] py3do qa[ll] rec[over] reg[isters] rightb[elow] rundo sa[rgument] sbm[odified] sb[uffer] scscope sf[ind] sil[ent] sm[agic] sN[ext] so spe[llgood] sp[lit] star stj[ump] sunme sy t tabe[dit] tabN tabp[revious] tc[l] th[row] tn tp[revious] tu u[ndo] unlo[ckvar] verb[ose] vim[grep] vne[w] win wn[ext] w[rite] xa[ll] xnoreme xwininfo
|
||||
syn keyword vimCommand contained al[l] arge[dit] au bl[ast] brea[k] bu bw[ipeout] cal[l] ce[nter] cg[etfile] cl cN cnf[ile] comp[iler] cpf[ile] cstag debugg[reedy] deletel dell diffo[ff] dig dli[st] dsp[lit] echom[sg] en endt[ry] f fina[lly] foldc[lose] fun gui helpf[ind] i imapc[lear] j[oin] kee[pmarks] lad[dexpr] later lcscope lgetb[uffer] l[ist] lN lNf lo[adview] lp[revious] luafile ma[rk] messages mkvie[w] mzf[ile] ne noh[lsearch] ol[dfiles] p po[p] prev[ious] promptr[epl] ptn pts[elect] pydo q[uit] red res[ize] ru ru[ntime] sav[eas] sbn[ext] scr se[t] sfir[st] sim[alt] sm[ap] sni[ff] sor[t] spelli[nfo] spr[evious] start st[op] sunmenu syn ta tabf[ind] tabnew tabr[ewind] tcld[o] tj[ump] tN tr tu[nmenu] undoj[oin] uns[ilent] ve[rsion] vimgrepa[dd] vs[plit] winc[md] wN[ext] ws[verb] x[it] xnoremenu y[ank]
|
||||
syn keyword vimCommand contained ar argg[lobal] bad[d] bm[odified] breaka[dd] buf c cat[ch] cex[pr] c[hange] cla[st] cnew[er] cNf[ile] con cp[revious] cuna[bbrev] del deletep delm[arks] diffp[atch] dig[raphs] do e echon endf endw[hile] f[ile] fin[d] folddoc[losed] fu[nction] gvim helpg[rep] ia in ju[mps] keepp[atterns] laddf[ile] lb[uffer] le[ft] lgete[xpr] ll lne lnf[ile] loc[kmarks] lr[ewind] lv[imgrep] marks mk mkv[imrc] mz[scheme] new nor omapc[lear] pc[lose] popu p[rint] ps[earch] ptN pu[t] pyf[ile] quita[ll] redi[r] ret[ab]
|
||||
syn match vimCommand contained "\<z[-+^.=]\=\>"
|
||||
syn keyword vimStdPlugin contained DiffOrig Man N[ext] P[rint] S TOhtml XMLent XMLns
|
||||
|
||||
" vimOptions are caught only when contained in a vimSet {{{2
|
||||
syn keyword vimOption contained acd ambiwidth arabicshape autowriteall backupdir bdlay binary breakat bs casemap cf cink cmdheight colorcolumn completefunc copyindent cryptmethod cscopeverbose csverb debug dict dir eb enc errorbells expandtab fdl fenc fileencodings fkmap foldenable foldminlines formatprg gdefault gp guifontset helpfile hidden hl ignorecase imcmdline imsf indentexpr is isp keywordprg laststatus lisp loadplugins macatsui maxcombine mef mls modelines mousehide mp nu omnifunc paragraphs penc pm printdevice printoptions quoteescape remap rightleftcmd rtp sbo scrolljump sel shell shelltype shortname shq sm so spellfile spr st sts swapsync syn tag tb termbidi tgst titleold top ttimeoutlen ttyscroll ul ur verbosefile visualbell wcm wi wildmenu winfixwidth wm wrapscan
|
||||
syn keyword vimOption contained ai ambw ari aw backupext beval biosk breakindent bsdir cb cfu cinkeys cmdwinheight columns completeopt cot cscopepathcomp cspc cuc deco dictionary directory ed encoding errorfile exrc fdls fencs fileformat flp foldexpr foldnestmax fp gfm grepformat guifontwide helpheight highlight hlg im imd imstatusfunc indentkeys isf isprint km lazyredraw lispwords lpl magic maxfuncdepth menuitems mm modifiable mousem mps number opendevice paste pex pmbcs printencoding prompt rdt renderoptions rl ru sbr scrolloff selection shellcmdflag shellxescape showbreak si smartcase softtabstop spelllang sps sta su swb synmaxcol tagbsearch tbi termencoding thesaurus titlestring tpm ttm ttytype undodir ut vfile vop wd wic wildmode winheight wmh write
|
||||
syn keyword vimOption contained akm anti arshape awa backupskip bex bioskey breakindentopt bsk cc ch cino cmp com concealcursor cp cscopeprg csprg cul def diff display edcompatible endofline errorformat fcl fdm fex fileformats fml foldignore foldopen fs gfn grepprg guiheadroom helplang history hls imactivatefunc imdisable inc indk isfname joinspaces kmp lbr list ls makeef maxmapdepth mfd mmd modified mousemodel msm numberwidth operatorfunc pastetoggle pexpr pmbfn printexpr pt re report rlc ruf sc scrollopt selectmode shellpipe shellxquote showcmd sidescroll smartindent sol spellsuggest sr stal sua swf syntax taglength tbidi terse tildeop tl tr tty tw undofile vb vi wa weirdinvert wig wildoptions winminheight wmnu writeany
|
||||
syn keyword vimOption contained al antialias autochdir background balloondelay bexpr bk bri bt ccv charconvert cinoptions cms comments conceallevel cpo cscopequickfix csqf cursorbind define diffexpr dy ef eol esckeys fcs fdn ff fileignorecase fmr foldlevel foldtext fsync gfs gtl guioptions hf hk hlsearch imactivatekey imi include inex isi js kp lcs listchars lsp makeprg maxmem mh mmp more mouses mzq nuw opfunc patchexpr pfn popt printfont pumheight readonly restorescreen rnu ruler scb scs sessionoptions shellquote shiftround showfulltag sidescrolloff smarttab sp spf srr startofline suffixes switchbuf ta tagrelative tbis textauto timeout tm ts ttybuiltin tx undolevels vbs viewdir wak wfh wildchar wim winminwidth wmw writebackup
|
||||
syn keyword vimOption contained aleph ar autoindent backspace ballooneval bg bkc briopt bufhidden cd ci cinw co commentstring confirm cpoptions cscoperelative csre cursorcolumn delcombine diffopt ea efm ep et fdc fdo ffs filetype fo foldlevelstart formatexpr ft gfw gtt guipty hh hkmap ic imaf iminsert includeexpr inf isident key langmap linebreak lm lw mat maxmempattern mis mmt mouse mouseshape mzquantum odev osfiletype patchmode ph preserveindent printheader pvh redrawtime revins ro rulerformat scr sect sft shellredir shiftwidth showmatch siso smc spc spl ss statusline suffixesadd sws tabline tags tbs textmode timeoutlen to tsl ttyfast uc undoreload vdir viewoptions warn wfw wildcharm winaltkeys winwidth wop writedelay
|
||||
syn keyword vimOption contained allowrevins arab autoread backup balloonexpr bh bl brk buflisted cdpath cin cinwords cocu compatible consk cpt cscopetag cst cursorline dex digraph ead ei equalalways eventignore fde fdt fic fillchars foldclose foldmarker formatlistpat gcr ghr guicursor guitablabel hi hkmapp icon imak ims incsearch infercase isk keymap langmenu lines lmap lz matchpairs maxmemtot mkspellmem mod mousef mouset nf oft pa path pheader previewheight printmbcharset pvw regexpengine ri rop runtimepath scroll sections sh shellslash shm showmode sj smd spell splitbelow ssl stl sw sxe tabpagemax tagstack tenc textwidth title toolbar tsr ttym udf updatecount ve viminfo wb wh wildignore window wiv wrap ws
|
||||
syn keyword vimOption contained altkeymap arabic autowrite backupcopy bdir bin bomb browsedir buftype cedit cindent clipboard cole complete conskey crb cscopetagorder csto cwh dg dip eadirection ek equalprg ex fdi fen fileencoding fk foldcolumn foldmethod formatoptions gd go guifont guitabtooltip hid hkp iconstring imc imsearch inde insertmode iskeyword keymodel langnoremap linespace lnr ma matchtime mco ml modeline mousefocus mousetime nrformats ofu para pdev pi previewwindow printmbfont qe relativenumber rightleft rs sb scrollbind secure shcf shelltemp shortmess showtabline slm sn spellcapcheck splitright ssop stmp swapfile sxq tabstop tal term tf titlelen toolbariconsize ttimeout ttymouse udir updatetime verbose virtualedit wc whichwrap wildignorecase winfixheight wiw wrapmargin ww
|
||||
syn keyword vimOption contained acd ambw ari aw backupext beval biosk breakindent bsdir cb cfu cinkeys cmdheight colorcolumn completefunc copyindent cryptmethod cscopeverbose csverb debug dict dir eb enc errorbells expandtab fdl fenc fileencodings fkmap foldenable foldminlines formatprg gdefault gp guifontset helpfile hidden hl ignorecase imcmdline imsf indentexpr is isp keywordprg laststatus lisp loadplugins macatsui maxcombine mef mls modelines mousehide mp nu omnifunc paragraphs penc pm printdevice printoptions quoteescape remap rightleftcmd rtp sbo scrolljump sel shell shelltype shortname shq sm so spellfile spr st sts swapsync syn tag tb termbidi tgst titleold top ttimeoutlen ttyscroll ul ur verbosefile visualbell wcm wi wildmenu winfixwidth wm wrapscan
|
||||
syn keyword vimOption contained ai anti arshape awa backupskip bex bioskey breakindentopt bsk cc ch cino cmdwinheight columns completeopt cot cscopepathcomp cspc cuc deco dictionary directory ed encoding errorfile exrc fdls fencs fileformat flp foldexpr foldnestmax fp gfm grepformat guifontwide helpheight highlight hlg im imd imstatusfunc indentkeys isf isprint km lazyredraw lispwords lpl magic maxfuncdepth menuitems mm modifiable mousem mps number opendevice paste pex pmbcs printencoding prompt rdt renderoptions rl ru sbr scrolloff selection shellcmdflag shellxescape showbreak si smartcase softtabstop spelllang sps sta su swb synmaxcol tagbsearch tbi termencoding thesaurus titlestring tpm ttm ttytype undodir ut vfile vop wd wic wildmode winheight wmh write
|
||||
syn keyword vimOption contained akm antialias autochdir background balloondelay bexpr bk bri bt ccv charconvert cinoptions cmp com concealcursor cp cscopeprg csprg cul def diff display edcompatible endofline errorformat fcl fdm fex fileformats fml foldignore foldopen fs gfn grepprg guiheadroom helplang history hls imactivatefunc imdisable inc indk isfname joinspaces kmp lbr list ls makeef maxmapdepth mfd mmd modified mousemodel msm numberwidth operatorfunc pastetoggle pexpr pmbfn printexpr pt re report rlc ruf sc scrollopt selectmode shellpipe shellxquote showcmd sidescroll smartindent sol spellsuggest sr stal sua swf syntax taglength tbidi terse tildeop tl tr tty tw undofile vb vi wa weirdinvert wig wildoptions winminheight wmnu writeany
|
||||
syn keyword vimOption contained al ar autoindent backspace ballooneval bg bkc briopt bufhidden cd ci cinw cms comments conceallevel cpo cscopequickfix csqf cursorbind define diffexpr dy ef eol esckeys fcs fdn ff fileignorecase fmr foldlevel foldtext fsync gfs gtl guioptions hf hk hlsearch imactivatekey imi include inex isi js kp lcs listchars lsp makeprg maxmem mh mmp more mouses mzq nuw opfunc patchexpr pfn popt printfont pumheight readonly restorescreen rnu ruler scb scs sessionoptions shellquote shiftround showfulltag sidescrolloff smarttab sp spf srr startofline suffixes switchbuf ta tagrelative tbis textauto timeout tm ts ttybuiltin tx undolevels vbs viewdir wak wfh wildchar wim winminwidth wmw writebackup
|
||||
syn keyword vimOption contained aleph arab autoread backup balloonexpr bh bl brk buflisted cdpath cin cinwords co commentstring confirm cpoptions cscoperelative csre cursorcolumn delcombine diffopt ea efm ep et fdc fdo ffs filetype fo foldlevelstart formatexpr ft gfw gtt guipty hh hkmap ic imaf iminsert includeexpr inf isident key langmap linebreak lm lw mat maxmempattern mis mmt mouse mouseshape mzquantum odev osfiletype patchmode ph preserveindent printheader pvh redrawtime revins ro rulerformat scr sect sft shellredir shiftwidth showmatch siso smc spc spl ss statusline suffixesadd sws tabline tags tbs textmode timeoutlen to tsl ttyfast uc undoreload vdir viewoptions warn wfw wildcharm winaltkeys winwidth wop writedelay
|
||||
syn keyword vimOption contained allowrevins arabic autowrite backupcopy bdir bin bomb browsedir buftype cedit cindent clipboard cocu compatible consk cpt cscopetag cst cursorline dex digraph ead ei equalalways eventignore fde fdt fic fillchars foldclose foldmarker formatlistpat gcr ghr guicursor guitablabel hi hkmapp icon imak ims incsearch infercase isk keymap langmenu lines lmap lz matchpairs maxmemtot mkspellmem mod mousef mouset nf oft pa path pheader previewheight printmbcharset pvw regexpengine ri rop runtimepath scroll sections sh shellslash shm showmode sj smd spell splitbelow ssl stl sw sxe tabpagemax tagstack tenc textwidth title toolbar tsr ttym udf updatecount ve viminfo wb wh wildignore window wiv wrap ws
|
||||
syn keyword vimOption contained altkeymap arabicshape autowriteall backupdir bdlay binary breakat bs casemap cf cink cm cole complete conskey crb cscopetagorder csto cwh dg dip eadirection ek equalprg ex fdi fen fileencoding fk foldcolumn foldmethod formatoptions gd go guifont guitabtooltip hid hkp iconstring imc imsearch inde insertmode iskeyword keymodel langnoremap linespace lnr ma matchtime mco ml modeline mousefocus mousetime nrformats ofu para pdev pi previewwindow printmbfont qe relativenumber rightleft rs sb scrollbind secure shcf shelltemp shortmess showtabline slm sn spellcapcheck splitright ssop stmp swapfile sxq tabstop tal term tf titlelen toolbariconsize ttimeout ttymouse udir updatetime verbose virtualedit wc whichwrap wildignorecase winfixheight wiw wrapmargin ww
|
||||
syn keyword vimOption contained ambiwidth
|
||||
|
||||
" vimOptions: These are the turn-off setting variants {{{2
|
||||
syn keyword vimOption contained noacd noallowrevins noantialias noarabic noarshape noautoread noaw noballooneval nobinary nobk nobuflisted nocin noconfirm nocopyindent nocscoperelative nocsre nocuc nocursorcolumn nodelcombine nodigraph noed noendofline noerrorbells noex nofen nofk nogd nohid nohkmap nohkp nohlsearch noicon noim noimcmdline noimdisable noinf noinsertmode nojoinspaces nolazyredraw nolinebreak nolist nolpl noma nomagic noml nomodeline nomodified nomousef nomousehide nonumber noopendevice nopi nopreviewwindow nopvw norelativenumber norestorescreen nori norl noro noru nosb noscb noscs nosft noshelltemp noshortname noshowfulltag noshowmode nosm nosmartindent nosmd nosol nosplitbelow nospr nossl nostartofline noswapfile nota notagrelative notbi notbs noterse notextmode notgst notimeout noto notr nottybuiltin notx noundofile novisualbell nowarn noweirdinvert nowfw nowildignorecase nowinfixheight nowiv nowrap nowrite nowritebackup
|
||||
@@ -47,8 +48,8 @@ syn keyword vimOption contained invai invaltkeymap invar invarabicshape invautoc
|
||||
syn keyword vimOption contained invakm invanti invarab invari invautoindent invautowriteall invbackup invbin invbioskey invbomb invci invcompatible invconskey invcrb invcscopeverbose invcsverb invcursorbind invdeco invdiff inveb invek invequalalways invet invexrc invfileignorecase invfoldenable invguipty invhk
|
||||
|
||||
" termcap codes (which can also be set) {{{2
|
||||
syn keyword vimOption contained t_AB t_al t_bc t_ce t_cl t_Co t_Cs t_CS t_CV t_da t_db t_dl t_DL t_EI t_F1 t_F2 t_F3 t_F4 t_F5 t_F6 t_F7 t_F8 t_F9 t_fs t_IE t_IS t_k1 t_K1 t_k2 t_k3 t_K3 t_k4 t_K4 t_k5 t_K5 t_k6 t_K6 t_k7 t_K7 t_k8 t_K8 t_k9 t_K9 t_KA t_kb t_kB t_KB t_KC t_kd t_kD t_KD t_ke t_KE t_KF t_KG t_kh t_KH t_kI t_KI t_KJ t_KK t_kl t_KL t_kN t_kP t_kr t_ks t_ku t_le t_mb t_md t_me t_mr t_ms t_nd t_op t_RI t_RV t_Sb t_se t_Sf t_SI t_so t_sr t_te t_ti t_ts t_u7 t_ue t_us t_ut t_vb t_ve t_vi t_vs t_WP t_WS t_xs t_ZH t_ZR
|
||||
syn keyword vimOption contained t_AF t_AL t_cd t_Ce t_cm t_cs
|
||||
syn keyword vimOption contained t_AB t_al t_bc t_ce t_cl t_Co t_Cs t_CV t_da t_db t_dl t_DL t_EI t_F1 t_F2 t_F3 t_F4 t_F5 t_F6 t_F7 t_F8 t_F9 t_fs t_IE t_IS t_k1 t_K1 t_k2 t_k3 t_K3 t_k4 t_K4 t_k5 t_K5 t_k6 t_K6 t_k7 t_K7 t_k8 t_K8 t_k9 t_K9 t_KA t_kb t_kB t_KB t_KC t_kd t_kD t_KD t_ke t_KE t_KF t_KG t_kh t_KH t_kI t_KI t_KJ t_KK t_kl t_KL t_kN t_kP t_kr t_ks t_ku t_le t_mb t_md t_me t_mr t_ms t_nd t_op t_RI t_RV t_Sb t_se t_Sf t_SI t_so t_sr t_te t_ti t_ts t_u7 t_ue t_us t_ut t_vb t_ve t_vi t_vs t_WP t_WS t_xn t_xs t_ZH t_ZR
|
||||
syn keyword vimOption contained t_AF t_AL t_cd t_Ce t_cm t_cs t_CS
|
||||
syn match vimOption contained "t_%1"
|
||||
syn match vimOption contained "t_#2"
|
||||
syn match vimOption contained "t_#4"
|
||||
@@ -74,9 +75,9 @@ syn match vimHLGroup contained "Conceal"
|
||||
syn case match
|
||||
|
||||
" Function Names {{{2
|
||||
syn keyword vimFuncName contained abs and argidx asin browse buflisted bufnr byteidx ceil cindent complete confirm cosh cursor did_filetype empty eventhandler exists expr8 filereadable finddir floor fnamemodify foldlevel foreground get getchar getcmdpos getcwd getfsize getline getpid getreg gettabwinvar getwinvar has hasmapto histget hlID indent inputdialog inputsave invert items len line localtime luaeval mapcheck matchaddpos matchend max mode nr2char pow pumvisible range reltimestr remote_peek remove resolve screenattr screenrow searchpair server2client setcmdpos setmatches setreg setwinvar shiftwidth sin sort spellbadword split str2float strchars strftime string strpart strtrans submatch synconcealed synIDattr synstack systemlist tabpagenr tagfiles tan tempname toupper trunc undofile uniq virtcol wildmenumode wincol winline winrestcmd winsaveview writefile
|
||||
syn keyword vimFuncName contained acos append arglistid atan browsedir bufloaded bufwinnr byteidxcomp changenr clearmatches complete_add copy count deepcopy diff_filler escape executable exp extend filewritable findfile fmod foldclosed foldtext function getbufline getcharmod getcmdtype getfontname getftime getloclist getpos getregtype getwinposx glob has_key histadd histnr hostname index inputlist inputsecret isdirectory join libcall line2byte log map match matcharg matchlist min mzeval or prevnonblank py3eval readfile remote_expr remote_read rename reverse screenchar search searchpairpos serverlist setline setpos settabvar sha256 simplify sinh soundfold spellsuggest sqrt str2nr strdisplaywidth stridx strlen strridx strwidth substitute synID synIDtrans system tabpagebuflist tabpagewinnr taglist tanh tolower tr type undotree values visualmode winbufnr winheight winnr winrestview winwidth xor
|
||||
syn keyword vimFuncName contained add argc argv atan2 bufexists bufname byte2line call char2nr col complete_check cos cscope_connection delete diff_hlID eval exepath expand feedkeys filter float2nr fnameescape foldclosedend foldtextresult garbagecollect getbufvar getcmdline getcurpos getfperm getftype getmatches getqflist gettabvar getwinposy globpath haslocaldir histdel hlexists iconv input inputrestore insert islocked keys libcallnr lispindent log10 maparg matchadd matchdelete matchstr mkdir nextnonblank pathshorten printf pyeval reltime remote_foreground remote_send repeat round screencol searchdecl searchpos setbufvar setloclist setqflist settabwinvar shellescape
|
||||
syn keyword vimFuncName contained abs and argidx asin browse buflisted bufnr byteidx ceil cindent complete confirm cosh cursor did_filetype empty eventhandler exists expr8 filereadable finddir floor fnamemodify foldlevel foreground get getchar getcmdpos getcurpos getfperm getftype getmatches getqflist gettabvar getwinposy glob2regpat has_key histadd histnr hostname index inputlist inputsecret isdirectory join libcall line2byte log map match matcharg matchlist min mzeval or prevnonblank py3eval readfile remote_expr remote_read rename reverse screenchar search searchpairpos serverlist setline setpos settabvar sha256 simplify sort spellbadword split str2float strchars strftime string strpart strtrans submatch synconcealed synIDattr synstack systemlist tabpagenr tagfiles tan tempname toupper trunc undofile uniq virtcol wildmenumode wincol winline winrestcmd winsaveview writefile
|
||||
syn keyword vimFuncName contained acos append arglistid atan browsedir bufloaded bufwinnr byteidxcomp changenr clearmatches complete_add copy count deepcopy diff_filler escape executable exp extend filewritable findfile fmod foldclosed foldtext function getbufline getcharmod getcmdtype getcwd getfsize getline getpid getreg gettabwinvar getwinvar globpath haslocaldir histdel hlexists iconv input inputrestore insert islocked keys libcallnr lispindent log10 maparg matchadd matchdelete matchstr mkdir nextnonblank pathshorten printf pyeval reltime remote_foreground remote_send repeat round screencol searchdecl searchpos setbufvar setloclist setqflist settabwinvar shellescape sin soundfold spellsuggest sqrt str2nr strdisplaywidth stridx strlen strridx strwidth substitute synID synIDtrans system tabpagebuflist tabpagewinnr taglist tanh tolower tr type undotree values visualmode winbufnr winheight winnr winrestview winwidth xor
|
||||
syn keyword vimFuncName contained add argc argv atan2 bufexists bufname byte2line call char2nr col complete_check cos cscope_connection delete diff_hlID eval exepath expand feedkeys filter float2nr fnameescape foldclosedend foldtextresult garbagecollect getbufvar getcmdline getcmdwintype getfontname getftime getloclist getpos getregtype getwinposx glob has hasmapto histget hlID indent inputdialog inputsave invert items len line localtime luaeval mapcheck matchaddpos matchend max mode nr2char pow pumvisible range reltimestr remote_peek remove resolve screenattr screenrow searchpair server2client setcmdpos setmatches setreg setwinvar shiftwidth sinh
|
||||
|
||||
"--- syntax here and above generated by mkvimvim ---
|
||||
" Special Vim Highlighting (not automatic) {{{1
|
||||
@@ -105,9 +106,9 @@ syn match vimNumber "\%(^\|[^a-zA-Z]\)\zs#\x\{6}"
|
||||
" All vimCommands are contained by vimIsCommands. {{{2
|
||||
syn match vimCmdSep "[:|]\+" skipwhite nextgroup=vimAddress,vimAutoCmd,vimIsCommand,vimExtCmd,vimFilter,vimLet,vimMap,vimMark,vimSet,vimSyntax,vimUserCmd
|
||||
syn match vimIsCommand "\<\h\w*\>" contains=vimCommand
|
||||
syn match vimVar "\<[bwglsav]:\K\k*\>"
|
||||
syn match vimVar contained "\<\K\k*\>"
|
||||
syn match vimFBVar contained "\<[bwglsav]:\K\k*\>"
|
||||
syn match vimVar contained "\<\h[a-zA-Z0-9#_]*\>"
|
||||
syn match vimVar "\<[bwglsav]:\h[a-zA-Z0-9#_]*\>"
|
||||
syn match vimFBVar contained "\<[bwglsav]:\h[a-zA-Z0-9#_]*\>"
|
||||
syn keyword vimCommand contained in
|
||||
|
||||
" Insertions And Appends: insert append {{{2
|
||||
@@ -141,19 +142,19 @@ if exists("g:vimsyn_folding") && g:vimsyn_folding =~ 'a'
|
||||
else
|
||||
syn region vimAugroup matchgroup=vimAugroupKey start="\<aug\%[roup]\>\ze\s\+\K\k*" end="\<aug\%[roup]\>\ze\s\+[eE][nN][dD]\>" contains=vimAutoCmd,@vimAugroupList
|
||||
endif
|
||||
syn match vimAugroup "aug\%[roup]!" contains=vimAugroupKey
|
||||
syn match vimAugroup "aug\%[roup]!" contains=vimAugroupKey
|
||||
if !exists("g:vimsyn_noerror") && !exists("g:vimsyn_noaugrouperror")
|
||||
syn match vimAugroupError "\<aug\%[roup]\>\s\+[eE][nN][dD]\>"
|
||||
endif
|
||||
"syn keyword vimAugroupKey contained aug[roup]
|
||||
syn keyword vimAugroupKey contained aug[roup]
|
||||
|
||||
" Operators: {{{2
|
||||
" =========
|
||||
syn cluster vimOperGroup contains=vimEnvvar,vimFunc,vimFuncVar,vimOper,vimOperParen,vimNumber,vimString,vimRegister,vimContinue
|
||||
syn match vimOper "\(==\|!=\|>=\|<=\|=\~\|!\~\|>\|<\|=\)[?#]\{0,2}" skipwhite nextgroup=vimString,vimSpecFile
|
||||
syn match vimOper "||\|&&\|[-+.]" skipwhite nextgroup=vimString,vimSpecFile
|
||||
syn region vimOperParen oneline matchgroup=vimParenSep start="(" end=")" contains=@vimOperGroup
|
||||
syn region vimOperParen oneline matchgroup=vimSep start="{" end="}" contains=@vimOperGroup nextgroup=vimVar,vimFuncVar
|
||||
syn region vimOperParen matchgroup=vimParenSep start="(" end=")" contains=@vimOperGroup
|
||||
syn region vimOperParen matchgroup=vimSep start="{" end="}" contains=@vimOperGroup nextgroup=vimVar,vimFuncVar
|
||||
if !exists("g:vimsyn_noerror") && !exists("g:vimsyn_noopererror")
|
||||
syn match vimOperError ")"
|
||||
endif
|
||||
@@ -165,9 +166,9 @@ syn cluster vimFuncBodyList contains=vimAbb,vimAddress,vimAugroupKey,vimAutoCmd,
|
||||
syn match vimFunction "\<fu\%[nction]!\=\s\+\%(<[sS][iI][dD]>\|[sSgGbBwWtTlL]:\)\=\%(\i\|[#.]\|{.\{-1,}}\)*\ze\s*(" contains=@vimFuncList nextgroup=vimFuncBody
|
||||
|
||||
if exists("g:vimsyn_folding") && g:vimsyn_folding =~ 'f'
|
||||
syn region vimFuncBody contained fold start="\ze(" matchgroup=vimCommand end="\<\(endf\>\|endfu\%[nction]\>\)" contains=@vimFuncBodyList
|
||||
syn region vimFuncBody contained fold start="\ze\s*(" matchgroup=vimCommand end="\<\(endf\>\|endfu\%[nction]\>\)" contains=@vimFuncBodyList
|
||||
else
|
||||
syn region vimFuncBody contained start="\ze(" matchgroup=vimCommand end="\<\(endf\>\|endfu\%[nction]\>\)" contains=@vimFuncBodyList
|
||||
syn region vimFuncBody contained start="\ze\s*(" matchgroup=vimCommand end="\<\(endf\>\|endfu\%[nction]\>\)" contains=@vimFuncBodyList
|
||||
endif
|
||||
syn match vimFuncVar contained "a:\(\K\k*\|\d\+\)"
|
||||
syn match vimFuncSID contained "\c<sid>\|\<s:"
|
||||
@@ -190,14 +191,16 @@ syn match vimSpecFileMod "\(:[phtre]\)\+" contained
|
||||
" =======================
|
||||
syn cluster vimUserCmdList contains=vimAddress,vimSyntax,vimHighlight,vimAutoCmd,vimCmplxRepeat,vimComment,vimCtrlChar,vimEscapeBrace,vimFilter,vimFunc,vimFuncName,vimFunction,vimFunctionError,vimIsCommand,vimMark,vimNotation,vimNumber,vimOper,vimRegion,vimRegister,vimLet,vimSet,vimSetEqual,vimSetString,vimSpecFile,vimString,vimSubst,vimSubstRep,vimSubstRange,vimSynLine
|
||||
syn keyword vimUserCommand contained com[mand]
|
||||
syn match vimUserCmd "\<com\%[mand]!\=\>.*$" contains=vimUserAttrb,vimUserCommand,@vimUserCmdList
|
||||
syn match vimUserAttrb contained "-n\%[args]=[01*?+]" contains=vimUserAttrbKey,vimOper
|
||||
syn match vimUserAttrb contained "-com\%[plete]=" contains=vimUserAttrbKey,vimOper nextgroup=vimUserAttrbCmplt,vimUserCmdError
|
||||
syn match vimUserAttrb contained "-ra\%[nge]\(=%\|=\d\+\)\=" contains=vimNumber,vimOper,vimUserAttrbKey
|
||||
syn match vimUserAttrb contained "-cou\%[nt]=\d\+" contains=vimNumber,vimOper,vimUserAttrbKey
|
||||
syn match vimUserAttrb contained "-bang\=\>" contains=vimOper,vimUserAttrbKey
|
||||
syn match vimUserAttrb contained "-bar\>" contains=vimOper,vimUserAttrbKey
|
||||
syn match vimUserAttrb contained "-re\%[gister]\>" contains=vimOper,vimUserAttrbKey
|
||||
syn match vimUserCmd "\<com\%[mand]!\=\>.*$" contains=vimUserAttrb,vimUserAttrbError,vimUserCommand,@vimUserCmdList
|
||||
syn match vimUserAttrbError contained "-\a\+\ze\s"
|
||||
syn match vimUserAttrb contained "-nargs=[01*?+]" contains=vimUserAttrbKey,vimOper
|
||||
syn match vimUserAttrb contained "-complete=" contains=vimUserAttrbKey,vimOper nextgroup=vimUserAttrbCmplt,vimUserCmdError
|
||||
syn match vimUserAttrb contained "-range\(=%\|=\d\+\)\=" contains=vimNumber,vimOper,vimUserAttrbKey
|
||||
syn match vimUserAttrb contained "-count\(=\d\+\)\=" contains=vimNumber,vimOper,vimUserAttrbKey
|
||||
syn match vimUserAttrb contained "-bang\>" contains=vimOper,vimUserAttrbKey
|
||||
syn match vimUserAttrb contained "-bar\>" contains=vimOper,vimUserAttrbKey
|
||||
syn match vimUserAttrb contained "-buffer\>" contains=vimOper,vimUserAttrbKey
|
||||
syn match vimUserAttrb contained "-register\>" contains=vimOper,vimUserAttrbKey
|
||||
if !exists("g:vimsyn_noerror") && !exists("g:vimsyn_nousercmderror")
|
||||
syn match vimUserCmdError contained "\S\+\>"
|
||||
endif
|
||||
@@ -271,7 +274,7 @@ syn match vimMark "\<norm\%[al]\s\zs'[a-zA-Z0-9]" nextgroup=vimOper,vimMarkNumbe
|
||||
syn match vimMarkNumber "[-+]\d\+" nextgroup=vimSubst contained contains=vimOper
|
||||
syn match vimPlainMark contained "'[a-zA-Z0-9]"
|
||||
|
||||
syn match vimRegister '[^,;[{]\zs"[a-zA-Z0-9.%#:_\-/]\ze[^a-zA-Z_":0-9]'
|
||||
syn match vimRegister '[^,;[{: \t]\zs"[a-zA-Z0-9.%#:_\-/]\ze[^a-zA-Z_":0-9]'
|
||||
syn match vimRegister '\<norm\s\+\zs"[a-zA-Z0-9]'
|
||||
syn match vimRegister '\<normal\s\+\zs"[a-zA-Z0-9]'
|
||||
syn match vimRegister '@"'
|
||||
@@ -291,7 +294,7 @@ syn match vimCmplxRepeat '@[0-9a-z".=@:]\ze\($\|[^a-zA-Z]\>\)'
|
||||
syn region vimSet matchgroup=vimCommand start="\<\%(setl\%[ocal]\|setg\%[lobal]\|se\%[t]\)\>" skip="\%(\\\\\)*\\." end="$" matchgroup=vimNotation end="<[cC][rR]>" keepend oneline contains=vimSetEqual,vimOption,vimErrSetting,vimComment,vimSetString,vimSetMod
|
||||
syn region vimSetEqual contained start="[=:]\|[-+^]=" skip="\\\\\|\\\s" end="[| \t]\|$"me=e-1 contains=vimCtrlChar,vimSetSep,vimNotation,vimEnvvar oneline
|
||||
syn region vimSetString contained start=+="+hs=s+1 skip=+\\\\\|\\"+ end=+"+ contains=vimCtrlChar
|
||||
syn match vimSetSep contained "[,:]"
|
||||
syn match vimSetSep contained "[,:]" skipwhite nextgroup=vimCommand
|
||||
syn match vimSetMod contained "&vim\=\|[!&?<]\|all&"
|
||||
|
||||
" Let {{{2
|
||||
@@ -330,7 +333,7 @@ syn match vimMapMod contained "\c<\(buffer\|expr\|\(local\)\=leader\|nowait\|plu
|
||||
syn match vimMapRhs contained ".*" contains=vimNotation,vimCtrlChar skipnl nextgroup=vimMapRhsExtend
|
||||
syn match vimMapRhsExtend contained "^\s*\\.*$" contains=vimContinue
|
||||
syn case ignore
|
||||
syn keyword vimMapModKey contained buffer expr leader localleader plug script sid silent unique
|
||||
syn keyword vimMapModKey contained buffer expr leader localleader nowait plug script sid silent unique
|
||||
syn case match
|
||||
|
||||
" Menus {{{2
|
||||
@@ -348,7 +351,7 @@ syn match vimMenuBang "!" contained skipwhite nextgroup=@vimMenuList
|
||||
" Angle-Bracket Notation (tnx to Michael Geddes) {{{2
|
||||
" ======================
|
||||
syn case ignore
|
||||
syn match vimNotation "\(\\\|<lt>\)\=<\([scamd]-\)\{0,4}x\=\(f\d\{1,2}\|[^ \t:]\|cr\|lf\|linefeed\|return\|k\=del\%[ete]\|bs\|backspace\|tab\|esc\|right\|left\|help\|undo\|insert\|ins\|k\=home\|k\=end\|kplus\|kminus\|kdivide\|kmultiply\|kenter\|kpoint\|space\|k\=\(page\)\=\(\|down\|up\|k[0-9]\)\)>" contains=vimBracket
|
||||
syn match vimNotation "\(\\\|<lt>\)\=<\([scamd]-\)\{0,4}x\=\(f\d\{1,2}\|[^ \t:]\|cr\|lf\|linefeed\|return\|k\=del\%[ete]\|bs\|backspace\|tab\|esc\|right\|left\|help\|undo\|insert\|ins\|k\=home\|k\=end\|kplus\|kminus\|kdivide\|kmultiply\|kenter\|kpoint\|space\|k\=\(page\)\=\(\|down\|up\|k\d\>\)\)>" contains=vimBracket
|
||||
syn match vimNotation "\(\\\|<lt>\)\=<\([scam2-4]-\)\{0,4}\(right\|left\|middle\)\(mouse\)\=\(drag\|release\)\=>" contains=vimBracket
|
||||
syn match vimNotation "\(\\\|<lt>\)\=<\(bslash\|plug\|sid\|space\|bar\|nop\|nul\|lt\)>" contains=vimBracket
|
||||
syn match vimNotation '\(\\\|<lt>\)\=<C-R>[0-9a-z"%#:.\-=]'he=e-1 contains=vimBracket
|
||||
@@ -429,7 +432,7 @@ syn keyword vimSynType contained match skipwhite nextgroup=vimSynMatchRegion
|
||||
syn region vimSynMatchRegion contained keepend matchgroup=vimGroupName start="\k\+" matchgroup=vimSep end="|\|$" contains=@vimSynMtchGroup
|
||||
syn match vimSynMtchOpt contained "\<\(conceal\|transparent\|contained\|excludenl\|skipempty\|skipwhite\|display\|extend\|skipnl\|fold\)\>"
|
||||
if has("conceal")
|
||||
syn match vimSynMtchOpt contained "\<cchar=" nextgroup=VimSynMtchCchar
|
||||
syn match vimSynMtchOpt contained "\<cchar=" nextgroup=vimSynMtchCchar
|
||||
syn match vimSynMtchCchar contained "\S"
|
||||
endif
|
||||
syn cluster vimFuncBodyList add=vimSynMtchGroup
|
||||
@@ -510,17 +513,18 @@ endif
|
||||
syn match vimHiTerm contained "\cterm="he=e-1 nextgroup=vimHiAttribList
|
||||
syn match vimHiStartStop contained "\c\(start\|stop\)="he=e-1 nextgroup=vimHiTermcap,vimOption
|
||||
syn match vimHiCTerm contained "\ccterm="he=e-1 nextgroup=vimHiAttribList
|
||||
syn match vimHiCtermFgBg contained "\ccterm[fb]g="he=e-1 nextgroup=vimNumber,vimHiCtermColor,vimFgBgAttrib,vimHiCtermError
|
||||
syn match vimHiCtermFgBg contained "\ccterm[fb]g="he=e-1 nextgroup=vimHiNmbr,vimHiCtermColor,vimFgBgAttrib,vimHiCtermError
|
||||
syn match vimHiGui contained "\cgui="he=e-1 nextgroup=vimHiAttribList
|
||||
syn match vimHiGuiFont contained "\cfont="he=e-1 nextgroup=vimHiFontname
|
||||
syn match vimHiGuiFgBg contained "\cgui\%([fb]g\|sp\)="he=e-1 nextgroup=vimHiGroup,vimHiGuiFontname,vimHiGuiRgb,vimFgBgAttrib
|
||||
syn match vimHiTermcap contained "\S\+" contains=vimNotation
|
||||
syn match vimHiNmbr contained '\d\+'
|
||||
|
||||
" Highlight: clear {{{2
|
||||
syn keyword vimHiClear contained clear nextgroup=vimHiGroup
|
||||
|
||||
" Highlight: link {{{2
|
||||
syn region vimHiLink contained oneline matchgroup=vimCommand start="\<\(def\%[ault]\s\+\)\=link\>\|\<def\>" end="$" contains=vimHiGroup,vimGroup,vimHLGroup,vimNotation
|
||||
syn region vimHiLink contained oneline matchgroup=vimCommand start="\(\<hi\%[ghlight]\s\+\)\@<=\(\(def\%[ault]\s\+\)\=link\>\|\<def\>\)" end="$" contains=vimHiGroup,vimGroup,vimHLGroup,vimNotation
|
||||
syn cluster vimFuncBodyList add=vimHiLink
|
||||
|
||||
" Control Characters {{{2
|
||||
@@ -549,27 +553,43 @@ syn region vimGlobal matchgroup=Statement start='\<v\%[global]!\=/' skip='\\.' e
|
||||
" Allows users to specify the type of embedded script highlighting
|
||||
" they want: (perl/python/ruby/tcl support)
|
||||
" g:vimsyn_embed == 0 : don't embed any scripts
|
||||
" g:vimsyn_embed ~= 'l' : embed lua (but only if vim supports it)
|
||||
" g:vimsyn_embed ~= 'm' : embed mzscheme (but only if vim supports it)
|
||||
" g:vimsyn_embed ~= 'p' : embed perl (but only if vim supports it)
|
||||
" g:vimsyn_embed ~= 'P' : embed python (but only if vim supports it)
|
||||
" g:vimsyn_embed ~= 'r' : embed ruby (but only if vim supports it)
|
||||
" g:vimsyn_embed ~= 't' : embed tcl (but only if vim supports it)
|
||||
" g:vimsyn_embed =~ 'l' : embed lua (but only if vim supports it)
|
||||
" g:vimsyn_embed =~ 'm' : embed mzscheme (but only if vim supports it)
|
||||
" g:vimsyn_embed =~ 'p' : embed perl (but only if vim supports it)
|
||||
" g:vimsyn_embed =~ 'P' : embed python (but only if vim supports it)
|
||||
" g:vimsyn_embed =~ 'r' : embed ruby (but only if vim supports it)
|
||||
" g:vimsyn_embed =~ 't' : embed tcl (but only if vim supports it)
|
||||
if has("win32") || has("win95") || has("win64") || has("win16")
|
||||
" apparently has("tcl") has been hanging vim on some windows systems with cygwin
|
||||
let s:trytcl= (&shell !~ '\<\%(bash\>\|4[nN][tT]\|\<zsh\)\>\%(\.exe\)\=$')
|
||||
else
|
||||
let s:trytcl= 1
|
||||
endif
|
||||
if !exists("g:vimsyn_embed")
|
||||
let g:vimsyn_embed= "lmpPr"
|
||||
" for default g:vimsyn_embed, determine what to allow based on whether this vim supports it
|
||||
let g:vimsyn_embed= ""
|
||||
if has("lua") |let g:vimsyn_embed= g:vimsyn_embed."l"|endif
|
||||
if has("mzscheme") |let g:vimsyn_embed= g:vimsyn_embed."m"|endif
|
||||
if has("perl") |let g:vimsyn_embed= g:vimsyn_embed."p"|endif
|
||||
if has("python") |let g:vimsyn_embed= g:vimsyn_embed."P"
|
||||
elseif has("python3")|let g:vimsyn_embed= g:vimsyn_embed."P"|endif
|
||||
if has("ruby") |let g:vimsyn_embed= g:vimsyn_embed."r"|endif
|
||||
if s:trytcl
|
||||
if has("tcl") |let g:vimsyn_embed= g:vimsyn_embed."t"|endif
|
||||
endif
|
||||
endif
|
||||
|
||||
" [-- lua --] {{{3
|
||||
let s:luapath= fnameescape(expand("<sfile>:p:h")."/lua.vim")
|
||||
if !filereadable(s:luapath)
|
||||
for s:luapath in split(globpath(&rtp,"syntax/lua.vim"),"\n")
|
||||
if filereadable(fnameescape(s:luapath))
|
||||
let s:luapath= fnameescape(s:luapath)
|
||||
for luapath in split(globpath(&rtp,"syntax/lua.vim"),"\n")
|
||||
if filereadable(luapath)
|
||||
let s:luapath= fnameescape(luapath)
|
||||
break
|
||||
endif
|
||||
endfor
|
||||
endif
|
||||
if (g:vimsyn_embed =~ 'l' && has("lua")) && filereadable(s:luapath)
|
||||
if g:vimsyn_embed =~ 'l' && has("lua") && filereadable(s:luapath)
|
||||
unlet! b:current_syntax
|
||||
exe "syn include @vimLuaScript ".s:luapath
|
||||
if exists("g:vimsyn_folding") && g:vimsyn_folding =~ 'l'
|
||||
@@ -589,14 +609,14 @@ unlet s:luapath
|
||||
" [-- perl --] {{{3
|
||||
let s:perlpath= fnameescape(expand("<sfile>:p:h")."/perl.vim")
|
||||
if !filereadable(s:perlpath)
|
||||
for s:perlpath in split(globpath(&rtp,"syntax/perl.vim"),"\n")
|
||||
if filereadable(fnameescape(s:perlpath))
|
||||
let s:perlpath= fnameescape(s:perlpath)
|
||||
for perlpath in split(globpath(&rtp,"syntax/perl.vim"),"\n")
|
||||
if filereadable(fnameescape(perlpath))
|
||||
let s:perlpath= fnameescape(perlpath)
|
||||
break
|
||||
endif
|
||||
endfor
|
||||
endif
|
||||
if (g:vimsyn_embed =~ 'p' && has("perl")) && filereadable(s:perlpath)
|
||||
if g:vimsyn_embed =~ 'p' && has("perl") && filereadable(s:perlpath)
|
||||
unlet! b:current_syntax
|
||||
exe "syn include @vimPerlScript ".s:perlpath
|
||||
if exists("g:vimsyn_folding") && g:vimsyn_folding =~ 'p'
|
||||
@@ -616,14 +636,14 @@ unlet s:perlpath
|
||||
" [-- ruby --] {{{3
|
||||
let s:rubypath= fnameescape(expand("<sfile>:p:h")."/ruby.vim")
|
||||
if !filereadable(s:rubypath)
|
||||
for s:rubypath in split(globpath(&rtp,"syntax/ruby.vim"),"\n")
|
||||
if filereadable(fnameescape(s:rubypath))
|
||||
let s:rubypath= fnameescape(s:rubypath)
|
||||
for rubypath in split(globpath(&rtp,"syntax/ruby.vim"),"\n")
|
||||
if filereadable(fnameescape(rubypath))
|
||||
let s:rubypath= fnameescape(rubypath)
|
||||
break
|
||||
endif
|
||||
endfor
|
||||
endif
|
||||
if (g:vimsyn_embed =~ 'r' && has("ruby")) && filereadable(s:rubypath)
|
||||
if g:vimsyn_embed =~ 'r' && has("ruby") && filereadable(s:rubypath)
|
||||
unlet! b:current_syntax
|
||||
exe "syn include @vimRubyScript ".s:rubypath
|
||||
if exists("g:vimsyn_folding") && g:vimsyn_folding =~ 'r'
|
||||
@@ -642,9 +662,9 @@ unlet s:rubypath
|
||||
" [-- python --] {{{3
|
||||
let s:pythonpath= fnameescape(expand("<sfile>:p:h")."/python.vim")
|
||||
if !filereadable(s:pythonpath)
|
||||
for s:pythonpath in split(globpath(&rtp,"syntax/python.vim"),"\n")
|
||||
if filereadable(fnameescape(s:pythonpath))
|
||||
let s:pythonpath= fnameescape(s:pythonpath)
|
||||
for pythonpath in split(globpath(&rtp,"syntax/python.vim"),"\n")
|
||||
if filereadable(fnameescape(pythonpath))
|
||||
let s:pythonpath= fnameescape(pythonpath)
|
||||
break
|
||||
endif
|
||||
endfor
|
||||
@@ -673,18 +693,12 @@ endif
|
||||
unlet s:pythonpath
|
||||
|
||||
" [-- tcl --] {{{3
|
||||
if has("win32") || has("win95") || has("win64") || has("win16")
|
||||
" apparently has("tcl") has been hanging vim on some windows systems with cygwin
|
||||
let s:trytcl= (&shell !~ '\<\%(bash\>\|4[nN][tT]\|\<zsh\)\>\%(\.exe\)\=$')
|
||||
else
|
||||
let s:trytcl= 1
|
||||
endif
|
||||
if s:trytcl
|
||||
let s:tclpath= fnameescape(expand("<sfile>:p:h")."/tcl.vim")
|
||||
if !filereadable(s:tclpath)
|
||||
for s:tclpath in split(globpath(&rtp,"syntax/tcl.vim"),"\n")
|
||||
if filereadable(fnameescape(s:tclpath))
|
||||
let s:tclpath= fnameescape(s:tclpath)
|
||||
for tclpath in split(globpath(&rtp,"syntax/tcl.vim"),"\n")
|
||||
if filereadable(fnameescape(tclpath))
|
||||
let s:tclpath= fnameescape(tclpath)
|
||||
break
|
||||
endif
|
||||
endfor
|
||||
@@ -714,9 +728,9 @@ unlet s:trytcl
|
||||
" [-- mzscheme --] {{{3
|
||||
let s:mzschemepath= fnameescape(expand("<sfile>:p:h")."/scheme.vim")
|
||||
if !filereadable(s:mzschemepath)
|
||||
for s:mzschemepath in split(globpath(&rtp,"syntax/mzscheme.vim"),"\n")
|
||||
if filereadable(fnameescape(s:mzschemepath))
|
||||
let s:mzschemepath= fnameescape(s:mzschemepath)
|
||||
for mzschemepath in split(globpath(&rtp,"syntax/mzscheme.vim"),"\n")
|
||||
if filereadable(fnameescape(mzschemepath))
|
||||
let s:mzschemepath= fnameescape(mzschemepath)
|
||||
break
|
||||
endif
|
||||
endfor
|
||||
@@ -757,9 +771,6 @@ syn sync match vimAugroupSyncA groupthere NONE "\<aug\%[roup]\>\s\+[eE][nN][dD]"
|
||||
" Highlighting Settings {{{2
|
||||
" ====================
|
||||
|
||||
hi def link vimSubst1 vimSubst
|
||||
hi def link vimBehaveModel vimBehave
|
||||
|
||||
if !exists("g:vimsyn_noerror")
|
||||
hi def link vimBehaveError vimError
|
||||
hi def link vimCollClassErr vimError
|
||||
@@ -781,22 +792,43 @@ endif
|
||||
hi def link vimAbb vimCommand
|
||||
hi def link vimAddress vimMark
|
||||
hi def link vimAugroupKey vimCommand
|
||||
hi def link vimAuHighlight vimHighlight
|
||||
hi def link vimAutoCmdOpt vimOption
|
||||
hi def link vimAutoCmd vimCommand
|
||||
hi def link vimAutoEvent Type
|
||||
hi def link vimAutoSet vimCommand
|
||||
hi def link vimBehaveModel vimBehave
|
||||
hi def link vimBehave vimCommand
|
||||
hi def link vimBracket Delimiter
|
||||
hi def link vimCmplxRepeat SpecialChar
|
||||
hi def link vimCommand Statement
|
||||
hi def link vimComment Comment
|
||||
hi def link vimCommentString vimString
|
||||
hi def link vimCommentTitle PreProc
|
||||
hi def link vimCondHL vimCommand
|
||||
hi def link vimContinue Special
|
||||
hi def link vimCtrlChar SpecialChar
|
||||
hi def link vimEchoHLNone vimGroup
|
||||
hi def link vimEchoHL vimCommand
|
||||
hi def link vimElseIfErr Error
|
||||
hi def link vimElseif vimCondHL
|
||||
hi def link vimEnvvar PreProc
|
||||
hi def link vimError Error
|
||||
hi def link vimFBVar vimVar
|
||||
hi def link vimFgBgAttrib vimHiAttrib
|
||||
hi def link vimFold Folded
|
||||
hi def link vimFTCmd vimCommand
|
||||
hi def link vimFTOption vimSynType
|
||||
hi def link vimFuncKey vimCommand
|
||||
hi def link vimFuncName Function
|
||||
hi def link vimFuncSID Special
|
||||
hi def link vimFuncVar Identifier
|
||||
hi def link vimGroupAdd vimSynOption
|
||||
hi def link vimGroupName vimGroup
|
||||
hi def link vimGroupRem vimSynOption
|
||||
hi def link vimGroupSpecial Special
|
||||
hi def link vimGroup Type
|
||||
hi def link vimHiAttrib PreProc
|
||||
hi def link vimHiClear vimHighlight
|
||||
hi def link vimHiCtermFgBg vimHiTerm
|
||||
hi def link vimHiCTerm vimHiTerm
|
||||
@@ -806,111 +838,95 @@ hi def link vimHiGuiFgBg vimHiTerm
|
||||
hi def link vimHiGuiFont vimHiTerm
|
||||
hi def link vimHiGuiRgb vimNumber
|
||||
hi def link vimHiGui vimHiTerm
|
||||
hi def link vimHiNmbr Number
|
||||
hi def link vimHiStartStop vimHiTerm
|
||||
hi def link vimHiTerm Type
|
||||
hi def link vimHLGroup vimGroup
|
||||
hi def link vimHLMod PreProc
|
||||
hi def link vimInsert vimString
|
||||
hi def link vimKeyCode vimSpecFile
|
||||
hi def link vimKeyword Statement
|
||||
hi def link vimLet vimCommand
|
||||
hi def link vimLineComment vimComment
|
||||
hi def link vimMapBang vimCommand
|
||||
hi def link vimMapModKey vimFuncSID
|
||||
hi def link vimMapMod vimBracket
|
||||
hi def link vimMap vimCommand
|
||||
hi def link vimMark Number
|
||||
hi def link vimMarkNumber vimNumber
|
||||
hi def link vimMenuMod vimMapMod
|
||||
hi def link vimMenuNameMore vimMenuName
|
||||
hi def link vimMenuName PreProc
|
||||
hi def link vimMtchComment vimComment
|
||||
hi def link vimNorm vimCommand
|
||||
hi def link vimNotation Special
|
||||
hi def link vimNotFunc vimCommand
|
||||
hi def link vimNotPatSep vimString
|
||||
hi def link vimNumber Number
|
||||
hi def link vimOperError Error
|
||||
hi def link vimOper Operator
|
||||
hi def link vimOption PreProc
|
||||
hi def link vimParenSep Delimiter
|
||||
hi def link vimPatSepErr vimPatSep
|
||||
hi def link vimPatSepR vimPatSep
|
||||
hi def link vimPatSep SpecialChar
|
||||
hi def link vimPatSepZone vimString
|
||||
hi def link vimPatSepZ vimPatSep
|
||||
hi def link vimPattern Type
|
||||
hi def link vimPlainMark vimMark
|
||||
hi def link vimPlainRegister vimRegister
|
||||
hi def link vimRegister SpecialChar
|
||||
hi def link vimScriptDelim Comment
|
||||
hi def link vimSearchDelim Statement
|
||||
hi def link vimSearch vimString
|
||||
hi def link vimSep Delimiter
|
||||
hi def link vimSetMod vimOption
|
||||
hi def link vimSetSep Statement
|
||||
hi def link vimSetString vimString
|
||||
hi def link vimSpecFile Identifier
|
||||
hi def link vimSpecFileMod vimSpecFile
|
||||
hi def link vimSpecial Type
|
||||
hi def link vimStatement Statement
|
||||
hi def link vimStringCont vimString
|
||||
hi def link vimString String
|
||||
hi def link vimSubst1 vimSubst
|
||||
hi def link vimSubstDelim Delimiter
|
||||
hi def link vimSubstFlags Special
|
||||
hi def link vimSubstSubstr SpecialChar
|
||||
hi def link vimSubstTwoBS vimString
|
||||
hi def link vimSubst vimCommand
|
||||
hi def link vimSynCaseError Error
|
||||
hi def link vimSynCase Type
|
||||
hi def link vimSyncC Type
|
||||
hi def link vimSyncError Error
|
||||
hi def link vimSyncGroupName vimGroupName
|
||||
hi def link vimSyncGroup vimGroupName
|
||||
hi def link vimSyncKey Type
|
||||
hi def link vimSyncNone Type
|
||||
hi def link vimSynContains vimSynOption
|
||||
hi def link vimSynError Error
|
||||
hi def link vimSynKeyContainedin vimSynContains
|
||||
hi def link vimSynKeyOpt vimSynOption
|
||||
hi def link vimSynMtchGrp vimSynOption
|
||||
hi def link vimSynMtchOpt vimSynOption
|
||||
hi def link vimSynNextgroup vimSynOption
|
||||
hi def link vimSynNotPatRange vimSynRegPat
|
||||
hi def link vimSynOption Special
|
||||
hi def link vimSynPatRange vimString
|
||||
hi def link vimSynRegOpt vimSynOption
|
||||
hi def link vimSynRegPat vimString
|
||||
hi def link vimSynReg Type
|
||||
hi def link vimSyntax vimCommand
|
||||
hi def link vimSynType vimSpecial
|
||||
hi def link vimTodo Todo
|
||||
hi def link vimUnmap vimMap
|
||||
hi def link vimUserAttrbCmpltFunc Special
|
||||
hi def link vimUserAttrbCmplt vimSpecial
|
||||
hi def link vimUserAttrbKey vimOption
|
||||
hi def link vimUserAttrb vimSpecial
|
||||
hi def link vimUserCommand vimCommand
|
||||
|
||||
hi def link vimAutoEvent Type
|
||||
hi def link vimBracket Delimiter
|
||||
hi def link vimCmplxRepeat SpecialChar
|
||||
hi def link vimCommand Statement
|
||||
hi def link vimComment Comment
|
||||
hi def link vimCommentTitle PreProc
|
||||
hi def link vimContinue Special
|
||||
hi def link vimCtrlChar SpecialChar
|
||||
hi def link vimElseIfErr Error
|
||||
hi def link vimEnvvar PreProc
|
||||
hi def link vimError Error
|
||||
hi def link vimFold Folded
|
||||
hi def link vimFuncName Function
|
||||
hi def link vimFuncSID Special
|
||||
hi def link vimFuncVar Identifier
|
||||
hi def link vimGroupSpecial Special
|
||||
hi def link vimGroup Type
|
||||
hi def link vimHiAttrib PreProc
|
||||
hi def link vimHiTerm Type
|
||||
hi def link vimHLMod PreProc
|
||||
hi def link vimKeyword Statement
|
||||
hi def link vimMark Number
|
||||
hi def link vimMenuName PreProc
|
||||
hi def link vimNotation Special
|
||||
hi def link vimNumber Number
|
||||
hi def link vimOperError Error
|
||||
hi def link vimOper Operator
|
||||
hi def link vimOption PreProc
|
||||
hi def link vimParenSep Delimiter
|
||||
hi def link vimPatSep SpecialChar
|
||||
hi def link vimPattern Type
|
||||
hi def link vimRegister SpecialChar
|
||||
hi def link vimScriptDelim Comment
|
||||
hi def link vimSearchDelim Statement
|
||||
hi def link vimSep Delimiter
|
||||
hi def link vimSetSep Statement
|
||||
hi def link vimSpecFile Identifier
|
||||
hi def link vimSpecial Type
|
||||
hi def link vimStatement Statement
|
||||
hi def link vimString String
|
||||
hi def link vimSubstDelim Delimiter
|
||||
hi def link vimSubstFlags Special
|
||||
hi def link vimSubstSubstr SpecialChar
|
||||
hi def link vimSynCaseError Error
|
||||
hi def link vimSynCase Type
|
||||
hi def link vimSyncC Type
|
||||
hi def link vimSyncError Error
|
||||
hi def link vimSyncKey Type
|
||||
hi def link vimSyncNone Type
|
||||
hi def link vimSynError Error
|
||||
hi def link vimSynOption Special
|
||||
hi def link vimSynReg Type
|
||||
hi def link vimTodo Todo
|
||||
hi def link vimUserAttrbCmpltFunc Special
|
||||
hi def link vimUserAttrbError Error
|
||||
hi def link vimUserCmdError Error
|
||||
hi def link vimUserCommand vimCommand
|
||||
hi def link vimUserFunc Normal
|
||||
hi def link vimVar Identifier
|
||||
hi def link vimWarn WarningMsg
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
" Vim syntax file
|
||||
" Language: Yacc
|
||||
" Maintainer: Charles E. Campbell <NdrOchipS@PcampbellAfamily.Mbiz>
|
||||
" Last Change: Jan 14, 2015
|
||||
" Version: 12
|
||||
" Last Change: Apr 02, 2015
|
||||
" Version: 13
|
||||
" URL: http://mysite.verizon.net/astronaut/vim/index.html#vimlinks_syntax
|
||||
"
|
||||
" Options: {{{1
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
" Language: YAML (YAML Ain't Markup Language) 1.2
|
||||
" Maintainer: Nikolai Pavlov <zyx.vim@gmail.com>
|
||||
" First author: Nikolai Weibull <now@bitwi.se>
|
||||
" Latest Revision: 2010-10-08
|
||||
" Latest Revision: 2015-03-28
|
||||
|
||||
if exists('b:current_syntax')
|
||||
finish
|
||||
@@ -11,13 +11,40 @@ endif
|
||||
let s:cpo_save = &cpo
|
||||
set cpo&vim
|
||||
|
||||
let s:ns_char = '\%(\%([\n\r\uFEFF \t]\)\@!\p\)'
|
||||
let s:ns_word_char = '\%(\w\|-\)'
|
||||
let s:ns_uri_char = '\%(%\x\x\|'.s:ns_word_char.'\|[#/;?:@&=+$,.!~*''()\[\]]\)'
|
||||
" Choose the schema to use
|
||||
" TODO: Validate schema
|
||||
if !exists('b:yaml_schema')
|
||||
if exists('g:yaml_schema')
|
||||
let b:yaml_schema = g:yaml_schema
|
||||
else
|
||||
let b:yaml_schema = 'core'
|
||||
endif
|
||||
endif
|
||||
|
||||
let s:ns_char = '\%([\n\r\uFEFF \t]\@!\p\)'
|
||||
let s:ns_word_char = '[[:alnum:]_\-]'
|
||||
let s:ns_uri_char = '\%(%\x\x\|'.s:ns_word_char.'\|[#/;?:@&=+$,.!~*''()[\]]\)'
|
||||
let s:ns_tag_char = '\%(%\x\x\|'.s:ns_word_char.'\|[#/;?:@&=+$.~*''()]\)'
|
||||
let s:c_ns_anchor_char = '\%(\%([\n\r\uFEFF \t,\[\]{}]\)\@!\p\)'
|
||||
let s:c_indicator = '[\-?:,\[\]{}#&*!|>''"%@`]'
|
||||
let s:c_flow_indicator = '[,\[\]{}]'
|
||||
let s:c_ns_anchor_char = '\%([\n\r\uFEFF \t,[\]{}]\@!\p\)'
|
||||
let s:c_indicator = '[\-?:,[\]{}#&*!|>''"%@`]'
|
||||
let s:c_flow_indicator = '[,[\]{}]'
|
||||
|
||||
let s:ns_char_without_c_indicator = substitute(s:ns_char, '\v\C[\zs', '\=s:c_indicator[1:-2]', '')
|
||||
|
||||
let s:_collection = '[^\@!\(\%(\\\.\|\[^\\\]]\)\+\)]'
|
||||
let s:_neg_collection = '[^\(\%(\\\.\|\[^\\\]]\)\+\)]'
|
||||
function s:SimplifyToAssumeAllPrintable(p)
|
||||
return substitute(a:p, '\V\C\\%('.s:_collection.'\\@!\\p\\)', '[^\1]', '')
|
||||
endfunction
|
||||
let s:ns_char = s:SimplifyToAssumeAllPrintable(s:ns_char)
|
||||
let s:ns_char_without_c_indicator = s:SimplifyToAssumeAllPrintable(s:ns_char_without_c_indicator)
|
||||
let s:c_ns_anchor_char = s:SimplifyToAssumeAllPrintable(s:c_ns_anchor_char)
|
||||
|
||||
function s:SimplifyAdjacentCollections(p)
|
||||
return substitute(a:p, '\V\C'.s:_collection.'\\|'.s:_collection, '[\1\2]', 'g')
|
||||
endfunction
|
||||
let s:ns_uri_char = s:SimplifyAdjacentCollections(s:ns_uri_char)
|
||||
let s:ns_tag_char = s:SimplifyAdjacentCollections(s:ns_tag_char)
|
||||
|
||||
let s:c_verbatim_tag = '!<'.s:ns_uri_char.'\+>'
|
||||
let s:c_named_tag_handle = '!'.s:ns_word_char.'\+!'
|
||||
@@ -46,11 +73,15 @@ let s:ns_tag_prefix = s:ns_local_tag_prefix.
|
||||
let s:ns_plain_safe_out = s:ns_char
|
||||
let s:ns_plain_safe_in = '\%('.s:c_flow_indicator.'\@!'.s:ns_char.'\)'
|
||||
|
||||
let s:ns_plain_first_in = '\%('.s:c_indicator.'\@!'.s:ns_char.'\|[?:\-]\%('.s:ns_plain_safe_in.'\)\@=\)'
|
||||
let s:ns_plain_first_out = '\%('.s:c_indicator.'\@!'.s:ns_char.'\|[?:\-]\%('.s:ns_plain_safe_out.'\)\@=\)'
|
||||
let s:ns_plain_safe_in = substitute(s:ns_plain_safe_in, '\V\C\\%('.s:_collection.'\\@!'.s:_neg_collection.'\\)', '[^\1\2]', '')
|
||||
let s:ns_plain_safe_in_without_colhash = substitute(s:ns_plain_safe_in, '\V\C'.s:_neg_collection, '[^\1:#]', '')
|
||||
let s:ns_plain_safe_out_without_colhash = substitute(s:ns_plain_safe_out, '\V\C'.s:_neg_collection, '[^\1:#]', '')
|
||||
|
||||
let s:ns_plain_char_in = '\%('.s:ns_char.'#\|:'.s:ns_plain_safe_in.'\|[:#]\@!'.s:ns_plain_safe_in.'\)'
|
||||
let s:ns_plain_char_out = '\%('.s:ns_char.'#\|:'.s:ns_plain_safe_out.'\|[:#]\@!'.s:ns_plain_safe_out.'\)'
|
||||
let s:ns_plain_first_in = '\%('.s:ns_char_without_c_indicator.'\|[?:\-]\%('.s:ns_plain_safe_in.'\)\@=\)'
|
||||
let s:ns_plain_first_out = '\%('.s:ns_char_without_c_indicator.'\|[?:\-]\%('.s:ns_plain_safe_out.'\)\@=\)'
|
||||
|
||||
let s:ns_plain_char_in = '\%('.s:ns_char.'#\|:'.s:ns_plain_safe_in.'\|'.s:ns_plain_safe_in_without_colhash.'\)'
|
||||
let s:ns_plain_char_out = '\%('.s:ns_char.'#\|:'.s:ns_plain_safe_out.'\|'.s:ns_plain_safe_out_without_colhash.'\)'
|
||||
|
||||
let s:ns_plain_out = s:ns_plain_first_out . s:ns_plain_char_out.'*'
|
||||
let s:ns_plain_in = s:ns_plain_first_in . s:ns_plain_char_in.'*'
|
||||
@@ -89,9 +120,11 @@ syn match yamlSingleEscape contained "''"
|
||||
|
||||
syn match yamlBlockScalarHeader contained '\s\+\zs[|>]\%([+-]\=[1-9]\|[1-9]\=[+-]\)\='
|
||||
|
||||
syn cluster yamlConstant contains=yamlBool,yamlNull
|
||||
|
||||
syn cluster yamlFlow contains=yamlFlowString,yamlFlowMapping,yamlFlowCollection
|
||||
syn cluster yamlFlow add=yamlFlowMappingKey,yamlFlowMappingMerge
|
||||
syn cluster yamlFlow add=yamlConstant,yamlPlainScalar,yamlFloat
|
||||
syn cluster yamlFlow add=@yamlConstant,yamlPlainScalar,yamlFloat
|
||||
syn cluster yamlFlow add=yamlTimestamp,yamlInteger,yamlMappingKeyStart
|
||||
syn cluster yamlFlow add=yamlComment
|
||||
syn region yamlFlowMapping matchgroup=yamlFlowIndicator start='{' end='}' contains=@yamlFlow
|
||||
@@ -103,15 +136,15 @@ execute 'syn match yamlPlainScalar contained /'.s:ns_plain_in.'/'
|
||||
syn match yamlMappingKeyStart '?\ze\s'
|
||||
syn match yamlMappingKeyStart '?' contained
|
||||
|
||||
execute 'syn match yamlFlowMappingKey /'.s:ns_plain_in.'\ze\s*:/ contained '.
|
||||
execute 'syn match yamlFlowMappingKey /\%#=1'.s:ns_plain_in.'\%(\s\+'.s:ns_plain_in.'\)*\ze\s*:/ contained '.
|
||||
\'nextgroup=yamlKeyValueDelimiter'
|
||||
syn match yamlFlowMappingMerge /<<\ze\s*:/ contained nextgroup=yamlKeyValueDelimiter
|
||||
|
||||
syn match yamlBlockCollectionItemStart '^\s*\zs-\%(\s\+-\)*\s' nextgroup=yamlBlockMappingKey,yamlBlockMappingMerge
|
||||
" Use the old regexp engine, the NFA engine doesn't like all the \@ items.
|
||||
execute 'syn match yamlBlockMappingKey /\%#=1^\s*\zs'.s:ns_plain_out.'\ze\s*:\%(\s\|$\)/ '.
|
||||
execute 'syn match yamlBlockMappingKey /\%#=1^\s*\zs'.s:ns_plain_out.'\%(\s\+'.s:ns_plain_out.'\)*\ze\s*:\%(\s\|$\)/ '.
|
||||
\'nextgroup=yamlKeyValueDelimiter'
|
||||
execute 'syn match yamlBlockMappingKey /\%#=1\s*\zs'.s:ns_plain_out.'\ze\s*:\%(\s\|$\)/ contained '.
|
||||
execute 'syn match yamlBlockMappingKey /\%#=1\s*\zs'.s:ns_plain_out.'\%(\s\+'.s:ns_plain_out.'\)*\ze\s*:\%(\s\|$\)/ contained '.
|
||||
\'nextgroup=yamlKeyValueDelimiter'
|
||||
syn match yamlBlockMappingMerge /^\s*\zs<<\ze:\%(\s\|$\)/ nextgroup=yamlKeyValueDelimiter
|
||||
syn match yamlBlockMappingMerge /<<\ze\s*:\%(\s\|$\)/ nextgroup=yamlKeyValueDelimiter contained
|
||||
@@ -119,14 +152,32 @@ syn match yamlBlockMappingMerge /<<\ze\s*:\%(\s\|$\)/ nextgroup=yamlKeyValueDeli
|
||||
syn match yamlKeyValueDelimiter /\s*:/ contained
|
||||
syn match yamlKeyValueDelimiter /\s*:/ contained
|
||||
|
||||
syn keyword yamlConstant true True TRUE false False FALSE
|
||||
syn keyword yamlConstant null Null NULL
|
||||
syn match yamlConstant '\<\~\>'
|
||||
syn cluster yamlScalarWithSpecials contains=yamlPlainScalar,yamlBlockMappingKey,yamlFlowMappingKey
|
||||
|
||||
syn match yamlTimestamp /\%([\[\]{}, \t]\@!\p\)\@<!\%(\d\{4}-\d\d\=-\d\d\=\%(\%([Tt]\|\s\+\)\%(\d\d\=\):\%(\d\d\):\%(\d\d\)\%(\.\%(\d*\)\)\=\%(\s*\%(Z\|[+-]\d\d\=\%(:\d\d\)\=\)\)\=\)\=\)\%([\[\]{}, \t]\@!\p\)\@!/
|
||||
let s:_bounder = s:SimplifyToAssumeAllPrintable('\%([[\]{}, \t]\@!\p\)')
|
||||
if b:yaml_schema is# 'json'
|
||||
syn keyword yamlNull null contained containedin=@yamlScalarWithSpecials
|
||||
syn keyword yamlBool true false
|
||||
exe 'syn match yamlInteger /'.s:_bounder.'\@1<!\%(0\|-\=[1-9][0-9]*\)'.s:_bounder.'\@!/ contained containedin=@yamlScalarWithSpecials'
|
||||
exe 'syn match yamlFloat /'.s:_bounder.'\@1<!\%(-\=[1-9][0-9]*\%(\.[0-9]*\)\=\(e[-+]\=[0-9]\+\)\=\|0\|-\=\.inf\|\.nan\)'.s:_bounder.'\@!/ contained containedin=@yamlScalarWithSpecials'
|
||||
elseif b:yaml_schema is# 'core'
|
||||
syn keyword yamlNull null Null NULL contained containedin=@yamlScalarWithSpecials
|
||||
syn keyword yamlBool true True TRUE false False FALSE contained containedin=@yamlScalarWithSpecials
|
||||
exe 'syn match yamlNull /'.s:_bounder.'\@1<!\~'.s:_bounder.'\@!/ contained containedin=@yamlScalarWithSpecials'
|
||||
exe 'syn match yamlInteger /'.s:_bounder.'\@1<!\%([+-]\=\%(0\%(b[0-1_]\+\|[0-7_]\+\|x[0-9a-fA-F_]\+\)\=\|\%([1-9][0-9_]*\%(:[0-5]\=\d\)\+\)\)\|[1-9][0-9_]*\)'.s:_bounder.'\@!/ contained containedin=@yamlScalarWithSpecials'
|
||||
exe 'syn match yamlFloat /'.s:_bounder.'\@1<!\%([+-]\=\%(\%(\d[0-9_]*\)\.[0-9_]*\%([eE][+-]\=\d\+\)\=\|\.[0-9_]\+\%([eE][-+]\=[0-9]\+\)\=\|\d[0-9_]*\%(:[0-5]\=\d\)\+\.[0-9_]*\|\.\%(inf\|Inf\|INF\)\)\|\%(\.\%(nan\|NaN\|NAN\)\)\)'.s:_bounder.'\@!/ contained containedin=@yamlScalarWithSpecials'
|
||||
elseif b:yaml_schema is# 'pyyaml'
|
||||
syn keyword yamlNull null Null NULL contained containedin=@yamlScalarWithSpecials
|
||||
syn keyword yamlBool true True TRUE false False FALSE yes Yes YES no No NO on On ON off Off OFF contained containedin=@yamlScalarWithSpecials
|
||||
exe 'syn match yamlNull /'.s:_bounder.'\@1<!\~'.s:_bounder.'\@!/ contained containedin=@yamlScalarWithSpecials'
|
||||
exe 'syn match yamlFloat /'.s:_bounder.'\@1<!\%(\v[-+]?%(\d[0-9_]*)\.[0-9_]*%([eE][-+]\d+)?|\.[0-9_]+%([eE][-+]\d+)?|[-+]?\d[0-9_]*%(\:[0-5]?\d)+\.[0-9_]*|[-+]?\.%(inf|Inf|INF)|\.%(nan|NaN|NAN)\m\)'.s:_bounder.'\@!/ contained containedin=@yamlScalarWithSpecials'
|
||||
exe 'syn match yamlInteger /'.s:_bounder.'\@1<!\%(\v[-+]?0b[0-1_]+|[-+]?0[0-7_]+|[-+]?%(0|[1-9][0-9_]*)|[-+]?0x[0-9a-fA-F_]+|[-+]?[1-9][0-9_]*%(:[0-5]?\d)+\m\)'.s:_bounder.'\@!/ contained containedin=@yamlScalarWithSpecials'
|
||||
exe 'syn match yamlTimestamp /'.s:_bounder.'\@1<!\%(\v\d\d\d\d\-\d\d\-\d\d|\d\d\d\d \-\d\d? \-\d\d?%([Tt]|[ \t]+)\d\d?\:\d\d \:\d\d %(\.\d*)?%([ \t]*%(Z|[-+]\d\d?%(\:\d\d)?))?\m\)'.s:_bounder.'\@!/ contained containedin=@yamlScalarWithSpecials'
|
||||
elseif b:yaml_schema is# 'failsafe'
|
||||
" Nothing
|
||||
endif
|
||||
unlet s:_bounder
|
||||
|
||||
syn match yamlInteger /\%([\[\]{}, \t]\@!\p\)\@<!\%([+-]\=\%(0\%(b[0-1_]\+\|[0-7_]\+\|x[0-9a-fA-F_]\+\)\=\|\%([1-9][0-9_]*\%(:[0-5]\=\d\)\+\)\)\|[1-9][0-9_]*\)\%([\[\]{}, \t]\@!\p\)\@!/
|
||||
syn match yamlFloat /\%([\[\]{}, \t]\@!\p\)\@<!\%([+-]\=\%(\%(\d[0-9_]*\)\.[0-9_]*\%([eE][+-]\d\+\)\=\|\.[0-9_]\+\%([eE][-+][0-9]\+\)\=\|\d[0-9_]*\%(:[0-5]\=\d\)\+\.[0-9_]*\|\.\%(inf\|Inf\|INF\)\)\|\%(\.\%(nan\|NaN\|NAN\)\)\)\%([\[\]{}, \t]\@!\p\)\@!/
|
||||
|
||||
execute 'syn match yamlNodeTag '.string(s:c_ns_tag_property)
|
||||
execute 'syn match yamlAnchor '.string(s:c_ns_anchor_property)
|
||||
@@ -170,6 +221,9 @@ hi def link yamlKeyValueDelimiter Special
|
||||
|
||||
hi def link yamlConstant Constant
|
||||
|
||||
hi def link yamlNull yamlConstant
|
||||
hi def link yamlBool yamlConstant
|
||||
|
||||
hi def link yamlAnchor Type
|
||||
hi def link yamlAlias Type
|
||||
hi def link yamlNodeTag Type
|
||||
@@ -180,8 +234,10 @@ hi def link yamlTimestamp Number
|
||||
|
||||
let b:current_syntax = "yaml"
|
||||
|
||||
unlet s:ns_word_char s:ns_uri_char s:c_verbatim_tag s:c_named_tag_handle s:c_secondary_tag_handle s:c_primary_tag_handle s:c_tag_handle s:ns_tag_char s:c_ns_shorthand_tag s:c_non_specific_tag s:c_ns_tag_property s:c_ns_anchor_char s:c_ns_anchor_name s:c_ns_anchor_property s:c_ns_alias_node s:ns_char s:ns_directive_name s:ns_local_tag_prefix s:ns_global_tag_prefix s:ns_tag_prefix s:c_indicator s:ns_plain_safe_out s:c_flow_indicator s:ns_plain_safe_in s:ns_plain_first_in s:ns_plain_first_out s:ns_plain_char_in s:ns_plain_char_out s:ns_plain_out s:ns_plain_in
|
||||
unlet s:ns_word_char s:ns_uri_char s:c_verbatim_tag s:c_named_tag_handle s:c_secondary_tag_handle s:c_primary_tag_handle s:c_tag_handle s:ns_tag_char s:c_ns_shorthand_tag s:c_non_specific_tag s:c_ns_tag_property s:c_ns_anchor_char s:c_ns_anchor_name s:c_ns_anchor_property s:c_ns_alias_node s:ns_char s:ns_directive_name s:ns_local_tag_prefix s:ns_global_tag_prefix s:ns_tag_prefix s:c_indicator s:ns_plain_safe_out s:c_flow_indicator s:ns_plain_safe_in s:ns_plain_first_in s:ns_plain_first_out s:ns_plain_char_in s:ns_plain_char_out s:ns_plain_out s:ns_plain_in s:ns_char_without_c_indicator s:ns_plain_safe_in_without_colhash s:ns_plain_safe_out_without_colhash
|
||||
unlet s:_collection s:_neg_collection
|
||||
delfunction s:SimplifyAdjacentCollections
|
||||
delfunction s:SimplifyToAssumeAllPrintable
|
||||
|
||||
let &cpo = s:cpo_save
|
||||
unlet s:cpo_save
|
||||
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
" Vim syntax file
|
||||
" Language: Zsh shell script
|
||||
" Maintainer: Nikolai Weibull <now@bitwi.se>
|
||||
" Latest Revision: 2010-01-23
|
||||
" Language: Zsh shell script
|
||||
" Maintainer: Christian Brabandt <cb@256bit.org>
|
||||
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
|
||||
" Latest Revision: 2015-05-29
|
||||
" License: Vim (see :h license)
|
||||
" Repository: https://github.com/chrisbra/vim-zsh
|
||||
|
||||
if exists("b:current_syntax")
|
||||
finish
|
||||
@@ -14,7 +17,7 @@ setlocal iskeyword+=-
|
||||
|
||||
syn keyword zshTodo contained TODO FIXME XXX NOTE
|
||||
|
||||
syn region zshComment oneline start='\%(^\|\s\)#' end='$'
|
||||
syn region zshComment oneline start='\%(^\|\s*\)#' end='$'
|
||||
\ contains=zshTodo,@Spell
|
||||
|
||||
syn match zshPreProc '^\%1l#\%(!\|compdef\|autoload\).*$'
|
||||
@@ -30,7 +33,7 @@ syn match zshJobSpec '%\(\d\+\|?\=\w\+\|[%+-]\)'
|
||||
|
||||
syn keyword zshPrecommand noglob nocorrect exec command builtin - time
|
||||
|
||||
syn keyword zshDelimiter do done
|
||||
syn keyword zshDelimiter do done end
|
||||
|
||||
syn keyword zshConditional if then elif else fi case in esac select
|
||||
|
||||
@@ -64,7 +67,7 @@ syn region zshHereDoc matchgroup=zshRedir
|
||||
\ end='^\s*\z1\>'
|
||||
\ contains=@zshSubst
|
||||
syn region zshHereDoc matchgroup=zshRedir
|
||||
\ start=+<\@<!<<\s*\(["']\)\z(\S\+\)\1+
|
||||
\ start=+<\@<!<<\s*\(["']\)\z(\S\+\)\1+
|
||||
\ end='^\z1\>'
|
||||
syn region zshHereDoc matchgroup=zshRedir
|
||||
\ start=+<\@<!<<-\s*\(["']\)\z(\S\+\)\1+
|
||||
@@ -121,6 +124,165 @@ syn keyword zshCommands alias autoload bg bindkey break bye cap cd
|
||||
\ zmodload zparseopts zprof zpty zregexparse
|
||||
\ zsocket zstyle ztcp
|
||||
|
||||
" Options, generated by: echo ${(j:\n:)options[(I)*]} | sort
|
||||
syn case ignore
|
||||
syn keyword zshOptions aliases allexport all_export alwayslastprompt
|
||||
\ always_lastprompt alwaystoend always_to_end
|
||||
\ appendhistory append_history autocd autocontinue
|
||||
\ auto_continue autolist auto_list
|
||||
\ automenu auto_menu autonamedirs auto_name_dirs
|
||||
\ autoparamkeys auto_param_keys autoparamslash
|
||||
\ auto_param_slash autopushd auto_pushd autoremoveslash
|
||||
\ auto_remove_slash autoresume auto_resume badpattern
|
||||
\ banghist bang_hist bareglobqual bare_glob_qual
|
||||
\ bashautolist bash_auto_list bashrematch bash_rematch
|
||||
\ beep bgnice braceccl brace_ccl braceexpand brace_expand
|
||||
\ bsdecho bsd_echo caseglob case_glob casematch case_match
|
||||
\ cbases cdablevars cd_able_vars chasedots chase_dots
|
||||
\ chaselinks chase_links checkjobs check_jobs
|
||||
\ clobber combiningchars combining_chars completealiases
|
||||
\ complete_aliases completeinword complete_in_word
|
||||
\ continueonerror continue_on_error correct
|
||||
\ correctall correct_all cprecedences c_precedences
|
||||
\ cshjunkiehistory csh_junkie_history cshjunkieloops
|
||||
\ csh_junkie_loops cshjunkiequotes csh_junkie_quotes
|
||||
\ cshnullcmd csh_null_cmd cshnullglob csh_null_glob
|
||||
\ debugbeforecmd debug_before_cmd dotglob dot_glob dvorak
|
||||
\ emacs equals errexit err_exit errreturn err_return evallineno
|
||||
\ eval_lineno exec extendedglob extended_glob extendedhistory
|
||||
\ extended_history flowcontrol flow_control forcefloat
|
||||
\ force_float functionargzero function_arg_zero glob globalexport
|
||||
\ global_export globalrcs global_rcs globassign glob_assign
|
||||
\ globcomplete glob_complete globdots glob_dots glob_subst
|
||||
\ globsubst hashall hash_all hashcmds hash_cmds hashdirs
|
||||
\ hash_dirs hashexecutablesonly hash_executables_only hashlistall
|
||||
\ hash_list_all histallowclobber hist_allow_clobber histappend
|
||||
\ hist_append histbeep hist_beep hist_expand hist_expire_dups_first
|
||||
\ histexpand histexpiredupsfirst histfcntllock hist_fcntl_lock
|
||||
\ histfindnodups hist_find_no_dups histignorealldups
|
||||
\ hist_ignore_all_dups histignoredups hist_ignore_dups
|
||||
\ histignorespace hist_ignore_space histlexwords hist_lex_words
|
||||
\ histnofunctions hist_no_functions histnostore hist_no_store
|
||||
\ histreduceblanks hist_reduce_blanks histsavebycopy
|
||||
\ hist_save_by_copy histsavenodups hist_save_no_dups
|
||||
\ histsubstpattern hist_subst_pattern histverify hist_verify
|
||||
\ hup ignorebraces ignore_braces ignoreclosebraces ignore_close_braces
|
||||
\ ignoreeof ignore_eof incappendhistory inc_append_history
|
||||
\ incappendhistorytime inc_append_history_time interactive
|
||||
\ interactivecomments interactive_comments ksharrays ksh_arrays
|
||||
\ kshautoload ksh_autoload kshglob ksh_glob kshoptionprint
|
||||
\ ksh_option_print kshtypeset ksh_typeset kshzerosubscript
|
||||
\ ksh_zero_subscript listambiguous list_ambiguous listbeep
|
||||
\ list_beep listpacked list_packed listrowsfirst list_rows_first
|
||||
\ listtypes list_types localloops local_loops localoptions
|
||||
\ local_options localpatterns local_patterns localtraps
|
||||
\ local_traps log login longlistjobs long_list_jobs magicequalsubst
|
||||
\ magic_equal_subst mailwarn mail_warn mail_warning mark_dirs
|
||||
\ mailwarning markdirs menucomplete menu_complete monitor
|
||||
\ multibyte multi_byte multifuncdef multi_func_def multios
|
||||
\ multi_os nomatch no_match notify nullglob null_glob numericglobsort
|
||||
\ numeric_glob_sort octalzeroes octal_zeroes onecmd one_cmd
|
||||
\ overstrike over_strike pathdirs path_dirs pathscript
|
||||
\ path_script physical pipefail pipe_fail posixaliases
|
||||
\ posix_aliases posixargzero posix_arg_zero posixbuiltins
|
||||
\ posix_builtins posixcd posix_cd posixidentifiers posix_identifiers
|
||||
\ posixjobs posix_jobs posixstrings posix_strings posixtraps
|
||||
\ posix_traps printeightbit print_eight_bit printexitvalue
|
||||
\ print_exit_value privileged promptbang prompt_bang promptcr
|
||||
\ prompt_cr promptpercent prompt_percent promptsp prompt_sp
|
||||
\ promptsubst prompt_subst promptvars prompt_vars pushdignoredups
|
||||
\ pushd_ignore_dups pushdminus pushd_minus pushdsilent pushd_silent
|
||||
\ pushdtohome pushd_to_home rcexpandparam rc_expandparam rcquotes
|
||||
\ rc_quotes rcs recexact rec_exact rematchpcre re_match_pcre
|
||||
\ restricted rmstarsilent rm_star_silent rmstarwait rm_star_wait
|
||||
\ sharehistory share_history shfileexpansion sh_file_expansion
|
||||
\ shglob sh_glob shinstdin shin_stdin shnullcmd sh_nullcmd
|
||||
\ shoptionletters sh_option_letters shortloops short_loops shwordsplit
|
||||
\ sh_word_split singlecommand single_command singlelinezle single_line_zle
|
||||
\ sourcetrace source_trace stdin sunkeyboardhack sun_keyboard_hack
|
||||
\ trackall track_all transientrprompt transient_rprompt
|
||||
\ trapsasync trapasync typesetsilent type_set_silent unset verbose vi
|
||||
\ warncreateglobal warn_create_global xtrace zle
|
||||
|
||||
syn keyword zshOptions noaliases no_aliases noallexport no_allexport noall_export no_all_export noalwayslastprompt no_alwayslastprompt
|
||||
\ noalways_lastprompt no_always_lastprompt noalwaystoend no_alwaystoend noalways_to_end no_always_to_end
|
||||
\ noappendhistory no_appendhistory noappend_history no_append_history noautocd no_autocd noautocontinue no_autocontinue
|
||||
\ noauto_continue no_auto_continue noautolist no_autolist noauto_list no_auto_list
|
||||
\ noautomenu no_automenu noauto_menu no_auto_menu noautonamedirs no_autonamedirs noauto_name_dirs no_auto_name_dirs
|
||||
\ noautoparamkeys no_autoparamkeys noauto_param_keys no_auto_param_keys noautoparamslash no_autoparamslash
|
||||
\ noauto_param_slash no_auto_param_slash noautopushd no_autopushd noauto_pushd no_auto_pushd noautoremoveslash no_autoremoveslash
|
||||
\ noauto_remove_slash no_auto_remove_slash noautoresume no_autoresume noauto_resume no_auto_resume nobadpattern no_badpattern
|
||||
\ nobanghist no_banghist nobang_hist no_bang_hist nobareglobqual no_bareglobqual nobare_glob_qual no_bare_glob_qual
|
||||
\ nobashautolist no_bashautolist nobash_auto_list no_bash_auto_list nobashrematch no_bashrematch nobash_rematch no_bash_rematch
|
||||
\ nobeep no_beep nobgnice no_bgnice nobraceccl no_braceccl nobrace_ccl no_brace_ccl nobraceexpand no_braceexpand nobrace_expand no_brace_expand
|
||||
\ nobsdecho no_bsdecho nobsd_echo no_bsd_echo nocaseglob no_caseglob nocase_glob no_case_glob nocasematch no_casematch nocase_match no_case_match
|
||||
\ nocbases no_cbases nocdablevars no_cdablevars nocd_able_vars no_cd_able_vars nochasedots no_chasedots nochase_dots no_chase_dots
|
||||
\ nochaselinks no_chaselinks nochase_links no_chase_links nocheckjobs no_checkjobs nocheck_jobs no_check_jobs
|
||||
\ noclobber no_clobber nocombiningchars no_combiningchars nocombining_chars no_combining_chars nocompletealiases no_completealiases
|
||||
\ nocomplete_aliases no_complete_aliases nocompleteinword no_completeinword nocomplete_in_word no_complete_in_word
|
||||
\ nocontinueonerror no_continueonerror nocontinue_on_error no_continue_on_error nocorrect no_correct
|
||||
\ nocorrectall no_correctall nocorrect_all no_correct_all nocprecedences no_cprecedences noc_precedences no_c_precedences
|
||||
\ nocshjunkiehistory no_cshjunkiehistory nocsh_junkie_history no_csh_junkie_history nocshjunkieloops no_cshjunkieloops
|
||||
\ nocsh_junkie_loops no_csh_junkie_loops nocshjunkiequotes no_cshjunkiequotes nocsh_junkie_quotes no_csh_junkie_quotes
|
||||
\ nocshnullcmd no_cshnullcmd nocsh_null_cmd no_csh_null_cmd nocshnullglob no_cshnullglob nocsh_null_glob no_csh_null_glob
|
||||
\ nodebugbeforecmd no_debugbeforecmd nodebug_before_cmd no_debug_before_cmd nodotglob no_dotglob nodot_glob no_dot_glob nodvorak no_dvorak
|
||||
\ noemacs no_emacs noequals no_equals noerrexit no_errexit noerr_exit no_err_exit noerrreturn no_errreturn noerr_return no_err_return noevallineno no_evallineno
|
||||
\ noeval_lineno no_eval_lineno noexec no_exec noextendedglob no_extendedglob noextended_glob no_extended_glob noextendedhistory no_extendedhistory
|
||||
\ noextended_history no_extended_history noflowcontrol no_flowcontrol noflow_control no_flow_control noforcefloat no_forcefloat
|
||||
\ noforce_float no_force_float nofunctionargzero no_functionargzero nofunction_arg_zero no_function_arg_zero noglob no_glob noglobalexport no_globalexport
|
||||
\ noglobal_export no_global_export noglobalrcs no_globalrcs noglobal_rcs no_global_rcs noglobassign no_globassign noglob_assign no_glob_assign
|
||||
\ noglobcomplete no_globcomplete noglob_complete no_glob_complete noglobdots no_globdots noglob_dots no_glob_dots noglob_subst no_glob_subst
|
||||
\ noglobsubst no_globsubst nohashall no_hashall nohash_all no_hash_all nohashcmds no_hashcmds nohash_cmds no_hash_cmds nohashdirs no_hashdirs
|
||||
\ nohash_dirs no_hash_dirs nohashexecutablesonly no_hashexecutablesonly nohash_executables_only no_hash_executables_only nohashlistall no_hashlistall
|
||||
\ nohash_list_all no_hash_list_all nohistallowclobber no_histallowclobber nohist_allow_clobber no_hist_allow_clobber nohistappend no_histappend
|
||||
\ nohist_append no_hist_append nohistbeep no_histbeep nohist_beep no_hist_beep nohist_expand no_hist_expand nohist_expire_dups_first no_hist_expire_dups_first
|
||||
\ nohistexpand no_histexpand nohistexpiredupsfirst no_histexpiredupsfirst nohistfcntllock no_histfcntllock nohist_fcntl_lock no_hist_fcntl_lock
|
||||
\ nohistfindnodups no_histfindnodups nohist_find_no_dups no_hist_find_no_dups nohistignorealldups no_histignorealldups
|
||||
\ nohist_ignore_all_dups no_hist_ignore_all_dups nohistignoredups no_histignoredups nohist_ignore_dups no_hist_ignore_dups
|
||||
\ nohistignorespace no_histignorespace nohist_ignore_space no_hist_ignore_space nohistlexwords no_histlexwords nohist_lex_words no_hist_lex_words
|
||||
\ nohistnofunctions no_histnofunctions nohist_no_functions no_hist_no_functions nohistnostore no_histnostore nohist_no_store no_hist_no_store
|
||||
\ nohistreduceblanks no_histreduceblanks nohist_reduce_blanks no_hist_reduce_blanks nohistsavebycopy no_histsavebycopy
|
||||
\ nohist_save_by_copy no_hist_save_by_copy nohistsavenodups no_histsavenodups nohist_save_no_dups no_hist_save_no_dups
|
||||
\ nohistsubstpattern no_histsubstpattern nohist_subst_pattern no_hist_subst_pattern nohistverify no_histverify nohist_verify no_hist_verify
|
||||
\ nohup no_hup noignorebraces no_ignorebraces noignore_braces no_ignore_braces noignoreclosebraces no_ignoreclosebraces noignore_close_braces no_ignore_close_braces
|
||||
\ noignoreeof no_ignoreeof noignore_eof no_ignore_eof noincappendhistory no_incappendhistory noinc_append_history no_inc_append_history
|
||||
\ noincappendhistorytime no_incappendhistorytime noinc_append_history_time no_inc_append_history_time nointeractive no_interactive
|
||||
\ nointeractivecomments no_interactivecomments nointeractive_comments no_interactive_comments noksharrays no_ksharrays noksh_arrays no_ksh_arrays
|
||||
\ nokshautoload no_kshautoload noksh_autoload no_ksh_autoload nokshglob no_kshglob noksh_glob no_ksh_glob nokshoptionprint no_kshoptionprint
|
||||
\ noksh_option_print no_ksh_option_print nokshtypeset no_kshtypeset noksh_typeset no_ksh_typeset nokshzerosubscript no_kshzerosubscript
|
||||
\ noksh_zero_subscript no_ksh_zero_subscript nolistambiguous no_listambiguous nolist_ambiguous no_list_ambiguous nolistbeep no_listbeep
|
||||
\ nolist_beep no_list_beep nolistpacked no_listpacked nolist_packed no_list_packed nolistrowsfirst no_listrowsfirst nolist_rows_first no_list_rows_first
|
||||
\ nolisttypes no_listtypes nolist_types no_list_types nolocalloops no_localloops nolocal_loops no_local_loops nolocaloptions no_localoptions
|
||||
\ nolocal_options no_local_options nolocalpatterns no_localpatterns nolocal_patterns no_local_patterns nolocaltraps no_localtraps
|
||||
\ nolocal_traps no_local_traps nolog no_log nologin no_login nolonglistjobs no_longlistjobs nolong_list_jobs no_long_list_jobs nomagicequalsubst no_magicequalsubst
|
||||
\ nomagic_equal_subst no_magic_equal_subst nomailwarn no_mailwarn nomail_warn no_mail_warn nomail_warning no_mail_warning nomark_dirs no_mark_dirs
|
||||
\ nomailwarning no_mailwarning nomarkdirs no_markdirs nomenucomplete no_menucomplete nomenu_complete no_menu_complete nomonitor no_monitor
|
||||
\ nomultibyte no_multibyte nomulti_byte no_multi_byte nomultifuncdef no_multifuncdef nomulti_func_def no_multi_func_def nomultios no_multios
|
||||
\ nomulti_os no_multi_os nonomatch no_nomatch nono_match no_no_match nonotify no_notify nonullglob no_nullglob nonull_glob no_null_glob nonumericglobsort no_numericglobsort
|
||||
\ nonumeric_glob_sort no_numeric_glob_sort nooctalzeroes no_octalzeroes nooctal_zeroes no_octal_zeroes noonecmd no_onecmd noone_cmd no_one_cmd
|
||||
\ nooverstrike no_overstrike noover_strike no_over_strike nopathdirs no_pathdirs nopath_dirs no_path_dirs nopathscript no_pathscript
|
||||
\ nopath_script no_path_script nophysical no_physical nopipefail no_pipefail nopipe_fail no_pipe_fail noposixaliases no_posixaliases
|
||||
\ noposix_aliases no_posix_aliases noposixargzero no_posixargzero noposix_arg_zero no_posix_arg_zero noposixbuiltins no_posixbuiltins
|
||||
\ noposix_builtins no_posix_builtins noposixcd no_posixcd noposix_cd no_posix_cd noposixidentifiers no_posixidentifiers noposix_identifiers no_posix_identifiers
|
||||
\ noposixjobs no_posixjobs noposix_jobs no_posix_jobs noposixstrings no_posixstrings noposix_strings no_posix_strings noposixtraps no_posixtraps
|
||||
\ noposix_traps no_posix_traps noprinteightbit no_printeightbit noprint_eight_bit no_print_eight_bit noprintexitvalue no_printexitvalue
|
||||
\ noprint_exit_value no_print_exit_value noprivileged no_privileged nopromptbang no_promptbang noprompt_bang no_prompt_bang nopromptcr no_promptcr
|
||||
\ noprompt_cr no_prompt_cr nopromptpercent no_promptpercent noprompt_percent no_prompt_percent nopromptsp no_promptsp noprompt_sp no_prompt_sp
|
||||
\ nopromptsubst no_promptsubst noprompt_subst no_prompt_subst nopromptvars no_promptvars noprompt_vars no_prompt_vars nopushdignoredups no_pushdignoredups
|
||||
\ nopushd_ignore_dups no_pushd_ignore_dups nopushdminus no_pushdminus nopushd_minus no_pushd_minus nopushdsilent no_pushdsilent nopushd_silent no_pushd_silent
|
||||
\ nopushdtohome no_pushdtohome nopushd_to_home no_pushd_to_home norcexpandparam no_rcexpandparam norc_expandparam no_rc_expandparam norcquotes no_rcquotes
|
||||
\ norc_quotes no_rc_quotes norcs no_rcs norecexact no_recexact norec_exact no_rec_exact norematchpcre no_rematchpcre nore_match_pcre no_re_match_pcre
|
||||
\ norestricted no_restricted normstarsilent no_rmstarsilent norm_star_silent no_rm_star_silent normstarwait no_rmstarwait norm_star_wait no_rm_star_wait
|
||||
\ nosharehistory no_sharehistory noshare_history no_share_history noshfileexpansion no_shfileexpansion nosh_file_expansion no_sh_file_expansion
|
||||
\ noshglob no_shglob nosh_glob no_sh_glob noshinstdin no_shinstdin noshin_stdin no_shin_stdin noshnullcmd no_shnullcmd nosh_nullcmd no_sh_nullcmd
|
||||
\ noshoptionletters no_shoptionletters nosh_option_letters no_sh_option_letters noshortloops no_shortloops noshort_loops no_short_loops noshwordsplit no_shwordsplit
|
||||
\ nosh_word_split no_sh_word_split nosinglecommand no_singlecommand nosingle_command no_single_command nosinglelinezle no_singlelinezle nosingle_line_zle no_single_line_zle
|
||||
\ nosourcetrace no_sourcetrace nosource_trace no_source_trace nostdin no_stdin nosunkeyboardhack no_sunkeyboardhack nosun_keyboard_hack no_sun_keyboard_hack
|
||||
\ notrackall no_trackall notrack_all no_track_all notransientrprompt no_transientrprompt notransient_rprompt no_transient_rprompt
|
||||
\ notrapsasync no_trapsasync notrapasync no_trapasync notypesetsilent no_typesetsilent notype_set_silent no_type_set_silent nounset no_unset noverbose no_verbose novi no_vi
|
||||
\ nowarncreateglobal no_warncreateglobal nowarn_create_global no_warn_create_global noxtrace no_xtrace nozle no_zle
|
||||
syn case match
|
||||
|
||||
syn keyword zshTypes float integer local typeset declare
|
||||
|
||||
" XXX: this may be too much
|
||||
@@ -149,7 +311,7 @@ syn region zshSubst matchgroup=zshSubstDelim start='\${' skip='\\}'
|
||||
syn region zshOldSubst matchgroup=zshSubstDelim start=+`+ skip=+\\`+
|
||||
\ end=+`+ contains=TOP,zshOldSubst
|
||||
|
||||
syn sync minlines=50
|
||||
syn sync minlines=50 maxlines=90
|
||||
syn sync match zshHereDocSync grouphere NONE '<<-\=\s*\%(\\\=\S\+\|\(["']\)\S\+\1\)'
|
||||
syn sync match zshHereDocEndSync groupthere NONE '^\s*EO\a\+\>'
|
||||
|
||||
@@ -170,16 +332,8 @@ hi def link zshKeyword Keyword
|
||||
hi def link zshFunction None
|
||||
hi def link zshKSHFunction zshFunction
|
||||
hi def link zshHereDoc String
|
||||
if 0
|
||||
hi def link zshOperator Operator
|
||||
else
|
||||
hi def link zshOperator None
|
||||
endif
|
||||
if 1
|
||||
hi def link zshRedir Operator
|
||||
else
|
||||
hi def link zshRedir None
|
||||
endif
|
||||
hi def link zshOperator None
|
||||
hi def link zshRedir Operator
|
||||
hi def link zshVariable None
|
||||
hi def link zshVariableDef zshVariable
|
||||
hi def link zshDereferencing PreProc
|
||||
@@ -199,6 +353,7 @@ else
|
||||
hi def link zshDeref None
|
||||
endif
|
||||
hi def link zshCommands Keyword
|
||||
hi def link zshOptions Constant
|
||||
hi def link zshTypes Type
|
||||
hi def link zshSwitches Special
|
||||
hi def link zshNumber Number
|
||||
|
||||
@@ -252,6 +252,8 @@ func! BuildWidthTable(pattern, tableName)
|
||||
endfunc
|
||||
|
||||
|
||||
" Try to avoid hitting E36
|
||||
set equalalways
|
||||
|
||||
" Edit the Unicode text file. Requires the netrw plugin.
|
||||
edit http://unicode.org/Public/UNIDATA/UnicodeData.txt
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
===============================================================================
|
||||
= W i l l k o m m e n im V I M T u t o r - Version 1.7D =
|
||||
= W i l l k o m m e n im V I M T u t o r - Version 1.7.de.1 =
|
||||
===============================================================================
|
||||
|
||||
Vim ist ein sehr m<>chtiger Editor, der viele Befehle bereitstellt; zu viele,
|
||||
um alle in einem Tutor wie diesem zu erkl<6B>ren. Dieser Tutor ist so
|
||||
gestaltet, um genug Befehle vorzustellen, dass Du die F<>higkeit erlangst,
|
||||
Vim mit Leichtigkeit als einen Allzweck-Editor zu benutzen.
|
||||
Vim mit Leichtigkeit als einen Allzweck-Editor zu verwenden.
|
||||
Die Zeit f<>r das Durcharbeiten dieses Tutors betr<74>gt ca. 25-30 Minuten,
|
||||
abh<62>ngig davon, wie viel Zeit Du mit Experimentieren verbringst.
|
||||
|
||||
@@ -15,11 +15,11 @@
|
||||
aufgerufen hast, ist dies bereits eine Kopie).
|
||||
|
||||
Es ist wichtig, sich zu vergegenw<6E>rtigen, dass dieser Tutor f<>r das Anwenden
|
||||
konzipiert ist. Das bedeutet, dass Du die Befehle ausf<EFBFBD>hren musst, um sie
|
||||
konzipiert ist. Das bedeutet, dass Du die Befehle anwenden musst, um sie
|
||||
richtig zu lernen. Wenn Du nur den Text liest, vergisst Du die Befehle!
|
||||
|
||||
Jetzt stelle sicher, dass Deine Umstelltaste NICHT gedr<64>ckt ist und bet<65>tige
|
||||
die j Taste gen<65>gend Male, um den Cursor nach unten zu bewegen, so dass
|
||||
Jetzt stelle sicher, dass deine Umstelltaste NICHT gedr<64>ckt ist und bet<65>tige
|
||||
die j Taste gen<65>gend Mal, um den Cursor nach unten zu bewegen, so dass
|
||||
Lektion 1.1 den Bildschirm vollkommen ausf<73>llt.
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Lektion 1.1: BEWEGEN DES CURSORS
|
||||
@@ -37,18 +37,18 @@
|
||||
|
||||
3. Benutze die Nach-Unten-Taste, um Dich zu Lektion 1.2 zu bewegen.
|
||||
|
||||
Bemerkung: Immer, wenn Du Dir unsicher bist <20>ber das, was Du getippt hast,
|
||||
Anmerkung: Immer, wenn Du Dir unsicher bist <20>ber das, was Du getippt hast,
|
||||
dr<64>cke <ESC> , um Dich in den Normalmodus zu begeben.
|
||||
Dann gib das gew<65>nschte Kommando noch einmal ein.
|
||||
|
||||
Bemerkung: Die Cursor-Tasten sollten ebenfalls funktionieren. Aber wenn Du
|
||||
Anmerkung: Die Cursor-Tasten sollten ebenfalls funktionieren. Aber wenn Du
|
||||
hjkl benutzt, wirst Du in der Lage sein, Dich sehr viel schneller
|
||||
umherzubewegen, wenn Du Dich einmal daran gew<65>hnt hast. Wirklich!
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Lektion 1.2: VIM BEENDEN
|
||||
|
||||
|
||||
!! ACHTUNG: Bevor Du einen der unten aufgef<65>hrten Schritte ausf<73>hrst, lies
|
||||
!! Hinweis: Bevor Du einen der unten aufgef<65>hrten Schritte ausf<73>hrst, lies
|
||||
diese gesamte Lektion!!
|
||||
|
||||
1. Dr<44>cke die <ESC> Taste (um sicherzustellen, dass Du im Normalmodus bist).
|
||||
@@ -63,28 +63,28 @@ Bemerkung: Die Cursor-Tasten sollten ebenfalls funktionieren. Aber wenn Du
|
||||
f<>hre Schritte 1 bis 3 aus, um den Editor zu verlassen und wieder
|
||||
hineinzugelangen.
|
||||
|
||||
Bemerkung: :q! <ENTER> verwirft alle <20>nderungen, die Du gemacht hast. In
|
||||
einigen Lektionen lernst Du , die <20>nderungen in einer Datei zu speichern.
|
||||
Anmerkung: :q! <ENTER> verwirft alle <20>nderungen, die Du gemacht hast. Einige
|
||||
Lektionen sp<EFBFBD>ter lernst Du, die <20>nderungen in einer Datei zu speichern.
|
||||
|
||||
5. Bewege den Cursor abw<62>rts zu Lektion 1.3.
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Lektion 1.3: TEXT EDITIEREN - L<>SCHEN
|
||||
|
||||
|
||||
** Dr<44>cke x um das Zeichen unter dem Cursor zu l<>schen. **
|
||||
** Dr<44>cke x , um das Zeichen unter dem Cursor zu l<>schen. **
|
||||
|
||||
1. Bewege den Cursor zu der mit ---> markierten Zeile unten.
|
||||
|
||||
2. Um die Fehler zu beheben, bewege den Cursor, bis er auf dem Zeichen steht,
|
||||
2. Um die Fehler zu beheben, bewege den Cursor, bis er <EFBFBD>ber dem Zeichen steht,
|
||||
das gel<65>scht werden soll.
|
||||
|
||||
3. Dr<44>cke die x Taste, um das <EFBFBD>berfl<EFBFBD>ssige Zeichen zu l<>schen.
|
||||
3. Dr<44>cke die x Taste, um das unerw<EFBFBD>nschte Zeichen zu l<>schen.
|
||||
|
||||
4. Wiederhole die Schritte 2 bis 4, bis der Satz korrekt ist.
|
||||
|
||||
---> Die Kkuh sprangg <20>bber deen Moond.
|
||||
---> Die Kkuh sprangg <20>bberr deen Moond.
|
||||
|
||||
5. Wenn nun die Zeile korrekt ist, gehe weiter zur Lektion 1.4.
|
||||
5. Nun, da die Zeile korrekt ist, gehe weiter zur Lektion 1.4.
|
||||
|
||||
Anmerkung: W<>hrend Du durch diesen Tutor gehst, versuche nicht, auswendig zu
|
||||
lernen, lerne vielmehr durch Anwenden.
|
||||
@@ -99,13 +99,13 @@ Anmerkung: W
|
||||
1. Bewege den Cursor zur ersten unten stehenden mit ---> markierten Zeile.
|
||||
|
||||
2. Um die erste Zeile mit der zweiten gleichzumachen, bewege den Cursor auf
|
||||
das erste Zeichen NACH der Stelle, wo der Text eingef<65>gt werden soll.
|
||||
das erste Zeichen NACH der Stelle, an der Text eingef<65>gt werden soll.
|
||||
|
||||
3. Dr<44>cke i und gib die notwendigen Erg<72>nzungen ein.
|
||||
3. Dr<44>cke i und gib die n<EFBFBD>tigen Erg<72>nzungen ein.
|
||||
|
||||
4. Wenn jeweils ein Fehler beseitigt ist, dr<64>cke <ESC> , um zum Normalmodus
|
||||
zur<75>ckzukehren.
|
||||
Wiederhole die Schritte 2 bis 4, um den Satz zu korrigieren.
|
||||
Wiederhole Schritte 2 bis 4, um den Satz zu korrigieren.
|
||||
|
||||
---> In dieser ft etwas .
|
||||
---> In dieser Zeile fehlt etwas Text.
|
||||
@@ -120,15 +120,15 @@ Anmerkung: W
|
||||
** Dr<44>cke A , um Text anzuf<75>gen. **
|
||||
|
||||
1. Bewege den Cursor zur ersten unten stehenden mit ---> markierten Zeile.
|
||||
Es ist gleichg<68>ltig, auf welchem Zeichen der Zeile der Cursor steht.
|
||||
Dabei ist gleichg<68>ltig, auf welchem Zeichen der Zeile der Cursor steht.
|
||||
|
||||
2. Dr<44>cke A und gib die n<EFBFBD>tigen Erg<72>nzungen ein.
|
||||
2. Dr<44>cke A und gib die erforderlichen Erg<72>nzungen ein.
|
||||
|
||||
3. Wenn das Anf<6E>gen abgeschlossen ist, dr<64>cke <ESC>, um in den Normalmodus
|
||||
zur<75>ckzukehren.
|
||||
|
||||
4. Bewege den Cursor zur zweiten mit ---> markierten Zeile und wiederhole
|
||||
die Schritte 2 und 3, um den Satz zu korrigieren.
|
||||
die Schritte 2 und 3, um den Satz zu auszubessern.
|
||||
|
||||
---> In dieser Zeile feh
|
||||
In dieser Zeile fehlt etwas Text.
|
||||
@@ -139,26 +139,28 @@ Anmerkung: W
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Lektion 1.6: EINE DATEI EDITIEREN
|
||||
|
||||
** Benutze :wq , um eine Datei zu speichern und Vim zu verlassen. **
|
||||
|
||||
** Benutze :wq , um eine Datei zu speichern und Vim zu verlassen. **
|
||||
|
||||
!! ACHTUNG: Bevor Du einen der unten aufgef<65>hrten Schritte ausf<73>hrst, lies
|
||||
!! Hinweis: Bevor Du einen der unten aufgef<65>hrten Schritte ausf<73>hrst, lies
|
||||
diese gesamte Lektion!!
|
||||
|
||||
1. Verlasse den Editor so wie in Lektion 1.2: :q!
|
||||
1. Verlasse den Editor so wie in Lektion 1.2: :q!
|
||||
Oder, falls du Zugriff zu einem anderen Terminal hast, f<>hre das
|
||||
Folgende dort aus.
|
||||
|
||||
2. Gib dieses Kommando in die Eingabeaufforderung ein: vim tutor <ENTER>
|
||||
'vim' ist der Aufruf des Editors, 'tutor' ist die zu editierende Datei.
|
||||
Benutze eine Datei, die ge<67>ndert werden kann.
|
||||
Benutze eine Datei, die ge<67>ndert werden darf.
|
||||
|
||||
3. F<>ge Text ein oder l<>sche ihn, wie Du in den vorigen Lektionen gelernt
|
||||
hast.
|
||||
3. F<>ge Text ein oder l<>sche ihn, wie Du in den vorangehenden Lektionen
|
||||
gelernt hast.
|
||||
|
||||
4. Speichere die ge<67>nderte Datei und verlasse Vim mit: :wq <ENTER>
|
||||
4. Speichere die ge<67>nderte Datei und verlasse Vim mit: :wq <ENTER>
|
||||
|
||||
5. Starte den vimtutor neu und bewege Dich zu der folgenden Zusammenfassung.
|
||||
5. Falls Du in Schritt 1 den vimtutor beendet hast, starte vimtutor neu und
|
||||
bewege dich abw<62>rts bis zur folgenden Zusammenfassung.
|
||||
|
||||
6. Nachdem Du obige Schritte gelesen und verstanden hast, f<>hre sie durch.
|
||||
6. Nachdem Du obige Schritte gelesen und verstanden hast: f<>hre sie durch.
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
ZUSAMMENFASSUNG VON LEKTION 1
|
||||
|
||||
@@ -166,19 +168,18 @@ Anmerkung: W
|
||||
1. Der Cursor wird mit den Pfeiltasten oder den Tasten hjkl bewegt.
|
||||
h (links) j (unten) k (aufw<66>rts) l (rechts)
|
||||
|
||||
2. Um Vim von der Eingabeaufforderung auszuf<EFBFBD>hren, tippe: vim DATEI <ENTER>
|
||||
2. Um Vim aus der Eingabeaufforderung zu starten, tippe: vim DATEI <ENTER>
|
||||
|
||||
3. Um Vim zu verlassen und alle <20>nderungen zu verwerfen, tippe:
|
||||
<ESC> :q! <ENTER> .
|
||||
ODER tippe: <ESC> :wq <ENTER> , um die <20>nderungen zu speichern.
|
||||
|
||||
4. Um das Zeichen unter dem Cursor zu l<>schen, tippe: x
|
||||
|
||||
5. Um Text einzuf<75>gen oder anzuf<75>gen, tippe:
|
||||
i Einzuf<75>genden Text eingeben <ESC> Einf<6E>gen vor dem Cursor
|
||||
A Anzuf<75>genden Text eingeben <ESC> Anf<6E>gen nach dem Zeilendene
|
||||
A Anzuf<75>genden Text eingeben <ESC> Anf<6E>gen nach dem Zeilenende
|
||||
|
||||
Bemerkung: Dr<44>cken von <ESC> bringt Dich in den Normalmodus oder bricht ein
|
||||
Anmerkung: Dr<44>cken von <ESC> bringt Dich in den Normalmodus oder bricht ein
|
||||
ungewolltes, erst teilweise eingegebenes Kommando ab.
|
||||
|
||||
Nun fahre mit Lektion 2 fort.
|
||||
@@ -188,7 +189,7 @@ Bemerkung: Dr
|
||||
|
||||
** Tippe dw , um ein Wort zu l<>schen. **
|
||||
|
||||
1. Dr<44>cke <ESC> um sicherzustellen, dass Du im Normalmodus bist.
|
||||
1. Dr<44>cke <ESC> , um sicherzustellen, dass Du im Normalmodus bist.
|
||||
|
||||
2. Bewege den Cursor zu der mit ---> markierten Zeile unten.
|
||||
|
||||
@@ -196,15 +197,15 @@ Bemerkung: Dr
|
||||
|
||||
4. Tippe dw , um das Wort zu entfernen.
|
||||
|
||||
Bemerkung: Der Buchstabe d erscheint auf der letzten Zeile des Bildschirms,
|
||||
wenn Du ihn eingibst. Vim wartet darauf, da<EFBFBD> Du w eingibst. Wenn Du
|
||||
ein anderes Zeichen als d siehst, hast Du etwas falsches getippt;
|
||||
dr<64>cke <ESC> und beginne neu.
|
||||
Anmerkung: Der Buchstabe d erscheint auf der untersten Zeile des Schirms,
|
||||
wenn Du ihn eingibst. Vim wartet darauf, dass Du w eingibst. Falls Du
|
||||
ein anderes Zeichen als d siehst, hast Du etwas Falsches getippt;
|
||||
dr<64>cke <ESC> und beginne noch einmal.
|
||||
|
||||
---> Einige W<>rter lustig geh<65>ren nicht Papier in diesen Satz.
|
||||
|
||||
5. Wiederhole die Schritte 3 und 4, bis der Satz korrekt ist und gehe
|
||||
danach zur Lektion 2.2.
|
||||
zur Lektion 2.2.
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Lektion 2.2: WEITERE L<>SCHKOMMANDOS
|
||||
|
||||
@@ -217,12 +218,12 @@ Bemerkung: Dr
|
||||
|
||||
3. Bewege den Cursor zum Ende der korrekten Zeile (NACH dem ersten . ).
|
||||
|
||||
4. Tippe d$ , um bis zum Ende der Zeile zu l<>schen.
|
||||
4. Tippe d$ , um bis zum Zeilenende zu l<>schen.
|
||||
|
||||
---> Jemand hat das Ende der Zeile doppelt eingegeben. doppelt eingegeben.
|
||||
|
||||
|
||||
5. Gehe weiter zur Lektion 2.3 , um zu verstehen, was hierbei passiert.
|
||||
5. Gehe weiter zur Lektion 2.3 , um zu verstehen, was hierbei vorgeht.
|
||||
|
||||
|
||||
|
||||
@@ -240,16 +241,16 @@ Bemerkung: Dr
|
||||
|
||||
wobei:
|
||||
d - der L<>schoperator
|
||||
Bewegung - worauf der L<>schoperator angewandt wird (unten aufgelistet).
|
||||
Bewegung - worauf der L<>schoperator angewandt wird (unten aufgef<EFBFBD>hrt).
|
||||
|
||||
Eine kleine Auflistung von Bewegungen:
|
||||
w - bis zum Beginn des n<>chsten Wortes OHNE dessen erstes Zeichen.
|
||||
e - zum Ende des aktuellen Wortes MIT dessen letztem Zeichen.
|
||||
$ - zum Ende der Zeile MIT dem letzen Zeichen.
|
||||
$ - zum Ende der Zeile MIT dem letzten Zeichen.
|
||||
|
||||
Dementsprechend l<>scht die Eingabe von de vom Cursor an bis zum Wortende.
|
||||
|
||||
Bemerkung: Die Eingabe lediglich des Bewegungsteils im Normalmodus bewegt den
|
||||
Anmerkung: Die Eingabe lediglich des Bewegungsteils im Normalmodus bewegt den
|
||||
Cursor entsprechend.
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Lektion 2.4: ANWENDUNG EINES Z<>HLERS F<>R EINEN BEWEGUNGSSCHRITT
|
||||
@@ -265,9 +266,9 @@ Bemerkung: Die Eingabe lediglich des Bewegungsteils im Normalmodus bewegt den
|
||||
|
||||
4. Tippe 0 (Null) , um zum Anfang der Zeile zu gelangen.
|
||||
|
||||
5. Wiederhole Schritte 2 und 3 mit verschiedenen Z<EFBFBD>hlern.
|
||||
5. Wiederhole Schritte 2 und 3 mit verschiedenen Nummern.
|
||||
|
||||
---> Dies ist nur eine Zeile aus W<>rten um sich darin herumzubewegen.
|
||||
---> Dies ist nur eine Zeile aus W<>rtern, um sich darin herumzubewegen.
|
||||
|
||||
6. Gehe weiter zu Lektion 2.5.
|
||||
|
||||
@@ -280,8 +281,8 @@ Bemerkung: Die Eingabe lediglich des Bewegungsteils im Normalmodus bewegt den
|
||||
|
||||
** Die Eingabe einer Zahl mit einem Operator wiederholt diesen mehrfach. **
|
||||
|
||||
F<EFBFBD>r die Kombination des L<>schoperators und einem Bewegungsschritt (siehe
|
||||
oben) stellt man dem Bewegungsschritt einen Z<>hler voran, um mehr zu l<>schen:
|
||||
In der Kombination aus L<>schoperator und Bewegungsschritt (siehe oben)
|
||||
stellt man, um mehr zu l<>schen dem Schritt einen Z<>hler voran:
|
||||
d Nummer Bewegungsschritt
|
||||
|
||||
1. Bewege den Cursor zum ersten Wort in GROSSBUCHSTABEN in der mit --->
|
||||
@@ -289,9 +290,8 @@ Bemerkung: Die Eingabe lediglich des Bewegungsteils im Normalmodus bewegt den
|
||||
|
||||
2. Tippe d2w , um die zwei W<>rter in GROSSBUCHSTABEN zu l<>schen.
|
||||
|
||||
3. Wiederhole Schritte 1 und 2 mit einem anderen Z<>hler, um die
|
||||
darauffolgenden W<>rter in GROSSBUCHSTABEN mit einem einzigen Kommando
|
||||
zu l<>schen.
|
||||
3. Wiederhole Schritte 1 und 2 mit einem anderen Z<>hler, um die darauffol-
|
||||
genden W<>rter in GROSSBUCHSTABEN mit einem einzigen Kommando zu l<>schen.
|
||||
|
||||
---> Diese ABC DE Zeile FGHI JK LMN OP mit W<>rtern ist Q RS TUV bereinigt.
|
||||
|
||||
@@ -325,12 +325,12 @@ Bemerkung: Die Eingabe lediglich des Bewegungsteils im Normalmodus bewegt den
|
||||
|
||||
|
||||
** Tippe u , um die letzten Kommandos r<>ckg<6B>ngig zu machen **
|
||||
** oder U um eine ganze Zeile wiederherzustellen. **
|
||||
** oder U , um eine ganze Zeile wiederherzustellen. **
|
||||
|
||||
1. Bewege den Cursor zu der mit ---> markierten Zeile unten
|
||||
und setze ihn auf den ersten Fehler.
|
||||
2. Tippe x , um das erste unerw<72>nschte Zeichen zu l<>schen.
|
||||
3. Nun tippe u um das soeben ausgef<65>hrte Kommando r<>ckg<6B>ngig zu machen.
|
||||
3. Nun tippe u , um das soeben ausgef<65>hrte Kommando r<>ckg<6B>ngig zu machen.
|
||||
4. Jetzt behebe alle Fehler auf der Zeile mit Hilfe des x Kommandos.
|
||||
5. Nun tippe ein gro<72>es U , um die Zeile in ihren Ursprungszustand
|
||||
wiederherzustellen.
|
||||
@@ -341,8 +341,8 @@ Bemerkung: Die Eingabe lediglich des Bewegungsteils im Normalmodus bewegt den
|
||||
|
||||
---> Beehebe die Fehller diesser Zeile und sttelle sie mitt 'undo' wieder her.
|
||||
|
||||
8. Dies sind sehr n<>tzliche Kommandos.
|
||||
Nun gehe weiter zur Zusammenfassung von Lektion 2.
|
||||
8. Dies sind sehr n<>tzliche Kommandos. Nun gehe weiter zur Zusammenfassung
|
||||
von Lektion 2.
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
ZUSAMMENFASSUNG VON LEKTION 2
|
||||
|
||||
@@ -357,7 +357,7 @@ Bemerkung: Die Eingabe lediglich des Bewegungsteils im Normalmodus bewegt den
|
||||
wobei:
|
||||
Operator - gibt an, was getan werden soll, zum Beispiel d f<>r delete
|
||||
[Anzahl] - ein optionaler Z<>hler, um den Bewegungsschritt zu wiederholen
|
||||
Bewegungsschritt - Bewegung <20>ber den zu <20>ndernden Text, so wie
|
||||
Bewegungsschritt - Bewegung <20>ber den zu <20>ndernden Text, wie
|
||||
w (Wort), $ (zum Ende der Zeile), etc.
|
||||
|
||||
6. Um Dich zum Anfang der Zeile zu begeben, benutze die Null: 0
|
||||
@@ -387,7 +387,7 @@ Bemerkung: Die Eingabe lediglich des Bewegungsteils im Normalmodus bewegt den
|
||||
|
||||
---> d) Kannst Du das auch?
|
||||
---> b) Veilchen sind blau,
|
||||
---> c) Intelligenz ist erlernbar,
|
||||
---> c) Intelligenz ist lernbar,
|
||||
---> a) Rosen sind rot,
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Lektion 3.2: ERSETZEN (REPLACE)
|
||||
@@ -403,13 +403,13 @@ Bemerkung: Die Eingabe lediglich des Bewegungsteils im Normalmodus bewegt den
|
||||
|
||||
4. Wiederhole Schritte 2 und 3, bis die erste Zeile gleich der zweiten ist.
|
||||
|
||||
---> Als diese Zeite eingegoben wurde, wurden einike falsche Tasten gelippt!
|
||||
---> Alf diese Zeite eingegoben wurde, wurden einike falsche Tasten gelippt!
|
||||
---> Als diese Zeile eingegeben wurde, wurden einige falsche Tasten getippt!
|
||||
|
||||
5. Nun fahre fort mit Lektion 3.2.
|
||||
|
||||
Bemerkung: Erinnere Dich, dass Du durch Anwenden lernen solltest, nicht durch
|
||||
Auswendiglernen.
|
||||
Anmerkung: Erinnere Dich daran, dass Du durch Anwenden lernen solltest, nicht
|
||||
durch Auswendiglernen.
|
||||
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
@@ -431,7 +431,7 @@ Bemerkung: Erinnere Dich, dass Du durch Anwenden lernen solltest, nicht durch
|
||||
---> Einige Wstwr dieser Zlaww lasdjlaf mit dem <20>ndern-Operator gaaauu werden.
|
||||
---> Einige W<>rter dieser Zeile sollen mit dem <20>ndern-Operator ge<67>ndert werden.
|
||||
|
||||
Bemerke, dass ce das Wort l<>scht und Dich in den Eingabemodus versetzt.
|
||||
Beachte, dass ce das Wort l<>scht und Dich in den Eingabemodus versetzt.
|
||||
|
||||
|
||||
|
||||
@@ -457,7 +457,7 @@ Bemerke, dass ce das Wort l
|
||||
---> Das Ende dieser Zeile soll an die zweite Zeile angeglichen werden.
|
||||
---> Das Ende dieser Zeile soll mit dem c$ Kommando korrigiert werden.
|
||||
|
||||
Bemerkung: Du kannst die R<>cktaste benutzen, um Tippfehler zu korrigieren.
|
||||
Anmerkung: Du kannst die R<>cktaste benutzen, um Tippfehler zu korrigieren.
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
ZUSAMMENFASSUNG VON LEKTION 3
|
||||
|
||||
@@ -466,8 +466,8 @@ Bemerkung: Du kannst die R
|
||||
gel<65>schten Text NACH dem Cursor an (wenn eine ganze Zeile gel<65>scht wurde,
|
||||
wird diese in die Zeile unter dem Cursor eingef<65>gt).
|
||||
|
||||
2. Um das Zeichen unter dem Cursor zu ersetzen, tippe r und das an dieser
|
||||
Stelle gew<EFBFBD>nschte Zeichen.
|
||||
2. Um das Zeichen unter dem Cursor zu ersetzen, tippe r und danach das
|
||||
an dieser Stelle gewollte Zeichen.
|
||||
|
||||
3. Der <20>nderungs- (change) Operator erlaubt, vom Cursor bis zum Ende des
|
||||
Bewegungsschrittes zu <20>ndern. Tippe ce , um eine <20>nderung vom Cursor bis
|
||||
@@ -484,17 +484,18 @@ Bemerkung: Du kannst die R
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Lektion 4.1: CURSORPOSITION UND DATEISTATUS
|
||||
|
||||
** Tippe CTRL-G , um Deine Dateiposition sowie den Dateistatus anzuzeigen. **
|
||||
** Tippe CTRL-G , um deine Dateiposition sowie den Dateistatus anzuzeigen. **
|
||||
** Tippe G , um Dich zu einer Zeile in der Datei zu begeben. **
|
||||
|
||||
Bemerkung: Lies diese gesamte Lektion, bevor Du irgendeinen Schritt ausf<73>hrst!!
|
||||
Anmerkung: Lies diese gesamte Lektion, bevor Du irgendeinen Schritt ausf<73>hrst!!
|
||||
|
||||
1. Halte die Ctrl Taste unten und dr<64>cke g . Dies nennen wir wir CTRL-G.
|
||||
1. Halte die Ctrl Taste unten und dr<64>cke g . Dies nennen wir CTRL-G.
|
||||
Eine Statusmeldung am Fu<46> der Seite erscheint mit dem Dateinamen und der
|
||||
Position innerhalb der Datei. Merke Dir die Zeilennummer f<>r Schritt 3.
|
||||
|
||||
Bemerkung: M<>glicherweise siehst Du die Cursorposition in der unteren rechten
|
||||
Bildschirmecke. Dies ist Folge der 'ruler' Option (siehe :help 'ruler')
|
||||
Anmerkung: M<>glicherweise siehst Du die Cursorposition in der unteren rechten
|
||||
Bildschirmecke. Dies ist Auswirkung der 'ruler' Option
|
||||
(siehe :help 'ruler')
|
||||
|
||||
2. Dr<44>cke G , um Dich zum Ende der Datei zu begeben.
|
||||
Tippe gg , um Dich zum Anfang der Datei zu begeben.
|
||||
@@ -510,7 +511,7 @@ Bemerkung: M
|
||||
|
||||
** Tippe / gefolgt von einem Ausdruck, um nach dem Ausdruck zu suchen. **
|
||||
|
||||
1. Im Normalmodus, tippe das / Zeichen. Bemerke, dass das / und der
|
||||
1. Im Normalmodus, tippe das / Zeichen. Beachte, dass das / und der
|
||||
Cursor am Fu<46> des Schirms erscheinen, so wie beim : Kommando.
|
||||
|
||||
2. Nun tippe 'Fehhler' <ENTER>. Dies ist das Wort, nach dem Du suchen willst.
|
||||
@@ -521,32 +522,32 @@ Bemerkung: M
|
||||
4. Um nach einem Ausdruck r<>ckw<6B>rts zu suchen , benutze ? statt / .
|
||||
|
||||
5. Um dahin zur<75>ckzukehren, von wo Du gekommen bist, dr<64>cke CTRL-O (Halte
|
||||
Ctrl unten und dr<64>cke den Buchstaben o). Wiederhole dies, um weiter
|
||||
zur<75>ckzugehen. CTRL-I bringt dich vorw<72>rts.
|
||||
Ctrl unten und dr<64>cke den Buchstaben o). Wiederhole dies, um noch weiter
|
||||
zur<75>ckzugehen. CTRL-I geht vorw<72>rts.
|
||||
|
||||
---> Fehler schreibt sich nicht "Fehhler"; Fehhler ist ein Fehler
|
||||
Bemerkung: Wenn die Suche das Dateiende erreicht hat, wird sie am Anfang
|
||||
Anmerkung: Wenn die Suche das Dateiende erreicht hat, wird sie am Anfang
|
||||
fortgesetzt, es sei denn, die 'wrapscan' Option wurde abgeschaltet.
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Lektion 4.3: PASSENDE KLAMMERN FINDEN
|
||||
|
||||
|
||||
** Tippe % , um eine korrespondierende Klammer ),], oder } zu finden. **
|
||||
** Tippe % , um eine gegen<EFBFBD>berliegenden Klammer ),], oder } zu finden. **
|
||||
|
||||
1. Platziere den Cursor auf irgendeines der Zeichen (, [, oder { in der unten
|
||||
1. Platziere den Cursor auf irgendeinem der Zeichen (, [, oder { in der unten
|
||||
stehenden Zeile, die mit ---> markiert ist.
|
||||
|
||||
2. Nun tippe das % Zeichen.
|
||||
|
||||
3. Der Cursor bewegt sich zur passenden gegen<65>berliegenden Klammer.
|
||||
|
||||
4. Tippe % , um den Cursor zur anderen passenden Klammer zu bewegen.
|
||||
4. Tippe % , um den Cursor zur passenden anderen Klammer zu bewegen.
|
||||
|
||||
5. Setze den Cursor auf ein anderes (,),[,],{ oder } und probiere % aus.
|
||||
|
||||
---> Dies ( ist eine Testzeile ( mit [ verschiedenen ] { Klammern } darin. ))
|
||||
|
||||
Bemerkung: Diese Funktionalit<69>t ist sehr n<>tzlich bei der Fehlersuche in einem
|
||||
Anmerkung: Diese Funktionalit<69>t ist sehr n<>tzlich bei der Fehlersuche in einem
|
||||
Programmtext, in dem passende Klammern fehlen!
|
||||
|
||||
|
||||
@@ -558,18 +559,18 @@ Bemerkung: Diese Funktionalit
|
||||
|
||||
1. Bewege den Cursor zu der unten stehenden mit ---> markierten Zeile.
|
||||
|
||||
2. Tippe :s/diee/die <ENTER> . Bemerke, dass der Befehl nur das erste
|
||||
2. Tippe :s/diee/die <ENTER> . Beachte, dass der Befehl nur das erste
|
||||
Vorkommen von "diee" ersetzt.
|
||||
|
||||
3. Nun tippe :s/diee/die/g . Das Zuf<75>gen des Flags g bedeutet, eine
|
||||
globale Ersetzung <20>ber die Zeile durchzuf<75>hren, was alle Vorkommen von
|
||||
"diee" auf der Zeile ersetzt.
|
||||
globale Ersetzung <20>ber die Zeile durchzuf<75>hren, dies ersetzt alle
|
||||
Vorkommen von "diee" auf der Zeile.
|
||||
|
||||
---> diee sch<63>nste Zeit, um diee Blumen anzuschauen, ist diee Fr<46>hlingszeit.
|
||||
|
||||
4. Um alle Vorkommen einer Zeichenkette innerhalb zweier Zeilen zu <20>ndern,
|
||||
tippe :#,#s/alt/neu/g wobei #,# die Zeilennummern des Zeilenbereiches
|
||||
sind, in dem die Ersetzung durchgef<65>hrt werden soll.
|
||||
tippe :#,#s/alt/neu/g wobei #,# die Zeilennummern des Bereiches sind,
|
||||
in dem die Ersetzung durchgef<65>hrt werden soll.
|
||||
Tippe :%s/alt/neu/g um alle Vorkommen in der gesamten Datei zu <20>ndern.
|
||||
Tippe :%s/alt/neu/gc um alle Vorkommen in der gesamten Datei zu finden
|
||||
mit einem Fragedialog, ob ersetzt werden soll oder nicht.
|
||||
@@ -593,9 +594,9 @@ Bemerkung: Diese Funktionalit
|
||||
4. Um das erste Vorkommen von "alt" in einer Zeile durch "neu" zu ersetzen,
|
||||
tippe :s/alt/neu
|
||||
Um alle Vorkommen von "alt" in der Zeile ersetzen, tippe :s/alt/neu/g
|
||||
Um Ausdr<64>cke innerhalb zweier Zeilennummern zu ersetzen, :#,#s/alt/neu/g
|
||||
Um Ausdr<64>cke innerhalb zweier Zeilen # zu ersetzen :#,#s/alt/neu/g
|
||||
Um alle Vorkommen in der ganzen Datei zu ersetzen, tippe :%s/alt/neu/g
|
||||
F<>r eine jedmalige Best<73>tigung, addiere 'c' (confirm) :%s/alt/neu/gc
|
||||
F<>r eine jedesmalige Best<73>tigung, addiere 'c' (confirm) :%s/alt/neu/gc
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Lektion 5.1: AUSF<53>HREN EINES EXTERNEN KOMMANDOS
|
||||
|
||||
@@ -608,14 +609,14 @@ Bemerkung: Diese Funktionalit
|
||||
2. Nun tippe ein ! (Ausrufezeichen). Dies erm<72>glicht Dir, ein beliebiges,
|
||||
externes Shellkommando auszuf<75>hren.
|
||||
|
||||
3. Als Beispiel tippe ls nach dem ! und dr<64>cke <ENTER>. Dies zeigt
|
||||
eine Auflistung Deines Verzeichnisses; genauso, als wenn Du auf der
|
||||
3. Als Beispiel tippe ls nach dem ! und dr<64>cke <ENTER>. Dies liefert
|
||||
eine Auflistung deines Verzeichnisses; genauso, als wenn Du in der
|
||||
Eingabeaufforderung w<>rst. Oder verwende :!dir , falls ls nicht geht.
|
||||
|
||||
Bemerkung: Mit dieser Methode kann jedes beliebige externe Kommando
|
||||
Anmerkung: Mit dieser Methode kann jedes beliebige externe Kommando
|
||||
ausgef<65>hrt werden, auch mit Argumenten.
|
||||
|
||||
Bemerkung: Alle : Kommandos m<>ssen durch Eingabe von <ENTER>
|
||||
Anmerkung: Alle : Kommandos m<>ssen durch Eingabe von <ENTER>
|
||||
abgeschlossen werden. Von jetzt an erw<72>hnen wir dies nicht jedesmal.
|
||||
|
||||
|
||||
@@ -625,7 +626,7 @@ Bemerkung: Alle : Kommandos m
|
||||
|
||||
** Um am Text durchgef<65>hrte <20>nderungen zu speichern, tippe :w DATEINAME. **
|
||||
|
||||
1. Tippe :!dir oder :!ls , um eine Auflistung Deines Verzeichnisses zu
|
||||
1. Tippe :!dir oder :!ls , um eine Auflistung deines Verzeichnisses zu
|
||||
erhalten. Du wei<65>t nun bereits, dass Du danach <ENTER> eingeben musst.
|
||||
|
||||
2. W<>hle einen Dateinamen, der noch nicht existiert, z.B. TEST.
|
||||
@@ -633,15 +634,15 @@ Bemerkung: Alle : Kommandos m
|
||||
3. Nun tippe: :w TEST (wobei TEST der gew<65>hlte Dateiname ist).
|
||||
|
||||
4. Dies speichert die ganze Datei (den Vim Tutor) unter dem Namen TEST.
|
||||
Um dies zu <20>berpr<70>fen, tippe nochmals :!ls bzw. !dir, um Deinen
|
||||
Um dies zu <20>berpr<70>fen, tippe nochmals :!ls bzw. !dir, um deinen
|
||||
Verzeichnisinhalt zu sehen.
|
||||
|
||||
Bemerkung: W<>rdest Du Vim jetzt beenden und danach wieder mit vim TEST
|
||||
Anmerkung: W<>rdest Du Vim jetzt beenden und danach wieder mit vim TEST
|
||||
starten, dann w<>re diese Datei eine exakte Kopie des Tutors zu dem
|
||||
Zeitpunkt, als Du ihn gespeichert hast.
|
||||
|
||||
5. Nun entferne die Datei durch Eingabe von (MS-DOS): :!del TEST
|
||||
oder (Unix): :!rm TEST
|
||||
oder (Unix): :!rm TEST
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Lektion 5.3: AUSW<53>HLEN VON TEXT ZUM SCHREIBEN
|
||||
|
||||
@@ -650,41 +651,42 @@ Bemerkung: W
|
||||
1. Bewege den Cursor zu dieser Zeile.
|
||||
|
||||
2. Tippe v und bewege den Cursor zum f<>nften Auflistungspunkt unten.
|
||||
Bemerke, da<EFBFBD> der Text hervorgehoben wird.
|
||||
Beachte, dass der Text hervorgehoben wird.
|
||||
|
||||
3. Dr<44>cke das Zeichen : . Am Fu<46> des Schirms erscheint :'<,'> .
|
||||
|
||||
4. Tippe w TEST , wobei TEST ein noch nicht vorhandener Dateiname ist.
|
||||
Vergewissere Dich, da<EFBFBD> Du :'<,'>w TEST siehst, bevor Du Enter dr<64>ckst.
|
||||
Vergewissere Dich, dass Du :'<,'>w TEST siehst, bevor Du <ENTER> dr<64>ckst.
|
||||
|
||||
5. Vim schreibt die ausgew<65>hlten Zeilen in die Datei TEST. Benutze :!dir
|
||||
oder :!ls , um sie zu sehen. L<>sche sie noch nicht! Wir werden sie in
|
||||
der n<>chsten Lektion benutzen.
|
||||
|
||||
Bemerkung: Dr<44>cken von v startet die Visuelle Auswahl. Du kannst den Cursor
|
||||
umherbewegen, um die Auswahl gr<67><72>er oder kleiner zu machen. Anschlie<69>end
|
||||
kann man einen Operator anwenden, um mit dem Text etwas zu tun. Zum
|
||||
Beispiel l<EFBFBD>scht d den Text.
|
||||
Hinweis: Dr<44>cken von v startet die Visuelle Auswahl. Du kannst den Cursor
|
||||
umherbewegen, um die Auswahl zu vergr<EFBFBD><EFBFBD>ern oder zu verkleinern. Anschlie<69>end
|
||||
l<EFBFBD>sst sich ein Operator anwenden, um mit dem Text etwas zu tun. Zum Beispiel
|
||||
l<>scht d den Text.
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Lektion 5.4: EINLESEN UND ZUSAMMENF<4E>HREN VON DATEIEN
|
||||
|
||||
|
||||
** Um den Inhalt einer Datei einzulesen, tippe :r DATEINAME **
|
||||
|
||||
1. Platziere den Cursor <20>berhalb dieser Zeile.
|
||||
1. Platziere den Cursor direkt <EFBFBD>ber dieser Zeile.
|
||||
|
||||
BEACHTE: Nachdem Du Schritt 2 ausgef<65>hrt hast, wirst Du Text aus Lektion 5.3
|
||||
sehen. Dann bewege Dich wieder ABW<42>RTS, um diese Lektion wiederzusehen.
|
||||
sehen. Dann bewege Dich wieder ABW<42>RTS, Lektion 5.4 wiederzusehen.
|
||||
|
||||
2. Nun lies Deine Datei TEST ein indem Du das Kommando :r TEST ausf<73>hrst,
|
||||
2. Nun lies deine Datei TEST ein indem Du das Kommando :r TEST ausf<73>hrst,
|
||||
wobei TEST der von Dir verwendete Dateiname ist.
|
||||
Die eingelesene Datei wird unterhalb der Cursorzeile eingef<65>gt.
|
||||
|
||||
3. Um zu <20>berpr<70>fen, dass die Datei eingelesen wurde, gehe zur<75>ck und siehe,
|
||||
dass es jetzt zwei Kopien von Lektion 5.3 gibt, das Original und die
|
||||
eingef<65>gte Dateiversion.
|
||||
3. Um zu <20>berpr<70>fen, dass die Datei eingelesen wurde, gehe zur<75>ck und
|
||||
beachte, dass es jetzt zwei Kopien von Lektion 5.3 gibt, das Original und
|
||||
die eingef<65>gte Dateiversion.
|
||||
|
||||
Bemerkung: Du kannst auch die Ausgabe eines externen Kommandos einlesen. Zum
|
||||
Anmerkung: Du kannst auch die Ausgabe eines externen Kommandos einlesen. Zum
|
||||
Beispiel liest :r !ls die Ausgabe des Kommandos ls ein und platziert
|
||||
sie unterhalb des Cursors.
|
||||
|
||||
@@ -720,14 +722,14 @@ Bemerkung: Du kannst auch die Ausgabe eines externen Kommandos einlesen. Zum
|
||||
|
||||
1. Bewege den Cursor zu der ersten mit ---> markierten Zeile unten.
|
||||
|
||||
2. Tippe o (klein geschrieben), um eine Zeile UNTERHALB des Cursos zu <20>ffnen
|
||||
2. Tippe o (klein geschrieben), um eine Zeile UNTERHALB des Cursors zu <20>ffnen
|
||||
und Dich in den Einf<6E>gemodus zu begeben.
|
||||
|
||||
3. Nun tippe etwas Text und dr<64>cke <ESC> , um den Einf<6E>gemodus zu verlassen.
|
||||
|
||||
---> Mit o wird der Cursor auf der offenen Zeile im Einf<6E>gemodus platziert.
|
||||
|
||||
4. Um eine Zeile <20>BERHALB des Cursos aufzumachen, gib einfach ein gro<72>es O
|
||||
4. Um eine Zeile <20>BERHALB des Cursors aufzumachen, gib einfach ein gro<72>es O
|
||||
statt einem kleinen o ein. Versuche dies auf der unten stehenden Zeile.
|
||||
|
||||
---> <20>ffne eine Zeile <20>ber dieser mit O , wenn der Cursor auf dieser Zeile ist.
|
||||
@@ -755,7 +757,7 @@ Bemerkung: Du kannst auch die Ausgabe eines externen Kommandos einlesen. Zum
|
||||
---> Diese Zei bietet Gelegen , Text in einer Zeile anzuf<75>.
|
||||
---> Diese Zeile bietet Gelegenheit, Text in einer Zeile anzuf<75>gen.
|
||||
|
||||
Bemerkung: a, i und A gehen alle gleicherma<6D>en in den Einf<6E>gemodus; der
|
||||
Anmerkung: a, i und A gehen alle gleicherma<6D>en in den Einf<6E>gemodus; der
|
||||
einzige Unterschied ist, wo die Zeichen eingef<65>gt werden.
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Lektion 6.3: EINE ANDERE ART DES ERSETZENS (REPLACE)
|
||||
@@ -767,9 +769,9 @@ Bemerkung: a, i und A gehen alle gleicherma
|
||||
Bewege den Cursor zum Anfang des ersten xxx .
|
||||
|
||||
2. Nun dr<64>cke R und tippe die Nummer, die darunter in der zweiten Zeile
|
||||
steht, so das diese das xxx ersetzt.
|
||||
steht, so dass diese das xxx ersetzt.
|
||||
|
||||
3. Dr<44>cke <ESC> , um den Ersetzungsmodus zu verlassen. Bemerke, da<EFBFBD> der Rest
|
||||
3. Dr<44>cke <ESC> , um den Ersetzungsmodus zu verlassen. Beachte, dass der Rest
|
||||
der Zeile unver<65>ndert bleibt.
|
||||
|
||||
4. Wiederhole die Schritte, um das verbliebene xxx zu ersetzen.
|
||||
@@ -777,7 +779,7 @@ Bemerkung: a, i und A gehen alle gleicherma
|
||||
---> Das Addieren von 123 zu xxx ergibt xxx.
|
||||
---> Das Addieren von 123 zu 456 ergibt 579.
|
||||
|
||||
Bemerkung: Der Ersetzungsmodus ist wie der Einf<6E>gemodus, aber jedes eingetippte
|
||||
Anmerkung: Der Ersetzungsmodus ist wie der Einf<6E>gemodus, aber jedes eingetippte
|
||||
Zeichen l<>scht ein vorhandenes Zeichen.
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
@@ -785,7 +787,7 @@ Bemerkung: Der Ersetzungsmodus ist wie der Einf
|
||||
|
||||
** Benutze den y Operator, um Text zu kopieren; p , um ihn einzuf<75>gen **
|
||||
|
||||
1. Gehe zu der mit ---> markierten Zeile unten, setze den Cursor hinter "a)".
|
||||
1. Gehe zu der mit ---> markierten Zeile unten; setze den Cursor hinter "a)".
|
||||
|
||||
2. Starte den Visuellen Modus mit v , bewege den Cursor genau vor "erste".
|
||||
|
||||
@@ -802,11 +804,11 @@ Bemerkung: Der Ersetzungsmodus ist wie der Einf
|
||||
---> a) dies ist der erste Eintrag.
|
||||
b)
|
||||
|
||||
Bemerkung: Du kannst y auch als Operator verwenden; yw kopiert ein Wort.
|
||||
Anmerkung: Du kannst y auch als Operator verwenden; yw kopiert ein Wort.
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Lektion 6.5: OPTIONEN SETZEN
|
||||
|
||||
** Setze eine Option so, dass eine Suche oder eine Ersetzung Gro<72>- **
|
||||
** Setze eine Option so, dass eine Suche oder Ersetzung Gro<72>- **
|
||||
** und Kleinschreibung ignoriert **
|
||||
|
||||
1. Suche nach 'ignoriere', indem Du /ignoriere eingibst.
|
||||
@@ -815,7 +817,7 @@ Bemerkung: Du kannst y auch als Operator verwenden; yw kopiert ein Wort.
|
||||
2. Setze die 'ic' (Ignore case) - Option, indem Du :set ic eingibst.
|
||||
|
||||
3. Nun suche wieder nach 'ignoriere', indem Du n tippst.
|
||||
Bemerke, da<EFBFBD> jetzt Ignoriere und auch IGNORIERE gefunden wird.
|
||||
Beachte, dass jetzt Ignoriere und auch IGNORIERE gefunden wird.
|
||||
|
||||
4. Setze die 'hlsearch' und 'incsearch' - Optionen: :set hls is
|
||||
|
||||
@@ -823,14 +825,14 @@ Bemerkung: Du kannst y auch als Operator verwenden; yw kopiert ein Wort.
|
||||
|
||||
6. Um das Ignorieren von Gro<72>/Kleinschreibung abzuschalten, tippe: :set noic
|
||||
|
||||
Bemerkung: Um die Hervorhebung der Treffer zu enfernen, gib ein: :nohlsearch
|
||||
Bemerkung: Um die Schreibweise f<>r eine einzige Suche zu ignorieren, benutze
|
||||
\c im Suchausdruck: /ignoriere\c <ENTER>
|
||||
Anmerkung: Um die Hervorhebung der Treffer zu entfernen, gib ein: :nohlsearch
|
||||
Anmerkung: Um die Schreibweise f<>r eine einzige Suche zu ignorieren, benutze \c
|
||||
im Suchausdruck: /ignoriere\c <ENTER>
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
ZUSAMMENFASSUNG VON LEKTION 6
|
||||
|
||||
1. Tippe o , um eine Zeile UNTER dem Cursor zu <20>ffnen und den Einf<6E>gemodus
|
||||
zu starten.
|
||||
zu starten
|
||||
Tippe O , um eine Zeile <20>BER dem Cursor zu <20>ffnen.
|
||||
|
||||
2. Tippe a , um Text NACH dem Cursor anzuf<75>gen.
|
||||
@@ -876,13 +878,13 @@ Bemerkung: Um die Schreibweise f
|
||||
Lektion 7.2: ERSTELLE EIN START-SKRIPT
|
||||
|
||||
|
||||
** Aktiviere die eingebauten Funktionalit<69>ten von Vim **
|
||||
** Aktiviere die Features von Vim **
|
||||
|
||||
Vim besitzt viele Funktionalit<69>ten, die <20>ber Vi hinausgehen, aber die meisten
|
||||
von ihnen sind standardm<64><6D>ig deaktiviert. Um mehr Funktionalit<69>ten zu nutzen,
|
||||
musst Du eine "vimrc" - Datei erstellen.
|
||||
|
||||
1. Starte das Editieren der "vimrc"-Datei, abh<62>ngig von Deinem System:
|
||||
1. Starte das Editieren der "vimrc"-Datei, abh<62>ngig von deinem System:
|
||||
:e ~/.vimrc f<>r Unix
|
||||
:e $VIM/_vimrc f<>r MS-Windows
|
||||
|
||||
@@ -893,33 +895,33 @@ Bemerkung: Um die Schreibweise f
|
||||
:w
|
||||
|
||||
Beim n<>chsten Start von Vim wird die Syntaxhervorhebung aktiviert sein.
|
||||
Du kannst all Deine bevorzugten Optionen zu dieser "vimrc"-Datei zuf<75>gen.
|
||||
Du kannst all deine bevorzugten Optionen zu dieser "vimrc"-Datei zuf<75>gen.
|
||||
F<>r mehr Informationen tippe :help vimrc-intro
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Lektion 7.3: VERVOLLST<53>NDIGEN
|
||||
|
||||
|
||||
** Kommandozeilenvervollst<73>ndigung mit CTRL-D and <TAB> **
|
||||
** Kommandozeilenvervollst<73>ndigung mit CTRL-D und <TAB> **
|
||||
|
||||
1. Stelle sicher, da<EFBFBD> Vim nicht im vi-Kompatibilit<69>tsmodus ist: :set nocp
|
||||
1. Stelle sicher, dass Vim nicht im Vi-Kompatibilit<69>tsmodus ist: :set nocp
|
||||
|
||||
2. Siehe nach, welche Dateien im Verzeichnis existieren: :!ls oder :dir
|
||||
|
||||
3. Tippe den Beginn eines Komandos: :e
|
||||
3. Tippe den Beginn eines Kommandos: :e
|
||||
|
||||
4. Dr<44>cke CTRL-D und Vim zeigt eine Liste mit "e" beginnender Kommandos.
|
||||
|
||||
5. Dr<44>cke <TAB> und Vim vervollst<73>ndigt den Kommandonamen zu ":edit".
|
||||
|
||||
6. Nun f<>ge ein Leerzeichen und den Beginn einer existierenden Datei an:
|
||||
6. Nun f<>ge ein Leerzeichen und den Anfang einer existierenden Datei an:
|
||||
:edit DAT
|
||||
|
||||
7. Dr<44>cke <TAB>. Vim vervollst<73>ndigt den Namen (falls er eindeutig ist).
|
||||
|
||||
Bemerkung: Vervollst<73>ndigung funktioniert f<>r viele Kommandos. Versuche
|
||||
Anmerkung: Vervollst<73>ndigung funktioniert f<>r viele Kommandos. Probiere
|
||||
einfach CTRL-D und <TAB>. Dies ist insbesondere n<>tzlich f<>r :help .
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
ZUSAMMENFASSUNG VON LEKTION 7
|
||||
ZUSAMMENFASSUNG VON LEKTION 7
|
||||
|
||||
|
||||
1. Tippe :help oder dr<64>cke <F1> oder <Help>, um ein Hilfefenster zu <20>ffnen.
|
||||
@@ -930,11 +932,11 @@ Bemerkung: Vervollst
|
||||
|
||||
4. Tippe :q , um das Hilfefenster zu schlie<69>en.
|
||||
|
||||
5. Erstelle ein vimrc - Startskript zur Sicherung bevorzugter Einstellungen.
|
||||
5. Erstelle ein vimrc - Startskript mit deinen bevorzugter Einstellungen.
|
||||
|
||||
6. Dr<44>cke CTRL-D nach dem Tippen eines Kommandos : , um m<>gliche
|
||||
Vervollst<73>ndigungen zu sehen.
|
||||
Dr<44>cke <TAB> f<EFBFBD>r eine einzige Vervollst<73>ndigung.
|
||||
6. Dr<44>cke CTRL-D nach dem Tippen eines : Kommandos, um m<>gliche
|
||||
Vervollst<73>ndigungen anzusehen.
|
||||
Dr<44>cke <TAB> , um eine Vervollst<73>ndigung zu anzuwenden.
|
||||
|
||||
|
||||
|
||||
@@ -943,13 +945,13 @@ Bemerkung: Vervollst
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Damit ist der Vim Tutor beendet. Die Intention war, einen kurzen und
|
||||
b<>ndigen <20>berblick <20>ber den Vim Editor zu liefern; gerade genug, um relativ
|
||||
Damit ist der Vim Tutor beendet. Seine Intention war, einen kurzen und
|
||||
b<>ndigen <20>berblick <20>ber den Vim Editor zu geben; gerade genug, um relativ
|
||||
leicht mit ihm umgehen zu k<>nnen. Der Vim Tutor hat nicht den geringsten
|
||||
Anspruch auf Vollst<73>ndigkeit; Vim hat noch weitaus mehr Kommandos. Lies als
|
||||
n<>chstes das User Manual: ":help user-manual".
|
||||
|
||||
F<>r weiteres Lesen und Lernen ist folgendes Buch empfohlen :
|
||||
F<>r weiteres Lesen und Lernen ist folgendes Buch empfehlenswert :
|
||||
Vim - Vi Improved - von Steve Oualline
|
||||
Verlag: New Riders
|
||||
Das erste Buch, welches durchg<68>ngig Vim gewidmet ist. Besonders n<>tzlich
|
||||
@@ -957,7 +959,7 @@ Bemerkung: Vervollst
|
||||
Siehe http://iccf-holland.org/click5.html
|
||||
|
||||
Folgendes Buch ist <20>lter und mehr <20>ber Vi als Vim, aber auch empfehlenswert:
|
||||
Textbearbeitung mit dem vi-Editor - von Linda Lamb und Arnold Robbins
|
||||
Textbearbeitung mit dem Vi-Editor - von Linda Lamb und Arnold Robbins
|
||||
Verlag O'Reilly - ISBN: 3897211262
|
||||
In diesem Buch kann man fast alles finden, was man mit Vi tun m<>chte.
|
||||
Die sechste Ausgabe enth<74>lt auch Informationen <20>ber Vim.
|
||||
@@ -970,11 +972,11 @@ Bemerkung: Vervollst
|
||||
f<>r Einsteiger empfehlenswert. Probekapitel und die Beispielskripte sind
|
||||
online erh<72>ltlich. Siehe http://iccf-holland.org/click5.html
|
||||
|
||||
Dieses Tutorial wurde geschrieben von Michael C. Pierce and Robert K. Ware,
|
||||
Dieses Tutorial wurde geschrieben von Michael C. Pierce und Robert K. Ware,
|
||||
Colorado School of Mines. Es benutzt Ideen, die Charles Smith, Colorado State
|
||||
University, zur Verf<72>gung stellte. E-mail: bware@mines.colorado.edu.
|
||||
University, zur Verf<72>gung stellte. E-Mail: bware@mines.colorado.edu.
|
||||
|
||||
Bearbeitet f<>r Vim von Bram Moolenaar.
|
||||
Deutsche <20>bersetzung von Joachim Hofmann 2007. E-mail: Joachim.Hof@gmx.de
|
||||
Deutsche <20>bersetzung von Joachim Hofmann 2015. E-Mail: Joachim.Hof@gmx.de
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
===============================================================================
|
||||
= W i l l k o m m e n im V I M T u t o r - Version 1.7D =
|
||||
= W i l l k o m m e n im V I M T u t o r - Version 1.7.de.1 =
|
||||
===============================================================================
|
||||
|
||||
Vim ist ein sehr mächtiger Editor, der viele Befehle bereitstellt; zu viele,
|
||||
um alle in einem Tutor wie diesem zu erklären. Dieser Tutor ist so
|
||||
gestaltet, um genug Befehle vorzustellen, dass Du die Fähigkeit erlangst,
|
||||
Vim mit Leichtigkeit als einen Allzweck-Editor zu benutzen.
|
||||
Vim mit Leichtigkeit als einen Allzweck-Editor zu verwenden.
|
||||
Die Zeit für das Durcharbeiten dieses Tutors beträgt ca. 25-30 Minuten,
|
||||
abhängig davon, wie viel Zeit Du mit Experimentieren verbringst.
|
||||
|
||||
@@ -15,11 +15,11 @@
|
||||
aufgerufen hast, ist dies bereits eine Kopie).
|
||||
|
||||
Es ist wichtig, sich zu vergegenwärtigen, dass dieser Tutor für das Anwenden
|
||||
konzipiert ist. Das bedeutet, dass Du die Befehle ausführen musst, um sie
|
||||
konzipiert ist. Das bedeutet, dass Du die Befehle anwenden musst, um sie
|
||||
richtig zu lernen. Wenn Du nur den Text liest, vergisst Du die Befehle!
|
||||
|
||||
Jetzt stelle sicher, dass Deine Umstelltaste NICHT gedrückt ist und betätige
|
||||
die j Taste genügend Male, um den Cursor nach unten zu bewegen, so dass
|
||||
Jetzt stelle sicher, dass deine Umstelltaste NICHT gedrückt ist und betätige
|
||||
die j Taste genügend Mal, um den Cursor nach unten zu bewegen, so dass
|
||||
Lektion 1.1 den Bildschirm vollkommen ausfüllt.
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Lektion 1.1: BEWEGEN DES CURSORS
|
||||
@@ -37,18 +37,18 @@
|
||||
|
||||
3. Benutze die Nach-Unten-Taste, um Dich zu Lektion 1.2 zu bewegen.
|
||||
|
||||
Bemerkung: Immer, wenn Du Dir unsicher bist über das, was Du getippt hast,
|
||||
Anmerkung: Immer, wenn Du Dir unsicher bist über das, was Du getippt hast,
|
||||
drücke <ESC> , um Dich in den Normalmodus zu begeben.
|
||||
Dann gib das gewünschte Kommando noch einmal ein.
|
||||
|
||||
Bemerkung: Die Cursor-Tasten sollten ebenfalls funktionieren. Aber wenn Du
|
||||
Anmerkung: Die Cursor-Tasten sollten ebenfalls funktionieren. Aber wenn Du
|
||||
hjkl benutzt, wirst Du in der Lage sein, Dich sehr viel schneller
|
||||
umherzubewegen, wenn Du Dich einmal daran gewöhnt hast. Wirklich!
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Lektion 1.2: VIM BEENDEN
|
||||
|
||||
|
||||
!! ACHTUNG: Bevor Du einen der unten aufgeführten Schritte ausführst, lies
|
||||
!! Hinweis: Bevor Du einen der unten aufgeführten Schritte ausführst, lies
|
||||
diese gesamte Lektion!!
|
||||
|
||||
1. Drücke die <ESC> Taste (um sicherzustellen, dass Du im Normalmodus bist).
|
||||
@@ -63,28 +63,28 @@ Bemerkung: Die Cursor-Tasten sollten ebenfalls funktionieren. Aber wenn Du
|
||||
führe Schritte 1 bis 3 aus, um den Editor zu verlassen und wieder
|
||||
hineinzugelangen.
|
||||
|
||||
Bemerkung: :q! <ENTER> verwirft alle Änderungen, die Du gemacht hast. In
|
||||
einigen Lektionen lernst Du , die Änderungen in einer Datei zu speichern.
|
||||
Anmerkung: :q! <ENTER> verwirft alle Änderungen, die Du gemacht hast. Einige
|
||||
Lektionen später lernst Du, die Änderungen in einer Datei zu speichern.
|
||||
|
||||
5. Bewege den Cursor abwärts zu Lektion 1.3.
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Lektion 1.3: TEXT EDITIEREN - LÖSCHEN
|
||||
|
||||
|
||||
** Drücke x um das Zeichen unter dem Cursor zu löschen. **
|
||||
** Drücke x , um das Zeichen unter dem Cursor zu löschen. **
|
||||
|
||||
1. Bewege den Cursor zu der mit ---> markierten Zeile unten.
|
||||
|
||||
2. Um die Fehler zu beheben, bewege den Cursor, bis er auf dem Zeichen steht,
|
||||
2. Um die Fehler zu beheben, bewege den Cursor, bis er über dem Zeichen steht,
|
||||
das gelöscht werden soll.
|
||||
|
||||
3. Drücke die x Taste, um das überflüssige Zeichen zu löschen.
|
||||
3. Drücke die x Taste, um das unerwünschte Zeichen zu löschen.
|
||||
|
||||
4. Wiederhole die Schritte 2 bis 4, bis der Satz korrekt ist.
|
||||
|
||||
---> Die Kkuh sprangg übber deen Moond.
|
||||
---> Die Kkuh sprangg übberr deen Moond.
|
||||
|
||||
5. Wenn nun die Zeile korrekt ist, gehe weiter zur Lektion 1.4.
|
||||
5. Nun, da die Zeile korrekt ist, gehe weiter zur Lektion 1.4.
|
||||
|
||||
Anmerkung: Während Du durch diesen Tutor gehst, versuche nicht, auswendig zu
|
||||
lernen, lerne vielmehr durch Anwenden.
|
||||
@@ -99,13 +99,13 @@ Anmerkung: Während Du durch diesen Tutor gehst, versuche nicht, auswendig zu
|
||||
1. Bewege den Cursor zur ersten unten stehenden mit ---> markierten Zeile.
|
||||
|
||||
2. Um die erste Zeile mit der zweiten gleichzumachen, bewege den Cursor auf
|
||||
das erste Zeichen NACH der Stelle, wo der Text eingefügt werden soll.
|
||||
das erste Zeichen NACH der Stelle, an der Text eingefügt werden soll.
|
||||
|
||||
3. Drücke i und gib die notwendigen Ergänzungen ein.
|
||||
3. Drücke i und gib die nötigen Ergänzungen ein.
|
||||
|
||||
4. Wenn jeweils ein Fehler beseitigt ist, drücke <ESC> , um zum Normalmodus
|
||||
zurückzukehren.
|
||||
Wiederhole die Schritte 2 bis 4, um den Satz zu korrigieren.
|
||||
Wiederhole Schritte 2 bis 4, um den Satz zu korrigieren.
|
||||
|
||||
---> In dieser ft etwas .
|
||||
---> In dieser Zeile fehlt etwas Text.
|
||||
@@ -120,15 +120,15 @@ Anmerkung: Während Du durch diesen Tutor gehst, versuche nicht, auswendig zu
|
||||
** Drücke A , um Text anzufügen. **
|
||||
|
||||
1. Bewege den Cursor zur ersten unten stehenden mit ---> markierten Zeile.
|
||||
Es ist gleichgültig, auf welchem Zeichen der Zeile der Cursor steht.
|
||||
Dabei ist gleichgültig, auf welchem Zeichen der Zeile der Cursor steht.
|
||||
|
||||
2. Drücke A und gib die nötigen Ergänzungen ein.
|
||||
2. Drücke A und gib die erforderlichen Ergänzungen ein.
|
||||
|
||||
3. Wenn das Anfügen abgeschlossen ist, drücke <ESC>, um in den Normalmodus
|
||||
zurückzukehren.
|
||||
|
||||
4. Bewege den Cursor zur zweiten mit ---> markierten Zeile und wiederhole
|
||||
die Schritte 2 und 3, um den Satz zu korrigieren.
|
||||
die Schritte 2 und 3, um den Satz zu auszubessern.
|
||||
|
||||
---> In dieser Zeile feh
|
||||
In dieser Zeile fehlt etwas Text.
|
||||
@@ -139,26 +139,28 @@ Anmerkung: Während Du durch diesen Tutor gehst, versuche nicht, auswendig zu
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Lektion 1.6: EINE DATEI EDITIEREN
|
||||
|
||||
** Benutze :wq , um eine Datei zu speichern und Vim zu verlassen. **
|
||||
|
||||
** Benutze :wq , um eine Datei zu speichern und Vim zu verlassen. **
|
||||
|
||||
!! ACHTUNG: Bevor Du einen der unten aufgeführten Schritte ausführst, lies
|
||||
!! Hinweis: Bevor Du einen der unten aufgeführten Schritte ausführst, lies
|
||||
diese gesamte Lektion!!
|
||||
|
||||
1. Verlasse den Editor so wie in Lektion 1.2: :q!
|
||||
1. Verlasse den Editor so wie in Lektion 1.2: :q!
|
||||
Oder, falls du Zugriff zu einem anderen Terminal hast, führe das
|
||||
Folgende dort aus.
|
||||
|
||||
2. Gib dieses Kommando in die Eingabeaufforderung ein: vim tutor <ENTER>
|
||||
'vim' ist der Aufruf des Editors, 'tutor' ist die zu editierende Datei.
|
||||
Benutze eine Datei, die geändert werden kann.
|
||||
Benutze eine Datei, die geändert werden darf.
|
||||
|
||||
3. Füge Text ein oder lösche ihn, wie Du in den vorigen Lektionen gelernt
|
||||
hast.
|
||||
3. Füge Text ein oder lösche ihn, wie Du in den vorangehenden Lektionen
|
||||
gelernt hast.
|
||||
|
||||
4. Speichere die geänderte Datei und verlasse Vim mit: :wq <ENTER>
|
||||
4. Speichere die geänderte Datei und verlasse Vim mit: :wq <ENTER>
|
||||
|
||||
5. Starte den vimtutor neu und bewege Dich zu der folgenden Zusammenfassung.
|
||||
5. Falls Du in Schritt 1 den vimtutor beendet hast, starte vimtutor neu und
|
||||
bewege dich abwärts bis zur folgenden Zusammenfassung.
|
||||
|
||||
6. Nachdem Du obige Schritte gelesen und verstanden hast, führe sie durch.
|
||||
6. Nachdem Du obige Schritte gelesen und verstanden hast: führe sie durch.
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
ZUSAMMENFASSUNG VON LEKTION 1
|
||||
|
||||
@@ -166,19 +168,18 @@ Anmerkung: Während Du durch diesen Tutor gehst, versuche nicht, auswendig zu
|
||||
1. Der Cursor wird mit den Pfeiltasten oder den Tasten hjkl bewegt.
|
||||
h (links) j (unten) k (aufwärts) l (rechts)
|
||||
|
||||
2. Um Vim von der Eingabeaufforderung auszuführen, tippe: vim DATEI <ENTER>
|
||||
2. Um Vim aus der Eingabeaufforderung zu starten, tippe: vim DATEI <ENTER>
|
||||
|
||||
3. Um Vim zu verlassen und alle Änderungen zu verwerfen, tippe:
|
||||
<ESC> :q! <ENTER> .
|
||||
ODER tippe: <ESC> :wq <ENTER> , um die Änderungen zu speichern.
|
||||
|
||||
4. Um das Zeichen unter dem Cursor zu löschen, tippe: x
|
||||
|
||||
5. Um Text einzufügen oder anzufügen, tippe:
|
||||
i Einzufügenden Text eingeben <ESC> Einfügen vor dem Cursor
|
||||
A Anzufügenden Text eingeben <ESC> Anfügen nach dem Zeilendene
|
||||
A Anzufügenden Text eingeben <ESC> Anfügen nach dem Zeilenende
|
||||
|
||||
Bemerkung: Drücken von <ESC> bringt Dich in den Normalmodus oder bricht ein
|
||||
Anmerkung: Drücken von <ESC> bringt Dich in den Normalmodus oder bricht ein
|
||||
ungewolltes, erst teilweise eingegebenes Kommando ab.
|
||||
|
||||
Nun fahre mit Lektion 2 fort.
|
||||
@@ -188,7 +189,7 @@ Bemerkung: Drücken von <ESC> bringt Dich in den Normalmodus oder bricht ein
|
||||
|
||||
** Tippe dw , um ein Wort zu löschen. **
|
||||
|
||||
1. Drücke <ESC> um sicherzustellen, dass Du im Normalmodus bist.
|
||||
1. Drücke <ESC> , um sicherzustellen, dass Du im Normalmodus bist.
|
||||
|
||||
2. Bewege den Cursor zu der mit ---> markierten Zeile unten.
|
||||
|
||||
@@ -196,15 +197,15 @@ Bemerkung: Drücken von <ESC> bringt Dich in den Normalmodus oder bricht ein
|
||||
|
||||
4. Tippe dw , um das Wort zu entfernen.
|
||||
|
||||
Bemerkung: Der Buchstabe d erscheint auf der letzten Zeile des Bildschirms,
|
||||
wenn Du ihn eingibst. Vim wartet darauf, daß Du w eingibst. Wenn Du
|
||||
ein anderes Zeichen als d siehst, hast Du etwas falsches getippt;
|
||||
drücke <ESC> und beginne neu.
|
||||
Anmerkung: Der Buchstabe d erscheint auf der untersten Zeile des Schirms,
|
||||
wenn Du ihn eingibst. Vim wartet darauf, dass Du w eingibst. Falls Du
|
||||
ein anderes Zeichen als d siehst, hast Du etwas Falsches getippt;
|
||||
drücke <ESC> und beginne noch einmal.
|
||||
|
||||
---> Einige Wörter lustig gehören nicht Papier in diesen Satz.
|
||||
|
||||
5. Wiederhole die Schritte 3 und 4, bis der Satz korrekt ist und gehe
|
||||
danach zur Lektion 2.2.
|
||||
zur Lektion 2.2.
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Lektion 2.2: WEITERE LÖSCHKOMMANDOS
|
||||
|
||||
@@ -217,12 +218,12 @@ Bemerkung: Drücken von <ESC> bringt Dich in den Normalmodus oder bricht ein
|
||||
|
||||
3. Bewege den Cursor zum Ende der korrekten Zeile (NACH dem ersten . ).
|
||||
|
||||
4. Tippe d$ , um bis zum Ende der Zeile zu löschen.
|
||||
4. Tippe d$ , um bis zum Zeilenende zu löschen.
|
||||
|
||||
---> Jemand hat das Ende der Zeile doppelt eingegeben. doppelt eingegeben.
|
||||
|
||||
|
||||
5. Gehe weiter zur Lektion 2.3 , um zu verstehen, was hierbei passiert.
|
||||
5. Gehe weiter zur Lektion 2.3 , um zu verstehen, was hierbei vorgeht.
|
||||
|
||||
|
||||
|
||||
@@ -240,16 +241,16 @@ Bemerkung: Drücken von <ESC> bringt Dich in den Normalmodus oder bricht ein
|
||||
|
||||
wobei:
|
||||
d - der Löschoperator
|
||||
Bewegung - worauf der Löschoperator angewandt wird (unten aufgelistet).
|
||||
Bewegung - worauf der Löschoperator angewandt wird (unten aufgeführt).
|
||||
|
||||
Eine kleine Auflistung von Bewegungen:
|
||||
w - bis zum Beginn des nächsten Wortes OHNE dessen erstes Zeichen.
|
||||
e - zum Ende des aktuellen Wortes MIT dessen letztem Zeichen.
|
||||
$ - zum Ende der Zeile MIT dem letzen Zeichen.
|
||||
$ - zum Ende der Zeile MIT dem letzten Zeichen.
|
||||
|
||||
Dementsprechend löscht die Eingabe von de vom Cursor an bis zum Wortende.
|
||||
|
||||
Bemerkung: Die Eingabe lediglich des Bewegungsteils im Normalmodus bewegt den
|
||||
Anmerkung: Die Eingabe lediglich des Bewegungsteils im Normalmodus bewegt den
|
||||
Cursor entsprechend.
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Lektion 2.4: ANWENDUNG EINES ZÄHLERS FÜR EINEN BEWEGUNGSSCHRITT
|
||||
@@ -265,9 +266,9 @@ Bemerkung: Die Eingabe lediglich des Bewegungsteils im Normalmodus bewegt den
|
||||
|
||||
4. Tippe 0 (Null) , um zum Anfang der Zeile zu gelangen.
|
||||
|
||||
5. Wiederhole Schritte 2 und 3 mit verschiedenen Zählern.
|
||||
5. Wiederhole Schritte 2 und 3 mit verschiedenen Nummern.
|
||||
|
||||
---> Dies ist nur eine Zeile aus Wörten um sich darin herumzubewegen.
|
||||
---> Dies ist nur eine Zeile aus Wörtern, um sich darin herumzubewegen.
|
||||
|
||||
6. Gehe weiter zu Lektion 2.5.
|
||||
|
||||
@@ -280,8 +281,8 @@ Bemerkung: Die Eingabe lediglich des Bewegungsteils im Normalmodus bewegt den
|
||||
|
||||
** Die Eingabe einer Zahl mit einem Operator wiederholt diesen mehrfach. **
|
||||
|
||||
Für die Kombination des Löschoperators und einem Bewegungsschritt (siehe
|
||||
oben) stellt man dem Bewegungsschritt einen Zähler voran, um mehr zu löschen:
|
||||
In der Kombination aus Löschoperator und Bewegungsschritt (siehe oben)
|
||||
stellt man, um mehr zu löschen dem Schritt einen Zähler voran:
|
||||
d Nummer Bewegungsschritt
|
||||
|
||||
1. Bewege den Cursor zum ersten Wort in GROSSBUCHSTABEN in der mit --->
|
||||
@@ -289,9 +290,8 @@ Bemerkung: Die Eingabe lediglich des Bewegungsteils im Normalmodus bewegt den
|
||||
|
||||
2. Tippe d2w , um die zwei Wörter in GROSSBUCHSTABEN zu löschen.
|
||||
|
||||
3. Wiederhole Schritte 1 und 2 mit einem anderen Zähler, um die
|
||||
darauffolgenden Wörter in GROSSBUCHSTABEN mit einem einzigen Kommando
|
||||
zu löschen.
|
||||
3. Wiederhole Schritte 1 und 2 mit einem anderen Zähler, um die darauffol-
|
||||
genden Wörter in GROSSBUCHSTABEN mit einem einzigen Kommando zu löschen.
|
||||
|
||||
---> Diese ABC DE Zeile FGHI JK LMN OP mit Wörtern ist Q RS TUV bereinigt.
|
||||
|
||||
@@ -325,12 +325,12 @@ Bemerkung: Die Eingabe lediglich des Bewegungsteils im Normalmodus bewegt den
|
||||
|
||||
|
||||
** Tippe u , um die letzten Kommandos rückgängig zu machen **
|
||||
** oder U um eine ganze Zeile wiederherzustellen. **
|
||||
** oder U , um eine ganze Zeile wiederherzustellen. **
|
||||
|
||||
1. Bewege den Cursor zu der mit ---> markierten Zeile unten
|
||||
und setze ihn auf den ersten Fehler.
|
||||
2. Tippe x , um das erste unerwünschte Zeichen zu löschen.
|
||||
3. Nun tippe u um das soeben ausgeführte Kommando rückgängig zu machen.
|
||||
3. Nun tippe u , um das soeben ausgeführte Kommando rückgängig zu machen.
|
||||
4. Jetzt behebe alle Fehler auf der Zeile mit Hilfe des x Kommandos.
|
||||
5. Nun tippe ein großes U , um die Zeile in ihren Ursprungszustand
|
||||
wiederherzustellen.
|
||||
@@ -341,8 +341,8 @@ Bemerkung: Die Eingabe lediglich des Bewegungsteils im Normalmodus bewegt den
|
||||
|
||||
---> Beehebe die Fehller diesser Zeile und sttelle sie mitt 'undo' wieder her.
|
||||
|
||||
8. Dies sind sehr nützliche Kommandos.
|
||||
Nun gehe weiter zur Zusammenfassung von Lektion 2.
|
||||
8. Dies sind sehr nützliche Kommandos. Nun gehe weiter zur Zusammenfassung
|
||||
von Lektion 2.
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
ZUSAMMENFASSUNG VON LEKTION 2
|
||||
|
||||
@@ -357,7 +357,7 @@ Bemerkung: Die Eingabe lediglich des Bewegungsteils im Normalmodus bewegt den
|
||||
wobei:
|
||||
Operator - gibt an, was getan werden soll, zum Beispiel d für delete
|
||||
[Anzahl] - ein optionaler Zähler, um den Bewegungsschritt zu wiederholen
|
||||
Bewegungsschritt - Bewegung über den zu ändernden Text, so wie
|
||||
Bewegungsschritt - Bewegung über den zu ändernden Text, wie
|
||||
w (Wort), $ (zum Ende der Zeile), etc.
|
||||
|
||||
6. Um Dich zum Anfang der Zeile zu begeben, benutze die Null: 0
|
||||
@@ -387,7 +387,7 @@ Bemerkung: Die Eingabe lediglich des Bewegungsteils im Normalmodus bewegt den
|
||||
|
||||
---> d) Kannst Du das auch?
|
||||
---> b) Veilchen sind blau,
|
||||
---> c) Intelligenz ist erlernbar,
|
||||
---> c) Intelligenz ist lernbar,
|
||||
---> a) Rosen sind rot,
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Lektion 3.2: ERSETZEN (REPLACE)
|
||||
@@ -403,13 +403,13 @@ Bemerkung: Die Eingabe lediglich des Bewegungsteils im Normalmodus bewegt den
|
||||
|
||||
4. Wiederhole Schritte 2 und 3, bis die erste Zeile gleich der zweiten ist.
|
||||
|
||||
---> Als diese Zeite eingegoben wurde, wurden einike falsche Tasten gelippt!
|
||||
---> Alf diese Zeite eingegoben wurde, wurden einike falsche Tasten gelippt!
|
||||
---> Als diese Zeile eingegeben wurde, wurden einige falsche Tasten getippt!
|
||||
|
||||
5. Nun fahre fort mit Lektion 3.2.
|
||||
|
||||
Bemerkung: Erinnere Dich, dass Du durch Anwenden lernen solltest, nicht durch
|
||||
Auswendiglernen.
|
||||
Anmerkung: Erinnere Dich daran, dass Du durch Anwenden lernen solltest, nicht
|
||||
durch Auswendiglernen.
|
||||
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
@@ -431,7 +431,7 @@ Bemerkung: Erinnere Dich, dass Du durch Anwenden lernen solltest, nicht durch
|
||||
---> Einige Wstwr dieser Zlaww lasdjlaf mit dem Ändern-Operator gaaauu werden.
|
||||
---> Einige Wörter dieser Zeile sollen mit dem Ändern-Operator geändert werden.
|
||||
|
||||
Bemerke, dass ce das Wort löscht und Dich in den Eingabemodus versetzt.
|
||||
Beachte, dass ce das Wort löscht und Dich in den Eingabemodus versetzt.
|
||||
|
||||
|
||||
|
||||
@@ -457,7 +457,7 @@ Bemerke, dass ce das Wort löscht und Dich in den Eingabemodus versetzt.
|
||||
---> Das Ende dieser Zeile soll an die zweite Zeile angeglichen werden.
|
||||
---> Das Ende dieser Zeile soll mit dem c$ Kommando korrigiert werden.
|
||||
|
||||
Bemerkung: Du kannst die Rücktaste benutzen, um Tippfehler zu korrigieren.
|
||||
Anmerkung: Du kannst die Rücktaste benutzen, um Tippfehler zu korrigieren.
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
ZUSAMMENFASSUNG VON LEKTION 3
|
||||
|
||||
@@ -466,8 +466,8 @@ Bemerkung: Du kannst die Rücktaste benutzen, um Tippfehler zu korrigieren.
|
||||
gelöschten Text NACH dem Cursor an (wenn eine ganze Zeile gelöscht wurde,
|
||||
wird diese in die Zeile unter dem Cursor eingefügt).
|
||||
|
||||
2. Um das Zeichen unter dem Cursor zu ersetzen, tippe r und das an dieser
|
||||
Stelle gewünschte Zeichen.
|
||||
2. Um das Zeichen unter dem Cursor zu ersetzen, tippe r und danach das
|
||||
an dieser Stelle gewollte Zeichen.
|
||||
|
||||
3. Der Änderungs- (change) Operator erlaubt, vom Cursor bis zum Ende des
|
||||
Bewegungsschrittes zu ändern. Tippe ce , um eine Änderung vom Cursor bis
|
||||
@@ -484,17 +484,18 @@ Bemerkung: Du kannst die Rücktaste benutzen, um Tippfehler zu korrigieren.
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Lektion 4.1: CURSORPOSITION UND DATEISTATUS
|
||||
|
||||
** Tippe CTRL-G , um Deine Dateiposition sowie den Dateistatus anzuzeigen. **
|
||||
** Tippe CTRL-G , um deine Dateiposition sowie den Dateistatus anzuzeigen. **
|
||||
** Tippe G , um Dich zu einer Zeile in der Datei zu begeben. **
|
||||
|
||||
Bemerkung: Lies diese gesamte Lektion, bevor Du irgendeinen Schritt ausführst!!
|
||||
Anmerkung: Lies diese gesamte Lektion, bevor Du irgendeinen Schritt ausführst!!
|
||||
|
||||
1. Halte die Ctrl Taste unten und drücke g . Dies nennen wir wir CTRL-G.
|
||||
1. Halte die Ctrl Taste unten und drücke g . Dies nennen wir CTRL-G.
|
||||
Eine Statusmeldung am Fuß der Seite erscheint mit dem Dateinamen und der
|
||||
Position innerhalb der Datei. Merke Dir die Zeilennummer für Schritt 3.
|
||||
|
||||
Bemerkung: Möglicherweise siehst Du die Cursorposition in der unteren rechten
|
||||
Bildschirmecke. Dies ist Folge der 'ruler' Option (siehe :help 'ruler')
|
||||
Anmerkung: Möglicherweise siehst Du die Cursorposition in der unteren rechten
|
||||
Bildschirmecke. Dies ist Auswirkung der 'ruler' Option
|
||||
(siehe :help 'ruler')
|
||||
|
||||
2. Drücke G , um Dich zum Ende der Datei zu begeben.
|
||||
Tippe gg , um Dich zum Anfang der Datei zu begeben.
|
||||
@@ -510,7 +511,7 @@ Bemerkung: Möglicherweise siehst Du die Cursorposition in der unteren rechten
|
||||
|
||||
** Tippe / gefolgt von einem Ausdruck, um nach dem Ausdruck zu suchen. **
|
||||
|
||||
1. Im Normalmodus, tippe das / Zeichen. Bemerke, dass das / und der
|
||||
1. Im Normalmodus, tippe das / Zeichen. Beachte, dass das / und der
|
||||
Cursor am Fuß des Schirms erscheinen, so wie beim : Kommando.
|
||||
|
||||
2. Nun tippe 'Fehhler' <ENTER>. Dies ist das Wort, nach dem Du suchen willst.
|
||||
@@ -521,32 +522,32 @@ Bemerkung: Möglicherweise siehst Du die Cursorposition in der unteren rechten
|
||||
4. Um nach einem Ausdruck rückwärts zu suchen , benutze ? statt / .
|
||||
|
||||
5. Um dahin zurückzukehren, von wo Du gekommen bist, drücke CTRL-O (Halte
|
||||
Ctrl unten und drücke den Buchstaben o). Wiederhole dies, um weiter
|
||||
zurückzugehen. CTRL-I bringt dich vorwärts.
|
||||
Ctrl unten und drücke den Buchstaben o). Wiederhole dies, um noch weiter
|
||||
zurückzugehen. CTRL-I geht vorwärts.
|
||||
|
||||
---> Fehler schreibt sich nicht "Fehhler"; Fehhler ist ein Fehler
|
||||
Bemerkung: Wenn die Suche das Dateiende erreicht hat, wird sie am Anfang
|
||||
Anmerkung: Wenn die Suche das Dateiende erreicht hat, wird sie am Anfang
|
||||
fortgesetzt, es sei denn, die 'wrapscan' Option wurde abgeschaltet.
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Lektion 4.3: PASSENDE KLAMMERN FINDEN
|
||||
|
||||
|
||||
** Tippe % , um eine korrespondierende Klammer ),], oder } zu finden. **
|
||||
** Tippe % , um eine gegenüberliegenden Klammer ),], oder } zu finden. **
|
||||
|
||||
1. Platziere den Cursor auf irgendeines der Zeichen (, [, oder { in der unten
|
||||
1. Platziere den Cursor auf irgendeinem der Zeichen (, [, oder { in der unten
|
||||
stehenden Zeile, die mit ---> markiert ist.
|
||||
|
||||
2. Nun tippe das % Zeichen.
|
||||
|
||||
3. Der Cursor bewegt sich zur passenden gegenüberliegenden Klammer.
|
||||
|
||||
4. Tippe % , um den Cursor zur anderen passenden Klammer zu bewegen.
|
||||
4. Tippe % , um den Cursor zur passenden anderen Klammer zu bewegen.
|
||||
|
||||
5. Setze den Cursor auf ein anderes (,),[,],{ oder } und probiere % aus.
|
||||
|
||||
---> Dies ( ist eine Testzeile ( mit [ verschiedenen ] { Klammern } darin. ))
|
||||
|
||||
Bemerkung: Diese Funktionalität ist sehr nützlich bei der Fehlersuche in einem
|
||||
Anmerkung: Diese Funktionalität ist sehr nützlich bei der Fehlersuche in einem
|
||||
Programmtext, in dem passende Klammern fehlen!
|
||||
|
||||
|
||||
@@ -558,18 +559,18 @@ Bemerkung: Diese Funktionalität ist sehr nützlich bei der Fehlersuche in einem
|
||||
|
||||
1. Bewege den Cursor zu der unten stehenden mit ---> markierten Zeile.
|
||||
|
||||
2. Tippe :s/diee/die <ENTER> . Bemerke, dass der Befehl nur das erste
|
||||
2. Tippe :s/diee/die <ENTER> . Beachte, dass der Befehl nur das erste
|
||||
Vorkommen von "diee" ersetzt.
|
||||
|
||||
3. Nun tippe :s/diee/die/g . Das Zufügen des Flags g bedeutet, eine
|
||||
globale Ersetzung über die Zeile durchzuführen, was alle Vorkommen von
|
||||
"diee" auf der Zeile ersetzt.
|
||||
globale Ersetzung über die Zeile durchzuführen, dies ersetzt alle
|
||||
Vorkommen von "diee" auf der Zeile.
|
||||
|
||||
---> diee schönste Zeit, um diee Blumen anzuschauen, ist diee Frühlingszeit.
|
||||
|
||||
4. Um alle Vorkommen einer Zeichenkette innerhalb zweier Zeilen zu ändern,
|
||||
tippe :#,#s/alt/neu/g wobei #,# die Zeilennummern des Zeilenbereiches
|
||||
sind, in dem die Ersetzung durchgeführt werden soll.
|
||||
tippe :#,#s/alt/neu/g wobei #,# die Zeilennummern des Bereiches sind,
|
||||
in dem die Ersetzung durchgeführt werden soll.
|
||||
Tippe :%s/alt/neu/g um alle Vorkommen in der gesamten Datei zu ändern.
|
||||
Tippe :%s/alt/neu/gc um alle Vorkommen in der gesamten Datei zu finden
|
||||
mit einem Fragedialog, ob ersetzt werden soll oder nicht.
|
||||
@@ -593,9 +594,9 @@ Bemerkung: Diese Funktionalität ist sehr nützlich bei der Fehlersuche in einem
|
||||
4. Um das erste Vorkommen von "alt" in einer Zeile durch "neu" zu ersetzen,
|
||||
tippe :s/alt/neu
|
||||
Um alle Vorkommen von "alt" in der Zeile ersetzen, tippe :s/alt/neu/g
|
||||
Um Ausdrücke innerhalb zweier Zeilennummern zu ersetzen, :#,#s/alt/neu/g
|
||||
Um Ausdrücke innerhalb zweier Zeilen # zu ersetzen :#,#s/alt/neu/g
|
||||
Um alle Vorkommen in der ganzen Datei zu ersetzen, tippe :%s/alt/neu/g
|
||||
Für eine jedmalige Bestätigung, addiere 'c' (confirm) :%s/alt/neu/gc
|
||||
Für eine jedesmalige Bestätigung, addiere 'c' (confirm) :%s/alt/neu/gc
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Lektion 5.1: AUSFÜHREN EINES EXTERNEN KOMMANDOS
|
||||
|
||||
@@ -608,14 +609,14 @@ Bemerkung: Diese Funktionalität ist sehr nützlich bei der Fehlersuche in einem
|
||||
2. Nun tippe ein ! (Ausrufezeichen). Dies ermöglicht Dir, ein beliebiges,
|
||||
externes Shellkommando auszuführen.
|
||||
|
||||
3. Als Beispiel tippe ls nach dem ! und drücke <ENTER>. Dies zeigt
|
||||
eine Auflistung Deines Verzeichnisses; genauso, als wenn Du auf der
|
||||
3. Als Beispiel tippe ls nach dem ! und drücke <ENTER>. Dies liefert
|
||||
eine Auflistung deines Verzeichnisses; genauso, als wenn Du in der
|
||||
Eingabeaufforderung wärst. Oder verwende :!dir , falls ls nicht geht.
|
||||
|
||||
Bemerkung: Mit dieser Methode kann jedes beliebige externe Kommando
|
||||
Anmerkung: Mit dieser Methode kann jedes beliebige externe Kommando
|
||||
ausgeführt werden, auch mit Argumenten.
|
||||
|
||||
Bemerkung: Alle : Kommandos müssen durch Eingabe von <ENTER>
|
||||
Anmerkung: Alle : Kommandos müssen durch Eingabe von <ENTER>
|
||||
abgeschlossen werden. Von jetzt an erwähnen wir dies nicht jedesmal.
|
||||
|
||||
|
||||
@@ -625,7 +626,7 @@ Bemerkung: Alle : Kommandos müssen durch Eingabe von <ENTER>
|
||||
|
||||
** Um am Text durchgeführte Änderungen zu speichern, tippe :w DATEINAME. **
|
||||
|
||||
1. Tippe :!dir oder :!ls , um eine Auflistung Deines Verzeichnisses zu
|
||||
1. Tippe :!dir oder :!ls , um eine Auflistung deines Verzeichnisses zu
|
||||
erhalten. Du weißt nun bereits, dass Du danach <ENTER> eingeben musst.
|
||||
|
||||
2. Wähle einen Dateinamen, der noch nicht existiert, z.B. TEST.
|
||||
@@ -633,15 +634,15 @@ Bemerkung: Alle : Kommandos müssen durch Eingabe von <ENTER>
|
||||
3. Nun tippe: :w TEST (wobei TEST der gewählte Dateiname ist).
|
||||
|
||||
4. Dies speichert die ganze Datei (den Vim Tutor) unter dem Namen TEST.
|
||||
Um dies zu überprüfen, tippe nochmals :!ls bzw. !dir, um Deinen
|
||||
Um dies zu überprüfen, tippe nochmals :!ls bzw. !dir, um deinen
|
||||
Verzeichnisinhalt zu sehen.
|
||||
|
||||
Bemerkung: Würdest Du Vim jetzt beenden und danach wieder mit vim TEST
|
||||
Anmerkung: Würdest Du Vim jetzt beenden und danach wieder mit vim TEST
|
||||
starten, dann wäre diese Datei eine exakte Kopie des Tutors zu dem
|
||||
Zeitpunkt, als Du ihn gespeichert hast.
|
||||
|
||||
5. Nun entferne die Datei durch Eingabe von (MS-DOS): :!del TEST
|
||||
oder (Unix): :!rm TEST
|
||||
oder (Unix): :!rm TEST
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Lektion 5.3: AUSWÄHLEN VON TEXT ZUM SCHREIBEN
|
||||
|
||||
@@ -650,41 +651,42 @@ Bemerkung: Würdest Du Vim jetzt beenden und danach wieder mit vim TEST
|
||||
1. Bewege den Cursor zu dieser Zeile.
|
||||
|
||||
2. Tippe v und bewege den Cursor zum fünften Auflistungspunkt unten.
|
||||
Bemerke, daß der Text hervorgehoben wird.
|
||||
Beachte, dass der Text hervorgehoben wird.
|
||||
|
||||
3. Drücke das Zeichen : . Am Fuß des Schirms erscheint :'<,'> .
|
||||
|
||||
4. Tippe w TEST , wobei TEST ein noch nicht vorhandener Dateiname ist.
|
||||
Vergewissere Dich, daß Du :'<,'>w TEST siehst, bevor Du Enter drückst.
|
||||
Vergewissere Dich, dass Du :'<,'>w TEST siehst, bevor Du <ENTER> drückst.
|
||||
|
||||
5. Vim schreibt die ausgewählten Zeilen in die Datei TEST. Benutze :!dir
|
||||
oder :!ls , um sie zu sehen. Lösche sie noch nicht! Wir werden sie in
|
||||
der nächsten Lektion benutzen.
|
||||
|
||||
Bemerkung: Drücken von v startet die Visuelle Auswahl. Du kannst den Cursor
|
||||
umherbewegen, um die Auswahl größer oder kleiner zu machen. Anschließend
|
||||
kann man einen Operator anwenden, um mit dem Text etwas zu tun. Zum
|
||||
Beispiel löscht d den Text.
|
||||
Hinweis: Drücken von v startet die Visuelle Auswahl. Du kannst den Cursor
|
||||
umherbewegen, um die Auswahl zu vergrößern oder zu verkleinern. Anschließend
|
||||
lässt sich ein Operator anwenden, um mit dem Text etwas zu tun. Zum Beispiel
|
||||
löscht d den Text.
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Lektion 5.4: EINLESEN UND ZUSAMMENFÜHREN VON DATEIEN
|
||||
|
||||
|
||||
** Um den Inhalt einer Datei einzulesen, tippe :r DATEINAME **
|
||||
|
||||
1. Platziere den Cursor überhalb dieser Zeile.
|
||||
1. Platziere den Cursor direkt über dieser Zeile.
|
||||
|
||||
BEACHTE: Nachdem Du Schritt 2 ausgeführt hast, wirst Du Text aus Lektion 5.3
|
||||
sehen. Dann bewege Dich wieder ABWÄRTS, um diese Lektion wiederzusehen.
|
||||
sehen. Dann bewege Dich wieder ABWÄRTS, Lektion 5.4 wiederzusehen.
|
||||
|
||||
2. Nun lies Deine Datei TEST ein indem Du das Kommando :r TEST ausführst,
|
||||
2. Nun lies deine Datei TEST ein indem Du das Kommando :r TEST ausführst,
|
||||
wobei TEST der von Dir verwendete Dateiname ist.
|
||||
Die eingelesene Datei wird unterhalb der Cursorzeile eingefügt.
|
||||
|
||||
3. Um zu überprüfen, dass die Datei eingelesen wurde, gehe zurück und siehe,
|
||||
dass es jetzt zwei Kopien von Lektion 5.3 gibt, das Original und die
|
||||
eingefügte Dateiversion.
|
||||
3. Um zu überprüfen, dass die Datei eingelesen wurde, gehe zurück und
|
||||
beachte, dass es jetzt zwei Kopien von Lektion 5.3 gibt, das Original und
|
||||
die eingefügte Dateiversion.
|
||||
|
||||
Bemerkung: Du kannst auch die Ausgabe eines externen Kommandos einlesen. Zum
|
||||
Anmerkung: Du kannst auch die Ausgabe eines externen Kommandos einlesen. Zum
|
||||
Beispiel liest :r !ls die Ausgabe des Kommandos ls ein und platziert
|
||||
sie unterhalb des Cursors.
|
||||
|
||||
@@ -720,14 +722,14 @@ Bemerkung: Du kannst auch die Ausgabe eines externen Kommandos einlesen. Zum
|
||||
|
||||
1. Bewege den Cursor zu der ersten mit ---> markierten Zeile unten.
|
||||
|
||||
2. Tippe o (klein geschrieben), um eine Zeile UNTERHALB des Cursos zu öffnen
|
||||
2. Tippe o (klein geschrieben), um eine Zeile UNTERHALB des Cursors zu öffnen
|
||||
und Dich in den Einfügemodus zu begeben.
|
||||
|
||||
3. Nun tippe etwas Text und drücke <ESC> , um den Einfügemodus zu verlassen.
|
||||
|
||||
---> Mit o wird der Cursor auf der offenen Zeile im Einfügemodus platziert.
|
||||
|
||||
4. Um eine Zeile ÜBERHALB des Cursos aufzumachen, gib einfach ein großes O
|
||||
4. Um eine Zeile ÜBERHALB des Cursors aufzumachen, gib einfach ein großes O
|
||||
statt einem kleinen o ein. Versuche dies auf der unten stehenden Zeile.
|
||||
|
||||
---> Öffne eine Zeile über dieser mit O , wenn der Cursor auf dieser Zeile ist.
|
||||
@@ -755,7 +757,7 @@ Bemerkung: Du kannst auch die Ausgabe eines externen Kommandos einlesen. Zum
|
||||
---> Diese Zei bietet Gelegen , Text in einer Zeile anzufü.
|
||||
---> Diese Zeile bietet Gelegenheit, Text in einer Zeile anzufügen.
|
||||
|
||||
Bemerkung: a, i und A gehen alle gleichermaßen in den Einfügemodus; der
|
||||
Anmerkung: a, i und A gehen alle gleichermaßen in den Einfügemodus; der
|
||||
einzige Unterschied ist, wo die Zeichen eingefügt werden.
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Lektion 6.3: EINE ANDERE ART DES ERSETZENS (REPLACE)
|
||||
@@ -767,9 +769,9 @@ Bemerkung: a, i und A gehen alle gleichermaßen in den Einfügemodus; der
|
||||
Bewege den Cursor zum Anfang des ersten xxx .
|
||||
|
||||
2. Nun drücke R und tippe die Nummer, die darunter in der zweiten Zeile
|
||||
steht, so das diese das xxx ersetzt.
|
||||
steht, so dass diese das xxx ersetzt.
|
||||
|
||||
3. Drücke <ESC> , um den Ersetzungsmodus zu verlassen. Bemerke, daß der Rest
|
||||
3. Drücke <ESC> , um den Ersetzungsmodus zu verlassen. Beachte, dass der Rest
|
||||
der Zeile unverändert bleibt.
|
||||
|
||||
4. Wiederhole die Schritte, um das verbliebene xxx zu ersetzen.
|
||||
@@ -777,7 +779,7 @@ Bemerkung: a, i und A gehen alle gleichermaßen in den Einfügemodus; der
|
||||
---> Das Addieren von 123 zu xxx ergibt xxx.
|
||||
---> Das Addieren von 123 zu 456 ergibt 579.
|
||||
|
||||
Bemerkung: Der Ersetzungsmodus ist wie der Einfügemodus, aber jedes eingetippte
|
||||
Anmerkung: Der Ersetzungsmodus ist wie der Einfügemodus, aber jedes eingetippte
|
||||
Zeichen löscht ein vorhandenes Zeichen.
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
@@ -785,7 +787,7 @@ Bemerkung: Der Ersetzungsmodus ist wie der Einfügemodus, aber jedes eingetippte
|
||||
|
||||
** Benutze den y Operator, um Text zu kopieren; p , um ihn einzufügen **
|
||||
|
||||
1. Gehe zu der mit ---> markierten Zeile unten, setze den Cursor hinter "a)".
|
||||
1. Gehe zu der mit ---> markierten Zeile unten; setze den Cursor hinter "a)".
|
||||
|
||||
2. Starte den Visuellen Modus mit v , bewege den Cursor genau vor "erste".
|
||||
|
||||
@@ -802,11 +804,11 @@ Bemerkung: Der Ersetzungsmodus ist wie der Einfügemodus, aber jedes eingetippte
|
||||
---> a) dies ist der erste Eintrag.
|
||||
b)
|
||||
|
||||
Bemerkung: Du kannst y auch als Operator verwenden; yw kopiert ein Wort.
|
||||
Anmerkung: Du kannst y auch als Operator verwenden; yw kopiert ein Wort.
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Lektion 6.5: OPTIONEN SETZEN
|
||||
|
||||
** Setze eine Option so, dass eine Suche oder eine Ersetzung Groß- **
|
||||
** Setze eine Option so, dass eine Suche oder Ersetzung Groß- **
|
||||
** und Kleinschreibung ignoriert **
|
||||
|
||||
1. Suche nach 'ignoriere', indem Du /ignoriere eingibst.
|
||||
@@ -815,7 +817,7 @@ Bemerkung: Du kannst y auch als Operator verwenden; yw kopiert ein Wort.
|
||||
2. Setze die 'ic' (Ignore case) - Option, indem Du :set ic eingibst.
|
||||
|
||||
3. Nun suche wieder nach 'ignoriere', indem Du n tippst.
|
||||
Bemerke, daß jetzt Ignoriere und auch IGNORIERE gefunden wird.
|
||||
Beachte, dass jetzt Ignoriere und auch IGNORIERE gefunden wird.
|
||||
|
||||
4. Setze die 'hlsearch' und 'incsearch' - Optionen: :set hls is
|
||||
|
||||
@@ -823,14 +825,14 @@ Bemerkung: Du kannst y auch als Operator verwenden; yw kopiert ein Wort.
|
||||
|
||||
6. Um das Ignorieren von Groß/Kleinschreibung abzuschalten, tippe: :set noic
|
||||
|
||||
Bemerkung: Um die Hervorhebung der Treffer zu enfernen, gib ein: :nohlsearch
|
||||
Bemerkung: Um die Schreibweise für eine einzige Suche zu ignorieren, benutze
|
||||
\c im Suchausdruck: /ignoriere\c <ENTER>
|
||||
Anmerkung: Um die Hervorhebung der Treffer zu entfernen, gib ein: :nohlsearch
|
||||
Anmerkung: Um die Schreibweise für eine einzige Suche zu ignorieren, benutze \c
|
||||
im Suchausdruck: /ignoriere\c <ENTER>
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
ZUSAMMENFASSUNG VON LEKTION 6
|
||||
|
||||
1. Tippe o , um eine Zeile UNTER dem Cursor zu öffnen und den Einfügemodus
|
||||
zu starten.
|
||||
zu starten
|
||||
Tippe O , um eine Zeile ÜBER dem Cursor zu öffnen.
|
||||
|
||||
2. Tippe a , um Text NACH dem Cursor anzufügen.
|
||||
@@ -876,13 +878,13 @@ Bemerkung: Um die Schreibweise für eine einzige Suche zu ignorieren, benutze
|
||||
Lektion 7.2: ERSTELLE EIN START-SKRIPT
|
||||
|
||||
|
||||
** Aktiviere die eingebauten Funktionalitäten von Vim **
|
||||
** Aktiviere die Features von Vim **
|
||||
|
||||
Vim besitzt viele Funktionalitäten, die über Vi hinausgehen, aber die meisten
|
||||
von ihnen sind standardmäßig deaktiviert. Um mehr Funktionalitäten zu nutzen,
|
||||
musst Du eine "vimrc" - Datei erstellen.
|
||||
|
||||
1. Starte das Editieren der "vimrc"-Datei, abhängig von Deinem System:
|
||||
1. Starte das Editieren der "vimrc"-Datei, abhängig von deinem System:
|
||||
:e ~/.vimrc für Unix
|
||||
:e $VIM/_vimrc für MS-Windows
|
||||
|
||||
@@ -893,33 +895,33 @@ Bemerkung: Um die Schreibweise für eine einzige Suche zu ignorieren, benutze
|
||||
:w
|
||||
|
||||
Beim nächsten Start von Vim wird die Syntaxhervorhebung aktiviert sein.
|
||||
Du kannst all Deine bevorzugten Optionen zu dieser "vimrc"-Datei zufügen.
|
||||
Du kannst all deine bevorzugten Optionen zu dieser "vimrc"-Datei zufügen.
|
||||
Für mehr Informationen tippe :help vimrc-intro
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Lektion 7.3: VERVOLLSTÄNDIGEN
|
||||
|
||||
|
||||
** Kommandozeilenvervollständigung mit CTRL-D and <TAB> **
|
||||
** Kommandozeilenvervollständigung mit CTRL-D und <TAB> **
|
||||
|
||||
1. Stelle sicher, daß Vim nicht im vi-Kompatibilitätsmodus ist: :set nocp
|
||||
1. Stelle sicher, dass Vim nicht im Vi-Kompatibilitätsmodus ist: :set nocp
|
||||
|
||||
2. Siehe nach, welche Dateien im Verzeichnis existieren: :!ls oder :dir
|
||||
|
||||
3. Tippe den Beginn eines Komandos: :e
|
||||
3. Tippe den Beginn eines Kommandos: :e
|
||||
|
||||
4. Drücke CTRL-D und Vim zeigt eine Liste mit "e" beginnender Kommandos.
|
||||
|
||||
5. Drücke <TAB> und Vim vervollständigt den Kommandonamen zu ":edit".
|
||||
|
||||
6. Nun füge ein Leerzeichen und den Beginn einer existierenden Datei an:
|
||||
6. Nun füge ein Leerzeichen und den Anfang einer existierenden Datei an:
|
||||
:edit DAT
|
||||
|
||||
7. Drücke <TAB>. Vim vervollständigt den Namen (falls er eindeutig ist).
|
||||
|
||||
Bemerkung: Vervollständigung funktioniert für viele Kommandos. Versuche
|
||||
Anmerkung: Vervollständigung funktioniert für viele Kommandos. Probiere
|
||||
einfach CTRL-D und <TAB>. Dies ist insbesondere nützlich für :help .
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
ZUSAMMENFASSUNG VON LEKTION 7
|
||||
ZUSAMMENFASSUNG VON LEKTION 7
|
||||
|
||||
|
||||
1. Tippe :help oder drücke <F1> oder <Help>, um ein Hilfefenster zu öffnen.
|
||||
@@ -930,11 +932,11 @@ Bemerkung: Vervollständigung funktioniert für viele Kommandos. Versuche
|
||||
|
||||
4. Tippe :q , um das Hilfefenster zu schließen.
|
||||
|
||||
5. Erstelle ein vimrc - Startskript zur Sicherung bevorzugter Einstellungen.
|
||||
5. Erstelle ein vimrc - Startskript mit deinen bevorzugter Einstellungen.
|
||||
|
||||
6. Drücke CTRL-D nach dem Tippen eines Kommandos : , um mögliche
|
||||
Vervollständigungen zu sehen.
|
||||
Drücke <TAB> für eine einzige Vervollständigung.
|
||||
6. Drücke CTRL-D nach dem Tippen eines : Kommandos, um mögliche
|
||||
Vervollständigungen anzusehen.
|
||||
Drücke <TAB> , um eine Vervollständigung zu anzuwenden.
|
||||
|
||||
|
||||
|
||||
@@ -943,13 +945,13 @@ Bemerkung: Vervollständigung funktioniert für viele Kommandos. Versuche
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Damit ist der Vim Tutor beendet. Die Intention war, einen kurzen und
|
||||
bündigen Überblick über den Vim Editor zu liefern; gerade genug, um relativ
|
||||
Damit ist der Vim Tutor beendet. Seine Intention war, einen kurzen und
|
||||
bündigen Überblick über den Vim Editor zu geben; gerade genug, um relativ
|
||||
leicht mit ihm umgehen zu können. Der Vim Tutor hat nicht den geringsten
|
||||
Anspruch auf Vollständigkeit; Vim hat noch weitaus mehr Kommandos. Lies als
|
||||
nächstes das User Manual: ":help user-manual".
|
||||
|
||||
Für weiteres Lesen und Lernen ist folgendes Buch empfohlen :
|
||||
Für weiteres Lesen und Lernen ist folgendes Buch empfehlenswert :
|
||||
Vim - Vi Improved - von Steve Oualline
|
||||
Verlag: New Riders
|
||||
Das erste Buch, welches durchgängig Vim gewidmet ist. Besonders nützlich
|
||||
@@ -957,7 +959,7 @@ Bemerkung: Vervollständigung funktioniert für viele Kommandos. Versuche
|
||||
Siehe http://iccf-holland.org/click5.html
|
||||
|
||||
Folgendes Buch ist älter und mehr über Vi als Vim, aber auch empfehlenswert:
|
||||
Textbearbeitung mit dem vi-Editor - von Linda Lamb und Arnold Robbins
|
||||
Textbearbeitung mit dem Vi-Editor - von Linda Lamb und Arnold Robbins
|
||||
Verlag O'Reilly - ISBN: 3897211262
|
||||
In diesem Buch kann man fast alles finden, was man mit Vi tun möchte.
|
||||
Die sechste Ausgabe enthält auch Informationen über Vim.
|
||||
@@ -970,11 +972,11 @@ Bemerkung: Vervollständigung funktioniert für viele Kommandos. Versuche
|
||||
für Einsteiger empfehlenswert. Probekapitel und die Beispielskripte sind
|
||||
online erhältlich. Siehe http://iccf-holland.org/click5.html
|
||||
|
||||
Dieses Tutorial wurde geschrieben von Michael C. Pierce and Robert K. Ware,
|
||||
Dieses Tutorial wurde geschrieben von Michael C. Pierce und Robert K. Ware,
|
||||
Colorado School of Mines. Es benutzt Ideen, die Charles Smith, Colorado State
|
||||
University, zur Verfügung stellte. E-mail: bware@mines.colorado.edu.
|
||||
University, zur Verfügung stellte. E-Mail: bware@mines.colorado.edu.
|
||||
|
||||
Bearbeitet für Vim von Bram Moolenaar.
|
||||
Deutsche Übersetzung von Joachim Hofmann 2007. E-mail: Joachim.Hof@gmx.de
|
||||
Deutsche Übersetzung von Joachim Hofmann 2015. E-Mail: Joachim.Hof@gmx.de
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" An example for a vimrc file.
|
||||
"
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last change: 2014 Nov 05
|
||||
" Last change: 2015 Mar 24
|
||||
"
|
||||
" To use it, copy it to
|
||||
" for Unix and OS/2: ~/.vimrc
|
||||
@@ -73,10 +73,8 @@ if has("autocmd")
|
||||
" When editing a file, always jump to the last known cursor position.
|
||||
" Don't do it when the position is invalid or when inside an event handler
|
||||
" (happens when dropping a file on gvim).
|
||||
" Also don't do it when the mark is in the first line, that is the default
|
||||
" position when opening a file.
|
||||
autocmd BufReadPost *
|
||||
\ if line("'\"") > 1 && line("'\"") <= line("$") |
|
||||
\ if line("'\"") >= 1 && line("'\"") <= line("$") |
|
||||
\ exe "normal! g`\"" |
|
||||
\ endif
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@ CXX := $(CROSS_COMPILE)g++
|
||||
WINDRES := $(CROSS_COMPILE)windres
|
||||
WINDRES_CXX = $(CXX)
|
||||
WINDRES_FLAGS = --preprocessor="$(WINDRES_CXX) -E -xc" -DRC_INVOKED
|
||||
LIBS := -luuid
|
||||
LIBS := -luuid -lgdi32
|
||||
RES := gvimext.res
|
||||
DEFFILE = gvimext_ming.def
|
||||
OBJ := gvimext.o
|
||||
|
||||
@@ -4,7 +4,9 @@
|
||||
#
|
||||
|
||||
TARGETOS=BOTH
|
||||
APPVER=4.0
|
||||
!ifndef APPVER
|
||||
APPVER=5.0
|
||||
!endif
|
||||
|
||||
!if "$(DEBUG)" != "yes"
|
||||
NODEBUG = 1
|
||||
|
||||
@@ -79,19 +79,24 @@ getGvimName(char *name, int runtime)
|
||||
strcpy(name, searchpath((char *)"gvim.bat"));
|
||||
if (name[0] == 0)
|
||||
strcpy(name, "gvim"); // finds gvim.bat or gvim.exe
|
||||
|
||||
// avoid that Vim tries to expand wildcards in the file names
|
||||
strcat(name, " --literal");
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
getGvimNameW(wchar_t *nameW)
|
||||
getGvimInvocation(char *name, int runtime)
|
||||
{
|
||||
getGvimName(name, runtime);
|
||||
// avoid that Vim tries to expand wildcards in the file names
|
||||
strcat(name, " --literal");
|
||||
}
|
||||
|
||||
static void
|
||||
getGvimInvocationW(wchar_t *nameW)
|
||||
{
|
||||
char *name;
|
||||
|
||||
name = (char *)malloc(BUFSIZE);
|
||||
getGvimName(name, 0);
|
||||
getGvimInvocation(name, 0);
|
||||
mbstowcs(nameW, name, BUFSIZE);
|
||||
free(name);
|
||||
}
|
||||
@@ -123,6 +128,26 @@ getRuntimeDir(char *buf)
|
||||
}
|
||||
}
|
||||
|
||||
HBITMAP IconToBitmap(HICON hIcon, HBRUSH hBackground, int width, int height)
|
||||
{
|
||||
HDC hDC = GetDC(NULL);
|
||||
HDC hMemDC = CreateCompatibleDC(hDC);
|
||||
HBITMAP hMemBmp = CreateCompatibleBitmap(hDC, width, height);
|
||||
HBITMAP hResultBmp = NULL;
|
||||
HGDIOBJ hOrgBMP = SelectObject(hMemDC, hMemBmp);
|
||||
|
||||
DrawIconEx(hMemDC, 0, 0, hIcon, width, height, 0, hBackground, DI_NORMAL);
|
||||
|
||||
hResultBmp = hMemBmp;
|
||||
hMemBmp = NULL;
|
||||
|
||||
SelectObject(hMemDC, hOrgBMP);
|
||||
DeleteDC(hMemDC);
|
||||
ReleaseDC(NULL, hDC);
|
||||
DestroyIcon(hIcon);
|
||||
return hResultBmp;
|
||||
}
|
||||
|
||||
//
|
||||
// GETTEXT: translated messages and menu entries
|
||||
//
|
||||
@@ -404,7 +429,7 @@ STDMETHODIMP CShellExtClassFactory::QueryInterface(REFIID riid,
|
||||
{
|
||||
*ppv = NULL;
|
||||
|
||||
// Any interface on this object is the object pointer
|
||||
// any interface on this object is the object pointer
|
||||
|
||||
if (IsEqualIID(riid, IID_IUnknown) || IsEqualIID(riid, IID_IClassFactory))
|
||||
{
|
||||
@@ -448,7 +473,7 @@ STDMETHODIMP CShellExtClassFactory::CreateInstance(LPUNKNOWN pUnkOuter,
|
||||
// QueryInterface with IID_IShellExtInit--this is how shell extensions are
|
||||
// initialized.
|
||||
|
||||
LPCSHELLEXT pShellExt = new CShellExt(); //Create the CShellExt object
|
||||
LPCSHELLEXT pShellExt = new CShellExt(); // create the CShellExt object
|
||||
|
||||
if (NULL == pShellExt)
|
||||
return E_OUTOFMEMORY;
|
||||
@@ -469,6 +494,8 @@ CShellExt::CShellExt()
|
||||
m_pDataObj = NULL;
|
||||
|
||||
inc_cRefThisDLL();
|
||||
|
||||
LoadMenuIcon();
|
||||
}
|
||||
|
||||
CShellExt::~CShellExt()
|
||||
@@ -477,6 +504,9 @@ CShellExt::~CShellExt()
|
||||
m_pDataObj->Release();
|
||||
|
||||
dec_cRefThisDLL();
|
||||
|
||||
if (m_hVimIconBitmap)
|
||||
DeleteObject(m_hVimIconBitmap);
|
||||
}
|
||||
|
||||
STDMETHODIMP CShellExt::QueryInterface(REFIID riid, LPVOID FAR *ppv)
|
||||
@@ -597,6 +627,7 @@ STDMETHODIMP CShellExt::QueryContextMenu(HMENU hMenu,
|
||||
|
||||
HKEY keyhandle;
|
||||
bool showExisting = true;
|
||||
bool showIcons = true;
|
||||
|
||||
// Check whether "Edit with existing Vim" entries are disabled.
|
||||
if (RegOpenKeyEx(HKEY_LOCAL_MACHINE, "Software\\Vim\\Gvim", 0,
|
||||
@@ -605,6 +636,9 @@ STDMETHODIMP CShellExt::QueryContextMenu(HMENU hMenu,
|
||||
if (RegQueryValueEx(keyhandle, "DisableEditWithExisting", 0, NULL,
|
||||
NULL, NULL) == ERROR_SUCCESS)
|
||||
showExisting = false;
|
||||
if (RegQueryValueEx(keyhandle, "DisableContextMenuIcons", 0, NULL,
|
||||
NULL, NULL) == ERROR_SUCCESS)
|
||||
showIcons = false;
|
||||
RegCloseKey(keyhandle);
|
||||
}
|
||||
|
||||
@@ -612,28 +646,33 @@ STDMETHODIMP CShellExt::QueryContextMenu(HMENU hMenu,
|
||||
if (showExisting)
|
||||
EnumWindows(EnumWindowsProc, (LPARAM)this);
|
||||
|
||||
MENUITEMINFO mii = { sizeof(MENUITEMINFO) };
|
||||
mii.fMask = MIIM_STRING | MIIM_ID;
|
||||
if (showIcons)
|
||||
{
|
||||
mii.fMask |= MIIM_BITMAP;
|
||||
mii.hbmpItem = m_hVimIconBitmap;
|
||||
}
|
||||
|
||||
if (cbFiles > 1)
|
||||
{
|
||||
InsertMenu(hMenu,
|
||||
indexMenu++,
|
||||
MF_STRING|MF_BYPOSITION,
|
||||
idCmd++,
|
||||
_("Edit with &multiple Vims"));
|
||||
mii.wID = idCmd++;
|
||||
mii.dwTypeData = _("Edit with &multiple Vims");
|
||||
mii.cch = lstrlen(mii.dwTypeData);
|
||||
InsertMenuItem(hMenu, indexMenu++, TRUE, &mii);
|
||||
|
||||
InsertMenu(hMenu,
|
||||
indexMenu++,
|
||||
MF_STRING|MF_BYPOSITION,
|
||||
idCmd++,
|
||||
_("Edit with single &Vim"));
|
||||
mii.wID = idCmd++;
|
||||
mii.dwTypeData = _("Edit with single &Vim");
|
||||
mii.cch = lstrlen(mii.dwTypeData);
|
||||
InsertMenuItem(hMenu, indexMenu++, TRUE, &mii);
|
||||
|
||||
if (cbFiles <= 4)
|
||||
{
|
||||
// Can edit up to 4 files in diff mode
|
||||
InsertMenu(hMenu,
|
||||
indexMenu++,
|
||||
MF_STRING|MF_BYPOSITION,
|
||||
idCmd++,
|
||||
_("Diff with Vim"));
|
||||
mii.wID = idCmd++;
|
||||
mii.dwTypeData = _("Diff with Vim");
|
||||
mii.cch = lstrlen(mii.dwTypeData);
|
||||
InsertMenuItem(hMenu, indexMenu++, TRUE, &mii);
|
||||
m_edit_existing_off = 3;
|
||||
}
|
||||
else
|
||||
@@ -642,11 +681,10 @@ STDMETHODIMP CShellExt::QueryContextMenu(HMENU hMenu,
|
||||
}
|
||||
else
|
||||
{
|
||||
InsertMenu(hMenu,
|
||||
indexMenu++,
|
||||
MF_STRING|MF_BYPOSITION,
|
||||
idCmd++,
|
||||
_("Edit with &Vim"));
|
||||
mii.wID = idCmd++;
|
||||
mii.dwTypeData = _("Edit with &Vim");
|
||||
mii.cch = lstrlen(mii.dwTypeData);
|
||||
InsertMenuItem(hMenu, indexMenu++, TRUE, &mii);
|
||||
m_edit_existing_off = 1;
|
||||
}
|
||||
|
||||
@@ -672,11 +710,11 @@ STDMETHODIMP CShellExt::QueryContextMenu(HMENU hMenu,
|
||||
temp[BUFSIZE - 1] = '\0';
|
||||
strncat(temp, title, BUFSIZE - 1 - strlen(temp));
|
||||
temp[BUFSIZE - 1] = '\0';
|
||||
InsertMenu(hMenu,
|
||||
indexMenu++,
|
||||
MF_STRING|MF_BYPOSITION,
|
||||
idCmd++,
|
||||
temp);
|
||||
|
||||
mii.wID = idCmd++;
|
||||
mii.dwTypeData = temp;
|
||||
mii.cch = lstrlen(mii.dwTypeData);
|
||||
InsertMenuItem(hMenu, indexMenu++, TRUE, &mii);
|
||||
}
|
||||
// InsertMenu(hMenu, indexMenu++, MF_SEPARATOR|MF_BYPOSITION, 0, NULL);
|
||||
|
||||
@@ -813,6 +851,22 @@ BOOL CALLBACK CShellExt::EnumWindowsProc(HWND hWnd, LPARAM lParam)
|
||||
return TRUE; // continue enumeration (otherwise this would be false)
|
||||
}
|
||||
|
||||
BOOL CShellExt::LoadMenuIcon()
|
||||
{
|
||||
char vimExeFile[BUFSIZE];
|
||||
getGvimName(vimExeFile, 1);
|
||||
if (vimExeFile[0] == '\0')
|
||||
return FALSE;
|
||||
HICON hVimIcon;
|
||||
if (ExtractIconEx(vimExeFile, 0, NULL, &hVimIcon, 1) == 0)
|
||||
return FALSE;
|
||||
m_hVimIconBitmap = IconToBitmap(hVimIcon,
|
||||
GetSysColorBrush(COLOR_MENU),
|
||||
GetSystemMetrics(SM_CXSMICON),
|
||||
GetSystemMetrics(SM_CYSMICON));
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
#ifdef WIN32
|
||||
// This symbol is not defined in older versions of the SDK or Visual C++.
|
||||
|
||||
@@ -893,7 +947,7 @@ STDMETHODIMP CShellExt::InvokeGvim(HWND hParent,
|
||||
m_szFileUserClickedOn,
|
||||
sizeof(m_szFileUserClickedOn));
|
||||
|
||||
getGvimNameW(cmdStrW);
|
||||
getGvimInvocationW(cmdStrW);
|
||||
wcscat(cmdStrW, L" \"");
|
||||
|
||||
if ((wcslen(cmdStrW) + wcslen(m_szFileUserClickedOn) + 2) < BUFSIZE)
|
||||
@@ -961,7 +1015,7 @@ STDMETHODIMP CShellExt::InvokeSingleGvim(HWND hParent,
|
||||
|
||||
cmdlen = BUFSIZE;
|
||||
cmdStrW = (wchar_t *) malloc(cmdlen * sizeof(wchar_t));
|
||||
getGvimNameW(cmdStrW);
|
||||
getGvimInvocationW(cmdStrW);
|
||||
|
||||
if (useDiff)
|
||||
wcscat(cmdStrW, L" -d");
|
||||
|
||||
@@ -110,10 +110,14 @@ typedef CShellExtClassFactory *LPCSHELLEXTCLASSFACTORY;
|
||||
class CShellExt : public IContextMenu,
|
||||
IShellExtInit
|
||||
{
|
||||
private:
|
||||
BOOL LoadMenuIcon();
|
||||
|
||||
protected:
|
||||
ULONG m_cRef;
|
||||
LPDATAOBJECT m_pDataObj;
|
||||
UINT m_edit_existing_off;
|
||||
HBITMAP m_hVimIconBitmap;
|
||||
|
||||
// For some reason, this callback must be static
|
||||
static BOOL CALLBACK EnumWindowsProc(HWND hWnd, LPARAM lParam);
|
||||
|
||||
@@ -397,7 +397,7 @@ endif
|
||||
endif
|
||||
|
||||
ifdef PERL
|
||||
CFLAGS += -I$(PERLLIBS) -DFEAT_PERL
|
||||
CFLAGS += -I$(PERLLIBS) -DFEAT_PERL -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS
|
||||
ifeq (yes, $(DYNAMIC_PERL))
|
||||
CFLAGS += -DDYNAMIC_PERL -DDYNAMIC_PERL_DLL=\"perl$(PERL_VER).dll\"
|
||||
EXTRA_LIBS += -L$(PERLLIBS) -lperl$(PERL_VER)
|
||||
|
||||
@@ -343,7 +343,7 @@ XPM_INC = -I $(XPM)\include -I $(XPM)\..\include
|
||||
# gdi32.lib and comdlg32.lib for printing support
|
||||
# ole32.lib and uuid.lib are needed for FEAT_SHORTCUT
|
||||
CON_LIB = oldnames.lib kernel32.lib advapi32.lib shell32.lib gdi32.lib \
|
||||
comdlg32.lib ole32.lib uuid.lib /machine:$(CPU) /nodefaultlib
|
||||
comdlg32.lib ole32.lib uuid.lib /machine:$(CPU)
|
||||
!if "$(DELAYLOAD)" == "yes"
|
||||
CON_LIB = $(CON_LIB) /DELAYLOAD:comdlg32.dll /DELAYLOAD:ole32.dll DelayImp.lib
|
||||
!endif
|
||||
@@ -446,6 +446,9 @@ MSVCVER = 11.0
|
||||
!if "$(_NMAKE_VER)" == "12.00.21005.1"
|
||||
MSVCVER = 12.0
|
||||
!endif
|
||||
!if ("$(_NMAKE_VER)" == "14.00.22609.0") || ("$(_NMAKE_VER)" == "14.00.22816.0")
|
||||
MSVCVER = 14.0
|
||||
!endif
|
||||
!endif
|
||||
|
||||
# Abort building VIM if version of VC is unrecognised.
|
||||
@@ -460,7 +463,7 @@ MSVCVER = 12.0
|
||||
!endif
|
||||
|
||||
# Convert processor ID to MVC-compatible number
|
||||
!if ("$(MSVCVER)" != "8.0") && ("$(MSVCVER)" != "9.0") && ("$(MSVCVER)" != "10.0") && ("$(MSVCVER)" != "11.0") && ("$(MSVCVER)" != "12.0")
|
||||
!if ("$(MSVCVER)" != "8.0") && ("$(MSVCVER)" != "9.0") && ("$(MSVCVER)" != "10.0") && ("$(MSVCVER)" != "11.0") && ("$(MSVCVER)" != "12.0") && ("$(MSVCVER)" != "14.0")
|
||||
!if "$(CPUNR)" == "i386"
|
||||
CPUARG = /G3
|
||||
!elseif "$(CPUNR)" == "i486"
|
||||
@@ -484,6 +487,13 @@ CPUARG = /arch:SSE2
|
||||
LIBC =
|
||||
DEBUGINFO = /Zi
|
||||
|
||||
# Don't use /nodefaultlib on MSVC 14
|
||||
!if "$(MSVCVER)" == "14.0"
|
||||
NODEFAULTLIB =
|
||||
!else
|
||||
NODEFAULTLIB = /nodefaultlib
|
||||
!endif
|
||||
|
||||
!ifdef NODEBUG
|
||||
VIM = vim
|
||||
!if "$(OPTIMIZE)" == "SPACE"
|
||||
@@ -655,7 +665,7 @@ GUI_OBJ = \
|
||||
GUI_LIB = \
|
||||
gdi32.lib version.lib $(IME_LIB) \
|
||||
winspool.lib comctl32.lib advapi32.lib shell32.lib \
|
||||
/machine:$(CPU) /nodefaultlib
|
||||
/machine:$(CPU)
|
||||
!else
|
||||
SUBSYSTEM = console
|
||||
!endif
|
||||
@@ -787,7 +797,8 @@ MZSCHEME_VER = 205_000
|
||||
!endif
|
||||
CFLAGS = $(CFLAGS) -DFEAT_MZSCHEME -I $(MZSCHEME)\include
|
||||
!if EXIST("$(MZSCHEME)\collects\scheme\base.ss") \
|
||||
|| EXIST("$(MZSCHEME)\collects\scheme\base.rkt")
|
||||
|| EXIST("$(MZSCHEME)\collects\scheme\base.rkt") \
|
||||
|| EXIST("$(MZSCHEME)\collects\racket\base.rkt")
|
||||
# for MzScheme >= 4 we need to include byte code for basic Scheme stuff
|
||||
MZSCHEME_EXTRA_DEP = mzscheme_base.c
|
||||
CFLAGS = $(CFLAGS) -DINCLUDE_MZSCHEME_BASE
|
||||
@@ -864,7 +875,7 @@ PERL_LIB = $(PERL_INCDIR)\libperl$(PERL_VER).a
|
||||
!endif
|
||||
!endif
|
||||
|
||||
CFLAGS = $(CFLAGS) -DFEAT_PERL
|
||||
CFLAGS = $(CFLAGS) -DFEAT_PERL -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS
|
||||
|
||||
# Do we want to load Perl dynamically?
|
||||
!if "$(DYNAMIC_PERL)" == "yes"
|
||||
@@ -976,7 +987,7 @@ conflags = $(conflags) /map /mapinfo:lines
|
||||
!ENDIF
|
||||
|
||||
LINKARGS1 = $(linkdebug) $(conflags)
|
||||
LINKARGS2 = $(CON_LIB) $(GUI_LIB) $(LIBC) $(OLE_LIB) user32.lib $(SNIFF_LIB) \
|
||||
LINKARGS2 = $(CON_LIB) $(GUI_LIB) $(NODEFAULTLIB) $(LIBC) $(OLE_LIB) user32.lib $(SNIFF_LIB) \
|
||||
$(LUA_LIB) $(MZSCHEME_LIB) $(PERL_LIB) $(PYTHON_LIB) $(PYTHON3_LIB) $(RUBY_LIB) \
|
||||
$(TCL_LIB) $(NETBEANS_LIB) $(XPM_LIB) $(LINK_PDB)
|
||||
|
||||
@@ -1160,7 +1171,11 @@ $(OUTDIR)/if_mzsch.obj: $(OUTDIR) if_mzsch.c if_mzsch.h $(INCL) $(MZSCHEME_EXTRA
|
||||
$(CC) $(CFLAGS) if_mzsch.c \
|
||||
-DMZSCHEME_COLLECTS=\"$(MZSCHEME:\=\\)\\collects\"
|
||||
mzscheme_base.c:
|
||||
!IF "$(MZSCHEME_MAIN_LIB)" == "racket"
|
||||
$(MZSCHEME)\raco ctool --c-mods mzscheme_base.c ++lib scheme/base
|
||||
!ELSE
|
||||
$(MZSCHEME)\mzc --c-mods mzscheme_base.c ++lib scheme/base
|
||||
!ENDIF
|
||||
|
||||
$(OUTDIR)/if_python.obj: $(OUTDIR) if_python.c if_py_both.h $(INCL)
|
||||
$(CC) $(CFLAGS) $(PYTHON_INC) if_python.c
|
||||
|
||||
20
src/Makefile
20
src/Makefile
@@ -616,6 +616,14 @@ LINT_OPTIONS = -beprxzF
|
||||
#PROFILE_LIBS = -pg
|
||||
#PROFILE_LIBS = -pg -lc
|
||||
|
||||
# Uncomment one of the next two lines to compile Vim with the
|
||||
# address sanitizer or with the undefined sanitizer. Works with gcc and
|
||||
# clang. May make Vim twice as slow. Errors reported on stderr.
|
||||
# More at: https://code.google.com/p/address-sanitizer/
|
||||
#SANITIZER_CFLAGS = -g -O0 -fsanitize=address -fno-omit-frame-pointer
|
||||
#SANITIZER_CFLAGS = -g -O0 -fsanitize=undefined -fno-omit-frame-pointer
|
||||
SANITIZER_LIBS = $(SANITIZER_CFLAGS)
|
||||
|
||||
# MEMORY LEAK DETECTION
|
||||
# Requires installing the ccmalloc library.
|
||||
# Configuration is in the .ccmalloc or ~/.ccmalloc file.
|
||||
@@ -1342,7 +1350,7 @@ SHELL = /bin/sh
|
||||
PRE_DEFS = -Iproto $(DEFS) $(GUI_DEFS) $(GUI_IPATH) $(CPPFLAGS) $(EXTRA_IPATHS)
|
||||
POST_DEFS = $(X_CFLAGS) $(MZSCHEME_CFLAGS) $(TCL_CFLAGS) $(EXTRA_DEFS)
|
||||
|
||||
ALL_CFLAGS = $(PRE_DEFS) $(CFLAGS) $(PROFILE_CFLAGS) $(LEAK_CFLAGS) $(POST_DEFS)
|
||||
ALL_CFLAGS = $(PRE_DEFS) $(CFLAGS) $(PROFILE_CFLAGS) $(SANITIZER_CFLAGS) $(LEAK_CFLAGS) $(POST_DEFS)
|
||||
|
||||
# Exclude $CFLAGS for osdef.sh, for Mac 10.4 some flags don't work together
|
||||
# with "-E".
|
||||
@@ -1374,6 +1382,7 @@ ALL_LIBS = \
|
||||
$(TCL_LIBS) \
|
||||
$(RUBY_LIBS) \
|
||||
$(PROFILE_LIBS) \
|
||||
$(SANITIZER_LIBS) \
|
||||
$(LEAK_LIBS)
|
||||
|
||||
# abbreviations
|
||||
@@ -1891,20 +1900,29 @@ unittest unittests: $(UNITTEST_TARGETS)
|
||||
|
||||
# Run individual test, assuming that Vim was already compiled.
|
||||
test1 \
|
||||
test_argument_0count \
|
||||
test_argument_count \
|
||||
test_autoformat_join \
|
||||
test_breakindent \
|
||||
test_changelist \
|
||||
test_close_count \
|
||||
test_command_count \
|
||||
test_erasebackword \
|
||||
test_eval \
|
||||
test_insertcount \
|
||||
test_listchars \
|
||||
test_listlbr \
|
||||
test_listlbr_utf8 \
|
||||
test_mapping \
|
||||
test_marks \
|
||||
test_nested_function \
|
||||
test_options \
|
||||
test_perl \
|
||||
test_qf_title \
|
||||
test_ruby \
|
||||
test_set \
|
||||
test_signs \
|
||||
test_textobjects \
|
||||
test_utf8 \
|
||||
test_writefile \
|
||||
test2 test3 test4 test5 test6 test7 test8 test9 \
|
||||
|
||||
16
src/ascii.h
16
src/ascii.h
@@ -34,10 +34,6 @@
|
||||
#define ESC_STR_nc "\033"
|
||||
#define DEL 0x7f
|
||||
#define DEL_STR (char_u *)"\177"
|
||||
#define CSI 0x9b /* Control Sequence Introducer */
|
||||
#define CSI_STR "\233"
|
||||
#define DCS 0x90 /* Device Control String */
|
||||
#define STERM 0x9c /* String Terminator */
|
||||
|
||||
#define POUND 0xA3
|
||||
|
||||
@@ -117,11 +113,6 @@
|
||||
#define ESC_STR_nc "\x27"
|
||||
#define DEL 0x07
|
||||
#define DEL_STR (char_u *)"\007"
|
||||
/* TODO: EBCDIC Code page dependent (here 1047) */
|
||||
#define CSI 0x9b /* Control Sequence Introducer */
|
||||
#define CSI_STR "\233"
|
||||
#define DCS 0x90 /* Device Control String */
|
||||
#define STERM 0x9c /* String Terminator */
|
||||
|
||||
#define POUND 0xB1
|
||||
|
||||
@@ -173,6 +164,13 @@ extern char MetaCharTable[];
|
||||
|
||||
#endif /* defined EBCDIC */
|
||||
|
||||
/* TODO: EBCDIC Code page dependent (here 1047) */
|
||||
#define CSI 0x9b /* Control Sequence Introducer */
|
||||
#define CSI_STR "\233"
|
||||
#define DCS 0x90 /* Device Control String */
|
||||
#define OSC 0x9d /* Operating System Command */
|
||||
#define STERM 0x9c /* String Terminator */
|
||||
|
||||
/*
|
||||
* Character that separates dir names in a path.
|
||||
* For MS-DOS, WIN32 and OS/2 we use a backslash. A slash mostly works
|
||||
|
||||
34
src/auto/configure
vendored
34
src/auto/configure
vendored
@@ -5613,8 +5613,9 @@ $as_echo "OK" >&6; }
|
||||
fi
|
||||
done
|
||||
|
||||
perlcppflags=`$vi_cv_path_perl -Mlib=$srcdir -MExtUtils::Embed \
|
||||
-e 'ccflags;perl_inc;print"\n"' | sed -e 's/-fno[^ ]*//'`
|
||||
perlcppflags=`$vi_cv_path_perl -Mlib=$srcdir -MExtUtils::Embed \
|
||||
-e 'ccflags;perl_inc;print"\n"' | sed -e 's/-fno[^ ]*//' \
|
||||
-e 's/-fdebug-prefix-map[^ ]*//g'`
|
||||
perllibs=`cd $srcdir; $vi_cv_path_perl -MExtUtils::Embed -e 'ldopts' | \
|
||||
sed -e '/Warning/d' -e '/Note (probably harmless)/d' \
|
||||
-e 's/-bE:perl.exp//' -e 's/-lc //'`
|
||||
@@ -5888,17 +5889,34 @@ __:
|
||||
@echo "python_LINKFORSHARED='$(LINKFORSHARED)'"
|
||||
@echo "python_DLLLIBRARY='$(DLLLIBRARY)'"
|
||||
@echo "python_INSTSONAME='$(INSTSONAME)'"
|
||||
@echo "python_PYTHONFRAMEWORK='$(PYTHONFRAMEWORK)'"
|
||||
@echo "python_PYTHONFRAMEWORKPREFIX='$(PYTHONFRAMEWORKPREFIX)'"
|
||||
@echo "python_PYTHONFRAMEWORKINSTALLDIR='$(PYTHONFRAMEWORKINSTALLDIR)'"
|
||||
eof
|
||||
eval "`cd ${PYTHON_CONFDIR} && make -f "${tmp_mkf}" __ | sed '/ directory /d'`"
|
||||
rm -f -- "${tmp_mkf}"
|
||||
if test "x$MACOSX" = "xyes" && ${vi_cv_path_python} -c \
|
||||
"import sys; sys.exit(${vi_cv_var_python_version} < 2.3)"; then
|
||||
vi_cv_path_python_plibs="-framework Python"
|
||||
if test "x${vi_cv_path_python}" != "x/usr/bin/python" && test -n "${python_PYTHONFRAMEWORKPREFIX}"; then
|
||||
vi_cv_path_python_plibs="-F${python_PYTHONFRAMEWORKPREFIX} -framework Python"
|
||||
fi
|
||||
else
|
||||
if test "${vi_cv_var_python_version}" = "1.4"; then
|
||||
vi_cv_path_python_plibs="${PYTHON_CONFDIR}/libModules.a ${PYTHON_CONFDIR}/libPython.a ${PYTHON_CONFDIR}/libObjects.a ${PYTHON_CONFDIR}/libParser.a"
|
||||
else
|
||||
vi_cv_path_python_plibs="-L${PYTHON_CONFDIR} -lpython${vi_cv_var_python_version}"
|
||||
fi
|
||||
if test -n "${python_LINKFORSHARED}" && test -n "${python_PYTHONFRAMEWORKPREFIX}"; then
|
||||
python_link_symbol=`echo ${python_LINKFORSHARED} | sed 's/\([^ \t][^ \t]*[ \t][ \t]*[^ \t][^ \t]*\)[ \t].*/\1/'`
|
||||
python_link_path=`echo ${python_LINKFORSHARED} | sed 's/\([^ \t][^ \t]*[ \t][ \t]*[^ \t][^ \t]*\)[ \t][ \t]*\(.*\)/\2/'`
|
||||
if test -n "${python_link_path}" && ! test -x "${python_link_path}"; then
|
||||
python_link_path="${python_PYTHONFRAMEWORKPREFIX}/${python_link_path}"
|
||||
if test -n "${python_link_path}" && ! test -x "${python_link_path}"; then
|
||||
python_link_path="${python_PYTHONFRAMEWORKINSTALLDIR}/Versions/${vi_cv_var_python_version}/${python_PYTHONFRAMEWORK}"
|
||||
fi
|
||||
python_LINKFORSHARED="${python_link_symbol} ${python_link_path}"
|
||||
fi
|
||||
fi
|
||||
vi_cv_path_python_plibs="${vi_cv_path_python_plibs} ${python_BASEMODLIBS} ${python_LIBS} ${python_SYSLIBS} ${python_LINKFORSHARED}"
|
||||
vi_cv_path_python_plibs=`echo $vi_cv_path_python_plibs | sed s/-ltermcap//`
|
||||
@@ -6367,8 +6385,8 @@ if test "$python_ok" = yes && test "$python3_ok" = yes; then
|
||||
$as_echo_n "checking whether we can do without RTLD_GLOBAL for Python... " >&6; }
|
||||
cflags_save=$CFLAGS
|
||||
CFLAGS="$CFLAGS $PYTHON_CFLAGS"
|
||||
ldflags_save=$LDFLAGS
|
||||
LDFLAGS="-ldl $LDFLAGS"
|
||||
libs_save=$LIBS
|
||||
LIBS="-ldl $LIBS"
|
||||
if test "$cross_compiling" = yes; then :
|
||||
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
|
||||
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
|
||||
@@ -6426,14 +6444,14 @@ fi
|
||||
|
||||
|
||||
CFLAGS=$cflags_save
|
||||
LDFLAGS=$ldflags_save
|
||||
LIBS=$libs_save
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can do without RTLD_GLOBAL for Python3" >&5
|
||||
$as_echo_n "checking whether we can do without RTLD_GLOBAL for Python3... " >&6; }
|
||||
cflags_save=$CFLAGS
|
||||
CFLAGS="$CFLAGS $PYTHON3_CFLAGS"
|
||||
ldflags_save=$LDFLAGS
|
||||
LDFLAGS="-ldl $LDFLAGS"
|
||||
libs_save=$LIBS
|
||||
LIBS="-ldl $LIBS"
|
||||
if test "$cross_compiling" = yes; then :
|
||||
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
|
||||
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
|
||||
@@ -6492,7 +6510,7 @@ fi
|
||||
|
||||
|
||||
CFLAGS=$cflags_save
|
||||
LDFLAGS=$ldflags_save
|
||||
LIBS=$libs_save
|
||||
|
||||
PYTHON_SRC="if_python.c"
|
||||
PYTHON_OBJ="objects/if_python.o"
|
||||
|
||||
22
src/buffer.c
22
src/buffer.c
@@ -1794,7 +1794,6 @@ buflist_new(ffname, sfname, lnum, flags)
|
||||
if (aborting()) /* autocmds may abort script processing */
|
||||
return NULL;
|
||||
#endif
|
||||
/* buf->b_nwindows = 0; why was this here? */
|
||||
free_buffer_stuff(buf, FALSE); /* delete local variables et al. */
|
||||
|
||||
/* Init the options. */
|
||||
@@ -1872,6 +1871,9 @@ buflist_new(ffname, sfname, lnum, flags)
|
||||
#ifdef FEAT_AUTOCMD
|
||||
if (!(flags & BLN_DUMMY))
|
||||
{
|
||||
/* Tricky: these autocommands may change the buffer list. They could
|
||||
* also split the window with re-using the one empty buffer. This may
|
||||
* result in unexpectedly losing the empty buffer. */
|
||||
apply_autocmds(EVENT_BUFNEW, NULL, NULL, FALSE, buf);
|
||||
if (!buf_valid(buf))
|
||||
return NULL;
|
||||
@@ -2069,17 +2071,21 @@ buflist_getfile(n, lnum, options, forceit)
|
||||
* "buf" if one exists */
|
||||
if (swb_flags & SWB_USEOPEN)
|
||||
wp = buf_jump_open_win(buf);
|
||||
|
||||
/* If 'switchbuf' contains "usetab": jump to first window in any tab
|
||||
* page containing "buf" if one exists */
|
||||
if (wp == NULL && (swb_flags & SWB_USETAB))
|
||||
wp = buf_jump_open_tab(buf);
|
||||
/* If 'switchbuf' contains "split" or "newtab" and the current buffer
|
||||
* isn't empty: open new window */
|
||||
if (wp == NULL && (swb_flags & (SWB_SPLIT | SWB_NEWTAB)) && !bufempty())
|
||||
|
||||
/* If 'switchbuf' contains "split", "vsplit" or "newtab" and the
|
||||
* current buffer isn't empty: open new tab or window */
|
||||
if (wp == NULL && (swb_flags & (SWB_VSPLIT | SWB_SPLIT | SWB_NEWTAB))
|
||||
&& !bufempty())
|
||||
{
|
||||
if (swb_flags & SWB_NEWTAB) /* Open in a new tab */
|
||||
if (swb_flags & SWB_NEWTAB)
|
||||
tabpage_new();
|
||||
else if (win_split(0, 0) == FAIL) /* Open in a new window */
|
||||
else if (win_split(0, (swb_flags & SWB_VSPLIT) ? WSP_VERT : 0)
|
||||
== FAIL)
|
||||
return FAIL;
|
||||
RESET_BINDING(curwin);
|
||||
}
|
||||
@@ -5471,6 +5477,10 @@ insert_sign(buf, prev, next, id, lnum, typenr)
|
||||
|
||||
/* first sign in signlist */
|
||||
buf->b_signlist = newsign;
|
||||
#ifdef FEAT_NETBEANS_INTG
|
||||
if (netbeans_active())
|
||||
buf->b_has_sign_column = TRUE;
|
||||
#endif
|
||||
}
|
||||
else
|
||||
prev->next = newsign;
|
||||
|
||||
@@ -942,8 +942,10 @@ if test "$enable_perlinterp" = "yes" -o "$enable_perlinterp" = "dynamic"; then
|
||||
done
|
||||
AC_SUBST(vi_cv_perl_xsubpp)
|
||||
dnl Remove "-fno-something", it breaks using cproto.
|
||||
dnl Remove "-fdebug-prefix-map", it isn't supported by clang.
|
||||
perlcppflags=`$vi_cv_path_perl -Mlib=$srcdir -MExtUtils::Embed \
|
||||
-e 'ccflags;perl_inc;print"\n"' | sed -e 's/-fno[[^ ]]*//'`
|
||||
-e 'ccflags;perl_inc;print"\n"' | sed -e 's/-fno[[^ ]]*//' \
|
||||
-e 's/-fdebug-prefix-map[[^ ]]*//g'`
|
||||
dnl Remove "-lc", it breaks on FreeBSD when using "-pthread".
|
||||
perllibs=`cd $srcdir; $vi_cv_path_perl -MExtUtils::Embed -e 'ldopts' | \
|
||||
sed -e '/Warning/d' -e '/Note (probably harmless)/d' \
|
||||
@@ -1126,6 +1128,9 @@ __:
|
||||
@echo "python_LINKFORSHARED='$(LINKFORSHARED)'"
|
||||
@echo "python_DLLLIBRARY='$(DLLLIBRARY)'"
|
||||
@echo "python_INSTSONAME='$(INSTSONAME)'"
|
||||
@echo "python_PYTHONFRAMEWORK='$(PYTHONFRAMEWORK)'"
|
||||
@echo "python_PYTHONFRAMEWORKPREFIX='$(PYTHONFRAMEWORKPREFIX)'"
|
||||
@echo "python_PYTHONFRAMEWORKINSTALLDIR='$(PYTHONFRAMEWORKINSTALLDIR)'"
|
||||
eof
|
||||
dnl -- delete the lines from make about Entering/Leaving directory
|
||||
eval "`cd ${PYTHON_CONFDIR} && make -f "${tmp_mkf}" __ | sed '/ directory /d'`"
|
||||
@@ -1133,12 +1138,34 @@ eof
|
||||
if test "x$MACOSX" = "xyes" && ${vi_cv_path_python} -c \
|
||||
"import sys; sys.exit(${vi_cv_var_python_version} < 2.3)"; then
|
||||
vi_cv_path_python_plibs="-framework Python"
|
||||
if test "x${vi_cv_path_python}" != "x/usr/bin/python" && test -n "${python_PYTHONFRAMEWORKPREFIX}"; then
|
||||
vi_cv_path_python_plibs="-F${python_PYTHONFRAMEWORKPREFIX} -framework Python"
|
||||
fi
|
||||
else
|
||||
if test "${vi_cv_var_python_version}" = "1.4"; then
|
||||
vi_cv_path_python_plibs="${PYTHON_CONFDIR}/libModules.a ${PYTHON_CONFDIR}/libPython.a ${PYTHON_CONFDIR}/libObjects.a ${PYTHON_CONFDIR}/libParser.a"
|
||||
else
|
||||
vi_cv_path_python_plibs="-L${PYTHON_CONFDIR} -lpython${vi_cv_var_python_version}"
|
||||
fi
|
||||
dnl -- Check if the path contained in python_LINKFORSHARED is
|
||||
dnl usable for vim build. If not, make and try other
|
||||
dnl candidates.
|
||||
if test -n "${python_LINKFORSHARED}" && test -n "${python_PYTHONFRAMEWORKPREFIX}"; then
|
||||
python_link_symbol=`echo ${python_LINKFORSHARED} | sed 's/\([[^ \t]][[^ \t]]*[[ \t]][[ \t]]*[[^ \t]][[^ \t]]*\)[[ \t]].*/\1/'`
|
||||
python_link_path=`echo ${python_LINKFORSHARED} | sed 's/\([[^ \t]][[^ \t]]*[[ \t]][[ \t]]*[[^ \t]][[^ \t]]*\)[[ \t]][[ \t]]*\(.*\)/\2/'`
|
||||
if test -n "${python_link_path}" && ! test -x "${python_link_path}"; then
|
||||
dnl -- The path looks relative. Guess the absolute one using
|
||||
dnl the prefix and try that.
|
||||
python_link_path="${python_PYTHONFRAMEWORKPREFIX}/${python_link_path}"
|
||||
if test -n "${python_link_path}" && ! test -x "${python_link_path}"; then
|
||||
dnl -- A last resort.
|
||||
python_link_path="${python_PYTHONFRAMEWORKINSTALLDIR}/Versions/${vi_cv_var_python_version}/${python_PYTHONFRAMEWORK}"
|
||||
dnl -- No check is done. The last word is left to the
|
||||
dnl "sanity" test on link flags that follows shortly.
|
||||
fi
|
||||
python_LINKFORSHARED="${python_link_symbol} ${python_link_path}"
|
||||
fi
|
||||
fi
|
||||
vi_cv_path_python_plibs="${vi_cv_path_python_plibs} ${python_BASEMODLIBS} ${python_LIBS} ${python_SYSLIBS} ${python_LINKFORSHARED}"
|
||||
dnl remove -ltermcap, it can conflict with an earlier -lncurses
|
||||
vi_cv_path_python_plibs=`echo $vi_cv_path_python_plibs | sed s/-ltermcap//`
|
||||
@@ -1451,9 +1478,9 @@ if test "$python_ok" = yes && test "$python3_ok" = yes; then
|
||||
AC_MSG_CHECKING(whether we can do without RTLD_GLOBAL for Python)
|
||||
cflags_save=$CFLAGS
|
||||
CFLAGS="$CFLAGS $PYTHON_CFLAGS"
|
||||
ldflags_save=$LDFLAGS
|
||||
libs_save=$LIBS
|
||||
dnl -ldl must go first to make this work on Archlinux (Roland Puntaier)
|
||||
LDFLAGS="-ldl $LDFLAGS"
|
||||
LIBS="-ldl $LIBS"
|
||||
AC_RUN_IFELSE([AC_LANG_SOURCE([
|
||||
#include <dlfcn.h>
|
||||
/* If this program fails, then RTLD_GLOBAL is needed.
|
||||
@@ -1491,14 +1518,14 @@ if test "$python_ok" = yes && test "$python3_ok" = yes; then
|
||||
[AC_MSG_RESULT(yes);AC_DEFINE(PY_NO_RTLD_GLOBAL)], [AC_MSG_RESULT(no)])
|
||||
|
||||
CFLAGS=$cflags_save
|
||||
LDFLAGS=$ldflags_save
|
||||
LIBS=$libs_save
|
||||
|
||||
AC_MSG_CHECKING(whether we can do without RTLD_GLOBAL for Python3)
|
||||
cflags_save=$CFLAGS
|
||||
CFLAGS="$CFLAGS $PYTHON3_CFLAGS"
|
||||
ldflags_save=$LDFLAGS
|
||||
libs_save=$LIBS
|
||||
dnl -ldl must go first to make this work on Archlinux (Roland Puntaier)
|
||||
LDFLAGS="-ldl $LDFLAGS"
|
||||
LIBS="-ldl $LIBS"
|
||||
AC_RUN_IFELSE([AC_LANG_SOURCE([
|
||||
#include <dlfcn.h>
|
||||
#include <wchar.h>
|
||||
@@ -1537,7 +1564,7 @@ if test "$python_ok" = yes && test "$python3_ok" = yes; then
|
||||
[AC_MSG_RESULT(yes);AC_DEFINE(PY3_NO_RTLD_GLOBAL)], [AC_MSG_RESULT(no)])
|
||||
|
||||
CFLAGS=$cflags_save
|
||||
LDFLAGS=$ldflags_save
|
||||
LIBS=$libs_save
|
||||
|
||||
PYTHON_SRC="if_python.c"
|
||||
PYTHON_OBJ="objects/if_python.o"
|
||||
|
||||
99
src/diff.c
99
src/diff.c
@@ -688,9 +688,9 @@ ex_diffupdate(eap)
|
||||
return;
|
||||
|
||||
/* We need three temp file names. */
|
||||
tmp_orig = vim_tempname('o');
|
||||
tmp_new = vim_tempname('n');
|
||||
tmp_diff = vim_tempname('d');
|
||||
tmp_orig = vim_tempname('o', TRUE);
|
||||
tmp_new = vim_tempname('n', TRUE);
|
||||
tmp_diff = vim_tempname('d', TRUE);
|
||||
if (tmp_orig == NULL || tmp_new == NULL || tmp_diff == NULL)
|
||||
goto theend;
|
||||
|
||||
@@ -920,8 +920,8 @@ ex_diffpatch(eap)
|
||||
#endif
|
||||
|
||||
/* We need two temp file names. */
|
||||
tmp_orig = vim_tempname('o');
|
||||
tmp_new = vim_tempname('n');
|
||||
tmp_orig = vim_tempname('o', FALSE);
|
||||
tmp_new = vim_tempname('n', FALSE);
|
||||
if (tmp_orig == NULL || tmp_new == NULL)
|
||||
goto theend;
|
||||
|
||||
@@ -1138,32 +1138,34 @@ diff_win_options(wp, addbuf)
|
||||
curwin = old_curwin;
|
||||
# endif
|
||||
|
||||
wp->w_p_diff = TRUE;
|
||||
|
||||
/* Use 'scrollbind' and 'cursorbind' when available */
|
||||
#ifdef FEAT_SCROLLBIND
|
||||
if (!wp->w_p_diff_saved)
|
||||
if (!wp->w_p_diff)
|
||||
wp->w_p_scb_save = wp->w_p_scb;
|
||||
wp->w_p_scb = TRUE;
|
||||
#endif
|
||||
#ifdef FEAT_CURSORBIND
|
||||
if (!wp->w_p_diff_saved)
|
||||
if (!wp->w_p_diff)
|
||||
wp->w_p_crb_save = wp->w_p_crb;
|
||||
wp->w_p_crb = TRUE;
|
||||
#endif
|
||||
if (!wp->w_p_diff_saved)
|
||||
if (!wp->w_p_diff)
|
||||
wp->w_p_wrap_save = wp->w_p_wrap;
|
||||
wp->w_p_wrap = FALSE;
|
||||
# ifdef FEAT_FOLDING
|
||||
curwin = wp;
|
||||
curbuf = curwin->w_buffer;
|
||||
if (!wp->w_p_diff_saved)
|
||||
if (!wp->w_p_diff)
|
||||
{
|
||||
if (wp->w_p_diff_saved)
|
||||
free_string_option(wp->w_p_fdm_save);
|
||||
wp->w_p_fdm_save = vim_strsave(wp->w_p_fdm);
|
||||
}
|
||||
set_string_option_direct((char_u *)"fdm", -1, (char_u *)"diff",
|
||||
OPT_LOCAL|OPT_FREE, 0);
|
||||
curwin = old_curwin;
|
||||
curbuf = curwin->w_buffer;
|
||||
if (!wp->w_p_diff_saved)
|
||||
if (!wp->w_p_diff)
|
||||
{
|
||||
wp->w_p_fdc_save = wp->w_p_fdc;
|
||||
wp->w_p_fen_save = wp->w_p_fen;
|
||||
@@ -1183,6 +1185,8 @@ diff_win_options(wp, addbuf)
|
||||
/* Saved the current values, to be restored in ex_diffoff(). */
|
||||
wp->w_p_diff_saved = TRUE;
|
||||
|
||||
wp->w_p_diff = TRUE;
|
||||
|
||||
if (addbuf)
|
||||
diff_buf_add(wp->w_buffer);
|
||||
redraw_win_later(wp, NOT_VALID);
|
||||
@@ -1197,7 +1201,6 @@ ex_diffoff(eap)
|
||||
exarg_T *eap;
|
||||
{
|
||||
win_T *wp;
|
||||
win_T *old_curwin = curwin;
|
||||
#ifdef FEAT_SCROLLBIND
|
||||
int diffwin = FALSE;
|
||||
#endif
|
||||
@@ -1206,57 +1209,47 @@ ex_diffoff(eap)
|
||||
{
|
||||
if (eap->forceit ? wp->w_p_diff : wp == curwin)
|
||||
{
|
||||
/* Set 'diff', 'scrollbind' off and 'wrap' on. If option values
|
||||
* were saved in diff_win_options() restore them. */
|
||||
/* Set 'diff' off. If option values were saved in
|
||||
* diff_win_options(), restore the ones whose settings seem to have
|
||||
* been left over from diff mode. */
|
||||
wp->w_p_diff = FALSE;
|
||||
|
||||
#ifdef FEAT_SCROLLBIND
|
||||
if (wp->w_p_scb)
|
||||
wp->w_p_scb = wp->w_p_diff_saved ? wp->w_p_scb_save : FALSE;
|
||||
#endif
|
||||
#ifdef FEAT_CURSORBIND
|
||||
if (wp->w_p_crb)
|
||||
wp->w_p_crb = wp->w_p_diff_saved ? wp->w_p_crb_save : FALSE;
|
||||
#endif
|
||||
if (!wp->w_p_wrap)
|
||||
wp->w_p_wrap = wp->w_p_diff_saved ? wp->w_p_wrap_save : TRUE;
|
||||
#ifdef FEAT_FOLDING
|
||||
curwin = wp;
|
||||
curbuf = curwin->w_buffer;
|
||||
if (wp->w_p_diff_saved)
|
||||
{
|
||||
free_string_option(wp->w_p_fdm);
|
||||
wp->w_p_fdm = wp->w_p_fdm_save;
|
||||
wp->w_p_fdm_save = empty_option;
|
||||
}
|
||||
else
|
||||
set_string_option_direct((char_u *)"fdm", -1,
|
||||
(char_u *)"manual", OPT_LOCAL|OPT_FREE, 0);
|
||||
curwin = old_curwin;
|
||||
curbuf = curwin->w_buffer;
|
||||
if (wp->w_p_fdc == diff_foldcolumn)
|
||||
wp->w_p_fdc = wp->w_p_diff_saved ? wp->w_p_fdc_save : 0;
|
||||
if (wp->w_p_fdl == 0 && wp->w_p_diff_saved)
|
||||
wp->w_p_fdl = wp->w_p_fdl_save;
|
||||
|
||||
if (wp->w_p_fen)
|
||||
{
|
||||
#ifdef FEAT_SCROLLBIND
|
||||
if (wp->w_p_scb)
|
||||
wp->w_p_scb = wp->w_p_scb_save;
|
||||
#endif
|
||||
#ifdef FEAT_CURSORBIND
|
||||
if (wp->w_p_crb)
|
||||
wp->w_p_crb = wp->w_p_crb_save;
|
||||
#endif
|
||||
if (!wp->w_p_wrap)
|
||||
wp->w_p_wrap = wp->w_p_wrap_save;
|
||||
#ifdef FEAT_FOLDING
|
||||
free_string_option(wp->w_p_fdm);
|
||||
wp->w_p_fdm = vim_strsave(wp->w_p_fdm_save);
|
||||
|
||||
if (wp->w_p_fdc == diff_foldcolumn)
|
||||
wp->w_p_fdc = wp->w_p_fdc_save;
|
||||
if (wp->w_p_fdl == 0)
|
||||
wp->w_p_fdl = wp->w_p_fdl_save;
|
||||
|
||||
/* Only restore 'foldenable' when 'foldmethod' is not
|
||||
* "manual", otherwise we continue to show the diff folds. */
|
||||
if (foldmethodIsManual(wp) || !wp->w_p_diff_saved)
|
||||
wp->w_p_fen = FALSE;
|
||||
else
|
||||
wp->w_p_fen = wp->w_p_fen_save;
|
||||
if (wp->w_p_fen)
|
||||
wp->w_p_fen = foldmethodIsManual(wp) ? FALSE
|
||||
: wp->w_p_fen_save;
|
||||
|
||||
foldUpdateAll(wp);
|
||||
/* make sure topline is not halfway a fold */
|
||||
changed_window_setting_win(wp);
|
||||
#endif
|
||||
}
|
||||
|
||||
foldUpdateAll(wp);
|
||||
/* make sure topline is not halfway a fold */
|
||||
changed_window_setting_win(wp);
|
||||
#endif
|
||||
/* Note: 'sbo' is not restored, it's a global option. */
|
||||
diff_buf_adjust(wp);
|
||||
|
||||
wp->w_p_diff_saved = FALSE;
|
||||
}
|
||||
#ifdef FEAT_SCROLLBIND
|
||||
diffwin |= wp->w_p_diff;
|
||||
|
||||
262
src/edit.c
262
src/edit.c
@@ -34,8 +34,10 @@
|
||||
#define CTRL_X_OMNI 13
|
||||
#define CTRL_X_SPELL 14
|
||||
#define CTRL_X_LOCAL_MSG 15 /* only used in "ctrl_x_msgs" */
|
||||
#define CTRL_X_EVAL 16 /* for builtin function complete() */
|
||||
|
||||
#define CTRL_X_MSG(i) ctrl_x_msgs[(i) & ~CTRL_X_WANT_IDENT]
|
||||
#define CTRL_X_MODE_LINE_OR_EVAL(m) (m == CTRL_X_WHOLE_LINE || m == CTRL_X_EVAL)
|
||||
|
||||
static char *ctrl_x_msgs[] =
|
||||
{
|
||||
@@ -55,6 +57,7 @@ static char *ctrl_x_msgs[] =
|
||||
N_(" Omni completion (^O^N^P)"),
|
||||
N_(" Spelling suggestion (s^N^P)"),
|
||||
N_(" Keyword Local completion (^N^P)"),
|
||||
NULL, /* CTRL_X_EVAL doesn't use msg. */
|
||||
};
|
||||
|
||||
static char e_hitend[] = N_("Hit end of paragraph");
|
||||
@@ -105,6 +108,11 @@ static char_u *compl_leader = NULL;
|
||||
static int compl_get_longest = FALSE; /* put longest common string
|
||||
in compl_leader */
|
||||
|
||||
static int compl_no_insert = FALSE; /* FALSE: select & insert
|
||||
TRUE: noinsert */
|
||||
static int compl_no_select = FALSE; /* FALSE: select & insert
|
||||
TRUE: noselect */
|
||||
|
||||
static int compl_used_match; /* Selected one of the matches. When
|
||||
FALSE the match was edited or using
|
||||
the longest common string. */
|
||||
@@ -757,7 +765,8 @@ edit(cmdchar, startln, count)
|
||||
/*
|
||||
* Get a character for Insert mode. Ignore K_IGNORE.
|
||||
*/
|
||||
lastc = c; /* remember previous char for CTRL-D */
|
||||
if (c != K_CURSORHOLD)
|
||||
lastc = c; /* remember the previous char for CTRL-D */
|
||||
do
|
||||
{
|
||||
c = safe_vgetc();
|
||||
@@ -802,7 +811,7 @@ edit(cmdchar, startln, count)
|
||||
* "compl_leader". Except when at the original match and
|
||||
* there is nothing to add, CTRL-L works like CTRL-P then. */
|
||||
if (c == Ctrl_L
|
||||
&& (ctrl_x_mode != CTRL_X_WHOLE_LINE
|
||||
&& (!CTRL_X_MODE_LINE_OR_EVAL(ctrl_x_mode)
|
||||
|| (int)STRLEN(compl_shown_match->cp_str)
|
||||
> curwin->w_cursor.col - compl_col))
|
||||
{
|
||||
@@ -2267,6 +2276,8 @@ vim_is_ctrl_x_key(c)
|
||||
#endif
|
||||
case CTRL_X_SPELL:
|
||||
return (c == Ctrl_S || c == Ctrl_P || c == Ctrl_N);
|
||||
case CTRL_X_EVAL:
|
||||
return (c == Ctrl_P || c == Ctrl_N);
|
||||
}
|
||||
EMSG(_(e_internal));
|
||||
return FALSE;
|
||||
@@ -2773,8 +2784,7 @@ set_completion(startcol, list)
|
||||
-1, p_ic, NULL, NULL, 0, ORIGINAL_TEXT, FALSE) != OK)
|
||||
return;
|
||||
|
||||
/* Handle like dictionary completion. */
|
||||
ctrl_x_mode = CTRL_X_WHOLE_LINE;
|
||||
ctrl_x_mode = CTRL_X_EVAL;
|
||||
|
||||
ins_compl_add_list(list);
|
||||
compl_matches = ins_compl_make_cyclic();
|
||||
@@ -2783,7 +2793,17 @@ set_completion(startcol, list)
|
||||
compl_cont_status = 0;
|
||||
|
||||
compl_curr_match = compl_first_match;
|
||||
ins_complete(Ctrl_N);
|
||||
if (compl_no_insert)
|
||||
{
|
||||
if (!compl_no_select)
|
||||
ins_complete(K_DOWN);
|
||||
}
|
||||
else
|
||||
{
|
||||
ins_complete(Ctrl_N);
|
||||
if (compl_no_select)
|
||||
ins_complete(Ctrl_P);
|
||||
}
|
||||
out_flush();
|
||||
}
|
||||
|
||||
@@ -3003,6 +3023,10 @@ ins_compl_show_pum()
|
||||
|
||||
if (compl_match_array != NULL)
|
||||
{
|
||||
/* In Replace mode when a $ is displayed at the end of the line only
|
||||
* part of the screen would be updated. We do need to redraw here. */
|
||||
dollar_vcol = -1;
|
||||
|
||||
/* Compute the screen column of the start of the completed text.
|
||||
* Use the cursor to get all wrapping and other settings right. */
|
||||
col = curwin->w_cursor.col;
|
||||
@@ -3060,7 +3084,7 @@ ins_compl_dictionaries(dict_start, pat, flags, thesaurus)
|
||||
/* When invoked to match whole lines for CTRL-X CTRL-L adjust the pattern
|
||||
* to only match at the start of a line. Otherwise just match the
|
||||
* pattern. Also need to double backslashes. */
|
||||
if (ctrl_x_mode == CTRL_X_WHOLE_LINE)
|
||||
if (CTRL_X_MODE_LINE_OR_EVAL(ctrl_x_mode))
|
||||
{
|
||||
char_u *pat_esc = vim_strsave_escaped(pat, (char_u *)"\\");
|
||||
size_t len;
|
||||
@@ -3181,7 +3205,7 @@ ins_compl_files(count, files, thesaurus, flags, regmatch, buf, dir)
|
||||
while (vim_regexec(regmatch, buf, (colnr_T)(ptr - buf)))
|
||||
{
|
||||
ptr = regmatch->startp[0];
|
||||
if (ctrl_x_mode == CTRL_X_WHOLE_LINE)
|
||||
if (CTRL_X_MODE_LINE_OR_EVAL(ctrl_x_mode))
|
||||
ptr = find_line_end(ptr);
|
||||
else
|
||||
ptr = find_word_end(ptr);
|
||||
@@ -3363,6 +3387,8 @@ ins_compl_clear()
|
||||
vim_free(compl_orig_text);
|
||||
compl_orig_text = NULL;
|
||||
compl_enter_selects = FALSE;
|
||||
/* clear v:completed_item */
|
||||
set_vim_var_dict(VV_COMPLETED_ITEM, dict_alloc());
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -3394,7 +3420,7 @@ ins_compl_bs()
|
||||
* allow the word to be deleted, we won't match everything. */
|
||||
if ((int)(p - line) - (int)compl_col < 0
|
||||
|| ((int)(p - line) - (int)compl_col == 0
|
||||
&& ctrl_x_mode != CTRL_X_OMNI))
|
||||
&& ctrl_x_mode != CTRL_X_OMNI) || ctrl_x_mode == CTRL_X_EVAL)
|
||||
return K_BS;
|
||||
|
||||
/* Deleted more than what was used to find matches or didn't finish
|
||||
@@ -3646,10 +3672,18 @@ ins_compl_prep(c)
|
||||
if (ctrl_x_mode == CTRL_X_NOT_DEFINED_YET
|
||||
|| (ctrl_x_mode == 0 && !compl_started))
|
||||
{
|
||||
compl_get_longest = (vim_strchr(p_cot, 'l') != NULL);
|
||||
compl_get_longest = (strstr((char *)p_cot, "longest") != NULL);
|
||||
compl_used_match = TRUE;
|
||||
|
||||
}
|
||||
|
||||
compl_no_insert = FALSE;
|
||||
compl_no_select = FALSE;
|
||||
if (strstr((char *)p_cot, "noselect") != NULL)
|
||||
compl_no_select = TRUE;
|
||||
if (strstr((char *)p_cot, "noinsert") != NULL)
|
||||
compl_no_insert = TRUE;
|
||||
|
||||
if (ctrl_x_mode == CTRL_X_NOT_DEFINED_YET)
|
||||
{
|
||||
/*
|
||||
@@ -4208,7 +4242,7 @@ ins_compl_get_exp(ini)
|
||||
/* For ^N/^P pick a new entry from e_cpt if compl_started is off,
|
||||
* or if found_all says this entry is done. For ^X^L only use the
|
||||
* entries from 'complete' that look in loaded buffers. */
|
||||
if ((ctrl_x_mode == 0 || ctrl_x_mode == CTRL_X_WHOLE_LINE)
|
||||
if ((ctrl_x_mode == 0 || CTRL_X_MODE_LINE_OR_EVAL(ctrl_x_mode))
|
||||
&& (!compl_started || found_all))
|
||||
{
|
||||
found_all = FALSE;
|
||||
@@ -4261,7 +4295,7 @@ ins_compl_get_exp(ini)
|
||||
break;
|
||||
else
|
||||
{
|
||||
if (ctrl_x_mode == CTRL_X_WHOLE_LINE)
|
||||
if (CTRL_X_MODE_LINE_OR_EVAL(ctrl_x_mode))
|
||||
type = -1;
|
||||
else if (*e_cpt == 'k' || *e_cpt == 's')
|
||||
{
|
||||
@@ -4406,9 +4440,10 @@ ins_compl_get_exp(ini)
|
||||
|
||||
++msg_silent; /* Don't want messages for wrapscan. */
|
||||
|
||||
/* ctrl_x_mode == CTRL_X_WHOLE_LINE || word-wise search that
|
||||
/* CTRL_X_MODE_LINE_OR_EVAL(ctrl_x_mode)
|
||||
* || word-wise search that
|
||||
* has added a word that was at the beginning of the line */
|
||||
if ( ctrl_x_mode == CTRL_X_WHOLE_LINE
|
||||
if (CTRL_X_MODE_LINE_OR_EVAL(ctrl_x_mode)
|
||||
|| (compl_cont_status & CONT_SOL))
|
||||
found_new_match = search_for_exact_line(ins_buf, pos,
|
||||
compl_direction, compl_pattern);
|
||||
@@ -4442,7 +4477,7 @@ ins_compl_get_exp(ini)
|
||||
&& ini->col == pos->col)
|
||||
continue;
|
||||
ptr = ml_get_buf(ins_buf, pos->lnum, FALSE) + pos->col;
|
||||
if (ctrl_x_mode == CTRL_X_WHOLE_LINE)
|
||||
if (CTRL_X_MODE_LINE_OR_EVAL(ctrl_x_mode))
|
||||
{
|
||||
if (compl_cont_status & CONT_ADDING)
|
||||
{
|
||||
@@ -4536,7 +4571,7 @@ ins_compl_get_exp(ini)
|
||||
|
||||
/* break the loop for specialized modes (use 'complete' just for the
|
||||
* generic ctrl_x_mode == 0) or when we've found a new match */
|
||||
if ((ctrl_x_mode != 0 && ctrl_x_mode != CTRL_X_WHOLE_LINE)
|
||||
if ((ctrl_x_mode != 0 && !CTRL_X_MODE_LINE_OR_EVAL(ctrl_x_mode))
|
||||
|| found_new_match != FAIL)
|
||||
{
|
||||
if (got_int)
|
||||
@@ -4545,7 +4580,7 @@ ins_compl_get_exp(ini)
|
||||
if (type != -1)
|
||||
ins_compl_check_keys(0);
|
||||
|
||||
if ((ctrl_x_mode != 0 && ctrl_x_mode != CTRL_X_WHOLE_LINE)
|
||||
if ((ctrl_x_mode != 0 && !CTRL_X_MODE_LINE_OR_EVAL(ctrl_x_mode))
|
||||
|| compl_interrupted)
|
||||
break;
|
||||
compl_started = TRUE;
|
||||
@@ -4561,13 +4596,13 @@ ins_compl_get_exp(ini)
|
||||
}
|
||||
compl_started = TRUE;
|
||||
|
||||
if ((ctrl_x_mode == 0 || ctrl_x_mode == CTRL_X_WHOLE_LINE)
|
||||
if ((ctrl_x_mode == 0 || CTRL_X_MODE_LINE_OR_EVAL(ctrl_x_mode))
|
||||
&& *e_cpt == NUL) /* Got to end of 'complete' */
|
||||
found_new_match = FAIL;
|
||||
|
||||
i = -1; /* total of matches, unknown */
|
||||
if (found_new_match == FAIL
|
||||
|| (ctrl_x_mode != 0 && ctrl_x_mode != CTRL_X_WHOLE_LINE))
|
||||
|| (ctrl_x_mode != 0 && !CTRL_X_MODE_LINE_OR_EVAL(ctrl_x_mode)))
|
||||
i = ins_compl_make_cyclic();
|
||||
|
||||
/* If several matches were added (FORWARD) or the search failed and has
|
||||
@@ -4596,17 +4631,39 @@ ins_compl_delete()
|
||||
/* TODO: is this sufficient for redrawing? Redrawing everything causes
|
||||
* flicker, thus we can't do that. */
|
||||
changed_cline_bef_curs();
|
||||
/* clear v:completed_item */
|
||||
set_vim_var_dict(VV_COMPLETED_ITEM, dict_alloc());
|
||||
}
|
||||
|
||||
/* Insert the new text being completed. */
|
||||
static void
|
||||
ins_compl_insert()
|
||||
{
|
||||
dict_T *dict;
|
||||
|
||||
ins_bytes(compl_shown_match->cp_str + ins_compl_len());
|
||||
if (compl_shown_match->cp_flags & ORIGINAL_TEXT)
|
||||
compl_used_match = FALSE;
|
||||
else
|
||||
compl_used_match = TRUE;
|
||||
|
||||
/* Set completed item. */
|
||||
/* { word, abbr, menu, kind, info } */
|
||||
dict = dict_alloc();
|
||||
if (dict != NULL)
|
||||
{
|
||||
dict_add_nr_str(dict, "word", 0L,
|
||||
EMPTY_IF_NULL(compl_shown_match->cp_str));
|
||||
dict_add_nr_str(dict, "abbr", 0L,
|
||||
EMPTY_IF_NULL(compl_shown_match->cp_text[CPT_ABBR]));
|
||||
dict_add_nr_str(dict, "menu", 0L,
|
||||
EMPTY_IF_NULL(compl_shown_match->cp_text[CPT_MENU]));
|
||||
dict_add_nr_str(dict, "kind", 0L,
|
||||
EMPTY_IF_NULL(compl_shown_match->cp_text[CPT_KIND]));
|
||||
dict_add_nr_str(dict, "info", 0L,
|
||||
EMPTY_IF_NULL(compl_shown_match->cp_text[CPT_INFO]));
|
||||
}
|
||||
set_vim_var_dict(VV_COMPLETED_ITEM, dict);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -4638,6 +4695,7 @@ ins_compl_next(allow_get_expansion, count, insert_match)
|
||||
compl_T *found_compl = NULL;
|
||||
int found_end = FALSE;
|
||||
int advance;
|
||||
int started = compl_started;
|
||||
|
||||
/* When user complete function return -1 for findstart which is next
|
||||
* time of 'always', compl_shown_match become NULL. */
|
||||
@@ -4719,7 +4777,7 @@ ins_compl_next(allow_get_expansion, count, insert_match)
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (advance)
|
||||
if (!compl_no_select && advance)
|
||||
{
|
||||
if (compl_shows_dir == BACKWARD)
|
||||
--compl_pending;
|
||||
@@ -4771,7 +4829,12 @@ ins_compl_next(allow_get_expansion, count, insert_match)
|
||||
}
|
||||
|
||||
/* Insert the text of the new completion, or the compl_leader. */
|
||||
if (insert_match)
|
||||
if (compl_no_insert && !started)
|
||||
{
|
||||
ins_bytes(compl_orig_text + ins_compl_len());
|
||||
compl_used_match = FALSE;
|
||||
}
|
||||
else if (insert_match)
|
||||
{
|
||||
if (!compl_get_longest || compl_used_match)
|
||||
ins_compl_insert();
|
||||
@@ -4808,7 +4871,10 @@ ins_compl_next(allow_get_expansion, count, insert_match)
|
||||
|
||||
/* Enter will select a match when the match wasn't inserted and the popup
|
||||
* menu is visible. */
|
||||
compl_enter_selects = !insert_match && compl_match_array != NULL;
|
||||
if (compl_no_insert && !started)
|
||||
compl_enter_selects = TRUE;
|
||||
else
|
||||
compl_enter_selects = !insert_match && compl_match_array != NULL;
|
||||
|
||||
/*
|
||||
* Show the file name for the match (if any)
|
||||
@@ -4883,7 +4949,7 @@ ins_compl_check_keys(frequency)
|
||||
}
|
||||
}
|
||||
}
|
||||
if (compl_pending != 0 && !got_int)
|
||||
if (compl_pending != 0 && !got_int && !compl_no_insert)
|
||||
{
|
||||
int todo = compl_pending > 0 ? compl_pending : -compl_pending;
|
||||
|
||||
@@ -5052,7 +5118,7 @@ ins_complete(c)
|
||||
if (compl_length < 1)
|
||||
compl_cont_status &= CONT_LOCAL;
|
||||
}
|
||||
else if (ctrl_x_mode == CTRL_X_WHOLE_LINE)
|
||||
else if (CTRL_X_MODE_LINE_OR_EVAL(ctrl_x_mode))
|
||||
compl_cont_status = CONT_ADDING | CONT_N_ADDS;
|
||||
else
|
||||
compl_cont_status = 0;
|
||||
@@ -5183,7 +5249,7 @@ ins_complete(c)
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (ctrl_x_mode == CTRL_X_WHOLE_LINE)
|
||||
else if (CTRL_X_MODE_LINE_OR_EVAL(ctrl_x_mode))
|
||||
{
|
||||
compl_col = (colnr_T)(skipwhite(line) - line);
|
||||
compl_length = (int)curs_col - (int)compl_col;
|
||||
@@ -5348,7 +5414,7 @@ ins_complete(c)
|
||||
if (compl_cont_status & CONT_ADDING)
|
||||
{
|
||||
edit_submode_pre = (char_u *)_(" Adding");
|
||||
if (ctrl_x_mode == CTRL_X_WHOLE_LINE)
|
||||
if (CTRL_X_MODE_LINE_OR_EVAL(ctrl_x_mode))
|
||||
{
|
||||
/* Insert a new line, keep indentation but ignore 'comments' */
|
||||
#ifdef FEAT_COMMENTS
|
||||
@@ -5874,8 +5940,9 @@ insertchar(c, flags, second_indent)
|
||||
char_u *p;
|
||||
#endif
|
||||
int fo_ins_blank;
|
||||
int force_format = flags & INSCHAR_FORMAT;
|
||||
|
||||
textwidth = comp_textwidth(flags & INSCHAR_FORMAT);
|
||||
textwidth = comp_textwidth(force_format);
|
||||
fo_ins_blank = has_format_option(FO_INS_BLANK);
|
||||
|
||||
/*
|
||||
@@ -5894,7 +5961,7 @@ insertchar(c, flags, second_indent)
|
||||
* before 'textwidth'
|
||||
*/
|
||||
if (textwidth > 0
|
||||
&& ((flags & INSCHAR_FORMAT)
|
||||
&& (force_format
|
||||
|| (!vim_iswhite(c)
|
||||
&& !((State & REPLACE_FLAG)
|
||||
#ifdef FEAT_VREPLACE
|
||||
@@ -5911,9 +5978,12 @@ insertchar(c, flags, second_indent)
|
||||
/* Format with 'formatexpr' when it's set. Use internal formatting
|
||||
* when 'formatexpr' isn't set or it returns non-zero. */
|
||||
#if defined(FEAT_EVAL)
|
||||
int do_internal = TRUE;
|
||||
int do_internal = TRUE;
|
||||
colnr_T virtcol = get_nolist_virtcol()
|
||||
+ char2cells(c != NUL ? c : gchar_cursor());
|
||||
|
||||
if (*curbuf->b_p_fex != NUL && (flags & INSCHAR_NO_FEX) == 0)
|
||||
if (*curbuf->b_p_fex != NUL && (flags & INSCHAR_NO_FEX) == 0
|
||||
&& (force_format || virtcol > (colnr_T)textwidth))
|
||||
{
|
||||
do_internal = (fex_format(curwin->w_cursor.lnum, 1L, c) != 0);
|
||||
/* It may be required to save for undo again, e.g. when setline()
|
||||
@@ -6677,7 +6747,7 @@ comp_textwidth(ff)
|
||||
#ifdef FEAT_SIGNS
|
||||
if (curwin->w_buffer->b_signlist != NULL
|
||||
# ifdef FEAT_NETBEANS_INTG
|
||||
|| netbeans_active()
|
||||
|| curwin->w_buffer->b_has_sign_column
|
||||
# endif
|
||||
)
|
||||
textwidth -= 1;
|
||||
@@ -9037,72 +9107,94 @@ ins_bs(c, mode, inserted_space_p)
|
||||
/*
|
||||
* Delete upto starting point, start of line or previous word.
|
||||
*/
|
||||
else do
|
||||
else
|
||||
{
|
||||
#ifdef FEAT_RIGHTLEFT
|
||||
if (!revins_on) /* put cursor on char to be deleted */
|
||||
#endif
|
||||
dec_cursor();
|
||||
#ifdef FEAT_MBYTE
|
||||
int cclass = 0, prev_cclass = 0;
|
||||
|
||||
/* start of word? */
|
||||
if (mode == BACKSPACE_WORD && !vim_isspace(gchar_cursor()))
|
||||
{
|
||||
mode = BACKSPACE_WORD_NOT_SPACE;
|
||||
temp = vim_iswordc(gchar_cursor());
|
||||
}
|
||||
/* end of word? */
|
||||
else if (mode == BACKSPACE_WORD_NOT_SPACE
|
||||
&& (vim_isspace(cc = gchar_cursor())
|
||||
|| vim_iswordc(cc) != temp))
|
||||
{
|
||||
#ifdef FEAT_RIGHTLEFT
|
||||
if (!revins_on)
|
||||
if (has_mbyte)
|
||||
cclass = mb_get_class(ml_get_cursor());
|
||||
#endif
|
||||
inc_cursor();
|
||||
do
|
||||
{
|
||||
#ifdef FEAT_RIGHTLEFT
|
||||
else if (State & REPLACE_FLAG)
|
||||
if (!revins_on) /* put cursor on char to be deleted */
|
||||
#endif
|
||||
dec_cursor();
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
if (State & REPLACE_FLAG)
|
||||
replace_do_bs(-1);
|
||||
else
|
||||
{
|
||||
|
||||
cc = gchar_cursor();
|
||||
#ifdef FEAT_MBYTE
|
||||
if (enc_utf8 && p_deco)
|
||||
(void)utfc_ptr2char(ml_get_cursor(), cpc);
|
||||
#endif
|
||||
(void)del_char(FALSE);
|
||||
#ifdef FEAT_MBYTE
|
||||
/*
|
||||
* If there are combining characters and 'delcombine' is set
|
||||
* move the cursor back. Don't back up before the base
|
||||
* character.
|
||||
*/
|
||||
if (enc_utf8 && p_deco && cpc[0] != NUL)
|
||||
inc_cursor();
|
||||
#endif
|
||||
#ifdef FEAT_RIGHTLEFT
|
||||
if (revins_chars)
|
||||
/* look multi-byte character class */
|
||||
if (has_mbyte)
|
||||
{
|
||||
revins_chars--;
|
||||
revins_legal++;
|
||||
prev_cclass = cclass;
|
||||
cclass = mb_get_class(ml_get_cursor());
|
||||
}
|
||||
if (revins_on && gchar_cursor() == NUL)
|
||||
break;
|
||||
#endif
|
||||
}
|
||||
/* Just a single backspace?: */
|
||||
if (mode == BACKSPACE_CHAR)
|
||||
break;
|
||||
} while (
|
||||
|
||||
/* start of word? */
|
||||
if (mode == BACKSPACE_WORD && !vim_isspace(cc))
|
||||
{
|
||||
mode = BACKSPACE_WORD_NOT_SPACE;
|
||||
temp = vim_iswordc(cc);
|
||||
}
|
||||
/* end of word? */
|
||||
else if (mode == BACKSPACE_WORD_NOT_SPACE
|
||||
&& ((vim_isspace(cc) || vim_iswordc(cc) != temp)
|
||||
#ifdef FEAT_MBYTE
|
||||
|| prev_cclass != cclass
|
||||
#endif
|
||||
))
|
||||
{
|
||||
#ifdef FEAT_RIGHTLEFT
|
||||
revins_on ||
|
||||
if (!revins_on)
|
||||
#endif
|
||||
(curwin->w_cursor.col > mincol
|
||||
&& (curwin->w_cursor.lnum != Insstart_orig.lnum
|
||||
|| curwin->w_cursor.col != Insstart_orig.col)));
|
||||
inc_cursor();
|
||||
#ifdef FEAT_RIGHTLEFT
|
||||
else if (State & REPLACE_FLAG)
|
||||
dec_cursor();
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
if (State & REPLACE_FLAG)
|
||||
replace_do_bs(-1);
|
||||
else
|
||||
{
|
||||
#ifdef FEAT_MBYTE
|
||||
if (enc_utf8 && p_deco)
|
||||
(void)utfc_ptr2char(ml_get_cursor(), cpc);
|
||||
#endif
|
||||
(void)del_char(FALSE);
|
||||
#ifdef FEAT_MBYTE
|
||||
/*
|
||||
* If there are combining characters and 'delcombine' is set
|
||||
* move the cursor back. Don't back up before the base
|
||||
* character.
|
||||
*/
|
||||
if (enc_utf8 && p_deco && cpc[0] != NUL)
|
||||
inc_cursor();
|
||||
#endif
|
||||
#ifdef FEAT_RIGHTLEFT
|
||||
if (revins_chars)
|
||||
{
|
||||
revins_chars--;
|
||||
revins_legal++;
|
||||
}
|
||||
if (revins_on && gchar_cursor() == NUL)
|
||||
break;
|
||||
#endif
|
||||
}
|
||||
/* Just a single backspace?: */
|
||||
if (mode == BACKSPACE_CHAR)
|
||||
break;
|
||||
} while (
|
||||
#ifdef FEAT_RIGHTLEFT
|
||||
revins_on ||
|
||||
#endif
|
||||
(curwin->w_cursor.col > mincol
|
||||
&& (curwin->w_cursor.lnum != Insstart_orig.lnum
|
||||
|| curwin->w_cursor.col != Insstart_orig.col)));
|
||||
}
|
||||
did_backspace = TRUE;
|
||||
}
|
||||
#ifdef FEAT_SMARTINDENT
|
||||
|
||||
348
src/eval.c
348
src/eval.c
@@ -364,6 +364,7 @@ static struct vimvar
|
||||
{VV_NAME("oldfiles", VAR_LIST), 0},
|
||||
{VV_NAME("windowid", VAR_NUMBER), VV_RO},
|
||||
{VV_NAME("progpath", VAR_STRING), VV_RO},
|
||||
{VV_NAME("completed_item", VAR_DICT), VV_RO},
|
||||
};
|
||||
|
||||
/* shorthand */
|
||||
@@ -372,6 +373,7 @@ static struct vimvar
|
||||
#define vv_float vv_di.di_tv.vval.v_float
|
||||
#define vv_str vv_di.di_tv.vval.v_string
|
||||
#define vv_list vv_di.di_tv.vval.v_list
|
||||
#define vv_dict vv_di.di_tv.vval.v_dict
|
||||
#define vv_tv vv_di.di_tv
|
||||
|
||||
static dictitem_T vimvars_var; /* variable used for v: */
|
||||
@@ -575,6 +577,7 @@ static void f_getwinposy __ARGS((typval_T *argvars, typval_T *rettv));
|
||||
static void f_getwinvar __ARGS((typval_T *argvars, typval_T *rettv));
|
||||
static void f_glob __ARGS((typval_T *argvars, typval_T *rettv));
|
||||
static void f_globpath __ARGS((typval_T *argvars, typval_T *rettv));
|
||||
static void f_glob2regpat __ARGS((typval_T *argvars, typval_T *rettv));
|
||||
static void f_has __ARGS((typval_T *argvars, typval_T *rettv));
|
||||
static void f_has_key __ARGS((typval_T *argvars, typval_T *rettv));
|
||||
static void f_haslocaldir __ARGS((typval_T *argvars, typval_T *rettv));
|
||||
@@ -782,7 +785,7 @@ static char_u *find_name_end __ARGS((char_u *arg, char_u **expr_start, char_u **
|
||||
static char_u * make_expanded_name __ARGS((char_u *in_start, char_u *expr_start, char_u *expr_end, char_u *in_end));
|
||||
static int eval_isnamec __ARGS((int c));
|
||||
static int eval_isnamec1 __ARGS((int c));
|
||||
static int get_var_tv __ARGS((char_u *name, int len, typval_T *rettv, int verbose, int no_autoload));
|
||||
static int get_var_tv __ARGS((char_u *name, int len, typval_T *rettv, dictitem_T **dip, int verbose, int no_autoload));
|
||||
static int handle_subscript __ARGS((char_u **arg, typval_T *rettv, int evaluate, int verbose));
|
||||
static typval_T *alloc_tv __ARGS((void));
|
||||
static typval_T *alloc_string_tv __ARGS((char_u *string));
|
||||
@@ -801,11 +804,11 @@ static void delete_var __ARGS((hashtab_T *ht, hashitem_T *hi));
|
||||
static void list_one_var __ARGS((dictitem_T *v, char_u *prefix, int *first));
|
||||
static void list_one_var_a __ARGS((char_u *prefix, char_u *name, int type, char_u *string, int *first));
|
||||
static void set_var __ARGS((char_u *name, typval_T *varp, int copy));
|
||||
static int var_check_ro __ARGS((int flags, char_u *name));
|
||||
static int var_check_fixed __ARGS((int flags, char_u *name));
|
||||
static int var_check_ro __ARGS((int flags, char_u *name, int use_gettext));
|
||||
static int var_check_fixed __ARGS((int flags, char_u *name, int use_gettext));
|
||||
static int var_check_func_name __ARGS((char_u *name, int new_var));
|
||||
static int valid_varname __ARGS((char_u *varname));
|
||||
static int tv_check_lock __ARGS((int lock, char_u *name));
|
||||
static int tv_check_lock __ARGS((int lock, char_u *name, int use_gettext));
|
||||
static int item_copy __ARGS((typval_T *from, typval_T *to, int deep, int copyID));
|
||||
static char_u *find_option_end __ARGS((char_u **arg, int *opt_flags));
|
||||
static char_u *trans_function_name __ARGS((char_u **pp, int skip, int flags, funcdict_T *fd));
|
||||
@@ -887,6 +890,7 @@ eval_init()
|
||||
}
|
||||
set_vim_var_nr(VV_SEARCHFORWARD, 1L);
|
||||
set_vim_var_nr(VV_HLSEARCH, 1L);
|
||||
set_vim_var_dict(VV_COMPLETED_ITEM, dict_alloc());
|
||||
set_reg_var(0); /* default for v:register is not 0 but '"' */
|
||||
|
||||
#ifdef EBCDIC
|
||||
@@ -2256,7 +2260,7 @@ list_arg_vars(eap, arg, first)
|
||||
{
|
||||
if (tofree != NULL)
|
||||
name = tofree;
|
||||
if (get_var_tv(name, len, &tv, TRUE, FALSE) == FAIL)
|
||||
if (get_var_tv(name, len, &tv, NULL, TRUE, FALSE) == FAIL)
|
||||
error = TRUE;
|
||||
else
|
||||
{
|
||||
@@ -2807,7 +2811,7 @@ get_lval(name, rettv, lp, unlet, skip, flags, fne_flags)
|
||||
break;
|
||||
}
|
||||
/* existing variable, need to check if it can be changed */
|
||||
else if (var_check_ro(lp->ll_di->di_flags, name))
|
||||
else if (var_check_ro(lp->ll_di->di_flags, name, FALSE))
|
||||
return NULL;
|
||||
|
||||
if (len == -1)
|
||||
@@ -2925,10 +2929,15 @@ set_var_lval(lp, endp, rettv, copy, op)
|
||||
typval_T tv;
|
||||
|
||||
/* handle +=, -= and .= */
|
||||
di = NULL;
|
||||
if (get_var_tv(lp->ll_name, (int)STRLEN(lp->ll_name),
|
||||
&tv, TRUE, FALSE) == OK)
|
||||
&tv, &di, TRUE, FALSE) == OK)
|
||||
{
|
||||
if (tv_op(&tv, rettv, op) == OK)
|
||||
if ((di == NULL
|
||||
|| (!var_check_ro(di->di_flags, lp->ll_name, FALSE)
|
||||
&& !tv_check_lock(di->di_tv.v_lock, lp->ll_name,
|
||||
FALSE)))
|
||||
&& tv_op(&tv, rettv, op) == OK)
|
||||
set_var(lp->ll_name, &tv, FALSE);
|
||||
clear_tv(&tv);
|
||||
}
|
||||
@@ -2940,7 +2949,7 @@ set_var_lval(lp, endp, rettv, copy, op)
|
||||
}
|
||||
else if (tv_check_lock(lp->ll_newkey == NULL
|
||||
? lp->ll_tv->v_lock
|
||||
: lp->ll_tv->vval.v_dict->dv_lock, lp->ll_name))
|
||||
: lp->ll_tv->vval.v_dict->dv_lock, lp->ll_name, FALSE))
|
||||
;
|
||||
else if (lp->ll_range)
|
||||
{
|
||||
@@ -2952,7 +2961,7 @@ set_var_lval(lp, endp, rettv, copy, op)
|
||||
*/
|
||||
for (ri = rettv->vval.v_list->lv_first; ri != NULL && ll_li != NULL; )
|
||||
{
|
||||
if (tv_check_lock(ll_li->li_tv.v_lock, lp->ll_name))
|
||||
if (tv_check_lock(ll_li->li_tv.v_lock, lp->ll_name, FALSE))
|
||||
return;
|
||||
ri = ri->li_next;
|
||||
if (ri == NULL || (!lp->ll_empty2 && lp->ll_n2 == ll_n1))
|
||||
@@ -3657,7 +3666,10 @@ do_unlet_var(lp, name_end, forceit)
|
||||
ret = FAIL;
|
||||
*name_end = cc;
|
||||
}
|
||||
else if (tv_check_lock(lp->ll_tv->v_lock, lp->ll_name))
|
||||
else if ((lp->ll_list != NULL
|
||||
&& tv_check_lock(lp->ll_list->lv_lock, lp->ll_name, FALSE))
|
||||
|| (lp->ll_dict != NULL
|
||||
&& tv_check_lock(lp->ll_dict->dv_lock, lp->ll_name, FALSE)))
|
||||
return FAIL;
|
||||
else if (lp->ll_range)
|
||||
{
|
||||
@@ -3668,7 +3680,7 @@ do_unlet_var(lp, name_end, forceit)
|
||||
while (ll_li != NULL && (lp->ll_empty2 || lp->ll_n2 >= ll_n1))
|
||||
{
|
||||
li = ll_li->li_next;
|
||||
if (tv_check_lock(ll_li->li_tv.v_lock, lp->ll_name))
|
||||
if (tv_check_lock(ll_li->li_tv.v_lock, lp->ll_name, FALSE))
|
||||
return FAIL;
|
||||
ll_li = li;
|
||||
++ll_n1;
|
||||
@@ -3708,17 +3720,29 @@ do_unlet(name, forceit)
|
||||
hashtab_T *ht;
|
||||
hashitem_T *hi;
|
||||
char_u *varname;
|
||||
dict_T *d;
|
||||
dictitem_T *di;
|
||||
|
||||
ht = find_var_ht(name, &varname);
|
||||
if (ht != NULL && *varname != NUL)
|
||||
{
|
||||
if (ht == &globvarht)
|
||||
d = &globvardict;
|
||||
else if (current_funccal != NULL
|
||||
&& ht == ¤t_funccal->l_vars.dv_hashtab)
|
||||
d = ¤t_funccal->l_vars;
|
||||
else
|
||||
{
|
||||
di = find_var_in_ht(ht, *name, (char_u *)"", FALSE);
|
||||
d = di->di_tv.vval.v_dict;
|
||||
}
|
||||
hi = hash_find(ht, varname);
|
||||
if (!HASHITEM_EMPTY(hi))
|
||||
{
|
||||
di = HI2DI(hi);
|
||||
if (var_check_fixed(di->di_flags, name)
|
||||
|| var_check_ro(di->di_flags, name))
|
||||
if (var_check_fixed(di->di_flags, name, FALSE)
|
||||
|| var_check_ro(di->di_flags, name, FALSE)
|
||||
|| tv_check_lock(d->dv_lock, name, FALSE))
|
||||
return FAIL;
|
||||
delete_var(ht, hi);
|
||||
return OK;
|
||||
@@ -3789,7 +3813,7 @@ do_lock_var(lp, name_end, deep, lock)
|
||||
/* (un)lock a List item. */
|
||||
item_lock(&lp->ll_li->li_tv, deep, lock);
|
||||
else
|
||||
/* un(lock) a Dictionary item. */
|
||||
/* (un)lock a Dictionary item. */
|
||||
item_lock(&lp->ll_di->di_tv, deep, lock);
|
||||
|
||||
return ret;
|
||||
@@ -5230,7 +5254,7 @@ eval7(arg, rettv, evaluate, want_string)
|
||||
}
|
||||
}
|
||||
else if (evaluate)
|
||||
ret = get_var_tv(s, len, rettv, TRUE, FALSE);
|
||||
ret = get_var_tv(s, len, rettv, NULL, TRUE, FALSE);
|
||||
else
|
||||
ret = OK;
|
||||
}
|
||||
@@ -5724,8 +5748,10 @@ get_string_tv(arg, rettv, evaluate)
|
||||
|
||||
if (c == 'X')
|
||||
n = 2;
|
||||
else
|
||||
else if (*p == 'u')
|
||||
n = 4;
|
||||
else
|
||||
n = 8;
|
||||
nr = 0;
|
||||
while (--n >= 0 && vim_isxdigit(p[1]))
|
||||
{
|
||||
@@ -6764,6 +6790,8 @@ list_join(gap, l, sep, echo_style, copyID)
|
||||
join_T *p;
|
||||
int i;
|
||||
|
||||
if (l->lv_len < 1)
|
||||
return OK; /* nothing to do */
|
||||
ga_init2(&join_ga, (int)sizeof(join_T), l->lv_len);
|
||||
retval = list_join_inner(gap, l, sep, echo_style, copyID, &join_ga);
|
||||
|
||||
@@ -7268,7 +7296,7 @@ dictitem_alloc(key)
|
||||
if (di != NULL)
|
||||
{
|
||||
STRCPY(di->di_key, key);
|
||||
di->di_flags = 0;
|
||||
di->di_flags = DI_FLAGS_ALLOC;
|
||||
}
|
||||
return di;
|
||||
}
|
||||
@@ -7287,7 +7315,7 @@ dictitem_copy(org)
|
||||
if (di != NULL)
|
||||
{
|
||||
STRCPY(di->di_key, org->di_key);
|
||||
di->di_flags = 0;
|
||||
di->di_flags = DI_FLAGS_ALLOC;
|
||||
copy_tv(&org->di_tv, &di->di_tv);
|
||||
}
|
||||
return di;
|
||||
@@ -7319,7 +7347,8 @@ dictitem_free(item)
|
||||
dictitem_T *item;
|
||||
{
|
||||
clear_tv(&item->di_tv);
|
||||
vim_free(item);
|
||||
if (item->di_flags & DI_FLAGS_ALLOC)
|
||||
vim_free(item);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -8141,8 +8170,9 @@ static struct fst
|
||||
{"getwinposx", 0, 0, f_getwinposx},
|
||||
{"getwinposy", 0, 0, f_getwinposy},
|
||||
{"getwinvar", 2, 3, f_getwinvar},
|
||||
{"glob", 1, 3, f_glob},
|
||||
{"globpath", 2, 4, f_globpath},
|
||||
{"glob", 1, 4, f_glob},
|
||||
{"glob2regpat", 1, 1, f_glob2regpat},
|
||||
{"globpath", 2, 5, f_globpath},
|
||||
{"has", 1, 1, f_has},
|
||||
{"has_key", 2, 2, f_has_key},
|
||||
{"haslocaldir", 0, 0, f_haslocaldir},
|
||||
@@ -8282,7 +8312,7 @@ static struct fst
|
||||
{"str2float", 1, 1, f_str2float},
|
||||
#endif
|
||||
{"str2nr", 1, 2, f_str2nr},
|
||||
{"strchars", 1, 1, f_strchars},
|
||||
{"strchars", 1, 2, f_strchars},
|
||||
{"strdisplaywidth", 1, 2, f_strdisplaywidth},
|
||||
#ifdef HAVE_STRFTIME
|
||||
{"strftime", 1, 2, f_strftime},
|
||||
@@ -8917,7 +8947,8 @@ f_add(argvars, rettv)
|
||||
if (argvars[0].v_type == VAR_LIST)
|
||||
{
|
||||
if ((l = argvars[0].vval.v_list) != NULL
|
||||
&& !tv_check_lock(l->lv_lock, (char_u *)_("add() argument"))
|
||||
&& !tv_check_lock(l->lv_lock,
|
||||
(char_u *)N_("add() argument"), TRUE)
|
||||
&& list_append_tv(l, &argvars[1]) == OK)
|
||||
copy_tv(&argvars[0], rettv);
|
||||
}
|
||||
@@ -10269,7 +10300,11 @@ f_executable(argvars, rettv)
|
||||
typval_T *argvars;
|
||||
typval_T *rettv;
|
||||
{
|
||||
rettv->vval.v_number = mch_can_exe(get_tv_string(&argvars[0]), NULL);
|
||||
char_u *name = get_tv_string(&argvars[0]);
|
||||
|
||||
/* Check in $PATH and also check directly if there is a directory name. */
|
||||
rettv->vval.v_number = mch_can_exe(name, NULL, TRUE)
|
||||
|| (gettail(name) != name && mch_can_exe(name, NULL, FALSE));
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -10282,7 +10317,7 @@ f_exepath(argvars, rettv)
|
||||
{
|
||||
char_u *p = NULL;
|
||||
|
||||
(void)mch_can_exe(get_tv_string(&argvars[0]), &p);
|
||||
(void)mch_can_exe(get_tv_string(&argvars[0]), &p, TRUE);
|
||||
rettv->v_type = VAR_STRING;
|
||||
rettv->vval.v_string = p;
|
||||
}
|
||||
@@ -10350,7 +10385,7 @@ f_exists(argvars, rettv)
|
||||
{
|
||||
if (tofree != NULL)
|
||||
name = tofree;
|
||||
n = (get_var_tv(name, len, &tv, FALSE, TRUE) == OK);
|
||||
n = (get_var_tv(name, len, &tv, NULL, FALSE, TRUE) == OK);
|
||||
if (n)
|
||||
{
|
||||
/* handle d.key, l[idx], f(expr) */
|
||||
@@ -10475,6 +10510,7 @@ dict_extend(d1, d2, action)
|
||||
dictitem_T *di1;
|
||||
hashitem_T *hi2;
|
||||
int todo;
|
||||
char_u *arg_errmsg = (char_u *)N_("extend() argument");
|
||||
|
||||
todo = (int)d2->dv_hashtab.ht_used;
|
||||
for (hi2 = d2->dv_hashtab.ht_array; todo > 0; ++hi2)
|
||||
@@ -10509,6 +10545,9 @@ dict_extend(d1, d2, action)
|
||||
}
|
||||
else if (*action == 'f' && HI2DI(hi2) != di1)
|
||||
{
|
||||
if (tv_check_lock(di1->di_tv.v_lock, arg_errmsg, TRUE)
|
||||
|| var_check_ro(di1->di_flags, arg_errmsg, TRUE))
|
||||
break;
|
||||
clear_tv(&di1->di_tv);
|
||||
copy_tv(&HI2DI(hi2)->di_tv, &di1->di_tv);
|
||||
}
|
||||
@@ -10525,7 +10564,7 @@ f_extend(argvars, rettv)
|
||||
typval_T *argvars;
|
||||
typval_T *rettv;
|
||||
{
|
||||
char *arg_errmsg = N_("extend() argument");
|
||||
char_u *arg_errmsg = (char_u *)N_("extend() argument");
|
||||
|
||||
if (argvars[0].v_type == VAR_LIST && argvars[1].v_type == VAR_LIST)
|
||||
{
|
||||
@@ -10536,7 +10575,7 @@ f_extend(argvars, rettv)
|
||||
|
||||
l1 = argvars[0].vval.v_list;
|
||||
l2 = argvars[1].vval.v_list;
|
||||
if (l1 != NULL && !tv_check_lock(l1->lv_lock, (char_u *)_(arg_errmsg))
|
||||
if (l1 != NULL && !tv_check_lock(l1->lv_lock, arg_errmsg, TRUE)
|
||||
&& l2 != NULL)
|
||||
{
|
||||
if (argvars[2].v_type != VAR_UNKNOWN)
|
||||
@@ -10572,7 +10611,7 @@ f_extend(argvars, rettv)
|
||||
|
||||
d1 = argvars[0].vval.v_dict;
|
||||
d2 = argvars[1].vval.v_dict;
|
||||
if (d1 != NULL && !tv_check_lock(d1->dv_lock, (char_u *)_(arg_errmsg))
|
||||
if (d1 != NULL && !tv_check_lock(d1->dv_lock, arg_errmsg, TRUE)
|
||||
&& d2 != NULL)
|
||||
{
|
||||
/* Check the third argument. */
|
||||
@@ -10791,7 +10830,7 @@ filter_map(argvars, rettv, map)
|
||||
int rem;
|
||||
int todo;
|
||||
char_u *ermsg = (char_u *)(map ? "map()" : "filter()");
|
||||
char *arg_errmsg = (map ? N_("map() argument")
|
||||
char_u *arg_errmsg = (char_u *)(map ? N_("map() argument")
|
||||
: N_("filter() argument"));
|
||||
int save_did_emsg;
|
||||
int idx = 0;
|
||||
@@ -10799,13 +10838,13 @@ filter_map(argvars, rettv, map)
|
||||
if (argvars[0].v_type == VAR_LIST)
|
||||
{
|
||||
if ((l = argvars[0].vval.v_list) == NULL
|
||||
|| tv_check_lock(l->lv_lock, (char_u *)_(arg_errmsg)))
|
||||
|| (!map && tv_check_lock(l->lv_lock, arg_errmsg, TRUE)))
|
||||
return;
|
||||
}
|
||||
else if (argvars[0].v_type == VAR_DICT)
|
||||
{
|
||||
if ((d = argvars[0].vval.v_dict) == NULL
|
||||
|| tv_check_lock(d->dv_lock, (char_u *)_(arg_errmsg)))
|
||||
|| (!map && tv_check_lock(d->dv_lock, arg_errmsg, TRUE)))
|
||||
return;
|
||||
}
|
||||
else
|
||||
@@ -10844,8 +10883,9 @@ filter_map(argvars, rettv, map)
|
||||
|
||||
--todo;
|
||||
di = HI2DI(hi);
|
||||
if (tv_check_lock(di->di_tv.v_lock,
|
||||
(char_u *)_(arg_errmsg)))
|
||||
if (map &&
|
||||
(tv_check_lock(di->di_tv.v_lock, arg_errmsg, TRUE)
|
||||
|| var_check_ro(di->di_flags, arg_errmsg, TRUE)))
|
||||
break;
|
||||
vimvars[VV_KEY].vv_str = vim_strsave(di->di_key);
|
||||
r = filter_map_one(&di->di_tv, expr, map, &rem);
|
||||
@@ -10853,7 +10893,12 @@ filter_map(argvars, rettv, map)
|
||||
if (r == FAIL || did_emsg)
|
||||
break;
|
||||
if (!map && rem)
|
||||
{
|
||||
if (var_check_fixed(di->di_flags, arg_errmsg, TRUE)
|
||||
|| var_check_ro(di->di_flags, arg_errmsg, TRUE))
|
||||
break;
|
||||
dictitem_remove(d, di);
|
||||
}
|
||||
}
|
||||
}
|
||||
hash_unlock(ht);
|
||||
@@ -10864,7 +10909,7 @@ filter_map(argvars, rettv, map)
|
||||
|
||||
for (li = l->lv_first; li != NULL; li = nli)
|
||||
{
|
||||
if (tv_check_lock(li->li_tv.v_lock, (char_u *)_(arg_errmsg)))
|
||||
if (map && tv_check_lock(li->li_tv.v_lock, arg_errmsg, TRUE))
|
||||
break;
|
||||
nli = li->li_next;
|
||||
vimvars[VV_KEY].vv_nr = idx;
|
||||
@@ -12412,11 +12457,16 @@ f_glob(argvars, rettv)
|
||||
{
|
||||
if (get_tv_number_chk(&argvars[1], &error))
|
||||
options |= WILD_KEEP_ALL;
|
||||
if (argvars[2].v_type != VAR_UNKNOWN
|
||||
&& get_tv_number_chk(&argvars[2], &error))
|
||||
if (argvars[2].v_type != VAR_UNKNOWN)
|
||||
{
|
||||
rettv->v_type = VAR_LIST;
|
||||
rettv->vval.v_list = NULL;
|
||||
if (get_tv_number_chk(&argvars[2], &error))
|
||||
{
|
||||
rettv->v_type = VAR_LIST;
|
||||
rettv->vval.v_list = NULL;
|
||||
}
|
||||
if (argvars[3].v_type != VAR_UNKNOWN
|
||||
&& get_tv_number_chk(&argvars[3], &error))
|
||||
options |= WILD_ALLLINKS;
|
||||
}
|
||||
}
|
||||
if (!error)
|
||||
@@ -12466,11 +12516,16 @@ f_globpath(argvars, rettv)
|
||||
{
|
||||
if (get_tv_number_chk(&argvars[2], &error))
|
||||
flags |= WILD_KEEP_ALL;
|
||||
if (argvars[3].v_type != VAR_UNKNOWN
|
||||
&& get_tv_number_chk(&argvars[3], &error))
|
||||
if (argvars[3].v_type != VAR_UNKNOWN)
|
||||
{
|
||||
rettv->v_type = VAR_LIST;
|
||||
rettv->vval.v_list = NULL;
|
||||
if (get_tv_number_chk(&argvars[3], &error))
|
||||
{
|
||||
rettv->v_type = VAR_LIST;
|
||||
rettv->vval.v_list = NULL;
|
||||
}
|
||||
if (argvars[4].v_type != VAR_UNKNOWN
|
||||
&& get_tv_number_chk(&argvars[4], &error))
|
||||
flags |= WILD_ALLLINKS;
|
||||
}
|
||||
}
|
||||
if (file != NULL && !error)
|
||||
@@ -12489,6 +12544,20 @@ f_globpath(argvars, rettv)
|
||||
rettv->vval.v_string = NULL;
|
||||
}
|
||||
|
||||
/*
|
||||
* "glob2regpat()" function
|
||||
*/
|
||||
static void
|
||||
f_glob2regpat(argvars, rettv)
|
||||
typval_T *argvars;
|
||||
typval_T *rettv;
|
||||
{
|
||||
char_u *pat = get_tv_string_chk(&argvars[0]);
|
||||
|
||||
rettv->v_type = VAR_STRING;
|
||||
rettv->vval.v_string = file_pat_to_reg_pat(pat, NULL, NULL, FALSE);
|
||||
}
|
||||
|
||||
/*
|
||||
* "has()" function
|
||||
*/
|
||||
@@ -13693,7 +13762,7 @@ f_insert(argvars, rettv)
|
||||
if (argvars[0].v_type != VAR_LIST)
|
||||
EMSG2(_(e_listarg), "insert()");
|
||||
else if ((l = argvars[0].vval.v_list) != NULL
|
||||
&& !tv_check_lock(l->lv_lock, (char_u *)_("insert() argument")))
|
||||
&& !tv_check_lock(l->lv_lock, (char_u *)N_("insert() argument"), TRUE))
|
||||
{
|
||||
if (argvars[2].v_type != VAR_UNKNOWN)
|
||||
before = get_tv_number_chk(&argvars[2], &error);
|
||||
@@ -15774,14 +15843,14 @@ f_remove(argvars, rettv)
|
||||
char_u *key;
|
||||
dict_T *d;
|
||||
dictitem_T *di;
|
||||
char *arg_errmsg = N_("remove() argument");
|
||||
char_u *arg_errmsg = (char_u *)N_("remove() argument");
|
||||
|
||||
if (argvars[0].v_type == VAR_DICT)
|
||||
{
|
||||
if (argvars[2].v_type != VAR_UNKNOWN)
|
||||
EMSG2(_(e_toomanyarg), "remove()");
|
||||
else if ((d = argvars[0].vval.v_dict) != NULL
|
||||
&& !tv_check_lock(d->dv_lock, (char_u *)_(arg_errmsg)))
|
||||
&& !tv_check_lock(d->dv_lock, arg_errmsg, TRUE))
|
||||
{
|
||||
key = get_tv_string_chk(&argvars[1]);
|
||||
if (key != NULL)
|
||||
@@ -15789,7 +15858,8 @@ f_remove(argvars, rettv)
|
||||
di = dict_find(d, key, -1);
|
||||
if (di == NULL)
|
||||
EMSG2(_(e_dictkey), key);
|
||||
else
|
||||
else if (!var_check_fixed(di->di_flags, arg_errmsg, TRUE)
|
||||
&& !var_check_ro(di->di_flags, arg_errmsg, TRUE))
|
||||
{
|
||||
*rettv = di->di_tv;
|
||||
init_tv(&di->di_tv);
|
||||
@@ -15801,7 +15871,7 @@ f_remove(argvars, rettv)
|
||||
else if (argvars[0].v_type != VAR_LIST)
|
||||
EMSG2(_(e_listdictarg), "remove()");
|
||||
else if ((l = argvars[0].vval.v_list) != NULL
|
||||
&& !tv_check_lock(l->lv_lock, (char_u *)_(arg_errmsg)))
|
||||
&& !tv_check_lock(l->lv_lock, arg_errmsg, TRUE))
|
||||
{
|
||||
int error = FALSE;
|
||||
|
||||
@@ -16145,7 +16215,8 @@ f_reverse(argvars, rettv)
|
||||
if (argvars[0].v_type != VAR_LIST)
|
||||
EMSG2(_(e_listarg), "reverse()");
|
||||
else if ((l = argvars[0].vval.v_list) != NULL
|
||||
&& !tv_check_lock(l->lv_lock, (char_u *)_("reverse() argument")))
|
||||
&& !tv_check_lock(l->lv_lock,
|
||||
(char_u *)N_("reverse() argument"), TRUE))
|
||||
{
|
||||
li = l->lv_last;
|
||||
l->lv_first = l->lv_last = NULL;
|
||||
@@ -17050,6 +17121,7 @@ f_setmatches(argvars, rettv)
|
||||
list_T *l;
|
||||
listitem_T *li;
|
||||
dict_T *d;
|
||||
list_T *s = NULL;
|
||||
|
||||
rettv->vval.v_number = -1;
|
||||
if (argvars[0].v_type != VAR_LIST)
|
||||
@@ -17072,7 +17144,8 @@ f_setmatches(argvars, rettv)
|
||||
return;
|
||||
}
|
||||
if (!(dict_find(d, (char_u *)"group", -1) != NULL
|
||||
&& dict_find(d, (char_u *)"pattern", -1) != NULL
|
||||
&& (dict_find(d, (char_u *)"pattern", -1) != NULL
|
||||
|| dict_find(d, (char_u *)"pos1", -1) != NULL)
|
||||
&& dict_find(d, (char_u *)"priority", -1) != NULL
|
||||
&& dict_find(d, (char_u *)"id", -1) != NULL))
|
||||
{
|
||||
@@ -17086,11 +17159,53 @@ f_setmatches(argvars, rettv)
|
||||
li = l->lv_first;
|
||||
while (li != NULL)
|
||||
{
|
||||
int i = 0;
|
||||
char_u buf[5];
|
||||
dictitem_T *di;
|
||||
|
||||
d = li->li_tv.vval.v_dict;
|
||||
match_add(curwin, get_dict_string(d, (char_u *)"group", FALSE),
|
||||
|
||||
if (dict_find(d, (char_u *)"pattern", -1) == NULL)
|
||||
{
|
||||
if (s == NULL)
|
||||
{
|
||||
s = list_alloc();
|
||||
if (s == NULL)
|
||||
return;
|
||||
}
|
||||
|
||||
/* match from matchaddpos() */
|
||||
for (i = 1; i < 9; i++)
|
||||
{
|
||||
sprintf((char *)buf, (char *)"pos%d", i);
|
||||
if ((di = dict_find(d, (char_u *)buf, -1)) != NULL)
|
||||
{
|
||||
if (di->di_tv.v_type != VAR_LIST)
|
||||
return;
|
||||
|
||||
list_append_tv(s, &di->di_tv);
|
||||
s->lv_refcount++;
|
||||
}
|
||||
else
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (i == 0)
|
||||
{
|
||||
match_add(curwin, get_dict_string(d, (char_u *)"group", FALSE),
|
||||
get_dict_string(d, (char_u *)"pattern", FALSE),
|
||||
(int)get_dict_number(d, (char_u *)"priority"),
|
||||
(int)get_dict_number(d, (char_u *)"id"), NULL);
|
||||
}
|
||||
else
|
||||
{
|
||||
match_add(curwin, get_dict_string(d, (char_u *)"group", FALSE),
|
||||
NULL, (int)get_dict_number(d, (char_u *)"priority"),
|
||||
(int)get_dict_number(d, (char_u *)"id"), s);
|
||||
list_unref(s);
|
||||
s = NULL;
|
||||
}
|
||||
|
||||
li = li->li_next;
|
||||
}
|
||||
rettv->vval.v_number = 0;
|
||||
@@ -17679,7 +17794,8 @@ do_sort_uniq(argvars, rettv, sort)
|
||||
{
|
||||
l = argvars[0].vval.v_list;
|
||||
if (l == NULL || tv_check_lock(l->lv_lock,
|
||||
(char_u *)(sort ? _("sort() argument") : _("uniq() argument"))))
|
||||
(char_u *)(sort ? N_("sort() argument") : N_("uniq() argument")),
|
||||
TRUE))
|
||||
return;
|
||||
rettv->vval.v_list = l;
|
||||
rettv->v_type = VAR_LIST;
|
||||
@@ -18259,18 +18375,30 @@ f_strchars(argvars, rettv)
|
||||
typval_T *rettv;
|
||||
{
|
||||
char_u *s = get_tv_string(&argvars[0]);
|
||||
int skipcc = 0;
|
||||
#ifdef FEAT_MBYTE
|
||||
varnumber_T len = 0;
|
||||
|
||||
while (*s != NUL)
|
||||
{
|
||||
mb_cptr2char_adv(&s);
|
||||
++len;
|
||||
}
|
||||
rettv->vval.v_number = len;
|
||||
#else
|
||||
rettv->vval.v_number = (varnumber_T)(STRLEN(s));
|
||||
int (*func_mb_ptr2char_adv)(char_u **pp);
|
||||
#endif
|
||||
|
||||
if (argvars[1].v_type != VAR_UNKNOWN)
|
||||
skipcc = get_tv_number_chk(&argvars[1], NULL);
|
||||
if (skipcc < 0 || skipcc > 1)
|
||||
EMSG(_(e_invarg));
|
||||
else
|
||||
{
|
||||
#ifdef FEAT_MBYTE
|
||||
func_mb_ptr2char_adv = skipcc ? mb_ptr2char_adv : mb_cptr2char_adv;
|
||||
while (*s != NUL)
|
||||
{
|
||||
func_mb_ptr2char_adv(&s);
|
||||
++len;
|
||||
}
|
||||
rettv->vval.v_number = len;
|
||||
#else
|
||||
rettv->vval.v_number = (varnumber_T)(STRLEN(s));
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -18745,7 +18873,7 @@ get_cmd_output_as_rettv(argvars, rettv, retlist)
|
||||
* Write the string to a temp file, to be used for input of the shell
|
||||
* command.
|
||||
*/
|
||||
if ((infile = vim_tempname('i')) == NULL)
|
||||
if ((infile = vim_tempname('i', TRUE)) == NULL)
|
||||
{
|
||||
EMSG(_(e_notmp));
|
||||
goto errret;
|
||||
@@ -19104,7 +19232,7 @@ f_tempname(argvars, rettv)
|
||||
static int x = 'A';
|
||||
|
||||
rettv->v_type = VAR_STRING;
|
||||
rettv->vval.v_string = vim_tempname(x);
|
||||
rettv->vval.v_string = vim_tempname(x, FALSE);
|
||||
|
||||
/* Advance 'x' to use A-Z and 0-9, so that there are at least 34 different
|
||||
* names. Skip 'I' and 'O', they are used for shell redirection. */
|
||||
@@ -20451,6 +20579,35 @@ set_vim_var_list(idx, val)
|
||||
++val->lv_refcount;
|
||||
}
|
||||
|
||||
/*
|
||||
* Set Dictionary v: variable to "val".
|
||||
*/
|
||||
void
|
||||
set_vim_var_dict(idx, val)
|
||||
int idx;
|
||||
dict_T *val;
|
||||
{
|
||||
int todo;
|
||||
hashitem_T *hi;
|
||||
|
||||
dict_unref(vimvars[idx].vv_dict);
|
||||
vimvars[idx].vv_dict = val;
|
||||
if (val != NULL)
|
||||
{
|
||||
++val->dv_refcount;
|
||||
|
||||
/* Set readonly */
|
||||
todo = (int)val->dv_hashtab.ht_used;
|
||||
for (hi = val->dv_hashtab.ht_array; todo > 0 ; ++hi)
|
||||
{
|
||||
if (HASHITEM_EMPTY(hi))
|
||||
continue;
|
||||
--todo;
|
||||
HI2DI(hi)->di_flags = DI_FLAGS_RO | DI_FLAGS_FIX;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Set v:register if needed.
|
||||
*/
|
||||
@@ -20584,10 +20741,11 @@ set_cmdarg(eap, oldarg)
|
||||
* Return OK or FAIL.
|
||||
*/
|
||||
static int
|
||||
get_var_tv(name, len, rettv, verbose, no_autoload)
|
||||
get_var_tv(name, len, rettv, dip, verbose, no_autoload)
|
||||
char_u *name;
|
||||
int len; /* length of "name" */
|
||||
typval_T *rettv; /* NULL when only checking existence */
|
||||
dictitem_T **dip; /* non-NULL when typval's dict item is needed */
|
||||
int verbose; /* may give error message */
|
||||
int no_autoload; /* do not use script autoloading */
|
||||
{
|
||||
@@ -20618,7 +20776,11 @@ get_var_tv(name, len, rettv, verbose, no_autoload)
|
||||
{
|
||||
v = find_var(name, NULL, no_autoload);
|
||||
if (v != NULL)
|
||||
{
|
||||
tv = &v->di_tv;
|
||||
if (dip != NULL)
|
||||
*dip = v;
|
||||
}
|
||||
}
|
||||
|
||||
if (tv == NULL)
|
||||
@@ -21273,7 +21435,7 @@ vars_clear_ext(ht, free_val)
|
||||
v = HI2DI(hi);
|
||||
if (free_val)
|
||||
clear_tv(&v->di_tv);
|
||||
if ((v->di_flags & DI_FLAGS_FIX) == 0)
|
||||
if (v->di_flags & DI_FLAGS_ALLOC)
|
||||
vim_free(v);
|
||||
}
|
||||
}
|
||||
@@ -21391,8 +21553,8 @@ set_var(name, tv, copy)
|
||||
if (v != NULL)
|
||||
{
|
||||
/* existing variable, need to clear the value */
|
||||
if (var_check_ro(v->di_flags, name)
|
||||
|| tv_check_lock(v->di_tv.v_lock, name))
|
||||
if (var_check_ro(v->di_flags, name, FALSE)
|
||||
|| tv_check_lock(v->di_tv.v_lock, name, FALSE))
|
||||
return;
|
||||
if (v->di_tv.v_type != tv->v_type
|
||||
&& !((v->di_tv.v_type == VAR_STRING
|
||||
@@ -21412,8 +21574,8 @@ set_var(name, tv, copy)
|
||||
}
|
||||
|
||||
/*
|
||||
* Handle setting internal v: variables separately: we don't change
|
||||
* the type.
|
||||
* Handle setting internal v: variables separately where needed to
|
||||
* prevent changing the type.
|
||||
*/
|
||||
if (ht == &vimvarht)
|
||||
{
|
||||
@@ -21428,10 +21590,9 @@ set_var(name, tv, copy)
|
||||
v->di_tv.vval.v_string = tv->vval.v_string;
|
||||
tv->vval.v_string = NULL;
|
||||
}
|
||||
return;
|
||||
}
|
||||
else if (v->di_tv.v_type != VAR_NUMBER)
|
||||
EMSG2(_(e_intern2), "set_var()");
|
||||
else
|
||||
else if (v->di_tv.v_type == VAR_NUMBER)
|
||||
{
|
||||
v->di_tv.vval.v_number = get_tv_number(tv);
|
||||
if (STRCMP(varname, "searchforward") == 0)
|
||||
@@ -21443,8 +21604,10 @@ set_var(name, tv, copy)
|
||||
redraw_all_later(SOME_VALID);
|
||||
}
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
return;
|
||||
else if (v->di_tv.v_type != tv->v_type)
|
||||
EMSG2(_(e_intern2), "set_var()");
|
||||
}
|
||||
|
||||
clear_tv(&v->di_tv);
|
||||
@@ -21472,7 +21635,7 @@ set_var(name, tv, copy)
|
||||
vim_free(v);
|
||||
return;
|
||||
}
|
||||
v->di_flags = 0;
|
||||
v->di_flags = DI_FLAGS_ALLOC;
|
||||
}
|
||||
|
||||
if (copy || tv->v_type == VAR_NUMBER || tv->v_type == VAR_FLOAT)
|
||||
@@ -21490,18 +21653,19 @@ set_var(name, tv, copy)
|
||||
* Also give an error message.
|
||||
*/
|
||||
static int
|
||||
var_check_ro(flags, name)
|
||||
var_check_ro(flags, name, use_gettext)
|
||||
int flags;
|
||||
char_u *name;
|
||||
int use_gettext;
|
||||
{
|
||||
if (flags & DI_FLAGS_RO)
|
||||
{
|
||||
EMSG2(_(e_readonlyvar), name);
|
||||
EMSG2(_(e_readonlyvar), use_gettext ? (char_u *)_(name) : name);
|
||||
return TRUE;
|
||||
}
|
||||
if ((flags & DI_FLAGS_RO_SBX) && sandbox)
|
||||
{
|
||||
EMSG2(_(e_readonlysbx), name);
|
||||
EMSG2(_(e_readonlysbx), use_gettext ? (char_u *)_(name) : name);
|
||||
return TRUE;
|
||||
}
|
||||
return FALSE;
|
||||
@@ -21512,13 +21676,15 @@ var_check_ro(flags, name)
|
||||
* Also give an error message.
|
||||
*/
|
||||
static int
|
||||
var_check_fixed(flags, name)
|
||||
var_check_fixed(flags, name, use_gettext)
|
||||
int flags;
|
||||
char_u *name;
|
||||
int use_gettext;
|
||||
{
|
||||
if (flags & DI_FLAGS_FIX)
|
||||
{
|
||||
EMSG2(_("E795: Cannot delete variable %s"), name);
|
||||
EMSG2(_("E795: Cannot delete variable %s"),
|
||||
use_gettext ? (char_u *)_(name) : name);
|
||||
return TRUE;
|
||||
}
|
||||
return FALSE;
|
||||
@@ -21576,23 +21742,29 @@ valid_varname(varname)
|
||||
|
||||
/*
|
||||
* Return TRUE if typeval "tv" is set to be locked (immutable).
|
||||
* Also give an error message, using "name".
|
||||
* Also give an error message, using "name" or _("name") when use_gettext is
|
||||
* TRUE.
|
||||
*/
|
||||
static int
|
||||
tv_check_lock(lock, name)
|
||||
tv_check_lock(lock, name, use_gettext)
|
||||
int lock;
|
||||
char_u *name;
|
||||
int use_gettext;
|
||||
{
|
||||
if (lock & VAR_LOCKED)
|
||||
{
|
||||
EMSG2(_("E741: Value is locked: %s"),
|
||||
name == NULL ? (char_u *)_("Unknown") : name);
|
||||
name == NULL ? (char_u *)_("Unknown")
|
||||
: use_gettext ? (char_u *)_(name)
|
||||
: name);
|
||||
return TRUE;
|
||||
}
|
||||
if (lock & VAR_FIXED)
|
||||
{
|
||||
EMSG2(_("E742: Cannot change value of %s"),
|
||||
name == NULL ? (char_u *)_("Unknown") : name);
|
||||
name == NULL ? (char_u *)_("Unknown")
|
||||
: use_gettext ? (char_u *)_(name)
|
||||
: name);
|
||||
return TRUE;
|
||||
}
|
||||
return FALSE;
|
||||
@@ -22530,11 +22702,11 @@ ex_function(eap)
|
||||
if (fudi.fd_di == NULL)
|
||||
{
|
||||
/* Can't add a function to a locked dictionary */
|
||||
if (tv_check_lock(fudi.fd_dict->dv_lock, eap->arg))
|
||||
if (tv_check_lock(fudi.fd_dict->dv_lock, eap->arg, FALSE))
|
||||
goto erret;
|
||||
}
|
||||
/* Can't change an existing function if it is locked */
|
||||
else if (tv_check_lock(fudi.fd_di->di_tv.v_lock, eap->arg))
|
||||
else if (tv_check_lock(fudi.fd_di->di_tv.v_lock, eap->arg, FALSE))
|
||||
goto erret;
|
||||
|
||||
/* Give the function a sequential number. Can only be used with a
|
||||
@@ -23082,7 +23254,7 @@ func_dump_profile(fd)
|
||||
if (todo == 0)
|
||||
return; /* nothing to dump */
|
||||
|
||||
sorttab = (ufunc_T **)alloc((unsigned)(sizeof(ufunc_T) * todo));
|
||||
sorttab = (ufunc_T **)alloc((unsigned)(sizeof(ufunc_T *) * todo));
|
||||
|
||||
for (hi = func_hashtab.ht_array; todo > 0; ++hi)
|
||||
{
|
||||
@@ -23626,7 +23798,7 @@ call_user_func(fp, argcount, argvars, rettv, firstline, lastline, selfdict)
|
||||
+ STRLEN(name)));
|
||||
if (v == NULL)
|
||||
break;
|
||||
v->di_flags = DI_FLAGS_RO;
|
||||
v->di_flags = DI_FLAGS_RO | DI_FLAGS_FIX | DI_FLAGS_ALLOC;
|
||||
}
|
||||
STRCPY(v->di_key, name);
|
||||
hash_add(&fc->l_avars.dv_hashtab, DI2HIKEY(v));
|
||||
|
||||
@@ -741,6 +741,16 @@ do_move(line1, line2, dest)
|
||||
linenr_T extra; /* Num lines added before line1 */
|
||||
linenr_T num_lines; /* Num lines moved */
|
||||
linenr_T last_line; /* Last line in file after adding new text */
|
||||
#ifdef FEAT_FOLDING
|
||||
int isFolded;
|
||||
|
||||
/* Moving lines seems to corrupt the folds, delete folding info now
|
||||
* and recreate it when finished. Don't do this for manual folding, it
|
||||
* would delete all folds. */
|
||||
isFolded = hasAnyFolding(curwin) && !foldmethodIsManual(curwin);
|
||||
if (isFolded)
|
||||
deleteFoldRecurse(&curwin->w_folds);
|
||||
#endif
|
||||
|
||||
if (dest >= line1 && dest < line2)
|
||||
{
|
||||
@@ -839,6 +849,12 @@ do_move(line1, line2, dest)
|
||||
else
|
||||
changed_lines(dest + 1, 0, line1 + num_lines, 0L);
|
||||
|
||||
#ifdef FEAT_FOLDING
|
||||
/* recreate folds */
|
||||
if (isFolded)
|
||||
foldUpdateAll(curwin);
|
||||
#endif
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
||||
@@ -1158,8 +1174,8 @@ do_filter(line1, line2, eap, cmd, do_in, do_out)
|
||||
}
|
||||
else
|
||||
#endif
|
||||
if ((do_in && (itmp = vim_tempname('i')) == NULL)
|
||||
|| (do_out && (otmp = vim_tempname('o')) == NULL))
|
||||
if ((do_in && (itmp = vim_tempname('i', FALSE)) == NULL)
|
||||
|| (do_out && (otmp = vim_tempname('o', FALSE)) == NULL))
|
||||
{
|
||||
EMSG(_(e_notmp));
|
||||
goto filterend;
|
||||
@@ -1963,7 +1979,7 @@ write_viminfo(file, forceit)
|
||||
if (fp_out == NULL)
|
||||
{
|
||||
vim_free(tempname);
|
||||
if ((tempname = vim_tempname('o')) != NULL)
|
||||
if ((tempname = vim_tempname('o', TRUE)) != NULL)
|
||||
fp_out = mch_fopen((char *)tempname, WRITEBIN);
|
||||
}
|
||||
|
||||
@@ -3185,7 +3201,7 @@ do_ecmd(fnum, ffname, sfname, eap, newlnum, flags, oldwin)
|
||||
#endif
|
||||
int retval = FAIL;
|
||||
long n;
|
||||
linenr_T lnum;
|
||||
pos_T orig_pos;
|
||||
linenr_T topline = 0;
|
||||
int newcol = -1;
|
||||
int solcol = -1;
|
||||
@@ -3375,7 +3391,6 @@ do_ecmd(fnum, ffname, sfname, eap, newlnum, flags, oldwin)
|
||||
if (buf->b_ml.ml_mfp == NULL) /* no memfile yet */
|
||||
{
|
||||
oldbuf = FALSE;
|
||||
buf->b_nwindows = 0;
|
||||
}
|
||||
else /* existing memfile */
|
||||
{
|
||||
@@ -3408,7 +3423,7 @@ do_ecmd(fnum, ffname, sfname, eap, newlnum, flags, oldwin)
|
||||
* Make the (new) buffer the one used by the current window.
|
||||
* If the old buffer becomes unused, free it if ECMD_HIDE is FALSE.
|
||||
* If the current buffer was empty and has no file name, curbuf
|
||||
* is returned by buflist_new().
|
||||
* is returned by buflist_new(), nothing to do here.
|
||||
*/
|
||||
if (buf != curbuf)
|
||||
{
|
||||
@@ -3515,8 +3530,6 @@ do_ecmd(fnum, ffname, sfname, eap, newlnum, flags, oldwin)
|
||||
au_new_curbuf = NULL;
|
||||
#endif
|
||||
}
|
||||
else
|
||||
++curbuf->b_nwindows;
|
||||
|
||||
curwin->w_pcmark.lnum = 1;
|
||||
curwin->w_pcmark.col = 0;
|
||||
@@ -3681,7 +3694,7 @@ do_ecmd(fnum, ffname, sfname, eap, newlnum, flags, oldwin)
|
||||
* Careful: open_buffer() and apply_autocmds() may change the current
|
||||
* buffer and window.
|
||||
*/
|
||||
lnum = curwin->w_cursor.lnum;
|
||||
orig_pos = curwin->w_cursor;
|
||||
topline = curwin->w_topline;
|
||||
if (!oldbuf) /* need to read the file */
|
||||
{
|
||||
@@ -3722,11 +3735,9 @@ do_ecmd(fnum, ffname, sfname, eap, newlnum, flags, oldwin)
|
||||
check_arg_idx(curwin);
|
||||
#endif
|
||||
|
||||
/*
|
||||
* If autocommands change the cursor position or topline, we should
|
||||
* keep it.
|
||||
*/
|
||||
if (curwin->w_cursor.lnum != lnum)
|
||||
/* If autocommands change the cursor position or topline, we should
|
||||
* keep it. Also when it moves within a line. */
|
||||
if (!equalpos(curwin->w_cursor, orig_pos))
|
||||
{
|
||||
newlnum = curwin->w_cursor.lnum;
|
||||
newcol = curwin->w_cursor.col;
|
||||
@@ -4268,6 +4279,8 @@ do_sub(eap)
|
||||
static int do_list = FALSE; /* list last line with subs. */
|
||||
static int do_number = FALSE; /* list last line with line nr*/
|
||||
static int do_ic = 0; /* ignore case flag */
|
||||
int save_do_all; /* remember user specified 'g' flag */
|
||||
int save_do_ask; /* remember user specified 'c' flag */
|
||||
char_u *pat = NULL, *sub = NULL; /* init for GCC */
|
||||
int delimiter;
|
||||
int sublen;
|
||||
@@ -4503,6 +4516,9 @@ do_sub(eap)
|
||||
if (do_count)
|
||||
do_ask = FALSE;
|
||||
|
||||
save_do_all = do_all;
|
||||
save_do_ask = do_ask;
|
||||
|
||||
/*
|
||||
* check for a trailing count
|
||||
*/
|
||||
@@ -5316,6 +5332,10 @@ outofmem:
|
||||
#endif
|
||||
|
||||
vim_regfree(regmatch.regprog);
|
||||
|
||||
/* Restore the flag values, they can be used for ":&&". */
|
||||
do_all = save_do_all;
|
||||
do_ask = save_do_ask;
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -1108,7 +1108,7 @@ ex_profile(eap)
|
||||
if (len == 5 && STRNCMP(eap->arg, "start", 5) == 0 && *e != NUL)
|
||||
{
|
||||
vim_free(profile_fname);
|
||||
profile_fname = vim_strsave(e);
|
||||
profile_fname = expand_env_save_opt(e, TRUE);
|
||||
do_profiling = PROF_YES;
|
||||
profile_zero(&prof_wait_time);
|
||||
set_vim_var_nr(VV_PROFILING, 1L);
|
||||
@@ -2440,7 +2440,7 @@ ex_listdo(eap)
|
||||
win_T *wp;
|
||||
tabpage_T *tp;
|
||||
#endif
|
||||
buf_T *buf;
|
||||
buf_T *buf = curbuf;
|
||||
int next_fnum = 0;
|
||||
#if defined(FEAT_AUTOCMD) && defined(FEAT_SYN_HL)
|
||||
char_u *save_ei = NULL;
|
||||
@@ -2493,20 +2493,28 @@ ex_listdo(eap)
|
||||
case CMD_argdo:
|
||||
i = eap->line1 - 1;
|
||||
break;
|
||||
case CMD_bufdo:
|
||||
i = eap->line1;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
/* set pcmark now */
|
||||
if (eap->cmdidx == CMD_bufdo)
|
||||
goto_buffer(eap, DOBUF_FIRST, FORWARD, i);
|
||||
{
|
||||
/* Advance to the first listed buffer after "eap->line1". */
|
||||
for (buf = firstbuf; buf != NULL && (buf->b_fnum < eap->line1
|
||||
|| !buf->b_p_bl); buf = buf->b_next)
|
||||
if (buf->b_fnum > eap->line2)
|
||||
{
|
||||
buf = NULL;
|
||||
break;
|
||||
}
|
||||
if (buf != NULL)
|
||||
goto_buffer(eap, DOBUF_FIRST, FORWARD, buf->b_fnum);
|
||||
}
|
||||
else
|
||||
setpcmark();
|
||||
listcmd_busy = TRUE; /* avoids setting pcmark below */
|
||||
|
||||
while (!got_int)
|
||||
while (!got_int && buf != NULL)
|
||||
{
|
||||
if (eap->cmdidx == CMD_argdo)
|
||||
{
|
||||
|
||||
@@ -7092,7 +7092,14 @@ ex_quit(eap)
|
||||
else
|
||||
{
|
||||
#ifdef FEAT_WINDOWS
|
||||
if (only_one_window()) /* quit last window */
|
||||
/* quit last window
|
||||
* Note: only_one_window() returns true, even so a help window is
|
||||
* still open. In that case only quit, if no address has been
|
||||
* specified. Example:
|
||||
* :h|wincmd w|1q - don't quit
|
||||
* :h|wincmd w|q - quit
|
||||
*/
|
||||
if (only_one_window() && (firstwin == lastwin || eap->addr_count == 0))
|
||||
#endif
|
||||
getout(0);
|
||||
#ifdef FEAT_WINDOWS
|
||||
@@ -8145,7 +8152,7 @@ ex_tabnext(eap)
|
||||
ex_tabmove(eap)
|
||||
exarg_T *eap;
|
||||
{
|
||||
int tab_number = 9999;
|
||||
int tab_number;
|
||||
|
||||
if (eap->arg && *eap->arg != NUL)
|
||||
{
|
||||
@@ -8166,19 +8173,38 @@ ex_tabmove(eap)
|
||||
else
|
||||
p = eap->arg;
|
||||
|
||||
if (p == skipdigits(p))
|
||||
if (relative == 0)
|
||||
{
|
||||
/* No numbers as argument. */
|
||||
eap->errmsg = e_invarg;
|
||||
return;
|
||||
if (STRCMP(p, "$") == 0)
|
||||
tab_number = LAST_TAB_NR;
|
||||
else if (p == skipdigits(p))
|
||||
{
|
||||
/* No numbers as argument. */
|
||||
eap->errmsg = e_invarg;
|
||||
return;
|
||||
}
|
||||
else
|
||||
tab_number = getdigits(&p);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (*p != NUL)
|
||||
tab_number = getdigits(&p);
|
||||
else
|
||||
tab_number = 1;
|
||||
tab_number = tab_number * relative + tabpage_index(curtab);
|
||||
if (relative == -1)
|
||||
--tab_number;
|
||||
}
|
||||
|
||||
tab_number = getdigits(&p);
|
||||
if (relative != 0)
|
||||
tab_number = tab_number * relative + tabpage_index(curtab) - 1;;
|
||||
}
|
||||
else if (eap->addr_count != 0)
|
||||
{
|
||||
tab_number = eap->line2;
|
||||
if (**eap->cmdlinep == '-')
|
||||
--tab_number;
|
||||
}
|
||||
else
|
||||
tab_number = LAST_TAB_NR;
|
||||
|
||||
tabpage_move(tab_number);
|
||||
}
|
||||
@@ -10727,7 +10753,11 @@ arg_all()
|
||||
}
|
||||
for ( ; *p != NUL; ++p)
|
||||
{
|
||||
if (*p == ' ' || *p == '\\')
|
||||
if (*p == ' '
|
||||
#ifndef BACKSLASH_IN_FILENAME
|
||||
|| *p == '\\'
|
||||
#endif
|
||||
)
|
||||
{
|
||||
/* insert a backslash */
|
||||
if (retval != NULL)
|
||||
@@ -10845,7 +10875,6 @@ makeopens(fd, dirnow)
|
||||
buf_T *buf;
|
||||
int only_save_windows = TRUE;
|
||||
int nr;
|
||||
int cnr = 1;
|
||||
int restore_size = TRUE;
|
||||
win_T *wp;
|
||||
char_u *sname;
|
||||
@@ -10983,7 +11012,8 @@ makeopens(fd, dirnow)
|
||||
tab_topframe = topframe;
|
||||
for (tabnr = 1; ; ++tabnr)
|
||||
{
|
||||
int need_tabnew = FALSE;
|
||||
int need_tabnew = FALSE;
|
||||
int cnr = 1;
|
||||
|
||||
if ((ssop_flags & SSOP_TABPAGES))
|
||||
{
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user