Skip to content
Snippets Groups Projects
Commit 5eb86f91 authored by Bram Moolenaar's avatar Bram Moolenaar
Browse files

updated for version 7.0012

parent 89cb5e0f
No related branches found
No related tags found
No related merge requests found
Showing
with 852 additions and 399 deletions
...@@ -148,8 +148,8 @@ SRC_UNIX = \ ...@@ -148,8 +148,8 @@ SRC_UNIX = \
src/gui_gtk_f.h \ src/gui_gtk_f.h \
src/gui_gtk_x11.c \ src/gui_gtk_x11.c \
src/gui_kde.cc \ src/gui_kde.cc \
src/gui_kde_widget.cc \ src/gui_kde_wid.cc \
src/gui_kde_widget.h \ src/gui_kde_wid.h \
src/gui_kde_x11.cc \ src/gui_kde_x11.cc \
src/kvim_iface.h \ src/kvim_iface.h \
src/gui_motif.c \ src/gui_motif.c \
...@@ -365,7 +365,7 @@ SRC_MAC = \ ...@@ -365,7 +365,7 @@ SRC_MAC = \
src/os_mac.sit.hqx \ src/os_mac.sit.hqx \
src/os_mac_conv.c \ src/os_mac_conv.c \
src/os_macosx.c \ src/os_macosx.c \
src/os_mac.pbproj/project.pbxproj src/os_mac.pbproj/project.pbxproj \
src/proto/gui_mac.pro \ src/proto/gui_mac.pro \
src/proto/os_mac.pro \ src/proto/os_mac.pro \
......
*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 VIM REFERENCE MANUAL by Bram Moolenaar
...@@ -344,6 +344,10 @@ get an error message. Possible causes: ...@@ -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 If it's not clear what the problem is set the 'verbose' option to see more
messages. 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* USING PATCHES *diff-patchexpr*
......
*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 VIM REFERENCE MANUAL by Bram Moolenaar
...@@ -846,8 +846,10 @@ getbufvar( {expr}, {varname}) variable {varname} in buffer {expr} ...@@ -846,8 +846,10 @@ getbufvar( {expr}, {varname}) variable {varname} in buffer {expr}
getcmdline() String return the current command-line getcmdline() String return the current command-line
getcmdpos() Number return cursor position in command-line getcmdpos() Number return cursor position in command-line
getcwd() String the current working directory 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 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 getline( {lnum}) String line {lnum} from current buffer
getreg( [{regname}]) String contents of register getreg( [{regname}]) String contents of register
getregtype( [{regname}]) String type of register getregtype( [{regname}]) String type of register
...@@ -1580,6 +1582,20 @@ getfsize({fname}) *getfsize()* ...@@ -1580,6 +1582,20 @@ getfsize({fname}) *getfsize()*
If {fname} is a directory, 0 is returned. If {fname} is a directory, 0 is returned.
If the file {fname} can't be found, -1 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()* getftime({fname}) *getftime()*
The result is a Number, which is the last modification time of The result is a Number, which is the last modification time of
the given file {fname}. The value is measured as seconds the given file {fname}. The value is measured as seconds
...@@ -1587,6 +1603,26 @@ getftime({fname}) *getftime()* ...@@ -1587,6 +1603,26 @@ getftime({fname}) *getftime()*
|localtime()| and |strftime()|. |localtime()| and |strftime()|.
If the file {fname} can't be found -1 is returned. 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()*
getline({lnum}) The result is a String, which is line {lnum} from the current getline({lnum}) The result is a String, which is line {lnum} from the current
buffer. Example: > buffer. Example: >
...@@ -2246,14 +2282,16 @@ search({pattern} [, {flags}]) *search()* ...@@ -2246,14 +2282,16 @@ search({pattern} [, {flags}]) *search()*
cursor position. cursor position.
{flags} is a String, which can contain these character flags: {flags} is a String, which can contain these character flags:
'b' search backward instead of forward 'b' search backward instead of forward
'n' do Not move the cursor
'w' wrap around the end of the file 'w' wrap around the end of the file
'W' don't 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. If neither 'w' or 'W' is given, the 'wrapscan' option applies.
When a match has been found its line number is returned, and When a match has been found its line number is returned.
the cursor will be positioned at the match. If there is no The cursor will be positioned at the match, unless the 'n'
match a 0 is returned and the cursor doesn't move. No error flag is used).
message is given. 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): > Example (goes over all files in the argument list): >
:let n = 1 :let n = 1
...@@ -2747,9 +2785,15 @@ winline() The result is a Number, which is the screen line of the cursor ...@@ -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. the window. The first line is one.
*winnr()* *winnr()*
winnr() The result is a Number, which is the number of the current winnr([{arg}]) The result is a Number, which is the number of the current
window. The top window has number 1. The number can be used window. The top window has number 1.
with |CTRL-W_w| and ":wincmd w" |:wincmd|. 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()*
winrestcmd() Returns a sequence of |:resize| commands that should restore winrestcmd() Returns a sequence of |:resize| commands that should restore
......
*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 VIM REFERENCE MANUAL by Andy Kahn
...@@ -335,6 +335,9 @@ cscope version for Win32 see: ...@@ -335,6 +335,9 @@ cscope version for Win32 see:
http://iamphet.nm.ru/cscope/index.html 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: There are a couple of hard-coded limitations:
1. The maximum number of cscope connections allowed is 8. Do you 1. The maximum number of cscope connections allowed is 8. Do you
......
*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 VIM REFERENCE MANUAL by Paul Moore
...@@ -91,23 +91,23 @@ module before using it: > ...@@ -91,23 +91,23 @@ module before using it: >
:python import vim :python import vim
Overview > Overview >
print "Hello" # displays a message :py print "Hello" # displays a message
vim.command(cmd) # execute an ex command :py vim.command(cmd) # execute an ex command
w = vim.windows[n] # gets window "n" :py w = vim.windows[n] # gets window "n"
cw = vim.current.window # gets the current window :py cw = vim.current.window # gets the current window
b = vim.buffers[n] # gets buffer "n" :py b = vim.buffers[n] # gets buffer "n"
cb = vim.current.buffer # gets the current buffer :py cb = vim.current.buffer # gets the current buffer
w.height = lines # sets the window height :py w.height = lines # sets the window height
w.cursor = (row, col) # sets the window cursor position :py w.cursor = (row, col) # sets the window cursor position
pos = w.cursor # gets a tuple (row, col) :py pos = w.cursor # gets a tuple (row, col)
name = b.name # gets the buffer file name :py name = b.name # gets the buffer file name
line = b[n] # gets a line from the buffer :py line = b[n] # gets a line from the buffer
lines = b[n:m] # gets a list of lines :py lines = b[n:m] # gets a list of lines
num = len(b) # gets the number of lines :py num = len(b) # gets the number of lines
b[n] = str # sets a line in the buffer :py b[n] = str # sets a line in the buffer
b[n:m] = [str1, str2, str3] # sets a number of lines at once :py b[n:m] = [str1, str2, str3] # sets a number of lines at once
del b[n] # deletes a line :py del b[n] # deletes a line
del b[n:m] # deletes a number of lines :py del b[n:m] # deletes a number of lines
Methods of the "vim" module Methods of the "vim" module
...@@ -115,8 +115,8 @@ Methods of the "vim" module ...@@ -115,8 +115,8 @@ Methods of the "vim" module
vim.command(str) *python-command* vim.command(str) *python-command*
Executes the vim (ex-mode) command str. Returns None. Executes the vim (ex-mode) command str. Returns None.
Examples: > Examples: >
vim.command("set tw=72") :py vim.command("set tw=72")
vim.command("%s/aaa/bbb/g") :py vim.command("%s/aaa/bbb/g")
< The following definition executes Normal mode commands: > < The following definition executes Normal mode commands: >
def normal(str): def normal(str):
vim.command("normal "+str) vim.command("normal "+str)
...@@ -126,15 +126,15 @@ vim.command(str) *python-command* ...@@ -126,15 +126,15 @@ vim.command(str) *python-command*
< *E659* < *E659*
The ":python" command cannot be used recursively with Python 2.2 and The ":python" command cannot be used recursively with Python 2.2 and
older. This only works with Python 2.3 and later: > 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* vim.eval(str) *python-eval*
Evaluates the expression str using the vim internal expression Evaluates the expression str using the vim internal expression
evaluator (see |expression|). Returns the expression result as a evaluator (see |expression|). Returns the expression result as a
string. string.
Examples: > Examples: >
text_width = vim.eval("&tw") :py text_width = vim.eval("&tw")
str = vim.eval("12+12") # NB result is a string! Use :py str = vim.eval("12+12") # NB result is a string! Use
# string.atoi() to convert to # string.atoi() to convert to
# a number. # a number.
...@@ -158,18 +158,18 @@ Constants of the "vim" module ...@@ -158,18 +158,18 @@ Constants of the "vim" module
vim.buffers *python-buffers* vim.buffers *python-buffers*
A sequence object providing access to the list of vim buffers. The A sequence object providing access to the list of vim buffers. The
object supports the following operations: > object supports the following operations: >
b = vim.buffers[i] # Indexing (read-only) :py b = vim.buffers[i] # Indexing (read-only)
b in vim.buffers # Membership test :py b in vim.buffers # Membership test
n = len(vim.buffers) # Number of elements :py n = len(vim.buffers) # Number of elements
for b in vim.buffers: # Sequential access :py for b in vim.buffers: # Sequential access
< <
vim.windows *python-windows* vim.windows *python-windows*
A sequence object providing access to the list of vim windows. The A sequence object providing access to the list of vim windows. The
object supports the following operations: > object supports the following operations: >
w = vim.windows[i] # Indexing (read-only) :py w = vim.windows[i] # Indexing (read-only)
w in vim.windows # Membership test :py w in vim.windows # Membership test
n = len(vim.windows) # Number of elements :py n = len(vim.windows) # Number of elements
for w in vim.windows: # Sequential access :py for w in vim.windows: # Sequential access
< <
vim.current *python-current* vim.current *python-current*
An object providing access (via specific attributes) to various An object providing access (via specific attributes) to various
...@@ -236,17 +236,21 @@ The buffer object methods are: ...@@ -236,17 +236,21 @@ The buffer object methods are:
represents the part of the given buffer between line represents the part of the given buffer between line
numbers s and e |inclusive|. 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) > Examples (assume b is the current buffer) >
print b.name # write the buffer file name :py print b.name # write the buffer file name
b[0] = "hello!!!" # replace the top line :py b[0] = "hello!!!" # replace the top line
b[:] = None # delete the whole buffer :py b[:] = None # delete the whole buffer
del b[:] # delete the whole buffer (same as above) :py del b[:] # delete the whole buffer
b[0:0] = [ "a line" ] # add a line at the top :py b[0:0] = [ "a line" ] # add a line at the top
del b[2] # delete a line (the third) :py del b[2] # delete a line (the third)
b.append("bottom") # add a line at the bottom :py b.append("bottom") # add a line at the bottom
n = len(b) # number of lines :py n = len(b) # number of lines
(row,col) = b.mark('a') # named mark :py (row,col) = b.mark('a') # named mark
r = b.range(1,5) # a sub-range of the buffer :py r = b.range(1,5) # a sub-range of the buffer
============================================================================== ==============================================================================
4. Range objects *python-range* 4. Range objects *python-range*
......
*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 VIM REFERENCE MANUAL by Bram Moolenaar
...@@ -643,6 +643,7 @@ and |+X11| features. ...@@ -643,6 +643,7 @@ and |+X11| features.
A command line started with a backslash or the range of a command contained a 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 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. being disabled. Remove the 'C' flag from the 'cpoptions' option to enable it.
Or use ":set nocp".
*E471* > *E471* >
Argument required Argument required
......
*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 VIM REFERENCE MANUAL by Bram Moolenaar
...@@ -83,6 +83,7 @@ are however, two general exceptions: ...@@ -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 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, becomes inclusive. Example: "}" moves to the first line after a paragraph,
but "d}" will not include that line. 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 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 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 motion becomes linewise. Example: If a paragraph begins with some blanks
...@@ -424,20 +425,24 @@ between Vi and Vim. ...@@ -424,20 +425,24 @@ between Vi and Vim.
*]]* *]]*
]] [count] sections forward or to the next '{' in the ]] [count] sections forward or to the next '{' in the
first column. When used after an operator, then the first column. When used after an operator, then also
'}' in the first column. |linewise| stops below a '}' in the first column. |exclusive|
Note that |exclusive-linewise| often applies.
*][* *][*
][ [count] sections forward or to the next '}' in the ][ [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 [[ [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 [] [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. These commands move over three kinds of text objects.
......
*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 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|. ...@@ -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 NOTE: To avoid portability problems with using patterns, always keep
this option at the default "on". Only switch it off when working with 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 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'*
'makeef' 'mef' string (default: "") 'makeef' 'mef' string (default: "")
......
*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 VIM REFERENCE MANUAL by Bram Moolenaar
...@@ -382,7 +382,7 @@ More explanation and examples below, follow the links. ...@@ -382,7 +382,7 @@ More explanation and examples below, follow the links.
|/\%c| \%23c \%23c in column 23 |/zero-width| |/\%c| \%23c \%23c in column 23 |/zero-width|
|/\%v| \%23v \%23v in virtual 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 identifier character (see 'isident' option)
|/\I| \I \I like "\i", but excluding digits |/\I| \I \I like "\i", but excluding digits
|/\k| \k \k keyword character (see 'iskeyword' option) |/\k| \k \k keyword character (see 'iskeyword' option)
......
...@@ -1337,6 +1337,7 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME* ...@@ -1337,6 +1337,7 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
/atom pattern.txt /*\/atom* /atom pattern.txt /*\/atom*
/bar pattern.txt /*\/bar* /bar pattern.txt /*\/bar*
/branch pattern.txt /*\/branch* /branch pattern.txt /*\/branch*
/character-classes pattern.txt /*\/character-classes*
/collection pattern.txt /*\/collection* /collection pattern.txt /*\/collection*
/concat pattern.txt /*\/concat* /concat pattern.txt /*\/concat*
/dyn various.txt /*\/dyn* /dyn various.txt /*\/dyn*
...@@ -3570,6 +3571,7 @@ EncodingChanged autocmd.txt /*EncodingChanged* ...@@ -3570,6 +3571,7 @@ EncodingChanged autocmd.txt /*EncodingChanged*
Eterm syntax.txt /*Eterm* Eterm syntax.txt /*Eterm*
Ex intro.txt /*Ex* Ex intro.txt /*Ex*
Ex-mode intro.txt /*Ex-mode* Ex-mode intro.txt /*Ex-mode*
Exuberant_ctags tagsrch.txt /*Exuberant_ctags*
F motion.txt /*F* F motion.txt /*F*
FAQ intro.txt /*FAQ* FAQ intro.txt /*FAQ*
Farsi farsi.txt /*Farsi* Farsi farsi.txt /*Farsi*
...@@ -4518,6 +4520,7 @@ except-syntax-error eval.txt /*except-syntax-error* ...@@ -4518,6 +4520,7 @@ except-syntax-error eval.txt /*except-syntax-error*
exception-handling eval.txt /*exception-handling* exception-handling eval.txt /*exception-handling*
exception-variable eval.txt /*exception-variable* exception-variable eval.txt /*exception-variable*
exclusive motion.txt /*exclusive* exclusive motion.txt /*exclusive*
exclusive-linewise motion.txt /*exclusive-linewise*
executable() eval.txt /*executable()* executable() eval.txt /*executable()*
execute-menus gui.txt /*execute-menus* execute-menus gui.txt /*execute-menus*
exim starting.txt /*exim* exim starting.txt /*exim*
...@@ -4625,6 +4628,7 @@ filewritable() eval.txt /*filewritable()* ...@@ -4625,6 +4628,7 @@ filewritable() eval.txt /*filewritable()*
filter change.txt /*filter* filter change.txt /*filter*
find-manpage usr_12.txt /*find-manpage* find-manpage usr_12.txt /*find-manpage*
find-replace usr_10.txt /*find-replace* find-replace usr_10.txt /*find-replace*
finddir() eval.txt /*finddir()*
findfile() eval.txt /*findfile()* findfile() eval.txt /*findfile()*
fixed-5.1 version5.txt /*fixed-5.1* fixed-5.1 version5.txt /*fixed-5.1*
fixed-5.2 version5.txt /*fixed-5.2* fixed-5.2 version5.txt /*fixed-5.2*
...@@ -4773,8 +4777,10 @@ getcharmod() eval.txt /*getcharmod()* ...@@ -4773,8 +4777,10 @@ getcharmod() eval.txt /*getcharmod()*
getcmdline() eval.txt /*getcmdline()* getcmdline() eval.txt /*getcmdline()*
getcmdpos() eval.txt /*getcmdpos()* getcmdpos() eval.txt /*getcmdpos()*
getcwd() eval.txt /*getcwd()* getcwd() eval.txt /*getcwd()*
getfperm() eval.txt /*getfperm()*
getfsize() eval.txt /*getfsize()* getfsize() eval.txt /*getfsize()*
getftime() eval.txt /*getftime()* getftime() eval.txt /*getftime()*
getftype() eval.txt /*getftype()*
getline() eval.txt /*getline()* getline() eval.txt /*getline()*
getreg() eval.txt /*getreg()* getreg() eval.txt /*getreg()*
getregtype() eval.txt /*getregtype()* getregtype() eval.txt /*getregtype()*
......
*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 VIM REFERENCE MANUAL by Bram Moolenaar
...@@ -468,6 +468,7 @@ a tag for each "#defined" macro, typedefs, enums, etc. ...@@ -468,6 +468,7 @@ a tag for each "#defined" macro, typedefs, enums, etc.
Some programs that generate tags files: Some programs that generate tags files:
ctags As found on most Unix systems. Only supports C. Only ctags As found on most Unix systems. Only supports C. Only
does the basic work. does the basic work.
*Exuberant_ctags*
exuberant ctags This a very good one. It works for C, C++, Java, exuberant ctags This a very good one. It works for C, C++, Java,
Fortran, Eiffel and others. It can generate tags for Fortran, Eiffel and others. It can generate tags for
many items. See http://ctags.sourceforge.net. many items. See http://ctags.sourceforge.net.
......
*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 VIM REFERENCE MANUAL by Bram Moolenaar
...@@ -30,27 +30,18 @@ be worked on, but only if you sponsor Vim development. See |sponsor|. ...@@ -30,27 +30,18 @@ be worked on, but only if you sponsor Vim development. See |sponsor|.
*known-bugs* *known-bugs*
-------------------- Known bugs and current work ----------------------- -------------------- 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: For version 7.0:
- Include many PATCHES: - Include many PATCHES:
8 Add functions: 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 setbufline() set line in any buffer (patch from Yegappan
Lakshmanan, 2003 Jan 21) 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 filter() Patch from Yegappan Lakshmanan, 2004 Jul 11
8 Make it possible to delete marks. Charles Campbell has a patch that 8 Make it possible to delete marks. Charles Campbell has a patch that
does this with the markclear() function (2004 Jan 9). does this with the markclear() function (2004 Jan 9).
...@@ -63,6 +54,7 @@ For version 7.0: ...@@ -63,6 +54,7 @@ For version 7.0:
When "filename" has no wildcards and there is no matching buffer, add When "filename" has no wildcards and there is no matching buffer, add
the buffer (unlisted). the buffer (unlisted).
Patch for \xnn (Ciaran McCreesh) 2004 Jul 10 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 7 Add 'taglistfiles' option, show file name and type when listing matching
tags name with CTRL-D completion. Patch from Yegappan Lakshmanan. tags name with CTRL-D completion. Patch from Yegappan Lakshmanan.
2004 Jul 11 2004 Jul 11
...@@ -72,6 +64,15 @@ For version 7.0: ...@@ -72,6 +64,15 @@ For version 7.0:
8 Make 'statusline' local, so that each window can have a different 8 Make 'statusline' local, so that each window can have a different
value. But should it also be local to a buffer? (Yegappan Lakshmanan value. But should it also be local to a buffer? (Yegappan Lakshmanan
has a patch, 2004 Jul 11) 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 --- --- awaiting updated patch ---
7 Add patch from Wall for this one ( ~/Mail/oldmail/wall/in.00019 ): 7 Add patch from Wall for this one ( ~/Mail/oldmail/wall/in.00019 ):
'flipcase' variable: upper/lowercase pairs. 'flipcase' variable: upper/lowercase pairs.
...@@ -84,18 +85,7 @@ For version 7.0: ...@@ -84,18 +85,7 @@ For version 7.0:
8 Add ":n" to fnamemodify(): normalize path, remove "../" when possible. 8 Add ":n" to fnamemodify(): normalize path, remove "../" when possible.
Aric Blumer has a patch for this. Aric Blumer has a patch for this.
He will update the patch for 6.3. 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: 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. 7 Completion of network shares, patch by Yasuhiro Matsumoto.
Update 2004 Jun 17. Update 2004 Jun 17.
How does this work? Missing comments. How does this work? Missing comments.
...@@ -1458,6 +1448,14 @@ Built-in script language: ...@@ -1458,6 +1448,14 @@ Built-in script language:
7 Add argument to winwidth() to subtract the space taken by 'foldcolumn', 7 Add argument to winwidth() to subtract the space taken by 'foldcolumn',
signs and/or 'number'. signs and/or 'number'.
8 Add functions: 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}) menuprop({name}, {idx}, {what})
Get menu property of menu {name} item {idx}. Get menu property of menu {name} item {idx}.
menuprop("", 1, "name") returns "File". menuprop("", 1, "name") returns "File".
...@@ -3196,6 +3194,7 @@ Various improvements: ...@@ -3196,6 +3194,7 @@ Various improvements:
column number. Can use the code of ":helpgrep". column number. Can use the code of ":helpgrep".
Also support using "**" in filename, so that a directory tree can be Also support using "**" in filename, so that a directory tree can be
searched. searched.
Also see the "minigrep.vim" script on www.vim.org.
- Change ":fixdel" into option 'fixdel', t_del will be adjusted each time - Change ":fixdel" into option 'fixdel', t_del will be adjusted each time
t_bs is set? (Webb) t_bs is set? (Webb)
- "gc": goto character, move absolute character positions forward, also - "gc": goto character, move absolute character positions forward, also
......
*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 VIM REFERENCE MANUAL by Bram Moolenaar
...@@ -127,6 +127,9 @@ byteidx(expr, nr) |byteidx()| Index of a character. (Ilya Sher) ...@@ -127,6 +127,9 @@ byteidx(expr, nr) |byteidx()| Index of a character. (Ilya Sher)
finddir(name) |finddir()| Find a directory in 'path'. finddir(name) |finddir()| Find a directory in 'path'.
findfile(name) |findfile()| Find a file in 'path'. (Johannes findfile(name) |findfile()| Find a file in 'path'. (Johannes
Zellner) 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. repeat(expr, count) |repeat()| Repeat "expr" "count" times.
(Christophe Poucet) (Christophe Poucet)
tr(expr, from, to) |tr()| Translate characters. (Ron Aaron) tr(expr, from, to) |tr()| Translate characters. (Ron Aaron)
...@@ -187,6 +190,11 @@ For lisp indenting and matching parenthesis: (Sergey Khorev) ...@@ -187,6 +190,11 @@ For lisp indenting and matching parenthesis: (Sergey Khorev)
Added the "count" argument to match(), matchend() and matchstr(). (Ilya Sher) 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* COMPILE TIME CHANGES *compile-changes-7*
...@@ -272,4 +280,13 @@ items. ...@@ -272,4 +280,13 @@ items.
The default for 'helplang' was "zh" for both "zh_cn" and "zh_tw". Now use The default for 'helplang' was "zh" for both "zh_cn" and "zh_tw". Now use
"cn" or "tw" as intended. "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: vim:tw=78:ts=8:ft=help:norl:
" Vim settings file " Vim settings file
" Language: LambdaProlog (Teyjus) " Language: LambdaProlog (Teyjus)
" Maintainer: Markus Mottl <markus@oefai.at> " Maintainer: Markus Mottl <markus@oefai.at>
" URL: http://www.ai.univie.ac.at/~markus/vim/ftplugin/lprolog.vim " URL: http://www.oefai.at/~markus/vim/ftplugin/lprolog.vim
" Last Change: 2003 May 11 " Last Change: 2001 Oct 02 - fixed uncommenting bug (MM)
" 2001 Sep 16 - fixed 'no_mail_maps'-bug (MM) " 2001 Sep 16 - fixed 'no_mail_maps'-bug (MM)
" 2001 Sep 02 - initial release (MM) " 2001 Sep 02 - initial release (MM)
" Only do these settings when not done yet for this buffer " Only do these settings when not done yet for this buffer
if exists("b:did_ftplugin") if exists("b:did_ftplugin")
......
" Vim settings file " Vim settings file
" Language: OCaml " Language: OCaml
" Maintainers: Mike Leary <leary@nwlink.com> " Maintainers: Mike Leary <leary@nwlink.com>
" Markus Mottl <markus@oefai.at> " Markus Mottl <markus@oefai.at>
" URL: http://www.ai.univie.ac.at/~markus/vim/ftplugin/ocaml.vim " Stefano Zacchiroli <zack@bononia.it>
" Last Change: 2003 May 11 " URL: http://www.oefai.at/~markus/vim/ftplugin/ocaml.vim
" 2001 Nov 01 - added local bindings for inserting " Last Change: 2004 Apr 12 - better .ml/.mli-switching without Python (SZ)
" type holes using 'assert false' (MM) " 2003 Nov 21 - match_words-patterns and .ml/.mli-switching (MM)
" 2001 Oct 02 - insert spaces in line comments (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 " Only do these settings when not done yet for this buffer
if exists("b:did_ftplugin") if exists("b:did_ftplugin")
...@@ -47,3 +49,253 @@ if !exists("no_plugin_maps") && !exists("no_ocaml_maps") ...@@ -47,3 +49,253 @@ if !exists("no_plugin_maps") && !exists("no_ocaml_maps")
iabbrev <buffer> ASS (assert false) iabbrev <buffer> ASS (assert false)
endif endif
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>
" Vim indent file " Vim indent file
" Language: OCaml " Language: OCaml
" Maintainers: Jean-Francois Yuen <jfyuen@ifrance.com> " Maintainers: Jean-Francois Yuen <jfyuen@happycoders.org>
" Mike Leary <leary@nwlink.com> " Mike Leary <leary@nwlink.com>
" Markus Mottl <markus@oefai.at> " Markus Mottl <markus@oefai.at>
" URL: http://www.oefai.at/~markus/vim/indent/ocaml.vim " URL: http://www.oefai.at/~markus/vim/indent/ocaml.vim
" Last Change: 2003 Apr 14 " Last Change: 2004 Apr 11 - Added indent for 'class' (JY)
" 2003 Mar 05 - Added '{<' and some fixes (JY) " 2003 Sep 16 - Added 'private' as keyword (JY)
" 2002 Nov 06 - Some fixes (JY) " 2003 Mar 29 - Fixed bug with 'if' and 'else' (JY)
" Only load this indent file when no other was loaded. " Only load this indent file when no other was loaded.
if exists("b:did_indent") if exists("b:did_indent")
...@@ -16,7 +16,7 @@ let b:did_indent = 1 ...@@ -16,7 +16,7 @@ let b:did_indent = 1
setlocal expandtab setlocal expandtab
setlocal indentexpr=GetOCamlIndent() 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 nolisp
setlocal nosmartindent setlocal nosmartindent
setlocal textwidth=80 setlocal textwidth=80
...@@ -33,14 +33,13 @@ if exists("*GetOCamlIndent") ...@@ -33,14 +33,13 @@ if exists("*GetOCamlIndent")
endif endif
" Define some patterns: " 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:letpat = '^\s*\(let\|type\|module\|class\|open\|exception\|val\|include\|external\)\>'
let s:letlim = '\(\<\(sig\|struct\)\|;;\)\s*$' let s:letlim = '\(\<\(sig\|struct\)\|;;\)\s*$'
let s:lim = '^\s*\(exception\|external\|include\|let\|module\|open\|type\|val\)\>' let s:lim = '^\s*\(exception\|external\|include\|let\|module\|open\|type\|val\)\>'
let s:module = '\<\%(begin\|sig\|struct\|object\)\>' let s:module = '\<\%(begin\|sig\|struct\|object\)\>'
let s:obj = '^\s*\(constraint\|inherit\|initializer\|method\|val\)\>\|\<\(object\|object\s*(.*)\)\s*$' let s:obj = '^\s*\(constraint\|inherit\|initializer\|method\|val\)\>\|\<\(object\|object\s*(.*)\)\s*$'
let s:type = '^\s*\%(let\|type\)\>.*=' let s:type = '^\s*\%(class\|let\|type\)\>.*='
let s:val = '^\s*\(val\|external\)\>.*:'
" Skipping pattern, for comments " Skipping pattern, for comments
function s:SkipPattern(lnum, pat) function s:SkipPattern(lnum, pat)
...@@ -75,7 +74,7 @@ endfunction ...@@ -75,7 +74,7 @@ endfunction
" Indent 'let' " Indent 'let'
function s:FindLet(pstart, pmid, pend) function s:FindLet(pstart, pmid, pend)
call search(a:pend, 'bW') 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 endfunction
function GetOCamlIndent() function GetOCamlIndent()
...@@ -97,8 +96,7 @@ function GetOCamlIndent() ...@@ -97,8 +96,7 @@ function GetOCamlIndent()
let line = getline(v:lnum) let line = getline(v:lnum)
" Indent if current line begins with 'end' " Indent if current line begins with 'end':
" for 'sig', 'struct', 'object' and 'begin':
if line =~ '^\s*end\>' if line =~ '^\s*end\>'
return s:FindPair(s:module, '','\<end\>') return s:FindPair(s:module, '','\<end\>')
...@@ -118,27 +116,25 @@ function GetOCamlIndent() ...@@ -118,27 +116,25 @@ function GetOCamlIndent()
elseif line =~ '^\s*)' elseif line =~ '^\s*)'
return s:FindPair('(', '',')') return s:FindPair('(', '',')')
" Indent if current line begins with 'let' " Indent if current line begins with 'let':
" and last line does not begin with 'let' or end with 'in' or ';;':
elseif line =~ '^\s*let\>' elseif line =~ '^\s*let\>'
if lline !~ s:lim . '\|' . s:letlim . '\|' . s:beflet if lline !~ s:lim . '\|' . s:letlim . '\|' . s:beflet
return s:FindLet(s:type, '','\<let\s*$') return s:FindLet(s:type, '','\<let\s*$')
else return ind else return ind
endif endif
" Indent if current line begins with 'type' " Indent if current line begins with 'class' or 'type':
" and last line does not end with 'and' or ';;': elseif line =~ '^\s*\(class\|type\)\>'
elseif line =~ '^\s*type\>'
if lline !~ s:lim . '\|\<and\s*$\|' . s:letlim 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 else return ind
endif endif
" Indent for pattern matching: " Indent for pattern matching:
elseif line =~ '^\s*|' 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') 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 else return ind
endif endif
...@@ -149,41 +145,35 @@ function GetOCamlIndent() ...@@ -149,41 +145,35 @@ function GetOCamlIndent()
else return ind else return ind
endif endif
" Indent if current line begins with 'in' and previous " Indent if current line begins with 'in':
" line does not start with 'let' or 'and':
elseif line =~ '^\s*in\>' elseif line =~ '^\s*in\>'
if lline !~ '^\s*\(let\|and\)\>' if lline !~ '^\s*\(let\|and\)\>'
return s:FindPair('\<let\>', '', '\<in\>') return s:FindPair('\<let\>', '', '\<in\>')
else return ind else return ind
endif endif
" Indent if current line begins with 'else' " Indent if current line begins with 'else':
" and previous line does not start with 'if', 'then' or 'else':
elseif line =~ '^\s*else\>' elseif line =~ '^\s*else\>'
if lline !~ '^\s*\(if\|else\|then\)\>' if lline !~ '^\s*\(if\|then\)\>'
return s:FindPair('\<if\>', '', '\<else\>') return s:FindPair('\<if\>', '', '\<else\>')
else return ind else return ind
endif endif
" Indent if current line begins with 'then' " Indent if current line begins with 'then':
" and previous line does not start with 'if', 'then' or 'else':
elseif line =~ '^\s*then\>' elseif line =~ '^\s*then\>'
if lline !~ '^\s*\(if\|else\|then\)\>' if lline !~ '^\s*\(if\|else\)\>'
return s:FindPair('\<if\>', '', '\<then\>') return s:FindPair('\<if\>', '', '\<then\>')
else return ind else return ind
endif endif
" Subtract a 'shiftwidth' if current line begins with 'and' and previous " Indent if current line begins with 'and':
" line does not start with 'let', 'and' or 'type' or end with 'end'
" (for classes):
elseif line =~ '^\s*and\>' elseif line =~ '^\s*and\>'
if lline !~ '^\s*\(and\|let\|type\)\>\|\<end\s*$' if lline !~ '^\s*\(and\|let\|type\)\>\|\<end\s*$'
return ind - &sw return ind - &sw
else return ind else return ind
endif endif
" Indent if current line begins with 'with' " Indent if current line begins with 'with':
" and previous line does not start with 'match' or 'try':
elseif line =~ '^\s*with\>' elseif line =~ '^\s*with\>'
if lline !~ '^\s*\(match\|try\)\>' if lline !~ '^\s*\(match\|try\)\>'
return s:FindPair('\<\%(match\|try\)\>', '','\<with\>') return s:FindPair('\<\%(match\|try\)\>', '','\<with\>')
...@@ -193,35 +183,35 @@ function GetOCamlIndent() ...@@ -193,35 +183,35 @@ function GetOCamlIndent()
" Indent if current line begins with 'exception': " Indent if current line begins with 'exception':
elseif line =~ '^\s*exception\>' elseif line =~ '^\s*exception\>'
if lline !~ s:lim . '\|' . s:letlim 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 else return ind
endif endif
" Indent if current line begins with 'external': " Indent if current line begins with 'external':
elseif line =~ '^\s*external\>' elseif line =~ '^\s*external\>'
if lline !~ s:lim . '\|' . s:letlim 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 else return ind
endif endif
" Indent if current line begins with 'include': " Indent if current line begins with 'include':
elseif line =~ '^\s*include\>' elseif line =~ '^\s*include\>'
if lline !~ s:lim . '\|' . s:letlim 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 else return ind
endif endif
" Indent if current line begins with 'open': " Indent if current line begins with 'open':
elseif line =~ '^\s*open\>' elseif line =~ '^\s*open\>'
if lline !~ s:lim . '\|' . s:letlim 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 else return ind
endif endif
" Indent if current line begins with 'val': " Indent if current line begins with 'val':
elseif line =~ '^\s*val\>' elseif line =~ '^\s*val\>'
if lline !~ '^\s*\(exception\|external\|include\|open\)\>\|' . s:obj . '\|' . s:letlim 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 else return ind
endif endif
...@@ -253,15 +243,10 @@ function GetOCamlIndent() ...@@ -253,15 +243,10 @@ function GetOCamlIndent()
else return ind else return ind
endif 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 endif
" Add a 'shiftwidth' after lines ending with: " 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 let ind = ind + &sw
" Back to normal indent after lines ending with ';;': " Back to normal indent after lines ending with ';;':
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
" Language: Python " Language: Python
" Maintainer: Bram Moolenaar <Bram@vim.org> " Maintainer: Bram Moolenaar <Bram@vim.org>
" Original Author: David Bustos <bustos@caltech.edu> " 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. " Only load this indent file when no other was loaded.
if exists("b:did_indent") if exists("b:did_indent")
...@@ -99,15 +99,36 @@ function GetPythonIndent(lnum) ...@@ -99,15 +99,36 @@ function GetPythonIndent(lnum)
" Use syntax highlighting attributes when possible. " Use syntax highlighting attributes when possible.
let pline = getline(plnum) let pline = getline(plnum)
let pline_len = strlen(pline) let pline_len = strlen(pline)
let col = 0 if has('syntax_items')
while col < pline_len " If the last character in the line is a comment, do a binary search for
if pline[col] == '#' && (!has('syntax_items') " the start of the comment. synID() is slow, a linear search would take
\ || synIDattr(synID(plnum, col + 1, 1), "name") =~ "Comment$") " too long on a long line.
let pline = strpart(pline, 0, col) if synIDattr(synID(plnum, pline_len, 1), "name") =~ "Comment$"
break 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 endif
let col = col + 1 else
endwhile 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 the previous line ended with a colon, indent this line
if pline =~ ':\s*$' if pline =~ ':\s*$'
......
...@@ -2,9 +2,9 @@ ...@@ -2,9 +2,9 @@
" Language: Dot " Language: Dot
" Filenames: *.dot " Filenames: *.dot
" Maintainer: Markus Mottl <markus@oefai.at> " Maintainer: Markus Mottl <markus@oefai.at>
" URL: http://www.ai.univie.ac.at/~markus/vim/syntax/dot.vim " URL: http://www.oefai.at/~markus/vim/syntax/dot.vim
" Last Change: 2003 May 11 " Last Change: 2004 Jul 26
" 2001 May 04 - initial version " 2001 May 04 - initial version
" For version 5.x: Clear all syntax items " For version 5.x: Clear all syntax items
" For version 6.x: Quit when a syntax file was already loaded " For version 6.x: Quit when a syntax file was already loaded
......
This diff is collapsed.
...@@ -2,22 +2,23 @@ ...@@ -2,22 +2,23 @@
" This is a GENERATED FILE. Please always refer to source file at the URI below. " This is a GENERATED FILE. Please always refer to source file at the URI below.
" Language: lilo configuration (lilo.conf) " Language: lilo configuration (lilo.conf)
" Maintainer: David Ne\v{c}as (Yeti) <yeti@physics.muni.cz> " 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 " URL: http://trific.ath.cx/Ftp/vim/syntax/lilo.vim
" Setup " Setup
if version >= 600 if version >= 600
if exists("b:current_syntax") if exists("b:current_syntax")
finish finish
endif endif
else else
syntax clear syntax clear
endif endif
if version >= 600 if version >= 600
command -nargs=1 SetIsk setlocal iskeyword=<args> command -nargs=1 SetIsk setlocal iskeyword=<args>
else else
command -nargs=1 SetIsk set iskeyword=<args> command -nargs=1 SetIsk set iskeyword=<args>
endif endif
SetIsk @,48-57,.,-,_ SetIsk @,48-57,.,-,_
delcommand SetIsk delcommand SetIsk
...@@ -34,23 +35,23 @@ syn match liloHexNumber "0[xX]\x\+" contained ...@@ -34,23 +35,23 @@ syn match liloHexNumber "0[xX]\x\+" contained
syn match liloDecNumberP "\d\+p\=" contained syn match liloDecNumberP "\d\+p\=" contained
syn match liloSpecial contained "\\\(\"\|\\\|$\)" syn match liloSpecial contained "\\\(\"\|\\\|$\)"
syn region liloString start=+"+ skip=+\\\\\|\\"+ end=+"+ contained contains=liloSpecial,liloEnviron 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 region liloPath start=+[$/]+ skip=+\\\\\|\\ \|\\$"+ end=+ \|$+ contained contains=liloSpecial,liloEnviron
syn match liloDecNumberList "\(\d\|,\)\+" contained contains=liloDecNumber syn match liloDecNumberList "\(\d\|,\)\+" contained contains=liloDecNumber
syn match liloDecNumberPList "\(\d\|[,p]\)\+" contained contains=liloDecNumberP,liloDecNumber syn match liloDecNumberPList "\(\d\|[,p]\)\+" contained contains=liloDecNumberP,liloDecNumber
syn region liloAnything start=+[^[:space:]#]+ skip=+\\\\\|\\ \|\\$+ end=+ \|$+ contained contains=liloSpecial,liloEnviron,liloString syn region liloAnything start=+[^[:space:]#]+ skip=+\\\\\|\\ \|\\$+ end=+ \|$+ contained contains=liloSpecial,liloEnviron,liloString
" Path " 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 liloKernelOpt initrd root nextgroup=liloEqPath,liloEqPathComment,liloError skipwhite skipempty
syn keyword liloImageOpt path loader table 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 syn keyword liloDiskOpt partition nextgroup=liloEqPath,liloEqPathComment,liloError skipwhite skipempty
" Other " Other
syn keyword liloOption menu-scheme raid-extra-boot serial nextgroup=liloEqAnything,liloEqAnythingComment,liloError skipwhite skipempty syn keyword liloOption menu-scheme raid-extra-boot serial install nextgroup=liloEqAnything,liloEqAnythingComment,liloError skipwhite skipempty
syn keyword liloOption default nextgroup=liloEqLabel,liloEqLabelComment,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 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 liloImageOpt password range nextgroup=liloEqAnything,liloEqAnythingComment,liloError skipwhite skipempty
syn keyword liloDiskOpt set type 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 ...@@ -67,19 +68,21 @@ syn keyword liloKernelOpt append nextgroup=liloEqString,liloEqStringComment,lilo
syn keyword liloImageOpt fallback literal nextgroup=liloEqString,liloEqStringComment,liloError skipwhite skipempty syn keyword liloImageOpt fallback literal nextgroup=liloEqString,liloEqStringComment,liloError skipwhite skipempty
" Hex number " 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 syn keyword liloDiskOpt bios normal hidden nextgroup=liloEqNumber,liloEqNumberComment,liloError skipwhite skipempty
" Number list " 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 " 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 " Flag
syn keyword liloOption compact fix-table geometric ignore-table lba32 linear mandatory nowarn prompt 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 liloKernelOpt read-only read-write
syn keyword liloImageOpt bypass lock mandatory optional restricted single-key unsafe 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 syn keyword liloDiskOpt change activate deactivate inaccessible reset
" Image " Image
...@@ -97,7 +100,7 @@ syn match liloEqNumberComment "#.*$" contained nextgroup=liloEqNumber,liloEqNumb ...@@ -97,7 +100,7 @@ syn match liloEqNumberComment "#.*$" contained nextgroup=liloEqNumber,liloEqNumb
syn match liloEqDecNumberComment "#.*$" contained nextgroup=liloEqDecNumber,liloEqDecNumberComment,liloError skipwhite skipempty syn match liloEqDecNumberComment "#.*$" contained nextgroup=liloEqDecNumber,liloEqDecNumberComment,liloError skipwhite skipempty
syn match liloEqHexNumberComment "#.*$" contained nextgroup=liloEqHexNumber,liloEqHexNumberComment,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 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 liloEqNumberListComment "#.*$" contained nextgroup=liloEqNumberList,liloEqNumberListComment,liloError skipwhite skipempty
syn match liloEqDecNumberPListComment "#.*$" contained nextgroup=liloEqDecNumberPList,liloEqDecNumberPListComment,liloError skipwhite skipempty syn match liloEqDecNumberPListComment "#.*$" contained nextgroup=liloEqDecNumberPList,liloEqDecNumberPListComment,liloError skipwhite skipempty
syn match liloEqAnythingComment "#.*$" contained nextgroup=liloEqAnything,liloEqAnythingComment,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 ...@@ -109,7 +112,7 @@ syn match liloEqNumber "=" contained nextgroup=liloDecNumber,liloHexNumber,liloN
syn match liloEqDecNumber "=" contained nextgroup=liloDecNumber,liloDecNumberComment,liloError skipwhite skipempty syn match liloEqDecNumber "=" contained nextgroup=liloDecNumber,liloDecNumberComment,liloError skipwhite skipempty
syn match liloEqHexNumber "=" contained nextgroup=liloHexNumber,liloHexNumberComment,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 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 liloEqNumberList "=" contained nextgroup=liloDecNumberList,liloDecNumberListComment,liloError skipwhite skipempty
syn match liloEqDecNumberPList "=" contained nextgroup=liloDecNumberPList,liloDecNumberPListComment,liloError skipwhite skipempty syn match liloEqDecNumberPList "=" contained nextgroup=liloDecNumberPList,liloDecNumberPListComment,liloError skipwhite skipempty
syn match liloEqAnything "=" contained nextgroup=liloAnything,liloAnythingComment,liloError skipwhite skipempty syn match liloEqAnything "=" contained nextgroup=liloAnything,liloAnythingComment,liloError skipwhite skipempty
...@@ -121,74 +124,71 @@ syn match liloNumberComment "#.*$" contained nextgroup=liloDecNumber,liloHexNumb ...@@ -121,74 +124,71 @@ syn match liloNumberComment "#.*$" contained nextgroup=liloDecNumber,liloHexNumb
syn match liloDecNumberComment "#.*$" contained nextgroup=liloDecNumber,liloDecNumberComment,liloError skipwhite skipempty syn match liloDecNumberComment "#.*$" contained nextgroup=liloDecNumber,liloDecNumberComment,liloError skipwhite skipempty
syn match liloHexNumberComment "#.*$" contained nextgroup=liloHexNumber,liloHexNumberComment,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 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 liloDecNumberListComment "#.*$" contained nextgroup=liloDecNumberList,liloDecNumberListComment,liloError skipwhite skipempty
syn match liloDecNumberPListComment "#.*$" contained nextgroup=liloDecNumberPList,liloDecNumberPListComment,liloError skipwhite skipempty syn match liloDecNumberPListComment "#.*$" contained nextgroup=liloDecNumberPList,liloDecNumberPListComment,liloError skipwhite skipempty
syn match liloAnythingComment "#.*$" contained nextgroup=liloAnything,liloAnythingComment,liloError skipwhite skipempty syn match liloAnythingComment "#.*$" contained nextgroup=liloAnything,liloAnythingComment,liloError skipwhite skipempty
" Define the default highlighting " Define the default highlighting
if version >= 508 || !exists("did_lilo_syntax_inits") if version >= 508 || !exists("did_lilo_syntax_inits")
if version < 508 if version < 508
let did_lilo_syntax_inits = 1 let did_lilo_syntax_inits = 1
command -nargs=+ HiLink hi link <args> command -nargs=+ HiLink hi link <args>
else else
command -nargs=+ HiLink hi def link <args> command -nargs=+ HiLink hi def link <args>
endif endif
HiLink liloEqPath liloEquals HiLink liloEqPath liloEquals
HiLink liloEqWord liloEquals HiLink liloEqWord liloEquals
HiLink liloEqVga liloEquals HiLink liloEqVga liloEquals
HiLink liloEqDecNumber liloEquals HiLink liloEqDecNumber liloEquals
HiLink liloEqHexNumber liloEquals HiLink liloEqHexNumber liloEquals
HiLink liloEqNumber liloEquals HiLink liloEqNumber liloEquals
HiLink liloEqString liloEquals HiLink liloEqString liloEquals
HiLink liloEqLabel liloEquals HiLink liloEqAnything liloEquals
HiLink liloEqAnything liloEquals HiLink liloEquals Special
HiLink liloEquals Special
HiLink liloError Error
HiLink liloError Error
HiLink liloEqPathComment liloComment
HiLink liloEqPathComment liloComment HiLink liloEqVgaComment liloComment
HiLink liloEqVgaComment liloComment HiLink liloEqDecNumberComment liloComment
HiLink liloEqDecNumberComment liloComment HiLink liloEqHexNumberComment liloComment
HiLink liloEqHexNumberComment liloComment HiLink liloEqStringComment liloComment
HiLink liloEqStringComment liloComment HiLink liloEqAnythingComment liloComment
HiLink liloEqLabelComment liloComment HiLink liloPathComment liloComment
HiLink liloEqAnythingComment liloComment HiLink liloVgaComment liloComment
HiLink liloPathComment liloComment HiLink liloDecNumberComment liloComment
HiLink liloVgaComment liloComment HiLink liloHexNumberComment liloComment
HiLink liloDecNumberComment liloComment HiLink liloNumberComment liloComment
HiLink liloHexNumberComment liloComment HiLink liloStringComment liloComment
HiLink liloNumberComment liloComment HiLink liloAnythingComment liloComment
HiLink liloStringComment liloComment HiLink liloComment Comment
HiLink liloLabelComment liloComment
HiLink liloAnythingComment liloComment HiLink liloDiskOpt liloOption
HiLink liloComment Comment HiLink liloKernelOpt liloOption
HiLink liloImageOpt liloOption
HiLink liloDiskOpt liloOption HiLink liloOption Keyword
HiLink liloKernelOpt liloOption
HiLink liloImageOpt liloOption HiLink liloDecNumber liloNumber
HiLink liloOption Keyword HiLink liloHexNumber liloNumber
HiLink liloDecNumberP liloNumber
HiLink liloDecNumber liloNumber HiLink liloNumber Number
HiLink liloHexNumber liloNumber HiLink liloString String
HiLink liloDecNumberP liloNumber HiLink liloPath Constant
HiLink liloNumber Number
HiLink liloString String HiLink liloSpecial Special
HiLink liloPath Constant HiLink liloLabel Title
HiLink liloDecNumberList Special
HiLink liloSpecial Special HiLink liloDecNumberPList Special
HiLink liloLabel Title HiLink liloAnything Normal
HiLink liloDecNumberList Special HiLink liloEnviron Identifier
HiLink liloDecNumberPList Special HiLink liloVgaKeyword Identifier
HiLink liloAnything Normal HiLink liloImage Type
HiLink liloEnviron Identifier HiLink liloChRules Preproc
HiLink liloVgaKeyword Identifier HiLink liloDisk Preproc
HiLink liloImage Type
HiLink liloChRules Preproc delcommand HiLink
HiLink liloDisk Preproc
delcommand HiLink
endif endif
let b:current_syntax = "lilo" let b:current_syntax = "lilo"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment