Merge branch 'vim'

This commit is contained in:
Bjorn Winckler
2012-04-15 20:36:16 +02:00
70 changed files with 2971 additions and 1867 deletions
+21
View File
@@ -1812,3 +1812,24 @@ e61c3b09ae86a8a448ad2d028df6fa6b9778666b v7-3-469
7f1bce9c9b79d4ebbf798d6122612934d55d70d9 v7-3-473
7613c9ab083f3e9262be5a21fe086921b757da4c v7-3-474
36160830a5e8d0e3b4174aa7d98363623468b77c v7-3-475
fb2c5a51dac7f1dbce6a0f35808927ac206c7f47 v7-3-476
62dc0d69ab11d5b5a67c6139a0dd3e2618d2c2a1 v7-3-477
754db405921292fc57dbdaa85e62af333dce5912 v7-3-478
3db4282d5e6bb74a5c1094f35a81472d5a98f313 v7-3-479
b35844f3eb49bb84101fdb276e3e69b0b8f7813f v7-3-480
8e21ac7f2d6e9f269b057939dda58d3a31beb894 v7-3-481
3229335d0c4e6cd7e91e6e61d791d7dff7d3082d v7-3-482
19040069b8bf1818db44396a150acb54f47c3a96 v7-3-483
00fa605e7d7ba7d522c627a93de6e2f5017d2884 v7-3-484
94374e0b6267d8983a73a22166888c2282ee793d v7-3-485
08a37c57af479b54fa327bedc0ef31c42dd96f63 v7-3-486
21219ffc97903684349f1fcc843eb61838877874 v7-3-487
8691bdcdbf66733c7ec1ef8161da1d4ef49dce66 v7-3-488
c1a6e1745cb521f863e63670e6c22c1c682ab4b1 v7-3-489
b067b8b81be9c2839df75824da2e88da24b07b54 v7-3-490
e070b34fe35e6e8c40ec31a08196dd81353db4e5 v7-3-491
214c7ec1c8f995664d5684da8cbeaaa86850468f v7-3-492
bf5960ec253293b7240f59a7682f2e862dacd205 v7-3-493
5240610f277823478983e3f04abfbed4e85141cf v7-3-494
27f6a22ff88eea07f24163fe470b7335f3c1b32b v7-3-495
3daba355b0c15ef66a9d2810ae7c7cc534dccf62 v7-3-496
+504 -290
View File
File diff suppressed because it is too large Load Diff
+6 -5
View File
@@ -1,9 +1,9 @@
" netrwFileHandlers: contains various extension-based file handlers for
" netrw's browsers' x command ("eXecute launcher")
" Author: Charles E. Campbell, Jr.
" Date: Sep 30, 2008
" Version: 10
" Copyright: Copyright (C) 1999-2008 Charles E. Campbell, Jr. {{{1
" Date: Mar 14, 2012
" Version: 11a
" Copyright: Copyright (C) 1999-2012 Charles E. Campbell, Jr. {{{1
" Permission is hereby granted to use and distribute this code,
" with or without modifications, provided that this copyright
" notice is copied with it. Like anything else that's free,
@@ -20,7 +20,7 @@
if exists("g:loaded_netrwFileHandlers") || &cp
finish
endif
let g:loaded_netrwFileHandlers= "v10"
let g:loaded_netrwFileHandlers= "v11a"
if v:version < 702
echohl WarningMsg
echo "***warning*** this version of netrwFileHandlers needs vim 7.2"
@@ -64,7 +64,7 @@ fun! netrwFileHandlers#Invoke(exten,fname)
" call Decho("let ret= netrwFileHandlers#NFH_".a:exten.'("'.fname.'")')
exe "let ret= s:NFH_".a:exten.'("'.fname.'")'
endif
" call Dret("netrwFileHandlers#Invoke 0 : ret=".ret)
return 0
endfun
@@ -356,6 +356,7 @@ fun! s:NFH_obj(obj)
endfun
let &cpo= s:keepcpo
unlet s:keepcpo
" ---------------------------------------------------------------------
" Modelines: {{{1
" vim: fdm=marker
+6 -4
View File
@@ -1,4 +1,4 @@
*editing.txt* For Vim version 7.3. Last change: 2011 Feb 26
*editing.txt* For Vim version 7.3. Last change: 2012 Apr 03
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -1159,8 +1159,10 @@ MULTIPLE WINDOWS AND BUFFERS *window-exit*
*:confirm* *:conf*
:conf[irm] {command} Execute {command}, and use a dialog when an
operation has to be confirmed. Can be used on the
":q", ":qa" and ":w" commands (the latter to over-ride
a read-only setting).
|:q|, |:qa| and |:w| commands (the latter to override
a read-only setting), and any other command that can
fail in such a way, such as |:only|, |:buffer|,
|:bdelete|, etc.
Examples: >
:confirm w foo
@@ -1639,6 +1641,6 @@ There are three different types of searching:
Note that completion for ":find", ":sfind", and ":tabfind" commands do not
currently work with 'path' items that contain a url or use the double star
(/usr/**2) or upward search (;) notations. >
with depth limiter (/usr/**2) or upward search (;) notations.
vim:tw=78:ts=8:ft=help:norl:
+11 -9
View File
@@ -1,4 +1,4 @@
*eval.txt* For Vim version 7.3. Last change: 2012 Mar 07
*eval.txt* For Vim version 7.3. Last change: 2012 Apr 13
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -3229,7 +3229,8 @@ getcmdpos() *getcmdpos()*
Return the position of the cursor in the command line as a
byte count. The first column is 1.
Only works when editing the command line, thus requires use of
|c_CTRL-\_e| or |c_CTRL-R_=|. Returns 0 otherwise.
|c_CTRL-\_e| or |c_CTRL-R_=| or an expression mapping.
Returns 0 otherwise.
Also see |getcmdtype()|, |setcmdpos()| and |getcmdline()|.
getcmdtype() *getcmdtype()*
@@ -3242,8 +3243,8 @@ getcmdtype() *getcmdtype()*
@ |input()| command
- |:insert| or |:append| command
Only works when editing the command line, thus requires use of
|c_CTRL-\_e| or |c_CTRL-R_=|. Returns an empty string
otherwise.
|c_CTRL-\_e| or |c_CTRL-R_=| or an expression mapping.
Returns an empty string otherwise.
Also see |getcmdpos()|, |setcmdpos()| and |getcmdline()|.
*getcwd()*
@@ -3473,7 +3474,8 @@ glob({expr} [, {nosuf} [, {list}]]) *glob()*
matches, they are separated by <NL> characters.
If the expansion fails, the result is an empty String or List.
A name for a non-existing file is not included.
A name for a non-existing file is not included. A symbolic
link is only included if it points to an existing file.
For most systems backticks can be used to get files names from
any external command. Example: >
@@ -5090,7 +5092,7 @@ setline({lnum}, {text}) *setline()*
will be set to the items in the list. Example: >
:call setline(5, ['aaa', 'bbb', 'ccc'])
< This is equivalent to: >
:for [n, l] in [[5, 6, 7], ['aaa', 'bbb', 'ccc']]
:for [n, l] in [[5, 'aaa'], [6, 'bbb'], [7, 'ccc']]
: call setline(n, l)
:endfor
< Note: The '[ and '] marks are not set.
@@ -5779,9 +5781,9 @@ tabpagebuflist([{arg}]) *tabpagebuflist()*
omitted the current tab page is used.
When {arg} is invalid the number zero is returned.
To get a list of all buffers in all tabs use this: >
tablist = []
let buflist = []
for i in range(tabpagenr('$'))
call extend(tablist, tabpagebuflist(i + 1))
call extend(buflist, tabpagebuflist(i + 1))
endfor
< Note that a buffer may appear in more than one window.
@@ -6003,7 +6005,7 @@ virtcol({expr}) *virtcol()*
would be of unlimited width. When there is a <Tab> at the
position, the returned Number will be the column at the end of
the <Tab>. For example, for a <Tab> in column 1, with 'ts'
set to 8, it returns 8.
set to 8, it returns 8. |conceal| is ignored.
For the byte position use |col()|.
For the use of {expr} see |col()|.
When 'virtualedit' is used {expr} can be [lnum, col, off], where
+123 -26
View File
@@ -1,4 +1,4 @@
*if_lua.txt* For Vim version 7.3. Last change: 2010 Jul 22
*if_lua.txt* For Vim version 7.3. Last change: 2012 Jan 16
VIM REFERENCE MANUAL by Luis Carvalho
@@ -8,8 +8,11 @@ The Lua Interface to Vim *lua* *Lua*
1. Commands |lua-commands|
2. The vim module |lua-vim|
3. Buffer userdata |lua-buffer|
4. Window userdata |lua-window|
3. List userdata |lua-list|
4. Dict userdata |lua-dict|
5. Buffer userdata |lua-buffer|
6. Window userdata |lua-window|
7. The luaeval function |lua-luaeval|
{Vi does not have any of these commands}
@@ -56,13 +59,14 @@ Example:
<
*:luado*
:[range]luado {body} Execute Lua function "function (line) {body} end" for
each line in the [range], with the function argument
being set to the text of each line in turn, without a
trailing <EOL>. If the value returned by the function
is a string it becomes the text of the line in the
current turn. The default for [range] is the whole
file: "1,$". {not in Vi}
:[range]luado {body} Execute Lua function "function (line, linenr) {body}
end" for each line in the [range], with the function
argument being set to the text of each line in turn,
without a trailing <EOL>, and the current line number.
If the value returned by the function is a string it
becomes the text of the line in the current turn. The
default for [range] is the whole file: "1,$".
{not in Vi}
Examples:
>
@@ -88,11 +92,9 @@ Examples:
All these commands execute a Lua chunk from either the command line (:lua and
:luado) or a file (:luafile) with the given line [range]. Similarly to the Lua
interpreter, each chunk has its own scope and so only global variables are
shared between command calls. Lua default libraries "table", "string", "math",
and "package" are available, "io" and "debug" are not, and "os" is restricted
to functions "date", "clock", "time", "difftime", and "getenv". In addition,
Lua "print" function has its output redirected to the Vim message area, with
arguments separated by a white space instead of a tab.
shared between command calls. All Lua default libraries are available. In
addition, Lua "print" function has its output redirected to the Vim message
area, with arguments separated by a white space instead of a tab.
Lua uses the "vim" module (see |lua-vim|) to issue commands to Vim
and manage buffers (|lua-buffer|) and windows (|lua-window|). However,
@@ -108,9 +110,9 @@ input range are stored in "vim.firstline" and "vim.lastline" respectively. The
module also includes routines for buffer, window, and current line queries,
Vim evaluation and command execution, and others.
vim.isbuffer(value) Returns 'true' (boolean, not string) if
"value" is a buffer userdata and 'false'
otherwise (see |lua-buffer|).
vim.list() Returns an empty list (see |List|).
vim.dict() Returns an empty dictionary (see |Dictionary|).
vim.buffer([arg]) If "arg" is a number, returns buffer with
number "arg" in the buffer list or, if "arg"
@@ -121,16 +123,21 @@ Vim evaluation and command execution, and others.
'true' returns the first buffer in the buffer
list or else the current buffer.
vim.iswindow(value) Returns 'true' (boolean, not string) if
"value" is a window userdata and
'false' otherwise (see |lua-window|).
vim.window([arg]) If "arg" is a number, returns window with
number "arg" or 'nil' (nil value, not string)
if not found. Otherwise, if "toboolean(arg)"
is 'true' returns the first window or else the
current window.
vim.type({arg}) Returns the type of {arg}. It is equivalent to
Lua's "type" function, but returns "list",
"dict", "buffer", or "window" if {arg} is a
list, dictionary, buffer, or window,
respectively. Examples: >
:lua l = vim.list()
:lua print(type(l), vim.type(l))
:" userdata list
<
vim.command({cmd}) Executes the vim (ex-mode) command {cmd}.
Examples: >
:lua vim.command"set tw=60"
@@ -141,7 +148,7 @@ Vim evaluation and command execution, and others.
Vim strings and numbers are directly converted
to Lua strings and numbers respectively. Vim
lists and dictionaries are converted to Lua
tables (lists become integer-keyed tables).
userdata (see |lua-list| and |lua-dict|).
Examples: >
:lua tw = vim.eval"&tw"
:lua print(vim.eval"{'a': 'one'}".a)
@@ -157,7 +164,72 @@ Vim evaluation and command execution, and others.
==============================================================================
3. Buffer userdata *lua-buffer*
3. List userdata *lua-list*
List userdata represent vim lists, and the interface tries to follow closely
Vim's syntax for lists. Since lists are objects, changes in list references in
Lua are reflected in Vim and vice-versa. A list "l" has the following
properties and methods:
Properties
----------
o "#l" is the number of items in list "l", equivalent to "len(l)"
in Vim.
o "l[k]" returns the k-th item in "l"; "l" is zero-indexed, as in Vim.
To modify the k-th item, simply do "l[k] = newitem"; in
particular, "l[k] = nil" removes the k-th item from "l".
o "l()" returns an iterator for "l".
Methods
-------
o "l:add(item)" appends "item" to the end of "l".
o "l:insert(item[, pos])" inserts "item" at (optional)
position "pos" in the list. The default value for "pos" is 0.
Examples:
>
:let l = [1, 'item']
:lua l = vim.eval('l') -- same 'l'
:lua l:add(vim.list())
:lua l[0] = math.pi
:echo l[0] " 3.141593
:lua l[0] = nil -- remove first item
:lua l:insert(true, 1)
:lua print(l, #l, l[0], l[1], l[-1])
:lua for item in l() do print(item) end
<
==============================================================================
4. Dict userdata *lua-dict*
Similarly to list userdata, dict userdata represent vim dictionaries; since
dictionaries are also objects, references are kept between Lua and Vim. A dict
"d" has the following properties:
Properties
----------
o "#d" is the number of items in dict "d", equivalent to "len(d)"
in Vim.
o "d.key" or "d['key']" returns the value at entry "key" in "d".
To modify the entry at this key, simply do "d.key = newvalue"; in
particular, "d.key = nil" removes the entry from "d".
o "d()" returns an iterator for "d" and is equivalent to "items(d)" in
Vim.
Examples:
>
:let d = {'n':10}
:lua d = vim.eval('d') -- same 'd'
:lua print(d, d.n, #d)
:let d.self = d
:lua for k, v in d() do print(d, k, v) end
:lua d.x = math.pi
:lua d.self = nil -- remove entry
:echo d
<
==============================================================================
5. Buffer userdata *lua-buffer*
Buffer userdata represent vim buffers. A buffer userdata "b" has the following
properties and methods:
@@ -209,7 +281,7 @@ Examples:
<
==============================================================================
4. Window userdata *lua-window*
6. Window userdata *lua-window*
Window objects represent vim windows. A window userdata "w" has the following
properties and methods:
@@ -241,4 +313,29 @@ Examples:
<
==============================================================================
vim:tw=78:ts=8:ft=help:norl:
7. The luaeval function *lua-luaeval*
The (dual) equivalent of "vim.eval" for passing Lua values to Vim is
"luaeval". "luaeval" takes an expression string and an optional argument and
returns the result of the expression. It is semantically equivalent in Lua to:
>
local chunkheader = "local _A = select(1, ...) return "
function luaeval (expstr, arg)
local chunk = assert(loadstring(chunkheader .. expstr, "luaeval"))
return chunk(arg) -- return typval
end
<
Note that "_A" receives the argument to "luaeval". Examples: >
:echo luaeval('math.pi')
:lua a = vim.list():add('newlist')
:let a = luaeval('a')
:echo a[0] " 'newlist'
:function Rand(x,y) " random uniform between x and y
: return luaeval('(_A.y-_A.x)*math.random()+_A.x', {'x':a:x,'y':a:y})
: endfunction
:echo Rand(1,10)
==============================================================================
vim:tw=78:ts=8:noet:ft=help:norl:
+18 -2
View File
@@ -459,6 +459,22 @@ The examples below assume a 'shiftwidth' of 4.
argument); argument);
a_short_line(argument, a_short_line(argument,
argument); argument);
<
*cino-k*
kN When in unclosed parentheses which follow "if", "for" or
"while" and N is non-zero, overrides the behaviour defined by
"(N": causes the indent to be N characters relative to the outer
context (i.e. the line where "if", "for" or "while" is). Has
no effect on deeper levels of nesting. Affects flags like "wN"
only for the "if", "for" and "while" conditions. If 0, defaults
to behaviour defined by the "(N" flag. (default: 0).
cino=(0 cino=(0,ks >
if (condition1 if (condition1
&& condition2) && condition2)
action(); action();
function(argument1 function(argument1
&& argument2); && argument2);
<
*cino-m*
mN When N is non-zero, line up a line starting with a closing
@@ -530,14 +546,14 @@ The examples below assume a 'shiftwidth' of 4.
*cino-#*
#N When N is non-zero recognize shell/Perl comments, starting with
'#'. Default N is zero: don't recognizes '#' comments. Note
'#'. Default N is zero: don't recognize '#' comments. Note
that lines starting with # will still be seen as preprocessor
lines.
The defaults, spelled out in full, are:
cinoptions=>s,e0,n0,f0,{0,}0,^0,L-1,:s,=s,l0,b0,gs,hs,N0,ps,ts,is,+s,
c3,C0,/0,(2s,us,U0,w0,W0,m0,j0,J0,)20,*70,#0
c3,C0,/0,(2s,us,U0,w0,W0,k0,m0,j0,J0,)20,*70,#0
Vim puts a line in column 1 if:
- It starts with '#' (preprocessor directives), if 'cinkeys' contains '#'.
+7 -2
View File
@@ -1,4 +1,4 @@
*insert.txt* For Vim version 7.3. Last change: 2012 Jan 26
*insert.txt* For Vim version 7.3. Last change: 2012 Apr 05
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -398,7 +398,12 @@ An example for using CTRL-G u: >
This redefines the backspace key to start a new undo sequence. You can now
undo the effect of the backspace key, without changing what you typed before
that, with CTRL-O u.
that, with CTRL-O u. Another example: >
:inoremap <CR> <C-]><C-G>u<CR>
This breaks undo at each line break. It also expands abbreviations before
this.
Using CTRL-O splits undo: the text typed before and after it is undone
separately. If you want to avoid this (e.g., in a mapping) you might be able
+2 -2
View File
@@ -1,4 +1,4 @@
*map.txt* For Vim version 7.3. Last change: 2012 Feb 02
*map.txt* For Vim version 7.3. Last change: 2012 Apr 13
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -1188,7 +1188,7 @@ reported if any are supplied). However, it is possible to specify that the
command can take arguments, using the -nargs attribute. Valid cases are:
-nargs=0 No arguments are allowed (the default)
-nargs=1 Exactly one argument is require, it includes spaces
-nargs=1 Exactly one argument is required, it includes spaces
-nargs=* Any number of arguments are allowed (0, 1, or many),
separated by white space
-nargs=? 0 or 1 arguments are allowed
+13 -6
View File
@@ -1,4 +1,4 @@
*options.txt* For Vim version 7.3. Last change: 2012 Feb 22
*options.txt* For Vim version 7.3. Last change: 2012 Mar 28
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -3873,9 +3873,10 @@ A jump table for the options with a short description can be found at |Q_op|.
'highlight' 'hl' string (default (as a single string):
"8:SpecialKey,@:NonText,d:Directory,
e:ErrorMsg,i:IncSearch,l:Search,m:MoreMsg,
M:ModeMsg,n:LineNr,r:Question,
s:StatusLine,S:StatusLineNC,c:VertSplit,
t:Title,v:Visual,w:WarningMsg,W:WildMenu,
M:ModeMsg,n:LineNr,N:CursorLineNr,
r:Question,s:StatusLine,S:StatusLineNC,
c:VertSplit, t:Title,v:Visual,
w:WarningMsg,W:WildMenu,
f:Folded,F:FoldColumn,A:DiffAdd,
C:DiffChange,D:DiffDelete,T:DiffText,
>:SignColumn,B:SpellBad,P:SpellCap,
@@ -3901,6 +3902,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|hl-ModeMsg| M Mode (e.g., "-- INSERT --")
|hl-LineNr| n line number for ":number" and ":#" commands, and
when 'number' or 'relativenumber' option is set.
|hl-CursorLineNr| N like n for when 'cursorline' is set.
|hl-Question| r |hit-enter| prompt and yes/no questions
|hl-StatusLine| s status line of current window |status-line|
|hl-StatusLineNC| S status lines of not-current windows
@@ -5193,7 +5195,8 @@ A jump table for the options with a short description can be found at |Q_op|.
number.
When a long, wrapped line doesn't start with the first character, '-'
characters are put before the number.
See |hl-LineNr| for the highlighting used for the number.
See |hl-LineNr| and |hl-CursorLineNr| for the highlighting used for
the number.
When setting this option, 'relativenumber' is reset.
*'numberwidth'* *'nuw'*
@@ -5592,7 +5595,8 @@ A jump table for the options with a short description can be found at |Q_op|.
number.
When a long, wrapped line doesn't start with the first character, '-'
characters are put before the number.
See |hl-LineNr| for the highlighting used for the number.
See |hl-LineNr| and |hl-CursorLineNr| for the highlighting used for
the number.
When setting this option, 'number' is reset.
*'remap'* *'noremap'*
@@ -6678,6 +6682,9 @@ A jump table for the options with a short description can be found at |Q_op|.
evaluated and the result is used as the option value. Example: >
:set statusline=%!MyStatusLine()
< The result can contain %{} items that will be evaluated too.
Note that the "%!" expression is evaluated in the context of the
current window and buffer, while %{} items are evaluated in the
context of the window that the statusline belongs to.
When there is error while evaluating the option then it will be made
empty to avoid further errors. Otherwise screen updating would loop.
+146 -915
View File
File diff suppressed because it is too large Load Diff
+4 -4
View File
@@ -1,4 +1,4 @@
*repeat.txt* For Vim version 7.3. Last change: 2011 Jan 06
*repeat.txt* For Vim version 7.3. Last change: 2012 Mar 23
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -109,7 +109,7 @@ q Stops recording. (Implementation note: The 'q' that
it was the result of a mapping) {Vi: no recording}
*@*
@{0-9a-z".=*} Execute the contents of register {0-9a-z".=*} [count]
@{0-9a-z".=*+} Execute the contents of register {0-9a-z".=*+} [count]
times. Note that register '%' (name of the current
file) and '#' (name of the alternate file) cannot be
used.
@@ -123,8 +123,8 @@ q Stops recording. (Implementation note: The 'q' that
*@@* *E748*
@@ Repeat the previous @{0-9a-z":*} [count] times.
:[addr]*{0-9a-z".=} *:@* *:star*
:[addr]@{0-9a-z".=*} Execute the contents of register {0-9a-z".=*} as an Ex
:[addr]*{0-9a-z".=+} *:@* *:star*
:[addr]@{0-9a-z".=*+} Execute the contents of register {0-9a-z".=*+} as an Ex
command. First set cursor at line [addr] (default is
current line). When the last line in the register does
not have a <CR> it will be added automatically when
+3 -2
View File
@@ -1,4 +1,4 @@
*starting.txt* For Vim version 7.3. Last change: 2011 Jul 22
*starting.txt* For Vim version 7.3. Last change: 2012 Mar 16
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -248,7 +248,8 @@ a slash. Thus "-R" means recovery and "-/R" readonly.
{not in Vi}
*-g*
-g Start Vim in GUI mode. See |gui|. {not in Vi}
-g Start Vim in GUI mode. See |gui|. For the opposite see |-v|.
{not in Vi}
*-v*
-v Start Ex in Vi mode. Only makes a difference when the
+19 -3
View File
@@ -1,4 +1,4 @@
*syntax.txt* For Vim version 7.3. Last change: 2012 Feb 11
*syntax.txt* For Vim version 7.3. Last change: 2012 Apr 06
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -199,7 +199,8 @@ REPLACING AN EXISTING SYNTAX FILE *mysyntaxfile-replace*
If you don't like a distributed syntax file, or you have downloaded a new
version, follow the same steps as for |mysyntaxfile| above. Just make sure
that you write the syntax file in a directory that is early in 'runtimepath'.
Vim will only load the first syntax file found.
Vim will only load the first syntax file found, assuming that it sets
b:current_syntax.
NAMING CONVENTIONS *group-name* *{group-name}* *E669* *W18*
@@ -754,7 +755,8 @@ c_no_ansi don't do standard ANSI types and constants
c_ansi_typedefs ... but do standard ANSI types
c_ansi_constants ... but do standard ANSI constants
c_no_utf don't highlight \u and \U in strings
c_syntax_for_h use C syntax for *.h files, instead of C++
c_syntax_for_h for *.h files use C syntax instead of C++ and use objc
syntax instead of objcpp
c_no_if0 don't highlight "#if 0" blocks as comments
c_no_cformat don't highlight %-formats in strings
c_no_c99 don't highlight C99 standard items
@@ -2834,6 +2836,18 @@ following sets of characters: >
By leaving one or more of these out, the associated conceal-character
substitution will not be made.
*g:tex_isk*
Tex: Controlling What's In A Keyword~
(La)Tex keywords normally use the characters 0-9,a-z,A-Z,192-255 only
but the "_" is the only one that causes problems. So, by default,
syntax/tex.vim overrides the usual |'iskeyword'| setting (using |:setlocal|)
with one that works for LaTeX.
However, one may override this iskeyword re-setting by setting the
variable, g:tex_isk, in one's .vimrc to whatever one wishes and
it will be used instead.
TF *tf.vim* *ft-tf-syntax*
@@ -4421,6 +4435,8 @@ IncSearch 'incsearch' highlighting; also used for the text replaced with
*hl-LineNr*
LineNr Line number for ":number" and ":#" commands, and when 'number'
or 'relativenumber' option is set.
*hl-CursorLineNr*
CursorLineNr Like LineNr when 'cursorline' is set for the cursor line.
*hl-MatchParen*
MatchParen The character under the cursor or just before it, if it
is a paired bracket, and its match. |pi_paren.txt|
+13 -5
View File
@@ -3677,9 +3677,6 @@ E287 mbyte.txt /*E287*
E288 mbyte.txt /*E288*
E289 mbyte.txt /*E289*
E29 change.txt /*E29*
E290 mbyte.txt /*E290*
E291 mbyte.txt /*E291*
E292 mbyte.txt /*E292*
E293 message.txt /*E293*
E294 message.txt /*E294*
E295 message.txt /*E295*
@@ -5045,6 +5042,7 @@ cino-g indent.txt /*cino-g*
cino-h indent.txt /*cino-h*
cino-i indent.txt /*cino-i*
cino-j indent.txt /*cino-j*
cino-k indent.txt /*cino-k*
cino-l indent.txt /*cino-l*
cino-m indent.txt /*cino-m*
cino-n indent.txt /*cino-n*
@@ -5883,6 +5881,7 @@ g:netrw_cygwin pi_netrw.txt /*g:netrw_cygwin*
g:netrw_dav_cmd pi_netrw.txt /*g:netrw_dav_cmd*
g:netrw_decompress pi_netrw.txt /*g:netrw_decompress*
g:netrw_dirhistmax pi_netrw.txt /*g:netrw_dirhistmax*
g:netrw_errorlvl pi_netrw.txt /*g:netrw_errorlvl*
g:netrw_fastbrowse pi_netrw.txt /*g:netrw_fastbrowse*
g:netrw_fetch_cmd pi_netrw.txt /*g:netrw_fetch_cmd*
g:netrw_fname_escape pi_netrw.txt /*g:netrw_fname_escape*
@@ -5890,6 +5889,7 @@ g:netrw_ftp pi_netrw.txt /*g:netrw_ftp*
g:netrw_ftp_browse_reject pi_netrw.txt /*g:netrw_ftp_browse_reject*
g:netrw_ftp_cmd pi_netrw.txt /*g:netrw_ftp_cmd*
g:netrw_ftp_list_cmd pi_netrw.txt /*g:netrw_ftp_list_cmd*
g:netrw_ftp_options pi_netrw.txt /*g:netrw_ftp_options*
g:netrw_ftp_sizelist_cmd pi_netrw.txt /*g:netrw_ftp_sizelist_cmd*
g:netrw_ftp_timelist_cmd pi_netrw.txt /*g:netrw_ftp_timelist_cmd*
g:netrw_ftpextracmd pi_netrw.txt /*g:netrw_ftpextracmd*
@@ -5904,10 +5904,10 @@ g:netrw_keepdir pi_netrw.txt /*g:netrw_keepdir*
g:netrw_list_cmd pi_netrw.txt /*g:netrw_list_cmd*
g:netrw_list_hide pi_netrw.txt /*g:netrw_list_hide*
g:netrw_liststyle pi_netrw.txt /*g:netrw_liststyle*
g:netrw_local_mkdir pi_netrw.txt /*g:netrw_local_mkdir*
g:netrw_local_rmdir pi_netrw.txt /*g:netrw_local_rmdir*
g:netrw_localcopycmd pi_netrw.txt /*g:netrw_localcopycmd*
g:netrw_localmkdir pi_netrw.txt /*g:netrw_localmkdir*
g:netrw_localmovecmd pi_netrw.txt /*g:netrw_localmovecmd*
g:netrw_localrmdir pi_netrw.txt /*g:netrw_localrmdir*
g:netrw_maxfilenamelen pi_netrw.txt /*g:netrw_maxfilenamelen*
g:netrw_menu pi_netrw.txt /*g:netrw_menu*
g:netrw_mkdir_cmd pi_netrw.txt /*g:netrw_mkdir_cmd*
@@ -5956,6 +5956,7 @@ g:tar_readoptions pi_tar.txt /*g:tar_readoptions*
g:tar_secure pi_tar.txt /*g:tar_secure*
g:tar_writeoptions pi_tar.txt /*g:tar_writeoptions*
g:tex_conceal syntax.txt /*g:tex_conceal*
g:tex_isk syntax.txt /*g:tex_isk*
g:var eval.txt /*g:var*
g:vimball_home pi_vimball.txt /*g:vimball_home*
g:vimball_mkdir pi_vimball.txt /*g:vimball_mkdir*
@@ -6239,6 +6240,7 @@ hl-Cursor syntax.txt /*hl-Cursor*
hl-CursorColumn syntax.txt /*hl-CursorColumn*
hl-CursorIM syntax.txt /*hl-CursorIM*
hl-CursorLine syntax.txt /*hl-CursorLine*
hl-CursorLineNr syntax.txt /*hl-CursorLineNr*
hl-DiffAdd syntax.txt /*hl-DiffAdd*
hl-DiffChange syntax.txt /*hl-DiffChange*
hl-DiffDelete syntax.txt /*hl-DiffDelete*
@@ -6615,6 +6617,9 @@ lpc.vim syntax.txt /*lpc.vim*
lua if_lua.txt /*lua*
lua-buffer if_lua.txt /*lua-buffer*
lua-commands if_lua.txt /*lua-commands*
lua-dict if_lua.txt /*lua-dict*
lua-list if_lua.txt /*lua-list*
lua-luaeval if_lua.txt /*lua-luaeval*
lua-vim if_lua.txt /*lua-vim*
lua-window if_lua.txt /*lua-window*
lua.vim syntax.txt /*lua.vim*
@@ -7025,8 +7030,11 @@ netrw-updir pi_netrw.txt /*netrw-updir*
netrw-urls pi_netrw.txt /*netrw-urls*
netrw-userpass pi_netrw.txt /*netrw-userpass*
netrw-v pi_netrw.txt /*netrw-v*
netrw-var pi_netrw.txt /*netrw-var*
netrw-variables pi_netrw.txt /*netrw-variables*
netrw-vexplore pi_netrw.txt /*netrw-vexplore*
netrw-windows-netrc pi_netrw.txt /*netrw-windows-netrc*
netrw-windows-s pi_netrw.txt /*netrw-windows-s*
netrw-write pi_netrw.txt /*netrw-write*
netrw-x pi_netrw.txt /*netrw-x*
netrw-xfer pi_netrw.txt /*netrw-xfer*
+21 -26
View File
@@ -1,4 +1,4 @@
*todo.txt* For Vim version 7.3. Last change: 2012 Mar 07
*todo.txt* For Vim version 7.3. Last change: 2012 Apr 13
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -34,6 +34,8 @@ not be repeated below, unless there is extra information.
*known-bugs*
-------------------- Known bugs and current work -----------------------
Go through list of maintainers that didn't respond. (Thilo Six, Mar 19)
Go through more coverity reports.
Discussion about canonicalization of Hebrew. (Ron Aaron, 2011 April 10)
@@ -41,6 +43,8 @@ Discussion about canonicalization of Hebrew. (Ron Aaron, 2011 April 10)
Stack trace of crash: http://vpaste.net/GBt9S
(Alexandre Provencio)
":help!" gives error, should use current language. (thinkca, 2012 Apr 1)
Once syntax and other runtime files have been fixed: add "set cp" to
check.vim. Use a function to run both with 'cp' and 'nocp'.
@@ -63,11 +67,8 @@ Win32: When the taskbar is at the top of the screen creating the tabbar causes
the window to move unnecessarily. (William E. Skeith III, 2012 Jan 12)
Patch: 2012 Jan 13 Needs more work (2012 Feb 2)
Patch to highlight cursor line number. (Howard Buchholz (lhb), 2011 Oct 18)
URXVT:
- will get stuck if byte sequence does not containe expected semicolon.
- Patch for urxvt mouse support after shell command. (Issue 31)
- Use urxvt mouse support also in xterm. Explanations:
http://www.midnight-commander.org/ticket/2662
@@ -79,28 +80,6 @@ When exiting with unsaved changes, selecting an existing file in the file
dialog, there is no dialog to ask whether the existing file should be
overwritten. (Felipe G. Nievinski, 2011 Dec 22)
Patch for improved ":qa" behavior. (Hirohito Higashi, 2012 Feb 18)
Recognize objcpp. (Austin Ziegler, 2012 Feb 15)
7 Setting an option always sets "w_set_curswant", while this is only
required for a few options. Only do it for those options to avoid the
side effect.
Patch by Kana Natsuno, 2011 Nov 12.
Using Ctrl-] in a mapping does not expand abbreviations. Patch by Christian
Brabandt, 2012 Mar 2.
Patch to fix member confusion in Lua interface. (Taro Muraoka, 2012 Jan 8)
Update Jan 9.
Carvalho merged the patch: New version 2012 Jan 19.
Patch for option in 'cino' to specify more indent for continued conditions.
(Lech Lorens, 2011 Nov 27)
Isn't this already possible? Update 2012 Feb 15.
Patch for using objcpp file type for headers files. Issue 44.
Docs fix for v:register. (Ingo Karkat, 2011 Sep 26, 27)
v:register doesn't work exactly as expected. (David Fishburn, 2011 Sep 20)
@@ -123,6 +102,9 @@ Matsumoto, 2012 Jan 30)
Patch to add completion for :history command. (Dominique Pelle, 2012 Feb 26)
Patch for 'backupcopy' default behavior for symlinks on Windows. (David Pope,
2012 Mar 21, update Mar 31)
Use a count before "v" and "V" to select that many characters or lines?
(Kikyous)
@@ -148,6 +130,8 @@ Patch to pass list to or(), and() and xor(). (Yasuhiro Matsumoto, 2012 Feb 8)
Patch to improve "it" and "at" text object matching. (Christian Brabandt, 2011
Nov 20)
Patch to add ":py3do". (Lilydjwg, 2012 Apr 7)
`[ moves to character after insert, instead of the last inserted character.
(Yukihiro Nakadaira, 2011 Dec 9)
@@ -175,6 +159,12 @@ Needs more work. Pinged 2012 Jan 4.
Patch 7.3.116 was the wrong solution.
Christian Brabandt has another incomplete patch. (2011 Jul 13)
'cursorline' is drawn incorrectly in diff mode. Patch by Christian Brabandt,
2012 Apr 2.
'cursorline' works on a text line only. Add 'cursorscreenline' for
highlighting the screen line. (Christian Brabandt, 2012 Mar 31)
With concealed text mouse click doesn't put the cursor in the right position.
(Herb Sitz) Fix by Christian Brabandt, 2011 Jun 16. Doesn't work properly,
need to make the change in where RET_WIN_BUF_CHARTABSIZE() is called.
@@ -195,6 +185,9 @@ Sep 17) Asked for feedback from others.
Win32: Cannot cd into a directory that starts with a space. (Andy Wokula, 2012
Jan 19)
Win32: default for 'backupcopy' is wrong for a symbolic link. (mklink one
two). (Benjamin Fritz, 2012 Mar 15)
Need to escape $HOME on Windows? (ZyX, 2011 Jul 21)
"2" in 'formatopions' not working in comments. (Christian Corneliussen, 2011
@@ -511,6 +504,8 @@ path.
Test 51 fails when language set to German. (Marco, 2011 Jan 9)
Dominique can't reproduc it.
'ambiwidth' should be global-local.
":function f(x) keepjumps" creates a function where every command is executed
like it has ":keepjumps" before it.
+3 -1
View File
@@ -1,4 +1,4 @@
*usr_41.txt* For Vim version 7.3. Last change: 2011 Dec 15
*usr_41.txt* For Vim version 7.3. Last change: 2012 Mar 16
VIM USER MANUAL - by Bram Moolenaar
@@ -1710,6 +1710,7 @@ make the script work for most people. It is done like this: >
12 set cpo&vim
..
42 let &cpo = s:save_cpo
43 unlet s:save_cpo
We first store the old value of 'cpoptions' in the s:save_cpo variable. At
the end of the plugin this value is restored.
@@ -1956,6 +1957,7 @@ Here is the resulting complete example: >
40 endif
41
42 let &cpo = s:save_cpo
43 unlet s:save_cpo
Line 33 wasn't explained yet. It applies the new correction to the word under
the cursor. The |:normal| command is used to use the new abbreviation. Note
+5 -3
View File
@@ -1,4 +1,4 @@
*windows.txt* For Vim version 7.3. Last change: 2011 Aug 14
*windows.txt* For Vim version 7.3. Last change: 2012 Apr 13
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -174,7 +174,8 @@ CTRL-W CTRL_N *CTRL-W_CTRL-N*
2. WinEnter for the new window
3. BufLeave for the current buffer
4. BufEnter for the new buffer
This behaves like a ":split" first, and then a ":e" command.
This behaves like a ":split" first, and then an ":enew"
command.
:[N]vne[w] [++opt] [+cmd] [file] *:vne* *:vnew*
Like |:new|, but split vertically. If 'equalalways' is set
@@ -183,7 +184,8 @@ CTRL-W CTRL_N *CTRL-W_CTRL-N*
:[N]new [++opt] [+cmd] {file}
:[N]sp[lit] [++opt] [+cmd] {file} *:split_f*
Create a new window and start editing file {file} in it.
Create a new window and start editing file {file} in it. This
behaves like a ":split" first, and then an ":e" command.
If [+cmd] is given, execute the command when the file has been
loaded |+cmd|.
Also see |++opt|.
+16 -7
View File
@@ -1,7 +1,7 @@
" Vim support file to detect file types
"
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2012 Feb 24
" Last Change: 2012 Apr 13
" Listen very carefully, I will say this only once
if exists("did_load_filetypes")
@@ -17,7 +17,7 @@ augroup filetypedetect
" Ignored extensions
if exists("*fnameescape")
au BufNewFile,BufRead ?\+.orig,?\+.bak,?\+.old,?\+.new,?\+.dpkg-dist,?\+.dpkg-old,?\+.rpmsave,?\+.rpmnew
au BufNewFile,BufRead ?\+.orig,?\+.bak,?\+.old,?\+.new,?\+.dpkg-dist,?\+.dpkg-old,?\+.dpkg-new,?\+.dpkg-bak,?\+.rpmsave,?\+.rpmnew
\ exe "doau filetypedetect BufRead " . fnameescape(expand("<afile>:r"))
au BufNewFile,BufRead *~
\ let s:name = expand("<afile>") |
@@ -239,8 +239,8 @@ func! s:FTVB(alt)
endif
endfunc
" Visual Basic Script (close to Visual Basic)
au BufNewFile,BufRead *.vbs,*.dsm,*.ctl setf vb
" Visual Basic Script (close to Visual Basic) or Visual Basic .NET
au BufNewFile,BufRead *.vb,*.vbs,*.dsm,*.ctl setf vb
" IBasic file (similar to QBasic)
au BufNewFile,BufRead *.iba,*.ibi setf ibasic
@@ -367,7 +367,11 @@ au BufNewFile,BufRead *.h call s:FTheader()
func! s:FTheader()
if match(getline(1, min([line("$"), 200])), '^@\(interface\|end\|class\)') > -1
setf objc
if exists("g:c_syntax_for_h")
setf objc
else
setf objcpp
endif
elseif exists("g:c_syntax_for_h")
setf c
elseif exists("g:ch_syntax_for_h")
@@ -731,9 +735,11 @@ au BufNewFile,BufRead *.mo,*.gdmo setf gdmo
au BufNewFile,BufRead *.ged,lltxxxxx.txt setf gedcom
" Git
au BufNewFile,BufRead *.git/COMMIT_EDITMSG setf gitcommit
au BufNewFile,BufRead *.git/COMMIT_EDITMSG setf gitcommit
au BufNewFile,BufRead *.git/config,.gitconfig,.gitmodules setf gitconfig
au BufNewFile,BufRead git-rebase-todo setf gitrebase
au BufNewFile,BufRead *.git/modules/**/COMMIT_EDITMSG setf gitcommit
au BufNewFile,BufRead *.git/modules/**/config setf gitconfig
au BufNewFile,BufRead git-rebase-todo setf gitrebase
au BufNewFile,BufRead .msg.[0-9]*
\ if getline(1) =~ '^From.*# This line is ignored.$' |
\ setf gitsendemail |
@@ -2138,6 +2144,9 @@ au BufNewFile,BufReadPost *.tssop setf tssop
" TSS - Command Line (temporary)
au BufNewFile,BufReadPost *.tsscl setf tsscl
" TWIG files
au BufNewFile,BufReadPost *.twig setf twig
" Motif UIT/UIL files
au BufNewFile,BufRead *.uit,*.uil setf uil
+5 -1
View File
@@ -1,7 +1,7 @@
" Vim filetype plugin file
" Language: Falcon
" Author: Steven Oliver <oliver.steven@gmail.com>
" Copyright: Copyright (c) 2009, 2010, 2011 Steven Oliver
" Copyright: Copyright (c) 2009, 2010, 2011, 2012 Steven Oliver
" License: You may redistribute this under the same terms as Vim itself
" --------------------------------------------------------------------------
" GetLatestVimScripts: 2762 1 :AutoInstall: falcon.vim
@@ -40,6 +40,10 @@ if has("gui_win32") && !exists("b:browsefilter")
\ "All Files (*.*)\t*.*\n"
endif
let b:undo_ftplugin = "setlocal tabstop< shiftwidth< expandtab< fileencoding<"
\ . " suffixesadd< comments<"
\ . "| unlet! b:browsefiler"
let &cpo = s:cpo_save
unlet s:cpo_save
+3 -2
View File
@@ -1,7 +1,6 @@
" Vim filetype plugin
" Language: generic git output
" Maintainer: Tim Pope <vimNOSPAM@tpope.org>
" Last Change: 2010 May 21
" Only do this when not done yet for this buffer
if (exists("b:did_ftplugin"))
@@ -10,7 +9,9 @@ endif
let b:did_ftplugin = 1
if !exists('b:git_dir')
if expand('%:p') =~# '\.git\>'
if expand('%:p') =~# '[\/]\.git[\/]modules[\/]'
" Stay out of the way
elseif expand('%:p') =~# '\.git\>'
let b:git_dir = matchstr(expand('%:p'),'.*\.git\>')
elseif $GIT_DIR != ''
let b:git_dir = $GIT_DIR
+8 -9
View File
@@ -1,7 +1,7 @@
" Vim filetype plugin
" Language: git commit file
" Maintainer: Tim Pope <vimNOSPAM@tpope.org>
" Last Change: 2010 May 21
" Last Change: 2012 April 7
" Only do this when not done yet for this buffer
if (exists("b:did_ftplugin"))
@@ -11,13 +11,14 @@ endif
runtime! ftplugin/git.vim
let b:did_ftplugin = 1
setlocal nomodeline
let b:undo_ftplugin = 'setl modeline<'
if &textwidth == 0
" make sure that log messages play nice with git-log on standard terminals
setlocal textwidth=72
if !exists("b:undo_ftplugin")
let b:undo_ftplugin = ""
endif
let b:undo_ftplugin = b:undo_ftplugin . "|setl tw<"
let b:undo_ftplugin .= "|setl tw<"
endif
if exists("g:no_gitcommit_commands") || v:version < 700
@@ -28,8 +29,6 @@ if !exists("b:git_dir")
let b:git_dir = expand("%:p:h")
endif
" Automatically diffing can be done with:
" autocmd FileType gitcommit DiffGitCached | wincmd p
command! -bang -bar -buffer -complete=custom,s:diffcomplete -nargs=* DiffGitCached :call s:gitdiffcached(<bang>0,b:git_dir,<f-args>)
function! s:diffcomplete(A,L,P)
@@ -58,11 +57,11 @@ function! s:gitdiffcached(bang,gitdir,...)
else
let extra = "-p --stat=".&columns
endif
call system(git." diff --cached --no-color ".extra." > ".(exists("*shellescape") ? shellescape(name) : name))
call system(git." diff --cached --no-color --no-ext-diff ".extra." > ".(exists("*shellescape") ? shellescape(name) : name))
exe "pedit ".(exists("*fnameescape") ? fnameescape(name) : name)
wincmd P
let b:git_dir = a:gitdir
command! -bang -bar -buffer -complete=custom,s:diffcomplete -nargs=* DiffGitCached :call s:gitdiffcached(<bang>0,b:git_dir,<f-args>)
nnoremap <silent> q :q<CR>
nnoremap <buffer> <silent> q :q<CR>
setlocal buftype=nowrite nobuflisted noswapfile nomodifiable filetype=git
endfunction
+9 -1
View File
@@ -1,7 +1,7 @@
" Vim filetype plugin file
" Language: Kimwitu++
" Maintainer: Michael Piefel <entwurf@piefel.de>
" Last Change: 10 December 2011
" Last Change: 10 March 2012
" Behaves almost like C++
runtime! ftplugin/cpp.vim ftplugin/cpp_*.vim ftplugin/cpp/*.vim
@@ -20,5 +20,13 @@ endif
" Set the errorformat for the Kimwitu++ compiler
set efm+=kc%.%#:\ error\ at\ %f:%l:\ %m
if exists("b:undo_ftplugin")
let b:undo_ftplugin = b:undo_ftplugin . " | setlocal efm<"
\ . "| unlet! b:browsefiler"
else
let b:undo_ftplugin = "setlocal efm<"
\ . "| unlet! b:browsefiler"
endif
let &cpo = s:cpo_save
unlet s:cpo_save
+5 -1
View File
@@ -1,7 +1,7 @@
" Vim filetype plugin
" Language: Vim
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2009 Jan 22
" Last Change: 2012 Mar 21
" Only do this when not done yet for this buffer
if exists("b:did_ftplugin")
@@ -21,6 +21,10 @@ let b:undo_ftplugin = "setl fo< isk< com< tw< commentstring<"
" and insert the comment leader when hitting <CR> or using "o".
setlocal fo-=t fo+=croql
" To make syntax highlighting of 'vimVar's work correctly we need the colon to
" be part of keywords. This needs to be done prior to the 'isk+=#' below.
setlocal isk+=:
" To allow tag lookup via CTRL-] for autoload functions, '#' must be a
" keyword character. E.g., for netrw#Nread().
setlocal isk+=#
+1
View File
@@ -322,3 +322,4 @@ function GetDTDIndent()
endfunction
let &cpo = s:cpo_save
unlet s:cpo_save
+3 -1
View File
@@ -1,7 +1,7 @@
" Vim indent file
" Language: git config file
" Maintainer: Tim Pope <vimNOSPAM@tpope.org>
" Last Change: 2010 May 21
" Last Change: 2012 April 7
if exists("b:did_indent")
finish
@@ -12,6 +12,8 @@ setlocal autoindent
setlocal indentexpr=GetGitconfigIndent()
setlocal indentkeys=o,O,*<Return>,0[,],0;,0#,=,!^F
let b:undo_indent = 'setl ai< inde< indk<'
" Only define the function once.
if exists("*GetGitconfigIndent")
finish
+98 -57
View File
@@ -1,33 +1,54 @@
" Vim indent file
" Language: LaTeX
" Maintainer: Zhou YiChao <broken.zhou@gmail.com>
" Maintainer: Zhou YiChao <broken.zhou AT gmail.com>
" Created: Sat, 16 Feb 2002 16:50:19 +0100
" Last Change: 2011 Dec 24
" Last Update: 25th Sep 2002, by LH :
" Last Change: 2012 Mar 18 19:19:50
" Version: 0.7
" Please email me if you found something we can do. Bug report and
" feature request is welcome.
" Last Update: {{{
" 25th Sep 2002, by LH :
" (*) better support for the option
" (*) use some regex instead of several '||'.
" Oct 9th, 2003, by JT:
" (*) don't change indentation of lines starting with '%'
" 2005/06/15, Moshe Kaminsky <kaminsky@math.huji.ac.il>
" 2005/06/15, Moshe Kaminsky <kaminsky AT math.huji.ac.il>
" (*) New variables:
" g:tex_items, g:tex_itemize_env, g:tex_noindent_env
" 2011/3/6, by Zhou YiChao <broken.zhou@gmail.com>
" 2011/3/6, by Zhou YiChao <broken.zhou AT gmail.com>
" (*) Don't change indentation of lines starting with '%'
" I don't see any code with '%' and it doesn't work properly
" so I add some code.
" (*) New features: Add smartindent-like indent for "{}" and "[]".
" (*) New variables: g:tex_indent_brace
" 2011/9/25, by Zhou Yichao <broken.zhou@gmail.com>
" 2011/9/25, by Zhou Yichao <broken.zhou AT gmail.com>
" (*) Bug fix: smartindent-like indent for "[]"
" (*) New features: Align with "&".
" (*) New variable: g:tex_indent_and
" 2011/10/23 by Zhou Yichao <broken.zhou@gmail.com>
" (*) New variable: g:tex_indent_and.
" 2011/10/23 by Zhou Yichao <broken.zhou AT gmail.com>
" (*) Bug fix: improve the smartindent-like indent for "{}" and
" "[]".
"
" Version: 0.62
" 2012/02/27 by Zhou Yichao <broken.zhou AT gmail.com>
" (*) Bug fix: support default folding marker.
" (*) Indent with "&" is not very handy. Make it not enable by
" default.
" 2012/03/06 by Zhou Yichao <broken.zhou AT gmail.com>
" (*) Modify "&" behavior and make it default again. Now "&"
" won't align when there are more then one "&" in the previous
" line.
" (*) Add indent "\left(" and "\right)"
" (*) Trust user when in "verbatim" and "lstlisting"
" 2012/03/11 by Zhou Yichao <broken.zhou AT gmail.com>
" (*) Modify "&" so that only indent when current line start with
" "&".
" 2012/03/12 by Zhou Yichao <broken.zhou AT gmail.com>
" (*) Modify indentkeys.
" 2012/03/18 by Zhou Yichao <broken.zhou AT gmail.com>
" (*) Add &cpo
" }}}
" Options: {{{
" Document: {{{
"
" To set the following options (ok, currently it's just one), add a line like
" let g:tex_indent_items = 1
@@ -37,42 +58,42 @@
"
" If this variable is unset or non-zero, it will use smartindent-like style
" for "{}" and "[]"
"
"
" * g:tex_indent_items
"
" If this variable is set, item-environments are indented like Emacs does
" it, i.e., continuation lines are indented with a shiftwidth.
"
"
" NOTE: I've already set the variable below; delete the corresponding line
" if you don't like this behaviour.
"
" Per default, it is unset.
"
"
" set unset
" ----------------------------------------------------------------
" \begin{itemize} \begin{itemize}
" \begin{itemize} \begin{itemize}
" \item blablabla \item blablabla
" bla bla bla bla bla bla
" bla bla bla bla bla bla
" \item blablabla \item blablabla
" bla bla bla bla bla bla
" \end{itemize} \end{itemize}
" bla bla bla bla bla bla
" \end{itemize} \end{itemize}
"
"
" * g:tex_items
"
" A list of tokens to be considered as commands for the beginning of an item
" command. The tokens should be separated with '\|'. The initial '\' should
" A list of tokens to be considered as commands for the beginning of an item
" command. The tokens should be separated with '\|'. The initial '\' should
" be escaped. The default is '\\bibitem\|\\item'.
"
" * g:tex_itemize_env
"
" A list of environment names, separated with '\|', where the items (item
" commands matching g:tex_items) may appear. The default is
"
" A list of environment names, separated with '\|', where the items (item
" commands matching g:tex_items) may appear. The default is
" 'itemize\|description\|enumerate\|thebibliography'.
"
" * g:tex_noindent_env
"
" A list of environment names. separated with '\|', where no indentation is
" A list of environment names. separated with '\|', where no indentation is
" required. The default is 'document\|verbatim'.
"
" * g:tex_indent_and
@@ -82,14 +103,24 @@
" Note that this feature need to search back some line, so vim may become
" a little slow.
"
" }}}
" }}}
" Only define the function once
if exists("*GetTeXIndent")
finish
endif
if exists("b:did_indent")
finish
endif
let s:cpo_save = &cpo
set cpo&vim
" Define global variable {{{
let b:did_indent = 1
" Delete the next line to avoid the special indention of items
if !exists("g:tex_indent_items")
let g:tex_indent_items = 1
endif
@@ -104,31 +135,30 @@ if g:tex_indent_items
let g:tex_itemize_env = 'itemize\|description\|enumerate\|thebibliography'
endif
if !exists('g:tex_items')
let g:tex_items = '\\bibitem\|\\item'
let g:tex_items = '\\bibitem\|\\item'
endif
else
let g:tex_items = ''
endif
if !exists("g:tex_noindent_env")
let g:tex_noindent_env = 'document\|verbatim\|lstlisting'
if !exists("g:tex_indent_paretheses")
let g:tex_indent_paretheses = 1
endif
if !exists("g:tex_noindent_env")
let g:tex_noindent_env = 'document\|verbatim\|lstlisting'
endif "}}}
" VIM Setting " {{{
setlocal autoindent
setlocal nosmartindent
setlocal indentexpr=GetTeXIndent()
exec 'setlocal indentkeys+=},],\&' . substitute(g:tex_items, '^\|\(\\|\)', ',=', 'g')
let g:tex_items = '^\s*' . g:tex_items
setlocal indentkeys&
exec 'setlocal indentkeys+=[,(,{,),},],\&' . substitute(g:tex_items, '^\|\(\\|\)', ',=', 'g')
let g:tex_items = '^\s*' . substitute(g:tex_items, '^\(\^\\s\*\)*', '', '')
" }}}
" Only define the function once
if exists("*GetTeXIndent") | finish
endif
let s:cpo_save = &cpo
set cpo&vim
function GetTeXIndent()
function GetTeXIndent() " {{{
" Find a non-blank line above the current line.
let lnum = prevnonblank(v:lnum - 1)
@@ -139,16 +169,25 @@ function GetTeXIndent()
" At the start of the file use zero indent.
if lnum == 0
return 0
return 0
endif
let line = getline(lnum) " last line
let cline = getline(v:lnum) " current line
let line = substitute(getline(lnum), '%.*', ' ','g') " last line
let cline = substitute(getline(v:lnum), '%.*', ' ', 'g') " current line
" We are in verbatim, so do what our user what.
if synIDattr(synID(v:lnum, indent(v:lnum), 1), "name") == "texZone"
if empty(cline)
return indent(lnum)
else
return indent(v:lnum)
end
endif
" You want to align with "&"
if g:tex_indent_and
" Align with last line if last line has a "&"
if stridx(cline, "&") != -1 && stridx(line, "&") != -1
" Align only when current line start with "&"
if line =~ '&.*\\\\' && cline =~ '^\s*&'
return indent(v:lnum) + stridx(line, "&") - stridx(cline, "&")
endif
@@ -161,7 +200,7 @@ function GetTeXIndent()
if lnum == 0
return 0
return 0
endif
let ind = indent(lnum)
@@ -173,12 +212,10 @@ function GetTeXIndent()
" Add a 'shiftwidth' after beginning of environments.
" Don't add it for \begin{document} and \begin{verbatim}
""if line =~ '^\s*\\begin{\(.*\)}' && line !~ 'verbatim'
""if line =~ '^\s*\\begin{\(.*\)}' && line !~ 'verbatim'
" LH modification : \begin does not always start a line
" ZYC modification : \end after \begin won't cause wrong indent anymore
if line =~ '\\begin{.*}' && line !~ g:tex_noindent_env
\ && line !~ '\\begin{.\{-}}.*\\end{.*}'
let ind = ind + &sw
if g:tex_indent_items
@@ -189,9 +226,8 @@ function GetTeXIndent()
endif
endif
" Subtract a 'shiftwidth' when an environment ends
if cline =~ '^\s*\\end' && cline !~ g:tex_noindent_env
if cline =~ '\\end{.*}' && cline !~ g:tex_noindent_env
if g:tex_indent_items
" Remove another sw for item-environments
@@ -204,23 +240,26 @@ function GetTeXIndent()
endif
if g:tex_indent_brace
" Add a 'shiftwidth' after a "{" or "[".
let sum1 = 0
for i in range(0, strlen(line)-1)
if line[i] == "}" || line[i] == "]"
if line[i] == "}" || line[i] == "]" ||
\ strpart(line, i, 7) == '\right)'
let sum1 = max([0, sum1-1])
endif
if line[i] == "{" || line[i] == "["
if line[i] == "{" || line[i] == "[" ||
\ strpart(line, i, 6) == '\left('
let sum1 += 1
endif
endfor
let sum2 = 0
for i in reverse(range(0, strlen(cline)-1))
if cline[i] == "{" || cline[i] == "["
if cline[i] == "{" || cline[i] == "[" ||
\ strpart(cline, i, 6) == '\left('
let sum2 = max([0, sum2-1])
endif
if cline[i] == "}" || cline[i] == "]"
if cline[i] == "}" || cline[i] == "]" ||
\ strpart(cline, i, 7) == '\right)'
let sum2 += 1
endif
endfor
@@ -228,6 +267,8 @@ function GetTeXIndent()
let ind += (sum1 - sum2) * &sw
endif
if g:tex_indent_paretheses
endif
" Special treatment for 'item'
" ----------------------------
@@ -247,7 +288,7 @@ function GetTeXIndent()
endif
return ind
endfunction
endfunction "}}}
let &cpo = s:cpo_save
unlet s:cpo_save
+1
View File
@@ -808,5 +808,6 @@ fun! s:ParseSkip(str)
endfun
let &cpo = s:save_cpo
unlet s:save_cpo
" vim:sts=2:sw=2:
+1 -1
View File
@@ -20,7 +20,7 @@
if &cp || exists("g:loaded_netrwPlugin")
finish
endif
let g:loaded_netrwPlugin = "v143"
let g:loaded_netrwPlugin = "v145"
if v:version < 702
echohl WarningMsg | echo "***netrw*** you need vim version 7.2 for this version of netrw" | echohl None
finish
+6 -1
View File
@@ -3,7 +3,7 @@
" Maintainer: Erik Wognsen <erik.wognsen@gmail.com>
" Previous maintainer:
" Kevin Dahlhausen <kdahlhaus@yahoo.com>
" Last Change: 2012 Jan 5
" Last Change: 2012 Apr 09
" Thanks to Ori Avtalion for feedback on the comment markers!
@@ -56,6 +56,11 @@ syn keyword asmTodo contained TODO
" GAS supports one type of multi line comments:
syn region asmComment start="/\*" end="\*/" contains=asmTodo
" GAS (undocumentedly?) supports C++ style comments. Unlike in C/C++ however,
" a backslash ending a C++ style comment does not extend the comment to the
" next line (hence the syntax region does not define 'skip="\\$"')
syn region asmComment start="//" end="$" keepend contains=asmTodo
" Line comment characters depend on the target architecture and command line
" options and some comments may double as logical line number directives or
" preprocessor commands. This situation is described at
+3 -3
View File
@@ -1,7 +1,7 @@
" Vim syntax file
" Language: Django template
" Maintainer: Dave Hodder <dmh@dmh.org.uk>
" Last Change: 2010 May 19
" Last Change: 2012 Apr 09
" For version 5.x: Clear all syntax items
" For version 6.x: Quit when a syntax file was already loaded
@@ -21,7 +21,7 @@ syn match djangoError "%}\|}}\|#}"
syn keyword djangoStatement contained autoescape csrf_token empty
" FIXME ==, !=, <, >, <=, and >= should be djangoStatements:
" syn keyword djangoStatement contained == != < > <= >=
syn keyword djangoStatement contained and as block endblock by cycle debug else
syn keyword djangoStatement contained and as block endblock by cycle debug else elif
syn keyword djangoStatement contained extends filter endfilter firstof for
syn keyword djangoStatement contained endfor if endif ifchanged endifchanged
syn keyword djangoStatement contained ifequal endifequal ifnotequal
@@ -45,7 +45,7 @@ syn keyword djangoFilter contained linebreaks linebreaksbr linenumbers ljust
syn keyword djangoFilter contained lower make_list phone2numeric pluralize
syn keyword djangoFilter contained pprint random removetags rjust slice slugify
syn keyword djangoFilter contained safe safeseq stringformat striptags
syn keyword djangoFilter contained time timesince timeuntil title
syn keyword djangoFilter contained time timesince timeuntil title truncatechars
syn keyword djangoFilter contained truncatewords truncatewords_html unordered_list upper urlencode
syn keyword djangoFilter contained urlize urlizetrunc wordcount wordwrap yesno
+4 -4
View File
@@ -2,7 +2,7 @@
" Language: git commit file
" Maintainer: Tim Pope <vimNOSPAM@tpope.org>
" Filenames: *.git/COMMIT_EDITMSG
" Last Change: 2010 May 21
" Last Change: 2012 April 7
if exists("b:current_syntax")
finish
@@ -16,7 +16,7 @@ if has("spell")
endif
syn include @gitcommitDiff syntax/diff.vim
syn region gitcommitDiff start=/\%(^diff --\%(git\|cc\|combined\) \)\@=/ end=/^$\|^#\@=/ contains=@gitcommitDiff
syn region gitcommitDiff start=/\%(^diff --\%(git\|cc\|combined\) \)\@=/ end=/^\%(diff --\|$\|#\)\@=/ fold contains=@gitcommitDiff
syn match gitcommitFirstLine "\%^[^#].*" nextgroup=gitcommitBlank skipnl
syn match gitcommitSummary "^.\{0,50\}" contained containedin=gitcommitFirstLine nextgroup=gitcommitOverflow contains=@Spell
@@ -26,7 +26,7 @@ syn match gitcommitComment "^#.*"
syn match gitcommitHead "^\%(# .*\n\)\+#$" contained transparent
syn match gitcommitOnBranch "\%(^# \)\@<=On branch" contained containedin=gitcommitComment nextgroup=gitcommitBranch skipwhite
syn match gitcommitOnBranch "\%(^# \)\@<=Your branch .\{-\} '" contained containedin=gitcommitComment nextgroup=gitcommitBranch skipwhite
syn match gitcommitBranch "[^ \t']\+" contained
syn match gitcommitBranch "[^ ']\+" contained
syn match gitcommitNoBranch "\%(^# \)\@<=Not currently on any branch." contained containedin=gitcommitComment
syn match gitcommitHeader "\%(^# \)\@<=.*:$" contained containedin=gitcommitComment
syn region gitcommitAuthor matchgroup=gitCommitHeader start=/\%(^# \)\@<=\%(Author\|Committer\):/ end=/$/ keepend oneline contained containedin=gitcommitComment transparent
@@ -35,7 +35,7 @@ syn match gitcommitNoChanges "\%(^# \)\@<=No changes$" contained containedin=g
syn region gitcommitUntracked start=/^# Untracked files:/ end=/^#$\|^#\@!/ contains=gitcommitHeader,gitcommitHead,gitcommitUntrackedFile fold
syn match gitcommitUntrackedFile "\t\@<=.*" contained
syn region gitcommitDiscarded start=/^# Changed but not updated:/ end=/^#$\|^#\@!/ contains=gitcommitHeader,gitcommitHead,gitcommitDiscardedType fold
syn region gitcommitDiscarded start=/^# Change\%(s not staged for commit\|d but not updated\):/ end=/^#$\|^#\@!/ contains=gitcommitHeader,gitcommitHead,gitcommitDiscardedType fold
syn region gitcommitSelected start=/^# Changes to be committed:/ end=/^#$\|^#\@!/ contains=gitcommitHeader,gitcommitHead,gitcommitSelectedType fold
syn region gitcommitUnmerged start=/^# Unmerged paths:/ end=/^#$\|^#\@!/ contains=gitcommitHeader,gitcommitHead,gitcommitUnmergedType fold
+4 -1
View File
@@ -2,7 +2,7 @@
" Language: git rebase --interactive
" Maintainer: Tim Pope <vimNOSPAM@tpope.org>
" Filenames: git-rebase-todo
" Last Change: 2010 May 21
" Last Change: 2012 April 7
if exists("b:current_syntax")
finish
@@ -17,7 +17,9 @@ syn match gitrebaseReword "\v^r%(eword)=>" nextgroup=gitrebaseCommit skipwhite
syn match gitrebaseEdit "\v^e%(dit)=>" nextgroup=gitrebaseCommit skipwhite
syn match gitrebaseSquash "\v^s%(quash)=>" nextgroup=gitrebaseCommit skipwhite
syn match gitrebaseFixup "\v^f%(ixup)=>" nextgroup=gitrebaseCommit skipwhite
syn match gitrebaseExec "\v^%(x|exec)>" nextgroup=gitrebaseCommand skipwhite
syn match gitrebaseSummary ".*" contains=gitrebaseHash contained
syn match gitrebaseCommand ".*" contained
syn match gitrebaseComment "^#.*" contains=gitrebaseHash
syn match gitrebaseSquashError "\v%^%(s%(quash)=>|f%(ixup)=>)" nextgroup=gitrebaseCommit skipwhite
@@ -28,6 +30,7 @@ hi def link gitrebaseReword Number
hi def link gitrebaseEdit PreProc
hi def link gitrebaseSquash Type
hi def link gitrebaseFixup Special
hi def link gitrebaseExec Function
hi def link gitrebaseSummary String
hi def link gitrebaseComment Comment
hi def link gitrebaseSquashError Error
+3 -2
View File
@@ -2,8 +2,8 @@
" Language: shell (sh) Korn shell (ksh) bash (sh)
" Maintainer: Dr. Charles E. Campbell, Jr. <NdrOchipS@PcampbellAfamily.Mbiz>
" Previous Maintainer: Lennart Schultz <Lennart.Schultz@ecmwf.int>
" Last Change: Dec 09, 2011
" Version: 121
" Last Change: Mar 19, 2012
" Version: 122
" URL: http://mysite.verizon.net/astronaut/vim/index.html#vimlinks_syntax
" For options and settings, please use: :help ft-sh-syntax
" This file includes many ideas from ?ric Brunet (eric.brunet@ens.fr)
@@ -263,6 +263,7 @@ syn match shEscape contained '\\.' contains=@shCommandSubList
if exists("b:is_kornshell") || exists("b:is_bash")
syn region shCommandSub matchgroup=shCmdSubRegion start="\$(" skip='\\\\\|\\.' end=")" contains=@shCommandSubList
syn region shArithmetic matchgroup=shArithRegion start="\$((" skip='\\\\\|\\.' end="))" contains=@shArithList
syn region shArithmetic matchgroup=shArithRegion start="\$\[" skip='\\\\\|\\.' end="\]" contains=@shArithList
syn match shSkipInitWS contained "^\s\+"
elseif !exists("g:sh_no_error")
syn region shCommandSub matchgroup=Error start="\$(" end=")" contains=@shCommandSubList
+3 -5
View File
@@ -681,11 +681,9 @@ $(OUTDIR)/if_python3.o : if_python3.c $(INCL)
$(OUTDIR)/%.o : %.c $(INCL)
$(CC) -c $(CFLAGS) $< -o $@
$(OUTDIR)/vimres.res: vim.rc version.h gui_w32_rc.h
$(WINDRES) $(WINDRES_FLAGS) $(DEFINES) vim.rc $(OUTDIR)/vimres.res
$(OUTDIR)/vimrc.o: $(OUTDIR)/vimres.res
$(WINDRES) $(WINDRES_FLAGS) $(OUTDIR)/vimres.res $(OUTDIR)/vimrc.o
$(OUTDIR)/vimrc.o: vim.rc version.h gui_w32_rc.h
$(WINDRES) $(WINDRES_FLAGS) $(DEFINES) \
--input-format=rc --output-format=coff -i vim.rc -o $@
$(OUTDIR):
$(MKDIR) $(OUTDIR)
+1 -1
View File
@@ -1736,7 +1736,7 @@ $(VIMTARGET): auto/config.mk objects $(OBJ) version.c version.h
sh $(srcdir)/link.sh
xxd/xxd$(EXEEXT): xxd/xxd.c
cd xxd; CC="$(CC)" CFLAGS="$(CPPFLAGS) $(CFLAGS)" \
cd xxd; CC="$(CC)" CFLAGS="$(CPPFLAGS) $(CFLAGS)" LDFLAGS="$(LDFLAGS)" \
$(MAKE) -f Makefile
# Build the language specific files if they were unpacked.
+6 -2
View File
@@ -17,12 +17,16 @@ own window.
VisVim is based upon VisEmacs by Christopher Payne
(Copyright (C) Christopher Payne 1997).
Author: Heiko Erhardt <Heiko.Erhardt@munich.netsurf.de>
Author: Heiko Erhardt <heiko.erhardt@gmx.net>
Based upon: VisEmacs by Christopher Payne <payneca@sagian.com>
Version: 1.0
Created: 23 Oct 1997
Date: 23 Oct 1997
VisVim was originally GNU GPL licensed, as stated below. On March 21 2012
Heiko Erhardt declared this work to be relicensed under the Vim license, as
stated in ../../runtime/doc/uganda.txt (or ":help uganda" in Vim).
VisVim is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
@@ -318,5 +322,5 @@ Known Problems
Have fun!
Heiko Erhardt
Heiko.Erhardt@munich.netsurf.de
heiko.erhardt@gmx.net
+5 -2
View File
@@ -1465,13 +1465,16 @@ normalchar:
Insstart_blank_vcol = get_nolist_virtcol();
}
if (vim_iswordc(c) || !echeck_abbr(
/* Insert a normal character and check for abbreviations on a
* special character. Let CTRL-] expand abbreviations without
* inserting it. */
if (vim_iswordc(c) || (!echeck_abbr(
#ifdef FEAT_MBYTE
/* Add ABBR_OFF for characters above 0x100, this is
* what check_abbr() expects. */
(has_mbyte && c >= 0x100) ? (c + ABBR_OFF) :
#endif
c))
c) && c != Ctrl_RSB))
{
insert_special(c, FALSE, FALSE);
#ifdef FEAT_RIGHTLEFT
+34
View File
@@ -622,6 +622,9 @@ static void f_localtime __ARGS((typval_T *argvars, typval_T *rettv));
static void f_log __ARGS((typval_T *argvars, typval_T *rettv));
static void f_log10 __ARGS((typval_T *argvars, typval_T *rettv));
#endif
#ifdef FEAT_LUA
static void f_luaeval __ARGS((typval_T *argvars, typval_T *rettv));
#endif
static void f_map __ARGS((typval_T *argvars, typval_T *rettv));
static void f_maparg __ARGS((typval_T *argvars, typval_T *rettv));
static void f_mapcheck __ARGS((typval_T *argvars, typval_T *rettv));
@@ -6778,6 +6781,10 @@ garbage_collect()
/* v: vars */
set_ref_in_ht(&vimvarht, copyID);
#ifdef FEAT_LUA
set_ref_in_lua(copyID);
#endif
/*
* 2. Free lists and dictionaries that are not referenced.
*/
@@ -7946,6 +7953,9 @@ static struct fst
#ifdef FEAT_FLOAT
{"log", 1, 1, f_log},
{"log10", 1, 1, f_log10},
#endif
#ifdef FEAT_LUA
{"luaeval", 1, 2, f_luaeval},
#endif
{"map", 2, 2, f_map},
{"maparg", 1, 4, f_maparg},
@@ -13646,6 +13656,23 @@ f_log10(argvars, rettv)
}
#endif
#ifdef FEAT_LUA
/*
* "luaeval()" function
*/
static void
f_luaeval(argvars, rettv)
typval_T *argvars;
typval_T *rettv;
{
char_u *str;
char_u buf[NUMBUFLEN];
str = get_tv_string_buf(&argvars[0], buf);
do_luaeval(str, argvars + 1, rettv);
}
#endif
/*
* "map()" function
*/
@@ -20520,7 +20547,13 @@ ex_echo(eap)
/* Call msg_start() after eval1(), evaluating the expression
* may cause a message to appear. */
if (eap->cmdidx == CMD_echo)
{
/* Mark the saved text as finishing the line, so that what
* follows is displayed on a new line when scrolling back
* at the more prompt. */
msg_sb_eol();
msg_start();
}
}
else if (eap->cmdidx == CMD_echo)
msg_puts_attr((char_u *)" ", echo_attr);
@@ -22999,6 +23032,7 @@ read_viminfo_varlist(virp, writing)
{
vim_free(tv.vval.v_string);
tv = *etv;
vim_free(etv);
}
}
+1 -1
View File
@@ -5546,7 +5546,7 @@ ex_help(eap)
}
arg = eap->arg;
if (eap->forceit && *arg == NUL)
if (eap->forceit && *arg == NUL && !curbuf->b_help)
{
EMSG(_("E478: Don't panic!"));
return;
+80 -23
View File
@@ -1642,6 +1642,26 @@ can_abandon(buf, forceit)
|| forceit);
}
static void add_bufnum __ARGS((int *bufnrs, int *bufnump, int nr));
/*
* Add a buffer number to "bufnrs", unless it's already there.
*/
static void
add_bufnum(bufnrs, bufnump, nr)
int *bufnrs;
int *bufnump;
int nr;
{
int i;
for (i = 0; i < *bufnump; ++i)
if (bufnrs[i] == nr)
return;
bufnrs[*bufnump] = nr;
*bufnump = *bufnump + 1;
}
/*
* Return TRUE if any buffer was changed and cannot be abandoned.
* That changed buffer becomes the current buffer.
@@ -1650,32 +1670,64 @@ can_abandon(buf, forceit)
check_changed_any(hidden)
int hidden; /* Only check hidden buffers */
{
int ret = FALSE;
buf_T *buf;
int save;
int i;
int bufnum = 0;
int bufcount = 0;
int *bufnrs;
#ifdef FEAT_WINDOWS
tabpage_T *tp;
win_T *wp;
#endif
for (;;)
{
/* check curbuf first: if it was changed we can't abandon it */
if (!hidden && curbufIsChanged())
buf = curbuf;
else
{
for (buf = firstbuf; buf != NULL; buf = buf->b_next)
if ((!hidden || buf->b_nwindows == 0) && bufIsChanged(buf))
break;
}
if (buf == NULL) /* No buffers changed */
return FALSE;
for (buf = firstbuf; buf != NULL; buf = buf->b_next)
++bufcount;
/* Try auto-writing the buffer. If this fails but the buffer no
* longer exists it's not changed, that's OK. */
if (check_changed(buf, p_awa, TRUE, FALSE, TRUE) && buf_valid(buf))
break; /* didn't save - still changes */
if (bufcount == 0)
return FALSE;
bufnrs = (int *)alloc(sizeof(int) * bufcount);
if (bufnrs == NULL)
return FALSE;
/* curbuf */
bufnrs[bufnum++] = curbuf->b_fnum;
#ifdef FEAT_WINDOWS
/* buf in curtab */
FOR_ALL_WINDOWS(wp)
if (wp->w_buffer != curbuf)
add_bufnum(bufnrs, &bufnum, wp->w_buffer->b_fnum);
/* buf in other tab */
for (tp = first_tabpage; tp != NULL; tp = tp->tp_next)
if (tp != curtab)
for (wp = tp->tp_firstwin; wp != NULL; wp = wp->w_next)
add_bufnum(bufnrs, &bufnum, wp->w_buffer->b_fnum);
#endif
/* any other buf */
for (buf = firstbuf; buf != NULL; buf = buf->b_next)
add_bufnum(bufnrs, &bufnum, buf->b_fnum);
for (i = 0; i < bufnum; ++i)
{
buf = buflist_findnr(bufnrs[i]);
if (buf == NULL)
continue;
if ((!hidden || buf->b_nwindows == 0) && bufIsChanged(buf))
{
/* Try auto-writing the buffer. If this fails but the buffer no
* longer exists it's not changed, that's OK. */
if (check_changed(buf, p_awa, TRUE, FALSE, TRUE) && buf_valid(buf))
break; /* didn't save - still changes */
}
}
if (i >= bufnum)
goto theend;
ret = TRUE;
exiting = FALSE;
#if defined(FEAT_GUI_DIALOG) || defined(FEAT_CON_DIALOG)
/*
@@ -1708,24 +1760,29 @@ check_changed_any(hidden)
#ifdef FEAT_WINDOWS
/* Try to find a window that contains the buffer. */
if (buf != curbuf)
for (wp = firstwin; wp != NULL; wp = wp->w_next)
FOR_ALL_TAB_WINDOWS(tp, wp)
if (wp->w_buffer == buf)
{
win_goto(wp);
goto_tabpage_win(tp, wp);
# ifdef FEAT_AUTOCMD
/* Paranoia: did autocms wipe out the buffer with changes? */
if (!buf_valid(buf))
return TRUE;
{
goto theend;
}
# endif
break;
goto buf_found;
}
buf_found:
#endif
/* Open the changed buffer in the current window. */
if (buf != curbuf)
set_curbuf(buf, DOBUF_GOTO);
return TRUE;
theend:
vim_free(bufnrs);
return ret;
}
/*
@@ -3347,7 +3404,7 @@ ex_scriptnames(eap)
home_replace(NULL, SCRIPT_ITEM(i).sn_name,
NameBuff, MAXPATHL, TRUE);
smsg((char_u *)"%3d: %s", i, NameBuff);
}
}
}
# if defined(BACKSLASH_IN_FILENAME) || defined(PROTO)
+3 -2
View File
@@ -4352,8 +4352,9 @@ check_abbr(c, ptr, col, mincol)
if (typebuf.tb_no_abbr_cnt) /* abbrev. are not recursive */
return FALSE;
if ((KeyNoremap & (RM_NONE|RM_SCRIPT)) != 0)
/* no remapping implies no abbreviation */
/* no remapping implies no abbreviation, except for CTRL-] */
if ((KeyNoremap & (RM_NONE|RM_SCRIPT)) != 0 && c != Ctrl_RSB)
return FALSE;
/*
+897 -271
View File
File diff suppressed because it is too large Load Diff
+2
View File
@@ -3270,6 +3270,7 @@ usage()
#endif
main_msg(_("-v\t\t\tVi mode (like \"vi\")"));
main_msg(_("-e\t\t\tEx mode (like \"ex\")"));
main_msg(_("-E\t\t\tImproved Ex mode"));
main_msg(_("-s\t\t\tSilent (batch) mode (only for \"ex\")"));
#ifdef FEAT_DIFF
main_msg(_("-d\t\t\tDiff mode (like \"vimdiff\")"));
@@ -3393,6 +3394,7 @@ usage()
main_msg(_("-display <display>\tRun vim on <display> (also: --display)"));
main_msg(_("--role <role>\tSet a unique role to identify the main window"));
main_msg(_("--socketid <xid>\tOpen Vim inside another GTK widget"));
main_msg(_("--echo-wid\t\tMake gvim echo the Window ID on stdout"));
#endif
#ifdef FEAT_GUI_W32
main_msg(_("-P <parent title>\tOpen Vim inside parent application"));
+10
View File
@@ -2351,6 +2351,16 @@ msg_sb_start(mps)
return mp;
}
/*
* Mark the last message chunk as finishing the line.
*/
void
msg_sb_eol()
{
if (last_msgchunk != NULL)
last_msgchunk->sb_eol = TRUE;
}
/*
* Display a screen line from previously displayed text at row "row".
* Returns a pointer to the text for the next line (can be NULL).
+91 -4
View File
@@ -4978,6 +4978,7 @@ static int cin_isif __ARGS((char_u *));
static int cin_iselse __ARGS((char_u *));
static int cin_isdo __ARGS((char_u *));
static int cin_iswhileofdo __ARGS((char_u *, linenr_T, int));
static int cin_is_if_for_while_before_offset __ARGS((char_u *line, int *poffset));
static int cin_iswhileofdo_end __ARGS((int terminated, int ind_maxparen, int ind_maxcomment));
static int cin_isbreak __ARGS((char_u *));
static int cin_is_cpp_baseclass __ARGS((colnr_T *col));
@@ -5776,6 +5777,52 @@ cin_iswhileofdo(p, lnum, ind_maxparen) /* XXX */
return retval;
}
/*
* Check whether in "p" there is an "if", "for" or "while" before "*poffset".
* Return 0 if there is none.
* Otherwise return !0 and update "*poffset" to point to the place where the
* string was found.
*/
static int
cin_is_if_for_while_before_offset(line, poffset)
char_u *line;
int *poffset;
{
int offset = *poffset;
if (offset-- < 2)
return 0;
while (offset > 2 && vim_iswhite(line[offset]))
--offset;
offset -= 1;
if (!STRNCMP(line + offset, "if", 2))
goto probablyFound;
if (offset >= 1)
{
offset -= 1;
if (!STRNCMP(line + offset, "for", 3))
goto probablyFound;
if (offset >= 2)
{
offset -= 2;
if (!STRNCMP(line + offset, "while", 5))
goto probablyFound;
}
}
return 0;
probablyFound:
if (!offset || !vim_isIDc(line[offset - 1]))
{
*poffset = offset;
return 1;
}
return 0;
}
/*
* Return TRUE if we are at the end of a do-while.
* do
@@ -6130,7 +6177,7 @@ find_start_brace(ind_maxcomment) /* XXX */
/*
* Find the matching '(', failing if it is in a comment.
* Return NULL of no match found.
* Return NULL if no match found.
*/
static pos_T *
find_match_paren(ind_maxparen, ind_maxcomment) /* XXX */
@@ -6399,6 +6446,12 @@ get_c_indent()
*/
int ind_cpp_namespace = 0;
/*
* handle continuation lines containing conditions of if(), for() and
* while()
*/
int ind_if_for_while = 0;
pos_T cur_curpos;
int amount;
int scope_amount;
@@ -6515,6 +6568,7 @@ get_c_indent()
case 'l': ind_keep_case_label = n; break;
case '#': ind_hash_comment = n; break;
case 'N': ind_cpp_namespace = n; break;
case 'k': ind_if_for_while = n; break;
}
if (*options == ',')
++options;
@@ -6818,6 +6872,33 @@ get_c_indent()
if (amount == -1)
{
int ignore_paren_col = 0;
int is_if_for_while = 0;
if (ind_if_for_while)
{
/* Look for the outermost opening parenthesis on this line
* and check whether it belongs to an "if", "for" or "while". */
pos_T cursor_save = curwin->w_cursor;
pos_T outermost;
char_u *line;
trypos = &our_paren_pos;
do {
outermost = *trypos;
curwin->w_cursor.lnum = outermost.lnum;
curwin->w_cursor.col = outermost.col;
trypos = find_match_paren(ind_maxparen, ind_maxcomment);
} while (trypos && trypos->lnum == outermost.lnum);
curwin->w_cursor = cursor_save;
line = ml_get(outermost.lnum);
is_if_for_while =
cin_is_if_for_while_before_offset(line, &outermost.col);
}
amount = skip_label(our_paren_pos.lnum, &look, ind_maxcomment);
look = skipwhite(look);
@@ -6842,7 +6923,7 @@ get_c_indent()
curwin->w_cursor.lnum = save_lnum;
look = ml_get(our_paren_pos.lnum) + look_col;
}
if (theline[0] == ')' || ind_unclosed == 0
if (theline[0] == ')' || (ind_unclosed == 0 && is_if_for_while == 0)
|| (!ind_unclosed_noignore && *look == '('
&& ignore_paren_col == 0))
{
@@ -6913,7 +6994,8 @@ get_c_indent()
{
/* Line up with the start of the matching paren line. */
}
else if (ind_unclosed == 0 || (!ind_unclosed_noignore
else if ((ind_unclosed == 0 && is_if_for_while == 0)
|| (!ind_unclosed_noignore
&& *look == '(' && ignore_paren_col == 0))
{
if (cur_amount != MAXCOL)
@@ -6949,7 +7031,12 @@ get_c_indent()
if (find_match_paren(ind_maxparen, ind_maxcomment) != NULL)
amount += ind_unclosed2;
else
amount += ind_unclosed;
{
if (is_if_for_while)
amount += ind_if_for_while;
else
amount += ind_unclosed;
}
}
/*
* For a line starting with ')' use the minimum of the two
+4
View File
@@ -2847,6 +2847,8 @@ do_check_cursorbind()
# ifdef FEAT_VIRTUALEDIT
colnr_T coladd = curwin->w_cursor.coladd;
# endif
colnr_T curswant = curwin->w_curswant;
int set_curswant = curwin->w_set_curswant;
win_T *old_curwin = curwin;
buf_T *old_curbuf = curbuf;
int restart_edit_save;
@@ -2881,6 +2883,8 @@ do_check_cursorbind()
# ifdef FEAT_VIRTUALEDIT
curwin->w_cursor.coladd = coladd;
# endif
curwin->w_curswant = curswant;
curwin->w_set_curswant = set_curswant;
/* Make sure the cursor is in a valid position. Temporarily set
* "restart_edit" to allow the cursor to be beyond the EOL. */
+8
View File
@@ -2279,6 +2279,7 @@ op_function(oap)
{
#ifdef FEAT_EVAL
char_u *(argv[1]);
int save_virtual_op = virtual_op;
if (*p_opfunc == NUL)
EMSG(_("E774: 'operatorfunc' is empty"));
@@ -2297,7 +2298,14 @@ op_function(oap)
argv[0] = (char_u *)"line";
else
argv[0] = (char_u *)"char";
/* Reset virtual_op so that 'virtualedit' can be changed in the
* function. */
virtual_op = MAYBE;
(void)call_func_retnr(p_opfunc, 1, argv, FALSE);
virtual_op = save_virtual_op;
}
#else
EMSG(_("E775: Eval feature not available"));
+2 -1
View File
@@ -2602,7 +2602,8 @@ op_insert(oap, count1)
firstline = ml_get(oap->start.lnum) + bd.textcol;
if (oap->op_type == OP_APPEND)
firstline += bd.textlen;
if ((ins_len = (long)STRLEN(firstline) - pre_textlen) > 0)
if (pre_textlen >= 0
&& (ins_len = (long)STRLEN(firstline) - pre_textlen) > 0)
{
ins_text = vim_strnsave(firstline, (int)ins_len);
if (ins_text != NULL)
+34 -55
View File
@@ -439,17 +439,19 @@ struct vimoption
#define P_RCLR 0x7000 /* clear and redraw all */
#define P_COMMA 0x8000 /* comma separated list */
#define P_NODUP 0x10000L/* don't allow duplicate strings */
#define P_FLAGLIST 0x20000L/* list of single-char flags */
#define P_NODUP 0x10000L /* don't allow duplicate strings */
#define P_FLAGLIST 0x20000L /* list of single-char flags */
#define P_SECURE 0x40000L/* cannot change in modeline or secure mode */
#define P_GETTEXT 0x80000L/* expand default value with _() */
#define P_NOGLOB 0x100000L/* do not use local value for global vimrc */
#define P_NFNAME 0x200000L/* only normal file name chars allowed */
#define P_INSECURE 0x400000L/* option was set from a modeline */
#define P_PRI_MKRC 0x800000L/* priority for :mkvimrc (setting option has
#define P_SECURE 0x40000L /* cannot change in modeline or secure mode */
#define P_GETTEXT 0x80000L /* expand default value with _() */
#define P_NOGLOB 0x100000L /* do not use local value for global vimrc */
#define P_NFNAME 0x200000L /* only normal file name chars allowed */
#define P_INSECURE 0x400000L /* option was set from a modeline */
#define P_PRI_MKRC 0x800000L /* priority for :mkvimrc (setting option has
side effects) */
#define P_NO_ML 0x1000000L/* not allowed in modeline */
#define P_NO_ML 0x1000000L /* not allowed in modeline */
#define P_CURSWANT 0x2000000L /* update curswant required; not needed when
* there is a redraw flag */
#define ISK_LATIN1 (char_u *)"@,48-57,_,192-255"
@@ -466,9 +468,9 @@ struct vimoption
#if defined(FEAT_DIFF) || defined(FEAT_FOLDING) || defined(FEAT_SPELL) \
|| defined(FEAT_VERTSPLIT) || defined(FEAT_CLIPBOARD) \
|| defined(FEAT_INS_EXPAND) || defined(FEAT_SYN_HL) || defined(FEAT_CONCEAL)
# define HIGHLIGHT_INIT "8:SpecialKey,@:NonText,d:Directory,e:ErrorMsg,i:IncSearch,l:Search,m:MoreMsg,M:ModeMsg,n:LineNr,r:Question,s:StatusLine,S:StatusLineNC,c:VertSplit,t:Title,v:Visual,V:VisualNOS,w:WarningMsg,W:WildMenu,f:Folded,F:FoldColumn,A:DiffAdd,C:DiffChange,D:DiffDelete,T:DiffText,>:SignColumn,-:Conceal,B:SpellBad,P:SpellCap,R:SpellRare,L:SpellLocal,+:Pmenu,=:PmenuSel,x:PmenuSbar,X:PmenuThumb,*:TabLine,#:TabLineSel,_:TabLineFill,!:CursorColumn,.:CursorLine,o:ColorColumn"
# define HIGHLIGHT_INIT "8:SpecialKey,@:NonText,d:Directory,e:ErrorMsg,i:IncSearch,l:Search,m:MoreMsg,M:ModeMsg,n:LineNr,N:CursorLineNr,r:Question,s:StatusLine,S:StatusLineNC,c:VertSplit,t:Title,v:Visual,V:VisualNOS,w:WarningMsg,W:WildMenu,f:Folded,F:FoldColumn,A:DiffAdd,C:DiffChange,D:DiffDelete,T:DiffText,>:SignColumn,-:Conceal,B:SpellBad,P:SpellCap,R:SpellRare,L:SpellLocal,+:Pmenu,=:PmenuSel,x:PmenuSbar,X:PmenuThumb,*:TabLine,#:TabLineSel,_:TabLineFill,!:CursorColumn,.:CursorLine,o:ColorColumn"
#else
# define HIGHLIGHT_INIT "8:SpecialKey,@:NonText,d:Directory,e:ErrorMsg,i:IncSearch,l:Search,m:MoreMsg,M:ModeMsg,n:LineNr,r:Question,s:StatusLine,S:StatusLineNC,t:Title,v:Visual,w:WarningMsg,W:WildMenu,>:SignColumn,*:TabLine,#:TabLineSel,_:TabLineFill"
# define HIGHLIGHT_INIT "8:SpecialKey,@:NonText,d:Directory,e:ErrorMsg,i:IncSearch,l:Search,m:MoreMsg,M:ModeMsg,n:LineNr,N:CursorLineNr,r:Question,s:StatusLine,S:StatusLineNC,t:Title,v:Visual,w:WarningMsg,W:WildMenu,>:SignColumn,*:TabLine,#:TabLineSel,_:TabLineFill"
#endif
/*
@@ -485,7 +487,7 @@ static struct vimoption
#endif
options[] =
{
{"aleph", "al", P_NUM|P_VI_DEF,
{"aleph", "al", P_NUM|P_VI_DEF|P_CURSWANT,
#ifdef FEAT_RIGHTLEFT
(char_u *)&p_aleph, PV_NONE,
#else
@@ -510,7 +512,7 @@ static struct vimoption
{(char_u *)FALSE, (char_u *)0L}
#endif
SCRIPTID_INIT},
{"arabic", "arab", P_BOOL|P_VI_DEF|P_VIM,
{"arabic", "arab", P_BOOL|P_VI_DEF|P_VIM|P_CURSWANT,
#ifdef FEAT_ARABIC
(char_u *)VAR_WIN, PV_ARAB,
#else
@@ -787,7 +789,7 @@ static struct vimoption
{"columns", "co", P_NUM|P_NODEFAULT|P_NO_MKRC|P_VI_DEF|P_RCLR,
(char_u *)&Columns, PV_NONE,
{(char_u *)80L, (char_u *)0L} SCRIPTID_INIT},
{"comments", "com", P_STRING|P_ALLOCED|P_VI_DEF|P_COMMA|P_NODUP,
{"comments", "com", P_STRING|P_ALLOCED|P_VI_DEF|P_COMMA|P_NODUP|P_CURSWANT,
#ifdef FEAT_COMMENTS
(char_u *)&p_com, PV_COM,
{(char_u *)"s1:/*,mb:*,ex:*/,://,b:#,:%,:XCOMM,n:>,fb:-",
@@ -797,7 +799,7 @@ static struct vimoption
{(char_u *)0L, (char_u *)0L}
#endif
SCRIPTID_INIT},
{"commentstring", "cms", P_STRING|P_ALLOCED|P_VI_DEF,
{"commentstring", "cms", P_STRING|P_ALLOCED|P_VI_DEF|P_CURSWANT,
#ifdef FEAT_FOLDING
(char_u *)&p_cms, PV_CMS,
{(char_u *)"/*%s*/", (char_u *)0L}
@@ -962,7 +964,7 @@ static struct vimoption
{"debug", NULL, P_STRING|P_VI_DEF,
(char_u *)&p_debug, PV_NONE,
{(char_u *)"", (char_u *)0L} SCRIPTID_INIT},
{"define", "def", P_STRING|P_ALLOCED|P_VI_DEF,
{"define", "def", P_STRING|P_ALLOCED|P_VI_DEF|P_CURSWANT,
#ifdef FEAT_FIND_ID
(char_u *)&p_def, PV_DEF,
{(char_u *)"^\\s*#\\s*define", (char_u *)0L}
@@ -992,7 +994,7 @@ static struct vimoption
(char_u *)NULL, PV_NONE,
#endif
{(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
{"diffexpr", "dex", P_STRING|P_VI_DEF|P_SECURE,
{"diffexpr", "dex", P_STRING|P_VI_DEF|P_SECURE|P_CURSWANT,
#if defined(FEAT_DIFF) && defined(FEAT_EVAL)
(char_u *)&p_dex, PV_NONE,
{(char_u *)"", (char_u *)0L}
@@ -1108,7 +1110,7 @@ static struct vimoption
{(char_u *)0L, (char_u *)0L}
#endif
SCRIPTID_INIT},
{"fileformat", "ff", P_STRING|P_ALLOCED|P_VI_DEF|P_RSTAT|P_NO_MKRC,
{"fileformat", "ff", P_STRING|P_ALLOCED|P_VI_DEF|P_RSTAT|P_NO_MKRC|P_CURSWANT,
(char_u *)&p_ff, PV_FF,
{(char_u *)DFLT_FF, (char_u *)0L} SCRIPTID_INIT},
{"fileformats", "ffs", P_STRING|P_VIM|P_COMMA|P_NODUP,
@@ -1168,7 +1170,7 @@ static struct vimoption
{"foldlevel", "fdl", P_NUM|P_VI_DEF|P_RWIN,
(char_u *)VAR_WIN, PV_FDL,
{(char_u *)0L, (char_u *)0L} SCRIPTID_INIT},
{"foldlevelstart","fdls", P_NUM|P_VI_DEF,
{"foldlevelstart","fdls", P_NUM|P_VI_DEF|P_CURSWANT,
(char_u *)&p_fdls, PV_NONE,
{(char_u *)-1L, (char_u *)0L} SCRIPTID_INIT},
{"foldmarker", "fmr", P_STRING|P_ALLOCED|P_VIM|P_VI_DEF|
@@ -1185,7 +1187,7 @@ static struct vimoption
{"foldnestmax", "fdn", P_NUM|P_VI_DEF|P_RWIN,
(char_u *)VAR_WIN, PV_FDN,
{(char_u *)20L, (char_u *)0L} SCRIPTID_INIT},
{"foldopen", "fdo", P_STRING|P_VI_DEF|P_COMMA|P_NODUP,
{"foldopen", "fdo", P_STRING|P_VI_DEF|P_COMMA|P_NODUP|P_CURSWANT,
(char_u *)&p_fdo, PV_NONE,
{(char_u *)"block,hor,mark,percent,quickfix,search,tag,undo",
(char_u *)0L} SCRIPTID_INIT},
@@ -1779,7 +1781,7 @@ static struct vimoption
{"matchtime", "mat", P_NUM|P_VI_DEF,
(char_u *)&p_mat, PV_NONE,
{(char_u *)5L, (char_u *)0L} SCRIPTID_INIT},
{"maxcombine", "mco", P_NUM|P_VI_DEF,
{"maxcombine", "mco", P_NUM|P_VI_DEF|P_CURSWANT,
#ifdef FEAT_MBYTE
(char_u *)&p_mco, PV_NONE,
#else
@@ -2755,7 +2757,7 @@ static struct vimoption
{(char_u *)0L, (char_u *)0L}
#endif
SCRIPTID_INIT},
{"virtualedit", "ve", P_STRING|P_COMMA|P_NODUP|P_VI_DEF|P_VIM,
{"virtualedit", "ve", P_STRING|P_COMMA|P_NODUP|P_VI_DEF|P_VIM|P_CURSWANT,
#ifdef FEAT_VIRTUALEDIT
(char_u *)&p_ve, PV_NONE,
{(char_u *)"", (char_u *)""}
@@ -7149,8 +7151,10 @@ did_set_string_option(opt_idx, varp, new_value_alloced, oldval, errbuf,
}
#endif
if (curwin->w_curswant != MAXCOL)
curwin->w_set_curswant = TRUE; /* in case 'showbreak' changed */
if (curwin->w_curswant != MAXCOL
&& (options[opt_idx].flags & (P_CURSWANT | P_RCLR)) != 0)
curwin->w_set_curswant = TRUE;
#ifdef FEAT_GUI
/* check redraw when it's not a GUI option or the GUI is active. */
if (!redraw_gui_only || gui.in_use)
@@ -7672,9 +7676,6 @@ set_bool_option(opt_idx, varp, value, opt_flags)
|| (int *)varp == &curwin->w_p_nu
|| (int *)varp == &curwin->w_p_rnu)
{
if (curwin->w_curswant != MAXCOL)
curwin->w_set_curswant = TRUE;
/* If 'number' is set, reset 'relativenumber'. */
/* If 'relativenumber' is set, reset 'number'. */
if ((int *)varp == &curwin->w_p_nu && curwin->w_p_nu)
@@ -7953,8 +7954,6 @@ set_bool_option(opt_idx, varp, value, opt_flags)
{
if (curwin->w_p_wrap)
curwin->w_leftcol = 0;
if (curwin->w_curswant != MAXCOL)
curwin->w_set_curswant = TRUE;
}
#ifdef FEAT_WINDOWS
@@ -8184,31 +8183,8 @@ set_bool_option(opt_idx, varp, value, opt_flags)
curbuf->b_p_imsearch = B_IMODE_USE_INSERT;
# endif
}
if (curwin->w_curswant != MAXCOL)
curwin->w_set_curswant = TRUE;
}
else if ((int *)varp == &p_arshape)
{
if (curwin->w_curswant != MAXCOL)
curwin->w_set_curswant = TRUE;
}
#endif
#ifdef FEAT_LINEBREAK
if ((int *)varp == &curwin->w_p_lbr)
{
if (curwin->w_curswant != MAXCOL)
curwin->w_set_curswant = TRUE;
}
#endif
#ifdef FEAT_RIGHTLEFT
if ((int *)varp == &curwin->w_p_rl)
{
if (curwin->w_curswant != MAXCOL)
curwin->w_set_curswant = TRUE;
}
#endif
/*
@@ -8218,7 +8194,9 @@ set_bool_option(opt_idx, varp, value, opt_flags)
options[opt_idx].flags |= P_WAS_SET;
comp_col(); /* in case 'ruler' or 'showcmd' changed */
if (curwin->w_curswant != MAXCOL
&& (options[opt_idx].flags & (P_CURSWANT | P_RCLR)) != 0)
curwin->w_set_curswant = TRUE;
check_redraw(options[opt_idx].flags);
return NULL;
@@ -8747,8 +8725,9 @@ set_num_option(opt_idx, varp, value, errbuf, errbuflen, opt_flags)
options[opt_idx].flags |= P_WAS_SET;
comp_col(); /* in case 'columns' or 'ls' changed */
if (curwin->w_curswant != MAXCOL)
curwin->w_set_curswant = TRUE; /* in case 'tabstop' changed */
if (curwin->w_curswant != MAXCOL
&& (options[opt_idx].flags & (P_CURSWANT | P_RCLR)) != 0)
curwin->w_set_curswant = TRUE;
check_redraw(options[opt_idx].flags);
return errmsg;
+129 -93
View File
@@ -9,12 +9,12 @@ msgstr ""
"Project-Id-Version: vim 7.3\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2011-05-29 07:43+0200\n"
"PO-Revision-Date: 2012-02-25 18:01+0100\n"
"Last-Translator: Erwin Poeze <erwin.poeze@gmail.com>\n"
"PO-Revision-Date: 2012-03-28 08:07+0200\n"
"Last-Translator: YOUR NAME <E-MAIL@ADDRESS>\n"
"Language-Team: Dutch <vertaling@vrijschrift.nl>\n"
"Language: nl\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
@@ -105,12 +105,12 @@ msgstr "E87: kan niet voorbij het laatste buffer komen"
#: buffer.c:1021
msgid "E88: Cannot go before first buffer"
msgstr "E88: kan niet voor het eerste buffer komen"
msgstr "E88: kan niet vóór het eerste buffer komen"
#: buffer.c:1063
#, c-format
msgid "E89: No write since last change for buffer %ld (add ! to override)"
msgstr "E89: niets opgeslagen sinds laatste wijziging van buffer %ld (voeg ! toe om dit te negeren)"
msgstr "E89: niets opgeslagen sinds laatste wijziging van buffer %ld (voeg ! toe om te forceren)"
#: buffer.c:1080
msgid "E90: Cannot unload last buffer"
@@ -209,7 +209,7 @@ msgstr "Alles"
#: buffer.c:4188
msgid "Bot"
msgstr "Bod"
msgstr "Bodem"
#: buffer.c:4191
msgid "Top"
@@ -1657,11 +1657,11 @@ msgstr "Gegroet, Vim-gebruiker!"
#: ex_docmd.c:6492
msgid "E784: Cannot close last tab page"
msgstr "E784: laatste tab-pagina kan niet afgesloten worden"
msgstr "E784: laatste tabpagina kan niet afgesloten worden"
#: ex_docmd.c:6534
msgid "Already only one tab page"
msgstr "Reeds beperkt tot één tab-pagina"
msgstr "Reeds beperkt tot één tabpagina"
#: ex_docmd.c:7221
msgid "Edit File in new window"
@@ -1670,7 +1670,7 @@ msgstr "Bestand in nieuw venster bewerken"
#: ex_docmd.c:7347
#, c-format
msgid "Tab page %d"
msgstr "Tab-pagina %d"
msgstr "Tabpagina %d"
#: ex_docmd.c:7739
msgid "No swap file"
@@ -1694,7 +1694,7 @@ msgstr "E187: onbekend"
#: ex_docmd.c:8128
msgid "E465: :winsize requires two number arguments"
msgstr "E465: :winsize vereist twee getalsargumenten"
msgstr "E465: :winsize vereist twee getallen als argument"
#: ex_docmd.c:8190
#, c-format
@@ -1703,11 +1703,11 @@ msgstr "Vensterpositie: X %d, Y %d"
#: ex_docmd.c:8195
msgid "E188: Obtaining window position not implemented for this platform"
msgstr "E188: verkrijgen van vensterpositie is voor dit platform niet geïmplementeerd"
msgstr "E188: verkrijgen van vensterpositie is voor dit platform niet geïmplementeerd"
#: ex_docmd.c:8205
msgid "E466: :winpos requires two number arguments"
msgstr "E466: :winpos vereist twee getalsargumenten"
msgstr "E466: :winpos vereist twee getallen als argument"
#: ex_docmd.c:8565
msgid "Save Redirection"
@@ -3873,7 +3873,7 @@ msgstr "-unregister\t\tgvim afmelden voor OLE"
#: main.c:3101
msgid "-g\t\t\tRun using GUI (like \"gvim\")"
msgstr "-g\t\t\tmet GUI opstarten (zoals \"gvim\")"
msgstr "-g\t\t\tMet GUI opstarten (zoals \"gvim\")"
#: main.c:3102
msgid "-f or --nofork\tForeground: Don't fork when starting GUI"
@@ -3913,7 +3913,7 @@ msgstr "-m\t\t\tAanpassingen (bestanden opslaan) niet toegestaan"
#: main.c:3114
msgid "-M\t\t\tModifications in text not allowed"
msgstr "-M\t\t\tTektuele aanpassingen niet toegestaan"
msgstr "-M\t\t\tTekstuele aanpassingen niet toegestaan"
#: main.c:3115
msgid "-b\t\t\tBinary mode"
@@ -3933,51 +3933,51 @@ msgstr "-N\t\t\tNiet volledig met Vi uitwisselbaar: 'nocompatible'"
#: main.c:3121
msgid "-V[N][fname]\t\tBe verbose [level N] [log messages to fname]"
msgstr "-V[N][fname]\t\twees uitbundig [niveau N] [schrijf berichten naar fname]"
msgstr "-V[N][fname]\t\tWees uitbundig [niveau N] [schrijf berichten naar fname]"
#: main.c:3123
msgid "-D\t\t\tDebugging mode"
msgstr "-D\t\t\tfoutopspoormodus"
msgstr "-D\t\t\tFoutopspoormodus"
#: main.c:3125
msgid "-n\t\t\tNo swap file, use memory only"
msgstr "-n\t\t\tgeen wisselbestand, alleen geheugen gebruiken"
msgstr "-n\t\t\tGeen wisselbestand, alleen geheugen gebruiken"
#: main.c:3126
msgid "-r\t\t\tList swap files and exit"
msgstr "-r\t\t\twisselbestanden tonen en stoppen"
msgstr "-r\t\t\tWisselbestanden tonen en stoppen"
#: main.c:3127
msgid "-r (with file name)\tRecover crashed session"
msgstr "-r (met bestandsnaam)\therstel ontspoorde sessie"
msgstr "-r (bestandsnaam)\tHerstel ontspoorde sessie"
#: main.c:3128
msgid "-L\t\t\tSame as -r"
msgstr "-L\t\t\tgelijk aan -r"
msgstr "-L\t\t\tGelijk aan -r"
#: main.c:3130
msgid "-f\t\t\tDon't use newcli to open window"
msgstr "-f\t\t\tgebruik geen newcli om venster te openen"
msgstr "-f\t\t\tGebruik geen newcli om venster te openen"
#: main.c:3131
msgid "-dev <device>\t\tUse <device> for I/O"
msgstr "-dev <device>\t\tgebruik <device> voor in- en uitvoer"
msgstr "-dev <device>\t\tGebruik <device> voor in- en uitvoer"
#: main.c:3134
msgid "-A\t\t\tstart in Arabic mode"
msgstr ""
msgstr "-A\t\t\tIn Arabische modus starten"
#: main.c:3137
msgid "-H\t\t\tStart in Hebrew mode"
msgstr ""
msgstr "-H\t\t\tIn Hebrewsche modus starten"
#: main.c:3140
msgid "-F\t\t\tStart in Farsi mode"
msgstr ""
msgstr "-F\t\t\tIn Perzische modus starten"
#: main.c:3142
msgid "-T <terminal>\tSet terminal type to <terminal>"
msgstr ""
msgstr "-T <terminal>\tTerminalsoort op <terminal> instellen"
#: main.c:3143
msgid "-u <vimrc>\t\tUse <vimrc> instead of any .vimrc"
@@ -3997,27 +3997,27 @@ msgstr "-p[N]\t\tN tabpagina's openen (standaard: 1 per bestand)"
#: main.c:3150
msgid "-o[N]\t\tOpen N windows (default: one for each file)"
msgstr ""
msgstr "-o[N]\t\tN vensters openen (standaard: 1 per bestand)"
#: main.c:3151
msgid "-O[N]\t\tLike -o but split vertically"
msgstr ""
msgstr "-O[N]\t\tGelijk aan -o maar vertikaal gesplitst"
#: main.c:3153
msgid "+\t\t\tStart at end of file"
msgstr ""
msgstr "+\t\t\tAan einde van bestand beginnen"
#: main.c:3154
msgid "+<lnum>\t\tStart at line <lnum>"
msgstr ""
msgstr "+<lnum>\t\tOp regel <lnum> beginnen"
#: main.c:3155
msgid "--cmd <command>\tExecute <command> before loading any vimrc file"
msgstr ""
msgstr "--cmd <opdracht>\tOpdracht <opdracht> uitvoeren voor enige vimrc-bestand"
#: main.c:3156
msgid "-c <command>\t\tExecute <command> after loading the first file"
msgstr ""
msgstr "-c <opdracht>\t\tOpdracht <opdracht> uitvoeren na eerste bestand"
#: main.c:3157
msgid "-S <session>\t\tSource file <session> after loading the first file"
@@ -4552,124 +4552,139 @@ msgid ""
"You may want to delete the .swp file now.\n"
"\n"
msgstr ""
"\n"
"Het .swp-bestand kan nu verwijderd worden.\n"
"\n"
#. use msg() to start the scrolling properly
#: memline.c:1462
msgid "Swap files found:"
msgstr ""
msgstr "Gevonden wisselbestanden:"
#: memline.c:1649
msgid " In current directory:\n"
msgstr ""
msgstr " In huidige map:\n"
#: memline.c:1651
msgid " Using specified name:\n"
msgstr ""
msgstr " Gebruikt opgegeven naam:\n"
#: memline.c:1655
msgid " In directory "
msgstr ""
msgstr " In map "
#: memline.c:1673
msgid " -- none --\n"
msgstr ""
msgstr " -- geen --\n"
#: memline.c:1748
msgid " owned by: "
msgstr ""
msgstr " eigenaar: "
#: memline.c:1750
msgid " dated: "
msgstr ""
msgstr " datum: "
#: memline.c:1754
#: memline.c:3794
msgid " dated: "
msgstr ""
msgstr " datum: "
#: memline.c:1773
msgid " [from Vim version 3.0]"
msgstr ""
msgstr " [van Vim-versie 3.0]"
#: memline.c:1777
msgid " [does not look like a Vim swap file]"
msgstr ""
msgstr " [lijkt geen Vvim-wisselbestand te zijn]"
#: memline.c:1781
msgid " file name: "
msgstr ""
msgstr " bestandsnaam: "
#: memline.c:1787
msgid ""
"\n"
" modified: "
msgstr ""
"\n"
" bewerkt: "
#: memline.c:1788
msgid "YES"
msgstr ""
msgstr "JA"
#: memline.c:1788
msgid "no"
msgstr ""
msgstr "nee"
#: memline.c:1792
msgid ""
"\n"
" user name: "
msgstr ""
"\n"
" gebruikersnaam: "
#: memline.c:1799
msgid " host name: "
msgstr ""
msgstr " host-naam:"
#: memline.c:1801
msgid ""
"\n"
" host name: "
msgstr ""
"\n"
" host-naam: "
#: memline.c:1807
msgid ""
"\n"
" process ID: "
msgstr ""
"\n"
" proces-id: "
#: memline.c:1813
msgid " (still running)"
msgstr ""
msgstr " (nog actief)"
#: memline.c:1825
msgid ""
"\n"
" [not usable with this version of Vim]"
msgstr ""
"\n"
" [onbruikbaar met deze versie van Vim]"
#: memline.c:1828
msgid ""
"\n"
" [not usable on this computer]"
msgstr ""
"\n"
" [onbruikbaar op deze computer]"
#: memline.c:1833
msgid " [cannot be read]"
msgstr ""
msgstr " [lezen is onmogelijk]"
#: memline.c:1837
msgid " [cannot be opened]"
msgstr ""
msgstr " [openen is onmogelijk]"
#: memline.c:2027
msgid "E313: Cannot preserve, there is no swap file"
msgstr ""
msgstr "E313: kan niet worden behouden, want er is geen wisselbestand"
#: memline.c:2080
msgid "File preserved"
msgstr ""
msgstr "Bestand behouden"
#: memline.c:2082
msgid "E314: Preserve failed"
msgstr ""
msgstr "E314: behouden is mislukt"
#: memline.c:2159
#, c-format
@@ -4735,25 +4750,27 @@ msgstr ""
#: memline.c:3595
#, c-format
msgid "E773: Symlink loop for \"%s\""
msgstr ""
msgstr "E773: Symbolische koppelingslus voor \"%s\""
#: memline.c:3784
msgid "E325: ATTENTION"
msgstr ""
msgstr "E325: OPGELET"
#: memline.c:3785
msgid ""
"\n"
"Found a swap file by the name \""
msgstr ""
"\n"
"Er is een wisselbestand aangetroffen met de naam \""
#: memline.c:3789
msgid "While opening file \""
msgstr ""
msgstr "bij het openen van bestand \""
#: memline.c:3802
msgid " NEWER than swap file!\n"
msgstr ""
msgstr " NIEUWER dan het wisselbestand!\n"
#. Some of these messages are long to allow translation to
#. * other languages.
@@ -4764,30 +4781,38 @@ msgid ""
" If this is the case, be careful not to end up with two\n"
" different instances of the same file when making changes.\n"
msgstr ""
"\n"
"(1) Mogelijk wordt dit bestand met een ander programma bewerkt.\n"
" Als dit het geval is, pas dan op niet met twee verschillende\n"
" versies van hetzelfde bestand te eindigen bij het bewerken.\n"
#: memline.c:3807
msgid " Quit, or continue with caution.\n"
msgstr ""
msgstr " Stop of ga aandachtig verder.\n"
#: memline.c:3808
msgid ""
"\n"
"(2) An edit session for this file crashed.\n"
msgstr ""
"\n"
"(2) Een sessie waarin dit bestand werd bewerkt is onverhoeds gestopt.\n"
#: memline.c:3809
msgid " If this is the case, use \":recover\" or \"vim -r "
msgstr ""
msgstr " Als dit het geval is, gebruikt dan \":recover\" of \"vim -r "
#: memline.c:3811
msgid ""
"\"\n"
" to recover the changes (see \":help recovery\").\n"
msgstr ""
"\"\n"
" om de aanpassingen te herstellen (zie \":help recovery\").\n"
#: memline.c:3812
msgid " If you did this already, delete the swap file \""
msgstr ""
msgstr " Als dit al gedaan is, verwijder dan het wisselbestand \""
#: memline.c:3814
msgid ""
@@ -4795,7 +4820,7 @@ msgid ""
" to avoid this message.\n"
msgstr ""
"\"\n"
" om dit bericht te verkomen.\n"
" om dit bericht te voorkomen.\n"
#: memline.c:4233
#: memline.c:4237
@@ -4823,6 +4848,11 @@ msgid ""
"&Quit\n"
"&Abort"
msgstr ""
"Alleen-lezen &openen\n"
"Toch b&ewerken\n"
"He&rstellen\n"
"&Stoppen\n"
"&Afbreken"
#: memline.c:4251
msgid ""
@@ -4833,28 +4863,34 @@ msgid ""
"&Quit\n"
"&Abort"
msgstr ""
"Alleen-lezen &openen\n"
"Toch b&ewerken\n"
"He&rstellen\n"
"Verwij&deren\n"
"&Stoppen\n"
"&Afbreken"
#: memline.c:4322
msgid "E326: Too many swap files found"
msgstr ""
msgstr "E326: teveel wisselbestanden aangetroffen"
#: menu.c:67
msgid "E327: Part of menu-item path is not sub-menu"
msgstr ""
msgstr "E327: deel van menu-itempad is geen submenu"
#: menu.c:68
msgid "E328: Menu only exists in another mode"
msgstr ""
msgstr "E328: menu bestaat alleen in andere modus"
#: menu.c:69
#, c-format
msgid "E329: No menu \"%s\""
msgstr ""
msgstr "E329: geen menu \"%s\""
#. Only a mnemonic or accelerator is not valid.
#: menu.c:480
msgid "E792: Empty menu name"
msgstr ""
msgstr "E792: menunaam is leeg"
#: menu.c:498
msgid "E330: Menu path must not lead to a sub-menu"
@@ -5203,7 +5239,7 @@ msgstr "E663: einde van wijzigingslijst"
#: normal.c:8854
msgid "Type :quit<Enter> to exit Vim"
msgstr "Typ :quit<Enter> om Vim te verlaten"
msgstr "Typ :quit<Enter> om Vim te verlaten"
#: ops.c:293
#, c-format
@@ -7571,7 +7607,7 @@ msgid "Running in Vi compatible mode"
msgstr "wordt uitgevoerd in Vi compatible-modus"
#: version.c:1119
msgid "type :set nocp<Enter> for Vim defaults"
msgid "type :set nocp<Enter> for Vim defaults"
msgstr "typ :set nocp<Enter> voor standaardinstellingen van Vim"
#: version.c:1120
@@ -7851,11 +7887,11 @@ msgstr ""
#: globals.h:1430
msgid "E19: Mark has invalid line number"
msgstr ""
msgstr "E19: markering heeft een ongeldig regelnummer"
#: globals.h:1431
msgid "E20: Mark not set"
msgstr ""
msgstr "E20: Markering is niet ingesteld"
#: globals.h:1432
msgid "E21: Cannot make changes, 'modifiable' is off"
@@ -7863,7 +7899,7 @@ msgstr "E21: kan geen veranderingen maken, 'modifiable' is uitgeschakeld"
#: globals.h:1433
msgid "E22: Scripts nested too deep"
msgstr ""
msgstr "E22: scripts "
#: globals.h:1434
msgid "E23: No alternate file"
@@ -7912,7 +7948,7 @@ msgstr ""
#: globals.h:1455
msgid "E479: No match"
msgstr ""
msgstr "E479: geen overeenkomst"
#: globals.h:1456
#, c-format
@@ -7946,51 +7982,51 @@ msgstr "E36: onvoldoende ruimte"
#: globals.h:1466
#, c-format
msgid "E247: no registered server named \"%s\""
msgstr ""
msgstr "E247: \"%s\" niet gevonden als geregistreerde server"
#: globals.h:1468
#, c-format
msgid "E482: Can't create file %s"
msgstr ""
msgstr "E482: aanmaken bestand %s is mislukt"
#: globals.h:1469
msgid "E483: Can't get temp file name"
msgstr ""
msgstr "E483: bepalen naam tijdelijk bestand is mislukt"
#: globals.h:1470
#, c-format
msgid "E484: Can't open file %s"
msgstr ""
msgstr "E484: openen bestand %s is mislukt"
#: globals.h:1471
#, c-format
msgid "E485: Can't read file %s"
msgstr ""
msgstr "E485: lezen bestand %s is mislukt"
#: globals.h:1472
msgid "E37: No write since last change (add ! to override)"
msgstr "E37: niets opgeslagen sinds laatste wijziging (voeg ! toe om dit te negeren)"
msgstr "E37: niets opgeslagen sinds laatste wijziging (voeg ! toe om te forceren)"
#: globals.h:1473
msgid "E38: Null argument"
msgstr ""
msgstr "E38: leeg argument (null)"
#: globals.h:1475
msgid "E39: Number expected"
msgstr ""
msgstr "E39: getal verwacht"
#: globals.h:1478
#, c-format
msgid "E40: Can't open errorfile %s"
msgstr ""
msgstr "E40: openen foutenbestand %s is mislukt"
#: globals.h:1481
msgid "E233: cannot open display"
msgstr ""
msgstr "E233: openen scherm is mislukt"
#: globals.h:1483
msgid "E41: Out of memory!"
msgstr ""
msgstr "E41: te weinig geheugen!"
#: globals.h:1485
msgid "Pattern not found"
@@ -8053,7 +8089,7 @@ msgstr "E523: hier niet toegestaan"
#: globals.h:1513
msgid "E359: Screen mode setting not supported"
msgstr ""
msgstr "E359: instelling schermmodus niet ondersteund"
#: globals.h:1515
msgid "E49: Invalid scroll size"
@@ -8101,39 +8137,39 @@ msgstr "E78: onbekende markering"
#: globals.h:1528
msgid "E79: Cannot expand wildcards"
msgstr ""
msgstr "E79: vervangen jokertekens is mislukt"
#: globals.h:1530
msgid "E591: 'winheight' cannot be smaller than 'winminheight'"
msgstr ""
msgstr "E591: 'winheight' kan niet kleiner zijn dan 'winminheight'"
#: globals.h:1532
msgid "E592: 'winwidth' cannot be smaller than 'winminwidth'"
msgstr ""
msgstr "E592: 'winwidth' kan niet kleiner zijn dan 'winminwidth'"
#: globals.h:1535
msgid "E80: Error while writing"
msgstr ""
msgstr "E80: opslaan is mislukt"
#: globals.h:1536
msgid "Zero count"
msgstr ""
msgstr "Aantal is nul"
#: globals.h:1538
msgid "E81: Using <SID> not in a script context"
msgstr ""
msgstr "E81: <SID> wordt buiten de scriptcontext gebruikt"
#: globals.h:1541
msgid "E449: Invalid expression received"
msgstr ""
msgstr "E449: ontvangen expressie is ongeldig"
#: globals.h:1544
msgid "E463: Region is guarded, cannot modify"
msgstr ""
msgstr "E463: Regio is bescherm en kan niet worden veranderd"
#: globals.h:1545
msgid "E744: NetBeans does not allow changes in read-only files"
msgstr ""
msgstr "E744: NetBeans staat geen veranderingen in alleen-lezenbestanden toe"
#: globals.h:1547
#, c-format
@@ -8142,7 +8178,7 @@ msgstr "E685: interne fout: %s"
#: globals.h:1548
msgid "E363: pattern uses more memory than 'maxmempattern'"
msgstr ""
msgstr "E363: patroon gebruikt meer geheugen dan 'maxmempattern'"
#: globals.h:1549
msgid "E749: empty buffer"
+2
View File
@@ -6,4 +6,6 @@ void ex_luado __ARGS((exarg_T *eap));
void ex_luafile __ARGS((exarg_T *eap));
void lua_buffer_free __ARGS((buf_T *buf));
void lua_window_free __ARGS((win_T *win));
void do_luaeval __ARGS((char_u *str, typval_T *arg, typval_T *rettv));
void set_ref_in_lua __ARGS((int copyID));
/* vim: set ft=c : */
+1
View File
@@ -45,6 +45,7 @@ void msg_puts_attr __ARGS((char_u *s, int attr));
void may_clear_sb_text __ARGS((void));
void clear_sb_text __ARGS((void));
void show_sb_text __ARGS((void));
void msg_sb_eol __ARGS((void));
int msg_use_printf __ARGS((void));
void mch_errmsg __ARGS((char *str));
void mch_msg __ARGS((char *str));
+4 -2
View File
@@ -3501,9 +3501,11 @@ win_line(wp, lnum, startrow, endrow, nochange)
char_attr = hl_attr(HLF_N);
#ifdef FEAT_SYN_HL
/* When 'cursorline' is set highlight the line number of
* the current line differently. */
* the current line differently.
* TODO: Can we use CursorLine instead of CursorLineNr
* when CursorLineNr isn't set? */
if (wp->w_p_cul && lnum == wp->w_cursor.lnum)
char_attr = hl_combine_attr(hl_attr(HLF_CUL), char_attr);
char_attr = hl_attr(HLF_CLN);
#endif
}
}
+4
View File
@@ -6538,6 +6538,8 @@ static char *(highlight_init_light[]) =
"Directory term=bold ctermfg=DarkBlue guifg=Blue"),
CENT("LineNr term=underline ctermfg=Brown",
"LineNr term=underline ctermfg=Brown guifg=Brown"),
CENT("CursorLineNr term=bold ctermfg=Brown",
"CursorLineNr term=bold ctermfg=Brown gui=bold guifg=Brown"),
CENT("MoreMsg term=bold ctermfg=DarkGreen",
"MoreMsg term=bold ctermfg=DarkGreen gui=bold guifg=SeaGreen"),
CENT("Question term=standout ctermfg=DarkGreen",
@@ -6626,6 +6628,8 @@ static char *(highlight_init_dark[]) =
"Directory term=bold ctermfg=LightCyan guifg=Cyan"),
CENT("LineNr term=underline ctermfg=Yellow",
"LineNr term=underline ctermfg=Yellow guifg=Yellow"),
CENT("CursorLineNr term=bold ctermfg=Yellow",
"CursorLineNr term=bold ctermfg=Yellow gui=bold guifg=Yellow"),
CENT("MoreMsg term=bold ctermfg=LightGreen",
"MoreMsg term=bold ctermfg=LightGreen gui=bold guifg=SeaGreen"),
CENT("Question term=standout ctermfg=LightGreen",
+3 -1
View File
@@ -13,6 +13,7 @@ VIMPROG = /vim
# test25 uses symbolic link
# test27 can't edit file with "*"
# test52 only for Win32
# test85 no Lua interface
SCRIPTS = test1.out test3.out test4.out test5.out test6.out \
test7.out test8.out test9.out \
@@ -29,7 +30,7 @@ SCRIPTS = test1.out test3.out test4.out test5.out test6.out \
test66.out test67.out test68.out test69.out test70.out \
test71.out test72.out test73.out test74.out test75.out \
test76.out test77.out test78.out test79.out test80.out \
test81.out test82.out test83.out
test81.out test82.out test83.out test84.out
.SUFFIXES: .in .out
@@ -132,3 +133,4 @@ test80.out: test80.in
test81.out: test81.in
test82.out: test82.in
test83.out: test83.in
test84.out: test84.in
+4 -2
View File
@@ -29,7 +29,8 @@ SCRIPTS = test3.out test4.out test5.out test6.out test7.out \
test42.out test52.out test65.out test66.out test67.out \
test68.out test69.out test71.out test72.out test73.out \
test74.out test75.out test76.out test77.out test78.out \
test79.out test80.out test81.out test82.out test83.out
test79.out test80.out test81.out test82.out test83.out \
test84.out test85.out
SCRIPTS32 = test50.out test70.out
@@ -51,7 +52,8 @@ win32: fixff $(SCRIPTS16) $(SCRIPTS) $(SCRIPTS32)
fixff:
-$(VIMPROG) -u dos.vim --noplugin "+argdo set ff=dos|upd" +q *.in *.ok
-$(VIMPROG) -u dos.vim --noplugin "+argdo set ff=unix|upd" +q dotest.in
-$(VIMPROG) -u dos.vim --noplugin "+argdo set ff=unix|upd" +q \
dotest.in test60.ok test71.ok test74.ok
clean:
-del *.out
+4 -1
View File
@@ -49,7 +49,8 @@ SCRIPTS = test3.out test4.out test5.out test6.out test7.out \
test42.out test52.out test65.out test66.out test67.out \
test68.out test69.out test71.out test72.out test73.out \
test74.out test75.out test76.out test77.out test78.out \
test79.out test80.out test81.out test82.out test83.out
test79.out test80.out test81.out test82.out test83.out \
test84.out test85.out
SCRIPTS32 = test50.out test70.out
@@ -74,6 +75,8 @@ win32: fixff $(SCRIPTS16) $(SCRIPTS) $(SCRIPTS32)
fixff:
-$(VIMPROG) -u dos.vim --noplugin "+argdo set ff=dos|upd" +q *.in *.ok
-$(VIMPROG) -u dos.vim --noplugin "+argdo set ff=unix|upd" +q \
dotest.in test60.ok test71.ok test74.ok
clean:
-$(DEL) *.out
+2 -1
View File
@@ -13,6 +13,7 @@ VIMPROG = ../vim.exe
# test25 uses symbolic link
# test27 can't edit file with "*" in file name
# test52 only for Win32
# test85 no Lua interface
SCRIPTS = test1.out test3.out test4.out test5.out test6.out \
test7.out test8.out test9.out \
@@ -29,7 +30,7 @@ SCRIPTS = test1.out test3.out test4.out test5.out test6.out \
test66.out test67.out test68.out test69.out test70.out \
test71.out test72.out test73.out test74.out test75.out \
test76.out test77.out test78.out test79.out test80.out \
test81.out test82.out test83.out
test81.out test82.out test83.out test84.out
.SUFFIXES: .in .out
+3 -2
View File
@@ -4,7 +4,7 @@
# Authors: Zoltan Arpadffy, <arpadffy@polarhome.com>
# Sandor Kopanyi, <sandor.kopanyi@mailbox.hu>
#
# Last change: 2011 Jul 15
# Last change: 2012 Apr 05
#
# This has been tested on VMS 6.2 to 8.3 on DEC Alpha, VAX and IA64.
# Edit the lines in the Configuration section below to select.
@@ -76,7 +76,7 @@ SCRIPT = test1.out test2.out test3.out test4.out test5.out \
test66.out test67.out test68.out test69.out \
test71.out test72.out test74.out test75.out test76.out \
test77.out test78.out test79.out test80.out test81.out \
test82.out test83.out
test82.out test83.out test84.out
# Known problems:
# Test 30: a problem around mac format - unknown reason
@@ -89,6 +89,7 @@ SCRIPT = test1.out test2.out test3.out test4.out test5.out \
# with too many dots).
#
# Test 72: unknown reason
# Test 85: no Lua interface
.IFDEF WANT_GUI
SCRIPT_GUI = test16.out
+2 -1
View File
@@ -26,7 +26,8 @@ SCRIPTS = test1.out test2.out test3.out test4.out test5.out test6.out \
test64.out test65.out test66.out test67.out test68.out \
test69.out test70.out test71.out test72.out test73.out \
test74.out test75.out test76.out test77.out test78.out \
test79.out test80.out test81.out test82.out test83.out
test79.out test80.out test81.out test82.out test83.out \
test84.out test85.out
SCRIPTS_GUI = test16.out
+8
View File
@@ -15,6 +15,7 @@ If Vim was not compiled with the +multi_byte feature, the mbyte.vim script will
be set like small.vim above. mbyte.vim is sourced by tests that require the
+multi_byte feature.
Similar logic is applied to the +mzscheme feature, using mzscheme.vim.
Similar logic is applied to the +lua feature, using lua.vim.
STARTTEST
:" Write a single line to test.out to check if testing works at all.
@@ -28,10 +29,17 @@ w! test.out
qa!
:w! mbyte.vim
:w! mzscheme.vim
:w! lua.vim
:"
:" If +multi_byte feature supported, make mbyte.vim empty.
:if has("multi_byte") | sp another | w! mbyte.vim | q | endif
:"
:" If +mzscheme feature supported, make mzscheme.vim empty.
:if has("mzscheme") | sp another | w! mzscheme.vim | q | endif
:"
:" If +lua feature supported, make lua.vim empty.
:if has("lua") | sp another | w! lua.vim | q | endif
:"
:" If +eval feature supported quit here, leaving tiny.vim and small.vim empty.
:" Otherwise write small.vim to skip the test.
:if 1 | q! | endif
+214
View File
@@ -1573,6 +1573,220 @@ void func(void)
baz();
}
STARTTEST
:set cino=k2s,(0
2kdd3j=][
ENDTEST
void func(void)
{
if (condition1
&& condition2)
action();
function(argument1
&& argument2);
if (c1 && (c2 ||
c3))
foo;
if (c1 &&
(c2 || c3))
{
}
if ( c1
&& ( c2
|| c3))
foo;
func( c1
&& ( c2
|| c3))
foo;
}
STARTTEST
:set cino=k2s,(s
2kdd3j=][
ENDTEST
void func(void)
{
if (condition1
&& condition2)
action();
function(argument1
&& argument2);
if (c1 && (c2 ||
c3))
foo;
if (c1 &&
(c2 || c3))
{
}
if ( c1
&& ( c2
|| c3))
foo;
func( c1
&& ( c2
|| c3))
foo;
}
STARTTEST
:set cino=k2s,(s,U1
2kdd3j=][
ENDTEST
void func(void)
{
if (condition1
&& condition2)
action();
function(argument1
&& argument2);
if (c1 && (c2 ||
c3))
foo;
if (c1 &&
(c2 || c3))
{
}
if (c123456789
&& (c22345
|| c3))
printf("foo\n");
c = c1 &&
(
c2 ||
c3
) && c4;
}
STARTTEST
:set cino=k2s,(0,W4
2kdd3j=][
ENDTEST
void func(void)
{
if (condition1
&& condition2)
action();
function(argument1
&& argument2);
if (c1 && (c2 ||
c3))
foo;
if (c1 &&
(c2 || c3))
{
}
if (c123456789
&& (c22345
|| c3))
printf("foo\n");
if ( c1
&& ( c2
|| c3))
foo;
a_long_line(
argument,
argument);
a_short_line(argument,
argument);
}
STARTTEST
:set cino=k2s,u2
2kdd3j=][
ENDTEST
void func(void)
{
if (condition1
&& condition2)
action();
function(argument1
&& argument2);
if (c1 && (c2 ||
c3))
foo;
if (c1 &&
(c2 || c3))
{
}
if (c123456789
&& (c22345
|| c3))
printf("foo\n");
}
STARTTEST
:set cino=k2s,(0,w1
2kdd3j=][
ENDTEST
void func(void)
{
if (condition1
&& condition2)
action();
function(argument1
&& argument2);
if (c1 && (c2 ||
c3))
foo;
if (c1 &&
(c2 || c3))
{
}
if (c123456789
&& (c22345
|| c3))
printf("foo\n");
if ( c1
&& ( c2
|| c3))
foo;
func( c1
&& ( c2
|| c3))
foo;
}
STARTTEST
:set cino=k2,(s
2kdd3j=][
ENDTEST
void func(void)
{
if (condition1
&& condition2)
action();
function(argument1
&& argument2);
if (c1 && (c2 ||
c3))
foo;
if (c1 &&
(c2 || c3))
{
}
}
STARTTEST
:set cino=N-s
/^NAMESPACESTART
+186
View File
@@ -1411,6 +1411,192 @@ void func(void)
}
void func(void)
{
if (condition1
&& condition2)
action();
function(argument1
&& argument2);
if (c1 && (c2 ||
c3))
foo;
if (c1 &&
(c2 || c3))
{
}
if ( c1
&& ( c2
|| c3))
foo;
func( c1
&& ( c2
|| c3))
foo;
}
void func(void)
{
if (condition1
&& condition2)
action();
function(argument1
&& argument2);
if (c1 && (c2 ||
c3))
foo;
if (c1 &&
(c2 || c3))
{
}
if ( c1
&& ( c2
|| c3))
foo;
func( c1
&& ( c2
|| c3))
foo;
}
void func(void)
{
if (condition1
&& condition2)
action();
function(argument1
&& argument2);
if (c1 && (c2 ||
c3))
foo;
if (c1 &&
(c2 || c3))
{
}
if (c123456789
&& (c22345
|| c3))
printf("foo\n");
c = c1 &&
(
c2 ||
c3
) && c4;
}
void func(void)
{
if (condition1
&& condition2)
action();
function(argument1
&& argument2);
if (c1 && (c2 ||
c3))
foo;
if (c1 &&
(c2 || c3))
{
}
if (c123456789
&& (c22345
|| c3))
printf("foo\n");
if ( c1
&& ( c2
|| c3))
foo;
a_long_line(
argument,
argument);
a_short_line(argument,
argument);
}
void func(void)
{
if (condition1
&& condition2)
action();
function(argument1
&& argument2);
if (c1 && (c2 ||
c3))
foo;
if (c1 &&
(c2 || c3))
{
}
if (c123456789
&& (c22345
|| c3))
printf("foo\n");
}
void func(void)
{
if (condition1
&& condition2)
action();
function(argument1
&& argument2);
if (c1 && (c2 ||
c3))
foo;
if (c1 &&
(c2 || c3))
{
}
if (c123456789
&& (c22345
|| c3))
printf("foo\n");
if ( c1
&& ( c2
|| c3))
foo;
func( c1
&& ( c2
|| c3))
foo;
}
void func(void)
{
if (condition1
&& condition2)
action();
function(argument1
&& argument2);
if (c1 && (c2 ||
c3))
foo;
if (c1 &&
(c2 || c3))
{
}
}
NAMESPACESTART
/* valid namespaces with normal indent */
namespace
+35
View File
@@ -0,0 +1,35 @@
Tests for curswant not changing when setting an option
STARTTEST
:so small.vim
:/^start target options$/+1,/^end target options$/-1 yank
:let target_option_names = split(@0)
:function TestCurswant(option_name)
: normal! ggf8j
: let curswant_before = winsaveview().curswant
: execute 'let' '&'.a:option_name '=' '&'.a:option_name
: let curswant_after = winsaveview().curswant
: return [a:option_name, curswant_before, curswant_after]
:endfunction
:
:new
:put =['1234567890', '12345']
:1 delete _
:let result = []
:for option_name in target_option_names
: call add(result, TestCurswant(option_name))
:endfor
:
:new
:put =map(copy(result), 'join(v:val, '' '')')
:1 delete _
:write test.out
:
:qall!
ENDTEST
start target options
tabstop
timeoutlen
ttimeoutlen
end target options
+3
View File
@@ -0,0 +1,3 @@
tabstop 7 4
timeoutlen 7 7
ttimeoutlen 7 7
+42
View File
@@ -0,0 +1,42 @@
Test for Lua interface and luaeval() function
STARTTEST
:so small.vim
:so lua.vim
:set nocompatible viminfo+=nviminfo
:lua l = vim.list():add"item0":add"dictionary with list OK":add"item2"
:lua h = vim.dict(); h.list = l
:call garbagecollect()
/^1
:" change buffer contents
:lua curbuf = vim.buffer()
:lua curline = vim.eval"line('.')"
:lua curbuf[curline] = "1 changed line 1"
:" scalar test
:let tmp_string = luaeval('"string"')
:let tmp_1000 = luaeval('1000')
:if printf("%s%.0f", tmp_string, tmp_1000) == "string1000"
:let scalar_res = "OK"
:else
:let scalar_res = "FAILED"
:endif
:call append(search("^1"), "scalar test " . scalar_res)
:" dictionary containing a list
:let tmp = luaeval("h").list[1]
:/^2/put =tmp
:" circular list (at the same time test lists containing lists)
:lua l[2] = l
:let l2 = luaeval("h").list
:if l2[2] == l2
:let res = "OK"
:else
:let res = "FAILED"
:endif
:call setline(search("^3"), "circular test " . res)
:?^1?,$w! test.out
:qa!
ENDTEST
1 line 1
2 line 2
3 line 3
+5
View File
@@ -0,0 +1,5 @@
1 changed line 1
scalar test OK
2 line 2
dictionary with list OK
circular test OK
+42
View File
@@ -729,6 +729,48 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
496,
/**/
495,
/**/
494,
/**/
493,
/**/
492,
/**/
491,
/**/
490,
/**/
489,
/**/
488,
/**/
487,
/**/
486,
/**/
485,
/**/
484,
/**/
483,
/**/
482,
/**/
481,
/**/
480,
/**/
479,
/**/
478,
/**/
477,
/**/
476,
/**/
475,
/**/
+2 -1
View File
@@ -1321,6 +1321,7 @@ typedef enum
, HLF_M /* "--More--" message */
, HLF_CM /* Mode (e.g., "-- INSERT --") */
, HLF_N /* line number for ":number" and ":#" commands */
, HLF_CLN /* current line number */
, HLF_R /* return to continue message and yes/no questions */
, HLF_S /* status lines */
, HLF_SNC /* status lines of not-current windows */
@@ -1358,7 +1359,7 @@ typedef enum
/* The HL_FLAGS must be in the same order as the HLF_ enums!
* When changing this also adjust the default for 'highlight'. */
#define HL_FLAGS {'8', '@', 'd', 'e', 'h', 'i', 'l', 'm', 'M', \
'n', 'r', 's', 'S', 'c', 't', 'v', 'V', 'w', 'W', \
'n', 'N', 'r', 's', 'S', 'c', 't', 'v', 'V', 'w', 'W', \
'f', 'F', 'A', 'C', 'D', 'T', '-', '>', \
'B', 'P', 'R', 'L', \
'+', '=', 'x', 'X', '*', '#', '_', '!', '.', 'o'}