Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there something like the "TeX input method" in vim?

Emacs has a feature called the TeX input method: you can input unicode symbols by typing the associated (La)TeX macro. For example, typing \lambda gives λ.

Is there a package that gives a similar functionality in vim?

like image 542
chrbr Avatar asked Oct 31 '25 23:10

chrbr


1 Answers

There is a package called latex-unicoder on Github. It can be installed e.g. with the Vundle.vim plugin manager by adding

Plugin 'joom/latex-unicoder.vim'

to your .vimrc file and calling :PluginInstall.

When you are in Normal Mode, you can call C-l (which is Ctrl+L), and then directly type in the LaTeX command of the symbol, e.g. \lambda. This inserts the Unicode symbol λ into your document. The plugin even features an auto-completion by pressing Tab

like image 130
hbaderts Avatar answered Nov 04 '25 01:11

hbaderts