Standardize after/ftplugins, fix #77, fix #69

This commit is contained in:
Andy K. Massimino
2019-11-07 21:38:08 -05:00
parent e706b8d7ce
commit 0b780e9ae1
10 changed files with 106 additions and 12 deletions

View File

@@ -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

View 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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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',

View File

@@ -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

View File

@@ -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

View File

@@ -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