shelper
shelper

Reputation: 10573

how to set vim menu reload for different filetypes

i use vim to edit different filetypes. it seems vim can load the filetype plugin correctly, for different filetypes the highlight, indent and comment are all working well. but the menubar seems not working. eg. i installed vim-latex, therefore after i open a .tex file, the menu-bar has all the menus Tex-suite, Tex-enviroment, Tex-Math, etc. but when i switch back to a .py file, these menus are still there... and even the keymap for .tex file compling is still there. when i type <leader>ll, vim still compiles the .tex file in previous buffer...

How should i reset vim menus (and the keymaps) when a different filetype is loaded? thanks!

Upvotes: 0

Views: 138

Answers (1)

Ingo Karkat
Ingo Karkat

Reputation: 172590

I didn't know vim-latex before, but it looks like a powerful suite that totally takes over Vim, and currently does not support undoing its massive customizations once it's been loaded.

You can get rid of the menu via

:aunmenu TeX-Suite

and likewise remove the mapping via

:nunmap <buffer> <Leader>ll

But I guess simply quitting Vim and re-launching it is the easiest, pragmatic solution.

Of course, you can file enhancement requests against the project, but I guess this is not high on their agenda, and some people may find the toggling of the menu when switching buffers more annoying than the lingering menu.

Upvotes: 1

Related Questions