1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-02-03 19:00:06 +08:00
SpaceVim/bundle/vim-matchup/test/issues/15/enhance-vimrc

26 lines
737 B
Plaintext
Raw Normal View History

2020-06-13 14:06:35 +08:00
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']