From 71e8390b4f7cb03741891fa3acdeb8157bb046ea Mon Sep 17 00:00:00 2001 From: Robert Cranston <rcrnstn@rcrnstn.net> Date: Tue, 14 Nov 2017 07:38:40 +0100 Subject: [PATCH 1/2] Don't go via meta keys for terminal mappings --- plugin/rsi.vim | 32 ++++++++++++++------------------ 1 file changed, 14 insertions(+), 18 deletions(-) diff --git a/plugin/rsi.vim b/plugin/rsi.vim index bf3282b..14969ab 100644 --- a/plugin/rsi.vim +++ b/plugin/rsi.vim @@ -45,14 +45,6 @@ if &encoding ==# 'latin1' && has('gui_running') && !empty(findfile('plugin/sensi set encoding=utf-8 endif -noremap! <M-b> <S-Left> -noremap! <M-d> <C-O>dw -cnoremap <M-d> <S-Right><C-W> -noremap! <M-BS> <C-W> -noremap! <M-f> <S-Right> -noremap! <M-n> <Down> -noremap! <M-p> <Up> - if !has("gui_running") && !has('nvim') silent! exe "set <S-Left>=\<Esc>b" silent! exe "set <S-Right>=\<Esc>f" @@ -61,16 +53,20 @@ if !has("gui_running") && !has('nvim') silent! exe "set <F33>=\<Esc>p" silent! exe "set <F34>=\<Esc>\<C-?>" silent! exe "set <F35>=\<Esc>\<C-H>" - map! <F31> <M-d> - map! <F32> <M-n> - map! <F33> <M-p> - map! <F34> <M-BS> - map! <F35> <M-BS> - map <F31> <M-d> - map <F32> <M-n> - map <F33> <M-p> - map <F34> <M-BS> - map <F35> <M-BS> + noremap! <F31> <C-O>dw + cnoremap <F31> <S-Right><C-W> + noremap! <F32> <Down> + noremap! <F33> <Up> + noremap! <F34> <C-W> + noremap! <F35> <C-W> +else + noremap! <M-b> <S-Left> + noremap! <M-f> <S-Right> + noremap! <M-d> <C-O>dw + cnoremap <M-d> <S-Right><C-W> + noremap! <M-n> <Down> + noremap! <M-p> <Up> + noremap! <M-BS> <C-W> endif " vim:set et sw=2: -- 2.17.1