mirror of
https://github.com/chenasraf/vim-matchup.git
synced 2026-05-18 01:38:57 +00:00
Add testcase for #15
This commit is contained in:
25
test/issues/15/enhance-vimrc
Normal file
25
test/issues/15/enhance-vimrc
Normal file
@@ -0,0 +1,25 @@
|
||||
set nocompatible
|
||||
|
||||
" load match-up (and commentary)
|
||||
for s:loc in ['bundle', 'plugged']
|
||||
let &rtp = '~/.vim/'.s:loc.'/vim-matchup,' . &rtp
|
||||
let &rtp .= ',~/.vim/'.s:loc.'/vim-matchup/after'
|
||||
let &rtp = '~/.vim/'.s:loc.'/vim-commentary,' . &rtp
|
||||
let &rtp .= ',~/.vim/'.s:loc.'/vim-commentary/after'
|
||||
endfor
|
||||
|
||||
" load other plugins, if necessary
|
||||
" let &rtp = '~/path/to/other/plugin,' . &rtp
|
||||
|
||||
filetype plugin indent on
|
||||
syntax enable
|
||||
|
||||
" match-up options go here
|
||||
function! IsCommentaryOpFunc()
|
||||
return &operatorfunc ==? matchstr(maparg('<Plug>Commentary', 'n'),
|
||||
\ '\cset op\%(erator\)\?func=\zs.\{-\}\ze<cr>')
|
||||
endfunction
|
||||
|
||||
let g:matchup_text_obj_linewise_operators = ['d', 'y',
|
||||
\ 'g@,IsCommentaryOpFunc()', 'V']
|
||||
|
||||
13
test/issues/15/gc.vim
Normal file
13
test/issues/15/gc.vim
Normal file
@@ -0,0 +1,13 @@
|
||||
function! s:test()
|
||||
|
||||
let l:str = "hello"
|
||||
|
||||
return l:str
|
||||
|
||||
endfunction
|
||||
|
||||
if condition
|
||||
█call one()
|
||||
call two()
|
||||
endif
|
||||
|
||||
19
test/issues/15/issue-vimrc
Normal file
19
test/issues/15/issue-vimrc
Normal file
@@ -0,0 +1,19 @@
|
||||
set nocompatible
|
||||
|
||||
" load match-up (and commentary)
|
||||
for s:loc in ['bundle', 'plugged']
|
||||
let &rtp = '~/.vim/'.s:loc.'/vim-matchup,' . &rtp
|
||||
let &rtp .= ',~/.vim/'.s:loc.'/vim-matchup/after'
|
||||
let &rtp = '~/.vim/'.s:loc.'/vim-commentary,' . &rtp
|
||||
let &rtp .= ',~/.vim/'.s:loc.'/vim-commentary/after'
|
||||
endfor
|
||||
|
||||
" load other plugins, if necessary
|
||||
" let &rtp = '~/path/to/other/plugin,' . &rtp
|
||||
|
||||
filetype plugin indent on
|
||||
syntax enable
|
||||
|
||||
" match-up options go here
|
||||
let g:matchup_text_obj_linewise_operators = ['d', 'y', 'g@', ':']
|
||||
|
||||
Reference in New Issue
Block a user