" System gvimrc file for Mac OS X " Author: Benji Fisher " Last modified: 10 February 2003 " If you want to get more Mac-like behavior, leave the "finish" line " commented out. For vim-standard menus, uncomment this line so that the rest " of the file will be ignored. " finish " TODO: Decide whether to leave it in non-compatible mode. " For now, save and restore. let s:save_cpo = &cpo set cpo&vim " Define mac-standard menu items and keyboard shortcuts. aunmenu &File.&New amenu 10.325 &File.&New nmap :confirm enew vmap gv imap cmap omap aunmenu &File.&Open\.\.\. amenu 10.310 &File.&Open\.\.\. nmap :browse confirm e vmap gv imap cmap omap aunmenu &File.&Close amenu 10.330 &File.&Close nmap :if winheight(2) < 0 \ confirm enew \ else \ confirm close \ endif vmap gv imap cmap omap aunmenu &File.&Save amenu 10.340 &File.&Save nmap :if expand("%") == ""browse confirm w \ elseconfirm wendif vmap gv imap cmap omap aunmenu &File.Save\ &As\.\.\. amenu 10.350 &File.Save\ &As\.\.\. nmap :browse confirm saveas vmap gv imap cmap omap " map ?? " is handled by the OS. "amenu File.Quit "nmap :confirm qall "vmap gv "imap "cmap "omap " From the Edit menu of SimpleText: aunmenu &Edit.&Undo amenu 20.310 &Edit.&Undo nmap u vmap gv imap cmap omap vunmenu &Edit.Cu&t vmenu 20.340 &Edit.Cu&t vmap "+x vunmenu &Edit.&Copy vmenu 20.350 &Edit.&Copy vmap "+y cunmenu &Edit.&Copy cmenu 20.350 &Edit.&Copy cmap aunmenu &Edit.&Paste nmenu 20.360 &Edit.&Paste nmap "+gP cmenu &Edit.&Paste cmap + vmenu &Edit.&Paste imenu &Edit.&Paste if has("virtualedit") vmap "-cPaste imap Pastegi else vmap "-cgixPaste"_x imap xPaste"_s endif aunmenu &Edit.&Select\ All amenu 20.400 &Edit.Select\ &All nmap :if &slm != ""exe ":norm gggHG" \ elseexe ":norm ggVG"endif vmap imap cmap omap aunmenu &Edit.&Find amenu 20.410 &Edit.&Find nmap / vmap imap cmap omap amenu 20.420 &Edit.&Next nmap n vmap imap cmap omap vmenu 20.420 &Edit.Find\ &Selection "9y/9 \:if strlen(@9) > 1 \ exe 'norm!v/' . @9 . '/e' . "CR>" \ else exe "norm!v" endif " Copied from $VIMRUNTIME/menu.vim: " Pasting blockwise and linewise selections is not possible in Insert and " Visual mode without the +virtualedit feature. They are pasted as if they " were characterwise instead. Add to that some tricks to leave the cursor in " the right position, also for "gi". if has("virtualedit") nnoremap