mirror of
https://github.com/vim/vim.git
synced 2025-09-04 21:33:48 -04:00
updated for version 7.0045
This commit is contained in:
parent
10de2da0f5
commit
677ee6890d
2
Filelist
2
Filelist
@ -74,7 +74,7 @@ SRC_ALL2 = \
|
|||||||
src/main.aap \
|
src/main.aap \
|
||||||
src/testdir/main.aap \
|
src/testdir/main.aap \
|
||||||
src/testdir/*.in \
|
src/testdir/*.in \
|
||||||
src/testdir/*.ok \
|
src/testdir/test[0-9]*.ok \
|
||||||
src/testdir/test49.vim \
|
src/testdir/test49.vim \
|
||||||
src/proto.h \
|
src/proto.h \
|
||||||
src/proto/buffer.pro \
|
src/proto/buffer.pro \
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
*autocmd.txt* For Vim version 7.0aa. Last change: 2004 Dec 24
|
*autocmd.txt* For Vim version 7.0aa. Last change: 2005 Jan 26
|
||||||
|
|
||||||
|
|
||||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||||
@ -495,7 +495,7 @@ InsertChange When typing <Insert> while in Insert or
|
|||||||
anything else that the user does not expect.
|
anything else that the user does not expect.
|
||||||
*InsertLeave*
|
*InsertLeave*
|
||||||
InsertLeave When leaving Insert mode. Also when using
|
InsertLeave When leaving Insert mode. Also when using
|
||||||
CTRL-O |i_CTRL-O|.
|
CTRL-O |i_CTRL-O|. But not for |i_CTRL-C|.
|
||||||
*FileEncoding*
|
*FileEncoding*
|
||||||
FileEncoding Obsolete. It still works and is equivalent
|
FileEncoding Obsolete. It still works and is equivalent
|
||||||
to |EncodingChanged|.
|
to |EncodingChanged|.
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
*eval.txt* For Vim version 7.0aa. Last change: 2005 Jan 25
|
*eval.txt* For Vim version 7.0aa. Last change: 2005 Jan 27
|
||||||
|
|
||||||
|
|
||||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||||
@ -1458,6 +1458,7 @@ inputsave() Number save and clear typeahead
|
|||||||
inputsecret( {prompt} [, {text}]) String like input() but hiding the text
|
inputsecret( {prompt} [, {text}]) String like input() but hiding the text
|
||||||
insert( {list}, {item} [, {idx}]) List insert {item} in {list} [before {idx}]
|
insert( {list}, {item} [, {idx}]) List insert {item} in {list} [before {idx}]
|
||||||
isdirectory( {directory}) Number TRUE if {directory} is a directory
|
isdirectory( {directory}) Number TRUE if {directory} is a directory
|
||||||
|
items( {dict}) List List of key-value pairs in {dict}
|
||||||
join( {list} [, {sep}]) String join {list} items into one String
|
join( {list} [, {sep}]) String join {list} items into one String
|
||||||
keys( {dict}) List List of keys in {dict}
|
keys( {dict}) List List of keys in {dict}
|
||||||
len( {expr}) Number the length of {expr}
|
len( {expr}) Number the length of {expr}
|
||||||
@ -1519,7 +1520,8 @@ string( {expr}) String String representation of {expr} value
|
|||||||
strlen( {expr}) Number length of the String {expr}
|
strlen( {expr}) Number length of the String {expr}
|
||||||
strpart( {src}, {start}[, {len}])
|
strpart( {src}, {start}[, {len}])
|
||||||
String {len} characters of {src} at {start}
|
String {len} characters of {src} at {start}
|
||||||
strridx( {haystack}, {needle}) Number last index of {needle} in {haystack}
|
strridx( {haystack}, {needle} [, {start}])
|
||||||
|
Number last index of {needle} in {haystack}
|
||||||
strtrans( {expr}) String translate string to make it printable
|
strtrans( {expr}) String translate string to make it printable
|
||||||
submatch( {nr}) String specific match in ":substitute"
|
submatch( {nr}) String specific match in ":substitute"
|
||||||
substitute( {expr}, {pat}, {sub}, {flags})
|
substitute( {expr}, {pat}, {sub}, {flags})
|
||||||
@ -1535,6 +1537,7 @@ toupper( {expr}) String the String {expr} switched to uppercase
|
|||||||
tr( {src}, {fromstr}, {tostr}) String translate chars of {src} in {fromstr}
|
tr( {src}, {fromstr}, {tostr}) String translate chars of {src} in {fromstr}
|
||||||
to chars in {tostr}
|
to chars in {tostr}
|
||||||
type( {name}) Number type of variable {name}
|
type( {name}) Number type of variable {name}
|
||||||
|
values( {dict}) List List of values in {dict}
|
||||||
virtcol( {expr}) Number screen column of cursor or mark
|
virtcol( {expr}) Number screen column of cursor or mark
|
||||||
visualmode( [expr]) String last visual mode used
|
visualmode( [expr]) String last visual mode used
|
||||||
winbufnr( {nr}) Number buffer number of window {nr}
|
winbufnr( {nr}) Number buffer number of window {nr}
|
||||||
@ -2266,7 +2269,7 @@ function({name}) *function()* *E700*
|
|||||||
{name} can be a user defined function or an internal function.
|
{name} can be a user defined function or an internal function.
|
||||||
|
|
||||||
|
|
||||||
get({list}, {idx} [, {default}]) *get*
|
get({list}, {idx} [, {default}]) *get()*
|
||||||
Get item {idx} from List {list}. When this item is not
|
Get item {idx} from List {list}. When this item is not
|
||||||
available return {default}. Return zero when {default} is
|
available return {default}. Return zero when {default} is
|
||||||
omitted.
|
omitted.
|
||||||
@ -2780,6 +2783,11 @@ isdirectory({directory}) *isdirectory()*
|
|||||||
exist, or isn't a directory, the result is FALSE. {directory}
|
exist, or isn't a directory, the result is FALSE. {directory}
|
||||||
is any expression, which is used as a String.
|
is any expression, which is used as a String.
|
||||||
|
|
||||||
|
items({dict}) *items()*
|
||||||
|
Return a List with all the key-value pairs of {dict}. Each
|
||||||
|
List item is a list with two items: the key of a {dict} entry
|
||||||
|
and the value of this entry. The List is in arbitrary order.
|
||||||
|
|
||||||
|
|
||||||
join({list} [, {sep}]) *join()*
|
join({list} [, {sep}]) *join()*
|
||||||
Join the items in {list} together into one String.
|
Join the items in {list} together into one String.
|
||||||
@ -3517,12 +3525,15 @@ strftime({format} [, {time}]) *strftime()*
|
|||||||
stridx({haystack}, {needle} [, {start}]) *stridx()*
|
stridx({haystack}, {needle} [, {start}]) *stridx()*
|
||||||
The result is a Number, which gives the byte index in
|
The result is a Number, which gives the byte index in
|
||||||
{haystack} of the first occurrence of the String {needle}.
|
{haystack} of the first occurrence of the String {needle}.
|
||||||
If {start} is specified, the String {needle} is searched from
|
If {start} is specified, the search starts at index {start}.
|
||||||
the byte index {start} in the String {haystack}.
|
This can be used to find a second match: >
|
||||||
The search is done case-sensitive.
|
:let comma1 = stridx(line, ",")
|
||||||
|
:let comma2 = stridx(line, ",", comma1 + 1)
|
||||||
|
< The search is done case-sensitive.
|
||||||
For pattern searches use |match()|.
|
For pattern searches use |match()|.
|
||||||
-1 is returned if the {needle} does not occur in {haystack}.
|
-1 is returned if the {needle} does not occur in {haystack}.
|
||||||
See also |strridx()|. Examples: >
|
See also |strridx()|.
|
||||||
|
Examples: >
|
||||||
:echo stridx("An Example", "Example") 3
|
:echo stridx("An Example", "Example") 3
|
||||||
:echo stridx("Starting point", "Start") 0
|
:echo stridx("Starting point", "Start") 0
|
||||||
:echo stridx("Starting point", "start") -1
|
:echo stridx("Starting point", "start") -1
|
||||||
@ -3565,10 +3576,15 @@ strpart({src}, {start}[, {len}]) *strpart()*
|
|||||||
example, to get three bytes under and after the cursor: >
|
example, to get three bytes under and after the cursor: >
|
||||||
strpart(getline(line(".")), col(".") - 1, 3)
|
strpart(getline(line(".")), col(".") - 1, 3)
|
||||||
<
|
<
|
||||||
strridx({haystack}, {needle}) *strridx()*
|
strridx({haystack}, {needle} [, {start}]) *strridx()*
|
||||||
The result is a Number, which gives the index in {haystack} of
|
The result is a Number, which gives the byte index in
|
||||||
the last occurrence of the String {needle}.
|
{haystack} of the last occurrence of the String {needle}.
|
||||||
The search is done case-sensitive.
|
When {start} is specified, matches beyond this index are
|
||||||
|
ignored. This can be used to find a match before a previous
|
||||||
|
match: >
|
||||||
|
:let lastcomma = strridx(line, ",")
|
||||||
|
:let comma2 = strridx(line, ",", lastcomma - 1)
|
||||||
|
< The search is done case-sensitive.
|
||||||
For pattern searches use |match()|.
|
For pattern searches use |match()|.
|
||||||
-1 is returned if the {needle} does not occur in {haystack}.
|
-1 is returned if the {needle} does not occur in {haystack}.
|
||||||
If the {needle} is empty the length of {haystack} is returned.
|
If the {needle} is empty the length of {haystack} is returned.
|
||||||
@ -3742,6 +3758,11 @@ type({expr}) The result is a Number, depending on the type of {expr}:
|
|||||||
:if type(myvar) == type(function("tr"))
|
:if type(myvar) == type(function("tr"))
|
||||||
:if type(myvar) == type([])
|
:if type(myvar) == type([])
|
||||||
|
|
||||||
|
values({dict}) *values()*
|
||||||
|
Return a List with all the values of {dict}. The List is in
|
||||||
|
arbitrary order.
|
||||||
|
|
||||||
|
|
||||||
virtcol({expr}) *virtcol()*
|
virtcol({expr}) *virtcol()*
|
||||||
The result is a Number, which is the screen column of the file
|
The result is a Number, which is the screen column of the file
|
||||||
position given with {expr}. That is, the last screen position
|
position given with {expr}. That is, the last screen position
|
||||||
@ -4161,17 +4182,15 @@ Example: >
|
|||||||
: echohl Title
|
: echohl Title
|
||||||
: echo a:title
|
: echo a:title
|
||||||
: echohl None
|
: echohl None
|
||||||
: let idx = 1
|
: echo a:0 . " items:"
|
||||||
: while idx <= a:0
|
: for s in a:000
|
||||||
: echo a:{idx} . ' '
|
: echon ' ' . s
|
||||||
: let idx = idx + 1
|
: endfor
|
||||||
: endwhile
|
|
||||||
: return idx
|
|
||||||
:endfunction
|
:endfunction
|
||||||
|
|
||||||
This function can then be called with: >
|
This function can then be called with: >
|
||||||
let lines = Table("Table", "line1", "line2")
|
call Table("Table", "line1", "line2")
|
||||||
let lines = Table("Empty Table")
|
call Table("Empty Table")
|
||||||
|
|
||||||
To return more than one value, pass the name of a global variable: >
|
To return more than one value, pass the name of a global variable: >
|
||||||
:function Compute(n1, n2, divname)
|
:function Compute(n1, n2, divname)
|
||||||
@ -4411,7 +4430,7 @@ This would call the function "my_func_whizz(parameter)".
|
|||||||
List item.
|
List item.
|
||||||
|
|
||||||
:let [{name}, ..., ; {lastname}] = {expr1}
|
:let [{name}, ..., ; {lastname}] = {expr1}
|
||||||
Like |let-unpack| above, but the List may have more
|
Like |:let-unpack| above, but the List may have more
|
||||||
items than there are names. A list of the remaining
|
items than there are names. A list of the remaining
|
||||||
items is assigned to {lastname}. If there are no
|
items is assigned to {lastname}. If there are no
|
||||||
remaining items {lastname} is set to an empty list.
|
remaining items {lastname} is set to an empty list.
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
*insert.txt* For Vim version 7.0aa. Last change: 2005 Jan 05
|
*insert.txt* For Vim version 7.0aa. Last change: 2005 Jan 26
|
||||||
|
|
||||||
|
|
||||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||||
@ -53,7 +53,8 @@ char action ~
|
|||||||
yourself to use CTRL-[.
|
yourself to use CTRL-[.
|
||||||
*i_CTRL-C*
|
*i_CTRL-C*
|
||||||
CTRL-C Quit insert mode, go back to Normal mode. Do not check for
|
CTRL-C Quit insert mode, go back to Normal mode. Do not check for
|
||||||
abbreviations.
|
abbreviations. Does not trigger the |InsertLeave| autocommand
|
||||||
|
event.
|
||||||
|
|
||||||
*i_CTRL-@*
|
*i_CTRL-@*
|
||||||
CTRL-@ Insert previously inserted text and stop insert. {Vi: only
|
CTRL-@ Insert previously inserted text and stop insert. {Vi: only
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
*options.txt* For Vim version 7.0aa. Last change: 2005 Jan 14
|
*options.txt* For Vim version 7.0aa. Last change: 2005 Jan 26
|
||||||
|
|
||||||
|
|
||||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||||
@ -2738,7 +2738,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
|||||||
A pattern that is used to recognize a list header. This is used for
|
A pattern that is used to recognize a list header. This is used for
|
||||||
the "n" flag in 'formatoptions'.
|
the "n" flag in 'formatoptions'.
|
||||||
The pattern must match exactly the text that will be the indent for
|
The pattern must match exactly the text that will be the indent for
|
||||||
the line below it. You can use |\ze| to mark the end of the match
|
the line below it. You can use |/\ze| to mark the end of the match
|
||||||
while still checking more characters. There must be a character
|
while still checking more characters. There must be a character
|
||||||
following the pattern, when it matches the whole line it is handled
|
following the pattern, when it matches the whole line it is handled
|
||||||
like there is no match.
|
like there is no match.
|
||||||
@ -4656,7 +4656,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
|||||||
List of items that control the format of the output of |:hardcopy|.
|
List of items that control the format of the output of |:hardcopy|.
|
||||||
See |popt-option|.
|
See |popt-option|.
|
||||||
|
|
||||||
*'quoteescape''* *'qe'*
|
*'quoteescape'* *'qe'*
|
||||||
'quoteescape' 'qe' string (default "\")
|
'quoteescape' 'qe' string (default "\")
|
||||||
local to buffer
|
local to buffer
|
||||||
{not in Vi}
|
{not in Vi}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
*pattern.txt* For Vim version 7.0aa. Last change: 2005 Jan 24
|
*pattern.txt* For Vim version 7.0aa. Last change: 2005 Jan 26
|
||||||
|
|
||||||
|
|
||||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||||
@ -1027,7 +1027,7 @@ x A single character, with no special meaning, matches itself
|
|||||||
< Matches the words "r", "re", "ro", "rea", "roa", "read" and "road".
|
< Matches the words "r", "re", "ro", "rea", "roa", "read" and "road".
|
||||||
{not available when compiled without the +syntax feature}
|
{not available when compiled without the +syntax feature}
|
||||||
|
|
||||||
*/\%d* */\%x* */\%o* */\%u* */\%U/* *E678*
|
*/\%d* */\%x* */\%o* */\%u* */\%U* *E678*
|
||||||
|
|
||||||
\%d123 Matches the character specified with a decimal number. Must be
|
\%d123 Matches the character specified with a decimal number. Must be
|
||||||
followed by a non-digit.
|
followed by a non-digit.
|
||||||
|
@ -740,7 +740,7 @@ One may rename a block of files and directories by selecting them with
|
|||||||
the V (|linewise-visual|).
|
the V (|linewise-visual|).
|
||||||
|
|
||||||
|
|
||||||
HIDING FILES OR DIRECTORIES *g:netrw-a* *g:netrw_list_hide*
|
HIDING FILES OR DIRECTORIES *netrw-a* *g:netrw_list_hide*
|
||||||
|
|
||||||
Netrw's browsing facility allows one to use the hiding list in one of
|
Netrw's browsing facility allows one to use the hiding list in one of
|
||||||
three ways: ignore it, hide files which match, and show only those files
|
three ways: ignore it, hide files which match, and show only those files
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
*syntax.txt* For Vim version 7.0aa. Last change: 2004 Dec 09
|
*syntax.txt* For Vim version 7.0aa. Last change: 2005 Jan 26
|
||||||
|
|
||||||
|
|
||||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||||
@ -631,6 +631,8 @@ c_space_errors trailing white space and spaces before a <Tab>
|
|||||||
c_no_trail_space_error ... but no trailing spaces
|
c_no_trail_space_error ... but no trailing spaces
|
||||||
c_no_tab_space_error ... but no spaces before a <Tab>
|
c_no_tab_space_error ... but no spaces before a <Tab>
|
||||||
c_no_bracket_error don't highlight {}; inside [] as errors
|
c_no_bracket_error don't highlight {}; inside [] as errors
|
||||||
|
c_no_curly_error don't highlight {}; inside [] and () as errors;
|
||||||
|
except { and } in first column
|
||||||
c_no_ansi don't do standard ANSI types and constants
|
c_no_ansi don't do standard ANSI types and constants
|
||||||
c_ansi_typedefs ... but do standard ANSI types
|
c_ansi_typedefs ... but do standard ANSI types
|
||||||
c_ansi_constants ... but do standard ANSI constants
|
c_ansi_constants ... but do standard ANSI constants
|
||||||
|
@ -639,7 +639,7 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
|
|||||||
'pvw' options.txt /*'pvw'*
|
'pvw' options.txt /*'pvw'*
|
||||||
'qe' options.txt /*'qe'*
|
'qe' options.txt /*'qe'*
|
||||||
'quote motion.txt /*'quote*
|
'quote motion.txt /*'quote*
|
||||||
'quoteescape'' options.txt /*'quoteescape''*
|
'quoteescape' options.txt /*'quoteescape'*
|
||||||
'readonly' options.txt /*'readonly'*
|
'readonly' options.txt /*'readonly'*
|
||||||
'redraw' vi_diff.txt /*'redraw'*
|
'redraw' vi_diff.txt /*'redraw'*
|
||||||
'remap' options.txt /*'remap'*
|
'remap' options.txt /*'remap'*
|
||||||
@ -1226,7 +1226,7 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
|
|||||||
/\%>c pattern.txt /*\/\\%>c*
|
/\%>c pattern.txt /*\/\\%>c*
|
||||||
/\%>l pattern.txt /*\/\\%>l*
|
/\%>l pattern.txt /*\/\\%>l*
|
||||||
/\%>v pattern.txt /*\/\\%>v*
|
/\%>v pattern.txt /*\/\\%>v*
|
||||||
/\%U/ pattern.txt /*\/\\%U\/*
|
/\%U pattern.txt /*\/\\%U*
|
||||||
/\%[] pattern.txt /*\/\\%[]*
|
/\%[] pattern.txt /*\/\\%[]*
|
||||||
/\%^ pattern.txt /*\/\\%^*
|
/\%^ pattern.txt /*\/\\%^*
|
||||||
/\%c pattern.txt /*\/\\%c*
|
/\%c pattern.txt /*\/\\%c*
|
||||||
@ -1581,6 +1581,7 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
|
|||||||
:, cmdline.txt /*:,*
|
:, cmdline.txt /*:,*
|
||||||
:. cmdline.txt /*:.*
|
:. cmdline.txt /*:.*
|
||||||
:/ cmdline.txt /*:\/*
|
:/ cmdline.txt /*:\/*
|
||||||
|
:0file editing.txt /*:0file*
|
||||||
::. cmdline.txt /*::.*
|
::. cmdline.txt /*::.*
|
||||||
::8 cmdline.txt /*::8*
|
::8 cmdline.txt /*::8*
|
||||||
::e cmdline.txt /*::e*
|
::e cmdline.txt /*::e*
|
||||||
@ -1606,13 +1607,11 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
|
|||||||
:@ repeat.txt /*:@*
|
:@ repeat.txt /*:@*
|
||||||
:@: repeat.txt /*:@:*
|
:@: repeat.txt /*:@:*
|
||||||
:@@ repeat.txt /*:@@*
|
:@@ repeat.txt /*:@@*
|
||||||
:Explore pi_expl.txt /*:Explore*
|
|
||||||
:Man filetype.txt /*:Man*
|
:Man filetype.txt /*:Man*
|
||||||
:N editing.txt /*:N*
|
:N editing.txt /*:N*
|
||||||
:Next editing.txt /*:Next*
|
:Next editing.txt /*:Next*
|
||||||
:P various.txt /*:P*
|
:P various.txt /*:P*
|
||||||
:Print various.txt /*:Print*
|
:Print various.txt /*:Print*
|
||||||
:Sexplore pi_expl.txt /*:Sexplore*
|
|
||||||
:TOhtml syntax.txt /*:TOhtml*
|
:TOhtml syntax.txt /*:TOhtml*
|
||||||
:X editing.txt /*:X*
|
:X editing.txt /*:X*
|
||||||
:\bar cmdline.txt /*:\\bar*
|
:\bar cmdline.txt /*:\\bar*
|
||||||
@ -4655,9 +4654,6 @@ exists() eval.txt /*exists()*
|
|||||||
expand() eval.txt /*expand()*
|
expand() eval.txt /*expand()*
|
||||||
expand-env options.txt /*expand-env*
|
expand-env options.txt /*expand-env*
|
||||||
expand-environment-var options.txt /*expand-environment-var*
|
expand-environment-var options.txt /*expand-environment-var*
|
||||||
expl-starting pi_expl.txt /*expl-starting*
|
|
||||||
explorer-delete pi_expl.txt /*explorer-delete*
|
|
||||||
explorer-rename pi_expl.txt /*explorer-rename*
|
|
||||||
expr eval.txt /*expr*
|
expr eval.txt /*expr*
|
||||||
expr-! eval.txt /*expr-!*
|
expr-! eval.txt /*expr-!*
|
||||||
expr-!= eval.txt /*expr-!=*
|
expr-!= eval.txt /*expr-!=*
|
||||||
@ -4732,9 +4728,7 @@ farsi.txt farsi.txt /*farsi.txt*
|
|||||||
fasm.vim syntax.txt /*fasm.vim*
|
fasm.vim syntax.txt /*fasm.vim*
|
||||||
feature-list eval.txt /*feature-list*
|
feature-list eval.txt /*feature-list*
|
||||||
fetch pi_netrw.txt /*fetch*
|
fetch pi_netrw.txt /*fetch*
|
||||||
file-browser pi_expl.txt /*file-browser*
|
|
||||||
file-browser-5.2 version5.txt /*file-browser-5.2*
|
file-browser-5.2 version5.txt /*file-browser-5.2*
|
||||||
file-explorer pi_expl.txt /*file-explorer*
|
|
||||||
file-formats editing.txt /*file-formats*
|
file-formats editing.txt /*file-formats*
|
||||||
file-pattern autocmd.txt /*file-pattern*
|
file-pattern autocmd.txt /*file-pattern*
|
||||||
file-read insert.txt /*file-read*
|
file-read insert.txt /*file-read*
|
||||||
@ -4850,22 +4844,6 @@ g'a motion.txt /*g'a*
|
|||||||
g, motion.txt /*g,*
|
g, motion.txt /*g,*
|
||||||
g0 motion.txt /*g0*
|
g0 motion.txt /*g0*
|
||||||
g8 various.txt /*g8*
|
g8 various.txt /*g8*
|
||||||
g:explDateFormat pi_expl.txt /*g:explDateFormat*
|
|
||||||
g:explDetailedHelp pi_expl.txt /*g:explDetailedHelp*
|
|
||||||
g:explDetailedList pi_expl.txt /*g:explDetailedList*
|
|
||||||
g:explDirsFirst pi_expl.txt /*g:explDirsFirst*
|
|
||||||
g:explFileHandler pi_expl.txt /*g:explFileHandler*
|
|
||||||
g:explHideFiles pi_expl.txt /*g:explHideFiles*
|
|
||||||
g:explSortBy pi_expl.txt /*g:explSortBy*
|
|
||||||
g:explSplitBelow pi_expl.txt /*g:explSplitBelow*
|
|
||||||
g:explSplitRight pi_expl.txt /*g:explSplitRight*
|
|
||||||
g:explStartBelow pi_expl.txt /*g:explStartBelow*
|
|
||||||
g:explStartRight pi_expl.txt /*g:explStartRight*
|
|
||||||
g:explSuffixesLast pi_expl.txt /*g:explSuffixesLast*
|
|
||||||
g:explUseSeparators pi_expl.txt /*g:explUseSeparators*
|
|
||||||
g:explVertical pi_expl.txt /*g:explVertical*
|
|
||||||
g:explWinSize pi_expl.txt /*g:explWinSize*
|
|
||||||
g:netrw-a pi_netrw.txt /*g:netrw-a*
|
|
||||||
g:netrw_list_cmd pi_netrw.txt /*g:netrw_list_cmd*
|
g:netrw_list_cmd pi_netrw.txt /*g:netrw_list_cmd*
|
||||||
g:netrw_list_hide pi_netrw.txt /*g:netrw_list_hide*
|
g:netrw_list_hide pi_netrw.txt /*g:netrw_list_hide*
|
||||||
g:netrw_rm_cmd pi_netrw.txt /*g:netrw_rm_cmd*
|
g:netrw_rm_cmd pi_netrw.txt /*g:netrw_rm_cmd*
|
||||||
@ -4906,7 +4884,7 @@ g`a motion.txt /*g`a*
|
|||||||
ga various.txt /*ga*
|
ga various.txt /*ga*
|
||||||
gd pattern.txt /*gd*
|
gd pattern.txt /*gd*
|
||||||
ge motion.txt /*ge*
|
ge motion.txt /*ge*
|
||||||
get eval.txt /*get*
|
get() eval.txt /*get()*
|
||||||
getbufvar() eval.txt /*getbufvar()*
|
getbufvar() eval.txt /*getbufvar()*
|
||||||
getchar() eval.txt /*getchar()*
|
getchar() eval.txt /*getchar()*
|
||||||
getcharmod() eval.txt /*getcharmod()*
|
getcharmod() eval.txt /*getcharmod()*
|
||||||
@ -5314,6 +5292,7 @@ ip motion.txt /*ip*
|
|||||||
iquote motion.txt /*iquote*
|
iquote motion.txt /*iquote*
|
||||||
is motion.txt /*is*
|
is motion.txt /*is*
|
||||||
isdirectory() eval.txt /*isdirectory()*
|
isdirectory() eval.txt /*isdirectory()*
|
||||||
|
items() eval.txt /*items()*
|
||||||
iw motion.txt /*iw*
|
iw motion.txt /*iw*
|
||||||
i{ motion.txt /*i{*
|
i{ motion.txt /*i{*
|
||||||
i} motion.txt /*i}*
|
i} motion.txt /*i}*
|
||||||
@ -5593,6 +5572,7 @@ netrw-D pi_netrw.txt /*netrw-D*
|
|||||||
netrw-R pi_netrw.txt /*netrw-R*
|
netrw-R pi_netrw.txt /*netrw-R*
|
||||||
netrw-S pi_netrw.txt /*netrw-S*
|
netrw-S pi_netrw.txt /*netrw-S*
|
||||||
netrw-U pi_netrw.txt /*netrw-U*
|
netrw-U pi_netrw.txt /*netrw-U*
|
||||||
|
netrw-a pi_netrw.txt /*netrw-a*
|
||||||
netrw-activate pi_netrw.txt /*netrw-activate*
|
netrw-activate pi_netrw.txt /*netrw-activate*
|
||||||
netrw-b pi_netrw.txt /*netrw-b*
|
netrw-b pi_netrw.txt /*netrw-b*
|
||||||
netrw-bookmark pi_netrw.txt /*netrw-bookmark*
|
netrw-bookmark pi_netrw.txt /*netrw-bookmark*
|
||||||
@ -5823,7 +5803,6 @@ php3-syntax syntax.txt /*php3-syntax*
|
|||||||
php3.vim syntax.txt /*php3.vim*
|
php3.vim syntax.txt /*php3.vim*
|
||||||
phtml-syntax syntax.txt /*phtml-syntax*
|
phtml-syntax syntax.txt /*phtml-syntax*
|
||||||
phtml.vim syntax.txt /*phtml.vim*
|
phtml.vim syntax.txt /*phtml.vim*
|
||||||
pi_expl.txt pi_expl.txt /*pi_expl.txt*
|
|
||||||
pi_gzip.txt pi_gzip.txt /*pi_gzip.txt*
|
pi_gzip.txt pi_gzip.txt /*pi_gzip.txt*
|
||||||
pi_netrw.txt pi_netrw.txt /*pi_netrw.txt*
|
pi_netrw.txt pi_netrw.txt /*pi_netrw.txt*
|
||||||
pi_spec.txt pi_spec.txt /*pi_spec.txt*
|
pi_spec.txt pi_spec.txt /*pi_spec.txt*
|
||||||
@ -6693,6 +6672,7 @@ v_x change.txt /*v_x*
|
|||||||
v_y change.txt /*v_y*
|
v_y change.txt /*v_y*
|
||||||
v_~ change.txt /*v_~*
|
v_~ change.txt /*v_~*
|
||||||
val-variable eval.txt /*val-variable*
|
val-variable eval.txt /*val-variable*
|
||||||
|
values() eval.txt /*values()*
|
||||||
variables eval.txt /*variables*
|
variables eval.txt /*variables*
|
||||||
various various.txt /*various*
|
various various.txt /*various*
|
||||||
various-cmds various.txt /*various-cmds*
|
various-cmds various.txt /*various-cmds*
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
*various.txt* For Vim version 7.0aa. Last change: 2005 Jan 20
|
*various.txt* For Vim version 7.0aa. Last change: 2005 Jan 26
|
||||||
|
|
||||||
|
|
||||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||||
@ -492,9 +492,9 @@ K Run a program to lookup the keyword under the
|
|||||||
:sleep 100m "sleep for a hundred milliseconds
|
:sleep 100m "sleep for a hundred milliseconds
|
||||||
10gs "sleep for ten seconds
|
10gs "sleep for ten seconds
|
||||||
< Can be interrupted with CTRL-C (CTRL-Break on MS-DOS).
|
< Can be interrupted with CTRL-C (CTRL-Break on MS-DOS).
|
||||||
"gs" stands for "goto sleep". While sleeping the
|
"gs" stands for "goto sleep".
|
||||||
cursor is positioned in the text (if visible). {not
|
While sleeping the cursor is positioned in the text,
|
||||||
in Vi}
|
if at a visible position. {not in Vi}
|
||||||
|
|
||||||
*g_CTRL-A*
|
*g_CTRL-A*
|
||||||
g CTRL-A Only when Vim was compiled with MEM_PROFILING defined
|
g CTRL-A Only when Vim was compiled with MEM_PROFILING defined
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
*version6.txt* For Vim version 7.0aa. Last change: 2004 Jun 16
|
*version6.txt* For Vim version 7.0aa. Last change: 2005 Jan 26
|
||||||
|
|
||||||
|
|
||||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||||
@ -865,8 +865,6 @@ on a directory moves the browser to that directory.
|
|||||||
There are several other possibilities, such as opening a file in the preview
|
There are several other possibilities, such as opening a file in the preview
|
||||||
window, renaming files and deleting files.
|
window, renaming files and deleting files.
|
||||||
|
|
||||||
See |file-explorer|.
|
|
||||||
|
|
||||||
|
|
||||||
Editing files over a network *new-network-files*
|
Editing files over a network *new-network-files*
|
||||||
----------------------------
|
----------------------------
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
*windows.txt* For Vim version 7.0aa. Last change: 2004 Dec 29
|
*windows.txt* For Vim version 7.0aa. Last change: 2005 Jan 26
|
||||||
|
|
||||||
|
|
||||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||||
@ -1098,7 +1098,7 @@ help Contains a help file. Will only be created with the |:help|
|
|||||||
and can't be changed. The 'buflisted' option will be reset
|
and can't be changed. The 'buflisted' option will be reset
|
||||||
for a help buffer.
|
for a help buffer.
|
||||||
|
|
||||||
directory Displays directory contents. Used by the |file-explorer|
|
directory Displays directory contents. Can be used by a file explorer
|
||||||
plugin. The buffer is created with these settings: >
|
plugin. The buffer is created with these settings: >
|
||||||
:set buftype=nowrite
|
:set buftype=nowrite
|
||||||
:set bufhidden=delete
|
:set bufhidden=delete
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
" Vim syntax file
|
" Vim syntax file
|
||||||
" Language: C
|
" Language: C
|
||||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||||
" Last Change: 2004 Dec 09
|
" Last Change: 2005 Jan 26
|
||||||
|
|
||||||
" For version 5.x: Clear all syntax items
|
" For version 5.x: Clear all syntax items
|
||||||
" For version 6.x: Quit when a syntax file was already loaded
|
" For version 6.x: Quit when a syntax file was already loaded
|
||||||
@ -67,7 +67,13 @@ endif
|
|||||||
" also accept <% for {, %> for }, <: for [ and :> for ] (C99)
|
" also accept <% for {, %> for }, <: for [ and :> for ] (C99)
|
||||||
" But avoid matching <::.
|
" But avoid matching <::.
|
||||||
syn cluster cParenGroup contains=cParenError,cIncluded,cSpecial,cCommentSkip,cCommentString,cComment2String,@cCommentGroup,cCommentStartError,cUserCont,cUserLabel,cBitField,cCommentSkip,cOctalZero,cCppOut,cCppOut2,cCppSkip,cFormat,cNumber,cFloat,cOctal,cOctalError,cNumbersCom
|
syn cluster cParenGroup contains=cParenError,cIncluded,cSpecial,cCommentSkip,cCommentString,cComment2String,@cCommentGroup,cCommentStartError,cUserCont,cUserLabel,cBitField,cCommentSkip,cOctalZero,cCppOut,cCppOut2,cCppSkip,cFormat,cNumber,cFloat,cOctal,cOctalError,cNumbersCom
|
||||||
if exists("c_no_bracket_error")
|
if exists("c_no_curly_error")
|
||||||
|
syn region cParen transparent start='(' end=')' contains=ALLBUT,@cParenGroup,cCppParen,cCppString,@Spell
|
||||||
|
" cCppParen: same as cParen but ends at end-of-line; used in cDefine
|
||||||
|
syn region cCppParen transparent start='(' skip='\\$' excludenl end=')' end='$' contained contains=ALLBUT,@cParenGroup,cParen,cString,@Spell
|
||||||
|
syn match cParenError display ")"
|
||||||
|
syn match cErrInParen display contained "^[{}]\|^<%\|^%>"
|
||||||
|
elseif exists("c_no_bracket_error")
|
||||||
syn region cParen transparent start='(' end=')' contains=ALLBUT,@cParenGroup,cCppParen,cCppString,@Spell
|
syn region cParen transparent start='(' end=')' contains=ALLBUT,@cParenGroup,cCppParen,cCppString,@Spell
|
||||||
" cCppParen: same as cParen but ends at end-of-line; used in cDefine
|
" cCppParen: same as cParen but ends at end-of-line; used in cDefine
|
||||||
syn region cCppParen transparent start='(' skip='\\$' excludenl end=')' end='$' contained contains=ALLBUT,@cParenGroup,cParen,cString,@Spell
|
syn region cCppParen transparent start='(' skip='\\$' excludenl end=')' end='$' contained contains=ALLBUT,@cParenGroup,cParen,cString,@Spell
|
||||||
|
@ -6121,8 +6121,11 @@ ins_reg()
|
|||||||
im_set_active(TRUE);
|
im_set_active(TRUE);
|
||||||
# endif
|
# endif
|
||||||
}
|
}
|
||||||
if (regname == NUL)
|
if (regname == NUL || !valid_yank_reg(regname, FALSE))
|
||||||
|
{
|
||||||
|
vim_beep();
|
||||||
need_redraw = TRUE; /* remove the '"' */
|
need_redraw = TRUE; /* remove the '"' */
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
#endif
|
#endif
|
||||||
|
@ -336,7 +336,8 @@ hash_may_resize(ht)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* Allocate an array. */
|
/* Allocate an array. */
|
||||||
newarray = (hashitem_T *)alloc((unsigned)(sizeof(hashitem_T) * newsize));
|
newarray = (hashitem_T *)alloc((unsigned)
|
||||||
|
(sizeof(hashitem_T) * newsize));
|
||||||
if (newarray == NULL)
|
if (newarray == NULL)
|
||||||
{
|
{
|
||||||
/* Out of memory. When there are NULL items still return OK.
|
/* Out of memory. When there are NULL items still return OK.
|
||||||
|
@ -2407,6 +2407,7 @@ utf_head_off(base, p)
|
|||||||
return (int)(p - q);
|
return (int)(p - q);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if defined(FEAT_EVAL) || defined(PROTO)
|
||||||
/*
|
/*
|
||||||
* Copy a character from "*fp" to "*tp" and advance the pointers.
|
* Copy a character from "*fp" to "*tp" and advance the pointers.
|
||||||
*/
|
*/
|
||||||
@ -2421,6 +2422,7 @@ mb_copy_char(fp, tp)
|
|||||||
*tp += l;
|
*tp += l;
|
||||||
*fp += l;
|
*fp += l;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Return the offset from "p" to the first byte of a character. When "p" is
|
* Return the offset from "p" to the first byte of a character. When "p" is
|
||||||
|
11
src/ops.c
11
src/ops.c
@ -813,6 +813,7 @@ valid_yank_reg(regname, writing)
|
|||||||
/*
|
/*
|
||||||
* Set y_current and y_append, according to the value of "regname".
|
* Set y_current and y_append, according to the value of "regname".
|
||||||
* Cannot handle the '_' register.
|
* Cannot handle the '_' register.
|
||||||
|
* Must only be called with a valid register name!
|
||||||
*
|
*
|
||||||
* If regname is 0 and writing, use register 0
|
* If regname is 0 and writing, use register 0
|
||||||
* If regname is 0 and reading, use previous register
|
* If regname is 0 and reading, use previous register
|
||||||
@ -2996,10 +2997,11 @@ copy_yank_reg(reg)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* put contents of register "regname" into the text
|
* Put contents of register "regname" into the text.
|
||||||
* flags: PUT_FIXINDENT make indent look nice
|
* Caller must check "regname" to be valid!
|
||||||
* PUT_CURSEND leave cursor after end of new text
|
* "flags": PUT_FIXINDENT make indent look nice
|
||||||
* PUT_LINE force linewise put (":put")
|
* PUT_CURSEND leave cursor after end of new text
|
||||||
|
* PUT_LINE force linewise put (":put")
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
do_put(regname, dir, count, flags)
|
do_put(regname, dir, count, flags)
|
||||||
@ -3635,6 +3637,7 @@ end:
|
|||||||
if (regname == '=')
|
if (regname == '=')
|
||||||
vim_free(y_array);
|
vim_free(y_array);
|
||||||
}
|
}
|
||||||
|
/* If the cursor is past the end of the line put it at the end. */
|
||||||
if (gchar_cursor() == NUL
|
if (gchar_cursor() == NUL
|
||||||
&& curwin->w_cursor.col > 0
|
&& curwin->w_cursor.col > 0
|
||||||
&& !(restart_edit || (State & INSERT)))
|
&& !(restart_edit || (State & INSERT)))
|
||||||
|
85
src/search.c
85
src/search.c
@ -503,8 +503,8 @@ searchit(win, buf, pos, dir, pat, count, options, pat_use)
|
|||||||
regmmatch_T regmatch;
|
regmmatch_T regmatch;
|
||||||
char_u *ptr;
|
char_u *ptr;
|
||||||
colnr_T matchcol;
|
colnr_T matchcol;
|
||||||
colnr_T startcol;
|
|
||||||
lpos_T endpos;
|
lpos_T endpos;
|
||||||
|
lpos_T matchpos;
|
||||||
int loop;
|
int loop;
|
||||||
pos_T start_pos;
|
pos_T start_pos;
|
||||||
int at_first_line;
|
int at_first_line;
|
||||||
@ -512,7 +512,6 @@ searchit(win, buf, pos, dir, pat, count, options, pat_use)
|
|||||||
int match_ok;
|
int match_ok;
|
||||||
long nmatched;
|
long nmatched;
|
||||||
int submatch = 0;
|
int submatch = 0;
|
||||||
linenr_T first_lnum;
|
|
||||||
#ifdef FEAT_SEARCH_EXTRA
|
#ifdef FEAT_SEARCH_EXTRA
|
||||||
int break_loop = FALSE;
|
int break_loop = FALSE;
|
||||||
#else
|
#else
|
||||||
@ -573,9 +572,8 @@ searchit(win, buf, pos, dir, pat, count, options, pat_use)
|
|||||||
lnum += dir, at_first_line = FALSE)
|
lnum += dir, at_first_line = FALSE)
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
* Look for a match somewhere in the line.
|
* Look for a match somewhere in line "lnum".
|
||||||
*/
|
*/
|
||||||
first_lnum = lnum;
|
|
||||||
nmatched = vim_regexec_multi(®match, win, buf,
|
nmatched = vim_regexec_multi(®match, win, buf,
|
||||||
lnum, (colnr_T)0);
|
lnum, (colnr_T)0);
|
||||||
/* Abort searching on an error (e.g., out of stack). */
|
/* Abort searching on an error (e.g., out of stack). */
|
||||||
@ -584,13 +582,12 @@ searchit(win, buf, pos, dir, pat, count, options, pat_use)
|
|||||||
if (nmatched > 0)
|
if (nmatched > 0)
|
||||||
{
|
{
|
||||||
/* match may actually be in another line when using \zs */
|
/* match may actually be in another line when using \zs */
|
||||||
lnum += regmatch.startpos[0].lnum;
|
matchpos = regmatch.startpos[0];
|
||||||
ptr = ml_get_buf(buf, lnum, FALSE);
|
|
||||||
startcol = regmatch.startpos[0].col;
|
|
||||||
endpos = regmatch.endpos[0];
|
endpos = regmatch.endpos[0];
|
||||||
# ifdef FEAT_EVAL
|
# ifdef FEAT_EVAL
|
||||||
submatch = first_submatch(®match);
|
submatch = first_submatch(®match);
|
||||||
# endif
|
# endif
|
||||||
|
ptr = ml_get_buf(buf, lnum + matchpos.lnum, FALSE);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Forward search in the first line: match should be after
|
* Forward search in the first line: match should be after
|
||||||
@ -601,16 +598,20 @@ searchit(win, buf, pos, dir, pat, count, options, pat_use)
|
|||||||
{
|
{
|
||||||
match_ok = TRUE;
|
match_ok = TRUE;
|
||||||
/*
|
/*
|
||||||
|
* When the match starts in a next line it's certainly
|
||||||
|
* past the start position.
|
||||||
* When match lands on a NUL the cursor will be put
|
* When match lands on a NUL the cursor will be put
|
||||||
* one back afterwards, compare with that position,
|
* one back afterwards, compare with that position,
|
||||||
* otherwise "/$" will get stuck on end of line.
|
* otherwise "/$" will get stuck on end of line.
|
||||||
*/
|
*/
|
||||||
while ((options & SEARCH_END)
|
while (matchpos.lnum == 0
|
||||||
? (nmatched == 1
|
&& ((options & SEARCH_END)
|
||||||
&& (int)endpos.col - 1
|
? (nmatched == 1
|
||||||
|
&& (int)endpos.col - 1
|
||||||
< (int)start_pos.col + extra_col)
|
< (int)start_pos.col + extra_col)
|
||||||
: ((int)startcol - (ptr[startcol] == NUL)
|
: ((int)matchpos.col
|
||||||
< (int)start_pos.col + extra_col))
|
- (ptr[matchpos.col] == NUL)
|
||||||
|
< (int)start_pos.col + extra_col)))
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
* If vi-compatible searching, continue at the end
|
* If vi-compatible searching, continue at the end
|
||||||
@ -628,7 +629,7 @@ searchit(win, buf, pos, dir, pat, count, options, pat_use)
|
|||||||
}
|
}
|
||||||
matchcol = endpos.col;
|
matchcol = endpos.col;
|
||||||
/* for empty match: advance one char */
|
/* for empty match: advance one char */
|
||||||
if (matchcol == startcol
|
if (matchcol == matchpos.col
|
||||||
&& ptr[matchcol] != NUL)
|
&& ptr[matchcol] != NUL)
|
||||||
{
|
{
|
||||||
#ifdef FEAT_MBYTE
|
#ifdef FEAT_MBYTE
|
||||||
@ -642,7 +643,7 @@ searchit(win, buf, pos, dir, pat, count, options, pat_use)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
matchcol = startcol;
|
matchcol = matchpos.col;
|
||||||
if (ptr[matchcol] != NUL)
|
if (ptr[matchcol] != NUL)
|
||||||
{
|
{
|
||||||
#ifdef FEAT_MBYTE
|
#ifdef FEAT_MBYTE
|
||||||
@ -656,12 +657,13 @@ searchit(win, buf, pos, dir, pat, count, options, pat_use)
|
|||||||
}
|
}
|
||||||
if (ptr[matchcol] == NUL
|
if (ptr[matchcol] == NUL
|
||||||
|| (nmatched = vim_regexec_multi(®match,
|
|| (nmatched = vim_regexec_multi(®match,
|
||||||
win, buf, lnum, matchcol)) == 0)
|
win, buf, lnum + matchpos.lnum,
|
||||||
|
matchcol)) == 0)
|
||||||
{
|
{
|
||||||
match_ok = FALSE;
|
match_ok = FALSE;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
startcol = regmatch.startpos[0].col;
|
matchpos = regmatch.startpos[0];
|
||||||
endpos = regmatch.endpos[0];
|
endpos = regmatch.endpos[0];
|
||||||
# ifdef FEAT_EVAL
|
# ifdef FEAT_EVAL
|
||||||
submatch = first_submatch(®match);
|
submatch = first_submatch(®match);
|
||||||
@ -669,7 +671,7 @@ searchit(win, buf, pos, dir, pat, count, options, pat_use)
|
|||||||
|
|
||||||
/* Need to get the line pointer again, a
|
/* Need to get the line pointer again, a
|
||||||
* multi-line search may have made it invalid. */
|
* multi-line search may have made it invalid. */
|
||||||
ptr = ml_get_buf(buf, lnum, FALSE);
|
ptr = ml_get_buf(buf, lnum + matchpos.lnum, FALSE);
|
||||||
}
|
}
|
||||||
if (!match_ok)
|
if (!match_ok)
|
||||||
continue;
|
continue;
|
||||||
@ -686,20 +688,29 @@ searchit(win, buf, pos, dir, pat, count, options, pat_use)
|
|||||||
match_ok = FALSE;
|
match_ok = FALSE;
|
||||||
for (;;)
|
for (;;)
|
||||||
{
|
{
|
||||||
if (!at_first_line
|
/* Remember a position that is before the start
|
||||||
|| ((options & SEARCH_END)
|
* position, we use it if it's the last match in
|
||||||
? (nmatched == 1
|
* the line. Always accept a position after
|
||||||
&& (int)regmatch.endpos[0].col - 1
|
* wrapping around. */
|
||||||
|
if (loop
|
||||||
|
|| ((options & SEARCH_END)
|
||||||
|
? (lnum + regmatch.endpos[0].lnum
|
||||||
|
< start_pos.lnum
|
||||||
|
|| (lnum + regmatch.endpos[0].lnum
|
||||||
|
== start_pos.lnum
|
||||||
|
&& (int)regmatch.endpos[0].col - 1
|
||||||
+ extra_col
|
+ extra_col
|
||||||
<= (int)start_pos.col)
|
<= (int)start_pos.col))
|
||||||
: ((int)regmatch.startpos[0].col
|
: (lnum + regmatch.startpos[0].lnum
|
||||||
|
< start_pos.lnum
|
||||||
|
|| (lnum + regmatch.startpos[0].lnum
|
||||||
|
== start_pos.lnum
|
||||||
|
&& (int)regmatch.startpos[0].col
|
||||||
+ extra_col
|
+ extra_col
|
||||||
<= (int)start_pos.col)))
|
<= (int)start_pos.col))))
|
||||||
{
|
{
|
||||||
/* Remember this position, we use it if it's
|
|
||||||
* the last match in the line. */
|
|
||||||
match_ok = TRUE;
|
match_ok = TRUE;
|
||||||
startcol = regmatch.startpos[0].col;
|
matchpos = regmatch.startpos[0];
|
||||||
endpos = regmatch.endpos[0];
|
endpos = regmatch.endpos[0];
|
||||||
# ifdef FEAT_EVAL
|
# ifdef FEAT_EVAL
|
||||||
submatch = first_submatch(®match);
|
submatch = first_submatch(®match);
|
||||||
@ -721,7 +732,7 @@ searchit(win, buf, pos, dir, pat, count, options, pat_use)
|
|||||||
break;
|
break;
|
||||||
matchcol = endpos.col;
|
matchcol = endpos.col;
|
||||||
/* for empty match: advance one char */
|
/* for empty match: advance one char */
|
||||||
if (matchcol == startcol
|
if (matchcol == matchpos.col
|
||||||
&& ptr[matchcol] != NUL)
|
&& ptr[matchcol] != NUL)
|
||||||
{
|
{
|
||||||
#ifdef FEAT_MBYTE
|
#ifdef FEAT_MBYTE
|
||||||
@ -735,7 +746,10 @@ searchit(win, buf, pos, dir, pat, count, options, pat_use)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
matchcol = startcol;
|
/* Stop when the match is in a next line. */
|
||||||
|
if (matchpos.lnum > 0)
|
||||||
|
break;
|
||||||
|
matchcol = matchpos.col;
|
||||||
if (ptr[matchcol] != NUL)
|
if (ptr[matchcol] != NUL)
|
||||||
{
|
{
|
||||||
#ifdef FEAT_MBYTE
|
#ifdef FEAT_MBYTE
|
||||||
@ -749,12 +763,13 @@ searchit(win, buf, pos, dir, pat, count, options, pat_use)
|
|||||||
}
|
}
|
||||||
if (ptr[matchcol] == NUL
|
if (ptr[matchcol] == NUL
|
||||||
|| (nmatched = vim_regexec_multi(®match,
|
|| (nmatched = vim_regexec_multi(®match,
|
||||||
win, buf, lnum, matchcol)) == 0)
|
win, buf, lnum + matchpos.lnum,
|
||||||
|
matchcol)) == 0)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
/* Need to get the line pointer again, a
|
/* Need to get the line pointer again, a
|
||||||
* multi-line search may have made it invalid. */
|
* multi-line search may have made it invalid. */
|
||||||
ptr = ml_get_buf(buf, lnum, FALSE);
|
ptr = ml_get_buf(buf, lnum + matchpos.lnum, FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -767,13 +782,13 @@ searchit(win, buf, pos, dir, pat, count, options, pat_use)
|
|||||||
|
|
||||||
if (options & SEARCH_END && !(options & SEARCH_NOOF))
|
if (options & SEARCH_END && !(options & SEARCH_NOOF))
|
||||||
{
|
{
|
||||||
pos->lnum = endpos.lnum + first_lnum;
|
pos->lnum = lnum + endpos.lnum;
|
||||||
pos->col = endpos.col - 1;
|
pos->col = endpos.col - 1;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
pos->lnum = lnum;
|
pos->lnum = lnum + matchpos.lnum;
|
||||||
pos->col = startcol;
|
pos->col = matchpos.col;
|
||||||
}
|
}
|
||||||
#ifdef FEAT_VIRTUALEDIT
|
#ifdef FEAT_VIRTUALEDIT
|
||||||
pos->coladd = 0;
|
pos->coladd = 0;
|
||||||
@ -781,7 +796,7 @@ searchit(win, buf, pos, dir, pat, count, options, pat_use)
|
|||||||
found = 1;
|
found = 1;
|
||||||
|
|
||||||
/* Set variables used for 'incsearch' highlighting. */
|
/* Set variables used for 'incsearch' highlighting. */
|
||||||
search_match_lines = endpos.lnum - (lnum - first_lnum);
|
search_match_lines = endpos.lnum - matchpos.lnum;
|
||||||
search_match_endcol = endpos.col;
|
search_match_endcol = endpos.col;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -936,8 +936,8 @@ typedef struct hashtable_S
|
|||||||
{
|
{
|
||||||
long_u ht_mask; /* mask used for hash value (nr of items in
|
long_u ht_mask; /* mask used for hash value (nr of items in
|
||||||
* array is "ht_mask" + 1) */
|
* array is "ht_mask" + 1) */
|
||||||
int ht_used; /* number of items used */
|
long_u ht_used; /* number of items used */
|
||||||
int ht_filled; /* number of items used + removed */
|
long_u ht_filled; /* number of items used + removed */
|
||||||
int ht_locked; /* counter for hash_lock() */
|
int ht_locked; /* counter for hash_lock() */
|
||||||
int ht_error; /* when set growing failed, can't add more
|
int ht_error; /* when set growing failed, can't add more
|
||||||
items before growing works */
|
items before growing works */
|
||||||
|
@ -36,5 +36,5 @@
|
|||||||
#define VIM_VERSION_NODOT "vim70aa"
|
#define VIM_VERSION_NODOT "vim70aa"
|
||||||
#define VIM_VERSION_SHORT "7.0aa"
|
#define VIM_VERSION_SHORT "7.0aa"
|
||||||
#define VIM_VERSION_MEDIUM "7.0aa ALPHA"
|
#define VIM_VERSION_MEDIUM "7.0aa ALPHA"
|
||||||
#define VIM_VERSION_LONG "VIM - Vi IMproved 7.0aa ALPHA (2004 Jan 25)"
|
#define VIM_VERSION_LONG "VIM - Vi IMproved 7.0aa ALPHA (2005 Jan 27)"
|
||||||
#define VIM_VERSION_LONG_DATE "VIM - Vi IMproved 7.0aa ALPHA (2004 Jan 25, compiled "
|
#define VIM_VERSION_LONG_DATE "VIM - Vi IMproved 7.0aa ALPHA (2005 Jan 27, compiled "
|
||||||
|
Loading…
x
Reference in New Issue
Block a user