vim-latex插件开启Alt快捷键

在决定全面使用vim-latex来编写latex文件后,发现Alt键一直没有启用。于是在nvim下查询帮助:help latex-suite.txt , 然后找到Alt相关,即

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
Latex-Suite utilizes a set of macros originally created by Carl Mueller in
auctex.vim to make inserting all the \left ... \right stuff very easy and to
also make some use of the heavily under-utilized <Alt> key.

NOTE: By default, the mappings involving the <Alt> 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.


NOTE: 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.

由于我是在neovim下使用的vim-latex, 于是找到路径为:~/.local/share/nvim/lazy/vim-latex/ftplugin/ 但是发现没有文件tex.vim, 于是, 即

~/.local/share/nvim/lazy/vim-latex/ftplugin/tex.vim
1
2
let g:Tex_AdvancedMath = 1
set winaltkeys=no

经过上述设置后Alt键终于被启用了,我目前使用的主要是它智能插入item的功能。