updated for version 7.0012
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
*diff.txt* For Vim version 7.0aa. Last change: 2004 Jul 11
|
||||
*diff.txt* For Vim version 7.0aa. Last change: 2004 Jul 20
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -344,6 +344,10 @@ get an error message. Possible causes:
|
||||
If it's not clear what the problem is set the 'verbose' option to see more
|
||||
messages.
|
||||
|
||||
The self-installing Vim includes a diff program. If you don't have it you
|
||||
might want to download a diff.exe. For example from
|
||||
http://jlb.twu.net/code/unixkit.php.
|
||||
|
||||
|
||||
USING PATCHES *diff-patchexpr*
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
*eval.txt* For Vim version 7.0aa. Last change: 2004 Jul 19
|
||||
*eval.txt* For Vim version 7.0aa. Last change: 2004 Jul 25
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -846,8 +846,10 @@ getbufvar( {expr}, {varname}) variable {varname} in buffer {expr}
|
||||
getcmdline() String return the current command-line
|
||||
getcmdpos() Number return cursor position in command-line
|
||||
getcwd() String the current working directory
|
||||
getfsize( {fname}) Number size in bytes of file
|
||||
getfperm( {fname}) String file permissions of file {fname}
|
||||
getfsize( {fname}) Number size in bytes of file {fname}
|
||||
getftime( {fname}) Number last modification time of file
|
||||
getftype( {fname}) String description of type of file {fname}
|
||||
getline( {lnum}) String line {lnum} from current buffer
|
||||
getreg( [{regname}]) String contents of register
|
||||
getregtype( [{regname}]) String type of register
|
||||
@ -1580,6 +1582,20 @@ getfsize({fname}) *getfsize()*
|
||||
If {fname} is a directory, 0 is returned.
|
||||
If the file {fname} can't be found, -1 is returned.
|
||||
|
||||
getfperm({fname}) *getfperm()*
|
||||
The result is a String, which is the read, write, and execute
|
||||
permissions of the given file {fname}.
|
||||
If {fname} does not exist or its directory cannot be read, an
|
||||
empty string is returned.
|
||||
The result is of the form "rwxrwxrwx", where each group of
|
||||
"rwx" flags represent, in turn, the permissions of the owner
|
||||
of the file, the group the file belongs to, and other users.
|
||||
If a user does not have a given permission the flag for this
|
||||
is replaced with the string "-". Example: >
|
||||
:echo getfperm("/etc/passwd")
|
||||
< This will hopefully (from a security point of view) display
|
||||
the string "rw-r--r--" or even "rw-------".
|
||||
|
||||
getftime({fname}) *getftime()*
|
||||
The result is a Number, which is the last modification time of
|
||||
the given file {fname}. The value is measured as seconds
|
||||
@ -1587,6 +1603,26 @@ getftime({fname}) *getftime()*
|
||||
|localtime()| and |strftime()|.
|
||||
If the file {fname} can't be found -1 is returned.
|
||||
|
||||
getftype({fname}) *getftype()*
|
||||
The result is a String, which is a description of the kind of
|
||||
file of the given file {fname}.
|
||||
If {fname} does not exist an empty string is returned.
|
||||
Here is a table over different kinds of files and their
|
||||
results:
|
||||
Normal file "file"
|
||||
Directory "dir"
|
||||
Symbolic link "link"
|
||||
Block device "bdev"
|
||||
Character device "cdev"
|
||||
Socket "socket"
|
||||
FIFO "fifo"
|
||||
All other "other"
|
||||
Example: >
|
||||
getftype("/home")
|
||||
< Note that a type such as "link" will only be returned on
|
||||
systems that support it. On some systems only "dir" and
|
||||
"file" are returned.
|
||||
|
||||
*getline()*
|
||||
getline({lnum}) The result is a String, which is line {lnum} from the current
|
||||
buffer. Example: >
|
||||
@ -2246,14 +2282,16 @@ search({pattern} [, {flags}]) *search()*
|
||||
cursor position.
|
||||
{flags} is a String, which can contain these character flags:
|
||||
'b' search backward instead of forward
|
||||
'n' do Not move the cursor
|
||||
'w' wrap around the end of the file
|
||||
'W' don't wrap around the end of the file
|
||||
If neither 'w' or 'W' is given, the 'wrapscan' option applies.
|
||||
|
||||
When a match has been found its line number is returned, and
|
||||
the cursor will be positioned at the match. If there is no
|
||||
match a 0 is returned and the cursor doesn't move. No error
|
||||
message is given.
|
||||
When a match has been found its line number is returned.
|
||||
The cursor will be positioned at the match, unless the 'n'
|
||||
flag is used).
|
||||
If there is no match a 0 is returned and the cursor doesn't
|
||||
move. No error message is given.
|
||||
|
||||
Example (goes over all files in the argument list): >
|
||||
:let n = 1
|
||||
@ -2747,9 +2785,15 @@ winline() The result is a Number, which is the screen line of the cursor
|
||||
the window. The first line is one.
|
||||
|
||||
*winnr()*
|
||||
winnr() The result is a Number, which is the number of the current
|
||||
window. The top window has number 1. The number can be used
|
||||
with |CTRL-W_w| and ":wincmd w" |:wincmd|.
|
||||
winnr([{arg}]) The result is a Number, which is the number of the current
|
||||
window. The top window has number 1.
|
||||
When the optional argument is "$", the number of the
|
||||
last window is returnd (the window count).
|
||||
When the optional argument is "#", the number of the last
|
||||
accessed window is returned (where |CTRL-W_p| goes to).
|
||||
If there is no previous window 0 is returned.
|
||||
The number can be used with |CTRL-W_w| and ":wincmd w"
|
||||
|:wincmd|.
|
||||
|
||||
*winrestcmd()*
|
||||
winrestcmd() Returns a sequence of |:resize| commands that should restore
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
*if_cscop.txt* For Vim version 7.0aa. Last change: 2004 Jan 17
|
||||
*if_cscop.txt* For Vim version 7.0aa. Last change: 2004 Jul 23
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Andy Kahn
|
||||
@ -335,6 +335,9 @@ cscope version for Win32 see:
|
||||
|
||||
http://iamphet.nm.ru/cscope/index.html
|
||||
|
||||
The DJGPP-built version from http://cscope.sourceforge.net is known to not
|
||||
work with Vim.
|
||||
|
||||
There are a couple of hard-coded limitations:
|
||||
|
||||
1. The maximum number of cscope connections allowed is 8. Do you
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
*if_pyth.txt* For Vim version 7.0aa. Last change: 2004 Feb 28
|
||||
*if_pyth.txt* For Vim version 7.0aa. Last change: 2004 Jul 25
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Paul Moore
|
||||
@ -91,23 +91,23 @@ module before using it: >
|
||||
:python import vim
|
||||
|
||||
Overview >
|
||||
print "Hello" # displays a message
|
||||
vim.command(cmd) # execute an ex command
|
||||
w = vim.windows[n] # gets window "n"
|
||||
cw = vim.current.window # gets the current window
|
||||
b = vim.buffers[n] # gets buffer "n"
|
||||
cb = vim.current.buffer # gets the current buffer
|
||||
w.height = lines # sets the window height
|
||||
w.cursor = (row, col) # sets the window cursor position
|
||||
pos = w.cursor # gets a tuple (row, col)
|
||||
name = b.name # gets the buffer file name
|
||||
line = b[n] # gets a line from the buffer
|
||||
lines = b[n:m] # gets a list of lines
|
||||
num = len(b) # gets the number of lines
|
||||
b[n] = str # sets a line in the buffer
|
||||
b[n:m] = [str1, str2, str3] # sets a number of lines at once
|
||||
del b[n] # deletes a line
|
||||
del b[n:m] # deletes a number of lines
|
||||
:py print "Hello" # displays a message
|
||||
:py vim.command(cmd) # execute an ex command
|
||||
:py w = vim.windows[n] # gets window "n"
|
||||
:py cw = vim.current.window # gets the current window
|
||||
:py b = vim.buffers[n] # gets buffer "n"
|
||||
:py cb = vim.current.buffer # gets the current buffer
|
||||
:py w.height = lines # sets the window height
|
||||
:py w.cursor = (row, col) # sets the window cursor position
|
||||
:py pos = w.cursor # gets a tuple (row, col)
|
||||
:py name = b.name # gets the buffer file name
|
||||
:py line = b[n] # gets a line from the buffer
|
||||
:py lines = b[n:m] # gets a list of lines
|
||||
:py num = len(b) # gets the number of lines
|
||||
:py b[n] = str # sets a line in the buffer
|
||||
:py b[n:m] = [str1, str2, str3] # sets a number of lines at once
|
||||
:py del b[n] # deletes a line
|
||||
:py del b[n:m] # deletes a number of lines
|
||||
|
||||
|
||||
Methods of the "vim" module
|
||||
@ -115,8 +115,8 @@ Methods of the "vim" module
|
||||
vim.command(str) *python-command*
|
||||
Executes the vim (ex-mode) command str. Returns None.
|
||||
Examples: >
|
||||
vim.command("set tw=72")
|
||||
vim.command("%s/aaa/bbb/g")
|
||||
:py vim.command("set tw=72")
|
||||
:py vim.command("%s/aaa/bbb/g")
|
||||
< The following definition executes Normal mode commands: >
|
||||
def normal(str):
|
||||
vim.command("normal "+str)
|
||||
@ -126,15 +126,15 @@ vim.command(str) *python-command*
|
||||
< *E659*
|
||||
The ":python" command cannot be used recursively with Python 2.2 and
|
||||
older. This only works with Python 2.3 and later: >
|
||||
:python vim.command("python print 'Hello again Python'")
|
||||
:py vim.command("python print 'Hello again Python'")
|
||||
|
||||
vim.eval(str) *python-eval*
|
||||
Evaluates the expression str using the vim internal expression
|
||||
evaluator (see |expression|). Returns the expression result as a
|
||||
string.
|
||||
Examples: >
|
||||
text_width = vim.eval("&tw")
|
||||
str = vim.eval("12+12") # NB result is a string! Use
|
||||
:py text_width = vim.eval("&tw")
|
||||
:py str = vim.eval("12+12") # NB result is a string! Use
|
||||
# string.atoi() to convert to
|
||||
# a number.
|
||||
|
||||
@ -158,18 +158,18 @@ Constants of the "vim" module
|
||||
vim.buffers *python-buffers*
|
||||
A sequence object providing access to the list of vim buffers. The
|
||||
object supports the following operations: >
|
||||
b = vim.buffers[i] # Indexing (read-only)
|
||||
b in vim.buffers # Membership test
|
||||
n = len(vim.buffers) # Number of elements
|
||||
for b in vim.buffers: # Sequential access
|
||||
:py b = vim.buffers[i] # Indexing (read-only)
|
||||
:py b in vim.buffers # Membership test
|
||||
:py n = len(vim.buffers) # Number of elements
|
||||
:py for b in vim.buffers: # Sequential access
|
||||
<
|
||||
vim.windows *python-windows*
|
||||
A sequence object providing access to the list of vim windows. The
|
||||
object supports the following operations: >
|
||||
w = vim.windows[i] # Indexing (read-only)
|
||||
w in vim.windows # Membership test
|
||||
n = len(vim.windows) # Number of elements
|
||||
for w in vim.windows: # Sequential access
|
||||
:py w = vim.windows[i] # Indexing (read-only)
|
||||
:py w in vim.windows # Membership test
|
||||
:py n = len(vim.windows) # Number of elements
|
||||
:py for w in vim.windows: # Sequential access
|
||||
<
|
||||
vim.current *python-current*
|
||||
An object providing access (via specific attributes) to various
|
||||
@ -236,17 +236,21 @@ The buffer object methods are:
|
||||
represents the part of the given buffer between line
|
||||
numbers s and e |inclusive|.
|
||||
|
||||
Note that when adding a line it must not contain a line break character '\n'.
|
||||
A trailing '\n' is allowed and ignored, so that you can do: >
|
||||
:py b.append(f.readlines())
|
||||
|
||||
Examples (assume b is the current buffer) >
|
||||
print b.name # write the buffer file name
|
||||
b[0] = "hello!!!" # replace the top line
|
||||
b[:] = None # delete the whole buffer
|
||||
del b[:] # delete the whole buffer (same as above)
|
||||
b[0:0] = [ "a line" ] # add a line at the top
|
||||
del b[2] # delete a line (the third)
|
||||
b.append("bottom") # add a line at the bottom
|
||||
n = len(b) # number of lines
|
||||
(row,col) = b.mark('a') # named mark
|
||||
r = b.range(1,5) # a sub-range of the buffer
|
||||
:py print b.name # write the buffer file name
|
||||
:py b[0] = "hello!!!" # replace the top line
|
||||
:py b[:] = None # delete the whole buffer
|
||||
:py del b[:] # delete the whole buffer
|
||||
:py b[0:0] = [ "a line" ] # add a line at the top
|
||||
:py del b[2] # delete a line (the third)
|
||||
:py b.append("bottom") # add a line at the bottom
|
||||
:py n = len(b) # number of lines
|
||||
:py (row,col) = b.mark('a') # named mark
|
||||
:py r = b.range(1,5) # a sub-range of the buffer
|
||||
|
||||
==============================================================================
|
||||
4. Range objects *python-range*
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
*message.txt* For Vim version 7.0aa. Last change: 2004 Jan 17
|
||||
*message.txt* For Vim version 7.0aa. Last change: 2004 Jul 23
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -643,6 +643,7 @@ and |+X11| features.
|
||||
A command line started with a backslash or the range of a command contained a
|
||||
backslash in a wrong place. This is often caused by command-line continuation
|
||||
being disabled. Remove the 'C' flag from the 'cpoptions' option to enable it.
|
||||
Or use ":set nocp".
|
||||
|
||||
*E471* >
|
||||
Argument required
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
*motion.txt* For Vim version 7.0aa. Last change: 2004 Jul 02
|
||||
*motion.txt* For Vim version 7.0aa. Last change: 2004 Jul 25
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -83,6 +83,7 @@ are however, two general exceptions:
|
||||
end of the motion is moved to the end of the previous line and the motion
|
||||
becomes inclusive. Example: "}" moves to the first line after a paragraph,
|
||||
but "d}" will not include that line.
|
||||
*exclusive-linewise*
|
||||
2. If the motion is exclusive, the end of the motion is in column 1 and the
|
||||
start of the motion was at or before the first non-blank in the line, the
|
||||
motion becomes linewise. Example: If a paragraph begins with some blanks
|
||||
@ -424,20 +425,24 @@ between Vi and Vim.
|
||||
|
||||
*]]*
|
||||
]] [count] sections forward or to the next '{' in the
|
||||
first column. When used after an operator, then the
|
||||
'}' in the first column. |linewise|
|
||||
first column. When used after an operator, then also
|
||||
stops below a '}' in the first column. |exclusive|
|
||||
Note that |exclusive-linewise| often applies.
|
||||
|
||||
*][*
|
||||
][ [count] sections forward or to the next '}' in the
|
||||
first column. |linewise|
|
||||
first column. |exclusive|
|
||||
Note that |exclusive-linewise| often applies.
|
||||
|
||||
*[[*
|
||||
[[ [count] sections backward or to the previous '{' in
|
||||
the first column. |linewise|
|
||||
the first column. |exclusive|
|
||||
Note that |exclusive-linewise| often applies.
|
||||
|
||||
*[]*
|
||||
[] [count] sections backward or to the previous '}' in
|
||||
the first column. |linewise|
|
||||
the first column. |exclusive|
|
||||
Note that |exclusive-linewise| often applies.
|
||||
|
||||
These commands move over three kinds of text objects.
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
*options.txt* For Vim version 7.0aa. Last change: 2004 Jul 15
|
||||
*options.txt* For Vim version 7.0aa. Last change: 2004 Jul 24
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -3924,7 +3924,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
NOTE: To avoid portability problems with using patterns, always keep
|
||||
this option at the default "on". Only switch it off when working with
|
||||
old Vi scripts. In any other situation write patterns that work when
|
||||
'magic' is on.
|
||||
'magic' is on. Include "\M" when you want to |/\M|.
|
||||
|
||||
*'makeef'* *'mef'*
|
||||
'makeef' 'mef' string (default: "")
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
*pattern.txt* For Vim version 7.0aa. Last change: 2004 May 09
|
||||
*pattern.txt* For Vim version 7.0aa. Last change: 2004 Jul 24
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -382,7 +382,7 @@ More explanation and examples below, follow the links.
|
||||
|/\%c| \%23c \%23c in column 23 |/zero-width|
|
||||
|/\%v| \%23v \%23v in virtual column 23 |/zero-width|
|
||||
|
||||
Character classes {not in Vi}:
|
||||
Character classes {not in Vi}: */character-classes*
|
||||
|/\i| \i \i identifier character (see 'isident' option)
|
||||
|/\I| \I \I like "\i", but excluding digits
|
||||
|/\k| \k \k keyword character (see 'iskeyword' option)
|
||||
|
||||
@ -1337,6 +1337,7 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
|
||||
/atom pattern.txt /*\/atom*
|
||||
/bar pattern.txt /*\/bar*
|
||||
/branch pattern.txt /*\/branch*
|
||||
/character-classes pattern.txt /*\/character-classes*
|
||||
/collection pattern.txt /*\/collection*
|
||||
/concat pattern.txt /*\/concat*
|
||||
/dyn various.txt /*\/dyn*
|
||||
@ -3570,6 +3571,7 @@ EncodingChanged autocmd.txt /*EncodingChanged*
|
||||
Eterm syntax.txt /*Eterm*
|
||||
Ex intro.txt /*Ex*
|
||||
Ex-mode intro.txt /*Ex-mode*
|
||||
Exuberant_ctags tagsrch.txt /*Exuberant_ctags*
|
||||
F motion.txt /*F*
|
||||
FAQ intro.txt /*FAQ*
|
||||
Farsi farsi.txt /*Farsi*
|
||||
@ -4518,6 +4520,7 @@ except-syntax-error eval.txt /*except-syntax-error*
|
||||
exception-handling eval.txt /*exception-handling*
|
||||
exception-variable eval.txt /*exception-variable*
|
||||
exclusive motion.txt /*exclusive*
|
||||
exclusive-linewise motion.txt /*exclusive-linewise*
|
||||
executable() eval.txt /*executable()*
|
||||
execute-menus gui.txt /*execute-menus*
|
||||
exim starting.txt /*exim*
|
||||
@ -4625,6 +4628,7 @@ filewritable() eval.txt /*filewritable()*
|
||||
filter change.txt /*filter*
|
||||
find-manpage usr_12.txt /*find-manpage*
|
||||
find-replace usr_10.txt /*find-replace*
|
||||
finddir() eval.txt /*finddir()*
|
||||
findfile() eval.txt /*findfile()*
|
||||
fixed-5.1 version5.txt /*fixed-5.1*
|
||||
fixed-5.2 version5.txt /*fixed-5.2*
|
||||
@ -4773,8 +4777,10 @@ getcharmod() eval.txt /*getcharmod()*
|
||||
getcmdline() eval.txt /*getcmdline()*
|
||||
getcmdpos() eval.txt /*getcmdpos()*
|
||||
getcwd() eval.txt /*getcwd()*
|
||||
getfperm() eval.txt /*getfperm()*
|
||||
getfsize() eval.txt /*getfsize()*
|
||||
getftime() eval.txt /*getftime()*
|
||||
getftype() eval.txt /*getftype()*
|
||||
getline() eval.txt /*getline()*
|
||||
getreg() eval.txt /*getreg()*
|
||||
getregtype() eval.txt /*getregtype()*
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
*tagsrch.txt* For Vim version 7.0aa. Last change: 2004 Apr 29
|
||||
*tagsrch.txt* For Vim version 7.0aa. Last change: 2004 Jul 23
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -468,6 +468,7 @@ a tag for each "#defined" macro, typedefs, enums, etc.
|
||||
Some programs that generate tags files:
|
||||
ctags As found on most Unix systems. Only supports C. Only
|
||||
does the basic work.
|
||||
*Exuberant_ctags*
|
||||
exuberant ctags This a very good one. It works for C, C++, Java,
|
||||
Fortran, Eiffel and others. It can generate tags for
|
||||
many items. See http://ctags.sourceforge.net.
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
*todo.txt* For Vim version 7.0aa. Last change: 2004 Jul 19
|
||||
*todo.txt* For Vim version 7.0aa. Last change: 2004 Jul 26
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -30,27 +30,18 @@ be worked on, but only if you sponsor Vim development. See |sponsor|.
|
||||
*known-bugs*
|
||||
-------------------- Known bugs and current work -----------------------
|
||||
|
||||
Add fix for zh_cn to Vim 6.3? (Liang)
|
||||
Aborting at the ATTENTION prompt causes trouble:
|
||||
buffer remains active, nwindows isn't closed (fixed in buffer.c)
|
||||
alternate buffer gets "read error" flag.
|
||||
":sbuf" and ":ball" leave an empty window behind.
|
||||
Change in handle_swap_exists() also in 6.3?
|
||||
|
||||
|
||||
For version 7.0:
|
||||
- Include many PATCHES:
|
||||
8 Add functions:
|
||||
realname() Get user name (first, last, full)
|
||||
user_fullname() patch by Nikolai Weibull, Nov
|
||||
3 2002)
|
||||
getfperm() file permissions, in form "rwxrwxrwx"
|
||||
(patch from Nikolai Weibull 2003 Jan 13)
|
||||
getftype() "file", "dir", "link", "other"?
|
||||
(patch from Nikolai Weibull 2003 Jan 13)
|
||||
setbufline() set line in any buffer (patch from Yegappan
|
||||
Lakshmanan, 2003 Jan 21)
|
||||
winnr("$") Get number of windows. (patch from Nikolai
|
||||
Weibull 2003 Jan 13) (another patch from
|
||||
Yegappan Lakshmanan, 2004 Jul 11)
|
||||
search() Add optional offset argument.
|
||||
Add 'n' flag. (patch from Nikolai Weibull
|
||||
2003 Jan 13)
|
||||
filter() Patch from Yegappan Lakshmanan, 2004 Jul 11
|
||||
8 Make it possible to delete marks. Charles Campbell has a patch that
|
||||
does this with the markclear() function (2004 Jan 9).
|
||||
@ -63,6 +54,7 @@ For version 7.0:
|
||||
When "filename" has no wildcards and there is no matching buffer, add
|
||||
the buffer (unlisted).
|
||||
Patch for \xnn (Ciaran McCreesh) 2004 Jul 10
|
||||
http://dev.gentoo.org/~ciaranm/patches/vim/vim-7.00a-regexp-numbered-characters-r5.patch
|
||||
7 Add 'taglistfiles' option, show file name and type when listing matching
|
||||
tags name with CTRL-D completion. Patch from Yegappan Lakshmanan.
|
||||
2004 Jul 11
|
||||
@ -72,6 +64,15 @@ For version 7.0:
|
||||
8 Make 'statusline' local, so that each window can have a different
|
||||
value. But should it also be local to a buffer? (Yegappan Lakshmanan
|
||||
has a patch, 2004 Jul 11)
|
||||
8 Add buffer-local autocommands? Reduces overhead for autocommands that
|
||||
trigger often (inserting a character, switching mode).
|
||||
:au Event <buffer> do-something
|
||||
E.g.:
|
||||
:au BufEnter <buffer> menu enable ...
|
||||
:au BufLeave <buffer> menu disable ...
|
||||
Patch from Yakov Lerner, including test (2004 Jan 7).
|
||||
VimResized - When the Vim window has been resized (SIGWINCH)
|
||||
patch from Yakov Lerner, 2003 July 24.
|
||||
--- awaiting updated patch ---
|
||||
7 Add patch from Wall for this one ( ~/Mail/oldmail/wall/in.00019 ):
|
||||
'flipcase' variable: upper/lowercase pairs.
|
||||
@ -84,18 +85,7 @@ For version 7.0:
|
||||
8 Add ":n" to fnamemodify(): normalize path, remove "../" when possible.
|
||||
Aric Blumer has a patch for this.
|
||||
He will update the patch for 6.3.
|
||||
8 Add buffer-local autocommands? Reduces overhead for autocommands that
|
||||
trigger often (inserting a character, switching mode).
|
||||
:au Event <buffer> do-something
|
||||
E.g.:
|
||||
:au BufEnter <buffer> menu enable ...
|
||||
:au BufLeave <buffer> menu disable ...
|
||||
Patch from Yakov Lerner, including test (2004 Jan 7).
|
||||
He'll send updated patch.
|
||||
Autocommands:
|
||||
VimResized - When the Vim window has been resized (SIGWINCH)
|
||||
patch from Yakov Lerner, 2003 July 24.
|
||||
He'll write documentation and send updated patch.
|
||||
7 Completion of network shares, patch by Yasuhiro Matsumoto.
|
||||
Update 2004 Jun 17.
|
||||
How does this work? Missing comments.
|
||||
@ -1458,6 +1448,14 @@ Built-in script language:
|
||||
7 Add argument to winwidth() to subtract the space taken by 'foldcolumn',
|
||||
signs and/or 'number'.
|
||||
8 Add functions:
|
||||
search() Add optional offset argument.
|
||||
realname() Get user name (first, last, full)
|
||||
user_fullname() patch by Nikolai Weibull, Nov
|
||||
3 2002
|
||||
Only add this when also implemented for
|
||||
non-Unix systems, otherwise a shell cmd could
|
||||
be used.
|
||||
get_user_name() gets login name.
|
||||
menuprop({name}, {idx}, {what})
|
||||
Get menu property of menu {name} item {idx}.
|
||||
menuprop("", 1, "name") returns "File".
|
||||
@ -3196,6 +3194,7 @@ Various improvements:
|
||||
column number. Can use the code of ":helpgrep".
|
||||
Also support using "**" in filename, so that a directory tree can be
|
||||
searched.
|
||||
Also see the "minigrep.vim" script on www.vim.org.
|
||||
- Change ":fixdel" into option 'fixdel', t_del will be adjusted each time
|
||||
t_bs is set? (Webb)
|
||||
- "gc": goto character, move absolute character positions forward, also
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
*version7.txt* For Vim version 7.0aa. Last change: 2004 Jul 19
|
||||
*version7.txt* For Vim version 7.0aa. Last change: 2004 Jul 25
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -127,6 +127,9 @@ byteidx(expr, nr) |byteidx()| Index of a character. (Ilya Sher)
|
||||
finddir(name) |finddir()| Find a directory in 'path'.
|
||||
findfile(name) |findfile()| Find a file in 'path'. (Johannes
|
||||
Zellner)
|
||||
getfperm(fname) |getfperm()| Get file permission string. (Nikolai
|
||||
Weibull)
|
||||
getftype(fname) |getftype()| Get type of file. (Nikolai Weibull)
|
||||
repeat(expr, count) |repeat()| Repeat "expr" "count" times.
|
||||
(Christophe Poucet)
|
||||
tr(expr, from, to) |tr()| Translate characters. (Ron Aaron)
|
||||
@ -187,6 +190,11 @@ For lisp indenting and matching parenthesis: (Sergey Khorev)
|
||||
|
||||
Added the "count" argument to match(), matchend() and matchstr(). (Ilya Sher)
|
||||
|
||||
winnr() takes an optional "$" and "#" arguments. (Nikolai Weibull, Yegappan
|
||||
Lakshmanan)
|
||||
|
||||
Added 'n' flag to search(): don't move the cursor. (Nikolai Weibull)
|
||||
|
||||
==============================================================================
|
||||
COMPILE TIME CHANGES *compile-changes-7*
|
||||
|
||||
@ -272,4 +280,13 @@ items.
|
||||
The default for 'helplang' was "zh" for both "zh_cn" and "zh_tw". Now use
|
||||
"cn" or "tw" as intended.
|
||||
|
||||
When 'bin' is set and 'eol' is not set then line2byte() added the line break
|
||||
after the last line while it's not there.
|
||||
|
||||
Using foldlevel() in a WinEnter autocommand may not work. Noticed when
|
||||
resizing the GUI shell upon startup.
|
||||
|
||||
Python: Using buffer.append(f.readlines()) didn't work. Allow appending a
|
||||
string with a trailing newline. The newline is ignored.
|
||||
|
||||
vim:tw=78:ts=8:ft=help:norl:
|
||||
|
||||
@ -1,10 +1,10 @@
|
||||
" Vim settings file
|
||||
" Language: LambdaProlog (Teyjus)
|
||||
" Maintainer: Markus Mottl <markus@oefai.at>
|
||||
" URL: http://www.ai.univie.ac.at/~markus/vim/ftplugin/lprolog.vim
|
||||
" Last Change: 2003 May 11
|
||||
" 2001 Sep 16 - fixed 'no_mail_maps'-bug (MM)
|
||||
" 2001 Sep 02 - initial release (MM)
|
||||
" URL: http://www.oefai.at/~markus/vim/ftplugin/lprolog.vim
|
||||
" Last Change: 2001 Oct 02 - fixed uncommenting bug (MM)
|
||||
" 2001 Sep 16 - fixed 'no_mail_maps'-bug (MM)
|
||||
" 2001 Sep 02 - initial release (MM)
|
||||
|
||||
" Only do these settings when not done yet for this buffer
|
||||
if exists("b:did_ftplugin")
|
||||
|
||||
@ -1,12 +1,14 @@
|
||||
" Vim settings file
|
||||
" Language: OCaml
|
||||
" Maintainers: Mike Leary <leary@nwlink.com>
|
||||
" Markus Mottl <markus@oefai.at>
|
||||
" URL: http://www.ai.univie.ac.at/~markus/vim/ftplugin/ocaml.vim
|
||||
" Last Change: 2003 May 11
|
||||
" 2001 Nov 01 - added local bindings for inserting
|
||||
" type holes using 'assert false' (MM)
|
||||
" 2001 Oct 02 - insert spaces in line comments (MM)
|
||||
" Maintainers: Mike Leary <leary@nwlink.com>
|
||||
" Markus Mottl <markus@oefai.at>
|
||||
" Stefano Zacchiroli <zack@bononia.it>
|
||||
" URL: http://www.oefai.at/~markus/vim/ftplugin/ocaml.vim
|
||||
" Last Change: 2004 Apr 12 - better .ml/.mli-switching without Python (SZ)
|
||||
" 2003 Nov 21 - match_words-patterns and .ml/.mli-switching (MM)
|
||||
" 2003 Oct 16 - re-entered variable 'did_ocaml_dtypes' (MM)
|
||||
" 2003 Oct 15 - added Stefano Zacchirolis (SZ) Python-code for
|
||||
" displaying type annotations (MM)
|
||||
|
||||
" Only do these settings when not done yet for this buffer
|
||||
if exists("b:did_ftplugin")
|
||||
@ -47,3 +49,253 @@ if !exists("no_plugin_maps") && !exists("no_ocaml_maps")
|
||||
iabbrev <buffer> ASS (assert false)
|
||||
endif
|
||||
endif
|
||||
|
||||
" Let % jump between structure elements (due to Issac Trotts)
|
||||
let b:mw='\<let\>:\<and\>:\(\<in\>\|;;\),'
|
||||
let b:mw=b:mw . '\<if\>:\<then\>:\<else\>,\<do\>:\<done\>,'
|
||||
let b:mw=b:mw . '\<\(object\|sig\|struct\|begin\)\>:\<end\>'
|
||||
let b:match_words=b:mw
|
||||
|
||||
" switching between interfaces (.mli) and implementations (.ml)
|
||||
if !exists("g:did_ocaml_switch")
|
||||
let g:did_ocaml_switch = 1
|
||||
map ,s :call OCaml_switch(0)<CR>
|
||||
map ,S :call OCaml_switch(1)<CR>
|
||||
fun OCaml_switch(newwin)
|
||||
if (match(bufname(""), "\\.mli$") >= 0)
|
||||
let fname = substitute(bufname(""), "\\.mli$", ".ml", "")
|
||||
if (a:newwin == 1)
|
||||
exec "new " . fname
|
||||
else
|
||||
exec "arge " . fname
|
||||
endif
|
||||
elseif (match(bufname(""), "\\.ml$") >= 0)
|
||||
let fname = bufname("") . "i"
|
||||
if (a:newwin == 1)
|
||||
exec "new " . fname
|
||||
else
|
||||
exec "arge " . fname
|
||||
endif
|
||||
endif
|
||||
endfun
|
||||
endif
|
||||
|
||||
" Vim support for OCaml 3.07 .annot files (requires Vim with python support)
|
||||
"
|
||||
" Executing OCamlPrintType(<mode>) function will display in the Vim bottom
|
||||
" line(s) the type of an ocaml value getting it from the corresponding .annot
|
||||
" file (if any). If Vim is in visual mode, <mode> should be "visual" and the
|
||||
" selected ocaml value correspond to the highlighted text, otherwise (<mode>
|
||||
" can be anything else) it corresponds to the literal found at the current
|
||||
" cursor position.
|
||||
"
|
||||
" .annot files are parsed lazily the first time OCamlPrintType is invoked; is
|
||||
" also possible to force the parsing using the OCamlParseAnnot() function.
|
||||
"
|
||||
" Hitting the <F3> key will cause OCamlPrintType function to be invoked with
|
||||
" the right argument depending on the current mode (visual or not).
|
||||
"
|
||||
" Copyright (C) <2003> Stefano Zacchiroli <zack@bononia.it>
|
||||
"
|
||||
" Created: Wed, 01 Oct 2003 18:16:22 +0200 zack
|
||||
" LastModified: Mon, 06 Oct 2003 11:05:39 +0200 zack
|
||||
"
|
||||
" This program is free software; you can redistribute it and/or modify
|
||||
" it under the terms of the GNU General Public License as published by
|
||||
" the Free Software Foundation; either version 2 of the License, or
|
||||
" (at your option) any later version.
|
||||
"
|
||||
" This program is distributed in the hope that it will be useful,
|
||||
" but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
" GNU General Public License for more details.
|
||||
"
|
||||
" You should have received a copy of the GNU General Public License
|
||||
" along with this program; if not, write to the Free Software
|
||||
" Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
"
|
||||
|
||||
if !has("python")
|
||||
echo "Python support not found: OCaml .annot support disabled"
|
||||
finish
|
||||
endif
|
||||
|
||||
if !exists("g:did_ocaml_dtypes")
|
||||
let g:did_ocaml_dtypes = 1
|
||||
else
|
||||
finish
|
||||
endif
|
||||
|
||||
python << EOF
|
||||
|
||||
import re
|
||||
import os
|
||||
import string
|
||||
import time
|
||||
import vim
|
||||
|
||||
debug = False
|
||||
|
||||
class AnnExc(Exception):
|
||||
def __init__(self, reason):
|
||||
self.reason = reason
|
||||
|
||||
no_annotations = AnnExc("No type annotations (.annot) file found")
|
||||
annotation_not_found = AnnExc("No type annotation found for the given text")
|
||||
def malformed_annotations(lineno):
|
||||
return AnnExc("Malformed .annot file (line = %d)" % lineno)
|
||||
|
||||
class Annotations:
|
||||
"""
|
||||
.annot ocaml file representation
|
||||
|
||||
File format (copied verbatim from caml-types.el)
|
||||
|
||||
file ::= block *
|
||||
block ::= position <SP> position <LF> annotation *
|
||||
position ::= filename <SP> num <SP> num <SP> num
|
||||
annotation ::= keyword open-paren <LF> <SP> <SP> data <LF> close-paren
|
||||
|
||||
<SP> is a space character (ASCII 0x20)
|
||||
<LF> is a line-feed character (ASCII 0x0A)
|
||||
num is a sequence of decimal digits
|
||||
filename is a string with the lexical conventions of O'Caml
|
||||
open-paren is an open parenthesis (ASCII 0x28)
|
||||
close-paren is a closed parenthesis (ASCII 0x29)
|
||||
data is any sequence of characters where <LF> is always followed by
|
||||
at least two space characters.
|
||||
|
||||
- in each block, the two positions are respectively the start and the
|
||||
- end of the range described by the block.
|
||||
- in a position, the filename is the name of the file, the first num
|
||||
is the line number, the second num is the offset of the beginning
|
||||
of the line, the third num is the offset of the position itself.
|
||||
- the char number within the line is the difference between the third
|
||||
and second nums.
|
||||
|
||||
For the moment, the only possible keyword is \"type\"."
|
||||
"""
|
||||
|
||||
def __init__(self):
|
||||
self.__filename = None # last .annot parsed file
|
||||
self.__ml_filename = None # as above but s/.annot/.ml/
|
||||
self.__timestamp = None # last parse action timestamp
|
||||
self.__annot = {}
|
||||
self.__re = re.compile(
|
||||
'^"[^"]+"\s+(\d+)\s+(\d+)\s+(\d+)\s+"[^"]+"\s+(\d+)\s+(\d+)\s+(\d+)$')
|
||||
|
||||
def __parse(self, fname):
|
||||
try:
|
||||
f = open(fname)
|
||||
line = f.readline() # position line
|
||||
lineno = 1
|
||||
while (line != ""):
|
||||
m = self.__re.search(line)
|
||||
if (not m):
|
||||
raise malformed_annotations(lineno)
|
||||
line1 = int(m.group(1))
|
||||
col1 = int(m.group(3)) - int(m.group(2))
|
||||
line2 = int(m.group(4))
|
||||
col2 = int(m.group(6)) - int(m.group(5))
|
||||
line = f.readline() # "type(" string
|
||||
lineno += 1
|
||||
if (line == ""): raise malformed_annotations(lineno)
|
||||
type = []
|
||||
line = f.readline() # type description
|
||||
lineno += 1
|
||||
if (line == ""): raise malformed_annotations(lineno)
|
||||
while line != ")\n":
|
||||
type.append(string.strip(line))
|
||||
line = f.readline()
|
||||
lineno += 1
|
||||
if (line == ""): raise malformed_annotations(lineno)
|
||||
type = string.join(type, "\n")
|
||||
self.__annot[(line1, col1), (line2, col2)] = type
|
||||
line = f.readline() # position line
|
||||
f.close()
|
||||
self.__filename = fname
|
||||
self.__ml_filename = re.sub("\.annot$", ".ml", fname)
|
||||
self.__timestamp = int(time.time())
|
||||
except IOError:
|
||||
raise no_annotations
|
||||
|
||||
def parse(self):
|
||||
annot_file = re.sub("\.ml$", ".annot", vim.current.buffer.name)
|
||||
self.__parse(annot_file)
|
||||
|
||||
def get_type(self, (line1, col1), (line2, col2)):
|
||||
if debug:
|
||||
print line1, col1, line2, col2
|
||||
if vim.current.buffer.name == None:
|
||||
raise no_annotations
|
||||
if vim.current.buffer.name != self.__ml_filename or \
|
||||
os.stat(self.__filename).st_mtime > self.__timestamp:
|
||||
self.parse()
|
||||
try:
|
||||
return self.__annot[(line1, col1), (line2, col2)]
|
||||
except KeyError:
|
||||
raise annotation_not_found
|
||||
|
||||
word_char_RE = re.compile("^[\w.]$")
|
||||
|
||||
# TODO this function should recognize ocaml literals, actually it's just an
|
||||
# hack that recognize continuous sequences of word_char_RE above
|
||||
def findBoundaries(line, col):
|
||||
""" given a cursor position (as returned by vim.current.window.cursor)
|
||||
return two integers identify the beggining and end column of the word at
|
||||
cursor position, if any. If no word is at the cursor position return the
|
||||
column cursor position twice """
|
||||
left, right = col, col
|
||||
line = line - 1 # mismatch vim/python line indexes
|
||||
(begin_col, end_col) = (0, len(vim.current.buffer[line]) - 1)
|
||||
try:
|
||||
while word_char_RE.search(vim.current.buffer[line][left - 1]):
|
||||
left = left - 1
|
||||
except IndexError:
|
||||
pass
|
||||
try:
|
||||
while word_char_RE.search(vim.current.buffer[line][right + 1]):
|
||||
right = right + 1
|
||||
except IndexError:
|
||||
pass
|
||||
return (left, right)
|
||||
|
||||
annot = Annotations() # global annotation object
|
||||
|
||||
def printOCamlType(mode):
|
||||
try:
|
||||
if mode == "visual": # visual mode: lookup highlighted text
|
||||
(line1, col1) = vim.current.buffer.mark("<")
|
||||
(line2, col2) = vim.current.buffer.mark(">")
|
||||
else: # any other mode: lookup word at cursor position
|
||||
(line, col) = vim.current.window.cursor
|
||||
(col1, col2) = findBoundaries(line, col)
|
||||
(line1, line2) = (line, line)
|
||||
begin_mark = (line1, col1)
|
||||
end_mark = (line2, col2 + 1)
|
||||
print annot.get_type(begin_mark, end_mark)
|
||||
except AnnExc, exc:
|
||||
print exc.reason
|
||||
|
||||
def parseOCamlAnnot():
|
||||
try:
|
||||
annot.parse()
|
||||
except AnnExc, exc:
|
||||
print exc.reason
|
||||
|
||||
EOF
|
||||
|
||||
fun OCamlPrintType(current_mode)
|
||||
if (a:current_mode == "visual")
|
||||
python printOCamlType("visual")
|
||||
else
|
||||
python printOCamlType("normal")
|
||||
endif
|
||||
endfun
|
||||
|
||||
fun OCamlParseAnnot()
|
||||
python parseOCamlAnnot()
|
||||
endfun
|
||||
|
||||
map <F3> :call OCamlPrintType("normal")<RETURN>
|
||||
vmap <F3> :call OCamlPrintType("visual")<RETURN>
|
||||
|
||||
@ -1,12 +1,12 @@
|
||||
" Vim indent file
|
||||
" Language: OCaml
|
||||
" Maintainers: Jean-Francois Yuen <jfyuen@ifrance.com>
|
||||
" Mike Leary <leary@nwlink.com>
|
||||
" Markus Mottl <markus@oefai.at>
|
||||
" URL: http://www.oefai.at/~markus/vim/indent/ocaml.vim
|
||||
" Last Change: 2003 Apr 14
|
||||
" 2003 Mar 05 - Added '{<' and some fixes (JY)
|
||||
" 2002 Nov 06 - Some fixes (JY)
|
||||
" Language: OCaml
|
||||
" Maintainers: Jean-Francois Yuen <jfyuen@happycoders.org>
|
||||
" Mike Leary <leary@nwlink.com>
|
||||
" Markus Mottl <markus@oefai.at>
|
||||
" URL: http://www.oefai.at/~markus/vim/indent/ocaml.vim
|
||||
" Last Change: 2004 Apr 11 - Added indent for 'class' (JY)
|
||||
" 2003 Sep 16 - Added 'private' as keyword (JY)
|
||||
" 2003 Mar 29 - Fixed bug with 'if' and 'else' (JY)
|
||||
|
||||
" Only load this indent file when no other was loaded.
|
||||
if exists("b:did_indent")
|
||||
@ -16,7 +16,7 @@ let b:did_indent = 1
|
||||
|
||||
setlocal expandtab
|
||||
setlocal indentexpr=GetOCamlIndent()
|
||||
setlocal indentkeys+=0=and,0=constraint,0=done,0=else,0=end,0=exception,0=external,0=if,0=in,0=include,0=inherit,0=initializer,0=let,0=method,0=open,0=then,0=type,0=val,0=with,0=;;,0=>\],0=\|\],0=\|,0=*),0=>},0},0\],0)
|
||||
setlocal indentkeys+=0=and,0=class,0=constraint,0=done,0=else,0=end,0=exception,0=external,0=if,0=in,0=include,0=inherit,0=initializer,0=let,0=method,0=open,0=then,0=type,0=val,0=with,0;;,0>\],0\|\],0>},0\|,0},0\],0)
|
||||
setlocal nolisp
|
||||
setlocal nosmartindent
|
||||
setlocal textwidth=80
|
||||
@ -33,14 +33,13 @@ if exists("*GetOCamlIndent")
|
||||
endif
|
||||
|
||||
" Define some patterns:
|
||||
let s:beflet = '^\s*\(initializer\|method\|try\)\|\(\<\(begin\|do\|else\|in\|then\|try\)\|->\|;\|(\)\s*$'
|
||||
let s:beflet = '^\s*\(initializer\|method\|try\)\|\(\<\(begin\|do\|else\|in\|then\|try\)\|->\|<-\|=\|;\|(\)\s*$'
|
||||
let s:letpat = '^\s*\(let\|type\|module\|class\|open\|exception\|val\|include\|external\)\>'
|
||||
let s:letlim = '\(\<\(sig\|struct\)\|;;\)\s*$'
|
||||
let s:lim = '^\s*\(exception\|external\|include\|let\|module\|open\|type\|val\)\>'
|
||||
let s:module = '\<\%(begin\|sig\|struct\|object\)\>'
|
||||
let s:obj = '^\s*\(constraint\|inherit\|initializer\|method\|val\)\>\|\<\(object\|object\s*(.*)\)\s*$'
|
||||
let s:type = '^\s*\%(let\|type\)\>.*='
|
||||
let s:val = '^\s*\(val\|external\)\>.*:'
|
||||
let s:type = '^\s*\%(class\|let\|type\)\>.*='
|
||||
|
||||
" Skipping pattern, for comments
|
||||
function s:SkipPattern(lnum, pat)
|
||||
@ -75,7 +74,7 @@ endfunction
|
||||
" Indent 'let'
|
||||
function s:FindLet(pstart, pmid, pend)
|
||||
call search(a:pend, 'bW')
|
||||
return indent(searchpair(a:pstart, a:pmid, a:pend, 'bWn', 'synIDattr(synID(line("."), col("."), 0), "name") =~? "string\\|comment" || getline(".") =~ "^\\s*let\\>.*=.*\\<in\\s*$" || getline(prevnonblank(".") - 1) =~ "^\\s*let\\>.*=\\s*$\\|" . s:beflet'))
|
||||
return indent(searchpair(a:pstart, a:pmid, a:pend, 'bWn', 'synIDattr(synID(line("."), col("."), 0), "name") =~? "string\\|comment" || getline(".") =~ "^\\s*let\\>.*=.*\\<in\\s*$" || getline(prevnonblank(".") - 1) =~ s:beflet'))
|
||||
endfunction
|
||||
|
||||
function GetOCamlIndent()
|
||||
@ -97,8 +96,7 @@ function GetOCamlIndent()
|
||||
|
||||
let line = getline(v:lnum)
|
||||
|
||||
" Indent if current line begins with 'end'
|
||||
" for 'sig', 'struct', 'object' and 'begin':
|
||||
" Indent if current line begins with 'end':
|
||||
if line =~ '^\s*end\>'
|
||||
return s:FindPair(s:module, '','\<end\>')
|
||||
|
||||
@ -118,27 +116,25 @@ function GetOCamlIndent()
|
||||
elseif line =~ '^\s*)'
|
||||
return s:FindPair('(', '',')')
|
||||
|
||||
" Indent if current line begins with 'let'
|
||||
" and last line does not begin with 'let' or end with 'in' or ';;':
|
||||
" Indent if current line begins with 'let':
|
||||
elseif line =~ '^\s*let\>'
|
||||
if lline !~ s:lim . '\|' . s:letlim . '\|' . s:beflet
|
||||
return s:FindLet(s:type, '','\<let\s*$')
|
||||
else return ind
|
||||
endif
|
||||
|
||||
" Indent if current line begins with 'type'
|
||||
" and last line does not end with 'and' or ';;':
|
||||
elseif line =~ '^\s*type\>'
|
||||
" Indent if current line begins with 'class' or 'type':
|
||||
elseif line =~ '^\s*\(class\|type\)\>'
|
||||
if lline !~ s:lim . '\|\<and\s*$\|' . s:letlim
|
||||
return s:FindLet(s:type, '','\<type\s*$')
|
||||
return s:FindLet(s:type, '','\<\(class\|type\)\s*$')
|
||||
else return ind
|
||||
endif
|
||||
|
||||
" Indent for pattern matching:
|
||||
elseif line =~ '^\s*|'
|
||||
if lline !~ '^\s*\(|\|\(match\|with\|type\)\>\)\|\<\(function\|parser\|with\)\s*$'
|
||||
if lline !~ '^\s*\(|[^\]]\|\(match\|type\|with\)\>\)\|\<\(function\|parser\|private\|with\)\s*$'
|
||||
call search('|', 'bW')
|
||||
return indent(searchpair('^\s*\(type\|match\)\>\|\<\(with\|function\|parser\)\s*$', '', '|', 'bWn', 'synIDattr(synID(line("."), col("."), 0), "name") =~? "string\\|comment" || getline(".") =~ "\\[|\\||\\]" && getline(".") !~ "^\\s*|.*->"'))
|
||||
return indent(searchpair('^\s*\(match\|type\)\>\|\<\(function\|parser\|private\|with\)\s*$', '', '^\s*|', 'bWn', 'synIDattr(synID(line("."), col("."), 0), "name") =~? "string\\|comment" || getline(".") !~ "^\\s*|.*->"'))
|
||||
else return ind
|
||||
endif
|
||||
|
||||
@ -149,41 +145,35 @@ function GetOCamlIndent()
|
||||
else return ind
|
||||
endif
|
||||
|
||||
" Indent if current line begins with 'in' and previous
|
||||
" line does not start with 'let' or 'and':
|
||||
" Indent if current line begins with 'in':
|
||||
elseif line =~ '^\s*in\>'
|
||||
if lline !~ '^\s*\(let\|and\)\>'
|
||||
return s:FindPair('\<let\>', '', '\<in\>')
|
||||
else return ind
|
||||
endif
|
||||
|
||||
" Indent if current line begins with 'else'
|
||||
" and previous line does not start with 'if', 'then' or 'else':
|
||||
" Indent if current line begins with 'else':
|
||||
elseif line =~ '^\s*else\>'
|
||||
if lline !~ '^\s*\(if\|else\|then\)\>'
|
||||
if lline !~ '^\s*\(if\|then\)\>'
|
||||
return s:FindPair('\<if\>', '', '\<else\>')
|
||||
else return ind
|
||||
endif
|
||||
|
||||
" Indent if current line begins with 'then'
|
||||
" and previous line does not start with 'if', 'then' or 'else':
|
||||
" Indent if current line begins with 'then':
|
||||
elseif line =~ '^\s*then\>'
|
||||
if lline !~ '^\s*\(if\|else\|then\)\>'
|
||||
if lline !~ '^\s*\(if\|else\)\>'
|
||||
return s:FindPair('\<if\>', '', '\<then\>')
|
||||
else return ind
|
||||
endif
|
||||
|
||||
" Subtract a 'shiftwidth' if current line begins with 'and' and previous
|
||||
" line does not start with 'let', 'and' or 'type' or end with 'end'
|
||||
" (for classes):
|
||||
" Indent if current line begins with 'and':
|
||||
elseif line =~ '^\s*and\>'
|
||||
if lline !~ '^\s*\(and\|let\|type\)\>\|\<end\s*$'
|
||||
return ind - &sw
|
||||
else return ind
|
||||
endif
|
||||
|
||||
" Indent if current line begins with 'with'
|
||||
" and previous line does not start with 'match' or 'try':
|
||||
" Indent if current line begins with 'with':
|
||||
elseif line =~ '^\s*with\>'
|
||||
if lline !~ '^\s*\(match\|try\)\>'
|
||||
return s:FindPair('\<\%(match\|try\)\>', '','\<with\>')
|
||||
@ -193,35 +183,35 @@ function GetOCamlIndent()
|
||||
" Indent if current line begins with 'exception':
|
||||
elseif line =~ '^\s*exception\>'
|
||||
if lline !~ s:lim . '\|' . s:letlim
|
||||
return indent(search(s:val . '\|^\s*\(external\|include\|open\|type\)\>', 'bW'))
|
||||
return indent(search('^\s*\(\(external\|include\|open\|type\)\>\|val\>.*:\)', 'bW'))
|
||||
else return ind
|
||||
endif
|
||||
|
||||
" Indent if current line begins with 'external':
|
||||
elseif line =~ '^\s*external\>'
|
||||
if lline !~ s:lim . '\|' . s:letlim
|
||||
return indent(search(s:val . '\|^\s*\(exception\|include\|open\|type\)\>', 'bW'))
|
||||
return indent(search('^\s*\(\(exception\|external\|include\|open\|type\)\>\|val\>.*:\)', 'bW'))
|
||||
else return ind
|
||||
endif
|
||||
|
||||
" Indent if current line begins with 'include':
|
||||
elseif line =~ '^\s*include\>'
|
||||
if lline !~ s:lim . '\|' . s:letlim
|
||||
return indent(search(s:val . '\|^\s*\(exception\|external\|open\|type\)\>', 'bW'))
|
||||
return indent(search('^\s*\(\(exception\|external\|open\|type\)\>\|val\>.*:\)', 'bW'))
|
||||
else return ind
|
||||
endif
|
||||
|
||||
" Indent if current line begins with 'open':
|
||||
elseif line =~ '^\s*open\>'
|
||||
if lline !~ s:lim . '\|' . s:letlim
|
||||
return indent(search(s:val . '\|^\s*\(exception\|external\|include\|type\)\>', 'bW'))
|
||||
return indent(search('^\s*\(\(exception\|external\|include\|type\)\>\|val\>.*:\)', 'bW'))
|
||||
else return ind
|
||||
endif
|
||||
|
||||
" Indent if current line begins with 'val':
|
||||
elseif line =~ '^\s*val\>'
|
||||
if lline !~ '^\s*\(exception\|external\|include\|open\)\>\|' . s:obj . '\|' . s:letlim
|
||||
return indent(search(s:val . '\|^\s*\(exception\|include\|initializer\|method\|open\|type\)\>', 'bW'))
|
||||
return indent(search('^\s*\(\(exception\|include\|initializer\|method\|open\|type\|val\)\>\|external\>.*:\)', 'bW'))
|
||||
else return ind
|
||||
endif
|
||||
|
||||
@ -253,15 +243,10 @@ function GetOCamlIndent()
|
||||
else return ind
|
||||
endif
|
||||
|
||||
" Indent back to normal after comments:
|
||||
elseif line =~ '^\s*\*)'
|
||||
call search('\*)', 'bW')
|
||||
return indent(searchpair('(\*', '', '\*)', 'bWn', 'synIDattr(synID(line("."), col("."), 0), "name") =~? "string"'))
|
||||
|
||||
endif
|
||||
|
||||
" Add a 'shiftwidth' after lines ending with:
|
||||
if lline =~ '\(:\|=\|->\|<-\|(\|\[\|{\|{<\|\[|\|\[<\|\<\(begin\|struct\|sig\|functor\|initializer\|object\|try\|do\|if\|then\|else\|fun\|function\|parser\)\|\<object\s*(.*)\)\s*$'
|
||||
if lline =~ '\(:\|=\|->\|<-\|(\|\[\|{\|{<\|\[|\|\[<\|\<\(begin\|do\|else\|fun\|function\|functor\|if\|initializer\|object\|parser\|private\|sig\|struct\|then\|try\)\|\<object\s*(.*)\)\s*$'
|
||||
let ind = ind + &sw
|
||||
|
||||
" Back to normal indent after lines ending with ';;':
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
" Language: Python
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Original Author: David Bustos <bustos@caltech.edu>
|
||||
" Last Change: 2004 Jun 15
|
||||
" Last Change: 2004 Jul 25
|
||||
|
||||
" Only load this indent file when no other was loaded.
|
||||
if exists("b:did_indent")
|
||||
@ -99,15 +99,36 @@ function GetPythonIndent(lnum)
|
||||
" Use syntax highlighting attributes when possible.
|
||||
let pline = getline(plnum)
|
||||
let pline_len = strlen(pline)
|
||||
let col = 0
|
||||
while col < pline_len
|
||||
if pline[col] == '#' && (!has('syntax_items')
|
||||
\ || synIDattr(synID(plnum, col + 1, 1), "name") =~ "Comment$")
|
||||
let pline = strpart(pline, 0, col)
|
||||
break
|
||||
if has('syntax_items')
|
||||
" If the last character in the line is a comment, do a binary search for
|
||||
" the start of the comment. synID() is slow, a linear search would take
|
||||
" too long on a long line.
|
||||
if synIDattr(synID(plnum, pline_len, 1), "name") =~ "Comment$"
|
||||
let min = 1
|
||||
let max = pline_len
|
||||
while min < max
|
||||
let col = (min + max) / 2
|
||||
if synIDattr(synID(plnum, col, 1), "name") =~ "Comment$"
|
||||
let max = col
|
||||
else
|
||||
let min = col + 1
|
||||
endif
|
||||
endwhile
|
||||
echomsg min
|
||||
let pline = strpart(pline, 0, min - 1)
|
||||
echomsg pline
|
||||
sleep 1
|
||||
endif
|
||||
let col = col + 1
|
||||
endwhile
|
||||
else
|
||||
let col = 0
|
||||
while col < pline_len
|
||||
if pline[col] == '#'
|
||||
let pline = strpart(pline, 0, col)
|
||||
break
|
||||
endif
|
||||
let col = col + 1
|
||||
endwhile
|
||||
endif
|
||||
|
||||
" If the previous line ended with a colon, indent this line
|
||||
if pline =~ ':\s*$'
|
||||
|
||||
@ -2,9 +2,9 @@
|
||||
" Language: Dot
|
||||
" Filenames: *.dot
|
||||
" Maintainer: Markus Mottl <markus@oefai.at>
|
||||
" URL: http://www.ai.univie.ac.at/~markus/vim/syntax/dot.vim
|
||||
" Last Change: 2003 May 11
|
||||
" 2001 May 04 - initial version
|
||||
" URL: http://www.oefai.at/~markus/vim/syntax/dot.vim
|
||||
" Last Change: 2004 Jul 26
|
||||
" 2001 May 04 - initial version
|
||||
|
||||
" For version 5.x: Clear all syntax items
|
||||
" For version 6.x: Quit when a syntax file was already loaded
|
||||
|
||||
@ -1,203 +1,314 @@
|
||||
" Vim syntax file
|
||||
" Language: IDL (Interface Description Language)
|
||||
" Maintainer: Jody Goldberg <jgoldberg@home.com> or <jody@gnome.org>
|
||||
" Last Change: 2004 Jul 12
|
||||
" Language: IDL (Interface Description Language)
|
||||
" Created By: Jody Goldberg <jody@gnome.org>
|
||||
" Maintainer: Michael Geddes <michaelrgeddes@optushome.com.au>
|
||||
" Last Change: 2004 Jul 20
|
||||
|
||||
" This is an experiment. IDL's structure is simple enough to permit a full
|
||||
" grammar based approach to rather than using a few heuristics. The result
|
||||
" is large and somewhat repetative but seems to work.
|
||||
|
||||
" 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")
|
||||
" There are some Microsoft extensions to idl files that are here. Some of
|
||||
" them are disabled by defining idl_no_ms_extensions.
|
||||
"
|
||||
" The more complex of the extensions are disabled by defining idl_no_extensions.
|
||||
"
|
||||
|
||||
if exists("b:current_syntax")
|
||||
finish
|
||||
endif
|
||||
|
||||
if exists("idlsyntax_showerror")
|
||||
syn match idlError +\S+ skipwhite skipempty nextgroup=idlError
|
||||
endif
|
||||
|
||||
syn region idlCppQuote start='\<cpp_quote\s*(' end=')' contains=idlString
|
||||
|
||||
" Misc basic
|
||||
syn match idlId contained "[a-zA-Z][a-zA-Z0-9_]*"
|
||||
syn match idlSemiColon contained ";"
|
||||
syn match idlCommaArg contained "," skipempty skipwhite nextgroup=idlSimpDecl
|
||||
syn region idlArraySize1 contained start=:\[: end=:\]: skipempty skipwhite nextgroup=idlArraySize1,idlSemiColon,idlCommaArg contains=idlArraySize1,idlLiteral
|
||||
syn match idlSimpDecl contained "[a-zA-Z][a-zA-Z0-9_]*" skipempty skipwhite nextgroup=idlSemiColon,idlCommaArg,idlArraySize1
|
||||
syn region idlSting contained start=+"+ skip=+\\\(\\\\\)*"+ end=+"+
|
||||
syn match idlLiteral contained "[1-9]\d*\(\.\d*\)\="
|
||||
syn match idlLiteral contained "\.\d\+"
|
||||
syn keyword idlLiteral contained TRUE FALSE
|
||||
syn match idlId contained "[a-zA-Z][a-zA-Z0-9_]*" skipwhite skipempty nextgroup=idlEnumComma,idlEnumNumber
|
||||
syn match idlEnumComma contained ","
|
||||
syn match idlEnumNumber contained "=" skipwhite skipempty nextgroup=idlString,idlLiteral
|
||||
syn match idlSemiColon contained ";"
|
||||
syn match idlCommaArg contained "," skipempty skipwhite nextgroup=idlSimpDecl
|
||||
syn region idlArraySize1 contained start=:\[: end=:\]: skipempty skipwhite nextgroup=idlArraySize1,idlError,idlSemiColon,idlCommaArg contains=idlArraySize1,idlLiteral
|
||||
syn match idlSimpDecl contained "[a-zA-Z][a-zA-Z0-9_]*" skipempty skipwhite nextgroup=idlError,idlSemiColon,idlCommaArg,idlArraySize1
|
||||
syn region idlString contained start=+"+ skip=+\\\(\\\\\)*"+ end=+"+
|
||||
syn match idlLiteral contained "[1-9]\d*\(\.\d*\)\="
|
||||
syn match idlLiteral contained "0"
|
||||
syn match idlLiteral contained "\.\d\+"
|
||||
syn match idlLiteral contained "0x[0-9A-Fa-f]\+"
|
||||
syn match idlLiteral contained "0[0-7]\+"
|
||||
syn keyword idlLiteral contained TRUE FALSE
|
||||
|
||||
" Comments
|
||||
syn keyword idlTodo contained TODO FIXME XXX
|
||||
syn region idlComment start="/\*" end="\*/" contains=idlTodo
|
||||
syn match idlComment "//.*" contains=idlTodo
|
||||
syn match idlCommentError "\*/"
|
||||
syn keyword idlTodo contained TODO FIXME XXX
|
||||
syn region idlComment start="/\*" end="\*/" contains=idlTodo
|
||||
syn match idlComment "//.*" contains=idlTodo
|
||||
syn match idlCommentError "\*/"
|
||||
|
||||
" C style Preprocessor
|
||||
syn region idlIncluded contained start=+"+ skip=+\\\(\\\\\)*"+ end=+"+
|
||||
syn match idlIncluded contained "<[^>]*>"
|
||||
syn match idlInclude "^[ \t]*#[ \t]*include\>[ \t]*["<]" contains=idlIncluded,idlString
|
||||
syn region idlPreCondit start="^[ \t]*#[ \t]*\(if\>\|ifdef\>\|ifndef\>\|elif\>\|else\>\|endif\>\)" skip="\\$" end="$" contains=idlComment,idlCommentError
|
||||
syn region idlDefine start="^[ \t]*#[ \t]*\(define\>\|undef\>\)" skip="\\$" end="$" contains=idlLiteral, idlString
|
||||
syn region idlIncluded contained start=+"+ skip=+\\\(\\\\\)*"+ end=+"+
|
||||
syn match idlIncluded contained "<[^>]*>"
|
||||
syn match idlInclude "^[ \t]*#[ \t]*include\>[ \t]*["<]" contains=idlIncluded,idlString
|
||||
syn region idlPreCondit start="^[ \t]*#[ \t]*\(if\>\|ifdef\>\|ifndef\>\|elif\>\|else\>\|endif\>\)" skip="\\$" end="$" contains=idlComment,idlCommentError
|
||||
syn region idlDefine start="^[ \t]*#[ \t]*\(define\>\|undef\>\)" skip="\\$" end="$" contains=idlLiteral,idlString
|
||||
|
||||
" Constants
|
||||
syn keyword idlConst const skipempty skipwhite nextgroup=idlBaseType,idlBaseTypeInt
|
||||
syn keyword idlConst const skipempty skipwhite nextgroup=idlBaseType,idlBaseTypeInt
|
||||
|
||||
" Attribute
|
||||
syn keyword idlROAttr readonly skipempty skipwhite nextgroup=idlAttr
|
||||
syn keyword idlAttr attribute skipempty skipwhite nextgroup=idlBaseTypeInt,idlBaseType
|
||||
syn keyword idlROAttr readonly skipempty skipwhite nextgroup=idlAttr
|
||||
syn keyword idlAttr attribute skipempty skipwhite nextgroup=idlBaseTypeInt,idlBaseType
|
||||
|
||||
" Types
|
||||
syn region idlD4 contained start="<" end=">" skipempty skipwhite nextgroup=idlSimpDecl contains=idlSeqType,idlBaseTypeInt,idlBaseType,idlLiteral
|
||||
syn keyword idlSeqType contained sequence skipempty skipwhite nextgroup=idlD4
|
||||
syn keyword idlBaseType contained float double char boolean octet any skipempty skipwhite nextgroup=idlSimpDecl
|
||||
syn keyword idlBaseTypeInt contained short long skipempty skipwhite nextgroup=idlSimpDecl
|
||||
syn keyword idlBaseType contained unsigned skipempty skipwhite nextgroup=idlBaseTypeInt
|
||||
syn region idlD1 contained start="<" end=">" skipempty skipwhite nextgroup=idlSimpDecl contains=idlString,idlLiteral
|
||||
syn keyword idlBaseType contained string skipempty skipwhite nextgroup=idlD1,idlSimpDecl
|
||||
syn match idlBaseType contained "[a-zA-Z0-9_]\+[ \t]*\(::[ \t]*[a-zA-Z0-9_]\+\)*" skipempty skipwhite nextgroup=idlSimpDecl
|
||||
syn region idlD4 contained start="<" end=">" skipempty skipwhite nextgroup=idlSimpDecl contains=idlSeqType,idlBaseTypeInt,idlBaseType,idlLiteral
|
||||
syn keyword idlSeqType contained sequence skipempty skipwhite nextgroup=idlD4
|
||||
syn keyword idlBaseType contained float double char boolean octet any skipempty skipwhite nextgroup=idlSimpDecl
|
||||
syn keyword idlBaseTypeInt contained short long skipempty skipwhite nextgroup=idlSimpDecl
|
||||
syn keyword idlBaseType contained unsigned skipempty skipwhite nextgroup=idlBaseTypeInt
|
||||
syn region idlD1 contained start="<" end=">" skipempty skipwhite nextgroup=idlSimpDecl contains=idlString,idlLiteral
|
||||
syn keyword idlBaseType contained string skipempty skipwhite nextgroup=idlD1,idlSimpDecl
|
||||
syn match idlBaseType contained "[a-zA-Z0-9_]\+[ \t]*\(::[ \t]*[a-zA-Z0-9_]\+\)*" skipempty skipwhite nextgroup=idlSimpDecl
|
||||
|
||||
" Modules
|
||||
syn region idlModuleContent contained start="{" end="}" skipempty skipwhite nextgroup=idlSemiColon contains=idlUnion,idlStruct,idlEnum,idlInterface,idlComment,idlTypedef,idlConst,idlException,idlModule
|
||||
syn match idlModuleName contained "[a-zA-Z0-9_]\+" skipempty skipwhite nextgroup=idlModuleContent,idlSemiColon
|
||||
syn keyword idlModule module skipempty skipwhite nextgroup=idlModuleName
|
||||
syn region idlModuleContent contained start="{" end="}" skipempty skipwhite nextgroup=idlError,idlSemiColon contains=idlUnion,idlStruct,idlEnum,idlInterface,idlComment,idlTypedef,idlConst,idlException,idlModule
|
||||
syn match idlModuleName contained "[a-zA-Z0-9_]\+" skipempty skipwhite nextgroup=idlModuleContent,idlError,idlSemiColon
|
||||
syn keyword idlModule module skipempty skipwhite nextgroup=idlModuleName
|
||||
|
||||
" Interfaces
|
||||
syn region idlInterfaceContent contained start="{" end="}" skipempty skipwhite nextgroup=idlSemiColon contains=idlUnion,idlStruct,idlEnum,idlComment,idlROAttr,idlAttr,idlOp,idlOneWayOp,idlException,idlConst,idlTypedef
|
||||
syn match idlInheritFrom2 contained "," skipempty skipwhite nextgroup=idlInheritFrom
|
||||
syn match idlInheritFrom contained "[a-zA-Z0-9_]\+[ \t]*\(::[ \t]*[a-zA-Z0-9_]\+\)*" skipempty skipwhite nextgroup=idlInheritFrom2,idlInterfaceContent
|
||||
syn match idlInherit contained ":" skipempty skipwhite nextgroup=idlInheritFrom
|
||||
syn match idlInterfaceName contained "[a-zA-Z0-9_]\+" skipempty skipwhite nextgroup=idlInterfaceContent,idlInherit,idlSemiColon
|
||||
syn keyword idlInterface interface skipempty skipwhite nextgroup=idlInterfaceName
|
||||
syn cluster idlCommentable contains=idlComment
|
||||
syn cluster idlContentCluster contains=idlUnion,idlStruct,idlEnum,idlROAttr,idlAttr,idlOp,idlOneWayOp,idlException,idlConst,idlTypedef,idlAttributes,idlErrorSquareBracket,idlErrorBracket,idlInterfaceSections
|
||||
|
||||
syn region idlInterfaceContent contained start="{" end="}" skipempty skipwhite nextgroup=idlError,idlSemiColon contains=@idlContentCluster,@idlCommentable
|
||||
syn match idlInheritFrom2 contained "," skipempty skipwhite nextgroup=idlInheritFrom
|
||||
syn match idlInheritFrom contained "[a-zA-Z0-9_]\+[ \t]*\(::[ \t]*[a-zA-Z0-9_]\+\)*" skipempty skipwhite nextgroup=idlInheritFrom2,idlInterfaceContent
|
||||
syn match idlInherit contained ":" skipempty skipwhite nextgroup=idlInheritFrom
|
||||
syn match idlInterfaceName contained "[a-zA-Z0-9_]\+" skipempty skipwhite nextgroup=idlInterfaceContent,idlInherit,idlError,idlSemiColon
|
||||
syn keyword idlInterface interface dispinterface skipempty skipwhite nextgroup=idlInterfaceName
|
||||
syn keyword idlInterfaceSections contained properties methods skipempty skipwhite nextgroup=idlSectionColon,idlError
|
||||
syn match idlSectionColon contained ":"
|
||||
|
||||
|
||||
syn match idlLibraryName contained "[a-zA-Z0-9_]\+" skipempty skipwhite nextgroup=idlLibraryContent,idlError,idlSemiColon
|
||||
syn keyword idlLibrary library skipempty skipwhite nextgroup=idlLibraryName
|
||||
syn region idlLibraryContent contained start="{" end="}" skipempty skipwhite nextgroup=idlError,idlSemiColon contains=@idlCommentable,idlAttributes,idlErrorSquareBracket,idlErrorBracket,idlImportlib,idlCoclass,idlTypedef,idlInterface
|
||||
|
||||
syn keyword idlImportlib contained importlib skipempty skipwhite nextgroup=idlStringArg
|
||||
syn region idlStringArg contained start="(" end=")" contains=idlString nextgroup=idlError,idlSemiColon,idlErrorBrace,idlErrorSquareBracket
|
||||
|
||||
syn keyword idlCoclass coclass contained skipempty skipwhite nextgroup=idlCoclassName
|
||||
syn match idlCoclassName "[a-zA-Z0-9_]\+" contained skipempty skipwhite nextgroup=idlCoclassDefinition,idlError,idlSemiColon
|
||||
|
||||
syn region idlCoclassDefinition contained start="{" end="}" contains=idlCoclassAttributes,idlInterface,idlErrorBracket,idlErrorSquareBracket skipempty skipwhite nextgroup=idlError,idlSemiColon
|
||||
syn region idlCoclassAttributes contained start=+\[+ end=+]+ skipempty skipwhite nextgroup=idlInterface contains=idlErrorBracket,idlErrorBrace,idlCoclassAttribute
|
||||
syn keyword idlCoclassAttribute contained default source
|
||||
"syn keyword idlInterface interface skipempty skipwhite nextgroup=idlInterfaceStubName
|
||||
|
||||
syn match idlImportString +"\f\+"+ skipempty skipwhite nextgroup=idlError,idlSemiColon
|
||||
syn keyword idlImport import skipempty skipwhite nextgroup=idlImportString
|
||||
|
||||
syn region idlAttributes start="\[" end="\]" contains=idlAttribute,idlAttributeParam,idlErrorBracket,idlErrorBrace,idlComment
|
||||
syn keyword idlAttribute contained propput propget propputref id helpstring object uuid pointer_default
|
||||
if !exists('idl_no_ms_extensions')
|
||||
syn keyword idlAttribute contained nonextensible dual version aggregatable restricted hidden noncreatable oleautomation
|
||||
endif
|
||||
syn region idlAttributeParam contained start="(" end=")" contains=idlString,idlUuid,idlLiteral,idlErrorBrace,idlErrorSquareBracket
|
||||
" skipwhite nextgroup=idlArraySize,idlParmList contains=idlArraySize,idlLiteral
|
||||
syn match idlErrorBrace contained "}"
|
||||
syn match idlErrorBracket contained ")"
|
||||
syn match idlErrorSquareBracket contained "\]"
|
||||
|
||||
syn match idlUuid contained +[0-9a-zA-Z]\{8}-\([0-9a-zA-Z]\{4}-\)\{3}[0-9a-zA-Z]\{12}+
|
||||
|
||||
" Raises
|
||||
syn keyword idlRaises contained raises skipempty skipwhite nextgroup=idlRaises,idlContext,idlSemiColon
|
||||
syn keyword idlRaises contained raises skipempty skipwhite nextgroup=idlRaises,idlContext,idlError,idlSemiColon
|
||||
|
||||
" Context
|
||||
syn keyword idlContext contained context skipempty skipwhite nextgroup=idlRaises,idlContext,idlSemiColon
|
||||
syn keyword idlContext contained context skipempty skipwhite nextgroup=idlRaises,idlContext,idlError,idlSemiColon
|
||||
|
||||
" Operation
|
||||
syn match idlParmList contained "," skipempty skipwhite nextgroup=idlOpParms
|
||||
syn region idlArraySize contained start="\[" end="\]" skipempty skipwhite nextgroup=idlArraySize,idlParmList contains=idlArraySize,idlLiteral
|
||||
syn match idlParmName contained "[a-zA-Z0-9_]\+" skipempty skipwhite nextgroup=idlParmList,idlArraySize
|
||||
syn keyword idlParmInt contained short long skipempty skipwhite nextgroup=idlParmName
|
||||
syn keyword idlParmType contained unsigned skipempty skipwhite nextgroup=idlParmInt
|
||||
syn region idlD3 contained start="<" end=">" skipempty skipwhite nextgroup=idlParmName contains=idlString,idlLiteral
|
||||
syn keyword idlParmType contained string skipempty skipwhite nextgroup=idlD3,idlParmName
|
||||
syn keyword idlParmType contained void float double char boolean octet any skipempty skipwhite nextgroup=idlParmName
|
||||
syn match idlParmType contained "[a-zA-Z0-9_]\+[ \t]*\(::[ \t]*[a-zA-Z0-9_]\+\)*" skipempty skipwhite nextgroup=idlParmName
|
||||
syn keyword idlOpParms contained in out inout skipempty skipwhite nextgroup=idlParmType
|
||||
syn match idlParmList contained "," skipempty skipwhite nextgroup=idlOpParms
|
||||
syn region idlArraySize contained start="\[" end="\]" skipempty skipwhite nextgroup=idlArraySize,idlParmList contains=idlArraySize,idlLiteral
|
||||
syn match idlParmName contained "[a-zA-Z0-9_]\+" skipempty skipwhite nextgroup=idlParmList,idlArraySize
|
||||
syn keyword idlParmInt contained short long skipempty skipwhite nextgroup=idlParmName
|
||||
syn keyword idlParmType contained unsigned skipempty skipwhite nextgroup=idlParmInt
|
||||
syn region idlD3 contained start="<" end=">" skipempty skipwhite nextgroup=idlParmName contains=idlString,idlLiteral
|
||||
syn keyword idlParmType contained string skipempty skipwhite nextgroup=idlD3,idlParmName
|
||||
syn keyword idlParmType contained void float double char boolean octet any skipempty skipwhite nextgroup=idlParmName
|
||||
syn match idlParmType contained "[a-zA-Z0-9_]\+[ \t]*\(::[ \t]*[a-zA-Z0-9_]\+\)*" skipempty skipwhite nextgroup=idlParmName
|
||||
syn keyword idlOpParms contained in out inout skipempty skipwhite nextgroup=idlParmType
|
||||
|
||||
syn region idlOpContents contained start="(" end=")" skipempty skipwhite nextgroup=idlRaises,idlContext,idlSemiColon contains=idlOpParms
|
||||
syn match idlOpName contained "[a-zA-Z0-9_]\+" skipempty skipwhite nextgroup=idlOpContents
|
||||
syn keyword idlOpInt contained short long skipempty skipwhite nextgroup=idlOpName
|
||||
syn region idlD2 contained start="<" end=">" skipempty skipwhite nextgroup=idlOpName contains=idlString,idlLiteral
|
||||
syn keyword idlOp contained unsigned skipempty skipwhite nextgroup=idlOpInt
|
||||
syn keyword idlOp contained string skipempty skipwhite nextgroup=idlD2,idlOpName
|
||||
syn keyword idlOp contained void float double char boolean octet any skipempty skipwhite nextgroup=idlOpName
|
||||
syn match idlOp contained "[a-zA-Z0-9_]\+[ \t]*\(::[ \t]*[a-zA-Z0-9_]\+\)*" skipempty skipwhite nextgroup=idlOpName
|
||||
syn keyword idlOp contained void skipempty skipwhite nextgroup=idlOpName
|
||||
syn keyword idlOneWayOp contained oneway skipempty skipwhite nextgroup=idOp
|
||||
if !exists('idl_no_ms_extensions')
|
||||
syn keyword idlOpParms contained retval optional skipempty skipwhite nextgroup=idlParmType
|
||||
syn match idlOpParms contained +\<\(iid_is\|defaultvalue\)\s*([^)]*)+ skipempty skipwhite nextgroup=idlParamType
|
||||
|
||||
syn keyword idlVariantType contained BSTR VARIANT VARIANT_BOOL long short unsigned double CURRENCY DATE
|
||||
syn region idlSafeArray contained matchgroup=idlVariantType start=+SAFEARRAY(\s*+ end=+)+ contains=idlVariantType
|
||||
endif
|
||||
|
||||
syn region idlOpContents contained start="(" end=")" skipempty skipwhite nextgroup=idlRaises,idlContext,idlError,idlSemiColon contains=idlOpParms,idlSafeArray,idlVariantType,@idlCommentable
|
||||
syn match idlOpName contained "[a-zA-Z0-9_]\+" skipempty skipwhite nextgroup=idlOpContents
|
||||
syn keyword idlOpInt contained short long skipempty skipwhite nextgroup=idlOpName
|
||||
syn region idlD2 contained start="<" end=">" skipempty skipwhite nextgroup=idlOpName contains=idlString,idlLiteral
|
||||
syn keyword idlOp contained unsigned skipempty skipwhite nextgroup=idlOpInt
|
||||
syn keyword idlOp contained string skipempty skipwhite nextgroup=idlD2,idlOpName
|
||||
syn keyword idlOp contained void float double char boolean octet any skipempty skipwhite nextgroup=idlOpName
|
||||
syn match idlOp contained "[a-zA-Z0-9_]\+[ \t]*\(::[ \t]*[a-zA-Z0-9_]\+\)*" skipempty skipwhite nextgroup=idlOpName
|
||||
syn keyword idlOp contained void skipempty skipwhite nextgroup=idlOpName
|
||||
syn keyword idlOneWayOp contained oneway skipempty skipwhite nextgroup=idOp
|
||||
|
||||
" Enum
|
||||
syn region idlEnumContents contained start="{" end="}" skipempty skipwhite nextgroup=idlSemiColon, idlSimpDecl contains=idlId,idlComment
|
||||
syn match idlEnumName contained "[a-zA-Z0-9_]\+" skipempty skipwhite nextgroup=idlEnumContents
|
||||
syn keyword idlEnum enum skipempty skipwhite nextgroup=idlEnumName
|
||||
syn region idlEnumContents contained start="{" end="}" skipempty skipwhite nextgroup=idlError,idlSemiColon,idlSimpDecl contains=idlId,idlAttributes,@idlCommentable
|
||||
syn match idlEnumName contained "[a-zA-Z0-9_]\+" skipempty skipwhite nextgroup=idlEnumContents
|
||||
syn keyword idlEnum enum skipempty skipwhite nextgroup=idlEnumName,idlEnumContents
|
||||
|
||||
" Typedef
|
||||
syn keyword idlTypedef typedef skipempty skipwhite nextgroup=idlBaseType, idlBaseTypeInt, idlSeqType
|
||||
syn keyword idlTypedef typedef skipempty skipwhite nextgroup=idlTypedefOtherTypeQualifier,idlDefBaseType,idlDefBaseTypeInt,idlDefSeqType,idlDefv1Enum,idlDefEnum,idlDefOtherType,idlDefAttributes,idlError
|
||||
|
||||
if !exists('idl_no_extensions')
|
||||
syn keyword idlTypedefOtherTypeQualifier contained struct enum interface nextgroup=idlDefBaseType,idlDefBaseTypeInt,idlDefSeqType,idlDefv1Enum,idlDefEnum,idlDefOtherType,idlDefAttributes,idlError skipwhite
|
||||
|
||||
syn region idlDefAttributes contained start="\[" end="\]" contains=idlAttribute,idlAttributeParam,idlErrorBracket,idlErrorBrace skipempty skipwhite nextgroup=idlDefBaseType,idlDefBaseTypeInt,idlDefSeqType,idlDefv1Enum,idlDefEnum,idlDefOtherType,idlError
|
||||
|
||||
syn keyword idlDefBaseType contained float double char boolean octet any skipempty skipwhite nextgroup=idlTypedefDecl,idlError
|
||||
syn keyword idlDefBaseTypeInt contained short long skipempty skipwhite nextgroup=idlTypedefDecl,idlError
|
||||
syn match idlDefOtherType contained +\<\k\+\>+ skipempty nextgroup=idlTypedefDecl,idlError
|
||||
" syn keyword idlDefSeqType contained sequence skipempty skipwhite nextgroup=idlD4
|
||||
|
||||
" Enum typedef
|
||||
syn keyword idlDefEnum contained enum skipempty skipwhite nextgroup=idlDefEnumName,idlDefEnumContents
|
||||
syn match idlDefEnumName contained "[a-zA-Z0-9_]\+" skipempty skipwhite nextgroup=idlDefEnumContents,idlTypedefDecl
|
||||
syn region idlDefEnumContents contained start="{" end="}" skipempty skipwhite nextgroup=idlError,idlTypedefDecl contains=idlId,idlAttributes
|
||||
|
||||
syn match idlTypedefDecl contained "[a-zA-Z0-9_]\+" skipempty skipwhite nextgroup=idlError,idlSemiColon
|
||||
endif
|
||||
|
||||
" Struct
|
||||
syn region idlStructContent contained start="{" end="}" skipempty skipwhite nextgroup=idlSemiColon, idlSimpDecl contains=idlBaseType, idlBaseTypeInt, idlSeqType,idlComment, idlEnum, idlUnion
|
||||
syn match idlStructName contained "[a-zA-Z0-9_]\+" skipempty skipwhite nextgroup=idlStructContent
|
||||
syn keyword idlStruct struct skipempty skipwhite nextgroup=idlStructName
|
||||
syn region idlStructContent contained start="{" end="}" skipempty skipwhite nextgroup=idlError,idlSemiColon,idlSimpDecl contains=idlBaseType,idlBaseTypeInt,idlSeqType,@idlCommentable,idlEnum,idlUnion
|
||||
syn match idlStructName contained "[a-zA-Z0-9_]\+" skipempty skipwhite nextgroup=idlStructContent
|
||||
syn keyword idlStruct struct skipempty skipwhite nextgroup=idlStructName
|
||||
|
||||
" Exception
|
||||
syn keyword idlException exception skipempty skipwhite nextgroup=idlStructName
|
||||
syn keyword idlException exception skipempty skipwhite nextgroup=idlStructName
|
||||
|
||||
" Union
|
||||
syn match idlColon contained ":" skipempty skipwhite nextgroup=idlCase,idlSeqType,idlBaseType,idlBaseTypeInt
|
||||
syn region idlCaseLabel contained start="" skip="::" end=":"me=e-1 skipempty skipwhite nextgroup=idlColon contains=idlLiteral,idlString
|
||||
syn keyword idlCase contained case skipempty skipwhite nextgroup=idlCaseLabel
|
||||
syn keyword idlCase contained default skipempty skipwhite nextgroup=idlColon
|
||||
syn region idlUnionContent contained start="{" end="}" skipempty skipwhite nextgroup=idlSemiColon,idlSimpDecl contains=idlCase
|
||||
syn region idlSwitchType contained start="(" end=")" skipempty skipwhite nextgroup=idlUnionContent
|
||||
syn keyword idlUnionSwitch contained switch skipempty skipwhite nextgroup=idlSwitchType
|
||||
syn match idlUnionName contained "[a-zA-Z0-9_]\+" skipempty skipwhite nextgroup=idlUnionSwitch
|
||||
syn keyword idlUnion union skipempty skipwhite nextgroup=idlUnionName
|
||||
syn match idlColon contained ":" skipempty skipwhite nextgroup=idlCase,idlSeqType,idlBaseType,idlBaseTypeInt
|
||||
syn region idlCaseLabel contained start="" skip="::" end=":"me=e-1 skipempty skipwhite nextgroup=idlColon contains=idlLiteral,idlString
|
||||
syn keyword idlCase contained case skipempty skipwhite nextgroup=idlCaseLabel
|
||||
syn keyword idlCase contained default skipempty skipwhite nextgroup=idlColon
|
||||
syn region idlUnionContent contained start="{" end="}" skipempty skipwhite nextgroup=idlError,idlSemiColon,idlSimpDecl contains=idlCase
|
||||
syn region idlSwitchType contained start="(" end=")" skipempty skipwhite nextgroup=idlUnionContent
|
||||
syn keyword idlUnionSwitch contained switch skipempty skipwhite nextgroup=idlSwitchType
|
||||
syn match idlUnionName contained "[a-zA-Z0-9_]\+" skipempty skipwhite nextgroup=idlUnionSwitch
|
||||
syn keyword idlUnion union skipempty skipwhite nextgroup=idlUnionName
|
||||
|
||||
syn sync lines=200
|
||||
if !exists('idl_no_extensions')
|
||||
syn sync match idlInterfaceSync grouphere idlInterfaceContent "\<\(disp\)\=interface\>\s\+\k\+\s*:\s*\k\+\_s*{" skipempty skipwhite nextgroup=idlError,idlSemiColon contains=@idlContentCluster,@idlCommentable
|
||||
syn sync maxlines=1000 minlines=100
|
||||
else
|
||||
syn sync lines=200
|
||||
endif
|
||||
" syn sync fromstart
|
||||
|
||||
" 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_idl_syntax_inits")
|
||||
if version < 508
|
||||
let did_idl_syntax_inits = 1
|
||||
command -nargs=+ HiLink hi link <args>
|
||||
else
|
||||
command -nargs=+ HiLink hi def link <args>
|
||||
if !exists("did_idl_syntax_inits")
|
||||
let did_idl_syntax_inits = 1
|
||||
" The default methods for highlighting. Can be overridden later
|
||||
command -nargs=+ HiLink hi def link <args>
|
||||
|
||||
HiLink idlInclude Include
|
||||
HiLink idlPreProc PreProc
|
||||
HiLink idlPreCondit PreCondit
|
||||
HiLink idlDefine Macro
|
||||
HiLink idlIncluded String
|
||||
HiLink idlString String
|
||||
HiLink idlComment Comment
|
||||
HiLink idlTodo Todo
|
||||
HiLink idlLiteral Number
|
||||
HiLink idlUuid Number
|
||||
HiLink idlType Type
|
||||
HiLink idlVariantType idlType
|
||||
|
||||
HiLink idlModule Keyword
|
||||
HiLink idlInterface Keyword
|
||||
HiLink idlEnum Keyword
|
||||
HiLink idlStruct Keyword
|
||||
HiLink idlUnion Keyword
|
||||
HiLink idlTypedef Keyword
|
||||
HiLink idlException Keyword
|
||||
HiLink idlTypedefOtherTypeQualifier keyword
|
||||
|
||||
HiLink idlModuleName Typedef
|
||||
HiLink idlInterfaceName Typedef
|
||||
HiLink idlEnumName Typedef
|
||||
HiLink idlStructName Typedef
|
||||
HiLink idlUnionName Typedef
|
||||
|
||||
HiLink idlBaseTypeInt idlType
|
||||
HiLink idlBaseType idlType
|
||||
HiLink idlSeqType idlType
|
||||
HiLink idlD1 Paren
|
||||
HiLink idlD2 Paren
|
||||
HiLink idlD3 Paren
|
||||
HiLink idlD4 Paren
|
||||
"HiLink idlArraySize Paren
|
||||
"HiLink idlArraySize1 Paren
|
||||
HiLink idlModuleContent Paren
|
||||
HiLink idlUnionContent Paren
|
||||
HiLink idlStructContent Paren
|
||||
HiLink idlEnumContents Paren
|
||||
HiLink idlInterfaceContent Paren
|
||||
|
||||
HiLink idlSimpDecl Identifier
|
||||
HiLink idlROAttr StorageClass
|
||||
HiLink idlAttr Keyword
|
||||
HiLink idlConst StorageClass
|
||||
|
||||
HiLink idlOneWayOp StorageClass
|
||||
HiLink idlOp idlType
|
||||
HiLink idlParmType idlType
|
||||
HiLink idlOpName Function
|
||||
HiLink idlOpParms SpecialComment
|
||||
HiLink idlParmName Identifier
|
||||
HiLink idlInheritFrom Identifier
|
||||
HiLink idlAttribute SpecialComment
|
||||
|
||||
HiLink idlId Constant
|
||||
"HiLink idlCase Keyword
|
||||
HiLink idlCaseLabel Constant
|
||||
|
||||
HiLink idlErrorBracket Error
|
||||
HiLink idlErrorBrace Error
|
||||
HiLink idlErrorSquareBracket Error
|
||||
|
||||
HiLink idlImport Keyword
|
||||
HiLink idlImportString idlString
|
||||
HiLink idlCoclassAttribute StorageClass
|
||||
HiLink idlLibrary Keyword
|
||||
HiLink idlImportlib Keyword
|
||||
HiLink idlCoclass Keyword
|
||||
HiLink idlLibraryName Typedef
|
||||
HiLink idlCoclassName Typedef
|
||||
" hi idlLibraryContent guifg=red
|
||||
HiLink idlTypedefDecl Typedef
|
||||
HiLink idlDefEnum Keyword
|
||||
HiLink idlDefv1Enum Keyword
|
||||
HiLink idlDefEnumName Typedef
|
||||
HiLink idlDefEnumContents Paren
|
||||
HiLink idlDefBaseTypeInt idlType
|
||||
HiLink idlDefBaseType idlType
|
||||
HiLink idlDefSeqType idlType
|
||||
HiLink idlInterfaceSections Label
|
||||
|
||||
if exists("idlsyntax_showerror")
|
||||
if exists("idlsyntax_showerror_soft")
|
||||
hi default idlError guibg=#d0ffd0
|
||||
else
|
||||
HiLink idlError Error
|
||||
endif
|
||||
endif
|
||||
|
||||
HiLink idlInclude Include
|
||||
HiLink idlPreProc PreProc
|
||||
HiLink idlPreCondit PreCondit
|
||||
HiLink idlDefine Macro
|
||||
HiLink idlIncluded String
|
||||
HiLink idlString String
|
||||
HiLink idlComment Comment
|
||||
HiLink idlTodo Todo
|
||||
HiLink idlLiteral Number
|
||||
|
||||
HiLink idlModule Keyword
|
||||
HiLink idlInterface Keyword
|
||||
HiLink idlEnum Keyword
|
||||
HiLink idlStruct Keyword
|
||||
HiLink idlUnion Keyword
|
||||
HiLink idlTypedef Keyword
|
||||
HiLink idlException Keyword
|
||||
|
||||
HiLink idlModuleName Typedef
|
||||
HiLink idlInterfaceName Typedef
|
||||
HiLink idlEnumName Typedef
|
||||
HiLink idlStructName Typedef
|
||||
HiLink idlUnionName Typedef
|
||||
|
||||
HiLink idlBaseTypeInt idlType
|
||||
HiLink idlBaseType idlType
|
||||
HiLink idlSeqType idlType
|
||||
HiLink idlD1 Paren
|
||||
HiLink idlD2 Paren
|
||||
HiLink idlD3 Paren
|
||||
HiLink idlD4 Paren
|
||||
"HiLink idlArraySize Paren
|
||||
"HiLink idlArraySize1 Paren
|
||||
HiLink idlModuleContent Paren
|
||||
HiLink idlUnionContent Paren
|
||||
HiLink idlStructContent Paren
|
||||
HiLink idlEnumContents Paren
|
||||
HiLink idlInterfaceContent Paren
|
||||
|
||||
HiLink idlSimpDecl Identifier
|
||||
HiLink idlROAttr StorageClass
|
||||
HiLink idlAttr Keyword
|
||||
HiLink idlConst StorageClass
|
||||
|
||||
HiLink idlOneWayOp StorageClass
|
||||
HiLink idlOp idlType
|
||||
HiLink idlParmType idlType
|
||||
HiLink idlOpName Function
|
||||
HiLink idlOpParms StorageClass
|
||||
HiLink idlParmName Identifier
|
||||
HiLink idlInheritFrom Identifier
|
||||
|
||||
HiLink idlId Constant
|
||||
"HiLink idlCase Keyword
|
||||
HiLink idlCaseLabel Constant
|
||||
|
||||
delcommand HiLink
|
||||
endif
|
||||
|
||||
let b:current_syntax = "idl"
|
||||
|
||||
" vim: ts=8
|
||||
" vim: sw=2 et
|
||||
|
||||
@ -2,22 +2,23 @@
|
||||
" This is a GENERATED FILE. Please always refer to source file at the URI below.
|
||||
" Language: lilo configuration (lilo.conf)
|
||||
" Maintainer: David Ne\v{c}as (Yeti) <yeti@physics.muni.cz>
|
||||
" Last Change: 2003 May 04
|
||||
" Last Change: 2004-07-20
|
||||
" URL: http://trific.ath.cx/Ftp/vim/syntax/lilo.vim
|
||||
|
||||
|
||||
" Setup
|
||||
if version >= 600
|
||||
if exists("b:current_syntax")
|
||||
finish
|
||||
endif
|
||||
if exists("b:current_syntax")
|
||||
finish
|
||||
endif
|
||||
else
|
||||
syntax clear
|
||||
syntax clear
|
||||
endif
|
||||
|
||||
if version >= 600
|
||||
command -nargs=1 SetIsk setlocal iskeyword=<args>
|
||||
command -nargs=1 SetIsk setlocal iskeyword=<args>
|
||||
else
|
||||
command -nargs=1 SetIsk set iskeyword=<args>
|
||||
command -nargs=1 SetIsk set iskeyword=<args>
|
||||
endif
|
||||
SetIsk @,48-57,.,-,_
|
||||
delcommand SetIsk
|
||||
@ -34,23 +35,23 @@ syn match liloHexNumber "0[xX]\x\+" contained
|
||||
syn match liloDecNumberP "\d\+p\=" contained
|
||||
syn match liloSpecial contained "\\\(\"\|\\\|$\)"
|
||||
syn region liloString start=+"+ skip=+\\\\\|\\"+ end=+"+ contained contains=liloSpecial,liloEnviron
|
||||
syn match liloLabel "\S\+" contained contains=liloSpecial,liloEnviron
|
||||
syn match liloLabel :[^ "]\+: contained contains=liloSpecial,liloEnviron
|
||||
syn region liloPath start=+[$/]+ skip=+\\\\\|\\ \|\\$"+ end=+ \|$+ contained contains=liloSpecial,liloEnviron
|
||||
syn match liloDecNumberList "\(\d\|,\)\+" contained contains=liloDecNumber
|
||||
syn match liloDecNumberPList "\(\d\|[,p]\)\+" contained contains=liloDecNumberP,liloDecNumber
|
||||
syn region liloAnything start=+[^[:space:]#]+ skip=+\\\\\|\\ \|\\$+ end=+ \|$+ contained contains=liloSpecial,liloEnviron,liloString
|
||||
|
||||
" Path
|
||||
syn keyword liloOption backup bitmap boot disktab force-backup install keytable map message nextgroup=liloEqPath,liloEqPathComment,liloError skipwhite skipempty
|
||||
syn keyword liloOption backup bitmap boot disktab force-backup keytable map message nextgroup=liloEqPath,liloEqPathComment,liloError skipwhite skipempty
|
||||
syn keyword liloKernelOpt initrd root nextgroup=liloEqPath,liloEqPathComment,liloError skipwhite skipempty
|
||||
syn keyword liloImageOpt path loader table nextgroup=liloEqPath,liloEqPathComment,liloError skipwhite skipempty
|
||||
syn keyword liloDiskOpt partition nextgroup=liloEqPath,liloEqPathComment,liloError skipwhite skipempty
|
||||
|
||||
" Other
|
||||
syn keyword liloOption menu-scheme raid-extra-boot serial nextgroup=liloEqAnything,liloEqAnythingComment,liloError skipwhite skipempty
|
||||
syn keyword liloOption default nextgroup=liloEqLabel,liloEqLabelComment,liloError skipwhite skipempty
|
||||
syn keyword liloOption menu-scheme raid-extra-boot serial install nextgroup=liloEqAnything,liloEqAnythingComment,liloError skipwhite skipempty
|
||||
syn keyword liloOption bios-passes-dl nextgroup=liloEqAnything,liloEqAnythingComment,liloError skipwhite skipempty
|
||||
syn keyword liloOption default label alias wmdefault nextgroup=liloEqLabelString,liloEqLabelStringComment,liloError skipwhite skipempty
|
||||
syn keyword liloKernelOpt ramdisk nextgroup=liloEqAnything,liloEqAnythingComment,liloError skipwhite skipempty
|
||||
syn keyword liloImageOpt alias label nextgroup=liloEqLabel,liloEqLabelComment,liloError skipwhite skipempty
|
||||
syn keyword liloImageOpt password range nextgroup=liloEqAnything,liloEqAnythingComment,liloError skipwhite skipempty
|
||||
syn keyword liloDiskOpt set type nextgroup=liloEqAnything,liloEqAnythingComment,liloError skipwhite skipempty
|
||||
|
||||
@ -67,19 +68,21 @@ syn keyword liloKernelOpt append nextgroup=liloEqString,liloEqStringComment,lilo
|
||||
syn keyword liloImageOpt fallback literal nextgroup=liloEqString,liloEqStringComment,liloError skipwhite skipempty
|
||||
|
||||
" Hex number
|
||||
syn keyword liloImageOpt map-drive to nextgroup=liloEqHexNumber,liloEqHexNumberComment,liloError skipwhite skipempty
|
||||
syn keyword liloImageOpt map-drive to boot-as nextgroup=liloEqHexNumber,liloEqHexNumberComment,liloError skipwhite skipempty
|
||||
syn keyword liloDiskOpt bios normal hidden nextgroup=liloEqNumber,liloEqNumberComment,liloError skipwhite skipempty
|
||||
|
||||
" Number list
|
||||
syn keyword liloOption bmp-colors bmp-timer nextgroup=liloEqNumberList,liloEqNumberListComment,liloError skipwhite skipempty
|
||||
syn keyword liloOption bmp-colors nextgroup=liloEqNumberList,liloEqNumberListComment,liloError skipwhite skipempty
|
||||
|
||||
" Number list, some of the numbers followed by p
|
||||
syn keyword liloOption bmp-table nextgroup=liloEqDecNumberPList,liloEqDecNumberPListComment,liloError skipwhite skipempty
|
||||
syn keyword liloOption bmp-table bmp-timer nextgroup=liloEqDecNumberPList,liloEqDecNumberPListComment,liloError skipwhite skipempty
|
||||
|
||||
" Flag
|
||||
syn keyword liloOption compact fix-table geometric ignore-table lba32 linear mandatory nowarn prompt
|
||||
syn keyword liloOption bmp-retain el-torito-bootable-CD large-memory suppress-boot-time-BIOS-data
|
||||
syn keyword liloKernelOpt read-only read-write
|
||||
syn keyword liloImageOpt bypass lock mandatory optional restricted single-key unsafe
|
||||
syn keyword liloImageOpt master-boot wmwarn wmdisable
|
||||
syn keyword liloDiskOpt change activate deactivate inaccessible reset
|
||||
|
||||
" Image
|
||||
@ -97,7 +100,7 @@ syn match liloEqNumberComment "#.*$" contained nextgroup=liloEqNumber,liloEqNumb
|
||||
syn match liloEqDecNumberComment "#.*$" contained nextgroup=liloEqDecNumber,liloEqDecNumberComment,liloError skipwhite skipempty
|
||||
syn match liloEqHexNumberComment "#.*$" contained nextgroup=liloEqHexNumber,liloEqHexNumberComment,liloError skipwhite skipempty
|
||||
syn match liloEqStringComment "#.*$" contained nextgroup=liloEqString,liloEqStringComment,liloError skipwhite skipempty
|
||||
syn match liloEqLabelComment "#.*$" contained nextgroup=liloEqLabel,liloEqLabelComment,liloError skipwhite skipempty
|
||||
syn match liloEqLabelStringComment "#.*$" contained nextgroup=liloEqLabelString,liloEqLabelStringComment,liloError skipwhite skipempty
|
||||
syn match liloEqNumberListComment "#.*$" contained nextgroup=liloEqNumberList,liloEqNumberListComment,liloError skipwhite skipempty
|
||||
syn match liloEqDecNumberPListComment "#.*$" contained nextgroup=liloEqDecNumberPList,liloEqDecNumberPListComment,liloError skipwhite skipempty
|
||||
syn match liloEqAnythingComment "#.*$" contained nextgroup=liloEqAnything,liloEqAnythingComment,liloError skipwhite skipempty
|
||||
@ -109,7 +112,7 @@ syn match liloEqNumber "=" contained nextgroup=liloDecNumber,liloHexNumber,liloN
|
||||
syn match liloEqDecNumber "=" contained nextgroup=liloDecNumber,liloDecNumberComment,liloError skipwhite skipempty
|
||||
syn match liloEqHexNumber "=" contained nextgroup=liloHexNumber,liloHexNumberComment,liloError skipwhite skipempty
|
||||
syn match liloEqString "=" contained nextgroup=liloString,liloStringComment,liloError skipwhite skipempty
|
||||
syn match liloEqLabel "=" contained nextgroup=liloLabel,liloLabelComment,liloError skipwhite skipempty
|
||||
syn match liloEqLabelString "=" contained nextgroup=liloString,liloLabel,liloLabelStringComment,liloError skipwhite skipempty
|
||||
syn match liloEqNumberList "=" contained nextgroup=liloDecNumberList,liloDecNumberListComment,liloError skipwhite skipempty
|
||||
syn match liloEqDecNumberPList "=" contained nextgroup=liloDecNumberPList,liloDecNumberPListComment,liloError skipwhite skipempty
|
||||
syn match liloEqAnything "=" contained nextgroup=liloAnything,liloAnythingComment,liloError skipwhite skipempty
|
||||
@ -121,74 +124,71 @@ syn match liloNumberComment "#.*$" contained nextgroup=liloDecNumber,liloHexNumb
|
||||
syn match liloDecNumberComment "#.*$" contained nextgroup=liloDecNumber,liloDecNumberComment,liloError skipwhite skipempty
|
||||
syn match liloHexNumberComment "#.*$" contained nextgroup=liloHexNumber,liloHexNumberComment,liloError skipwhite skipempty
|
||||
syn match liloStringComment "#.*$" contained nextgroup=liloString,liloStringComment,liloError skipwhite skipempty
|
||||
syn match liloLabelComment "#.*$" contained nextgroup=liloLabel,liloLabelComment,liloError skipwhite skipempty
|
||||
syn match liloLabelStringComment "#.*$" contained nextgroup=liloString,liloLabel,liloLabelStringComment,liloError skipwhite skipempty
|
||||
syn match liloDecNumberListComment "#.*$" contained nextgroup=liloDecNumberList,liloDecNumberListComment,liloError skipwhite skipempty
|
||||
syn match liloDecNumberPListComment "#.*$" contained nextgroup=liloDecNumberPList,liloDecNumberPListComment,liloError skipwhite skipempty
|
||||
syn match liloAnythingComment "#.*$" contained nextgroup=liloAnything,liloAnythingComment,liloError skipwhite skipempty
|
||||
|
||||
" Define the default highlighting
|
||||
if version >= 508 || !exists("did_lilo_syntax_inits")
|
||||
if version < 508
|
||||
let did_lilo_syntax_inits = 1
|
||||
command -nargs=+ HiLink hi link <args>
|
||||
else
|
||||
command -nargs=+ HiLink hi def link <args>
|
||||
endif
|
||||
if version < 508
|
||||
let did_lilo_syntax_inits = 1
|
||||
command -nargs=+ HiLink hi link <args>
|
||||
else
|
||||
command -nargs=+ HiLink hi def link <args>
|
||||
endif
|
||||
|
||||
HiLink liloEqPath liloEquals
|
||||
HiLink liloEqWord liloEquals
|
||||
HiLink liloEqVga liloEquals
|
||||
HiLink liloEqDecNumber liloEquals
|
||||
HiLink liloEqHexNumber liloEquals
|
||||
HiLink liloEqNumber liloEquals
|
||||
HiLink liloEqString liloEquals
|
||||
HiLink liloEqLabel liloEquals
|
||||
HiLink liloEqAnything liloEquals
|
||||
HiLink liloEquals Special
|
||||
HiLink liloEqPath liloEquals
|
||||
HiLink liloEqWord liloEquals
|
||||
HiLink liloEqVga liloEquals
|
||||
HiLink liloEqDecNumber liloEquals
|
||||
HiLink liloEqHexNumber liloEquals
|
||||
HiLink liloEqNumber liloEquals
|
||||
HiLink liloEqString liloEquals
|
||||
HiLink liloEqAnything liloEquals
|
||||
HiLink liloEquals Special
|
||||
|
||||
HiLink liloError Error
|
||||
HiLink liloError Error
|
||||
|
||||
HiLink liloEqPathComment liloComment
|
||||
HiLink liloEqVgaComment liloComment
|
||||
HiLink liloEqDecNumberComment liloComment
|
||||
HiLink liloEqHexNumberComment liloComment
|
||||
HiLink liloEqStringComment liloComment
|
||||
HiLink liloEqLabelComment liloComment
|
||||
HiLink liloEqAnythingComment liloComment
|
||||
HiLink liloPathComment liloComment
|
||||
HiLink liloVgaComment liloComment
|
||||
HiLink liloDecNumberComment liloComment
|
||||
HiLink liloHexNumberComment liloComment
|
||||
HiLink liloNumberComment liloComment
|
||||
HiLink liloStringComment liloComment
|
||||
HiLink liloLabelComment liloComment
|
||||
HiLink liloAnythingComment liloComment
|
||||
HiLink liloComment Comment
|
||||
HiLink liloEqPathComment liloComment
|
||||
HiLink liloEqVgaComment liloComment
|
||||
HiLink liloEqDecNumberComment liloComment
|
||||
HiLink liloEqHexNumberComment liloComment
|
||||
HiLink liloEqStringComment liloComment
|
||||
HiLink liloEqAnythingComment liloComment
|
||||
HiLink liloPathComment liloComment
|
||||
HiLink liloVgaComment liloComment
|
||||
HiLink liloDecNumberComment liloComment
|
||||
HiLink liloHexNumberComment liloComment
|
||||
HiLink liloNumberComment liloComment
|
||||
HiLink liloStringComment liloComment
|
||||
HiLink liloAnythingComment liloComment
|
||||
HiLink liloComment Comment
|
||||
|
||||
HiLink liloDiskOpt liloOption
|
||||
HiLink liloKernelOpt liloOption
|
||||
HiLink liloImageOpt liloOption
|
||||
HiLink liloOption Keyword
|
||||
HiLink liloDiskOpt liloOption
|
||||
HiLink liloKernelOpt liloOption
|
||||
HiLink liloImageOpt liloOption
|
||||
HiLink liloOption Keyword
|
||||
|
||||
HiLink liloDecNumber liloNumber
|
||||
HiLink liloHexNumber liloNumber
|
||||
HiLink liloDecNumberP liloNumber
|
||||
HiLink liloNumber Number
|
||||
HiLink liloString String
|
||||
HiLink liloPath Constant
|
||||
HiLink liloDecNumber liloNumber
|
||||
HiLink liloHexNumber liloNumber
|
||||
HiLink liloDecNumberP liloNumber
|
||||
HiLink liloNumber Number
|
||||
HiLink liloString String
|
||||
HiLink liloPath Constant
|
||||
|
||||
HiLink liloSpecial Special
|
||||
HiLink liloLabel Title
|
||||
HiLink liloDecNumberList Special
|
||||
HiLink liloDecNumberPList Special
|
||||
HiLink liloAnything Normal
|
||||
HiLink liloEnviron Identifier
|
||||
HiLink liloVgaKeyword Identifier
|
||||
HiLink liloImage Type
|
||||
HiLink liloChRules Preproc
|
||||
HiLink liloDisk Preproc
|
||||
HiLink liloSpecial Special
|
||||
HiLink liloLabel Title
|
||||
HiLink liloDecNumberList Special
|
||||
HiLink liloDecNumberPList Special
|
||||
HiLink liloAnything Normal
|
||||
HiLink liloEnviron Identifier
|
||||
HiLink liloVgaKeyword Identifier
|
||||
HiLink liloImage Type
|
||||
HiLink liloChRules Preproc
|
||||
HiLink liloDisk Preproc
|
||||
|
||||
delcommand HiLink
|
||||
delcommand HiLink
|
||||
endif
|
||||
|
||||
let b:current_syntax = "lilo"
|
||||
|
||||
@ -2,10 +2,10 @@
|
||||
" Language: LambdaProlog (Teyjus)
|
||||
" Filenames: *.mod *.sig
|
||||
" Maintainer: Markus Mottl <markus@oefai.at>
|
||||
" URL: http://www.ai.univie.ac.at/~markus/vim/syntax/lprolog.vim
|
||||
" Last Change: 2003 May 11
|
||||
" 2001 Apr 26 - Upgraded for new Vim version
|
||||
" 2000 Jun 5 - Initial release
|
||||
" URL: http://www.oefai.at/~markus/vim/syntax/lprolog.vim
|
||||
" Last Change: 2004 Jul 26
|
||||
" 2001 Apr 26 - Upgraded for new Vim version
|
||||
" 2000 Jun 5 - Initial release
|
||||
|
||||
" For version 5.x: Clear all syntax items
|
||||
" For version 6.x: Quit when a syntax file was already loaded
|
||||
|
||||
@ -2,12 +2,12 @@
|
||||
" Language: OCaml
|
||||
" Filenames: *.ml *.mli *.mll *.mly
|
||||
" Maintainers: Markus Mottl <markus@oefai.at>
|
||||
" Karl-Heinz Sylla <Karl-Heinz.Sylla@gmd.de>
|
||||
" Issac Trotts <<ijtrotts@ucdavis.edu>
|
||||
" URL: http://www.oefai.at/~markus/vim/syntax/ocaml.vim
|
||||
" Last Change: 2003 May 04
|
||||
" 2002 Oct 24 - Small fix for "module type" (MM)
|
||||
" 2002 Jun 16 - Added "&&", "<" and ">" as operators (MM)
|
||||
" Karl-Heinz Sylla <Karl-Heinz.Sylla@gmd.de>
|
||||
" Issac Trotts <ijtrotts@ucdavis.edu>
|
||||
" URL: http://www.oefai.at/~markus/vim/syntax/ocaml.vim
|
||||
" Last Change: 2004 Jul 26
|
||||
" 2003 Jan 19 - Added keyword "require" for scripting (MM)
|
||||
" 2002 Oct 30 - New variable "ocaml_revised" (MM)
|
||||
|
||||
" For version 5.x: Clear all syntax items
|
||||
" For version 6.x: Quit when a syntax file was already loaded
|
||||
@ -24,7 +24,7 @@ syn case match
|
||||
syn match ocamlComment "^#!.*"
|
||||
|
||||
" Scripting directives
|
||||
syn match ocamlScript "^#\<\(quit\|labels\|warnings\|directory\|cd\|load\|use\|install_printer\|remove_printer\|trace\|untrace\|untrace_all\|print_depth\|print_length\)\>"
|
||||
syn match ocamlScript "^#\<\(quit\|labels\|warnings\|directory\|cd\|load\|use\|install_printer\|remove_printer\|require\|trace\|untrace\|untrace_all\|print_depth\|print_length\)\>"
|
||||
|
||||
" lowercase identifier - the standard way to match
|
||||
syn match ocamlLCIdentifier /\<\(\l\|_\)\(\w\|'\)*\>/
|
||||
@ -163,7 +163,7 @@ else
|
||||
syn match ocamlKeyChar "!"
|
||||
endif
|
||||
|
||||
syn keyword ocamlType array bool char exn float format int
|
||||
syn keyword ocamlType array bool char exn float format format4 int
|
||||
syn keyword ocamlType list option string unit
|
||||
|
||||
syn keyword ocamlOperator asr lor lsl lsr lxor mod not
|
||||
|
||||
@ -1,12 +1,12 @@
|
||||
" Vim syntax file
|
||||
" Language: SML
|
||||
" Filenames: *.sml *.sig
|
||||
" Maintainers: Markus Mottl <markus@oefai.at>
|
||||
" Fabrizio Zeno Cornelli <zeno@filibusta.crema.unimi.it>
|
||||
" URL: http://www.ai.univie.ac.at/~markus/vim/syntax/sml.vim
|
||||
" Last Change: 2003 May 11
|
||||
" 2001 Nov 20 - Fixed small highlighting bug with modules (MM)
|
||||
" 2001 Aug 29 - Fixed small highlighting bug (MM)
|
||||
" Maintainers: Markus Mottl <markus@oefai.at>
|
||||
" Fabrizio Zeno Cornelli <zeno@filibusta.crema.unimi.it>
|
||||
" URL: http://www.oefai.at/~markus/vim/syntax/sml.vim
|
||||
" Last Change: 2004 Jul 26
|
||||
" 2001 Nov 20 - Fixed small highlighting bug with modules (MM)
|
||||
" 2001 Aug 29 - Fixed small highlighting bug (MM)
|
||||
|
||||
" For version 5.x: Clear all syntax items
|
||||
" For version 6.x: Quit when a syntax file was already loaded
|
||||
|
||||
Reference in New Issue
Block a user