mirror of
https://github.com/vim/vim.git
synced 2025-11-16 23:24:03 -05:00
runtime(vim): Update base syntax and generator, match :cd commands
Match :cd commands explicitly. fixes: #17964 closes: #18736 Reported by Maxim Kim. Signed-off-by: Doug Kearns <dougkearns@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
committed by
Christian Brabandt
parent
de7049ede1
commit
f46616f0c4
110
runtime/syntax/testdir/input/vim_ex_cd.vim
Normal file
110
runtime/syntax/testdir/input/vim_ex_cd.vim
Normal file
@@ -0,0 +1,110 @@
|
||||
" Vim :cd commands
|
||||
" VIM_TEST_SETUP hi link vimCdArg Todo
|
||||
|
||||
|
||||
cd
|
||||
cd!
|
||||
cd foo
|
||||
cd! foo
|
||||
cd %:h/foo
|
||||
cd! %:h/foo
|
||||
cd foo bar/baz
|
||||
cd! foo bar/baz
|
||||
cd -
|
||||
cd! -
|
||||
|
||||
cd \"foo\"bar\"
|
||||
cd \|foo\|bar\|
|
||||
cd \#foo\#bar\#
|
||||
cd \ foo\ bar\
|
||||
cd \\foo\\bar\\
|
||||
|
||||
cd " comment
|
||||
cd | echo "..."
|
||||
cd! " comment
|
||||
cd! | echo "..."
|
||||
|
||||
|
||||
function Foo()
|
||||
cd
|
||||
cd!
|
||||
cd foo
|
||||
cd! foo
|
||||
cd -
|
||||
cd! -
|
||||
|
||||
cd " comment
|
||||
cd | echo "..."
|
||||
cd! " comment
|
||||
cd! | echo "..."
|
||||
endfunction
|
||||
|
||||
def Foo()
|
||||
cd
|
||||
cd!
|
||||
cd foo
|
||||
cd! foo
|
||||
cd -
|
||||
cd! -
|
||||
|
||||
cd # comment
|
||||
cd | echo "..."
|
||||
cd! # comment
|
||||
cd! | echo "..."
|
||||
enddef
|
||||
|
||||
|
||||
cd | lcd | tcd | chdir | lchdir | tchdir | echo "..."
|
||||
cd - | lcd - | tcd - | chdir - | lchdir - | tchdir - | echo "..."
|
||||
cd foo | lcd foo | tcd foo | chdir foo | lchdir foo | tchdir foo | echo "..."
|
||||
cd! | lcd! | tcd! | chdir! | lchdir! | tchdir! | echo "..."
|
||||
cd! - | lcd! - | tcd! - | chdir! - | lchdir! - | tchdir! - | echo "..."
|
||||
cd! foo | lcd! foo | tcd! foo | chdir! foo | lchdir! foo | tchdir! foo | echo "..."
|
||||
|
||||
cd " comment
|
||||
cd! " comment
|
||||
cd - " comment
|
||||
cd! - " comment
|
||||
cd foo " comment
|
||||
cd! foo " comment
|
||||
lcd " comment
|
||||
lcd! " comment
|
||||
lcd - " comment
|
||||
lcd! - " comment
|
||||
lcd foo " comment
|
||||
lcd! foo " comment
|
||||
tcd " comment
|
||||
tcd! " comment
|
||||
tcd - " comment
|
||||
tcd! - " comment
|
||||
tcd foo " comment
|
||||
tcd! foo " comment
|
||||
chdir " comment
|
||||
chdir! " comment
|
||||
chdir - " comment
|
||||
chdir! - " comment
|
||||
chdir foo " comment
|
||||
chdir! foo " comment
|
||||
lchdir " comment
|
||||
lchdir! " comment
|
||||
lchdir - " comment
|
||||
lchdir! - " comment
|
||||
lchdir foo " comment
|
||||
lchdir! foo " comment
|
||||
tchdir " comment
|
||||
tchdir! " comment
|
||||
tchdir - " comment
|
||||
tchdir! - " comment
|
||||
tchdir foo " comment
|
||||
tchdir! foo " comment
|
||||
|
||||
|
||||
" Issue #17964 (Vim script highlight: endif is not highlighted after lcd)
|
||||
|
||||
def LcdBack()
|
||||
if get(g:, "lcd", 0)
|
||||
g:lcd = 0
|
||||
lcd -
|
||||
endif
|
||||
enddef
|
||||
|
||||
Reference in New Issue
Block a user