Closed aloispichler closed 1 year ago
What you want is the following?
before | input | after
\big| | ( | \big(\big)
char
will be used as lhs of imap
such as imap \big( \big(\big)<Left><Left><Left><Left>
.
You need to map only (
and specify at
to add context. A better rule is the follow.
call lexima#add_rule({'char': '(', 'at': '\\big\%#', 'input_after': '\big)', 'filetype': 'latex'})
FYI: Escape \
in at
clause because it is treated as search
argument. For example \sin
is treated as SPACE + "in"
.
Thank you, this works now! I like your extension. Thanks for your quick response in addition. This is perhaps an example for the docs as well.
Good.
I tried the following rule
call lexima#add_rule({'char': '\big(', 'input_after': '\big)', 'filetype': 'latex'})
, which expands correctly, but before that only the letters \ - b - i - g - ) are visible, one after the another. What did I wrong?