" Set options and add mapping such that Vim behaves a lot like MS-Windows " " Maintainer: Bram Moolenaar " Last change: 1999 Aug 09 " 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 vmap d " CTRL-X and SHIFT-Del are Cut vmap "*x vmap "*x " CTRL-C and CTRL-Insert are Copy vmap "*y vmap "*y " CTRL-V and SHIFT-Insert are Paste nm \\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 map u imap u cmap " CTRL-Y is Redo (although not repeat) map imap cmap " Alt-Space is System menu if has("gui") map :simalt ~ imap :simalt ~ cmap endif " CTRL-A is Select all map gggHG imap gggHG cmap " CTRL-Tab is Next window map w imap w cmap " CTRL-F4 is Close window map c imap c cmap " restore 'cpoptions' set cpoptions& if 1 let &cpoptions = mswin_save_cpo unlet mswin_save_cpo endif