Compare commits

...

21 Commits

Author SHA1 Message Date
Kazuki Sakamoto 0cc550e65d MacVim Snapshot 142
Binary targets macOS 10.8+

- Vim patch 8.0.1272
- Update Ruby interface to 2.4

Script interfaces have compatibility with these versions

- Lua 5.2
- Perl 5.16
- Python2 2.7
- Python3 3.6.3
- Ruby 2.4
2017-11-05 18:02:09 -08:00
Kazuki Sakamoto 17f48f5c65 Merge remote-tracking branch 'vim/master' 2017-11-05 16:09:05 -08:00
Bram Moolenaar 53ec79537a patch 8.0.1272: warnings for unused variables in tiny build
Problem:    Warnings for unused variables in tiny build.
Solution:   Add #ifdef. (Dominique Pelle, closes #2288)
2017-11-05 21:24:23 +01:00
Bram Moolenaar fb094e14c1 patch 8.0.1271: still too many old style tests
Problem:    Still too many old style tests.
Solution:   Convert a few more tests to new style. (Yegappan Lakshmanan,
            closes #2290)
2017-11-05 20:59:28 +01:00
Bram Moolenaar 8fdb35a974 patch 8.0.1270: mismatching file name with Filelist
Problem:    Mismatching file name with Filelist.
Solution:   Rename color_ramp.vim to xterm_ramp.vim
2017-11-05 18:23:16 +01:00
Bram Moolenaar b0d45e7f53 Update runtime files. 2017-11-05 18:19:24 +01:00
Bram Moolenaar aace215813 patch 8.0.1269: effect of autocommands on marks is not tested
Problem:    Effect of autocommands on marks is not tested.
Solution:   Add a couple of tests. (James McCoy, closes #2271)
2017-11-05 16:23:10 +01:00
Bram Moolenaar 3bf8c3c38f patch 8.0.1268: PC install instructions are incomplete
Problem:    PC install instructions are incomplete.
Solution:   Update the instructions. (Ken Takata)
2017-11-05 16:04:43 +01:00
Kazuki Sakamoto 5e5f3b9570 Merge remote-tracking branch 'vim/master' 2017-11-04 20:38:51 -07:00
Bram Moolenaar 5842a748be patch 8.0.1267: Test_swap_group may leave file behind
Problem:    Test_swap_group may leave file behind.
Solution:   Add a try/finally.
2017-11-04 22:36:53 +01:00
Bram Moolenaar ffe010fa03 patch 8.0.1266: Test_swap_directory was commented out
Problem:    Test_swap_directory was accidentally commented out.
Solution:   Uncomment the test.
2017-11-04 22:30:40 +01:00
Bram Moolenaar ad7dac85c3 patch 8.0.1265: swap test not skipped when there is one group
Problem:    Swap test not skipped when there is one group.
Solution:   Convert list to string for the message.
2017-11-04 22:21:21 +01:00
Bram Moolenaar c363251630 patch 8.0.1264: terminal debugger gets stuck in small window
Problem:    Terminal debugger gets stuck in small window.
Solution:   Add "-quiet" to the gdb command. (Christian Brabandt, closes #2154)
2017-11-04 21:44:59 +01:00
Bram Moolenaar 5a73e0ca54 patch 8.0.1263: others can read the swap file if a user is careless
Problem:    Others can read the swap file if a user is careless with his
            primary group.
Solution:   If the group permission allows for reading but the world
            permissions doesn't, make sure the group is right.
2017-11-04 21:35:01 +01:00
Bram Moolenaar 7dd88c5133 patch 8.0.1262: terminal redir test is flaky
Problem:    Terminal redir test is flaky.
Solution:   Add it to the list of flaky tests.
2017-11-04 20:46:40 +01:00
Bram Moolenaar 1232624ae5 patch 8.0.1261: program in terminal window gets NL instead of CR
Problem:    Program in terminal window gets NL instead of CR. (Lifepillar)
Solution:   Check the tty setup more often. (closes #1998)
2017-11-04 20:12:14 +01:00
Bram Moolenaar ab8b1c14a3 patch 8.0.1260: using global variables for WaitFor()
Problem:    Using global variables for WaitFor().
Solution:   Use a lambda function instead.  Don't check a condition if
            WaitFor() already checked it.
2017-11-04 19:24:31 +01:00
Bram Moolenaar 13deab8d08 patch 8.0.1259: search test can be flaky
Problem:    Search test can be flaky.
Solution:   Use WaitFor() instead of a delay.  Make it possible to pass a
            funcref to WaitFor() to avoid the need for global variables.
            (James McCoy, closes #2282)
2017-11-04 18:48:43 +01:00
Bram Moolenaar 52a2f0f1da patch 8.0.1258: 'ttymouse' is set to "sgr" even though it's not supported
Problem:    'ttymouse' is set to "sgr" even though it's not supported. (Gary
            Johnson)
Solution:   Adjust #ifdef
2017-11-04 15:16:56 +01:00
Kazuki Sakamoto c6e0b91574 Merge pull request #582 from macvim-dev/test/ruby2.4
Build binary with Ruby 2.4
2017-11-03 23:47:21 -07:00
Kazuki Sakamoto 69784aec42 Build binary with Ruby 2.4 2017-11-03 23:28:52 -07:00
55 changed files with 2532 additions and 1934 deletions
+2 -1
View File
@@ -20,7 +20,7 @@ env:
vi_cv_dll_name_python=/System/Library/Frameworks/Python.framework/Versions/2.7/Python
vi_cv_dll_name_python3=/usr/local/Frameworks/Python.framework/Versions/3.6/Python
VIMCMD=src/MacVim/build/Release/MacVim.app/Contents/MacOS/Vim
"CONFOPT='--with-features=huge --enable-multibyte --enable-terminal --enable-netbeans --with-tlib=ncurses --enable-cscope --enable-perlinterp=dynamic --enable-pythoninterp=dynamic --enable-python3interp=dynamic --enable-rubyinterp=dynamic --with-ruby-command=/usr/bin/ruby --enable-luainterp=dynamic --with-lua-prefix=/usr/local --enable-gui=macvim'"
"CONFOPT='--with-features=huge --enable-multibyte --enable-terminal --enable-netbeans --with-tlib=ncurses --enable-cscope --enable-perlinterp=dynamic --enable-pythoninterp=dynamic --enable-python3interp=dynamic --enable-rubyinterp=dynamic --with-ruby-command=/usr/local/bin/ruby --enable-luainterp=dynamic --with-lua-prefix=/usr/local --enable-gui=macvim'"
sudo: false
@@ -28,6 +28,7 @@ before_install:
- brew update || brew update
- brew install python3
- brew install lua
- brew install ruby
script:
- NPROC=$(getconf _NPROCESSORS_ONLN)
+825 -541
View File
File diff suppressed because it is too large Load Diff
+7 -3
View File
@@ -1,7 +1,7 @@
" netrwSettings.vim: makes netrw settings simpler
" Date: Dec 30, 2014
" Date: Nov 09, 2016
" Maintainer: Charles E Campbell <drchipNOSPAM at campbellfamily dot biz>
" Version: 15
" Version: 16
" Copyright: Copyright (C) 1999-2007 Charles E. Campbell {{{1
" Permission is hereby granted to use and distribute this code,
" with or without modifications, provided that this copyright
@@ -19,7 +19,7 @@
if exists("g:loaded_netrwSettings") || &cp
finish
endif
let g:loaded_netrwSettings = "v15"
let g:loaded_netrwSettings = "v16"
if v:version < 700
echohl WarningMsg
echo "***warning*** this version of netrwSettings needs vim 7.0"
@@ -154,9 +154,13 @@ fun! netrwSettings#NetrwSettings()
put = 'let g:netrw_list_hide = '.g:netrw_list_hide
put = 'let g:netrw_liststyle = '.g:netrw_liststyle
put = 'let g:netrw_localcopycmd = '.g:netrw_localcopycmd
put = 'let g:netrw_localcopycmdopt = '.g:netrw_localcopycmdopt
put = 'let g:netrw_localmkdir = '.g:netrw_localmkdir
put = 'let g:netrw_localmkdiropt = '.g:netrw_localmkdiropt
put = 'let g:netrw_localmovecmd = '.g:netrw_localmovecmd
put = 'let g:netrw_localmovecmdopt = '.g:netrw_localmovecmdopt
put = 'let g:netrw_localrmdir = '.g:netrw_localrmdir
put = 'let g:netrw_localrmdiropt = '.g:netrw_localrmdiropt
put = 'let g:netrw_maxfilenamelen = '.g:netrw_maxfilenamelen
put = 'let g:netrw_menu = '.g:netrw_menu
put = 'let g:netrw_mousemaps = '.g:netrw_mousemaps
+8 -1
View File
@@ -1,4 +1,4 @@
*autocmd.txt* For Vim version 8.0. Last change: 2017 Oct 21
*autocmd.txt* For Vim version 8.0. Last change: 2017 Nov 05
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -68,7 +68,14 @@ Note: The ":autocmd" command can only be followed by another command when the
'|' appears before {cmd}. This works: >
:augroup mine | au! BufRead | augroup END
But this sees "augroup" as part of the defined command: >
:augroup mine | au! BufRead * | augroup END
:augroup mine | au BufRead * set tw=70 | augroup END
Instead you can put the group name into the command: >
:au! mine BufRead *
:au mine BufRead * set tw=70
Or use `:execute`: >
:augroup mine | exe "au! BufRead *" | augroup END
:augroup mine | exe "au BufRead * set tw=70" | augroup END
Note that special characters (e.g., "%", "<cword>") in the ":autocmd"
arguments are not expanded when the autocommand is defined. These will be
+118 -117
View File
@@ -1048,7 +1048,7 @@ When expr8 is a |Funcref| type variable, invoke the function it refers to.
*expr9*
number
------
number number constant *expr-number*
number number constant *expr-number*
*hex-number* *octal-number* *binary-number*
Decimal, Hexadecimal (starting with 0x or 0X), Binary (starting with 0b or 0B)
@@ -1647,7 +1647,7 @@ v:foldstart Used for 'foldtext': first line of closed fold.
Read-only in the |sandbox|. |fold-foldtext|
*v:hlsearch* *hlsearch-variable*
v:hlsearch Variable that indicates whether search highlighting is on.
v:hlsearch Variable that indicates whether search highlighting is on.
Setting it makes sense only if 'hlsearch' is enabled which
requires |+extra_search|. Setting this variable to zero acts
like the |:nohlsearch| command, setting it to one acts like >
@@ -1818,7 +1818,7 @@ v:scrollstart String describing the script or function that caused the
v:servername The resulting registered |client-server-name| if any.
Read-only.
v:searchforward *v:searchforward* *searchforward-variable*
Search direction: 1 after a forward search, 0 after a
backward search. It is reset to forward when directly setting
@@ -1930,7 +1930,7 @@ v:termu7resp The escape sequence returned by the terminal for the |t_u7|
*v:testing* *testing-variable*
v:testing Must be set before using `test_garbagecollect_now()`.
Also, when set certain error messages won't be shown for 2
seconds. (e.g. "'dictionary' option is empty")
seconds. (e.g. "'dictionary' option is empty")
*v:this_session* *this_session-variable*
v:this_session Full filename of the last loaded or saved session file. See
@@ -2074,7 +2074,7 @@ ch_setoptions({handle}, {options})
ch_status({handle} [, {options}])
String status of channel {handle}
changenr() Number current change number
char2nr({expr}[, {utf8}]) Number ASCII/UTF8 value of first char in {expr}
char2nr({expr} [, {utf8}]) Number ASCII/UTF8 value of first char in {expr}
cindent({lnum}) Number C indent for line {lnum}
clearmatches() none clear all matches
col({expr}) Number column nr of cursor or mark
@@ -2116,9 +2116,9 @@ filereadable({file}) Number |TRUE| if {file} is a readable file
filewritable({file}) Number |TRUE| if {file} is a writable file
filter({expr1}, {expr2}) List/Dict remove items from {expr1} where
{expr2} is 0
finddir({name}[, {path}[, {count}]])
finddir({name} [, {path} [, {count}]])
String find directory {name} in {path}
findfile({name}[, {path}[, {count}]])
findfile({name} [, {path} [, {count}]])
String find file {name} in {path}
float2nr({expr}) Number convert Float {expr} to a Number
floor({expr}) Float round {expr} down
@@ -2162,7 +2162,7 @@ getftime({fname}) Number last modification time of file
getftype({fname}) String description of type of file {fname}
getline({lnum}) String line {lnum} of current buffer
getline({lnum}, {end}) List lines {lnum} to {end} of current buffer
getloclist({nr}[, {what}]) List list of location list items
getloclist({nr} [, {what}]) List list of location list items
getmatches() List list of current matches
getpid() Number process ID of Vim
getpos({expr}) List position of cursor, mark, etc.
@@ -2238,28 +2238,28 @@ lispindent({lnum}) Number Lisp indent for line {lnum}
localtime() Number current time
log({expr}) Float natural logarithm (base e) of {expr}
log10({expr}) Float logarithm of Float {expr} to base 10
luaeval({expr}[, {expr}]) any evaluate |Lua| expression
luaeval({expr} [, {expr}]) any evaluate |Lua| expression
map({expr1}, {expr2}) List/Dict change each item in {expr1} to {expr}
maparg({name}[, {mode} [, {abbr} [, {dict}]]])
maparg({name} [, {mode} [, {abbr} [, {dict}]]])
String or Dict
rhs of mapping {name} in mode {mode}
mapcheck({name}[, {mode} [, {abbr}]])
mapcheck({name} [, {mode} [, {abbr}]])
String check for mappings matching {name}
match({expr}, {pat}[, {start}[, {count}]])
match({expr}, {pat} [, {start} [, {count}]])
Number position where {pat} matches in {expr}
matchadd({group}, {pattern}[, {priority}[, {id} [, {dict}]]])
matchadd({group}, {pattern} [, {priority} [, {id} [, {dict}]]])
Number highlight {pattern} with {group}
matchaddpos({group}, {pos}[, {priority}[, {id}[, {dict}]]])
matchaddpos({group}, {pos} [, {priority} [, {id} [, {dict}]]])
Number highlight positions with {group}
matcharg({nr}) List arguments of |:match|
matchdelete({id}) Number delete match identified by {id}
matchend({expr}, {pat}[, {start}[, {count}]])
matchend({expr}, {pat} [, {start} [, {count}]])
Number position where {pat} ends in {expr}
matchlist({expr}, {pat}[, {start}[, {count}]])
matchlist({expr}, {pat} [, {start} [, {count}]])
List match and submatches of {pat} in {expr}
matchstr({expr}, {pat}[, {start}[, {count}]])
matchstr({expr}, {pat} [, {start} [, {count}]])
String {count}'th match of {pat} in {expr}
matchstrpos({expr}, {pat}[, {start}[, {count}]])
matchstrpos({expr}, {pat} [, {start} [, {count}]])
List {count}'th match of {pat} in {expr}
max({expr}) Number maximum value of items in {expr}
min({expr}) Number minimum value of items in {expr}
@@ -2268,7 +2268,7 @@ mkdir({name} [, {path} [, {prot}]])
mode([expr]) String current editing mode
mzeval({expr}) any evaluate |MzScheme| expression
nextnonblank({lnum}) Number line nr of non-blank line >= {lnum}
nr2char({expr}[, {utf8}]) String single char with ASCII/UTF8 value {expr}
nr2char({expr} [, {utf8}]) String single char with ASCII/UTF8 value {expr}
or({expr}, {expr}) Number bitwise OR
pathshorten({expr}) String shorten directory names in a path
perleval({expr}) any evaluate |Perl| expression
@@ -2330,13 +2330,13 @@ setcharsearch({dict}) Dict set character search from {dict}
setcmdpos({pos}) Number set cursor position in command-line
setfperm({fname}, {mode}) Number set {fname} file permissions to {mode}
setline({lnum}, {line}) Number set line {lnum} to {line}
setloclist({nr}, {list}[, {action}[, {what}]])
setloclist({nr}, {list} [, {action} [, {what}]])
Number modify location list using {list}
setmatches({list}) Number restore a list of matches
setpos({expr}, {list}) Number set the {expr} position to {list}
setqflist({list}[, {action}[, {what}]])
setqflist({list} [, {action} [, {what}]])
Number modify quickfix list using {list}
setreg({n}, {v}[, {opt}]) Number set register to value and type
setreg({n}, {v} [, {opt}]) Number set register to value and type
settabvar({nr}, {varname}, {val}) none set {varname} in tab page {nr} to {val}
settabwinvar({tabnr}, {winnr}, {varname}, {val})
none set {varname} in window {winnr} in tab
@@ -2362,22 +2362,22 @@ sqrt({expr}) Float square root of {expr}
str2float({expr}) Float convert String to Float
str2nr({expr} [, {base}]) Number convert String to Number
strchars({expr} [, {skipcc}]) Number character length of the String {expr}
strcharpart({str}, {start}[, {len}])
strcharpart({str}, {start} [, {len}])
String {len} characters of {str} at {start}
strdisplaywidth({expr} [, {col}]) Number display length of the String {expr}
strftime({format}[, {time}]) String time in specified format
strftime({format} [, {time}]) String time in specified format
strgetchar({str}, {index}) Number get char {index} from {str}
stridx({haystack}, {needle}[, {start}])
stridx({haystack}, {needle} [, {start}])
Number index of {needle} in {haystack}
string({expr}) String String representation of {expr} value
strlen({expr}) Number length of the String {expr}
strpart({str}, {start}[, {len}])
strpart({str}, {start} [, {len}])
String {len} characters of {str} at {start}
strridx({haystack}, {needle} [, {start}])
Number last index of {needle} in {haystack}
strtrans({expr}) String translate string to make it printable
strwidth({expr}) Number display cell length of the String {expr}
submatch({nr}[, {list}]) String or List
submatch({nr} [, {list}]) String or List
specific match in ":s" or substitute()
substitute({expr}, {pat}, {sub}, {flags})
String all {pat} in {expr} replaced with {sub}
@@ -2391,8 +2391,8 @@ system({expr} [, {input}]) String output of shell command/filter {expr}
systemlist({expr} [, {input}]) List output of shell command/filter {expr}
tabpagebuflist([{arg}]) List list of buffer numbers in tab page
tabpagenr([{arg}]) Number number of current or last tab page
tabpagewinnr({tabarg}[, {arg}]) Number number of current window in tab page
taglist({expr}[, {filename}]) List list of tags matching {expr}
tabpagewinnr({tabarg} [, {arg}]) Number number of current window in tab page
taglist({expr} [, {filename}]) List list of tags matching {expr}
tagfiles() List tags files used
tan({expr}) Float tangent of {expr}
tanh({expr}) Float hyperbolic tangent of {expr}
@@ -2406,7 +2406,7 @@ term_getscrolled({buf}) Number get the scroll count of a terminal
term_getsize({buf}) List get the size of a terminal
term_getstatus({buf}) String get the status of a terminal
term_gettitle({buf}) String get the title of a terminal
term_getttty({buf}, [{input}]) String get the tty name of a terminal
term_gettty({buf}, [{input}]) String get the tty name of a terminal
term_list() List get the list of terminal buffers
term_scrape({buf}, {row}) List get row of a terminal screen
term_sendkeys({buf}, {keys}) none send keystrokes to a terminal
@@ -2951,7 +2951,7 @@ ch_evalraw({handle}, {string} [, {options}]) *ch_evalraw()*
in NL mode, the caller must do that. The NL in the response
is removed.
Note that Vim does not know when the text received on a raw
channel is complete, it may only return the first part and you
channel is complete, it may only return the first part and you
need to use ch_readraw() to fetch the rest.
See |channel-use|.
@@ -3104,7 +3104,7 @@ changenr() *changenr()*
redo it is the number of the redone change. After undo it is
one less than the number of the undone change.
char2nr({expr}[, {utf8}]) *char2nr()*
char2nr({expr} [, {utf8}]) *char2nr()*
Return number value of the first char in {expr}. Examples: >
char2nr(" ") returns 32
char2nr("ABC") returns 65
@@ -3298,7 +3298,7 @@ cosh({expr}) *cosh()*
< -1.127626
{only available when compiled with the |+float| feature}
count({comp}, {expr} [, {ic} [, {start}]]) *count()*
Return the number of times an item with value {expr} appears
in |String|, |List| or |Dictionary| {comp}.
@@ -3383,7 +3383,7 @@ cursor({list})
Returns 0 when the position could be set, -1 otherwise.
deepcopy({expr}[, {noref}]) *deepcopy()* *E698*
deepcopy({expr} [, {noref}]) *deepcopy()* *E698*
Make a copy of {expr}. For Numbers and Strings this isn't
different from using {expr} directly.
When {expr} is a |List| a full copy is created. This means
@@ -3410,14 +3410,14 @@ delete({fname} [, {flags}]) *delete()*
When {flags} is "d": Deletes the directory by the name
{fname}. This fails when directory {fname} is not empty.
When {flags} is "rf": Deletes the directory by the name
{fname} and everything in it, recursively. BE CAREFUL!
Note: on MS-Windows it is not possible to delete a directory
that is being used.
A symbolic link itself is deleted, not what it points to.
The result is a Number, which is 0 if the delete operation was
successful and -1 when the deletion failed or partly failed.
@@ -3461,6 +3461,7 @@ empty({expr}) *empty()*
Return the Number 1 if {expr} is empty, zero otherwise.
- A |List| or |Dictionary| is empty when it does not have any
items.
- A String is empty when its length is zero.
- A Number and Float is empty when its value is zero.
- |v:false|, |v:none| and |v:null| are empty, |v:true| is not.
- A Job is empty when it failed to start.
@@ -3823,7 +3824,7 @@ filter({expr1}, {expr2}) *filter()*
For each item in {expr1} evaluate {expr2} and when the result
is zero remove the item from the |List| or |Dictionary|.
{expr2} must be a |string| or |Funcref|.
If {expr2} is a |string|, inside {expr2} |v:val| has the value
of the current item. For a |Dictionary| |v:key| has the key
of the current item and for a |List| |v:key| has the index of
@@ -3865,7 +3866,7 @@ filter({expr1}, {expr2}) *filter()*
defined with the "abort" flag.
finddir({name}[, {path}[, {count}]]) *finddir()*
finddir({name} [, {path} [, {count}]]) *finddir()*
Find directory {name} in {path}. Supports both downwards and
upwards recursive directory searches. See |file-searching|
for the syntax of {path}.
@@ -3880,7 +3881,7 @@ finddir({name}[, {path}[, {count}]]) *finddir()*
{only available when compiled with the |+file_in_path|
feature}
findfile({name}[, {path}[, {count}]]) *findfile()*
findfile({name} [, {path} [, {count}]]) *findfile()*
Just like |finddir()|, but find a file instead of a directory.
Uses 'suffixesadd'.
Example: >
@@ -3923,7 +3924,7 @@ floor({expr}) *floor()*
echo floor(4.0)
< 4.0
{only available when compiled with the |+float| feature}
fmod({expr1}, {expr2}) *fmod()*
Return the remainder of {expr1} / {expr2}, even if the
@@ -4052,7 +4053,7 @@ function({name} [, {arglist}] [, {dict}])
When {arglist} or {dict} is present this creates a partial.
That means the argument list and/or the dictionary is stored in
the Funcref and will be used when the Funcref is called.
The arguments are passed to the function in front of other
arguments. Example: >
func Callback(arg1, arg2, name)
@@ -4104,7 +4105,7 @@ function({name} [, {arglist}] [, {dict}])
garbagecollect([{atexit}]) *garbagecollect()*
Cleanup unused |Lists|, |Dictionaries|, |Channels| and |Jobs|
that have circular references.
There is hardly ever a need to invoke this function, as it is
automatically done when Vim runs out of memory or is waiting
for the user to press a key after 'updatetime'. Items without
@@ -4551,7 +4552,7 @@ getline({lnum} [, {end}])
< To get lines from another buffer see |getbufline()|
getloclist({nr}[, {what}]) *getloclist()*
getloclist({nr} [, {what}]) *getloclist()*
Returns a list with all the entries in the location list for
window {nr}. {nr} can be the window number or the |window-ID|.
When {nr} is zero the current window is used.
@@ -5316,7 +5317,7 @@ job_status({job}) *job_status()* *E916*
"run" job is running
"fail" job failed to start
"dead" job died or was stopped after running
On Unix a non-existing command results in "dead" instead of
"fail", because a fork happens before the failure can be
detected.
@@ -5555,7 +5556,7 @@ line({expr}) The result is a Number, which is the line number of the file
This autocommand jumps to the last known position in a file
just after opening it, if the '" mark is set: >
:au BufReadPost *
\ if line("'\"") > 1 && line("'\"") <= line("$") && &ft !~# 'commit'
\ if line("'\"") > 1 && line("'\"") <= line("$") && &ft !~# 'commit'
\ | exe "normal! g`\""
\ | endif
@@ -5607,16 +5608,16 @@ log10({expr}) *log10()*
:echo log10(0.01)
< -2.0
{only available when compiled with the |+float| feature}
luaeval({expr}[, {expr}]) *luaeval()*
Evaluate Lua expression {expr} and return its result converted
to Vim data structures. Second {expr} may hold additional
luaeval({expr} [, {expr}]) *luaeval()*
Evaluate Lua expression {expr} and return its result converted
to Vim data structures. Second {expr} may hold additional
argument accessible as _A inside first {expr}.
Strings are returned as they are.
Boolean objects are converted to numbers.
Numbers are converted to |Float| values if vim was compiled
Numbers are converted to |Float| values if vim was compiled
with |+float| and to numbers otherwise.
Dictionaries and lists obtained by vim.eval() are returned
Dictionaries and lists obtained by vim.eval() are returned
as-is.
Other objects are returned as zero without any errors.
See |lua-luaeval| for more details.
@@ -5626,7 +5627,7 @@ map({expr1}, {expr2}) *map()*
{expr1} must be a |List| or a |Dictionary|.
Replace each item in {expr1} with the result of evaluating
{expr2}. {expr2} must be a |string| or |Funcref|.
If {expr2} is a |string|, inside {expr2} |v:val| has the value
of the current item. For a |Dictionary| |v:key| has the key
of the current item and for a |List| |v:key| has the index of
@@ -5665,12 +5666,12 @@ map({expr1}, {expr2}) *map()*
defined with the "abort" flag.
maparg({name}[, {mode} [, {abbr} [, {dict}]]]) *maparg()*
maparg({name} [, {mode} [, {abbr} [, {dict}]]]) *maparg()*
When {dict} is omitted or zero: Return the rhs of mapping
{name} in mode {mode}. The returned String has special
characters translated like in the output of the ":map" command
listing.
When there is no mapping for {name}, an empty String is
returned.
@@ -5720,7 +5721,7 @@ maparg({name}[, {mode} [, {abbr} [, {dict}]]]) *maparg()*
exe 'nnoremap <Tab> ==' . maparg('<Tab>', 'n')
mapcheck({name}[, {mode} [, {abbr}]]) *mapcheck()*
mapcheck({name} [, {mode} [, {abbr}]]) *mapcheck()*
Check if there is a mapping that matches with {name} in mode
{mode}. See |maparg()| for {mode} and special names in
{name}.
@@ -5752,7 +5753,7 @@ mapcheck({name}[, {mode} [, {abbr}]]) *mapcheck()*
< This avoids adding the "_vv" mapping when there already is a
mapping for "_v" or for "_vvv".
match({expr}, {pat}[, {start}[, {count}]]) *match()*
match({expr}, {pat} [, {start} [, {count}]]) *match()*
When {expr} is a |List| then this returns the index of the
first item where {pat} matches. Each item is used as a
String, |Lists| and |Dictionaries| are used as echoed.
@@ -5808,7 +5809,7 @@ match({expr}, {pat}[, {start}[, {count}]]) *match()*
done like 'magic' is set and 'cpoptions' is empty.
*matchadd()* *E798* *E799* *E801*
matchadd({group}, {pattern}[, {priority}[, {id}[, {dict}]]])
matchadd({group}, {pattern} [, {priority} [, {id} [, {dict}]]])
Defines a pattern to be highlighted in the current window (a
"match"). It will be highlighted with {group}. Returns an
identification number (ID), which can be used to delete the
@@ -5861,7 +5862,7 @@ matchadd({group}, {pattern}[, {priority}[, {id}[, {dict}]]])
one operation by |clearmatches()|.
*matchaddpos()*
matchaddpos({group}, {pos}[, {priority}[, {id}[, {dict}]]])
matchaddpos({group}, {pos} [, {priority} [, {id} [, {dict}]]])
Same as |matchadd()|, but requires a list of positions {pos}
instead of a pattern. This command is faster than |matchadd()|
because it does not require to handle regular expressions and
@@ -5881,7 +5882,7 @@ matchaddpos({group}, {pos}[, {priority}[, {id}[, {dict}]]])
be highlighted.
- A list with three numbers, e.g., [23, 11, 3]. As above, but
the third number gives the length of the highlight in bytes.
The maximum number of positions is 8.
Example: >
@@ -5914,7 +5915,7 @@ matchdelete({id}) *matchdelete()* *E802* *E803*
otherwise -1. See example for |matchadd()|. All matches can
be deleted in one operation by |clearmatches()|.
matchend({expr}, {pat}[, {start}[, {count}]]) *matchend()*
matchend({expr}, {pat} [, {start} [, {count}]]) *matchend()*
Same as |match()|, but return the index of first character
after the match. Example: >
:echo matchend("testing", "ing")
@@ -5933,7 +5934,7 @@ matchend({expr}, {pat}[, {start}[, {count}]]) *matchend()*
< result is "-1".
When {expr} is a |List| the result is equal to |match()|.
matchlist({expr}, {pat}[, {start}[, {count}]]) *matchlist()*
matchlist({expr}, {pat} [, {start} [, {count}]]) *matchlist()*
Same as |match()|, but return a |List|. The first item in the
list is the matched string, same as what matchstr() would
return. Following items are submatches, like "\1", "\2", etc.
@@ -5943,7 +5944,7 @@ matchlist({expr}, {pat}[, {start}[, {count}]]) *matchlist()*
< Results in: ['acd', 'a', '', 'c', 'd', '', '', '', '', '']
When there is no match an empty list is returned.
matchstr({expr}, {pat}[, {start}[, {count}]]) *matchstr()*
matchstr({expr}, {pat} [, {start} [, {count}]]) *matchstr()*
Same as |match()|, but return the matched string. Example: >
:echo matchstr("testing", "ing")
< results in "ing".
@@ -5956,7 +5957,7 @@ matchstr({expr}, {pat}[, {start}[, {count}]]) *matchstr()*
When {expr} is a |List| then the matching item is returned.
The type isn't changed, it's not necessarily a String.
matchstrpos({expr}, {pat}[, {start}[, {count}]]) *matchstrpos()*
matchstrpos({expr}, {pat} [, {start} [, {count}]]) *matchstrpos()*
Same as |matchstr()|, but return the matched string, the start
position and the end position of the match. Example: >
:echo matchstrpos("testing", "ing")
@@ -6066,7 +6067,7 @@ nextnonblank({lnum}) *nextnonblank()*
below it, zero is returned.
See also |prevnonblank()|.
nr2char({expr}[, {utf8}]) *nr2char()*
nr2char({expr} [, {utf8}]) *nr2char()*
Return a string with a single character, which has the number
value {expr}. Examples: >
nr2char(64) returns "@"
@@ -6118,7 +6119,7 @@ pow({x}, {y}) *pow()*
:echo pow(32, 0.20)
< 2.0
{only available when compiled with the |+float| feature}
prevnonblank({lnum}) *prevnonblank()*
Return the line number of the first line at or above {lnum}
that is not blank. Example: >
@@ -6278,7 +6279,7 @@ printf({fmt}, {expr1} ...) *printf()*
feature works just like 's'.
*printf-f* *E807*
f F The Float argument is converted into a string of the
f F The Float argument is converted into a string of the
form 123.456. The precision specifies the number of
digits after the decimal point. When the precision is
zero the decimal point is omitted. When the precision
@@ -6332,11 +6333,11 @@ pumvisible() *pumvisible()*
py3eval({expr}) *py3eval()*
Evaluate Python expression {expr} and return its result
converted to Vim data structures.
Numbers and strings are returned as they are (strings are
copied though, Unicode strings are additionally converted to
Numbers and strings are returned as they are (strings are
copied though, Unicode strings are additionally converted to
'encoding').
Lists are represented as Vim |List| type.
Dictionaries are represented as Vim |Dictionary| type with
Dictionaries are represented as Vim |Dictionary| type with
keys converted to strings.
{only available when compiled with the |+python3| feature}
@@ -6344,10 +6345,10 @@ py3eval({expr}) *py3eval()*
pyeval({expr}) *pyeval()*
Evaluate Python expression {expr} and return its result
converted to Vim data structures.
Numbers and strings are returned as they are (strings are
Numbers and strings are returned as they are (strings are
copied though).
Lists are represented as Vim |List| type.
Dictionaries are represented as Vim |Dictionary| type,
Dictionaries are represented as Vim |Dictionary| type,
non-string keys result in error.
{only available when compiled with the |+python| feature}
@@ -6468,7 +6469,7 @@ remote_expr({server}, {string} [, {idvar} [, {timeout}]])
and the result will be the empty string.
Variables will be evaluated in the global namespace,
independent of a function currently being activel. Except
independent of a function currently being active. Except
when in debug mode, then local function variables and
arguments can be evaluated.
@@ -6614,12 +6615,12 @@ round({expr}) *round()*
< -5.0
{only available when compiled with the |+float| feature}
screenattr(row, col) *screenattr()*
screenattr({row}, {col}) *screenattr()*
Like |screenchar()|, but return the attribute. This is a rather
arbitrary number that can only be used to compare to the
attribute at other positions.
screenchar(row, col) *screenchar()*
screenchar({row}, {col}) *screenchar()*
The result is a Number, which is the character at position
[row, col] on the screen. This works for every possible
screen position, also status lines, window separators and the
@@ -6675,7 +6676,7 @@ search({pattern} [, {flags} [, {stopline} [, {timeout}]]]) *search()*
flag.
'ignorecase', 'smartcase' and 'magic' are used.
When the 'z' flag is not given, searching always starts in
column zero and then matches before the cursor are skipped.
When the 'c' flag is present in 'cpo' the next search starts
@@ -6992,7 +6993,7 @@ setline({lnum}, {text}) *setline()*
< Note: The '[ and '] marks are not set.
setloclist({nr}, {list}[, {action}[, {what}]]) *setloclist()*
setloclist({nr}, {list} [, {action} [, {what}]]) *setloclist()*
Create or replace or add to the location list for window {nr}.
{nr} can be the window number or the |window-ID|.
When {nr} is zero the current window is used.
@@ -7060,9 +7061,9 @@ setpos({expr}, {list})
also set the preferred column. Also see the "curswant" key in
|winrestview()|.
setqflist({list} [, {action}[, {what}]]) *setqflist()*
setqflist({list} [, {action} [, {what}]]) *setqflist()*
Create or replace or add to the quickfix list.
When {what} is not present, use the items in {list}. Each
item must be a dictionary. Non-dictionary items in {list} are
ignored. Each dictionary item can contain the following
@@ -7101,12 +7102,12 @@ setqflist({list} [, {action}[, {what}]]) *setqflist()*
'a' The items from {list} are added to the existing
quickfix list. If there is no existing list, then a
new list is created.
'r' The items from the current quickfix list are replaced
with the items from {list}. This can also be used to
clear the list: >
:call setqflist([], 'r')
<
<
'f' All the quickfix lists in the quickfix stack are
freed.
@@ -7157,7 +7158,7 @@ setqflist({list} [, {action}[, {what}]]) *setqflist()*
*setreg()*
setreg({regname}, {value} [, {options}])
Set the register {regname} to {value}.
{value} may be any value returned by |getreg()|, including
{value} may be any value returned by |getreg()|, including
a |List|.
If {options} contains "a" or {regname} is upper case,
then the value is appended.
@@ -7171,14 +7172,14 @@ setreg({regname}, {value} [, {options}])
in the longest line (counting a <Tab> as 1 character).
If {options} contains no register settings, then the default
is to use character mode unless {value} ends in a <NL> for
string {value} and linewise mode for list {value}. Blockwise
is to use character mode unless {value} ends in a <NL> for
string {value} and linewise mode for list {value}. Blockwise
mode is never selected automatically.
Returns zero for success, non-zero for failure.
*E883*
Note: you may not use |List| containing more than one item to
set search and expression registers. Lists containing no
Note: you may not use |List| containing more than one item to
set search and expression registers. Lists containing no
items act like empty strings.
Examples: >
@@ -7192,8 +7193,8 @@ setreg({regname}, {value} [, {options}])
:let var_amode = getregtype('a')
....
:call setreg('a', var_a, var_amode)
< Note: you may not reliably restore register value
without using the third argument to |getreg()| as without it
< Note: you may not reliably restore register value
without using the third argument to |getreg()| as without it
newlines are represented as newlines AND Nul bytes are
represented as newlines as well, see |NL-used-for-Nul|.
@@ -7298,7 +7299,7 @@ sin({expr}) *sin()*
:echo sin(-4.01)
< 0.763301
{only available when compiled with the |+float| feature}
sinh({expr}) *sinh()*
Return the hyperbolic sine of {expr} as a |Float| in the range
@@ -7314,7 +7315,7 @@ sinh({expr}) *sinh()*
sort({list} [, {func} [, {dict}]]) *sort()* *E702*
Sort the items in {list} in-place. Returns {list}.
If you want a list to remain unmodified make a copy first: >
:let sortedlist = sort(copy(mylist))
@@ -7325,7 +7326,7 @@ sort({list} [, {func} [, {dict}]]) *sort()* *E702*
When {func} is given and it is '1' or 'i' then case is
ignored.
When {func} is given and it is 'n' then all items will be
sorted numerical (Implementation detail: This uses the
strtod() function to parse numbers, Strings, Lists, Dicts and
@@ -7460,7 +7461,7 @@ sqrt({expr}) *sqrt()*
< nan
"nan" may be different, it depends on system libraries.
{only available when compiled with the |+float| feature}
str2float({expr}) *str2float()*
Convert String {expr} to a Float. This mostly works the same
@@ -7497,7 +7498,7 @@ strchars({expr} [, {skipcc}]) *strchars()*
counted separately.
When {skipcc} set to 1, Composing characters are ignored.
Also see |strlen()|, |strdisplaywidth()| and |strwidth()|.
{skipcc} is only available after 7.4.755. For backward
compatibility, you can define a wrapper function: >
if has("patch-7.4.755")
@@ -7514,7 +7515,7 @@ strchars({expr} [, {skipcc}]) *strchars()*
endfunction
endif
<
strcharpart({src}, {start}[, {len}]) *strcharpart()*
strcharpart({src}, {start} [, {len}]) *strcharpart()*
Like |strpart()| but using character index and length instead
of byte index and length.
When a character index is used where a character does not
@@ -7522,7 +7523,7 @@ strcharpart({src}, {start}[, {len}]) *strcharpart()*
strcharpart('abc', -1, 2)
< results in 'a'.
strdisplaywidth({expr}[, {col}]) *strdisplaywidth()*
strdisplaywidth({expr} [, {col}]) *strdisplaywidth()*
The result is a Number, which is the number of display cells
String {expr} occupies on the screen when it starts at {col}.
When {col} is omitted zero is used. Otherwise it is the
@@ -7606,7 +7607,7 @@ strlen({expr}) The result is a Number, which is the length of the String
|strchars()|.
Also see |len()|, |strdisplaywidth()| and |strwidth()|.
strpart({src}, {start}[, {len}]) *strpart()*
strpart({src}, {start} [, {len}]) *strpart()*
The result is a String, which is part of {src}, starting from
byte {start}, with the byte length {len}.
To count characters instead of bytes use |strcharpart()|.
@@ -7658,7 +7659,7 @@ strwidth({expr}) *strwidth()*
Ambiguous, this function's return value depends on 'ambiwidth'.
Also see |strlen()|, |strdisplaywidth()| and |strchars()|.
submatch({nr}[, {list}]) *submatch()* *E935*
submatch({nr} [, {list}]) *submatch()* *E935*
Only for an expression in a |:substitute| command or
substitute() function.
Returns the {nr}'th submatch of the matched text. When {nr}
@@ -7667,8 +7668,8 @@ submatch({nr}[, {list}]) *submatch()* *E935*
multi-line match or a NUL character in the text.
Also see |sub-replace-expression|.
If {list} is present and non-zero then submatch() returns
a list of strings, similar to |getline()| with two arguments.
If {list} is present and non-zero then submatch() returns
a list of strings, similar to |getline()| with two arguments.
NL characters in the text represent NUL characters in the
text.
Only returns more than one item for |:substitute|, inside
@@ -7688,7 +7689,7 @@ substitute({expr}, {pat}, {sub}, {flags}) *substitute()*
the first match of {pat} is replaced with {sub}.
When {flags} is "g", all matches of {pat} in {expr} are
replaced. Otherwise {flags} should be "".
This works like the ":substitute" command (without any flags).
But the matching with {pat} is always done like the 'magic'
option is set and 'cpoptions' is empty (to make scripts
@@ -7837,9 +7838,9 @@ system({expr} [, {input}]) *system()* *E677*
Get the output of the shell command {expr} as a string. See
|systemlist()| to get the output as a List.
When {input} is given and is a string this string is written
to a file and passed as stdin to the command. The string is
written as-is, you need to take care of using the correct line
When {input} is given and is a string this string is written
to a file and passed as stdin to the command. The string is
written as-is, you need to take care of using the correct line
separators yourself.
If {input} is given and is a |List| it is written to the file
in a way |writefile()| does with {binary} set to "b" (i.e.
@@ -7858,10 +7859,10 @@ system({expr} [, {input}]) *system()* *E677*
up on the screen which require |CTRL-L| to remove. >
:silent let f = system('ls *.vim')
<
Note: Use |shellescape()| or |::S| with |expand()| or
|fnamemodify()| to escape special characters in a command
argument. Newlines in {expr} may cause the command to fail.
The characters in 'shellquote' and 'shellxquote' may also
Note: Use |shellescape()| or |::S| with |expand()| or
|fnamemodify()| to escape special characters in a command
argument. Newlines in {expr} may cause the command to fail.
The characters in 'shellquote' and 'shellxquote' may also
cause trouble.
This is not to be used for interactive commands.
@@ -7895,9 +7896,9 @@ system({expr} [, {input}]) *system()* *E677*
systemlist({expr} [, {input}]) *systemlist()*
Same as |system()|, but returns a |List| with lines (parts of
output separated by NL) with NULs transformed into NLs. Output
is the same as |readfile()| will output with {binary} argument
Same as |system()|, but returns a |List| with lines (parts of
output separated by NL) with NULs transformed into NLs. Output
is the same as |readfile()| will output with {binary} argument
set to "b". Note that on MS-Windows you may get trailing CR
characters.
@@ -7944,7 +7945,7 @@ tagfiles() Returns a |List| with the file names used to search for tags
for the current buffer. This is the 'tags' option expanded.
taglist({expr}[, {filename}]) *taglist()*
taglist({expr} [, {filename}]) *taglist()*
Returns a list of tags matching the regular expression {expr}.
If {filename} is passed it is used to prioritize the results
@@ -8139,7 +8140,7 @@ term_scrape({buf}, {row}) *term_scrape()*
line is used. When {row} is invalid an empty string is
returned.
Return a List containing a Dict for each screen cell:
Return a List containing a Dict for each screen cell:
"chars" character(s) at the cell
"fg" foreground color as #rrggbb
"bg" background color as #rrggbb
@@ -8279,7 +8280,7 @@ test_override({name}, {val}) *test_override()*
to run tests. Only to be used for testing Vim!
The override is enabled when {val} is non-zero and removed
when {val} is zero.
Current supported values for name are:
Current supported values for name are:
name effect when {val} is non-zero ~
redraw disable the redrawing() function
@@ -8424,7 +8425,7 @@ trunc({expr}) *trunc()*
echo trunc(4.0)
< 4.0
{only available when compiled with the |+float| feature}
*type()*
type({expr}) The result is a Number representing the type of {expr}.
Instead of using the number directly, it is better to use the
@@ -8477,7 +8478,7 @@ undotree() *undotree()*
"save_last" Number of the last file write. Zero when no
write yet.
"save_cur" Number of the current position in the undo
tree.
tree.
"synced" Non-zero when the last undo block was synced.
This happens when waiting from input from the
user. See |undo-blocks|.
@@ -8761,7 +8762,7 @@ writefile({list}, {fname} [, {flags}])
appended to the file: >
:call writefile(["foo"], "event.log", "a")
:call writefile(["bar"], "event.log", "a")
>
< All NL characters are replaced with a NUL character.
Inserting CR characters needs to be done before passing {list}
to writefile().
@@ -9076,7 +9077,7 @@ See |:verbose-cmd| for more information.
Define a new function by the name {name}. The body of
the function follows in the next lines, until the
matching |:endfunction|.
The name must be made of alphanumeric characters and
'_', and must start with a capital or "s:" (see
above). Note that using "b:" or "g:" is not allowed.
@@ -11063,7 +11064,7 @@ code can be used: >
redir => scriptnames_output
silent scriptnames
redir END
" Split the output into lines and parse each line. Add an entry to the
" "scripts" dictionary.
let scripts = {}
+1 -1
View File
@@ -162,7 +162,7 @@ window Vim is running in with these commands: >
*gui-IME* *iBus*
Input methods for international characters in X that rely on the XIM
framework, most notably iBus, have been known to produce undesirable results
in gVim. These may include an inability to enter spaces, or long delays
in gvim. These may include an inability to enter spaces, or long delays
between typing a character and it being recognized by the application.
One workaround that has been successful, for unknown reasons, is to prevent
+1 -1
View File
@@ -640,7 +640,7 @@ starts. It can be fixed in one of these ways:
write the file twice and set the clock back.
If you get W11 all the time, you may need to disable "Acronis Active
Protection" or register vim as a trusted service/application.
Protection" or register Vim as a trusted service/application.
*W12* >
Warning: File "{filename}" has changed and the buffer was changed in Vim as well
+2 -2
View File
@@ -4206,7 +4206,7 @@ A jump table for the options with a short description can be found at |Q_op|.
set.
|hl-Question| r |hit-enter| prompt and yes/no questions
|hl-StatusLine| s status line of current window |status-line|
|hl-StatusLineNC| S status lines of not-current windows
|hl-StatusLineNC| S status lines of not-current windows
|hl-Title| t Titles for output from ":set all", ":autocmd" etc.
|hl-VertSplit| c column used to separate vertically split windows
|hl-Visual| v Visual mode
@@ -5649,7 +5649,7 @@ A jump table for the options with a short description can be found at |Q_op|.
Specifies the name of the MzScheme shared library. The default is
DYNAMIC_MZSCH_DLL which was specified at compile time.
Environment variables are expanded |:set_env|.
The value must be set in the |vimrc| script or ealier. In the
The value must be set in the |vimrc| script or earlier. In the
startup, before the |load-plugins| step.
This option cannot be set from a |modeline| or in the |sandbox|, for
security reasons.
+261 -96
View File
@@ -1,4 +1,4 @@
*pi_netrw.txt* For Vim version 8.0. Last change: 2016 Apr 20
*pi_netrw.txt* For Vim version 8.0. Last change: 2017 Nov 03
------------------------------------------------
NETRW REFERENCE MANUAL by Charles E. Campbell
@@ -6,7 +6,7 @@
Author: Charles E. Campbell <NdrOchip@ScampbellPfamily.AbizM>
(remove NOSPAM from Campbell's email first)
Copyright: Copyright (C) 2016 Charles E Campbell *netrw-copyright*
Copyright: Copyright (C) 2017 Charles E Campbell *netrw-copyright*
The VIM LICENSE applies to the files in this package, including
netrw.vim, pi_netrw.txt, netrwFileHandlers.vim, netrwSettings.vim, and
syntax/netrw.vim. Like anything else that's free, netrw.vim and its
@@ -17,7 +17,6 @@ Copyright: Copyright (C) 2016 Charles E Campbell *netrw-copyright*
holder be liable for any damages resulting from the use of this
software. Use at your own risk!
*netrw*
*dav* *ftp* *netrw-file* *rcp* *scp*
*davs* *http* *netrw.vim* *rsync* *sftp*
@@ -73,7 +72,7 @@ Copyright: Copyright (C) 2016 Charles E Campbell *netrw-copyright*
Improving Browsing..................................|netrw-ssh-hack|
Listing Bookmarks And History.......................|netrw-qb|
Making A New Directory..............................|netrw-d|
Making The Browsing Directory The Current Directory.|netrw-c|
Making The Browsing Directory The Current Directory.|netrw-cd|
Marking Files.......................................|netrw-mf|
Unmarking Files.....................................|netrw-mF|
Marking Files By Location List......................|netrw-qL|
@@ -83,6 +82,7 @@ Copyright: Copyright (C) 2016 Charles E Campbell *netrw-copyright*
Marked Files: Arbitrary Shell Command, En Bloc......|netrw-mX|
Marked Files: Arbitrary Vim Command.................|netrw-mv|
Marked Files: Argument List.........................|netrw-ma| |netrw-mA|
Marked Files: Buffer List...........................|netrw-cb| |netrw-cB|
Marked Files: Compression And Decompression.........|netrw-mz|
Marked Files: Copying...............................|netrw-mc|
Marked Files: Diff..................................|netrw-md|
@@ -155,7 +155,7 @@ Windows' ftp doesn't support .netrc; however, one may have in one's .vimrc: >
let g:netrw_ftp_cmd= 'c:\Windows\System32\ftp -s:C:\Users\MyUserName\MACHINE'
<
Netrw will substitute the host's machine name for "MACHINE" from the url it is
Netrw will substitute the host's machine name for "MACHINE" from the URL it is
attempting to open, and so one may specify >
userid
password
@@ -212,7 +212,7 @@ EXTERNAL APPLICATIONS AND PROTOCOLS *netrw-externapp* {{{2
http: g:netrw_http_cmd = "fetch" elseif fetch is available
http: *g:netrw_http_put_cmd* = "curl -T"
rcp: *g:netrw_rcp_cmd* = "rcp"
rsync: *g:netrw_rsync_cmd* = "rsync -a"
rsync: *g:netrw_rsync_cmd* = "rsync" (see |g:netrw_rsync_sep|)
scp: *g:netrw_scp_cmd* = "scp -q"
sftp: *g:netrw_sftp_cmd* = "sftp"
file: *g:netrw_file_cmd* = "elinks" or "links"
@@ -223,7 +223,7 @@ EXTERNAL APPLICATIONS AND PROTOCOLS *netrw-externapp* {{{2
elinks : "-source >"
links : "-dump >"
curl : "-o"
curl : "-L -o"
wget : "-q -O"
fetch : "-o"
<
@@ -238,7 +238,7 @@ EXTERNAL APPLICATIONS AND PROTOCOLS *netrw-externapp* {{{2
READING *netrw-read* *netrw-nread* {{{2
Generally, one may just use the url notation with a normal editing
Generally, one may just use the URL notation with a normal editing
command, such as >
:e ftp://[user@]machine/path
@@ -260,7 +260,7 @@ READING *netrw-read* *netrw-nread* {{{2
WRITING *netrw-write* *netrw-nwrite* {{{2
One may just use the url notation with a normal file writing
One may just use the URL notation with a normal file writing
command, such as >
:w ftp://[user@]machine/path
@@ -281,7 +281,7 @@ WRITING *netrw-write* *netrw-nwrite* {{{2
SOURCING *netrw-source* {{{2
One may just use the url notation with the normal file sourcing
One may just use the URL notation with the normal file sourcing
command, such as >
:so ftp://[user@]machine/path
@@ -479,7 +479,7 @@ file using root-relative paths, use the full path:
==============================================================================
4. Network-Oriented File Transfer *netrw-xfer* {{{1
Network-oriented file transfer under Vim is implemented by a VimL-based script
Network-oriented file transfer under Vim is implemented by a vim script
(<netrw.vim>) using plugin techniques. It currently supports both reading and
writing across networks using rcp, scp, ftp or ftp+<.netrc>, scp, fetch,
dav/cadaver, rsync, or sftp.
@@ -532,7 +532,7 @@ variable (ex. scp uses the variable g:netrw_scp_cmd, which is defaulted to
let g:netrw_sftp_cmd= '"c:\Program Files\PuTTY\psftp.exe"'
<
(note: it has been reported that windows 7 with putty v0.6's "-batch" option
doesn't work, so it's best to leave it off for that system)
doesn't work, so its best to leave it off for that system)
See |netrw-p8| for more about putty, pscp, psftp, etc.
@@ -734,11 +734,11 @@ such as netrw.
The usual read/write commands are supported. There are also a few
additional commands available. Often you won't need to use Nwrite or
Nread as shown in |netrw-transparent| (ie. simply use >
:e url
:r url
:w url
:e URL
:r URL
:w URL
instead, as appropriate) -- see |netrw-urls|. In the explanations
below, a {netfile} is an url to a remote file.
below, a {netfile} is a URL to a remote file.
*:Nwrite* *:Nw*
:[range]Nw[rite] Write the specified lines to the current
@@ -868,9 +868,11 @@ variables listed below, and may be modified by the user.
g:netrw_http_cmd var ="fetch -o" if fetch is available
g:netrw_http_cmd var ="wget -O" else if wget is available
g:netrw_http_put_cmd var ="curl -T"
|g:netrw_list_cmd| var ="ssh USEPORT HOSTNAME ls -Fa"
|g:netrw_list_cmd| var ="ssh USEPORT HOSTNAME ls -Fa"
g:netrw_rcp_cmd var ="rcp"
g:netrw_rsync_cmd var ="rsync -a"
g:netrw_rsync_cmd var ="rsync"
*g:netrw_rsync_sep* var ="/" used to separate the hostname
from the file spec
g:netrw_scp_cmd var ="scp -q"
g:netrw_sftp_cmd var ="sftp" >
-------------------------------------------------------------------------
@@ -1007,7 +1009,7 @@ where [protocol] is typically scp or ftp. As an example, try: >
vim ftp://ftp.home.vim.org/pub/vim/
<
For local directories, the trailing slash is not required. Again, because it's
easy to miss: to browse remote directories, the url must terminate with a
easy to miss: to browse remote directories, the URL must terminate with a
slash!
If you'd like to avoid entering the password repeatedly for remote directory
@@ -1077,9 +1079,9 @@ QUICK REFERENCE: MAPS *netrw-browse-maps* {{{2
<c-r> Browse using a gvim server |netrw-ctrl-r|
<c-tab> Shrink/expand a netrw/explore window |netrw-c-tab|
- Makes Netrw go up one directory |netrw--|
a Toggles between normal display, |netrw-a|
a Cycles between normal display, |netrw-a|
hiding (suppress display of files matching g:netrw_list_hide)
showing (display only files which match g:netrw_list_hide)
and showing (display only files which match g:netrw_list_hide)
c Make browsing directory the current directory |netrw-c|
C Setting the editing window |netrw-C|
d Make a directory |netrw-d|
@@ -1090,6 +1092,7 @@ QUICK REFERENCE: MAPS *netrw-browse-maps* {{{2
gh Quick hide/unhide of dot-files |netrw-gh|
gn Make top of tree the directory below the cursor |netrw-gn|
i Cycle between thin, long, wide, and tree listings |netrw-i|
I Toggle the displaying of the banner |netrw-I|
mb Bookmark current directory |netrw-mb|
mc Copy marked files to marked-file target directory |netrw-mc|
md Apply diff to marked files (up to 3) |netrw-md|
@@ -1169,25 +1172,26 @@ QUICK REFERENCE: COMMANDS *netrw-explore-cmds* *netrw-browse-cmds* {{{2
BANNER DISPLAY *netrw-I*
One may toggle the banner display on and off by pressing "I".
One may toggle the displaying of the banner by pressing "I".
Also See: |g:netrw_banner|
BOOKMARKING A DIRECTORY *netrw-mb* *netrw-bookmark* *netrw-bookmarks* {{{2
BOOKMARKING A DIRECTORY *netrw-mb* *netrw-bookmark* *netrw-bookmarks* {{{2
One may easily "bookmark" the currently browsed directory by using >
mb
<
*.netrwbook*
Bookmarks are retained in between sessions in a $HOME/.netrwbook file, and are
kept in sorted order.
Bookmarks are retained in between sessions of vim in a file called .netrwbook
as a |List|, which is typically stored in the first directory on the user's
'|runtimepath|'; entries are kept in sorted order.
If there are marked files and/or directories, mb will add them to the bookmark
list.
*netrw-:NetrwMB*
*netrw-:NetrwMB*
Addtionally, one may use :NetrwMB to bookmark files or directories. >
:NetrwMB[!] [files/directories]
@@ -1206,7 +1210,7 @@ The :NetrwMB command is available outside of netrw buffers (once netrw has been
invoked in the session).
The file ".netrwbook" holds bookmarks when netrw (and vim) is not active. By
default, it's stored on the first directory on the user's |'runtimepath'|.
default, its stored on the first directory on the user's |'runtimepath'|.
Related Topics:
|netrw-gb| how to return (go) to a bookmark
@@ -1418,20 +1422,20 @@ Related Topics:
CHANGING TO A PREDECESSOR DIRECTORY *netrw-u* *netrw-updir* {{{2
Every time you change to a new directory (new for the current session),
netrw will save the directory in a recently-visited directory history
list (unless |g:netrw_dirhistmax| is zero; by default, it's ten). With the
"u" map, one can change to an earlier directory (predecessor). To do
the opposite, see |netrw-U|.
Every time you change to a new directory (new for the current session), netrw
will save the directory in a recently-visited directory history list (unless
|g:netrw_dirhistmax| is zero; by default, it holds ten entries). With the "u"
map, one can change to an earlier directory (predecessor). To do the
opposite, see |netrw-U|.
The "u" map also accepts counts to go back in the history several slots.
For your convenience, qb (see |netrw-qb|) lists the history number which may
be used in that count.
The "u" map also accepts counts to go back in the history several slots. For
your convenience, qb (see |netrw-qb|) lists the history number which may be
used in that count.
*.netrwhist*
See |g:netrw_dirhistmax| for how to control the quantity of history stack
slots. The file ".netrwhist" holds history when netrw (and vim) is not
active. By default, it's stored on the first directory on the user's
active. By default, its stored on the first directory on the user's
|'runtimepath'|.
Related Topics:
@@ -1467,10 +1471,10 @@ changing the top of the tree listing.
NETRW CLEAN *netrw-clean* *:NetrwClean* {{{2
With NetrwClean one may easily remove netrw from one's home directory;
With :NetrwClean one may easily remove netrw from one's home directory;
more precisely, from the first directory on your |'runtimepath'|.
With NetrwClean!, netrw will attempt to remove netrw from all directories on
With :NetrwClean!, netrw will attempt to remove netrw from all directories on
your |'runtimepath'|. Of course, you have to have write/delete permissions
correct to do this.
@@ -1502,7 +1506,7 @@ Netrw determines which special handler by the following method:
If g:netrw_browsex_viewer == '-', then netrwFileHandlers#Invoke() will be
used instead (see |netrw_filehandler|).
* for Windows 32 or 64, the url and FileProtocolHandler dlls are used.
* for Windows 32 or 64, the URL and FileProtocolHandler dlls are used.
* for Gnome (with gnome-open): gnome-open is used.
* for KDE (with kfmclient) : kfmclient is used
* for Mac OS X : open is used.
@@ -1518,9 +1522,10 @@ will apply a special handler to it (like "x" works when in a netrw buffer).
One may also use visual mode (see |visual-start|) to select the text that the
special handler will use. Normally gx uses expand("<cfile>") to pick up the
text under the cursor; one may change what |expand()| uses via the
|g:netrw_gx| variable. Alternatively, one may select the text to be used by
gx via first making a visual selection (see |visual-block|) or by changing
the |'isfname'| option (which is global, so netrw doesn't modify it).
|g:netrw_gx| variable (options include "<cword>", "<cWORD>"). Note that
expand("<cfile>") depends on the |'isfname'| setting. Alternatively, one may
select the text to be used by gx by making a visual selection (see
|visual-block|) and then pressing gx.
Associated setting variables:
|g:netrw_gx| control how gx picks up the text under the cursor
@@ -1612,6 +1617,11 @@ A further approach is to delete files which match a pattern.
This will cause the matching files to be marked. Then,
press "D".
If your vim has 7.4 with patch#1107, then |g:netrw_localrmdir| no longer
is used to remove directories; instead, vim's |delete()| is used with
the "d" option. Please note that only empty directories may be deleted
with the "D" mapping. Regular files are deleted with |delete()|, too.
The |g:netrw_rm_cmd|, |g:netrw_rmf_cmd|, and |g:netrw_rmdir_cmd| variables are
used to control the attempts to remove remote files and directories. The
g:netrw_rm_cmd is used with files, and its default value is:
@@ -1675,17 +1685,18 @@ DIRECTORY EXPLORATION COMMANDS {{{2
The [N] specifies a |g:netrw_winsize| just for the new :Lexplore
window.
Those who like this method often also often like tree style displays;
Those who like this method often also like tree style displays;
see |g:netrw_liststyle|.
:[N]Lexplore! [dir] is similar to :Lexplore, except that the full-height
Explorer window will open on the right hand side and an
uninitialized |g:netrw_chgwin| will be set to 1 (eg. edits will
preferentially occur in the leftmost window).
Also see: |netrw-C| |g:netrw_browse_split| |g:netrw_wiw|
|netrw-p| |netrw-P| |g:netrw_chgwin|
|netrw-c-tab| |g:netrw_winsize|
:[N]Lexplore! is like :Lexplore, except that the full-height Explorer window
will open on the right hand side and an uninitialized |g:netrw_chgwin|
will be set to 1.
*netrw-:Sexplore*
:[N]Sexplore will always split the window before invoking the local-directory
browser. As with Explore, the splitting is normally done
@@ -1847,9 +1858,11 @@ EXECUTING FILE UNDER CURSOR VIA SYSTEM() *netrw-X* {{{2
Pressing X while the cursor is atop an executable file will yield a prompt
using the filename asking for any arguments. Upon pressing a [return], netrw
will then call |system()| with that command and arguments. The result will
be displayed by |:echomsg|, and so |:messages| will repeat display of the
result. Ansi escape sequences will be stripped out.
will then call |system()| with that command and arguments. The result will be
displayed by |:echomsg|, and so |:messages| will repeat display of the result.
Ansi escape sequences will be stripped out.
See |cmdline-window| for directions for more on how to edit the arguments.
FORCING TREATMENT AS A FILE OR DIRECTORY *netrw-gd* *netrw-gf* {{{2
@@ -2072,7 +2085,7 @@ Associated setting variables: |g:netrw_localmkdir| |g:netrw_mkdir_cmd|
|g:netrw_remote_mkdir| |netrw-%|
MAKING THE BROWSING DIRECTORY THE CURRENT DIRECTORY *netrw-c* {{{2
MAKING THE BROWSING DIRECTORY THE CURRENT DIRECTORY *netrw-cd* {{{2
By default, |g:netrw_keepdir| is 1. This setting means that the current
directory will not track the browsing directory. (done for backwards
@@ -2087,6 +2100,9 @@ the two directories the same, use the "c" map (just type c). That map will
set Vim's notion of the current directory to netrw's current browsing
directory.
*netrw-c* : This map's name has been changed from "c" to cd (see |netrw-cd|).
This change was done to allow for |netrw-cb| and |netrw-cB| maps.
Associated setting variable: |g:netrw_keepdir|
MARKING FILES *netrw-:MF* *netrw-mf* {{{2
@@ -2131,6 +2147,7 @@ The following netrw maps make use of marked files:
|netrw-mg| Apply vimgrep to marked files
|netrw-mm| Move marked files to target
|netrw-mp| Print marked files
|netrw-ms| Netrw will source marked files
|netrw-mt| Set target for |netrw-mm| and |netrw-mc|
|netrw-mT| Generate tags using marked files
|netrw-mv| Apply vim command to marked files
@@ -2205,6 +2222,9 @@ converts "*" into ".*" (see |regexp|) and marks files based on that. In the
future I may make it possible to use |regexp|s instead of glob()-style
expressions (yet-another-option).
See |cmdline-window| for directions on more on how to edit the regular
expression.
MARKED FILES, ARBITRARY VIM COMMAND *netrw-mv* {{{2
(See |netrw-mf| and |netrw-mr| for how to mark files)
@@ -2218,8 +2238,9 @@ the local marked file list, individually:
* run vim command
* sil! keepalt wq!
A prompt, "Enter vim command: ", will be issued to elicit the vim command
you wish used.
A prompt, "Enter vim command: ", will be issued to elicit the vim command you
wish used. See |cmdline-window| for directions for more on how to edit the
command.
MARKED FILES, ARBITRARY SHELL COMMAND *netrw-mx* {{{2
@@ -2270,7 +2291,17 @@ MARKED FILES: ARGUMENT LIST *netrw-ma* *netrw-mA*
Using ma, one moves filenames from the marked file list to the argument list.
Using mA, one moves filenames from the argument list to the marked file list.
See Also: |netrw-qF| |argument-list| |:args|
See Also: |netrw-cb| |netrw-cB| |netrw-qF| |argument-list| |:args|
MARKED FILES: BUFFER LIST *netrw-cb* *netrw-cB*
(See |netrw-mf| and |netrw-mr| for how to mark files)
(uses the global marked-file list)
Using cb, one moves filenames from the marked file list to the buffer list.
Using cB, one copies filenames from the buffer list to the marked file list.
See Also: |netrw-ma| |netrw-mA| |netrw-qF| |buffer-list| |:buffers|
MARKED FILES: COMPRESSION AND DECOMPRESSION *netrw-mz* {{{2
@@ -2306,8 +2337,8 @@ One may also copy directories and their contents (local only) to a target
directory.
Associated setting variables:
|g:netrw_localcopycmd|
|g:netrw_localcopydircmd|
|g:netrw_localcopycmd| |g:netrw_localcopycmdopt|
|g:netrw_localcopydircmd| |g:netrw_localcopydircmdopt|
|g:netrw_ssh_cmd|
MARKED FILES: DIFF *netrw-md* {{{2
@@ -2452,8 +2483,8 @@ When a remote set of files are tagged, the resulting tags file is "obtained";
ie. a copy is transferred to the local system's directory. The now local tags
file is then modified so that one may use it through the network. The
modification made concerns the names of the files in the tags; each filename is
preceded by the netrw-compatible url used to obtain it. When one subsequently
uses one of the go to tag actions (|tags|), the url will be used by netrw to
preceded by the netrw-compatible URL used to obtain it. When one subsequently
uses one of the go to tag actions (|tags|), the URL will be used by netrw to
edit the desired file and go to the tag.
Associated setting variables: |g:netrw_ctags| |g:netrw_ssh_cmd|
@@ -2555,8 +2586,8 @@ your browsing preferences. (see also: |netrw-settings|)
editing. It will also use the specified tab
and window numbers to perform editing
(see |clientserver|, |netrw-ctrl-r|)
This option does not affect |:Lexplore|
windows.
This option does not affect the production of
|:Lexplore| windows.
Related topics:
|g:netrw_alto| |g:netrw_altv|
@@ -2715,6 +2746,7 @@ your browsing preferences. (see also: |netrw-settings|)
*g:netrw_home* The home directory for where bookmarks and
history are saved (as .netrwbook and
.netrwhist).
Netrw uses |expand()|on the string.
default: the first directory on the
|'runtimepath'|
@@ -2735,7 +2767,7 @@ your browsing preferences. (see also: |netrw-settings|)
default: (if ssh is executable)
"ssh HOSTNAME ls -FLa"
*g:netrw_list_cmd_options* If this variable exists, then its contents are
*g:netrw_list_cmd_options* If this variable exists, then its contents are
appended to the g:netrw_list_cmd. For
example, use "2>/dev/null" to get rid of banner
messages on unix systems.
@@ -2761,26 +2793,52 @@ your browsing preferences. (see also: |netrw-settings|)
let g:netrw_list_hide= netrw_gitignore#Hide().'.*\.swp$'
default: ""
*g:netrw_localcopycmd* ="cp" Linux/Unix/MacOS/Cygwin
="copy" Windows
*g:netrw_localcopycmd* ="cp" Linux/Unix/MacOS/Cygwin
=expand("$COMSPEC") Windows
Copies marked files (|netrw-mf|) to target
directory (|netrw-mt|, |netrw-mc|)
*g:netrw_localcopydircmd* ="cp -R" Linux/Unix/MacOS/Cygwin
="xcopy /e /c /h/ /i /k" Windows
*g:netrw_localcopycmdopt* ='' Linux/Unix/MacOS/Cygwin
=' \c copy' Windows
Options for the |g:netrw_localcopycmd|
*g:netrw_localcopydircmd* ="cp" Linux/Unix/MacOS/Cygwin
=expand("$COMSPEC") Windows
Copies directories to target directory.
(|netrw-mc|, |netrw-mt|)
*g:netrw_localmkdir* command for making a local directory
default: "mkdir"
*g:netrw_localcopydircmdopt* =" -R" Linux/Unix/MacOS/Cygwin
=" /c xcopy /e /c /h/ /i /k" Windows
Options for |g:netrw_localcopydircmd|
*g:netrw_localmovecmd* ="mv" Linux/Unix/MacOS/Cygwin
="move" Windows
*g:netrw_localmkdir* ="mkdir" Linux/Unix/MacOS/Cygwin
=expand("$COMSPEC") Windows
command for making a local directory
*g:netrw_localmkdiropt* ="" Linux/Unix/MacOS/Cygwin
=" /c mkdir" Windows
Options for |g:netrw_localmkdir|
*g:netrw_localmovecmd* ="mv" Linux/Unix/MacOS/Cygwin
=expand("$COMSPEC") Windows
Moves marked files (|netrw-mf|) to target
directory (|netrw-mt|, |netrw-mm|)
*g:netrw_localrmdir* remove directory command (rmdir)
default: "rmdir"
*g:netrw_localmovecmdopt* ="" Linux/Unix/MacOS/Cygwin
=" /c move" Windows
Options for |g:netrw_localmovecmd|
*g:netrw_localrmdir* ="rmdir" Linux/Unix/MacOS/Cygwin
=expand("$COMSPEC") Windows
Remove directory command (rmdir)
This variable is only used if your vim is
earlier than 7.4 or if your vim doesn't
have patch#1107. Otherwise, |delete()|
is used with the "d" option.
*g:netrw_localrmdiropt* ="" Linux/Unix/MacOS/Cygwin
=" /c rmdir" Windows
Options for |g:netrw_localrmdir|
*g:netrw_maxfilenamelen* =32 by default, selected so as to make long
listings fit on 80 column displays.
@@ -2893,17 +2951,23 @@ your browsing preferences. (see also: |netrw-settings|)
netrwTilde : *
netrwTmp : tmp* *tmp
These syntax highlighting groups are linked
to Folded or DiffChange by default
(see |hl-Folded| and |hl-DiffChange|), but
one may put lines like >
In addition, those groups mentioned in
|'suffixes'| are also added to the special
file highlighting group.
These syntax highlighting groups are linked
to netrwGray or Folded by default
(see |hl-Folded|), but one may put lines like >
hi link netrwCompress Visual
< into one's <.vimrc> to use one's own
preferences. Alternatively, one may
put such specifications into
.vim/after/syntax/netrw.vim.
As an example, I myself use a dark-background
put such specifications into >
.vim/after/syntax/netrw.vim.
< The netrwGray highlighting is set up by
netrw when >
* netrwGray has not been previously
defined
* the gui is running
< As an example, I myself use a dark-background
colorscheme with the following in
.vim/after/syntax/netrw.vim: >
@@ -3138,8 +3202,8 @@ If there are no marked files: (see |netrw-mf|)
Renaming files and directories involves moving the cursor to the
file/directory to be moved (renamed) and pressing "R". You will then be
queried for what you want the file/directory to be renamed to You may select
a range of lines with the "V" command (visual selection), and then
queried for what you want the file/directory to be renamed to. You may
select a range of lines with the "V" command (visual selection), and then
press "R"; you will be queried for each file as to what you want it
renamed to.
@@ -3171,16 +3235,20 @@ If there are marked files: (see |netrw-mf|)
Note that moving files is a dangerous operation; copies are safer. That's
because a "move" for remote files is actually a copy + delete -- and if
the copy fails and the delete does not, you may lose the file.
the copy fails and the delete succeeds you may lose the file.
Use at your own risk.
The g:netrw_rename_cmd variable is used to implement remote renaming. By
default its value is:
The *g:netrw_rename_cmd* variable is used to implement remote renaming. By
default its value is: >
ssh HOSTNAME mv
<
One may rename a block of files and directories by selecting them with
V (|linewise-visual|) when using thin style
V (|linewise-visual|) when using thin style.
See |cmdline-editing| for more on how to edit the command line; in particular,
you'll find <ctrl-f> (initiates cmdline window editing) and <ctrl-c> (uses the
command line under the cursor) useful in conjunction with the R command.
SELECTING SORTING STYLE *netrw-s* *netrw-sort* {{{2
@@ -3201,8 +3269,8 @@ number. Subsequent selection of a file to edit (|netrw-cr|) will use that
window.
* C : by itself, will select the current window holding a netrw buffer
for editing via |netrw-cr|. The C mapping is only available while in
netrw buffers.
for subsequent editing via |netrw-cr|. The C mapping is only available
while in netrw buffers.
* [count]C : the count will be used as the window number to be used
for subsequent editing via |netrw-cr|.
@@ -3215,7 +3283,7 @@ window.
Using >
let g:netrw_chgwin= -1
will restore the default editing behavior
(ie. editing will use the current window).
(ie. subsequent editing will use the current window).
Related topics: |netrw-cr| |g:netrw_browse_split|
Associated setting variables: |g:netrw_chgwin|
@@ -3236,9 +3304,9 @@ only if your terminal supports differentiating <c-tab> from a plain
* Else bring up a |:Lexplore| window
If |g:netrw_usetab| exists or is zero, or if there is a pre-existing mapping
If |g:netrw_usetab| exists and is zero, or if there is a pre-existing mapping
for <c-tab>, then the <c-tab> will not be mapped. One may map something other
than a <c-tab>, too: (but you'll still need to have had g:netrw_usetab set) >
than a <c-tab>, too: (but you'll still need to have had |g:netrw_usetab| set). >
nmap <unique> (whatever) <Plug>NetrwShrink
<
@@ -3271,9 +3339,10 @@ The user function is passed one argument; it resembles >
fun! ExampleUserMapFunc(islocal)
<
where a:islocal is 1 if it's a local-directory system call or 0 when
where a:islocal is 1 if its a local-directory system call or 0 when
remote-directory system call.
*netrw-call* *netrw-expose* *netrw-modify*
Use netrw#Expose("varname") to access netrw-internal (script-local)
variables.
Use netrw#Modify("varname",newvalue) to change netrw-internal variables.
@@ -3595,7 +3664,7 @@ Example: Clear netrw's marked file list via a mapping on gu >
*netrw-p16*
P16. When editing remote files (ex. :e ftp://hostname/path/file),
under Windows I get an |E303| message complaining that it's unable
under Windows I get an |E303| message complaining that its unable
to open a swap file.
(romainl) It looks like you are starting Vim from a protected
@@ -3649,7 +3718,7 @@ Example: Clear netrw's marked file list via a mapping on gu >
P21. I've made a directory (or file) with an accented character, but
netrw isn't letting me enter that directory/read that file:
It's likely that the shell or o/s is using a different encoding
Its likely that the shell or o/s is using a different encoding
than you have vim (netrw) using. A patch to vim supporting
"systemencoding" may address this issue in the future; for
now, just have netrw use the proper encoding. For example: >
@@ -3765,6 +3834,102 @@ netrw:
==============================================================================
12. History *netrw-history* {{{1
v162: Sep 19, 2016 * (haya14busa) pointed out two syntax errors
with a patch; these are now fixed.
Oct 26, 2016 * I started using mate-terminal and found that
x and gx (|netrw-x| and |netrw-gx|) were no
longer working. Fixed (using atril when
$DESKTOP_SESSION is "mate").
Nov 04, 2016 * (Martin Vuille) pointed out that @+ was
being restored with keepregstar rather than
keepregplus.
Nov 09, 2016 * Broke apart the command from the options,
mostly for Windows. Introduced new netrw
settings: |g:netrw_localcopycmdopt|
|g:netrw_localcopydircmdopt| |g:netrw_localmkdiropt|
|g:netrw_localmovecmdopt| |g:netrw_localrmdiropt|
Nov 21, 2016 * (mattn) provided a patch for preview; swapped
winwidth() with winheight()
Nov 22, 2016 * (glacambre) reported that files containing
spaces weren't being obtained properly via
scp. Fix: apparently using single quotes
such as with 'file name' wasn't enough; the
spaces inside the quotes also had to be
escaped (ie. 'file\ name').
* Also fixed obtain (|netrw-O|) to be able to
obtain files with spaces in their names
Dec 20, 2016 * (xc1427) Reported that using "I" (|netrw-I|)
when atop "Hiding" in the banner also caused
the active-banner hiding control to occur
Jan 03, 2017 * (Enno Nagel) reported that attempting to
apply netrw to a directory that was without
read permission caused a syntax error.
Jan 13, 2017 * (Ingo Karkat) provided a patch which makes
using netrw#Call() better. Now returns
value of internal routines return, for example.
Jan 13, 2017 * (Ingo Karkat) changed netrw#FileUrlRead to
use |:edit| instead of |:read|. I also
changed the routine name to netrw#FileUrlEdit.
Jan 16, 2017 * (Sayem) reported a problem where :Lexplore
could generate a new listing buffer and
window instead of toggling the netrw display.
Unfortunately, the directions for eliciting
the problem weren't complete, so I may or
may not have fixed that issue.
Feb 06, 2017 * Implemented cb and cB. Changed "c" to "cd".
(see |netrw-cb|, |netrw-cB|, and |netrw-cd|)
Mar 21, 2017 * previously, netrw would specify (safe) settings
even when the setting was already safe for
netrw. Netrw now attempts to leave such
already-netrw-safe settings alone.
(affects s:NetrwOptionRestore() and
s:NetrwSafeOptions(); also introduced
s:NetrwRestoreSetting())
Jun 26, 2017 * (Christian Brabandt) provided a patch to
allow curl to follow redirects (ie. -L
option)
Jun 26, 2017 * (Callum Howard) reported a problem with
:Lexpore not removing the Lexplore window
after a change-directory
Aug 30, 2017 * (Ingo Karkat) one cannot switch to the
previously edited file (e.g. with CTRL-^)
after editing a file:// URL. Patch to
have a "keepalt" included.
Oct 17, 2017 * (Adam Faryna) reported that gn (|netrw-gn|)
did not work on directories in the current
tree
v157: Apr 20, 2016 * (Nicola) had set up a "nmap <expr> ..." with
a function that returned a 0 while silently
invoking a shell command. The shell command
activated a ShellCmdPost event which in turn
called s:LocalBrowseRefresh(). That looks
over all netrw buffers for changes needing
refreshes. However, inside a |:map-<expr>|,
tab and window changes are disallowed. Fixed.
(affects netrw's s:LocalBrowseRefresh())
* |g:netrw_localrmdir| not used any more, but
the relevant patch that causes |delete()| to
take over was #1107 (not #1109).
* |expand()| is now used on |g:netrw_home|;
consequently, g:netrw_home may now use
environment variables
* s:NetrwLeftmouse and s:NetrwCLeftmouse will
return without doing anything if invoked
when inside a non-netrw window
Jun 15, 2016 * gx now calls netrw#GX() which returns
the word under the cursor. The new
wrinkle: if one is in a netrw buffer,
then netrw's s:NetrwGetWord().
Jun 22, 2016 * Netrw was executing all its associated
Filetype commands silently; I'm going
to try doing that "noisily" and see if
folks have a problem with that.
Aug 12, 2016 * Changed order of tool selection for
handling http://... viewing.
(Nikolay Aleksandrovich Pavlov)
Aug 21, 2016 * Included hiding/showing/all for tree
listings
* Fixed refresh (^L) for tree listings
v156: Feb 18, 2016 * Changed =~ to =~# where appropriate
Feb 23, 2016 * s:ComposePath(base,subdir) now uses
fnameescape() on the base portion
@@ -3796,9 +3961,9 @@ netrw:
tell me how they're useful and should be
retained?
Nov 20, 2015 * Added |netrw-ma| and |netrw-mA| support
Nov 20, 2015 * gx (|netrw-gx|) on an url downloaded the
Nov 20, 2015 * gx (|netrw-gx|) on a URL downloaded the
file in addition to simply bringing up the
url in a browser. Fixed.
URL in a browser. Fixed.
Nov 23, 2015 * Added |g:netrw_sizestyle| support
Nov 27, 2015 * Inserted a lot of <c-u>s into various netrw
maps.
+1 -1
View File
@@ -874,7 +874,7 @@ accordingly. Vim proceeds in this order:
(*) Using this file or environment variable will cause 'compatible' to be
off by default. See |compatible-default|.
Note: When using the |mzscheme| interface, it is initialzed after loading
Note: When using the |mzscheme| interface, it is initialized after loading
the vimrc file. Changing 'mzschemedll' later has no effect.
4. Load the plugin scripts. *load-plugins*
+13
View File
@@ -6455,10 +6455,15 @@ g:netrw_list_cmd_options pi_netrw.txt /*g:netrw_list_cmd_options*
g:netrw_list_hide pi_netrw.txt /*g:netrw_list_hide*
g:netrw_liststyle pi_netrw.txt /*g:netrw_liststyle*
g:netrw_localcopycmd pi_netrw.txt /*g:netrw_localcopycmd*
g:netrw_localcopycmdopt pi_netrw.txt /*g:netrw_localcopycmdopt*
g:netrw_localcopydircmd pi_netrw.txt /*g:netrw_localcopydircmd*
g:netrw_localcopydircmdopt pi_netrw.txt /*g:netrw_localcopydircmdopt*
g:netrw_localmkdir pi_netrw.txt /*g:netrw_localmkdir*
g:netrw_localmkdiropt pi_netrw.txt /*g:netrw_localmkdiropt*
g:netrw_localmovecmd pi_netrw.txt /*g:netrw_localmovecmd*
g:netrw_localmovecmdopt pi_netrw.txt /*g:netrw_localmovecmdopt*
g:netrw_localrmdir pi_netrw.txt /*g:netrw_localrmdir*
g:netrw_localrmdiropt pi_netrw.txt /*g:netrw_localrmdiropt*
g:netrw_maxfilenamelen pi_netrw.txt /*g:netrw_maxfilenamelen*
g:netrw_menu pi_netrw.txt /*g:netrw_menu*
g:netrw_mkdir_cmd pi_netrw.txt /*g:netrw_mkdir_cmd*
@@ -6468,11 +6473,13 @@ g:netrw_nogx pi_netrw.txt /*g:netrw_nogx*
g:netrw_preview pi_netrw.txt /*g:netrw_preview*
g:netrw_rcp_cmd pi_netrw.txt /*g:netrw_rcp_cmd*
g:netrw_remote_mkdir pi_netrw.txt /*g:netrw_remote_mkdir*
g:netrw_rename_cmd pi_netrw.txt /*g:netrw_rename_cmd*
g:netrw_retmap pi_netrw.txt /*g:netrw_retmap*
g:netrw_rm_cmd pi_netrw.txt /*g:netrw_rm_cmd*
g:netrw_rmdir_cmd pi_netrw.txt /*g:netrw_rmdir_cmd*
g:netrw_rmf_cmd pi_netrw.txt /*g:netrw_rmf_cmd*
g:netrw_rsync_cmd pi_netrw.txt /*g:netrw_rsync_cmd*
g:netrw_rsync_sep pi_netrw.txt /*g:netrw_rsync_sep*
g:netrw_scp_cmd pi_netrw.txt /*g:netrw_scp_cmd*
g:netrw_scpport pi_netrw.txt /*g:netrw_scpport*
g:netrw_sepchr pi_netrw.txt /*g:netrw_sepchr*
@@ -7584,7 +7591,11 @@ netrw-browser-var pi_netrw.txt /*netrw-browser-var*
netrw-browsing pi_netrw.txt /*netrw-browsing*
netrw-c pi_netrw.txt /*netrw-c*
netrw-c-tab pi_netrw.txt /*netrw-c-tab*
netrw-cB pi_netrw.txt /*netrw-cB*
netrw-cadaver pi_netrw.txt /*netrw-cadaver*
netrw-call pi_netrw.txt /*netrw-call*
netrw-cb pi_netrw.txt /*netrw-cb*
netrw-cd pi_netrw.txt /*netrw-cd*
netrw-chgup pi_netrw.txt /*netrw-chgup*
netrw-clean pi_netrw.txt /*netrw-clean*
netrw-contents pi_netrw.txt /*netrw-contents*
@@ -7610,6 +7621,7 @@ netrw-enter pi_netrw.txt /*netrw-enter*
netrw-ex pi_netrw.txt /*netrw-ex*
netrw-explore pi_netrw.txt /*netrw-explore*
netrw-explore-cmds pi_netrw.txt /*netrw-explore-cmds*
netrw-expose pi_netrw.txt /*netrw-expose*
netrw-externapp pi_netrw.txt /*netrw-externapp*
netrw-file pi_netrw.txt /*netrw-file*
netrw-filigree pi_netrw.txt /*netrw-filigree*
@@ -7659,6 +7671,7 @@ netrw-mh pi_netrw.txt /*netrw-mh*
netrw-middlemouse pi_netrw.txt /*netrw-middlemouse*
netrw-ml_get pi_netrw.txt /*netrw-ml_get*
netrw-mm pi_netrw.txt /*netrw-mm*
netrw-modify pi_netrw.txt /*netrw-modify*
netrw-mouse pi_netrw.txt /*netrw-mouse*
netrw-move pi_netrw.txt /*netrw-move*
netrw-mp pi_netrw.txt /*netrw-mp*
+7 -20
View File
@@ -1,4 +1,4 @@
*todo.txt* For Vim version 8.0. Last change: 2017 Nov 02
*todo.txt* For Vim version 8.0. Last change: 2017 Nov 05
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -35,9 +35,6 @@ entered there will not be repeated below, unless there is extra information.
*known-bugs*
-------------------- Known bugs and current work -----------------------
Universal solution to detect if t_RS is working, using cursor position.
Koichi Iwamoto, #2126
No maintainer for Vietnamese translations.
No maintainer for Simplified Chinese translations.
@@ -153,20 +150,13 @@ Compiler warnings (geeknik, 2017 Oct 26):
- signed integer overflow in nfa_regatom() (#2251)
- undefined left shift in get_string_tv() (#2250)
Patch to recognize neumutt temp files. (Teubel György, 2017 Oct 31, #2269)
When starting with --clean packages under "start" are not loaded. Make this
work: :packadd START {name} similar to :runtime START name
When using :packadd files under "later" are not used, which is inconsistent
with packages under "start". (xtal8, #1994)
Patch to test autocommand effects. (James McCoy, 2017 Oct 31, #2271)
After 8.0.0962 pasting leaves the cursor in another position. (Ken Takata,
2017 Aug 23, #2015) Also (zdm, 2017 Aug 23)
fold at end of the buffer behaves inconsistently. (James McCoy, 2017 Oct 9)
Fold at end of the buffer behaves inconsistently. (James McCoy, 2017 Oct 9)
With foldmethod=syntax and nofoldenable comment highlighting isn't removed.
(Marcin Szewczyk, 2017 Apr 26)
@@ -191,6 +181,9 @@ redrawn properly. (xtal8, 2017 Oct 23, #2241)
Patch for manpager plugin. (Lcd, 2017 Oct 12)
Asked maintainer.
Universal solution to detect if t_RS is working, using cursor position.
Koichi Iwamoto, #2126
Default install on MS-Windows should source defaults.vim.
Ask whether to use Windows or Vim key behavior?
@@ -222,11 +215,8 @@ Still happens (2017 Jul 9)
When bracketed paste is used, pasting at the ":append" prompt does not get the
line breaks. (Ken Takata, 2017 Aug 22)
This example in the help does not work (Andy Wokula, 2017 Aug 20):
augroup mine | au! BufRead | augroup END
24 bit color support in MS-Windows console, using vcon. (Nobuhiro Takasaki,
2017 Oct 1, #2060). Should not set 'tgc' automatically.
Patch for 24 bit color support in MS-Windows console, using vcon. (Nobuhiro
Takasaki, 2017 Oct 1, #2060). Should not set 'tgc' automatically.
Patch to change GUI behavior: instead of changing the window size change the
lines/columns when menu/toolbar/etc. is added/removed. (Ychin, 2016 Mar 20,
@@ -629,9 +619,6 @@ Patch to add ":syn foldlevel" to use fold level further down the line.
Completion for input() does not expand environment variables. (chdiza, 2016
Jul 25, #948)
Patch to fix wrong encoding of error message on Cygwin/MSYS terminal.
(Ken Takata, 2016 Oct 4)
Patch to add 'systemencoding', convert between 'encoding' and this for file
names, shell commands and the like. (Kikuchan, 2010 Oct 14)
Assume the system converts between the actual encoding of the filesystem to
+5 -5
View File
@@ -21,7 +21,7 @@ Table of contents: |usr_toc.txt|
==============================================================================
*09.1* Parts of the GUI
You might have an icon on your desktop that starts gVim. Otherwise, one of
You might have an icon on your desktop that starts gvim. Otherwise, one of
these commands should do it: >
gvim file.txt
@@ -184,12 +184,12 @@ currently highlighted. In Vim this is the Visual area (this assumes you are
using the default option settings). You can paste this selection in another
application without any further action.
For example, in this text select a few words with the mouse. Vim will
switch to Visual mode and highlight the text. Now start another gVim, without
switch to Visual mode and highlight the text. Now start another gvim, without
a file name argument, so that it displays an empty window. Click the middle
mouse button. The selected text will be inserted.
The "current selection" will only remain valid until some other text is
selected. After doing the paste in the other gVim, now select some characters
selected. After doing the paste in the other gvim, now select some characters
in that window. You will notice that the words that were previously selected
in the other gvim window are displayed differently. This means that it no
longer is the current selection.
@@ -204,10 +204,10 @@ Now for the other place with which text can be exchanged. We call this the
"real clipboard", to avoid confusion. Often both the "current selection" and
the "real clipboard" are called clipboard, you'll have to get used to that.
To put text on the real clipboard, select a few different words in one of
the gVims you have running. Then use the Edit/Copy menu entry. Now the text
the gvims you have running. Then use the Edit/Copy menu entry. Now the text
has been copied to the real clipboard. You can't see this, unless you have
some application that shows the clipboard contents (e.g., KDE's Klipper).
Now select the other gVim, position the cursor somewhere and use the
Now select the other gvim, position the cursor somewhere and use the
Edit/Paste menu. You will see the text from the real clipboard is inserted.
+1 -1
View File
@@ -450,7 +450,7 @@ N *+visualextra* extra Visual mode commands |blockwise-operators|
N *+vreplace* |gR| and |gr|
N *+wildignore* |'wildignore'|
N *+wildmenu* |'wildmenu'|
*+windows* more than one window; Always enabled sinde 8.0.1118.
*+windows* more than one window; Always enabled since 8.0.1118.
m *+writebackup* |'writebackup'| is default on
m *+xim* X input method |xim|
*+xfontset* X fontset support |xfontset|
+2 -1
View File
@@ -80,7 +80,8 @@ func s:StartDebug(cmd)
let commpty = job_info(term_getjob(s:commbuf))['tty_out']
" Open a terminal window to run the debugger.
let cmd = [g:termdebugger, '-tty', pty, a:cmd]
" Add -quiet to avoid the intro message causing a hit-enter prompt.
let cmd = [g:termdebugger, '-quiet', '-tty', pty, a:cmd]
echomsg 'executing "' . join(cmd) . '"'
let gdbbuf = term_start(cmd, {
\ 'exit_cb': function('s:EndDebug'),
+5 -9
View File
@@ -20,7 +20,7 @@
if &cp || exists("g:loaded_netrwPlugin")
finish
endif
let g:loaded_netrwPlugin = "v156"
let g:loaded_netrwPlugin = "v162"
let s:keepcpo = &cpo
set cpo&vim
"DechoRemOn
@@ -42,8 +42,8 @@ augroup END
" Network Browsing Reading Writing: {{{2
augroup Network
au!
au BufReadCmd file://* call netrw#FileUrlRead(expand("<amatch>"))
au BufReadCmd ftp://*,rcp://*,scp://*,http://*,file://*,https://*,dav://*,davs://*,rsync://*,sftp://* exe "sil doau BufReadPre ".fnameescape(expand("<amatch>"))|call netrw#Nread(2,expand("<amatch>"))|exe "sil doau BufReadPost ".fnameescape(expand("<amatch>"))
au BufReadCmd file://* call netrw#FileUrlEdit(expand("<amatch>"))
au BufReadCmd ftp://*,rcp://*,scp://*,http://*,https://*,dav://*,davs://*,rsync://*,sftp://* exe "sil doau BufReadPre ".fnameescape(expand("<amatch>"))|call netrw#Nread(2,expand("<amatch>"))|exe "sil doau BufReadPost ".fnameescape(expand("<amatch>"))
au FileReadCmd ftp://*,rcp://*,scp://*,http://*,file://*,https://*,dav://*,davs://*,rsync://*,sftp://* exe "sil doau FileReadPre ".fnameescape(expand("<amatch>"))|call netrw#Nread(1,expand("<amatch>"))|exe "sil doau FileReadPost ".fnameescape(expand("<amatch>"))
au BufWriteCmd ftp://*,rcp://*,scp://*,http://*,file://*,dav://*,davs://*,rsync://*,sftp://* exe "sil doau BufWritePre ".fnameescape(expand("<amatch>"))|exe 'Nwrite '.fnameescape(expand("<amatch>"))|exe "sil doau BufWritePost ".fnameescape(expand("<amatch>"))
au FileWriteCmd ftp://*,rcp://*,scp://*,http://*,file://*,dav://*,davs://*,rsync://*,sftp://* exe "sil doau FileWritePre ".fnameescape(expand("<amatch>"))|exe "'[,']".'Nwrite '.fnameescape(expand("<amatch>"))|exe "sil doau FileWritePost ".fnameescape(expand("<amatch>"))
@@ -59,7 +59,7 @@ com! -count=1 -nargs=* Nread let s:svpos= winsaveview()<bar>call netrw#NetRead(
com! -range=% -nargs=* Nwrite let s:svpos= winsaveview()<bar><line1>,<line2>call netrw#NetWrite(<f-args>)<bar>call winrestview(s:svpos)
com! -nargs=* NetUserPass call NetUserPass(<f-args>)
com! -nargs=* Nsource let s:svpos= winsaveview()<bar>call netrw#NetSource(<f-args>)<bar>call winrestview(s:svpos)
com! -nargs=? Ntree call netrw#SetTreetop(<q-args>)
com! -nargs=? Ntree call netrw#SetTreetop(1,<q-args>)
" Commands: :Explore, :Sexplore, Hexplore, Vexplore, Lexplore {{{2
com! -nargs=* -bar -bang -count=0 -complete=dir Explore call netrw#Explore(<count>,0,0+<bang>0,<q-args>)
@@ -81,7 +81,7 @@ if !exists("g:netrw_nogx")
if !hasmapto('<Plug>NetrwBrowseX')
nmap <unique> gx <Plug>NetrwBrowseX
endif
nno <silent> <Plug>NetrwBrowseX :call netrw#BrowseX(expand((exists("g:netrw_gx")? g:netrw_gx : '<cfile>')),netrw#CheckIfRemote())<cr>
nno <silent> <Plug>NetrwBrowseX :call netrw#BrowseX(netrw#GX(),netrw#CheckIfRemote(netrw#GX()))<cr>
endif
if maparg('gx','v') == ""
if !hasmapto('<Plug>NetrwBrowseXVis')
@@ -129,19 +129,15 @@ fun! s:LocalBrowse(dirname)
elseif isdirectory(a:dirname)
" call Decho("(LocalBrowse) dirname<".a:dirname."> ft=".&ft." (isdirectory, not amiga)")
" call Dredir("LocalBrowse ft last set: ","verbose set ft")
" call Decho("(s:LocalBrowse) COMBAK#23: buf#".bufnr("%")." file<".expand("%")."> line#".line(".")." col#".col("."))
sil! call netrw#LocalBrowseCheck(a:dirname)
" call Decho("(s:LocalBrowse) COMBAK#24: buf#".bufnr("%")." file<".expand("%")."> line#".line(".")." col#".col("."))
if exists("w:netrw_bannercnt") && line('.') < w:netrw_bannercnt
exe w:netrw_bannercnt
" call Decho("(s:LocalBrowse) COMBAK#25: buf#".bufnr("%")." file<".expand("%")."> line#".line(".")." col#".col("."))
endif
else
" not a directory, ignore it
" call Decho("(LocalBrowse) dirname<".a:dirname."> not a directory, ignoring...")
endif
" call Decho("(s:LocalBrowse) COMBAK#26: buf#".bufnr("%")." file<".expand("%")."> line#".line(".")." col#".col("."))
" call Dret("s:LocalBrowse")
endfun
+5 -4
View File
@@ -2,7 +2,8 @@
" Language: doxygen on top of c, cpp, idl, java, php
" Maintainer: Michael Geddes <vimmer@frog.wheelycreek.net>
" Author: Michael Geddes
" Last Change: Jan 2009 (\tparam by Domnique Pelle, Aug 2013)
" Last Changes: Jan 2009 (\tparam by Domnique Pelle, Aug 2013)
" Nov 2017 (@throws by Domnique Pelle)
" Version: 1.23
"
" Copyright 2004-2008 Michael Geddes
@@ -181,13 +182,13 @@ endif
syn match doxygenParamDirection contained "\v\[(\s*in>((]\s*\[|\s*,\s*)out>)=|out>((]\s*\[|\s*,\s*)in>)=)\]" nextgroup=doxygenParamName skipwhite
syn keyword doxygenParam contained param tparam nextgroup=doxygenParamName,doxygenParamDirection skipwhite
syn match doxygenParamName contained +[A-Za-z0-9_:]\++ nextgroup=doxygenSpecialMultilineDesc skipwhite
syn keyword doxygenRetval contained retval throw exception nextgroup=doxygenParamName skipwhite
syn keyword doxygenRetval contained retval throw throws exception nextgroup=doxygenParamName skipwhite
" Match one line identifiers.
syn keyword doxygenOther contained addindex anchor
\ dontinclude endhtmlonly endlatexonly showinitializer hideinitializer
\ example htmlonly image include ingroup internal latexonly line
\ overload relates relatesalso sa skip skipline
\ overload related relates relatedalso relatesalso sa skip skipline
\ until verbinclude version addtogroup htmlinclude copydoc dotfile
\ xmlonly endxmlonly
\ nextgroup=doxygenSpecialOnelineDesc
@@ -223,7 +224,7 @@ endif
syn keyword doxygenOther contained par nextgroup=doxygenHeaderLine
syn region doxygenHeaderLine start=+.+ end=+^+ contained skipwhite nextgroup=doxygenSpecialMultilineDesc
syn keyword doxygenOther contained arg author date deprecated li return returns see invariant note post pre remarks since test nextgroup=doxygenSpecialMultilineDesc
syn keyword doxygenOther contained arg author authors date deprecated li result return returns see invariant note post pre remark remarks since test nextgroup=doxygenSpecialMultilineDesc
syn keyword doxygenOtherTODO contained todo attention nextgroup=doxygenSpecialMultilineDesc
syn keyword doxygenOtherWARN contained warning nextgroup=doxygenSpecialMultilineDesc
syn keyword doxygenOtherBUG contained bug nextgroup=doxygenSpecialMultilineDesc
+53 -29
View File
@@ -1,11 +1,8 @@
" Language : Netrw Remote-Directory Listing Syntax
" Language : Netrw Listing Syntax
" Maintainer : Charles E. Campbell
" Last change: Oct 06, 2014
" Version : 19
" Last change: Oct 31, 2016
" Version : 20 NOT RELEASED
" ---------------------------------------------------------------------
" Syntax Clearing: {{{1
" quit when a syntax file was already loaded
if exists("b:current_syntax")
finish
endif
@@ -55,24 +52,30 @@ syn match netrwLink "-->" contained skipwhite
" -----------------------------
" Special filetype highlighting {{{1
" -----------------------------
if exists("g:netrw_special_syntax") && netrw_special_syntax
syn match netrwBak "\(\S\+ \)*\S\+\.bak\>" contains=netrwTreeBar,@NoSpell
syn match netrwCompress "\(\S\+ \)*\S\+\.\%(gz\|bz2\|Z\|zip\)\>" contains=netrwTreeBar,@NoSpell
if has("unix")
syn match netrwCoreDump "\<core\%(\.\d\+\)\=\>" contains=netrwTreeBar,@NoSpell
if exists("g:netrw_special_syntax") && g:netrw_special_syntax
if exists("+suffixes") && &suffixes != ""
let suflist= join(split(&suffixes,','))
let suflist= escape(substitute(suflist," ",'\\|','g'),'.~')
exe "syn match netrwSpecFile '\\(\\S\\+ \\)*\\S*\\(".suflist."\\)\\>' contains=netrwTreeBar,@NoSpell"
endif
syn match netrwLex "\(\S\+ \)*\S\+\.\%(l\|lex\)\>" contains=netrwTreeBar,@NoSpell
syn match netrwYacc "\(\S\+ \)*\S\+\.y\>" contains=netrwTreeBar,@NoSpell
syn match netrwData "\(\S\+ \)*\S\+\.dat\>" contains=netrwTreeBar,@NoSpell
syn match netrwDoc "\(\S\+ \)*\S\+\.\%(doc\|txt\|pdf\|ps\)" contains=netrwTreeBar,@NoSpell
syn match netrwHdr "\(\S\+ \)*\S\+\.\%(h\|hpp\)\>" contains=netrwTreeBar,@NoSpell
syn match netrwLib "\(\S\+ \)*\S*\.\%(a\|so\|lib\|dll\)\>" contains=netrwTreeBar,@NoSpell
syn match netrwMakeFile "\<[mM]akefile\>\|\(\S\+ \)*\S\+\.mak\>" contains=netrwTreeBar,@NoSpell
syn match netrwObj "\(\S\+ \)*\S*\.\%(o\|obj\)\>" contains=netrwTreeBar,@NoSpell
syn match netrwTags "\<\(ANmenu\|ANtags\)\>" contains=netrwTreeBar,@NoSpell
syn match netrwTags "\<tags\>" contains=netrwTreeBar,@NoSpell
syn match netrwTilde "\(\S\+ \)*\S\+\~\*\=\>" contains=netrwTreeBar,@NoSpell
syn match netrwTmp "\<tmp\(\S\+ \)*\S\+\>\|\(\S\+ \)*\S*tmp\>" contains=netrwTreeBar,@NoSpell
syn match netrwBak "\(\S\+ \)*\S\+\.bak\>" contains=netrwTreeBar,@NoSpell
syn match netrwCompress "\(\S\+ \)*\S\+\.\%(gz\|bz2\|Z\|zip\)\>" contains=netrwTreeBar,@NoSpell
if has("unix")
syn match netrwCoreDump "\<core\%(\.\d\+\)\=\>" contains=netrwTreeBar,@NoSpell
endif
syn match netrwLex "\(\S\+ \)*\S\+\.\%(l\|lex\)\>" contains=netrwTreeBar,@NoSpell
syn match netrwYacc "\(\S\+ \)*\S\+\.y\>" contains=netrwTreeBar,@NoSpell
syn match netrwData "\(\S\+ \)*\S\+\.dat\>" contains=netrwTreeBar,@NoSpell
syn match netrwDoc "\(\S\+ \)*\S\+\.\%(doc\|txt\|pdf\|ps\|docx\)\>" contains=netrwTreeBar,@NoSpell
syn match netrwHdr "\(\S\+ \)*\S\+\.\%(h\|hpp\)\>" contains=netrwTreeBar,@NoSpell
syn match netrwLib "\(\S\+ \)*\S*\.\%(a\|so\|lib\|dll\)\>" contains=netrwTreeBar,@NoSpell
syn match netrwMakeFile "\<[mM]akefile\>\|\(\S\+ \)*\S\+\.mak\>" contains=netrwTreeBar,@NoSpell
syn match netrwObj "\(\S\+ \)*\S*\.\%(o\|obj\)\>" contains=netrwTreeBar,@NoSpell
syn match netrwPix "\c\(\S\+ \)*\S*\.\%(bmp\|fits\=\|gif\|je\=pg\|pcx\|ppc\|pgm\|png\|ppm\|psd\|rgb\|tif\|xbm\|xcf\)\>" contains=netrwTreeBar,@NoSpell
syn match netrwTags "\<\(ANmenu\|ANtags\)\>" contains=netrwTreeBar,@NoSpell
syn match netrwTags "\<tags\>" contains=netrwTreeBar,@NoSpell
syn match netrwTilde "\(\S\+ \)*\S\+\~\*\=\>" contains=netrwTreeBar,@NoSpell
syn match netrwTmp "\<tmp\(\S\+ \)*\S\+\>\|\(\S\+ \)*\S*tmp\>" contains=netrwTreeBar,@NoSpell
endif
" ---------------------------------------------------------------------
@@ -101,21 +104,42 @@ if !exists("did_drchip_netrwlist_syntax")
hi default link netrwLink Special
" special syntax highlighting (see :he g:netrw_special_syntax)
hi default link netrwBak NonText
hi default link netrwCompress Folded
hi default link netrwCoreDump WarningMsg
hi default link netrwData DiffChange
hi default link netrwHdr netrwPlain
hi default link netrwLex netrwPlain
hi default link netrwLib DiffChange
hi default link netrwMakefile DiffChange
hi default link netrwObj Folded
hi default link netrwTilde Folded
hi default link netrwTmp Folded
hi default link netrwTags Folded
hi default link netrwYacc netrwPlain
hi default link netrwPix Special
hi default link netrwBak netrwGray
hi default link netrwCompress netrwGray
hi default link netrwSpecFile netrwGray
hi default link netrwObj netrwGray
hi default link netrwTags netrwGray
hi default link netrwTilde netrwGray
hi default link netrwTmp netrwGray
endif
" set up netrwGray to be understated (but not Ignore'd or Conceal'd, as those
" can be hard/impossible to read). Users may override this in a colorscheme by
" specifying netrwGray highlighting.
redir => s:netrwgray
sil hi netrwGray
redir END
if s:netrwgray !~ 'guifg'
if has("gui") && has("gui_running")
if &bg == "dark"
exe "hi netrwGray gui=NONE guifg=gray30"
else
exe "hi netrwGray gui=NONE guifg=gray70"
endif
else
hi link netrwGray Folded
endif
endif
" Current Syntax: {{{1
let b:current_syntax = "netrwlist"
" ---------------------------------------------------------------------
+23 -16
View File
@@ -2,8 +2,8 @@
" Language: shell (sh) Korn shell (ksh) bash (sh)
" Maintainer: Charles E. Campbell <NdrOchipS@PcampbellAfamily.Mbiz>
" Previous Maintainer: Lennart Schultz <Lennart.Schultz@ecmwf.int>
" Last Change: Jan 30, 2017
" Version: 168
" Last Change: Oct 02, 2017
" Version: 172
" URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_SH
" For options and settings, please use: :help ft-sh-syntax
" This file includes many ideas from Eric Brunet (eric.brunet@ens.fr)
@@ -128,7 +128,7 @@ syn cluster shArithParenList contains=shArithmetic,shCaseEsac,shComment,shDeref,
syn cluster shArithList contains=@shArithParenList,shParenError
syn cluster shCaseEsacList contains=shCaseStart,shCase,shCaseBar,shCaseIn,shComment,shDeref,shDerefSimple,shCaseCommandSub,shCaseExSingleQuote,shCaseSingleQuote,shCaseDoubleQuote,shCtrlSeq,@shErrorList,shStringSpecial,shCaseRange
syn cluster shCaseList contains=@shCommandSubList,shCaseEsac,shColon,shCommandSub,shComment,shDo,shEcho,shExpr,shFor,shHereDoc,shIf,shHereString,shRedir,shSetList,shSource,shStatement,shVariable,shCtrlSeq
syn cluster shCommandSubList contains=shAlias,shArithmetic,shComment,shCmdParenRegion,shCtrlSeq,shDeref,shDerefSimple,shDoubleQuote,shEcho,shEscape,shExDoubleQuote,shExpr,shExSingleQuote,shHereDoc,shNumber,shOperator,shOption,shPosnParm,shHereString,shRedir,shSingleQuote,shSpecial,shStatement,shSubSh,shTest,shVariable
syn cluster shCommandSubList contains=shAlias,shArithmetic,shCmdParenRegion,shCtrlSeq,shDeref,shDerefSimple,shDoubleQuote,shEcho,shEscape,shExDoubleQuote,shExpr,shExSingleQuote,shHereDoc,shNumber,shOperator,shOption,shPosnParm,shHereString,shRedir,shSingleQuote,shSpecial,shStatement,shSubSh,shTest,shVariable
syn cluster shCurlyList contains=shNumber,shComma,shDeref,shDerefSimple,shDerefSpecial
syn cluster shDblQuoteList contains=shCommandSub,shDeref,shDerefSimple,shEscape,shPosnParm,shCtrlSeq,shSpecial
syn cluster shDerefList contains=shDeref,shDerefSimple,shDerefVar,shDerefSpecial,shDerefWordError,shDerefPSR,shDerefPPS
@@ -150,6 +150,7 @@ syn cluster shLoopList contains=@shCaseList,@shErrorList,shCaseEsac,shConditiona
syn cluster shPPSRightList contains=shComment,shDeref,shDerefSimple,shEscape,shPosnParm
syn cluster shSubShList contains=@shCommandSubList,shCaseEsac,shColon,shCommandSub,shComment,shDo,shEcho,shExpr,shFor,shIf,shHereString,shRedir,shSetList,shSource,shStatement,shVariable,shCtrlSeq,shOperator
syn cluster shTestList contains=shCharClass,shCommandSub,shCtrlSeq,shDeref,shDerefSimple,shDoubleQuote,shExDoubleQuote,shExpr,shExSingleQuote,shNumber,shOperator,shSingleQuote,shTest,shTestOpr
syn cluster shNoZSList contains=shSpecialNoZS
" Echo: {{{1
" ====
@@ -220,13 +221,13 @@ syn region shSubSh transparent matchgroup=shSubShRegion start="[^(]\zs(" end=")"
"=======
syn region shExpr matchgroup=shRange start="\[" skip=+\\\\\|\\$\|\[+ end="\]" contains=@shTestList,shSpecial
syn region shTest transparent matchgroup=shStatement start="\<test\s" skip=+\\\\\|\\$+ matchgroup=NONE end="[;&|]"me=e-1 end="$" contains=@shExprList1
syn region shNoQuote start='\S' skip='\%(\\\\\)*\\.' end='\ze\s' contained contains=shDerefSimple,shDeref
syn region shNoQuote start='\S' skip='\%(\\\\\)*\\.' end='\ze\s' end="\ze['"]" contained contains=shDerefSimple,shDeref
syn match shAstQuote contained '\*\ze"' nextgroup=shString
syn match shTestOpr contained '[^-+/%]\zs=' skipwhite nextgroup=shTestDoubleQuote,shTestSingleQuote,shTestPattern
syn match shTestOpr contained "<=\|>=\|!=\|==\|=\~\|-.\>\|-\(nt\|ot\|ef\|eq\|ne\|lt\|le\|gt\|ge\)\>\|[!<>]"
syn match shTestPattern contained '\w\+'
syn region shTestDoubleQuote contained start='\%(\%(\\\\\)*\\\)\@<!"' skip=+\\\\\|\\"+ end='"' contains=shDeref,shDerefSimple,shDerefSpecial
syn match shTestSingleQuote contained '\\.'
syn match shTestSingleQuote contained '\\.' nextgroup=shTestSingleQuote
syn match shTestSingleQuote contained "'[^']*'"
if exists("b:is_kornshell") || exists("b:is_bash")
syn region shDblBrace matchgroup=Delimiter start="\[\[" skip=+\%(\\\\\)*\\$+ end="\]\]" contains=@shTestList,shAstQuote,shNoQuote,shComment
@@ -261,7 +262,11 @@ syn match shComma contained ","
" ====
syn match shCaseBar contained skipwhite "\(^\|[^\\]\)\(\\\\\)*\zs|" nextgroup=shCase,shCaseStart,shCaseBar,shComment,shCaseExSingleQuote,shCaseSingleQuote,shCaseDoubleQuote
syn match shCaseStart contained skipwhite skipnl "(" nextgroup=shCase,shCaseBar
ShFoldIfDoFor syn region shCase contained skipwhite skipnl matchgroup=shSnglCase start="\%(\\.\|[^#$()'" \t]\)\{-}\zs)" end=";;" end="esac"me=s-1 contains=@shCaseList nextgroup=shCaseStart,shCase,shComment
if exists("b:is_bash")
ShFoldIfDoFor syn region shCase contained skipwhite skipnl matchgroup=shSnglCase start="\%(\\.\|[^#$()'" \t]\)\{-}\zs)" end=";;" end=";&" end=";;&" end="esac"me=s-1 contains=@shCaseList nextgroup=shCaseStart,shCase,shComment
else
ShFoldIfDoFor syn region shCase contained skipwhite skipnl matchgroup=shSnglCase start="\%(\\.\|[^#$()'" \t]\)\{-}\zs)" end=";;" end="esac"me=s-1 contains=@shCaseList nextgroup=shCaseStart,shCase,shComment
endif
ShFoldIfDoFor syn region shCaseEsac matchgroup=shConditional start="\<case\>" end="\<esac\>" contains=@shCaseEsacList
syn keyword shCaseIn contained skipwhite skipnl in nextgroup=shCase,shCaseStart,shCaseBar,shComment,shCaseExSingleQuote,shCaseSingleQuote,shCaseDoubleQuote
@@ -291,7 +296,7 @@ syn match shEscape contained '\%(^\)\@!\%(\\\\\)*\\.'
" (ie. Posix compliant shell). /bin/ksh should work for those
" systems too, however, so the following syntax will flag $(..) as
" an Error under /bin/sh. By consensus of vimdev'ers!
if exists("b:is_kornshell") || exists("b:is_bash")
if exists("b:is_kornshell") || exists("b:is_bash") || exists("b:is_posix")
syn region shCommandSub matchgroup=shCmdSubRegion start="\$(" skip='\\\\\|\\.' end=")" contains=@shCommandSubList
syn region shArithmetic matchgroup=shArithRegion start="\$((" skip='\\\\\|\\.' end="))" contains=@shArithList
syn region shArithmetic matchgroup=shArithRegion start="\$\[" skip='\\\\\|\\.' end="\]" contains=@shArithList
@@ -346,8 +351,9 @@ syn region shSingleQuote matchgroup=shQuote start=+'+ end=+'+ contains=@Spell
syn region shDoubleQuote matchgroup=shQuote start=+\%(\%(\\\\\)*\\\)\@<!"+ skip=+\\"+ end=+"+ contains=@shDblQuoteList,shStringSpecial,@Spell
syn match shStringSpecial "[^[:print:] \t]" contained
syn match shStringSpecial "[^\\]\zs\%(\\\\\)*\\[\\"'`$()#]"
syn match shSpecial "[^\\]\zs\%(\\\\\)*\\[\\"'`$()#]"
syn match shSpecial "[^\\]\zs\%(\\\\\)*\\[\\"'`$()#]" nextgroup=shBkslshSnglQuote,shBkslshDblQuote,@shNoZSList
syn match shSpecial "^\%(\\\\\)*\\[\\"'`$()#]"
syn match shSpecialNoZS contained "\%(\\\\\)*\\[\\"'`$()#]"
syn match shSpecialNxt contained "\\[\\"'`$()#]"
syn region shBkslshSnglQuote contained matchgroup=shQuote start=+'+ end=+'+ contains=@Spell
syn region shBkslshDblQuote contained matchgroup=shQuote start=+"+ skip=+\\"+ end=+"+ contains=@shDblQuoteList,shStringSpecial,@Spell
@@ -370,8 +376,8 @@ syn match shQuickComment contained "#.*$"
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc01 start="<<\s*\\\=\z([^ \t|>]\+\)" matchgroup=shHereDoc01 end="^\z1\s*$" contains=@shDblQuoteList
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc02 start="<<\s*\"\z([^ \t|>]\+\)\"" matchgroup=shHereDoc02 end="^\z1\s*$"
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc03 start="<<-\s*\z([^ \t|>]\+\)" matchgroup=shHereDoc03 end="^\s*\z1\s*$" contains=@shDblQuoteList
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc04 start="<<-\s*'\z([^ \t|>]\+\)'" matchgroup=shHereDoc04 end="^\s*\z1\s*$"
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc05 start="<<\s*'\z([^ \t|>]\+\)'" matchgroup=shHereDoc05 end="^\z1\s*$"
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc04 start="<<-\s*'\z([^']\+\)'" matchgroup=shHereDoc04 end="^\s*\z1\s*$"
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc05 start="<<\s*'\z([^']\+\)'" matchgroup=shHereDoc05 end="^\z1\s*$"
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc06 start="<<-\s*\"\z([^ \t|>]\+\)\"" matchgroup=shHereDoc06 end="^\s*\z1\s*$"
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc07 start="<<\s*\\\_$\_s*\z([^ \t|>]\+\)" matchgroup=shHereDoc07 end="^\z1\s*$" contains=@shDblQuoteList
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc08 start="<<\s*\\\_$\_s*'\z([^ \t|>]\+\)'" matchgroup=shHereDoc08 end="^\z1\s*$"
@@ -428,14 +434,14 @@ endif
if !exists("g:sh_no_error")
syn match shDerefWordError "[^}$[~]" contained
endif
syn match shDerefSimple "\$\%(\h\w*\|\d\)"
syn match shDerefSimple "\$\%(\h\w*\|\d\)" nextgroup=@shNoZSList
syn region shDeref matchgroup=PreProc start="\${" end="}" contains=@shDerefList,shDerefVarArray
syn match shDerefSimple "\$[-#*@!?]"
syn match shDerefSimple "\$\$"
syn match shDerefSimple "\${\d}"
syn match shDerefSimple "\$[-#*@!?]" nextgroup=@shNoZSList
syn match shDerefSimple "\$\$" nextgroup=@shNoZSList
syn match shDerefSimple "\${\d}" nextgroup=@shNoZSList
if exists("b:is_bash") || exists("b:is_kornshell")
syn region shDeref matchgroup=PreProc start="\${##\=" end="}" contains=@shDerefList
syn region shDeref matchgroup=PreProc start="\${\$\$" end="}" contains=@shDerefList
syn region shDeref matchgroup=PreProc start="\${##\=" end="}" contains=@shDerefList nextgroup=@shSpecialNoZS
syn region shDeref matchgroup=PreProc start="\${\$\$" end="}" contains=@shDerefList nextgroup=@shSpecialNoZS
endif
" ksh: ${!var[*]} array index list syntax: {{{1
@@ -685,6 +691,7 @@ if !exists("skip_sh_syntax_inits")
hi def link shSetList Identifier
hi def link shShellVariables PreProc
hi def link shSpecial Special
hi def link shSpecialNoZS shSpecial
hi def link shStatement Statement
hi def link shString String
hi def link shTodo Todo
+23 -9
View File
@@ -1,8 +1,8 @@
" Vim syntax file
" Language: TeX
" Maintainer: Charles E. Campbell <NdrchipO@ScampbellPfamily.AbizM>
" Last Change: Jan 31, 2017
" Version: 103
" Last Change: Oct 12, 2017
" Version: 105
" URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_TEX
"
" Notes: {{{1
@@ -259,6 +259,7 @@ syn match texAccent +\\[=^.\~"`']+
syn match texAccent +\\['=t'.c^ud"vb~Hr]{\a}+
syn match texLigature "\\\([ijolL]\|ae\|oe\|ss\|AA\|AE\|OE\)$"
" \begin{}/\end{} section markers: {{{1
syn match texBeginEnd "\\begin\>\|\\end\>" nextgroup=texBeginEndName
if s:tex_fast =~# 'm'
@@ -511,7 +512,7 @@ if !exists("g:tex_no_math")
if &ambw == "double" || exists("g:tex_usedblwidth")
let s:texMathDelimList= s:texMathDelimList + [
\ ['\\langle' , '〈'] ,
\ ['\\rangle' , '〉']]
\ ['\\rangle' , '〉'] ,
else
let s:texMathDelimList= s:texMathDelimList + [
\ ['\\langle' , '<'] ,
@@ -588,12 +589,21 @@ else
endif
endif
" %begin-include ... %end-include acts like a texDocZone for \include'd files. Permits spell checking, for example, in such files.
if !s:tex_nospell
TexFold syn region texDocZone matchgroup=texSection start='^\s*%begin-include\>' end='^\s*%end-include\>' contains=@texFoldGroup,@texDocGroup,@Spell
else
TexFold syn region texDocZone matchgroup=texSection start='^\s*%begin-include\>' end='^\s*%end-include\>' contains=@texFoldGroup,@texDocGroup
endif
" Separate lines used for verb` and verb# so that the end conditions {{{1
" will appropriately terminate.
" If g:tex_verbspell exists, then verbatim texZones will permit spellchecking there.
if s:tex_fast =~# 'v'
if exists("g:tex_verbspell") && g:tex_verbspell
syn region texZone start="\\begin{[vV]erbatim}" end="\\end{[vV]erbatim}\|%stopzone\>" contains=@Spell
" listings package:
syn region texZone start="\\begin{lstlisting}" end="\\end{lstlisting}\|%stopzone\>" contains=@Spell
if b:tex_stylish
syn region texZone start="\\verb\*\=\z([^\ta-zA-Z@]\)" end="\z1\|%stopzone\>" contains=@Spell
else
@@ -1183,11 +1193,13 @@ if has("conceal") && &enc == 'utf-8'
delfun s:SuperSub
endif
" Accented characters: {{{2
" Accented characters and Ligatures: {{{2
if s:tex_conceal =~# 'a'
if b:tex_stylish
syn match texAccent "\\[bcdvuH][^a-zA-Z@]"me=e-1
syn match texLigature "\\\([ijolL]\|ae\|oe\|ss\|AA\|AE\|OE\)[^a-zA-Z@]"me=e-1
syn match texLigature "\\\([ijolL]\|ae\|oe\|ss\|AA\|AE\|OE\)[^a-zA-Z@]"me=e-1
syn match texLigature '--'
syn match texLigature '---'
else
fun! s:Accents(chr,...)
let i= 1
@@ -1248,15 +1260,17 @@ if has("conceal") && &enc == 'utf-8'
call s:Accents('\\i','ì','í','î','ï','ĩ','į',' ',' ',' ',' ',' ','ĭ',' ')
" \` \' \^ \" \~ \. \= \c \H \k \r \u \v
delfun s:Accents
syn match texAccent '\\aa\>' conceal cchar=å
syn match texAccent '\\AA\>' conceal cchar=Å
syn match texAccent '\\o\>' conceal cchar=ø
syn match texAccent '\\O\>' conceal cchar=Ø
syn match texAccent '\\aa\>' conceal cchar=å
syn match texAccent '\\AA\>' conceal cchar=Å
syn match texAccent '\\o\>' conceal cchar=ø
syn match texAccent '\\O\>' conceal cchar=Ø
syn match texLigature '\\AE\>' conceal cchar=Æ
syn match texLigature '\\ae\>' conceal cchar=æ
syn match texLigature '\\oe\>' conceal cchar=œ
syn match texLigature '\\OE\>' conceal cchar=Œ
syn match texLigature '\\ss\>' conceal cchar=ß
syn match texLigature '--' conceal cchar=
syn match texLigature '---' conceal cchar=
endif
endif
endif
+32 -33
View File
@@ -1,8 +1,8 @@
" Vim syntax file
" Language: Vim 8.0 script
" Maintainer: Charles E. Campbell <NdrOchipS@PcampbellAfamily.Mbiz>
" Last Change: Jan 19, 2017
" Version: 8.0-02
" Last Change: November 03, 2017
" Version: 8.0-04
" URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_VIM
" Automatically generated keyword lists: {{{1
@@ -19,24 +19,24 @@ syn keyword vimTodo contained COMBAK FIXME TODO XXX
syn cluster vimCommentGroup contains=vimTodo,@Spell
" regular vim commands {{{2
syn keyword vimCommand contained a argd[elete] as[cii] bd[elete] bo[tright] breakl[ist] cN[ext] caddf[ile] ccl[ose] cfdo chd[ir] cle[arjumps] co[py] con[tinue] cr[ewind] d[elete] deletel delm[arks] diffo[ff] dir dp earlier em[enu] ene[w] filet fir[st] foldo[pen] grepa[dd] helpf[ind] i in ju[mps] keepp[atterns] lad[dexpr] later lcl[ose] lefta[bove] lg[etfile] lh[elpgrep] lmak[e] lo[adview] lol[der] ls lv[imgrep] mak[e] messages mkvie[w] nb[key] noa nos[wapfile] on[ly] packl[oadall] po[p] pro ps[earch] ptl[ast] pu[t] pydo quita[ll] redr[aw] retu[rn] rub[y] sI sIn sal[l] sba[ll] sbp[revious] scg scripte[ncoding] setg[lobal] sgI sgn sic sim[alt] sla[st] smile so[urce] spelli[nfo] sr sri sta[g] stopi[nsert] sus[pend] sync ta[g] tabe[dit] tabn[ext] tabs te[aroff] tm[enu] try undoj[oin] up[date] vi[sual] vmapc[lear] wa[ll] winp[os] ws[verb] xmapc[lear] xprop
syn keyword vimCommand contained abc[lear] argdo au bel[owright] bp[revious] bro[wse] cNf[ile] cal[l] cd cfir[st] che[ckpath] clo[se] col[der] conf[irm] cs debug deletep delp diffp[atch] dj[ump] dr[op] echoe[rr] en[dif] ex filetype fix[del] for gui helpg[rep] iabc[lear] intro k lN[ext] laddb[uffer] lb[uffer] lcs lex[pr] lgetb[uffer] lhi[story] lmapc[lear] loadk lop[en] lt[ag] lvimgrepa[dd] marks mk[exrc] mod[e] nbc[lose] noautocmd nu[mber] opt[ions] pc[lose] popu[p] prof[ile] ptN[ext] ptn[ext] pw[d] pyf[ile] r[ead] redraws[tatus] rew[ind] rubyd[o] sIc sIp san[dbox] sbf[irst] sbr[ewind] sci scs setl[ocal] sgc sgp sie sin sm[agic] sn[ext] sor[t] spellr[epall] srI srl star[tinsert] sts[elect] sv[iew] syncbind tab tabf[ind] tabnew tags tf[irst] tn[ext] ts[elect] undol[ist] v vie[w] vne[w] wh[ile] wn[ext] wundo xme xunme
syn keyword vimCommand contained abo[veleft] arge[dit] bN[ext] bf[irst] br[ewind] bufdo c[hange] cat[ch] cdo cg[etfile] checkt[ime] cmapc[lear] colo[rscheme] cope[n] cscope debugg[reedy] deletl dep diffpu[t] dl ds[earch] echom[sg] endf[unction] exi[t] filt[er] fo[ld] fu[nction] gvim helpt[ags] if is[earch] kee[pmarks] lNf[ile] laddf[ile] lbo[ttom] lcscope lf[ile] lgete[xpr] ll lne[xt] loadkeymap lp[revious] lua lw[indow] mat[ch] mks[ession] mz[scheme] nbs[tart] noh[lsearch] o[pen] ownsyntax pe[rl] pp[op] profd[el] pta[g] ptp[revious] py3 python3 rec[over] reg[isters] ri[ght] rubyf[ile] sIe sIr sav[eas] sbl[ast] sc scl scscope sf[ind] sge sgr sig sip sm[ap] sno[magic] sp[lit] spellu[ndo] src srn startg[replace] sun[hide] sw[apname] syntime tabN[ext] tabfir[st] tabo[nly] tc[l] th[row] to[pleft] tu[nmenu] unh[ide] ve[rsion] vim[grep] vs[plit] win[size] wp[revious] wv[iminfo] xmenu xunmenu
syn keyword vimCommand contained al[l] argg[lobal] b[uffer] bl[ast] brea[k] buffers cabc[lear] cb[uffer] ce[nter] cgetb[uffer] chi[story] cn[ext] com cp[revious] cstag delc[ommand] deletp di[splay] diffs[plit] dli[st] dsp[lit] echon endfo[r] exu[sage] fin[d] foldc[lose] g h[elp] hi ij[ump] isp[lit] keepa l[ist] lan[guage] lc[d] ld[o] lfdo lgr[ep] lla[st] lnew[er] loc[kmarks] lpf[ile] luado m[ove] menut[ranslate] mksp[ell] mzf[ile] new nor ol[dfiles] p[rint] ped[it] pre[serve] promptf[ind] ptf[irst] ptr[ewind] py3do q[uit] red[o] res[ize] rightb[elow] rundo sIg sN[ext] sbN[ext] sbm[odified] scI scp se[t] sfir[st] sgi sh[ell] sign sir sme snoreme spe[llgood] spellw[rong] sre[wind] srp startr[eplace] sunme sy t tabc[lose] tabl[ast] tabp[revious] tcld[o] tj[ump] tp[revious] u[ndo] unlo[ckvar] verb[ose] vimgrepa[dd] wN[ext] winc[md] wq x[it] xnoreme xwininfo
syn keyword vimCommand contained ar[gs] argl[ocal] ba[ll] bm[odified] breaka[dd] bun[load] cad[dbuffer] cbo[ttom] cex[pr] cgete[xpr] cl[ist] cnew[er] comc[lear] cpf[ile] cuna[bbrev] delel delf[unction] dif[fupdate] difft[his] do e[dit] el[se] endt[ry] f[ile] fina[lly] foldd[oopen] go[to] ha[rdcopy] hid[e] il[ist] iuna[bbrev] keepalt la[st] lat lch[dir] le[ft] lfir[st] lgrepa[dd] lli[st] lnf[ile] lockv[ar] lr[ewind] luafile ma[rk] mes mkv[imrc] n[ext] nmapc[lear] nore omapc[lear] pa[ckadd] perld[o] prev[ious] promptr[epl] ptj[ump] pts[elect] py[thon] qa[ll] redi[r] ret[ab] ru[ntime] rv[iminfo] sIl sa[rgument] sb[uffer] sbn[ext] sce scr[iptnames] setf[iletype] sg sgl si sil[ent] sl[eep] smenu snoremenu spelld[ump] spr[evious] srg st[op] stj[ump] sunmenu syn tN[ext] tabd[o] tabm[ove] tabr[ewind] tclf[ile] tl[ast] tr[ewind] una[bbreviate] uns[ilent] vert[ical] viu[sage] w[rite] windo wqa[ll] xa[ll] xnoremenu y[ank]
syn keyword vimCommand contained arga[dd] argu[ment] bad[d] bn[ext] breakd[el] bw[ipeout] cadde[xpr] cc cf[ile] changes cla[st] cnf[ile] comp[iler] cq[uit] cw[indow] delep dell diffg[et] dig[raphs] doau ea elsei[f] endw[hile] files fini[sh] folddoc[losed] gr[ep] helpc[lose] his[tory] imapc[lear] j[oin] keepj[umps]
syn keyword vimCommand contained a arga[dd] argu[ment] bad[d] bn[ext] breakd[el] bw[ipeout] cadde[xpr] cc cf[ile] changes cla[st] cnf[ile] comp[iler] cq[uit] cw[indow] delep dell diffg[et] dig[raphs] doau ea el[se] endt[ry] f[ile] fina[lly] foldd[oopen] go[to] ha[rdcopy] hid[e] ij[ump] isp[lit] keepa l[ist] lat lcl[ose] lex[pr] lgete[xpr] lla[st] lnf[ile] lol[der] lt[ag] lw[indow] menut[ranslate] mkv[imrc] n[ext] nmapc[lear] nore omapc[lear] pa[ckadd] perld[o] prev[ious] promptr[epl] ptj[ump] pts[elect] py[thon] pyx quita[ll] redr[aw] retu[rn] rub[y] sI sIn sal[l] sba[ll] sbp[revious] scg scripte[ncoding] setg[lobal] sgI sgn sic sim[alt] sla[st] smile so[urce] spelli[nfo] sr sri sta[g] stopi[nsert] sus[pend] sync ta[g] tabe[dit] tabn[ext] tabs te[aroff] tm[enu] to[pleft] tu[nmenu] undol[ist] up[date] vi[sual] vmapc[lear] wa[ll] winp[os] ws[verb] xmapc[lear] xprop
syn keyword vimCommand contained ab argd[elete] as[cii] bd[elete] bo[tright] breakl[ist] cN[ext] caddf[ile] ccl[ose] cfdo chd[ir] cle[arjumps] co[py] con[tinue] cr[ewind] d[elete] deletel delm[arks] diffo[ff] dir dp earlier elsei[f] endw[hile] files fini[sh] folddoc[losed] gr[ep] helpc[lose] his[tory] il[ist] iuna[bbrev] keepalt la[st] later lcs lf[ile] lgr[ep] lli[st] lo[adview] lop[en] lua m[ove] mes mkvie[w] nb[key] noa nos[wapfile] on[ly] packl[oadall] po[p] pro ps[earch] ptl[ast] pu[t] pydo pyxdo r[ead] redraws[tatus] rew[ind] rubyd[o] sIc sIp san[dbox] sbf[irst] sbr[ewind] sci scs setl[ocal] sgc sgp sie sin sm[agic] sn[ext] sor[t] spellr[epall] srI srl star[tinsert] sts[elect] sv[iew] syncbind tab tabf[ind] tabnew tags tf[irst] tma[p] tp[revious] tunma[p] unh[ide] v vie[w] vne[w] wh[ile] wn[ext] wundo xme xunme
syn keyword vimCommand contained abc[lear] argdo au bel[owright] bp[revious] bro[wse] cNf[ile] cal[l] cd cfir[st] che[ckpath] clo[se] col[der] conf[irm] cs debug deletep delp diffp[atch] dj[ump] dr[op] ec em[enu] ene[w] filet fir[st] foldo[pen] grepa[dd] helpf[ind] i imapc[lear] j[oin] keepj[umps] lad[dexpr] lb[uffer] lcscope lfdo lgrepa[dd] lmak[e] loadk lp[revious] luado ma[rk] messages mod[e] nbc[lose] noautocmd nu[mber] opt[ions] pc[lose] popu[p] prof[ile] ptN[ext] ptn[ext] pw[d] pyf[ile] pyxfile rec[over] reg[isters] ri[ght] rubyf[ile] sIe sIr sav[eas] sbl[ast] sc scl scscope sf[ind] sge sgr sig sip sm[ap] sno[magic] sp[lit] spellu[ndo] src srn startg[replace] sun[hide] sw[apname] syntime tabN[ext] tabfir[st] tabo[nly] tc[l] th[row] tmapc[lear] tr[ewind] u[ndo] unl ve[rsion] vim[grep] vs[plit] win[size] wp[revious] wv[iminfo] xmenu xunmenu
syn keyword vimCommand contained abo[veleft] arge[dit] bN[ext] bf[irst] br[ewind] bufdo c[hange] cat[ch] cdo cg[etfile] checkt[ime] cmapc[lear] colo[rscheme] cope[n] cscope debugg[reedy] deletl dep diffpu[t] dl ds[earch] echoe[rr] en[dif] ex filetype fix[del] for gui helpg[rep] ia in ju[mps] keepp[atterns] laddb[uffer] lbo[ttom] ld[o] lfir[st] lh[elpgrep] lmapc[lear] loadkeymap lpf[ile] luafile mak[e] mk[exrc] mz[scheme] nbs[tart] noh[lsearch] o[pen] ownsyntax pe[rl] pp[op] profd[el] pta[g] ptp[revious] py3 python3 q[uit] red[o] res[ize] rightb[elow] rundo sIg sN[ext] sbN[ext] sbm[odified] scI scp se[t] sfir[st] sgi sh[ell] sign sir sme snoreme spe[llgood] spellw[rong] sre[wind] srp startr[eplace] sunme sy t tabc[lose] tabl[ast] tabp[revious] tcld[o] tj[ump] tn[ext] try una[bbreviate] unlo[ckvar] verb[ose] vimgrepa[dd] wN[ext] winc[md] wq x[it] xnoreme xwininfo
syn keyword vimCommand contained al[l] argg[lobal] b[uffer] bl[ast] brea[k] buffers cabc[lear] cb[uffer] ce[nter] cgetb[uffer] chi[story] cn[ext] com cp[revious] cstag delc[ommand] deletp di[splay] diffs[plit] dli[st] dsp[lit] echom[sg] endf[unction] exi[t] filt[er] fo[ld] fu[nction] gvim helpt[ags] iabc[lear] intro k lN[ext] laddf[ile] lc[d] le[ft] lg[etfile] lhi[story] lne[xt] loc[kmarks] lr[ewind] lv[imgrep] marks mks[ession] mzf[ile] new nor ol[dfiles] p[rint] ped[it] pre[serve] promptf[ind] ptf[irst] ptr[ewind] py3do pythonx qa[ll] redi[r] ret[ab] ru[ntime] rv[iminfo] sIl sa[rgument] sb[uffer] sbn[ext] sce scr[iptnames] setf[iletype] sg sgl si sil[ent] sl[eep] smenu snoremenu spelld[ump] spr[evious] srg st[op] stj[ump] sunmenu syn tN[ext] tabd[o] tabm[ove] tabr[ewind] tclf[ile] tl[ast] tno[remap] ts[elect] undoj[oin] uns[ilent] vert[ical] viu[sage] w[rite] windo wqa[ll] xa[ll] xnoremenu y[ank]
syn keyword vimCommand contained ar[gs] argl[ocal] ba[ll] bm[odified] breaka[dd] bun[load] cad[dbuffer] cbo[ttom] cex[pr] cgete[xpr] cl[ist] cnew[er] comc[lear] cpf[ile] cuna[bbrev] delel delf[unction] dif[fupdate] difft[his] do e[dit] echon endfo[r] exu[sage] fin[d] foldc[lose] g h[elp] hi if is[earch] kee[pmarks] lNf[ile] lan[guage] lch[dir] lefta[bove] lgetb[uffer] ll lnew[er] lockv[ar] ls lvimgrepa[dd] mat[ch] mksp[ell]
syn match vimCommand contained "\<z[-+^.=]\=\>"
syn keyword vimStdPlugin contained DiffOrig Man N[ext] P[rint] S TOhtml XMLent XMLns
syn keyword vimStdPlugin contained DiffOrig Man N[ext] P[rint] S TOhtml XMLent XMLns
" vimOptions are caught only when contained in a vimSet {{{2
syn keyword vimOption contained acd ambw arshape background ballooneval bg bomb bs cb ch cinoptions cms commentstring copyindent cscopepathcomp csprg cursorbind delcombine digraph eadirection ek ep et fdc fdo ffs filetype fml foldignore foldopen fs gfn grepprg guiheadroom helplang history hls imactivatefunc imdisable inc indk isfname joinspaces kmp lazyredraw lispwords lpl ma matchtime mco ml modeline mousefocus mousetime nrformats ofu packpath path ph pp printfont pumheight rdt renderoptions rl ru sbo scrollbind secure shcf shelltemp shortmess showtabline sj smd spell splitbelow ssl stl sw sxe tabpagemax tags tbs termguicolors tgst titleold top ttimeoutlen ttyscroll ul ur verbosefile visualbell wcm wi wildmenu winfixwidth wm wrapscan
syn keyword vimOption contained ai anti autochdir backspace balloonexpr bh breakat bsdir cc charconvert cinw co compatible cot cscopeprg csqf cursorcolumn dex dip eb emo equalalways eventignore fde fdt fic fillchars fmr foldlevel foldtext fsync gfs gtl guioptions hf hk hlsearch imactivatekey imi include inex isi js kp lbr list lrm macatsui maxcombine mef mls modelines mousehide mp nu omnifunc para pdev pheader preserveindent printheader pvh re report rlc rubydll sbr scrolljump sel shell shelltype shortname shq slm sn spellcapcheck splitright ssop stmp swapfile sxq tabstop tagstack tc terse thesaurus titlestring tpm ttm ttytype undodir ut vfile vop wd wic wildmode winheight wmh write
syn keyword vimOption contained akm antialias autoindent backup bdir bin breakindent bsk ccv ci cinwords cocu complete cp cscopequickfix csre cursorline dg dir ed emoji equalprg ex fdi fen fileencoding fixendofline fo foldlevelstart formatexpr ft gfw gtt guipty hh hkmap ic imaf iminsert includeexpr inf isident key langmap lcs listchars ls magic maxfuncdepth menuitems mm modifiable mousem mps number opendevice paragraphs penc pi previewheight printmbcharset pvw readonly restorescreen rnu ruf sc scrolloff selection shellcmdflag shellxescape showbreak si sm so spellfile spr st sts swapsync syn tag tal tcldll textauto tildeop tl tr tty tw undofile vb vi wa weirdinvert wig wildoptions winminheight wmnu writeany
syn keyword vimOption contained al ar autoread backupcopy bdlay binary breakindentopt bt cd cin clipboard cole completefunc cpo cscoperelative cst cwh dict directory edcompatible enc errorbells expandtab fdl fenc fileencodings fixeol foldclose foldmarker formatlistpat gcr ghr guicursor guitablabel hi hkmapp icon imak ims incsearch infercase isk keymap langmenu linebreak lm lsp makeef maxmapdepth mfd mmd modified mousemodel msm numberwidth operatorfunc paste perldll pm previewwindow printmbfont pythondll redrawtime revins ro ruler scb scrollopt selectmode shellpipe shellxquote showcmd sidescroll smartcase softtabstop spelllang sps sta su swb synmaxcol tagbsearch tb tenc textmode timeout tm ts ttybuiltin tx undolevels vbs viewdir wak wfh wildchar wim winminwidth wmw writebackup
syn keyword vimOption contained aleph arab autowrite backupdir belloff bk bri bufhidden cdpath cindent cm colorcolumn completeopt cpoptions cscopetag csto debug dictionary display ef encoding errorfile exrc fdls fencs fileformat fk foldcolumn foldmethod formatoptions gd go guifont guitabtooltip hid hkp iconstring imc imsearch inde insertmode iskeyword keymodel langnoremap lines lmap luadll makeprg maxmem mh mmp more mouses mzq nuw opfunc pastetoggle pex pmbcs printdevice printoptions pythonthreedll regexpengine ri rop rulerformat scl scs sessionoptions shellquote shiftround showfulltag sidescrolloff smartindent sol spellsuggest sr stal sua swf syntax tagcase tbi term textwidth timeoutlen to tsl ttyfast uc undoreload vdir viewoptions warn wfw wildcharm winaltkeys winwidth wop writedelay
syn keyword vimOption contained allowrevins arabic autowriteall backupext beval bkc briopt buflisted cedit cink cmdheight columns concealcursor cpt cscopetagorder csverb deco diff dy efm endofline errorformat fcl fdm fex fileformats fkmap foldenable foldminlines formatprg gdefault gp guifontset helpfile hidden hl ignorecase imcmdline imsf indentexpr is isp keywordprg langremap linespace lnr lw mat maxmempattern mis mmt mouse mouseshape mzquantum odev osfiletype patchexpr pexpr pmbfn printencoding prompt qe relativenumber rightleft rs runtimepath scr sect sft shellredir shiftwidth showmatch signcolumn smarttab sp spf srr startofline suffixes switchbuf ta taglength tbidi termbidi tf title toolbar tsr ttym udf updatecount ve viminfo wb wh wildignore window wiv wrap ws
syn keyword vimOption contained altkeymap arabicshape aw backupskip bex bl brk buftype cf cinkeys cmdwinheight com conceallevel crb cscopeverbose cuc def diffexpr ea ei eol esckeys fcs fdn ff fileignorecase flp foldexpr foldnestmax fp gfm grepformat guifontwide helpheight highlight hlg im imd imstatusfunc indentkeys isf isprint km laststatus lisp loadplugins lz matchpairs maxmemtot mkspellmem mod mousef mouset nf oft pa patchmode pfn popt printexpr pt quoteescape remap rightleftcmd rtp sb scroll sections sh shellslash shm showmode siso smc spc spl ss statusline suffixesadd sws tabline tagrelative tbis termencoding tgc titlelen toolbariconsize ttimeout ttymouse udir updatetime verbose virtualedit wc whichwrap wildignorecase winfixheight wiw wrapmargin ww
syn keyword vimOption contained ambiwidth ari awa balloondelay bexpr bo browsedir casemap cfu cino cmp comments confirm cryptmethod cspc cul define diffopt ead
syn keyword vimOption contained acd ambw arshape background ballooneval bg bomb bs cb ch cinoptions cms commentstring copyindent cscopepathcomp csprg cursorbind delcombine digraph eadirection emo equalprg expandtab fdls fex fileignorecase fml foldlevel formatexpr gcr go guifontset helpheight history hlsearch imactivatekey imi imstyle indentkeys isf isprint km laststatus lisp loadplugins lz mat maxmempattern mh mmp more mouses mzq number opendevice paragraphs penc pi previewheight printmbcharset pvw rdt renderoptions rl ru sbo scrollbind secure shcf shelltemp shortmess showtabline sj smd spell splitbelow ssl stl sw sxe tabpagemax tags tbs termguicolors tf title tms ts ttybuiltin tx undolevels vbs viewdir vop wd wic wildmode winheight wm wrapscan
syn keyword vimOption contained ai anti autochdir backspace balloonexpr bh breakat bsdir cc charconvert cinw co compatible cot cscopeprg csqf cursorcolumn dex dip eb emoji errorbells exrc fdm ff filetype fmr foldlevelstart formatlistpat gd gp guifontwide helplang hk ic imaf iminsert inc indk isfname joinspaces kmp lazyredraw lispwords lpl ma matchpairs maxmemtot mis mmt mouse mouseshape mzquantum numberwidth operatorfunc paste perldll pm previewwindow printmbfont pythondll re report rlc rubydll sbr scrolljump sel shell shelltype shortname shq slm sn spellcapcheck splitright ssop stmp swapfile sxq tabstop tagstack tc termkey tgc titlelen to tsl ttyfast uc undoreload vdir viewoptions wa weirdinvert wig wildoptions winminheight wmh write
syn keyword vimOption contained akm antialias autoindent backup bdir bin breakindent bsk ccv ci cinwords cocu complete cp cscopequickfix csre cursorline dg dir ed enc errorfile fcl fdn ffs fillchars fo foldmarker formatoptions gdefault grepformat guiheadroom hf hkmap icon imak ims include inex isi js kp lbr list lrm macatsui matchtime mco mkspellmem mod mousef mouset mzschemedll nuw opfunc pastetoggle pex pmbcs printdevice printoptions pythonthreedll readonly restorescreen rnu ruf sc scrolloff selection shellcmdflag shellxescape showbreak si sm so spellfile spr st sts swapsync syn tag tal tcldll termsize tgst titleold toolbar tsr ttym udf updatecount ve vif wak wfh wildchar wim winminwidth wmnu writeany
syn keyword vimOption contained al ar autoread backupcopy bdlay binary breakindentopt bt cd cin clipboard cole completefunc cpo cscoperelative cst cwh dict directory edcompatible encoding errorformat fcs fdo fic fixendofline foldclose foldmethod formatprg gfm grepprg guioptions hh hkmapp iconstring imc imsearch includeexpr inf isident key langmap lcs listchars ls magic maxcombine mef ml modeline mousefocus mousetime mzschemegcdll odev osfiletype patchexpr pexpr pmbfn printencoding prompt pyx redrawtime revins ro ruler scb scrollopt selectmode shellpipe shellxquote showcmd sidescroll smartcase softtabstop spelllang sps sta su swb synmaxcol tagbsearch tb tenc terse thesaurus titlestring toolbariconsize ttimeout ttymouse udir updatetime verbose viminfo warn wfw wildcharm winaltkeys winptydll wmw writebackup
syn keyword vimOption contained aleph arab autowrite backupdir belloff bk bri bufhidden cdpath cindent cm colorcolumn completeopt cpoptions cscopetag csto debug dictionary display ef endofline esckeys fdc fdt fileencoding fixeol foldcolumn foldminlines fp gfn gtl guipty hi hkp ignorecase imcmdline imsf incsearch infercase isk keymap langmenu linebreak lm lsp makeef maxfuncdepth menc mls modelines mousehide mp nf oft pa patchmode pfn popt printexpr pt pyxversion regexpengine ri rop rulerformat scl scs sessionoptions shellquote shiftround showfulltag sidescrolloff smartindent sol spellsuggest sr stal sua swf syntax tagcase tbi term textauto tildeop tk top ttimeoutlen ttyscroll ul ur verbosefile viminfofile wb wh wildignore window winwidth wop writedelay
syn keyword vimOption contained allowrevins arabic autowriteall backupext beval bkc briopt buflisted cedit cink cmdheight columns concealcursor cpt cscopetagorder csverb deco diff dy efm eol et fde fen fileencodings fk foldenable foldnestmax fs gfs gtt guitablabel hid hl im imd imst inde insertmode iskeyword keymodel langnoremap lines lmap luadll makeencoding maxmapdepth menuitems mm modifiable mousem mps nrformats ofu packpath path ph pp printfont pumheight qe relativenumber rightleft rs runtimepath scr sect sft shellredir shiftwidth showmatch signcolumn smarttab sp spf srr startofline suffixes switchbuf ta taglength tbidi termbidi textmode timeout tl tpm ttm ttytype undodir ut vfile virtualedit wc whichwrap wildignorecase winfixheight wiv wrap ws
syn keyword vimOption contained altkeymap arabicshape aw backupskip bex bl brk buftype cf cinkeys cmdwinheight com conceallevel crb cscopeverbose cuc def diffexpr ea ei ep eventignore fdi fenc fileformat fkmap foldexpr foldopen fsync gfw guicursor guitabtooltip hidden hlg imactivatefunc imdisable imstatusfunc indentexpr is isp keywordprg langremap linespace lnr lw makeprg maxmem mfd mmd modified mousemodel msm nu omnifunc para pdev pheader preserveindent printheader pvh quoteescape remap rightleftcmd rtp sb scroll sections sh shellslash shm showmode siso smc spc spl ss statusline suffixesadd sws tabline tagrelative tbis termencoding textwidth timeoutlen tm tr tty tw undofile vb vi visualbell wcm wi wildmenu winfixwidth wiw wrapmargin ww
syn keyword vimOption contained ambiwidth ari awa balloondelay bexpr bo browsedir casemap cfu cino cmp comments confirm cryptmethod cspc cul define diffopt ead ek equalalways ex fdl fencs fileformats flp foldignore foldtext ft ghr guifont helpfile highlight hls
" vimOptions: These are the turn-off setting variants {{{2
syn keyword vimOption contained noacd noallowrevins noantialias noarabic noarshape noautoread noaw noballooneval nobinary nobomb nobuflisted nocin noconfirm nocrb nocscopeverbose nocsverb nocursorbind nodeco nodiff noeb noek noendofline noerrorbells noex nofen nofixendofline nofkmap nofsync noguipty nohk nohkp noic noim noimd noinf nois nolangnoremap nolazyredraw nolinebreak nolist noloadplugins nolrm noma nomagic noml nomodeline nomodified nomousef nomousehide nonumber noopendevice nopi nopreviewwindow nopvw norelativenumber norestorescreen nori norl noro noru nosb noscb noscs nosft noshelltemp noshortname noshowfulltag noshowmode nosm nosmartindent nosmd nosol nosplitbelow nospr nossl nostartofline noswapfile nota notagrelative notbi notbs noterse notextmode notgst notimeout noto notr nottybuiltin notx noundofile novisualbell nowarn noweirdinvert nowfw nowildignorecase nowinfixheight nowiv nowrap nowrite nowritebackup
@@ -49,15 +49,15 @@ syn keyword vimOption contained invai invaltkeymap invar invarabicshape invautoc
syn keyword vimOption contained invakm invanti invarab invari invautoindent invautowriteall invbackup invbin invbl invbri invci invcompatible invcp invcscopetag invcst invcul invcursorline invdg invea invedcompatible invemoji invequalalways invet invexrc invfileignorecase invfk invfs invgdefault invhidden invhkmapp invhlsearch invignorecase invimcmdline invincsearch invinsertmode invjs
" termcap codes (which can also be set) {{{2
syn keyword vimOption contained t_8b t_AB t_AL t_CV t_Co t_DL t_F1 t_F3 t_F5 t_F7 t_F9 t_IS t_K1 t_K3 t_K4 t_K5 t_K6 t_K7 t_K8 t_K9 t_KA t_KB t_KC t_KD t_KE t_KF t_KG t_KH t_KI t_KJ t_KK t_KL t_RB t_RI t_RV t_SI t_SR t_Sb t_Sf t_WP t_WS t_ZH t_ZR t_al t_bc t_cd t_ce t_cl t_cm t_cs t_da t_db t_dl t_fs t_k1 t_k2 t_k3 t_k4 t_k5 t_k6 t_k7 t_k8 t_k9 t_kB t_kD t_kI t_kN t_kP t_kb t_kd t_ke t_kh t_kl t_kr t_ks t_ku t_le t_mb t_md t_me t_mr t_ms t_nd t_op t_se t_so t_sr t_te t_ti t_ts t_u7 t_ue t_us t_ut t_vb t_ve t_vi t_vs t_xn t_xs
syn keyword vimOption contained t_8f t_AF t_CS t_Ce t_Cs t_EI t_F2 t_F4 t_F6 t_F8 t_IE
syn keyword vimOption contained t_8b t_AB t_al t_bc t_BE t_ce t_cl t_Co t_Cs t_CV t_db t_DL t_EI t_F2 t_F4 t_F6 t_F8 t_fs t_IE t_k1 t_k2 t_K3 t_K4 t_K5 t_K6 t_K7 t_k8 t_K8 t_k9 t_K9 t_KA t_kb t_kB t_KB t_KC t_kd t_kD t_KD t_ke t_KE t_KF t_KG t_kh t_KH t_kI t_KI t_KJ t_KK t_kl t_KL t_kN t_kP t_kr t_ks t_ku t_le t_mb t_md t_me t_mr t_ms t_nd t_op t_PE t_PS t_RB t_RC t_RF t_RI t_RS t_RV t_Sb t_SC t_se t_Sf t_SH t_SI t_so t_sr t_SR t_te t_Te t_ti t_ts t_Ts t_u7 t_ue t_us t_ut t_vb t_ve t_vi t_vs t_VS t_WP t_WS t_xn t_xs t_ZH t_ZR
syn keyword vimOption contained t_8f t_AF t_AL t_BD t_cd t_Ce t_cm t_cs t_CS t_da t_dl t_EC t_F1 t_F3 t_F5 t_F7 t_F9 t_GP t_IS t_K1 t_k3 t_k4 t_k5 t_k6 t_k7
syn match vimOption contained "t_%1"
syn match vimOption contained "t_#2"
syn match vimOption contained "t_#4"
syn match vimOption contained "t_%1"
syn match vimOption contained "t_%i"
syn match vimOption contained "t_&8"
syn match vimOption contained "t_*7"
syn match vimOption contained "t_@7"
syn match vimOption contained "t_*7"
syn match vimOption contained "t_&8"
syn match vimOption contained "t_%i"
syn match vimOption contained "t_k;"
" unsupported settings: some were supported by vi but don't do anything in vim {{{2
@@ -66,21 +66,21 @@ syn keyword vimErrSetting contained bioskey biosk conskey consk autoprint beauti
" AutoCmd Events {{{2
syn case ignore
syn keyword vimAutoEvent contained BufAdd BufCreate BufDelete BufEnter BufFilePost BufFilePre BufHidden BufLeave BufNew BufNewFile BufRead BufReadCmd BufReadPost BufReadPre BufUnload BufWinEnter BufWinLeave BufWipeout BufWrite BufWriteCmd BufWritePost BufWritePre CmdUndefined CmdwinEnter CmdwinLeave ColorScheme CompleteDone CursorHold CursorHoldI CursorMoved CursorMovedI EncodingChanged FileAppendCmd FileAppendPost FileAppendPre FileChangedRO FileChangedShell FileChangedShellPost FileEncoding FileReadCmd FileReadPost FileReadPre FileType FileWriteCmd FileWritePost FileWritePre FilterReadPost FilterReadPre FilterWritePost FilterWritePre FocusGained FocusLost FuncUndefined GUIEnter GUIFailed InsertChange InsertCharPre InsertEnter InsertLeave MenuPopup OptionSet QuickFixCmdPost QuickFixCmdPre QuitPre RemoteReply SessionLoadPost ShellCmdPost ShellFilterPost SourceCmd SourcePre SpellFileMissing StdinReadPost StdinReadPre SwapExists Syntax TabClosed TabEnter TabLeave TabNew TermChanged TermResponse TextChanged TextChangedI User VimEnter VimLeave VimLeavePre VimResized WinEnter WinLeave WinNew
syn keyword vimAutoEvent contained BufAdd BufCreate BufDelete BufEnter BufFilePost BufFilePre BufHidden BufLeave BufNew BufNewFile BufRead BufReadCmd BufReadPost BufReadPre BufUnload BufWinEnter BufWinLeave BufWipeout BufWrite BufWriteCmd BufWritePost BufWritePre CmdlineEnter CmdlineLeave CmdUndefined CmdwinEnter CmdwinLeave ColorScheme CompleteDone CursorHold CursorHoldI CursorMoved CursorMovedI EncodingChanged FileAppendCmd FileAppendPost FileAppendPre FileChangedRO FileChangedShell FileChangedShellPost FileEncoding FileReadCmd FileReadPost FileReadPre FileType FileWriteCmd FileWritePost FileWritePre FilterReadPost FilterReadPre FilterWritePost FilterWritePre FocusGained FocusLost FuncUndefined GUIEnter GUIFailed InsertChange InsertCharPre InsertEnter InsertLeave MenuPopup OptionSet QuickFixCmdPost QuickFixCmdPre QuitPre RemoteReply SessionLoadPost ShellCmdPost ShellFilterPost SourceCmd SourcePre SpellFileMissing StdinReadPost StdinReadPre SwapExists Syntax TabClosed TabEnter TabLeave TabNew TermChanged TermResponse TextChanged TextChangedI User VimEnter VimLeave VimLeavePre VimResized WinEnter WinLeave WinNew
" Highlight commonly used Groupnames {{{2
syn keyword vimGroup contained Comment Constant String Character Number Boolean Float Identifier Function Statement Conditional Repeat Label Operator Keyword Exception PreProc Include Define Macro PreCondit Type StorageClass Structure Typedef Special SpecialChar Tag Delimiter SpecialComment Debug Underlined Ignore Error Todo
" Default highlighting groups {{{2
syn keyword vimHLGroup contained ColorColumn Cursor CursorColumn CursorIM CursorLine CursorLineNr DiffAdd DiffChange DiffDelete DiffText Directory EndOfBuffer ErrorMsg FoldColumn Folded IncSearch LineNr MatchParen Menu ModeMsg MoreMsg NonText Normal Pmenu PmenuSbar PmenuSel PmenuThumb Question Scrollbar Search SignColumn SpecialKey SpellBad SpellCap SpellLocal SpellRare StatusLine StatusLineNC TabLine TabLineFill TabLineSel Title Tooltip VertSplit Visual VisualNOS WarningMsg WildMenu
syn keyword vimHLGroup contained ColorColumn Cursor CursorColumn CursorIM CursorLine CursorLineNr DiffAdd DiffChange DiffDelete DiffText Directory EndOfBuffer ErrorMsg FoldColumn Folded IncSearch LineNr MatchParen Menu ModeMsg MoreMsg NonText Normal Pmenu PmenuSbar PmenuSel PmenuThumb Question QuickFixLine Scrollbar Search SignColumn SpecialKey SpellBad SpellCap SpellLocal SpellRare StatusLine StatusLineNC TabLine TabLineFill TabLineSel Title Tooltip VertSplit Visual VisualNOS WarningMsg WildMenu
syn match vimHLGroup contained "Conceal"
syn case match
" Function Names {{{2
syn keyword vimFuncName contained abs append argv assert_fails assert_notequal atan2 buflisted bufwinid byteidxcomp ch_close_in ch_getjob ch_open ch_sendraw char2nr complete copy cscope_connection did_filetype escape execute expand filewritable float2nr fnamemodify foldtext function getbufline getcharsearch getcmdwintype getfontname getftype getpid getregtype getwininfo glob has_key histdel hlexists index inputrestore invert items job_start js_decode json_encode libcall line2byte log map match matcharg matchlist max mode nr2char perleval printf pyeval reltime remote_expr remote_read rename reverse screenchar search searchpairpos serverlist setcmdpos setloclist setqflist settabwinvar shellescape sin soundfold split str2nr strdisplaywidth stridx strpart strwidth synID synconcealed systemlist tabpagewinnr tan test_alloc_fail test_garbagecollect_now test_null_job test_null_string timer_pause timer_stopall tr undofile values wildmenumode win_gotoid winbufnr winline winrestview wordcount
syn keyword vimFuncName contained acos argc asin assert_false assert_notmatch browse bufloaded bufwinnr call ch_evalexpr ch_info ch_read ch_setoptions cindent complete_add cos cursor diff_filler eval exepath extend filter floor foldclosed foldtextresult garbagecollect getbufvar getcmdline getcompletion getfperm getline getpos gettabinfo getwinposx glob2regpat haslocaldir histget hostname input inputsave isdirectory job_getchannel job_status js_encode keys libcallnr lispindent log10 maparg matchadd matchdelete matchstr min mzeval or pow pumvisible range reltimefloat remote_foreground remote_send repeat round screencol searchdecl searchpos setbufline setbufvar setfperm setmatches setreg setwinvar shiftwidth sinh spellbadword sqrt strcharpart strftime string strridx submatch synIDattr synstack tabpagebuflist tagfiles tanh test_autochdir test_null_channel test_null_list test_settime timer_start tolower trunc undotree virtcol win_findbuf win_id2tabwin wincol winnr winsaveview writefile
syn keyword vimFuncName contained add argidx assert_equal assert_inrange assert_true browsedir bufname byte2line ceil ch_evalraw ch_log ch_readraw ch_status clearmatches complete_check cosh deepcopy diff_hlID eventhandler exists feedkeys finddir fmod foldclosedend foreground get getchar getcmdpos getcurpos getfsize getloclist getqflist gettabvar getwinposy globpath hasmapto histnr iconv inputdialog inputsecret islocked job_info job_stop json_decode len line localtime luaeval mapcheck matchaddpos matchend matchstrpos mkdir nextnonblank pathshorten prevnonblank py3eval readfile reltimestr remote_peek remove resolve screenattr screenrow searchpair server2client setcharsearch setline setpos settabvar sha256 simplify sort spellsuggest str2float strchars strgetchar strlen strtrans substitute synIDtrans system tabpagenr taglist tempname test_disable_char_avail test_null_dict test_null_partial timer_info timer_stop toupper type uniq visualmode win_getid win_id2win winheight winrestcmd winwidth xor
syn keyword vimFuncName contained and arglistid assert_exception assert_match atan bufexists bufnr byteidx ch_close ch_getbufnr ch_logfile ch_sendexpr changenr col confirm count delete empty executable exp filereadable findfile fnameescape foldlevel funcref getbufinfo getcharmod getcmdtype getcwd getftime getmatches getreg gettabwinvar getwinvar has histadd hlID indent inputlist insert isnan job_setoptions join
syn keyword vimFuncName contained abs append argv assert_fails assert_notequal atan browsedir bufname byte2line ceil ch_close ch_getbufnr ch_logfile ch_sendexpr cindent complete_add cos cursor diff_filler eval exepath extend filter floor foldclosed foldtextresult garbagecollect getbufvar getcmdline getcompletion getfperm getline getpos gettabinfo getwinposx glob2regpat haslocaldir histget hostname input inputsave isdirectory job_getchannel job_status js_encode len line2byte log10 mapcheck matcharg matchstr mkdir nr2char pow py3eval readfile remote_expr remote_send repeat screenattr search searchpos setbufvar setline setqflist setwinvar simplify soundfold sqrt strcharpart strftime string strridx submatch synID synstack tabpagebuflist tagfiles tanh term_getattr term_getline term_getstatus term_gettty term_sendkeys term_wait test_feedinput test_null_channel test_null_list test_override timer_pause timer_stopall tr undofile values wildmenumode win_findbuf winheight winline winrestview wordcount
syn keyword vimFuncName contained acos argc asin assert_false assert_notmatch atan2 bufexists bufnr byteidx changenr ch_close_in ch_getjob ch_open ch_sendraw clearmatches complete_check cosh deepcopy diff_hlID eventhandler exists feedkeys finddir fmod foldclosedend foreground get getchar getcmdpos getcurpos getfsize getloclist getqflist gettabvar getwinposy globpath hasmapto histnr iconv inputdialog inputsecret islocked job_info job_stop json_decode libcall lispindent luaeval match matchdelete matchstrpos mode or prevnonblank pyeval reltime remote_foreground remote_startserver resolve screenchar searchdecl server2client setcharsearch setloclist setreg sha256 sin spellbadword str2float strchars strgetchar strlen strtrans substitute synIDattr system tabpagenr taglist tempname term_getcursor term_getscrolled term_gettitle term_list term_setsize test_alloc_fail test_garbagecollect_now test_null_dict test_null_partial test_settime timer_start tolower trunc undotree virtcol winbufnr win_getid win_id2tabwin winnr winsaveview writefile
syn keyword vimFuncName contained add argidx assert_equal assert_inrange assert_report balloon_show buflisted bufwinid byteidxcomp char2nr ch_evalexpr ch_info ch_read ch_setoptions col confirm count delete empty executable exp filereadable findfile fnameescape foldlevel funcref getbufinfo getcharmod getcmdtype getcwd getftime getmatches getreg gettabwinvar getwinvar has histadd hlexists indent inputlist insert isnan job_setoptions join json_encode libcallnr localtime map matchadd matchend max mzeval pathshorten printf pyxeval reltimefloat remote_peek remove reverse screencol searchpair serverlist setcmdpos setmatches settabvar shellescape sinh spellsuggest str2nr strdisplaywidth stridx strpart strwidth synconcealed synIDtrans systemlist tabpagewinnr tan term_getaltscreen term_getjob term_getsize term_getttty term_scrape term_start test_autochdir test_ignore_error test_null_job test_null_string timer_info timer_stop toupper type uniq visualmode wincol win_gotoid win_id2win winrestcmd winwidth xor
syn keyword vimFuncName contained and arglistid assert_exception assert_match assert_true browse bufloaded bufwinnr call ch_canread ch_evalraw ch_log ch_readraw ch_status complete copy cscope_connection did_filetype escape execute expand filewritable float2nr fnamemodify foldtext function getbufline getcharsearch getcmdwintype getfontname getftype getpid getregtype getwininfo glob has_key histdel hlID index inputrestore invert items job_start js_decode keys line log maparg matchaddpos matchlist min nextnonblank perleval pumvisible range reltimestr remote_read rename round screenrow searchpairpos setbufline setfperm setpos settabwinvar shiftwidth sort split
"--- syntax here and above generated by mkvimvim ---
" Special Vim Highlighting (not automatic) {{{1
@@ -164,7 +164,6 @@ endif
syn match vimNumber "\<\d\+\%(\.\d\+\%([eE][+-]\=\d\+\)\=\)\=" skipwhite nextgroup=vimGlobal,vimSubst,vimCommand
syn match vimNumber "-\d\+\%(\.\d\+\%([eE][+-]\=\d\+\)\=\)\=" skipwhite nextgroup=vimGlobal,vimSubst,vimCommand
syn match vimNumber "\<0[xX]\x\+"
syn match vimNumber "\<0[bB][01]\+"
syn match vimNumber "\%(^\|[^a-zA-Z]\)\zs#\x\{6}"
" All vimCommands are contained by vimIsCommands. {{{2
@@ -299,8 +298,8 @@ syn region vimPatSepZone oneline contained matchgroup=vimPatSepZ start="\\%\
syn region vimPatRegion contained transparent matchgroup=vimPatSepR start="\\[z%]\=(" end="\\)" contains=@vimSubstList oneline
syn match vimNotPatSep contained "\\\\"
syn cluster vimStringGroup contains=vimEscapeBrace,vimPatSep,vimNotPatSep,vimPatSepErr,vimPatSepZone,@Spell
syn region vimString oneline keepend start=+[^:a-zA-Z>!\\@]"+lc=1 skip=+\\\\\|\\"+ end=+"+ contains=@vimStringGroup
syn region vimString oneline keepend start=+[^:a-zA-Z>!\\@]'+lc=1 end=+'+
syn region vimString oneline keepend start=+[^a-zA-Z>!\\@]"+lc=1 skip=+\\\\\|\\"+ end=+"+ contains=@vimStringGroup
syn region vimString oneline keepend start=+[^a-zA-Z>!\\@]'+lc=1 end=+'+
syn region vimString oneline start=+=!+lc=1 skip=+\\\\\|\\!+ end=+!+ contains=@vimStringGroup
syn region vimString oneline start="=+"lc=1 skip="\\\\\|\\+" end="+" contains=@vimStringGroup
syn region vimString oneline start="\s/\s*\A"lc=1 skip="\\\\\|\\+" end="/" contains=@vimStringGroup
@@ -560,7 +559,7 @@ syn match vimHiBang contained "!" skipwhite nextgroup=@vimHighlightCluster
syn match vimHiGroup contained "\i\+"
syn case ignore
syn keyword vimHiAttrib contained none bold inverse italic reverse standout underline undercurl nocombine
syn keyword vimHiAttrib contained none bold inverse italic reverse standout underline undercurl
syn keyword vimFgBgAttrib contained none bg background fg foreground
syn case match
syn match vimHiAttribList contained "\i\+" contains=vimHiAttrib
+60 -24
View File
@@ -16,7 +16,7 @@ XP/2003/Vista/7/8/10). There are also instructions for pre-XP systems, but
they might no longer work.
The recommended way is to build a 32 bit Vim, also on 64 bit systems. You can
build a 64 bit Vim if you like, the executable will be bigger and Vim wan't be
build a 64 bit Vim if you like, the executable will be bigger and Vim won't be
any faster, but you can edit files larger than 2 Gbyte.
@@ -42,7 +42,7 @@ Contents:
The currently recommended way (that means it has been verified to work) is
using the "Visual Studio Community 2015" installation. This includes the SDK
needed to target Windows XP. But not older Windows versions (95, 97), see
needed to target Windows XP. But not older Windows versions (95, 98), see
|msvc-2008-express| below for that
@@ -53,6 +53,10 @@ We do not provide download links, since Microsoft keeps changing them. You
can search for "Visual Studio Community 2015", for example. You will need to
create a Microsoft account (it's free).
When installing "Visual Studio Community 2015 with Update 3" make sure to
select "custom" and check "Windows XP Support for C++" and all checkboxes
under "Universal Windows App Development Tools"
Visual Studio
-------------
@@ -285,17 +289,11 @@ your AUTOEXEC.BAT file with a line like:
or on NT/2000/XP, go to the Control Panel, (Performance and Maintenance),
System, Advanced, and edit the environment from there. If you use msys2
compilers, set your installed paths:
compilers, set your installed paths (normally one of the following):
C:\msys2\mingw32\bin
or
C:\msys64\mingw32\bin
for 32bit. And 64bit:
C:\msys2\mingw64\bin
or
C:\msys64\mingw64\bin
C:\msys32\mingw32\bin (32-bit msys2, targeting 32-bit builds)
C:\msys64\mingw32\bin (64-bit msys2, targeting 32-bit builds)
C:\msys64\mingw64\bin (64-bit msys2, targeting 64-bit builds)
Test if gcc is on your path. From a CMD (or COMMAND on '95/98) window:
@@ -430,9 +428,9 @@ And if you use msys2 to build python support (as one line):
DYNAMIC_PYTHON=yes
PYTHON_VER=27
DYNAMIC_PYTHON_DLL=libpython2.7.dll
ARCH=x86-64
STATIC_STDCPLUS=yes
(This is for 64-bit builds. For 32-bit builds, replace mingw64 with mingw32.)
You will end up with a Python-enabled, Win32 version. Enjoy!
@@ -590,7 +588,7 @@ E.g. When using MSVC (as one line):
Or when using MinGW (as one line):
mingw32-make -f Make_ming.mak
LUA=C:\projects\lua53 DYNAMIC_LUA=yes LUA_VER=53
LUA=C:/projects/lua53 DYNAMIC_LUA=yes LUA_VER=53
Or when using Cygwin (as one line) (untested):
@@ -622,7 +620,7 @@ E.g. When using MSVC (as one line):
Or when using MinGW (as one line):
mingw32-make -f Make_ming.mak
PERL=C:\Perl DYNAMIC_PERL=yes PERL_VER=522
PERL=C:/Perl DYNAMIC_PERL=yes PERL_VER=522
11. Building with Ruby support
@@ -684,12 +682,12 @@ config.h and Ruby's DLL name. Here are the steps for working around them:
Note that ruby_2_4 is the branch name for Ruby 2.4.X's source code.
There is no need to build whole Ruby, just config.h is needed.
If you use 32-bit MSVC10, the config.h is generated in the
If you use 32-bit MSVC 2015, the config.h is generated in the
.ext\include\i386-mswin32_140 directory.
3) Install the generated config.h.
xcopy /s .ext\include E:\Ruby24\include\ruby-2.4.0
xcopy /s .ext\include C:\Ruby24\include\ruby-2.4.0
Note that 2.4.0 is Ruby API version of Ruby 2.4.X.
You may need to close the console and reopen it to pick up the new $PATH.
@@ -712,7 +710,7 @@ Using MinGW is easier than using MSVC when linking with RubyInstaller.
After you install RubyInstaller, just type this (as one line):
mingw32-make -f Make_ming.mak
RUBY=C:/Ruby22 DYNAMIC_RUBY=yes RUBY_VER=22 RUBY_API_VER_LONG=2.2.0
RUBY=C:/Ruby24 DYNAMIC_RUBY=yes RUBY_VER=24 RUBY_API_VER_LONG=2.4.0
WINVER=0x501
If you set WINVER explicitly, it must be set to >=0x500, when building with
@@ -749,7 +747,7 @@ E.g. When using MSVC (as one line):
Or when using MinGW (as one line):
mingw32-make -f Make_ming.mak
TCL=C:\Tcl86 DYNAMIC_TCL=yes TCL_VER=86 TCL_VER_LONG=8.6
TCL=C:/Tcl86 DYNAMIC_TCL=yes TCL_VER=86 TCL_VER_LONG=8.6
13. Building with Terminal support
@@ -777,13 +775,14 @@ The Windows 3.1x support was removed in patch 7.4.1364.
15. MS-DOS
==========
The MS-DOS support was removed in patch 7.4.1399.
The MS-DOS support was removed in patch 7.4.1399. Only very old Vim versions
work on MS-DOS because of the limited amount of memory available.
16. Installing after building from sources
==========================================
[provided by Michael Soyka]
[provided by Michael Soyka, updated by Ken Takata]
After you've built the Vim binaries as described above, you're ready to
install Vim on your system. However, if you've obtained the Vim sources
@@ -809,17 +808,54 @@ correct directory structure.
new binaries you created above into "vim80":
copy src\*.exe vim80
copy src\GvimExt\gvimext.dll vim80
copy src\tee\tee.exe vim80
copy src\xxd\xxd.exe vim80
C. Move the "vim80" directory into the Vim installation subdirectory
To install the "Edit with Vim" popup menu, you need both 32-bit and 64-bit
versions of gvimext.dll. They should be copied to "vim80\GvimExt32" and
"vim80\GvimExt64" respectively.
First, build the 32-bit version, then:
mkdir vim80\GvimExt32
copy src\GvimExt\gvimext.dll vim80\GvimExt32
Next, clean the 32-bit version and build the 64-bit version, then:
mkdir vim80\GvimExt64
copy src\GvimExt\gvimext.dll vim80\GvimExt64
C. Copy gettext and iconv DLLs into the "vim80" directory
----------------------------------------------------------
Get gettext and iconv DLLs from the following site:
https://github.com/mlocati/gettext-iconv-windows/releases
Both 64- and 32-bit versions are needed.
Download the files gettextX.X.X.X-iconvX.XX-shared-{32,64}.zip, extract
DLLs and place them as follows:
vim80\
| libintl-8.dll
| libiconv-2.dll
| libgcc_s_sjlj-1.dll (only for 32-bit)
|
+ GvimExt32\
| libintl-8.dll
| libiconv-2.dll
| libgcc_s_sjlj-1.dll
|
` GvimExt64\
libintl-8.dll
libiconv-2.dll
The DLLs in the "vim80" should be the same bitness with the (g)vim.exe.
D. Move the "vim80" directory into the Vim installation subdirectory
---------------------------------------------------------------------
Move the "vim80" subdirectory into the subdirectory where you want Vim
to be installed. Typically, this subdirectory will be named "vim".
If you already have a "vim80" subdirectory in "vim", delete it first
by running its uninstal.exe program.
D. Install Vim
E. Install Vim
---------------
"cd" to your Vim installation subdirectory "vim\vim80" and run the
"install.exe" program. It will ask you a number of questions about
+1 -1
View File
@@ -1255,7 +1255,7 @@
</dict>
</array>
<key>CFBundleVersion</key>
<string>141</string>
<string>142</string>
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
+3 -4
View File
@@ -2111,19 +2111,16 @@ run_message_test: $(MESSAGE_TEST_TARGET)
# Run individual OLD style test.
# These do not depend on the executable, compile it when needed.
test1 \
test_changelist \
test_close_count \
test_erasebackword \
test_eval \
test_fixeol \
test_insertcount \
test_listchars \
test_search_mbyte \
test_wordcount \
test3 test11 test14 test15 test17 \
test29 test30 test36 test37 test39 \
test42 test44 test48 test49 \
test50 test52 test55 test59 \
test50 test52 test59 \
test64 test68 test69 \
test70 test72 test73 \
test85 test86 test87 test88 \
@@ -2217,6 +2214,7 @@ test_arglist \
test_let \
test_lineending \
test_lispwords \
test_listdict \
test_listlbr \
test_listlbr_utf8 \
test_lua \
@@ -2276,6 +2274,7 @@ test_arglist \
test_stat \
test_statusline \
test_substitute \
test_swap \
test_syn_attr \
test_syntax \
test_system \
+23 -1
View File
@@ -716,7 +716,29 @@ readfile(
/* Set swap file protection bits after creating it. */
if (swap_mode > 0 && curbuf->b_ml.ml_mfp != NULL
&& curbuf->b_ml.ml_mfp->mf_fname != NULL)
(void)mch_setperm(curbuf->b_ml.ml_mfp->mf_fname, (long)swap_mode);
{
char_u *swap_fname = curbuf->b_ml.ml_mfp->mf_fname;
/*
* If the group-read bit is set but not the world-read bit, then
* the group must be equal to the group of the original file. If
* we can't make that happen then reset the group-read bit. This
* avoids making the swap file readable to more users when the
* primary group of the user is too permissive.
*/
if ((swap_mode & 044) == 040)
{
stat_T swap_st;
if (mch_stat((char *)swap_fname, &swap_st) >= 0
&& st.st_gid != swap_st.st_gid
&& fchown(curbuf->b_ml.ml_mfp->mf_fd, -1, st.st_gid)
== -1)
swap_mode &= 0600;
}
(void)mch_setperm(swap_fname, (long)swap_mode);
}
#endif
}
+24 -17
View File
@@ -4553,22 +4553,6 @@ check_termcode(
{
int need_flush = FALSE;
/* Only set 'ttymouse' automatically if it was not set
* by the user already. */
if (!option_was_set((char_u *)"ttym"))
{
# ifdef TTYM_SGR
if (version >= 277)
set_option_value((char_u *)"ttym", 0L,
(char_u *)"sgr", 0);
else
# endif
/* if xterm version >= 95 use mouse dragging */
if (version >= 95)
set_option_value((char_u *)"ttym", 0L,
(char_u *)"xterm2", 0);
}
/* if xterm version >= 141 try to get termcap codes */
if (version >= 141)
{
@@ -4587,6 +4571,28 @@ check_termcode(
* 256, libvterm supports even more. */
if (mch_getenv((char_u *)"COLORS") == NULL)
may_adjust_color_count(256);
# ifdef FEAT_MOUSE_SGR
/* Libvterm can handle SGR mouse reporting. */
if (!option_was_set((char_u *)"ttym"))
set_option_value((char_u *)"ttym", 0L,
(char_u *)"sgr", 0);
# endif
}
/* Only set 'ttymouse' automatically if it was not set
* by the user already. */
if (!option_was_set((char_u *)"ttym"))
{
# ifdef FEAT_MOUSE_SGR
if (version >= 277)
set_option_value((char_u *)"ttym", 0L,
(char_u *)"sgr", 0);
else
# endif
/* if xterm version >= 95 use mouse dragging */
if (version >= 95)
set_option_value((char_u *)"ttym", 0L,
(char_u *)"xterm2", 0);
}
/* Detect terminals that set $TERM to something like
@@ -4757,10 +4763,11 @@ check_termcode(
if (i - j >= 21 && STRNCMP(tp + j + 3, "rgb:", 4) == 0
&& tp[j + 11] == '/' && tp[j + 16] == '/')
{
#ifdef FEAT_TERMINAL
int rval = hexhex2nr(tp + j + 7);
int gval = hexhex2nr(tp + j + 12);
int bval = hexhex2nr(tp + j + 17);
#endif
if (is_bg)
{
char *newval = (3 * '6' < tp[j+7] + tp[j+12]
+25 -22
View File
@@ -38,6 +38,8 @@
* in tl_scrollback are no longer used.
*
* TODO:
* - Termdebug: issue #2154 might be avoided by adding -quiet to gdb?
* patch by Christian, 2017 Oct 23.
* - in GUI vertical split causes problems. Cursor is flickering. (Hirohito
* Higashi, 2017 Sep 19)
* - double click in Window toolbar starts Visual mode (but not always?).
@@ -51,8 +53,6 @@
* Also: #2223
* - implement term_setsize()
* - Termdebug does not work when Vim build with mzscheme. gdb hangs.
* - Termdebug: issue #2154 might be avoided by adding -quiet to gdb?
* patch by Christian, 2017 Oct 23.
* - MS-Windows GUI: WinBar has tearoff item
* - MS-Windows GUI: still need to type a key after shell exits? #1924
* - What to store in a session file? Shell at the prompt would be OK to
@@ -1540,6 +1540,9 @@ terminal_loop(int blocking)
int c;
int termkey = 0;
int ret;
#ifdef UNIX
int tty_fd = curbuf->b_term->tl_job->jv_channel->ch_part[get_tty_part(curbuf->b_term)].ch_fd;
#endif
/* Remember the terminal we are sending keys to. However, the terminal
* might be closed while waiting for a character, e.g. typing "exit" in a
@@ -1552,26 +1555,6 @@ terminal_loop(int blocking)
position_cursor(curwin, &curbuf->b_term->tl_cursor_pos);
may_set_cursor_props(curbuf->b_term);
#ifdef UNIX
{
int part = get_tty_part(curbuf->b_term);
int fd = curbuf->b_term->tl_job->jv_channel->ch_part[part].ch_fd;
if (isatty(fd))
{
ttyinfo_T info;
/* Get the current backspace and enter characters of the pty. */
if (get_tty_info(fd, &info) == OK)
{
term_backspace_char = info.backspace;
term_enter_char = info.enter;
term_nl_does_cr = info.nl_does_cr;
}
}
}
#endif
while (blocking || vpeekc() != NUL)
{
/* TODO: skip screen update when handling a sequence of keys. */
@@ -1581,6 +1564,26 @@ terminal_loop(int blocking)
break;
update_cursor(curbuf->b_term, FALSE);
#ifdef UNIX
/*
* The shell or another program may change the tty settings. Getting
* them for every typed character is a bit of overhead, but it's needed
* for the first CR typed, e.g. when Vim starts in a shell.
*/
if (isatty(tty_fd))
{
ttyinfo_T info;
/* Get the current backspace and enter characters of the pty. */
if (get_tty_info(tty_fd, &info) == OK)
{
term_backspace_char = info.backspace;
term_enter_char = info.enter;
term_nl_does_cr = info.nl_does_cr;
}
}
#endif
c = term_vgetc();
if (!term_use_loop())
/* job finished while waiting for a character */
+1 -4
View File
@@ -23,7 +23,6 @@ SCRIPTS_ALL = \
test42.out \
test44.out \
test48.out \
test55.out \
test64.out \
test68.out \
test69.out \
@@ -34,14 +33,11 @@ SCRIPTS_ALL = \
test95.out \
test99.out \
test108.out \
test_changelist.out \
test_close_count.out \
test_erasebackword.out \
test_eval.out \
test_fixeol.out \
test_insertcount.out \
test_listchars.out \
test_search_mbyte.out \
test_wordcount.out
@@ -123,6 +119,7 @@ NEW_TESTS = test_arabic.res \
test_langmap.res \
test_let.res \
test_lineending.res \
test_listdict.res \
test_listlbr.res \
test_listlbr_utf8.res \
test_lua.res \
-4
View File
@@ -78,22 +78,18 @@ SCRIPT = test1.out test3.out \
test29.out \
test30.out test36.out test37.out test39.out \
test42.out test44.out test48.out test49.out \
test55.out \
test64.out test68.out test69.out \
test72.out test77a.out test88.out \
test94.out test95.out test99.out test108.out \
test_autocmd_option.out \
test_breakindent.out \
test_changelist.out \
test_close_count.out \
test_erasebackword.out \
test_eval.out \
test_fixeol.out \
test_insertcount.out \
test_listchars.out \
test_listlbr.out \
test_listlbr_utf8.out \
test_search_mbyte.out \
test_utf8.out \
test_wordcount.out
+1
View File
@@ -252,6 +252,7 @@ let s:flaky = [
\ 'Test_reltime()',
\ 'Test_terminal_composing_unicode()',
\ 'Test_terminal_noblock()',
\ 'Test_terminal_redir_file()',
\ 'Test_with_partial_callback()',
\ ]
+1 -1
View File
@@ -1,4 +1,4 @@
" Autoload script used by test55 and test60
" Autoload script used by test_listdict.vim, test_exists.vim and test_let.vim
let footest#x = 1
func footest#F()
return 0
+9 -2
View File
@@ -113,7 +113,9 @@ func s:kill_server(cmd)
endif
endfunc
" Wait for up to a second for "expr" to become true.
" Wait for up to a second for "expr" to become true. "expr" can be a
" stringified expression to evaluate, or a funcref without arguments.
"
" Return time slept in milliseconds. With the +reltime feature this can be
" more than the actual waiting time. Without +reltime it can also be less.
func WaitFor(expr, ...)
@@ -124,8 +126,13 @@ func WaitFor(expr, ...)
else
let slept = 0
endif
if type(a:expr) == v:t_func
let Test = a:expr
else
let Test = {-> eval(a:expr) }
endif
for i in range(timeout / 10)
if eval(a:expr)
if Test()
if has('reltime')
return float2nr(reltimefloat(reltime(start)) * 1000)
endif
-586
View File
@@ -1,586 +0,0 @@
Tests for List and Dictionary types. vim: set ft=vim :
STARTTEST
:so small.vim
:fun Test(...)
:lang C
:" Creating List directly with different types
:let l = [1, 'as''d', [1, 2, function("strlen")], {'a': 1},]
:$put =string(l)
:$put =string(l[-1])
:$put =string(l[-4])
:try
: $put =string(l[-5])
:catch
: $put =v:exception[:14]
:endtry
:" List slices
:$put =string(l[:])
:$put =string(l[1:])
:$put =string(l[:-2])
:$put =string(l[0:8])
:$put =string(l[8:-1])
:"
:" List identity
:let ll = l
:let lx = copy(l)
:try
: $put =(l == ll) . (l isnot ll) . (l is ll) . (l == lx) . (l is lx) . (l isnot lx)
:catch
: $put =v:exception
:endtry
:"
:" Creating Dictionary directly with different types
:let d = {001: 'asd', 'b': [1, 2, function('strlen')], -1: {'a': 1},}
:$put =string(d) . d.1
:$put =string(sort(keys(d)))
:$put =string (values(d))
:for [key, val] in items(d)
: $put =key . ':' . string(val)
: unlet key val
:endfor
:call extend (d, {3:33, 1:99})
:call extend(d, {'b':'bbb', 'c':'ccc'}, "keep")
:try
: call extend(d, {3:333,4:444}, "error")
:catch
: $put =v:exception[:15] . v:exception[-1:-1]
:endtry
:$put =string(d)
:call filter(d, 'v:key =~ ''[ac391]''')
:$put =string(d)
:"
:" Dictionary identity
:let dd = d
:let dx = copy(d)
:try
: $put =(d == dd) . (d isnot dd) . (d is dd) . (d == dx) . (d is dx) . (d isnot dx)
:catch
: $put =v:exception
:endtry
:"
:"
:" removing items with :unlet
:unlet l[2]
:$put =string(l)
:let l = range(8)
:try
:unlet l[:3]
:unlet l[1:]
:catch
:$put =v:exception
:endtry
:$put =string(l)
:"
:unlet d.c
:unlet d[-1]
:$put =string(d)
:"
:" removing items out of range: silently skip items that don't exist
let l = [0, 1, 2, 3]
:unlet l[2:1]
:$put =string(l)
let l = [0, 1, 2, 3]
:unlet l[2:2]
:$put =string(l)
let l = [0, 1, 2, 3]
:unlet l[2:3]
:$put =string(l)
let l = [0, 1, 2, 3]
:unlet l[2:4]
:$put =string(l)
let l = [0, 1, 2, 3]
:unlet l[2:5]
:$put =string(l)
let l = [0, 1, 2, 3]
:unlet l[-1:2]
:$put =string(l)
let l = [0, 1, 2, 3]
:unlet l[-2:2]
:$put =string(l)
let l = [0, 1, 2, 3]
:unlet l[-3:2]
:$put =string(l)
let l = [0, 1, 2, 3]
:unlet l[-4:2]
:$put =string(l)
let l = [0, 1, 2, 3]
:unlet l[-5:2]
:$put =string(l)
let l = [0, 1, 2, 3]
:unlet l[-6:2]
:$put =string(l)
:"
:" assignment to a list
:let l = [0, 1, 2, 3]
:let [va, vb] = l[2:3]
:$put =va
:$put =vb
:try
: let [va, vb] = l
:catch
: $put =v:exception[:14]
:endtry
:try
: let [va, vb] = l[1:1]
:catch
: $put =v:exception[:14]
:endtry
:"
:" manipulating a big Dictionary (hashtable.c has a border of 1000 entries)
:let d = {}
:for i in range(1500)
: let d[i] = 3000 - i
:endfor
:$put =d[0] . ' ' . d[100] . ' ' . d[999] . ' ' . d[1400] . ' ' . d[1499]
:try
: let n = d[1500]
:catch
: $put =substitute(v:exception, '\v(.{14}).*( \d{4}).*', '\1\2', '')
:endtry
:" lookup each items
:for i in range(1500)
: if d[i] != 3000 - i
: $put =d[i]
: endif
:endfor
: let i += 1
:" delete even items
:while i >= 2
: let i -= 2
: unlet d[i]
:endwhile
:$put =get(d, 1500 - 100, 'NONE') . ' ' . d[1]
:" delete odd items, checking value, one intentionally wrong
:let d[33] = 999
:let i = 1
:while i < 1500
: if d[i] != 3000 - i
: $put =i . '=' . d[i]
: else
: unlet d[i]
: endif
: let i += 2
:endwhile
:$put =string(d) " must be almost empty now
:unlet d
:"
:" Dictionary function
:let dict = {}
:func dict.func(a) dict
: $put =a:a . len(self.data)
:endfunc
:let dict.data = [1,2,3]
:call dict.func("len: ")
:let x = dict.func("again: ")
:let Fn = dict.func
:call Fn('xxx')
:"
:" Function in script-local List or Dict
:let g:dict = {}
:function g:dict.func() dict
: $put ='g:dict.func'.self.foo[1].self.foo[0]('asdf')
:endfunc
:let g:dict.foo = ['-', 2, 3]
:call insert(g:dict.foo, function('strlen'))
:call g:dict.func()
:"
:" Nasty: remove func from Dict that's being called (works)
:let d = {1:1}
:func d.func(a)
: return "a:". a:a
:endfunc
:$put =d.func(string(remove(d, 'func')))
:"
:" Nasty: deepcopy() dict that refers to itself (fails when noref used)
:let d = {1:1, 2:2}
:let l = [4, d, 6]
:let d[3] = l
:let dc = deepcopy(d)
:try
: let dc = deepcopy(d, 1)
:catch
: $put =v:exception[:14]
:endtry
:let l2 = [0, l, l, 3]
:let l[1] = l2
:let l3 = deepcopy(l2)
:$put ='same list: ' . (l3[1] is l3[2])
:"
:" Locked variables
:for depth in range(5)
: $put ='depth is ' . depth
: for u in range(3)
: unlet l
: let l = [0, [1, [2, 3]], {4: 5, 6: {7: 8}}]
: exe "lockvar " . depth . " l"
: if u == 1
: exe "unlockvar l"
: elseif u == 2
: exe "unlockvar " . depth . " l"
: endif
: let ps = islocked("l").islocked("l[1]").islocked("l[1][1]").islocked("l[1][1][0]").'-'.islocked("l[2]").islocked("l[2]['6']").islocked("l[2]['6'][7]")
: $put =ps
: let ps = ''
: try
: let l[1][1][0] = 99
: let ps .= 'p'
: catch
: let ps .= 'F'
: endtry
: try
: let l[1][1] = [99]
: let ps .= 'p'
: catch
: let ps .= 'F'
: endtry
: try
: let l[1] = [99]
: let ps .= 'p'
: catch
: let ps .= 'F'
: endtry
: try
: let l[2]['6'][7] = 99
: let ps .= 'p'
: catch
: let ps .= 'F'
: endtry
: try
: let l[2][6] = {99: 99}
: let ps .= 'p'
: catch
: let ps .= 'F'
: endtry
: try
: let l[2] = {99: 99}
: let ps .= 'p'
: catch
: let ps .= 'F'
: endtry
: try
: let l = [99]
: let ps .= 'p'
: catch
: let ps .= 'F'
: endtry
: $put =ps
: endfor
:endfor
:"
:" Unletting locked variables
:$put ='Unletting:'
:for depth in range(5)
: $put ='depth is ' . depth
: for u in range(3)
: unlet l
: let l = [0, [1, [2, 3]], {4: 5, 6: {7: 8}}]
: exe "lockvar " . depth . " l"
: if u == 1
: exe "unlockvar l"
: elseif u == 2
: exe "unlockvar " . depth . " l"
: endif
: let ps = islocked("l").islocked("l[1]").islocked("l[1][1]").islocked("l[1][1][0]").'-'.islocked("l[2]").islocked("l[2]['6']").islocked("l[2]['6'][7]")
: $put =ps
: let ps = ''
: try
: unlet l[2]['6'][7]
: let ps .= 'p'
: catch
: let ps .= 'F'
: endtry
: try
: unlet l[2][6]
: let ps .= 'p'
: catch
: let ps .= 'F'
: endtry
: try
: unlet l[2]
: let ps .= 'p'
: catch
: let ps .= 'F'
: endtry
: try
: unlet l[1][1][0]
: let ps .= 'p'
: catch
: let ps .= 'F'
: endtry
: try
: unlet l[1][1]
: let ps .= 'p'
: catch
: let ps .= 'F'
: endtry
: try
: unlet l[1]
: let ps .= 'p'
: catch
: let ps .= 'F'
: endtry
: try
: unlet l
: let ps .= 'p'
: catch
: let ps .= 'F'
: endtry
: $put =ps
: endfor
:endfor
:"
:" Locked variables and :unlet or list / dict functions
:$put ='Locks and commands or functions:'
:"
:$put ='No :unlet after lock on dict:'
:unlet! d
:let d = {'a': 99, 'b': 100}
:lockvar 1 d
:try
: unlet d.a
: $put ='did :unlet'
:catch
: $put =v:exception[:16]
:endtry
:$put =string(d)
:"
:$put =':unlet after lock on dict item:'
:unlet! d
:let d = {'a': 99, 'b': 100}
:lockvar d.a
:try
: unlet d.a
: $put ='did :unlet'
:catch
: $put =v:exception[:16]
:endtry
:$put =string(d)
:"
:$put ='filter() after lock on dict item:'
:unlet! d
:let d = {'a': 99, 'b': 100}
:lockvar d.a
:try
: call filter(d, 'v:key != "a"')
: $put ='did filter()'
:catch
: $put =v:exception[:16]
:endtry
:$put =string(d)
:"
:$put ='map() after lock on dict:'
:unlet! d
:let d = {'a': 99, 'b': 100}
:lockvar 1 d
:try
: call map(d, 'v:val + 200')
: $put ='did map()'
:catch
: $put =v:exception[:16]
:endtry
:$put =string(d)
:"
:$put ='No extend() after lock on dict item:'
:unlet! d
:let d = {'a': 99, 'b': 100}
:lockvar d.a
:try
: $put =string(extend(d, {'a': 123}))
: $put ='did extend()'
:catch
: $put =v:exception[:14]
:endtry
:$put =string(d)
:"
:$put ='No remove() of write-protected scope-level variable:'
:fun! Tfunc(this_is_a_loooooooooong_parameter_name)
: try
: $put =string(remove(a:, 'this_is_a_loooooooooong_parameter_name'))
: $put ='did remove()'
: catch
: $put =v:exception[:14]
: endtry
:endfun
:call Tfunc('testval')
:"
:$put ='No extend() of write-protected scope-level variable:'
:fun! Tfunc(this_is_a_loooooooooong_parameter_name)
: try
: $put =string(extend(a:, {'this_is_a_loooooooooong_parameter_name': 1234}))
: $put ='did extend()'
: catch
: $put =v:exception[:14]
: endtry
:endfun
:call Tfunc('testval')
:"
:$put ='No :unlet of variable in locked scope:'
:let b:testvar = 123
:lockvar 1 b:
:try
: unlet b:testvar
: $put ='b:testvar was :unlet: '. (!exists('b:testvar'))
:catch
: $put =v:exception[:16]
:endtry
:unlockvar 1 b:
:unlet! b:testvar
:"
:$put ='No :let += of locked list variable:'
:let l = ['a', 'b', 3]
:lockvar 1 l
:try
: let l += ['x']
: $put ='did :let +='
:catch
: $put =v:exception[:14]
:endtry
:$put =string(l)
:"
:unlet l
:let l = [1, 2, 3, 4]
:lockvar! l
:$put =string(l)
:unlockvar l[1]
:unlet l[0:1]
:$put =string(l)
:unlet l[1:2]
:$put =string(l)
:unlockvar l[1]
:let l[0:1] = [0, 1]
:$put =string(l)
:let l[1:2] = [0, 1]
:$put =string(l)
:unlet l
:" :lockvar/islocked() triggering script autoloading
:set rtp+=./sautest
:lockvar g:footest#x
:unlockvar g:footest#x
:$put ='locked g:footest#x:'.islocked('g:footest#x')
:$put ='exists g:footest#x:'.exists('g:footest#x')
:$put ='g:footest#x: '.g:footest#x
:"
:" a:000 function argument
:" first the tests that should fail
:try
: let a:000 = [1, 2]
:catch
: $put ='caught a:000'
:endtry
:try
: let a:000[0] = 9
:catch
: $put ='caught a:000[0]'
:endtry
:try
: let a:000[2] = [9, 10]
:catch
: $put ='caught a:000[2]'
:endtry
:try
: let a:000[3] = {9: 10}
:catch
: $put ='caught a:000[3]'
:endtry
:" now the tests that should pass
:try
: let a:000[2][1] = 9
: call extend(a:000[2], [5, 6])
: let a:000[3][5] = 8
: let a:000[3]['a'] = 12
: $put =string(a:000)
:catch
: $put ='caught ' . v:exception
:endtry
:"
:" reverse(), sort(), uniq()
:let l = ['-0', 'A11', 2, 2, 'xaaa', 4, 'foo', 'foo6', 'foo', [0, 1, 2], 'x8', [0, 1, 2], 1.5]
:$put =string(uniq(copy(l)))
:$put =string(reverse(l))
:$put =string(reverse(reverse(l)))
:$put =string(sort(l))
:$put =string(reverse(sort(l)))
:$put =string(sort(reverse(sort(l))))
:$put =string(uniq(sort(l)))
:let l=[7, 9, 'one', 18, 12, 22, 'two', 10.0e-16, -1, 'three', 0xff, 0.22, 'four']
:$put =string(sort(copy(l), 'n'))
:let l=[7, 9, 18, 12, 22, 10.0e-16, -1, 0xff, 0, -0, 0.22, 'bar', 'BAR', 'Bar', 'Foo', 'FOO', 'foo', 'FOOBAR', {}, []]
:$put =string(sort(copy(l), 1))
:$put =string(sort(copy(l), 'i'))
:$put =string(sort(copy(l)))
:"
:" splitting a string to a List
:$put =string(split(' aa bb '))
:$put =string(split(' aa bb ', '\W\+', 0))
:$put =string(split(' aa bb ', '\W\+', 1))
:$put =string(split(' aa bb ', '\W', 1))
:$put =string(split(':aa::bb:', ':', 0))
:$put =string(split(':aa::bb:', ':', 1))
:$put =string(split('aa,,bb, cc,', ',\s*', 1))
:$put =string(split('abc', '\zs'))
:$put =string(split('abc', '\zs', 1))
:"
:" compare recursively linked list and dict
:let l = [1, 2, 3, 4]
:let d = {'1': 1, '2': l, '3': 3}
:let l[1] = d
:$put =(l == l)
:$put =(d == d)
:$put =(l != deepcopy(l))
:$put =(d != deepcopy(d))
:"
:" compare complex recursively linked list and dict
:let l = []
:call add(l, l)
:let dict4 = {"l": l}
:call add(dict4.l, dict4)
:let lcopy = deepcopy(l)
:let dict4copy = deepcopy(dict4)
:$put =(l == lcopy)
:$put =(dict4 == dict4copy)
:"
:" Pass the same List to extend()
:let l = [1, 2, 3, 4, 5]
:call extend(l, l)
:$put =string(l)
:"
:" Pass the same Dict to extend()
:let d = { 'a': {'b': 'B'}}
:call extend(d, d)
:$put =string(d)
:"
:" Pass the same Dict to extend() with "error"
:try
: call extend(d, d, "error")
:catch
: $put =v:exception[:15] . v:exception[-1:-1]
:endtry
:$put =string(d)
:"
:" test for range assign
:let l = [0]
:let l[:] = [1, 2]
:$put =string(l)
:endfun
:"
:call Test(1, 2, [3, 4], {5: 6}) " This may take a while
:"
:delfunc Test
:unlet dict
:call garbagecollect(1)
:"
:" test for patch 7.3.637
:let a = 'No error caught'
:try|foldopen|catch|let a = matchstr(v:exception,'^[^ ]*')|endtry
o=a :"
:lang C
:redir => a
:try|foobar|catch|let a = matchstr(v:exception,'^[^ ]*')|endtry
:redir END
o=a :"
:"
:/^start:/,$wq! test.out
ENDTEST
start:
-197
View File
@@ -1,197 +0,0 @@
start:
[1, 'as''d', [1, 2, function('strlen')], {'a': 1}]
{'a': 1}
1
Vim(put):E684:
[1, 'as''d', [1, 2, function('strlen')], {'a': 1}]
['as''d', [1, 2, function('strlen')], {'a': 1}]
[1, 'as''d', [1, 2, function('strlen')]]
[1, 'as''d', [1, 2, function('strlen')], {'a': 1}]
[]
101101
{'1': 'asd', 'b': [1, 2, function('strlen')], '-1': {'a': 1}}asd
['-1', '1', 'b']
['asd', [1, 2, function('strlen')], {'a': 1}]
1:'asd'
b:[1, 2, function('strlen')]
-1:{'a': 1}
Vim(call):E737: 3
{'c': 'ccc', '1': 99, 'b': [1, 2, function('strlen')], '3': 33, '-1': {'a': 1}}
{'c': 'ccc', '1': 99, '3': 33, '-1': {'a': 1}}
101101
[1, 'as''d', {'a': 1}]
[4]
{'1': 99, '3': 33}
[0, 1, 2, 3]
[0, 1, 3]
[0, 1]
[0, 1]
[0, 1]
[0, 1, 2, 3]
[0, 1, 3]
[0, 3]
[3]
[3]
[3]
2
3
Vim(let):E687:
Vim(let):E688:
3000 2900 2001 1600 1501
Vim(let):E716: 1500
NONE 2999
33=999
{'33': 999}
len: 3
again: 3
xxx3
g:dict.func-4
a:function('3')
Vim(let):E698:
same list: 1
depth is 0
0000-000
ppppppp
0000-000
ppppppp
0000-000
ppppppp
depth is 1
1000-000
ppppppF
0000-000
ppppppp
0000-000
ppppppp
depth is 2
1100-100
ppFppFF
0000-000
ppppppp
0000-000
ppppppp
depth is 3
1110-110
pFFpFFF
0010-010
pFppFpp
0000-000
ppppppp
depth is 4
1111-111
FFFFFFF
0011-011
FFpFFpp
0000-000
ppppppp
Unletting:
depth is 0
0000-000
ppppppp
0000-000
ppppppp
0000-000
ppppppp
depth is 1
1000-000
ppFppFp
0000-000
ppppppp
0000-000
ppppppp
depth is 2
1100-100
pFFpFFp
0000-000
ppppppp
0000-000
ppppppp
depth is 3
1110-110
FFFFFFp
0010-010
FppFppp
0000-000
ppppppp
depth is 4
1111-111
FFFFFFp
0011-011
FppFppp
0000-000
ppppppp
Locks and commands or functions:
No :unlet after lock on dict:
Vim(unlet):E741:
{'a': 99, 'b': 100}
:unlet after lock on dict item:
did :unlet
{'b': 100}
filter() after lock on dict item:
did filter()
{'b': 100}
map() after lock on dict:
did map()
{'a': 299, 'b': 300}
No extend() after lock on dict item:
Vim(put):E741:
{'a': 99, 'b': 100}
No remove() of write-protected scope-level variable:
Vim(put):E795:
No extend() of write-protected scope-level variable:
Vim(put):E742:
No :unlet of variable in locked scope:
Vim(unlet):E741:
No :let += of locked list variable:
Vim(let):E741:
['a', 'b', 3]
[1, 2, 3, 4]
[1, 2, 3, 4]
[1, 2, 3, 4]
[1, 2, 3, 4]
[1, 2, 3, 4]
locked g:footest#x:-1
exists g:footest#x:0
g:footest#x: 1
caught a:000
caught a:000[0]
caught a:000[2]
caught a:000[3]
[1, 2, [3, 9, 5, 6], {'a': 12, '5': 8}]
['-0', 'A11', 2, 'xaaa', 4, 'foo', 'foo6', 'foo', [0, 1, 2], 'x8', [0, 1, 2], 1.5]
[1.5, [0, 1, 2], 'x8', [0, 1, 2], 'foo', 'foo6', 'foo', 4, 'xaaa', 2, 2, 'A11', '-0']
[1.5, [0, 1, 2], 'x8', [0, 1, 2], 'foo', 'foo6', 'foo', 4, 'xaaa', 2, 2, 'A11', '-0']
['-0', 'A11', 'foo', 'foo', 'foo6', 'x8', 'xaaa', 1.5, 2, 2, 4, [0, 1, 2], [0, 1, 2]]
[[0, 1, 2], [0, 1, 2], 4, 2, 2, 1.5, 'xaaa', 'x8', 'foo6', 'foo', 'foo', 'A11', '-0']
['-0', 'A11', 'foo', 'foo', 'foo6', 'x8', 'xaaa', 1.5, 2, 2, 4, [0, 1, 2], [0, 1, 2]]
['-0', 'A11', 'foo', 'foo6', 'x8', 'xaaa', 1.5, 2, 4, [0, 1, 2]]
[-1, 'one', 'two', 'three', 'four', 1.0e-15, 0.22, 7, 9, 12, 18, 22, 255]
['bar', 'BAR', 'Bar', 'Foo', 'FOO', 'foo', 'FOOBAR', -1, 0, 0, 0.22, 1.0e-15, 12, 18, 22, 255, 7, 9, [], {}]
['bar', 'BAR', 'Bar', 'Foo', 'FOO', 'foo', 'FOOBAR', -1, 0, 0, 0.22, 1.0e-15, 12, 18, 22, 255, 7, 9, [], {}]
['BAR', 'Bar', 'FOO', 'FOOBAR', 'Foo', 'bar', 'foo', -1, 0, 0, 0.22, 1.0e-15, 12, 18, 22, 255, 7, 9, [], {}]
['aa', 'bb']
['aa', 'bb']
['', 'aa', 'bb', '']
['', '', 'aa', '', 'bb', '', '']
['aa', '', 'bb']
['', 'aa', '', 'bb', '']
['aa', '', 'bb', 'cc', '']
['a', 'b', 'c']
['', 'a', '', 'b', '', 'c', '']
1
1
0
0
1
1
[1, 2, 3, 4, 5, 1, 2, 3, 4, 5]
{'a': {'b': 'B'}}
Vim(call):E737: a
{'a': {'b': 'B'}}
[1, 2]
Vim(foldopen):E490:
Error detected while processing :
E492: Not an editor command: foobar|catch|let a = matchstr(v:exception,'^[^ ]*')|endtry
+127
View File
@@ -997,3 +997,130 @@ func Test_Cmd_Autocmds()
call delete('Xxx')
enew!
endfunc
func SetChangeMarks(start, end)
exe a:start. 'mark ['
exe a:end. 'mark ]'
endfunc
" Verify the effects of autocmds on '[ and ']
func Test_change_mark_in_autocmds()
edit! Xtest
call feedkeys("ia\<CR>b\<CR>c\<CR>d\<C-g>u", 'xtn')
call SetChangeMarks(2, 3)
write
call assert_equal([1, 4], [line("'["), line("']")])
call SetChangeMarks(2, 3)
au BufWritePre * call assert_equal([1, 4], [line("'["), line("']")])
write
au! BufWritePre
if executable('cat')
write XtestFilter
write >> XtestFilter
call SetChangeMarks(2, 3)
" Marks are set to the entire range of the write
au FilterWritePre * call assert_equal([1, 4], [line("'["), line("']")])
" '[ is adjusted to just before the line that will receive the filtered
" data
au FilterReadPre * call assert_equal([4, 4], [line("'["), line("']")])
" The filtered data is read into the buffer, and the source lines are
" still present, so the range is after the source lines
au FilterReadPost * call assert_equal([5, 12], [line("'["), line("']")])
%!cat XtestFilter
" After the filtered data is read, the original lines are deleted
call assert_equal([1, 8], [line("'["), line("']")])
au! FilterWritePre,FilterReadPre,FilterReadPost
undo
call SetChangeMarks(1, 4)
au FilterWritePre * call assert_equal([2, 3], [line("'["), line("']")])
au FilterReadPre * call assert_equal([3, 3], [line("'["), line("']")])
au FilterReadPost * call assert_equal([4, 11], [line("'["), line("']")])
2,3!cat XtestFilter
call assert_equal([2, 9], [line("'["), line("']")])
au! FilterWritePre,FilterReadPre,FilterReadPost
undo
call delete('XtestFilter')
endif
call SetChangeMarks(1, 4)
au FileWritePre * call assert_equal([2, 3], [line("'["), line("']")])
2,3write Xtest2
au! FileWritePre
call SetChangeMarks(2, 3)
au FileAppendPre * call assert_equal([1, 4], [line("'["), line("']")])
write >> Xtest2
au! FileAppendPre
call SetChangeMarks(1, 4)
au FileAppendPre * call assert_equal([2, 3], [line("'["), line("']")])
2,3write >> Xtest2
au! FileAppendPre
call SetChangeMarks(1, 1)
au FileReadPre * call assert_equal([3, 1], [line("'["), line("']")])
au FileReadPost * call assert_equal([4, 11], [line("'["), line("']")])
3read Xtest2
au! FileReadPre,FileReadPost
undo
call SetChangeMarks(4, 4)
" When the line is 0, it's adjusted to 1
au FileReadPre * call assert_equal([1, 4], [line("'["), line("']")])
au FileReadPost * call assert_equal([1, 8], [line("'["), line("']")])
0read Xtest2
au! FileReadPre,FileReadPost
undo
call SetChangeMarks(4, 4)
" When the line is 0, it's adjusted to 1
au FileReadPre * call assert_equal([1, 4], [line("'["), line("']")])
au FileReadPost * call assert_equal([2, 9], [line("'["), line("']")])
1read Xtest2
au! FileReadPre,FileReadPost
undo
bwipe!
call delete('Xtest')
call delete('Xtest2')
endfunc
func Test_Filter_noshelltemp()
if !executable('cat')
return
endif
enew!
call setline(1, ['a', 'b', 'c', 'd'])
let shelltemp = &shelltemp
set shelltemp
let g:filter_au = 0
au FilterWritePre * let g:filter_au += 1
au FilterReadPre * let g:filter_au += 1
au FilterReadPost * let g:filter_au += 1
%!cat
call assert_equal(3, g:filter_au)
if has('filterpipe')
set noshelltemp
let g:filter_au = 0
au FilterWritePre * let g:filter_au += 1
au FilterReadPre * let g:filter_au += 1
au FilterReadPost * let g:filter_au += 1
%!cat
call assert_equal(0, g:filter_au)
endif
au! FilterWritePre,FilterReadPre,FilterReadPost
let &shelltemp = shelltemp
bwipe!
endfunc
-22
View File
@@ -1,22 +0,0 @@
Test changelist position after splitting window
Set 'undolevels' to make changelist for sourced file
STARTTEST
:so small.vim
Gkylp:set ul=100
Gylp:set ul=100
gg
:vsplit
:try
: normal g;
: normal ggVGcpass
:catch
: normal ggVGcfail
:finally
: %w! test.out
:endtry
:qa!
ENDTEST
1
2
-1
View File
@@ -1 +0,0 @@
pass
+1 -5
View File
@@ -274,12 +274,10 @@ func Ch_channel_handler(port)
" Test that it works while waiting on a numbered message.
call assert_equal('ok', ch_evalexpr(handle, 'call me'))
call WaitFor('"we called you" == g:Ch_reply')
call assert_equal('we called you', g:Ch_reply)
" Test that it works while not waiting on a numbered message.
call ch_sendexpr(handle, 'call me again')
call WaitFor('"we did call you" == g:Ch_reply')
call assert_equal('we did call you', g:Ch_reply)
endfunc
func Test_channel_handler()
@@ -322,7 +320,6 @@ func Ch_channel_zero(port)
call assert_equal('sent zero', ch_evalexpr(handle, 'send zero'))
if s:has_handler
call WaitFor('"zero index" == g:Ch_reply')
call assert_equal('zero index', g:Ch_reply)
else
sleep 20m
call assert_equal('', g:Ch_reply)
@@ -338,7 +335,6 @@ func Ch_channel_zero(port)
else
call assert_equal('', g:Ch_reply)
endif
call assert_equal('sent zero', g:Ch_zero_reply)
endfunc
func Test_zero_reply()
@@ -1468,7 +1464,7 @@ func Test_exit_callback_interval()
let g:exit_cb_val = {'start': reltime(), 'end': 0, 'process': 0}
let job = job_start([s:python, '-c', 'import time;time.sleep(0.5)'], {'exit_cb': 'MyExitTimeCb'})
let g:exit_cb_val.process = job_info(job).process
call WaitFor('type(g:exit_cb_val.end) != v:t_number || g:exit_cb_val.end != 0')
call WaitFor('type(g:exit_cb_val.end) != v:t_number || g:exit_cb_val.end != 0', 2000)
let elapsed = reltimefloat(g:exit_cb_val.end)
call assert_true(elapsed > 0.5)
call assert_true(elapsed < 1.0)
+11 -12
View File
@@ -27,12 +27,8 @@ func Test_client_server()
let name = 'XVIMTEST'
let cmd .= ' --servername ' . name
let g:job = job_start(cmd, {'stoponexit': 'kill', 'out_io': 'null'})
call WaitFor('job_status(g:job) == "run"')
if job_status(g:job) != 'run'
call assert_report('Cannot run the Vim server')
return
endif
let job = job_start(cmd, {'stoponexit': 'kill', 'out_io': 'null'})
call WaitFor({-> job_status(job) == "run"})
" Takes a short while for the server to be active.
" When using valgrind it takes much longer.
@@ -83,7 +79,7 @@ func Test_client_server()
call remote_send(name, ":call server2client(expand('<client>'), 'another')\<CR>", 'g:myserverid')
let peek_result = 'nothing'
let r = remote_peek(g:myserverid, 'peek_result')
" unpredictable whether the result is already avaialble.
" unpredictable whether the result is already available.
if r > 0
call assert_equal('another', peek_result)
elseif r == 0
@@ -97,11 +93,14 @@ func Test_client_server()
call assert_equal('another', remote_read(g:myserverid, 2))
call remote_send(name, ":qa!\<CR>")
call WaitFor('job_status(g:job) == "dead"')
if job_status(g:job) != 'dead'
call assert_report('Server did not exit')
call job_stop(g:job, 'kill')
endif
try
call WaitFor({-> job_status(job) == "dead"})
finally
if job_status(job) != 'dead'
call assert_report('Server did not exit')
call job_stop(job, 'kill')
endif
endtry
endfunc
" Uncomment this line to get a debugging log
+21
View File
@@ -627,3 +627,24 @@ func Test_fold_move()
set fdm& sw& fdl&
enew!
endfunc
" test for patch 7.3.637
" Cannot catch the error caused by a foldopen when there is no fold.
func Test_foldopen_exception()
enew!
let a = 'No error caught'
try
foldopen
catch
let a = matchstr(v:exception,'^[^ ]*')
endtry
call assert_equal('Vim(foldopen):E490:', a)
let a = 'No error caught'
try
foobar
catch
let a = matchstr(v:exception,'^[^ ]*')
endtry
call assert_match('E492:', a)
endfunc
+7
View File
@@ -2,6 +2,11 @@
" Test for insert expansion
func Test_ins_complete()
edit test_ins_complete.vim
" The files in the current directory interferes with the files
" used by this test. So use a separate directory for the test.
call mkdir('Xdir')
cd Xdir
set ff=unix
call writefile(["test11\t36Gepeto\t/Tag/",
\ "asd\ttest11file\t36G",
@@ -89,6 +94,8 @@ func Test_ins_complete()
call delete('Xtest11.two')
call delete('Xtestdata')
set cpt& cot& def& tags& tagbsearch& hidden&
cd ..
call delete('Xdir', 'rf')
endfunc
func Test_omni_dash()
-14
View File
@@ -1,14 +0,0 @@
Tests for repeating insert and replace.
STARTTEST
:so small.vim
:/Second
4gro
:/^First/,$wq! test.out
:" get here when failed and in Insert mode
:.wq! test.out
ENDTEST
First line
Second line
Last line
-3
View File
@@ -1,3 +0,0 @@
First line
ooooecond line
Last line
+3 -6
View File
@@ -6,14 +6,11 @@ source shared.vim
func Test_job_start_fails()
if has('job')
let g:job = job_start('axdfxsdf')
let job = job_start('axdfxsdf')
if has('unix')
call WaitFor('job_status(g:job) == "dead"')
call assert_equal('dead', job_status(g:job))
call WaitFor({-> job_status(job) == "dead"})
else
call WaitFor('job_status(g:job) == "fail"')
call assert_equal('fail', job_status(g:job))
call WaitFor({-> job_status(job) == "fail"})
endif
unlet g:job
endif
endfunc
+603
View File
@@ -0,0 +1,603 @@
" Tests for the List and Dict types
func TearDown()
" Run garbage collection after every test
call test_garbagecollect_now()
endfunc
" Tests for List type
" List creation
func Test_list_create()
" Creating List directly with different types
let l = [1, 'as''d', [1, 2, function("strlen")], {'a': 1},]
call assert_equal("[1, 'as''d', [1, 2, function('strlen')], {'a': 1}]", string(l))
call assert_equal({'a' : 1}, l[-1])
call assert_equal(1, l[-4])
let x = 10
try
let x = l[-5]
catch
call assert_match('E684:', v:exception)
endtry
call assert_equal(10, x)
endfunc
" List slices
func Test_list_slice()
let l = [1, 'as''d', [1, 2, function("strlen")], {'a': 1},]
call assert_equal([1, 'as''d', [1, 2, function('strlen')], {'a': 1}], l[:])
call assert_equal(['as''d', [1, 2, function('strlen')], {'a': 1}], l[1:])
call assert_equal([1, 'as''d', [1, 2, function('strlen')]], l[:-2])
call assert_equal([1, 'as''d', [1, 2, function('strlen')], {'a': 1}], l[0:8])
call assert_equal([], l[8:-1])
endfunc
" List identity
func Test_list_identity()
let l = [1, 'as''d', [1, 2, function("strlen")], {'a': 1},]
let ll = l
let lx = copy(l)
call assert_true(l == ll)
call assert_false(l isnot ll)
call assert_true(l is ll)
call assert_true(l == lx)
call assert_false(l is lx)
call assert_true(l isnot lx)
endfunc
" removing items with :unlet
func Test_list_unlet()
let l = [1, 'as''d', [1, 2, function("strlen")], {'a': 1},]
unlet l[2]
call assert_equal([1, 'as''d', {'a': 1}], l)
let l = range(8)
unlet l[:3]
unlet l[1:]
call assert_equal([4], l)
" removing items out of range: silently skip items that don't exist
let l = [0, 1, 2, 3]
call assert_fails('unlet l[2:1]', 'E684')
let l = [0, 1, 2, 3]
unlet l[2:2]
call assert_equal([0, 1, 3], l)
let l = [0, 1, 2, 3]
unlet l[2:3]
call assert_equal([0, 1], l)
let l = [0, 1, 2, 3]
unlet l[2:4]
call assert_equal([0, 1], l)
let l = [0, 1, 2, 3]
unlet l[2:5]
call assert_equal([0, 1], l)
let l = [0, 1, 2, 3]
call assert_fails('unlet l[-1:2]', 'E684')
let l = [0, 1, 2, 3]
unlet l[-2:2]
call assert_equal([0, 1, 3], l)
let l = [0, 1, 2, 3]
unlet l[-3:2]
call assert_equal([0, 3], l)
let l = [0, 1, 2, 3]
unlet l[-4:2]
call assert_equal([3], l)
let l = [0, 1, 2, 3]
unlet l[-5:2]
call assert_equal([3], l)
let l = [0, 1, 2, 3]
unlet l[-6:2]
call assert_equal([3], l)
endfunc
" assignment to a list
func Test_list_assign()
let l = [0, 1, 2, 3]
let [va, vb] = l[2:3]
call assert_equal([2, 3], [va, vb])
call assert_fails('let [va, vb] = l', 'E687')
call assert_fails('let [va, vb] = l[1:1]', 'E688')
endfunc
" test for range assign
func Test_list_range_assign()
let l = [0]
let l[:] = [1, 2]
call assert_equal([1, 2], l)
endfunc
" Tests for Dictionary type
func Test_dict()
" Creating Dictionary directly with different types
let d = {001: 'asd', 'b': [1, 2, function('strlen')], -1: {'a': 1},}
call assert_equal("{'1': 'asd', 'b': [1, 2, function('strlen')], '-1': {'a': 1}}", string(d))
call assert_equal('asd', d.1)
call assert_equal(['-1', '1', 'b'], sort(keys(d)))
call assert_equal(['asd', [1, 2, function('strlen')], {'a': 1}], values(d))
let v = []
for [key, val] in items(d)
call extend(v, [key, val])
unlet key val
endfor
call assert_equal(['1','asd','b',[1, 2, function('strlen')],'-1',{'a': 1}], v)
call extend(d, {3:33, 1:99})
call extend(d, {'b':'bbb', 'c':'ccc'}, "keep")
call assert_fails("call extend(d, {3:333,4:444}, 'error')", 'E737')
call assert_equal({'c': 'ccc', '1': 99, 'b': [1, 2, function('strlen')], '3': 33, '-1': {'a': 1}}, d)
call filter(d, 'v:key =~ ''[ac391]''')
call assert_equal({'c': 'ccc', '1': 99, '3': 33, '-1': {'a': 1}}, d)
endfunc
" Dictionary identity
func Test_dict_identity()
let d = {001: 'asd', 'b': [1, 2, function('strlen')], -1: {'a': 1},}
let dd = d
let dx = copy(d)
call assert_true(d == dd)
call assert_false(d isnot dd)
call assert_true(d is dd)
call assert_true(d == dx)
call assert_false(d is dx)
call assert_true(d isnot dx)
endfunc
" removing items with :unlet
func Test_dict_unlet()
let d = {'b':'bbb', '1': 99, '3': 33, '-1': {'a': 1}}
unlet d.b
unlet d[-1]
call assert_equal({'1': 99, '3': 33}, d)
endfunc
" manipulating a big Dictionary (hashtable.c has a border of 1000 entries)
func Test_dict_big()
let d = {}
for i in range(1500)
let d[i] = 3000 - i
endfor
call assert_equal([3000, 2900, 2001, 1600, 1501], [d[0], d[100], d[999], d[1400], d[1499]])
let str = ''
try
let n = d[1500]
catch
let str=substitute(v:exception, '\v(.{14}).*( \d{4}).*', '\1\2', '')
endtry
call assert_equal('Vim(let):E716: 1500', str)
" lookup each items
for i in range(1500)
call assert_equal(3000 - i, d[i])
endfor
let i += 1
" delete even items
while i >= 2
let i -= 2
unlet d[i]
endwhile
call assert_equal('NONE', get(d, 1500 - 100, 'NONE'))
call assert_equal(2999, d[1])
" delete odd items, checking value, one intentionally wrong
let d[33] = 999
let i = 1
while i < 1500
if i != 33
call assert_equal(3000 - i, d[i])
else
call assert_equal(999, d[i])
endif
unlet d[i]
let i += 2
endwhile
call assert_equal({}, d)
unlet d
endfunc
" Dictionary function
func Test_dict_func()
let d = {}
func d.func(a) dict
return a:a . len(self.data)
endfunc
let d.data = [1,2,3]
call assert_equal('len: 3', d.func('len: '))
let x = d.func('again: ')
call assert_equal('again: 3', x)
let Fn = d.func
call assert_equal('xxx3', Fn('xxx'))
endfunc
" Function in script-local List or Dict
func Test_script_local_dict_func()
let g:dict = {}
function g:dict.func() dict
return 'g:dict.func' . self.foo[1] . self.foo[0]('asdf')
endfunc
let g:dict.foo = ['-', 2, 3]
call insert(g:dict.foo, function('strlen'))
call assert_equal('g:dict.func-4', g:dict.func())
unlet g:dict
endfunc
" Nasty: remove func from Dict that's being called (works)
func Test_dict_func_remove_in_use()
let d = {1:1}
func d.func(a)
return "a:" . a:a
endfunc
let expected = 'a:' . string(get(d, 'func'))
call assert_equal(expected, d.func(string(remove(d, 'func'))))
endfunc
" Nasty: deepcopy() dict that refers to itself (fails when noref used)
func Test_dict_deepcopy()
let d = {1:1, 2:2}
let l = [4, d, 6]
let d[3] = l
let dc = deepcopy(d)
call assert_fails('call deepcopy(d, 1)', 'E698')
let l2 = [0, l, l, 3]
let l[1] = l2
let l3 = deepcopy(l2)
call assert_true(l3[1] is l3[2])
endfunc
" Locked variables
func Test_list_locked_var()
let expected = [
\ [['0000-000', 'ppppppp'],
\ ['0000-000', 'ppppppp'],
\ ['0000-000', 'ppppppp']],
\ [['1000-000', 'ppppppF'],
\ ['0000-000', 'ppppppp'],
\ ['0000-000', 'ppppppp']],
\ [['1100-100', 'ppFppFF'],
\ ['0000-000', 'ppppppp'],
\ ['0000-000', 'ppppppp']],
\ [['1110-110', 'pFFpFFF'],
\ ['0010-010', 'pFppFpp'],
\ ['0000-000', 'ppppppp']],
\ [['1111-111', 'FFFFFFF'],
\ ['0011-011', 'FFpFFpp'],
\ ['0000-000', 'ppppppp']]
\ ]
for depth in range(5)
for u in range(3)
unlet! l
let l = [0, [1, [2, 3]], {4: 5, 6: {7: 8}}]
exe "lockvar " . depth . " l"
if u == 1
exe "unlockvar l"
elseif u == 2
exe "unlockvar " . depth . " l"
endif
let ps = islocked("l").islocked("l[1]").islocked("l[1][1]").islocked("l[1][1][0]").'-'.islocked("l[2]").islocked("l[2]['6']").islocked("l[2]['6'][7]")
call assert_equal(expected[depth][u][0], ps)
let ps = ''
try
let l[1][1][0] = 99
let ps .= 'p'
catch
let ps .= 'F'
endtry
try
let l[1][1] = [99]
let ps .= 'p'
catch
let ps .= 'F'
endtry
try
let l[1] = [99]
let ps .= 'p'
catch
let ps .= 'F'
endtry
try
let l[2]['6'][7] = 99
let ps .= 'p'
catch
let ps .= 'F'
endtry
try
let l[2][6] = {99: 99}
let ps .= 'p'
catch
let ps .= 'F'
endtry
try
let l[2] = {99: 99}
let ps .= 'p'
catch
let ps .= 'F'
endtry
try
let l = [99]
let ps .= 'p'
catch
let ps .= 'F'
endtry
call assert_equal(expected[depth][u][1], ps)
endfor
endfor
endfunc
" Unletting locked variables
func Test_list_locked_var_unlet()
let expected = [
\ [['0000-000', 'ppppppp'],
\ ['0000-000', 'ppppppp'],
\ ['0000-000', 'ppppppp']],
\ [['1000-000', 'ppFppFp'],
\ ['0000-000', 'ppppppp'],
\ ['0000-000', 'ppppppp']],
\ [['1100-100', 'pFFpFFp'],
\ ['0000-000', 'ppppppp'],
\ ['0000-000', 'ppppppp']],
\ [['1110-110', 'FFFFFFp'],
\ ['0010-010', 'FppFppp'],
\ ['0000-000', 'ppppppp']],
\ [['1111-111', 'FFFFFFp'],
\ ['0011-011', 'FppFppp'],
\ ['0000-000', 'ppppppp']]
\ ]
for depth in range(5)
for u in range(3)
unlet! l
let l = [0, [1, [2, 3]], {4: 5, 6: {7: 8}}]
exe "lockvar " . depth . " l"
if u == 1
exe "unlockvar l"
elseif u == 2
exe "unlockvar " . depth . " l"
endif
let ps = islocked("l").islocked("l[1]").islocked("l[1][1]").islocked("l[1][1][0]").'-'.islocked("l[2]").islocked("l[2]['6']").islocked("l[2]['6'][7]")
call assert_equal(expected[depth][u][0], ps)
let ps = ''
try
unlet l[2]['6'][7]
let ps .= 'p'
catch
let ps .= 'F'
endtry
try
unlet l[2][6]
let ps .= 'p'
catch
let ps .= 'F'
endtry
try
unlet l[2]
let ps .= 'p'
catch
let ps .= 'F'
endtry
try
unlet l[1][1][0]
let ps .= 'p'
catch
let ps .= 'F'
endtry
try
unlet l[1][1]
let ps .= 'p'
catch
let ps .= 'F'
endtry
try
unlet l[1]
let ps .= 'p'
catch
let ps .= 'F'
endtry
try
unlet l
let ps .= 'p'
catch
let ps .= 'F'
endtry
call assert_equal(expected[depth][u][1], ps)
endfor
endfor
endfunc
" Locked variables and :unlet or list / dict functions
" No :unlet after lock on dict:
func Test_dict_lock_unlet()
unlet! d
let d = {'a': 99, 'b': 100}
lockvar 1 d
call assert_fails('unlet d.a', 'E741')
endfunc
" unlet after lock on dict item
func Test_dict_item_lock_unlet()
unlet! d
let d = {'a': 99, 'b': 100}
lockvar d.a
unlet d.a
call assert_equal({'b' : 100}, d)
endfunc
" filter() after lock on dict item
func Test_dict_lock_filter()
unlet! d
let d = {'a': 99, 'b': 100}
lockvar d.a
call filter(d, 'v:key != "a"')
call assert_equal({'b' : 100}, d)
endfunc
" map() after lock on dict
func Test_dict_lock_map()
unlet! d
let d = {'a': 99, 'b': 100}
lockvar 1 d
call map(d, 'v:val + 200')
call assert_equal({'a' : 299, 'b' : 300}, d)
endfunc
" No extend() after lock on dict item
func Test_dict_lock_extend()
unlet! d
let d = {'a': 99, 'b': 100}
lockvar d.a
call assert_fails("call extend(d, {'a' : 123})", 'E741')
call assert_equal({'a': 99, 'b': 100}, d)
endfunc
" No remove() of write-protected scope-level variable
func! Tfunc(this_is_a_long_parameter_name)
call assert_fails("call remove(a:, 'this_is_a_long_parameter_name')", 'E795')
endfun
func Test_dict_scope_var_remove()
call Tfunc('testval')
endfunc
" No extend() of write-protected scope-level variable
func! Tfunc(this_is_a_long_parameter_name)
call assert_fails("call extend(a:, {'this_is_a_long_parameter_name': 1234})", 'E742')
endfunc
func Test_dict_scope_var_extend()
call Tfunc('testval')
endfunc
" No :unlet of variable in locked scope
func Test_lock_var_unlet()
let b:testvar = 123
lockvar 1 b:
call assert_fails('unlet b:testvar', 'E741:')
unlockvar 1 b:
unlet! b:testvar
endfunc
" No :let += of locked list variable
func Test_let_lock_list()
let l = ['a', 'b', 3]
lockvar 1 l
call assert_fails("let l += ['x']", 'E741:')
call assert_equal(['a', 'b', 3], l)
unlet l
let l = [1, 2, 3, 4]
lockvar! l
call assert_equal([1, 2, 3, 4], l)
unlockvar l[1]
call assert_fails('unlet l[0:1]', 'E741:')
call assert_equal([1, 2, 3, 4], l)
call assert_fails('unlet l[1:2]', 'E741:')
call assert_equal([1, 2, 3, 4], l)
unlockvar l[1]
call assert_fails('let l[0:1] = [0, 1]', 'E741:')
call assert_equal([1, 2, 3, 4], l)
call assert_fails('let l[1:2] = [0, 1]', 'E741:')
call assert_equal([1, 2, 3, 4], l)
unlet l
endfunc
" lockvar/islocked() triggering script autoloading
func Test_lockvar_script_autoload()
let old_rtp = &rtp
set rtp+=./sautest
lockvar g:footest#x
unlockvar g:footest#x
call assert_equal(-1, islocked('g:footest#x'))
call assert_equal(0, exists('g:footest#x'))
call assert_equal(1, g:footest#x)
let &rtp = old_rtp
endfunc
" a:000 function argument test
func s:arg_list_test(...)
call assert_fails('let a:000 = [1, 2]', 'E46:')
call assert_fails('let a:000[0] = 9', 'E742:')
call assert_fails('let a:000[2] = [9, 10]', 'E742:')
call assert_fails('let a:000[3] = {9 : 10}', 'E742:')
" now the tests that should pass
let a:000[2][1] = 9
call extend(a:000[2], [5, 6])
let a:000[3][5] = 8
let a:000[3]['a'] = 12
call assert_equal([1, 2, [3, 9, 5, 6], {'a': 12, '5': 8}], a:000)
endfunc
func Test_func_arg_list()
call s:arg_list_test(1, 2, [3, 4], {5: 6})
endfunc
" Tests for reverse(), sort(), uniq()
func Test_reverse_sort_uniq()
let l = ['-0', 'A11', 2, 2, 'xaaa', 4, 'foo', 'foo6', 'foo', [0, 1, 2], 'x8', [0, 1, 2], 1.5]
call assert_equal(['-0', 'A11', 2, 'xaaa', 4, 'foo', 'foo6', 'foo', [0, 1, 2], 'x8', [0, 1, 2], 1.5], uniq(copy(l)))
call assert_equal([1.5, [0, 1, 2], 'x8', [0, 1, 2], 'foo', 'foo6', 'foo', 4, 'xaaa', 2, 2, 'A11', '-0'], reverse(l))
call assert_equal([1.5, [0, 1, 2], 'x8', [0, 1, 2], 'foo', 'foo6', 'foo', 4, 'xaaa', 2, 2, 'A11', '-0'], reverse(reverse(l)))
call assert_equal(['-0', 'A11', 'foo', 'foo', 'foo6', 'x8', 'xaaa', 1.5, 2, 2, 4, [0, 1, 2], [0, 1, 2]], sort(l))
call assert_equal([[0, 1, 2], [0, 1, 2], 4, 2, 2, 1.5, 'xaaa', 'x8', 'foo6', 'foo', 'foo', 'A11', '-0'], reverse(sort(l)))
call assert_equal(['-0', 'A11', 'foo', 'foo', 'foo6', 'x8', 'xaaa', 1.5, 2, 2, 4, [0, 1, 2], [0, 1, 2]], sort(reverse(sort(l))))
call assert_equal(['-0', 'A11', 'foo', 'foo6', 'x8', 'xaaa', 1.5, 2, 4, [0, 1, 2]], uniq(sort(l)))
let l=[7, 9, 'one', 18, 12, 22, 'two', 10.0e-16, -1, 'three', 0xff, 0.22, 'four']
call assert_equal([-1, 'one', 'two', 'three', 'four', 1.0e-15, 0.22, 7, 9, 12, 18, 22, 255], sort(copy(l), 'n'))
let l=[7, 9, 18, 12, 22, 10.0e-16, -1, 0xff, 0, -0, 0.22, 'bar', 'BAR', 'Bar', 'Foo', 'FOO', 'foo', 'FOOBAR', {}, []]
call assert_equal(['bar', 'BAR', 'Bar', 'Foo', 'FOO', 'foo', 'FOOBAR', -1, 0, 0, 0.22, 1.0e-15, 12, 18, 22, 255, 7, 9, [], {}], sort(copy(l), 1))
call assert_equal(['bar', 'BAR', 'Bar', 'Foo', 'FOO', 'foo', 'FOOBAR', -1, 0, 0, 0.22, 1.0e-15, 12, 18, 22, 255, 7, 9, [], {}], sort(copy(l), 'i'))
call assert_equal(['BAR', 'Bar', 'FOO', 'FOOBAR', 'Foo', 'bar', 'foo', -1, 0, 0, 0.22, 1.0e-15, 12, 18, 22, 255, 7, 9, [], {}], sort(copy(l)))
endfunc
" splitting a string to a List
func Test_str_split()
call assert_equal(['aa', 'bb'], split(' aa bb '))
call assert_equal(['aa', 'bb'], split(' aa bb ', '\W\+', 0))
call assert_equal(['', 'aa', 'bb', ''], split(' aa bb ', '\W\+', 1))
call assert_equal(['', '', 'aa', '', 'bb', '', ''], split(' aa bb ', '\W', 1))
call assert_equal(['aa', '', 'bb'], split(':aa::bb:', ':', 0))
call assert_equal(['', 'aa', '', 'bb', ''], split(':aa::bb:', ':', 1))
call assert_equal(['aa', '', 'bb', 'cc', ''], split('aa,,bb, cc,', ',\s*', 1))
call assert_equal(['a', 'b', 'c'], split('abc', '\zs'))
call assert_equal(['', 'a', '', 'b', '', 'c', ''], split('abc', '\zs', 1))
endfunc
" compare recursively linked list and dict
func Test_listdict_compare()
let l = [1, 2, 3, 4]
let d = {'1': 1, '2': l, '3': 3}
let l[1] = d
call assert_true(l == l)
call assert_true(d == d)
call assert_false(l != deepcopy(l))
call assert_false(d != deepcopy(d))
endfunc
" compare complex recursively linked list and dict
func Test_listdict_compare_complex()
let l = []
call add(l, l)
let dict4 = {"l": l}
call add(dict4.l, dict4)
let lcopy = deepcopy(l)
let dict4copy = deepcopy(dict4)
call assert_true(l == lcopy)
call assert_true(dict4 == dict4copy)
endfunc
func Test_listdict_extend()
" Pass the same List to extend()
let l = [1, 2, 3, 4, 5]
call extend(l, l)
call assert_equal([1, 2, 3, 4, 5, 1, 2, 3, 4, 5], l)
" Pass the same Dict to extend()
let d = { 'a': {'b': 'B'}}
call extend(d, d)
call assert_equal({'a': {'b': 'B'}}, d)
" Pass the same Dict to extend() with "error"
call assert_fails("call extend(d, d, 'error')", 'E737:')
call assert_equal({'a': {'b': 'B'}}, d)
endfunc
+42
View File
@@ -2396,3 +2396,45 @@ func Test_delete_until_paragraph()
call assert_equal('', getline(1))
bwipe!
endfunc
" Test for the gr (virtual replace) command
" Test for the bug fixed by 7.4.387
func Test_gr_command()
enew!
let save_cpo = &cpo
call append(0, ['First line', 'Second line', 'Third line'])
exe "normal i\<C-G>u"
call cursor(2, 1)
set cpo-=X
normal 4gro
call assert_equal('oooond line', getline(2))
undo
set cpo+=X
normal 4gro
call assert_equal('ooooecond line', getline(2))
let &cpo = save_cpo
enew!
endfunc
" When splitting a window the changelist position is wrong.
" Test the changelist position after splitting a window.
" Test for the bug fixed by 7.4.386
func Test_changelist()
let save_ul = &ul
enew!
call append('$', ['1', '2'])
exe "normal i\<C-G>u"
exe "normal Gkylpa\<C-G>u"
set ul=100
exe "normal Gylpa\<C-G>u"
set ul=100
normal gg
vsplit
normal g;
call assert_equal([3, 2], [line('.'), col('.')])
normal g;
call assert_equal([2, 2], [line('.'), col('.')])
call assert_fails('normal g;', 'E662:')
%bwipe!
let &ul = save_ul
endfunc
+14 -14
View File
@@ -638,30 +638,30 @@ func Test_popup_and_window_resize()
return
endif
let rows = h / 3
let g:buf = term_start([GetVimProg(), '--clean', '-c', 'set noswapfile'], {'term_rows': rows})
call term_sendkeys(g:buf, (h / 3 - 1) . "o\<esc>")
let buf = term_start([GetVimProg(), '--clean', '-c', 'set noswapfile'], {'term_rows': rows})
call term_sendkeys(buf, (h / 3 - 1) . "o\<esc>")
" Wait for the nested Vim to exit insert mode, where it will show the ruler.
" Need to trigger a redraw.
call WaitFor(printf('execute("redraw") == "" && term_getline(g:buf, %d) =~ "\\<%d,.*Bot"', rows, rows))
call WaitFor({-> execute("redraw") == "" && term_getline(buf, rows) =~ '\<' . rows . ',.*Bot'})
call term_sendkeys(g:buf, "Gi\<c-x>")
call term_sendkeys(g:buf, "\<c-v>")
call term_wait(g:buf, 100)
call term_sendkeys(buf, "Gi\<c-x>")
call term_sendkeys(buf, "\<c-v>")
call term_wait(buf, 100)
" popup first entry "!" must be at the top
call WaitFor('term_getline(g:buf, 1) =~ "^!"')
call assert_match('^!\s*$', term_getline(g:buf, 1))
call WaitFor({-> term_getline(buf, 1) =~ "^!"})
call assert_match('^!\s*$', term_getline(buf, 1))
exe 'resize +' . (h - 1)
call term_wait(g:buf, 100)
call term_wait(buf, 100)
redraw!
" popup shifted down, first line is now empty
call WaitFor('term_getline(g:buf, 1) == ""')
call assert_equal('', term_getline(g:buf, 1))
call WaitFor({-> term_getline(buf, 1) == ""})
call assert_equal('', term_getline(buf, 1))
sleep 100m
" popup is below cursor line and shows first match "!"
call WaitFor('term_getline(g:buf, term_getcursor(g:buf)[0] + 1) =~ "^!"')
call assert_match('^!\s*$', term_getline(g:buf, term_getcursor(g:buf)[0] + 1))
call WaitFor({-> term_getline(buf, term_getcursor(buf)[0] + 1) =~ "^!"})
call assert_match('^!\s*$', term_getline(buf, term_getcursor(buf)[0] + 1))
" cursor line also shows !
call assert_match('^!\s*$', term_getline(g:buf, term_getcursor(g:buf)[0]))
call assert_match('^!\s*$', term_getline(buf, term_getcursor(buf)[0]))
bwipe!
endfunc
+10 -11
View File
@@ -60,12 +60,8 @@ func Do_test_quotestar_for_x11()
call assert_notmatch(name, serverlist())
let cmd .= ' --servername ' . name
let g:job = job_start(cmd, {'stoponexit': 'kill', 'out_io': 'null'})
call WaitFor('job_status(g:job) == "run"')
if job_status(g:job) != 'run'
call assert_report('Cannot run the Vim server')
return ''
endif
let job = job_start(cmd, {'stoponexit': 'kill', 'out_io': 'null'})
call WaitFor({-> job_status(job) == "run"})
" Takes a short while for the server to be active.
call WaitFor('serverlist() =~ "' . name . '"')
@@ -124,11 +120,14 @@ func Do_test_quotestar_for_x11()
endif
call remote_send(name, ":qa!\<CR>")
call WaitFor('job_status(g:job) == "dead"')
if job_status(g:job) != 'dead'
call assert_report('Server did not exit')
call job_stop(g:job, 'kill')
endif
try
call WaitFor({-> job_status(job) == "dead"})
finally
if job_status(job) != 'dead'
call assert_report('Server did not exit')
call job_stop(job, 'kill')
endif
endtry
return ''
endfunc
+56 -45
View File
@@ -482,19 +482,17 @@ func Test_search_cmdline8()
" Prepare buffer text
let lines = ['abb vim vim vi', 'vimvivim']
call writefile(lines, 'Xsearch.txt')
let g:buf = term_start([GetVimProg(), '--clean', '-c', 'set noswapfile', 'Xsearch.txt'], {'term_rows': 3})
let buf = term_start([GetVimProg(), '--clean', '-c', 'set noswapfile', 'Xsearch.txt'], {'term_rows': 3})
call term_wait(g:buf, 200)
call assert_equal(lines[0], term_getline(g:buf, 1))
call assert_equal(lines[1], term_getline(g:buf, 2))
call WaitFor({-> lines == [term_getline(buf, 1), term_getline(buf, 2)] })
call term_sendkeys(g:buf, ":set incsearch hlsearch\<cr>")
call term_sendkeys(g:buf, ":14vsp\<cr>")
call term_sendkeys(g:buf, "/vim\<cr>")
call term_sendkeys(g:buf, "/b\<esc>")
call term_sendkeys(g:buf, "gg0")
call term_wait(g:buf, 500)
let screen_line = term_scrape(g:buf, 1)
call term_sendkeys(buf, ":set incsearch hlsearch\<cr>")
call term_sendkeys(buf, ":14vsp\<cr>")
call term_sendkeys(buf, "/vim\<cr>")
call term_sendkeys(buf, "/b\<esc>")
call term_sendkeys(buf, "gg0")
call term_wait(buf, 500)
let screen_line = term_scrape(buf, 1)
let [a0,a1,a2,a3] = [screen_line[3].attr, screen_line[4].attr,
\ screen_line[18].attr, screen_line[19].attr]
call assert_notequal(a0, a1)
@@ -607,19 +605,17 @@ func Test_search_cmdline_incsearch_highlight_attr()
endif
" Prepare buffer text
let g:lines = ['abb vim vim vi', 'vimvivim']
call writefile(g:lines, 'Xsearch.txt')
let g:buf = term_start([GetVimProg(), '--clean', '-c', 'set noswapfile', 'Xsearch.txt'], {'term_rows': 3})
call WaitFor('g:lines[0] == term_getline(g:buf, 1)')
call assert_equal(g:lines[0], term_getline(g:buf, 1))
call assert_equal(g:lines[1], term_getline(g:buf, 2))
unlet g:lines
let lines = ['abb vim vim vi', 'vimvivim']
call writefile(lines, 'Xsearch.txt')
let buf = term_start([GetVimProg(), '--clean', '-c', 'set noswapfile', 'Xsearch.txt'], {'term_rows': 3})
call WaitFor({-> lines == [term_getline(buf, 1), term_getline(buf, 2)] })
" Get attr of normal(a0), incsearch(a1), hlsearch(a2) highlight
call term_sendkeys(g:buf, ":set incsearch hlsearch\<cr>")
call term_sendkeys(g:buf, '/b')
call term_wait(g:buf, 200)
let screen_line1 = term_scrape(g:buf, 1)
call term_sendkeys(buf, ":set incsearch hlsearch\<cr>")
call term_sendkeys(buf, '/b')
call term_wait(buf, 200)
let screen_line1 = term_scrape(buf, 1)
call assert_true(len(screen_line1) > 2)
" a0: attr_normal
let a0 = screen_line1[0].attr
@@ -630,53 +626,53 @@ func Test_search_cmdline_incsearch_highlight_attr()
call assert_notequal(a0, a1)
call assert_notequal(a0, a2)
call assert_notequal(a1, a2)
call term_sendkeys(g:buf, "\<cr>gg0")
call term_sendkeys(buf, "\<cr>gg0")
" Test incremental highlight search
call term_sendkeys(g:buf, "/vim")
call term_wait(g:buf, 200)
call term_sendkeys(buf, "/vim")
call term_wait(buf, 200)
" Buffer:
" abb vim vim vi
" vimvivim
" Search: /vim
let attr_line1 = [a0,a0,a0,a0,a1,a1,a1,a0,a2,a2,a2,a0,a0,a0]
let attr_line2 = [a2,a2,a2,a0,a0,a2,a2,a2]
call assert_equal(attr_line1, map(term_scrape(g:buf, 1)[:len(attr_line1)-1], 'v:val.attr'))
call assert_equal(attr_line2, map(term_scrape(g:buf, 2)[:len(attr_line2)-1], 'v:val.attr'))
call assert_equal(attr_line1, map(term_scrape(buf, 1)[:len(attr_line1)-1], 'v:val.attr'))
call assert_equal(attr_line2, map(term_scrape(buf, 2)[:len(attr_line2)-1], 'v:val.attr'))
" Test <C-g>
call term_sendkeys(g:buf, "\<C-g>\<C-g>")
call term_wait(g:buf, 200)
call term_sendkeys(buf, "\<C-g>\<C-g>")
call term_wait(buf, 200)
let attr_line1 = [a0,a0,a0,a0,a2,a2,a2,a0,a2,a2,a2,a0,a0,a0]
let attr_line2 = [a1,a1,a1,a0,a0,a2,a2,a2]
call assert_equal(attr_line1, map(term_scrape(g:buf, 1)[:len(attr_line1)-1], 'v:val.attr'))
call assert_equal(attr_line2, map(term_scrape(g:buf, 2)[:len(attr_line2)-1], 'v:val.attr'))
call assert_equal(attr_line1, map(term_scrape(buf, 1)[:len(attr_line1)-1], 'v:val.attr'))
call assert_equal(attr_line2, map(term_scrape(buf, 2)[:len(attr_line2)-1], 'v:val.attr'))
" Test <C-t>
call term_sendkeys(g:buf, "\<C-t>")
call term_wait(g:buf, 200)
call term_sendkeys(buf, "\<C-t>")
call term_wait(buf, 200)
let attr_line1 = [a0,a0,a0,a0,a2,a2,a2,a0,a1,a1,a1,a0,a0,a0]
let attr_line2 = [a2,a2,a2,a0,a0,a2,a2,a2]
call assert_equal(attr_line1, map(term_scrape(g:buf, 1)[:len(attr_line1)-1], 'v:val.attr'))
call assert_equal(attr_line2, map(term_scrape(g:buf, 2)[:len(attr_line2)-1], 'v:val.attr'))
call assert_equal(attr_line1, map(term_scrape(buf, 1)[:len(attr_line1)-1], 'v:val.attr'))
call assert_equal(attr_line2, map(term_scrape(buf, 2)[:len(attr_line2)-1], 'v:val.attr'))
" Type Enter and a1(incsearch highlight) should become a2(hlsearch highlight)
call term_sendkeys(g:buf, "\<cr>")
call term_wait(g:buf, 200)
call term_sendkeys(buf, "\<cr>")
call term_wait(buf, 200)
let attr_line1 = [a0,a0,a0,a0,a2,a2,a2,a0,a2,a2,a2,a0,a0,a0]
let attr_line2 = [a2,a2,a2,a0,a0,a2,a2,a2]
call assert_equal(attr_line1, map(term_scrape(g:buf, 1)[:len(attr_line1)-1], 'v:val.attr'))
call assert_equal(attr_line2, map(term_scrape(g:buf, 2)[:len(attr_line2)-1], 'v:val.attr'))
call assert_equal(attr_line1, map(term_scrape(buf, 1)[:len(attr_line1)-1], 'v:val.attr'))
call assert_equal(attr_line2, map(term_scrape(buf, 2)[:len(attr_line2)-1], 'v:val.attr'))
" Test nohlsearch. a2(hlsearch highlight) should become a0(normal highlight)
call term_sendkeys(g:buf, ":1\<cr>")
call term_sendkeys(g:buf, ":set nohlsearch\<cr>")
call term_sendkeys(g:buf, "/vim")
call term_wait(g:buf, 200)
call term_sendkeys(buf, ":1\<cr>")
call term_sendkeys(buf, ":set nohlsearch\<cr>")
call term_sendkeys(buf, "/vim")
call term_wait(buf, 200)
let attr_line1 = [a0,a0,a0,a0,a1,a1,a1,a0,a0,a0,a0,a0,a0,a0]
let attr_line2 = [a0,a0,a0,a0,a0,a0,a0,a0]
call assert_equal(attr_line1, map(term_scrape(g:buf, 1)[:len(attr_line1)-1], 'v:val.attr'))
call assert_equal(attr_line2, map(term_scrape(g:buf, 2)[:len(attr_line2)-1], 'v:val.attr'))
call assert_equal(attr_line1, map(term_scrape(buf, 1)[:len(attr_line1)-1], 'v:val.attr'))
call assert_equal(attr_line2, map(term_scrape(buf, 2)[:len(attr_line2)-1], 'v:val.attr'))
call delete('Xsearch.txt')
call delete('Xsearch.txt')
@@ -701,3 +697,18 @@ endfunc
func Test_search_undefined_behaviour2()
call search("\%UC0000000")
endfunc
" Test for search('multi-byte char', 'bce')
func Test_search_multibyte()
if !has('multi_byte')
return
endif
let save_enc = &encoding
set encoding=utf8
enew!
call append('$', '')
call cursor(2, 1)
call assert_equal(2, search('', 'bce', line('.')))
enew!
let &encoding = save_enc
endfunc
-15
View File
@@ -1,15 +0,0 @@
Test for search('multi-byte char', 'bce')
STARTTEST
:source small.vim
:source mbyte.vim
:set encoding=utf-8
:/^Test bce:/+1
:$put =search('', 'bce', line('.'))
:1;/^Results:/,$wq! test.out
ENDTEST
Results:
Test bce:
+36
View File
@@ -46,3 +46,39 @@ func Test_swap_directory()
call delete("Xtest2", "rf")
call delete("Xtest.je", "rf")
endfunc
func Test_swap_group()
if !has("unix")
return
endif
let groups = split(system('groups'))
if len(groups) <= 1
throw 'Skipped: need at least two groups, got ' . string(groups)
endif
try
call delete('Xtest')
split Xtest
call setline(1, 'just some text')
wq
if system('ls -l Xtest') !~ ' ' . groups[0] . ' \d'
throw 'Skipped: test file does not have the first group'
else
silent !chmod 640 Xtest
call system('chgrp ' . groups[1] . ' Xtest')
if system('ls -l Xtest') !~ ' ' . groups[1] . ' \d'
throw 'Skipped: cannot set second group on test file'
else
split Xtest
let swapname = substitute(execute('swapname'), '[[:space:]]', '', 'g')
call assert_match('Xtest', swapname)
" Group of swapfile must now match original file.
call assert_match(' ' . groups[1] . ' \d', system('ls -l ' . swapname))
bwipe!
endif
endif
finally
call delete('Xtest')
endtry
endfunc
+27 -32
View File
@@ -189,15 +189,14 @@ func Test_terminal_scrape_123()
call term_wait(1234)
call term_wait(buf)
let g:buf = buf
" On MS-Windows we first get a startup message of two lines, wait for the
" "cls" to happen, after that we have one line with three characters.
call WaitFor('len(term_scrape(g:buf, 1)) == 3')
call WaitFor({-> len(term_scrape(buf, 1)) == 3})
call Check_123(buf)
" Must still work after the job ended.
let g:job = term_getjob(buf)
call WaitFor('job_status(g:job) == "dead"')
let job = term_getjob(buf)
call WaitFor({-> job_status(job) == "dead"})
call term_wait(buf)
call Check_123(buf)
@@ -213,17 +212,17 @@ func Test_terminal_scrape_multibyte()
if has('win32')
" Run cmd with UTF-8 codepage to make the type command print the expected
" multibyte characters.
let g:buf = term_start("cmd /K chcp 65001")
call term_sendkeys(g:buf, "type Xtext\<CR>")
call term_sendkeys(g:buf, "exit\<CR>")
let g:line = 4
let buf = term_start("cmd /K chcp 65001")
call term_sendkeys(buf, "type Xtext\<CR>")
call term_sendkeys(buf, "exit\<CR>")
let line = 4
else
let g:buf = term_start("cat Xtext")
let g:line = 1
let buf = term_start("cat Xtext")
let line = 1
endif
call WaitFor('len(term_scrape(g:buf, g:line)) >= 7 && term_scrape(g:buf, g:line)[0].chars == "l"')
let l = term_scrape(g:buf, g:line)
call WaitFor({-> len(term_scrape(buf, line)) >= 7 && term_scrape(buf, line)[0].chars == "l"})
let l = term_scrape(buf, line)
call assert_true(len(l) >= 7)
call assert_equal('l', l[0].chars)
call assert_equal('é', l[1].chars)
@@ -235,13 +234,11 @@ func Test_terminal_scrape_multibyte()
call assert_equal('r', l[5].chars)
call assert_equal('s', l[6].chars)
let g:job = term_getjob(g:buf)
call WaitFor('job_status(g:job) == "dead"')
call term_wait(g:buf)
let job = term_getjob(buf)
call WaitFor({-> job_status(job) == "dead"})
call term_wait(buf)
exe g:buf . 'bwipe'
unlet g:buf
unlet g:line
exe buf . 'bwipe'
call delete('Xtext')
endfunc
@@ -254,8 +251,8 @@ func Test_terminal_scroll()
endif
let buf = term_start(cmd)
let g:job = term_getjob(buf)
call WaitFor('job_status(g:job) == "dead"')
let job = term_getjob(buf)
call WaitFor({-> job_status(job) == "dead"})
call term_wait(buf)
if has('win32')
" TODO: this should not be needed
@@ -483,7 +480,7 @@ func Test_terminal_list_args()
endfunction
func Test_terminal_noblock()
let g:buf = term_start(&shell)
let buf = term_start(&shell)
if has('mac')
" The shell or something else has a problem dealing with more than 1000
" characters at the same time.
@@ -498,26 +495,24 @@ func Test_terminal_noblock()
endif
for c in ['a','b','c','d','e','f','g','h','i','j','k']
call term_sendkeys(g:buf, 'echo ' . repeat(c, len) . "\<cr>")
call term_sendkeys(buf, 'echo ' . repeat(c, len) . "\<cr>")
endfor
call term_sendkeys(g:buf, "echo done\<cr>")
call term_sendkeys(buf, "echo done\<cr>")
" On MS-Windows there is an extra empty line below "done". Find "done" in
" the last-but-one or the last-but-two line.
let g:lnum = term_getsize(g:buf)[0] - 1
call WaitFor('term_getline(g:buf, g:lnum) =~ "done" || term_getline(g:buf, g:lnum - 1) =~ "done"', 3000)
let line = term_getline(g:buf, g:lnum)
let lnum = term_getsize(buf)[0] - 1
call WaitFor({-> term_getline(buf, lnum) =~ "done" || term_getline(buf, lnum - 1) =~ "done"}, 3000)
let line = term_getline(buf, lnum)
if line !~ 'done'
let line = term_getline(g:buf, g:lnum - 1)
let line = term_getline(buf, lnum - 1)
endif
call assert_match('done', line)
let g:job = term_getjob(g:buf)
call Stop_shell_in_terminal(g:buf)
call term_wait(g:buf)
unlet g:buf
let g:job = term_getjob(buf)
call Stop_shell_in_terminal(buf)
call term_wait(buf)
unlet g:job
unlet g:lnum
bwipe
endfunc
+1
View File
@@ -190,6 +190,7 @@ func Test_undojoin_redo()
endfunc
func Test_undo_write()
call delete('Xtest')
split Xtest
call feedkeys("ione one one\<Esc>", 'xt')
w!
+30
View File
@@ -776,6 +776,36 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
1272,
/**/
1271,
/**/
1270,
/**/
1269,
/**/
1268,
/**/
1267,
/**/
1266,
/**/
1265,
/**/
1264,
/**/
1263,
/**/
1262,
/**/
1261,
/**/
1260,
/**/
1259,
/**/
1258,
/**/
1257,
/**/