" Set options and add mapping such that Vim behaves a lot like MS-Windows " " Maintainer: The Vim Project " Last Change: 2024 Mar 3 " Former Maintainer: Bram Moolenaar " Bail out if this isn't wanted. if exists("g:skip_loading_mswin") && g:skip_loading_mswin finish endif " set the 'cpoptions' to its Vim default if 1 " only do this when compiled with expression evaluation let s:save_cpo = &cpoptions endif set cpo&vim " set 'selection', 'selectmode', 'mousemodel' and 'keymodel' for MS-Windows behave mswin " backspace and cursor keys wrap to previous/next line set backspace=indent,eol,start whichwrap+=<,>,[,] " backspace in Visual mode deletes selection vnoremap d if has("clipboard_working") " 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 map "+gP map "+gP cmap + cmap + else " Use unnamed register while clipboard not exist " 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 noremap gP noremap gP inoremap " inoremap " endif " 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. " Uses the paste.vim autoload script. " Use CTRL-G u to have CTRL-Z only undo the paste. if has("clipboard_working") exe 'inoremap