From 2a30a7159645b8c3419a906c504307459b88105d Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Wed, 30 May 2018 23:04:53 -0400 Subject: [PATCH] vim-patch:8.0.1232: MS-Windows users are confused about default mappings Problem: MS-Windows users are confused about default mappings. Solution: Don't map keys in the console where they don't work. Add a choice in the installer to use MS-Windows key bindings or not. (Christian Brabandt, Ken Takata, closes vim/vim#2093) https://github.com/vim/vim/commit/c3fdf7f80b2febdd8a8f7a1310631567d257d66a --- runtime/mswin.vim | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/runtime/mswin.vim b/runtime/mswin.vim index 6dff7e7719..da869a9fc7 100644 --- a/runtime/mswin.vim +++ b/runtime/mswin.vim @@ -1,7 +1,7 @@ " Set options and add mapping such that Vim behaves a lot like MS-Windows " " Maintainer: Bram Moolenaar -" Last change: 2017 Feb 09 +" Last change: 2017 Oct 28 " bail out if this isn't wanted (mrsvim.vim uses this). if exists("g:skip_loading_mswin") && g:skip_loading_mswin @@ -105,14 +105,15 @@ onoremap c if has("gui") " CTRL-F is the search dialog - noremap :promptfind - inoremap :promptfind - cnoremap :promptfind + noremap has("gui_running") ? ":promptfind\" : "/" + inoremap has("gui_running") ? "\\:promptfind\" : "\\/" + cnoremap has("gui_running") ? "\\:promptfind\" : "\\/" - " CTRL-H is the replace dialog - noremap :promptrepl - inoremap :promptrepl - cnoremap :promptrepl + " CTRL-H is the replace dialog, + " but in console, it might be backspace, so don't map it there + nnoremap has("gui_running") ? ":promptrepl\" : "\" + inoremap has("gui_running") ? "\\:promptrepl\" : "\" + cnoremap has("gui_running") ? "\\:promptrepl\" : "\" endif " restore 'cpoptions'