" Set options and add mapping such that Vim behaves a lot like MS-Windows " " Maintainer: Bram Moolenaar " Last change: 2000 Jun 02 " make 'cpoptions' empty if 1 " only do this when compiled with expression evaluation let mswin_save_cpo = &cpoptions endif set cpoptions= " set 'selection', 'selectmode', 'mousemodel' and 'keymodel' for MS-Windows behave mswin " backspace and cursor keys wrap to previous/next line set backspace=2 whichwrap+=<,>,[,] " backspace in Visual mode deletes selection vnoremap d " CTRL-X and SHIFT-Del are Cut vnoremap "*x vnoremap "*x " CTRL-C and CTRL-Insert are Copy vnoremap "*y vnoremap "*y " CTRL-V and SHIFT-Insert are Paste nnoremap \\Paste\\ "=@*.'xy'gPFx"_2x:echo map \\Paste\\ map \\Paste\\ if has("gui") nmenu 20.360 &Edit.&Paste \\Paste\\ nmenu 1.40 PopUp.&Paste \\Paste\\ nmenu ToolBar.Paste \\Paste\\ endif imap x\\Paste\\"_s imap x\\Paste\\"_s if has("gui") imenu 20.360 &Edit.&Paste x\\Paste\\"_s imenu 1.40 PopUp.&Paste x\\Paste\\"_s imenu ToolBar.Paste x\\Paste\\"_s endif cmap * cmap * vmap "-cx\\Paste\\"_x vmap "-cx\\Paste\\"_x if has("gui") vmenu 20.360 &Edit.&Paste "-cx\\Paste\\"_x vmenu 1.40 PopUp.&Paste "-cx\\Paste\\"_x vmenu ToolBar.Paste "-cx\\Paste\\"_x endif " Use CTRL-Q to do what CTRL-V used to do noremap " For CTRL-V to work autoselect must be off set guioptions-=a " CTRL-Z is Undo noremap u inoremap u cnoremap u " CTRL-Y is Redo (although not repeat) noremap inoremap cnoremap " Alt-Space is System menu if has("gui") noremap :simalt ~ inoremap :simalt ~ cnoremap :simalt ~ endif " CTRL-A is Select all noremap gggHG inoremap gggHG cnoremap gggHG " CTRL-Tab is Next window noremap w inoremap w cnoremap w " CTRL-F4 is Close window noremap c inoremap c cnoremap c " restore 'cpoptions' set cpoptions& if 1 let &cpoptions = mswin_save_cpo unlet mswin_save_cpo endif