Re: [Vim-latex-devel] Delete Menus when done with editing tex file
Brought to you by:
srinathava,
tmaas
From: Aditya M. <ad...@um...> - 2003-09-21 19:24:29
|
Hi Srinath, Today Srinath Avadhanula wrote about Re: [Vim-latex-devel] Delete Menus... >Aditya, > >> Hi, >> There is something that I find a little irritating with the latex-suite >> package. The menus are excellent but they occupy a lot of space on the >> gui. So whenever I am finished with the editing of the latex file, I do >> not want the menu anymore. There are other menus that I want to use, but >> there is no way in which the latex-suite menus can be turned off when I >> do not need them. >> Is there some way in which the filetype menus can be associated with >> the local buffer, so that when I delete the buffer containing the tex >> file then the tex menu is automatically deleted. >> Another mehtod could be that there is something like >> au BufLeave FileType=tex call delteMenu() <CR> >> >This topic has come up in the past, and unfortunately, I have been >putting a damper on things. We thought of something like > >au BufEnter * :call Tex_CheckMenus() > >(note BufEnter instead of BufLeave). Tex_CheckMenus() will check if the >buffer being entered is a tex buffer and if so, leave the menus intact >if they are already present and regerate the menus if they no longer >exist. Otherwise it will kill the menus. However, regenerating menus is >a very time-consuming process and I beleive it will be more of an >annoyance than a time-saver. Also, the menus which are created by >Latex-suite are not created by a single function but by various >sub-functions distributed in various scripts. For something like this to >work, those things will have to pulled together... Better still, all >those various places will create menus independently, but on a >LatexSuiteCreateMenus event which could be fired from Tex_CheckMenus as >needed. > >You know, I do not want to veto against this or anything. As of right >now, I am running short on time, so this might have to wait for a while >(3-4 weeks). > I understand, you guys are also under a lot of pressure and to have developed such a great package does take a lot of time and effort. > >> where delteMenu is a function that deletes the menu. >> >> Otherwise it could be a entry (with a corresponding command) in the >> tex-Suite menu. This will be a much better option as I am not sure how >> the previous two will affect the speed of gvim. As it is gvim runs >> >The other method of listing all of latex-suite's menus under a single >master menu is already possible. Unfortunately, this does not seem to be >documented :( You have to set the value of g:Tex_MenuPrefix to something >which includes a '.' in it. The default value is 'TeX'. This creates >TeX-Suite, TeX-Packages etc. If you set it to 'Latex-Suite.' then all >menus will be nested under the 'Latex-Suite' menu. > I did not know about this feature. This is close to what I want. I tried with TexLet g:Tex_MenuPrefix="Late&x-Suite." and then tearoff Tex-Suite This works fine for my requirements. Infact what I find better is TexLet g:Tex_MenuPrefix="]Latex-Suite" and then tear-off. This way, it does not clutter my menu space at all, and as I use the menu infrequently, this is just about perfect. Thanks for your help Cheers Aditya >HTH >Srinath > |