updated for version 7.2a-00

This commit is contained in:
Bram Moolenaar
2008-06-25 20:13:35 +00:00
parent 7b6d4a8ce8
commit aba8857aa3
101 changed files with 490 additions and 12020 deletions

View File

@ -2,7 +2,7 @@
" You can also use this as a start for your own set of menus.
"
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2007 Nov 19
" Last Change: 2008 Jun 16
" Note that ":an" (short for ":anoremenu") is often used to make a menu work
" in all modes and avoid side effects from mappings defined by the user.
@ -135,6 +135,11 @@ func! <SID>SelectAll()
exe "norm gg" . (&slm == "" ? "VG" : "gH\<C-O>G")
endfunc
func! s:FnameEscape(fname)
if exists('*fnameescape')
return fnameescape(a:fname)
return escape(a:fname, " \t\n*?[{`$\\%#'\"|!<")
endfunc
" Edit menu
an 20.310 &Edit.&Undo<Tab>u u
@ -193,6 +198,7 @@ fun! s:EditVimrc()
else
let fname = "$HOME/.vimrc"
endif
let fname = s:FnameEscape(fname)
if &mod
exe "split " . fname
else
@ -806,7 +812,7 @@ if has("vertsplit")
if @% == ""
20vsp .
else
exe "20vsp " . expand("%:p:h")
exe "20vsp " . s:FnameEscape(expand("%:p:h"))
endif
endfun
endif
@ -1028,7 +1034,7 @@ endif
" Select a session to load; default to current session name if present
fun! s:LoadVimSesn()
if strlen(v:this_session) > 0
let name = escape(v:this_session, ' \t#%$|<>"*?[{`')
let name = s:FnameEscape(v:this_session)
else
let name = "Session.vim"
endif
@ -1040,7 +1046,7 @@ fun! s:SaveVimSesn()
if strlen(v:this_session) == 0
let v:this_session = "Session.vim"
endif
execute "browse mksession! " . escape(v:this_session, ' \t#%$|<>"*?[{`')
execute "browse mksession! " . s:FnameEscape(v:this_session)
endfun
endif