diff options
Diffstat (limited to 'runtime/menu.vim')
-rw-r--r-- | runtime/menu.vim | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/runtime/menu.vim b/runtime/menu.vim index 78306a57b8..701dd33cdd 100644 --- a/runtime/menu.vim +++ b/runtime/menu.vim @@ -29,7 +29,8 @@ if exists("v:lang") || &langmenu != "" let s:lang = v:lang endif " A language name must be at least two characters, don't accept "C" - if strlen(s:lang) > 1 + " Also skip "en_US" to avoid picking up "en_gb" translations. + if strlen(s:lang) > 1 && s:lang !~? '^en_us' " When the language does not include the charset add 'encoding' if s:lang =~ '^\a\a$\|^\a\a_\a\a$' let s:lang = s:lang . '.' . &enc @@ -158,6 +159,9 @@ an 20.335 &Edit.-SEP1- <Nop> vnoremenu 20.340 &Edit.Cu&t<Tab>"+x "+x vnoremenu 20.350 &Edit.&Copy<Tab>"+y "+y cnoremenu 20.350 &Edit.&Copy<Tab>"+y <C-Y> +if exists(':tlmenu') + tlnoremenu 20.350 &Edit.&Copy<Tab>"+y <C-W>:<C-Y><CR> +endif nnoremenu 20.360 &Edit.&Paste<Tab>"+gP "+gP cnoremenu &Edit.&Paste<Tab>"+gP <C-R>+ exe 'vnoremenu <script> &Edit.&Paste<Tab>"+gP ' . paste#paste_cmd['v'] @@ -446,12 +450,12 @@ if has("spell") an 40.335.260 &Tools.&Spelling.Set\ Language\ to\ "en_us" :set spl=en_us spell<CR> an <silent> 40.335.270 &Tools.&Spelling.&Find\ More\ Languages :call <SID>SpellLang()<CR> - let s:undo_spellang = ['aun &Tools.&Spelling.&Find\ More\ Languages'] + let s:undo_spelllang = ['aun &Tools.&Spelling.&Find\ More\ Languages'] func! s:SpellLang() - for cmd in s:undo_spellang + for cmd in s:undo_spelllang exe "silent! " . cmd endfor - let s:undo_spellang = [] + let s:undo_spelllang = [] if &enc == "iso-8859-15" let enc = "latin1" @@ -474,7 +478,7 @@ if has("spell") let found += 1 let menuname = '&Tools.&Spelling.' . escape(g:menutrans_set_lang_to, "\\. \t|") . '\ "' . nm . '"' exe 'an 40.335.' . n . ' ' . menuname . ' :set spl=' . nm . ' spell<CR>' - let s:undo_spellang += ['aun ' . menuname] + let s:undo_spelllang += ['aun ' . menuname] endif let n += 10 endfor @@ -565,7 +569,7 @@ func! s:XxdConv() %!mc vim:xxd else call s:XxdFind() - exe '%!"' . g:xxdprogram . '"' + exe '%!' . g:xxdprogram endif if getline(1) =~ "^0000000:" " only if it worked set ft=xxd @@ -579,7 +583,7 @@ func! s:XxdBack() %!mc vim:xxd -r else call s:XxdFind() - exe '%!"' . g:xxdprogram . '" -r' + exe '%!' . g:xxdprogram . ' -r' endif set ft= doautocmd filetypedetect BufReadPost @@ -591,6 +595,9 @@ func! s:XxdFind() " On the PC xxd may not be in the path but in the install directory if has("win32") && !executable("xxd") let g:xxdprogram = $VIMRUNTIME . (&shellslash ? '/' : '\') . "xxd.exe" + if g:xxdprogram =~ ' ' + let g:xxdprogram = '"' .. g:xxdprogram .. '"' + endif else let g:xxdprogram = "xxd" endif |