diff --git a/.config/kak/autoload/filetype/latex.kak b/.config/kak/autoload/filetype/latex.kak index af196c55..90cd44f2 100644 --- a/.config/kak/autoload/filetype/latex.kak +++ b/.config/kak/autoload/filetype/latex.kak @@ -1,3 +1,11 @@ +# wrap selection in \emph{...} +define-command -params 1 latex-surround-add %~ + execute-keys -draft 'i\emph{a}' +~ +define-command -params 1 latex-surround-remove %~ + execute-keys -save-regs '"' -draft '{d\\emphd' +~ + hook global WinSetOption filetype=latex %{ set-option window formatcmd "tex-fmt --stdin" set-option window autowrap_fmtcmd 'tex-fmt --stdin -l %c'