On Mon, May 3, 2010 at 13:43, Tony Mechelynck <antoine.mechely...@gmail.com> wrote: > On 03/05/10 05:55, Edward L. Fox wrote: >> >> Hi Bram, >> >> Here's a small patch provided by Liang Peng, alias Bezetek James. He >> has fixed the problem in menu/unmenu/emenu series commands. >> >> As my understanding, "emenu" is designed for scripts to access some >> menu items. However, "emenu" only accepts the localized menu names. >> For example, you can use your script to add a new menu item by calling >> "amenu File.Test :echo 'hello'<CR>", but you can't execute the same >> menu item by calling "emenu File.Test" if you are not running Vim in >> English mode. Instead, you have to use localized menu name for >> "File". However, we don't have any interface to access the menu >> translation table via script. So "emenu" command is nearly useless >> for script writers. > > [...] > > The :emenu command is also useful to access the Vim menus in console mode, > for instance as follows: > > if has("wildmenu") > set wildmenu wildmode=longest:full,full > else > set wildmode=longest,list:longest,full > endif > > if has('menu') > if !has('gui_running') > runtime menu.vim > endif > set wildcharm=<C-T> " or anything not needed in cmdline mode > map <C-Z> :emenu<C-T> > imap <C-Z> <C-O>:emenu<C-T> > " we can still suspend Vim with :sus[pend] or :st[op] > endif
This patch makes both localized and unlocalized menu items appear in the wild menu. I think it's reasonable because both of them works. What do you think? > > > Best regards, > Tony. > -- > "And what will you do when you grow up to be as big as me?" > asked the father of his little son. > "Diet." > -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php