Re: A question on langmenu setting

2006-06-14 Thread Wu Yongwei

On 6/14/06, Ge [EMAIL PROTECTED] wrote:

I follow its direction, add this script to _vimrc:

if has(gui_win32)  NT Windows
try
language messages en
finally
set langmenu=none
endtry
endif

Now the menu in Vim is not in English, what's wrong
with my script? could anyone point it out, thanks.




Here is the content of my _vimrc :

set nocompatible
source $VIMRUNTIME/vimrc_example.vim
source $VIMRUNTIME/mswin.vim
behave mswin

if has(gui_win32)  NT Windows
try
language messages en
finally
set langmenu=none
endtry
endif

[snipped]

Try putting these lines before sourcing vimrc_example.vim. The menu is
already loaded when executing 'language messages en, so the menu is
not affected.

Another way is runtime! delmenu.vim *after* setting the message language.

Yet another way is using the environment variable LANG without
changing your _vimrc. For English, just set LANG=en.

Best regards,
--
Wu Yongwei
URL: http://wyw.dcweb.cn/


A question on langmenu setting

2006-06-13 Thread Ge
I read vim doc, it says: 

Language to use for menu translation.  Tells which
file is loaded
from the lang directory in 'runtimepath': 
lang/menu_ . langmenu . .vim
   (without the spaces).  For example, to always use
the Dutch menus, no
matter what $LANG is set to: 
:set langmenu=nl_NL.ISO_8859-1
   When 'langmenu' is empty, |v:lang| is used.
Only normal file name characters can be used,
/\*?[| are illegal.
If your $LANG is set to a non-English language but
you do want to use
the English menus: 
:set langmenu=none
   This option must be set before loading menus,
switching on filetype
detection or syntax highlighting.  Once the menus are
defined setting
this option has no effect.  But you could do this: 
:source $VIMRUNTIME/delmenu.vim
:set langmenu=de_DE.ISO_8859-1
:source $VIMRUNTIME/menu.vim
   Warning: This deletes all menus that you defined
yourself!


I follow its direction, add this script to _vimrc:

if has(gui_win32)  NT Windows
try
language messages en
finally
set langmenu=none
endtry
endif

Now the menu in Vim is not in English, what's wrong
with my script? could anyone point it out, thanks.




Here is the content of my _vimrc :

set nocompatible
source $VIMRUNTIME/vimrc_example.vim
source $VIMRUNTIME/mswin.vim
behave mswin

if has(gui_win32)  NT Windows
try
language messages en
finally
set langmenu=none
endtry
endif
 
set diffexpr=MyDiff()
function MyDiff()
  let opt = '-a --binary '
  if diffopt =~ 'icase' | let opt = opt . '-i ' |
endif
  if diffopt =~ 'iwhite' | let opt = opt . '-b ' |
endif
  let arg1 = v:fname_in
  if arg1 =~ ' ' | let arg1 = '' . arg1 . '' | endif
  let arg2 = v:fname_new
  if arg2 =~ ' ' | let arg2 = '' . arg2 . '' | endif
  let arg3 = v:fname_out
  if arg3 =~ ' ' | let arg3 = '' . arg3 . '' | endif
  let eq = ''
  if $VIMRUNTIME =~ ' '
if sh =~ '\cmd'
  let cmd = '' . $VIMRUNTIME . '\diff'
  let eq = ''
else
  let cmd = substitute($VIMRUNTIME, ' ', ' ', '')
. '\diff'
endif
  else
let cmd = $VIMRUNTIME . '\diff'
  endif
  silent execute '!' . cmd . ' ' . opt . arg1 . ' ' .
arg2 . '  ' . arg3 . eq
endfunction



__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com