mirror of
https://github.com/zoriya/vim.git
synced 2026-01-08 16:00:51 +00:00
Compare commits
18 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b8e86705ca | ||
|
|
bd74325960 | ||
|
|
727c876b78 | ||
|
|
483c5d80a7 | ||
|
|
680eeca955 | ||
|
|
f75d498844 | ||
|
|
b60574ba21 | ||
|
|
464c92545a | ||
|
|
77a0aa457d | ||
|
|
78f74a91bf | ||
|
|
a4f332b44c | ||
|
|
624891f3ef | ||
|
|
d5784f9fc4 | ||
|
|
423f97277d | ||
|
|
341ad7a699 | ||
|
|
4a74803ef8 | ||
|
|
c2a406b317 | ||
|
|
d622beb3c3 |
@@ -1,7 +1,7 @@
|
||||
" Vim compiler file
|
||||
" Compiler: GNU C Compiler
|
||||
" Maintainer: Nikolai Weibull <now@bitwi.se>
|
||||
" Latest Revision: 2010-05-30
|
||||
" Latest Revision: 2010-10-14
|
||||
|
||||
if exists("current_compiler")
|
||||
finish
|
||||
@@ -18,10 +18,10 @@ CompilerSet errorformat=
|
||||
\\"%f\"%*\\D%l:\ %m,
|
||||
\%-G%f:%l:\ %trror:\ (Each\ undeclared\ identifier\ is\ reported\ only\ once,
|
||||
\%-G%f:%l:\ %trror:\ for\ each\ function\ it\ appears\ in.),
|
||||
\%f:%l:%c:\ %terror:\ %m,
|
||||
\%f:%l:%c:\ %trror:\ %m,
|
||||
\%f:%l:%c:\ %tarning:\ %m,
|
||||
\%f:%l:%c:\ %m,
|
||||
\%f:%l:\ %terror:\ %m,
|
||||
\%f:%l:\ %trror:\ %m,
|
||||
\%f:%l:\ %tarning:\ %m,
|
||||
\%f:%l:\ %m,
|
||||
\\"%f\"\\,\ line\ %l%*\\D%c%*[^\ ]\ %m,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*diff.txt* For Vim version 7.3. Last change: 2010 Jul 31
|
||||
*diff.txt* For Vim version 7.3. Last change: 2010 Sep 30
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -261,10 +261,12 @@ that the buffers will be equal within the specified range.
|
||||
*do*
|
||||
do Same as ":diffget" without argument or range. The "o" stands
|
||||
for "obtain" ("dg" can't be used, it could be the start of
|
||||
"dgg"!).
|
||||
"dgg"!). Note: this doesn't work in Visual mode.
|
||||
|
||||
*dp*
|
||||
dp Same as ":diffput" without argument or range.
|
||||
Note: this doesn't work in Visual mode.
|
||||
|
||||
|
||||
When no [range] is given, the diff at the cursor position or just above it is
|
||||
affected. When [range] is used, Vim tries to only put or get the specified
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*eval.txt* For Vim version 7.3. Last change: 2010 Sep 14
|
||||
*eval.txt* For Vim version 7.3. Last change: 2010 Oct 18
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -1115,8 +1115,8 @@ See below |functions|.
|
||||
|
||||
|
||||
==============================================================================
|
||||
3. Internal variable *internal-variables* *E121*
|
||||
*E461*
|
||||
3. Internal variable *internal-variables* *E461*
|
||||
|
||||
An internal variable name can be made up of letters, digits and '_'. But it
|
||||
cannot start with a digit. It's also possible to use curly braces, see
|
||||
|curly-braces-names|.
|
||||
@@ -1657,6 +1657,11 @@ v:version Version number of Vim: Major version number times 100 plus
|
||||
*v:warningmsg* *warningmsg-variable*
|
||||
v:warningmsg Last given warning message. It's allowed to set this variable.
|
||||
|
||||
*v:windowid* *windowid-variable*
|
||||
v:windowid When any X11 based GUI is running or when running in a
|
||||
terminal and Vim connects to the X server (|-X|) this will be
|
||||
set to the window ID. Otherwise the value is zero.
|
||||
|
||||
==============================================================================
|
||||
4. Builtin Functions *functions*
|
||||
|
||||
@@ -1822,7 +1827,7 @@ localtime() Number current time
|
||||
log( {expr}) Float natural logarithm (base e) of {expr}
|
||||
log10( {expr}) Float logarithm of Float {expr} to base 10
|
||||
map( {expr}, {string}) List/Dict change each item in {expr} to {expr}
|
||||
maparg( {name}[, {mode} [, {abbr}]])
|
||||
maparg( {name}[, {mode} [, {abbr} [, {dict}]]])
|
||||
String rhs of mapping {name} in mode {mode}
|
||||
mapcheck( {name}[, {mode} [, {abbr}]])
|
||||
String check for mappings matching {name}
|
||||
@@ -1934,6 +1939,7 @@ synID( {lnum}, {col}, {trans}) Number syntax ID at {lnum} and {col}
|
||||
synIDattr( {synID}, {what} [, {mode}])
|
||||
String attribute {what} of syntax ID {synID}
|
||||
synIDtrans( {synID}) Number translated syntax ID of {synID}
|
||||
synconcealed( {lnum}, {col}) List info about concealing
|
||||
synstack( {lnum}, {col}) List stack of syntax IDs at {lnum} and {col}
|
||||
system( {expr} [, {input}]) String output of shell command/filter {expr}
|
||||
tabpagebuflist( [{arg}]) List list of buffer numbers in tab page
|
||||
@@ -3966,23 +3972,51 @@ map({expr}, {string}) *map()*
|
||||
further items in {expr} are processed.
|
||||
|
||||
|
||||
maparg({name}[, {mode} [, {abbr}]]) *maparg()*
|
||||
Return the rhs of mapping {name} in mode {mode}. When there
|
||||
is no mapping for {name}, an empty String is returned.
|
||||
maparg({name}[, {mode} [, {abbr} [, {dict}]]]) *maparg()*
|
||||
When {dict} is omitted or zero: Return the rhs of mapping
|
||||
{name} in mode {mode}. The returned String has special
|
||||
characters translated like in the output of the ":map" command
|
||||
listing.
|
||||
|
||||
When there is no mapping for {name}, an empty String is
|
||||
returned.
|
||||
|
||||
The {name} can have special key names, like in the ":map"
|
||||
command.
|
||||
|
||||
{mode} can be one of these strings:
|
||||
"n" Normal
|
||||
"v" Visual
|
||||
"v" Visual (including Select)
|
||||
"o" Operator-pending
|
||||
"i" Insert
|
||||
"c" Cmd-line
|
||||
"s" Select
|
||||
"x" Visual
|
||||
"l" langmap |language-mapping|
|
||||
"" Normal, Visual and Operator-pending
|
||||
When {mode} is omitted, the modes for "" are used.
|
||||
|
||||
When {abbr} is there and it is non-zero use abbreviations
|
||||
instead of mappings.
|
||||
The {name} can have special key names, like in the ":map"
|
||||
command. The returned String has special characters
|
||||
translated like in the output of the ":map" command listing.
|
||||
|
||||
When {dict} is there and it is non-zero return a dictionary
|
||||
containing all the information of the mapping with the
|
||||
following items:
|
||||
"lhs" The {lhs} of the mapping.
|
||||
"rhs" The {rhs} of the mapping as typed.
|
||||
"silent" 1 for a |:map-silent| mapping, else 0.
|
||||
"noremap" 1 if the {rhs} of the mapping is remappable.
|
||||
"expr" 1 for an expression mapping (|:map-<expr>|).
|
||||
"buffer" 1 for a buffer local mapping (|:map-local|).
|
||||
"mode" Modes for which the mapping is defined. In
|
||||
addition to the modes mentioned above, these
|
||||
characters will be used:
|
||||
" " Normal, Visual and Operator-pending
|
||||
"!" Insert and Commandline mode
|
||||
(|mapmpde-ic|)
|
||||
"sid" the Script local ID, used for <sid> mappings
|
||||
(|<SID>|)
|
||||
|
||||
The mappings local to the current buffer are checked first,
|
||||
then the global mappings.
|
||||
This function can be used to map a key even when it's already
|
||||
@@ -5558,20 +5592,6 @@ synID({lnum}, {col}, {trans}) *synID()*
|
||||
:echo synIDattr(synID(line("."), col("."), 1), "name")
|
||||
<
|
||||
|
||||
synconcealed({lnum}, {col}) *synconcealed()*
|
||||
The result is a List. The first item in the list is 0 if the
|
||||
character at the position {lnum} and {col} is not part of a
|
||||
concealable region, 1 if it is. The second item in the list is
|
||||
a string. If the first item is 1, the second item contains the
|
||||
text which will be displayed in place of the concealed text,
|
||||
depending on the current setting of 'conceallevel'. The third
|
||||
and final item in the list is a unique number representing the
|
||||
specific syntax region matched. This allows detection of the
|
||||
beginning of a new concealable region if there are two
|
||||
consecutive regions with the same replacement character.
|
||||
For an example use see $VIMRUNTIME/syntax/2html.vim .
|
||||
|
||||
|
||||
synIDattr({synID}, {what} [, {mode}]) *synIDattr()*
|
||||
The result is a String, which is the {what} attribute of
|
||||
syntax ID {synID}. This can be used to obtain information
|
||||
@@ -5612,6 +5632,20 @@ synIDtrans({synID}) *synIDtrans()*
|
||||
highlight the character. Highlight links given with
|
||||
":highlight link" are followed.
|
||||
|
||||
synconcealed({lnum}, {col}) *synconcealed()*
|
||||
The result is a List. The first item in the list is 0 if the
|
||||
character at the position {lnum} and {col} is not part of a
|
||||
concealable region, 1 if it is. The second item in the list is
|
||||
a string. If the first item is 1, the second item contains the
|
||||
text which will be displayed in place of the concealed text,
|
||||
depending on the current setting of 'conceallevel'. The third
|
||||
and final item in the list is a unique number representing the
|
||||
specific syntax region matched. This allows detection of the
|
||||
beginning of a new concealable region if there are two
|
||||
consecutive regions with the same replacement character.
|
||||
For an example use see $VIMRUNTIME/syntax/2html.vim .
|
||||
|
||||
|
||||
synstack({lnum}, {col}) *synstack()*
|
||||
Return a |List|, which is the stack of syntax items at the
|
||||
position {lnum} and {col} in the current window. Each item in
|
||||
@@ -6741,7 +6775,8 @@ This would call the function "my_func_whizz(parameter)".
|
||||
:let [{name}, ..., ; {lastname}] -= {expr1}
|
||||
Like above, but append/add/subtract the value for each
|
||||
|List| item.
|
||||
*E106*
|
||||
|
||||
*E121*
|
||||
:let {var-name} .. List the value of variable {var-name}. Multiple
|
||||
variable names may be given. Special names recognized
|
||||
here: *E738*
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*if_cscop.txt* For Vim version 7.3. Last change: 2009 Mar 18
|
||||
*if_cscop.txt* For Vim version 7.3. Last change: 2010 Sep 29
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Andy Kahn
|
||||
@@ -112,8 +112,7 @@ The available subcommands are:
|
||||
:cscope add /projects/vim/cscope.out /usr/local/vim
|
||||
:cscope add cscope.out /usr/local/vim -C
|
||||
<
|
||||
*cscope-find* *cs-find*
|
||||
*E565* *E567*
|
||||
*cscope-find* *cs-find* *E567*
|
||||
find : Query cscope. All cscope query options are available
|
||||
except option #5 ("Change this grep pattern").
|
||||
|
||||
@@ -198,7 +197,7 @@ The available subcommands are:
|
||||
|
||||
USAGE :cs help
|
||||
|
||||
*E260* *E261*
|
||||
*E261*
|
||||
kill : Kill a cscope connection (or kill all cscope connections).
|
||||
|
||||
USAGE :cs kill {num|partial_name}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*if_pyth.txt* For Vim version 7.3. Last change: 2010 Aug 13
|
||||
*if_pyth.txt* For Vim version 7.3. Last change: 2010 Oct 20
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Paul Moore
|
||||
@@ -355,7 +355,7 @@ When Python 2 and Python 3 are both supported they must be loaded dynamically.
|
||||
When doing this on Linux/Unix systems and importing global symbols, this leads
|
||||
to a crash when the second Python version is used. So either global symbols
|
||||
are loaded but only one Python version is activated, or no global symbols are
|
||||
loaded. The latter makes Python's "import" fail on libaries that expect the
|
||||
loaded. The latter makes Python's "import" fail on libraries that expect the
|
||||
symbols to be provided by Vim.
|
||||
*E836* *E837*
|
||||
Vim's configuration script makes a guess for all libraries based on one
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*insert.txt* For Vim version 7.3. Last change: 2010 Sep 15
|
||||
*insert.txt* For Vim version 7.3. Last change: 2010 Sep 29
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -1766,6 +1766,11 @@ These two commands will keep on asking for lines, until you type a line
|
||||
containing only a ".". Watch out for lines starting with a backslash, see
|
||||
|line-continuation|.
|
||||
|
||||
When in Ex mode (see |-e|) a backslash at the end of the line can be used to
|
||||
insert a NUL character. To be able to have a line ending in a backslash use
|
||||
two backslashes. This means that the number of backslashes is halved, but
|
||||
only at the end of the line.
|
||||
|
||||
NOTE: These commands cannot be used with |:global| or |:vglobal|.
|
||||
":append" and ":insert" don't work properly in between ":if" and
|
||||
":endif", ":for" and ":endfor", ":while" and ":endwhile".
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*intro.txt* For Vim version 7.3. Last change: 2010 Jul 20
|
||||
*intro.txt* For Vim version 7.3. Last change: 2010 Sep 29
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -300,7 +300,7 @@ and <> are part of what you type, the context should make this clear.
|
||||
|
||||
[] Characters in square brackets are optional.
|
||||
|
||||
*count* *[count]* *E489*
|
||||
*count* *[count]*
|
||||
[count] An optional number that may precede the command to multiply
|
||||
or iterate the command. If no number is given, a count of one
|
||||
is used, unless otherwise noted. Note that in this manual the
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*map.txt* For Vim version 7.3. Last change: 2010 Jul 31
|
||||
*map.txt* For Vim version 7.3. Last change: 2010 Sep 29
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -1203,6 +1203,7 @@ completion can be enabled:
|
||||
-complete=augroup autocmd groups
|
||||
-complete=buffer buffer names
|
||||
-complete=command Ex command (and arguments)
|
||||
-complete=cscope |:cscope| suboptions
|
||||
-complete=dir directory names
|
||||
-complete=environment environment variable names
|
||||
-complete=event autocommand events
|
||||
@@ -1216,6 +1217,7 @@ completion can be enabled:
|
||||
-complete=menu menus
|
||||
-complete=option options
|
||||
-complete=shellcmd Shell command
|
||||
-complete=sign |:sign| suboptions
|
||||
-complete=syntax syntax file names |'syntax'|
|
||||
-complete=tag tags
|
||||
-complete=tag_listfiles tags, file names are shown when CTRL-D is hit
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*netbeans.txt* For Vim version 7.3. Last change: 2010 Aug 20
|
||||
*netbeans.txt* For Vim version 7.3. Last change: 2010 Sep 29
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Gordon Prieur et al.
|
||||
@@ -820,7 +820,7 @@ These errors occur when a message violates the protocol:
|
||||
==============================================================================
|
||||
7. NetBeans commands *netbeans-commands*
|
||||
|
||||
*:nbstart* *E511*
|
||||
*:nbstart* *E511* *E838*
|
||||
:nbs[tart] {connection} Start a new Netbeans session with {connection} as the
|
||||
socket connection parameters. The format of
|
||||
{connection} is described in |netbeans-parameters|.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*options.txt* For Vim version 7.3. Last change: 2010 Sep 21
|
||||
*options.txt* For Vim version 7.3. Last change: 2010 Oct 20
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -1496,6 +1496,25 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
feature}
|
||||
Number of screen lines to use for the command-line window. |cmdwin|
|
||||
|
||||
*'colorcolumn'* *'cc'*
|
||||
'colorcolumn' 'cc' string (default "")
|
||||
local to window
|
||||
{not in Vi}
|
||||
{not available when compiled without the |+syntax|
|
||||
feature}
|
||||
'colorcolumn' is a comma separated list of screen columns that are
|
||||
highlighted with ColorColumn |hl-ColorColumn|. Useful to align
|
||||
text. Will make screen redrawing slower.
|
||||
The screen column can be an absolute number, or a number preceded with
|
||||
'+' or '-', which is added to or subtracted from 'textwidth'. >
|
||||
|
||||
:set cc=+1 " highlight column after 'textwidth'
|
||||
:set cc=+1,+2,+3 " highlight three columns after 'textwidth'
|
||||
:hi ColorColumn ctermbg=lightgrey guibg=lightgrey
|
||||
<
|
||||
When 'textwidth' is zero then the items with '-' and '+' are not used.
|
||||
A maximum of 256 columns are highlighted.
|
||||
|
||||
*'columns'* *'co'* *E594*
|
||||
'columns' 'co' number (default 80 or terminal width)
|
||||
global
|
||||
@@ -4601,25 +4620,6 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
< This option cannot be set from a |modeline| or in the |sandbox|, for
|
||||
security reasons.
|
||||
|
||||
*'colorcolumn'* *'cc'*
|
||||
'colorcolumn' 'cc' string (default "")
|
||||
local to window
|
||||
{not in Vi}
|
||||
{not available when compiled without the |+syntax|
|
||||
feature}
|
||||
'colorcolumn' is a comma separated list of screen columns that are
|
||||
highlighted with ColorColumn |hl-ColorColumn|. Useful to align
|
||||
text. Will make screen redrawing slower.
|
||||
The screen column can be an absolute number, or a number preceded with
|
||||
'+' or '-', which is added to or subtracted from 'textwidth'. >
|
||||
|
||||
:set cc=+1 " highlight column after 'textwidth'
|
||||
:set cc=+1,+2,+3 " highlight three columns after 'textwidth'
|
||||
:hi ColorColumn ctermbg=lightgrey guibg=lightgrey
|
||||
<
|
||||
When 'textwidth' is zero then the items with '-' and '+' are not used.
|
||||
A maximum of 256 columns are highlighted.
|
||||
|
||||
*'matchpairs'* *'mps'*
|
||||
'matchpairs' 'mps' string (default "(:),{:},[:]")
|
||||
local to buffer
|
||||
@@ -7530,8 +7530,9 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
! When included, save and restore global variables that start
|
||||
with an uppercase letter, and don't contain a lowercase
|
||||
letter. Thus "KEEPTHIS and "K_L_M" are stored, but "KeepThis"
|
||||
and "_K_L_M" are not. Only String and Number types are
|
||||
stored.
|
||||
and "_K_L_M" are not. Nested List and Dict items may not be
|
||||
read back correctly, you end up with a string representation
|
||||
instead.
|
||||
" Maximum number of lines saved for each register. Old name of
|
||||
the '<' item, with the disadvantage that you need to put a
|
||||
backslash before the ", otherwise it will be recognized as the
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*quickfix.txt* For Vim version 7.3. Last change: 2010 Jul 20
|
||||
*quickfix.txt* For Vim version 7.3. Last change: 2010 Oct 20
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -546,6 +546,14 @@ descriptors when searching many files. However, when the |:hide| command
|
||||
modifier is used the buffers are kept loaded. This makes following searches
|
||||
in the same files a lot faster.
|
||||
|
||||
Note that |:copen| (or |:lopen| for |:lgrep|) may be used to open a buffer
|
||||
containing the search results in linked form. The |:silent| command may be
|
||||
used to suppress the default full screen grep output. The |:grep!| form of
|
||||
the |:grep| command doesn't jump to the first match automatically. These
|
||||
commands can be combined to create a NewGrep command: >
|
||||
|
||||
command! -nargs=+ NewGrep execute 'silent grep! <args>' | copen 42
|
||||
|
||||
|
||||
5.1 using Vim's internal grep
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*sign.txt* For Vim version 7.3. Last change: 2010 May 07
|
||||
*sign.txt* For Vim version 7.3. Last change: 2010 Oct 14
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Gordon Prieur
|
||||
@@ -70,7 +70,8 @@ DEFINING A SIGN. *:sign-define* *E255* *E160* *E612*
|
||||
:sign define {name} {argument}...
|
||||
Define a new sign or set attributes for an existing sign.
|
||||
The {name} can either be a number (all digits) or a name
|
||||
starting with a non-digit.
|
||||
starting with a non-digit. Leading digits are ignored, thus
|
||||
"0012", "012" and "12" are considered the same name.
|
||||
About 120 different signs can be defined.
|
||||
|
||||
Accepted arguments:
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*syntax.txt* For Vim version 7.3. Last change: 2010 Sep 14
|
||||
*syntax.txt* For Vim version 7.3. Last change: 2010 Sep 23
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -2258,7 +2258,7 @@ For highlighted builtin functions: >
|
||||
For highlighted standard exceptions: >
|
||||
:let python_highlight_exceptions = 1
|
||||
|
||||
For highlighted trailing whitespace and mix of spaces and tabs:
|
||||
For highlighted trailing whitespace and mix of spaces and tabs: >
|
||||
:let python_highlight_space_errors = 1
|
||||
|
||||
If you want all possible Python highlighting (the same as setting the
|
||||
|
||||
@@ -3420,7 +3420,6 @@ E102 diff.txt /*E102*
|
||||
E103 diff.txt /*E103*
|
||||
E104 digraph.txt /*E104*
|
||||
E105 mbyte.txt /*E105*
|
||||
E106 eval.txt /*E106*
|
||||
E107 eval.txt /*E107*
|
||||
E108 eval.txt /*E108*
|
||||
E109 eval.txt /*E109*
|
||||
@@ -3587,7 +3586,6 @@ E257 if_cscop.txt /*E257*
|
||||
E258 remote.txt /*E258*
|
||||
E259 if_cscop.txt /*E259*
|
||||
E26 rileft.txt /*E26*
|
||||
E260 if_cscop.txt /*E260*
|
||||
E261 if_cscop.txt /*E261*
|
||||
E262 if_cscop.txt /*E262*
|
||||
E263 if_pyth.txt /*E263*
|
||||
@@ -3836,7 +3834,6 @@ E485 message.txt /*E485*
|
||||
E486 pattern.txt /*E486*
|
||||
E487 options.txt /*E487*
|
||||
E488 message.txt /*E488*
|
||||
E489 intro.txt /*E489*
|
||||
E49 message.txt /*E49*
|
||||
E490 fold.txt /*E490*
|
||||
E492 message.txt /*E492*
|
||||
@@ -3919,7 +3916,6 @@ E561 if_cscop.txt /*E561*
|
||||
E562 if_cscop.txt /*E562*
|
||||
E563 if_cscop.txt /*E563*
|
||||
E564 if_cscop.txt /*E564*
|
||||
E565 if_cscop.txt /*E565*
|
||||
E566 if_cscop.txt /*E566*
|
||||
E567 if_cscop.txt /*E567*
|
||||
E568 if_cscop.txt /*E568*
|
||||
@@ -4219,6 +4215,7 @@ E834 options.txt /*E834*
|
||||
E835 options.txt /*E835*
|
||||
E836 if_pyth.txt /*E836*
|
||||
E837 if_pyth.txt /*E837*
|
||||
E838 netbeans.txt /*E838*
|
||||
E84 windows.txt /*E84*
|
||||
E85 options.txt /*E85*
|
||||
E86 windows.txt /*E86*
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*todo.txt* For Vim version 7.3. Last change: 2010 Sep 21
|
||||
*todo.txt* For Vim version 7.3. Last change: 2010 Oct 20
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -30,35 +30,9 @@ be worked on, but only if you sponsor Vim development. See |sponsor|.
|
||||
*known-bugs*
|
||||
-------------------- Known bugs and current work -----------------------
|
||||
|
||||
Patch for Mingw build file (Jon, 2010 Aug 22)
|
||||
Patch for loading different Ruby versions. (Jon, 2010 Aug 23)
|
||||
|
||||
Document cscope and sign completion for user commands. (Peter Odding, 2010 Aug
|
||||
19)
|
||||
|
||||
Problem with \NL in Ex script. (Ray Frish, 2010 Aug 10)
|
||||
|
||||
":e ~br<Tab>" does not complete to ":e /home/bram/". Crash too?
|
||||
|
||||
Runtime file for Falcon. (Steven Oliver, 2010 Sep 14)
|
||||
|
||||
Patch to fix error tags in help files. (Dominique Pelle, 2010 Aug 25)
|
||||
|
||||
Patch to fix :nbstart silently failing. (Xavier de Gaye, 2010 Aug 20)
|
||||
Another one for when Athena has netbeans support.
|
||||
|
||||
patch for 3 bugs reported by smatch. (Dominique Pelle, 2010 Aug 23)
|
||||
|
||||
'cursorline' is displayed too short when there are concealed characters and
|
||||
'list' is set, 'listchars' at default value. (Dennis Preiser, 2010 Aug 15)
|
||||
|
||||
Hang on slave PTY on Mac. Patch from Nikola Knezevic, 2010 Aug 29.
|
||||
|
||||
Patch to support netbeans under Athena. (Xavier de Gaye, 2010 Aug 20)
|
||||
|
||||
Patch to fix sign type negative and memory not freed. (Xavier de Gaye, 2010
|
||||
Aug 20)
|
||||
|
||||
Conceal: using Tab for cchar causes problems. Should reject it. (ZyX, 2010
|
||||
Aug 25)
|
||||
|
||||
@@ -66,13 +40,14 @@ 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)
|
||||
|
||||
Patch for :mksession not escaping file name properly. (Peter Odding, 2010 Sep
|
||||
19)
|
||||
|
||||
Patch for :grep docs. (Britton Kerin, 2010 Aug 31)
|
||||
|
||||
Windows keys not set properly on Windows 7? (cncyber, 2010 Aug 26)
|
||||
|
||||
This line hangs Vim, because of syntax HL:
|
||||
call append(line, "INFO ....12....18....24....30....36....42....48....54....60....66....72....78%$")
|
||||
|
||||
Patch to add v:windowid. (Christian J. Robinson, 2010 Oct 13, update by Lech
|
||||
Lorens, Oct 14)
|
||||
|
||||
maparg() doesn't return the flags, such as <buffer>, <script>, <silent>.
|
||||
These are needed to save and restore a mapping.
|
||||
Also: the rhs string is not always correct. (Hari Krishna Dara, 2009 Sept 29)
|
||||
@@ -83,38 +58,74 @@ build. (Bill Lam, 2010 Sep 18)
|
||||
|
||||
Bug: E685 error for func_unref(). (ZyX, 2010 Aug 5)
|
||||
|
||||
Using ":break" or something else that stops executing commands inside a
|
||||
":finally" does not rethrow a previously uncaught exception. (ZyX, 2010 Oct
|
||||
15)
|
||||
|
||||
Patch to fix warning for accessing mediumVersion. (Dominique Pelle, 2010 Aug
|
||||
18)
|
||||
|
||||
Patch for 2html to support 'fileencoding'. (Benjamin Fritz, 2010 Sep 10)
|
||||
|
||||
CTRL-] on help tag |/[\n]| doesn't jump to the right place. (Tony Mechelynck,
|
||||
2010 Aug 8)
|
||||
Patch to use 'previewheight' for popup menu. (Benjamin Haskell, 2010 Sep 29)
|
||||
|
||||
Three patches for undo persistence. (Christian Brabandt, 2010 Sep 4)
|
||||
|
||||
ml_get error for using :copen in a custom complete function. (Xavier
|
||||
Deguillard, 2010 Oct 19) Other way to reproduce it by Lech Lorens, Oct 20.
|
||||
|
||||
string() can't parse back "inf" and "nan". Fix documentation or fix code?
|
||||
(ZyX, 2010 Aug 23)
|
||||
|
||||
Patch to use "--as-needed" instead of the link.sh functionality. (Kirill A.
|
||||
Shutemov, 2010 Aug 25)
|
||||
|
||||
Patch to fix complete(). (Kikuchan, 2010 Oct 15)
|
||||
|
||||
Ruby: Patch to load Gem module. Why is this needed? (Yasuhiro Matsumoto, 2010
|
||||
Oct 6)
|
||||
|
||||
":command Print echo 'print'" works, but ":Print" doesn't. Builtin Print
|
||||
should be overruled. (Aaron Thoma)
|
||||
Patch by Christian Brabandt, 2010 Sep 5.
|
||||
|
||||
Comparing recursive structure loops forever. (ZyX, 2010 Aug 22, info from John
|
||||
Beckett Aug 23)
|
||||
Patch from Christian Brabandt, 2010 Oct 2
|
||||
|
||||
":drop" does not respect 'autochdir'. (Peter Odding, 2010 Jul 24)
|
||||
Patch from Benjamin Fritz, 2010 Oct 13.
|
||||
|
||||
Highlighting stops working after changing it many times. Script to reproduce
|
||||
it: Pablo Contreras, 2010 Oct 12 Windows XP and 7. Font is never freed?
|
||||
|
||||
GTK: drawing a double-width combining character over single-width characters
|
||||
doesn't look right. (Dominique Pelle, 2010 Aug 8)
|
||||
|
||||
copy/paste between Vim and Google chrome doesn't work well for multi-byte
|
||||
Using ":call" inside "if 0" does not see that a function returns a Dict and
|
||||
gives error for "." as string concatenation. (Yasuhiro Matsumoto, 2010 Oct 20)
|
||||
|
||||
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
|
||||
properly, Prepend "ENC==={value of 'enc'}:" to the text and don't convert?
|
||||
Then it should at least work from Vim to Vim and in other applications it's
|
||||
clear why it doesn't work.
|
||||
|
||||
Editing a file with a ^M with 'ff' set to "mac", opening a help file, then the
|
||||
^M is displayed as ^J sometimes. Getting 'ff' value from wrong window/buffer?
|
||||
|
||||
Patch to add 'systemencoding', convert between 'encoding' and this for file
|
||||
names, shell commands and the like. (Kikuchan, 2010 Oct 14)
|
||||
Assume the system converts between the actual encoding of the filesystem to
|
||||
the system encoding (usually utf-8).
|
||||
|
||||
Problem producing tags file when hebrew.frx is present. It has a BOM.
|
||||
Results in E670. (Tony Mechelynck, 2010 May 2)
|
||||
|
||||
Patch for dynamic loading Ruby on Unix. (Jon, 2010 Aug 23)
|
||||
Included, but also need a change to configure.
|
||||
|
||||
setpos() does not restore cursor position after :normal. (Tyru, 2010 Aug 11)
|
||||
|
||||
getpos()/setpos() don't include curswant. getpos() could return a fifth
|
||||
@@ -124,13 +135,12 @@ and that it's documented.
|
||||
|
||||
Messages in message.txt are highlighted as examples.
|
||||
|
||||
Win32: Patch to fix slow access over network (David Anderson). Cleaned up by
|
||||
John Beckett, 2010 Aug 25.
|
||||
|
||||
Test 73 fails on MS-Windows when compiled with DJGPP and run twice. How to
|
||||
delete the Xfind directory? Add an rmdir() function, just like we have
|
||||
mkdir().
|
||||
|
||||
":echo "\x85" =~# '[\u0085]'" returns 1 instead of 0. (ZyX, 2010 Oct 3)
|
||||
|
||||
'cindent' not correct when 'list' is set. (Zdravi Korusef, 2010 Apr 15)
|
||||
|
||||
Windows installer: licence text should not use indent, causes bad word wrap.
|
||||
@@ -153,8 +163,6 @@ Patch: Let rare word highlighting overrule good word highlighting.
|
||||
|
||||
Patch to make more characters work in dialogs. (Yankwei Jia, 2010 Aug 4)
|
||||
|
||||
":drop" does not respect 'autochdir'. (Peter Odding, 2010 Jul 24)
|
||||
|
||||
When 'lines' is 25 and 'scrolloff' is 12, "j" scrolls zero or two lines
|
||||
instead of one. (Constantin Pan, 2010 Sep 10)
|
||||
|
||||
@@ -193,6 +201,8 @@ Shell not recognized properly if it ends in "csh -f". (James Vega, 2009 Nov 3)
|
||||
Find tail? Might have a / in argument. Find space? Might have space in
|
||||
path.
|
||||
|
||||
":sort n" treats empty line as higher than zero. (Beeyawned, 2010 Oct 13)
|
||||
|
||||
":function f(x) keepjumps" creates a function where every command is executed
|
||||
like it has ":keepjumps" before it.
|
||||
|
||||
@@ -231,12 +241,18 @@ Disable updating folds while completion is active? (Peter Odding, 2010 Jun 9)
|
||||
In command line window ":close" doesn't work properly. (Tony Mechelynck, 2009
|
||||
Jun 1)
|
||||
|
||||
Cannot use getchar() inside :normal and using an expression mapping. Is this
|
||||
supposed to work? (XyX, 2010 Sep 22)
|
||||
|
||||
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.
|
||||
|
||||
There is no command line completion for ":lmap".
|
||||
|
||||
":e ~br<Tab>" does not complete to ":e /home/bram/". Would need to use
|
||||
getpwent() to find all the matches.
|
||||
|
||||
Invalid read error in Farsi mode. (Dominique Pelle, 2009 Aug 2)
|
||||
|
||||
For running gvim on an USB stick: avoid the OLE registration. Use a command
|
||||
@@ -245,12 +261,6 @@ line argument -noregister.
|
||||
When a mapping exists both for insert mode and lang-insert mode, the last one
|
||||
doesn't work. (Tyru, 2010 May 6) Or is this intended?
|
||||
|
||||
Cursor position wrong when 'formatoptions' contains "a". (Moshe Kamensky, 2010
|
||||
Sep 7, Gary Johnson, 2010 Sep 14)
|
||||
Formatoptions cause cursor to jump. (ZyX, 2010 Aug 22)
|
||||
Caused by revision 2294, "Make joining a range of lines much faster. (Milan
|
||||
Vancura)" ?
|
||||
|
||||
Still a problem with ":make" in the wrong directory. Caused by ":bufdo".
|
||||
(Ajit Thakkar, 2009 Jul 1) More information Jul 9, Jul 15.
|
||||
Caused by "doautoall syntaxset BufEnter *" in syntax/nosyntax.vim ?
|
||||
@@ -361,6 +371,10 @@ perhaps. And undo CTRL-W. CTRL-G l would redo.
|
||||
|
||||
Diff mode out of sync. (Gary Johnson, 2010 Aug 4)
|
||||
|
||||
Support a 'systemencoding' option (for Unix). It specifies the encoding of
|
||||
file names. (Kikuchan, 2010 Oct 5). Useful on a latin1 or double-byte Asian
|
||||
system when 'encoding' is "utf-8".
|
||||
|
||||
Win32: A --remote command that has a directory name starting with a ( doesn't
|
||||
work, the backslash is removed, assuming that it escapes the (. (Valery
|
||||
Kondakoff, 2009 May 13)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*undo.txt* For Vim version 7.3. Last change: 2010 Sep 14
|
||||
*undo.txt* For Vim version 7.3. Last change: 2010 Sep 30
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -137,7 +137,7 @@ This is explained in the user manual: |usr_32.txt|.
|
||||
The "time" column is the time this change was made.
|
||||
The "saved" column specifies, if this change was
|
||||
written to disk and which file write it was. This can
|
||||
be used with the |later| and |earlier| commands.
|
||||
be used with the |:later| and |:earlier| commands.
|
||||
For more details use the |undotree()| function.
|
||||
|
||||
*g-*
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*various.txt* For Vim version 7.3. Last change: 2010 Sep 14
|
||||
*various.txt* For Vim version 7.3. Last change: 2010 Sep 23
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -167,8 +167,8 @@ g8 Print the hex values of the bytes used in the
|
||||
:norm[al][!] {commands} *:norm* *:normal*
|
||||
Execute Normal mode commands {commands}. This makes
|
||||
it possible to execute Normal mode commands typed on
|
||||
the command-line. {commands} is executed like it is
|
||||
typed. For undo all commands are undone together.
|
||||
the command-line. {commands} are executed like they
|
||||
are typed. For undo all commands are undone together.
|
||||
Execution stops when an error is encountered.
|
||||
If the [!] is given, mappings will not be used.
|
||||
{commands} should be a complete command. If
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*version7.txt* For Vim version 7.3. Last change: 2010 Aug 15
|
||||
*version7.txt* For Vim version 7.3. Last change: 2010 Oct 20
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -8180,7 +8180,7 @@ Solution: Use get_cmdline_type(). (James Vega)
|
||||
Files: src/ex_getln.c
|
||||
|
||||
Patch 7.2.130
|
||||
Problem: Vim may haing until CTRL-C is typed when using CTRL-Z.
|
||||
Problem: Vim may hang until CTRL-C is typed when using CTRL-Z.
|
||||
Solution: Avoid using pause(). Also use "volatile" for variables used in
|
||||
signal functions. (Dominique Pelle)
|
||||
Files: src/auto/configure, src/configure.in, src/config.h.in,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*vi_diff.txt* For Vim version 7.3. Last change: 2010 Jul 20
|
||||
*vi_diff.txt* For Vim version 7.3. Last change: 2010 Oct 11
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -90,6 +90,7 @@ 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)
|
||||
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
|
||||
(big) changes the amount of (virtual) memory available limits the number of
|
||||
@@ -988,6 +989,8 @@ These are remarks about running the POSIX test suite:
|
||||
- vi test 33 sometimes fails for unknown reasons
|
||||
- vi test 250 fails; behavior will be changed in a new revision
|
||||
http://www.opengroup.org/austin/mailarchives/ag-review/msg01710.html
|
||||
(link no longer works, perhaps it's now:
|
||||
https://www.opengroup.org/sophocles/show_mail.tpl?CALLER=show_archive.tpl&source=L&listname=austin-review-l&id=1711)
|
||||
- vi test 310 fails; exit code non-zero when any error occurred?
|
||||
- ex test 24 fails because test is wrong. Changed between SUSv2 and SUSv3.
|
||||
- ex tests 47, 48, 49, 72, 73 fail because .exrc file isn't read in silent
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" Vim support file to detect file types
|
||||
"
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2010 Jul 30
|
||||
" Last Change: 2010 Sep 29
|
||||
|
||||
" Listen very carefully, I will say this only once
|
||||
if exists("did_load_filetypes")
|
||||
@@ -677,6 +677,9 @@ au BufNewFile,BufRead *.exp setf expect
|
||||
" Exports
|
||||
au BufNewFile,BufRead exports setf exports
|
||||
|
||||
" Falcon
|
||||
au BufNewFile,BufRead *.fal setf falcon
|
||||
|
||||
" Fantom
|
||||
au BufNewFile,BufRead *.fan,*.fwt setf fan
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: generic Changelog file
|
||||
" Maintainer: Nikolai Weibull <now@bitwi.se>
|
||||
" Latest Revision: 2009-05-25
|
||||
" Latest Revision: 2010-08-17
|
||||
" Variables:
|
||||
" g:changelog_timeformat (deprecated: use g:changelog_dateformat instead) -
|
||||
" description: the timeformat used in ChangeLog entries.
|
||||
@@ -170,7 +170,7 @@ if &filetype == 'changelog'
|
||||
endfunction
|
||||
|
||||
" Internal function to create a new entry in the ChangeLog.
|
||||
function! s:new_changelog_entry()
|
||||
function! s:new_changelog_entry(...)
|
||||
" Deal with 'paste' option.
|
||||
let save_paste = &paste
|
||||
let &paste = 1
|
||||
|
||||
22
runtime/ftplugin/docbk.vim
Normal file
22
runtime/ftplugin/docbk.vim
Normal file
@@ -0,0 +1,22 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: DocBook
|
||||
" Maintainer: Nikolai Weibull <now@bitwi.se>
|
||||
" Latest Revision: 2010-10-14
|
||||
|
||||
if exists('b:did_ftplugin')
|
||||
finish
|
||||
endif
|
||||
|
||||
if !exists('b:docbk_type')
|
||||
if expand('%:e') == 'sgml'
|
||||
let b:docbk_type = 'sgml'
|
||||
else
|
||||
let b:docbk_type = 'xml'
|
||||
endif
|
||||
endif
|
||||
|
||||
if b:docbk_type == 'sgml'
|
||||
runtime! ftplugin/sgml.vim ftplugin/sgml_*.vim ftplugin/sgml/*.vim
|
||||
else
|
||||
runtime! ftplugin/xml.vim ftplugin/xml_*.vim ftplugin/xml/*.vim
|
||||
endif
|
||||
43
runtime/ftplugin/falcon.vim
Normal file
43
runtime/ftplugin/falcon.vim
Normal file
@@ -0,0 +1,43 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: Falcon
|
||||
" Author: Steven Oliver <oliver.steven@gmail.com>
|
||||
" Copyright: Copyright (c) 2009, 2010 Steven Oliver
|
||||
" License: You may redistribute this under the same terms as Vim itself
|
||||
" --------------------------------------------------------------------------
|
||||
" GetLatestVimScripts: 2762 1 :AutoInstall: falcon.vim
|
||||
|
||||
" Only do this when not done yet for this buffer
|
||||
if (exists("b:did_ftplugin"))
|
||||
finish
|
||||
endif
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
let s:cpo_save = &cpo
|
||||
set cpo&vim
|
||||
|
||||
setlocal tabstop=4 shiftwidth=4 expandtab fileencoding=utf-8
|
||||
setlocal suffixesadd=.fal
|
||||
|
||||
" Matchit support
|
||||
if exists("loaded_matchit") && !exists("b:match_words")
|
||||
let b:match_ignorecase = 0
|
||||
|
||||
let b:match_words =
|
||||
\ '\<\%(if\|case\|while\|until\|for\|do\|class\)\>=\@!' .
|
||||
\ ':' .
|
||||
\ '\<\%(else\|elsif\|when\)\>' .
|
||||
\ ':' .
|
||||
\ '\<end\>' .
|
||||
\ ',{:},\[:\],(:)'
|
||||
endif
|
||||
|
||||
" Set comments to include dashed lines
|
||||
setlocal comments=sO:*\ -,mO:*\ \ ,exO:*/,s1:/*,mb:*,ex:*/,://
|
||||
|
||||
" Windows allows you to filter the open file dialog
|
||||
if has("gui_win32") && !exists("b:browsefilter")
|
||||
let b:browsefilter = "Falcon Source Files (*.fal)\t*.fal\n" .
|
||||
\ "All Files (*.*)\t*.*\n"
|
||||
endif
|
||||
|
||||
" vim: set sw=4 sts=4 et tw=80 :
|
||||
156
runtime/indent/falcon.vim
Normal file
156
runtime/indent/falcon.vim
Normal file
@@ -0,0 +1,156 @@
|
||||
" Vim indent file
|
||||
" Language: Falcon
|
||||
" Maintainer: Steven Oliver <oliver.steven@gmail.com>
|
||||
" Website: https://steveno@github.com/steveno/falconpl-vim.git
|
||||
" Credits: Thanks to the ruby.vim authors, I borrow a lot!
|
||||
" Previous Maintainer: Brent A. Fulgham <bfulgham@debian.org>
|
||||
" -----------------------------------------------------------
|
||||
" GetLatestVimScripts: 2752 1 :AutoInstall: falcon.vim
|
||||
|
||||
"======================================
|
||||
" SETUP
|
||||
"======================================
|
||||
|
||||
" Only load this indent file when no other was loaded.
|
||||
if exists("b:did_indent")
|
||||
finish
|
||||
endif
|
||||
let b:did_indent = 1
|
||||
|
||||
setlocal nosmartindent
|
||||
|
||||
" Setup indent function and when to use it
|
||||
setlocal indentexpr=FalconGetIndent()
|
||||
setlocal indentkeys=0{,0},0),0],!^F,o,O,e
|
||||
setlocal indentkeys+==~case,=~catch,=~default,=~elif,=~else,=~end,=~\"
|
||||
|
||||
" Define the appropriate indent function but only once
|
||||
if exists("*FalconGetIndent")
|
||||
finish
|
||||
endif
|
||||
|
||||
let s:cpo_save = &cpo
|
||||
set cpo&vim
|
||||
|
||||
"======================================
|
||||
" VARIABLES
|
||||
"======================================
|
||||
|
||||
" Regex of syntax group names that are strings AND comments
|
||||
let s:syng_strcom = '\<falcon\%(String\|StringEscape\|Comment\)\>'
|
||||
|
||||
" Regex of syntax group names that are strings
|
||||
let s:syng_string = '\<falcon\%(String\|StringEscape\)\>'
|
||||
|
||||
" Keywords to indent on
|
||||
let s:falcon_indent_keywords = '^\s*\(case\|catch\|class\|enum\|default\|elif\|else' .
|
||||
\ '\|for\|function\|if.*"[^"]*:.*"\|if \(\(:\)\@!.\)*$\|loop\|object\|select' .
|
||||
\ '\|switch\|try\|while\|\w*\s*=\s*\w*([$\)'
|
||||
|
||||
" Keywords to deindent on
|
||||
let s:falcon_deindent_keywords = '^\s*\(case\|catch\|default\|elif\|else\|end\)'
|
||||
|
||||
"======================================
|
||||
" FUNCTIONS
|
||||
"======================================
|
||||
|
||||
" Check if the character at lnum:col is inside a string
|
||||
function s:IsInStringOrComment(lnum, col)
|
||||
return synIDattr(synID(a:lnum, a:col, 1), 'name') =~ s:syng_strcom
|
||||
endfunction
|
||||
|
||||
"======================================
|
||||
" INDENT ROUTINE
|
||||
"======================================
|
||||
|
||||
function FalconGetIndent()
|
||||
" Get the line to be indented
|
||||
let cline = getline(v:lnum)
|
||||
|
||||
" Don't reindent comments on first column
|
||||
if cline =~ '^\/\/'
|
||||
return 0
|
||||
endif
|
||||
|
||||
" Find the previous non-blank line
|
||||
let lnum = prevnonblank(v:lnum - 1)
|
||||
|
||||
" Use zero indent at the top of the file
|
||||
if lnum == 0
|
||||
return 0
|
||||
endif
|
||||
|
||||
let prevline=getline(lnum)
|
||||
let ind = indent(lnum)
|
||||
let chg = 0
|
||||
|
||||
" If we are in a multi-line string or line-comment, don't do anything
|
||||
if s:IsInStringOrComment(v:lnum, matchend(cline, '^\s*') + 1 )
|
||||
return indent('.')
|
||||
endif
|
||||
|
||||
" If the start of the line equals a double quote, then indent to the
|
||||
" previous lines first double quote
|
||||
if cline =~? '^\s*"'
|
||||
let chg = chg + &sw
|
||||
endif
|
||||
|
||||
" If previous line started with a double quote and this one
|
||||
" doesn't, unindent
|
||||
if prevline =~? '^\s*"' && cline =~? '^\s*'
|
||||
let chg = chg - &sw
|
||||
endif
|
||||
|
||||
" Indent if proper keyword
|
||||
if prevline =~? s:falcon_indent_keywords
|
||||
let chg = &sw
|
||||
" If previous line opened a parenthesis, and did not close it, indent
|
||||
elseif prevline =~ '^.*(\s*[^)]*\((.*)\)*[^)]*$'
|
||||
" Make sure this isn't just a function split between two lines
|
||||
if prevline =~ ',\s*$'
|
||||
return indent(prevnonblank(v:lnum - 1)) + &sw
|
||||
else
|
||||
return match(prevline, '(.*\((.*)\|[^)]\)*.*$') + 1
|
||||
endif
|
||||
elseif prevline =~ '^[^(]*)\s*$'
|
||||
" This line closes a parenthesis. Finds opening.
|
||||
let curr_line = prevnonblank(lnum - 1)
|
||||
while curr_line >= 0
|
||||
let str = getline(curr_line)
|
||||
if str !~ '^.*(\s*[^)]*\((.*)\)*[^)]*$'
|
||||
let curr_line = prevnonblank(curr_line - 1)
|
||||
else
|
||||
break
|
||||
endif
|
||||
endwhile
|
||||
if curr_line < 0
|
||||
return -1
|
||||
endif
|
||||
let ind = indent(curr_line)
|
||||
endif
|
||||
|
||||
" If previous line ends in a semi-colon reset indent to previous
|
||||
" lines setting
|
||||
if prevline =~? ';\s*$' && prevnonblank(prevline) =~? ',\s*$'
|
||||
return chg = chg - (2 * &sw)
|
||||
endif
|
||||
|
||||
" If previous line ended in a comma, indent again
|
||||
if prevline =~? ',\s*$'
|
||||
let chg = chg + &sw
|
||||
endif
|
||||
|
||||
" If previous line ended in a =>, indent again
|
||||
if prevline =~? '=>\s*$'
|
||||
let chg = chg + &sw
|
||||
endif
|
||||
|
||||
" Deindent on proper keywords
|
||||
if cline =~? s:falcon_deindent_keywords
|
||||
let chg = chg - &sw
|
||||
endif
|
||||
|
||||
return ind + chg
|
||||
endfunction
|
||||
|
||||
" vim: set sw=4 sts=4 et tw=80 :
|
||||
@@ -1,7 +1,7 @@
|
||||
" Vim support file to detect file types in scripts
|
||||
"
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last change: 2010 Jul 29
|
||||
" Last change: 2010 Sep 22
|
||||
|
||||
" This file is called by an autocommand for every file that has just been
|
||||
" loaded into a buffer. It checks if the type of file can be recognized by
|
||||
@@ -168,7 +168,8 @@ else
|
||||
call SetFileTypeSH(s:line1) " defined in filetype.vim
|
||||
|
||||
" Z shell scripts
|
||||
elseif s:line1 =~ '^#compdef\>' || s:line1 =~ '^#autoload\>'
|
||||
elseif s:line1 =~ '^#compdef\>' || s:line1 =~ '^#autoload\>' ||
|
||||
\ "\n".s:line1."\n".s:line2."\n".s:line3."\n".s:line4."\n".s:line5 =~ '\n\s*emulate\s\+\%(-[LR]\s\+\)\=[ckz]\=sh\>'
|
||||
set ft=zsh
|
||||
|
||||
" ELM Mail files
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
"
|
||||
" Language: D
|
||||
" Maintainer: Jesse Phillips <Jesse.K.Phillips+D@gmail.com>
|
||||
" Last Change: 2010 Sep 9
|
||||
" Version: 0.21
|
||||
" Last Change: 2010 Sep 21
|
||||
" Version: 0.22
|
||||
"
|
||||
" Contributors:
|
||||
" - Jason Mills <jasonmills@nf.sympatico.ca>: original Maintainer
|
||||
@@ -117,9 +117,9 @@ syn match dSharpBang "\%^#!.*" display
|
||||
syn match dAnnotation "@[_$a-zA-Z][_$a-zA-Z0-9_]*\>" contains=dAttribute
|
||||
|
||||
" Version Identifiers
|
||||
syn match dVersion "version\s*([_a-zA-Z][_a-zA-Z0-9]*\>"he=s+7 contains=dVersionIdentifier
|
||||
syn match dVersion "[^.]\s*\<version\>"
|
||||
syn match dVersion "^\<version\>"
|
||||
syn match dVersion "[^.]version" nextgroup=dVersionInside
|
||||
syn match dVersion "^version" nextgroup=dVersionInside
|
||||
syn match dVersionInside "([_a-zA-Z][_a-zA-Z0-9]*\>" transparent contained contains=dVersionIdentifier
|
||||
|
||||
" Scope StorageClass
|
||||
syn match dStorageClass "scope"
|
||||
|
||||
155
runtime/syntax/falcon.vim
Normal file
155
runtime/syntax/falcon.vim
Normal file
@@ -0,0 +1,155 @@
|
||||
" Vim syntax file
|
||||
" Language: Falcon
|
||||
" Maintainer: Steven Oliver <oliver.steven@gmail.com>
|
||||
" Website: http://github.com/steveno/vim-files/blob/master/syntax/falcon.vim
|
||||
" Credits: Thanks the ruby.vim authors, I borrowed a lot!
|
||||
" -------------------------------------------------------------------------------
|
||||
" GetLatestVimScripts: 2745 1 :AutoInstall: falcon.vim
|
||||
|
||||
" When wanted, highlight the trailing whitespace.
|
||||
if exists("c_space_errors")
|
||||
if !exists("c_no_trail_space_error")
|
||||
syn match falconSpaceError "\s\+$"
|
||||
endif
|
||||
|
||||
if !exists("c_no_tab_space_error")
|
||||
syn match falconSpaceError " \+\t"me=e-1
|
||||
endif
|
||||
endif
|
||||
|
||||
" Symbols
|
||||
syn match falconSymbol "\(;\|,\|\.\)"
|
||||
syn match falconSymbolOther "\(#\|@\)" display
|
||||
|
||||
" Operators
|
||||
syn match falconOperator "\(+\|-\|\*\|/\|=\|<\|>\|\*\*\|!=\|\~=\)"
|
||||
syn match falconOperator "\(<=\|>=\|=>\|\.\.\|<<\|>>\|\"\)"
|
||||
|
||||
" Clusters
|
||||
syn region falconSymbol start="[]})\"':]\@<!:\"" end="\"" skip="\\\\\|\\\"" contains=@falconStringSpecial fold
|
||||
syn case match
|
||||
|
||||
" Keywords
|
||||
syn keyword falconKeyword all allp any anyp as attributes brigade cascade catch choice class const
|
||||
syn keyword falconKeyword continue def directive do list dropping enum eq eval exit export from function
|
||||
syn keyword falconKeyword give global has hasnt in init innerfunc lambda launch launch len List list
|
||||
syn keyword falconKeyword load notin object pass print printl provides raise return self sender static to
|
||||
syn keyword falconKeyword try xamp
|
||||
|
||||
" Error Type Keywords
|
||||
syn keyword falconKeyword CloneError CodeError Error InterruprtedError IoError MathError
|
||||
syn keyword falconKeyword ParamError RangeError SyntaxError TraceStep TypeError
|
||||
|
||||
" Todo
|
||||
syn keyword falconTodo DEBUG FIXME NOTE TODO XXX
|
||||
|
||||
" Conditionals
|
||||
syn keyword falconConditional and case default else end if iff
|
||||
syn keyword falconConditional elif or not switch select
|
||||
syn match falconConditional "end\s\if"
|
||||
|
||||
" Loops
|
||||
syn keyword falconRepeat break for loop forfirst forlast formiddle while
|
||||
|
||||
" Booleans
|
||||
syn keyword falconBool true false
|
||||
|
||||
" Constants
|
||||
syn keyword falconConst PI E nil
|
||||
|
||||
" Comments
|
||||
syn match falconCommentSkip contained "^\s*\*\($\|\s\+\)"
|
||||
syn region falconComment start="/\*" end="\*/" contains=@falconCommentGroup,falconSpaceError,falconTodo
|
||||
syn region falconCommentL start="//" end="$" keepend contains=@falconCommentGroup,falconSpaceError,falconTodo
|
||||
syn match falconSharpBang "\%^#!.*" display
|
||||
syn sync ccomment falconComment
|
||||
|
||||
" Numbers
|
||||
syn match falconNumbers transparent "\<[+-]\=\d\|[+-]\=\.\d" contains=falconIntLiteral,falconFloatLiteral,falconHexadecimal,falconOctal
|
||||
syn match falconNumbersCom contained transparent "\<[+-]\=\d\|[+-]\=\.\d" contains=falconIntLiteral,falconFloatLiteral,falconHexadecimal,falconOctal
|
||||
syn match falconHexadecimal contained "\<0x\x\+\>"
|
||||
syn match falconOctal contained "\<0\o\+\>"
|
||||
syn match falconIntLiteral contained "[+-]\<d\+\(\d\+\)\?\>"
|
||||
syn match falconFloatLiteral contained "[+-]\=\d\+\.\d*"
|
||||
syn match falconFloatLiteral contained "[+-]\=\d*\.\d*"
|
||||
|
||||
" Includes
|
||||
syn keyword falconInclude load import
|
||||
|
||||
" Expression Substitution and Backslash Notation
|
||||
syn match falconStringEscape "\\\\\|\\[abefnrstv]\|\\\o\{1,3}\|\\x\x\{1,2}" contained display
|
||||
syn match falconStringEscape "\%(\\M-\\C-\|\\C-\\M-\|\\M-\\c\|\\c\\M-\|\\c\|\\C-\|\\M-\)\%(\\\o\{1,3}\|\\x\x\{1,2}\|\\\=\S\)" contained display
|
||||
syn region falconSymbol start="[]})\"':]\@<!:\"" end="\"" skip="\\\\\|\\\"" contains=falconStringEscape fold
|
||||
|
||||
" Normal String and Shell Command Output
|
||||
syn region falconString matchgroup=falconStringDelimiter start="\"" end="\"" skip="\\\\\|\\\"" contains=falconStringEscape fold
|
||||
syn region falconString matchgroup=falconStringDelimiter start="'" end="'" skip="\\\\\|\\'" fold
|
||||
syn region falconString matchgroup=falconStringDelimiter start="`" end="`" skip="\\\\\|\\`" contains=falconStringEscape fold
|
||||
|
||||
" Generalized Single Quoted String, Symbol and Array of Strings
|
||||
syn region falconString matchgroup=falconStringDelimiter start="%[qw]\z([~`!@#$%^&*_\-+=|\:;"',.?/]\)" end="\z1" skip="\\\\\|\\\z1" fold
|
||||
syn region falconString matchgroup=falconStringDelimiter start="%[qw]{" end="}" skip="\\\\\|\\}" fold contains=falconDelimEscape
|
||||
syn region falconString matchgroup=falconStringDelimiter start="%[qw]<" end=">" skip="\\\\\|\\>" fold contains=falconDelimEscape
|
||||
syn region falconString matchgroup=falconStringDelimiter start="%[qw]\[" end="\]" skip="\\\\\|\\\]" fold contains=falconDelimEscape
|
||||
syn region falconString matchgroup=falconStringDelimiter start="%[qw](" end=")" skip="\\\\\|\\)" fold contains=falconDelimEscape
|
||||
syn region falconSymbol matchgroup=falconSymbolDelimiter start="%[s]\z([~`!@#$%^&*_\-+=|\:;"',.?/]\)" end="\z1" skip="\\\\\|\\\z1" fold
|
||||
syn region falconSymbol matchgroup=falconSymbolDelimiter start="%[s]{" end="}" skip="\\\\\|\\}" fold contains=falconDelimEscape
|
||||
syn region falconSymbol matchgroup=falconSymbolDelimiter start="%[s]<" end=">" skip="\\\\\|\\>" fold contains=falconDelimEscape
|
||||
syn region falconSymbol matchgroup=falconSymbolDelimiter start="%[s]\[" end="\]" skip="\\\\\|\\\]" fold contains=falconDelimEscape
|
||||
syn region falconSymbol matchgroup=falconSymbolDelimiter start="%[s](" end=")" skip="\\\\\|\\)" fold contains=falconDelimEscape
|
||||
|
||||
" Generalized Double Quoted String and Array of Strings and Shell Command Output
|
||||
syn region falconString matchgroup=falconStringDelimiter start="%\z([~`!@#$%^&*_\-+|\:;"',.?/]\)" end="\z1" skip="\\\\\|\\\z1" contains=falconStringEscape fold
|
||||
syn region falconString matchgroup=falconStringDelimiter start="%[QWx]\z([~`!@#$%^&*_\-+=|\:;"',.?/]\)" end="\z1" skip="\\\\\|\\\z1" contains=falconStringEscape fold
|
||||
syn region falconString matchgroup=falconStringDelimiter start="%[QWx]\={" end="}" skip="\\\\\|\\}" contains=falconStringEscape,falconDelimEscape fold
|
||||
syn region falconString matchgroup=falconStringDelimiter start="%[QWx]\=<" end=">" skip="\\\\\|\\>" contains=falconStringEscape,falconDelimEscape fold
|
||||
syn region falconString matchgroup=falconStringDelimiter start="%[QWx]\=\[" end="\]" skip="\\\\\|\\\]" contains=falconStringEscape,falconDelimEscape fold
|
||||
syn region falconString matchgroup=falconStringDelimiter start="%[QWx]\=(" end=")" skip="\\\\\|\\)" contains=falconStringEscape,falconDelimEscape fold
|
||||
|
||||
syn region falconString start=+\%(\%(class\s*\|\%([]})"'.]\|::\)\)\_s*\|\w\)\@<!<<\z(\h\w*\)\ze+hs=s+2 matchgroup=falconStringDelimiter end=+^\z1$+ contains=falconStringEscape fold keepend
|
||||
syn region falconString start=+\%(\%(class\s*\|\%([]})"'.]\|::\)\)\_s*\|\w\)\@<!<<"\z([^"]*\)"\ze+hs=s+2 matchgroup=falconStringDelimiter end=+^\z1$+ contains=falconStringEscape fold keepend
|
||||
syn region falconString start=+\%(\%(class\s*\|\%([]})"'.]\|::\)\)\_s*\|\w\)\@<!<<'\z([^']*\)'\ze+hs=s+2 matchgroup=falconStringDelimiter end=+^\z1$+ fold keepend
|
||||
syn region falconString start=+\%(\%(class\s*\|\%([]})"'.]\|::\)\)\_s*\|\w\)\@<!<<`\z([^`]*\)`\ze+hs=s+2 matchgroup=falconStringDelimiter end=+^\z1$+ contains=falconStringEscape fold keepend
|
||||
|
||||
syn region falconString start=+\%(\%(class\s*\|\%([]}).]\|::\)\)\_s*\|\w\)\@<!<<-\z(\h\w*\)\ze+hs=s+3 matchgroup=falconStringDelimiter end=+^\s*\zs\z1$+ contains=falconStringEscape fold keepend
|
||||
syn region falconString start=+\%(\%(class\s*\|\%([]}).]\|::\)\)\_s*\|\w\)\@<!<<-"\z([^"]*\)"\ze+hs=s+3 matchgroup=falconStringDelimiter end=+^\s*\zs\z1$+ contains=falconStringEscape fold keepend
|
||||
syn region falconString start=+\%(\%(class\s*\|\%([]}).]\|::\)\)\_s*\|\w\)\@<!<<-'\z([^']*\)'\ze+hs=s+3 matchgroup=falconStringDelimiter end=+^\s*\zs\z1$+ fold keepend
|
||||
syn region falconString start=+\%(\%(class\s*\|\%([]}).]\|::\)\)\_s*\|\w\)\@<!<<-`\z([^`]*\)`\ze+hs=s+3 matchgroup=falconStringDelimiter end=+^\s*\zs\z1$+ contains=falconStringEscape fold keepend
|
||||
|
||||
" Syntax Synchronizing
|
||||
syn sync minlines=10 maxlines=100
|
||||
|
||||
" Define the default highlighting
|
||||
if !exists("did_falcon_syn_inits")
|
||||
command -nargs=+ HiLink hi def link <args>
|
||||
|
||||
HiLink falconKeyword Keyword
|
||||
HiLink falconCommentString String
|
||||
HiLink falconTodo Todo
|
||||
HiLink falconConditional Keyword
|
||||
HiLink falconRepeat Repeat
|
||||
HiLink falconcommentSkip Comment
|
||||
HiLink falconComment Comment
|
||||
HiLink falconCommentL Comment
|
||||
HiLink falconConst Constant
|
||||
HiLink falconOperator Operator
|
||||
HiLink falconSymbol Normal
|
||||
HiLink falconSpaceError Error
|
||||
HiLink falconHexadecimal Number
|
||||
HiLink falconOctal Number
|
||||
HiLink falconIntLiteral Number
|
||||
HiLink falconFloatLiteral Float
|
||||
HiLink falconStringEscape Special
|
||||
HiLink falconStringDelimiter Delimiter
|
||||
HiLink falconString String
|
||||
HiLink falconBool Constant
|
||||
HiLink falconSharpBang PreProc
|
||||
HiLink falconInclude Include
|
||||
HiLink falconSymbol Constant
|
||||
HiLink falconSymbolOther Delimiter
|
||||
delcommand HiLink
|
||||
endif
|
||||
|
||||
let b:current_syntax = "falcon"
|
||||
|
||||
" vim: set sw=4 sts=4 et tw=80 :
|
||||
@@ -1,7 +1,7 @@
|
||||
" Vim syntax file
|
||||
" Language: gpg(1) configuration file
|
||||
" Maintainer: Nikolai Weibull <now@bitwi.se>
|
||||
" Latest Revision: 2007-06-17
|
||||
" Latest Revision: 2010-10-14
|
||||
|
||||
if exists("b:current_syntax")
|
||||
finish
|
||||
@@ -54,7 +54,7 @@ syn keyword gpgOption contained skipwhite nextgroup=gpgArg
|
||||
\ personal-digest-preferences photo-viewer
|
||||
\ recipient s2k-cipher-algo s2k-digest-algo s2k-mode
|
||||
\ secret-keyring set-filename set-policy-url status-fd
|
||||
\ trusted-key verify-options
|
||||
\ trusted-key verify-options keyid-format list-options
|
||||
syn keyword gpgOption contained skipwhite nextgroup=gpgArgError
|
||||
\ allow-freeform-uid allow-non-selfsigned-uid
|
||||
\ allow-secret-key-import always-trust
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
" Vim syntax file
|
||||
" Language: NASM - The Netwide Assembler (v0.98)
|
||||
" Maintainer: Manuel M.H. Stol <mmh.stol@gmx.net>
|
||||
" Last Change: 2003 May 11
|
||||
" Vim URL: http://www.vim.org/lang.html
|
||||
" NASM Home: http://www.cryogen.com/Nasm/
|
||||
" Maintainer: Andriy Sokolov <andriy145@gmail.com>
|
||||
" Original Author: Manuel M.H. Stol <Manuel.Stol@allieddata.nl>
|
||||
" Former Maintainer: Manuel M.H. Stol <Manuel.Stol@allieddata.nl>
|
||||
" Last Change: 2010 Sep 24
|
||||
" NASM Home: http://www.nasm.us/
|
||||
|
||||
|
||||
|
||||
@@ -160,6 +161,7 @@ syn region nasmInMacStrucDef contained transparent matchgroup=nasmStructure kee
|
||||
"syn region nasmInMacStrucDef contained transparent matchgroup=nasmStructure keepend start="^\s*UNION\>"hs=e-4 end="^\s*ENDUNION\>"re=e-8 contains=@nasmGrpCntnMacro
|
||||
"syn region nasmInMacStrucDef contained transparent matchgroup=nasmStructure keepend start="\<IUNION\>" end="\<IEND\(UNION\)\=\>" contains=@nasmGrpCntnMacro,nasmInStructure
|
||||
syn region nasmInMacPreConDef contained transparent matchgroup=nasmInMacPreCondit start="^\s*%ifnidni\>"hs=e-7 start="^\s*%if\(idni\|n\(ctx\|def\|idn\|num\|str\)\)\>"hs=e-6 start="^\s*%if\(ctx\|def\|idn\|nid\|num\|str\)\>"hs=e-5 start="^\s*%ifid\>"hs=e-4 start="^\s*%if\>"hs=e-2 end="%endif\>" contains=@nasmGrpCntnMacro,nasmInMacPreCondit,nasmInPreCondit
|
||||
" Todo: allow STRUC/ISTRUC to be used inside preprocessor conditional block
|
||||
syn match nasmInMacPreCondit contained transparent "ctx\s"lc=3 skipwhite nextgroup=@nasmGrpNxtCtx
|
||||
syn match nasmInMacPreCondit contained "^\s*%elifctx\>"hs=e-7 skipwhite nextgroup=@nasmGrpNxtCtx
|
||||
syn match nasmInMacPreCondit contained "^\s*%elifnctx\>"hs=e-8 skipwhite nextgroup=@nasmGrpNxtCtx
|
||||
@@ -210,15 +212,17 @@ syn cluster nasmGrpInPreCondits contains=nasmPreCondit,nasmInPreCondit,nasmCtxPr
|
||||
syn cluster nasmGrpPreCondits contains=nasmPreConditDef,@nasmGrpInPreCondits,nasmCtxPreProc,nasmCtxLocLabel
|
||||
|
||||
" Other pre-processor statements
|
||||
syn match nasmPreProc "^\s*%rep\>"hs=e-3
|
||||
syn match nasmPreProc "^\s*%\(rep\|use\)\>"hs=e-3
|
||||
syn match nasmPreProc "^\s*%line\>"hs=e-4
|
||||
syn match nasmPreProc "^\s*%\(clear\|error\)\>"hs=e-5
|
||||
syn match nasmPreProc "^\s*%endrep\>"hs=e-6
|
||||
syn match nasmPreProc "^\s*%exitrep\>"hs=e-7
|
||||
syn match nasmPreProc "^\s*%\(clear\|error\|fatal\)\>"hs=e-5
|
||||
syn match nasmPreProc "^\s*%\(endrep\|strlen\|substr\)\>"hs=e-6
|
||||
syn match nasmPreProc "^\s*%\(exitrep\|warning\)\>"hs=e-7
|
||||
syn match nasmDefine "^\s*%undef\>"hs=e-5
|
||||
syn match nasmDefine "^\s*%\(assign\|define\)\>"hs=e-6
|
||||
syn match nasmDefine "^\s*%i\(assign\|define\)\>"hs=e-7
|
||||
syn match nasmDefine "^\s*%unmacro\>"hs=e-7
|
||||
syn match nasmInclude "^\s*%include\>"hs=e-7
|
||||
" Todo: Treat the line tail after %fatal, %error, %warning as text
|
||||
|
||||
" Multiple pre-processor instructions on single line detection (obsolete)
|
||||
"syn match nasmPreProcError +^\s*\([^\t "%';][^"%';]*\|[^\t "';][^"%';]\+\)%\a\+\>+
|
||||
@@ -231,6 +235,7 @@ syn cluster nasmGrpPreProcs contains=nasmMacroDef,@nasmGrpInMacros,@nasmGrpPreCo
|
||||
syn match nasmGen08Register "\<[A-D][HL]\>"
|
||||
syn match nasmGen16Register "\<\([A-D]X\|[DS]I\|[BS]P\)\>"
|
||||
syn match nasmGen32Register "\<E\([A-D]X\|[DS]I\|[BS]P\)\>"
|
||||
syn match nasmGen64Register "\<R\([A-D]X\|[DS]I\|[BS]P\|[89]\|1[0-5]\|[89][WD]\|1[0-5][WD]\)\>"
|
||||
syn match nasmSegRegister "\<[C-GS]S\>"
|
||||
syn match nasmSpcRegister "\<E\=IP\>"
|
||||
syn match nasmFpuRegister "\<ST\o\>"
|
||||
@@ -298,20 +303,21 @@ syn match nasmStdInstruction "\<\(CMOV\|J\|SET\)\(N\=\([ABGL]E\=\|[CEOSZ]\)\|P
|
||||
syn match nasmStdInstruction "\<POP\>"
|
||||
syn keyword nasmStdInstruction AAA AAD AAM AAS ADC ADD AND
|
||||
syn keyword nasmStdInstruction BOUND BSF BSR BSWAP BT[C] BTR BTS
|
||||
syn keyword nasmStdInstruction CALL CBW CDQ CLC CLD CMC CMP CMPSB CMPSD CMPSW
|
||||
syn keyword nasmStdInstruction CMPXCHG CMPXCHG8B CPUID CWD[E]
|
||||
syn keyword nasmStdInstruction CALL CBW CDQ CLC CLD CMC CMP CMPSB CMPSD CMPSW CMPSQ
|
||||
syn keyword nasmStdInstruction CMPXCHG CMPXCHG8B CPUID CWD[E] CQO
|
||||
syn keyword nasmStdInstruction DAA DAS DEC DIV ENTER
|
||||
syn keyword nasmStdInstruction IDIV IMUL INC INT[O] IRET[D] IRETW
|
||||
syn keyword nasmStdInstruction IDIV IMUL INC INT[O] IRET[D] IRETW IRETQ
|
||||
syn keyword nasmStdInstruction JCXZ JECXZ JMP
|
||||
syn keyword nasmStdInstruction LAHF LDS LEA LEAVE LES LFS LGS LODSB LODSD
|
||||
syn keyword nasmStdInstruction LAHF LDS LEA LEAVE LES LFS LGS LODSB LODSD LODSQ
|
||||
syn keyword nasmStdInstruction LODSW LOOP[E] LOOPNE LOOPNZ LOOPZ LSS
|
||||
syn keyword nasmStdInstruction MOVSB MOVSD MOVSW MOVSX MOVZX MUL NEG NOP NOT
|
||||
syn keyword nasmStdInstruction OR POPA[D] POPAW POPF[D] POPFW
|
||||
syn keyword nasmStdInstruction PUSH[AD] PUSHAW PUSHF[D] PUSHFW
|
||||
syn keyword nasmStdInstruction MOVSB MOVSD MOVSW MOVSX MOVSQ MOVZX MUL NEG NOP NOT
|
||||
syn keyword nasmStdInstruction OR POPA[D] POPAW POPF[D] POPFW POPFQ
|
||||
syn keyword nasmStdInstruction PUSH[AD] PUSHAW PUSHF[D] PUSHFW PUSHFQ
|
||||
syn keyword nasmStdInstruction RCL RCR RETF RET[N] ROL ROR
|
||||
syn keyword nasmStdInstruction SAHF SAL SAR SBB SCASB SCASD SCASW
|
||||
syn keyword nasmStdInstruction SHL[D] SHR[D] STC STD STOSB STOSD STOSW SUB
|
||||
syn keyword nasmStdInstruction SHL[D] SHR[D] STC STD STOSB STOSD STOSW STOSQ SUB
|
||||
syn keyword nasmStdInstruction TEST XADD XCHG XLATB XOR
|
||||
syn keyword nasmStdInstruction LFENCE MFENCE SFENCE
|
||||
|
||||
|
||||
" System Instructions: (usually privileged)
|
||||
|
||||
@@ -1,111 +1,137 @@
|
||||
" Vim syntax file
|
||||
" Language: R (GNU S)
|
||||
" Maintainer: Vaidotas Zemlys <zemlys@gmail.com>
|
||||
" Last Change: 2006 Apr 30
|
||||
" Filenames: *.R *.Rout *.r *.Rhistory *.Rt *.Rout.save *.Rout.fail
|
||||
" URL: http://uosis.mif.vu.lt/~zemlys/vim-syntax/r.vim
|
||||
" Language: R (GNU S)
|
||||
" Maintainer: Jakson Aquino <jalvesaq@gmail.com>
|
||||
" Former Maintainers: Vaidotas Zemlys <zemlys@gmail.com>
|
||||
" Tom Payne <tom@tompayne.org>
|
||||
" Last Change: Wed Sep 29, 2010 09:31AM
|
||||
" Filenames: *.R *.r *.Rhistory *.Rt
|
||||
"
|
||||
" NOTE: The highlighting of R functions is defined in the
|
||||
" r-plugin/functions.vim, which is part of vim-r-plugin2:
|
||||
" http://www.vim.org/scripts/script.php?script_id=2628
|
||||
"
|
||||
" Some lines of code were borrowed from Zhuojun Chen.
|
||||
|
||||
" First maintainer Tom Payne <tom@tompayne.org>
|
||||
" Modified to make syntax less colourful and added the highlighting of
|
||||
" R assignment arrow
|
||||
|
||||
" For version 5.x: Clear all syntax items
|
||||
" For version 6.x: Quit when a syntax file was already loaded
|
||||
if version < 600
|
||||
syntax clear
|
||||
elseif exists("b:current_syntax")
|
||||
if exists("b:current_syntax")
|
||||
finish
|
||||
endif
|
||||
|
||||
if version >= 600
|
||||
setlocal iskeyword=@,48-57,_,.
|
||||
else
|
||||
set iskeyword=@,48-57,_,.
|
||||
endif
|
||||
setlocal iskeyword=@,48-57,_,.
|
||||
|
||||
syn case match
|
||||
|
||||
" Comment
|
||||
syn match rComment /\#.*/
|
||||
syn match rComment contains=@Spell "\#.*"
|
||||
|
||||
" Constant
|
||||
" string enclosed in double quotes
|
||||
syn region rString start=/"/ skip=/\\\\\|\\"/ end=/"/
|
||||
syn region rString contains=rSpecial,rStrError,@Spell start=/"/ skip=/\\\\\|\\"/ end=/"/
|
||||
" string enclosed in single quotes
|
||||
syn region rString start=/'/ skip=/\\\\\|\\'/ end=/'/
|
||||
" number with no fractional part or exponent
|
||||
syn match rNumber /\d\+/
|
||||
" floating point number with integer and fractional parts and optional exponent
|
||||
syn match rFloat /\d\+\.\d*\([Ee][-+]\=\d\+\)\=/
|
||||
" floating point number with no integer part and optional exponent
|
||||
syn match rFloat /\.\d\+\([Ee][-+]\=\d\+\)\=/
|
||||
" floating point number with no fractional part and optional exponent
|
||||
syn match rFloat /\d\+[Ee][-+]\=\d\+/
|
||||
syn region rString contains=rSpecial,rStrError,@Spell start=/'/ skip=/\\\\\|\\'/ end=/'/
|
||||
|
||||
" Identifier
|
||||
" identifier with leading letter and optional following keyword characters
|
||||
syn match rIdentifier /\a\k*/
|
||||
" identifier with leading period, one or more digits, and at least one non-digit keyword character
|
||||
syn match rIdentifier /\.\d*\K\k*/
|
||||
syn match rStrError display contained "\\."
|
||||
|
||||
" New line, carriage return, tab, backspace, bell, feed, vertical tab, backslash
|
||||
syn match rSpecial display contained "\\\(n\|r\|t\|b\|a\|f\|v\|'\|\"\)\|\\\\"
|
||||
|
||||
" Hexadecimal and Octal digits
|
||||
syn match rSpecial display contained "\\\(x\x\{1,2}\|[0-8]\{1,3}\)"
|
||||
|
||||
" Unicode characters
|
||||
syn match rSpecial display contained "\\u\x\{1,4}"
|
||||
syn match rSpecial display contained "\\U\x\{1,8}"
|
||||
syn match rSpecial display contained "\\u{\x\{1,4}}"
|
||||
syn match rSpecial display contained "\\U{\x\{1,8}}"
|
||||
|
||||
|
||||
syn match rDollar "\$"
|
||||
|
||||
" Statement
|
||||
syn keyword rStatement break next return
|
||||
syn keyword rConditional if else
|
||||
syn keyword rRepeat for in repeat while
|
||||
|
||||
" Constant (not really)
|
||||
syn keyword rConstant T F LETTERS letters month.ab month.name pi
|
||||
syn keyword rConstant R.version.string
|
||||
|
||||
" Constant
|
||||
syn keyword rConstant LETTERS letters month.ab month.name pi
|
||||
syn keyword rConstant NULL
|
||||
syn keyword rBoolean FALSE TRUE
|
||||
syn keyword rNumber NA
|
||||
syn match rArrow /<\{1,2}-/
|
||||
syn keyword rNumber NA NA_integer_ NA_real_ NA_complex_ NA_character_
|
||||
syn keyword rNumber Inf NaN
|
||||
|
||||
" Type
|
||||
syn keyword rType array category character complex double function integer list logical matrix numeric vector data.frame
|
||||
" integer
|
||||
syn match rInteger "\<\d\+L"
|
||||
syn match rInteger "\<0x\([0-9]\|[a-f]\|[A-F]\)\+L"
|
||||
syn match rInteger "\<\d\+[Ee]+\=\d\+L"
|
||||
|
||||
syn match rOperator "[\*\!\&\+\-\<\>\=\^\|\~\`/:@]"
|
||||
syn match rOperator "%\{2}\|%\*%\|%\/%\|%in%\|%o%\|%x%"
|
||||
|
||||
syn match rComplex "\<\d\+i"
|
||||
syn match rComplex "\<0x\([0-9]\|[a-f]\|[A-F]\)\+i"
|
||||
syn match rComplex "\<\d\+\.\d*\([Ee][-+]\=\d\+\)\=i"
|
||||
syn match rComplex "\<\.\d\+\([Ee][-+]\=\d\+\)\=i"
|
||||
syn match rComplex "\<\d\+[Ee][-+]\=\d\+i"
|
||||
|
||||
" number with no fractional part or exponent
|
||||
syn match rNumber "\<\d\+\>"
|
||||
" hexadecimal number
|
||||
syn match rNumber "\<0x\([0-9]\|[a-f]\|[A-F]\)\+"
|
||||
|
||||
" floating point number with integer and fractional parts and optional exponent
|
||||
syn match rFloat "\<\d\+\.\d*\([Ee][-+]\=\d\+\)\="
|
||||
" floating point number with no integer part and optional exponent
|
||||
syn match rFloat "\<\.\d\+\([Ee][-+]\=\d\+\)\="
|
||||
" floating point number with no fractional part and optional exponent
|
||||
syn match rFloat "\<\d\+[Ee][-+]\=\d\+"
|
||||
|
||||
syn match rArrow "<\{1,2}-"
|
||||
syn match rArrow "->\{1,2}"
|
||||
|
||||
" Special
|
||||
syn match rDelimiter /[,;:]/
|
||||
syn match rDelimiter "[,;:]"
|
||||
|
||||
" Error
|
||||
syn region rRegion matchgroup=Delimiter start=/(/ matchgroup=Delimiter end=/)/ transparent contains=ALLBUT,rError,rBraceError,rCurlyError
|
||||
syn region rRegion matchgroup=Delimiter start=/{/ matchgroup=Delimiter end=/}/ transparent contains=ALLBUT,rError,rBraceError,rParenError
|
||||
syn region rRegion matchgroup=Delimiter start=/\[/ matchgroup=Delimiter end=/]/ transparent contains=ALLBUT,rError,rCurlyError,rParenError
|
||||
syn match rError /[)\]}]/
|
||||
syn match rBraceError /[)}]/ contained
|
||||
syn match rCurlyError /[)\]]/ contained
|
||||
syn match rParenError /[\]}]/ contained
|
||||
syn match rError "[)\]}]"
|
||||
syn match rBraceError "[)}]" contained
|
||||
syn match rCurlyError "[)\]]" contained
|
||||
syn match rParenError "[\]}]" contained
|
||||
|
||||
" Functions that may add new objects
|
||||
syn keyword rPreProc library require attach detach source
|
||||
|
||||
" Type
|
||||
syn keyword rType array category character complex double function integer list logical matrix numeric vector data.frame
|
||||
|
||||
" Define the default highlighting.
|
||||
" For version 5.7 and earlier: only when not done already
|
||||
" For version 5.8 and later: only when an item doesn't have highlighting yet
|
||||
if version >= 508 || !exists("did_r_syn_inits")
|
||||
if version < 508
|
||||
let did_r_syn_inits = 1
|
||||
command -nargs=+ HiLink hi link <args>
|
||||
else
|
||||
command -nargs=+ HiLink hi def link <args>
|
||||
endif
|
||||
HiLink rComment Comment
|
||||
HiLink rConstant Constant
|
||||
HiLink rString String
|
||||
HiLink rNumber Number
|
||||
HiLink rBoolean Boolean
|
||||
HiLink rFloat Float
|
||||
HiLink rStatement Statement
|
||||
HiLink rConditional Conditional
|
||||
HiLink rRepeat Repeat
|
||||
HiLink rIdentifier Normal
|
||||
HiLink rArrow Statement
|
||||
HiLink rType Type
|
||||
HiLink rDelimiter Delimiter
|
||||
HiLink rError Error
|
||||
HiLink rBraceError Error
|
||||
HiLink rCurlyError Error
|
||||
HiLink rParenError Error
|
||||
delcommand HiLink
|
||||
endif
|
||||
hi def link rArrow Statement
|
||||
hi def link rBoolean Boolean
|
||||
hi def link rBraceError Error
|
||||
hi def link rComment Comment
|
||||
hi def link rComplex Number
|
||||
hi def link rConditional Conditional
|
||||
hi def link rConstant Constant
|
||||
hi def link rCurlyError Error
|
||||
hi def link rDelimiter Delimiter
|
||||
hi def link rDollar SpecialChar
|
||||
hi def link rError Error
|
||||
hi def link rFloat Float
|
||||
hi def link rInteger Number
|
||||
hi def link rNumber Number
|
||||
hi def link rOperator Operator
|
||||
hi def link rParenError Error
|
||||
hi def link rPreProc PreProc
|
||||
hi def link rRepeat Repeat
|
||||
hi def link rSpecial SpecialChar
|
||||
hi def link rStatement Statement
|
||||
hi def link rString String
|
||||
hi def link rStrError Error
|
||||
hi def link rType Type
|
||||
|
||||
let b:current_syntax="r"
|
||||
|
||||
" vim: ts=8 sw=2
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
" Language: YAML (YAML Ain't Markup Language) 1.2
|
||||
" Maintainer: Nikolai Pavlov <zyx.vim@gmail.com>
|
||||
" First author: Nikolai Weibull <now@bitwi.se>
|
||||
" Latest Revision: 2010-09-16
|
||||
" Latest Revision: 2010-10-08
|
||||
|
||||
if exists('b:current_syntax')
|
||||
finish
|
||||
@@ -124,7 +124,7 @@ syn match yamlConstant '\<\~\>'
|
||||
|
||||
syn match yamlTimestamp /\%([\[\]{}, \t]\@!\p\)\@<!\%(\d\{4}-\d\d\=-\d\d\=\%(\%([Tt]\|\s\+\)\%(\d\d\=\):\%(\d\d\):\%(\d\d\)\%(\.\%(\d*\)\)\=\%(\s*\%(Z\|[+-]\d\d\=\%(:\d\d\)\=\)\)\=\)\=\)\%([\[\]{}, \t]\@!\p\)\@!/
|
||||
|
||||
syn match yamlInteger /\%([\[\]{}, \t]\@!\p\)\@<!\%([+-]\=\%(0\%(b[0-1_]\+\|[0-7_]\+\|x[0-9a-fA-F_]\+\)\=\|\%([1-9][0-9_]*\%(:[0-5]\=\d\)\+\)\)\)\%([\[\]{}, \t]\@!\p\)\@!/
|
||||
syn match yamlInteger /\%([\[\]{}, \t]\@!\p\)\@<!\%([+-]\=\%(0\%(b[0-1_]\+\|[0-7_]\+\|x[0-9a-fA-F_]\+\)\=\|\%([1-9][0-9_]*\%(:[0-5]\=\d\)\+\)\)\|[1-9][0-9_]*\)\%([\[\]{}, \t]\@!\p\)\@!/
|
||||
syn match yamlFloat /\%([\[\]{}, \t]\@!\p\)\@<!\%([+-]\=\%(\%(\d[0-9_]*\)\.[0-9_]*\%([eE][+-]\d\+\)\=\|\.[0-9_]\+\%([eE][-+][0-9]\+\)\=\|\d[0-9_]*\%(:[0-5]\=\d\)\+\.[0-9_]*\|\.\%(inf\|Inf\|INF\)\)\|\%(\.\%(nan\|NaN\|NAN\)\)\)\%([\[\]{}, \t]\@!\p\)\@!/
|
||||
|
||||
execute 'syn match yamlNodeTag '.string(s:c_ns_tag_property)
|
||||
|
||||
@@ -33,7 +33,7 @@ DEL = del
|
||||
endif
|
||||
endif
|
||||
CXX := $(CROSS_COMPILE)g++
|
||||
WINDRES := $(CROSS_COMPILE)windres --preprocessor="$(CXX) -E -xc" -
|
||||
WINDRES := $(CROSS_COMPILE)windres --preprocessor="$(CXX) -E -xc" -DRC_INVOKED
|
||||
LIBS := -luuid
|
||||
RES := gvimext.res
|
||||
DEFFILE = gvimext_ming.def
|
||||
|
||||
@@ -303,7 +303,7 @@ DIRSLASH = \\
|
||||
endif
|
||||
endif
|
||||
CC := $(CROSS_COMPILE)gcc
|
||||
WINDRES := $(CROSS_COMPILE)windres --preprocessor="$(CC) -E -xc" -
|
||||
WINDRES := $(CROSS_COMPILE)windres --preprocessor="$(CC) -E -xc" -DRC_INVOKED
|
||||
|
||||
#>>>>> end of choices
|
||||
###########################################################################
|
||||
|
||||
81
src/eval.c
81
src/eval.c
@@ -362,6 +362,7 @@ static struct vimvar
|
||||
{VV_NAME("operator", VAR_STRING), VV_RO},
|
||||
{VV_NAME("searchforward", VAR_NUMBER), 0},
|
||||
{VV_NAME("oldfiles", VAR_LIST), 0},
|
||||
{VV_NAME("windowid", VAR_NUMBER), VV_RO},
|
||||
};
|
||||
|
||||
/* shorthand */
|
||||
@@ -7803,7 +7804,7 @@ static struct fst
|
||||
{"log10", 1, 1, f_log10},
|
||||
#endif
|
||||
{"map", 2, 2, f_map},
|
||||
{"maparg", 1, 3, f_maparg},
|
||||
{"maparg", 1, 4, f_maparg},
|
||||
{"mapcheck", 1, 3, f_mapcheck},
|
||||
{"match", 2, 4, f_match},
|
||||
{"matchadd", 2, 4, f_matchadd},
|
||||
@@ -13291,8 +13292,10 @@ get_maparg(argvars, rettv, exact)
|
||||
char_u *keys_buf = NULL;
|
||||
char_u *rhs;
|
||||
int mode;
|
||||
garray_T ga;
|
||||
int abbr = FALSE;
|
||||
int get_dict = FALSE;
|
||||
mapblock_T *mp;
|
||||
int buffer_local;
|
||||
|
||||
/* return empty string for failure */
|
||||
rettv->v_type = VAR_STRING;
|
||||
@@ -13306,7 +13309,11 @@ get_maparg(argvars, rettv, exact)
|
||||
{
|
||||
which = get_tv_string_buf_chk(&argvars[1], buf);
|
||||
if (argvars[2].v_type != VAR_UNKNOWN)
|
||||
{
|
||||
abbr = get_tv_number(&argvars[2]);
|
||||
if (argvars[3].v_type != VAR_UNKNOWN)
|
||||
get_dict = get_tv_number(&argvars[3]);
|
||||
}
|
||||
}
|
||||
else
|
||||
which = (char_u *)"";
|
||||
@@ -13316,19 +13323,34 @@ get_maparg(argvars, rettv, exact)
|
||||
mode = get_map_mode(&which, 0);
|
||||
|
||||
keys = replace_termcodes(keys, &keys_buf, TRUE, TRUE, FALSE);
|
||||
rhs = check_map(keys, mode, exact, FALSE, abbr);
|
||||
rhs = check_map(keys, mode, exact, FALSE, abbr, &mp, &buffer_local);
|
||||
vim_free(keys_buf);
|
||||
if (rhs != NULL)
|
||||
|
||||
if (!get_dict)
|
||||
{
|
||||
ga_init(&ga);
|
||||
ga.ga_itemsize = 1;
|
||||
ga.ga_growsize = 40;
|
||||
/* Return a string. */
|
||||
if (rhs != NULL)
|
||||
rettv->vval.v_string = str2special_save(rhs, FALSE);
|
||||
|
||||
while (*rhs != NUL)
|
||||
ga_concat(&ga, str2special(&rhs, FALSE));
|
||||
}
|
||||
else if (rettv_dict_alloc(rettv) != FAIL && rhs != NULL)
|
||||
{
|
||||
/* Return a dictionary. */
|
||||
char_u *lhs = str2special_save(mp->m_keys, TRUE);
|
||||
char_u *mapmode = map_mode_to_chars(mp->m_mode);
|
||||
dict_T *dict = rettv->vval.v_dict;
|
||||
|
||||
ga_append(&ga, NUL);
|
||||
rettv->vval.v_string = (char_u *)ga.ga_data;
|
||||
dict_add_nr_str(dict, "lhs", 0L, lhs);
|
||||
dict_add_nr_str(dict, "rhs", 0L, mp->m_orig_str);
|
||||
dict_add_nr_str(dict, "noremap", mp->m_noremap ? 1L : 0L , NULL);
|
||||
dict_add_nr_str(dict, "expr", mp->m_expr ? 1L : 0L, NULL);
|
||||
dict_add_nr_str(dict, "silent", mp->m_silent ? 1L : 0L, NULL);
|
||||
dict_add_nr_str(dict, "sid", (long)mp->m_script_ID, NULL);
|
||||
dict_add_nr_str(dict, "buffer", (long)buffer_local, NULL);
|
||||
dict_add_nr_str(dict, "mode", 0L, mapmode);
|
||||
|
||||
vim_free(lhs);
|
||||
vim_free(mapmode);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22520,18 +22542,21 @@ read_viminfo_varlist(virp, writing)
|
||||
if (tab != NULL)
|
||||
{
|
||||
*tab++ = '\0'; /* isolate the variable name */
|
||||
if (*tab == 'S') /* string var */
|
||||
type = VAR_STRING;
|
||||
switch (*tab)
|
||||
{
|
||||
case 'S': type = VAR_STRING; break;
|
||||
#ifdef FEAT_FLOAT
|
||||
else if (*tab == 'F')
|
||||
type = VAR_FLOAT;
|
||||
case 'F': type = VAR_FLOAT; break;
|
||||
#endif
|
||||
case 'D': type = VAR_DICT; break;
|
||||
case 'L': type = VAR_LIST; break;
|
||||
}
|
||||
|
||||
tab = vim_strchr(tab, '\t');
|
||||
if (tab != NULL)
|
||||
{
|
||||
tv.v_type = type;
|
||||
if (type == VAR_STRING)
|
||||
if (type == VAR_STRING || type == VAR_DICT || type == VAR_LIST)
|
||||
tv.vval.v_string = viminfo_readstring(virp,
|
||||
(int)(tab - virp->vir_line + 1), TRUE);
|
||||
#ifdef FEAT_FLOAT
|
||||
@@ -22540,9 +22565,27 @@ read_viminfo_varlist(virp, writing)
|
||||
#endif
|
||||
else
|
||||
tv.vval.v_number = atol((char *)tab + 1);
|
||||
if (type == VAR_DICT || type == VAR_LIST)
|
||||
{
|
||||
typval_T *etv = eval_expr(tv.vval.v_string, NULL);
|
||||
|
||||
if (etv == NULL)
|
||||
/* Failed to parse back the dict or list, use it as a
|
||||
* string. */
|
||||
tv.v_type = VAR_STRING;
|
||||
else
|
||||
{
|
||||
vim_free(tv.vval.v_string);
|
||||
tv = *etv;
|
||||
}
|
||||
}
|
||||
|
||||
set_var(virp->vir_line + 1, &tv, FALSE);
|
||||
if (type == VAR_STRING)
|
||||
|
||||
if (tv.v_type == VAR_STRING)
|
||||
vim_free(tv.vval.v_string);
|
||||
else if (tv.v_type == VAR_DICT || tv.v_type == VAR_LIST)
|
||||
clear_tv(&tv);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -22584,8 +22627,10 @@ write_viminfo_varlist(fp)
|
||||
case VAR_STRING: s = "STR"; break;
|
||||
case VAR_NUMBER: s = "NUM"; break;
|
||||
#ifdef FEAT_FLOAT
|
||||
case VAR_FLOAT: s = "FLO"; break;
|
||||
case VAR_FLOAT: s = "FLO"; break;
|
||||
#endif
|
||||
case VAR_DICT: s = "DIC"; break;
|
||||
case VAR_LIST: s = "LIS"; break;
|
||||
default: continue;
|
||||
}
|
||||
fprintf(fp, "!%s\t%s\t", this_var->di_key, s);
|
||||
|
||||
@@ -323,7 +323,8 @@ sort_compare(s1, s2)
|
||||
/* When sorting numbers "start_col_nr" is the number, not the column
|
||||
* number. */
|
||||
if (sort_nr)
|
||||
result = l1.start_col_nr - l2.start_col_nr;
|
||||
result = l1.start_col_nr == l2.start_col_nr ? 0
|
||||
: l1.start_col_nr > l2.start_col_nr ? 1 : -1;
|
||||
else
|
||||
{
|
||||
/* We need to copy one line into "sortbuf1", because there is no
|
||||
@@ -482,7 +483,7 @@ ex_sort(eap)
|
||||
* of the match, by temporarily terminating the string there */
|
||||
s2 = s + end_col;
|
||||
c = *s2;
|
||||
(*s2) = 0;
|
||||
*s2 = NUL;
|
||||
/* Sorting on number: Store the number itself. */
|
||||
p = s + start_col;
|
||||
if (sort_hex)
|
||||
@@ -491,9 +492,13 @@ ex_sort(eap)
|
||||
s = skiptodigit(p);
|
||||
if (s > p && s[-1] == '-')
|
||||
--s; /* include preceding negative sign */
|
||||
vim_str2nr(s, NULL, NULL, sort_oct, sort_hex,
|
||||
&nrs[lnum - eap->line1].start_col_nr, NULL);
|
||||
(*s2) = c;
|
||||
if (*s == NUL)
|
||||
/* empty line should sort before any number */
|
||||
nrs[lnum - eap->line1].start_col_nr = -MAXLNUM;
|
||||
else
|
||||
vim_str2nr(s, NULL, NULL, sort_oct, sort_hex,
|
||||
&nrs[lnum - eap->line1].start_col_nr, NULL);
|
||||
*s2 = c;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -6556,8 +6561,7 @@ typedef struct sign sign_T;
|
||||
struct sign
|
||||
{
|
||||
sign_T *sn_next; /* next sign in list */
|
||||
int sn_typenr; /* type number of sign (negative if not equal
|
||||
to name) */
|
||||
int sn_typenr; /* type number of sign */
|
||||
char_u *sn_name; /* name of sign */
|
||||
char_u *sn_icon; /* name of pixmap */
|
||||
#ifdef FEAT_SIGN_ICONS
|
||||
@@ -6569,7 +6573,7 @@ struct sign
|
||||
};
|
||||
|
||||
static sign_T *first_sign = NULL;
|
||||
static int last_sign_typenr = MAX_TYPENR; /* is decremented */
|
||||
static int next_sign_typenr = 1;
|
||||
|
||||
static int sign_cmd_idx __ARGS((char_u *begin_cmd, char_u *end_cmd));
|
||||
static void sign_list_defined __ARGS((sign_T *sp));
|
||||
@@ -6651,9 +6655,14 @@ ex_sign(eap)
|
||||
EMSG(_("E156: Missing sign name"));
|
||||
else
|
||||
{
|
||||
/* Isolate the sign name. If it's a number skip leading zeroes,
|
||||
* so that "099" and "99" are the same sign. But keep "0". */
|
||||
p = skiptowhite(arg);
|
||||
if (*p != NUL)
|
||||
*p++ = NUL;
|
||||
while (arg[0] == '0' && arg[1] != NUL)
|
||||
++arg;
|
||||
|
||||
sp_prev = NULL;
|
||||
for (sp = first_sign; sp != NULL; sp = sp->sn_next)
|
||||
{
|
||||
@@ -6666,46 +6675,52 @@ ex_sign(eap)
|
||||
/* ":sign define {name} ...": define a sign */
|
||||
if (sp == NULL)
|
||||
{
|
||||
sign_T *lp;
|
||||
int start = next_sign_typenr;
|
||||
|
||||
/* Allocate a new sign. */
|
||||
sp = (sign_T *)alloc_clear((unsigned)sizeof(sign_T));
|
||||
if (sp == NULL)
|
||||
return;
|
||||
|
||||
/* Check that next_sign_typenr is not already being used.
|
||||
* This only happens after wrapping around. Hopefully
|
||||
* another one got deleted and we can use its number. */
|
||||
for (lp = first_sign; lp != NULL; )
|
||||
{
|
||||
if (lp->sn_typenr == next_sign_typenr)
|
||||
{
|
||||
++next_sign_typenr;
|
||||
if (next_sign_typenr == MAX_TYPENR)
|
||||
next_sign_typenr = 1;
|
||||
if (next_sign_typenr == start)
|
||||
{
|
||||
vim_free(sp);
|
||||
EMSG(_("E612: Too many signs defined"));
|
||||
return;
|
||||
}
|
||||
lp = first_sign; /* start all over */
|
||||
continue;
|
||||
}
|
||||
lp = lp->sn_next;
|
||||
}
|
||||
|
||||
sp->sn_typenr = next_sign_typenr;
|
||||
if (++next_sign_typenr == MAX_TYPENR)
|
||||
next_sign_typenr = 1; /* wrap around */
|
||||
|
||||
sp->sn_name = vim_strsave(arg);
|
||||
if (sp->sn_name == NULL) /* out of memory */
|
||||
{
|
||||
vim_free(sp);
|
||||
return;
|
||||
}
|
||||
|
||||
/* add the new sign to the list of signs */
|
||||
if (sp_prev == NULL)
|
||||
first_sign = sp;
|
||||
else
|
||||
sp_prev->sn_next = sp;
|
||||
sp->sn_name = vim_strnsave(arg, (int)(p - arg));
|
||||
|
||||
/* If the name is a number use that for the typenr,
|
||||
* otherwise use a negative number. */
|
||||
if (VIM_ISDIGIT(*arg))
|
||||
sp->sn_typenr = atoi((char *)arg);
|
||||
else
|
||||
{
|
||||
sign_T *lp;
|
||||
int start = last_sign_typenr;
|
||||
|
||||
for (lp = first_sign; lp != NULL; lp = lp->sn_next)
|
||||
{
|
||||
if (lp->sn_typenr == last_sign_typenr)
|
||||
{
|
||||
--last_sign_typenr;
|
||||
if (last_sign_typenr == 0)
|
||||
last_sign_typenr = MAX_TYPENR;
|
||||
if (last_sign_typenr == start)
|
||||
{
|
||||
EMSG(_("E612: Too many signs defined"));
|
||||
return;
|
||||
}
|
||||
lp = first_sign;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
sp->sn_typenr = last_sign_typenr--;
|
||||
if (last_sign_typenr == 0)
|
||||
last_sign_typenr = MAX_TYPENR; /* wrap around */
|
||||
}
|
||||
}
|
||||
|
||||
/* set values for a defined sign. */
|
||||
@@ -6883,6 +6898,8 @@ ex_sign(eap)
|
||||
arg = skiptowhite(arg);
|
||||
if (*arg != NUL)
|
||||
*arg++ = NUL;
|
||||
while (sign_name[0] == '0' && sign_name[1] != NUL)
|
||||
++sign_name;
|
||||
}
|
||||
else if (STRNCMP(arg, "file=", 5) == 0)
|
||||
{
|
||||
|
||||
@@ -10708,7 +10708,7 @@ ses_fname(fd, buf, flagp)
|
||||
* Write a file name to the session file.
|
||||
* Takes care of the "slash" option in 'sessionoptions' and escapes special
|
||||
* characters.
|
||||
* Returns FAIL if writing fails.
|
||||
* Returns FAIL if writing fails or out of memory.
|
||||
*/
|
||||
static int
|
||||
ses_put_fname(fd, name, flagp)
|
||||
@@ -10717,49 +10717,32 @@ ses_put_fname(fd, name, flagp)
|
||||
unsigned *flagp;
|
||||
{
|
||||
char_u *sname;
|
||||
char_u *p;
|
||||
int retval = OK;
|
||||
int c;
|
||||
|
||||
sname = home_replace_save(NULL, name);
|
||||
if (sname != NULL)
|
||||
name = sname;
|
||||
while (*name != NUL)
|
||||
{
|
||||
#ifdef FEAT_MBYTE
|
||||
{
|
||||
int l;
|
||||
if (sname == NULL)
|
||||
return FAIL;
|
||||
|
||||
if (has_mbyte && (l = (*mb_ptr2len)(name)) > 1)
|
||||
{
|
||||
/* copy a multibyte char */
|
||||
while (--l >= 0)
|
||||
{
|
||||
if (putc(*name, fd) != *name)
|
||||
retval = FAIL;
|
||||
++name;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
c = *name++;
|
||||
if (c == '\\' && (*flagp & SSOP_SLASH))
|
||||
/* change a backslash to a forward slash */
|
||||
c = '/';
|
||||
else if ((vim_strchr(escape_chars, c) != NULL
|
||||
#ifdef BACKSLASH_IN_FILENAME
|
||||
&& c != '\\'
|
||||
#endif
|
||||
) || c == '#' || c == '%')
|
||||
{
|
||||
/* escape a special character with a backslash */
|
||||
if (putc('\\', fd) != '\\')
|
||||
retval = FAIL;
|
||||
}
|
||||
if (putc(c, fd) != c)
|
||||
retval = FAIL;
|
||||
if (*flagp & SSOP_SLASH)
|
||||
{
|
||||
/* change all backslashes to forward slashes */
|
||||
for (p = sname; *p != NUL; mb_ptr_adv(p))
|
||||
if (*p == '\\')
|
||||
*p = '/';
|
||||
}
|
||||
|
||||
/* escapse special characters */
|
||||
p = vim_strsave_fnameescape(sname, FALSE);
|
||||
vim_free(sname);
|
||||
if (p == NULL)
|
||||
return FAIL;
|
||||
|
||||
/* write the result */
|
||||
if (fputs((char *)p, fd) < 0)
|
||||
retval = FAIL;
|
||||
|
||||
vim_free(p);
|
||||
return retval;
|
||||
}
|
||||
|
||||
|
||||
130
src/getchar.c
130
src/getchar.c
@@ -3168,6 +3168,7 @@ do_map(maptype, arg, mode, abbrev)
|
||||
int expr = FALSE;
|
||||
#endif
|
||||
int noremap;
|
||||
char_u *orig_rhs;
|
||||
|
||||
keys = arg;
|
||||
map_table = maphash;
|
||||
@@ -3266,6 +3267,7 @@ do_map(maptype, arg, mode, abbrev)
|
||||
}
|
||||
if (*p != NUL)
|
||||
*p++ = NUL;
|
||||
|
||||
p = skipwhite(p);
|
||||
rhs = p;
|
||||
hasarg = (*rhs != NUL);
|
||||
@@ -3290,6 +3292,7 @@ do_map(maptype, arg, mode, abbrev)
|
||||
keys = replace_termcodes(keys, &keys_buf, TRUE, TRUE, special);
|
||||
if (hasarg)
|
||||
{
|
||||
orig_rhs = rhs;
|
||||
if (STRICMP(rhs, "<nop>") == 0) /* "<Nop>" means nothing */
|
||||
rhs = (char_u *)"";
|
||||
else
|
||||
@@ -3298,7 +3301,7 @@ do_map(maptype, arg, mode, abbrev)
|
||||
|
||||
#ifdef FEAT_FKMAP
|
||||
/*
|
||||
* when in right-to-left mode and alternate keymap option set,
|
||||
* When in right-to-left mode and alternate keymap option set,
|
||||
* reverse the character flow in the rhs in Farsi.
|
||||
*/
|
||||
if (p_altkeymap && curwin->w_p_rl)
|
||||
@@ -3556,6 +3559,8 @@ do_map(maptype, arg, mode, abbrev)
|
||||
}
|
||||
vim_free(mp->m_str);
|
||||
mp->m_str = newstr;
|
||||
vim_free(mp->m_orig_str);
|
||||
mp->m_orig_str = vim_strsave(orig_rhs);
|
||||
mp->m_noremap = noremap;
|
||||
mp->m_silent = silent;
|
||||
mp->m_mode = mode;
|
||||
@@ -3633,10 +3638,12 @@ do_map(maptype, arg, mode, abbrev)
|
||||
|
||||
mp->m_keys = vim_strsave(keys);
|
||||
mp->m_str = vim_strsave(rhs);
|
||||
mp->m_orig_str = vim_strsave(orig_rhs);
|
||||
if (mp->m_keys == NULL || mp->m_str == NULL)
|
||||
{
|
||||
vim_free(mp->m_keys);
|
||||
vim_free(mp->m_str);
|
||||
vim_free(mp->m_orig_str);
|
||||
vim_free(mp);
|
||||
retval = 4; /* no mem */
|
||||
goto theend;
|
||||
@@ -3682,6 +3689,7 @@ map_free(mpp)
|
||||
mp = *mpp;
|
||||
vim_free(mp->m_keys);
|
||||
vim_free(mp->m_str);
|
||||
vim_free(mp->m_orig_str);
|
||||
*mpp = mp->m_next;
|
||||
vim_free(mp);
|
||||
}
|
||||
@@ -3851,12 +3859,57 @@ map_clear_int(buf, mode, local, abbr)
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Return characters to represent the map mode in an allocated string.
|
||||
* Returns NULL when out of memory.
|
||||
*/
|
||||
char_u *
|
||||
map_mode_to_chars(mode)
|
||||
int mode;
|
||||
{
|
||||
garray_T mapmode;
|
||||
|
||||
ga_init2(&mapmode, 1, 7);
|
||||
|
||||
if ((mode & (INSERT + CMDLINE)) == INSERT + CMDLINE)
|
||||
ga_append(&mapmode, '!'); /* :map! */
|
||||
else if (mode & INSERT)
|
||||
ga_append(&mapmode, 'i'); /* :imap */
|
||||
else if (mode & LANGMAP)
|
||||
ga_append(&mapmode, 'l'); /* :lmap */
|
||||
else if (mode & CMDLINE)
|
||||
ga_append(&mapmode, 'c'); /* :cmap */
|
||||
else if ((mode & (NORMAL + VISUAL + SELECTMODE + OP_PENDING))
|
||||
== NORMAL + VISUAL + SELECTMODE + OP_PENDING)
|
||||
ga_append(&mapmode, ' '); /* :map */
|
||||
else
|
||||
{
|
||||
if (mode & NORMAL)
|
||||
ga_append(&mapmode, 'n'); /* :nmap */
|
||||
if (mode & OP_PENDING)
|
||||
ga_append(&mapmode, 'o'); /* :omap */
|
||||
if ((mode & (VISUAL + SELECTMODE)) == VISUAL + SELECTMODE)
|
||||
ga_append(&mapmode, 'v'); /* :vmap */
|
||||
else
|
||||
{
|
||||
if (mode & VISUAL)
|
||||
ga_append(&mapmode, 'x'); /* :xmap */
|
||||
if (mode & SELECTMODE)
|
||||
ga_append(&mapmode, 's'); /* :smap */
|
||||
}
|
||||
}
|
||||
|
||||
ga_append(&mapmode, NUL);
|
||||
return (char_u *)mapmode.ga_data;
|
||||
}
|
||||
|
||||
static void
|
||||
showmap(mp, local)
|
||||
mapblock_T *mp;
|
||||
int local; /* TRUE for buffer-local map */
|
||||
{
|
||||
int len = 1;
|
||||
int len = 1;
|
||||
char_u *mapchars;
|
||||
|
||||
if (msg_didout || msg_silent != 0)
|
||||
{
|
||||
@@ -3864,49 +3917,15 @@ showmap(mp, local)
|
||||
if (got_int) /* 'q' typed at MORE prompt */
|
||||
return;
|
||||
}
|
||||
if ((mp->m_mode & (INSERT + CMDLINE)) == INSERT + CMDLINE)
|
||||
msg_putchar('!'); /* :map! */
|
||||
else if (mp->m_mode & INSERT)
|
||||
msg_putchar('i'); /* :imap */
|
||||
else if (mp->m_mode & LANGMAP)
|
||||
msg_putchar('l'); /* :lmap */
|
||||
else if (mp->m_mode & CMDLINE)
|
||||
msg_putchar('c'); /* :cmap */
|
||||
else if ((mp->m_mode & (NORMAL + VISUAL + SELECTMODE + OP_PENDING))
|
||||
== NORMAL + VISUAL + SELECTMODE + OP_PENDING)
|
||||
msg_putchar(' '); /* :map */
|
||||
else
|
||||
|
||||
mapchars = map_mode_to_chars(mp->m_mode);
|
||||
if (mapchars != NULL)
|
||||
{
|
||||
len = 0;
|
||||
if (mp->m_mode & NORMAL)
|
||||
{
|
||||
msg_putchar('n'); /* :nmap */
|
||||
++len;
|
||||
}
|
||||
if (mp->m_mode & OP_PENDING)
|
||||
{
|
||||
msg_putchar('o'); /* :omap */
|
||||
++len;
|
||||
}
|
||||
if ((mp->m_mode & (VISUAL + SELECTMODE)) == VISUAL + SELECTMODE)
|
||||
{
|
||||
msg_putchar('v'); /* :vmap */
|
||||
++len;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (mp->m_mode & VISUAL)
|
||||
{
|
||||
msg_putchar('x'); /* :xmap */
|
||||
++len;
|
||||
}
|
||||
if (mp->m_mode & SELECTMODE)
|
||||
{
|
||||
msg_putchar('s'); /* :smap */
|
||||
++len;
|
||||
}
|
||||
}
|
||||
msg_puts(mapchars);
|
||||
len = STRLEN(mapchars);
|
||||
vim_free(mapchars);
|
||||
}
|
||||
|
||||
while (++len <= 3)
|
||||
msg_putchar(' ');
|
||||
|
||||
@@ -3931,8 +3950,7 @@ showmap(mp, local)
|
||||
msg_putchar(' ');
|
||||
|
||||
/* Use FALSE below if we only want things like <Up> to show up as such on
|
||||
* the rhs, and not M-x etc, TRUE gets both -- webb
|
||||
*/
|
||||
* the rhs, and not M-x etc, TRUE gets both -- webb */
|
||||
if (*mp->m_str == NUL)
|
||||
msg_puts_attr((char_u *)"<Nop>", hl_attr(HLF_8));
|
||||
else
|
||||
@@ -4995,19 +5013,21 @@ check_map_keycodes()
|
||||
sourcing_name = save_name;
|
||||
}
|
||||
|
||||
#ifdef FEAT_EVAL
|
||||
#if defined(FEAT_EVAL) || defined(PROTO)
|
||||
/*
|
||||
* Check the string "keys" against the lhs of all mappings
|
||||
* Return pointer to rhs of mapping (mapblock->m_str)
|
||||
* NULL otherwise
|
||||
* Check the string "keys" against the lhs of all mappings.
|
||||
* Return pointer to rhs of mapping (mapblock->m_str).
|
||||
* NULL when no mapping found.
|
||||
*/
|
||||
char_u *
|
||||
check_map(keys, mode, exact, ign_mod, abbr)
|
||||
check_map(keys, mode, exact, ign_mod, abbr, mp_ptr, local_ptr)
|
||||
char_u *keys;
|
||||
int mode;
|
||||
int exact; /* require exact match */
|
||||
int ign_mod; /* ignore preceding modifier */
|
||||
int abbr; /* do abbreviations */
|
||||
mapblock_T **mp_ptr; /* return: pointer to mapblock or NULL */
|
||||
int *local_ptr; /* return: buffer-local mapping or NULL */
|
||||
{
|
||||
int hash;
|
||||
int len, minlen;
|
||||
@@ -5062,7 +5082,17 @@ check_map(keys, mode, exact, ign_mod, abbr)
|
||||
minlen = mp->m_keylen - 3;
|
||||
}
|
||||
if (STRNCMP(s, keys, minlen) == 0)
|
||||
{
|
||||
if (mp_ptr != NULL)
|
||||
*mp_ptr = mp;
|
||||
if (local_ptr != NULL)
|
||||
#ifdef FEAT_LOCALMAP
|
||||
*local_ptr = local;
|
||||
#else
|
||||
*local_ptr = 0;
|
||||
#endif
|
||||
return mp->m_str;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
10
src/gui.c
10
src/gui.c
@@ -105,8 +105,18 @@ gui_start()
|
||||
|
||||
#if defined(FEAT_GUI_GTK) || defined(FEAT_GUI_X11)
|
||||
if (gui.in_use)
|
||||
{
|
||||
# ifdef FEAT_EVAL
|
||||
Window x11_window;
|
||||
Display *x11_display;
|
||||
|
||||
if (gui_get_x11_windis(&x11_window, &x11_display) == OK)
|
||||
set_vim_var_nr(VV_WINDOWID, (long)x11_window);
|
||||
# endif
|
||||
|
||||
/* Display error messages in a dialog now. */
|
||||
display_errors();
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(MAY_FORK) && !defined(__QNXNTO__)
|
||||
|
||||
@@ -1810,7 +1810,8 @@ process_message(void)
|
||||
* mapped we want to use the mapping instead. */
|
||||
if (vk == VK_F10
|
||||
&& gui.menu_is_active
|
||||
&& check_map(k10, State, FALSE, TRUE, FALSE) == NULL)
|
||||
&& check_map(k10, State, FALSE, TRUE, FALSE,
|
||||
NULL, NULL) == NULL)
|
||||
break;
|
||||
#endif
|
||||
if (GetKeyState(VK_SHIFT) & 0x8000)
|
||||
@@ -1924,7 +1925,8 @@ process_message(void)
|
||||
/* Check for <F10>: Default effect is to select the menu. When <F10> is
|
||||
* mapped we need to stop it here to avoid strange effects (e.g., for the
|
||||
* key-up event) */
|
||||
if (vk != VK_F10 || check_map(k10, State, FALSE, TRUE, FALSE) == NULL)
|
||||
if (vk != VK_F10 || check_map(k10, State, FALSE, TRUE, FALSE,
|
||||
NULL, NULL) == NULL)
|
||||
#endif
|
||||
DispatchMessage(&msg);
|
||||
}
|
||||
|
||||
@@ -1477,6 +1477,27 @@ msg_outtrans_special(strstart, from)
|
||||
return retval;
|
||||
}
|
||||
|
||||
#if defined(FEAT_EVAL) || defined(PROTO)
|
||||
/*
|
||||
* Return the lhs or rhs of a mapping, with the key codes turned into printable
|
||||
* strings, in an allocated string.
|
||||
*/
|
||||
char_u *
|
||||
str2special_save(str, is_lhs)
|
||||
char_u *str;
|
||||
int is_lhs; /* TRUE for lhs, FALSE for rhs */
|
||||
{
|
||||
garray_T ga;
|
||||
char_u *p = str;
|
||||
|
||||
ga_init2(&ga, 1, 40);
|
||||
while (*p != NUL)
|
||||
ga_concat(&ga, str2special(&p, is_lhs));
|
||||
ga_append(&ga, NUL);
|
||||
return (char_u *)ga.ga_data;
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Return the printable string for the key codes at "*sp".
|
||||
* Used for translating the lhs or rhs of a mapping to printable chars.
|
||||
|
||||
@@ -2773,6 +2773,16 @@ ex_nbkey(eap)
|
||||
ex_nbstart(eap)
|
||||
exarg_T *eap;
|
||||
{
|
||||
#ifdef FEAT_GUI
|
||||
# if !defined(FEAT_GUI_X11) && !defined(FEAT_GUI_GTK) \
|
||||
&& !defined(FEAT_GUI_W32)
|
||||
if (gui.in_use)
|
||||
{
|
||||
EMSG(_("E838: netbeans is not supported with this GUI"));
|
||||
return;
|
||||
}
|
||||
# endif
|
||||
#endif
|
||||
netbeans_open((char *)eap->arg, FALSE);
|
||||
}
|
||||
|
||||
|
||||
@@ -5666,8 +5666,13 @@ nv_ident(cap)
|
||||
else if (cmdchar == '#')
|
||||
aux_ptr = (char_u *)(p_magic ? "/?.*~[^$\\" : "/?^$\\");
|
||||
else if (tag_cmd)
|
||||
/* Don't escape spaces and Tabs in a tag with a backslash */
|
||||
aux_ptr = (char_u *)"\\|\"\n[";
|
||||
{
|
||||
if (curbuf->b_help)
|
||||
/* ":help" handles unescaped argument */
|
||||
aux_ptr = (char_u *)"";
|
||||
else
|
||||
aux_ptr = (char_u *)"\\|\"\n[";
|
||||
}
|
||||
else
|
||||
aux_ptr = (char_u *)"\\|\"\n*?[";
|
||||
|
||||
|
||||
@@ -4153,9 +4153,10 @@ do_join(count, insert_space, save_undo)
|
||||
int save_undo;
|
||||
{
|
||||
char_u *curr = NULL;
|
||||
char_u *curr_start = NULL;
|
||||
char_u *cend;
|
||||
char_u *newp;
|
||||
char_u *spaces; /* number of spaces inserte before a line */
|
||||
char_u *spaces; /* number of spaces inserted before a line */
|
||||
int endcurr1 = NUL;
|
||||
int endcurr2 = NUL;
|
||||
int currsize = 0; /* size of the current line */
|
||||
@@ -4181,7 +4182,7 @@ do_join(count, insert_space, save_undo)
|
||||
*/
|
||||
for (t = 0; t < count; ++t)
|
||||
{
|
||||
curr = ml_get((linenr_T)(curwin->w_cursor.lnum + t));
|
||||
curr = curr_start = ml_get((linenr_T)(curwin->w_cursor.lnum + t));
|
||||
if (insert_space && t > 0)
|
||||
{
|
||||
curr = skipwhite(curr);
|
||||
@@ -4265,10 +4266,10 @@ do_join(count, insert_space, save_undo)
|
||||
copy_spaces(cend, (size_t)(spaces[t]));
|
||||
}
|
||||
mark_col_adjust(curwin->w_cursor.lnum + t, (colnr_T)0, (linenr_T)-t,
|
||||
(long)(cend - newp + spaces[t]));
|
||||
(long)(cend - newp + spaces[t] - (curr - curr_start)));
|
||||
if (t == 0)
|
||||
break;
|
||||
curr = ml_get((linenr_T)(curwin->w_cursor.lnum + t - 1));
|
||||
curr = curr_start = ml_get((linenr_T)(curwin->w_cursor.lnum + t - 1));
|
||||
if (insert_space && t > 1)
|
||||
curr = skipwhite(curr);
|
||||
currsize = (int)STRLEN(curr);
|
||||
|
||||
@@ -10011,7 +10011,7 @@ buf_copy_options(buf, flags)
|
||||
buf->b_p_smc = p_smc;
|
||||
#endif
|
||||
#ifdef FEAT_SPELL
|
||||
buf->b_s.b_p_spc = vim_strsave(p_spf);
|
||||
buf->b_s.b_p_spc = vim_strsave(p_spc);
|
||||
(void)compile_cap_prog(&buf->b_s);
|
||||
buf->b_s.b_p_spf = vim_strsave(p_spf);
|
||||
buf->b_s.b_p_spl = vim_strsave(p_spl);
|
||||
|
||||
@@ -15,6 +15,10 @@
|
||||
Error: MACOS 9 is no longer supported in Vim 7
|
||||
#endif
|
||||
|
||||
/* Avoid a conflict for the definition of Boolean between Mac header files and
|
||||
* X11 header files. */
|
||||
#define NO_X11_INCLUDES
|
||||
|
||||
#include "vim.h"
|
||||
#import <Cocoa/Cocoa.h>
|
||||
|
||||
|
||||
@@ -1738,6 +1738,11 @@ get_x11_windis()
|
||||
}
|
||||
if (x11_window == 0 || x11_display == NULL)
|
||||
return (result = FAIL);
|
||||
|
||||
# ifdef FEAT_EVAL
|
||||
set_vim_var_nr(VV_WINDOWID, (long)x11_window);
|
||||
# endif
|
||||
|
||||
return (result = OK);
|
||||
}
|
||||
|
||||
@@ -4168,7 +4173,6 @@ mch_call_shell(cmd, options)
|
||||
# ifdef FEAT_GUI
|
||||
if (pty_master_fd >= 0)
|
||||
{
|
||||
close(pty_slave_fd); /* close slave side of pty */
|
||||
fromshell_fd = pty_master_fd;
|
||||
toshell_fd = dup(pty_master_fd);
|
||||
}
|
||||
@@ -4637,6 +4641,14 @@ finished:
|
||||
break;
|
||||
}
|
||||
|
||||
# ifdef FEAT_GUI
|
||||
/* Close slave side of pty. Only do this after the child has
|
||||
* exited, otherwise the child may hang when it tries to write on
|
||||
* the pty. */
|
||||
if (pty_master_fd >= 0)
|
||||
close(pty_slave_fd);
|
||||
# endif
|
||||
|
||||
/* Make sure the child that writes to the external program is
|
||||
* dead. */
|
||||
if (wpid > 0)
|
||||
|
||||
@@ -2308,12 +2308,14 @@ fname_case(
|
||||
int len)
|
||||
{
|
||||
char szTrueName[_MAX_PATH + 2];
|
||||
char szTrueNameTemp[_MAX_PATH + 2];
|
||||
char *ptrue, *ptruePrev;
|
||||
char *porig, *porigPrev;
|
||||
int flen;
|
||||
WIN32_FIND_DATA fb;
|
||||
HANDLE hFind;
|
||||
int c;
|
||||
int slen;
|
||||
|
||||
flen = (int)STRLEN(name);
|
||||
if (flen == 0 || flen > _MAX_PATH)
|
||||
@@ -2358,12 +2360,19 @@ fname_case(
|
||||
}
|
||||
*ptrue = NUL;
|
||||
|
||||
/* To avoid a slow failure append "\*" when searching a directory,
|
||||
* server or network share. */
|
||||
STRCPY(szTrueNameTemp, szTrueName);
|
||||
slen = strlen(szTrueNameTemp);
|
||||
if (*porig == psepc && slen + 2 < _MAX_PATH)
|
||||
STRCPY(szTrueNameTemp + slen, "\\*");
|
||||
|
||||
/* Skip "", "." and "..". */
|
||||
if (ptrue > ptruePrev
|
||||
&& (ptruePrev[0] != '.'
|
||||
|| (ptruePrev[1] != NUL
|
||||
&& (ptruePrev[1] != '.' || ptruePrev[2] != NUL)))
|
||||
&& (hFind = FindFirstFile(szTrueName, &fb))
|
||||
&& (hFind = FindFirstFile(szTrueNameTemp, &fb))
|
||||
!= INVALID_HANDLE_VALUE)
|
||||
{
|
||||
c = *porig;
|
||||
|
||||
@@ -201,7 +201,7 @@ msgstr "Segni per %s:"
|
||||
|
||||
#, c-format
|
||||
msgid " line=%ld id=%d name=%s"
|
||||
msgstr " linea=%ld id=%d, nome=%s"
|
||||
msgstr " linea=%ld id=%d nome=%s"
|
||||
|
||||
#, c-format
|
||||
msgid "E96: Can not diff more than %ld buffers"
|
||||
|
||||
@@ -173,7 +173,7 @@ msgstr "Tecken f
|
||||
|
||||
#, c-format
|
||||
msgid " line=%ld id=%d name=%s"
|
||||
msgstr " line=%ld id=%d namn%s"
|
||||
msgstr " line=%ld id=%d namn=%s"
|
||||
|
||||
#, c-format
|
||||
msgid "E96: Can not diff more than %ld buffers"
|
||||
|
||||
@@ -51,6 +51,7 @@ int do_map __ARGS((int maptype, char_u *arg, int mode, int abbrev));
|
||||
int get_map_mode __ARGS((char_u **cmdp, int forceit));
|
||||
void map_clear __ARGS((char_u *cmdp, char_u *arg, int forceit, int abbr));
|
||||
void map_clear_int __ARGS((buf_T *buf, int mode, int local, int abbr));
|
||||
char_u *map_mode_to_chars __ARGS((int mode));
|
||||
int map_to_exists __ARGS((char_u *str, char_u *modechars, int abbr));
|
||||
int map_to_exists_mode __ARGS((char_u *rhs, int mode, int abbr));
|
||||
char_u *set_context_in_map_cmd __ARGS((expand_T *xp, char_u *cmd, char_u *arg, int forceit, int isabbrev, int isunmap, cmdidx_T cmdidx));
|
||||
@@ -61,7 +62,7 @@ void vim_unescape_csi __ARGS((char_u *p));
|
||||
int makemap __ARGS((FILE *fd, buf_T *buf));
|
||||
int put_escstr __ARGS((FILE *fd, char_u *strstart, int what));
|
||||
void check_map_keycodes __ARGS((void));
|
||||
char_u *check_map __ARGS((char_u *keys, int mode, int exact, int ign_mod, int abbr));
|
||||
char_u *check_map __ARGS((char_u *keys, int mode, int exact, int ign_mod, int abbr, mapblock_T **mp_ptr, int *local_ptr));
|
||||
void init_mappings __ARGS((void));
|
||||
void add_map __ARGS((char_u *map, int mode));
|
||||
/* vim: set ft=c : */
|
||||
|
||||
@@ -33,6 +33,7 @@ char_u *msg_outtrans_one __ARGS((char_u *p, int attr));
|
||||
int msg_outtrans_len_attr __ARGS((char_u *msgstr, int len, int attr));
|
||||
void msg_make __ARGS((char_u *arg));
|
||||
int msg_outtrans_special __ARGS((char_u *strstart, int from));
|
||||
char_u *str2special_save __ARGS((char_u *str, int is_lhs));
|
||||
char_u *str2special __ARGS((char_u **sp, int from));
|
||||
void str2specialbuf __ARGS((char_u *sp, char_u *buf, int len));
|
||||
void msg_prt_line __ARGS((char_u *s, int list));
|
||||
|
||||
@@ -979,9 +979,10 @@ typedef struct mapblock mapblock_T;
|
||||
struct mapblock
|
||||
{
|
||||
mapblock_T *m_next; /* next mapblock in list */
|
||||
char_u *m_keys; /* mapped from */
|
||||
char_u *m_keys; /* mapped from, lhs */
|
||||
int m_keylen; /* strlen(m_keys) */
|
||||
char_u *m_str; /* mapped to */
|
||||
char_u *m_str; /* mapped to, rhs */
|
||||
char_u *m_orig_str; /* rhs as entered by the user */
|
||||
int m_mode; /* valid mode */
|
||||
int m_noremap; /* if non-zero no re-mapping for m_str */
|
||||
char m_silent; /* <silent> used, don't echo commands */
|
||||
|
||||
@@ -27,7 +27,7 @@ SCRIPTS = test1.out test3.out test4.out test5.out test6.out \
|
||||
test56.out test57.out test58.out test59.out test60.out \
|
||||
test61.out test62.out test63.out test64.out test65.out \
|
||||
test66.out test67.out test68.out test69.out test70.out \
|
||||
test71.out test72.out test73.out
|
||||
test71.out test72.out test73.out test74.out
|
||||
|
||||
.SUFFIXES: .in .out
|
||||
|
||||
@@ -120,3 +120,4 @@ test70.out: test70.in
|
||||
test71.out: test71.in
|
||||
test72.out: test72.in
|
||||
test73.out: test73.in
|
||||
test74.out: test74.in
|
||||
|
||||
@@ -27,7 +27,8 @@ SCRIPTS = test3.out test4.out test5.out test6.out test7.out \
|
||||
test30.out test31.out test32.out test33.out test34.out \
|
||||
test37.out test38.out test39.out test40.out test41.out \
|
||||
test42.out test52.out test65.out test66.out test67.out \
|
||||
test68.out test69.out test71.out test72.out test73.out
|
||||
test68.out test69.out test71.out test72.out test73.out \
|
||||
test74.out
|
||||
|
||||
SCRIPTS32 = test50.out test70.out
|
||||
|
||||
|
||||
@@ -47,7 +47,8 @@ SCRIPTS = test3.out test4.out test5.out test6.out test7.out \
|
||||
test30.out test31.out test32.out test33.out test34.out \
|
||||
test37.out test38.out test39.out test40.out test41.out \
|
||||
test42.out test52.out test65.out test66.out test67.out \
|
||||
test68.out test69.out test71.out test72.out test72.out
|
||||
test68.out test69.out test71.out test72.out test73.out \
|
||||
test74.out
|
||||
|
||||
SCRIPTS32 = test50.out test70.out
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ SCRIPTS = test1.out test3.out test4.out test5.out test6.out \
|
||||
test56.out test57.out test58.out test59.out test60.out \
|
||||
test61.out test62.out test63.out test64.out test65.out \
|
||||
test66.out test67.out test68.out test69.out test70.out \
|
||||
test71.out test72.out test73.out
|
||||
test71.out test72.out test73.out test74.out
|
||||
|
||||
.SUFFIXES: .in .out
|
||||
|
||||
|
||||
@@ -74,7 +74,7 @@ SCRIPT = test1.out test2.out test3.out test4.out test5.out \
|
||||
test56.out test57.out test60.out \
|
||||
test61.out test62.out test63.out test64.out test65.out \
|
||||
test66.out test67.out test68.out test69.out \
|
||||
test71.out test72.out
|
||||
test71.out test72.out test74.out
|
||||
|
||||
# Known problems:
|
||||
# Test 30: a problem around mac format - unknown reason
|
||||
|
||||
@@ -10,6 +10,7 @@ VIMPROG = ../vim
|
||||
# This will make testing about 10 times as slow.
|
||||
# VALGRIND = valgrind --tool=memcheck --leak-check=yes --num-callers=15 --log-file=valgrind.$*
|
||||
|
||||
|
||||
SCRIPTS = test1.out test2.out test3.out test4.out test5.out test6.out \
|
||||
test7.out test8.out test9.out test10.out test11.out \
|
||||
test12.out test13.out test14.out test15.out test17.out \
|
||||
@@ -23,7 +24,8 @@ SCRIPTS = test1.out test2.out test3.out test4.out test5.out test6.out \
|
||||
test54.out test55.out test56.out test57.out test58.out \
|
||||
test59.out test60.out test61.out test62.out test63.out \
|
||||
test64.out test65.out test66.out test67.out test68.out \
|
||||
test69.out test70.out test71.out test72.out test73.out
|
||||
test69.out test70.out test71.out test72.out test73.out \
|
||||
test74.out
|
||||
|
||||
SCRIPTS_GUI = test16.out
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ Scripts = test1.out test2.out test3.out test4.out test5.out test6.out
|
||||
test33.out test34.out test35.out test36.out test37.out
|
||||
test38.out test39.out test40.out test41.out test42.out
|
||||
test43.out test44.out test45.out test46.out test47.out
|
||||
test48.out test49.out
|
||||
test48.out test49.out test74.out
|
||||
|
||||
ScriptsGUI = test16.out
|
||||
|
||||
|
||||
@@ -53,15 +53,19 @@ b321b
|
||||
t02: numeric
|
||||
abc
|
||||
ab
|
||||
a
|
||||
a321
|
||||
a123
|
||||
a122
|
||||
a
|
||||
x-22
|
||||
b321
|
||||
b123
|
||||
|
||||
c123d
|
||||
-24
|
||||
123b
|
||||
c321d
|
||||
0
|
||||
b322b
|
||||
b321
|
||||
b321b
|
||||
|
||||
@@ -21,6 +21,10 @@ ab
|
||||
a
|
||||
|
||||
|
||||
|
||||
-24
|
||||
x-22
|
||||
0
|
||||
a122
|
||||
a123
|
||||
b123
|
||||
|
||||
@@ -50,6 +50,17 @@ a b
|
||||
#a b
|
||||
}
|
||||
|
||||
STARTTEST
|
||||
/^{/+2
|
||||
:set tw& fo=a
|
||||
I^^
|
||||
ENDTEST
|
||||
|
||||
{
|
||||
1aa
|
||||
2bb
|
||||
}
|
||||
|
||||
STARTTEST
|
||||
:g/^STARTTEST/.,/^ENDTEST/d
|
||||
:1;/^Results/,$wq! test.out
|
||||
|
||||
@@ -33,3 +33,6 @@ a b
|
||||
#a b
|
||||
}
|
||||
|
||||
|
||||
{ 1aa ^^2bb }
|
||||
|
||||
|
||||
36
src/testdir/test74.in
Normal file
36
src/testdir/test74.in
Normal file
@@ -0,0 +1,36 @@
|
||||
" Tests for storing global variables in the .viminfo file vim: set ft=vim:
|
||||
|
||||
STARTTEST
|
||||
:so small.vim
|
||||
:" Do all test in a separate window to avoid E211 when we recursively
|
||||
:" delete the Xfind directory during cleanup
|
||||
:"
|
||||
:" This will cause a few errors, do it silently.
|
||||
:set visualbell
|
||||
:set nocp viminfo+=!,nviminfo
|
||||
:let MY_GLOBAL_DICT={'foo': 1, 'bar': 0, 'longvarible': 1000}
|
||||
:" store a really long list, so line wrapping will occur in viminfo file
|
||||
:let MY_GLOBAL_LIST=range(1,100)
|
||||
:wv! Xviminfo
|
||||
:unlet MY_GLOBAL_DICT
|
||||
:unlet MY_GLOBAL_LIST
|
||||
:rv! Xviminfo
|
||||
:call delete('Xviminfo')
|
||||
:if exists("MY_GLOBAL_DICT")
|
||||
:redir >> test.out
|
||||
:echo MY_GLOBAL_DICT
|
||||
:redir end
|
||||
:endif
|
||||
:if exists("MY_GLOBAL_LIST")
|
||||
:redir >> test.out
|
||||
:echo MY_GLOBAL_LIST
|
||||
:redir end
|
||||
:endif
|
||||
:redir >> test.out
|
||||
:echo "foobar"
|
||||
:redir end
|
||||
:endif
|
||||
:qa!
|
||||
ENDTEST
|
||||
|
||||
eof
|
||||
5
src/testdir/test74.ok
Normal file
5
src/testdir/test74.ok
Normal file
@@ -0,0 +1,5 @@
|
||||
|
||||
{'foo': 1, 'longvarible': 1000, 'bar': 0}
|
||||
[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100]
|
||||
|
||||
foobar
|
||||
16
src/testdir/test75.in
Normal file
16
src/testdir/test75.in
Normal file
@@ -0,0 +1,16 @@
|
||||
" Tests for functions.
|
||||
|
||||
STARTTEST
|
||||
:so small.vim
|
||||
:" Test maparg() with a string result
|
||||
:map foo<C-V> is<F4>foo
|
||||
:vnoremap <script> <buffer> <expr> <silent> bar isbar
|
||||
:call append('$', maparg('foo<C-V>'))
|
||||
:call append('$', string(maparg('foo<C-V>', '', 0, 1)))
|
||||
:call append('$', string(maparg('bar', '', 0, 1)))
|
||||
:"
|
||||
:/^eof/+1,$w! test.out
|
||||
:qa!
|
||||
ENDTEST
|
||||
|
||||
eof
|
||||
3
src/testdir/test75.ok
Normal file
3
src/testdir/test75.ok
Normal file
@@ -0,0 +1,3 @@
|
||||
is<F4>foo
|
||||
{'silent': 0, 'noremap': 0, 'lhs': 'foo<C-V>', 'mode': ' ', 'expr': 0, 'sid': 0, 'rhs': 'is<F4>foo', 'buffer': 0}
|
||||
{'silent': 1, 'noremap': 1, 'lhs': 'bar', 'mode': 'v', 'expr': 1, 'sid': 0, 'rhs': 'isbar', 'buffer': 1}
|
||||
@@ -714,6 +714,38 @@ static char *(features[]) =
|
||||
|
||||
static int included_patches[] =
|
||||
{ /* Add new patch number below this line */
|
||||
/**/
|
||||
33,
|
||||
/**/
|
||||
32,
|
||||
/**/
|
||||
31,
|
||||
/**/
|
||||
30,
|
||||
/**/
|
||||
29,
|
||||
/**/
|
||||
28,
|
||||
/**/
|
||||
27,
|
||||
/**/
|
||||
26,
|
||||
/**/
|
||||
25,
|
||||
/**/
|
||||
24,
|
||||
/**/
|
||||
23,
|
||||
/**/
|
||||
22,
|
||||
/**/
|
||||
21,
|
||||
/**/
|
||||
20,
|
||||
/**/
|
||||
19,
|
||||
/**/
|
||||
18,
|
||||
/**/
|
||||
17,
|
||||
/**/
|
||||
|
||||
@@ -192,8 +192,8 @@
|
||||
#endif
|
||||
|
||||
#ifdef NO_X11_INCLUDES
|
||||
/* In os_mac_conv.c NO_X11_INCLUDES is defined to avoid X11 headers.
|
||||
* Disable all X11 related things to avoid conflicts. */
|
||||
/* In os_mac_conv.c and os_macosx.m NO_X11_INCLUDES is defined to avoid
|
||||
* X11 headers. Disable all X11 related things to avoid conflicts. */
|
||||
# ifdef FEAT_X11
|
||||
# undef FEAT_X11
|
||||
# endif
|
||||
@@ -1842,7 +1842,8 @@ typedef int proftime_T; /* dummy for function prototypes */
|
||||
#define VV_OP 52
|
||||
#define VV_SEARCHFORWARD 53
|
||||
#define VV_OLDFILES 54
|
||||
#define VV_LEN 55 /* number of v: vars */
|
||||
#define VV_WINDOWID 55
|
||||
#define VV_LEN 56 /* number of v: vars */
|
||||
|
||||
#ifdef FEAT_CLIPBOARD
|
||||
|
||||
|
||||
Reference in New Issue
Block a user