diff options
Diffstat (limited to 'vimrc')
-rw-r--r-- | vimrc | 87 |
1 files changed, 58 insertions, 29 deletions
@@ -29,42 +29,71 @@ nnoremap <silent> <C-B> :!make<return> " Set up the left-right actions just right: " ----------------------------------------- -"nnoremap <silent> <C-left> :tabprev<return> -"nnoremap <silent> <C-right> :tabnext<return> -"inoremap <silent> <C-left> <C-O>:tabprev<return> -"inoremap <silent> <C-right> <C-O>:tabnext<return> -"" nnoremap <space><space> :tabnew<return> -"nnoremap <silent> <space><left> :tabprev<return> -"nnoremap <silent> <space><right> :tabnext<return> - -nnoremap <silent> <S-left> :bprevious<return> -nnoremap <silent> <S-right> :bnext<return> -inoremap <silent> <S-left> <C-O>:bprevious<return> -inoremap <silent> <S-right> <C-O>:bnext<return> - -nnoremap <silent> <C-left> :bprevious<return> -nnoremap <silent> <C-right> :bnext<return> -inoremap <silent> <C-left> <C-O>:bprevious<return> -inoremap <silent> <C-right> <C-O>:bnext<return> +" Map Shift-{Left,Right} to the previous/next buffer +" both in normal mode and in insert mode. +" This is for urxvt on buster (rxvt-unicode-256color) +" and a screen launched in that (screen-bce) +nnoremap <silent> <Esc>[d :bprevious<return> +nnoremap <silent> <Esc>[c :bnext<return> +inoremap <silent> <Esc>[d <C-O>:bprevious<return> +inoremap <silent> <Esc>[c <C-O>:bnext<return> +" This makes it work in a tmux on urxvt, +" in xterm, and in tmux/screen in xterm. nnoremap <silent> <Esc>[1;2D :bprevious<return> nnoremap <silent> <Esc>[1;2C :bnext<return> inoremap <silent> <Esc>[1;2D <C-O>:bprevious<return> inoremap <silent> <Esc>[1;2C <C-O>:bnext<return> -nnoremap <silent> <Esc>[D :bprevious<return> -nnoremap <silent> <Esc>[C :bnext<return> -inoremap <silent> <Esc>[D <C-O>:bprevious<return> -inoremap <silent> <Esc>[C <C-O>:bnext<return> - -nnoremap <silent> <Esc>[d :bprevious<return> -nnoremap <silent> <Esc>[c :bnext<return> -inoremap <silent> <Esc>[d <C-O>:bprevious<return> -inoremap <silent> <Esc>[c <C-O>:bnext<return> -" nnoremap <space><space> :bnew<return> -nnoremap <silent> <space><left> :bprevious<return> -nnoremap <silent> <space><right> :bnext<return> +" Navigate in (split) windows +" up/down/left/right +" in xterm: +nnoremap <silent> <Esc>[1;3A :wincmd k<return> +nnoremap <silent> <Esc>[1;3B :wincmd j<return> +nnoremap <silent> <Esc>[1;3D :wincmd h<return> +nnoremap <silent> <Esc>[1;3C :wincmd l<return> +inoremap <silent> <Esc>[1;3A <C-O>:wincmd k<return> +inoremap <silent> <Esc>[1;3B <C-O>:wincmd j<return> +inoremap <silent> <Esc>[1;3D <C-O>:wincmd h<return> +inoremap <silent> <Esc>[1;3C <C-O>:wincmd l<return> + +" in urxvt I can't get Alt-<Arrows> to work, so use ;/,. +" the up/down clash with <Esc> to exit insert mode, followed by / to search :/ +"nnoremap <silent> <Esc>; :wincmd k<return> +"nnoremap <silent> <Esc>/ :wincmd j<return> +nnoremap <silent> <Esc>, :wincmd h<return> +nnoremap <silent> <Esc>. :wincmd l<return> +"inoremap <silent> <Esc>; <C-O>:wincmd k<return> +"inoremap <silent> <Esc>/ <C-O>:wincmd j<return> +inoremap <silent> <Esc>, <C-O>:wincmd h<return> +inoremap <silent> <Esc>. <C-O>:wincmd l<return> + +" nnoremap <silent> <S-left> :bprevious<return> +" nnoremap <silent> <S-right> :bnext<return> + +" nnoremap <silent> <S-left> :bprevious<return> +" nnoremap <silent> <S-right> :bnext<return> +" inoremap <silent> <S-left> <C-O>:bprevious<return> +" inoremap <silent> <S-right> <C-O>:bnext<return> +" +" nnoremap <silent> <C-left> :bprevious<return> +" nnoremap <silent> <C-right> :bnext<return> +" inoremap <silent> <C-left> <C-O>:bprevious<return> +" inoremap <silent> <C-right> <C-O>:bnext<return> +" +" +" nnoremap <silent> <Esc>[D :bprevious<return> +" nnoremap <silent> <Esc>[C :bnext<return> +" inoremap <silent> <Esc>[D <C-O>:bprevious<return> +" inoremap <silent> <Esc>[C <C-O>:bnext<return> +" +" +" nnoremap <silent> <space><left> :bprevious<return> +" nnoremap <silent> <space><right> :bnext<return> +" +" nnoremap <silent> <space><left> :bprevious<return> +" nnoremap <silent> <space><right> :bnext<return> if &term =~ '^screen' " tmux will send xterm-style keys when xterm-keys is on |