diff options
author | Peter Palfrader <peter@palfrader.org> | 2021-02-01 19:25:01 +0100 |
---|---|---|
committer | Peter Palfrader <peter@palfrader.org> | 2021-02-01 19:25:01 +0100 |
commit | 0f954c6cbd19080b1cf9253c64466d3af10dd586 (patch) | |
tree | 2962b9d5fc4c589cc20523d972fb09b390f5c74c | |
parent | 609849d865533bf17ed2d0b0716dee9d37e8df3f (diff) |
tmux and vim terminal stuff
-rw-r--r-- | tmux.conf | 3 | ||||
-rw-r--r-- | vimrc | 87 |
2 files changed, 60 insertions, 30 deletions
@@ -11,7 +11,8 @@ bind -n C-Down select-pane -D bind | split-window -h bind - split-window -v -set -g default-terminal "screen-it" +# set -g default-terminal "screen-it" +set -g default-terminal "screen-bce" set -g xterm-keys on set -sg escape-time 0 @@ -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 |