mirror of
https://github.com/zoriya/vim.git
synced 2025-12-23 23:55:18 +00:00
Compare commits
16 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
167ae42685 | ||
|
|
d7cc163570 | ||
|
|
2f6a346a4c | ||
|
|
80d83c094d | ||
|
|
33c4dbb74b | ||
|
|
effed9315c | ||
|
|
def7b1dc61 | ||
|
|
2b926fcb3c | ||
|
|
60d0871000 | ||
|
|
c7f08b7ee1 | ||
|
|
164251ff80 | ||
|
|
976b847f43 | ||
|
|
21f990e1c2 | ||
|
|
ef73a28401 | ||
|
|
d473c8c101 | ||
|
|
f53c692240 |
@@ -661,7 +661,7 @@ DirChanged The working directory has changed in response
|
||||
to the |:cd| or |:lcd| commands, or as a
|
||||
result of the 'autochdir' option.
|
||||
The pattern can be:
|
||||
"window" to trigger on `:lcd
|
||||
"window" to trigger on `:lcd`
|
||||
"global" to trigger on `:cd`
|
||||
"auto" to trigger on 'autochdir'.
|
||||
"drop" to trigger on editing a file
|
||||
|
||||
@@ -1447,7 +1447,7 @@ to the name of an external program for Vim to use for text formatting. The
|
||||
program.
|
||||
|
||||
*format-formatexpr*
|
||||
The 'formatexpr' option can be set to a Vim Script function that performs
|
||||
The 'formatexpr' option can be set to a Vim script function that performs
|
||||
reformatting of the buffer. This should usually happen in an |ftplugin|,
|
||||
since formatting is highly dependent on the type of file. It makes
|
||||
sense to use an |autoload| script, so the corresponding script is only loaded
|
||||
@@ -1481,7 +1481,7 @@ text. Put it in your autoload directory, e.g. ~/.vim/autoload/format.vim: >
|
||||
|
||||
You can then enable the formatting by executing: >
|
||||
setlocal formatexpr=format#Format()
|
||||
>
|
||||
|
||||
Note: this function explicitly returns non-zero when called from insert mode
|
||||
(which basically means, text is inserted beyond the 'textwidth' limit). This
|
||||
causes Vim to fall back to reformat the text by using the internal formatter.
|
||||
|
||||
@@ -384,12 +384,16 @@ Example (this does almost the same as 'diffexpr' being empty): >
|
||||
endif
|
||||
silent execute "!diff -a --binary " . opt . v:fname_in . " " . v:fname_new .
|
||||
\ " > " . v:fname_out
|
||||
redraw!
|
||||
endfunction
|
||||
|
||||
The "-a" argument is used to force comparing the files as text, comparing as
|
||||
binaries isn't useful. The "--binary" argument makes the files read in binary
|
||||
mode, so that a CTRL-Z doesn't end the text on DOS.
|
||||
|
||||
The `redraw!` command may not be needed, depending on whether executing a
|
||||
shell command shows something on the display or not.
|
||||
|
||||
*E810* *E97*
|
||||
Vim will do a test if the diff output looks alright. If it doesn't, you will
|
||||
get an error message. Possible causes:
|
||||
|
||||
@@ -2111,7 +2111,7 @@ cursor({list}) Number move cursor to position in {list}
|
||||
debugbreak({pid}) Number interrupt process being debugged
|
||||
deepcopy({expr} [, {noref}]) any make a full copy of {expr}
|
||||
delete({fname} [, {flags}]) Number delete the file or directory {fname}
|
||||
deletebufline({expr}, {first}[, {last}])
|
||||
deletebufline({expr}, {first} [, {last}])
|
||||
Number delete lines from buffer {expr}
|
||||
did_filetype() Number |TRUE| if FileType autocmd event used
|
||||
diff_filler({lnum}) Number diff filler lines about {lnum}
|
||||
@@ -2477,7 +2477,7 @@ tolower({expr}) String the String {expr} switched to lowercase
|
||||
toupper({expr}) String the String {expr} switched to uppercase
|
||||
tr({src}, {fromstr}, {tostr}) String translate chars of {src} in {fromstr}
|
||||
to chars in {tostr}
|
||||
trim({text}[, {mask}]) String trim characters in {mask} from {text}
|
||||
trim({text} [, {mask}]) String trim characters in {mask} from {text}
|
||||
trunc({expr}) Float truncate Float {expr}
|
||||
type({name}) Number type of variable {name}
|
||||
undofile({name}) String undo file name for {name}
|
||||
@@ -3529,7 +3529,7 @@ delete({fname} [, {flags}]) *delete()*
|
||||
To delete a line from the buffer use |:delete| or
|
||||
|deletebufline()|.
|
||||
|
||||
deletebufline({expr}, {first}[, {last}]) *deletebufline()*
|
||||
deletebufline({expr}, {first} [, {last}]) *deletebufline()*
|
||||
Delete lines {first} to {last} (inclusive) from buffer {expr}.
|
||||
If {last} is omitted then delete line {first} only.
|
||||
On success 0 is returned, on failure 1 is returned.
|
||||
@@ -4307,7 +4307,7 @@ getbufinfo([{dict}])
|
||||
endfor
|
||||
<
|
||||
To get buffer-local options use: >
|
||||
getbufvar({bufnr}, '&')
|
||||
getbufvar({bufnr}, '&option_name')
|
||||
|
||||
<
|
||||
*getbufline()*
|
||||
@@ -8591,9 +8591,8 @@ term_start({cmd}, {options}) *term_start()*
|
||||
|job-options|. However, not all options can be used. These
|
||||
are supported:
|
||||
all timeout options
|
||||
"stoponexit"
|
||||
"callback", "out_cb", "err_cb"
|
||||
"exit_cb", "close_cb"
|
||||
"stoponexit", "cwd", "env"
|
||||
"callback", "out_cb", "err_cb", "exit_cb", "close_cb"
|
||||
"in_io", "in_top", "in_bot", "in_name", "in_buf"
|
||||
"out_io", "out_name", "out_buf", "out_modifiable", "out_msg"
|
||||
"err_io", "err_name", "err_buf", "err_modifiable", "err_msg"
|
||||
@@ -8837,7 +8836,7 @@ tr({src}, {fromstr}, {tostr}) *tr()*
|
||||
echo tr("<blob>", "<>", "{}")
|
||||
< returns "{blob}"
|
||||
|
||||
trim({text}[, {mask}]) *trim()*
|
||||
trim({text} [, {mask}]) *trim()*
|
||||
Return {text} as a String where any character in {mask} is
|
||||
removed from the beginning and end of {text}.
|
||||
If {mask} is not given, {mask} is all characters up to 0x20,
|
||||
|
||||
@@ -236,4 +236,4 @@ It also has a few other mappings:
|
||||
Note: This binding is only available in MacVim.
|
||||
|
||||
==============================================================================
|
||||
vim:tw=78:sw=4:noet:ts=8:ft=help:norl:
|
||||
vim:tw=78:sw=4:ts=8:noet:ft=help:norl:
|
||||
|
||||
@@ -595,9 +595,9 @@ Virtual Replace mode Virtual Replace mode is similar to Replace mode, but
|
||||
If the 'showmode' option is on "-- VREPLACE --" is
|
||||
shown at the bottom of the window.
|
||||
|
||||
Insert Normal mode Entered when CTRL-O given in Insert mode. This is
|
||||
like Normal mode, but after executing one command Vim
|
||||
returns to Insert mode.
|
||||
Insert Normal mode Entered when CTRL-O is typed in Insert mode (see
|
||||
|i_CTRL-O|). This is like Normal mode, but after
|
||||
executing one command Vim returns to Insert mode.
|
||||
If the 'showmode' option is on "-- (insert) --" is
|
||||
shown at the bottom of the window.
|
||||
|
||||
|
||||
@@ -4373,7 +4373,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
methods. Use 'imdisable' to disable XIM then.
|
||||
|
||||
You can set 'imactivatefunc' and 'imstatusfunc' to handle IME/XIM
|
||||
via external command if vim is not compiled with the |+xim|,
|
||||
via external command if Vim is not compiled with the |+xim|,
|
||||
|+multi_byte_ime| or |global-ime|.
|
||||
|
||||
*'imsearch'* *'ims'*
|
||||
@@ -4480,6 +4480,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
so far, matches. The matched string is highlighted. If the pattern
|
||||
is invalid or not found, nothing is shown. The screen will be updated
|
||||
often, this is only useful on fast terminals.
|
||||
Also applies to the `:s`, `:g` and `:v` commands.
|
||||
Note that the match will be shown, but the cursor will return to its
|
||||
original position when no match is found and when pressing <Esc>. You
|
||||
still need to finish the search command with <Enter> to move the
|
||||
@@ -4493,9 +4494,9 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
The highlighting can be set with the 'i' flag in 'highlight'.
|
||||
When 'hlsearch' is on, all matched strings are highlighted too while
|
||||
typing a search command. See also: 'hlsearch'.
|
||||
If you don't want turn 'hlsearch' on, but want to highlight all matches
|
||||
while searching, you can turn on and off 'hlsearch' with autocmd.
|
||||
Example: >
|
||||
If you don't want to turn 'hlsearch' on, but want to highlight all
|
||||
matches while searching, you can turn on and off 'hlsearch' with
|
||||
autocmd. Example: >
|
||||
augroup vimrc-incsearch-highlight
|
||||
autocmd!
|
||||
autocmd CmdlineEnter /,\? :set hlsearch
|
||||
@@ -6650,7 +6651,8 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
tabpages all tab pages; without this only the current tab page
|
||||
is restored, so that you can make a session for each
|
||||
tab page separately
|
||||
terminal include terminal windows where the command can be restored
|
||||
terminal include terminal windows where the command can be
|
||||
restored
|
||||
unix with Unix end-of-line format (single <NL>), even when
|
||||
on Windows or DOS
|
||||
winpos position of the whole Vim window
|
||||
@@ -6686,7 +6688,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
Example with escaped space (Vim will do this when initializing the
|
||||
option from $SHELL): >
|
||||
:set shell=/bin/with\\\ space/sh
|
||||
< The resulting value of 'shell' is "/bin/with\ space/sh", two
|
||||
< The resulting value of 'shell' is "/bin/with\ space/sh", two
|
||||
backslashes are consumed by `:set`.
|
||||
|
||||
Under MS-Windows, when the executable ends in ".com" it must be
|
||||
@@ -7512,7 +7514,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
line is displayed. The current buffer and current window will be set
|
||||
temporarily to that of the window (and buffer) whose statusline is
|
||||
currently being drawn. The expression will evaluate in this context.
|
||||
The variable "actual_curbuf" is set to the 'bufnr()' number of the
|
||||
The variable "g:actual_curbuf" is set to the `bufnr()` number of the
|
||||
real current buffer.
|
||||
|
||||
The 'statusline' option will be evaluated in the |sandbox| if set from
|
||||
|
||||
@@ -135,4 +135,4 @@ Todo:
|
||||
- Replace usage of fork() with spawn() when launching external
|
||||
programs.
|
||||
|
||||
vim:tw=78:sw=4:ts=8:noet:ts=8:ft=help:norl:
|
||||
vim:tw=78:sw=4:ts=8:noet:ft=help:norl:
|
||||
|
||||
@@ -46,6 +46,8 @@ Note: If you have problems printing with |:hardcopy|, an alternative is to use
|
||||
'printexpr' through |v:cmdarg|. Otherwise [arguments]
|
||||
is ignored. 'printoptions' can be used to specify
|
||||
paper size, duplex, etc.
|
||||
Note: If you want PDF, there are tools such as
|
||||
"ps2pdf" that can convert the PostScript to PDF.
|
||||
|
||||
:[range]ha[rdcopy][!] >{filename}
|
||||
As above, but write the resulting PostScript in file
|
||||
|
||||
@@ -46,7 +46,7 @@ compiler (see |errorformat| below).
|
||||
|
||||
*quickfix-ID*
|
||||
Each quickfix list has a unique identifier called the quickfix ID and this
|
||||
number will not change within a Vim session. The getqflist() function can be
|
||||
number will not change within a Vim session. The |getqflist()| function can be
|
||||
used to get the identifier assigned to a list. There is also a quickfix list
|
||||
number which may change whenever more than ten lists are added to a quickfix
|
||||
stack.
|
||||
@@ -68,7 +68,7 @@ the location list is destroyed.
|
||||
Every quickfix and location list has a read-only changedtick variable that
|
||||
tracks the total number of changes made to the list. Every time the quickfix
|
||||
list is modified, this count is incremented. This can be used to perform an
|
||||
action only when the list has changed. The getqflist() and getloclist()
|
||||
action only when the list has changed. The |getqflist()| and |getloclist()|
|
||||
functions can be used to query the current value of changedtick. You cannot
|
||||
change the changedtick variable.
|
||||
|
||||
@@ -602,7 +602,7 @@ present). Examples: >
|
||||
echo getloclist(2, {'winid' : 1}).winid
|
||||
<
|
||||
*getqflist-examples*
|
||||
The getqflist() and getloclist() functions can be used to get the various
|
||||
The |getqflist()| and |getloclist()| functions can be used to get the various
|
||||
attributes of a quickfix and location list respectively. Some examples for
|
||||
using these functions are below:
|
||||
>
|
||||
@@ -659,7 +659,7 @@ using these functions are below:
|
||||
:echo getloclist(3, {'winid' : 0}).winid
|
||||
<
|
||||
*setqflist-examples*
|
||||
The setqflist() and setloclist() functions can be used to set the various
|
||||
The |setqflist()| and |setloclist()| functions can be used to set the various
|
||||
attributes of a quickfix and location list respectively. Some examples for
|
||||
using these functions are below:
|
||||
>
|
||||
|
||||
@@ -487,7 +487,8 @@ a slash. Thus "-R" means recovery and "-/R" readonly.
|
||||
|
||||
When {vimrc} is equal to "DEFAULTS" (all uppercase), this has
|
||||
the same effect as "NONE", but the |defaults.vim| script is
|
||||
loaded, which will also set 'nocompatible'.
|
||||
loaded, which will also set 'nocompatible'. Also see
|
||||
|--clean|.
|
||||
|
||||
Using the "-u" argument with another argument than DEFAULTS
|
||||
has the side effect that the 'compatible' option will be on by
|
||||
@@ -520,7 +521,7 @@ a slash. Thus "-R" means recovery and "-/R" readonly.
|
||||
'nocompatible': use Vim defaults
|
||||
- no |gvimrc| script is loaded
|
||||
- no viminfo file is read or written
|
||||
- the home directory is excluded from 'runtimepath'
|
||||
|
||||
*-x*
|
||||
-x Use encryption to read/write files. Will prompt for a key,
|
||||
which is then stored in the 'key' option. All writes will
|
||||
|
||||
@@ -241,8 +241,10 @@ REORDERING TAB PAGES:
|
||||
:tabm[ove] [N] *:tabm* *:tabmove*
|
||||
:[N]tabm[ove]
|
||||
Move the current tab page to after tab page N. Use zero to
|
||||
make the current tab page the first one. Without N the tab
|
||||
page is made the last one. >
|
||||
make the current tab page the first one. N is counted before
|
||||
the move, thus if the second tab is the current one,
|
||||
`:tabmove 1`` and `:tabmove 2` have no effect.
|
||||
Without N the tab page is made the last one. >
|
||||
:.tabmove " do nothing
|
||||
:-tabmove " move the tab page to the left
|
||||
:+tabmove " move the tab page to the right
|
||||
|
||||
@@ -991,13 +991,17 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
|
||||
't_RF' term.txt /*'t_RF'*
|
||||
't_RI' term.txt /*'t_RI'*
|
||||
't_RS' term.txt /*'t_RS'*
|
||||
't_RT' term.txt /*'t_RT'*
|
||||
't_RV' term.txt /*'t_RV'*
|
||||
't_Ri' term.txt /*'t_Ri'*
|
||||
't_SC' term.txt /*'t_SC'*
|
||||
't_SH' term.txt /*'t_SH'*
|
||||
't_SI' term.txt /*'t_SI'*
|
||||
't_SR' term.txt /*'t_SR'*
|
||||
't_ST' term.txt /*'t_ST'*
|
||||
't_Sb' term.txt /*'t_Sb'*
|
||||
't_Sf' term.txt /*'t_Sf'*
|
||||
't_Si' term.txt /*'t_Si'*
|
||||
't_Te' term.txt /*'t_Te'*
|
||||
't_Ts' term.txt /*'t_Ts'*
|
||||
't_VS' term.txt /*'t_VS'*
|
||||
@@ -8744,13 +8748,17 @@ t_RC term.txt /*t_RC*
|
||||
t_RF term.txt /*t_RF*
|
||||
t_RI term.txt /*t_RI*
|
||||
t_RS term.txt /*t_RS*
|
||||
t_RT term.txt /*t_RT*
|
||||
t_RV term.txt /*t_RV*
|
||||
t_Ri term.txt /*t_Ri*
|
||||
t_SC term.txt /*t_SC*
|
||||
t_SH term.txt /*t_SH*
|
||||
t_SI term.txt /*t_SI*
|
||||
t_SR term.txt /*t_SR*
|
||||
t_ST term.txt /*t_ST*
|
||||
t_Sb term.txt /*t_Sb*
|
||||
t_Sf term.txt /*t_Sf*
|
||||
t_Si term.txt /*t_Si*
|
||||
t_Te term.txt /*t_Te*
|
||||
t_Ts term.txt /*t_Ts*
|
||||
t_VS term.txt /*t_VS*
|
||||
|
||||
@@ -635,7 +635,7 @@ Starting ~
|
||||
Load the plugin with this command: >
|
||||
packadd termdebug
|
||||
< *:Termdebug*
|
||||
To start debugging use `:Termdebug` or `:TermdebugCommand`` followed by the
|
||||
To start debugging use `:Termdebug` or `:TermdebugCommand` followed by the
|
||||
command name, for example: >
|
||||
:Termdebug vim
|
||||
|
||||
|
||||
@@ -34,12 +34,10 @@ entered there will not be repeated below, unless there is extra information.
|
||||
|
||||
The #1234 numbers refer to an issue or pull request on github. To see it in a
|
||||
browser use: https://github.com/vim/vim/issues/1234
|
||||
|
||||
(replace 1234 with the issue/pull number)
|
||||
*known-bugs*
|
||||
-------------------- Known bugs and current work -----------------------
|
||||
|
||||
Graduate FEAT_VREPLACE, it's not much code and a lot of #ifdefs
|
||||
|
||||
Prompt buffer:
|
||||
- Add a command line history.
|
||||
- delay next prompt until plugin gives OK?
|
||||
@@ -76,13 +74,40 @@ Terminal emulator window:
|
||||
- When 'encoding' is not utf-8, or the job is using another encoding, setup
|
||||
conversions.
|
||||
|
||||
Patch to support ":tag <tagkind> <tagname". (emmrk, 2018 May 7, #2871)
|
||||
|
||||
Patch to parse ":line" in tags file and use it for search. (Daniel Hahler,
|
||||
#2546) Fixes #1057. Missing a test.
|
||||
|
||||
Problem with quickfix giving E42 when filtering the error list.
|
||||
(Nobuhiro Takasaki, 2018 Aug 1, #3270)
|
||||
Patch with test from Yegappan, Aug 2.
|
||||
|
||||
Patch to add variable name after "scope add". (Eddie Lebow, 2018 Feb 7, #2620)
|
||||
Maybe not needed?
|
||||
|
||||
Patch in issue 3268, fix suggestion window appearing on wrong screen.
|
||||
Also from Ken Takata, 2018 Aug 2.
|
||||
|
||||
Patch for Lua support. (Kazunobu Kuriyama, 2018 May 26)
|
||||
|
||||
Patch to use NGETTEXT() in many more places. (Sergey Alyoshin, 2018 May 25)
|
||||
Updated patch May 27.
|
||||
|
||||
Patch to add winlayout() function. (Yegappan Lakshmanan, 2018 Jan 4)
|
||||
|
||||
Patch to fix profiling condition lines. (Ozaki Kiichi,, 2017 Dec 26, #2499)
|
||||
|
||||
Issue #686: apply 'F' in 'shortmess' to more messages. Also #3221.
|
||||
Patch on #3221 from Christian. Does it work now?
|
||||
|
||||
Patch to include a cfilter plugin to filter quickfix/location lists.
|
||||
(Yegappan Lakshmanan, 2018 May 12)
|
||||
|
||||
Does not build with MinGW out of the box:
|
||||
- _stat64 is not defined, need to use "struct stat" in vim.h
|
||||
- WINVER conflict, should use 0x0600 by default?
|
||||
|
||||
Patches for Python: #3162, #3263 (Ozaki Kiichi)
|
||||
Needs update.
|
||||
|
||||
Crash when mixing matchadd and substitute()? (Max Christian Pohle, 2018 May
|
||||
13, #2910) Can't reproduce?
|
||||
|
||||
@@ -98,6 +123,12 @@ Include part of #3242?
|
||||
|
||||
Inlcude Chinese-Taiwan translations. (bystar, #3261)
|
||||
|
||||
Completion mixes results from the current buffer with tags and other files.
|
||||
Happens when typing CTRL-N while still search for results. E.g., type "b_" in
|
||||
terminal.c and then CTRL-N twice.
|
||||
Should do current file first and not split it up when more results are found.
|
||||
(Also #1890)
|
||||
|
||||
Using mouse for inputlist() doesn't work after patch 8.0.1756. (Dominique
|
||||
Pelle, 2018 Jul 22, #3239) Also see 8.0.0722. Check both console and GUI.
|
||||
|
||||
@@ -150,9 +181,18 @@ Memory leak in test_terminal:
|
||||
|
||||
gethostbyname() is old, use getaddrinfo() if available. (#3227)
|
||||
|
||||
Delete the src/main.aap file?
|
||||
|
||||
matchaddpos() gets slow with many matches. Proposal by Rick Howe, 2018 Jul
|
||||
19.
|
||||
|
||||
home_replace() uses $HOME instead of "homedir". (Cesar Martins, 2018 Aug 9)
|
||||
|
||||
Adjust windows installer explanation of behavior. (scootergrisen, #3310)
|
||||
|
||||
Set g:actual_curbuf when evaluating 'statusline', not just with an expression.
|
||||
(Daniel Hahler, 2018 Aug 8, #3299)
|
||||
|
||||
Script generated by :mksession does not work well if there are windows with
|
||||
modified buffers
|
||||
change "silent only" into "silent only!"
|
||||
@@ -160,16 +200,6 @@ modified buffers
|
||||
skip "badd fname" if "fname" is already in the buffer list
|
||||
remove remark about unloading buffers from documentation
|
||||
|
||||
Patch to make :help work for tags with a ?. (Hirohito Higashi, 2018 May 28)
|
||||
|
||||
Patch to have a stack trace in Ruby. (Masataka Pocke Kuwabara, 2018 Jul 30,
|
||||
#3267)
|
||||
|
||||
Patch to adjust to DPI setting for GTK. (Roel van de Kraats, 2017 Nov 20,
|
||||
#2357)
|
||||
|
||||
Patch to fix window size when using VTP. (Nobuhiro Takasaki, #3164)
|
||||
|
||||
Compiler warnings (geeknik, 2017 Oct 26):
|
||||
- signed integer overflow in do_sub() (#2249)
|
||||
- signed integer overflow in get_address() (#2248)
|
||||
@@ -179,8 +209,6 @@ Compiler warnings (geeknik, 2017 Oct 26):
|
||||
Win32 console: <F11> and <F12> typed in Insert mode don't result in normal
|
||||
characters. (#3246)
|
||||
|
||||
Patch for more quickfix refactoring. (Yegappan Lakshmanan, #2950)
|
||||
|
||||
Tests failing for "make testgui" with GTK:
|
||||
- Test_setbufvar_options()
|
||||
- Test_exit_callback_interval()
|
||||
@@ -190,17 +218,6 @@ is cleared, to avoid going back to the list of errors buffer (would have two
|
||||
windows with it). Can we just remove the jump list entries for the quickfix
|
||||
buffer?
|
||||
|
||||
Patch to stack and pop the window title and icon. (IWAMOTO Kouichi, 2018 Jun
|
||||
22, #3059)
|
||||
8 For xterm need to open a connection to the X server to get the window
|
||||
title, which can be slow. Can also get the title with "<Esc>[21t", no
|
||||
need to use X11 calls. This returns "<Esc>]l{title}<Esc>\".
|
||||
Using title stack probably works better.
|
||||
|
||||
When a function is defined in the sandbox (with :function or as a lambda)
|
||||
always execute it in the sandbox. (#3182)
|
||||
Remove "safe" argument from call_vim_function(), it's always FALSE.
|
||||
|
||||
Make balloon_show() work outside of 'balloonexpr'? Users expect it to work:
|
||||
#2948. (related to #1512?)
|
||||
On Win32 it stops showing, because showState is already ShS_SHOWING.
|
||||
@@ -222,8 +239,6 @@ used for git temp files.
|
||||
|
||||
Cursor in wrong position when line wraps. (#2540)
|
||||
|
||||
Patch for Lua support. (Kazunobu Kuriyama, 2018 May 26)
|
||||
|
||||
Make {skip} argument of searchpair() consistent with other places where we
|
||||
pass an expression to evaluate. Allow passing zero for "never skip".
|
||||
|
||||
@@ -233,8 +248,6 @@ script or function.
|
||||
Universal solution to detect if t_RS is working, using cursor position.
|
||||
Koichi Iwamoto, #2126
|
||||
|
||||
Patch to fix profiling condition lines. (Ozaki Kiichi,, 2017 Dec 26, #2499)
|
||||
|
||||
When using a menu item while the "more" prompt is displayed doesn't work well.
|
||||
E.g. after using help->version. Have a key that ends the "more" prompt and
|
||||
does nothing otherwise?
|
||||
@@ -268,9 +281,6 @@ How to test that it works well for all Vim users?
|
||||
|
||||
Alternative manpager.vim. (Enno, 2018 Jan 5, #2529)
|
||||
|
||||
Patch to use NGETTEXT() in many more places. (Sergey Alyoshin, 2018 May 25)
|
||||
Updated ptach May 27.
|
||||
|
||||
Does setting 'cursorline' cause syntax highlighting to slow down? Perhaps is
|
||||
mess up the cache? (Mike Lee Williams, 2018 Jan 27, #2539)
|
||||
Also: 'foldtext' is evaluated too often. (Daniel Hahler, #2773)
|
||||
@@ -304,18 +314,14 @@ confusing error message. (Wang Shidong, 2018 Jan 2, #2519)
|
||||
|
||||
Add the debug command line history to viminfo.
|
||||
|
||||
Issue #686: apply 'F' in 'shortmess' to more messages. Also #3221.
|
||||
|
||||
Avoid that "sign unplace id" does a redraw right away, esp. when there is a
|
||||
sequence of these commands. (Andy Stewart, 2018 Mar 16)
|
||||
|
||||
ch_sendraw() with long string does not try to read in between, which may cause
|
||||
a deadlock if the reading side is waiting for the write to finish. (Nate
|
||||
Bosch, 2018 Jan 13, #2548)
|
||||
Perhaps just make chunks of 1024 bytes?
|
||||
|
||||
Patch to include a cfilter plugin to filter quickfix/location lists.
|
||||
(Yegappan Lakshmanan, 2018 May 12)
|
||||
Perhaps just make chunks of 1024 bytes? Make the write non-blocking?
|
||||
Also a problem on MS-Windows: #2828.
|
||||
|
||||
Add Makefiles to the runtime/spell directory tree, since nobody uses Aap.
|
||||
Will have to explain the manual steps (downloading the .aff and .dic files,
|
||||
@@ -335,8 +341,6 @@ With foldmethod=syntax and nofoldenable comment highlighting isn't removed.
|
||||
Using 'wildignore' also applies to literally entered file name. Also with
|
||||
:drop (remote commands).
|
||||
|
||||
Patch to support ":tag <tagkind> <tagname". (emmrk, 2018 May 7, #2871)
|
||||
|
||||
Inserting a line in a CompleteDone autocommand may confuse undo. (micbou,
|
||||
2018 Jun 18, #3027)
|
||||
|
||||
@@ -377,23 +381,21 @@ crash when removing an element while inside map(). (Nikolai Pavlov, 2018 Feb
|
||||
When 'virtualedit' is "all" and 'cursorcolumn' is set, the wrong column may be
|
||||
highlighted. (van-de-bugger, 2018 Jan 23, #2576)
|
||||
|
||||
Patch to parse ":line" in tags file and use it for search. (Daniel Hahler,
|
||||
#2546) Fixes #1057. Missing a test.
|
||||
|
||||
":file" does not show anything when 'shortmess' contains 'F'. (#3070)
|
||||
|
||||
Patch to add winlayout() function. (Yegappan Lakshmanan, 2018 Jan 4)
|
||||
|
||||
No profile information for function that executes ":quit". (Daniel Hahler,
|
||||
2017 Dec 26, #2501)
|
||||
|
||||
A function on a dictionary is not profiled. (ZyX, 2010 Dec 25)
|
||||
|
||||
A function defined locally and lambda's are not easily recognized.
|
||||
Mention where they were defined somewhere.
|
||||
|
||||
Get a "No Name" buffer when 'hidden' is set and opening a new window from the
|
||||
quickfix list. (bfrg, 2018 Jan 22, #2574)
|
||||
|
||||
CTRL-X on zero gets stuck on 0xfffffffffffffffe. (Hengyang Zhao, #2746)
|
||||
|
||||
A function on a dictionary is not profiled. (ZyX, 2010 Dec 25)
|
||||
|
||||
Invalid range error when using BufWinLeave for closing terminal.
|
||||
(Gabriel Barta, 2017 Nov 15, #2339)
|
||||
|
||||
@@ -404,8 +406,8 @@ Olaf Dabrunz is working on this. (10 Jan 2016)
|
||||
9 Instead invoking an external diff program, use builtin code. One can be
|
||||
found here: http://www.ioplex.com/~miallen/libmba/dl/src/diff.c
|
||||
It's complicated and badly documented.
|
||||
Alternative: use the xdiff library. Patch from Christian Brabandt, 2018 Mar
|
||||
20, #2732)
|
||||
Alternative: use the xdiff library. Unfinished Patch from Christian Brabandt,
|
||||
2018 Mar 20, #2732)
|
||||
|
||||
ml_get errors with buggy script. (Dominique, 2017 Apr 30)
|
||||
|
||||
@@ -450,9 +452,6 @@ always nested.
|
||||
|
||||
matchit hasn't been maintained for a long time. #955.
|
||||
|
||||
Patch to add variable name after "scope add". (Eddie Lebow, 2018 Feb 7, #2620)
|
||||
Maybe not needed?
|
||||
|
||||
Problem with 'delcombine'. (agguser, 2017 Nov 10, #2313)
|
||||
|
||||
MS-Windows: buffer completion doesn't work when using backslash (or slash)
|
||||
@@ -554,12 +553,6 @@ that optiona? (Bjorn Linse, 2017 Aug 5)
|
||||
Cindent: returning a structure has more indent for the second item.
|
||||
(Sam Pagenkopf, 2017 Sep 14, #2090)
|
||||
|
||||
Completion mixes results from the current buffer with tags and other files.
|
||||
Happens when typing CTRL-N while still search for results. E.g., type "b_" in
|
||||
terminal.c and then CTRL-N twice.
|
||||
Should do current file first and not split it up when more results are found.
|
||||
(Also #1890)
|
||||
|
||||
Patch from Christian Brabandt to preserve upper case marks when wiping out a
|
||||
buffer. (2013 Dec 9)
|
||||
Also fixes #2166?
|
||||
@@ -1277,12 +1270,6 @@ Syntax highlighting slow (hangs) in SASS file. (Niek Bosch, 2013 Aug 21)
|
||||
|
||||
Adding "~" to 'cdpath' doesn't work for completion? (Davido, 2013 Aug 19)
|
||||
|
||||
Should be easy to highlight all matches with 'incsearch'. Idea by Itchyny,
|
||||
2015 Feb 6.
|
||||
|
||||
Wrong scrolling when using incsearch. Patch by Christian Brabandt, 2014 Dec 4.
|
||||
Is this a good solution?
|
||||
|
||||
Patch: Let rare word highlighting overrule good word highlighting.
|
||||
(Jakson A. Aquino, 2010 Jul 30, again 2011 Jul 2)
|
||||
|
||||
@@ -1300,8 +1287,6 @@ Remark from Roland Eggner: does it cause crashes? (2014 Dec 12)
|
||||
Updated patch by Roland Eggner, Dec 16
|
||||
Updated patch from Charles, 2016 Jul 2
|
||||
|
||||
Patch to open folds for 'incsearch'. (Christian Brabandt, 2015 Jan 6)
|
||||
|
||||
Patch for building a 32bit Vim with 64bit MingW compiler.
|
||||
(Michael Soyka, 2014 Oct 15)
|
||||
|
||||
@@ -1872,13 +1857,6 @@ Ruby: ":ruby print $buffer.number" returns zero.
|
||||
|
||||
setpos() does not restore cursor position after :normal. (Tyru, 2010 Aug 11)
|
||||
|
||||
7 The 'directory' option supports changing path separators to "%" to make
|
||||
file names unique, also support this for 'backupdir'. (Mikolaj Machowski)
|
||||
Patch by Christian Brabandt, 2010 Oct 21.
|
||||
Is this an update: related to: #179
|
||||
https://github.com/chrisbra/vim-mq-patches/blob/master/backupdir
|
||||
Fixed patch 2017 Jul 1.
|
||||
|
||||
With "tw=55 fo+=a" typing space before ) doesn't work well. (Scott Mcdermott,
|
||||
2010 Oct 24)
|
||||
|
||||
@@ -1974,9 +1952,6 @@ Patch to support :undo absolute jump to file save number. (Christian Brabandt,
|
||||
Patch to use 'foldnestmax' also for "marker" foldmethod. (Arnaud Lacombe, 2011
|
||||
Jan 7)
|
||||
|
||||
Bug with 'incsearch' going to wrong line. (Wolfram Kresse, 2009 Aug 17)
|
||||
Only with "vim -u NONE".
|
||||
|
||||
Problem with editing file in binary mode. (Ingo Krabbe, 2009 Oct 8)
|
||||
|
||||
With 'wildmode' set to "longest:full,full" and pressing Tab once the first
|
||||
@@ -3452,8 +3427,6 @@ Macintosh:
|
||||
'magic' in history. (Margo)
|
||||
9 optwin.vim: Restoring a mapping for <Space> or <CR> is not correct for
|
||||
":noremap". Add "mapcmd({string}, {mode})? Use code from ":mkexrc".
|
||||
9 incsearch is incorrect for "/that/<Return>/this/;//" (last search pattern
|
||||
isn't updated).
|
||||
9 term_console is used before it is set (msdos, Amiga).
|
||||
9 Get out-of-memory for ":g/^/,$s//@/" on 1000 lines, this is not handled
|
||||
correctly. Get many error messages while redrawing the screen, which
|
||||
@@ -5229,16 +5202,22 @@ Mappings and Abbreviations:
|
||||
|
||||
|
||||
Incsearch:
|
||||
- Add a limit to the number of lines that are searched for 'incsearch'?
|
||||
- Wrong scrolling when using incsearch. Patch by Christian Brabandt, 2014
|
||||
Dec 4. Is this a good solution?
|
||||
- Temporarily open folds to show where the search ends up. Restore the
|
||||
folds when going to another line.
|
||||
Patch to open folds for 'incsearch'. (Christian Brabandt, 2015 Jan 6)
|
||||
- Bug with 'incsearch' going to wrong line. (Wolfram Kresse, 2009 Aug 17)
|
||||
Only with "vim -u NONE".
|
||||
- When no match is found and the user types more, the screen is redrawn
|
||||
anyway. Could skip that. Esp. if the line wraps and the text is scrolled
|
||||
up every time.
|
||||
- Temporarily open folds to show where the search ends up. Restore the
|
||||
folds when going to another line.
|
||||
- When incsearch used and hitting return, no need to search again in many
|
||||
cases, saves a lot of time in big files. (Slootman wants to work on this?)
|
||||
When not using special characters, can continue search from the last match
|
||||
(or not at all, when there was no match). See oldmail/webb/in.872.
|
||||
9 incsearch is incorrect for "/that/<Return>/this/;//" (last search pattern
|
||||
isn't updated).
|
||||
|
||||
|
||||
Searching:
|
||||
@@ -6152,5 +6131,5 @@ Far future and "big" extensions:
|
||||
are reflected in each Vim immediately. Could work with local files but
|
||||
also over the internet. See http://www.codingmonkeys.de/subethaedit/.
|
||||
|
||||
vim:tw=78:sw=4:sts=4:ts=8:ft=help:norl:
|
||||
vim:tw=78:sw=4:sts=4:ts=8:noet:ft=help:norl:
|
||||
vim: set fo+=n :
|
||||
|
||||
@@ -285,4 +285,4 @@ Address to send checks to:
|
||||
|
||||
This address is expected to be valid for a long time.
|
||||
|
||||
vim:tw=78:ts=8:ft=help:norl:
|
||||
vim:tw=78:ts=8:noet:ft=help:norl:
|
||||
|
||||
@@ -403,4 +403,4 @@ if it is not what you want do 'u.'. This will remove the contents of the
|
||||
first put, and repeat the put command for the second register. Repeat the
|
||||
'u.' until you got what you want.
|
||||
|
||||
vim:tw=78:ts=8:ft=help:norl:
|
||||
vim:tw=78:ts=8:noet:ft=help:norl:
|
||||
|
||||
@@ -189,4 +189,4 @@ donate part of the profit to help AIDS victims in Uganda. See |iccf|.
|
||||
|
||||
Next chapter: |usr_02.txt| The first steps in Vim
|
||||
|
||||
Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl:
|
||||
Copyright: see |manual-copyright| vim:tw=78:ts=8:noet:ft=help:norl:
|
||||
|
||||
@@ -698,4 +698,4 @@ Summary: *help-summary* >
|
||||
|
||||
Next chapter: |usr_03.txt| Moving around
|
||||
|
||||
Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl:
|
||||
Copyright: see |manual-copyright| vim:tw=78:ts=8:noet:ft=help:norl:
|
||||
|
||||
@@ -654,4 +654,4 @@ You will notice a few special marks. These include:
|
||||
|
||||
Next chapter: |usr_04.txt| Making small changes
|
||||
|
||||
Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl:
|
||||
Copyright: see |manual-copyright| vim:tw=78:ts=8:noet:ft=help:norl:
|
||||
|
||||
@@ -511,4 +511,4 @@ else:
|
||||
|
||||
Next chapter: |usr_05.txt| Set your settings
|
||||
|
||||
Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl:
|
||||
Copyright: see |manual-copyright| vim:tw=78:ts=8:noet:ft=help:norl:
|
||||
|
||||
@@ -664,4 +664,4 @@ This does mean there is less room to edit text, thus it's a compromise.
|
||||
|
||||
Next chapter: |usr_06.txt| Using syntax highlighting
|
||||
|
||||
Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl:
|
||||
Copyright: see |manual-copyright| vim:tw=78:ts=8:noet:ft=help:norl:
|
||||
|
||||
@@ -277,4 +277,4 @@ others look at the colored text.
|
||||
|
||||
Next chapter: |usr_07.txt| Editing more than one file
|
||||
|
||||
Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl:
|
||||
Copyright: see |manual-copyright| vim:tw=78:ts=8:noet:ft=help:norl:
|
||||
|
||||
@@ -476,4 +476,4 @@ This protects you from accidentally overwriting another file.
|
||||
|
||||
Next chapter: |usr_08.txt| Splitting windows
|
||||
|
||||
Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl:
|
||||
Copyright: see |manual-copyright| vim:tw=78:ts=8:noet:ft=help:norl:
|
||||
|
||||
@@ -598,4 +598,4 @@ For more information about tab pages see |tab-page|.
|
||||
|
||||
Next chapter: |usr_09.txt| Using the GUI
|
||||
|
||||
Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl:
|
||||
Copyright: see |manual-copyright| vim:tw=78:ts=8:noet:ft=help:norl:
|
||||
|
||||
@@ -287,4 +287,4 @@ You can tune the way Select mode works with the 'selectmode' option.
|
||||
|
||||
Next chapter: |usr_10.txt| Making big changes
|
||||
|
||||
Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl:
|
||||
Copyright: see |manual-copyright| vim:tw=78:ts=8:noet:ft=help:norl:
|
||||
|
||||
@@ -821,4 +821,4 @@ has written. To tell Vim to redraw the screen: >
|
||||
|
||||
Next chapter: |usr_11.txt| Recovering from a crash
|
||||
|
||||
Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl:
|
||||
Copyright: see |manual-copyright| vim:tw=78:ts=8:noet:ft=help:norl:
|
||||
|
||||
@@ -304,4 +304,4 @@ For remarks about encryption and the swap file, see |:recover-crypt|.
|
||||
|
||||
Next chapter: |usr_12.txt| Clever tricks
|
||||
|
||||
Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl:
|
||||
Copyright: see |manual-copyright| vim:tw=78:ts=8:noet:ft=help:norl:
|
||||
|
||||
@@ -355,4 +355,4 @@ matches and where they are.
|
||||
|
||||
Next chapter: |usr_20.txt| Typing command-line commands quickly
|
||||
|
||||
Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl:
|
||||
Copyright: see |manual-copyright| vim:tw=78:ts=8:noet:ft=help:norl:
|
||||
|
||||
@@ -381,4 +381,4 @@ there can be only one.
|
||||
|
||||
Next chapter: |usr_21.txt| Go away and come back
|
||||
|
||||
Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl:
|
||||
Copyright: see |manual-copyright| vim:tw=78:ts=8:noet:ft=help:norl:
|
||||
|
||||
@@ -496,4 +496,4 @@ For more details see |modeline|.
|
||||
|
||||
Next chapter: |usr_22.txt| Finding the file to edit
|
||||
|
||||
Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl:
|
||||
Copyright: see |manual-copyright| vim:tw=78:ts=8:noet:ft=help:norl:
|
||||
|
||||
@@ -397,4 +397,4 @@ can't be editing nothing!
|
||||
|
||||
Next chapter: |usr_23.txt| Editing other files
|
||||
|
||||
Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl:
|
||||
Copyright: see |manual-copyright| vim:tw=78:ts=8:noet:ft=help:norl:
|
||||
|
||||
@@ -340,4 +340,4 @@ decompression. You might need to install the programs first.
|
||||
|
||||
Next chapter: |usr_24.txt| Inserting quickly
|
||||
|
||||
Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl:
|
||||
Copyright: see |manual-copyright| vim:tw=78:ts=8:noet:ft=help:norl:
|
||||
|
||||
@@ -603,4 +603,4 @@ This deletes up to the third word into register g.
|
||||
|
||||
Next chapter: |usr_25.txt| Editing formatted text
|
||||
|
||||
Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl:
|
||||
Copyright: see |manual-copyright| vim:tw=78:ts=8:noet:ft=help:norl:
|
||||
|
||||
@@ -579,4 +579,4 @@ The "gR" command uses Virtual Replace mode. This preserves the layout:
|
||||
|
||||
Next chapter: |usr_26.txt| Repeating
|
||||
|
||||
Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl:
|
||||
Copyright: see |manual-copyright| vim:tw=78:ts=8:noet:ft=help:norl:
|
||||
|
||||
@@ -218,4 +218,4 @@ start all over, use the "-W" argument. It overwrites any existing file.
|
||||
|
||||
Next chapter: |usr_27.txt| Search commands and patterns
|
||||
|
||||
Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl:
|
||||
Copyright: see |manual-copyright| vim:tw=78:ts=8:noet:ft=help:norl:
|
||||
|
||||
@@ -560,4 +560,4 @@ and "\w" for "[0-9A-Za-z_]".
|
||||
|
||||
Next chapter: |usr_28.txt| Folding
|
||||
|
||||
Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl:
|
||||
Copyright: see |manual-copyright| vim:tw=78:ts=8:noet:ft=help:norl:
|
||||
|
||||
@@ -423,4 +423,4 @@ the defined folds. Then you can delete or add folds manually.
|
||||
|
||||
Next chapter: |usr_29.txt| Moving through programs
|
||||
|
||||
Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl:
|
||||
Copyright: see |manual-copyright| vim:tw=78:ts=8:noet:ft=help:norl:
|
||||
|
||||
@@ -608,4 +608,4 @@ for the identifier. Example (cursor on "idx"):
|
||||
|
||||
Next chapter: |usr_30.txt| Editing programs
|
||||
|
||||
Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl:
|
||||
Copyright: see |manual-copyright| vim:tw=78:ts=8:noet:ft=help:norl:
|
||||
|
||||
@@ -640,4 +640,4 @@ For more details see |format-comments|.
|
||||
|
||||
Next chapter: |usr_31.txt| Exploiting the GUI
|
||||
|
||||
Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl:
|
||||
Copyright: see |manual-copyright| vim:tw=78:ts=8:noet:ft=help:norl:
|
||||
|
||||
@@ -269,4 +269,4 @@ another font size, for example.
|
||||
|
||||
Next chapter: |usr_32.txt| The undo tree
|
||||
|
||||
Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl:
|
||||
Copyright: see |manual-copyright| vim:tw=78:ts=8:noet:ft=help:norl:
|
||||
|
||||
@@ -177,4 +177,4 @@ use the |undotree()| function. To see what it returns: >
|
||||
|
||||
Next chapter: |usr_40.txt| Make new commands
|
||||
|
||||
Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl:
|
||||
Copyright: see |manual-copyright| vim:tw=78:ts=8:noet:ft=help:norl:
|
||||
|
||||
@@ -654,4 +654,4 @@ To set it back to the normal behavior, make 'eventignore' empty: >
|
||||
|
||||
Next chapter: |usr_41.txt| Write a Vim script
|
||||
|
||||
Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl:
|
||||
Copyright: see |manual-copyright| vim:tw=78:ts=8:noet:ft=help:norl:
|
||||
|
||||
@@ -2592,4 +2592,4 @@ It's good if you add a line to allow automatic updating. See |glvs-plugins|.
|
||||
|
||||
Next chapter: |usr_42.txt| Add new menus
|
||||
|
||||
Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl:
|
||||
Copyright: see |manual-copyright| vim:tw=78:ts=8:noet:ft=help:norl:
|
||||
|
||||
@@ -362,4 +362,4 @@ is...
|
||||
|
||||
Next chapter: |usr_43.txt| Using filetypes
|
||||
|
||||
Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl:
|
||||
Copyright: see |manual-copyright| vim:tw=78:ts=8:noet:ft=help:norl:
|
||||
|
||||
@@ -176,4 +176,4 @@ and sources a script or executes a function to check the contents of the file.
|
||||
|
||||
Next chapter: |usr_44.txt| Your own syntax highlighted
|
||||
|
||||
Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl:
|
||||
Copyright: see |manual-copyright| vim:tw=78:ts=8:noet:ft=help:norl:
|
||||
|
||||
@@ -716,4 +716,4 @@ up scrolling backwards and CTRL-L.
|
||||
|
||||
Next chapter: |usr_45.txt| Select your language
|
||||
|
||||
Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl:
|
||||
Copyright: see |manual-copyright| vim:tw=78:ts=8:noet:ft=help:norl:
|
||||
|
||||
@@ -416,4 +416,4 @@ Don't type the spaces. See |i_CTRL-V_digit| for the details.
|
||||
|
||||
Next chapter: |usr_90.txt| Installing Vim
|
||||
|
||||
Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl:
|
||||
Copyright: see |manual-copyright| vim:tw=78:ts=8:noet:ft=help:norl:
|
||||
|
||||
@@ -495,4 +495,4 @@ files that you created. You might want to keep that.
|
||||
|
||||
Table of contents: |usr_toc.txt|
|
||||
|
||||
Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl:
|
||||
Copyright: see |manual-copyright| vim:tw=78:ts=8:noet:ft=help:norl:
|
||||
|
||||
@@ -352,4 +352,4 @@ Before you can use Vim.
|
||||
|
||||
==============================================================================
|
||||
|
||||
Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl:
|
||||
Copyright: see |manual-copyright| vim:tw=78:ts=8:noet:ft=help:norl:
|
||||
|
||||
@@ -352,4 +352,4 @@ this and accidentally hit CTRL-B, it is very difficult to find out how to undo
|
||||
it. Since hardly anybody uses this feature, it is disabled by default. If
|
||||
you want to use it, define RIGHTLEFT in feature.h before compiling. |'revins'|
|
||||
|
||||
vim:tw=78:ts=8:ft=help:norl:
|
||||
vim:tw=78:ts=8:noet:ft=help:norl:
|
||||
|
||||
@@ -7810,4 +7810,4 @@ Solution: Allocate the buffer for the shell command.
|
||||
Files: src/ex_docmd.c
|
||||
|
||||
|
||||
vim:tw=78:ts=8:ft=help:norl:
|
||||
vim:tw=78:ts=8:noet:ft=help:norl:
|
||||
|
||||
@@ -14527,4 +14527,4 @@ Solution: Don't advance the cursor to include a line break when it's already
|
||||
Files: src/search.c
|
||||
|
||||
|
||||
vim:tw=78:ts=8:ft=help:norl:
|
||||
vim:tw=78:ts=8:noet:ft=help:norl:
|
||||
|
||||
@@ -18309,4 +18309,4 @@ Files: src/os_win32.c
|
||||
|
||||
|
||||
|
||||
vim:tw=78:ts=8:ft=help:norl:
|
||||
vim:tw=78:ts=8:noet:ft=help:norl:
|
||||
|
||||
@@ -25792,4 +25792,4 @@ Solution: Move the todo items to the help file.
|
||||
Files: src/terminal.c
|
||||
|
||||
|
||||
vim:tw=78:ts=8:ft=help:norl:
|
||||
vim:tw=78:ts=8:noet:ft=help:norl:
|
||||
|
||||
@@ -1021,4 +1021,4 @@ These are remarks about running the POSIX test suite:
|
||||
- ex test 534 fails because .exrc isn't read in silent mode.
|
||||
|
||||
|
||||
vim:tw=78:ts=8:ft=help:norl:
|
||||
vim:tw=78:ts=8:noet:ft=help:norl:
|
||||
|
||||
@@ -538,4 +538,4 @@ g CTRL-H Start Select mode, blockwise. This is like CTRL-V,
|
||||
but starts Select mode instead of Visual mode.
|
||||
Mnemonic: "get Highlighted".
|
||||
|
||||
vim:tw=78:ts=8:ft=help:norl:
|
||||
vim:tw=78:ts=8:noet:ft=help:norl:
|
||||
|
||||
@@ -1311,4 +1311,4 @@ unlisted The buffer is not in the buffer list. It is not used for
|
||||
:setlocal nobuflisted
|
||||
<
|
||||
|
||||
vim:tw=78:ts=8:ft=help:norl:
|
||||
vim:tw=78:ts=8:noet:ft=help:norl:
|
||||
|
||||
@@ -95,4 +95,4 @@ the directory /usr/local/xpm and untar the file there you can use the
|
||||
uncommented lines in the Makefile without changing them. If you use another
|
||||
xpm directory you will need to change the XPM_DIR in src/Makefile.
|
||||
|
||||
vim:tw=78:ts=8:ft=help:norl:
|
||||
vim:tw=78:ts=8:noet:ft=help:norl:
|
||||
|
||||
@@ -586,7 +586,7 @@ au BufNewFile,BufRead auto.master setf conf
|
||||
au BufNewFile,BufRead *.mas,*.master setf master
|
||||
|
||||
" Forth
|
||||
au BufNewFile,BufRead *.fs,*.ft setf forth
|
||||
au BufNewFile,BufRead *.fs,*.ft,*.fth setf forth
|
||||
|
||||
" Reva Forth
|
||||
au BufNewFile,BufRead *.frt setf reva
|
||||
@@ -1865,6 +1865,9 @@ au BufNewFile,BufRead */etc/xdg/menus/*.menu setf xml
|
||||
" ATI graphics driver configuration
|
||||
au BufNewFile,BufRead fglrxrc setf xml
|
||||
|
||||
" Web Services Description Language (WSDL)
|
||||
au BufNewFile,BufRead *.wsdl setf xml
|
||||
|
||||
" XLIFF (XML Localisation Interchange File Format) is also XML
|
||||
au BufNewFile,BufRead *.xlf setf xml
|
||||
au BufNewFile,BufRead *.xliff setf xml
|
||||
|
||||
@@ -1,164 +1,262 @@
|
||||
encoding
|
||||
abolish
|
||||
abolish_category
|
||||
abolish_events
|
||||
abolish_object
|
||||
abolish_protocol
|
||||
abs
|
||||
acos
|
||||
acyclic_term
|
||||
after
|
||||
alias
|
||||
always_true_or_false_goals
|
||||
arg
|
||||
asin
|
||||
asserta
|
||||
assertz
|
||||
atan
|
||||
atan2
|
||||
atom
|
||||
atomic
|
||||
atom_chars
|
||||
atom_chars
|
||||
atom_codes
|
||||
atom_codes
|
||||
atom_concat
|
||||
atom_concat
|
||||
atom_length
|
||||
at_end_of_stream
|
||||
bagof
|
||||
before
|
||||
built_in
|
||||
call
|
||||
callable
|
||||
calls
|
||||
catch
|
||||
category
|
||||
category_property
|
||||
ceiling
|
||||
char_code
|
||||
char_conversion
|
||||
clause
|
||||
clean
|
||||
close
|
||||
code_prefix
|
||||
coinduction
|
||||
coinductive
|
||||
compare
|
||||
complements
|
||||
complements
|
||||
complements_object
|
||||
compound
|
||||
conforms_to_protocol
|
||||
context
|
||||
context_switching_calls
|
||||
copy_term
|
||||
cos
|
||||
create_category
|
||||
create_logtalk_flag
|
||||
create_object
|
||||
create_protocol
|
||||
current_category
|
||||
current_char_conversion
|
||||
current_event
|
||||
current_input
|
||||
current_logtalk_flag
|
||||
current_object
|
||||
current_op
|
||||
current_output
|
||||
current_predicate
|
||||
current_prolog_flag
|
||||
current_protocol
|
||||
debug
|
||||
define_events
|
||||
deprecated
|
||||
discontiguous
|
||||
div
|
||||
domain_error
|
||||
duplicated_directives
|
||||
dynamic
|
||||
dynamic_declarations
|
||||
elif
|
||||
else
|
||||
encoding
|
||||
encoding_directive
|
||||
endif
|
||||
end_category
|
||||
end_object
|
||||
end_protocol
|
||||
info
|
||||
initialization
|
||||
object
|
||||
protocol
|
||||
synchronized
|
||||
threaded
|
||||
uses
|
||||
alias
|
||||
discontiguous
|
||||
meta_predicate
|
||||
mode
|
||||
op
|
||||
private
|
||||
protected
|
||||
public
|
||||
current_object
|
||||
current_protocol
|
||||
current_category
|
||||
object_property
|
||||
protocol_property
|
||||
category_property
|
||||
create_object
|
||||
create_protocol
|
||||
create_category
|
||||
abolish_object
|
||||
abolish_protocol
|
||||
abolish_category
|
||||
complements
|
||||
complements_object
|
||||
engines
|
||||
ensure_loaded
|
||||
evaluation_error
|
||||
events
|
||||
existence_error
|
||||
exp
|
||||
expand_goal
|
||||
expand_term
|
||||
export
|
||||
extends
|
||||
extends_category
|
||||
extends_object
|
||||
extends_protocol
|
||||
extends_category
|
||||
fail
|
||||
false
|
||||
findall
|
||||
float
|
||||
float_fractional_part
|
||||
float_integer_part
|
||||
floor
|
||||
flush_output
|
||||
forall
|
||||
forward
|
||||
functor
|
||||
get_byte
|
||||
get_char
|
||||
get_code
|
||||
goal_expansion
|
||||
ground
|
||||
halt
|
||||
hook
|
||||
if
|
||||
ignore
|
||||
implements
|
||||
implements_protocol
|
||||
imports
|
||||
imports_category
|
||||
include
|
||||
info
|
||||
initialization
|
||||
instantiates
|
||||
instantiates_class
|
||||
specializes
|
||||
specializes_class
|
||||
abolish_events
|
||||
current_event
|
||||
define_events
|
||||
logtalk_load
|
||||
instantiation_error
|
||||
integer
|
||||
keysort
|
||||
lambda_variables
|
||||
log
|
||||
logtalk_compile
|
||||
logtalk_library_path
|
||||
current_logtalk_flag
|
||||
set_logtalk_flag
|
||||
threaded_call
|
||||
threaded_once
|
||||
threaded_ignore
|
||||
threaded_exit
|
||||
threaded_peek
|
||||
threaded_wait
|
||||
threaded_notify
|
||||
self
|
||||
this
|
||||
sender
|
||||
parameter
|
||||
before
|
||||
after
|
||||
phrase
|
||||
expand_term
|
||||
goal_expansion
|
||||
term_expansion
|
||||
true
|
||||
fail
|
||||
call
|
||||
catch
|
||||
throw
|
||||
unify_with_occurs_check
|
||||
var
|
||||
atom
|
||||
integer
|
||||
float
|
||||
atomic
|
||||
compound
|
||||
logtalk_load
|
||||
logtalk_load_context
|
||||
logtalk_make
|
||||
logtalk_make_target_action
|
||||
max
|
||||
meta_non_terminal
|
||||
meta_predicate
|
||||
min
|
||||
missing_directives
|
||||
mod
|
||||
mode
|
||||
modules
|
||||
multifile
|
||||
nl
|
||||
nonvar
|
||||
number
|
||||
arg
|
||||
copy_term
|
||||
functor
|
||||
current_predicate
|
||||
predicate_property
|
||||
abolish
|
||||
assertz
|
||||
asserta
|
||||
clause
|
||||
retract
|
||||
retractall
|
||||
bagof
|
||||
findall
|
||||
forall
|
||||
setof
|
||||
current_input
|
||||
current_output
|
||||
set_input
|
||||
set_output
|
||||
numbervars
|
||||
number_chars
|
||||
number_chars
|
||||
number_codes
|
||||
number_codes
|
||||
object
|
||||
object_property
|
||||
once
|
||||
op
|
||||
open
|
||||
close
|
||||
flush_output
|
||||
stream_property
|
||||
at_end_of_stream
|
||||
set_stream_position
|
||||
get_char
|
||||
get_code
|
||||
optimize
|
||||
parameter
|
||||
peek_byte
|
||||
peek_char
|
||||
peek_code
|
||||
permission_error
|
||||
phrase
|
||||
portability
|
||||
predicate_property
|
||||
private
|
||||
prolog_compatible_version
|
||||
prolog_compiler
|
||||
prolog_dialect
|
||||
prolog_loader
|
||||
prolog_version
|
||||
protected
|
||||
protocol
|
||||
protocol_property
|
||||
public
|
||||
put_byte
|
||||
put_char
|
||||
put_code
|
||||
nl
|
||||
get_byte
|
||||
peek_byte
|
||||
put_byte
|
||||
read
|
||||
read_term
|
||||
redefined_built_ins
|
||||
reexport
|
||||
reload
|
||||
rem
|
||||
repeat
|
||||
report
|
||||
representation_error
|
||||
resource_error
|
||||
retract
|
||||
retractall
|
||||
round
|
||||
scratch_directory
|
||||
self
|
||||
sender
|
||||
setof
|
||||
set_input
|
||||
set_logtalk_flag
|
||||
set_output
|
||||
set_prolog_flag
|
||||
set_stream_position
|
||||
sign
|
||||
sin
|
||||
singleton_variables
|
||||
sort
|
||||
source_data
|
||||
specializes
|
||||
specializes_class
|
||||
sqrt
|
||||
stream_property
|
||||
subsumes_term
|
||||
sub_atom
|
||||
suspicious_calls
|
||||
synchronized
|
||||
syntax_error
|
||||
system_error
|
||||
tabling
|
||||
tan
|
||||
term_expansion
|
||||
term_variables
|
||||
this
|
||||
threaded
|
||||
threaded_call
|
||||
threaded_engine
|
||||
threaded_engine_create
|
||||
threaded_engine_destroy
|
||||
threaded_engine_fetch
|
||||
threaded_engine_next
|
||||
threaded_engine_next_reified
|
||||
threaded_engine_post
|
||||
threaded_engine_self
|
||||
threaded_engine_yield
|
||||
threaded_exit
|
||||
threaded_ignore
|
||||
threaded_notify
|
||||
threaded_once
|
||||
threaded_peek
|
||||
threaded_wait
|
||||
threads
|
||||
throw
|
||||
trivial_goal_fails
|
||||
true
|
||||
truncate
|
||||
type_error
|
||||
undefined_predicates
|
||||
underscore_variables
|
||||
unify_with_occurs_check
|
||||
unknown_entities
|
||||
unknown_predicates
|
||||
uses
|
||||
use_module
|
||||
var
|
||||
version
|
||||
write
|
||||
writeq
|
||||
write_canonical
|
||||
atom_chars
|
||||
atom_codes
|
||||
atom_concat
|
||||
number_chars
|
||||
number_codes
|
||||
current_op
|
||||
char_conversion
|
||||
current_char_conversion
|
||||
once
|
||||
repeat
|
||||
atom_length
|
||||
atom_concat
|
||||
sub_atom
|
||||
atom_chars
|
||||
atom_codes
|
||||
char_code
|
||||
number_chars
|
||||
number_codes
|
||||
set_prolog_flag
|
||||
current_prolog_flag
|
||||
halt
|
||||
abs
|
||||
atan
|
||||
ceiling
|
||||
cos
|
||||
exp
|
||||
float_fractional_part
|
||||
float_integer_part
|
||||
floor
|
||||
log
|
||||
mod
|
||||
rem
|
||||
round
|
||||
sign
|
||||
sin
|
||||
sqrt
|
||||
truncate
|
||||
xor
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" Logtalk filetype plugin file
|
||||
" Language: Logtalk
|
||||
" Maintainer: Paulo Moura <pmoura@logtalk.org>
|
||||
" Latest Revision: 2007-07-06
|
||||
" Latest Revision: 2018-08-03
|
||||
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
@@ -10,9 +10,10 @@ let b:did_ftplugin = 1
|
||||
|
||||
let b:undo_ftplugin = "setl ts< sw< fdm< fdc< ai< dict<"
|
||||
|
||||
"setlocal ts=4
|
||||
setlocal ts=4
|
||||
setlocal sw=4
|
||||
setlocal fdm=syntax
|
||||
setlocal fdn=10
|
||||
setlocal fdc=2
|
||||
setlocal autoindent
|
||||
setlocal dict=$VIMRUNTIME/ftplugin/logtalk.dict
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" Vim filetype plugin
|
||||
" Language: Vim
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2017 Dec 05
|
||||
" Last Change: 2018 Aug 07
|
||||
|
||||
" Only do this when not done yet for this buffer
|
||||
if exists("b:did_ftplugin")
|
||||
@@ -17,19 +17,19 @@ set cpo-=C
|
||||
if !exists('*VimFtpluginUndo')
|
||||
func VimFtpluginUndo()
|
||||
setl fo< isk< com< tw< commentstring<
|
||||
if exists(b:did_add_maps)
|
||||
silent! nunmap <buffer> [['
|
||||
silent! vunmap <buffer> [['
|
||||
silent! nunmap <buffer> ]]'
|
||||
silent! vunmap <buffer> ]]'
|
||||
silent! nunmap <buffer> []'
|
||||
silent! vunmap <buffer> []'
|
||||
silent! nunmap <buffer> ]['
|
||||
silent! vunmap <buffer> ]['
|
||||
silent! nunmap <buffer> ]"'
|
||||
silent! vunmap <buffer> ]"'
|
||||
silent! nunmap <buffer> ["'
|
||||
silent! vunmap <buffer> ["'
|
||||
if exists('b:did_add_maps')
|
||||
silent! nunmap <buffer> [[
|
||||
silent! vunmap <buffer> [[
|
||||
silent! nunmap <buffer> ]]
|
||||
silent! vunmap <buffer> ]]
|
||||
silent! nunmap <buffer> []
|
||||
silent! vunmap <buffer> []
|
||||
silent! nunmap <buffer> ][
|
||||
silent! vunmap <buffer> ][
|
||||
silent! nunmap <buffer> ]"
|
||||
silent! vunmap <buffer> ]"
|
||||
silent! nunmap <buffer> ["
|
||||
silent! vunmap <buffer> ["
|
||||
endif
|
||||
unlet! b:match_ignorecase b:match_words b:match_skip b:did_add_maps
|
||||
endfunc
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
" Maintainer: Paulo Moura <pmoura@logtalk.org>
|
||||
" Revised on: 2008.06.02
|
||||
" Revised on: 2018.08.04
|
||||
" Language: Logtalk
|
||||
|
||||
" This Logtalk indent file is a modified version of the Prolog
|
||||
@@ -42,6 +42,9 @@ function! GetLogtalkIndent()
|
||||
" Check for clause head on previous line
|
||||
elseif pline =~ ':-\s*\(%.*\)\?$'
|
||||
let ind = ind + shiftwidth()
|
||||
" Check for grammar rule head on previous line
|
||||
elseif pline =~ '-->\s*\(%.*\)\?$'
|
||||
let ind = ind + shiftwidth()
|
||||
" Check for entity closing directive on previous line
|
||||
elseif pline =~ '^\s*:-\send_\(object\|protocol\|category\)\.\(%.*\)\?$'
|
||||
let ind = ind - shiftwidth()
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
" Maintainer: Debian Vim Maintainers
|
||||
" Former Maintainers: Gerfried Fuchs <alfie@ist.org>
|
||||
" Wichert Akkerman <wakkerma@debian.org>
|
||||
" Last Change: 2018 May 31
|
||||
" Last Change: 2018 Aug 11
|
||||
" URL: https://salsa.debian.org/vim-team/vim-debian/blob/master/syntax/debcontrol.vim
|
||||
|
||||
" Standard syntax initialization
|
||||
@@ -30,7 +30,7 @@ let s:kernels = ['linux', 'hurd', 'kfreebsd', 'knetbsd', 'kopensolaris', 'netbsd
|
||||
let s:archs = [
|
||||
\ 'alpha', 'amd64', 'armeb', 'armel', 'armhf', 'arm64', 'avr32', 'hppa'
|
||||
\, 'i386', 'ia64', 'lpia', 'm32r', 'm68k', 'mipsel', 'mips64el', 'mips'
|
||||
\, 'powerpcspe', 'powerpc', 'ppc64el', 'ppc64', 's390x', 's390', 'sh3eb'
|
||||
\, 'powerpcspe', 'powerpc', 'ppc64el', 'ppc64', 'riscv64', 's390x', 's390', 'sh3eb'
|
||||
\, 'sh3', 'sh4eb', 'sh4', 'sh', 'sparc64', 'sparc', 'x32'
|
||||
\ ]
|
||||
let s:pairs = [
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
" Language: Debian sources.list
|
||||
" Maintainer: Debian Vim Maintainers
|
||||
" Former Maintainer: Matthijs Mohlmann <matthijs@cacholong.nl>
|
||||
" Last Change: 2018 May 03
|
||||
" Last Change: 2018 Aug 11
|
||||
" URL: https://salsa.debian.org/vim-team/vim-debian/blob/master/syntax/debsources.vim
|
||||
|
||||
" Standard syntax initialization
|
||||
@@ -25,7 +25,7 @@ let s:supported = [
|
||||
\ 'oldstable', 'stable', 'testing', 'unstable', 'experimental',
|
||||
\ 'wheezy', 'jessie', 'stretch', 'sid', 'rc-buggy',
|
||||
\
|
||||
\ 'trusty', 'xenial', 'artful', 'bionic', 'cosmic', 'devel'
|
||||
\ 'trusty', 'xenial', 'bionic', 'cosmic', 'devel'
|
||||
\ ]
|
||||
let s:unsupported = [
|
||||
\ 'buzz', 'rex', 'bo', 'hamm', 'slink', 'potato',
|
||||
@@ -34,7 +34,7 @@ let s:unsupported = [
|
||||
\ 'warty', 'hoary', 'breezy', 'dapper', 'edgy', 'feisty',
|
||||
\ 'gutsy', 'hardy', 'intrepid', 'jaunty', 'karmic', 'lucid',
|
||||
\ 'maverick', 'natty', 'oneiric', 'precise', 'quantal', 'raring', 'saucy',
|
||||
\ 'utopic', 'vivid', 'wily', 'yakkety', 'zesty'
|
||||
\ 'utopic', 'vivid', 'wily', 'yakkety', 'zesty', 'artful'
|
||||
\ ]
|
||||
let &cpo=s:cpo
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
"
|
||||
" Language: Logtalk
|
||||
" Maintainer: Paulo Moura <pmoura@logtalk.org>
|
||||
" Last Change: February 4, 2012
|
||||
" Last Change: August 3, 2018
|
||||
|
||||
|
||||
" quit when a syntax file was already loaded
|
||||
@@ -79,13 +79,13 @@ syn region logtalkDir matchgroup=logtalkDirTag start=":- elif(" matchgroup=log
|
||||
syn match logtalkDirTag ":- else\."
|
||||
syn match logtalkDirTag ":- endif\."
|
||||
syn region logtalkDir matchgroup=logtalkDirTag start=":- alias(" matchgroup=logtalkDirTag end=")\." contains=ALL
|
||||
syn region logtalkDir matchgroup=logtalkDirTag start=":- calls(" matchgroup=logtalkDirTag end=")\." contains=ALL
|
||||
syn region logtalkDir matchgroup=logtalkDirTag start=":- coinductive(" matchgroup=logtalkDirTag end=")\." contains=ALL
|
||||
syn region logtalkDir matchgroup=logtalkDirTag start=":- encoding(" matchgroup=logtalkDirTag end=")\." contains=ALL
|
||||
syn region logtalkDir matchgroup=logtalkDirTag start=":- initialization(" matchgroup=logtalkDirTag end=")\." contains=ALL
|
||||
syn region logtalkDir matchgroup=logtalkDirTag start=":- info(" matchgroup=logtalkDirTag end=")\." contains=ALL
|
||||
syn region logtalkDir matchgroup=logtalkDirTag start=":- mode(" matchgroup=logtalkDirTag end=")\." contains=logtalkOperator, logtalkAtom
|
||||
syn region logtalkDir matchgroup=logtalkDirTag start=":- dynamic(" matchgroup=logtalkDirTag end=")\." contains=ALL
|
||||
syn match logtalkDirTag ":- built_in\."
|
||||
syn match logtalkDirTag ":- dynamic\."
|
||||
syn region logtalkDir matchgroup=logtalkDirTag start=":- discontiguous(" matchgroup=logtalkDirTag end=")\." contains=ALL
|
||||
syn region logtalkDir matchgroup=logtalkDirTag start=":- multifile(" matchgroup=logtalkDirTag end=")\." contains=ALL
|
||||
@@ -131,17 +131,20 @@ syn match logtalkBuiltIn "\<\(instantiat\|specializ\)es_class\ze("
|
||||
syn match logtalkBuiltIn "\<\(abolish\|define\)_events\ze("
|
||||
syn match logtalkBuiltIn "\<current_event\ze("
|
||||
|
||||
syn match logtalkBuiltIn "\<\(curren\|se\)t_logtalk_flag\ze("
|
||||
syn match logtalkBuiltIn "\<\(create\|current\|set\)_logtalk_flag\ze("
|
||||
|
||||
syn match logtalkBuiltIn "\<logtalk_\(compile\|l\(ibrary_path\|oad\|oad_context\)\)\ze("
|
||||
syn match logtalkBuiltIn "\<logtalk_\(compile\|l\(ibrary_path\|oad\|oad_context\)\|make\(_target_action\)\?\)\ze("
|
||||
syn match logtalkBuiltIn "\<logtalk_make\>"
|
||||
|
||||
syn match logtalkBuiltIn "\<\(for\|retract\)all\ze("
|
||||
|
||||
syn match logtalkBuiltIn "\<threaded\(_\(call\|once\|ignore\|exit\|peek\|wait\|notify\)\)\?\ze("
|
||||
syn match logtalkBuiltIn "\<threaded_engine\(_\(create\|destroy\|self\|next\|next_reified\|yield\|post\|fetch\)\)\?\ze("
|
||||
|
||||
|
||||
" Logtalk built-in methods
|
||||
|
||||
syn match logtalkBuiltInMethod "\<context\ze("
|
||||
syn match logtalkBuiltInMethod "\<parameter\ze("
|
||||
syn match logtalkBuiltInMethod "\<se\(lf\|nder\)\ze("
|
||||
syn match logtalkBuiltInMethod "\<this\ze("
|
||||
@@ -159,6 +162,8 @@ syn match logtalkBuiltInMethod "\<f\(ind\|or\)all\ze("
|
||||
syn match logtalkBuiltInMethod "\<before\ze("
|
||||
syn match logtalkBuiltInMethod "\<after\ze("
|
||||
|
||||
syn match logtalkBuiltInMethod "\<forward\ze("
|
||||
|
||||
syn match logtalkBuiltInMethod "\<expand_\(goal\|term\)\ze("
|
||||
syn match logtalkBuiltInMethod "\<\(goal\|term\)_expansion\ze("
|
||||
syn match logtalkBuiltInMethod "\<phrase\ze("
|
||||
@@ -174,6 +179,7 @@ syn match logtalkOperator "@"
|
||||
|
||||
syn match logtalkKeyword "\<true\>"
|
||||
syn match logtalkKeyword "\<fail\>"
|
||||
syn match logtalkKeyword "\<false\>"
|
||||
syn match logtalkKeyword "\<ca\(ll\|tch\)\ze("
|
||||
syn match logtalkOperator "!"
|
||||
" syn match logtalkOperator ","
|
||||
@@ -181,11 +187,14 @@ syn match logtalkOperator ";"
|
||||
syn match logtalkOperator "-->"
|
||||
syn match logtalkOperator "->"
|
||||
syn match logtalkKeyword "\<throw\ze("
|
||||
syn match logtalkKeyword "\<\(instantiation\|system\)_error\>"
|
||||
syn match logtalkKeyword "\<\(type\|domain\|existence\|permission\|representation\|evaluation\|resource\|syntax\)_error\ze("
|
||||
|
||||
|
||||
" Term unification
|
||||
|
||||
syn match logtalkOperator "="
|
||||
syn match logtalkKeyword "\<subsumes_term\ze("
|
||||
syn match logtalkKeyword "\<unify_with_occurs_check\ze("
|
||||
syn match logtalkOperator "\\="
|
||||
|
||||
@@ -199,6 +208,7 @@ syn match logtalkKeyword "\<float\ze("
|
||||
syn match logtalkKeyword "\<c\(allable\|ompound\)\ze("
|
||||
syn match logtalkKeyword "\<n\(onvar\|umber\)\ze("
|
||||
syn match logtalkKeyword "\<ground\ze("
|
||||
syn match logtalkKeyword "\<acyclic_term\ze("
|
||||
|
||||
|
||||
" Term comparison
|
||||
@@ -219,14 +229,20 @@ syn match logtalkKeyword "\<arg\ze("
|
||||
syn match logtalkOperator "=\.\."
|
||||
syn match logtalkKeyword "\<copy_term\ze("
|
||||
syn match logtalkKeyword "\<numbervars\ze("
|
||||
syn match logtalkKeyword "\<term_variables\ze("
|
||||
|
||||
|
||||
" Arithemtic evaluation
|
||||
" Predicate aliases
|
||||
|
||||
syn match logtalkOperator "\<as\>"
|
||||
|
||||
|
||||
" Arithmetic evaluation
|
||||
|
||||
syn match logtalkOperator "\<is\>"
|
||||
|
||||
|
||||
" Arithemtic comparison
|
||||
" Arithmetic comparison
|
||||
|
||||
syn match logtalkOperator "=:="
|
||||
syn match logtalkOperator "=\\="
|
||||
@@ -299,16 +315,18 @@ syn match logtalkOperator "-"
|
||||
syn match logtalkOperator "\*"
|
||||
syn match logtalkOperator "//"
|
||||
syn match logtalkOperator "/"
|
||||
syn match logtalkKeyword "\<div\ze("
|
||||
syn match logtalkKeyword "\<r\(ound\|em\)\ze("
|
||||
syn match logtalkKeyword "\<e\>"
|
||||
syn match logtalkKeyword "\<pi\>"
|
||||
syn match logtalkKeyword "\<div\>"
|
||||
syn match logtalkKeyword "\<rem\>"
|
||||
syn match logtalkKeyword "\<mod\ze("
|
||||
syn match logtalkKeyword "\<m\(ax\|in\|od\)\ze("
|
||||
syn match logtalkKeyword "\<mod\>"
|
||||
syn match logtalkKeyword "\<abs\ze("
|
||||
syn match logtalkKeyword "\<sign\ze("
|
||||
syn match logtalkKeyword "\<flo\(or\|at\(_\(integer\|fractional\)_part\)\?\)\ze("
|
||||
syn match logtalkKeyword "\<truncate\ze("
|
||||
syn match logtalkKeyword "\<t\(an\|runcate\)\ze("
|
||||
syn match logtalkKeyword "\<ceiling\ze("
|
||||
|
||||
|
||||
@@ -317,7 +335,7 @@ syn match logtalkKeyword "\<ceiling\ze("
|
||||
syn match logtalkOperator "\*\*"
|
||||
syn match logtalkKeyword "\<s\(in\|qrt\)\ze("
|
||||
syn match logtalkKeyword "\<cos\ze("
|
||||
syn match logtalkKeyword "\<atan\ze("
|
||||
syn match logtalkKeyword "\<a\(cos\|sin\|tan\|tan2\)\ze("
|
||||
syn match logtalkKeyword "\<exp\ze("
|
||||
syn match logtalkKeyword "\<log\ze("
|
||||
|
||||
@@ -329,6 +347,7 @@ syn match logtalkOperator "<<"
|
||||
syn match logtalkOperator "/\\"
|
||||
syn match logtalkOperator "\\/"
|
||||
syn match logtalkOperator "\\"
|
||||
syn match logtalkKeyword "\<xor\ze("
|
||||
|
||||
|
||||
" Logtalk list operator
|
||||
@@ -347,7 +366,7 @@ syn match logtalkNumber "\<\d\+\>"
|
||||
syn match logtalkNumber "\<\d\+\.\d\+\>"
|
||||
syn match logtalkNumber "\<\d\+[eE][-+]\=\d\+\>"
|
||||
syn match logtalkNumber "\<\d\+\.\d\+[eE][-+]\=\d\+\>"
|
||||
syn match logtalkNumber "\<0'.\|0''\|0'\"\>"
|
||||
syn match logtalkNumber "\<0'[\\]\?.\|0''\|0'\"\>"
|
||||
syn match logtalkNumber "\<0b[0-1]\+\>"
|
||||
syn match logtalkNumber "\<0o\o\+\>"
|
||||
syn match logtalkNumber "\<0x\x\+\>"
|
||||
|
||||
@@ -1791,6 +1791,12 @@ struct exarg
|
||||
void *cookie; /* argument for getline() */
|
||||
#ifdef FEAT_EVAL
|
||||
struct condstack *cstack; /* condition stack for ":if" etc. */
|
||||
#endif
|
||||
long verbose_save; // saved value of p_verbose
|
||||
int save_msg_silent; // saved value of msg_silent
|
||||
int did_esilent; // how many times emsg_silent was incremented
|
||||
#ifdef HAVE_SANDBOX
|
||||
int did_sandbox; // when TRUE did ++sandbox
|
||||
#endif
|
||||
};
|
||||
|
||||
|
||||
559
src/ex_docmd.c
559
src/ex_docmd.c
@@ -68,6 +68,7 @@ static char_u *do_one_cmd(char_u **, int, struct condstack *, char_u *(*fgetline
|
||||
static char_u *do_one_cmd(char_u **, int, char_u *(*fgetline)(int, void *, int), void *cookie);
|
||||
static int if_level = 0; /* depth in :if */
|
||||
#endif
|
||||
static void free_cmdmod(void);
|
||||
static void append_command(char_u *cmd);
|
||||
static char_u *find_command(exarg_T *eap, int *full);
|
||||
|
||||
@@ -1709,13 +1710,7 @@ do_one_cmd(
|
||||
char_u *errormsg = NULL; /* error message */
|
||||
char_u *after_modifier = NULL;
|
||||
exarg_T ea; /* Ex command arguments */
|
||||
long verbose_save = -1;
|
||||
int save_msg_scroll = msg_scroll;
|
||||
int save_msg_silent = -1;
|
||||
int did_esilent = 0;
|
||||
#ifdef HAVE_SANDBOX
|
||||
int did_sandbox = FALSE;
|
||||
#endif
|
||||
cmdmod_T save_cmdmod;
|
||||
int ni; /* set when Not Implemented */
|
||||
char_u *cmd;
|
||||
@@ -1742,236 +1737,26 @@ do_one_cmd(
|
||||
* recursive calls.
|
||||
*/
|
||||
save_cmdmod = cmdmod;
|
||||
vim_memset(&cmdmod, 0, sizeof(cmdmod));
|
||||
|
||||
/* "#!anything" is handled like a comment. */
|
||||
if ((*cmdlinep)[0] == '#' && (*cmdlinep)[1] == '!')
|
||||
goto doend;
|
||||
|
||||
/*
|
||||
* Repeat until no more command modifiers are found.
|
||||
*/
|
||||
ea.cmd = *cmdlinep;
|
||||
for (;;)
|
||||
{
|
||||
/*
|
||||
* 1. Skip comment lines and leading white space and colons.
|
||||
*/
|
||||
while (*ea.cmd == ' ' || *ea.cmd == '\t' || *ea.cmd == ':')
|
||||
++ea.cmd;
|
||||
|
||||
/* in ex mode, an empty line works like :+ */
|
||||
if (*ea.cmd == NUL && exmode_active
|
||||
&& (getline_equal(fgetline, cookie, getexmodeline)
|
||||
|| getline_equal(fgetline, cookie, getexline))
|
||||
&& curwin->w_cursor.lnum < curbuf->b_ml.ml_line_count)
|
||||
{
|
||||
ea.cmd = (char_u *)"+";
|
||||
ex_pressedreturn = TRUE;
|
||||
}
|
||||
|
||||
/* ignore comment and empty lines */
|
||||
if (*ea.cmd == '"')
|
||||
goto doend;
|
||||
if (*ea.cmd == NUL)
|
||||
{
|
||||
ex_pressedreturn = TRUE;
|
||||
goto doend;
|
||||
}
|
||||
|
||||
/*
|
||||
* 2. Handle command modifiers.
|
||||
*/
|
||||
p = skip_range(ea.cmd, NULL);
|
||||
switch (*p)
|
||||
{
|
||||
/* When adding an entry, also modify cmd_exists(). */
|
||||
case 'a': if (!checkforcmd(&ea.cmd, "aboveleft", 3))
|
||||
break;
|
||||
cmdmod.split |= WSP_ABOVE;
|
||||
continue;
|
||||
|
||||
case 'b': if (checkforcmd(&ea.cmd, "belowright", 3))
|
||||
{
|
||||
cmdmod.split |= WSP_BELOW;
|
||||
continue;
|
||||
}
|
||||
if (checkforcmd(&ea.cmd, "browse", 3))
|
||||
{
|
||||
#ifdef FEAT_BROWSE_CMD
|
||||
cmdmod.browse = TRUE;
|
||||
// The "ea" structure holds the arguments that can be used.
|
||||
ea.cmd = *cmdlinep;
|
||||
ea.cmdlinep = cmdlinep;
|
||||
ea.getline = fgetline;
|
||||
ea.cookie = cookie;
|
||||
#ifdef FEAT_EVAL
|
||||
ea.cstack = cstack;
|
||||
#endif
|
||||
continue;
|
||||
}
|
||||
if (!checkforcmd(&ea.cmd, "botright", 2))
|
||||
break;
|
||||
cmdmod.split |= WSP_BOT;
|
||||
continue;
|
||||
if (parse_command_modifiers(&ea, &errormsg, FALSE) == FAIL)
|
||||
goto doend;
|
||||
|
||||
case 'c': if (!checkforcmd(&ea.cmd, "confirm", 4))
|
||||
break;
|
||||
#if defined(FEAT_GUI_DIALOG) || defined(FEAT_CON_DIALOG)
|
||||
cmdmod.confirm = TRUE;
|
||||
#endif
|
||||
continue;
|
||||
|
||||
case 'k': if (checkforcmd(&ea.cmd, "keepmarks", 3))
|
||||
{
|
||||
cmdmod.keepmarks = TRUE;
|
||||
continue;
|
||||
}
|
||||
if (checkforcmd(&ea.cmd, "keepalt", 5))
|
||||
{
|
||||
cmdmod.keepalt = TRUE;
|
||||
continue;
|
||||
}
|
||||
if (checkforcmd(&ea.cmd, "keeppatterns", 5))
|
||||
{
|
||||
cmdmod.keeppatterns = TRUE;
|
||||
continue;
|
||||
}
|
||||
if (!checkforcmd(&ea.cmd, "keepjumps", 5))
|
||||
break;
|
||||
cmdmod.keepjumps = TRUE;
|
||||
continue;
|
||||
|
||||
case 'f': /* only accept ":filter {pat} cmd" */
|
||||
{
|
||||
char_u *reg_pat;
|
||||
|
||||
if (!checkforcmd(&p, "filter", 4)
|
||||
|| *p == NUL || ends_excmd(*p))
|
||||
break;
|
||||
if (*p == '!')
|
||||
{
|
||||
cmdmod.filter_force = TRUE;
|
||||
p = skipwhite(p + 1);
|
||||
if (*p == NUL || ends_excmd(*p))
|
||||
break;
|
||||
}
|
||||
p = skip_vimgrep_pat(p, ®_pat, NULL);
|
||||
if (p == NULL || *p == NUL)
|
||||
break;
|
||||
cmdmod.filter_regmatch.regprog =
|
||||
vim_regcomp(reg_pat, RE_MAGIC);
|
||||
if (cmdmod.filter_regmatch.regprog == NULL)
|
||||
break;
|
||||
ea.cmd = p;
|
||||
continue;
|
||||
}
|
||||
|
||||
/* ":hide" and ":hide | cmd" are not modifiers */
|
||||
case 'h': if (p != ea.cmd || !checkforcmd(&p, "hide", 3)
|
||||
|| *p == NUL || ends_excmd(*p))
|
||||
break;
|
||||
ea.cmd = p;
|
||||
cmdmod.hide = TRUE;
|
||||
continue;
|
||||
|
||||
case 'l': if (checkforcmd(&ea.cmd, "lockmarks", 3))
|
||||
{
|
||||
cmdmod.lockmarks = TRUE;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!checkforcmd(&ea.cmd, "leftabove", 5))
|
||||
break;
|
||||
cmdmod.split |= WSP_ABOVE;
|
||||
continue;
|
||||
|
||||
case 'n': if (checkforcmd(&ea.cmd, "noautocmd", 3))
|
||||
{
|
||||
if (cmdmod.save_ei == NULL)
|
||||
{
|
||||
/* Set 'eventignore' to "all". Restore the
|
||||
* existing option value later. */
|
||||
cmdmod.save_ei = vim_strsave(p_ei);
|
||||
set_string_option_direct((char_u *)"ei", -1,
|
||||
(char_u *)"all", OPT_FREE, SID_NONE);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
if (!checkforcmd(&ea.cmd, "noswapfile", 3))
|
||||
break;
|
||||
cmdmod.noswapfile = TRUE;
|
||||
continue;
|
||||
|
||||
case 'r': if (!checkforcmd(&ea.cmd, "rightbelow", 6))
|
||||
break;
|
||||
cmdmod.split |= WSP_BELOW;
|
||||
continue;
|
||||
|
||||
case 's': if (checkforcmd(&ea.cmd, "sandbox", 3))
|
||||
{
|
||||
#ifdef HAVE_SANDBOX
|
||||
if (!did_sandbox)
|
||||
++sandbox;
|
||||
did_sandbox = TRUE;
|
||||
#endif
|
||||
continue;
|
||||
}
|
||||
if (!checkforcmd(&ea.cmd, "silent", 3))
|
||||
break;
|
||||
if (save_msg_silent == -1)
|
||||
save_msg_silent = msg_silent;
|
||||
++msg_silent;
|
||||
if (*ea.cmd == '!' && !VIM_ISWHITE(ea.cmd[-1]))
|
||||
{
|
||||
/* ":silent!", but not "silent !cmd" */
|
||||
ea.cmd = skipwhite(ea.cmd + 1);
|
||||
++emsg_silent;
|
||||
++did_esilent;
|
||||
}
|
||||
continue;
|
||||
|
||||
case 't': if (checkforcmd(&p, "tab", 3))
|
||||
{
|
||||
long tabnr = get_address(&ea, &ea.cmd, ADDR_TABS,
|
||||
ea.skip, FALSE, 1);
|
||||
if (tabnr == MAXLNUM)
|
||||
cmdmod.tab = tabpage_index(curtab) + 1;
|
||||
else
|
||||
{
|
||||
if (tabnr < 0 || tabnr > LAST_TAB_NR)
|
||||
{
|
||||
errormsg = (char_u *)_(e_invrange);
|
||||
goto doend;
|
||||
}
|
||||
cmdmod.tab = tabnr + 1;
|
||||
}
|
||||
ea.cmd = p;
|
||||
continue;
|
||||
}
|
||||
if (!checkforcmd(&ea.cmd, "topleft", 2))
|
||||
break;
|
||||
cmdmod.split |= WSP_TOP;
|
||||
continue;
|
||||
|
||||
case 'u': if (!checkforcmd(&ea.cmd, "unsilent", 3))
|
||||
break;
|
||||
if (save_msg_silent == -1)
|
||||
save_msg_silent = msg_silent;
|
||||
msg_silent = 0;
|
||||
continue;
|
||||
|
||||
case 'v': if (checkforcmd(&ea.cmd, "vertical", 4))
|
||||
{
|
||||
cmdmod.split |= WSP_VERT;
|
||||
continue;
|
||||
}
|
||||
if (!checkforcmd(&p, "verbose", 4))
|
||||
break;
|
||||
if (verbose_save < 0)
|
||||
verbose_save = p_verbose;
|
||||
if (vim_isdigit(*ea.cmd))
|
||||
p_verbose = atoi((char *)ea.cmd);
|
||||
else
|
||||
p_verbose = 1;
|
||||
ea.cmd = p;
|
||||
continue;
|
||||
}
|
||||
break;
|
||||
}
|
||||
after_modifier = ea.cmd;
|
||||
|
||||
#ifdef FEAT_EVAL
|
||||
@@ -2688,25 +2473,17 @@ do_one_cmd(
|
||||
|
||||
/* The :try command saves the emsg_silent flag, reset it here when
|
||||
* ":silent! try" was used, it should only apply to :try itself. */
|
||||
if (ea.cmdidx == CMD_try && did_esilent > 0)
|
||||
if (ea.cmdidx == CMD_try && ea.did_esilent > 0)
|
||||
{
|
||||
emsg_silent -= did_esilent;
|
||||
emsg_silent -= ea.did_esilent;
|
||||
if (emsg_silent < 0)
|
||||
emsg_silent = 0;
|
||||
did_esilent = 0;
|
||||
ea.did_esilent = 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* 7. Execute the command.
|
||||
*
|
||||
* The "ea" structure holds the arguments that can be used.
|
||||
*/
|
||||
ea.cmdlinep = cmdlinep;
|
||||
ea.getline = fgetline;
|
||||
ea.cookie = cookie;
|
||||
#ifdef FEAT_EVAL
|
||||
ea.cstack = cstack;
|
||||
#endif
|
||||
|
||||
#ifdef FEAT_USR_CMDS
|
||||
if (IS_USER_CMDIDX(ea.cmdidx))
|
||||
@@ -2775,29 +2552,19 @@ doend:
|
||||
? cmdnames[(int)ea.cmdidx].cmd_name : (char_u *)NULL);
|
||||
#endif
|
||||
|
||||
if (verbose_save >= 0)
|
||||
p_verbose = verbose_save;
|
||||
|
||||
if (cmdmod.save_ei != NULL)
|
||||
{
|
||||
/* Restore 'eventignore' to the value before ":noautocmd". */
|
||||
set_string_option_direct((char_u *)"ei", -1, cmdmod.save_ei,
|
||||
OPT_FREE, SID_NONE);
|
||||
free_string_option(cmdmod.save_ei);
|
||||
}
|
||||
|
||||
if (cmdmod.filter_regmatch.regprog != NULL)
|
||||
vim_regfree(cmdmod.filter_regmatch.regprog);
|
||||
if (ea.verbose_save >= 0)
|
||||
p_verbose = ea.verbose_save;
|
||||
|
||||
free_cmdmod();
|
||||
cmdmod = save_cmdmod;
|
||||
|
||||
if (save_msg_silent != -1)
|
||||
if (ea.save_msg_silent != -1)
|
||||
{
|
||||
/* messages could be enabled for a serious error, need to check if the
|
||||
* counters don't become negative */
|
||||
if (!did_emsg || msg_silent > save_msg_silent)
|
||||
msg_silent = save_msg_silent;
|
||||
emsg_silent -= did_esilent;
|
||||
if (!did_emsg || msg_silent > ea.save_msg_silent)
|
||||
msg_silent = ea.save_msg_silent;
|
||||
emsg_silent -= ea.did_esilent;
|
||||
if (emsg_silent < 0)
|
||||
emsg_silent = 0;
|
||||
/* Restore msg_scroll, it's set by file I/O commands, even when no
|
||||
@@ -2811,7 +2578,7 @@ doend:
|
||||
}
|
||||
|
||||
#ifdef HAVE_SANDBOX
|
||||
if (did_sandbox)
|
||||
if (ea.did_sandbox)
|
||||
--sandbox;
|
||||
#endif
|
||||
|
||||
@@ -2828,6 +2595,290 @@ doend:
|
||||
#pragma optimize( "", on )
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Parse and skip over command modifiers:
|
||||
* - update eap->cmd
|
||||
* - store flags in "cmdmod".
|
||||
* - Set ex_pressedreturn for an empty command line.
|
||||
* - set msg_silent for ":silent"
|
||||
* - set 'eventignore' to "all" for ":noautocmd"
|
||||
* - set p_verbose for ":verbose"
|
||||
* - Increment "sandbox" for ":sandbox"
|
||||
* When "skip_only" is TRUE the global variables are not changed, except for
|
||||
* "cmdmod".
|
||||
* Return FAIL when the command is not to be executed.
|
||||
* May set "errormsg" to an error message.
|
||||
*/
|
||||
int
|
||||
parse_command_modifiers(exarg_T *eap, char_u **errormsg, int skip_only)
|
||||
{
|
||||
char_u *p;
|
||||
|
||||
vim_memset(&cmdmod, 0, sizeof(cmdmod));
|
||||
eap->verbose_save = -1;
|
||||
eap->save_msg_silent = -1;
|
||||
|
||||
// Repeat until no more command modifiers are found.
|
||||
for (;;)
|
||||
{
|
||||
while (*eap->cmd == ' ' || *eap->cmd == '\t' || *eap->cmd == ':')
|
||||
++eap->cmd;
|
||||
|
||||
/* in ex mode, an empty line works like :+ */
|
||||
if (*eap->cmd == NUL && exmode_active
|
||||
&& (getline_equal(eap->getline, eap->cookie, getexmodeline)
|
||||
|| getline_equal(eap->getline, eap->cookie, getexline))
|
||||
&& curwin->w_cursor.lnum < curbuf->b_ml.ml_line_count)
|
||||
{
|
||||
eap->cmd = (char_u *)"+";
|
||||
if (!skip_only)
|
||||
ex_pressedreturn = TRUE;
|
||||
}
|
||||
|
||||
/* ignore comment and empty lines */
|
||||
if (*eap->cmd == '"')
|
||||
return FAIL;
|
||||
if (*eap->cmd == NUL)
|
||||
{
|
||||
if (!skip_only)
|
||||
ex_pressedreturn = TRUE;
|
||||
return FAIL;
|
||||
}
|
||||
|
||||
p = skip_range(eap->cmd, NULL);
|
||||
switch (*p)
|
||||
{
|
||||
/* When adding an entry, also modify cmd_exists(). */
|
||||
case 'a': if (!checkforcmd(&eap->cmd, "aboveleft", 3))
|
||||
break;
|
||||
cmdmod.split |= WSP_ABOVE;
|
||||
continue;
|
||||
|
||||
case 'b': if (checkforcmd(&eap->cmd, "belowright", 3))
|
||||
{
|
||||
cmdmod.split |= WSP_BELOW;
|
||||
continue;
|
||||
}
|
||||
if (checkforcmd(&eap->cmd, "browse", 3))
|
||||
{
|
||||
#ifdef FEAT_BROWSE_CMD
|
||||
cmdmod.browse = TRUE;
|
||||
#endif
|
||||
continue;
|
||||
}
|
||||
if (!checkforcmd(&eap->cmd, "botright", 2))
|
||||
break;
|
||||
cmdmod.split |= WSP_BOT;
|
||||
continue;
|
||||
|
||||
case 'c': if (!checkforcmd(&eap->cmd, "confirm", 4))
|
||||
break;
|
||||
#if defined(FEAT_GUI_DIALOG) || defined(FEAT_CON_DIALOG)
|
||||
cmdmod.confirm = TRUE;
|
||||
#endif
|
||||
continue;
|
||||
|
||||
case 'k': if (checkforcmd(&eap->cmd, "keepmarks", 3))
|
||||
{
|
||||
cmdmod.keepmarks = TRUE;
|
||||
continue;
|
||||
}
|
||||
if (checkforcmd(&eap->cmd, "keepalt", 5))
|
||||
{
|
||||
cmdmod.keepalt = TRUE;
|
||||
continue;
|
||||
}
|
||||
if (checkforcmd(&eap->cmd, "keeppatterns", 5))
|
||||
{
|
||||
cmdmod.keeppatterns = TRUE;
|
||||
continue;
|
||||
}
|
||||
if (!checkforcmd(&eap->cmd, "keepjumps", 5))
|
||||
break;
|
||||
cmdmod.keepjumps = TRUE;
|
||||
continue;
|
||||
|
||||
case 'f': /* only accept ":filter {pat} cmd" */
|
||||
{
|
||||
char_u *reg_pat;
|
||||
|
||||
if (!checkforcmd(&p, "filter", 4)
|
||||
|| *p == NUL || ends_excmd(*p))
|
||||
break;
|
||||
if (*p == '!')
|
||||
{
|
||||
cmdmod.filter_force = TRUE;
|
||||
p = skipwhite(p + 1);
|
||||
if (*p == NUL || ends_excmd(*p))
|
||||
break;
|
||||
}
|
||||
if (skip_only)
|
||||
p = skip_vimgrep_pat(p, NULL, NULL);
|
||||
else
|
||||
// NOTE: This puts a NUL after the pattern.
|
||||
p = skip_vimgrep_pat(p, ®_pat, NULL);
|
||||
if (p == NULL || *p == NUL)
|
||||
break;
|
||||
if (!skip_only)
|
||||
{
|
||||
cmdmod.filter_regmatch.regprog =
|
||||
vim_regcomp(reg_pat, RE_MAGIC);
|
||||
if (cmdmod.filter_regmatch.regprog == NULL)
|
||||
break;
|
||||
}
|
||||
eap->cmd = p;
|
||||
continue;
|
||||
}
|
||||
|
||||
/* ":hide" and ":hide | cmd" are not modifiers */
|
||||
case 'h': if (p != eap->cmd || !checkforcmd(&p, "hide", 3)
|
||||
|| *p == NUL || ends_excmd(*p))
|
||||
break;
|
||||
eap->cmd = p;
|
||||
cmdmod.hide = TRUE;
|
||||
continue;
|
||||
|
||||
case 'l': if (checkforcmd(&eap->cmd, "lockmarks", 3))
|
||||
{
|
||||
cmdmod.lockmarks = TRUE;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!checkforcmd(&eap->cmd, "leftabove", 5))
|
||||
break;
|
||||
cmdmod.split |= WSP_ABOVE;
|
||||
continue;
|
||||
|
||||
case 'n': if (checkforcmd(&eap->cmd, "noautocmd", 3))
|
||||
{
|
||||
if (cmdmod.save_ei == NULL && !skip_only)
|
||||
{
|
||||
/* Set 'eventignore' to "all". Restore the
|
||||
* existing option value later. */
|
||||
cmdmod.save_ei = vim_strsave(p_ei);
|
||||
set_string_option_direct((char_u *)"ei", -1,
|
||||
(char_u *)"all", OPT_FREE, SID_NONE);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
if (!checkforcmd(&eap->cmd, "noswapfile", 3))
|
||||
break;
|
||||
cmdmod.noswapfile = TRUE;
|
||||
continue;
|
||||
|
||||
case 'r': if (!checkforcmd(&eap->cmd, "rightbelow", 6))
|
||||
break;
|
||||
cmdmod.split |= WSP_BELOW;
|
||||
continue;
|
||||
|
||||
case 's': if (checkforcmd(&eap->cmd, "sandbox", 3))
|
||||
{
|
||||
#ifdef HAVE_SANDBOX
|
||||
if (!skip_only)
|
||||
{
|
||||
if (!eap->did_sandbox)
|
||||
++sandbox;
|
||||
eap->did_sandbox = TRUE;
|
||||
}
|
||||
#endif
|
||||
continue;
|
||||
}
|
||||
if (!checkforcmd(&eap->cmd, "silent", 3))
|
||||
break;
|
||||
if (!skip_only)
|
||||
{
|
||||
if (eap->save_msg_silent == -1)
|
||||
eap->save_msg_silent = msg_silent;
|
||||
++msg_silent;
|
||||
}
|
||||
if (*eap->cmd == '!' && !VIM_ISWHITE(eap->cmd[-1]))
|
||||
{
|
||||
/* ":silent!", but not "silent !cmd" */
|
||||
eap->cmd = skipwhite(eap->cmd + 1);
|
||||
if (!skip_only)
|
||||
{
|
||||
++emsg_silent;
|
||||
++eap->did_esilent;
|
||||
}
|
||||
}
|
||||
continue;
|
||||
|
||||
case 't': if (checkforcmd(&p, "tab", 3))
|
||||
{
|
||||
long tabnr = get_address(eap, &eap->cmd, ADDR_TABS,
|
||||
eap->skip, FALSE, 1);
|
||||
if (tabnr == MAXLNUM)
|
||||
cmdmod.tab = tabpage_index(curtab) + 1;
|
||||
else
|
||||
{
|
||||
if (tabnr < 0 || tabnr > LAST_TAB_NR)
|
||||
{
|
||||
*errormsg = (char_u *)_(e_invrange);
|
||||
return FAIL;
|
||||
}
|
||||
cmdmod.tab = tabnr + 1;
|
||||
}
|
||||
eap->cmd = p;
|
||||
continue;
|
||||
}
|
||||
if (!checkforcmd(&eap->cmd, "topleft", 2))
|
||||
break;
|
||||
cmdmod.split |= WSP_TOP;
|
||||
continue;
|
||||
|
||||
case 'u': if (!checkforcmd(&eap->cmd, "unsilent", 3))
|
||||
break;
|
||||
if (!skip_only)
|
||||
{
|
||||
if (eap->save_msg_silent == -1)
|
||||
eap->save_msg_silent = msg_silent;
|
||||
msg_silent = 0;
|
||||
}
|
||||
continue;
|
||||
|
||||
case 'v': if (checkforcmd(&eap->cmd, "vertical", 4))
|
||||
{
|
||||
cmdmod.split |= WSP_VERT;
|
||||
continue;
|
||||
}
|
||||
if (!checkforcmd(&p, "verbose", 4))
|
||||
break;
|
||||
if (!skip_only)
|
||||
{
|
||||
if (eap->verbose_save < 0)
|
||||
eap->verbose_save = p_verbose;
|
||||
if (vim_isdigit(*eap->cmd))
|
||||
p_verbose = atoi((char *)eap->cmd);
|
||||
else
|
||||
p_verbose = 1;
|
||||
}
|
||||
eap->cmd = p;
|
||||
continue;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
||||
/*
|
||||
* Free contents of "cmdmod".
|
||||
*/
|
||||
static void
|
||||
free_cmdmod(void)
|
||||
{
|
||||
if (cmdmod.save_ei != NULL)
|
||||
{
|
||||
/* Restore 'eventignore' to the value before ":noautocmd". */
|
||||
set_string_option_direct((char_u *)"ei", -1, cmdmod.save_ei,
|
||||
OPT_FREE, SID_NONE);
|
||||
free_string_option(cmdmod.save_ei);
|
||||
}
|
||||
|
||||
if (cmdmod.filter_regmatch.regprog != NULL)
|
||||
vim_regfree(cmdmod.filter_regmatch.regprog);
|
||||
}
|
||||
|
||||
/*
|
||||
* Parse the address range, if any, in "eap".
|
||||
* Return FAIL and set "errormsg" or return OK.
|
||||
|
||||
165
src/ex_getln.c
165
src/ex_getln.c
@@ -231,6 +231,7 @@ typedef struct {
|
||||
pos_T match_end;
|
||||
int did_incsearch;
|
||||
int incsearch_postponed;
|
||||
int magic_save;
|
||||
} incsearch_state_T;
|
||||
|
||||
static void
|
||||
@@ -239,6 +240,7 @@ init_incsearch_state(incsearch_state_T *is_state)
|
||||
is_state->match_start = curwin->w_cursor;
|
||||
is_state->did_incsearch = FALSE;
|
||||
is_state->incsearch_postponed = FALSE;
|
||||
is_state->magic_save = p_magic;
|
||||
CLEAR_POS(&is_state->match_end);
|
||||
is_state->save_cursor = curwin->w_cursor; // may be restored later
|
||||
is_state->search_start = curwin->w_cursor;
|
||||
@@ -283,24 +285,53 @@ do_incsearch_highlighting(int firstc, incsearch_state_T *is_state,
|
||||
return TRUE;
|
||||
if (firstc == ':')
|
||||
{
|
||||
char_u *cmd = skip_range(ccline.cmdbuff, NULL);
|
||||
char_u *p;
|
||||
int delim;
|
||||
char_u *end;
|
||||
char_u *cmd;
|
||||
cmdmod_T save_cmdmod = cmdmod;
|
||||
char_u *p;
|
||||
int delim;
|
||||
char_u *end;
|
||||
char_u *dummy;
|
||||
exarg_T ea;
|
||||
|
||||
vim_memset(&ea, 0, sizeof(ea));
|
||||
ea.line1 = 1;
|
||||
ea.line2 = 1;
|
||||
ea.cmd = ccline.cmdbuff;
|
||||
ea.addr_type = ADDR_LINES;
|
||||
|
||||
parse_command_modifiers(&ea, &dummy, TRUE);
|
||||
cmdmod = save_cmdmod;
|
||||
|
||||
cmd = skip_range(ea.cmd, NULL);
|
||||
if (*cmd == 's' || *cmd == 'g' || *cmd == 'v')
|
||||
{
|
||||
// Skip over "substitute" to find the pattern separator.
|
||||
for (p = cmd; ASCII_ISALPHA(*p); ++p)
|
||||
;
|
||||
if (*p != NUL)
|
||||
if (*skipwhite(p) != NUL
|
||||
&& (STRNCMP(cmd, "substitute", p - cmd) == 0
|
||||
|| STRNCMP(cmd, "smagic", p - cmd) == 0
|
||||
|| STRNCMP(cmd, "snomagic", MAX(p - cmd, 3)) == 0
|
||||
|| STRNCMP(cmd, "global", p - cmd) == 0
|
||||
|| STRNCMP(cmd, "vglobal", p - cmd) == 0))
|
||||
{
|
||||
if (*cmd == 's' && cmd[1] == 'm')
|
||||
p_magic = TRUE;
|
||||
else if (*cmd == 's' && cmd[1] == 'n')
|
||||
p_magic = FALSE;
|
||||
|
||||
// Check for "global!/".
|
||||
if (*cmd == 'g' && *p == '!')
|
||||
{
|
||||
p++;
|
||||
if (*skipwhite(p) == NUL)
|
||||
return FALSE;
|
||||
}
|
||||
p = skipwhite(p);
|
||||
delim = *p++;
|
||||
end = skip_regexp(p, delim, p_magic, NULL);
|
||||
if (end > p)
|
||||
if (end > p || *end == delim)
|
||||
{
|
||||
char_u *dummy;
|
||||
exarg_T ea;
|
||||
pos_T save_cursor = curwin->w_cursor;
|
||||
|
||||
// found a non-empty pattern
|
||||
@@ -308,17 +339,21 @@ do_incsearch_highlighting(int firstc, incsearch_state_T *is_state,
|
||||
*patlen = (int)(end - p);
|
||||
|
||||
// parse the address range
|
||||
vim_memset(&ea, 0, sizeof(ea));
|
||||
ea.line1 = 1;
|
||||
ea.line2 = 1;
|
||||
ea.cmd = ccline.cmdbuff;
|
||||
ea.addr_type = ADDR_LINES;
|
||||
parse_cmd_address(&ea, &dummy);
|
||||
curwin->w_cursor = is_state->search_start;
|
||||
parse_cmd_address(&ea, &dummy);
|
||||
if (ea.addr_count > 0)
|
||||
{
|
||||
search_first_line = ea.line1;
|
||||
search_last_line = ea.line2;
|
||||
// Allow for reverse match.
|
||||
if (ea.line2 < ea.line1)
|
||||
{
|
||||
search_first_line = ea.line2;
|
||||
search_last_line = ea.line1;
|
||||
}
|
||||
else
|
||||
{
|
||||
search_first_line = ea.line1;
|
||||
search_last_line = ea.line2;
|
||||
}
|
||||
}
|
||||
else if (*cmd == 's')
|
||||
{
|
||||
@@ -338,6 +373,38 @@ do_incsearch_highlighting(int firstc, incsearch_state_T *is_state,
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static void
|
||||
finish_incsearch_highlighting(
|
||||
int gotesc,
|
||||
incsearch_state_T *is_state,
|
||||
int call_update_screen)
|
||||
{
|
||||
if (is_state->did_incsearch)
|
||||
{
|
||||
is_state->did_incsearch = FALSE;
|
||||
if (gotesc)
|
||||
curwin->w_cursor = is_state->save_cursor;
|
||||
else
|
||||
{
|
||||
if (!EQUAL_POS(is_state->save_cursor, is_state->search_start))
|
||||
{
|
||||
// put the '" mark at the original position
|
||||
curwin->w_cursor = is_state->save_cursor;
|
||||
setpcmark();
|
||||
}
|
||||
curwin->w_cursor = is_state->search_start;
|
||||
}
|
||||
restore_viewstate(&is_state->old_viewstate);
|
||||
highlight_match = FALSE;
|
||||
validate_cursor(); /* needed for TAB */
|
||||
if (call_update_screen)
|
||||
update_screen(SOME_VALID);
|
||||
else
|
||||
redraw_all_later(SOME_VALID);
|
||||
p_magic = is_state->magic_save;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Do 'incsearch' highlighting if desired.
|
||||
*/
|
||||
@@ -354,10 +421,14 @@ may_do_incsearch_highlighting(
|
||||
#ifdef FEAT_RELTIME
|
||||
proftime_T tm;
|
||||
#endif
|
||||
int c;
|
||||
int next_char;
|
||||
int use_last_pat;
|
||||
|
||||
if (!do_incsearch_highlighting(firstc, is_state, &skiplen, &patlen))
|
||||
{
|
||||
finish_incsearch_highlighting(FALSE, is_state, TRUE);
|
||||
return;
|
||||
}
|
||||
|
||||
// If there is a character waiting, search and redraw later.
|
||||
if (char_avail())
|
||||
@@ -378,8 +449,13 @@ may_do_incsearch_highlighting(
|
||||
}
|
||||
save_last_search_pattern();
|
||||
|
||||
// If there is no command line, don't do anything.
|
||||
if (patlen == 0)
|
||||
// Use the previous pattern for ":s//".
|
||||
next_char = ccline.cmdbuff[skiplen + patlen];
|
||||
use_last_pat = patlen == 0 && skiplen > 0
|
||||
&& ccline.cmdbuff[skiplen - 1] == next_char;
|
||||
|
||||
// If there is no pattern, don't do anything.
|
||||
if (patlen == 0 && !use_last_pat)
|
||||
{
|
||||
i = 0;
|
||||
set_no_hlsearch(TRUE); // turn off previous highlight
|
||||
@@ -398,7 +474,8 @@ may_do_incsearch_highlighting(
|
||||
#endif
|
||||
if (!p_hls)
|
||||
search_flags += SEARCH_KEEP;
|
||||
c = ccline.cmdbuff[skiplen + patlen];
|
||||
if (search_first_line != 0)
|
||||
search_flags += SEARCH_START;
|
||||
ccline.cmdbuff[skiplen + patlen] = NUL;
|
||||
i = do_search(NULL, firstc == ':' ? '/' : firstc,
|
||||
ccline.cmdbuff + skiplen, count, search_flags,
|
||||
@@ -408,13 +485,16 @@ may_do_incsearch_highlighting(
|
||||
NULL, NULL
|
||||
#endif
|
||||
);
|
||||
ccline.cmdbuff[skiplen + patlen] = c;
|
||||
ccline.cmdbuff[skiplen + patlen] = next_char;
|
||||
--emsg_off;
|
||||
|
||||
if (curwin->w_cursor.lnum < search_first_line
|
||||
|| curwin->w_cursor.lnum > search_last_line)
|
||||
{
|
||||
// match outside of address range
|
||||
i = 0;
|
||||
curwin->w_cursor = is_state->search_start;
|
||||
}
|
||||
|
||||
// if interrupted while searching, behave like it failed
|
||||
if (got_int)
|
||||
@@ -454,11 +534,14 @@ may_do_incsearch_highlighting(
|
||||
|
||||
// Disable 'hlsearch' highlighting if the pattern matches everything.
|
||||
// Avoids a flash when typing "foo\|".
|
||||
c = ccline.cmdbuff[skiplen + patlen];
|
||||
ccline.cmdbuff[skiplen + patlen] = NUL;
|
||||
if (empty_pattern(ccline.cmdbuff))
|
||||
set_no_hlsearch(TRUE);
|
||||
ccline.cmdbuff[skiplen + patlen] = c;
|
||||
if (!use_last_pat)
|
||||
{
|
||||
next_char = ccline.cmdbuff[skiplen + patlen];
|
||||
ccline.cmdbuff[skiplen + patlen] = NUL;
|
||||
if (empty_pattern(ccline.cmdbuff))
|
||||
set_no_hlsearch(TRUE);
|
||||
ccline.cmdbuff[skiplen + patlen] = next_char;
|
||||
}
|
||||
|
||||
validate_cursor();
|
||||
// May redraw the status line to show the cursor position.
|
||||
@@ -504,7 +587,11 @@ may_adjust_incsearch_highlighting(
|
||||
return FAIL;
|
||||
|
||||
if (firstc == ccline.cmdbuff[skiplen])
|
||||
{
|
||||
pat = last_search_pattern();
|
||||
skiplen = 0;
|
||||
patlen = (int)STRLEN(pat);
|
||||
}
|
||||
else
|
||||
pat = ccline.cmdbuff + skiplen;
|
||||
|
||||
@@ -619,30 +706,6 @@ may_add_char_to_search(int firstc, int *c, incsearch_state_T *is_state)
|
||||
}
|
||||
return OK;
|
||||
}
|
||||
|
||||
static void
|
||||
finish_incsearch_highlighting(int gotesc, incsearch_state_T *is_state)
|
||||
{
|
||||
if (is_state->did_incsearch)
|
||||
{
|
||||
if (gotesc)
|
||||
curwin->w_cursor = is_state->save_cursor;
|
||||
else
|
||||
{
|
||||
if (!EQUAL_POS(is_state->save_cursor, is_state->search_start))
|
||||
{
|
||||
// put the '" mark at the original position
|
||||
curwin->w_cursor = is_state->save_cursor;
|
||||
setpcmark();
|
||||
}
|
||||
curwin->w_cursor = is_state->search_start;
|
||||
}
|
||||
restore_viewstate(&is_state->old_viewstate);
|
||||
highlight_match = FALSE;
|
||||
validate_cursor(); /* needed for TAB */
|
||||
redraw_all_later(SOME_VALID);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
@@ -2292,7 +2355,7 @@ returncmd:
|
||||
ccline.xpc = NULL;
|
||||
|
||||
#ifdef FEAT_SEARCH_EXTRA
|
||||
finish_incsearch_highlighting(gotesc, &is_state);
|
||||
finish_incsearch_highlighting(gotesc, &is_state, FALSE);
|
||||
#endif
|
||||
|
||||
if (ccline.cmdbuff != NULL)
|
||||
|
||||
@@ -355,6 +355,10 @@
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef FEAT_EVAL
|
||||
# define HAVE_SANDBOX
|
||||
#endif
|
||||
|
||||
/*
|
||||
* +profile Profiling for functions and scripts.
|
||||
*/
|
||||
|
||||
@@ -678,8 +678,7 @@ EXTERN int allbuf_lock INIT(= 0);
|
||||
* changed, no buffer can be deleted and
|
||||
* current directory can't be changed.
|
||||
* Used for SwapExists et al. */
|
||||
#ifdef FEAT_EVAL
|
||||
# define HAVE_SANDBOX
|
||||
#ifdef HAVE_SANDBOX
|
||||
EXTERN int sandbox INIT(= 0);
|
||||
/* Non-zero when evaluating an expression in a
|
||||
* "sandbox". Several things are not allowed
|
||||
|
||||
@@ -4,6 +4,7 @@ int do_cmdline_cmd(char_u *cmd);
|
||||
int do_cmdline(char_u *cmdline, char_u *(*fgetline)(int, void *, int), void *cookie, int flags);
|
||||
int getline_equal(char_u *(*fgetline)(int, void *, int), void *cookie, char_u *(*func)(int, void *, int));
|
||||
void *getline_cookie(char_u *(*fgetline)(int, void *, int), void *cookie);
|
||||
int parse_command_modifiers(exarg_T *eap, char_u **errormsg, int skip_only);
|
||||
int parse_cmd_address(exarg_T *eap, char_u **errormsg);
|
||||
int checkforcmd(char_u **pp, char *cmd, int len);
|
||||
int modifier_len(char_u *cmd);
|
||||
|
||||
9
src/testdir/dumps/Test_incsearch_substitute_01.dump
Normal file
9
src/testdir/dumps/Test_incsearch_substitute_01.dump
Normal file
@@ -0,0 +1,9 @@
|
||||
|f+0&#ffffff0|o@1| |1| @64
|
||||
|f|o@1| |2| @64
|
||||
|f+1&&|o@1| +0&&|3| @64
|
||||
|f+0&#ffff4012|o@1| +0&#ffffff0|4| @64
|
||||
|f+0&#ffff4012|o@1| +0&#ffffff0|5| @64
|
||||
|f|o@1| |6| @64
|
||||
|f|o@1| |7| @64
|
||||
|f|o@1| |8| @64
|
||||
|:|.|,|.|+|2|s|/|f|o@1> @58
|
||||
9
src/testdir/dumps/Test_incsearch_substitute_02.dump
Normal file
9
src/testdir/dumps/Test_incsearch_substitute_02.dump
Normal file
@@ -0,0 +1,9 @@
|
||||
|f+0&#ffffff0|o@1| |1| @64
|
||||
|f|o@1| |2| @64
|
||||
|f|o@1| |3| @64
|
||||
|f+1&&|o@1| +0&&|4| @64
|
||||
|f+0&#ffff4012|o@1| +0&#ffffff0|5| @64
|
||||
|f+0&#ffff4012|o@1| +0&#ffffff0|6| @64
|
||||
|f|o@1| |7| @64
|
||||
|f|o@1| |8| @64
|
||||
|:|.|,|.|+|2|s|/@1> @60
|
||||
9
src/testdir/dumps/Test_incsearch_substitute_03.dump
Normal file
9
src/testdir/dumps/Test_incsearch_substitute_03.dump
Normal file
@@ -0,0 +1,9 @@
|
||||
|f+0&#ffff4012|o@1| +0&#ffffff0|1| @64
|
||||
|f+0&#ffff4012|o@1| +0&#ffffff0|2| @64
|
||||
|f+0&#ffff4012|o@1| +0&#ffffff0|3| @64
|
||||
|f+0&#ffff4012|o@1| +0&#ffffff0|4| @64
|
||||
|f+0&#ffff4012|o@1| +0&#ffffff0|5| @64
|
||||
|f+0&#ffff4012|o@1| +0&#ffffff0|6| @64
|
||||
|f+0&#ffff4012|o@1| +0&#ffffff0|7| @64
|
||||
|f+0&#ffff4012|o@1| +0&#ffffff0|8| @64
|
||||
|:|.|,|.|+|2|s|/> @61
|
||||
9
src/testdir/dumps/Test_incsearch_substitute_04.dump
Normal file
9
src/testdir/dumps/Test_incsearch_substitute_04.dump
Normal file
@@ -0,0 +1,9 @@
|
||||
|f+0&#ffffff0|o@1| |1| @64
|
||||
|f+1&&|o@1| +0&&|2| @64
|
||||
|f+0&#ffff4012|o@1| +0&#ffffff0|3| @64
|
||||
|f+0&#ffff4012|o@1| +0&#ffffff0|4| @64
|
||||
|f+0&#ffff4012|o@1| +0&#ffffff0|5| @64
|
||||
|f|o@1| |6| @64
|
||||
|f|o@1| |7| @64
|
||||
|f|o@1| |8| @64
|
||||
|:|5|,|2|s|/|f|o@1> @60
|
||||
9
src/testdir/dumps/Test_incsearch_substitute_05.dump
Normal file
9
src/testdir/dumps/Test_incsearch_substitute_05.dump
Normal file
@@ -0,0 +1,9 @@
|
||||
|f+0&#ffffff0|o@1| |1| @64
|
||||
|f+1&&|o|o+0&&| |2| @64
|
||||
|f+0&#ffff4012|o|o+0&#ffffff0| |3| @64
|
||||
|f|o@1| |4| @64
|
||||
|f|o@1| |5| @64
|
||||
|f|o@1| |6| @64
|
||||
|f|o@1| |7| @64
|
||||
|f|o@1| |8| @64
|
||||
|:|2|,|3|s|u|b| @1|/|f|o> @57
|
||||
9
src/testdir/dumps/Test_incsearch_substitute_06.dump
Normal file
9
src/testdir/dumps/Test_incsearch_substitute_06.dump
Normal file
@@ -0,0 +1,9 @@
|
||||
|f+0&#ffffff0|o@1| |3| @64
|
||||
|f+1&&|o@1| +0&&|4| @64
|
||||
|f+0&#ffff4012|o@1| +0&#ffffff0|5| @64
|
||||
|f|o@1| |6| @64
|
||||
|f|o@1| |7| @64
|
||||
|f|o@1| |8| @64
|
||||
|:|a|b|o|v|e| |b|e|l|o|w| |b|r|o|w|s|e| |b|o|t|r| |c|o|n|f|i|r|m| |k|e@1|p|m|a|r| |k|e@1|p|a|l|t| |k|e@1|p@1|a|t| |k|e@1|p|j|u|m| |f|i|l|t|e
|
||||
|r| |x@2| |h|i|d|e| |l|o|c|k|m| |l|e|f|t|a|b|o|v|e| |n|o|a|u| |n|o|s|w|a|p| |r|i|g|h|t|b|e|l| |s|a|n|d|b|o|x| |s|i|l|e|n|t| |s|i|l|e|n|t|!
|
||||
| |$|t|a|b| |t|o|p| |u|n|s|i|l| |v|e|r|t| |v|e|r|b|o|s|e| |4|,|5|s|/|f|o|.> @32
|
||||
9
src/testdir/dumps/Test_incsearch_substitute_07.dump
Normal file
9
src/testdir/dumps/Test_incsearch_substitute_07.dump
Normal file
@@ -0,0 +1,9 @@
|
||||
|f+0&#ffffff0|o@1| |4| @64
|
||||
|f|o@1| |5| @64
|
||||
|f|o@1| |6| @64
|
||||
|f|o@1| |7| @64
|
||||
|f|o@1| |8| @64
|
||||
|f|o@1| |9| @64
|
||||
|f|o@1| |1|0| @63
|
||||
|b+9&&|a|r| +8&&|1@1| @63
|
||||
|:+0&&|9|,|1@1|s|/|b|a|r> @59
|
||||
9
src/testdir/dumps/Test_incsearch_substitute_08.dump
Normal file
9
src/testdir/dumps/Test_incsearch_substitute_08.dump
Normal file
@@ -0,0 +1,9 @@
|
||||
|f+0&#ffffff0|o@1| |4| @64
|
||||
|f|o@1| |5| @64
|
||||
|f|o@1| |6| @64
|
||||
|f|o@1| |7| @64
|
||||
|f|o@1| |8| @64
|
||||
|f+8&&|o@1| |9| @64
|
||||
|f+0&&|o@1| |1|0| @63
|
||||
|b|a|r| |1@1| @63
|
||||
|:|9|,|1|0|s|/|b|a|r> @59
|
||||
@@ -344,7 +344,7 @@ func Test_backupskip()
|
||||
for var in ['$TEMPDIR', '$TMP', '$TEMP']
|
||||
if exists(var)
|
||||
let varvalue = substitute(expand(var), '\\', '/', 'g')
|
||||
call assert_match(varvalue . '.\*', bskvalue)
|
||||
call assert_match(varvalue . '/\=\*', bskvalue)
|
||||
endif
|
||||
endfor
|
||||
endfunc
|
||||
|
||||
@@ -342,26 +342,6 @@ func Test_searchc()
|
||||
bw!
|
||||
endfunc
|
||||
|
||||
func Test_search_cmdline3()
|
||||
if !exists('+incsearch')
|
||||
return
|
||||
endif
|
||||
" need to disable char_avail,
|
||||
" so that expansion of commandline works
|
||||
call test_override("char_avail", 1)
|
||||
new
|
||||
call setline(1, [' 1', ' 2 the~e', ' 3 the theother'])
|
||||
set incsearch
|
||||
1
|
||||
" first match
|
||||
call feedkeys("/the\<c-l>\<cr>", 'tx')
|
||||
call assert_equal(' 2 the~e', getline('.'))
|
||||
" clean up
|
||||
set noincsearch
|
||||
call test_override("char_avail", 0)
|
||||
bw!
|
||||
endfunc
|
||||
|
||||
func Cmdline3_prep()
|
||||
" need to disable char_avail,
|
||||
" so that expansion of commandline works
|
||||
@@ -371,12 +351,25 @@ func Cmdline3_prep()
|
||||
set incsearch
|
||||
endfunc
|
||||
|
||||
func Cmdline3_cleanup()
|
||||
func Incsearch_cleanup()
|
||||
set noincsearch
|
||||
call test_override("char_avail", 0)
|
||||
bw!
|
||||
endfunc
|
||||
|
||||
func Test_search_cmdline3()
|
||||
if !exists('+incsearch')
|
||||
return
|
||||
endif
|
||||
call Cmdline3_prep()
|
||||
1
|
||||
" first match
|
||||
call feedkeys("/the\<c-l>\<cr>", 'tx')
|
||||
call assert_equal(' 2 the~e', getline('.'))
|
||||
|
||||
call Incsearch_cleanup()
|
||||
endfunc
|
||||
|
||||
func Test_search_cmdline3s()
|
||||
if !exists('+incsearch')
|
||||
return
|
||||
@@ -385,8 +378,22 @@ func Test_search_cmdline3s()
|
||||
1
|
||||
call feedkeys(":%s/the\<c-l>/xxx\<cr>", 'tx')
|
||||
call assert_equal(' 2 xxxe', getline('.'))
|
||||
undo
|
||||
call feedkeys(":%subs/the\<c-l>/xxx\<cr>", 'tx')
|
||||
call assert_equal(' 2 xxxe', getline('.'))
|
||||
undo
|
||||
call feedkeys(":%substitute/the\<c-l>/xxx\<cr>", 'tx')
|
||||
call assert_equal(' 2 xxxe', getline('.'))
|
||||
undo
|
||||
call feedkeys(":%smagic/the.e/xxx\<cr>", 'tx')
|
||||
call assert_equal(' 2 xxx', getline('.'))
|
||||
undo
|
||||
call assert_fails(":%snomagic/the.e/xxx\<cr>", 'E486')
|
||||
"
|
||||
call feedkeys(":%snomagic/the\\.e/xxx\<cr>", 'tx')
|
||||
call assert_equal(' 2 xxx', getline('.'))
|
||||
|
||||
call Cmdline3_cleanup()
|
||||
call Incsearch_cleanup()
|
||||
endfunc
|
||||
|
||||
func Test_search_cmdline3g()
|
||||
@@ -397,8 +404,19 @@ func Test_search_cmdline3g()
|
||||
1
|
||||
call feedkeys(":g/the\<c-l>/d\<cr>", 'tx')
|
||||
call assert_equal(' 3 the theother', getline(2))
|
||||
undo
|
||||
call feedkeys(":global/the\<c-l>/d\<cr>", 'tx')
|
||||
call assert_equal(' 3 the theother', getline(2))
|
||||
undo
|
||||
call feedkeys(":g!/the\<c-l>/d\<cr>", 'tx')
|
||||
call assert_equal(1, line('$'))
|
||||
call assert_equal(' 2 the~e', getline(1))
|
||||
undo
|
||||
call feedkeys(":global!/the\<c-l>/d\<cr>", 'tx')
|
||||
call assert_equal(1, line('$'))
|
||||
call assert_equal(' 2 the~e', getline(1))
|
||||
|
||||
call Cmdline3_cleanup()
|
||||
call Incsearch_cleanup()
|
||||
endfunc
|
||||
|
||||
func Test_search_cmdline3v()
|
||||
@@ -410,8 +428,12 @@ func Test_search_cmdline3v()
|
||||
call feedkeys(":v/the\<c-l>/d\<cr>", 'tx')
|
||||
call assert_equal(1, line('$'))
|
||||
call assert_equal(' 2 the~e', getline(1))
|
||||
undo
|
||||
call feedkeys(":vglobal/the\<c-l>/d\<cr>", 'tx')
|
||||
call assert_equal(1, line('$'))
|
||||
call assert_equal(' 2 the~e', getline(1))
|
||||
|
||||
call Cmdline3_cleanup()
|
||||
call Incsearch_cleanup()
|
||||
endfunc
|
||||
|
||||
func Test_search_cmdline4()
|
||||
@@ -518,7 +540,7 @@ func Test_search_cmdline7()
|
||||
" so that expansion of commandline works
|
||||
call test_override("char_avail", 1)
|
||||
new
|
||||
let @/='b'
|
||||
let @/ = 'b'
|
||||
call setline(1, [' bbvimb', ''])
|
||||
set incsearch
|
||||
" first match
|
||||
@@ -791,6 +813,110 @@ func Test_incsearch_scrolling()
|
||||
call delete('Xscript')
|
||||
endfunc
|
||||
|
||||
func Test_incsearch_substitute()
|
||||
if !exists('+incsearch')
|
||||
return
|
||||
endif
|
||||
call test_override("char_avail", 1)
|
||||
new
|
||||
set incsearch
|
||||
for n in range(1, 10)
|
||||
call setline(n, 'foo ' . n)
|
||||
endfor
|
||||
4
|
||||
call feedkeys(":.,.+2s/foo\<BS>o\<BS>o/xxx\<cr>", 'tx')
|
||||
call assert_equal('foo 3', getline(3))
|
||||
call assert_equal('xxx 4', getline(4))
|
||||
call assert_equal('xxx 5', getline(5))
|
||||
call assert_equal('xxx 6', getline(6))
|
||||
call assert_equal('foo 7', getline(7))
|
||||
|
||||
call Incsearch_cleanup()
|
||||
endfunc
|
||||
|
||||
" Similar to Test_incsearch_substitute() but with a screendump halfway.
|
||||
func Test_incsearch_substitute_dump()
|
||||
if !exists('+incsearch')
|
||||
return
|
||||
endif
|
||||
if !CanRunVimInTerminal()
|
||||
return
|
||||
endif
|
||||
call writefile([
|
||||
\ 'set incsearch hlsearch scrolloff=0',
|
||||
\ 'for n in range(1, 10)',
|
||||
\ ' call setline(n, "foo " . n)',
|
||||
\ 'endfor',
|
||||
\ 'call setline(11, "bar 11")',
|
||||
\ '3',
|
||||
\ ], 'Xis_subst_script')
|
||||
let buf = RunVimInTerminal('-S Xis_subst_script', {'rows': 9, 'cols': 70})
|
||||
" Give Vim a chance to redraw to get rid of the spaces in line 2 caused by
|
||||
" the 'ambiwidth' check.
|
||||
sleep 100m
|
||||
|
||||
" Need to send one key at a time to force a redraw.
|
||||
" Select three lines at the cursor with typed pattern.
|
||||
call term_sendkeys(buf, ':.,.+2s/')
|
||||
sleep 100m
|
||||
call term_sendkeys(buf, 'f')
|
||||
sleep 100m
|
||||
call term_sendkeys(buf, 'o')
|
||||
sleep 100m
|
||||
call term_sendkeys(buf, 'o')
|
||||
sleep 100m
|
||||
call VerifyScreenDump(buf, 'Test_incsearch_substitute_01', {})
|
||||
call term_sendkeys(buf, "\<Esc>")
|
||||
|
||||
" Select three lines at the cursor using previous pattern.
|
||||
call term_sendkeys(buf, "/foo\<CR>")
|
||||
sleep 100m
|
||||
call term_sendkeys(buf, ':.,.+2s//')
|
||||
sleep 100m
|
||||
call VerifyScreenDump(buf, 'Test_incsearch_substitute_02', {})
|
||||
|
||||
" Deleting last slash should remove the match.
|
||||
call term_sendkeys(buf, "\<BS>")
|
||||
sleep 100m
|
||||
call VerifyScreenDump(buf, 'Test_incsearch_substitute_03', {})
|
||||
call term_sendkeys(buf, "\<Esc>")
|
||||
|
||||
" Reverse range is accepted
|
||||
call term_sendkeys(buf, ':5,2s/foo')
|
||||
sleep 100m
|
||||
call VerifyScreenDump(buf, 'Test_incsearch_substitute_04', {})
|
||||
call term_sendkeys(buf, "\<Esc>")
|
||||
|
||||
" White space after the command is skipped
|
||||
call term_sendkeys(buf, ':2,3sub /fo')
|
||||
sleep 100m
|
||||
call VerifyScreenDump(buf, 'Test_incsearch_substitute_05', {})
|
||||
call term_sendkeys(buf, "\<Esc>")
|
||||
|
||||
" Command modifiers are skipped
|
||||
call term_sendkeys(buf, ':above below browse botr confirm keepmar keepalt keeppat keepjum filter xxx hide lockm leftabove noau noswap rightbel sandbox silent silent! $tab top unsil vert verbose 4,5s/fo.')
|
||||
sleep 100m
|
||||
call VerifyScreenDump(buf, 'Test_incsearch_substitute_06', {})
|
||||
call term_sendkeys(buf, "\<Esc>")
|
||||
|
||||
" Cursorline highlighting at match
|
||||
call term_sendkeys(buf, ":set cursorline\<CR>")
|
||||
call term_sendkeys(buf, 'G9G')
|
||||
call term_sendkeys(buf, ':9,11s/bar')
|
||||
sleep 100m
|
||||
call VerifyScreenDump(buf, 'Test_incsearch_substitute_07', {})
|
||||
call term_sendkeys(buf, "\<Esc>")
|
||||
|
||||
" Cursorline highlighting at cursor when no match
|
||||
call term_sendkeys(buf, ':9,10s/bar')
|
||||
sleep 100m
|
||||
call VerifyScreenDump(buf, 'Test_incsearch_substitute_08', {})
|
||||
call term_sendkeys(buf, "\<Esc>")
|
||||
|
||||
call StopVimInTerminal(buf)
|
||||
call delete('Xis_subst_script')
|
||||
endfunc
|
||||
|
||||
func Test_search_undefined_behaviour()
|
||||
if !has("terminal")
|
||||
return
|
||||
|
||||
@@ -794,6 +794,36 @@ static char *(features[]) =
|
||||
|
||||
static int included_patches[] =
|
||||
{ /* Add new patch number below this line */
|
||||
/**/
|
||||
286,
|
||||
/**/
|
||||
285,
|
||||
/**/
|
||||
284,
|
||||
/**/
|
||||
283,
|
||||
/**/
|
||||
282,
|
||||
/**/
|
||||
281,
|
||||
/**/
|
||||
280,
|
||||
/**/
|
||||
279,
|
||||
/**/
|
||||
278,
|
||||
/**/
|
||||
277,
|
||||
/**/
|
||||
276,
|
||||
/**/
|
||||
275,
|
||||
/**/
|
||||
274,
|
||||
/**/
|
||||
273,
|
||||
/**/
|
||||
272,
|
||||
/**/
|
||||
271,
|
||||
/**/
|
||||
|
||||
Reference in New Issue
Block a user