mirror of
https://github.com/machakann/vim-sandwich.git
synced 2026-05-28 00:26:34 +02:00
d441cf5a45
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' : '',
\ },
\ ]
21 lines
531 B
VimL
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'
|