1
0
mirror of git://git.code.sf.net/p/zsh/code synced 2024-09-18 09:51:45 +02:00

unposted: internal: Vim ztst support: Add an ftplugin in addition to the syntax highlighter.

This commit is contained in:
Daniel Shahaf 2019-12-27 06:09:59 +00:00
parent 02a33dd071
commit 4a2a15d8dc
4 changed files with 36 additions and 1 deletions

View File

@ -1,3 +1,9 @@
2019-12-27 Daniel Shahaf <danielsh@apache.org>
* unposted: Test/B01cd.ztst, Util/ztst-ftplugin.vim,
Util/ztst-syntax.vim: internal: Vim ztst support: Add an ftplugin
in addition to the syntax highlighter.
2019-12-26 dana <dana@dana.is>
* 45130: Completion/Base/Utility/_multi_parts: Always pass -f

View File

@ -106,7 +106,7 @@
# ZTST_skip: Set this in any test case if that single test case is to be
# skipped. Testing resumes at the next test case in the same file.
#
# Syntax highlighting for Vim is available, see Util/ztst.vim.
# Syntax highlighting for Vim is available, see Util/ztst-*.vim.
cd cdtst.tmp/sub/fake &&
pwd &&
print $PWD

29
Util/ztst-ftplugin.vim Normal file
View File

@ -0,0 +1,29 @@
" ztst filetype plugin
" Only do this when not done yet for this buffer
if exists("b:did_ftplugin")
finish
endif
let s:cpo_save = &cpo
set cpo&vim
" Inherit zsh.vim
runtime! ftplugin/zsh.vim
let b:undo_ftplugin .= "| setl fo< comments< commentstring<"
" Set 'formatoptions' to break comment lines but not other lines,
" and insert the comment leader when hitting <CR> or using "o".
setlocal fo-=t fo+=croql
" Set 'comments' to format expected output/errput lines
setlocal comments+=:*>,:>,:*?,:?,:F:
" Format comments to be up to 78 characters long
if &textwidth == 0
setlocal textwidth=78
endif
let &cpo = s:cpo_save
unlet s:cpo_save