mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-02-03 09:00:06 +08:00
26 lines
737 B
Plaintext
26 lines
737 B
Plaintext
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']
|
|
|