I am sorry if this has been asked before but I cannot find anything related. I tried reading through the docs but the documentation for hooks are very lacking.
I work with Latex and I would to autocomplete environment. I’d like Kakoune to do the following, when I type,
}, kakoune should execute the flowing
<esc>Xypllwcend<esc>O that does the following
<esc>go to normal mode
Xselect the entire line,
ycopy it and
pput it below.
llto move to the first letter of
beginon the pasted line.
- ‘w’ to select
cto replace and get to edit mode, and put
<esc>to go to normal mode and enter edit mode on the above line.
This has become routine and I do it continuously everyday. Can this be automated for adding any environment not just
itemize? If so, please tell me how? Thank you.