From 8a7e02d45df3b6d3a65da72fea07eb5e9de22f9d Mon Sep 17 00:00:00 2001 From: Hektor Misplon Date: Thu, 7 May 2020 14:11:54 +0000 Subject: [PATCH] Make vim & tmux more consistent --- .tmux.conf | 41 ++++++++++++++++++++++++++++++++++------- .vimrc | 18 +++++++++--------- 2 files changed, 43 insertions(+), 16 deletions(-) diff --git a/.tmux.conf b/.tmux.conf index 3005ea4..ec8dac4 100644 --- a/.tmux.conf +++ b/.tmux.conf @@ -1,18 +1,45 @@ set-option -g prefix C-Space -bind -r k select-pane -U -bind -r j select-pane -D -bind -r h select-pane -L -bind -r l select-pane -R +# vim-style bindings ____________ +# split +unbind v unbind s -unbind h unbind % # vsplit unbind '"' # hsplit - -# vim-style splits bind v split-window -h -c "#{pane_current_path}" bind s split-window -v -c "#{pane_current_path}" +set-window-option -g mode-keys vi + +# split navigate +bind -r h select-pane -L +bind -r j select-pane -D +bind -r k select-pane -U +bind -r l select-pane -R +# bind -n C-h select-pane -L +# bind -n C-j select-pane -D +# bind -n C-k select-pane -U +# bind -n C-l select-pane -R + +# split resize +bind -r H resize-pane -L 2 +bind -r J resize-pane -D 2 +bind -r K resize-pane -U 2 +bind -r L resize-pane -R 2 + +# tmux settings _________________ # window numbers from 1 set -g base-index 1 + +# theme ________________________ + +# status bar +set-option -g status-style fg=default,bg=black +set-window-option -g window-status-style fg=default,bg=black +set-window-option -g window-status-current-style fg=black,bg=white +set-option -g pane-border-style fg=white +set-option -g pane-active-border-style fg=white +set-option -g message-style fg=brightred,bg=black #orange and base01 +set-option -g display-panes-active-colour blue +set-option -g display-panes-colour brightred diff --git a/.vimrc b/.vimrc index 33de0a8..014aab0 100644 --- a/.vimrc +++ b/.vimrc @@ -48,22 +48,22 @@ nnoremap sk k nnoremap sl l " split resize -nnoremap srh < -nnoremap srl > -nnoremap srk + -nnoremap srj - +nnoremap sH < +nnoremap sJ - +nnoremap sK + +nnoremap sL > " file tree nnoremap sb :Lex " hard mode -nnoremap -nnoremap nnoremap +nnoremap +nnoremap nnoremap -inoremap -inoremap inoremap +inoremap +inoremap inoremap " quick quit @@ -157,7 +157,7 @@ let g:NERDCommentEmptyLines = 1 let g:fzf_layout = {'window': { 'width': 0.62, 'height': 0.62}} " fzf - use silversearcher-ag to respect .gitignore -let $FZF_DEFAULT_COMMAND = 'ag -g ""' +let $FZF_DEFAULT_COMMAND = 'ag --hidden --ignore .git -g ""' let g:ag_working_path_mode="r" set wildignore+=*/node_modules/*,*/tmp/*,*.so,*.swp,*.zip " fzf ignore