File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22autocmd FileType clojure let b: lexima_disabled = 1
33
44" Add rules for LaTeX $ pairs.
5- call lexima#add_rule (
6- \ {' char' : ' $' , ' input_after' : ' $' , ' filetype' : ' latex' })
7- call lexima#add_rule (
8- \ {' char' : ' $' , ' at' : ' \%#\$' , ' leave' : 1 , ' filetype' : ' latex' })
9- call lexima#add_rule (
10- \ {' char' : ' <BS>' , ' at' : ' \$\%#\$' , ' delete' : 1 , ' filetype' : ' latex' })
5+ try
6+ call lexima#add_rule (
7+ \ {' char' : ' $' , ' input_after' : ' $' , ' filetype' : ' latex' })
8+ call lexima#add_rule (
9+ \ {' char' : ' $' , ' at' : ' \%#\$' , ' leave' : 1 , ' filetype' : ' latex' })
10+ call lexima#add_rule (
11+ \ {' char' : ' <BS>' , ' at' : ' \$\%#\$' , ' delete' : 1 , ' filetype' : ' latex' })
12+ catch /^Vim\%((\a\+)\)\=:E117/
13+ endtry
Original file line number Diff line number Diff line change @@ -5,9 +5,12 @@ nnoremap <silent><expr> coe
55 \ ":<C-U> let b:lexima_disabled = 1<CR> :echo 'Disabled lexima on buffer'<CR> "
66
77" Fix newline mappings to work with lexima.
8- call lexima#insmode#define_altanative_key (' <C-CR>' , ' <CR>' )
9- call lexima#insmode#define_altanative_key (' <S-CR>' , ' <CR>' )
10- call lexima#insmode#define_altanative_key (' <C-J>' , ' <CR>' )
8+ try
9+ call lexima#insmode#define_altanative_key (' <C-CR>' , ' <CR>' )
10+ call lexima#insmode#define_altanative_key (' <S-CR>' , ' <CR>' )
11+ call lexima#insmode#define_altanative_key (' <C-J>' , ' <CR>' )
12+ catch /^Vim\%((\a\+)\)\=:E117/
13+ endtry
1114
1215" Use ctrl-h as backspace.
1316imap <expr> <C-H> lexima#expand('<LT> BS>', 'i')
You can’t perform that action at this time.
0 commit comments