sponsor Vim development Vim logo Vim Book Ad

unilatex.vim : display LaTeX symbols as unicode while editing

 script karma  Rating 54/24, Downloaded by 3132  Comments, bugs, improvements  Vim wiki

created by
Jos van den Oever
 
script type
ftplugin
 
description
Vim supports unicode since version 6. This means it's possible to display many mathmatical symbols in vim. Writing LaTeX texts can now be much easier. To display unicode symbols while editing LaTeX documents, I've written a plugin for vim.

Screenshot:
http://www.fenk.wau.nl/~oever/software/vim/

What does the plugin do?

- Convert all symbols like \alpha to the unicode symbol α when reading a LaTeX file.
- Convert these commands when typing them.
- Convert the unicode symbols back to LaTeX when saving the document.
 
install details
You can download it an save it in ~/.vim/ftplugin/tex/ to use it.
Filetype plugin must be turned on. Just add the next line to your .vimrc or .gvimrc file:
    filetype plugin on
The encoding must be set to utf-8:
    set encoding=utf-8

Also, you must use gvim with a font that support unicode. Just add something like this to your file .gvimrc:
    set guifont=-misc-fixed-medium-r-normal-*-*-120-*-*-c-*-iso10646-1
Alternatively, you can use vim in a unicode terminal.
 

rate this script Life Changing Helpful Unfulfilling 
script versions (upload new version)

Click on the package to download.

package script version date Vim version user release notes
unilatex.vim 1.2 2002-07-09 6.0 Jos van den Oever The code \int (222B) was associated with the symbol for \vee (2228). This has been fixed.
unilatex.vim 1.1 2002-04-29 6.0 Jos van den Oever The cursur position is stored. This means that saving a file does not move the cursor to the position of the last replacement.

unilatex.vim 1.0 2002-04-29 6.0 Jos van den Oever Initial upload
ip used for rating: 142.132.191.50

If you have questions or remarks about this site, visit the vimonline development pages. Please use this site responsibly.
Questions about Vim should go to the maillist. Help Bram help Uganda.
   
Vim at Github