1

Hello Vimmers and LaTeXers,

I cannot get Alt-I to work in vim-latex. It is supposed to insert \item depending on the environment that you are in. Do I need to activate it somehow? Is there a setting for it? When, in insert mode, I press Alt-I in itemize environment, and for that matter anywhere, it write e with acute accent.

Thank you in advance for your help.

Edit: I checked :map and Alt-I does not appear in that list. What could be wrong?

Ali
  • 177
  • 7

1 Answers1

5

This seems to be a known issue, see the comment in ftplugin/latex-suite/envmacros.vim:

" Only include the <M-i> mapping if the user want this. Note that it
" conflicts with inserting 'é'.
if !hasmapto("<Plug>Tex_InsertItemOnThisLine", "i") && g:Tex_AdvancedMath == 1
    imap <buffer> <M-i> <Plug>Tex_InsertItemOnThisLine
endif

From the vim-latex help altkey-mappings:

By default, the mappings involving the key are turned off for compatibility with inserting non-ASCII characters. It can be enabled by setting

let g:Tex_AdvancedMath = 1

in your $VIM/ftplugin/tex.vim.

Curiously, I couldn't find this in the online documentation about Alt Key Macros which starts at:

By default, typing Alt-<key> in Vim takes focus to the menu bar if a menu with the hotkey <key> exists. If in your case, there are conflicts due to this behavior, you will need to set

set winaltkeys=no

in your $VIM/ftplugin/tex.vim in order to use these maps.

See also :map-alt-keys for more information on how Vim handles Alt-<key>.

LEI
  • 1,626
  • 9
  • 18