diff --git a/home/kakoune/latex.kak b/home/kakoune/latex.kak index fa261fe..9d26277 100644 --- a/home/kakoune/latex.kak +++ b/home/kakoune/latex.kak @@ -8,20 +8,23 @@ provide-module latex-kak %{ # Create a simple begin block, put the cursors in and remove multi-cursor on exit. define-command -hidden create-begin-block %{ - execute-keys -with-hooks "i\begin{b0}\end{b0}" - execute-keys -with-hooks "b0c" + execute-keys "i\begin{b0}\end{b0}" + execute-keys "b0" + execute-keys -with-hooks "c" hook -once buffer ModeChange .*:normal %{ - execute-keys -with-hooks -with-maps "gl" + execute-keys -with-maps "gl" } } # Create a begin block with the given parameter as block name. define-command -params 1 create-begin-block-with %{ execute-keys "i\begin{b0}\end{b0}" - execute-keys -with-hooks "b0c%arg{1}gl" + execute-keys "b0c%arg{1}" + execute-keys "ok" + execute-keys -with-maps "gl" } # Create a \param{} block and put the cursor in the middle. define-command -params 2 -hidden create-delims %{ - execute-keys -with-hooks "i%arg{1}hZa%arg{2}zli" + execute-keys "i%arg{1}hZa%arg{2}zli" } define-command -params 1 create-block-with %{ create-delims "\%arg{1}{" "}"