Skip to content

Instantly share code, notes, and snippets.

@k-takata
Created December 12, 2015 16:20
Show Gist options
  • Save k-takata/3d8e909a1a4955de7572 to your computer and use it in GitHub Desktop.
Save k-takata/3d8e909a1a4955de7572 to your computer and use it in GitHub Desktop.
Sample settings when using matchit.vim
" Load matchit.vim
runtime macros/matchit.vim
function! s:set_match_words()
" Enable these pairs for all file types
let words = ['(:)', '{:}', '[:]', '(:)', '「:」']
if exists('b:match_words')
for w in words
if b:match_words !~ '\V' . w
let b:match_words .= ',' . w
endif
endfor
else
let b:match_words = join(words, ',')
endif
endfunction
augroup matchit-setting
autocmd!
autocmd BufEnter * call s:set_match_words()
augroup END
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment