I'm running vim 7.0 on linux, with Vim LatexSuite. I'm trying to use the nifty-looking shortcut for adding items to an itemize environment.

:h Alt-I
<Alt-I>                                            *ls_3_10_4* *ls_a_bE* *Alt-I*
This mapping inserts an \item command at the current cursor location depending on
which environment the cursor is enclosed in. ...

But it's not working. Now <Alt-I> isn't a common mapping style on linux, <M-I> would be used normally, so I guess the mapping is just not set up correctly for linux. This is confirmed by:

:verbose map! <M-I>
No mapping found 

How can I fix this mapping? What's the function it usually maps to?


If I understand your question correctly, you're having problems to get Alt-i working in the console version of vim, right? At least, with gvim it works as expected on my system.

Some terminals send different character codes when using Alt key combinations so that vim is unable to recognize them properly. To fix this, it might help to enable the meta key conversion of the console:

set convert-meta on

and to remap Alt-i in vim like this:

:set <m-i>=^[i

where ^[i is entered by typing Ctrl-V Alt-i. Depending on your terminal setting, Alt-i should now work properly in (console) vim, i.e. it should insert "\item" strings.

BTW, mapping Alt-i is a bad idea if you want to write texts in romance languages because Alt-i has the same key code as é. Thus, it's impossible to type this letter directly when latex-suite is active.

  • :set <m-i>=^[i did it. Apparently there is no convert-meta option in vim 7.3 though. Isn't the recommended way to type accents like \'e anyway? – naught101 Apr 30 '12 at 0:49
  • 1
    Glad to hear, it works now. set convert-meta on is a shell command that should be entered in the console/terminal. Concerning accented letters, it's of course possible to type them with a backslash notation, but if you have lots of them, I prefer to enter them directly. It's less typing and the texts are easier to read in the editor. – Martin Apr 30 '12 at 4:23
  • right, I should have noticed the lack of colon. Thanks :) – naught101 Apr 30 '12 at 5:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.