Skip to content

A small layer on top of the insert mode to easily write unicode characters with commands similar to LaTeX.

License

Notifications You must be signed in to change notification settings

Mesabloo/tex-input.kak

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 

Repository files navigation

tex-input.kak

Provides a very simple input method similar to Emacs' TeX input method (used in the agda-mode, for example) for Kakoune.

Dependencies

This extension makes use of perl 5 internally, so you have to have perl in your $PATH for it to work.

Installation

plug "mesabloo/tex-input.kak" config %{
  tex-input-setup
}

Without plug.kak

Add rc/tex-input.kak to your autoloads or source it from your kakrc, and call tex-input-setup in your kakrc.

Documentation

Toggling the input method

  • tex-input-enable and tex-input-disable respectively enable or disable the LaTeX input method in the current buffer.
  • tex-input-toggle toggles on/off the LaTeX input method in the current buffer. This can be mapped to a user mode for example like this:
    map global user t ': tex-input-toggle<ret>'

Setting additional LaTeX commands

You can extend the dictionary of available LaTeX by passing additional parameters to the tex-input-setup. Those parameters must be of the form "<latex command>:<unicode character>" for them to work.

For example, one may call tex-input-setup "%:%" to add \% to the list of recognized commands.

Both literal : and \ need to be escaped when binding a new latex command. For example, /\\:∧ is a valid specification, while /\:∧ is not.

About

A small layer on top of the insert mode to easily write unicode characters with commands similar to LaTeX.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published