mirror of
https://github.com/zoriya/vim.git
synced 2025-12-30 19:08:26 +00:00
Compare commits
26 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
aa0e80471f | ||
|
|
7701c24e36 | ||
|
|
946c1eeafc | ||
|
|
250912918e | ||
|
|
73dc59aad8 | ||
|
|
8f535582ad | ||
|
|
2369e35b39 | ||
|
|
acd6a049f6 | ||
|
|
a627c96182 | ||
|
|
98a22f4a63 | ||
|
|
9f733d1ffd | ||
|
|
447038a127 | ||
|
|
d960d76d5e | ||
|
|
a6f4d61af7 | ||
|
|
62951b1e0d | ||
|
|
a554a1933c | ||
|
|
38e2b0636b | ||
|
|
50f834dfb2 | ||
|
|
7f78bd73d6 | ||
|
|
52f8317926 | ||
|
|
314ed4b21a | ||
|
|
5302d9ebc1 | ||
|
|
ddab33232a | ||
|
|
821390843b | ||
|
|
15d6319b9d | ||
|
|
9e8edf6ee6 |
1
Filelist
1
Filelist
@@ -313,6 +313,7 @@ SRC_DOS = \
|
||||
src/xxd/Make_bc5.mak \
|
||||
src/xxd/Make_cyg.mak \
|
||||
src/xxd/Make_djg.mak \
|
||||
src/xxd/Make_ming.mak \
|
||||
src/xxd/Make_mvc.mak \
|
||||
nsis/gvim.nsi \
|
||||
nsis/README.txt \
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*autocmd.txt* For Vim version 7.3. Last change: 2011 May 19
|
||||
*autocmd.txt* For Vim version 7.3. Last change: 2011 Aug 29
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -448,6 +448,9 @@ BufWriteCmd Before writing the whole buffer to a file.
|
||||
'modified' if successful, unless '+' is in
|
||||
'cpo' and writing to another file |cpo-+|.
|
||||
The buffer contents should not be changed.
|
||||
When the command resets 'modified' the undo
|
||||
information is adjusted to mark older undo
|
||||
states as 'modified', like |:write| does.
|
||||
|Cmd-event|
|
||||
*BufWritePost*
|
||||
BufWritePost After writing the whole buffer to a file
|
||||
@@ -508,6 +511,7 @@ CursorMoved After the cursor was moved in Normal mode.
|
||||
not expect or that is slow.
|
||||
*CursorMovedI*
|
||||
CursorMovedI After the cursor was moved in Insert mode.
|
||||
Not triggered when the popup menu is visible.
|
||||
Otherwise the same as CursorMoved.
|
||||
*EncodingChanged*
|
||||
EncodingChanged Fires off after the 'encoding' option has been
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*eval.txt* For Vim version 7.3. Last change: 2011 Jul 13
|
||||
*eval.txt* For Vim version 7.3. Last change: 2011 Aug 29
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -39,7 +39,7 @@ done, the features in this document are not available. See |+eval| and
|
||||
*E712*
|
||||
There are six types of variables:
|
||||
|
||||
Number A 32 bit signed number. |expr-number| *Number*
|
||||
Number A 32 or 64 bit signed number. |expr-number| *Number*
|
||||
Examples: -123 0x10 0177
|
||||
|
||||
Float A floating point number. |floating-point-format| *Float*
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*gui.txt* For Vim version 7.3. Last change: 2010 Nov 03
|
||||
*gui.txt* For Vim version 7.3. Last change: 2011 Jul 22
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -147,6 +147,15 @@ task bar with the 'guiheadroom' option.
|
||||
If you are running the X Window System, you can get information about the
|
||||
window Vim is running in with this command: >
|
||||
:!xwininfo -id $WINDOWID
|
||||
<
|
||||
*gui-IME* *iBus*
|
||||
Input methods for international characters in X that rely on the XIM
|
||||
framework, most notably iBus, have been known to produce undesirable results
|
||||
in gVim. These may include an inability to enter spaces, or long delays
|
||||
between typing a character and it being recognized by the application.
|
||||
|
||||
One workaround that has been successful, for unknown reasons, is to prevent
|
||||
gvim from forking into the background by starting it with the |-f| argument.
|
||||
|
||||
==============================================================================
|
||||
2. Scrollbars *gui-scrollbars*
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*gui_w32.txt* For Vim version 7.3. Last change: 2010 Dec 19
|
||||
*gui_w32.txt* For Vim version 7.3. Last change: 2011 Jul 23
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -137,6 +137,9 @@ options:
|
||||
And if there already is a gvim running:
|
||||
"Edit with existing gvim" -- edit the file with the running gvim
|
||||
|
||||
The "edit with existing Vim" entries can be disabled by adding an entry in the
|
||||
registry under HKLM\Software\Vim\Gvim, named DisableEditWithExisting, and with
|
||||
any value.
|
||||
*install-registry*
|
||||
You can add the "Edit with Vim" menu entry in an easy way by using the
|
||||
"install.exe" program. It will add several registry entries for you.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*gui_x11.txt* For Vim version 7.3. Last change: 2010 Jul 20
|
||||
*gui_x11.txt* For Vim version 7.3. Last change: 2011 Sep 14
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -53,6 +53,8 @@ When using "gvim -f" and then ":gui", Vim will run in the foreground. The
|
||||
":gui -b".
|
||||
|
||||
"gvim --nofork" does the same as "gvim -f".
|
||||
*E851* *E852*
|
||||
When starting the GUI fails Vim will try to continue running in the terminal.
|
||||
|
||||
If you want the GUI to run in the foreground always, include the 'f'
|
||||
flag in 'guioptions'. |-f|.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*if_pyth.txt* For Vim version 7.3. Last change: 2011 May 07
|
||||
*if_pyth.txt* For Vim version 7.3. Last change: 2011 Aug 19
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Paul Moore
|
||||
@@ -380,7 +380,7 @@ To work around such problems there are these options:
|
||||
*has-python*
|
||||
You can test what Python version is available with: >
|
||||
if has('python')
|
||||
echo 'there is Pyton 2.x'
|
||||
echo 'there is Python 2.x'
|
||||
elseif has('python3')
|
||||
echo 'there is Python 3.x'
|
||||
endif
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*indent.txt* For Vim version 7.3. Last change: 2011 Jul 15
|
||||
*indent.txt* For Vim version 7.3. Last change: 2011 Sep 02
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -132,8 +132,8 @@ The 'cinoptions' option sets how Vim performs indentation. The value after
|
||||
the option character can be one of these (N is any number):
|
||||
N indent N spaces
|
||||
-N indent N spaces to the left
|
||||
Ns N times 'shiftwidth spaces
|
||||
-Ns N times 'shiftwidth spaces to the left
|
||||
Ns N times 'shiftwidth' spaces
|
||||
-Ns N times 'shiftwidth' spaces to the left
|
||||
|
||||
In the list below,
|
||||
"N" represents a number of your choice (the number can be negative). When
|
||||
@@ -432,7 +432,7 @@ The examples below assume a 'shiftwidth' of 4.
|
||||
c3 c3
|
||||
) && c4; ) && c4;
|
||||
<
|
||||
*cino-2*
|
||||
*cino-w*
|
||||
wN When in unclosed parentheses and N is non-zero and either
|
||||
using "(0" or "u0", respectively, or using "U0" and the unclosed
|
||||
parentheses is the first non-white character in its line, line
|
||||
@@ -706,6 +706,43 @@ Indent for a continuation line: >
|
||||
let g:pyindent_continue = '&sw * 2'
|
||||
|
||||
|
||||
R *ft-r-indent*
|
||||
|
||||
Function arguments are aligned if they span for multiple lines. If you prefer
|
||||
do not have the arguments of functions aligned, put in your |vimrc|:
|
||||
>
|
||||
let r_indent_align_args = 0
|
||||
<
|
||||
All lines beginning with a comment character, #, get the same indentation
|
||||
level of the normal R code. Users of Emacs/ESS may be used to have lines
|
||||
beginning with a single # indented in the 40th column, ## indented as R code,
|
||||
and ### not indented. If you prefer that lines beginning with comment
|
||||
characters are aligned as they are by Emacs/ESS, put in your |vimrc|:
|
||||
>
|
||||
let r_indent_ess_comments = 1
|
||||
<
|
||||
If you prefer that lines beginning with a single # are aligned at a column
|
||||
different from the 40th one, you should set a new value to the variable
|
||||
r_indent_comment_column, as in the example below:
|
||||
>
|
||||
let r_indent_comment_column = 30
|
||||
<
|
||||
Any code after a line that ends with "<-" is indented. Emacs/ESS does not
|
||||
indent the code if it is a top level function. If you prefer that the
|
||||
Vim-R-plugin behaves like Emacs/ESS in this regard, put in your |vimrc|:
|
||||
>
|
||||
let r_indent_ess_compatible = 1
|
||||
<
|
||||
Below is an example of indentation with and without this option enabled:
|
||||
>
|
||||
### r_indent_ess_compatible = 1 ### r_indent_ess_compatible = 0
|
||||
foo <- foo <-
|
||||
function(x) function(x)
|
||||
{ {
|
||||
paste(x) paste(x)
|
||||
} }
|
||||
<
|
||||
|
||||
SHELL *ft-sh-indent*
|
||||
|
||||
The amount of indent applied under various circumstances in a shell file can
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*index.txt* For Vim version 7.3. Last change: 2011 Jan 04
|
||||
*index.txt* For Vim version 7.3. Last change: 2011 Aug 06
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -1261,7 +1261,7 @@ tag command action ~
|
||||
|:k| :k set a mark
|
||||
|:keepalt| :keepa[lt] following command keeps the alternate file
|
||||
|:keepmarks| :kee[pmarks] following command keeps marks where they are
|
||||
|:keepjumps| :keepj[jumps] following command keeps jumplist and marks
|
||||
|:keepjumps| :keepj[umps] following command keeps jumplist and marks
|
||||
|:lNext| :lN[ext] go to previous entry in location list
|
||||
|:lNfile| :lNf[ile] go to last entry in previous file
|
||||
|:list| :l[ist] print lines
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*insert.txt* For Vim version 7.3. Last change: 2010 Nov 10
|
||||
*insert.txt* For Vim version 7.3. Last change: 2011 Sep 14
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -1020,6 +1020,21 @@ On the second invocation the arguments are:
|
||||
The function must return a List with the matching words. These matches
|
||||
usually include the "a:base" text. When there are no matches return an empty
|
||||
List.
|
||||
|
||||
In order to return more information than the matching words, return a Dict
|
||||
that contains the List. The Dict can have these items:
|
||||
words The List of matching words (mandatory).
|
||||
refresh A string to control re-invocation of the function
|
||||
(optional).
|
||||
The only value currently recognized is "always", the
|
||||
effect is that the function is called whenever the
|
||||
leading text is changed.
|
||||
Other items are ignored.
|
||||
|
||||
For example, the function can contain this: >
|
||||
let matches = ... list of words ...
|
||||
return {'words': matches, 'refresh': 'always'}
|
||||
<
|
||||
*complete-items*
|
||||
Each list item can either be a string or a Dictionary. When it is a string it
|
||||
is used as the completion. When it is a Dictionary it can contain these
|
||||
@@ -1040,9 +1055,10 @@ items:
|
||||
empty when non-zero this match will be added even when it is
|
||||
an empty string
|
||||
|
||||
All of these except 'icase' must be a string. If an item does not meet these
|
||||
requirements then an error message is given and further items in the list are
|
||||
not used. You can mix string and Dictionary items in the returned list.
|
||||
All of these except 'icase', 'dup' and 'empty' must be a string. If an item
|
||||
does not meet these requirements then an error message is given and further
|
||||
items in the list are not used. You can mix string and Dictionary items in
|
||||
the returned list.
|
||||
|
||||
The "menu" item is used in the popup menu and may be truncated, thus it should
|
||||
be relatively short. The "info" item can be longer, it will be displayed in
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*map.txt* For Vim version 7.3. Last change: 2011 Jun 13
|
||||
*map.txt* For Vim version 7.3. Last change: 2011 Aug 19
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -228,7 +228,7 @@ text before the cursor and start omni completion when some condition is met.
|
||||
|
||||
For abbreviations |v:char| is set to the character that was typed to trigger
|
||||
the abbreviation. You can use this to decide how to expand the {lhs}. You
|
||||
you should not either insert or change the v:char.
|
||||
should not either insert or change the v:char.
|
||||
|
||||
Be very careful about side effects! The expression is evaluated while
|
||||
obtaining characters, you may very well make the command dysfunctional.
|
||||
@@ -544,6 +544,7 @@ construct can be used:
|
||||
<Char-123> character 123
|
||||
<Char-033> character 27
|
||||
<Char-0x7f> character 127
|
||||
<S-Char-114> character 114 ('r') shifted ('R')
|
||||
This is useful to specify a (multi-byte) character in a 'keymap' file.
|
||||
Upper and lowercase differences are ignored.
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*motion.txt* For Vim version 7.3. Last change: 2011 Jun 02
|
||||
*motion.txt* For Vim version 7.3. Last change: 2011 Jul 19
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -1017,8 +1017,6 @@ CTRL-O Go to [count] Older cursor position in jump list
|
||||
<Tab> or *CTRL-I* *<Tab>*
|
||||
CTRL-I Go to [count] newer cursor position in jump list
|
||||
(not a motion command).
|
||||
In a |quickfix-window| it takes you to the position of
|
||||
the error under the cursor.
|
||||
{not in Vi}
|
||||
{not available without the |+jumplist| feature}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*options.txt* For Vim version 7.3. Last change: 2011 Jul 07
|
||||
*options.txt* For Vim version 7.3. Last change: 2011 Sep 09
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -4861,6 +4861,10 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
written. A ":set nomodified" command also resets the original
|
||||
values to the current values and the 'modified' option will be
|
||||
reset.
|
||||
This option is not set when a change is made to the buffer as the
|
||||
result of a BufNewFile, BufRead/BufReadPost, BufWritePost,
|
||||
FileAppendPost or VimLeave autocommand event. See |gzip-example| for
|
||||
an explanation.
|
||||
When 'buftype' is "nowrite" or "nofile" this option may be set, but
|
||||
will be ignored.
|
||||
|
||||
@@ -5898,8 +5902,11 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
"bash.exe -c ls" or "command.com /c dir". For the MS-DOS-like
|
||||
systems, the default is set according to the value of 'shell', to
|
||||
reduce the need to set this option by the user. It's not used for
|
||||
OS/2 (EMX figures this out itself). See |option-backslash| about
|
||||
including spaces and backslashes. See |dos-shell|.
|
||||
OS/2 (EMX figures this out itself).
|
||||
On Unix it can have more than one flag. Each white space separated
|
||||
part is passed as an argument to the shell command.
|
||||
See |option-backslash| about including spaces and backslashes.
|
||||
Also see |dos-shell| for MS-DOS and MS-Windows.
|
||||
This option cannot be set from a |modeline| or in the |sandbox|, for
|
||||
security reasons.
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*os_vms.txt* For Vim version 7.3. Last change: 2010 Aug 16
|
||||
*os_vms.txt* For Vim version 7.3. Last change: 2011 Aug 14
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL
|
||||
@@ -38,9 +38,6 @@ You can download the Vim source code by ftp from the official Vim site:
|
||||
Or use one of the mirrors:
|
||||
ftp://ftp.vim.org/pub/vim/MIRRORS
|
||||
|
||||
You will need both the Unix and Extra archives to build vim.exe for VMS.
|
||||
For using Vim's full power you will need the runtime files as well.
|
||||
|
||||
You can download precompiled executables from:
|
||||
http://www.polarhome.com/vim/
|
||||
ftp://ftp.polarhome.com/pub/vim/
|
||||
@@ -75,7 +72,7 @@ See the file [.SRC]INSTALLVMS.TXT.
|
||||
4. Problems *vms-problems*
|
||||
|
||||
The code has been tested under Open VMS 6.2 - 8.2 on Alpha, VAX and IA64
|
||||
platforms with the DEC C compiler. It should work without bigger problems.
|
||||
platforms with the DEC C compiler. It should work without big problems.
|
||||
If your system does not have some include libraries you can tune up in
|
||||
OS_VMS_CONF.H file.
|
||||
|
||||
@@ -88,11 +85,11 @@ Also GTK, XPM library paths should be configured in MAKE_VMS.MMS
|
||||
|
||||
Note: Under VAX it should work with the DEC C compiler without problems. The
|
||||
VAX C compiler is not fully ANSI C compatible in pre-processor directives
|
||||
semantics, therefore you have to use a converter program what will do the lion
|
||||
semantics, therefore you have to use a converter program that will do the lion
|
||||
part of the job. For detailed instructions read file INSTALLvms.txt
|
||||
|
||||
MMS_VIM.EXE is build together with VIM.EXE, but for XD.EXE you should
|
||||
change to subdirectory and build it separately.
|
||||
MMS_VIM.EXE is build together with VIM.EXE, but for XXD.EXE you should
|
||||
change to a subdirectory and build it separately.
|
||||
|
||||
CTAGS is not part of the Vim source distribution anymore, however the OpenVMS
|
||||
specific source might contain CTAGS source files as described above.
|
||||
@@ -184,9 +181,9 @@ You may want to create .vimrc and .gvimrc files in your home directory
|
||||
|
||||
The easiest way is just rename example files. You may leave the menu file
|
||||
(MENU.VIM) and files vimrc and gvimrc in the original $VIM directory. It will
|
||||
be default setup for all users, and for users it is enough just to have their
|
||||
own additions or resetting in their home directory in files .vimrc and .gvimrc.
|
||||
It should work without problems.
|
||||
be the default setup for all users, and for users it is enough to just have
|
||||
their own additions or resetting in their home directory in files .vimrc and
|
||||
.gvimrc. It should work without problems.
|
||||
|
||||
Note: Remember, system rc files (default for all users) don't have a leading
|
||||
".". So, system rc files are: >
|
||||
@@ -200,7 +197,7 @@ and user customized rc files are: >
|
||||
sys$login:.vimrc
|
||||
sys$login:.gvimrc
|
||||
|
||||
You can check that everything is on the right place with the :version command.
|
||||
You can check that everything is at the right place with the :version command.
|
||||
|
||||
Example LOGIN.COM: >
|
||||
|
||||
@@ -209,15 +206,15 @@ Example LOGIN.COM: >
|
||||
$ gv*im:== spawn/nowait/input=NLA0 mcr VIM:VIM.EXE -g -GEOMETRY 80x40
|
||||
$ set disp/create/node=192.168.5.223/trans=tcpip
|
||||
|
||||
Note: This set-up should be enough, if you are working on standalone server or
|
||||
clustered environment, but if you want to use Vim as internode editor in
|
||||
Note: This set-up should be enough, if you are working on a standalone server or
|
||||
clustered environment, but if you want to use Vim as an internode editor in
|
||||
DECNET environment, it will satisfy as well.
|
||||
You just have to define the "whole" path: >
|
||||
|
||||
$ define VIM "<server_name>[""user password""]::device:<path>"
|
||||
$ vi*m :== "mcr VIM:VIM.EXE"
|
||||
|
||||
As for example: >
|
||||
For example: >
|
||||
|
||||
$ define VIM "PLUTO::RF10:[UTIL.VIM]"
|
||||
$ define VIM "PLUTO""ZAY mypass""::RF10:[UTIL.VIM]" ! if passwd required
|
||||
@@ -300,12 +297,12 @@ For more information type $help set disp in VMS prompt.
|
||||
|
||||
4) If you are working on MS-Windows or some other non X/Window environment
|
||||
you need to set up one X server and run Vim as in point 2.
|
||||
For MS-Windows there are available free X servers as MIX , Omni X etc.,
|
||||
For MS-Windows there are available free X servers as MIX, Omni X etc.,
|
||||
as well as excellent commercial products as eXcursion or ReflectionX with
|
||||
built-in DEC support.
|
||||
|
||||
Please note, that executables without GUI are slightly faster during startup
|
||||
then with enabled GUI in character mode. Therefore, if you do not use GUI
|
||||
than with enabled GUI in character mode. Therefore, if you do not use GUI
|
||||
features, it is worth to choose non GUI executables.
|
||||
|
||||
==============================================================================
|
||||
@@ -326,8 +323,8 @@ features, it is worth to choose non GUI executables.
|
||||
8.12 diff-mode
|
||||
8.13 Allow '$' in C keywords
|
||||
8.14 VIMTUTOR for beginners
|
||||
8.15 Slow start in console mode issue
|
||||
8.16 Common VIM directory - different architectures
|
||||
8.15 Slow start in console mode issue
|
||||
8.16 Common VIM directory - different architectures
|
||||
|
||||
8.1 Backspace/delete
|
||||
|
||||
@@ -360,7 +357,7 @@ number, try these settings. >
|
||||
:set nowritebackup " does not have any purpose on VMS. It's the
|
||||
" default.
|
||||
|
||||
Recovery is working perfect as well from the default swap file.
|
||||
Recovery is working perfectly as well from the default swap file.
|
||||
Read more with :help swapfile
|
||||
|
||||
(Claude Marinier <ClaudeMarinier@xwavesolutions.com> Vim 5.5, Zoltan Arpadffy
|
||||
@@ -386,7 +383,7 @@ Note: You may use <,> brackets as well (device:<path>file.ext;version) as
|
||||
rf10:<user.zay.work>test.c;1
|
||||
|
||||
(David Elins <delins@foliage.com>, Jerome Lauret
|
||||
<JLAURET@mail.chem.sunysb.edu> Vim 5.6 )
|
||||
<JLAURET@mail.chem.sunysb.edu> Vim 5.6)
|
||||
|
||||
|
||||
8.5 Remote host invocation
|
||||
@@ -445,14 +442,14 @@ Terminal entry not found in termcap
|
||||
builtin_dumb
|
||||
defaulting to 'vt320'
|
||||
---
|
||||
The solution is to define default terminal name: >
|
||||
The solution is to define the default terminal name: >
|
||||
|
||||
$ ! unknown terminal name. Let us use vt320 or ansi instead.
|
||||
$ ! Note: it's case sensitive
|
||||
$ define term "vt320"
|
||||
|
||||
Terminals from VT100 to VT320 (as V300, VT220, VT200 ) do not need any extra
|
||||
keyboard mappings. They should work perfect as they are, including arrows,
|
||||
Terminals from VT100 to VT320 (as V300, VT220, VT200) do not need any extra
|
||||
keyboard mappings. They should work perfectly as they are, including arrows,
|
||||
Ins, Del buttons etc., except Backspace in GUI mode. To solve it, add to
|
||||
.gvimrc: >
|
||||
|
||||
@@ -465,8 +462,8 @@ your .vimrc file: >
|
||||
|
||||
set ttyfast " set fast terminal
|
||||
|
||||
Note: if you're using Vim on remote host or through very slow connection, it's
|
||||
recommended to avoid fast terminal option with: >
|
||||
Note: if you're using Vim on remote host or through a very slow connection, it's
|
||||
recommended to avoid the fast terminal option with: >
|
||||
|
||||
set nottyfast " set terminal to slow mode
|
||||
|
||||
@@ -483,8 +480,8 @@ special commands to execute executables: >
|
||||
|
||||
OpenVMS users always have to be aware that the Vim command :! "just" drop them
|
||||
to DCL prompt. This feature is possible to use without any problem with all
|
||||
DCL commands, but if we want to execute some program as XXD, CTAGS, JTAGS etc.
|
||||
we're running into trouble if we follow the Vim documentation (see: help
|
||||
DCL commands, but if we want to execute some programs such as XXD, CTAGS, JTAGS,
|
||||
etc. we're running into trouble if we follow the Vim documentation (see: help
|
||||
xxd).
|
||||
|
||||
Solution: Execute with the MC command and add the full path to the executable.
|
||||
@@ -534,7 +531,7 @@ Example: >
|
||||
|
||||
$define SYS$PRINT HP5ANSI
|
||||
|
||||
You can print out whole buffer or just the marked area.
|
||||
You can print out the whole buffer or just the marked area.
|
||||
More info under :help hardcopy
|
||||
|
||||
(Zoltan Arpadffy, Vim 6.0c)
|
||||
@@ -561,16 +558,16 @@ will be confused after a window-resize.
|
||||
From 6.0 diff functionality has been implemented, but OpenVMS does not use
|
||||
GNU/Unix like diff therefore built in diff does not work.
|
||||
There is a simple solution to solve this anomaly. Install a Unix like diff
|
||||
and Vim will work perfect in diff mode too. You just have to redefine your
|
||||
and Vim will work perfectly in diff mode too. You just have to redefine your
|
||||
diff program as: >
|
||||
|
||||
define /nolog diff <GNU_PATH>diff.exe
|
||||
|
||||
Another, more sophisticated solution is described below (8.12 diff-mode)
|
||||
There are some other programs as patch, make etc that may cause same problems.
|
||||
At www.polarhome.com is possible to download an GNU package for Alpha and VAX
|
||||
boxes that is meant to solve GNU problems on OpenVMS.
|
||||
( Zoltan Arpadffy, Vim 6.1)
|
||||
There are other programs such as patch, make etc that may cause the same
|
||||
problems. At www.polarhome.com is possible to download an GNU package for
|
||||
Alpha and VAX boxes that is meant to solve GNU problems on OpenVMS.
|
||||
(Zoltan Arpadffy, Vim 6.1)
|
||||
|
||||
|
||||
8.12 diff-mode
|
||||
@@ -632,7 +629,7 @@ You can now compare files in 4 ways: >
|
||||
3. VIM diff: $ VIMDIFF <FILE1> <FILE2>
|
||||
4. GVIM diff: $ GVIMDIFF <FILE1> <FILE2>
|
||||
|
||||
( Coen Engelbarts, Vim 6.1)
|
||||
(Coen Engelbarts, Vim 6.1)
|
||||
|
||||
|
||||
8.13 Allow '$' in C keywords
|
||||
@@ -653,35 +650,36 @@ Now word-based commands, e.g. the '*'-search-command and the CTRL-]
|
||||
tag-lookup, work on the whole identifier. (Ctags on VMS also supports '$' in
|
||||
C keywords since ctags version 5.1.)
|
||||
|
||||
( Coen Engelbarts, Vim 6.1)
|
||||
(Coen Engelbarts, Vim 6.1)
|
||||
|
||||
8.14 VIMTUTOR for beginners
|
||||
|
||||
It exits VIMTUTOR.COM DCL script that can help Vim beginners to learn/make
|
||||
first steps with Vim on OpenVMS. Depending of binary distribution you may
|
||||
start it with: >
|
||||
The VIMTUTOR.COM DCL script can help Vim beginners to learn/make their first
|
||||
steps with Vim on OpenVMS. Depending of binary distribution you may start it
|
||||
with: >
|
||||
|
||||
@vim:vimtutor
|
||||
|
||||
(Thomas.R.Wyant III, Vim 6.1)
|
||||
|
||||
8.14 Slow start in console mode issue
|
||||
8.16 Slow start in console mode issue
|
||||
|
||||
As GUI/GTK Vim works equally well in console mode, many administrators
|
||||
deploy those executables system wide.
|
||||
Unfortunately, on a remote slow connections GUI/GTK executables behave rather
|
||||
slow when user wants to run Vim just in the console mode - because of X environment detection timeout.
|
||||
slow when user wants to run Vim just in the console mode - because of X
|
||||
environment detection timeout.
|
||||
|
||||
Luckily, there is a simple solution for that. Administrators need to deploy
|
||||
both GUI/GTK build and just console build executables, like below: >
|
||||
|
||||
|- vim73
|
||||
|----- doc
|
||||
|----- syntax
|
||||
|----- syntax
|
||||
vimrc (system rc files)
|
||||
gvimrc
|
||||
gvim.exe (the renamed GUI or GTK built vim.exe)
|
||||
vim.exe (the console only executable)
|
||||
gvim.exe (the renamed GUI or GTK built vim.exe)
|
||||
vim.exe (the console only executable)
|
||||
|
||||
Define system symbols like below in for ex in LOGIN.COM or SYLOGIN.COM: >
|
||||
|
||||
@@ -692,7 +690,7 @@ Define system symbols like below in for ex in LOGIN.COM or SYLOGIN.COM: >
|
||||
$ gv*im :== spawn/nowait/input=NLA0 mcr VIM:GVIM.EXE -g -GEOMETRY 80x40
|
||||
|
||||
|
||||
Like this, users that do not have X environment and want to use Vim just in
|
||||
Like this, users that do not have X environment and want to use Vim just in
|
||||
console mode can avoid performance problems.
|
||||
|
||||
(Zoltan Arpadffy, Vim 7.2)
|
||||
@@ -714,8 +712,8 @@ View of Cluster from system ID 11655 node: TOR
|
||||
+---------------------------------+
|
||||
|
||||
It is convenient to have a common VIM directory but execute different
|
||||
executables.
|
||||
There are more solutions for this problem:
|
||||
executables.
|
||||
There are several solutions for this problem:
|
||||
|
||||
Solution 1. All executables in the same directory with different names
|
||||
This is easily done with the following script that can be added
|
||||
@@ -769,7 +767,7 @@ GNU_TOOLS.ZIP package downloadable from http://www.polarhome.com/vim/
|
||||
Version 7.3
|
||||
- CTAGS 5.8 included
|
||||
- VMS compile warnings fixed - floating-point overflow warning corrected on VAX
|
||||
- filepath completition corrected - too many chars were escaped in filename
|
||||
- filepath completion corrected - too many chars were escaped in filename
|
||||
and shell commands
|
||||
- the following plugins are included into VMS runtime:
|
||||
genutils 2.4, multiselect 2.2, multvals 3.1, selectbuf 4.3,
|
||||
@@ -784,10 +782,10 @@ Version 7.3
|
||||
Version 7.2 (2008 Aug 9)
|
||||
- VCF files write corrected
|
||||
- CTAGS 5.7 included
|
||||
- corrected make_vms.mms (on VAX gave syntax error)
|
||||
- corrected make_vms.mms (on VAX gave syntax error)
|
||||
|
||||
Version 7.1 (2007 Jun 15)
|
||||
- create TAGS file from menu
|
||||
- create TAGS file from menu
|
||||
|
||||
Version 7 (2006 May 8)
|
||||
- Improved low level char input (affects just console mode)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*os_win32.txt* For Vim version 7.3. Last change: 2011 May 28
|
||||
*os_win32.txt* For Vim version 7.3. Last change: 2011 Aug 14
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by George Reilly
|
||||
@@ -316,11 +316,11 @@ A. When using :! to run an external command, you can run it with "start": >
|
||||
There are two optional arguments (see the next Q):
|
||||
/min the window will be minimized.
|
||||
/b" no console window will be opened
|
||||
You can only one of these flags at a time. A second second one will be
|
||||
You can use only one of these flags at a time. A second one will be
|
||||
treated as the start of the command.
|
||||
|
||||
Q. How do I avoid getting a window for programs that I run asynchronously?
|
||||
A. You have two possible solutions depending on what exactly do you want:
|
||||
A. You have two possible solutions depending on what you want:
|
||||
1) You may use the /min flag in order to run program in a minimized state
|
||||
with no other changes. It will work equally for console and GUI
|
||||
applications.
|
||||
@@ -328,7 +328,7 @@ A. You have two possible solutions depending on what exactly do you want:
|
||||
console window for them (GUI applications are not affected). But you
|
||||
should use this flag only if the application you run doesn't require any
|
||||
input. Otherwise it will get an EOF error because its input stream
|
||||
(stdin) would be redirected to \\.\NUL (stdoud and stderr too).
|
||||
(stdin) would be redirected to \\.\NUL (stdout and stderr too).
|
||||
|
||||
Example for a console application, run Exuberant ctags: >
|
||||
:!start /min ctags -R .
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*pattern.txt* For Vim version 7.3. Last change: 2011 May 25
|
||||
*pattern.txt* For Vim version 7.3. Last change: 2011 Jul 20
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*pi_vimball.txt* For Vim version 7.3. Last change: 2011 Apr 02
|
||||
*pi_vimball.txt* For Vim version 7.3. Last change: 2011 Aug 14
|
||||
|
||||
----------------
|
||||
Vimball Archiver
|
||||
@@ -16,6 +16,7 @@ Copyright: (c) 2004-2011 by Charles E. Campbell, Jr. *Vimball-copyright*
|
||||
1. Contents *vba* *vimball* *vimball-contents*
|
||||
|
||||
1. Contents......................................: |vimball-contents|
|
||||
2. Vimball Introduction..........................: |vimball-intro|
|
||||
3. Vimball Manual................................: |vimball-manual|
|
||||
MkVimball.....................................: |:MkVimball|
|
||||
UseVimball....................................: |:UseVimball|
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*pi_zip.txt* For Vim version 7.3. Last change: 2011 May 24
|
||||
*pi_zip.txt* For Vim version 7.3. Last change: 2011 Aug 14
|
||||
|
||||
+====================+
|
||||
| Zip File Interface |
|
||||
@@ -69,7 +69,6 @@ Copyright: Copyright (C) 2005-2011 Charles E Campbell, Jr *zip-copyright*
|
||||
let g:loaded_zipPlugin= 1
|
||||
let g:loaded_zip = 1
|
||||
<
|
||||
<
|
||||
|
||||
==============================================================================
|
||||
3. Additional Extensions *zip-extension*
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*starting.txt* For Vim version 7.3. Last change: 2010 Sep 18
|
||||
*starting.txt* For Vim version 7.3. Last change: 2011 Jul 22
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -424,12 +424,7 @@ a slash. Thus "-R" means recovery and "-/R" readonly.
|
||||
"-d con:30/10/600/150". But you can also use it to start
|
||||
editing on another device, e.g., AUX:. {not in Vi}
|
||||
*-f*
|
||||
-f Amiga: Do not restart Vim to open a new window. This
|
||||
option should be used when Vim is started by a program that
|
||||
will wait for the edit session to finish (e.g., mail or
|
||||
readnews). See |amiga-window|.
|
||||
|
||||
GUI: Do not disconnect from the program that started Vim.
|
||||
-f GUI: Do not disconnect from the program that started Vim.
|
||||
'f' stands for "foreground". If omitted, the GUI forks a new
|
||||
process and exits the current one. "-f" should be used when
|
||||
gvim is started by a program that will wait for the edit
|
||||
@@ -437,8 +432,14 @@ a slash. Thus "-R" means recovery and "-/R" readonly.
|
||||
never to fork, include 'f' in 'guioptions' in your |gvimrc|.
|
||||
Careful: You can use "-gf" to start the GUI in the foreground,
|
||||
but "-fg" is used to specify the foreground color. |gui-fork|
|
||||
|
||||
Amiga: Do not restart Vim to open a new window. This
|
||||
option should be used when Vim is started by a program that
|
||||
will wait for the edit session to finish (e.g., mail or
|
||||
readnews). See |amiga-window|.
|
||||
{not in Vi}
|
||||
|
||||
|
||||
*--nofork*
|
||||
--nofork GUI: Do not fork. Same as |-f|.
|
||||
*-u* *E282*
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*syntax.txt* For Vim version 7.3. Last change: 2011 Jul 18
|
||||
*syntax.txt* For Vim version 7.3. Last change: 2011 Sep 21
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -2605,8 +2605,41 @@ reduce this, the "sh_maxlines" internal variable can be set. Example: >
|
||||
The default is to use the twice sh_minlines. Set it to a smaller number to
|
||||
speed up displaying. The disadvantage is that highlight errors may appear.
|
||||
|
||||
*g:sh_isk* *g:sh_noisk*
|
||||
The shell languages appear to let "." be part of words, commands, etc;
|
||||
consequently it should be in the isk for sh.vim. As of v116 of syntax/sh.vim,
|
||||
syntax/sh.vim will append the "." to |'iskeyword'| by default; you may control
|
||||
this behavior with: >
|
||||
let g:sh_isk = '..whatever characters you want as part of iskeyword'
|
||||
let g:sh_noisk= 1 " otherwise, if this exists, the isk will NOT chg
|
||||
<
|
||||
*sh-embed* *sh-awk*
|
||||
Sh: EMBEDDING LANGUAGES~
|
||||
|
||||
SPEEDUP (AspenTech plant simulator) *spup.vim* *ft-spup-syntax*
|
||||
You may wish to embed languages into sh. I'll give an example courtesy of
|
||||
Lorance Stinson on how to do this with awk as an example. Put the following
|
||||
file into $HOME/.vim/after/syntax/sh/awkembed.vim: >
|
||||
|
||||
" AWK Embedding: {{{1
|
||||
" ==============
|
||||
" Shamelessly ripped from aspperl.vim by Aaron Hope.
|
||||
if exists("b:current_syntax")
|
||||
unlet b:current_syntax
|
||||
endif
|
||||
syn include @AWKScript syntax/awk.vim
|
||||
syn region AWKScriptCode matchgroup=AWKCommand start=+[=\\]\@<!'+ skip=+\\'+ end=+'+ contains=@AWKScript contained
|
||||
syn region AWKScriptEmbedded matchgroup=AWKCommand start=+\<awk\>+ skip=+\\$+ end=+[=\\]\@<!'+me=e-1 contains=@shIdList,@shExprList2 nextgroup=AWKScriptCode
|
||||
syn cluster shCommandSubList add=AWKScriptEmbedded
|
||||
hi def link AWKCommand Type
|
||||
<
|
||||
This code will then let the awk code in the single quotes: >
|
||||
awk '...awk code here...'
|
||||
be highlighted using the awk highlighting syntax. Clearly this may be
|
||||
extended to other languages.
|
||||
|
||||
|
||||
SPEEDUP *spup.vim* *ft-spup-syntax*
|
||||
(AspenTech plant simulator)
|
||||
|
||||
The Speedup syntax file has some options:
|
||||
|
||||
@@ -2689,6 +2722,8 @@ sections, subsections, etc are supported. Put >
|
||||
in your <.vimrc>, and :set fdm=syntax. I suggest doing the latter via a
|
||||
modeline at the end of your LaTeX file: >
|
||||
% vim: fdm=syntax
|
||||
If your system becomes too slow, then you might wish to look into >
|
||||
https://vimhelp.appspot.com/vim_faq.txt.html#faq-29.7
|
||||
<
|
||||
*tex-nospell*
|
||||
Tex: Don't Want Spell Checking In Comments? ~
|
||||
@@ -2729,6 +2764,9 @@ If you have a slow computer, you may wish to reduce the values for >
|
||||
increase them. This primarily affects synchronizing (i.e. just what group,
|
||||
if any, is the text at the top of the screen supposed to be in?).
|
||||
|
||||
Another cause of slow highlighting is due to syntax-driven folding; see
|
||||
|tex-folding| for a way around this.
|
||||
|
||||
*tex-morecommands* *tex-package*
|
||||
Tex: Want To Highlight More Commands? ~
|
||||
|
||||
|
||||
@@ -4233,6 +4233,8 @@ E848 syntax.txt /*E848*
|
||||
E849 syntax.txt /*E849*
|
||||
E85 options.txt /*E85*
|
||||
E850 change.txt /*E850*
|
||||
E851 gui_x11.txt /*E851*
|
||||
E852 gui_x11.txt /*E852*
|
||||
E86 windows.txt /*E86*
|
||||
E87 windows.txt /*E87*
|
||||
E88 windows.txt /*E88*
|
||||
@@ -4963,7 +4965,6 @@ cino-( indent.txt /*cino-(*
|
||||
cino-) indent.txt /*cino-)*
|
||||
cino-+ indent.txt /*cino-+*
|
||||
cino-/ indent.txt /*cino-\/*
|
||||
cino-2 indent.txt /*cino-2*
|
||||
cino-: indent.txt /*cino-:*
|
||||
cino-= indent.txt /*cino-=*
|
||||
cino-> indent.txt /*cino->*
|
||||
@@ -4990,6 +4991,7 @@ cino-p indent.txt /*cino-p*
|
||||
cino-star indent.txt /*cino-star*
|
||||
cino-t indent.txt /*cino-t*
|
||||
cino-u indent.txt /*cino-u*
|
||||
cino-w indent.txt /*cino-w*
|
||||
cino-{ indent.txt /*cino-{*
|
||||
cino-} indent.txt /*cino-}*
|
||||
cinoptions-values indent.txt /*cinoptions-values*
|
||||
@@ -5690,6 +5692,7 @@ ft-ptcap-syntax syntax.txt /*ft-ptcap-syntax*
|
||||
ft-python-indent indent.txt /*ft-python-indent*
|
||||
ft-python-syntax syntax.txt /*ft-python-syntax*
|
||||
ft-quake-syntax syntax.txt /*ft-quake-syntax*
|
||||
ft-r-indent indent.txt /*ft-r-indent*
|
||||
ft-readline-syntax syntax.txt /*ft-readline-syntax*
|
||||
ft-rexx-syntax syntax.txt /*ft-rexx-syntax*
|
||||
ft-ruby-omni insert.txt /*ft-ruby-omni*
|
||||
@@ -6022,6 +6025,7 @@ gtk-tooltip-colors gui_x11.txt /*gtk-tooltip-colors*
|
||||
gu change.txt /*gu*
|
||||
gugu change.txt /*gugu*
|
||||
gui gui.txt /*gui*
|
||||
gui-IME gui.txt /*gui-IME*
|
||||
gui-clipboard gui_w32.txt /*gui-clipboard*
|
||||
gui-colors syntax.txt /*gui-colors*
|
||||
gui-extras gui.txt /*gui-extras*
|
||||
@@ -6230,6 +6234,7 @@ i) motion.txt /*i)*
|
||||
i< motion.txt /*i<*
|
||||
i> motion.txt /*i>*
|
||||
iB motion.txt /*iB*
|
||||
iBus gui.txt /*iBus*
|
||||
iW motion.txt /*iW*
|
||||
i[ motion.txt /*i[*
|
||||
i] motion.txt /*i]*
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*todo.txt* For Vim version 7.3. Last change: 2011 Jul 15
|
||||
*todo.txt* For Vim version 7.3. Last change: 2011 Sep 21
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -34,21 +34,68 @@ not be repeated below, unless there is extra information.
|
||||
*known-bugs*
|
||||
-------------------- Known bugs and current work -----------------------
|
||||
|
||||
Patch for redirection. (Yasuhiro Matsumoto, 2011 Sep 15) 2nd patch.
|
||||
Another on Sep 15?
|
||||
|
||||
Patch for DFLT_EFM. (Ben Boeckel, 2011 Sep 14)
|
||||
|
||||
Code style patch. (Elias Diem, 2011 Sep 19)
|
||||
|
||||
Patch for 'transparency' option. (Ben Boeckel, 2011 Sep 14)
|
||||
Do we want this? Also Sergiu Dotenco, 2011 Sep 17.
|
||||
|
||||
Patch for gui_w32.c: call DefWindowProc(). (Sergiu Dotenco, 2011 Sep 15, 17)
|
||||
|
||||
Patch to use task dialogs when available. (Sergiu Dotenco, 2011 Sep 15, 17)
|
||||
Addition Sep 16.
|
||||
|
||||
Patch for alpha-blended icons and toolbar height. (Sergiu Dotenco, 2011 Sep 15, 17)
|
||||
|
||||
Change to #ifdef for PDP_RETVAL. (Sergiu Dotenco, 2011 Sep 17, patch 2)
|
||||
|
||||
Patch for phpcomplete.vim (Benjamin Haskell) picked up by maintainer?
|
||||
|
||||
Add voting item: modern plugin management (automatic updates, handle
|
||||
dependencies).
|
||||
Add links to http://vimcasts.org/ and http://vimgolf.com/
|
||||
Read http://www.charlietanksley.net/philtex/sane-vim-plugin-management/
|
||||
|
||||
Go through more coverity reports.
|
||||
|
||||
Patch for Issue #9: http://code.google.com/p/vim/issues/detail?id=9
|
||||
C++ indenting. martin.gieseking
|
||||
|
||||
Using "." to repeat a Visual delete counts bytes, not characters. Can this be
|
||||
fixed? (Connor Lane Smith, 2011 Sep 1)
|
||||
|
||||
Patch to allow getchar() in expression mapping.
|
||||
Why was typeahead saved and restored? (James Vega, 2011 Aug 31)
|
||||
|
||||
Crash in autocomplete, valgrind log. (Greg Weber, 2011 Apr 22)
|
||||
|
||||
Discussion about canonicalization of Hebrew. (Ron Aaron, 2011 April 10)
|
||||
|
||||
Patch to fail if configure can't find an interface, such as Python.
|
||||
(Shlomi Fish, 2011 Jul 11)
|
||||
|
||||
Patch to support UTF-8 for Hangul. (Shawn Y.H. Kim, 2011 May 1)
|
||||
Needs more work.
|
||||
|
||||
With "unamedplus" in 'clipboard' pasting in Visual mode causes error for empty
|
||||
register. (Michael Seiwald, 2011 Jun 28)
|
||||
Patch for glob() returning a list. (Christian Brabandt, 2011 Aug 24, second
|
||||
one)
|
||||
|
||||
The :z command doesn't work exactly as it should. (ChangZhuo Chen, 2011 Mar 2)
|
||||
Compare with how old Vi works and with posix spec. terminal is 80 x 24,
|
||||
'scroll' option set to 11.
|
||||
Patch for: (Christian Brabandt, 2011 Aug 22)
|
||||
- Make it possible to enter "r<C-E>" and "r<C-Y>" (get character from line
|
||||
below/above).
|
||||
|
||||
Patch for: (Christian Brabandt, 2011 Aug 24, updated patch)
|
||||
8 ":sign unplace * file={filename}" should work. Also: ":sign unplace *
|
||||
buffer={bufnr}". So one can remove all signs for one file/buffer.
|
||||
|
||||
Problem with winfixheight and resizing. (Yukihiro Nakadaira, 2011 Sep 17)
|
||||
Patch Sep 18.
|
||||
|
||||
Problem with l: dictionary being locked in a function. (ZyX, 2011 Jul 21)
|
||||
|
||||
'cursorline' is displayed too short when there are concealed characters and
|
||||
'list' is set. (Dennis Preiser)
|
||||
@@ -63,29 +110,12 @@ Syntax region with 'concealends' and a 'cchar' value, 'conceallevel' set to 2,
|
||||
only one of the two ends gets the cchar displayed. (Brett Stahlman, 2010 Aug
|
||||
21, Ben Fritz, 2010 Sep 14)
|
||||
|
||||
When opening file from windows explorer, characters inside [] cause
|
||||
problems, even though double quotes are used. (Manuel Stol, 2011 Mar 9)
|
||||
|
||||
Patch to change the meaning of \n in substitute(). (motoya kurotsu, 2011 Mar 8)
|
||||
|
||||
Gui menu edit/paste in block mode insert only inserts in one line (Bjorn
|
||||
Winckler, 2011 May 11)
|
||||
Use function to set paste option and restore it, use CTRL-R+ to paste.
|
||||
|
||||
Help file foldexpr (ZyX)
|
||||
Need to escape $HOME on Windows? (ZyX, 2011 Jul 21)
|
||||
|
||||
Bug in repeating Visual "u". (Lawrence Kesteloot, 2010 Dec 20)
|
||||
|
||||
Patch to automatically get version number into NSIS. (Guopeng Wen, 2011 May
|
||||
27)
|
||||
|
||||
Patch to add more command completions (Dominique Pelle, 2011 Jun 25)
|
||||
|
||||
Patch to have GvimExt not use "edit with existing Vim" entries.
|
||||
(Jerome Vuarand, 2011 Jun 22)
|
||||
|
||||
Patch to make character classes work with multi-byte characters.
|
||||
(Dominique Pelle, 2011 May 31, update July 11)
|
||||
With "unamedplus" in 'clipboard' pasting in Visual mode causes error for empty
|
||||
register. (Michael Seiwald, 2011 Jun 28) I can't reproduce it.
|
||||
|
||||
In GTK Gvim, setting 'lines' and 'columns' to 99999 causes a crash (Tony
|
||||
Mechelynck, 2011 Apr 25). Can reproduce the crash sometimes:
|
||||
@@ -102,19 +132,9 @@ The error was 'RenderBadPicture (invalid Picture parameter)'.
|
||||
backtrace from your debugger if you break on the gdk_x_error() function.)
|
||||
Check that number of pixels doesn't go above 65535?
|
||||
|
||||
8 Add an event like CursorHold that is triggered repeatedly, not just once
|
||||
after typing something.
|
||||
Need for CursorHold that retriggers. Use a key that doesn't do anything, or a
|
||||
function that resets did_cursorhold.
|
||||
Patch by Christian Brabandt, 2011 May 6.
|
||||
|
||||
popup completion menu closes quickly when there is a fold in the buffer. (Jan
|
||||
Christoph Ebersbach, 2011 Jul 3)
|
||||
|
||||
CursorHold repeats typed key when it's the start of a mapping.
|
||||
(Will Gray, 2011 Mar 23)
|
||||
Christian Brabandt: problem is that OP_PENDING isn't set.
|
||||
|
||||
Windows keys not set properly on Windows 7? (cncyber, 2010 Aug 26)
|
||||
|
||||
This line hangs Vim, because of syntax HL:
|
||||
@@ -135,6 +155,8 @@ Using ":break" or something else that stops executing commands inside a
|
||||
|
||||
Vim using lots of memory when joining lines. (John Little, 2010 Dec 3)
|
||||
|
||||
Changes to manpage plugin. (Elias Toivanen, 2011 Jul 25)
|
||||
|
||||
On 64 bit MS-Windows "long" is only 32 bits, but we sometimes need to store a
|
||||
64 bits value. Change all number options to use nropt_T and define it to the
|
||||
right type.
|
||||
@@ -142,18 +164,22 @@ right type.
|
||||
string() can't parse back "inf" and "nan". Fix documentation or fix code?
|
||||
(ZyX, 2010 Aug 23)
|
||||
|
||||
Make 'formatprg' global-local. (Sung Pae)
|
||||
|
||||
v:register doesn't work exactly as expected. (David Fishburn, 2011 Sep 20)
|
||||
|
||||
When doing "redir => s:foo" in a script and then "redir END" somewhere else
|
||||
(e.g. in a function) it can't find s:foo.
|
||||
|
||||
When setqflist() uses a filename that triggers a BufReadCmd autocommand Vim
|
||||
doesn't jump to the correct line with :cfirst. (ZyX, 2011 Sep 18)
|
||||
|
||||
7 Make "ga" show the digraph for a character, if it exists.
|
||||
Patch from Christian Brabandt, 2011 Aug 19.
|
||||
|
||||
maparg() does not show the <script> flag. When temporarily changing a
|
||||
mapping, how to restore the script ID?
|
||||
|
||||
Patch to fix \%V item in regexp. (Christian Brabandt, 2010 Nov 8)
|
||||
Update Nov 19. James Vega: still not right. Christian: it's difficult.
|
||||
|
||||
Patch to add up to 99 match groups. (Christian Brabandt, 2010 Dec 22)
|
||||
Also add named groups: \%{name}(re) and \%{name}g
|
||||
|
||||
Bug in try/catch: return with invalid compare throws error that isn't caught.
|
||||
(ZyX, 2011 Jan 26)
|
||||
|
||||
@@ -171,10 +197,6 @@ Build problem with small features on Mac OS X 10.6. (Rainer, 2011 Jan 24)
|
||||
|
||||
"0g@$" puts '] on last byte of multi-byte. (ZyX, 2011 Jan 22)
|
||||
|
||||
Deleting a linewise selection that includes the last line of the file leaves
|
||||
an empty line. (Ben Schmidt, 2011 Mar 17)
|
||||
Patch by Christian Brabandt, 2011 Mar 19.
|
||||
|
||||
Patch to support sorting on floating point number. (Alex Jakushev, 2010 Oct
|
||||
30)
|
||||
|
||||
@@ -194,6 +216,29 @@ With a filler line in diff mode, it isn't displayed in the column with line
|
||||
number, but it is in the sign column. Doesn't look right. (ZyX 2011 Jun 5)
|
||||
Patch by Christian Brabandt, 2011 Jun 5. Introduces new problems.
|
||||
|
||||
8 Add a command to jump to the next character highlighted with "Error".
|
||||
Patch by Christian Brabandt, uses ]e [e ]t and [t. 2011 Aug 9.
|
||||
|
||||
8 Add an event like CursorHold that is triggered repeatedly, not just once
|
||||
after typing something.
|
||||
Need for CursorHold that retriggers. Use a key that doesn't do anything, or a
|
||||
function that resets did_cursorhold.
|
||||
Patch by Christian Brabandt, 2011 May 6.
|
||||
|
||||
7 Use "++--", "+++--" for different levels instead of "+---" "+----".
|
||||
Patch by Christian Brabandt, 2011 Jul 27.
|
||||
Update by Ben Fritz, with fix for TOhtml. (2011 Jul 30)
|
||||
|
||||
9 Add %F to 'errorformat': file name without spaces. Useful on Unix to
|
||||
avoid matching something up to a time 11:22:33.
|
||||
Patch by Christian Brabandt, 2011 Jul 27.
|
||||
|
||||
Patch to fix \%V item in regexp. (Christian Brabandt, 2010 Nov 8)
|
||||
Update Nov 19. James Vega: still not right. Christian: it's difficult.
|
||||
|
||||
Patch to add up to 99 match groups. (Christian Brabandt, 2010 Dec 22)
|
||||
Also add named groups: \%{name}(re) and \%{name}g
|
||||
|
||||
In the sandbox it's not allowed to do many things, but it's possible to change
|
||||
or set variables. Add a way to prevent variables from being changed in the
|
||||
sandbox? E.g.: ":protect g:restore_settings".
|
||||
@@ -223,9 +268,6 @@ New esperanto spell file can't be processed. (Dominique Pelle, 2011 Jan 30)
|
||||
"L'Italie" noted as a spell error at start of the sentence. (Dominique Pelle,
|
||||
2011 Feb 27)
|
||||
|
||||
Patch to fail if configure can't find an interface, such as Python.
|
||||
(Shlomi Fish, 2011 Jul 11)
|
||||
|
||||
Copy/paste between Vim and Google chrome doesn't work well for multi-byte
|
||||
characters. (Ben Haskell, 2010 Sep 17)
|
||||
When putting text in the cut buffer (when exiting) and conversion doesn't work
|
||||
@@ -309,26 +351,20 @@ Echo starts in the wrong column:
|
||||
|
||||
Patch for GVimExt to show an icon. (Dominik Riebeling, 2010 Nov 7)
|
||||
|
||||
GvimExt sets $LANG in the wrong way. Patch by Yasuhiro Matsumoto, 2011 Jun
|
||||
15. This will fix issue no 11.
|
||||
|
||||
When writing a file > 2Gbyte, the reported number of bytes is negative.
|
||||
(Antonio Colombo, 2010 Dec 18)
|
||||
|
||||
Patch: Let rare word highlighting overrule good word highlighting.
|
||||
(Jakson A. Aquino, 2010 Jul 30, again 2011 Jul 2)
|
||||
|
||||
Patch to make more characters work in dialogs. (Yankwei Jia, 2010 Aug 4)
|
||||
|
||||
Patch for VisVim, pass file name to VimOpenFile. (Jiri Sedlak, 2010 Nov 12)
|
||||
|
||||
When 'lines' is 25 and 'scrolloff' is 12, "j" scrolls zero or two lines
|
||||
instead of one. (Constantin Pan, 2010 Sep 10)
|
||||
|
||||
Crash in setqflist(). (Benoit Mortgat, 2010 Nov 18)
|
||||
|
||||
Patch to handle resizing when tab is opened, when at full size. (Yukihiro
|
||||
Nakadaira, 2010 Jan 6)
|
||||
Gui menu edit/paste in block mode insert only inserts in one line (Bjorn
|
||||
Winckler, 2011 May 11)
|
||||
Requires a map mode for Insert mode started from blockwise Visual mode.
|
||||
|
||||
Writing nested List and Dict in viminfo gives error message and can't be read
|
||||
back. (Yukihiro Nakadaira, 2010 Nov 13)
|
||||
@@ -417,6 +453,8 @@ it. Caused by "syntax sync fromstart" in combination with patch 7.2.274.
|
||||
Generally, folding with 'foldmethod' set to "syntax" is slow. Do profiling to
|
||||
find out why.
|
||||
|
||||
Syntax priority problem. (Charles Campbell, 2011 Sep 15)
|
||||
|
||||
When completion inserts the first match, it may trigger the line to be folded.
|
||||
Disable updating folds while completion is active? (Peter Odding, 2010 Jun 9)
|
||||
|
||||
@@ -426,10 +464,6 @@ echo, just not for ":call" and ":call call()". (Ted, 2011 Mar 17)
|
||||
Cannot use getchar() inside :normal and using an expression mapping. Is this
|
||||
supposed to work? (XyX, 2010 Sep 22)
|
||||
|
||||
When using an expression mapping with a multi-byte character each byte is
|
||||
converted to a utf-8 character. (ZyX, 2011 Jan 4)
|
||||
Patch for possible solution. (Yukihiro Nakadaira, 2011 Jan 5)
|
||||
|
||||
When a:base in 'completefunc' starts with a number it's passed as a number,
|
||||
not a string. (Sean Ma) Need to add flag to call_func_retlist() to force a
|
||||
string value.
|
||||
@@ -756,11 +790,6 @@ an alternate solution, also for src/ex_getln.c.
|
||||
This also fails when the file or directory name contains "%". (Thoml, 2008
|
||||
July 7)
|
||||
|
||||
The str2special() function doesn't handle multi-byte characters properly.
|
||||
Patch from Vladimir Vichniakov, 2007 Apr 24.
|
||||
Should clean up the whole function. Also allow modifiers like <S-Char-32>?
|
||||
find_special_key() also has this problem.
|
||||
|
||||
Problem with 'langmap' being used on the rhs of a mapping. (Nikolai Weibull,
|
||||
2008 May 14)
|
||||
|
||||
@@ -836,8 +865,6 @@ try/catch not working for argument of return. (Matt Wozniski, 2008 Sep 15)
|
||||
|
||||
try/catch not working when inside a for loop. (ZyX, 2011 Jan 25)
|
||||
|
||||
Recognize and ignore BOM in error file. (Aleksey Baibarin)
|
||||
|
||||
":tab help" always opens a new tab, while ":help" re-uses an existing window.
|
||||
Would be more consistent when an existing tab is re-used. (Tony Mechelynck)
|
||||
|
||||
@@ -871,9 +898,6 @@ Can't easily close the help window, like ":pc" closes the preview window and
|
||||
":ccl" closes the quickfix window. Add ":hclose". (Chris Gaal)
|
||||
Patch for :helpclose, Christian Brabandt, 2010 Sep 6.
|
||||
|
||||
Patch for :lmake not updating the quickfix window title. (Lech Lorens, 2011
|
||||
Mar 26)
|
||||
|
||||
When 'diffopt' has "context:0" a single deleted line causes two folds to merge
|
||||
and mess up syncing. (Austin Jennings, 2008 Jan 31)
|
||||
|
||||
@@ -934,9 +958,6 @@ popup menu over it, first draw the new popup menu, remember its position and
|
||||
size and then redraw the text, skipping the characters under the popup menu.
|
||||
This should avoid flicker. Other solution by A.Politz, 2007 Aug 22.
|
||||
|
||||
When the popup menu is close to the edge of the window it is truncated. Patch
|
||||
to anchor the popup menu in a different way. (James Vega, 2008 Jul 30)
|
||||
|
||||
Windows 98: pasting from the clipboard with text from another application has
|
||||
a trailing NUL. (Joachim Hofmann) Perhaps the length specified for CF_TEXT
|
||||
isn't right?
|
||||
@@ -1075,9 +1096,6 @@ If the variable "g:x#y#z" exists completion after ":echo g:x#" doesn't work.
|
||||
Feature request: Command to go to previous tab, like what CTRL-W p does for
|
||||
windows. (Adam George)
|
||||
|
||||
When using input() in a loop and then ":echo" the display column isn't right.
|
||||
(Benjamin Fritz, 2008 Aug 28) Patch by Ben Schmidt, 2008 Sep 2.
|
||||
|
||||
F1 - F4 in an xterm produce a different escape sequence when used with a
|
||||
modifier key. Need to catch three different sequences. Use K_ZF1, like
|
||||
K_ZHOME? (Dickey, 2007 Dec 2)
|
||||
@@ -2662,7 +2680,6 @@ Folding:
|
||||
8 Add "z/" and "z?" for searching in not folded text only.
|
||||
9 Add search pattern item to only match in closed or open fold and/or fold
|
||||
with certain level. Allows doing ":g/pat/cmd" to work on closed folds.
|
||||
7 Use "++--", "+++--" for different levels instead of "+---" "+----".
|
||||
8 When a closed fold is displayed open because of 'foldminlines', the
|
||||
behavior of commands is still like the fold is closed. How to make the
|
||||
user aware of this?
|
||||
@@ -2842,7 +2859,6 @@ Syntax highlighting:
|
||||
8 Highlight the text between two matching parens (e.g., with a grey
|
||||
background) when on one of the parens or in between them.
|
||||
Option for the matchparen plugin?
|
||||
8 Add a command to jump to the next character highlighted with "Error".
|
||||
8 When using a cterm, and no ctermfg or ctermbg are defined, use start/stop
|
||||
sequences. Add remark in docs that :if 'term' == "term-name" should be
|
||||
used.
|
||||
@@ -4479,11 +4495,8 @@ Marks:
|
||||
|
||||
|
||||
Digraphs:
|
||||
7 Make "ga" show the digraph for a character, if it exists.
|
||||
Also the keymap?
|
||||
7 Make "ga" show the keymap for a character, if it exists.
|
||||
Also show the code of the character after conversion to 'filenecoding'.
|
||||
- Make it possible to enter "r<C-E>" and "r<C-Y>" (get character from line
|
||||
below/above).
|
||||
- Use digraph table to tell Vim about the collating sequence of special
|
||||
characters?
|
||||
8 Add command to remove one or more (all) digraphs. (Brown)
|
||||
@@ -4601,8 +4614,6 @@ Debug mode:
|
||||
Various improvements:
|
||||
9 Python: be able to define a Python function that can be called directly
|
||||
from Vim script. Requires converting the arguments and return value.
|
||||
8 ":sign unplace * file={filename}" should work. Also: ":sign unplace *
|
||||
buffer={bufnr}". So one can remove all signs for one file/buffer.
|
||||
7 Add plugins for formatting? Should be able to make a choice depending on
|
||||
the language of a file (English/Korean/Japanese/etc.).
|
||||
Setting the 'langformat' option to "chinese" would load the
|
||||
@@ -4620,8 +4631,6 @@ Various improvements:
|
||||
7 Instead of filtering errors with a shell script it should be possible to
|
||||
do this with Vim script. A function that filters the raw text that comes
|
||||
from the 'makeprg'?
|
||||
9 Add %F to 'errorformat': file name without spaces. Useful on Unix to
|
||||
avoid matching something up to a time 11:22:33.
|
||||
- Add %b to 'errorformat': buffer number. (Yegappan Lakshmanan / Suresh
|
||||
Govindachar)
|
||||
7 Add a command that goes back to the position from before jumping to the
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*undo.txt* For Vim version 7.3. Last change: 2010 Dec 19
|
||||
*undo.txt* For Vim version 7.3. Last change: 2011 Aug 02
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -35,8 +35,10 @@ CTRL-R Redo [count] changes which were undone. {Vi: redraw
|
||||
:red[o] Redo one change which was undone. {Vi: no redo}
|
||||
|
||||
*U*
|
||||
U Undo all latest changes on one line. {Vi: while not
|
||||
moved off of it}
|
||||
U Undo all latest changes on one line, the line where
|
||||
the latest change was made. |U| itself also counts as
|
||||
a change, and thus |U| undoes a previous |U|.
|
||||
{Vi: while not moved off of the last modified line}
|
||||
|
||||
The last changes are remembered. You can use the undo and redo commands above
|
||||
to revert the text to how it was before each change. You can also apply the
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*vi_diff.txt* For Vim version 7.3. Last change: 2010 Oct 11
|
||||
*vi_diff.txt* For Vim version 7.3. Last change: 2011 Aug 29
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -88,8 +88,8 @@ Maximum display width Unix and Win32: 1024 characters, otherwise 255
|
||||
characters
|
||||
Maximum lhs of a mapping 50 characters.
|
||||
Number of different highlighting types: over 30000
|
||||
Range of a Number variable: -2147483648 to 2147483647 (more on 64 bit
|
||||
systems)
|
||||
Range of a Number variable: -2147483648 to 2147483647 (might be more on 64
|
||||
bit systems)
|
||||
Maximum length of a line in a tags file: 512 bytes.
|
||||
|
||||
Information for undo and text in registers is kept in memory, thus when making
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*windows.txt* For Vim version 7.3. Last change: 2010 Aug 15
|
||||
*windows.txt* For Vim version 7.3. Last change: 2011 Aug 14
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -246,7 +246,7 @@ window will appear.
|
||||
|
||||
These command modifiers can be combined to make a vertically split window
|
||||
occupy the full height. Example: >
|
||||
:vertical topleft edit tags
|
||||
:vertical topleft split tags
|
||||
Opens a vertically split, full-height window on the "tags" file at the far
|
||||
left of the Vim window.
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" Vim support file to detect file types
|
||||
"
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2011 Jul 17
|
||||
" Last Change: 2011 Sep 07
|
||||
|
||||
" Listen very carefully, I will say this only once
|
||||
if exists("did_load_filetypes")
|
||||
@@ -922,7 +922,7 @@ au BufNewFile,BufRead *.java,*.jav setf java
|
||||
au BufNewFile,BufRead *.jj,*.jjt setf javacc
|
||||
|
||||
" JavaScript, ECMAScript
|
||||
au BufNewFile,BufRead *.js,*.javascript,*.es,*.jsx setf javascript
|
||||
au BufNewFile,BufRead *.js,*.javascript,*.es,*.jsx,*.json setf javascript
|
||||
|
||||
" Java Server Pages
|
||||
au BufNewFile,BufRead *.jsp setf jsp
|
||||
@@ -2345,6 +2345,9 @@ endfunc
|
||||
" Yaml
|
||||
au BufNewFile,BufRead *.yaml,*.yml setf yaml
|
||||
|
||||
" yum conf (close enough to dosini)
|
||||
au BufNewFile,BufRead */etc/yum.conf setf dosini
|
||||
|
||||
" Zope
|
||||
" dtml (zope dynamic template markup language), pt (zope page template),
|
||||
" cpt (zope form controller page template)
|
||||
@@ -2515,6 +2518,9 @@ au BufNewFile,BufRead *xmodmap* call s:StarSetf('xmodmap')
|
||||
" Xinetd conf
|
||||
au BufNewFile,BufRead */etc/xinetd.d/* call s:StarSetf('xinetd')
|
||||
|
||||
" yum conf (close enough to dosini)
|
||||
au BufNewFile,BufRead */etc/yum.repos.d/* call s:StarSetf('dosini')
|
||||
|
||||
" Z-Shell script
|
||||
au BufNewFile,BufRead zsh*,zlog* call s:StarSetf('zsh')
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: C
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2007 Sep 25
|
||||
" Last Change: 2011 Aug 04
|
||||
|
||||
" Only do this when not done yet for this buffer
|
||||
if exists("b:did_ftplugin")
|
||||
@@ -36,7 +36,7 @@ endif
|
||||
|
||||
" When the matchit plugin is loaded, this makes the % command skip parens and
|
||||
" braces in comments.
|
||||
let b:match_words = &matchpairs
|
||||
let b:match_words = &matchpairs . ',^\s*#\s*if\(\|def\|ndef\)\>:^\s*#\s*elif\>:^\s*#\s*else\>:^\s*#\s*endif\>'
|
||||
let b:match_skip = 's:comment\|string\|character'
|
||||
|
||||
" Win32 can filter files in the browse dialog
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: man
|
||||
" Maintainer: SungHyun Nam <goweol@gmail.com>
|
||||
" Last Change: 2010 Nov 29
|
||||
" Last Change: 2011 Jul 25
|
||||
|
||||
" To make the ":Man" command available before editing a manual page, source
|
||||
" this script from your startup vimrc file.
|
||||
@@ -17,7 +17,9 @@ if &filetype == "man"
|
||||
|
||||
" Ensure Vim is not recursively invoked (man-db does this)
|
||||
" when doing ctrl-[ on a man page reference.
|
||||
let $MANPAGER = ""
|
||||
if exists("$MANPAGER")
|
||||
let $MANPAGER = ""
|
||||
endif
|
||||
|
||||
" allow dot and dash in manual page name.
|
||||
setlocal iskeyword+=\.,-
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
" 26-04-2002 Got initial version working reasonably well
|
||||
" 29-04-2002 Fixed problems in function headers and max line width
|
||||
" Added support for two-line if's without curly braces
|
||||
" Fixed hang: 2011 Aug 31
|
||||
|
||||
" Only load this indent file when no other was loaded.
|
||||
if exists("b:did_indent")
|
||||
@@ -118,7 +119,7 @@ function! GetAwkIndent()
|
||||
|
||||
" Case 1
|
||||
if prev_data =~ ')' && brace_balance < 0
|
||||
while brace_balance != 0
|
||||
while brace_balance != 0 && prev_lineno > 0
|
||||
let prev_lineno = s:Get_prev_line( prev_lineno )
|
||||
let prev_data = getline( prev_lineno )
|
||||
let brace_balance=brace_balance+s:Get_brace_balance(prev_data,'(',')' )
|
||||
@@ -188,6 +189,9 @@ endfunction
|
||||
|
||||
function! s:Seems_continuing( line )
|
||||
" Unfinished lines
|
||||
if a:line =~ '\(--\|++\)\s*$'
|
||||
return 0
|
||||
endif
|
||||
if a:line =~ '[\\,\|\&\+\-\*\%\^]\s*$'
|
||||
return 1
|
||||
endif
|
||||
|
||||
482
runtime/indent/r.vim
Normal file
482
runtime/indent/r.vim
Normal file
@@ -0,0 +1,482 @@
|
||||
" Vim indent file
|
||||
" Language: R
|
||||
" Author: Jakson Alves de Aquino <jalvesaq@gmail.com>
|
||||
" Last Change: Wed Aug 31, 2011 12:24AM
|
||||
|
||||
|
||||
" Only load this indent file when no other was loaded.
|
||||
if exists("b:did_r_indent")
|
||||
finish
|
||||
endif
|
||||
let b:did_r_indent = 1
|
||||
|
||||
setlocal indentkeys=0{,0},:,!^F,o,O,e
|
||||
setlocal indentexpr=GetRIndent()
|
||||
|
||||
" Only define the function once.
|
||||
if exists("*GetRIndent")
|
||||
finish
|
||||
endif
|
||||
|
||||
" Options to make the indentation more similar to Emacs/ESS:
|
||||
if !exists("g:r_indent_align_args")
|
||||
let g:r_indent_align_args = 1
|
||||
endif
|
||||
if !exists("g:r_indent_ess_comments")
|
||||
let g:r_indent_ess_comments = 0
|
||||
endif
|
||||
if !exists("g:r_indent_comment_column")
|
||||
let g:r_indent_comment_column = 40
|
||||
endif
|
||||
if ! exists("g:r_indent_ess_compatible")
|
||||
let g:r_indent_ess_compatible = 0
|
||||
endif
|
||||
|
||||
function s:RDelete_quotes(line)
|
||||
let i = 0
|
||||
let j = 0
|
||||
let line1 = ""
|
||||
let llen = strlen(a:line)
|
||||
while i < llen
|
||||
if a:line[i] == '"'
|
||||
let i += 1
|
||||
let line1 = line1 . 's'
|
||||
while !(a:line[i] == '"' && ((i > 1 && a:line[i-1] == '\' && a:line[i-2] == '\') || a:line[i-1] != '\')) && i < llen
|
||||
let i += 1
|
||||
endwhile
|
||||
if a:line[i] == '"'
|
||||
let i += 1
|
||||
endif
|
||||
else
|
||||
if a:line[i] == "'"
|
||||
let i += 1
|
||||
let line1 = line1 . 's'
|
||||
while !(a:line[i] == "'" && ((i > 1 && a:line[i-1] == '\' && a:line[i-2] == '\') || a:line[i-1] != '\')) && i < llen
|
||||
let i += 1
|
||||
endwhile
|
||||
if a:line[i] == "'"
|
||||
let i += 1
|
||||
endif
|
||||
else
|
||||
if a:line[i] == "`"
|
||||
let i += 1
|
||||
let line1 = line1 . 's'
|
||||
while a:line[i] != "`" && i < llen
|
||||
let i += 1
|
||||
endwhile
|
||||
if a:line[i] == "`"
|
||||
let i += 1
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
if i == llen
|
||||
break
|
||||
endif
|
||||
let line1 = line1 . a:line[i]
|
||||
let j += 1
|
||||
let i += 1
|
||||
endwhile
|
||||
return line1
|
||||
endfunction
|
||||
|
||||
" Convert foo(bar()) int foo()
|
||||
function s:RDelete_parens(line)
|
||||
if s:Get_paren_balance(a:line, "(", ")") != 0
|
||||
return a:line
|
||||
endif
|
||||
let i = 0
|
||||
let j = 0
|
||||
let line1 = ""
|
||||
let llen = strlen(a:line)
|
||||
while i < llen
|
||||
let line1 = line1 . a:line[i]
|
||||
if a:line[i] == '('
|
||||
let nop = 1
|
||||
while nop > 0 && i < llen
|
||||
let i += 1
|
||||
if a:line[i] == ')'
|
||||
let nop -= 1
|
||||
else
|
||||
if a:line[i] == '('
|
||||
let nop += 1
|
||||
endif
|
||||
endif
|
||||
endwhile
|
||||
let line1 = line1 . a:line[i]
|
||||
endif
|
||||
let i += 1
|
||||
endwhile
|
||||
return line1
|
||||
endfunction
|
||||
|
||||
function! s:Get_paren_balance(line, o, c)
|
||||
let line2 = substitute(a:line, a:o, "", "g")
|
||||
let openp = strlen(a:line) - strlen(line2)
|
||||
let line3 = substitute(line2, a:c, "", "g")
|
||||
let closep = strlen(line2) - strlen(line3)
|
||||
return openp - closep
|
||||
endfunction
|
||||
|
||||
function! s:Get_matching_brace(linenr, o, c, delbrace)
|
||||
let line = SanitizeRLine(getline(a:linenr))
|
||||
if a:delbrace == 1
|
||||
let line = substitute(line, '{$', "", "")
|
||||
endif
|
||||
let pb = s:Get_paren_balance(line, a:o, a:c)
|
||||
let i = a:linenr
|
||||
while pb != 0 && i > 1
|
||||
let i -= 1
|
||||
let pb += s:Get_paren_balance(SanitizeRLine(getline(i)), a:o, a:c)
|
||||
endwhile
|
||||
return i
|
||||
endfunction
|
||||
|
||||
" This function is buggy because there 'if's without 'else'
|
||||
" It must be rewritten relying more on indentation
|
||||
function! s:Get_matching_if(linenr, delif)
|
||||
" let filenm = expand("%")
|
||||
" call writefile([filenm], "/tmp/matching_if_" . a:linenr)
|
||||
let line = SanitizeRLine(getline(a:linenr))
|
||||
if a:delif
|
||||
let line = substitute(line, "if", "", "g")
|
||||
endif
|
||||
let elsenr = 0
|
||||
let i = a:linenr
|
||||
let ifhere = 0
|
||||
while i > 0
|
||||
let line2 = substitute(line, '\<else\>', "xxx", "g")
|
||||
let elsenr += strlen(line) - strlen(line2)
|
||||
if line =~ '.*\s*if\s*()' || line =~ '.*\s*if\s*()'
|
||||
let elsenr -= 1
|
||||
if elsenr == 0
|
||||
let ifhere = i
|
||||
break
|
||||
endif
|
||||
endif
|
||||
let i -= 1
|
||||
let line = SanitizeRLine(getline(i))
|
||||
endwhile
|
||||
if ifhere
|
||||
return ifhere
|
||||
else
|
||||
return a:linenr
|
||||
endif
|
||||
endfunction
|
||||
|
||||
function! s:Get_last_paren_idx(line, o, c, pb)
|
||||
let blc = a:pb
|
||||
let line = substitute(a:line, '\t', s:curtabstop, "g")
|
||||
let theidx = -1
|
||||
let llen = strlen(line)
|
||||
let idx = 0
|
||||
while idx < llen
|
||||
if line[idx] == a:o
|
||||
let blc -= 1
|
||||
if blc == 0
|
||||
let theidx = idx
|
||||
endif
|
||||
else
|
||||
if line[idx] == a:c
|
||||
let blc += 1
|
||||
endif
|
||||
endif
|
||||
let idx += 1
|
||||
endwhile
|
||||
return theidx + 1
|
||||
endfunction
|
||||
|
||||
" Get previous relevant line. Search back until getting a line that isn't
|
||||
" comment or blank
|
||||
function s:Get_prev_line(lineno)
|
||||
let lnum = a:lineno - 1
|
||||
let data = getline( lnum )
|
||||
while lnum > 0 && (data =~ '^\s*#' || data =~ '^\s*$')
|
||||
let lnum = lnum - 1
|
||||
let data = getline( lnum )
|
||||
endwhile
|
||||
return lnum
|
||||
endfunction
|
||||
|
||||
" This function is also used by r-plugin/common_global.vim
|
||||
" Delete from '#' to the end of the line, unless the '#' is inside a string.
|
||||
function SanitizeRLine(line)
|
||||
let newline = s:RDelete_quotes(a:line)
|
||||
let newline = s:RDelete_parens(newline)
|
||||
let newline = substitute(newline, '#.*', "", "")
|
||||
let newline = substitute(newline, '\s*$', "", "")
|
||||
return newline
|
||||
endfunction
|
||||
|
||||
function GetRIndent()
|
||||
|
||||
let clnum = line(".") " current line
|
||||
|
||||
let cline = getline(clnum)
|
||||
if cline =~ '^\s*#'
|
||||
if g:r_indent_ess_comments == 1
|
||||
if cline =~ '^\s*###'
|
||||
return 0
|
||||
endif
|
||||
if cline !~ '^\s*##'
|
||||
return g:r_indent_comment_column
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
let cline = SanitizeRLine(cline)
|
||||
|
||||
if cline =~ '^\s*}' || cline =~ '^\s*}\s*)$'
|
||||
let indline = s:Get_matching_brace(clnum, '{', '}', 1)
|
||||
if indline > 0 && indline != clnum
|
||||
let iline = SanitizeRLine(getline(indline))
|
||||
if s:Get_paren_balance(iline, "(", ")") == 0 || iline =~ '(\s*{$'
|
||||
return indent(indline)
|
||||
else
|
||||
let indline = s:Get_matching_brace(indline, '(', ')', 1)
|
||||
return indent(indline)
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
" Find the first non blank line above the current line
|
||||
let lnum = s:Get_prev_line(clnum)
|
||||
" Hit the start of the file, use zero indent.
|
||||
if lnum == 0
|
||||
return 0
|
||||
endif
|
||||
|
||||
let line = SanitizeRLine(getline(lnum))
|
||||
|
||||
if &filetype == "rhelp"
|
||||
if cline =~ '^\\dontshow{' || cline =~ '^\\dontrun{' || cline =~ '^\\donttest{' || cline =~ '^\\testonly{'
|
||||
return 0
|
||||
endif
|
||||
if line =~ '^\\examples{' || line =~ '^\\usage{' || line =~ '^\\dontshow{' || line =~ '^\\dontrun{' || line =~ '^\\donttest{' || line =~ '^\\testonly{'
|
||||
return 0
|
||||
endif
|
||||
if line =~ '^\\method{.*}{.*}(.*'
|
||||
let line = substitute(line, '^\\method{\(.*\)}{.*}', '\1', "")
|
||||
endif
|
||||
endif
|
||||
|
||||
if cline =~ '^\s*{'
|
||||
if g:r_indent_ess_compatible && line =~ ')$'
|
||||
let nlnum = lnum
|
||||
let nline = line
|
||||
while s:Get_paren_balance(nline, '(', ')') < 0
|
||||
let nlnum = s:Get_prev_line(nlnum)
|
||||
let nline = SanitizeRLine(getline(nlnum)) . nline
|
||||
endwhile
|
||||
if nline =~ '^\s*function\s*(' && indent(nlnum) == &sw
|
||||
return 0
|
||||
endif
|
||||
endif
|
||||
if s:Get_paren_balance(line, "(", ")") == 0
|
||||
return indent(lnum)
|
||||
endif
|
||||
endif
|
||||
|
||||
" line is an incomplete command:
|
||||
if line =~ '\<\(if\|while\|for\|function\)\s*()$' || line =~ '\<else$' || line =~ '<-$'
|
||||
return indent(lnum) + &sw
|
||||
endif
|
||||
|
||||
" Deal with () and []
|
||||
|
||||
let pb = s:Get_paren_balance(line, '(', ')')
|
||||
|
||||
if line =~ '^\s*{$' || line =~ '(\s*{' || (pb == 0 && (line =~ '{$' || line =~ '(\s*{$'))
|
||||
return indent(lnum) + &sw
|
||||
endif
|
||||
|
||||
let bb = s:Get_paren_balance(line, '[', ']')
|
||||
|
||||
let s:curtabstop = repeat(' ', &tabstop)
|
||||
if g:r_indent_align_args == 1
|
||||
|
||||
if pb == 0 && bb == 0 && (line =~ '.*[,&|\-\*+<>]$' || cline =~ '^\s*[,&|\-\*+<>]')
|
||||
return indent(lnum)
|
||||
endif
|
||||
|
||||
if pb > 0
|
||||
if &filetype == "rhelp"
|
||||
let ind = s:Get_last_paren_idx(line, '(', ')', pb)
|
||||
else
|
||||
let ind = s:Get_last_paren_idx(getline(lnum), '(', ')', pb)
|
||||
endif
|
||||
return ind
|
||||
endif
|
||||
|
||||
if pb < 0 && line =~ '.*[,&|\-\*+<>]$'
|
||||
let lnum = s:Get_prev_line(lnum)
|
||||
while pb < 1 && lnum > 0
|
||||
let line = SanitizeRLine(getline(lnum))
|
||||
let line = substitute(line, '\t', s:curtabstop, "g")
|
||||
let ind = strlen(line)
|
||||
while ind > 0
|
||||
if line[ind] == ')'
|
||||
let pb -= 1
|
||||
else
|
||||
if line[ind] == '('
|
||||
let pb += 1
|
||||
endif
|
||||
endif
|
||||
if pb == 1
|
||||
return ind + 1
|
||||
endif
|
||||
let ind -= 1
|
||||
endwhile
|
||||
let lnum -= 1
|
||||
endwhile
|
||||
return 0
|
||||
endif
|
||||
|
||||
if bb > 0
|
||||
let ind = s:Get_last_paren_idx(getline(lnum), '[', ']', bb)
|
||||
return ind
|
||||
endif
|
||||
endif
|
||||
|
||||
let post_block = 0
|
||||
if line =~ '}$'
|
||||
let lnum = s:Get_matching_brace(lnum, '{', '}', 0)
|
||||
let line = SanitizeRLine(getline(lnum))
|
||||
if lnum > 0 && line =~ '^\s*{'
|
||||
let lnum = s:Get_prev_line(lnum)
|
||||
let line = SanitizeRLine(getline(lnum))
|
||||
endif
|
||||
let pb = s:Get_paren_balance(line, '(', ')')
|
||||
let post_block = 1
|
||||
endif
|
||||
|
||||
let post_fun = 0
|
||||
if pb < 0 && line !~ ')\s*[,&|\-\*+<>]$'
|
||||
let post_fun = 1
|
||||
while pb < 0 && lnum > 0
|
||||
let lnum -= 1
|
||||
let linepiece = SanitizeRLine(getline(lnum))
|
||||
let pb += s:Get_paren_balance(linepiece, "(", ")")
|
||||
let line = linepiece . line
|
||||
endwhile
|
||||
if line =~ '{$' && post_block == 0
|
||||
return indent(lnum) + &sw
|
||||
endif
|
||||
|
||||
" Now we can do some tests again
|
||||
if cline =~ '^\s*{'
|
||||
return indent(lnum)
|
||||
endif
|
||||
if post_block == 0
|
||||
let newl = SanitizeRLine(line)
|
||||
if newl =~ '\<\(if\|while\|for\|function\)\s*()$' || newl =~ '\<else$' || newl =~ '<-$'
|
||||
return indent(lnum) + &sw
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
if cline =~ '^\s*else'
|
||||
if line =~ '<-\s*if\s*()'
|
||||
return indent(lnum) + &sw
|
||||
else
|
||||
if line =~ '\<if\s*()'
|
||||
return indent(lnum)
|
||||
else
|
||||
return indent(lnum) - &sw
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
if bb < 0 && line =~ '.*]'
|
||||
while bb < 0 && lnum > 0
|
||||
let lnum -= 1
|
||||
let linepiece = SanitizeRLine(getline(lnum))
|
||||
let bb += s:Get_paren_balance(linepiece, "[", "]")
|
||||
let line = linepiece . line
|
||||
endwhile
|
||||
let line = s:RDelete_parens(line)
|
||||
endif
|
||||
|
||||
let plnum = s:Get_prev_line(lnum)
|
||||
let ppost_else = 0
|
||||
if plnum > 0
|
||||
let pline = SanitizeRLine(getline(plnum))
|
||||
let ppost_block = 0
|
||||
if pline =~ '}$'
|
||||
let ppost_block = 1
|
||||
let plnum = s:Get_matching_brace(plnum, '{', '}', 0)
|
||||
let pline = SanitizeRLine(getline(plnum))
|
||||
if pline =~ '^\s*{$' && plnum > 0
|
||||
let plnum = s:Get_prev_line(plnum)
|
||||
let pline = SanitizeRLine(getline(plnum))
|
||||
endif
|
||||
endif
|
||||
|
||||
if pline =~ 'else$'
|
||||
let ppost_else = 1
|
||||
let plnum = s:Get_matching_if(plnum, 0)
|
||||
let pline = SanitizeRLine(getline(plnum))
|
||||
endif
|
||||
|
||||
if pline =~ '^\s*else\s*if\s*('
|
||||
let pplnum = s:Get_prev_line(plnum)
|
||||
let ppline = SanitizeRLine(getline(pplnum))
|
||||
while ppline =~ '^\s*else\s*if\s*(' || ppline =~ '^\s*if\s*()\s*\S$'
|
||||
let plnum = pplnum
|
||||
let pline = ppline
|
||||
let pplnum = s:Get_prev_line(plnum)
|
||||
let ppline = SanitizeRLine(getline(pplnum))
|
||||
endwhile
|
||||
while ppline =~ '\<\(if\|while\|for\|function\)\s*()$' || ppline =~ '\<else$' || ppline =~ '<-$'
|
||||
let plnum = pplnum
|
||||
let pline = ppline
|
||||
let pplnum = s:Get_prev_line(plnum)
|
||||
let ppline = SanitizeRLine(getline(pplnum))
|
||||
endwhile
|
||||
endif
|
||||
|
||||
let ppb = s:Get_paren_balance(pline, '(', ')')
|
||||
if ppb < 0 && (pline =~ ')\s*{$' || pline =~ ')$')
|
||||
while ppb < 0 && plnum > 0
|
||||
let plnum -= 1
|
||||
let linepiece = SanitizeRLine(getline(plnum))
|
||||
let ppb += s:Get_paren_balance(linepiece, "(", ")")
|
||||
let pline = linepiece . pline
|
||||
endwhile
|
||||
let pline = s:RDelete_parens(pline)
|
||||
endif
|
||||
endif
|
||||
|
||||
let ind = indent(lnum)
|
||||
let pind = indent(plnum)
|
||||
|
||||
if g:r_indent_align_args == 0 && pb != 0
|
||||
let ind += pb * &sw
|
||||
return ind
|
||||
endif
|
||||
|
||||
if ind == pind || (ind == (pind + &sw) && pline =~ '{$' && ppost_else == 0)
|
||||
return ind
|
||||
endif
|
||||
|
||||
while pind < ind && plnum > 0 && ppb == 0
|
||||
let ind = pind
|
||||
let plnum = s:Get_prev_line(plnum)
|
||||
let pline = getline(plnum)
|
||||
let ppb = s:Get_paren_balance(pline, '(', ')')
|
||||
while pline =~ '^\s*else'
|
||||
let plnum = s:Get_matching_if(plnum, 1)
|
||||
let pline = getline(plnum)
|
||||
let ppb = s:Get_paren_balance(pline, '(', ')')
|
||||
endwhile
|
||||
let pind = indent(plnum)
|
||||
if ind == (pind + &sw) && pline =~ '{$'
|
||||
return ind
|
||||
endif
|
||||
endwhile
|
||||
|
||||
return ind
|
||||
|
||||
endfunction
|
||||
|
||||
" vim: sw=4
|
||||
@@ -1,7 +1,7 @@
|
||||
" Vim indent file
|
||||
" Language: reStructuredText Documentation Format
|
||||
" Maintainer: Nikolai Weibull <now@bitwi.se>
|
||||
" Latest Revision: 2006-12-20
|
||||
" Latest Revision: 2011-08-03
|
||||
|
||||
if exists("b:did_indent")
|
||||
finish
|
||||
@@ -16,6 +16,9 @@ if exists("*GetRSTIndent")
|
||||
finish
|
||||
endif
|
||||
|
||||
let s:itemization_pattern = '^\s*[-*+]\s'
|
||||
let s:enumeration_pattern = '^\s*\%(\d\+\|#\)\.\s\+'
|
||||
|
||||
function GetRSTIndent()
|
||||
let lnum = prevnonblank(v:lnum - 1)
|
||||
if lnum == 0
|
||||
@@ -25,27 +28,30 @@ function GetRSTIndent()
|
||||
let ind = indent(lnum)
|
||||
let line = getline(lnum)
|
||||
|
||||
if line =~ '^\s*[-*+]\s'
|
||||
let ind = ind + 2
|
||||
elseif line =~ '^\s*\d\+.\s'
|
||||
let ind = ind + matchend(substitute(line, '^\s*', '', ''), '\d\+.\s\+')
|
||||
if line =~ s:itemization_pattern
|
||||
let ind += 2
|
||||
elseif line =~ s:enumeration_pattern
|
||||
let ind += matchend(line, s:enumeration_pattern)
|
||||
endif
|
||||
|
||||
let line = getline(v:lnum - 1)
|
||||
|
||||
" Indent :FIELD: lines. Don’t match if there is no text after the field or
|
||||
" if the text ends with a sent-ender.
|
||||
if line =~ '^:.\+:\s\{-1,\}\S.\+[^.!?:]$'
|
||||
return matchend(line, '^:.\{-1,}:\s\+')
|
||||
endif
|
||||
|
||||
if line =~ '^\s*$'
|
||||
execute lnum
|
||||
call search('^\s*\%([-*+]\s\|\d\+.\s\|\.\.\|$\)', 'bW')
|
||||
call search('^\s*\%([-*+]\s\|\%(\d\+\|#\)\.\s\|\.\.\|$\)', 'bW')
|
||||
let line = getline('.')
|
||||
if line =~ '^\s*[-*+]'
|
||||
let ind = ind - 2
|
||||
elseif line =~ '^\s*\d\+\.\s'
|
||||
let ind = ind - matchend(substitute(line, '^\s*', '', ''),
|
||||
\ '\d\+\.\s\+')
|
||||
if line =~ s:itemization_pattern
|
||||
let ind -= 2
|
||||
elseif line =~ s:enumeration_pattern
|
||||
let ind -= matchend(line, s:enumeration_pattern)
|
||||
elseif line =~ '^\s*\.\.'
|
||||
let ind = ind - 3
|
||||
else
|
||||
let ind = ind
|
||||
let ind -= 3
|
||||
endif
|
||||
endif
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
" Vim plugin for showing matching parens
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2010 Nov 16
|
||||
" Last Change: 2011 Aug 27
|
||||
|
||||
" Exit quickly when:
|
||||
" - this plugin was already loaded (or disabled)
|
||||
@@ -82,7 +82,7 @@ function! s:Highlight_Matching_Pair()
|
||||
endif
|
||||
|
||||
" When not in a string or comment ignore matches inside them.
|
||||
" We match "escape" for special items, such as listpEscapeSpecial.
|
||||
" We match "escape" for special items, such as lispEscapeSpecial.
|
||||
let s_skip ='synIDattr(synID(line("."), col("."), 0), "name") ' .
|
||||
\ '=~? "string\\|character\\|singlequote\\|escape\\|comment"'
|
||||
execute 'if' s_skip '| let s_skip = 0 | endif'
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" Vim syntax file
|
||||
" Language: C
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2011 May 2
|
||||
" Last Change: 2011 Sep 07
|
||||
|
||||
" Quit when a (custom) syntax file was already loaded
|
||||
if exists("b:current_syntax")
|
||||
@@ -273,18 +273,18 @@ endif
|
||||
|
||||
" Accept %: for # (C99)
|
||||
syn region cPreCondit start="^\s*\(%:\|#\)\s*\(if\|ifdef\|ifndef\|elif\)\>" skip="\\$" end="$" keepend contains=cComment,cCommentL,cCppString,cCharacter,cCppParen,cParenError,cNumbers,cCommentError,cSpaceError
|
||||
syn match cPreConditMatch display "^\s*\(%:\|#\)\s*\(else\|endif\|elif\)\>"
|
||||
syn match cPreConditMatch display "^\s*\(%:\|#\)\s*\(else\|endif\)\>"
|
||||
if !exists("c_no_if0")
|
||||
syn cluster cCppOutInGroup contains=cCppInIf,cCppInElse,cCppInElse2,cCppOutIf,cCppOutIf2,cCppOutElse,cCppInSkip,cCppOutSkip
|
||||
syn region cCppOutWrapper start="^\s*\(%:\|#\)\s*if\s\+0\+\s*\($\|//\|/\*\|&\)" end=".\@=\|$" contains=cCppOutIf,cCppOutElse
|
||||
syn region cCppOutWrapper start="^\s*\(%:\|#\)\s*if\s\+0\+\s*\($\|//\|/\*\|&\)" end=".\@=\|$" contains=cCppOutIf,cCppOutElse fold
|
||||
syn region cCppOutIf contained start="0\+" matchgroup=cCppOutWrapper end="^\s*\(%:\|#\)\s*endif\>" contains=cCppOutIf2,cCppOutElse
|
||||
if !exists("c_no_if0_fold")
|
||||
syn region cCppOutIf2 contained matchgroup=cCppOutWrapper start="0\+" end="^\s*\(%:\|#\)\s*\(else\>\|elif\s\+\(0\+\s*\($\|//\|/\*\|&\)\)\@!\|endif\>\)"me=s-1 contains=cSpaceError,cCppOutSkip
|
||||
else
|
||||
syn region cCppOutIf2 contained matchgroup=cCppOutWrapper start="0\+" end="^\s*\(%:\|#\)\s*\(else\>\|elif\s\+\(0\+\s*\($\|//\|/\*\|&\)\)\@!\|endif\>\)"me=s-1 contains=cSpaceError,cCppOutSkip fold
|
||||
else
|
||||
syn region cCppOutIf2 contained matchgroup=cCppOutWrapper start="0\+" end="^\s*\(%:\|#\)\s*\(else\>\|elif\s\+\(0\+\s*\($\|//\|/\*\|&\)\)\@!\|endif\>\)"me=s-1 contains=cSpaceError,cCppOutSkip
|
||||
endif
|
||||
syn region cCppOutElse contained matchgroup=cCppOutWrapper start="^\s*\(%:\|#\)\s*\(else\|elif\)" end="^\s*\(%:\|#\)\s*endif\>"me=s-1 contains=TOP,cPreCondit
|
||||
syn region cCppInWrapper start="^\s*\(%:\|#\)\s*if\s\+0*[1-9]\d*\s*\($\|//\|/\*\||\)" end=".\@=\|$" contains=cCppInIf,cCppInElse
|
||||
syn region cCppInWrapper start="^\s*\(%:\|#\)\s*if\s\+0*[1-9]\d*\s*\($\|//\|/\*\||\)" end=".\@=\|$" contains=cCppInIf,cCppInElse fold
|
||||
syn region cCppInIf contained matchgroup=cCppInWrapper start="\d\+" end="^\s*\(%:\|#\)\s*endif\>" contains=TOP,cPreCondit
|
||||
if !exists("c_no_if0_fold")
|
||||
syn region cCppInElse contained start="^\s*\(%:\|#\)\s*\(else\>\|elif\s\+\(0*[1-9]\d*\s*\($\|//\|/\*\||\)\)\@!\)" end=".\@=\|$" containedin=cCppInIf contains=cCppInElse2 fold
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
" Maintainer: Debian Vim Maintainers <pkg-vim-maintainers@lists.alioth.debian.org>
|
||||
" Former Maintainers: Gerfried Fuchs <alfie@ist.org>
|
||||
" Wichert Akkerman <wakkerma@debian.org>
|
||||
" Last Change: 2011 June 01
|
||||
" Last Change: 2011 Sep 17
|
||||
" URL: http://anonscm.debian.org/hg/pkg-vim/vim/raw-file/unstable/runtime/syntax/debcontrol.vim
|
||||
|
||||
" Standard syntax initialization
|
||||
@@ -24,7 +24,7 @@ syn match debControlComma ", *"
|
||||
syn match debControlSpace " "
|
||||
|
||||
" Define some common expressions we can use later on
|
||||
syn match debcontrolArchitecture contained "\%(all\|any\|linux-any\|\%(any-\)\=\%(alpha\|amd64\|arm\%(e[bl]\)\=\|avr32\|hppa\|i386\|ia64\|lpia\|m32r\|m68k\|mips\%(el\)\=\|powerpc\|ppc64\|s390x\=\|sh[34]\(eb\)\=\|sh\|sparc\%(64\)\=\)\|hurd-\%(i386\|any\)\|kfreebsd-\%(i386\|amd64\|any\)\|knetbsd-\%(i386\|any\)\|kopensolaris-\%(i386\|any\)\|netbsd-\%(alpha\|i386\|any\)\)"
|
||||
syn match debcontrolArchitecture contained "\%(all\|linux-any\|\%(any-\)\=\%(alpha\|amd64\|arm\%(e[bl]\|hf\)\=\|avr32\|hppa\|i386\|ia64\|lpia\|m32r\|m68k\|mips\%(el\)\=\|powerpc\|ppc64\|s390x\=\|sh[34]\(eb\)\=\|sh\|sparc\%(64\)\=\)\|hurd-\%(i386\|any\)\|kfreebsd-\%(i386\|amd64\|any\)\|knetbsd-\%(i386\|any\)\|kopensolaris-\%(i386\|any\)\|netbsd-\%(alpha\|i386\|any\)\|any\)"
|
||||
syn match debcontrolMultiArch contained "\%(no\|foreign\|allowed\|same\)"
|
||||
syn match debcontrolName contained "[a-z0-9][a-z0-9+.-]\+"
|
||||
syn match debcontrolPriority contained "\(extra\|important\|optional\|required\|standard\)"
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
" Vim syntax file
|
||||
" Language: Configuration File (ini file) for MSDOS/MS Windows
|
||||
" Version Info: @(#)dosini.vim 1.6 97/12/15 08:54:12
|
||||
" Author: Sean M. McKee <mckee@misslink.net>
|
||||
" Maintainer: Nima Talebi <nima@it.net.au>
|
||||
" Updated By: Hong Xu
|
||||
" Last Change: 2011 Jul 16
|
||||
" Language: Configuration File (ini file) for MSDOS/MS Windows
|
||||
" Version: 2.0
|
||||
" Original Author: Sean M. McKee <mckee@misslink.net>
|
||||
" Previous Maintainer: Nima Talebi <nima@it.net.au>
|
||||
" Current Maintainer: Hong Xu <xuhdev@gmail.com>
|
||||
" Last Change: 2011 Jul 21
|
||||
|
||||
|
||||
" For version 5.x: Clear all syntax items
|
||||
@@ -18,9 +18,13 @@ endif
|
||||
" shut case off
|
||||
syn case ignore
|
||||
|
||||
syn match dosiniLabel "^.\{-}="
|
||||
syn region dosiniHeader start="^\[" end="\]"
|
||||
syn match dosiniComment "^[#;].*$"
|
||||
syn match dosiniBool "\<\(yes\|no\|y\|n\|true\|false\)\>"
|
||||
syn match dosiniNumber "\<\d\+\>"
|
||||
syn match dosiniNumber "\<\d*\.\d\+\>"
|
||||
syn match dosiniNumber "\<\d\+e[+-]\=\d\+\>"
|
||||
syn match dosiniLabel "^.\{-}="
|
||||
syn region dosiniHeader start="^\s*\[" end="\]"
|
||||
syn match dosiniComment "^[#;].*$"
|
||||
|
||||
" Define the default highlighting.
|
||||
" For version 5.7 and earlier: only when not done already
|
||||
@@ -33,13 +37,15 @@ if version >= 508 || !exists("did_dosini_syntax_inits")
|
||||
command -nargs=+ HiLink hi def link <args>
|
||||
endif
|
||||
|
||||
HiLink dosiniHeader Special
|
||||
HiLink dosiniComment Comment
|
||||
HiLink dosiniLabel Type
|
||||
HiLink dosiniBool Boolean
|
||||
HiLink dosiniNumber Number
|
||||
HiLink dosiniHeader Special
|
||||
HiLink dosiniComment Comment
|
||||
HiLink dosiniLabel Type
|
||||
|
||||
delcommand HiLink
|
||||
endif
|
||||
|
||||
let b:current_syntax = "dosini"
|
||||
|
||||
" vim:ts=8
|
||||
" vim: sts=2 sw=2 et
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" Vim syntax file
|
||||
" Language: pam(8) configuration file
|
||||
" Maintainer: Nikolai Weibull <now@bitwi.se>
|
||||
" Latest Revision: 2006-04-19
|
||||
" Latest Revision: 2011-08-03
|
||||
|
||||
|
||||
if exists("b:current_syntax")
|
||||
@@ -33,7 +33,7 @@ syn match pamconfTypeLineCont contained '\\$'
|
||||
\ pamconfTypeLineCont skipwhite skipnl
|
||||
|
||||
syn keyword pamconfControl contained requisite required sufficient
|
||||
\ optional
|
||||
\ optional include substack
|
||||
\ nextgroup=pamconfMPath,
|
||||
\ pamconfControlLineContH skipwhite
|
||||
|
||||
@@ -57,7 +57,9 @@ syn keyword pamconfControlValues contained success open_err symbol_err
|
||||
\ bad_item and default
|
||||
\ nextgroup=pamconfControlValueEq
|
||||
|
||||
syn match pamconfControlValueEq contained '=' nextgroup=pamconfControlAction
|
||||
syn match pamconfControlValueEq contained '='
|
||||
\ nextgroup=pamconfControlActionN,
|
||||
\ pamconfControlAction
|
||||
|
||||
syn match pamconfControlActionN contained '\d\+\>'
|
||||
\ nextgroup=pamconfControlValues,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" Vim syntax file
|
||||
" Language: php PHP 3/4/5
|
||||
" Maintainer: Jason Woofenden <jason@jasonwoof.com>
|
||||
" Last Change: April 28, 2011
|
||||
" Last Change: July 29, 2011
|
||||
" URL: https://gitorious.org/jasonwoof/vim-syntax/blobs/master/php.vim
|
||||
" Former Maintainers: Peter Hodge <toomuchphp-vim@yahoo.com>
|
||||
" Debian VIM Maintainers <pkg-vim-maintainers@lists.alioth.debian.org>
|
||||
@@ -54,14 +54,6 @@
|
||||
" the string would be highlighted as an error, what is incorrect.
|
||||
" ii) Same problem if you are setting php_folding = 2 with a closing
|
||||
" } inside an string on the first line of this string.
|
||||
"
|
||||
" - A double-quoted string like this:
|
||||
" "$foo->someVar->someOtherVar->bar"
|
||||
" will highight '->someOtherVar->bar' as though they will be parsed
|
||||
" as object member variables, but PHP only recognizes the first
|
||||
" object member variable ($foo->someVar).
|
||||
"
|
||||
"
|
||||
|
||||
" For version 5.x: Clear all syntax items
|
||||
" For version 6.x: Quit when a syntax file was already loaded
|
||||
@@ -131,7 +123,7 @@ syn keyword phpCoreConstant PHP_VERSION PHP_OS DEFAULT_INCLUDE_PATH PEAR_INSTALL
|
||||
|
||||
syn case ignore
|
||||
|
||||
syn keyword phpConstant __LINE__ __FILE__ __FUNCTION__ __METHOD__ __CLASS__ contained
|
||||
syn keyword phpConstant __LINE__ __FILE__ __FUNCTION__ __METHOD__ __CLASS__ __DIR__ __NAMESPACE__ contained
|
||||
|
||||
|
||||
" Function and Methods ripped from php_manual_de.tar.gz Jan 2003
|
||||
@@ -273,7 +265,7 @@ syn keyword phpRepeat as do endfor endforeach endwhile for foreach while contai
|
||||
syn keyword phpLabel case default switch contained
|
||||
|
||||
" Statement
|
||||
syn keyword phpStatement return break continue exit contained
|
||||
syn keyword phpStatement return break continue exit goto contained
|
||||
|
||||
" Keyword
|
||||
syn keyword phpKeyword var const contained
|
||||
@@ -282,7 +274,7 @@ syn keyword phpKeyword var const contained
|
||||
syn keyword phpType bool[ean] int[eger] real double float string array object NULL contained
|
||||
|
||||
" Structure
|
||||
syn keyword phpStructure extends implements instanceof parent self contained
|
||||
syn keyword phpStructure namespace extends implements instanceof parent self contained
|
||||
|
||||
" Operator
|
||||
syn match phpOperator "[-=+%^&|*!.~?:]" contained display
|
||||
@@ -302,11 +294,41 @@ syn match phpIdentifierSimply "${\h\w*}" contains=phpOperator,phpParent contai
|
||||
syn region phpIdentifierComplex matchgroup=phpParent start="{\$"rs=e-1 end="}" contains=phpIdentifier,phpMemberSelector,phpVarSelector,phpIdentifierComplexP contained extend
|
||||
syn region phpIdentifierComplexP matchgroup=phpParent start="\[" end="]" contains=@phpClInside contained
|
||||
|
||||
" Interpolated indentifiers (inside strings)
|
||||
syn match phpBrackets "[][}{]" contained display
|
||||
" errors
|
||||
syn match phpInterpSimpleError "\[[^]]*\]" contained display " fallback (if nothing else matches)
|
||||
syn match phpInterpSimpleError "->[^a-zA-Z_]" contained display
|
||||
" make sure these stay above the correct DollarCurlies so they don't take priority
|
||||
syn match phpInterpBogusDollarCurley "${[^}]*}" contained display " fallback (if nothing else matches)
|
||||
syn match phpinterpSimpleBracketsInner "\w\+" contained
|
||||
syn match phpInterpSimpleBrackets "\[\h\w*]" contained contains=phpBrackets,phpInterpSimpleBracketsInner
|
||||
syn match phpInterpSimpleBrackets "\[\d\+]" contained contains=phpBrackets,phpInterpSimpleBracketsInner
|
||||
syn match phpInterpSimpleBrackets "\[0[xX]\x\+]" contained contains=phpBrackets,phpInterpSimpleBracketsInner
|
||||
syn match phpInterpSimple "\$\h\w*\(\[[^]]*\]\|->\h\w*\)\?" contained contains=phpInterpSimpleBrackets,phpIdentifier,phpInterpSimpleError,phpMethods,phpMemberSelector display
|
||||
syn match phpInterpVarname "\h\w*" contained
|
||||
syn match phpInterpMethodName "\h\w*" contained " default color
|
||||
syn match phpInterpSimpleCurly "\${\h\w*}" contains=phpInterpVarname contained extend
|
||||
syn region phpInterpDollarCurley1Helper matchgroup=phpParent start="{" end="\[" contains=phpInterpVarname contained
|
||||
syn region phpInterpDollarCurly1 matchgroup=phpParent start="\${\h\w*\["rs=s+1 end="]}" contains=phpInterpDollarCurley1Helper,@phpClConst contained extend
|
||||
|
||||
syn match phpInterpDollarCurley2Helper "{\h\w*->" contains=phpBrackets,phpInterpVarname,phpMemberSelector contained
|
||||
|
||||
syn region phpInterpDollarCurly2 matchgroup=phpParent start="\${\h\w*->"rs=s+1 end="}" contains=phpInterpDollarCurley2Helper,phpInterpMethodName contained
|
||||
|
||||
syn match phpInterpBogusDollarCurley "${\h\w*->}" contained display
|
||||
syn match phpInterpBogusDollarCurley "${\h\w*\[]}" contained display
|
||||
|
||||
syn region phpInterpComplex matchgroup=phpParent start="{\$"rs=e-1 end="}" contains=phpIdentifier,phpMemberSelector,phpVarSelector,phpIdentifierComplexP contained extend
|
||||
syn region phpIdentifierComplexP matchgroup=phpParent start="\[" end="]" contains=@phpClInside contained
|
||||
" define a cluster to get all interpolation syntaxes for double-quoted strings
|
||||
syn cluster phpInterpDouble contains=phpInterpSimple,phpInterpSimpleCurly,phpInterpDollarCurly1,phpInterpDollarCurly2,phpInterpBogusDollarCurley,phpInterpComplex
|
||||
|
||||
" Methoden
|
||||
syn match phpMethodsVar "->\h\w*" contained contains=phpMethods,phpMemberSelector display
|
||||
|
||||
" Include
|
||||
syn keyword phpInclude include require include_once require_once contained
|
||||
syn keyword phpInclude include require include_once require_once use contained
|
||||
|
||||
" Peter Hodge - added 'clone' keyword
|
||||
" Define
|
||||
@@ -322,12 +344,18 @@ syn match phpNumber "\<0x\x\{1,8}\>" contained display
|
||||
" Float
|
||||
syn match phpFloat "\(-\=\<\d+\|-\=\)\.\d\+\>" contained display
|
||||
|
||||
" SpecialChar
|
||||
syn match phpSpecialChar "\\[abcfnrtyv\\]" contained display
|
||||
syn match phpSpecialChar "\\\d\{3}" contained contains=phpOctalError display
|
||||
syn match phpSpecialChar "\\x\x\{2}" contained display
|
||||
syn match phpDoubleSpecialChar "\\\"" contained display
|
||||
syn match phpSingleSpecialChar "\\[\\']" contained display
|
||||
" Backslash escapes
|
||||
syn case match
|
||||
" for double quotes and heredoc
|
||||
syn match phpBackslashSequences "\\[fnrtv\\\"$]" contained display
|
||||
syn match phpBackslashSequences "\\\d\{1,3}" contained contains=phpOctalError display
|
||||
syn match phpBackslashSequences "\\x\x\{1,2}" contained display
|
||||
" additional sequence for double quotes only
|
||||
syn match phpBackslashDoubleQuote "\\[\"]" contained display
|
||||
" for single quotes only
|
||||
syn match phpBackslashSingleQuote "\\[\\']" contained display
|
||||
syn case ignore
|
||||
|
||||
|
||||
" Error
|
||||
syn match phpOctalError "[89]" contained display
|
||||
@@ -356,23 +384,32 @@ endif
|
||||
|
||||
" String
|
||||
if exists("php_parent_error_open")
|
||||
syn region phpStringDouble matchgroup=None start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=@phpAddStrings,phpIdentifier,phpSpecialChar,phpIdentifierSimply,phpIdentifierComplex,phpDoubleSpecialChar contained keepend
|
||||
syn region phpBacktick matchgroup=None start=+`+ skip=+\\\\\|\\"+ end=+`+ contains=@phpAddStrings,phpIdentifier,phpSpecialChar,phpIdentifierSimply,phpIdentifierComplex contained keepend
|
||||
syn region phpStringSingle matchgroup=None start=+'+ skip=+\\\\\|\\'+ end=+'+ contains=@phpAddStrings,phpSingleSpecialChar contained keepend
|
||||
syn region phpStringDouble matchgroup=None start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=@phpAddStrings,phpBackslashSequences,phpBackslashDoubleQuote,@phpInterpDouble contained keepend
|
||||
syn region phpBacktick matchgroup=None start=+`+ skip=+\\\\\|\\"+ end=+`+ contains=@phpAddStrings,phpIdentifier,phpBackslashSequences,phpIdentifierSimply,phpIdentifierComplex contained keepend
|
||||
syn region phpStringSingle matchgroup=None start=+'+ skip=+\\\\\|\\'+ end=+'+ contains=@phpAddStrings,phpBackslashSingleQuote contained keepend
|
||||
else
|
||||
syn region phpStringDouble matchgroup=None start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=@phpAddStrings,phpIdentifier,phpSpecialChar,phpIdentifierSimply,phpIdentifierComplex,phpDoubleSpecialChar contained extend keepend
|
||||
syn region phpBacktick matchgroup=None start=+`+ skip=+\\\\\|\\"+ end=+`+ contains=@phpAddStrings,phpIdentifier,phpSpecialChar,phpIdentifierSimply,phpIdentifierComplex contained extend keepend
|
||||
syn region phpStringSingle matchgroup=None start=+'+ skip=+\\\\\|\\'+ end=+'+ contains=@phpAddStrings,phpSingleSpecialChar contained keepend extend
|
||||
syn region phpStringDouble matchgroup=None start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=@phpAddStrings,phpBackslashSequences,phpBackslashDoubleQuote,@phpInterpDouble contained extend keepend
|
||||
syn region phpBacktick matchgroup=None start=+`+ skip=+\\\\\|\\"+ end=+`+ contains=@phpAddStrings,phpIdentifier,phpBackslashSequences,phpIdentifierSimply,phpIdentifierComplex contained extend keepend
|
||||
syn region phpStringSingle matchgroup=None start=+'+ skip=+\\\\\|\\'+ end=+'+ contains=@phpAddStrings,phpBackslashSingleQuote contained keepend extend
|
||||
endif
|
||||
|
||||
" HereDoc
|
||||
" HereDoc and NowDoc
|
||||
if version >= 600
|
||||
syn case match
|
||||
syn region phpHereDoc matchgroup=Delimiter start="\(<<<\)\@<=\z(\I\i*\)$" end="^\z1\(;\=$\)\@=" contained contains=phpIdentifier,phpIdentifierSimply,phpIdentifierComplex,phpSpecialChar,phpMethodsVar keepend extend
|
||||
|
||||
" HereDoc
|
||||
syn region phpHereDoc matchgroup=Delimiter start="\(<<<\)\@<=\(\"\=\)\z(\I\i*\)\2$" end="^\z1\(;\=$\)\@=" contained contains=phpIdentifier,phpIdentifierSimply,phpIdentifierComplex,phpBackslashSequences,phpMethodsVar keepend extend
|
||||
" including HTML,JavaScript,SQL even if not enabled via options
|
||||
syn region phpHereDoc matchgroup=Delimiter start="\(<<<\)\@<=\z(\(\I\i*\)\=\(html\)\c\(\i*\)\)$" end="^\z1\(;\=$\)\@=" contained contains=@htmlTop,phpIdentifier,phpIdentifierSimply,phpIdentifierComplex,phpSpecialChar,phpMethodsVar keepend extend
|
||||
syn region phpHereDoc matchgroup=Delimiter start="\(<<<\)\@<=\z(\(\I\i*\)\=\(sql\)\c\(\i*\)\)$" end="^\z1\(;\=$\)\@=" contained contains=@sqlTop,phpIdentifier,phpIdentifierSimply,phpIdentifierComplex,phpSpecialChar,phpMethodsVar keepend extend
|
||||
syn region phpHereDoc matchgroup=Delimiter start="\(<<<\)\@<=\z(\(\I\i*\)\=\(javascript\)\c\(\i*\)\)$" end="^\z1\(;\=$\)\@=" contained contains=@htmlJavascript,phpIdentifierSimply,phpIdentifier,phpIdentifierComplex,phpSpecialChar,phpMethodsVar keepend extend
|
||||
syn region phpHereDoc matchgroup=Delimiter start="\(<<<\)\@<=\(\"\=\)\z(\(\I\i*\)\=\(html\)\c\(\i*\)\)\2$" end="^\z1\(;\=$\)\@=" contained contains=@htmlTop,phpIdentifier,phpIdentifierSimply,phpIdentifierComplex,phpBackslashSequences,phpMethodsVar keepend extend
|
||||
syn region phpHereDoc matchgroup=Delimiter start="\(<<<\)\@<=\(\"\=\)\z(\(\I\i*\)\=\(sql\)\c\(\i*\)\)\2$" end="^\z1\(;\=$\)\@=" contained contains=@sqlTop,phpIdentifier,phpIdentifierSimply,phpIdentifierComplex,phpBackslashSequences,phpMethodsVar keepend extend
|
||||
syn region phpHereDoc matchgroup=Delimiter start="\(<<<\)\@<=\(\"\=\)\z(\(\I\i*\)\=\(javascript\)\c\(\i*\)\)\2$" end="^\z1\(;\=$\)\@=" contained contains=@htmlJavascript,phpIdentifierSimply,phpIdentifier,phpIdentifierComplex,phpBackslashSequences,phpMethodsVar keepend extend
|
||||
|
||||
" NowDoc
|
||||
syn region phpNowDoc matchgroup=Delimiter start="\(<<<\)\@<='\z(\I\i*\)'$" end="^\z1\(;\=$\)\@=" contained keepend extend
|
||||
" including HTML,JavaScript,SQL even if not enabled via options
|
||||
syn region phpNowDoc matchgroup=Delimiter start="\(<<<\)\@<='\z(\(\I\i*\)\=\(html\)\c\(\i*\)\)'$" end="^\z1\(;\=$\)\@=" contained contains=@htmlTop keepend extend
|
||||
syn region phpNowDoc matchgroup=Delimiter start="\(<<<\)\@<='\z(\(\I\i*\)\=\(sql\)\c\(\i*\)\)'$" end="^\z1\(;\=$\)\@=" contained contains=@sqlTop keepend extend
|
||||
syn region phpNowDoc matchgroup=Delimiter start="\(<<<\)\@<='\z(\(\I\i*\)\=\(javascript\)\c\(\i*\)\)'$" end="^\z1\(;\=$\)\@=" contained contains=@htmlJavascript keepend extend
|
||||
syn case ignore
|
||||
endif
|
||||
|
||||
@@ -389,7 +426,7 @@ else
|
||||
endif
|
||||
|
||||
syn cluster phpClConst contains=phpFunctions,phpIdentifier,phpConditional,phpRepeat,phpStatement,phpOperator,phpRelation,phpStringSingle,phpStringDouble,phpBacktick,phpNumber,phpFloat,phpKeyword,phpType,phpBoolean,phpStructure,phpMethodsVar,phpConstant,phpCoreConstant,phpException
|
||||
syn cluster phpClInside contains=@phpClConst,phpComment,phpLabel,phpParent,phpParentError,phpInclude,phpHereDoc
|
||||
syn cluster phpClInside contains=@phpClConst,phpComment,phpLabel,phpParent,phpParentError,phpInclude,phpHereDoc,phpNowDoc
|
||||
syn cluster phpClFunction contains=@phpClInside,phpDefine,phpParentError,phpStorageClass
|
||||
syn cluster phpClTop contains=@phpClFunction,phpFoldFunction,phpFoldClass,phpFoldInterface,phpFoldTry,phpFoldCatch
|
||||
|
||||
@@ -452,17 +489,14 @@ else
|
||||
syn keyword phpStorageClass final global private protected public static contained
|
||||
endif
|
||||
|
||||
" TODO: fold on "trait". For now just make sure it gets colored:
|
||||
syn keyword phpStructure trait
|
||||
|
||||
" ================================================================
|
||||
" Peter Hodge - June 9, 2006
|
||||
" Some of these changes (highlighting isset/unset/echo etc) are not so
|
||||
" critical, but they make things more colourful. :-)
|
||||
|
||||
" corrected highlighting for an escaped '\$' inside a double-quoted string
|
||||
syn match phpSpecialChar "\\\$" contained display
|
||||
|
||||
" highlight object variables inside strings
|
||||
syn match phpMethodsVar "->\h\w*" contained contains=phpMethods,phpMemberSelector display containedin=phpStringDouble
|
||||
|
||||
" highlight constant E_STRICT
|
||||
syntax case match
|
||||
syntax keyword phpCoreConstant E_STRICT contained
|
||||
@@ -613,13 +647,21 @@ if version >= 508 || !exists("did_php_syn_inits")
|
||||
HiLink phpType Type
|
||||
HiLink phpInclude Include
|
||||
HiLink phpDefine Define
|
||||
HiLink phpSpecialChar SpecialChar
|
||||
HiLink phpDoubleSpecialChar SpecialChar
|
||||
HiLink phpSingleSpecialChar SpecialChar
|
||||
HiLink phpBackslashSequences SpecialChar
|
||||
HiLink phpBackslashDoubleQuote SpecialChar
|
||||
HiLink phpBackslashSingleQuote SpecialChar
|
||||
HiLink phpParent Delimiter
|
||||
HiLink phpBrackets Delimiter
|
||||
HiLink phpIdentifierConst Delimiter
|
||||
HiLink phpParentError Error
|
||||
HiLink phpOctalError Error
|
||||
HiLink phpInterpSimpleError Error
|
||||
HiLink phpInterpBogusDollarCurley Error
|
||||
HiLink phpInterpDollarCurly1 Error
|
||||
HiLink phpInterpDollarCurly2 Error
|
||||
HiLink phpInterpSimpleBracketsInner String
|
||||
HiLink phpInterpSimpleCurly Delimiter
|
||||
HiLink phpInterpVarname Identifier
|
||||
HiLink phpTodo Todo
|
||||
HiLink phpMemberSelector Structure
|
||||
if exists("php_oldStyle")
|
||||
@@ -631,13 +673,13 @@ if version >= 508 || !exists("did_php_syn_inits")
|
||||
hi phpIdentifier guifg=DarkGray ctermfg=Brown
|
||||
hi phpIdentifierSimply guifg=DarkGray ctermfg=Brown
|
||||
else
|
||||
HiLink phpIntVar Identifier
|
||||
HiLink phpEnvVar Identifier
|
||||
HiLink phpOperator Operator
|
||||
HiLink phpVarSelector Operator
|
||||
HiLink phpRelation Operator
|
||||
HiLink phpIdentifier Identifier
|
||||
HiLink phpIdentifierSimply Identifier
|
||||
HiLink phpIntVar Identifier
|
||||
HiLink phpEnvVar Identifier
|
||||
HiLink phpOperator Operator
|
||||
HiLink phpVarSelector Operator
|
||||
HiLink phpRelation Operator
|
||||
HiLink phpIdentifier Identifier
|
||||
HiLink phpIdentifierSimply Identifier
|
||||
endif
|
||||
|
||||
delcommand HiLink
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
" Language: shell (sh) Korn shell (ksh) bash (sh)
|
||||
" Maintainer: Dr. Charles E. Campbell, Jr. <NdrOchipS@PcampbellAfamily.Mbiz>
|
||||
" Previous Maintainer: Lennart Schultz <Lennart.Schultz@ecmwf.int>
|
||||
" Last Change: Feb 11, 2011
|
||||
" Version: 115
|
||||
" Last Change: Aug 16, 2011
|
||||
" Version: 118
|
||||
" URL: http://mysite.verizon.net/astronaut/vim/index.html#vimlinks_syntax
|
||||
" For options and settings, please use: :help ft-sh-syntax
|
||||
" This file includes many ideas from ?ric Brunet (eric.brunet@ens.fr)
|
||||
@@ -16,12 +16,38 @@ elseif exists("b:current_syntax")
|
||||
finish
|
||||
endif
|
||||
|
||||
" AFAICT "." should be considered part of the iskeyword. Using iskeywords in
|
||||
" syntax is dicey, so the following code permits the user to prevent/override
|
||||
" its setting.
|
||||
if exists("g:sh_isk") " override support
|
||||
exe "setlocal isk=".g:sh_isk
|
||||
elseif !exists("g:sh_noisk") " prevent modification support
|
||||
setlocal isk+=.
|
||||
endif
|
||||
|
||||
" trying to answer the question: which shell is /bin/sh, really?
|
||||
if !exists("g:is_kornshell") && !exists("g:is_bash") && !exists("g:is_posix") && !exists("g:is_sh")
|
||||
if executable("/bin/sh")
|
||||
if resolve("/bin/sh") =~ 'bash$'
|
||||
let g:is_bash= 1
|
||||
elseif resolve("/bin/sh") =~ 'ksh$'
|
||||
let g:is_ksh = 1
|
||||
endif
|
||||
elseif executable("/usr/bin/sh")
|
||||
if resolve("/usr/bin//sh") =~ 'bash$'
|
||||
let g:is_bash= 1
|
||||
elseif resolve("/usr/bin//sh") =~ 'ksh$'
|
||||
let g:is_ksh = 1
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
" handling /bin/sh with is_kornshell/is_sh {{{1
|
||||
" b:is_sh is set when "#! /bin/sh" is found;
|
||||
" However, it often is just a masquerade by bash (typically Linux)
|
||||
" or kornshell (typically workstations with Posix "sh").
|
||||
" So, when the user sets "is_bash" or "is_kornshell",
|
||||
" a b:is_sh is converted into b:is_bash/b:is_kornshell,
|
||||
" So, when the user sets "g:is_bash", "g:is_kornshell",
|
||||
" or "g:is_posix", a b:is_sh is converted into b:is_bash/b:is_kornshell,
|
||||
" respectively.
|
||||
if !exists("b:is_kornshell") && !exists("b:is_bash")
|
||||
if exists("g:is_posix") && !exists("g:is_kornshell")
|
||||
@@ -74,7 +100,7 @@ endif
|
||||
syn cluster shArithParenList contains=shArithmetic,shCaseEsac,shDeref,shDerefSimple,shEcho,shEscape,shNumber,shOperator,shPosnParm,shExSingleQuote,shExDoubleQuote,shRedir,shSingleQuote,shDoubleQuote,shStatement,shVariable,shAlias,shTest,shCtrlSeq,shSpecial,shParen,bashSpecialVariables,bashStatement
|
||||
syn cluster shArithList contains=@shArithParenList,shParenError
|
||||
syn cluster shCaseEsacList contains=shCaseStart,shCase,shCaseBar,shCaseIn,shComment,shDeref,shDerefSimple,shCaseCommandSub,shCaseExSingleQuote,shCaseSingleQuote,shCaseDoubleQuote,shCtrlSeq,@shErrorList,shStringSpecial,shCaseRange
|
||||
syn cluster shCaseList contains=@shCommandSubList,shCaseEsac,shColon,shCommandSub,shCommandSub,shComment,shDo,shEcho,shExpr,shFor,shHereDoc,shIf,shRedir,shSetList,shSource,shStatement,shVariable,shCtrlSeq
|
||||
syn cluster shCaseList contains=@shCommandSubList,shCaseEsac,shColon,shCommandSub,shComment,shDo,shEcho,shExpr,shFor,shHereDoc,shIf,shRedir,shSetList,shSource,shStatement,shVariable,shCtrlSeq
|
||||
syn cluster shColonList contains=@shCaseList
|
||||
syn cluster shCommandSubList contains=shArithmetic,shDeref,shDerefSimple,shEscape,shNumber,shOperator,shPosnParm,shExSingleQuote,shSingleQuote,shExDoubleQuote,shDoubleQuote,shStatement,shVariable,shSubSh,shAlias,shTest,shCtrlSeq,shSpecial
|
||||
syn cluster shCurlyList contains=shNumber,shComma,shDeref,shDerefSimple,shDerefSpecial
|
||||
@@ -84,7 +110,7 @@ syn cluster shDerefVarList contains=shDerefOp,shDerefVarArray,shDerefOpError
|
||||
syn cluster shEchoList contains=shArithmetic,shCommandSub,shDeref,shDerefSimple,shExpr,shExSingleQuote,shExDoubleQuote,shSingleQuote,shDoubleQuote,shCtrlSeq,shEchoQuote
|
||||
syn cluster shExprList1 contains=shCharClass,shNumber,shOperator,shExSingleQuote,shExDoubleQuote,shSingleQuote,shDoubleQuote,shExpr,shDblBrace,shDeref,shDerefSimple,shCtrlSeq
|
||||
syn cluster shExprList2 contains=@shExprList1,@shCaseList,shTest
|
||||
syn cluster shFunctionList contains=@shCommandSubList,shCaseEsac,shColon,shCommandSub,shCommandSub,shComment,shDo,shEcho,shExpr,shFor,shHereDoc,shIf,shOption,shRedir,shSetList,shSource,shStatement,shVariable,shOperator,shCtrlSeq
|
||||
syn cluster shFunctionList contains=@shCommandSubList,shCaseEsac,shColon,shCommandSub,shComment,shDo,shEcho,shExpr,shFor,shHereDoc,shIf,shOption,shRedir,shSetList,shSource,shStatement,shVariable,shOperator,shCtrlSeq
|
||||
if exists("b:is_kornshell") || exists("b:is_bash")
|
||||
syn cluster shFunctionList add=shRepeat
|
||||
syn cluster shFunctionList add=shDblBrace,shDblParen
|
||||
@@ -94,8 +120,8 @@ syn cluster shHereList contains=shBeginHere,shHerePayload
|
||||
syn cluster shHereListDQ contains=shBeginHere,@shDblQuoteList,shHerePayload
|
||||
syn cluster shIdList contains=shCommandSub,shWrapLineOperator,shSetOption,shDeref,shDerefSimple,shRedir,shExSingleQuote,shExDoubleQuote,shSingleQuote,shDoubleQuote,shExpr,shCtrlSeq,shStringSpecial
|
||||
syn cluster shLoopList contains=@shCaseList,shTestOpr,shExpr,shDblBrace,shConditional,shCaseEsac,shTest,@shErrorList,shSet
|
||||
syn cluster shSubShList contains=@shCommandSubList,shCaseEsac,shColon,shCommandSub,shCommandSub,shComment,shDo,shEcho,shExpr,shFor,shIf,shRedir,shSetList,shSource,shStatement,shVariable,shCtrlSeq,shOperator
|
||||
syn cluster shTestList contains=shCharClass,shComment,shCommandSub,shDeref,shDerefSimple,shExDoubleQuote,shDoubleQuote,shExpr,shExpr,shNumber,shOperator,shExSingleQuote,shSingleQuote,shTestOpr,shTest,shCtrlSeq
|
||||
syn cluster shSubShList contains=@shCommandSubList,shCaseEsac,shColon,shCommandSub,shComment,shDo,shEcho,shExpr,shFor,shIf,shRedir,shSetList,shSource,shStatement,shVariable,shCtrlSeq,shOperator
|
||||
syn cluster shTestList contains=shCharClass,shComment,shCommandSub,shDeref,shDerefSimple,shExDoubleQuote,shDoubleQuote,shExpr,shNumber,shOperator,shExSingleQuote,shSingleQuote,shTestOpr,shTest,shCtrlSeq
|
||||
|
||||
" Echo: {{{1
|
||||
" ====
|
||||
@@ -111,8 +137,8 @@ syn region shEmbeddedEcho contained matchgroup=shStatement start="\<print\>" ski
|
||||
" =====
|
||||
if exists("b:is_kornshell") || exists("b:is_bash")
|
||||
syn match shStatement "\<alias\>"
|
||||
syn region shAlias matchgroup=shStatement start="\<alias\>\s\+\(\w\+\)\@=" skip="\\$" end="\>\|`"
|
||||
syn region shAlias matchgroup=shStatement start="\<alias\>\s\+\(\w\+=\)\@=" skip="\\$" end="="
|
||||
syn region shAlias matchgroup=shStatement start="\<alias\>\s\+\(\h[-._[:alnum:]]\+\)\@=" skip="\\$" end="\>\|`"
|
||||
syn region shAlias matchgroup=shStatement start="\<alias\>\s\+\(\h[-._[:alnum:]]\+=\)\@=" skip="\\$" end="="
|
||||
endif
|
||||
|
||||
" Error Codes: {{{1
|
||||
@@ -152,8 +178,8 @@ syn match shPattern "\<\S\+\())\)\@=" contained contains=shExSingleQuote,shSin
|
||||
|
||||
" Subshells: {{{1
|
||||
" ==========
|
||||
syn region shExpr transparent matchgroup=shExprRegion start="{" end="}" contains=@shExprList2 nextgroup=shMoreSpecial
|
||||
syn region shSubSh transparent matchgroup=shSubShRegion start="(" end=")" contains=@shSubShList nextgroup=shMoreSpecial
|
||||
syn region shExpr transparent matchgroup=shExprRegion start="{" end="}" contains=@shExprList2 nextgroup=shMoreSpecial
|
||||
syn region shSubSh transparent matchgroup=shSubShRegion start="[^(]\zs(" end=")" contains=@shSubShList nextgroup=shMoreSpecial
|
||||
|
||||
" Tests: {{{1
|
||||
"=======
|
||||
@@ -162,7 +188,7 @@ syn region shTest transparent matchgroup=shStatement start="\<test\s" skip=+\\\\
|
||||
syn match shTestOpr contained "<=\|>=\|!=\|==\|-.\>\|-\(nt\|ot\|ef\|eq\|ne\|lt\|le\|gt\|ge\)\>\|[!<>]"
|
||||
syn match shTestOpr contained '=' skipwhite nextgroup=shTestDoubleQuote,shTestSingleQuote,shTestPattern
|
||||
syn match shTestPattern contained '\w\+'
|
||||
syn match shTestDoubleQuote contained '"[^"]*"'
|
||||
syn match shTestDoubleQuote contained '\%(\%(\\\\\)*\\\)\@<!"[^"]*"'
|
||||
syn match shTestSingleQuote contained '\\.'
|
||||
syn match shTestSingleQuote contained "'[^']*'"
|
||||
if exists("b:is_kornshell") || exists("b:is_bash")
|
||||
@@ -178,11 +204,11 @@ syn match shCharClass contained "\[:\(backspace\|escape\|return\|xdigit\|alnum
|
||||
" ======
|
||||
if (g:sh_fold_enabled % (s:sh_fold_ifdofor * 2))/s:sh_fold_ifdofor
|
||||
syn region shDo fold transparent matchgroup=shConditional start="\<do\>" matchgroup=shConditional end="\<done\>" contains=@shLoopList
|
||||
syn region shIf fold transparent matchgroup=shConditional start="\<if\_s" matchgroup=shConditional end="\<;\_s*then\>" end="\<fi\>" contains=@shLoopList,shDblBrace,shDblParen,shFunctionKey
|
||||
syn region shIf fold transparent matchgroup=shConditional start="\<if\_s" matchgroup=shConditional end="\<;\_s*then\>" end="\<fi\>" contains=@shLoopList,shDblBrace,shDblParen,shFunctionKey,shFunctionOne,shFunctionTwo
|
||||
syn region shFor fold matchgroup=shLoop start="\<for\_s" end="\<in\_s" end="\<do\>"me=e-2 contains=@shLoopList,shDblParen skipwhite nextgroup=shCurlyIn
|
||||
else
|
||||
syn region shDo transparent matchgroup=shConditional start="\<do\>" matchgroup=shConditional end="\<done\>" contains=@shLoopList
|
||||
syn region shIf transparent matchgroup=shConditional start="\<if\_s" matchgroup=shConditional end="\<;\_s*then\>" end="\<fi\>" contains=@shLoopList,shDblBrace,shDblParen,shFunctionKey
|
||||
syn region shIf transparent matchgroup=shConditional start="\<if\_s" matchgroup=shConditional end="\<;\_s*then\>" end="\<fi\>" contains=@shLoopList,shDblBrace,shDblParen,shFunctionKey,shFunctionOne,shFunctionTwo
|
||||
syn region shFor matchgroup=shLoop start="\<for\_s" end="\<in\>" end="\<do\>"me=e-2 contains=@shLoopList,shDblParen skipwhite nextgroup=shCurlyIn
|
||||
endif
|
||||
if exists("b:is_kornshell") || exists("b:is_bash")
|
||||
@@ -224,7 +250,7 @@ syn region shCaseRange matchgroup=Delimiter start=+\[+ skip=+\\\\+ end=+]+ cont
|
||||
"======
|
||||
syn match shWrapLineOperator "\\$"
|
||||
syn region shCommandSub start="`" skip="\\\\\|\\." end="`" contains=@shCommandSubList
|
||||
syn match shEscape contained '\\.'
|
||||
syn match shEscape contained '\\.' contains=@shCommandSubList
|
||||
|
||||
" $() and $(()): {{{1
|
||||
" $(..) is not supported by sh (Bourne shell). However, apparently
|
||||
@@ -243,7 +269,7 @@ endif
|
||||
if exists("b:is_bash")
|
||||
syn cluster shCommandSubList add=bashSpecialVariables,bashStatement
|
||||
syn cluster shCaseList add=bashAdminStatement,bashStatement
|
||||
syn keyword bashSpecialVariables contained BASH BASH_ENV BASH_VERSINFO BASH_VERSION CDPATH DIRSTACK EUID FCEDIT FIGNORE GLOBIGNORE GROUPS HISTCMD HISTCONTROL HISTFILE HISTFILESIZE HISTIGNORE HISTSIZE HOME HOSTFILE HOSTNAME HOSTTYPE IFS IGNOREEOF INPUTRC LANG LC_ALL LC_COLLATE LC_MESSAGES LINENO MACHTYPE MAIL MAILCHECK MAILPATH OLDPWD OPTARG OPTERR OPTIND OSTYPE PATH PIPESTATUS PPID PROMPT_COMMAND PS1 PS2 PS3 PS4 PWD RANDOM REPLY SECONDS SHELLOPTS SHLVL TIMEFORMAT TIMEOUT UID auto_resume histchars
|
||||
syn keyword bashSpecialVariables contained auto_resume BASH BASH_ALIASES BASH_ALIASES BASH_ARGC BASH_ARGC BASH_ARGV BASH_ARGV BASH_CMDS BASH_CMDS BASH_COMMAND BASH_COMMAND BASH_ENV BASH_EXECUTION_STRING BASH_EXECUTION_STRING BASH_LINENO BASH_LINENO BASHOPTS BASHOPTS BASHPID BASHPID BASH_REMATCH BASH_REMATCH BASH_SOURCE BASH_SOURCE BASH_SUBSHELL BASH_SUBSHELL BASH_VERSINFO BASH_VERSION BASH_XTRACEFD BASH_XTRACEFD CDPATH COLUMNS COLUMNS COMP_CWORD COMP_CWORD COMP_KEY COMP_KEY COMP_LINE COMP_LINE COMP_POINT COMP_POINT COMPREPLY COMPREPLY COMP_TYPE COMP_TYPE COMP_WORDBREAKS COMP_WORDBREAKS COMP_WORDS COMP_WORDS COPROC COPROC DIRSTACK EMACS EMACS ENV ENV EUID FCEDIT FIGNORE FUNCNAME FUNCNAME FUNCNEST FUNCNEST GLOBIGNORE GROUPS histchars HISTCMD HISTCONTROL HISTFILE HISTFILESIZE HISTIGNORE HISTSIZE HISTTIMEFORMAT HISTTIMEFORMAT HOME HOSTFILE HOSTNAME HOSTTYPE IFS IGNOREEOF INPUTRC LANG LC_ALL LC_COLLATE LC_CTYPE LC_CTYPE LC_MESSAGES LC_NUMERIC LC_NUMERIC LINENO LINES LINES MACHTYPE MAIL MAILCHECK MAILPATH MAPFILE MAPFILE OLDPWD OPTARG OPTERR OPTIND OSTYPE PATH PIPESTATUS POSIXLY_CORRECT POSIXLY_CORRECT PPID PROMPT_COMMAND PS1 PS2 PS3 PS4 PWD RANDOM READLINE_LINE READLINE_LINE READLINE_POINT READLINE_POINT REPLY SECONDS SHELL SHELL SHELLOPTS SHLVL TIMEFORMAT TIMEOUT TMPDIR TMPDIR UID
|
||||
syn keyword bashStatement chmod clear complete du egrep expr fgrep find gnufind gnugrep grep install less ls mkdir mv rm rmdir rpm sed sleep sort strip tail touch
|
||||
syn keyword bashAdminStatement daemon killall killproc nice reload restart start status stop
|
||||
endif
|
||||
@@ -275,7 +301,8 @@ else
|
||||
syn region shExDoubleQuote matchGroup=Error start=+\$"+ skip=+\\\\\|\\.+ end=+"+ contains=shStringSpecial
|
||||
endif
|
||||
syn region shSingleQuote matchgroup=shQuote start=+'+ end=+'+ contains=@Spell
|
||||
syn region shDoubleQuote matchgroup=shQuote start=+"+ skip=+\\"+ end=+"+ contains=@shDblQuoteList,shStringSpecial,@Spell
|
||||
syn region shDoubleQuote matchgroup=shQuote start=+\%(\%(\\\\\)*\\\)\@<!"+ skip=+\\"+ end=+"+ contains=@shDblQuoteList,shStringSpecial,@Spell
|
||||
"syn region shDoubleQuote matchgroup=shQuote start=+"+ skip=+\\"+ end=+"+ contains=@shDblQuoteList,shStringSpecial,@Spell
|
||||
syn match shStringSpecial "[^[:print:] \t]" contained
|
||||
syn match shStringSpecial "\%(\\\\\)*\\[\\"'`$()#]"
|
||||
syn match shSpecial "[^\\]\zs\%(\\\\\)*\\[\\"'`$()#]" nextgroup=shMoreSpecial
|
||||
@@ -333,7 +360,8 @@ endif
|
||||
|
||||
" Here Strings: {{{1
|
||||
" =============
|
||||
if exists("b:is_bash")
|
||||
" available for: bash; ksh (really should be ksh93 only) but not if its a posix
|
||||
if exists("b:is_bash") || (exists("b:is_kornshell") && !exists("g:is_posix"))
|
||||
syn match shRedir "<<<"
|
||||
endif
|
||||
|
||||
@@ -410,10 +438,10 @@ syn region shDerefVarArray contained matchgroup=shDeref start="\[" end="]" co
|
||||
" ksh bash : ${parameter##pattern} remove large left pattern
|
||||
" ksh bash : ${parameter%pattern} remove small right pattern
|
||||
" ksh bash : ${parameter%%pattern} remove large right pattern
|
||||
" ksh bash : ${parameter^pattern} Case modification
|
||||
" ksh bash : ${parameter^^pattern} Case modification
|
||||
" ksh bash : ${parameter,pattern} Case modification
|
||||
" ksh bash : ${parameter,,pattern} Case modification
|
||||
" bash : ${parameter^pattern} Case modification
|
||||
" bash : ${parameter^^pattern} Case modification
|
||||
" bash : ${parameter,pattern} Case modification
|
||||
" bash : ${parameter,,pattern} Case modification
|
||||
syn cluster shDerefPatternList contains=shDerefPattern,shDerefString
|
||||
syn match shDerefOpError contained ":[[:punct:]]"
|
||||
syn match shDerefOp contained ":\=[-=?]" nextgroup=@shDerefPatternList
|
||||
@@ -421,12 +449,13 @@ syn match shDerefOp contained ":\=+" nextgroup=@shDerefPatternList
|
||||
if exists("b:is_bash") || exists("b:is_kornshell")
|
||||
syn match shDerefOp contained "#\{1,2}" nextgroup=@shDerefPatternList
|
||||
syn match shDerefOp contained "%\{1,2}" nextgroup=@shDerefPatternList
|
||||
syn match shDerefOp contained "\^\{1,2}" nextgroup=@shDerefPatternList
|
||||
syn match shDerefOp contained ",\{1,2}" nextgroup=@shDerefPatternList
|
||||
syn match shDerefPattern contained "[^{}]\+" contains=shDeref,shDerefSimple,shDerefPattern,shDerefString,shCommandSub,shDerefEscape nextgroup=shDerefPattern
|
||||
syn region shDerefPattern contained start="{" end="}" contains=shDeref,shDerefSimple,shDerefString,shCommandSub nextgroup=shDerefPattern
|
||||
syn match shDerefEscape contained '\%(\\\\\)*\\.'
|
||||
endif
|
||||
if exists("b:is_bash")
|
||||
syn match shDerefOp contained "[,^]\{1,2}" nextgroup=@shDerefPatternList
|
||||
endif
|
||||
syn region shDerefString contained matchgroup=shDerefDelim start=+\%(\\\)\@<!'+ end=+'+ contains=shStringSpecial
|
||||
syn region shDerefString contained matchgroup=shDerefDelim start=+\%(\\\)\@<!"+ skip=+\\"+ end=+"+ contains=@shDblQuoteList,shStringSpecial
|
||||
syn match shDerefString contained "\\["']" nextgroup=shDerefPattern
|
||||
@@ -445,7 +474,7 @@ if exists("b:is_bash")
|
||||
endif
|
||||
|
||||
" Arithmetic Parenthesized Expressions: {{{1
|
||||
syn region shParen matchgroup=shArithRegion start='(\ze[^(]' end=')' contains=@shArithParenList
|
||||
syn region shParen matchgroup=shArithRegion start='(\%(\ze[^(]\|$\)' end=')' contains=@shArithParenList
|
||||
|
||||
" Useful sh Keywords: {{{1
|
||||
" ===================
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
" Vim syntax file
|
||||
" Language: TeX
|
||||
" Maintainer: Dr. Charles E. Campbell, Jr. <NdrchipO@ScampbellPfamily.AbizM>
|
||||
" Last Change: Dec 07, 2010
|
||||
" Version: 64
|
||||
" Last Change: Aug 22, 2011
|
||||
" Version: 68
|
||||
" URL: http://mysite.verizon.net/astronaut/vim/index.html#vimlinks_syntax
|
||||
"
|
||||
" Notes: {{{1
|
||||
@@ -101,6 +101,9 @@ endif
|
||||
if b:tex_stylish
|
||||
setlocal isk+=@-@
|
||||
endif
|
||||
if exists("g:tex_nospell") && g:tex_nospell && !exists("g:tex_comment_nospell")
|
||||
let g:tex_comment_nospell= 1
|
||||
endif
|
||||
|
||||
" Clusters: {{{1
|
||||
" --------
|
||||
@@ -110,8 +113,13 @@ if !exists("g:tex_no_error")
|
||||
endif
|
||||
syn cluster texEnvGroup contains=texMatcher,texMathDelim,texSpecialChar,texStatement
|
||||
syn cluster texFoldGroup contains=texAccent,texBadMath,texComment,texDefCmd,texDelimiter,texDocType,texInput,texInputFile,texLength,texLigature,texMatcher,texMathZoneV,texMathZoneW,texMathZoneX,texMathZoneY,texMathZoneZ,texNewCmd,texNewEnv,texOnlyMath,texOption,texParen,texRefZone,texSection,texSectionMarker,texSectionZone,texSpaceCode,texSpecialChar,texStatement,texString,texTypeSize,texTypeStyle,texZone,@texMathZones,texTitle,texAbstract
|
||||
syn cluster texMatchGroup contains=texAccent,texBadMath,texComment,texDefCmd,texDelimiter,texDocType,texInput,texLength,texLigature,texMatcher,texNewCmd,texNewEnv,texOnlyMath,texParen,texRefZone,texSection,texSpecialChar,texStatement,texString,texTypeSize,texTypeStyle,texZone,texInputFile,texOption,@Spell
|
||||
syn cluster texStyleGroup contains=texAccent,texBadMath,texComment,texDefCmd,texDelimiter,texDocType,texInput,texLength,texLigature,texNewCmd,texNewEnv,texOnlyMath,texParen,texRefZone,texSection,texSpecialChar,texStatement,texString,texTypeSize,texTypeStyle,texZone,texInputFile,texOption,texStyleStatement,@Spell,texStyleMatcher
|
||||
if !exists("g:tex_nospell") || !g:tex_nospell
|
||||
syn cluster texMatchGroup contains=texAccent,texBadMath,texComment,texDefCmd,texDelimiter,texDocType,texInput,texLength,texLigature,texMatcher,texNewCmd,texNewEnv,texOnlyMath,texParen,texRefZone,texSection,texSpecialChar,texStatement,texString,texTypeSize,texTypeStyle,texZone,texInputFile,texOption,@Spell
|
||||
syn cluster texStyleGroup contains=texAccent,texBadMath,texComment,texDefCmd,texDelimiter,texDocType,texInput,texLength,texLigature,texNewCmd,texNewEnv,texOnlyMath,texParen,texRefZone,texSection,texSpecialChar,texStatement,texString,texTypeSize,texTypeStyle,texZone,texInputFile,texOption,texStyleStatement,@Spell,texStyleMatcher
|
||||
else
|
||||
syn cluster texMatchGroup contains=texAccent,texBadMath,texComment,texDefCmd,texDelimiter,texDocType,texInput,texLength,texLigature,texMatcher,texNewCmd,texNewEnv,texOnlyMath,texParen,texRefZone,texSection,texSpecialChar,texStatement,texString,texTypeSize,texTypeStyle,texZone,texInputFile,texOption
|
||||
syn cluster texStyleGroup contains=texAccent,texBadMath,texComment,texDefCmd,texDelimiter,texDocType,texInput,texLength,texLigature,texNewCmd,texNewEnv,texOnlyMath,texParen,texRefZone,texSection,texSpecialChar,texStatement,texString,texTypeSize,texTypeStyle,texZone,texInputFile,texOption,texStyleStatement,texStyleMatcher
|
||||
endif
|
||||
syn cluster texRefGroup contains=texMatcher,texComment,texDelimiter
|
||||
if !exists("tex_no_math")
|
||||
syn cluster texMathZones contains=texMathZoneV,texMathZoneW,texMathZoneX,texMathZoneY,texMathZoneZ
|
||||
@@ -147,7 +155,11 @@ else
|
||||
syn region texMatcher matchgroup=Delimiter start="{" skip="\\\\\|\\[{}]" end="}" contains=@texMatchGroup
|
||||
syn region texMatcher matchgroup=Delimiter start="\[" end="]" contains=@texMatchGroup
|
||||
endif
|
||||
syn region texParen start="(" end=")" contains=@texMatchGroup,@Spell
|
||||
if !exists("g:tex_nospell") || !g:tex_nospell
|
||||
syn region texParen start="(" end=")" contains=@texMatchGroup,@Spell
|
||||
else
|
||||
syn region texParen start="(" end=")" contains=@texMatchGroup
|
||||
endif
|
||||
if !exists("g:tex_no_error")
|
||||
syn match texError "[}\])]"
|
||||
endif
|
||||
@@ -155,7 +167,8 @@ if !exists("tex_no_math")
|
||||
if !exists("g:tex_no_error")
|
||||
syn match texMathError "}" contained
|
||||
endif
|
||||
syn region texMathMatcher matchgroup=Delimiter start="{" skip="\\\\\|\\}" end="}" end="%stopzone\>" contained contains=@texMathMatchGroup
|
||||
syn region texMathMatcher matchgroup=Delimiter start="{" skip="\\\\\|\\}" end="}" end="%stopzone\>" contained contains=@texMathMatchGroup
|
||||
" syn region texMathMatcher matchgroup=Unique start="[^\\]\zs{" skip="\\\\\|\\[{}]" end="}" end="%stopzone\>" contained contains=@texMathMatchGroup
|
||||
endif
|
||||
|
||||
" TeX/LaTeX keywords: {{{1
|
||||
@@ -173,6 +186,7 @@ endif
|
||||
" TeX/LaTeX delimiters: {{{1
|
||||
syn match texDelimiter "&"
|
||||
syn match texDelimiter "\\\\"
|
||||
syn match texDelimiter "[{}]"
|
||||
|
||||
" Tex/Latex Options: {{{1
|
||||
syn match texOption "[^\\]\zs#\d\+\|^#\d\+"
|
||||
@@ -273,33 +287,59 @@ syn match texSpaceCode "\\\(math\|cat\|del\|lc\|sf\|uc\)code`"me=e-1 nextgroup=
|
||||
syn match texSpaceCodeChar "`\\\=.\(\^.\)\==\(\d\|\"\x\{1,6}\|`.\)" contained
|
||||
|
||||
" Sections, subsections, etc: {{{1
|
||||
if g:tex_fold_enabled && has("folding")
|
||||
syn region texDocZone matchgroup=texSection start='\\begin\s*{\s*document\s*}' end='\\end\s*{\s*document\s*}' fold contains=@texFoldGroup,@texDocGroup,@Spell
|
||||
syn region texPartZone matchgroup=texSection start='\\part\>' end='\ze\s*\\\%(part\>\|end\s*{\s*document\s*}\)' fold contains=@texFoldGroup,@texPartGroup,@Spell
|
||||
syn region texChapterZone matchgroup=texSection start='\\chapter\>' end='\ze\s*\\\%(chapter\>\|part\>\|end\s*{\s*document\s*}\)' fold contains=@texFoldGroup,@texChapterGroup,@Spell
|
||||
syn region texSectionZone matchgroup=texSection start='\\section\>' end='\ze\s*\\\%(section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' fold contains=@texFoldGroup,@texSectionGroup,@Spell
|
||||
syn region texSubSectionZone matchgroup=texSection start='\\subsection\>' end='\ze\s*\\\%(\%(sub\)\=section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' fold contains=@texFoldGroup,@texSubSectionGroup,@Spell
|
||||
syn region texSubSubSectionZone matchgroup=texSection start='\\subsubsection\>' end='\ze\s*\\\%(\%(sub\)\{,2}section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' fold contains=@texFoldGroup,@texSubSubSectionGroup,@Spell
|
||||
syn region texParaZone matchgroup=texSection start='\\paragraph\>' end='\ze\s*\\\%(paragraph\>\|\%(sub\)*section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' fold contains=@texFoldGroup,@texParaGroup,@Spell
|
||||
syn region texSubParaZone matchgroup=texSection start='\\subparagraph\>' end='\ze\s*\\\%(\%(sub\)\=paragraph\>\|\%(sub\)*section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' fold contains=@texFoldGroup,@Spell
|
||||
syn region texTitle matchgroup=texSection start='\\\%(author\|title\)\>\s*{' end='}' fold contains=@texFoldGroup,@Spell
|
||||
syn region texAbstract matchgroup=texSection start='\\begin\s*{\s*abstract\s*}' end='\\end\s*{\s*abstract\s*}' fold contains=@texFoldGroup,@Spell
|
||||
if !exists("g:tex_nospell") || !g:tex_nospell
|
||||
if g:tex_fold_enabled && has("folding")
|
||||
syn region texDocZone matchgroup=texSection start='\\begin\s*{\s*document\s*}' end='\\end\s*{\s*document\s*}' fold contains=@texFoldGroup,@texDocGroup,@Spell
|
||||
syn region texPartZone matchgroup=texSection start='\\part\>' end='\ze\s*\\\%(part\>\|end\s*{\s*document\s*}\)' fold contains=@texFoldGroup,@texPartGroup,@Spell
|
||||
syn region texChapterZone matchgroup=texSection start='\\chapter\>' end='\ze\s*\\\%(chapter\>\|part\>\|end\s*{\s*document\s*}\)' fold contains=@texFoldGroup,@texChapterGroup,@Spell
|
||||
syn region texSectionZone matchgroup=texSection start='\\section\>' end='\ze\s*\\\%(section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' fold contains=@texFoldGroup,@texSectionGroup,@Spell
|
||||
syn region texSubSectionZone matchgroup=texSection start='\\subsection\>' end='\ze\s*\\\%(\%(sub\)\=section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' fold contains=@texFoldGroup,@texSubSectionGroup,@Spell
|
||||
syn region texSubSubSectionZone matchgroup=texSection start='\\subsubsection\>' end='\ze\s*\\\%(\%(sub\)\{,2}section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' fold contains=@texFoldGroup,@texSubSubSectionGroup,@Spell
|
||||
syn region texParaZone matchgroup=texSection start='\\paragraph\>' end='\ze\s*\\\%(paragraph\>\|\%(sub\)*section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' fold contains=@texFoldGroup,@texParaGroup,@Spell
|
||||
syn region texSubParaZone matchgroup=texSection start='\\subparagraph\>' end='\ze\s*\\\%(\%(sub\)\=paragraph\>\|\%(sub\)*section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' fold contains=@texFoldGroup,@Spell
|
||||
syn region texTitle matchgroup=texSection start='\\\%(author\|title\)\>\s*{' end='}' fold contains=@texFoldGroup,@Spell
|
||||
syn region texAbstract matchgroup=texSection start='\\begin\s*{\s*abstract\s*}' end='\\end\s*{\s*abstract\s*}' fold contains=@texFoldGroup,@Spell
|
||||
else
|
||||
syn region texDocZone matchgroup=texSection start='\\begin\s*{\s*document\s*}' end='\\end\s*{\s*document\s*}' contains=@texFoldGroup,@texDocGroup,@Spell
|
||||
syn region texPartZone matchgroup=texSection start='\\part\>' end='\ze\s*\\\%(part\>\|end\s*{\s*document\s*}\)' contains=@texFoldGroup,@texPartGroup,@Spell
|
||||
syn region texChapterZone matchgroup=texSection start='\\chapter\>' end='\ze\s*\\\%(chapter\>\|part\>\|end\s*{\s*document\s*}\)' contains=@texFoldGroup,@texChapterGroup,@Spell
|
||||
syn region texSectionZone matchgroup=texSection start='\\section\>' end='\ze\s*\\\%(section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' contains=@texFoldGroup,@texSectionGroup,@Spell
|
||||
syn region texSubSectionZone matchgroup=texSection start='\\subsection\>' end='\ze\s*\\\%(\%(sub\)\=section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' contains=@texFoldGroup,@texSubSectionGroup,@Spell
|
||||
syn region texSubSubSectionZone matchgroup=texSection start='\\subsubsection\>' end='\ze\s*\\\%(\%(sub\)\{,2}section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' contains=@texFoldGroup,@texSubSubSectionGroup,@Spell
|
||||
syn region texParaZone matchgroup=texSection start='\\paragraph\>' end='\ze\s*\\\%(paragraph\>\|\%(sub\)*section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' contains=@texFoldGroup,@texParaGroup,@Spell
|
||||
syn region texSubParaZone matchgroup=texSection start='\\subparagraph\>' end='\ze\s*\\\%(\%(sub\)\=paragraph\>\|\%(sub\)*section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' contains=@texFoldGroup,@Spell
|
||||
syn region texTitle matchgroup=texSection start='\\\%(author\|title\)\>\s*{' end='}' contains=@texFoldGroup,@Spell
|
||||
syn region texAbstract matchgroup=texSection start='\\begin\s*{\s*abstract\s*}' end='\\end\s*{\s*abstract\s*}' contains=@texFoldGroup,@Spell
|
||||
endif
|
||||
else
|
||||
syn region texDocZone matchgroup=texSection start='\\begin\s*{\s*document\s*}' end='\\end\s*{\s*document\s*}' contains=@texFoldGroup,@texDocGroup,@Spell
|
||||
syn region texPartZone matchgroup=texSection start='\\part\>' end='\ze\s*\\\%(part\>\|end\s*{\s*document\s*}\)' contains=@texFoldGroup,@texPartGroup,@Spell
|
||||
syn region texChapterZone matchgroup=texSection start='\\chapter\>' end='\ze\s*\\\%(chapter\>\|part\>\|end\s*{\s*document\s*}\)' contains=@texFoldGroup,@texChapterGroup,@Spell
|
||||
syn region texSectionZone matchgroup=texSection start='\\section\>' end='\ze\s*\\\%(section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' contains=@texFoldGroup,@texSectionGroup,@Spell
|
||||
syn region texSubSectionZone matchgroup=texSection start='\\subsection\>' end='\ze\s*\\\%(\%(sub\)\=section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' contains=@texFoldGroup,@texSubSectionGroup,@Spell
|
||||
syn region texSubSubSectionZone matchgroup=texSection start='\\subsubsection\>' end='\ze\s*\\\%(\%(sub\)\{,2}section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' contains=@texFoldGroup,@texSubSubSectionGroup,@Spell
|
||||
syn region texParaZone matchgroup=texSection start='\\paragraph\>' end='\ze\s*\\\%(paragraph\>\|\%(sub\)*section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' contains=@texFoldGroup,@texParaGroup,@Spell
|
||||
syn region texSubParaZone matchgroup=texSection start='\\subparagraph\>' end='\ze\s*\\\%(\%(sub\)\=paragraph\>\|\%(sub\)*section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' contains=@texFoldGroup,@Spell
|
||||
syn region texTitle matchgroup=texSection start='\\\%(author\|title\)\>\s*{' end='}' contains=@texFoldGroup,@Spell
|
||||
syn region texAbstract matchgroup=texSection start='\\begin\s*{\s*abstract\s*}' end='\\end\s*{\s*abstract\s*}' contains=@texFoldGroup,@Spell
|
||||
if g:tex_fold_enabled && has("folding")
|
||||
syn region texDocZone matchgroup=texSection start='\\begin\s*{\s*document\s*}' end='\\end\s*{\s*document\s*}' fold contains=@texFoldGroup,@texDocGroup
|
||||
syn region texPartZone matchgroup=texSection start='\\part\>' end='\ze\s*\\\%(part\>\|end\s*{\s*document\s*}\)' fold contains=@texFoldGroup,@texPartGroup
|
||||
syn region texChapterZone matchgroup=texSection start='\\chapter\>' end='\ze\s*\\\%(chapter\>\|part\>\|end\s*{\s*document\s*}\)' fold contains=@texFoldGroup,@texChapterGroup
|
||||
syn region texSectionZone matchgroup=texSection start='\\section\>' end='\ze\s*\\\%(section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' fold contains=@texFoldGroup,@texSectionGroup
|
||||
syn region texSubSectionZone matchgroup=texSection start='\\subsection\>' end='\ze\s*\\\%(\%(sub\)\=section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' fold contains=@texFoldGroup,@texSubSectionGroup
|
||||
syn region texSubSubSectionZone matchgroup=texSection start='\\subsubsection\>' end='\ze\s*\\\%(\%(sub\)\{,2}section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' fold contains=@texFoldGroup,@texSubSubSectionGroup
|
||||
syn region texParaZone matchgroup=texSection start='\\paragraph\>' end='\ze\s*\\\%(paragraph\>\|\%(sub\)*section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' fold contains=@texFoldGroup,@texParaGroup
|
||||
syn region texSubParaZone matchgroup=texSection start='\\subparagraph\>' end='\ze\s*\\\%(\%(sub\)\=paragraph\>\|\%(sub\)*section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' fold contains=@texFoldGroup
|
||||
syn region texTitle matchgroup=texSection start='\\\%(author\|title\)\>\s*{' end='}' fold contains=@texFoldGroup
|
||||
syn region texAbstract matchgroup=texSection start='\\begin\s*{\s*abstract\s*}' end='\\end\s*{\s*abstract\s*}' fold contains=@texFoldGroup
|
||||
else
|
||||
syn region texDocZone matchgroup=texSection start='\\begin\s*{\s*document\s*}' end='\\end\s*{\s*document\s*}' contains=@texFoldGroup,@texDocGroup
|
||||
syn region texPartZone matchgroup=texSection start='\\part\>' end='\ze\s*\\\%(part\>\|end\s*{\s*document\s*}\)' contains=@texFoldGroup,@texPartGroup
|
||||
syn region texChapterZone matchgroup=texSection start='\\chapter\>' end='\ze\s*\\\%(chapter\>\|part\>\|end\s*{\s*document\s*}\)' contains=@texFoldGroup,@texChapterGroup
|
||||
syn region texSectionZone matchgroup=texSection start='\\section\>' end='\ze\s*\\\%(section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' contains=@texFoldGroup,@texSectionGroup
|
||||
syn region texSubSectionZone matchgroup=texSection start='\\subsection\>' end='\ze\s*\\\%(\%(sub\)\=section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' contains=@texFoldGroup,@texSubSectionGroup
|
||||
syn region texSubSubSectionZone matchgroup=texSection start='\\subsubsection\>' end='\ze\s*\\\%(\%(sub\)\{,2}section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' contains=@texFoldGroup,@texSubSubSectionGroup
|
||||
syn region texParaZone matchgroup=texSection start='\\paragraph\>' end='\ze\s*\\\%(paragraph\>\|\%(sub\)*section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' contains=@texFoldGroup,@texParaGroup
|
||||
syn region texSubParaZone matchgroup=texSection start='\\subparagraph\>' end='\ze\s*\\\%(\%(sub\)\=paragraph\>\|\%(sub\)*section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' contains=@texFoldGroup
|
||||
syn region texTitle matchgroup=texSection start='\\\%(author\|title\)\>\s*{' end='}' contains=@texFoldGroup
|
||||
syn region texAbstract matchgroup=texSection start='\\begin\s*{\s*abstract\s*}' end='\\end\s*{\s*abstract\s*}' contains=@texFoldGroup
|
||||
endif
|
||||
endif
|
||||
|
||||
" Bad Math (mismatched): {{{1
|
||||
if !exists("tex_no_math")
|
||||
syn match texBadMath "\\end\s*{\s*\(array\|gathered\|bBpvV]matrix\|split\|smallmatrix\|xxalignat\)\s*}"
|
||||
syn match texBadMath "\\end\s*{\s*\(array\|gathered\|bBpvV]matrix\|split\|subequations\|smallmatrix\|xxalignat\)\s*}"
|
||||
syn match texBadMath "\\end\s*{\s*\(align\|alignat\|displaymath\|displaymath\|eqnarray\|equation\|flalign\|gather\|math\|multline\|xalignat\)\*\=\s*}"
|
||||
syn match texBadMath "\\[\])]"
|
||||
endif
|
||||
@@ -344,6 +384,7 @@ if !exists("tex_no_math")
|
||||
call TexNewMathZone("G","gather",1)
|
||||
call TexNewMathZone("H","math",1)
|
||||
call TexNewMathZone("I","multline",1)
|
||||
call TexNewMathZone("J","subequations",0)
|
||||
call TexNewMathZone("K","xalignat",1)
|
||||
call TexNewMathZone("L","xxalignat",0)
|
||||
|
||||
@@ -364,7 +405,11 @@ if !exists("tex_no_math")
|
||||
syn match texMathOper "[_^=]" contained
|
||||
|
||||
" Text Inside Math Zones: {{{2
|
||||
syn region texMathText matchgroup=texStatement start='\\\(\(inter\)\=text\|mbox\)\s*{' end='}' contains=@texFoldGroup,@Spell
|
||||
if !exists("g:tex_nospell") || !g:tex_nospell
|
||||
syn region texMathText matchgroup=texStatement start='\\\(\(inter\)\=text\|mbox\)\s*{' end='}' contains=@texFoldGroup,@Spell
|
||||
else
|
||||
syn region texMathText matchgroup=texStatement start='\\\(\(inter\)\=text\|mbox\)\s*{' end='}' contains=@texFoldGroup
|
||||
endif
|
||||
|
||||
" \left..something.. and \right..something.. support: {{{2
|
||||
syn match texMathDelimBad contained "\S"
|
||||
@@ -501,16 +546,15 @@ else
|
||||
endif
|
||||
|
||||
" Tex Reference Zones: {{{1
|
||||
syn match texRefZone '\\@samp\>' skipwhite nextgroup=texRefLabel
|
||||
syn match texRefZone '\\nocite\>' skipwhite nextgroup=texRefLabel
|
||||
syn match texRefZone '\\bibliography\>' skipwhite nextgroup=texRefLabel
|
||||
syn match texRefZone '\\label\>' skipwhite nextgroup=texRefLabel
|
||||
syn match texRefZone '\\\(page\|eq\)ref\>' skipwhite nextgroup=texRefLabel
|
||||
syn match texRefZone '\\v\=ref' skipwhite nextgroup=texRefLabel
|
||||
syn match texRefZone '\\cite\%([tp]\*\=\)\=' skipwhite nextgroup=texCiteOption,texCite
|
||||
syn region texRefLabel contained matchgroup=Delimiter start='{' end='}' contains=@texRefGroup
|
||||
syn region texCiteOption contained matchgroup=Delimiter start='\[' end=']' contains=@Spell,@texRefGroup,@texMathZones,texRefZone nextgroup=texCiteOption,texCite
|
||||
syn region texCite contained matchgroup=Delimiter start='{' end='}' contains=@texRefGroup,texCite
|
||||
syn region texZone matchgroup=texStatement start="@samp{" end="}\|%stopzone\>" contains=@texRefGroup
|
||||
syn region texRefZone matchgroup=texStatement start="\\nocite{" end="}\|%stopzone\>" contains=@texRefGroup
|
||||
syn region texRefZone matchgroup=texStatement start="\\bibliography{" end="}\|%stopzone\>" contains=@texRefGroup
|
||||
syn region texRefZone matchgroup=texStatement start="\\label{" end="}\|%stopzone\>" contains=@texRefGroup
|
||||
syn region texRefZone matchgroup=texStatement start="\\\(page\|eq\)ref{" end="}\|%stopzone\>" contains=@texRefGroup
|
||||
syn region texRefZone matchgroup=texStatement start="\\v\=ref{" end="}\|%stopzone\>" contains=@texRefGroup
|
||||
syn match texRefZone '\\cite\%([tp]\*\=\)\=' nextgroup=texRefOption,texCite
|
||||
syn region texRefOption contained matchgroup=Delimiter start='\[' end=']' contains=@texRefGroup,texRefZone nextgroup=texRefOption,texCite
|
||||
syn region texCite contained matchgroup=Delimiter start='{' end='}' contains=@texRefGroup,texRefZone,texCite
|
||||
|
||||
" Handle newcommand, newenvironment : {{{1
|
||||
syn match texNewCmd "\\newcommand\>" nextgroup=texCmdName skipwhite skipnl
|
||||
@@ -556,12 +600,14 @@ if has("conceal") && &enc == 'utf-8'
|
||||
if s:tex_conceal =~ 'm'
|
||||
let s:texMathList=[
|
||||
\ ['|' , '‖'],
|
||||
\ ['aleph' , 'ℵ'],
|
||||
\ ['angle' , '∠'],
|
||||
\ ['approx' , '≈'],
|
||||
\ ['ast' , '∗'],
|
||||
\ ['asymp' , '≍'],
|
||||
\ ['backepsilon' , '∍'],
|
||||
\ ['backsimeq' , '≃'],
|
||||
\ ['backslash' , '∖'],
|
||||
\ ['barwedge' , '⊼'],
|
||||
\ ['because' , '∵'],
|
||||
\ ['between' , '≬'],
|
||||
@@ -592,9 +638,11 @@ if has("conceal") && &enc == 'utf-8'
|
||||
\ ['circlearrowright', '↻'],
|
||||
\ ['circledast' , '⊛'],
|
||||
\ ['circledcirc' , '⊚'],
|
||||
\ ['clubsuit' , '♣'],
|
||||
\ ['complement' , '∁'],
|
||||
\ ['cong' , '≅'],
|
||||
\ ['coprod' , '∐'],
|
||||
\ ['copyright' , '©'],
|
||||
\ ['cup' , '∪'],
|
||||
\ ['Cup' , '⋓'],
|
||||
\ ['curlyeqprec' , '⋞'],
|
||||
@@ -603,6 +651,7 @@ if has("conceal") && &enc == 'utf-8'
|
||||
\ ['curlywedge' , '⋏'],
|
||||
\ ['dashv' , '⊣'],
|
||||
\ ['diamond' , '⋄'],
|
||||
\ ['diamondsuit' , '♢'],
|
||||
\ ['div' , '÷'],
|
||||
\ ['doteq' , '≐'],
|
||||
\ ['doteqdot' , '≑'],
|
||||
@@ -621,8 +670,10 @@ if has("conceal") && &enc == 'utf-8'
|
||||
\ ['eqslantgtr' , '⪖'],
|
||||
\ ['eqslantless' , '⪕'],
|
||||
\ ['equiv' , '≡'],
|
||||
\ ['ell' , 'ℓ'],
|
||||
\ ['exists' , '∃'],
|
||||
\ ['fallingdotseq' , '≒'],
|
||||
\ ['flat' , '♭'],
|
||||
\ ['forall' , '∀'],
|
||||
\ ['ge' , '≥'],
|
||||
\ ['geq' , '≥'],
|
||||
@@ -633,11 +684,14 @@ if has("conceal") && &enc == 'utf-8'
|
||||
\ ['gtreqless' , '⋛'],
|
||||
\ ['gtrless' , '≷'],
|
||||
\ ['gtrsim' , '≳'],
|
||||
\ ['hbar' , 'ℏ'],
|
||||
\ ['heartsuit' , '♡'],
|
||||
\ ['hookleftarrow' , '↩'],
|
||||
\ ['hookrightarrow' , '↪'],
|
||||
\ ['iiint' , '∭'],
|
||||
\ ['iint' , '∬'],
|
||||
\ ['Im' , 'ℑ'],
|
||||
\ ['imath' , 'ɩ'],
|
||||
\ ['in' , '∈'],
|
||||
\ ['infty' , '∞'],
|
||||
\ ['int' , '∫'],
|
||||
@@ -650,7 +704,7 @@ if has("conceal") && &enc == 'utf-8'
|
||||
\ ['left(' , '('],
|
||||
\ ['left\[' , '['],
|
||||
\ ['left\\{' , '{'],
|
||||
\ ['Leftrightarrow' , '⇔'],
|
||||
\ ['leftrightarrow' , '⇔'],
|
||||
\ ['leftrightsquigarrow', '↭'],
|
||||
\ ['leftthreetimes' , '⋋'],
|
||||
\ ['leq' , '≤'],
|
||||
@@ -667,6 +721,7 @@ if has("conceal") && &enc == 'utf-8'
|
||||
\ ['mid' , '∣'],
|
||||
\ ['mp' , '∓'],
|
||||
\ ['nabla' , '∇'],
|
||||
\ ['natural' , '♮'],
|
||||
\ ['ncong' , '≇'],
|
||||
\ ['nearrow' , '↗'],
|
||||
\ ['ne' , '≠'],
|
||||
@@ -705,6 +760,7 @@ if has("conceal") && &enc == 'utf-8'
|
||||
\ ['oslash' , '⊘'],
|
||||
\ ['otimes' , '⊗'],
|
||||
\ ['owns' , '∋'],
|
||||
\ ['P' , '¶'],
|
||||
\ ['partial' , '∂'],
|
||||
\ ['perp' , '⊥'],
|
||||
\ ['pitchfork' , '⋔'],
|
||||
@@ -716,6 +772,7 @@ if has("conceal") && &enc == 'utf-8'
|
||||
\ ['precnapprox' , '⪹'],
|
||||
\ ['precneqq' , '⪵'],
|
||||
\ ['precsim' , '≾'],
|
||||
\ ['prime' , '′'],
|
||||
\ ['prod' , '∏'],
|
||||
\ ['propto' , '∝'],
|
||||
\ ['rceil' , '⌉'],
|
||||
@@ -732,9 +789,12 @@ if has("conceal") && &enc == 'utf-8'
|
||||
\ ['risingdotseq' , '≓'],
|
||||
\ ['rmoustache' , '╮'],
|
||||
\ ['rtimes' , '⋊'],
|
||||
\ ['S' , '§'],
|
||||
\ ['searrow' , '↘'],
|
||||
\ ['setminus' , '∖'],
|
||||
\ ['sharp' , '♯'],
|
||||
\ ['sim' , '∼'],
|
||||
\ ['spadesuit' , '♠'],
|
||||
\ ['sphericalangle' , '∢'],
|
||||
\ ['sqcap' , '⊓'],
|
||||
\ ['sqcup' , '⊔'],
|
||||
@@ -767,6 +827,7 @@ if has("conceal") && &enc == 'utf-8'
|
||||
\ ['times' , '×'],
|
||||
\ ['to' , '→'],
|
||||
\ ['top' , '⊤'],
|
||||
\ ['triangle' , '∆'],
|
||||
\ ['triangleleft' , '⊲'],
|
||||
\ ['trianglelefteq' , '⊴'],
|
||||
\ ['triangleq' , '≜'],
|
||||
@@ -788,6 +849,7 @@ if has("conceal") && &enc == 'utf-8'
|
||||
\ ['vee' , '∨'],
|
||||
\ ['Vvdash' , '⊪'],
|
||||
\ ['wedge' , '∧'],
|
||||
\ ['wp' , '℘'],
|
||||
\ ['wr' , '≀']]
|
||||
for texmath in s:texMathList
|
||||
if texmath[0] =~ '\w$'
|
||||
@@ -804,6 +866,27 @@ if has("conceal") && &enc == 'utf-8'
|
||||
syn match texMathSymbol '\\gg\>' contained conceal cchar=⟫
|
||||
syn match texMathSymbol '\\ll\>' contained conceal cchar=⟪
|
||||
endif
|
||||
|
||||
syn match texMathSymbol '\\hat{a}' contained conceal cchar=â
|
||||
syn match texMathSymbol '\\hat{A}' contained conceal cchar=Â
|
||||
syn match texMathSymbol '\\hat{c}' contained conceal cchar=ĉ
|
||||
syn match texMathSymbol '\\hat{C}' contained conceal cchar=Ĉ
|
||||
syn match texMathSymbol '\\hat{e}' contained conceal cchar=ê
|
||||
syn match texMathSymbol '\\hat{E}' contained conceal cchar=Ê
|
||||
syn match texMathSymbol '\\hat{g}' contained conceal cchar=ĝ
|
||||
syn match texMathSymbol '\\hat{G}' contained conceal cchar=Ĝ
|
||||
syn match texMathSymbol '\\hat{i}' contained conceal cchar=î
|
||||
syn match texMathSymbol '\\hat{I}' contained conceal cchar=Î
|
||||
syn match texMathSymbol '\\hat{o}' contained conceal cchar=ô
|
||||
syn match texMathSymbol '\\hat{O}' contained conceal cchar=Ô
|
||||
syn match texMathSymbol '\\hat{s}' contained conceal cchar=ŝ
|
||||
syn match texMathSymbol '\\hat{S}' contained conceal cchar=Ŝ
|
||||
syn match texMathSymbol '\\hat{u}' contained conceal cchar=û
|
||||
syn match texMathSymbol '\\hat{U}' contained conceal cchar=Û
|
||||
syn match texMathSymbol '\\hat{w}' contained conceal cchar=ŵ
|
||||
syn match texMathSymbol '\\hat{W}' contained conceal cchar=Ŵ
|
||||
syn match texMathSymbol '\\hat{y}' contained conceal cchar=ŷ
|
||||
syn match texMathSymbol '\\hat{Y}' contained conceal cchar=Ŷ
|
||||
endif
|
||||
|
||||
" Greek {{{2
|
||||
@@ -855,8 +938,8 @@ if has("conceal") && &enc == 'utf-8'
|
||||
|
||||
" Superscripts/Subscripts {{{2
|
||||
if s:tex_conceal =~ 's'
|
||||
syn region texSuperscript matchgroup=Delimiter start='\^{' end='}' contained concealends contains=texSuperscripts,texStatement,texSubscript,texSuperscript,texMathMatcher
|
||||
syn region texSubscript matchgroup=Delimiter start='_{' end='}' contained concealends contains=texSubscripts,texStatement,texSubscript,texSuperscript,texMathMatcher
|
||||
syn region texSuperscript matchgroup=Delimiter start='\^{' skip="\\\\\|\\[{}]" end='}' contained concealends contains=texSpecialChar,texSuperscripts,texStatement,texSubscript,texSuperscript,texMathMatcher
|
||||
syn region texSubscript matchgroup=Delimiter start='_{' skip="\\\\\|\\[{}]" end='}' contained concealends contains=texSpecialChar,texSubscripts,texStatement,texSubscript,texSuperscript,texMathMatcher
|
||||
fun! s:SuperSub(group,leader,pat,cchar)
|
||||
exe 'syn match '.a:group." '".a:leader.a:pat."' contained conceal cchar=".a:cchar
|
||||
exe 'syn match '.a:group."s '".a:pat."' contained conceal cchar=".a:cchar.' nextgroup='.a:group.'s'
|
||||
@@ -980,18 +1063,23 @@ if has("conceal") && &enc == 'utf-8'
|
||||
endfor
|
||||
endfun
|
||||
" \` \' \^ \" \~ \. \c \H \k \r \u \v
|
||||
call s:Accents('a','à','á','â','ä','ã',' ',' ',' ','ą','å','ă','ă')
|
||||
call s:Accents('A','À','Á','Â','Ä','Ã',' ',' ',' ','Ą','Å','Ă','Ă')
|
||||
call s:Accents('a','à','á','â','ä','ã','ȧ',' ',' ','ą','å','ă','ă')
|
||||
call s:Accents('A','À','Á','Â','Ä','Ã','Ȧ',' ',' ','Ą','Å','Ă','Ă')
|
||||
call s:Accents('c',' ','ć','ĉ',' ',' ','ċ','ç',' ',' ',' ',' ','č')
|
||||
call s:Accents('C',' ','Ć','Ĉ',' ',' ','Ċ','Ç',' ',' ',' ',' ','Č')
|
||||
call s:Accents('d',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ','ď')
|
||||
call s:Accents('D',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ','Ď')
|
||||
call s:Accents('e','è','é','ê','ë','ẽ','ė','ȩ',' ','ę',' ','ĕ','ě')
|
||||
call s:Accents('E','È','É','Ê','Ë','Ẽ','Ė','Ȩ',' ','Ę',' ','Ĕ','Ě')
|
||||
call s:Accents('g',' ',' ',' ',' ',' ','ġ','ģ',' ',' ',' ','ğ',' ')
|
||||
call s:Accents('G',' ',' ',' ',' ',' ','Ġ','Ģ',' ',' ',' ','Ğ',' ')
|
||||
call s:Accents('g',' ','ǵ','ĝ',' ',' ','ġ','ģ',' ',' ',' ','ğ',' ')
|
||||
call s:Accents('G',' ','Ǵ','Ĝ',' ',' ','Ġ','Ģ',' ',' ',' ','Ğ',' ')
|
||||
call s:Accents('h',' ',' ','ĥ',' ',' ',' ',' ',' ',' ',' ',' ','ȟ')
|
||||
call s:Accents('H',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ','Ȟ')
|
||||
call s:Accents('i','ì','í','î','ï','ĩ','į',' ',' ',' ',' ','ĭ',' ')
|
||||
call s:Accents('I','Ì','Í','Î','Ï','Ĩ','İ',' ',' ',' ',' ','Ĭ',' ')
|
||||
call s:Accents('J',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ','ǰ')
|
||||
call s:Accents('k',' ',' ',' ',' ',' ',' ','ķ',' ',' ',' ',' ',' ')
|
||||
call s:Accents('K',' ',' ',' ',' ',' ',' ','Ķ',' ',' ',' ',' ',' ')
|
||||
call s:Accents('l',' ','ĺ','ľ',' ',' ',' ','ļ',' ',' ',' ',' ','ľ')
|
||||
call s:Accents('L',' ','Ĺ','Ľ',' ',' ',' ','Ļ',' ',' ',' ',' ','Ľ')
|
||||
call s:Accents('n',' ','ń',' ',' ','ñ',' ','ņ',' ',' ',' ',' ','ň')
|
||||
@@ -1000,12 +1088,12 @@ if has("conceal") && &enc == 'utf-8'
|
||||
call s:Accents('O','Ò','Ó','Ô','Ö','Õ','Ȯ',' ','Ő','Ǫ',' ','Ŏ',' ')
|
||||
call s:Accents('r',' ','ŕ',' ',' ',' ',' ','ŗ',' ',' ',' ',' ','ř')
|
||||
call s:Accents('R',' ','Ŕ',' ',' ',' ',' ','Ŗ',' ',' ',' ',' ','Ř')
|
||||
call s:Accents('s',' ','ś','ŝ',' ',' ',' ','ş',' ',' ',' ',' ','š')
|
||||
call s:Accents('s',' ','ś','ŝ',' ',' ',' ','ş',' ','ȿ',' ',' ','š')
|
||||
call s:Accents('S',' ','Ś','Ŝ',' ',' ',' ','Ş',' ',' ',' ',' ','Š')
|
||||
call s:Accents('t',' ',' ',' ',' ',' ',' ','ţ',' ',' ',' ',' ','ť')
|
||||
call s:Accents('T',' ',' ',' ',' ',' ',' ','Ţ',' ',' ',' ',' ','Ť')
|
||||
call s:Accents('u','ù','ú','û','ü','ũ',' ',' ','ű',' ','ů','ŭ',' ')
|
||||
call s:Accents('U','Ù','Ú','Û','Ü','Ũ',' ',' ','Ű',' ','Ů','Ŭ',' ')
|
||||
call s:Accents('u','ù','ú','û','ü','ũ',' ',' ','ű','ų','ů','ŭ','ǔ')
|
||||
call s:Accents('U','Ù','Ú','Û','Ü','Ũ',' ',' ','Ű','Ų','Ů','Ŭ','Ǔ')
|
||||
call s:Accents('w',' ',' ','ŵ',' ',' ',' ',' ',' ',' ',' ',' ',' ')
|
||||
call s:Accents('W',' ',' ','Ŵ',' ',' ',' ',' ',' ',' ',' ',' ',' ')
|
||||
call s:Accents('y','ỳ','ý','ŷ','ÿ','ỹ',' ',' ',' ',' ',' ',' ',' ')
|
||||
@@ -1068,6 +1156,7 @@ if did_tex_syntax_inits == 1
|
||||
HiLink texError Error
|
||||
endif
|
||||
|
||||
HiLink texCite texRefZone
|
||||
HiLink texDefCmd texDef
|
||||
HiLink texDefName texDef
|
||||
HiLink texDocType texCmdName
|
||||
@@ -1092,7 +1181,6 @@ if did_tex_syntax_inits == 1
|
||||
HiLink texMathZoneV texMath
|
||||
HiLink texMathZoneZ texMath
|
||||
endif
|
||||
HiLink texRefZone Identifier
|
||||
HiLink texSectionMarker texCmdName
|
||||
HiLink texSectionName texSection
|
||||
HiLink texSpaceCode texStatement
|
||||
@@ -1101,7 +1189,6 @@ if did_tex_syntax_inits == 1
|
||||
HiLink texTypeStyle texType
|
||||
|
||||
" Basic TeX highlighting groups
|
||||
HiLink texCite Special
|
||||
HiLink texCmdArgs Number
|
||||
HiLink texCmdName Statement
|
||||
HiLink texComment Comment
|
||||
@@ -1117,7 +1204,7 @@ if did_tex_syntax_inits == 1
|
||||
HiLink texNewCmd Statement
|
||||
HiLink texNewEnv Statement
|
||||
HiLink texOption Number
|
||||
HiLink texRefLabel Special
|
||||
HiLink texRefZone Special
|
||||
HiLink texSection PreCondit
|
||||
HiLink texSpaceCodeChar Special
|
||||
HiLink texSpecialChar SpecialChar
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" Vim syntax file
|
||||
" Language: Verilog
|
||||
" Maintainer: Mun Johl <Mun.Johl@emulex.com>
|
||||
" Last Update: Fri Oct 13 11:44:32 PDT 2006
|
||||
" Last Update: Wed Jul 20 16:04:19 PDT 2011
|
||||
|
||||
" For version 5.x: Clear all syntax items
|
||||
" For version 6.x: Quit when a syntax file was already loaded
|
||||
@@ -11,11 +11,13 @@ elseif exists("b:current_syntax")
|
||||
finish
|
||||
endif
|
||||
|
||||
" Set the local value of the 'iskeyword' option
|
||||
" Set the local value of the 'iskeyword' option.
|
||||
" NOTE: '?' was added so that verilogNumber would be processed correctly when
|
||||
" '?' is the last character of the number.
|
||||
if version >= 600
|
||||
setlocal iskeyword=@,48-57,_,192-255
|
||||
setlocal iskeyword=@,48-57,63,_,192-255
|
||||
else
|
||||
set iskeyword=@,48-57,_,192-255
|
||||
set iskeyword=@,48-57,63,_,192-255
|
||||
endif
|
||||
|
||||
" A bunch of useful Verilog keywords
|
||||
@@ -48,7 +50,7 @@ syn keyword verilogLabel begin end fork join
|
||||
syn keyword verilogConditional if else case casex casez default endcase
|
||||
syn keyword verilogRepeat forever repeat while for
|
||||
|
||||
syn keyword verilogTodo contained TODO
|
||||
syn keyword verilogTodo contained TODO FIXME
|
||||
|
||||
syn match verilogOperator "[&|~><!)(*#%@+/=?:;}{,.\^\-\[\]]"
|
||||
|
||||
@@ -113,17 +115,17 @@ if version >= 508 || !exists("did_verilog_syn_inits")
|
||||
" The default highlighting.
|
||||
HiLink verilogCharacter Character
|
||||
HiLink verilogConditional Conditional
|
||||
HiLink verilogRepeat Repeat
|
||||
HiLink verilogString String
|
||||
HiLink verilogTodo Todo
|
||||
HiLink verilogComment Comment
|
||||
HiLink verilogConstant Constant
|
||||
HiLink verilogLabel Label
|
||||
HiLink verilogNumber Number
|
||||
HiLink verilogOperator Special
|
||||
HiLink verilogStatement Statement
|
||||
HiLink verilogGlobal Define
|
||||
HiLink verilogDirective SpecialComment
|
||||
HiLink verilogRepeat Repeat
|
||||
HiLink verilogString String
|
||||
HiLink verilogTodo Todo
|
||||
HiLink verilogComment Comment
|
||||
HiLink verilogConstant Constant
|
||||
HiLink verilogLabel Label
|
||||
HiLink verilogNumber Number
|
||||
HiLink verilogOperator Special
|
||||
HiLink verilogStatement Statement
|
||||
HiLink verilogGlobal Define
|
||||
HiLink verilogDirective SpecialComment
|
||||
HiLink verilogEscape Special
|
||||
|
||||
delcommand HiLink
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
" Vim syntax file
|
||||
" Language: Vim 7.3 script
|
||||
" Maintainer: Dr. Charles E. Campbell, Jr. <NdrOchipS@PcampbellAfamily.Mbiz>
|
||||
" Last Change: Jan 10, 2011
|
||||
" Version: 7.3-07
|
||||
" Last Change: Jul 18, 2011
|
||||
" Version: 7.3-08
|
||||
" Automatically generated keyword lists: {{{1
|
||||
|
||||
" Quit when a syntax file was already loaded {{{2
|
||||
@@ -22,31 +22,31 @@ syn keyword vimCommand contained abc[lear] argdo au bf[irst] bp[revious] br[ewin
|
||||
syn keyword vimCommand contained abo[veleft] arge[dit] bad[d] bl[ast] br bro[wse] buffers caddb[uffer] cc cfir[st] chd[ir] clo[se] cn[ext] col[der] con cpf[ile] cstag debugg[reedy] delm[arks] diffp diffu[pdate] do e echon elsei[f] endfun Error filename fin[d] folddoc[losed] fu[nction] gs?pat?sub? helpf[ind] i imapc[lear] iuna[bbrev] keepj[umps] lad[dexpr] later lcscope lfir[st] lh[elpgrep] lmapc[lear] lnf loadkeymap lop[en] lua ma menut mk[exrc] mo mz nb[key] nkf o ownsyntax pe p:h:h p:r profd[el] pta[g] ptn[ext] pw[d] python3 r redi[r] Rena ri[ght] rubyd[o] san[dbox] sbm[odified] scrip setf[iletype] si sla[st] sn[ext] s@\n@\=\r" spelld[ump] sp[lit] start stopi[nsert] s?version?main? sync tabc[lose] tabm[ove] tabp[revious] tcld[o] tl[ast] tN[ext] tr[ewind] un unl verb[ose] vimgrepa[dd] w winp[os] wqa[ll] X XMLent xunmenu
|
||||
syn keyword vimCommand contained al[l] argg[lobal] ba[ll] bm[odified] brea[k] browseset bun[load] cad[dexpr] ccl[ose] cgetb[uffer] che[ckpath] cmapc[lear] cN[ext] colo[rscheme] conf[irm] cp[revious] cuna[bbrev] del di diffpatch dig doau ea e[dit] em[enu] endf[unction] ex files fini[sh] foldd[oopen] g gui helpg[rep] ia in j[oin] kee[pmarks] laddf[ile] lb[uffer] le[ft] lgetb[uffer] l[ist] lN lNf lo[adview] lpf[ile] luado mak[e] menut[ranslate] mks[ession] mod[e] mzf[ile] nbs[tart] nmapc[lear] ol[dfiles] p ped[it] po[p] pre[serve] prof[ile] ptf[irst] ptN[ext] py q re red[o] Renu rightb[elow] rubyf[ile] sa[rgument] sbn[ext] scripte[ncoding] setg[lobal] sig sl[eep] sN[ext] so spe[llgood] spr[evious] startg[replace] sts[elect] s?version?main?:p syncbind tabd[o] tabN tabr[ewind] tclf[ile] tm TOhtml try una[bbreviate] unlo[ckvar] ve[rsion] vi[sual] wa[ll] win[size] w[rite] xa[ll] XMLns xwininfo
|
||||
syn keyword vimCommand contained Allargs argl[ocal] bar bn[ext] breaka[dd] bu bw[ipeout] caddf[ile] cd cgete[xpr] checkt[ime] cmdname cnf com con[tinue] cq[uit] cw[indow] delc[ommand] diffg[et] diffpu[t] dig[raphs] dr[op] earlier e:e emenu* en[dif] exi[t] filet fir[st] foldo[pen] get gvim helpt[ags] iabc[lear] index ju[mps] l lan lc[d] lefta[bove] lgete[xpr] ll lne lnf[ile] locale lp[revious] luafile Man mes mksp[ell] m[ove] mz[scheme] ne noa omapc[lear] p: pe[rl] popu prev[ious] promptf[ind] ptj[ump] ptp[revious] py3 qa[ll] r:e redr[aw] res[ize] r:r rundo sav[eas] sbN[ext] scrip[tnames] setl[ocal] sign sm[agic] sni[ff] sor[t] spelli[nfo] sre[wind] star[tinsert] sun[hide] sv[iew] synlist tabe[dit] tabnew tabs te[aroff] tm[enu] to[pleft] ts[elect] u[ndo] uns[ilent] vert[ical] viu[sage] wh[ile] wn[ext] ws[verb] x[it] xnoreme y[ank]
|
||||
syn keyword vimCommand contained ar ar[gs]
|
||||
syn keyword vimCommand contained ar ar[gs]
|
||||
syn match vimCommand contained "\<z[-+^.=]\="
|
||||
|
||||
" vimOptions are caught only when contained in a vimSet {{{2
|
||||
syn keyword vimOption contained acd ambiwidth arabicshape autowriteall backupdir bdlay binary breakat bufhidden cd ci cinw co commentstring confirm cpoptions cscopetag csto cwh dg dip eadirection ek equalprg ex fdi fen fileencodings flp foldexpr foldnestmax fp gfm grepformat guifontwide helpheight highlight hlg im imi incsearch infercase isk keymap langmenu linespace loadplugins macatsui maxcombine mef mls modelines mousehide mp nu omnifunc paragraphs penc pm printdevice printoptions quoteescape restorescreen rnu rulerformat scr sect sft shellredir shm showmode sj smd spell splitbelow ssl stl sw sxq tabpagemax tags tbis terse thesaurus titleold toolbariconsize tsr ttyfast tx undofile ut verbosefile virtualedit wb wfw wildcharm winaltkeys winminwidth wmnu write
|
||||
syn keyword vimOption contained ai ambw ari aw backupext beval biosk brk buflisted cdpath cin cinwords cocu compatible consk cpt cscopetagorder csverb debug dict dir eb enc errorbells expandtab fdl fenc fileformat fml foldignore foldopen fs gfn grepprg guiheadroom helplang history hls imactivatekey iminsert inde insertmode iskeyword keymodel laststatus lisp lpl magic maxfuncdepth menuitems mm modifiable mousem mps number opendevice paste pex pmbcs printencoding prompt rdt revins ro runtimepath scroll sections sh shellslash shortmess showtabline slm sn spellcapcheck splitright ssop stmp swapfile syn tabstop tagstack tbs textauto tildeop titlestring top ttimeout ttym uc undolevels vb vfile visualbell wc wh wildignore window winwidth wmw writeany
|
||||
syn keyword vimOption contained akm anti arshape awa backupskip bex bioskey browsedir buftype cedit cindent clipboard cole complete conskey crb cscopeverbose cuc deco dictionary directory ed encoding errorfile exrc fdls fencs fileformats fmr foldlevel foldtext fsync gfs gtl guioptions hf hk hlsearch imak ims indentexpr is isp keywordprg lazyredraw lispwords ls makeef maxmapdepth mfd mmd modified mousemodel msm numberwidth operatorfunc pastetoggle pexpr pmbfn printexpr pt readonly ri rs sb scrollbind secure shcf shelltemp shortname shq sm so spellfile spr st sts swapsync synmaxcol tag tal tenc textmode timeout tl tpm ttimeoutlen ttymouse udf undoreload vbs vi vop wcm whichwrap wildmenu winfixheight wiv wop writebackup
|
||||
syn keyword vimOption contained al antialias autochdir background balloondelay bexpr bk bs casemap cf cink cmdheight colorcolumn completefunc copyindent cryptmethod cspc cul def diff display edcompatible endofline errorformat fcl fdm fex filetype fo foldlevelstart formatexpr ft gfw gtt guipty hh hkmap ic imc imsearch indentkeys isf isprint km lbr list lsp makeprg maxmem mh mmp more mouses mzq nuw opfunc patchexpr pfn popt printfont pumheight redrawtime rightleft rtp sbo scrolljump sel shell shelltype showbreak si smartcase softtabstop spelllang sps sta su swb syntax tagbsearch tb term textwidth timeoutlen tm tr ttm ttyscroll udir updatecount vdir viewdir wa wd wi wildmode winfixwidth wiw wrap writedelay
|
||||
syn keyword vimOption contained aleph ar autoindent backspace ballooneval bg bkc bsdir cb cfu cinkeys cmdwinheight columns completeopt cot cscopepathcomp csprg cursorbind define diffexpr dy ef eol esckeys fcs fdn ff fillchars foldclose foldmarker formatlistpat gcr ghr guicursor guitablabel hi hkmapp icon imcmdline inc indk isfname joinspaces kmp lcs listchars lw mat maxmempattern mis mmt mouse mouseshape mzquantum odev osfiletype patchmode ph preserveindent printheader pvh relativenumber rightleftcmd ru sbr scrolloff selection shellcmdflag shellxquote showcmd sidescroll smartindent sol spellsuggest sr stal sua swf ta taglength tbi termbidi tf title to ts tty ttytype ul updatetime ve viewoptions wak weirdinvert wig wildoptions winheight wm wrapmargin ws
|
||||
syn keyword vimOption contained allowrevins arab autoread backup balloonexpr bh bl bsk cc ch cino cmp com concealcursor cp cscopeprg csqf cursorcolumn delcombine diffopt ea efm ep et fdc fdo ffs fk foldcolumn foldmethod formatoptions gd go guifont guitabtooltip hid hkp iconstring imd include inex isi js kp linebreak lm lz matchpairs maxmemtot mkspellmem mod mousef mouset nf oft pa path pheader previewheight printmbcharset pvw remap rl ruf sc scrollopt selectmode shellpipe shiftround showfulltag sidescrolloff smarttab sp spf srr startofline suffixes switchbuf tabline tagrelative tbidi termencoding tgst titlelen toolbar tsl ttybuiltin tw undodir ur verbose viminfo warn wfh wildchar wim winminheight wmh wrapscan ww
|
||||
syn keyword vimOption contained altkeymap arabic autowrite backupcopy bdir bin bomb bt ccv charconvert cinoptions cms comments conceallevel cpo cscopequickfix cst cursorline dex digraph ead ei equalalways eventignore fde fdt fileencoding fkmap foldenable foldminlines formatprg gdefault gp guifontset helpfile hidden hl ignorecase imdisable includeexpr inf isident key langmap lines lmap ma matchtime mco ml modeline mousefocus mousetime nrformats ofu para pdev pi previewwindow printmbfont qe report rlc ruler scb scs sessionoptions shellquote shiftwidth showmatch siso smc spc spl ss statusline suffixesadd sws
|
||||
syn keyword vimOption contained acd ambiwidth arabicshape autowriteall backupdir bdlay binary breakat bufhidden cd ci cinw co commentstring confirm cpoptions cscoperelative csre cursorcolumn delcombine diffopt ea efm ep et fdc fdo ffs fk foldcolumn foldmethod formatoptions gd go guifont guitabtooltip hid hkp iconstring imd include inex isi js kp linebreak lm lz matchpairs maxmemtot mkspellmem mod mousef mouset nf oft pa path pheader previewheight printmbcharset pvw remap rl ruf sc scrollopt selectmode shellpipe shiftround showfulltag sidescrolloff smarttab sp spf srr startofline suffixes switchbuf tabline tags tbs textmode timeout tl tpm ttimeoutlen ttymouse udf undoreload vbs vi vop wcm whichwrap wildignore winaltkeys winminwidth wmnu write
|
||||
syn keyword vimOption contained ai ambw ari aw backupext beval biosk brk buflisted cdpath cin cinwords cocu compatible consk cpt cscopetag cst cursorline dex digraph ead ei equalalways eventignore fde fdt fileencoding fkmap foldenable foldminlines formatprg gdefault gp guifontset helpfile hidden hl ignorecase imdisable includeexpr inf isident key langmap lines lmap ma matchtime mco ml modeline mousefocus mousetime nrformats ofu para pdev pi previewwindow printmbfont qe report rlc ruler scb scs sessionoptions shellquote shiftwidth showmatch siso smc spc spl ss statusline suffixesadd sws tabpagemax tagstack tenc textwidth timeoutlen tm tr ttm ttyscroll udir updatecount vdir viewdir wa wd wi wildignorecase window winwidth wmw writeany
|
||||
syn keyword vimOption contained akm anti arshape awa backupskip bex bioskey browsedir buftype cedit cindent clipboard cole complete conskey crb cscopetagorder csto cwh dg dip eadirection ek equalprg ex fdi fen fileencodings flp foldexpr foldnestmax fp gfm grepformat guifontwide helpheight highlight hlg im imi incsearch infercase isk keymap langmenu linespace loadplugins macatsui maxcombine mef mls modelines mousehide mp nu omnifunc paragraphs penc pm printdevice printoptions quoteescape restorescreen rnu rulerformat scr sect sft shellredir shm showmode sj smd spell splitbelow ssl stl sw sxq tabstop tal term tf title to ts tty ttytype ul updatetime ve viewoptions wak weirdinvert wic wildmenu winfixheight wiv wop writebackup
|
||||
syn keyword vimOption contained al antialias autochdir background balloondelay bexpr bk bs casemap cf cink cmdheight colorcolumn completefunc copyindent cryptmethod cscopeverbose csverb debug dict dir eb enc errorbells expandtab fdl fenc fileformat fml foldignore foldopen fs gfn grepprg guiheadroom helplang history hls imactivatekey iminsert inde insertmode iskeyword keymodel laststatus lisp lpl magic maxfuncdepth menuitems mm modifiable mousem mps number opendevice paste pex pmbcs printencoding prompt rdt revins ro runtimepath scroll sections sh shellslash shortmess showtabline slm sn spellcapcheck splitright ssop stmp swapfile syn tag tb termbidi tgst titlelen toolbar tsl ttybuiltin tw undodir ur verbose viminfo warn wfh wig wildmode winfixwidth wiw wrap writedelay
|
||||
syn keyword vimOption contained aleph ar autoindent backspace ballooneval bg bkc bsdir cb cfu cinkeys cmdwinheight columns completeopt cot cscopepathcomp cspc cuc deco dictionary directory ed encoding errorfile exrc fdls fencs fileformats fmr foldlevel foldtext fsync gfs gtl guioptions hf hk hlsearch imak ims indentexpr is isp keywordprg lazyredraw lispwords ls makeef maxmapdepth mfd mmd modified mousemodel msm numberwidth operatorfunc pastetoggle pexpr pmbfn printexpr pt readonly ri rs sb scrollbind secure shcf shelltemp shortname shq sm so spellfile spr st sts swapsync synmaxcol tagbsearch tbi termencoding thesaurus titleold toolbariconsize tsr ttyfast tx undofile ut verbosefile virtualedit wb wfw wildchar wildoptions winheight wm wrapmargin ws
|
||||
syn keyword vimOption contained allowrevins arab autoread backup balloonexpr bh bl bsk cc ch cino cmp com concealcursor cp cscopeprg csprg cul def diff display edcompatible endofline errorformat fcl fdm fex filetype fo foldlevelstart formatexpr ft gfw gtt guipty hh hkmap ic imc imsearch indentkeys isf isprint km lbr list lsp makeprg maxmem mh mmp more mouses mzq nuw opfunc patchexpr pfn popt printfont pumheight redrawtime rightleft rtp sbo scrolljump sel shell shelltype showbreak si smartcase softtabstop spelllang sps sta su swb syntax taglength tbidi terse tildeop titlestring top ttimeout ttym uc undolevels vb vfile visualbell wc wh wildcharm wim winminheight wmh wrapscan ww
|
||||
syn keyword vimOption contained altkeymap arabic autowrite backupcopy bdir bin bomb bt ccv charconvert cinoptions cms comments conceallevel cpo cscopequickfix csqf cursorbind define diffexpr dy ef eol esckeys fcs fdn ff fillchars foldclose foldmarker formatlistpat gcr ghr guicursor guitablabel hi hkmapp icon imcmdline inc indk isfname joinspaces kmp lcs listchars lw mat maxmempattern mis mmt mouse mouseshape mzquantum odev osfiletype patchmode ph preserveindent printheader pvh relativenumber rightleftcmd ru sbr scrolloff selection shellcmdflag shellxquote showcmd sidescroll smartindent sol spellsuggest sr stal sua swf ta tagrelative tbis textauto
|
||||
|
||||
" vimOptions: These are the turn-off setting variants {{{2
|
||||
syn keyword vimOption contained noacd noallowrevins noantialias noarabic noarshape noautoread noaw noballooneval nobinary nobk nobuflisted nocin noconfirm nocopyindent nocscopetag nocsverb nocursorbind nodeco nodiff noeb noek noeol noerrorbells noet noexpandtab nofen nofkmap nogd noguipty nohidden nohkmap nohkp nohlsearch noicon noim noimcmdline noimdisable noinf noinsertmode nojoinspaces nolazyredraw nolinebreak nolist nolpl noma nomagic noml nomodeline nomodified nomousef nomousehide nonumber noopendevice nopi nopreviewwindow nopvw norelativenumber norestorescreen nori norl noro noru nosb noscb noscs nosft noshelltemp noshortname noshowfulltag noshowmode nosm nosmartindent nosmd nosol nosplitbelow nospr nossl nostartofline noswapfile nota notagrelative notbi notbs noterse notextmode notgst notimeout noto notr nottybuiltin notx novisualbell nowarn noweirdinvert nowfw nowinfixheight nowiv nowrap nowrite nowritebackup
|
||||
syn keyword vimOption contained noai noaltkeymap noar noarabicshape noautochdir noautowrite noawa nobeval nobiosk nobl nocf nocindent noconsk nocp nocscopeverbose nocuc nocursorcolumn nodelcombine nodigraph noed noendofline noequalalways noesckeys noex noexrc nofk nofoldenable nogdefault nohid nohk nohkmapp nohls noic noignorecase noimc noimd noincsearch noinfercase nois nojs nolbr nolisp noloadplugins nolz nomacatsui nomh nomod nomodifiable nomore nomousefocus nonu noodev nopaste nopreserveindent noprompt noreadonly noremap norevins norightleft nornu nors noruler nosc noscrollbind nosecure noshellslash noshiftround noshowcmd noshowmatch nosi nosmartcase nosmarttab nosn nospell nosplitright nosr nosta nostmp noswf notagbsearch notagstack notbidi notermbidi notextauto notf notildeop notitle notop nottimeout nottyfast novb nowa nowb nowfh nowildmenu nowinfixwidth nowmnu nowrapscan nowriteany nows
|
||||
syn keyword vimOption contained noakm noanti noarab noari noautoindent noautowriteall nobackup nobin nobioskey nobomb noci nocompatible noconskey nocrb nocst nocul nocursorline nodg noea noedcompatible
|
||||
syn keyword vimOption contained noacd noallowrevins noantialias noarabic noarshape noautoread noaw noballooneval nobinary nobk nobuflisted nocin noconfirm nocopyindent nocscopetag nocsverb nocursorbind nodeco nodiff noeb noek noequalalways noesckeys noex noexrc nofk nofoldenable nogdefault nohid nohk nohkmapp nohls noic noignorecase noimc noimd noincsearch noinfercase nois nojs nolbr nolisp noloadplugins nolz nomacatsui nomh nomod nomodifiable nomore nomousefocus nonu noodev nopaste nopreserveindent noprompt noreadonly noremap norevins norightleft nornu nors noruler nosc noscrollbind nosecure noshellslash noshiftround noshowcmd noshowmatch nosi nosmartcase nosmarttab nosn nospell nosplitright nosr nosta nostmp noswf notagbsearch notagstack notbidi notermbidi notextauto notf notildeop notitle notop nottimeout nottyfast novb nowa nowb nowfh nowildignorecase* * nowinfixheight nowiv nowrap nowrite nowritebackup
|
||||
syn keyword vimOption contained noai noaltkeymap noar noarabicshape noautochdir noautowrite noawa nobeval nobiosk nobl nocf nocindent noconsk nocp nocscopeverbose nocuc nocursorcolumn nodelcombine nodigraph noed noendofline noerrorbells noet noexpandtab nofen nofkmap nogd noguipty nohidden nohkmap nohkp nohlsearch noicon noim noimcmdline noimdisable noinf noinsertmode nojoinspaces nolazyredraw nolinebreak nolist nolpl noma nomagic noml nomodeline nomodified nomousef nomousehide nonumber noopendevice nopi nopreviewwindow nopvw norelativenumber norestorescreen nori norl noro noru nosb noscb noscs nosft noshelltemp noshortname noshowfulltag noshowmode nosm nosmartindent nosmd nosol nosplitbelow nospr nossl nostartofline noswapfile nota notagrelative notbi notbs noterse notextmode notgst notimeout noto notr nottybuiltin notx novisualbell nowarn noweirdinvert nowfw nowildmenu nowinfixwidth nowmnu nowrapscan nowriteany nows
|
||||
syn keyword vimOption contained noakm noanti noarab noari noautoindent noautowriteall nobackup nobin nobioskey nobomb noci nocompatible noconskey nocrb nocst nocul nocursorline nodg noea noedcompatible noeol
|
||||
|
||||
" vimOptions: These are the invertible variants {{{2
|
||||
syn keyword vimOption contained invacd invallowrevins invantialias invarabic invarshape invautoread invaw invballooneval invbinary invbk invbuflisted invcin invconfirm invcopyindent invcscopetag invcsverb invcursorbind invdeco invdiff inveb invek inveol inverrorbells invet invexpandtab invfen invfkmap invgd invguipty invhidden invhkmap invhkp invhlsearch invicon invim invimcmdline invimdisable invinf invinsertmode invjoinspaces invlazyredraw invlinebreak invlist invlpl invma invmagic invml invmodeline invmodified invmousef invmousehide invnumber invopendevice invpi invpreviewwindow invpvw invrelativenumber invrestorescreen invri invrl invro invru invsb invscb invscs invsft invshelltemp invshortname invshowfulltag invshowmode invsm invsmartindent invsmd invsol invsplitbelow invspr invssl invstartofline invswapfile invta invtagrelative invtbi invtbs invterse invtextmode invtgst invtimeout invto invtr invttybuiltin invtx invvisualbell invwarn invweirdinvert invwfw invwinfixheight invwiv invwrap invwrite invwritebackup
|
||||
syn keyword vimOption contained invai invaltkeymap invar invarabicshape invautochdir invautowrite invawa invbeval invbiosk invbl invcf invcindent invconsk invcp invcscopeverbose invcuc invcursorcolumn invdelcombine invdigraph inved invendofline invequalalways invesckeys invex invexrc invfk invfoldenable invgdefault invhid invhk invhkmapp invhls invic invignorecase invimc invimd invincsearch invinfercase invis invjs invlbr invlisp invloadplugins invlz invmacatsui invmh invmod invmodifiable invmore invmousefocus invnu invodev invpaste invpreserveindent invprompt invreadonly invremap invrevins invrightleft invrnu invrs invruler invsc invscrollbind invsecure invshellslash invshiftround invshowcmd invshowmatch invsi invsmartcase invsmarttab invsn invspell invsplitright invsr invsta invstmp invswf invtagbsearch invtagstack invtbidi invtermbidi invtextauto invtf invtildeop invtitle invtop invttimeout invttyfast invvb invwa invwb invwfh invwildmenu invwinfixwidth invwmnu invwrapscan invwriteany invws
|
||||
syn keyword vimOption contained invakm invanti invarab invari invautoindent invautowriteall invbackup invbin invbioskey invbomb invci invcompatible invconskey invcrb invcst invcul invcursorline invdg invea invedcompatible
|
||||
syn keyword vimOption contained invacd invallowrevins invantialias invarabic invarshape invautoread invaw invballooneval invbinary invbk invbuflisted invcin invconfirm invcopyindent invcscopetag invcsverb invcursorbind invdeco invdiff inveb invek invequalalways invesckeys invex invexrc invfk invfoldenable invgdefault invhid invhk invhkmapp invhls invic invignorecase invimc invimd invincsearch invinfercase invis invjs invlbr invlisp invloadplugins invlz invmacatsui invmh invmod invmodifiable invmore invmousefocus invnu invodev invpaste invpreserveindent invprompt invreadonly invremap invrevins invrightleft invrnu invrs invruler invsc invscrollbind invsecure invshellslash invshiftround invshowcmd invshowmatch invsi invsmartcase invsmarttab invsn invspell invsplitright invsr invsta invstmp invswf invtagbsearch invtagstack invtbidi invtermbidi invtextauto invtf invtildeop invtitle invtop invttimeout invttyfast invvb invwa invwb invwfh invwildignorecase* * invwinfixheight invwiv invwrap invwrite invwritebackup
|
||||
syn keyword vimOption contained invai invaltkeymap invar invarabicshape invautochdir invautowrite invawa invbeval invbiosk invbl invcf invcindent invconsk invcp invcscopeverbose invcuc invcursorcolumn invdelcombine invdigraph inved invendofline inverrorbells invet invexpandtab invfen invfkmap invgd invguipty invhidden invhkmap invhkp invhlsearch invicon invim invimcmdline invimdisable invinf invinsertmode invjoinspaces invlazyredraw invlinebreak invlist invlpl invma invmagic invml invmodeline invmodified invmousef invmousehide invnumber invopendevice invpi invpreviewwindow invpvw invrelativenumber invrestorescreen invri invrl invro invru invsb invscb invscs invsft invshelltemp invshortname invshowfulltag invshowmode invsm invsmartindent invsmd invsol invsplitbelow invspr invssl invstartofline invswapfile invta invtagrelative invtbi invtbs invterse invtextmode invtgst invtimeout invto invtr invttybuiltin invtx invvisualbell invwarn invweirdinvert invwfw invwildmenu invwinfixwidth invwmnu invwrapscan invwriteany invws
|
||||
syn keyword vimOption contained invakm invanti invarab invari invautoindent invautowriteall invbackup invbin invbioskey invbomb invci invcompatible invconskey invcrb invcst invcul invcursorline invdg invea invedcompatible inveol
|
||||
|
||||
" termcap codes (which can also be set) {{{2
|
||||
syn keyword vimOption contained t_AB t_al t_bc t_ce t_cl t_Co t_cs t_Cs t_CS t_CV t_da t_db t_dl t_DL t_EI t_F1 t_F2 t_F3 t_F4 t_F5 t_F6 t_F7 t_F8 t_F9 t_fs t_IE t_IS t_k1 t_K1 t_k2 t_k3 t_K3 t_k4 t_K4 t_k5 t_K5 t_k6 t_K6 t_k7 t_K7 t_k8 t_K8 t_k9 t_K9 t_KA t_kb t_kB t_KB t_KC t_kd t_kD t_KD t_ke t_KE t_KF t_KG t_kh t_KH t_kI t_KI t_KJ t_KK t_kl t_KL t_kN t_kP t_kr t_ks t_ku t_le t_mb t_md t_me t_mr t_ms t_nd t_op t_RI t_RV t_Sb t_se t_Sf t_SI t_so t_sr t_te t_ti t_ts t_ue t_us t_ut t_vb t_ve t_vi t_vs t_WP t_WS t_xs t_ZH t_ZR
|
||||
syn keyword vimOption contained t_AF t_AL t_cd t_Ce t_cm
|
||||
syn keyword vimOption contained t_AF t_AL t_cd t_Ce t_cm
|
||||
syn match vimOption contained "t_%1"
|
||||
syn match vimOption contained "t_#2"
|
||||
syn match vimOption contained "t_#4"
|
||||
@@ -57,24 +57,24 @@ syn match vimOption contained "t_%i"
|
||||
syn match vimOption contained "t_k;"
|
||||
|
||||
" unsupported settings: these are supported by vi but don't do anything in vim {{{2
|
||||
syn keyword vimErrSetting contained hardtabs ht w1200 w300 w9600
|
||||
syn keyword vimErrSetting contained hardtabs ht w1200 w300 w9600
|
||||
|
||||
" AutoCmd Events {{{2
|
||||
syn case ignore
|
||||
syn keyword vimAutoEvent contained BufAdd BufCreate BufDelete BufEnter BufFilePost BufFilePre BufHidden BufLeave BufNew BufNewFile BufRead BufReadCmd BufReadPost BufReadPre BufUnload BufWinEnter BufWinLeave BufWipeout BufWrite BufWriteCmd BufWritePost BufWritePre Cmd-event CmdwinEnter CmdwinLeave ColorScheme CursorHold CursorHoldI CursorMoved CursorMovedI EncodingChanged FileAppendCmd FileAppendPost FileAppendPre FileChangedRO FileChangedShell FileChangedShellPost FileEncoding FileReadCmd FileReadPost FileReadPre FileType FileWriteCmd FileWritePost FileWritePre FilterReadPost FilterReadPre FilterWritePost FilterWritePre FocusGained FocusLost FuncUndefined GUIEnter GUIFailed InsertChange InsertEnter InsertLeave MenuPopup QuickFixCmdPost QuickFixCmdPre RemoteReply SessionLoadPost ShellCmdPost ShellFilterPost SourceCmd SourcePre SpellFileMissing StdinReadPost StdinReadPre SwapExists Syntax TabEnter TabLeave TermChanged TermResponse User UserGettingBored VimEnter VimLeave VimLeavePre VimResized WinEnter WinLeave
|
||||
syn keyword vimAutoEvent contained BufAdd BufCreate BufDelete BufEnter BufFilePost BufFilePre BufHidden BufLeave BufNew BufNewFile BufRead BufReadCmd BufReadPost BufReadPre BufUnload BufWinEnter BufWinLeave BufWipeout BufWrite BufWriteCmd BufWritePost BufWritePre Cmd-event CmdwinEnter CmdwinLeave ColorScheme CursorHold CursorHoldI CursorMoved CursorMovedI EncodingChanged FileAppendCmd FileAppendPost FileAppendPre FileChangedRO FileChangedShell FileChangedShellPost FileEncoding FileReadCmd FileReadPost FileReadPre FileType FileWriteCmd FileWritePost FileWritePre FilterReadPost FilterReadPre FilterWritePost FilterWritePre FocusGained FocusLost FuncUndefined GUIEnter GUIFailed InsertChange InsertCharPre InsertEnter InsertLeave MenuPopup QuickFixCmdPost QuickFixCmdPre RemoteReply SessionLoadPost ShellCmdPost ShellFilterPost SourceCmd SourcePre SpellFileMissing StdinReadPost StdinReadPre SwapExists Syntax TabEnter TabLeave TermChanged TermResponse User UserGettingBored VimEnter VimLeave VimLeavePre VimResized WinEnter WinLeave
|
||||
|
||||
" Highlight commonly used Groupnames {{{2
|
||||
syn keyword vimGroup contained Comment Constant String Character Number Boolean Float Identifier Function Statement Conditional Repeat Label Operator Keyword Exception PreProc Include Define Macro PreCondit Type StorageClass Structure Typedef Special SpecialChar Tag Delimiter SpecialComment Debug Underlined Ignore Error Todo
|
||||
syn keyword vimGroup contained Comment Constant String Character Number Boolean Float Identifier Function Statement Conditional Repeat Label Operator Keyword Exception PreProc Include Define Macro PreCondit Type StorageClass Structure Typedef Special SpecialChar Tag Delimiter SpecialComment Debug Underlined Ignore Error Todo
|
||||
|
||||
" Default highlighting groups {{{2
|
||||
syn keyword vimHLGroup contained ColorColumn Cursor CursorColumn CursorIM CursorLine DiffAdd DiffChange DiffDelete DiffText Directory ErrorMsg FoldColumn Folded IncSearch LineNr MatchParen Menu ModeMsg MoreMsg NonText Normal Pmenu PmenuSbar PmenuSel PmenuThumb Question Scrollbar Search SignColumn SpecialKey SpellBad SpellCap SpellLocal SpellRare StatusLine StatusLineNC TabLine TabLineFill TabLineSel Title Tooltip VertSplit Visual VisualNOS WarningMsg WildMenu
|
||||
syn keyword vimHLGroup contained ColorColumn Cursor CursorColumn CursorIM CursorLine DiffAdd DiffChange DiffDelete DiffText Directory ErrorMsg FoldColumn Folded IncSearch LineNr MatchParen Menu ModeMsg MoreMsg NonText Normal Pmenu PmenuSbar PmenuSel PmenuThumb Question Scrollbar Search SignColumn SpecialKey SpellBad SpellCap SpellLocal SpellRare StatusLine StatusLineNC TabLine TabLineFill TabLineSel Title Tooltip VertSplit Visual VisualNOS WarningMsg WildMenu
|
||||
syn match vimHLGroup contained "Conceal"
|
||||
syn case match
|
||||
|
||||
" Function Names {{{2
|
||||
syn keyword vimFuncName contained abs append argv atan2 bufexists bufname byte2line ceil cindent complete confirm cosh cursor did_filetype empty eventhandler exp extend filewritable findfile fmod foldclosed foldtext function getbufline getcharmod getcmdtype getfperm getftype getmatches getqflist gettabvar getwinposy globpath haslocaldir histdel hlexists iconv input inputrestore insert items len line localtime map match matchdelete matchstr min mode nextnonblank pathshorten prevnonblank pumvisible readfile reltimestr remote_foreground remote_read remove repeat reverse search searchpair searchpos serverlist setcmdpos setloclist setpos setreg settabwinvar shellescape sin sort spellbadword split str2float strchars strftime string strpart strtrans submatch synconcealed synIDattr synstack tabpagebuflist tabpagewinnr taglist tanh tolower tr type undotree virtcol winbufnr winheight winnr winrestview winwidth
|
||||
syn keyword vimFuncName contained acos argc asin browse buflisted bufnr byteidx changenr clearmatches complete_add copy count deepcopy diff_filler escape executable expand feedkeys filter float2nr fnameescape foldclosedend foldtextresult garbagecollect getbufvar getcmdline getcwd getfsize getline getpid getreg gettabwinvar getwinvar has hasmapto histget hlID indent inputdialog inputsave isdirectory join libcall line2byte log maparg matchadd matchend max mkdir mzeval nr2char pow printf range reltime remote_expr remote_peek remote_send rename resolve round searchdecl searchpairpos server2client setbufvar setline setmatches setqflist settabvar setwinvar simplify sinh soundfold spellsuggest sqrt str2nr strdisplaywidth stridx strlen strridx strwidth substitute synID synIDtrans system tabpagenr tagfiles tan tempname toupper trunc undofile values visualmode wincol winline winrestcmd winsaveview writefile
|
||||
syn keyword vimFuncName contained add argidx atan browsedir bufloaded bufwinnr call char2nr col complete_check cos cscope_connection delete diff_hlID eval exists expr8 filereadable finddir floor fnamemodify foldlevel foreground get getchar getcmdpos getfontname getftime getloclist getpos getregtype getwinposx glob has_key histadd histnr hostname index inputlist inputsecret islocked keys libcallnr lispindent log10 mapcheck matcharg matchlist
|
||||
syn keyword vimFuncName contained add argidx atan browsedir bufloaded bufwinnr call char2nr col complete_check cos cscope_connection delete diff_hlID eval exists expr8 filereadable finddir floor fnamemodify foldlevel foreground get getchar getcmdpos getfontname getftime getloclist getpos getregtype getwinposx glob has_key histadd histnr hostname index inputlist inputsecret islocked keys libcallnr lispindent log10 mapcheck matcharg matchlist
|
||||
|
||||
"--- syntax above generated by mkvimvim ---
|
||||
" Special Vim Highlighting (not automatic) {{{1
|
||||
@@ -133,7 +133,7 @@ syn keyword vimFTOption contained detect indent off on plugin
|
||||
|
||||
" Augroup : vimAugroupError removed because long augroups caused sync'ing problems. {{{2
|
||||
" ======= : Trade-off: Increasing synclines with slower editing vs augroup END error checking.
|
||||
syn cluster vimAugroupList contains=vimIsCommand,vimFuncName,vimFunction,vimFunctionError,vimLineComment,vimSpecFile,vimOper,vimNumber,vimOperParen,vimComment,vimString,vimSubst,vimMark,vimRegister,vimAddress,vimFilter,vimCmplxRepeat,vimComment,vimLet,vimSet,vimAutoCmd,vimRegion,vimSynLine,vimNotation,vimCtrlChar,vimFuncVar,vimContinue
|
||||
syn cluster vimAugroupList contains=vimIsCommand,vimCommand,vimUserCmd,vimExecute,vimNotFunc,vimFuncName,vimFunction,vimFunctionError,vimLineComment,vimSpecFile,vimOper,vimNumber,vimOperParen,vimComment,vimString,vimSubst,vimMark,vimRegister,vimAddress,vimFilter,vimCmplxRepeat,vimComment,vimLet,vimSet,vimAutoCmd,vimRegion,vimSynLine,vimNotation,vimCtrlChar,vimFuncVar,vimContinue
|
||||
if exists("g:vimsyn_folding") && g:vimsyn_folding =~ 'a'
|
||||
syn region vimAugroup fold start="\<aug\%[roup]\>\s\+\K\k*" end="\<aug\%[roup]\>\s\+[eE][nN][dD]\>" contains=vimAugroupKey,vimAutoCmd,@vimAugroupList keepend
|
||||
else
|
||||
@@ -164,7 +164,7 @@ syn match vimFunction "\<fu\%[nction]!\=\s\+\%(<[sS][iI][dD]>\|[sSgGbBwWtTlL]:\)
|
||||
|
||||
if exists("g:vimsyn_folding") && g:vimsyn_folding =~ 'f'
|
||||
syn region vimFuncBody contained fold start="\ze(" matchgroup=vimCommand end="\<\(endf\>\|endfu\%[nction]\>\)" contains=@vimFuncBodyList
|
||||
else
|
||||
else
|
||||
syn region vimFuncBody contained start="\ze(" matchgroup=vimCommand end="\<\(endf\>\|endfu\%[nction]\>\)" contains=@vimFuncBodyList
|
||||
endif
|
||||
syn match vimFuncVar contained "a:\(\K\k*\|\d\+\)"
|
||||
@@ -279,7 +279,7 @@ syn match vimAddress ",\zs[.$]" skipwhite nextgroup=vimSubst1
|
||||
syn match vimAddress "%\ze\a" skipwhite nextgroup=vimString,vimSubst1
|
||||
|
||||
syn match vimFilter contained "^!.\{-}\(|\|$\)" contains=vimSpecFile
|
||||
syn match vimFilter contained "\A!.\{-}\(|\|$\)"ms=s+1 contains=vimSpecFile
|
||||
syn match vimFilter contained "\A!.\{-}\(|\|$\)"ms=s+1 contains=vimSpecFile,vimFunction,vimFuncName,vimOperParen
|
||||
|
||||
" Complex repeats (:h complex-repeat) {{{2
|
||||
syn match vimCmplxRepeat '[^a-zA-Z_/\\()]q[0-9a-zA-Z"]'lc=1
|
||||
@@ -391,6 +391,7 @@ syn match vimSynNextgroup contained "nextgroup=" nextgroup=vimGroupList
|
||||
|
||||
syn match vimSyntax "\<sy\%[ntax]\>" contains=vimCommand skipwhite nextgroup=vimSynType,vimComment
|
||||
syn match vimAuSyntax contained "\s+sy\%[ntax]" contains=vimCommand skipwhite nextgroup=vimSynType,vimComment
|
||||
syn cluster vimFuncBodyList add=vimSyntax
|
||||
|
||||
" Syntax: case {{{2
|
||||
syn keyword vimSynType contained case skipwhite nextgroup=vimSynCase,vimSynCaseError
|
||||
@@ -407,15 +408,18 @@ syn keyword vimSynType contained cluster skipwhite nextgroup=vimClusterName
|
||||
syn region vimClusterName contained matchgroup=vimGroupName start="\k\+" skip="\\\\\|\\|" matchgroup=vimSep end="$\||" contains=vimGroupAdd,vimGroupRem,vimSynContains,vimSynError
|
||||
syn match vimGroupAdd contained "add=" nextgroup=vimGroupList
|
||||
syn match vimGroupRem contained "remove=" nextgroup=vimGroupList
|
||||
syn cluster vimFuncBodyList add=vimSynType,vimGroupAdd,vimGroupRem
|
||||
|
||||
" Syntax: include {{{2
|
||||
syn keyword vimSynType contained include skipwhite nextgroup=vimGroupList
|
||||
syn cluster vimFuncBodyList add=vimSynType
|
||||
|
||||
" Syntax: keyword {{{2
|
||||
syn cluster vimSynKeyGroup contains=vimSynNextgroup,vimSynKeyOpt,vimSynKeyContainedin
|
||||
syn keyword vimSynType contained keyword skipwhite nextgroup=vimSynKeyRegion
|
||||
syn region vimSynKeyRegion contained oneline keepend matchgroup=vimGroupName start="\k\+" skip="\\\\\|\\|" matchgroup=vimSep end="|\|$" contains=@vimSynKeyGroup
|
||||
syn match vimSynKeyOpt contained "\<\(conceal\|contained\|transparent\|skipempty\|skipwhite\|skipnl\)\>"
|
||||
syn cluster vimFuncBodyList add=vimSynType
|
||||
|
||||
" Syntax: match {{{2
|
||||
syn cluster vimSynMtchGroup contains=vimMtchComment,vimSynContains,vimSynError,vimSynMtchOpt,vimSynNextgroup,vimSynRegPat,vimNotation
|
||||
@@ -426,6 +430,7 @@ if has("conceal")
|
||||
syn match vimSynMtchOpt contained "\<cchar=" nextgroup=VimSynMtchCchar
|
||||
syn match vimSynMtchCchar contained "\S"
|
||||
endif
|
||||
syn cluster vimFuncBodyList add=vimSynMtchGroup
|
||||
|
||||
" Syntax: off and on {{{2
|
||||
syn keyword vimSynType contained enable list manual off on reset
|
||||
@@ -446,6 +451,7 @@ syn match vimSynPatMod contained "lc=\d\+," nextgroup=vimSynPatMod
|
||||
syn region vimSynPatRange contained start="\[" skip="\\\\\|\\]" end="]"
|
||||
syn match vimSynNotPatRange contained "\\\\\|\\\["
|
||||
syn match vimMtchComment contained '"[^"]\+$'
|
||||
syn cluster vimFuncBodyList add=vimSynType
|
||||
|
||||
" Syntax: sync {{{2
|
||||
" ============
|
||||
@@ -473,7 +479,7 @@ syn match vimIsCommand "<Bar>\s*\a\+" transparent contains=vimCommand,vimNotatio
|
||||
syn cluster vimHighlightCluster contains=vimHiLink,vimHiClear,vimHiKeyList,vimComment
|
||||
syn match vimHighlight "\<hi\%[ghlight]\>" skipwhite nextgroup=vimHiBang,@vimHighlightCluster
|
||||
syn match vimHiBang contained "!" skipwhite nextgroup=@vimHighlightCluster
|
||||
|
||||
|
||||
syn match vimHiGroup contained "\i\+"
|
||||
syn case ignore
|
||||
syn keyword vimHiAttrib contained none bold inverse italic reverse standout underline undercurl
|
||||
@@ -511,7 +517,8 @@ syn match vimHiTermcap contained "\S\+" contains=vimNotation
|
||||
syn keyword vimHiClear contained clear nextgroup=vimHiGroup
|
||||
|
||||
" Highlight: link {{{2
|
||||
syn region vimHiLink contained oneline matchgroup=vimCommand start="\<\(def\s\+\)\=link\>\|\<def\>" end="$" contains=vimHiGroup,vimGroup,vimHLGroup,vimNotation
|
||||
syn region vimHiLink contained oneline matchgroup=vimCommand start="\<\(def\%[ault]\s\+\)\=link\>\|\<def\>" end="$" contains=vimHiGroup,vimGroup,vimHLGroup,vimNotation
|
||||
syn cluster vimFuncBodyList add=vimHiLink
|
||||
|
||||
" Control Characters {{{2
|
||||
" ==================
|
||||
|
||||
@@ -7,16 +7,6 @@
|
||||
"
|
||||
" Options: {{{1
|
||||
" g:yacc_uses_cpp : if this variable exists, then C++ is loaded rather than C
|
||||
"
|
||||
" Overall layout of a bison/yacc grammer:
|
||||
" %{
|
||||
" Prolog
|
||||
" %}
|
||||
" Bison/Yacc Declarations
|
||||
" %%
|
||||
" Grammar Rules
|
||||
" %%
|
||||
" Epilogue
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" this version of syntax/yacc.vim requires 6.0 or later
|
||||
|
||||
77
src/GvimExt/Make_cyg.mak
Normal file
77
src/GvimExt/Make_cyg.mak
Normal file
@@ -0,0 +1,77 @@
|
||||
# Project: gvimext
|
||||
# Generates gvimext.dll with gcc.
|
||||
# To be used with Cygwin.
|
||||
#
|
||||
# Originally, the DLL base address was fixed: -Wl,--image-base=0x1C000000
|
||||
# Now it is allocated dymanically by the linker by evaluating all DLLs
|
||||
# already loaded in memory. The binary image contains as well information
|
||||
# for automatic pseudo-rebasing, if needed by the system. ALV 2004-02-29
|
||||
|
||||
# If cross-compiling set this to yes, else set it to no
|
||||
CROSS = no
|
||||
#CROSS = yes
|
||||
# For the old MinGW 2.95 (the one you get e.g. with debian woody)
|
||||
# set the following variable to yes and check if the executables are
|
||||
# really named that way.
|
||||
# If you have a newer MinGW or you are using cygwin set it to no and
|
||||
# check also the executables
|
||||
MINGWOLD = no
|
||||
|
||||
# Link against the shared versions of libgcc/libstdc++ by default. Set
|
||||
# STATIC_STDCPLUS to "yes" to link against static versions instead.
|
||||
STATIC_STDCPLUS=no
|
||||
#STATIC_STDCPLUS=yes
|
||||
|
||||
# Note: -static-libstdc++ is not available until gcc 4.5.x.
|
||||
LDFLAGS += -shared
|
||||
ifeq (yes, $(STATIC_STDCPLUS))
|
||||
LDFLAGS += -static-libgcc -static-libstdc++
|
||||
endif
|
||||
|
||||
ifeq ($(CROSS),yes)
|
||||
DEL = rm
|
||||
ifeq ($(MINGWOLD),yes)
|
||||
CXXFLAGS := -O2 -mno-cygwin -fvtable-thunks
|
||||
else
|
||||
CXXFLAGS := -O2 -mno-cygwin
|
||||
endif
|
||||
else
|
||||
CXXFLAGS := -O2 -mno-cygwin
|
||||
ifneq (sh.exe, $(SHELL))
|
||||
DEL = rm
|
||||
else
|
||||
DEL = del
|
||||
endif
|
||||
endif
|
||||
CXX := $(CROSS_COMPILE)g++
|
||||
WINDRES := $(CROSS_COMPILE)windres
|
||||
WINDRES_CXX = $(CXX)
|
||||
WINDRES_FLAGS = --preprocessor="$(WINDRES_CXX) -E -xc" -DRC_INVOKED
|
||||
LIBS := -luuid
|
||||
RES := gvimext.res
|
||||
DEFFILE = gvimext_ming.def
|
||||
OBJ := gvimext.o
|
||||
|
||||
DLL := gvimext.dll
|
||||
|
||||
.PHONY: all all-before all-after clean clean-custom
|
||||
|
||||
all: all-before $(DLL) all-after
|
||||
|
||||
$(DLL): $(OBJ) $(RES) $(DEFFILE)
|
||||
$(CXX) $(LDFLAGS) $(CXXFLAGS) -s -o $@ \
|
||||
-Wl,--enable-auto-image-base \
|
||||
-Wl,--enable-auto-import \
|
||||
-Wl,--whole-archive \
|
||||
$^ \
|
||||
-Wl,--no-whole-archive \
|
||||
$(LIBS)
|
||||
|
||||
gvimext.o: gvimext.cpp
|
||||
$(CXX) $(CXXFLAGS) -DFEAT_GETTEXT -c $? -o $@
|
||||
|
||||
$(RES): gvimext_ming.rc
|
||||
$(WINDRES) $(WINDRES_FLAGS) --input-format=rc --output-format=coff -DMING $? -o $@
|
||||
|
||||
clean: clean-custom
|
||||
-$(DEL) $(OBJ) $(RES) $(DLL)
|
||||
@@ -1,6 +1,6 @@
|
||||
# Project: gvimext
|
||||
# Generates gvimext.dll with gcc.
|
||||
# Can be used for Cygwin and MingW (MingW ignores -mno-cygwin)
|
||||
# To be used with MingW.
|
||||
#
|
||||
# Originally, the DLL base address was fixed: -Wl,--image-base=0x1C000000
|
||||
# Now it is allocated dymanically by the linker by evaluating all DLLs
|
||||
@@ -31,12 +31,12 @@ endif
|
||||
ifeq ($(CROSS),yes)
|
||||
DEL = rm
|
||||
ifeq ($(MINGWOLD),yes)
|
||||
CXXFLAGS := -O2 -mno-cygwin -fvtable-thunks
|
||||
CXXFLAGS := -O2 -fvtable-thunks
|
||||
else
|
||||
CXXFLAGS := -O2 -mno-cygwin
|
||||
CXXFLAGS := -O2
|
||||
endif
|
||||
else
|
||||
CXXFLAGS := -O2 -mno-cygwin
|
||||
CXXFLAGS := -O2
|
||||
ifneq (sh.exe, $(SHELL))
|
||||
DEL = rm
|
||||
else
|
||||
@@ -75,4 +75,3 @@ $(RES): gvimext_ming.rc
|
||||
|
||||
clean: clean-custom
|
||||
-$(DEL) $(OBJ) $(RES) $(DLL)
|
||||
|
||||
|
||||
@@ -536,7 +536,7 @@ xxd/xxd.exe: xxd/xxd.c
|
||||
$(MAKE) -C xxd -f Make_cyg.mak CC=$(CC) USEDLL=$(USEDLL)
|
||||
|
||||
GvimExt/gvimext.dll: GvimExt/gvimext.cpp GvimExt/gvimext.rc GvimExt/gvimext.h
|
||||
$(MAKE) -C GvimExt -f Make_ming.mak CROSS_COMPILE=$(CROSS_COMPILE)
|
||||
$(MAKE) -C GvimExt -f Make_cyg.mak CROSS_COMPILE=$(CROSS_COMPILE)
|
||||
|
||||
vimrun.exe: vimrun.c
|
||||
$(CC) $(CFLAGS) -o vimrun.exe vimrun.c $(LIBS)
|
||||
@@ -565,7 +565,7 @@ ifdef MZSCHEME
|
||||
endif
|
||||
-$(DEL) pathdef.c
|
||||
$(MAKE) -C xxd -f Make_cyg.mak clean
|
||||
$(MAKE) -C GvimExt -f Make_ming.mak clean
|
||||
$(MAKE) -C GvimExt -f Make_cyg.mak clean
|
||||
|
||||
distclean: clean
|
||||
-$(DEL) obj$(DIRSLASH)*.o
|
||||
|
||||
@@ -641,7 +641,7 @@ upx: exes
|
||||
upx vim.exe
|
||||
|
||||
xxd/xxd.exe: xxd/xxd.c
|
||||
$(MAKE) -C xxd -f Make_cyg.mak CC=$(CC)
|
||||
$(MAKE) -C xxd -f Make_ming.mak CC=$(CC)
|
||||
|
||||
GvimExt/gvimext.dll: GvimExt/gvimext.cpp GvimExt/gvimext.rc GvimExt/gvimext.h
|
||||
$(MAKE) -C GvimExt -f Make_ming.mak CROSS=$(CROSS) CROSS_COMPILE=$(CROSS_COMPILE)
|
||||
@@ -659,7 +659,7 @@ ifdef MZSCHEME
|
||||
-$(DEL) mzscheme_base.c
|
||||
endif
|
||||
$(MAKE) -C GvimExt -f Make_ming.mak clean
|
||||
$(MAKE) -C xxd -f Make_cyg.mak clean
|
||||
$(MAKE) -C xxd -f Make_ming.mak clean
|
||||
|
||||
###########################################################################
|
||||
INCL = vim.h feature.h os_win32.h os_dos.h ascii.h keymap.h term.h macros.h \
|
||||
|
||||
@@ -785,7 +785,7 @@ PERL_EXE = $(PERL)\Bin$(PERL_ARCH)\perl
|
||||
PERL_INC = /I $(PERL_INCDIR)
|
||||
PERL_OBJ = $(OUTDIR)\if_perl.obj $(OUTDIR)\if_perlsfio.obj
|
||||
XSUBPP = $(PERL)\lib\ExtUtils\xsubpp
|
||||
!if exist($(XSUBPP)
|
||||
!if exist($(XSUBPP))
|
||||
XSUBPP = $(PERL_EXE) $(XSUBPP)
|
||||
!else
|
||||
XSUBPP = xsubpp
|
||||
|
||||
@@ -416,7 +416,11 @@ close_buffer(win, buf, action)
|
||||
#endif
|
||||
|
||||
buf_freeall(buf, (del_buf ? BFA_DEL : 0) + (wipe_buf ? BFA_WIPE : 0));
|
||||
if (win_valid(win) && win->w_buffer == buf)
|
||||
if (
|
||||
#ifdef FEAT_WINDOWS
|
||||
win_valid(win) &&
|
||||
#endif
|
||||
win->w_buffer == buf)
|
||||
win->w_buffer = NULL; /* make sure we don't use the buffer now */
|
||||
|
||||
#ifdef FEAT_AUTOCMD
|
||||
|
||||
152
src/edit.c
152
src/edit.c
@@ -135,6 +135,8 @@ static char_u *compl_orig_text = NULL; /* text as it was before
|
||||
static int compl_cont_mode = 0;
|
||||
static expand_T compl_xp;
|
||||
|
||||
static int compl_opt_refresh_always = FALSE;
|
||||
|
||||
static void ins_ctrl_x __ARGS((void));
|
||||
static int has_compl_option __ARGS((int dict_opt));
|
||||
static int ins_compl_accept_char __ARGS((int c));
|
||||
@@ -153,16 +155,19 @@ static char_u *find_line_end __ARGS((char_u *ptr));
|
||||
static void ins_compl_free __ARGS((void));
|
||||
static void ins_compl_clear __ARGS((void));
|
||||
static int ins_compl_bs __ARGS((void));
|
||||
static int ins_compl_need_restart __ARGS((void));
|
||||
static void ins_compl_new_leader __ARGS((void));
|
||||
static void ins_compl_addleader __ARGS((int c));
|
||||
static int ins_compl_len __ARGS((void));
|
||||
static int ins_compl_len __ARGS((void));
|
||||
static void ins_compl_restart __ARGS((void));
|
||||
static void ins_compl_set_original_text __ARGS((char_u *str));
|
||||
static void ins_compl_addfrommatch __ARGS((void));
|
||||
static int ins_compl_prep __ARGS((int c));
|
||||
static void ins_compl_fixRedoBufForLeader __ARGS((char_u *ptr_arg));
|
||||
static buf_T *ins_compl_next_buf __ARGS((buf_T *buf, int flag));
|
||||
#if defined(FEAT_COMPL_FUNC) || defined(FEAT_EVAL)
|
||||
static void ins_compl_add_list __ARGS((list_T *list));
|
||||
static void ins_compl_add_dict __ARGS((dict_T *dict));
|
||||
#endif
|
||||
static int ins_compl_get_exp __ARGS((pos_T *ini));
|
||||
static void ins_compl_delete __ARGS((void));
|
||||
@@ -3341,7 +3346,7 @@ ins_compl_bs()
|
||||
/* Deleted more than what was used to find matches or didn't finish
|
||||
* finding all matches: need to look for matches all over again. */
|
||||
if (curwin->w_cursor.col <= compl_col + compl_length
|
||||
|| compl_was_interrupted)
|
||||
|| ins_compl_need_restart())
|
||||
ins_compl_restart();
|
||||
|
||||
vim_free(compl_leader);
|
||||
@@ -3354,6 +3359,20 @@ ins_compl_bs()
|
||||
return K_BS;
|
||||
}
|
||||
|
||||
/*
|
||||
* Return TRUE when we need to find matches again, ins_compl_restart() is to
|
||||
* be called.
|
||||
*/
|
||||
static int
|
||||
ins_compl_need_restart()
|
||||
{
|
||||
/* Return TRUE if we didn't complete finding matches or when the
|
||||
* 'completefunc' returned "always" in the "refresh" dictionary item. */
|
||||
return compl_was_interrupted
|
||||
|| ((ctrl_x_mode == CTRL_X_FUNCTION || ctrl_x_mode == CTRL_X_OMNI)
|
||||
&& compl_opt_refresh_always);
|
||||
}
|
||||
|
||||
/*
|
||||
* Called after changing "compl_leader".
|
||||
* Show the popup menu with a different set of matches.
|
||||
@@ -3443,7 +3462,7 @@ ins_compl_addleader(c)
|
||||
ins_char(c);
|
||||
|
||||
/* If we didn't complete finding matches we must search again. */
|
||||
if (compl_was_interrupted)
|
||||
if (ins_compl_need_restart())
|
||||
ins_compl_restart();
|
||||
|
||||
vim_free(compl_leader);
|
||||
@@ -3695,9 +3714,6 @@ ins_compl_prep(c)
|
||||
* memory that was used, and make sure we can redo the insert. */
|
||||
if (compl_curr_match != NULL || compl_leader != NULL || c == Ctrl_E)
|
||||
{
|
||||
char_u *p;
|
||||
int temp = 0;
|
||||
|
||||
/*
|
||||
* If any of the original typed text has been changed, eg when
|
||||
* ignorecase is set, we must add back-spaces to the redo
|
||||
@@ -3708,25 +3724,9 @@ ins_compl_prep(c)
|
||||
*/
|
||||
if (compl_curr_match != NULL && compl_used_match && c != Ctrl_E)
|
||||
ptr = compl_curr_match->cp_str;
|
||||
else if (compl_leader != NULL)
|
||||
ptr = compl_leader;
|
||||
else
|
||||
ptr = compl_orig_text;
|
||||
if (compl_orig_text != NULL)
|
||||
{
|
||||
p = compl_orig_text;
|
||||
for (temp = 0; p[temp] != NUL && p[temp] == ptr[temp];
|
||||
++temp)
|
||||
;
|
||||
#ifdef FEAT_MBYTE
|
||||
if (temp > 0)
|
||||
temp -= (*mb_head_off)(compl_orig_text, p + temp);
|
||||
#endif
|
||||
for (p += temp; *p != NUL; mb_ptr_adv(p))
|
||||
AppendCharToRedobuff(K_BS);
|
||||
}
|
||||
if (ptr != NULL)
|
||||
AppendToRedobuffLit(ptr + temp, -1);
|
||||
ptr = NULL;
|
||||
ins_compl_fixRedoBufForLeader(ptr);
|
||||
}
|
||||
|
||||
#ifdef FEAT_CINDENT
|
||||
@@ -3815,6 +3815,44 @@ ins_compl_prep(c)
|
||||
return retval;
|
||||
}
|
||||
|
||||
/*
|
||||
* Fix the redo buffer for the completion leader replacing some of the typed
|
||||
* text. This inserts backspaces and appends the changed text.
|
||||
* "ptr" is the known leader text or NUL.
|
||||
*/
|
||||
static void
|
||||
ins_compl_fixRedoBufForLeader(ptr_arg)
|
||||
char_u *ptr_arg;
|
||||
{
|
||||
int len;
|
||||
char_u *p;
|
||||
char_u *ptr = ptr_arg;
|
||||
|
||||
if (ptr == NULL)
|
||||
{
|
||||
if (compl_leader != NULL)
|
||||
ptr = compl_leader;
|
||||
else
|
||||
return; /* nothing to do */
|
||||
}
|
||||
if (compl_orig_text != NULL)
|
||||
{
|
||||
p = compl_orig_text;
|
||||
for (len = 0; p[len] != NUL && p[len] == ptr[len]; ++len)
|
||||
;
|
||||
#ifdef FEAT_MBYTE
|
||||
if (len > 0)
|
||||
len -= (*mb_head_off)(p, p + len);
|
||||
#endif
|
||||
for (p += len; *p != NUL; mb_ptr_adv(p))
|
||||
AppendCharToRedobuff(K_BS);
|
||||
}
|
||||
else
|
||||
len = 0;
|
||||
if (ptr != NULL)
|
||||
AppendToRedobuffLit(ptr + len, -1);
|
||||
}
|
||||
|
||||
/*
|
||||
* Loops through the list of windows, loaded-buffers or non-loaded-buffers
|
||||
* (depending on flag) starting from buf and looking for a non-scanned
|
||||
@@ -3871,12 +3909,14 @@ expand_by_function(type, base)
|
||||
int type; /* CTRL_X_OMNI or CTRL_X_FUNCTION */
|
||||
char_u *base;
|
||||
{
|
||||
list_T *matchlist;
|
||||
list_T *matchlist = NULL;
|
||||
dict_T *matchdict = NULL;
|
||||
char_u *args[2];
|
||||
char_u *funcname;
|
||||
pos_T pos;
|
||||
win_T *curwin_save;
|
||||
buf_T *curbuf_save;
|
||||
typval_T rettv;
|
||||
|
||||
funcname = (type == CTRL_X_FUNCTION) ? curbuf->b_p_cfu : curbuf->b_p_ofu;
|
||||
if (*funcname == NUL)
|
||||
@@ -3889,7 +3929,25 @@ expand_by_function(type, base)
|
||||
pos = curwin->w_cursor;
|
||||
curwin_save = curwin;
|
||||
curbuf_save = curbuf;
|
||||
matchlist = call_func_retlist(funcname, 2, args, FALSE);
|
||||
|
||||
/* Call a function, which returns a list or dict. */
|
||||
if (call_vim_function(funcname, 2, args, FALSE, &rettv) == OK)
|
||||
{
|
||||
switch (rettv.v_type)
|
||||
{
|
||||
case VAR_LIST:
|
||||
matchlist = rettv.vval.v_list;
|
||||
break;
|
||||
case VAR_DICT:
|
||||
matchdict = rettv.vval.v_dict;
|
||||
break;
|
||||
default:
|
||||
/* TODO: Give error message? */
|
||||
clear_tv(&rettv);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (curwin_save != curwin || curbuf_save != curbuf)
|
||||
{
|
||||
EMSG(_(e_complwin));
|
||||
@@ -3902,10 +3960,15 @@ expand_by_function(type, base)
|
||||
EMSG(_(e_compldel));
|
||||
goto theend;
|
||||
}
|
||||
|
||||
if (matchlist != NULL)
|
||||
ins_compl_add_list(matchlist);
|
||||
else if (matchdict != NULL)
|
||||
ins_compl_add_dict(matchdict);
|
||||
|
||||
theend:
|
||||
if (matchdict != NULL)
|
||||
dict_unref(matchdict);
|
||||
if (matchlist != NULL)
|
||||
list_unref(matchlist);
|
||||
}
|
||||
@@ -3933,6 +3996,33 @@ ins_compl_add_list(list)
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Add completions from a dict.
|
||||
*/
|
||||
static void
|
||||
ins_compl_add_dict(dict)
|
||||
dict_T *dict;
|
||||
{
|
||||
dictitem_T *refresh;
|
||||
dictitem_T *words;
|
||||
|
||||
/* Check for optional "refresh" item. */
|
||||
compl_opt_refresh_always = FALSE;
|
||||
refresh = dict_find(dict, (char_u *)"refresh", 7);
|
||||
if (refresh != NULL && refresh->di_tv.v_type == VAR_STRING)
|
||||
{
|
||||
char_u *v = refresh->di_tv.vval.v_string;
|
||||
|
||||
if (v != NULL && STRCMP(v, (char_u *)"always") == 0)
|
||||
compl_opt_refresh_always = TRUE;
|
||||
}
|
||||
|
||||
/* Add completions from a "words" list. */
|
||||
words = dict_find(dict, (char_u *)"words", 5);
|
||||
if (words != NULL && words->di_tv.v_type == VAR_LIST)
|
||||
ins_compl_add_list(words->di_tv.vval.v_list);
|
||||
}
|
||||
|
||||
/*
|
||||
* Add a match to the list of matches from a typeval_T.
|
||||
* If the given string is already in the list of completions, then return
|
||||
@@ -5088,6 +5178,12 @@ ins_complete(c)
|
||||
return FAIL;
|
||||
}
|
||||
|
||||
/*
|
||||
* Reset extended parameters of completion, when start new
|
||||
* completion.
|
||||
*/
|
||||
compl_opt_refresh_always = FALSE;
|
||||
|
||||
if (col < 0)
|
||||
col = curs_col;
|
||||
compl_col = col;
|
||||
@@ -5165,6 +5261,10 @@ ins_complete(c)
|
||||
else
|
||||
edit_submode = (char_u *)_(CTRL_X_MSG(ctrl_x_mode));
|
||||
|
||||
/* If any of the original typed text has been changed we need to fix
|
||||
* the redo buffer. */
|
||||
ins_compl_fixRedoBufForLeader(NULL);
|
||||
|
||||
/* Always add completion for the original text. */
|
||||
vim_free(compl_orig_text);
|
||||
compl_orig_text = vim_strnsave(line + compl_col, compl_length);
|
||||
|
||||
23
src/eval.c
23
src/eval.c
@@ -380,9 +380,6 @@ static dictitem_T vimvars_var;
|
||||
|
||||
static void prepare_vimvar __ARGS((int idx, typval_T *save_tv));
|
||||
static void restore_vimvar __ARGS((int idx, typval_T *save_tv));
|
||||
#if defined(FEAT_USR_CMDS) && defined(FEAT_CMDL_COMPL)
|
||||
static int call_vim_function __ARGS((char_u *func, int argc, char_u **argv, int safe, typval_T *rettv));
|
||||
#endif
|
||||
static int ex_let_vars __ARGS((char_u *arg, typval_T *tv, int copy, int semicolon, int var_count, char_u *nextchars));
|
||||
static char_u *skip_var_list __ARGS((char_u *arg, int *var_count, int *semicolon));
|
||||
static char_u *skip_var_one __ARGS((char_u *arg));
|
||||
@@ -451,7 +448,6 @@ static void set_ref_in_ht __ARGS((hashtab_T *ht, int copyID));
|
||||
static void set_ref_in_list __ARGS((list_T *l, int copyID));
|
||||
static void set_ref_in_item __ARGS((typval_T *tv, int copyID));
|
||||
static int rettv_dict_alloc __ARGS((typval_T *rettv));
|
||||
static void dict_unref __ARGS((dict_T *d));
|
||||
static void dict_free __ARGS((dict_T *d, int recurse));
|
||||
static dictitem_T *dictitem_copy __ARGS((dictitem_T *org));
|
||||
static void dictitem_remove __ARGS((dict_T *dict, dictitem_T *item));
|
||||
@@ -1563,7 +1559,7 @@ eval_expr(arg, nextcmd)
|
||||
* arguments are currently supported.
|
||||
* Returns OK or FAIL.
|
||||
*/
|
||||
static int
|
||||
int
|
||||
call_vim_function(func, argc, argv, safe, rettv)
|
||||
char_u *func;
|
||||
int argc;
|
||||
@@ -3381,7 +3377,10 @@ ex_call(eap)
|
||||
/* trans_function_name() doesn't work well when skipping, use eval0()
|
||||
* instead to skip to any following command, e.g. for:
|
||||
* :if 0 | call dict.foo().bar() | endif */
|
||||
eval0(eap->arg, &rettv, &eap->nextcmd, FALSE);
|
||||
++emsg_skip;
|
||||
if (eval0(eap->arg, &rettv, &eap->nextcmd, FALSE) != FAIL)
|
||||
clear_tv(&rettv);
|
||||
--emsg_skip;
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -6903,7 +6902,7 @@ rettv_dict_alloc(rettv)
|
||||
* Unreference a Dictionary: decrement the reference count and free it when it
|
||||
* becomes zero.
|
||||
*/
|
||||
static void
|
||||
void
|
||||
dict_unref(d)
|
||||
dict_T *d;
|
||||
{
|
||||
@@ -20465,6 +20464,7 @@ ex_function(eap)
|
||||
exarg_T *eap;
|
||||
{
|
||||
char_u *theline;
|
||||
int i;
|
||||
int j;
|
||||
int c;
|
||||
int saved_did_emsg;
|
||||
@@ -20711,6 +20711,15 @@ ex_function(eap)
|
||||
arg = vim_strsave(arg);
|
||||
if (arg == NULL)
|
||||
goto erret;
|
||||
|
||||
/* Check for duplicate argument name. */
|
||||
for (i = 0; i < newargs.ga_len; ++i)
|
||||
if (STRCMP(((char_u **)(newargs.ga_data))[i], arg) == 0)
|
||||
{
|
||||
EMSG2(_("E853: Duplicate argument name: %s"), arg);
|
||||
goto erret;
|
||||
}
|
||||
|
||||
((char_u **)(newargs.ga_data))[newargs.ga_len] = arg;
|
||||
*p = c;
|
||||
newargs.ga_len++;
|
||||
|
||||
@@ -5508,6 +5508,9 @@ ex_help(eap)
|
||||
int len;
|
||||
char_u *lang;
|
||||
#endif
|
||||
#ifdef FEAT_FOLDING
|
||||
int old_KeyTyped = KeyTyped;
|
||||
#endif
|
||||
|
||||
if (eap != NULL)
|
||||
{
|
||||
@@ -5671,6 +5674,12 @@ ex_help(eap)
|
||||
if (!p_im)
|
||||
restart_edit = 0; /* don't want insert mode in help file */
|
||||
|
||||
#ifdef FEAT_FOLDING
|
||||
/* Restore KeyTyped, setting 'filetype=help' may reset it.
|
||||
* It is needed for do_tag top open folds under the cursor. */
|
||||
KeyTyped = old_KeyTyped;
|
||||
#endif
|
||||
|
||||
if (tag != NULL)
|
||||
do_tag(tag, DT_HELP, 1, FALSE, TRUE);
|
||||
|
||||
|
||||
@@ -61,6 +61,7 @@ static char_u *do_one_cmd __ARGS((char_u **, int, struct condstack *, char_u *(*
|
||||
static char_u *do_one_cmd __ARGS((char_u **, int, char_u *(*fgetline)(int, void *, int), void *cookie));
|
||||
static int if_level = 0; /* depth in :if */
|
||||
#endif
|
||||
static void append_command __ARGS((char_u *cmd));
|
||||
static char_u *find_command __ARGS((exarg_T *eap, int *full));
|
||||
|
||||
static void ex_abbreviate __ARGS((exarg_T *eap));
|
||||
@@ -370,11 +371,9 @@ static void ex_tag_cmd __ARGS((exarg_T *eap, char_u *name));
|
||||
# define ex_endif ex_ni
|
||||
# define ex_else ex_ni
|
||||
# define ex_while ex_ni
|
||||
# define ex_for ex_ni
|
||||
# define ex_continue ex_ni
|
||||
# define ex_break ex_ni
|
||||
# define ex_endwhile ex_ni
|
||||
# define ex_endfor ex_ni
|
||||
# define ex_throw ex_ni
|
||||
# define ex_try ex_ni
|
||||
# define ex_catch ex_ni
|
||||
@@ -2136,10 +2135,7 @@ do_one_cmd(cmdlinep, sourcing,
|
||||
{
|
||||
STRCPY(IObuff, _("E492: Not an editor command"));
|
||||
if (!sourcing)
|
||||
{
|
||||
STRCAT(IObuff, ": ");
|
||||
STRNCAT(IObuff, *cmdlinep, 40);
|
||||
}
|
||||
append_command(*cmdlinep);
|
||||
errormsg = IObuff;
|
||||
}
|
||||
goto doend;
|
||||
@@ -2708,8 +2704,7 @@ doend:
|
||||
STRCPY(IObuff, errormsg);
|
||||
errormsg = IObuff;
|
||||
}
|
||||
STRCAT(errormsg, ": ");
|
||||
STRNCAT(errormsg, *cmdlinep, IOSIZE - STRLEN(IObuff) - 1);
|
||||
append_command(*cmdlinep);
|
||||
}
|
||||
emsg(errormsg);
|
||||
}
|
||||
@@ -2796,6 +2791,42 @@ checkforcmd(pp, cmd, len)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/*
|
||||
* Append "cmd" to the error message in IObuff.
|
||||
* Takes care of limiting the length and handling 0xa0, which would be
|
||||
* invisible otherwise.
|
||||
*/
|
||||
static void
|
||||
append_command(cmd)
|
||||
char_u *cmd;
|
||||
{
|
||||
char_u *s = cmd;
|
||||
char_u *d;
|
||||
|
||||
STRCAT(IObuff, ": ");
|
||||
d = IObuff + STRLEN(IObuff);
|
||||
while (*s != NUL && d - IObuff < IOSIZE - 7)
|
||||
{
|
||||
if (
|
||||
#ifdef FEAT_MBYTE
|
||||
enc_utf8 ? (s[0] == 0xc2 && s[1] == 0xa0) :
|
||||
#endif
|
||||
*s == 0xa0)
|
||||
{
|
||||
s +=
|
||||
#ifdef FEAT_MBYTE
|
||||
enc_utf8 ? 2 :
|
||||
#endif
|
||||
1;
|
||||
STRCPY(d, "<a0>");
|
||||
d += 4;
|
||||
}
|
||||
else
|
||||
MB_COPY_CHAR(s, d);
|
||||
}
|
||||
*d = NUL;
|
||||
}
|
||||
|
||||
/*
|
||||
* Find an Ex command by its name, either built-in or user.
|
||||
* Start of the name can be found at eap->cmd.
|
||||
|
||||
@@ -2870,6 +2870,7 @@ put_on_cmdline(str, len, redraw)
|
||||
{
|
||||
msg_no_more = TRUE;
|
||||
i = cmdline_row;
|
||||
cursorcmd();
|
||||
draw_cmdline(ccline.cmdpos, ccline.cmdlen - ccline.cmdpos);
|
||||
/* Avoid clearing the rest of the line too often. */
|
||||
if (cmdline_row != i || ccline.overstrike)
|
||||
@@ -4546,7 +4547,7 @@ ExpandFromContext(xp, pat, num_file, file, options)
|
||||
}
|
||||
if (xp->xp_context == EXPAND_COMPILER)
|
||||
{
|
||||
char *directories[] = {"colors", NULL};
|
||||
char *directories[] = {"compiler", NULL};
|
||||
return ExpandRTDir(pat, num_file, file, directories);
|
||||
}
|
||||
if (xp->xp_context == EXPAND_OWNSYNTAX)
|
||||
|
||||
356
src/gui.c
356
src/gui.c
@@ -37,6 +37,24 @@ static void gui_set_fg_color __ARGS((char_u *name));
|
||||
static void gui_set_bg_color __ARGS((char_u *name));
|
||||
static win_T *xy2win __ARGS((int x, int y));
|
||||
|
||||
#if defined(UNIX) && !defined(__BEOS__) && !defined(MACOS_X) \
|
||||
&& !defined(__APPLE__)
|
||||
# define MAY_FORK
|
||||
static void gui_do_fork __ARGS((void));
|
||||
|
||||
static int gui_read_child_pipe __ARGS((int fd));
|
||||
|
||||
/* Return values for gui_read_child_pipe */
|
||||
enum {
|
||||
GUI_CHILD_IO_ERROR,
|
||||
GUI_CHILD_OK,
|
||||
GUI_CHILD_FAILED
|
||||
};
|
||||
|
||||
#endif /* MAY_FORK */
|
||||
|
||||
static void gui_attempt_start __ARGS((void));
|
||||
|
||||
static int can_update_cursor = TRUE; /* can display the cursor */
|
||||
|
||||
/*
|
||||
@@ -59,47 +77,47 @@ static int can_update_cursor = TRUE; /* can display the cursor */
|
||||
gui_start()
|
||||
{
|
||||
char_u *old_term;
|
||||
#if defined(UNIX) && !defined(__BEOS__) && !defined(MACOS_X) \
|
||||
&& !defined(__APPLE__)
|
||||
# define MAY_FORK
|
||||
int dofork = TRUE;
|
||||
#endif
|
||||
static int recursive = 0;
|
||||
|
||||
old_term = vim_strsave(T_NAME);
|
||||
|
||||
/*
|
||||
* Set_termname() will call gui_init() to start the GUI.
|
||||
* Set the "starting" flag, to indicate that the GUI will start.
|
||||
*
|
||||
* We don't want to open the GUI shell until after we've read .gvimrc,
|
||||
* otherwise we don't know what font we will use, and hence we don't know
|
||||
* what size the shell should be. So if there are errors in the .gvimrc
|
||||
* file, they will have to go to the terminal: Set full_screen to FALSE.
|
||||
* full_screen will be set to TRUE again by a successful termcapinit().
|
||||
*/
|
||||
settmode(TMODE_COOK); /* stop RAW mode */
|
||||
if (full_screen)
|
||||
cursor_on(); /* needed for ":gui" in .vimrc */
|
||||
gui.starting = TRUE;
|
||||
full_screen = FALSE;
|
||||
|
||||
#ifdef FEAT_GUI_GTK
|
||||
gui.event_time = GDK_CURRENT_TIME;
|
||||
#endif
|
||||
|
||||
#ifdef MAY_FORK
|
||||
if (!gui.dofork || vim_strchr(p_go, GO_FORG) || recursive)
|
||||
dofork = FALSE;
|
||||
#endif
|
||||
++recursive;
|
||||
|
||||
termcapinit((char_u *)"builtin_gui");
|
||||
gui.starting = recursive - 1;
|
||||
#ifdef MAY_FORK
|
||||
/*
|
||||
* Quit the current process and continue in the child.
|
||||
* Makes "gvim file" disconnect from the shell it was started in.
|
||||
* Don't do this when Vim was started with "-f" or the 'f' flag is present
|
||||
* in 'guioptions'.
|
||||
*/
|
||||
if (gui.dofork && !vim_strchr(p_go, GO_FORG) && recursive <= 1)
|
||||
{
|
||||
gui_do_fork();
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
gui_attempt_start();
|
||||
}
|
||||
|
||||
if (!gui.in_use) /* failed to start GUI */
|
||||
{
|
||||
termcapinit(old_term); /* back to old term settings */
|
||||
/* Back to old term settings
|
||||
*
|
||||
* FIXME: If we got here because a child process failed and flagged to
|
||||
* the parent to resume, and X11 is enabled with FEAT_TITLE, this will
|
||||
* hit an X11 I/O error and do a longjmp(), leaving recursive
|
||||
* permanently set to 1. This is probably not as big a problem as it
|
||||
* sounds, because gui_mch_init() in both gui_x11.c and gui_gtk_x11.c
|
||||
* return "OK" unconditionally, so it would be very difficult to
|
||||
* actually hit this case.
|
||||
*/
|
||||
termcapinit(old_term);
|
||||
settmode(TMODE_RAW); /* restart RAW mode */
|
||||
#ifdef FEAT_TITLE
|
||||
set_title_defaults(); /* set 'title' and 'icon' again */
|
||||
@@ -108,6 +126,41 @@ gui_start()
|
||||
|
||||
vim_free(old_term);
|
||||
|
||||
#ifdef FEAT_AUTOCMD
|
||||
/* If the GUI started successfully, trigger the GUIEnter event, otherwise
|
||||
* the GUIFailed event. */
|
||||
gui_mch_update();
|
||||
apply_autocmds(gui.in_use ? EVENT_GUIENTER : EVENT_GUIFAILED,
|
||||
NULL, NULL, FALSE, curbuf);
|
||||
#endif
|
||||
--recursive;
|
||||
}
|
||||
|
||||
/*
|
||||
* Set_termname() will call gui_init() to start the GUI.
|
||||
* Set the "starting" flag, to indicate that the GUI will start.
|
||||
*
|
||||
* We don't want to open the GUI shell until after we've read .gvimrc,
|
||||
* otherwise we don't know what font we will use, and hence we don't know
|
||||
* what size the shell should be. So if there are errors in the .gvimrc
|
||||
* file, they will have to go to the terminal: Set full_screen to FALSE.
|
||||
* full_screen will be set to TRUE again by a successful termcapinit().
|
||||
*/
|
||||
static void
|
||||
gui_attempt_start()
|
||||
{
|
||||
static int recursive = 0;
|
||||
|
||||
++recursive;
|
||||
gui.starting = TRUE;
|
||||
|
||||
#ifdef FEAT_GUI_GTK
|
||||
gui.event_time = GDK_CURRENT_TIME;
|
||||
#endif
|
||||
|
||||
termcapinit((char_u *)"builtin_gui");
|
||||
gui.starting = recursive - 1;
|
||||
|
||||
#if defined(FEAT_GUI_GTK) || defined(FEAT_GUI_X11)
|
||||
if (gui.in_use)
|
||||
{
|
||||
@@ -123,96 +176,171 @@ gui_start()
|
||||
display_errors();
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(MAY_FORK) && !defined(__QNXNTO__)
|
||||
/*
|
||||
* Quit the current process and continue in the child.
|
||||
* Makes "gvim file" disconnect from the shell it was started in.
|
||||
* Don't do this when Vim was started with "-f" or the 'f' flag is present
|
||||
* in 'guioptions'.
|
||||
*/
|
||||
if (gui.in_use && dofork)
|
||||
{
|
||||
int pipefd[2]; /* pipe between parent and child */
|
||||
int pipe_error;
|
||||
char dummy;
|
||||
pid_t pid = -1;
|
||||
|
||||
/* Setup a pipe between the child and the parent, so that the parent
|
||||
* knows when the child has done the setsid() call and is allowed to
|
||||
* exit. */
|
||||
pipe_error = (pipe(pipefd) < 0);
|
||||
pid = fork();
|
||||
if (pid > 0) /* Parent */
|
||||
{
|
||||
/* Give the child some time to do the setsid(), otherwise the
|
||||
* exit() may kill the child too (when starting gvim from inside a
|
||||
* gvim). */
|
||||
if (pipe_error)
|
||||
ui_delay(300L, TRUE);
|
||||
else
|
||||
{
|
||||
/* The read returns when the child closes the pipe (or when
|
||||
* the child dies for some reason). */
|
||||
close(pipefd[1]);
|
||||
ignored = (int)read(pipefd[0], &dummy, (size_t)1);
|
||||
close(pipefd[0]);
|
||||
}
|
||||
|
||||
/* When swapping screens we may need to go to the next line, e.g.,
|
||||
* after a hit-enter prompt and using ":gui". */
|
||||
if (newline_on_exit)
|
||||
mch_errmsg("\r\n");
|
||||
|
||||
/*
|
||||
* The parent must skip the normal exit() processing, the child
|
||||
* will do it. For example, GTK messes up signals when exiting.
|
||||
*/
|
||||
_exit(0);
|
||||
}
|
||||
|
||||
# if defined(HAVE_SETSID) || defined(HAVE_SETPGID)
|
||||
/*
|
||||
* Change our process group. On some systems/shells a CTRL-C in the
|
||||
* shell where Vim was started would otherwise kill gvim!
|
||||
*/
|
||||
if (pid == 0) /* child */
|
||||
# if defined(HAVE_SETSID)
|
||||
(void)setsid();
|
||||
# else
|
||||
(void)setpgid(0, 0);
|
||||
# endif
|
||||
# endif
|
||||
if (!pipe_error)
|
||||
{
|
||||
close(pipefd[0]);
|
||||
close(pipefd[1]);
|
||||
}
|
||||
|
||||
# if defined(FEAT_GUI_GNOME) && defined(FEAT_SESSION)
|
||||
/* Tell the session manager our new PID */
|
||||
gui_mch_forked();
|
||||
# endif
|
||||
}
|
||||
#else
|
||||
# if defined(__QNXNTO__)
|
||||
if (gui.in_use && dofork)
|
||||
procmgr_daemon(0, PROCMGR_DAEMON_KEEPUMASK | PROCMGR_DAEMON_NOCHDIR |
|
||||
PROCMGR_DAEMON_NOCLOSE | PROCMGR_DAEMON_NODEVNULL);
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef FEAT_AUTOCMD
|
||||
/* If the GUI started successfully, trigger the GUIEnter event, otherwise
|
||||
* the GUIFailed event. */
|
||||
gui_mch_update();
|
||||
apply_autocmds(gui.in_use ? EVENT_GUIENTER : EVENT_GUIFAILED,
|
||||
NULL, NULL, FALSE, curbuf);
|
||||
#endif
|
||||
|
||||
--recursive;
|
||||
}
|
||||
|
||||
#ifdef MAY_FORK
|
||||
|
||||
/* for waitpid() */
|
||||
# if defined(HAVE_SYS_WAIT_H) || defined(HAVE_UNION_WAIT)
|
||||
# include <sys/wait.h>
|
||||
# endif
|
||||
|
||||
/*
|
||||
* Create a new process, by forking. In the child, start the GUI, and in
|
||||
* the parent, exit.
|
||||
*
|
||||
* If something goes wrong, this will return with gui.in_use still set
|
||||
* to FALSE, in which case the caller should continue execution without
|
||||
* the GUI.
|
||||
*
|
||||
* If the child fails to start the GUI, then the child will exit and the
|
||||
* parent will return. If the child succeeds, then the parent will exit
|
||||
* and the child will return.
|
||||
*/
|
||||
static void
|
||||
gui_do_fork()
|
||||
{
|
||||
#ifdef __QNXNTO__
|
||||
procmgr_daemon(0, PROCMGR_DAEMON_KEEPUMASK | PROCMGR_DAEMON_NOCHDIR |
|
||||
PROCMGR_DAEMON_NOCLOSE | PROCMGR_DAEMON_NODEVNULL);
|
||||
gui_attempt_start();
|
||||
return;
|
||||
#else
|
||||
int pipefd[2]; /* pipe between parent and child */
|
||||
int pipe_error;
|
||||
int status;
|
||||
int exit_status;
|
||||
pid_t pid = -1;
|
||||
FILE *parent_file;
|
||||
|
||||
/* Setup a pipe between the child and the parent, so that the parent
|
||||
* knows when the child has done the setsid() call and is allowed to
|
||||
* exit. */
|
||||
pipe_error = (pipe(pipefd) < 0);
|
||||
pid = fork();
|
||||
if (pid < 0) /* Fork error */
|
||||
{
|
||||
EMSG(_("E851: Failed to create a new process for the GUI"));
|
||||
return;
|
||||
}
|
||||
else if (pid > 0) /* Parent */
|
||||
{
|
||||
/* Give the child some time to do the setsid(), otherwise the
|
||||
* exit() may kill the child too (when starting gvim from inside a
|
||||
* gvim). */
|
||||
if (!pipe_error)
|
||||
{
|
||||
/* The read returns when the child closes the pipe (or when
|
||||
* the child dies for some reason). */
|
||||
close(pipefd[1]);
|
||||
status = gui_read_child_pipe(pipefd[0]);
|
||||
if (status == GUI_CHILD_FAILED)
|
||||
{
|
||||
/* The child failed to start the GUI, so the caller must
|
||||
* continue. There may be more error information written
|
||||
* to stderr by the child. */
|
||||
# ifdef __NeXT__
|
||||
wait4(pid, &exit_status, 0, (struct rusage *)0);
|
||||
# else
|
||||
waitpid(pid, &exit_status, 0);
|
||||
# endif
|
||||
EMSG(_("E852: The child process failed to start the GUI"));
|
||||
return;
|
||||
}
|
||||
else if (status == GUI_CHILD_IO_ERROR)
|
||||
{
|
||||
pipe_error = TRUE;
|
||||
}
|
||||
/* else GUI_CHILD_OK: parent exit */
|
||||
}
|
||||
|
||||
if (pipe_error)
|
||||
ui_delay(300L, TRUE);
|
||||
|
||||
/* When swapping screens we may need to go to the next line, e.g.,
|
||||
* after a hit-enter prompt and using ":gui". */
|
||||
if (newline_on_exit)
|
||||
mch_errmsg("\r\n");
|
||||
|
||||
/*
|
||||
* The parent must skip the normal exit() processing, the child
|
||||
* will do it. For example, GTK messes up signals when exiting.
|
||||
*/
|
||||
_exit(0);
|
||||
}
|
||||
/* Child */
|
||||
|
||||
# if defined(HAVE_SETSID) || defined(HAVE_SETPGID)
|
||||
/*
|
||||
* Change our process group. On some systems/shells a CTRL-C in the
|
||||
* shell where Vim was started would otherwise kill gvim!
|
||||
*/
|
||||
# if defined(HAVE_SETSID)
|
||||
(void)setsid();
|
||||
# else
|
||||
(void)setpgid(0, 0);
|
||||
# endif
|
||||
# endif
|
||||
if (!pipe_error)
|
||||
close(pipefd[0]);
|
||||
|
||||
# if defined(FEAT_GUI_GNOME) && defined(FEAT_SESSION)
|
||||
/* Tell the session manager our new PID */
|
||||
gui_mch_forked();
|
||||
# endif
|
||||
|
||||
if (!pipe_error)
|
||||
parent_file = fdopen(pipefd[1], "w");
|
||||
else
|
||||
parent_file = NULL;
|
||||
|
||||
/* Try to start the GUI */
|
||||
gui_attempt_start();
|
||||
|
||||
/* Notify the parent */
|
||||
if (parent_file != NULL)
|
||||
{
|
||||
fputs(gui.in_use ? "ok" : "fail", parent_file);
|
||||
fclose(parent_file);
|
||||
}
|
||||
|
||||
/* If we failed to start the GUI, exit now. */
|
||||
if (!gui.in_use)
|
||||
exit(1);
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
* Read from a pipe assumed to be connected to the child process (this
|
||||
* function is called from the parent).
|
||||
* Return GUI_CHILD_OK if the child successfully started the GUI,
|
||||
* GUY_CHILD_FAILED if the child failed, or GUI_CHILD_IO_ERROR if there was
|
||||
* some other error.
|
||||
*
|
||||
* The file descriptor will be closed before the function returns.
|
||||
*/
|
||||
static int
|
||||
gui_read_child_pipe(int fd)
|
||||
{
|
||||
size_t bytes_read;
|
||||
FILE *file;
|
||||
char buffer[10];
|
||||
|
||||
file = fdopen(fd, "r");
|
||||
if (!file)
|
||||
return GUI_CHILD_IO_ERROR;
|
||||
|
||||
bytes_read = fread(buffer, sizeof(char), sizeof(buffer)-1, file);
|
||||
buffer[bytes_read] = '\0';
|
||||
fclose(file);
|
||||
if (strcmp(buffer, "ok") == 0)
|
||||
return GUI_CHILD_OK;
|
||||
return GUI_CHILD_FAILED;
|
||||
}
|
||||
|
||||
#endif /* MAY_FORK */
|
||||
|
||||
/*
|
||||
* Call this when vim starts up, whether or not the GUI is started
|
||||
*/
|
||||
|
||||
1112
src/gui_photon.c
1112
src/gui_photon.c
File diff suppressed because it is too large
Load Diff
33
src/if_lua.c
33
src/if_lua.c
@@ -100,6 +100,7 @@ static const char LUAVIM_FREE[] = "luaV_free";
|
||||
#define lua_setfield dll_lua_setfield
|
||||
#define lua_rawset dll_lua_rawset
|
||||
#define lua_rawseti dll_lua_rawseti
|
||||
#define lua_remove dll_lua_remove
|
||||
#define lua_setmetatable dll_lua_setmetatable
|
||||
#define lua_call dll_lua_call
|
||||
#define lua_pcall dll_lua_pcall
|
||||
@@ -161,6 +162,7 @@ int (*dll_lua_getmetatable) (lua_State *L, int objindex);
|
||||
void (*dll_lua_setfield) (lua_State *L, int idx, const char *k);
|
||||
void (*dll_lua_rawset) (lua_State *L, int idx);
|
||||
void (*dll_lua_rawseti) (lua_State *L, int idx, int n);
|
||||
void (*dll_lua_remove) (lua_State *L, int idx);
|
||||
int (*dll_lua_setmetatable) (lua_State *L, int objindex);
|
||||
void (*dll_lua_call) (lua_State *L, int nargs, int nresults);
|
||||
int (*dll_lua_pcall) (lua_State *L, int nargs, int nresults, int errfunc);
|
||||
@@ -229,6 +231,7 @@ static const luaV_Reg luaV_dll[] = {
|
||||
{"lua_setfield", (luaV_function) &dll_lua_setfield},
|
||||
{"lua_rawset", (luaV_function) &dll_lua_rawset},
|
||||
{"lua_rawseti", (luaV_function) &dll_lua_rawseti},
|
||||
{"lua_remove", (luaV_function) &dll_lua_remove},
|
||||
{"lua_setmetatable", (luaV_function) &dll_lua_setmetatable},
|
||||
{"lua_call", (luaV_function) &dll_lua_call},
|
||||
{"lua_pcall", (luaV_function) &dll_lua_pcall},
|
||||
@@ -923,6 +926,31 @@ luaV_print(lua_State *L)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
luaV_debug(lua_State *L)
|
||||
{
|
||||
lua_settop(L, 0);
|
||||
lua_getglobal(L, "vim");
|
||||
lua_getfield(L, -1, "eval");
|
||||
lua_remove(L, -2); /* vim.eval at position 1 */
|
||||
for (;;)
|
||||
{
|
||||
const char *input;
|
||||
size_t l;
|
||||
lua_pushvalue(L, 1); /* vim.eval */
|
||||
lua_pushliteral(L, "input('lua_debug> ')");
|
||||
lua_call(L, 1, 1); /* return string */
|
||||
input = lua_tolstring(L, -1, &l);
|
||||
if (l == 0 || strcmp(input, "cont") == 0)
|
||||
return 0;
|
||||
msg_putchar('\n'); /* avoid outputting on input line */
|
||||
if (luaL_loadbuffer(L, input, l, "=(debug command)")
|
||||
|| lua_pcall(L, 0, 0, 0))
|
||||
luaV_emsg(L);
|
||||
lua_settop(L, 1); /* remove eventual returns, but keep vim.eval */
|
||||
}
|
||||
}
|
||||
|
||||
static int
|
||||
luaV_command(lua_State *L)
|
||||
{
|
||||
@@ -1082,6 +1110,11 @@ luaopen_vim(lua_State *L)
|
||||
/* print */
|
||||
lua_pushcfunction(L, luaV_print);
|
||||
lua_setglobal(L, "print");
|
||||
/* debug.debug */
|
||||
lua_getglobal(L, "debug");
|
||||
lua_pushcfunction(L, luaV_debug);
|
||||
lua_setfield(L, -2, "debug");
|
||||
lua_pop(L, 1);
|
||||
/* free */
|
||||
lua_pushlightuserdata(L, (void *) LUAVIM_FREE);
|
||||
lua_pushcfunction(L, luaV_free);
|
||||
|
||||
@@ -194,7 +194,7 @@ static void (*py3_PyGILState_Release)(PyGILState_STATE);
|
||||
static int (*py3_PySys_SetObject)(char *, PyObject *);
|
||||
static PyObject* (*py3_PyList_Append)(PyObject *, PyObject *);
|
||||
static Py_ssize_t (*py3_PyList_Size)(PyObject *);
|
||||
static int (*py3_PySlice_GetIndicesEx)(PySliceObject *r, Py_ssize_t length,
|
||||
static int (*py3_PySlice_GetIndicesEx)(PyObject *r, Py_ssize_t length,
|
||||
Py_ssize_t *start, Py_ssize_t *stop, Py_ssize_t *step, Py_ssize_t *slicelength);
|
||||
static PyObject* (*py3_PyErr_NoMemory)(void);
|
||||
static void (*py3_Py_Finalize)(void);
|
||||
@@ -1030,7 +1030,7 @@ BufferSubscript(PyObject *self, PyObject* idx)
|
||||
} else if (PySlice_Check(idx)) {
|
||||
Py_ssize_t start, stop, step, slicelen;
|
||||
|
||||
if (PySlice_GetIndicesEx((PySliceObject *)idx,
|
||||
if (PySlice_GetIndicesEx((PyObject *)idx,
|
||||
(Py_ssize_t)((BufferObject *)(self))->buf->b_ml.ml_line_count+1,
|
||||
&start, &stop,
|
||||
&step, &slicelen) < 0) {
|
||||
@@ -1054,7 +1054,7 @@ BufferAsSubscript(PyObject *self, PyObject* idx, PyObject* val)
|
||||
} else if (PySlice_Check(idx)) {
|
||||
Py_ssize_t start, stop, step, slicelen;
|
||||
|
||||
if (PySlice_GetIndicesEx((PySliceObject *)idx,
|
||||
if (PySlice_GetIndicesEx((PyObject *)idx,
|
||||
(Py_ssize_t)((BufferObject *)(self))->buf->b_ml.ml_line_count+1,
|
||||
&start, &stop,
|
||||
&step, &slicelen) < 0) {
|
||||
@@ -1142,7 +1142,7 @@ RangeSubscript(PyObject *self, PyObject* idx)
|
||||
} else if (PySlice_Check(idx)) {
|
||||
Py_ssize_t start, stop, step, slicelen;
|
||||
|
||||
if (PySlice_GetIndicesEx((PySliceObject *)idx,
|
||||
if (PySlice_GetIndicesEx((PyObject *)idx,
|
||||
((RangeObject *)(self))->end-((RangeObject *)(self))->start+1,
|
||||
&start, &stop,
|
||||
&step, &slicelen) < 0) {
|
||||
@@ -1164,7 +1164,7 @@ RangeAsSubscript(PyObject *self, PyObject *idx, PyObject *val)
|
||||
} else if (PySlice_Check(idx)) {
|
||||
Py_ssize_t start, stop, step, slicelen;
|
||||
|
||||
if (PySlice_GetIndicesEx((PySliceObject *)idx,
|
||||
if (PySlice_GetIndicesEx((PyObject *)idx,
|
||||
((RangeObject *)(self))->end-((RangeObject *)(self))->start+1,
|
||||
&start, &stop,
|
||||
&step, &slicelen) < 0) {
|
||||
|
||||
@@ -1009,6 +1009,7 @@ main_loop(cmdwin, noexmode)
|
||||
skip_redraw = FALSE;
|
||||
RedrawingDisabled = 0;
|
||||
no_wait_return = 0;
|
||||
vgetc_busy = 0;
|
||||
# ifdef FEAT_EVAL
|
||||
emsg_skip = 0;
|
||||
# endif
|
||||
|
||||
10
src/ops.c
10
src/ops.c
@@ -1922,7 +1922,9 @@ op_delete(oap)
|
||||
curwin->w_cursor.coladd = 0;
|
||||
}
|
||||
#endif
|
||||
if (oap->inclusive && oap->end.lnum == curbuf->b_ml.ml_line_count
|
||||
if (oap->op_type == OP_DELETE
|
||||
&& oap->inclusive
|
||||
&& oap->end.lnum == curbuf->b_ml.ml_line_count
|
||||
&& n > (int)STRLEN(ml_get(oap->end.lnum)))
|
||||
{
|
||||
/* Special case: gH<Del> deletes the last line. */
|
||||
@@ -3331,8 +3333,8 @@ do_put(regname, dir, count, flags)
|
||||
if (regname == '=')
|
||||
{
|
||||
/* For the = register we need to split the string at NL
|
||||
* characters. */
|
||||
/* Loop twice: count the number of lines and save them. */
|
||||
* characters.
|
||||
* Loop twice: count the number of lines and save them. */
|
||||
for (;;)
|
||||
{
|
||||
y_size = 0;
|
||||
@@ -3348,7 +3350,7 @@ do_put(regname, dir, count, flags)
|
||||
if (y_array != NULL)
|
||||
*ptr = NUL;
|
||||
++ptr;
|
||||
/* A trailing '\n' makes the string linewise */
|
||||
/* A trailing '\n' makes the register linewise. */
|
||||
if (*ptr == NUL)
|
||||
{
|
||||
y_type = MLINE;
|
||||
|
||||
@@ -7036,6 +7036,9 @@ check_colorcolumn(wp)
|
||||
int i;
|
||||
int j = 0;
|
||||
|
||||
if (wp->w_buffer == NULL)
|
||||
return NULL; /* buffer was closed */
|
||||
|
||||
for (s = wp->w_p_cc; *s != NUL && count < 255;)
|
||||
{
|
||||
if (*s == '-' || *s == '+')
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
# ifdef EBCDIC
|
||||
#define DFLT_EFM "%*[^ ] %*[^ ] %f:%l%*[ ]%m,%*[^\"]\"%f\"%*\\D%l: %m,\"%f\"%*\\D%l: %m,%f:%l:%c:%m,%f(%l):%m,%f:%l:%m,\"%f\"\\, line %l%*\\D%c%*[^ ] %m,%D%*\\a[%*\\d]: Entering directory `%f',%X%*\\a[%*\\d]: Leaving directory `%f',%DMaking %*\\a in %f,%f|%l| %m"
|
||||
# else
|
||||
#define DFLT_EFM "%*[^\"]\"%f\"%*\\D%l: %m,\"%f\"%*\\D%l: %m,%-G%f:%l: (Each undeclared identifier is reported only once,%-G%f:%l: for each function it appears in.),%-GIn file included from %f:%l:%c:,%-GIn file included from %f:%l:%c,%-GIn file included from %f:%l,%-Gfrom %f:%l:%c,%-Gfrom %f:%l,%f:%l:%c:%m,%f(%l):%m,%f:%l:%m,\"%f\"\\, line %l%*\\D%c%*[^ ] %m,%D%*\\a[%*\\d]: Entering directory `%f',%X%*\\a[%*\\d]: Leaving directory `%f',%D%*\\a: Entering directory `%f',%X%*\\a: Leaving directory `%f',%DMaking %*\\a in %f,%f|%l| %m"
|
||||
#define DFLT_EFM "%*[^\"]\"%f\"%*\\D%l: %m,\"%f\"%*\\D%l: %m,%-G%f:%l: (Each undeclared identifier is reported only once,%-G%f:%l: for each function it appears in.),%-GIn file included from %f:%l:%c:,%-GIn file included from %f:%l:%c\\,,%-GIn file included from %f:%l:%c,%-GIn file included from %f:%l,%-G%*[ ]from %f:%l:%c,%-G%*[ ]from %f:%l:,%-G%*[ ]from %f:%l\\,,%-G%*[ ]from %f:%l,%f:%l:%c:%m,%f(%l):%m,%f:%l:%m,\"%f\"\\, line %l%*\\D%c%*[^ ] %m,%D%*\\a[%*\\d]: Entering directory `%f',%X%*\\a[%*\\d]: Leaving directory `%f',%D%*\\a: Entering directory `%f',%X%*\\a: Leaving directory `%f',%DMaking %*\\a in %f,%f|%l| %m"
|
||||
# endif
|
||||
# endif
|
||||
# endif
|
||||
|
||||
@@ -1781,7 +1781,7 @@ swap_me(COLORREF colorref)
|
||||
}
|
||||
|
||||
/* Attempt to make this work for old and new compilers */
|
||||
#if !defined(_MSC_VER) || (_MSC_VER < 1300) || !defined(INT_PTR)
|
||||
#if !defined(_WIN64) && (!defined(_MSC_VER) || _MSC_VER < 1300)
|
||||
# define PDP_RETVAL BOOL
|
||||
#else
|
||||
# define PDP_RETVAL INT_PTR
|
||||
|
||||
68
src/os_qnx.c
68
src/os_qnx.c
@@ -24,10 +24,10 @@ void qnx_init()
|
||||
#if defined(FEAT_GUI_PHOTON)
|
||||
PhChannelParms_t parms;
|
||||
|
||||
memset( &parms, 0, sizeof( parms ) );
|
||||
memset(&parms, 0, sizeof(parms));
|
||||
parms.flags = Ph_DYNAMIC_BUFFER;
|
||||
|
||||
is_photon_available = (PhAttach( NULL, &parms ) != NULL) ? TRUE : FALSE;
|
||||
is_photon_available = (PhAttach(NULL, &parms) != NULL) ? TRUE : FALSE;
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -39,8 +39,8 @@ void qnx_init()
|
||||
/* Turn on the clipboard for a console vim when photon is running */
|
||||
void qnx_clip_init()
|
||||
{
|
||||
if( is_photon_available == TRUE && !gui.in_use)
|
||||
clip_init( TRUE );
|
||||
if (is_photon_available == TRUE && !gui.in_use)
|
||||
clip_init(TRUE);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
@@ -48,32 +48,32 @@ void qnx_clip_init()
|
||||
|
||||
/* No support for owning the clipboard */
|
||||
int
|
||||
clip_mch_own_selection( VimClipboard *cbd )
|
||||
clip_mch_own_selection(VimClipboard *cbd)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
void
|
||||
clip_mch_lose_selection( VimClipboard *cbd )
|
||||
clip_mch_lose_selection(VimClipboard *cbd)
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
clip_mch_request_selection( VimClipboard *cbd )
|
||||
clip_mch_request_selection(VimClipboard *cbd)
|
||||
{
|
||||
int type = MLINE, clip_length = 0, is_type_set = FALSE;
|
||||
void *cbdata;
|
||||
PhClipHeader *clip_header;
|
||||
char_u *clip_text = NULL;
|
||||
|
||||
cbdata = PhClipboardPasteStart( PhInputGroup( NULL ));
|
||||
if( cbdata != NULL )
|
||||
cbdata = PhClipboardPasteStart(PhInputGroup(NULL));
|
||||
if (cbdata != NULL)
|
||||
{
|
||||
/* Look for the vim specific clip first */
|
||||
clip_header = PhClipboardPasteType( cbdata, CLIP_TYPE_VIM );
|
||||
if( clip_header != NULL && clip_header->data != NULL )
|
||||
clip_header = PhClipboardPasteType(cbdata, CLIP_TYPE_VIM);
|
||||
if (clip_header != NULL && clip_header->data != NULL)
|
||||
{
|
||||
switch( *(char *) clip_header->data )
|
||||
switch(*(char *) clip_header->data)
|
||||
{
|
||||
default: /* fallthrough to line type */
|
||||
case 'L': type = MLINE; break;
|
||||
@@ -86,27 +86,27 @@ clip_mch_request_selection( VimClipboard *cbd )
|
||||
}
|
||||
|
||||
/* Try for just normal text */
|
||||
clip_header = PhClipboardPasteType( cbdata, CLIP_TYPE_TEXT );
|
||||
if( clip_header != NULL )
|
||||
clip_header = PhClipboardPasteType(cbdata, CLIP_TYPE_TEXT);
|
||||
if (clip_header != NULL)
|
||||
{
|
||||
clip_text = clip_header->data;
|
||||
clip_length = clip_header->length - 1;
|
||||
|
||||
if( clip_text != NULL && is_type_set == FALSE )
|
||||
if (clip_text != NULL && is_type_set == FALSE)
|
||||
type = MAUTO;
|
||||
}
|
||||
|
||||
if( (clip_text != NULL) && (clip_length > 0) )
|
||||
if ((clip_text != NULL) && (clip_length > 0))
|
||||
{
|
||||
clip_yank_selection( type, clip_text, clip_length, cbd );
|
||||
clip_yank_selection(type, clip_text, clip_length, cbd);
|
||||
}
|
||||
|
||||
PhClipboardPasteFinish( cbdata );
|
||||
PhClipboardPasteFinish(cbdata);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
clip_mch_set_selection( VimClipboard *cbd )
|
||||
clip_mch_set_selection(VimClipboard *cbd)
|
||||
{
|
||||
int type;
|
||||
long_u len;
|
||||
@@ -114,31 +114,31 @@ clip_mch_set_selection( VimClipboard *cbd )
|
||||
PhClipHeader clip_header[2];
|
||||
|
||||
/* Prevent recursion from clip_get_selection() */
|
||||
if( cbd->owned == TRUE )
|
||||
if (cbd->owned == TRUE)
|
||||
return;
|
||||
|
||||
cbd->owned = TRUE;
|
||||
clip_get_selection( cbd );
|
||||
clip_get_selection(cbd);
|
||||
cbd->owned = FALSE;
|
||||
|
||||
type = clip_convert_selection( &str, &len, cbd );
|
||||
if( type >= 0 )
|
||||
type = clip_convert_selection(&str, &len, cbd);
|
||||
if (type >= 0)
|
||||
{
|
||||
text_clip = lalloc( len + 1, TRUE ); /* Normal text */
|
||||
text_clip = lalloc(len + 1, TRUE); /* Normal text */
|
||||
|
||||
if( text_clip && vim_clip )
|
||||
if (text_clip && vim_clip)
|
||||
{
|
||||
memset( clip_header, 0, sizeof( clip_header ) );
|
||||
memset(clip_header, 0, sizeof(clip_header));
|
||||
|
||||
STRNCPY( clip_header[0].type, CLIP_TYPE_VIM, 8 );
|
||||
clip_header[0].length = sizeof( vim_clip );
|
||||
STRNCPY(clip_header[0].type, CLIP_TYPE_VIM, 8);
|
||||
clip_header[0].length = sizeof(vim_clip);
|
||||
clip_header[0].data = vim_clip;
|
||||
|
||||
STRNCPY( clip_header[1].type, CLIP_TYPE_TEXT, 8 );
|
||||
STRNCPY(clip_header[1].type, CLIP_TYPE_TEXT, 8);
|
||||
clip_header[1].length = len + 1;
|
||||
clip_header[1].data = text_clip;
|
||||
|
||||
switch( type )
|
||||
switch(type)
|
||||
{
|
||||
default: /* fallthrough to MLINE */
|
||||
case MLINE: *vim_clip = 'L'; break;
|
||||
@@ -148,14 +148,14 @@ clip_mch_set_selection( VimClipboard *cbd )
|
||||
#endif
|
||||
}
|
||||
|
||||
vim_strncpy( text_clip, str, len );
|
||||
vim_strncpy(text_clip, str, len);
|
||||
|
||||
vim_clip[ 1 ] = NUL;
|
||||
|
||||
PhClipboardCopy( PhInputGroup( NULL ), 2, clip_header);
|
||||
PhClipboardCopy(PhInputGroup(NULL), 2, clip_header);
|
||||
}
|
||||
vim_free( text_clip );
|
||||
vim_free(text_clip);
|
||||
}
|
||||
vim_free( str );
|
||||
vim_free(str);
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -23,6 +23,7 @@ int eval_to_number __ARGS((char_u *expr));
|
||||
list_T *eval_spell_expr __ARGS((char_u *badword, char_u *expr));
|
||||
int get_spellword __ARGS((list_T *list, char_u **pp));
|
||||
typval_T *eval_expr __ARGS((char_u *arg, char_u **nextcmd));
|
||||
int call_vim_function __ARGS((char_u *func, int argc, char_u **argv, int safe, typval_T *rettv));
|
||||
void *call_func_retstr __ARGS((char_u *func, int argc, char_u **argv, int safe));
|
||||
long call_func_retnr __ARGS((char_u *func, int argc, char_u **argv, int safe));
|
||||
void *call_func_retlist __ARGS((char_u *func, int argc, char_u **argv, int safe));
|
||||
@@ -52,6 +53,7 @@ int list_append_dict __ARGS((list_T *list, dict_T *dict));
|
||||
int list_append_string __ARGS((list_T *l, char_u *str, int len));
|
||||
int garbage_collect __ARGS((void));
|
||||
dict_T *dict_alloc __ARGS((void));
|
||||
void dict_unref __ARGS((dict_T *d));
|
||||
dictitem_T *dictitem_alloc __ARGS((char_u *key));
|
||||
void dictitem_free __ARGS((dictitem_T *item));
|
||||
int dict_add __ARGS((dict_T *d, dictitem_T *item));
|
||||
|
||||
@@ -3927,7 +3927,7 @@ again:
|
||||
curwin->w_cursor = old_pos;
|
||||
goto theend;
|
||||
}
|
||||
sprintf((char *)spat, "<%.*s\\%%(\\_[^>]\\{-}[^/]>\\|>\\)\\c", len, p);
|
||||
sprintf((char *)spat, "<%.*s\\>\\%%(\\_[^>]\\{-}[^/]>\\|>\\)\\c", len, p);
|
||||
sprintf((char *)epat, "</%.*s>\\c", len, p);
|
||||
|
||||
r = do_searchpair(spat, (char_u *)"", epat, FORWARD, (char_u *)"",
|
||||
|
||||
@@ -709,6 +709,52 @@ static char *(features[]) =
|
||||
|
||||
static int included_patches[] =
|
||||
{ /* Add new patch number below this line */
|
||||
/**/
|
||||
331,
|
||||
/**/
|
||||
330,
|
||||
/**/
|
||||
329,
|
||||
/**/
|
||||
328,
|
||||
/**/
|
||||
327,
|
||||
/**/
|
||||
326,
|
||||
/**/
|
||||
325,
|
||||
/**/
|
||||
324,
|
||||
/**/
|
||||
323,
|
||||
/**/
|
||||
322,
|
||||
/**/
|
||||
321,
|
||||
/**/
|
||||
320,
|
||||
/**/
|
||||
319,
|
||||
/**/
|
||||
318,
|
||||
/**/
|
||||
317,
|
||||
/**/
|
||||
316,
|
||||
/**/
|
||||
315,
|
||||
/**/
|
||||
314,
|
||||
/**/
|
||||
313,
|
||||
/**/
|
||||
312,
|
||||
/**/
|
||||
311,
|
||||
/**/
|
||||
310,
|
||||
/**/
|
||||
309,
|
||||
/**/
|
||||
308,
|
||||
/**/
|
||||
|
||||
28
src/xxd/Make_ming.mak
Normal file
28
src/xxd/Make_ming.mak
Normal file
@@ -0,0 +1,28 @@
|
||||
# The most simplistic Makefile, for MinGW gcc on MS-DOS
|
||||
|
||||
ifndef USEDLL
|
||||
USEDLL = no
|
||||
endif
|
||||
|
||||
ifeq (yes, $(USEDLL))
|
||||
DEFINES =
|
||||
LIBS = -lc
|
||||
else
|
||||
DEFINES =
|
||||
LIBS =
|
||||
endif
|
||||
|
||||
CC = gcc
|
||||
CFLAGS = -O2 -Wall -DWIN32 $(DEFINES)
|
||||
|
||||
ifneq (sh.exe, $(SHELL))
|
||||
DEL = rm
|
||||
else
|
||||
DEL = del
|
||||
endif
|
||||
|
||||
xxd.exe: xxd.c
|
||||
$(CC) $(CFLAGS) -s -o xxd.exe xxd.c $(LIBS)
|
||||
|
||||
clean:
|
||||
-$(DEL) xxd.exe
|
||||
Reference in New Issue
Block a user