mirror of
https://github.com/chenasraf/vim-matchup.git
synced 2026-05-18 01:38:57 +00:00
@@ -1,5 +1,16 @@
|
||||
" vim match-up - even better matching pairs
|
||||
"
|
||||
" Maintainer: Andy Massimino
|
||||
" Email: a@normed.space
|
||||
"
|
||||
|
||||
if !exists('g:loaded_matchup') || !exists('b:did_ftplugin')
|
||||
finish
|
||||
endif
|
||||
|
||||
if matchup#util#check_match_words('bb2bcbee')
|
||||
call matchup#util#append_match_words('/\*:\*/')
|
||||
endif
|
||||
|
||||
" vim: fdm=marker sw=2
|
||||
|
||||
|
||||
25
after/ftplugin/cpp_matchup.vim
Normal file
25
after/ftplugin/cpp_matchup.vim
Normal file
@@ -0,0 +1,25 @@
|
||||
" vim match-up - even better matching pairs
|
||||
"
|
||||
" Maintainer: Andy Massimino
|
||||
" Email: a@normed.space
|
||||
"
|
||||
|
||||
if !exists('g:loaded_matchup') || !exists('b:did_ftplugin')
|
||||
finish
|
||||
endif
|
||||
|
||||
let s:save_cpo = &cpo
|
||||
set cpo&vim
|
||||
|
||||
if matchup#util#matchpref('template', 0)
|
||||
call matchup#util#append_match_words(
|
||||
\ '\%(\s\@<!<\|<\s\@!\)=\@!:\%(\s\@<!>\|>\s\@!\)=\@!')
|
||||
if stridx(&matchpairs, '<:>')
|
||||
setlocal matchpairs-=<:>
|
||||
endif
|
||||
endif
|
||||
|
||||
let &cpo = s:save_cpo
|
||||
|
||||
" vim: fdm=marker sw=2
|
||||
|
||||
@@ -1,3 +1,12 @@
|
||||
" vim match-up - even better matching pairs
|
||||
"
|
||||
" Maintainer: Andy Massimino
|
||||
" Email: a@normed.space
|
||||
"
|
||||
|
||||
if !exists('g:loaded_matchup') || !exists('b:did_ftplugin')
|
||||
finish
|
||||
endif
|
||||
|
||||
let s:save_cpo = &cpo
|
||||
set cpo&vim
|
||||
@@ -12,3 +21,5 @@ call matchup#util#append_match_words(
|
||||
|
||||
let &cpo = s:save_cpo
|
||||
|
||||
" vim: fdm=marker sw=2
|
||||
|
||||
|
||||
@@ -1,9 +1,13 @@
|
||||
" vim match-up - matchit replacement and more
|
||||
" vim match-up - even better matching pairs
|
||||
"
|
||||
" Maintainer: Andy Massimino
|
||||
" Email: a@normed.space
|
||||
"
|
||||
|
||||
if !exists('g:loaded_matchup') || !exists('b:did_ftplugin')
|
||||
finish
|
||||
endif
|
||||
|
||||
let s:save_cpo = &cpo
|
||||
set cpo&vim
|
||||
|
||||
|
||||
@@ -1,4 +1,15 @@
|
||||
" vim match-up - even better matching pairs
|
||||
"
|
||||
" Maintainer: Andy Massimino
|
||||
" Email: a@normed.space
|
||||
"
|
||||
|
||||
if !exists('g:loaded_matchup') || !exists('b:did_ftplugin')
|
||||
finish
|
||||
endif
|
||||
|
||||
let b:matchup_matchparen_timeout=100
|
||||
let b:undo_ftplugin .= ' | unlet! b:matchup_matchparen_timeout'
|
||||
|
||||
" vim: fdm=marker sw=2
|
||||
|
||||
|
||||
@@ -1,4 +1,10 @@
|
||||
if !exists('b:did_ftplugin')
|
||||
" vim match-up - even better matching pairs
|
||||
"
|
||||
" Maintainer: Andy Massimino
|
||||
" Email: a@normed.space
|
||||
"
|
||||
|
||||
if !exists('g:loaded_matchup') || !exists('b:did_ftplugin')
|
||||
finish
|
||||
endif
|
||||
|
||||
@@ -15,3 +21,5 @@ let b:undo_ftplugin .= '| unlet! b:match_midmap'
|
||||
|
||||
let &cpo = s:save_cpo
|
||||
|
||||
" vim: fdm=marker sw=2
|
||||
|
||||
|
||||
@@ -1,9 +1,13 @@
|
||||
" vim match-up - matchit replacement and more
|
||||
" vim match-up - even better matching pairs
|
||||
"
|
||||
" Maintainer: Andy Massimino
|
||||
" Email: a@normed.space
|
||||
"
|
||||
|
||||
if !exists('g:loaded_matchup') || !exists('b:did_ftplugin')
|
||||
finish
|
||||
endif
|
||||
|
||||
let s:save_cpo = &cpo
|
||||
set cpo&vim
|
||||
|
||||
@@ -71,15 +75,20 @@ function! s:get_match_words()
|
||||
endfunction
|
||||
|
||||
function! s:setup_match_words()
|
||||
setlocal matchpairs=(:),{:},[:]
|
||||
let b:matchup_delim_nomatchpairs = 1
|
||||
let b:match_words = s:get_match_words()
|
||||
setlocal matchpairs=(:),{:},[:]
|
||||
let b:matchup_delim_nomatchpairs = 1
|
||||
let b:match_words = s:get_match_words()
|
||||
|
||||
" the syntax method is too slow for latex
|
||||
let b:match_skip = 'r:\\\@<!\%(\\\\\)*%'
|
||||
" the syntax method is too slow for latex
|
||||
let b:match_skip = 'r:\\\@<!\%(\\\\\)*%'
|
||||
|
||||
" the old regexp engine is a bit faster '\%#=1'
|
||||
let b:matchup_regexpengine = 1
|
||||
" the old regexp engine is a bit faster '\%#=1'
|
||||
let b:matchup_regexpengine = 1
|
||||
|
||||
let b:undo_ftplugin =
|
||||
\ (exists('b:undo_ftplugin') ? b:undo_ftplugin . '|' : '')
|
||||
\ . 'unlet! b:matchup_delim_nomatchpairs b:match_words'
|
||||
\ . ' b:match_skip b:matchup_regexpengine'
|
||||
endfunction
|
||||
|
||||
if get(g:, 'vimtex_enabled',
|
||||
|
||||
@@ -1,3 +1,12 @@
|
||||
" vim match-up - even better matching pairs
|
||||
"
|
||||
" Maintainer: Andy Massimino
|
||||
" Email: a@normed.space
|
||||
"
|
||||
|
||||
if !exists('g:loaded_matchup') || !exists('b:did_ftplugin')
|
||||
finish
|
||||
endif
|
||||
|
||||
let s:save_cpo = &cpo
|
||||
set cpo&vim
|
||||
@@ -14,3 +23,5 @@ call matchup#util#patch_match_words(
|
||||
|
||||
let &cpo = s:save_cpo
|
||||
|
||||
" vim: fdm=marker sw=2
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
" vim match-up - matchit replacement and more
|
||||
" vim match-up - even better matching pairs
|
||||
"
|
||||
" Maintainer: Andy Massimino
|
||||
" Email: a@normed.space
|
||||
|
||||
@@ -1,9 +1,13 @@
|
||||
" vim match-up - matchit replacement and more
|
||||
" vim match-up - even better matching pairs
|
||||
"
|
||||
" Maintainer: Andy Massimino
|
||||
" Email: a@normed.space
|
||||
"
|
||||
|
||||
if !exists('g:loaded_matchup') || !exists('b:did_ftplugin')
|
||||
finish
|
||||
endif
|
||||
|
||||
let s:save_cpo = &cpo
|
||||
set cpo&vim
|
||||
|
||||
|
||||
Reference in New Issue
Block a user