sponsor Vim development Vim logo Vim Book Ad

tex_AutoKeymap : Vim Tex / LaTeX ftplugin to automatically change keymap (language)

 script karma  Rating 4/1, Downloaded by 679  Comments, bugs, improvements  Vim wiki

created by
Artem Shcherbina
 
script type
ftplugin
 
description
This script will be useful for users, who edit tex files with text not in
English language. With this script you will no longer need to change
system language when editing usual text and formulas. Internal vim
language (see keymap) will change automatically based on cursor position.

For example, if you set in your .vimrc or tex.vim file

   let g:tex_Keymap = 'ru'

then in text zone your keymap will be 'ru', and if you start edit a
formula keymap will be changed to default automatically.

It is based on default tex sintax information and some regular expressions.

To disable script you can commentify the string

   let g:tex_Keymap = 'ru'

Use <C-J> to manually change keymap

Suggestions and improvements are appreciated.
 
install details
Put file tex_AutoKeymap.vim into ftplugin folder.
 

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
tex_AutoKeymap.vim 0.9 2012-03-24 7.0 Artem Shcherbina language detection and switching improved
tex_AutoKeymap.vim 0.7 2011-11-19 7.0 Artem Shcherbina Initial upload
ip used for rating: 34.234.83.135

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