Files
Unknown d441cf5a45 Allow users to customize magicchar-f (#71)
Use `g:sandwich#magicchar#f#patterns` or `b:sandwich_magicchar_f_patterns`.
Each of those are a list of patterns dictionary like:
	let g:sandwich#magicchar#f#patterns = [
	\   {
	\     'header' : '\<\h\k*',
	\     'bra'    : '(',
	\     'ket'    : ')',
	\     'footer' : '',
	\   },
	\ ]
2019-02-02 16:20:56 +08:00

21 lines
531 B
VimL

if &compatible || exists('b:did_sandwich_vim_ftplugin') || get(g:, 'sandwich_no_vim_ftplugin', 0)
finish
endif
let b:sandwich_magicchar_f_patterns = [
\ {
\ 'header' : '\C\<\%(\h\|[sa]:\h\|g:[A-Z]\)\k*',
\ 'bra' : '(',
\ 'ket' : ')',
\ 'footer' : '',
\ },
\ ]
let b:did_sandwich_vim_ftplugin = 1
if !exists('b:undo_ftplugin')
let b:undo_ftplugin = ''
else
let b:undo_ftplugin .= ' | '
endif
let b:undo_ftplugin .= 'unlet! b:did_sandwich_vim_ftplugin b:sandwich_magicchar_f_patterns'