dotfiles

Cross platform dotfiles for linux, mac and windows
git clone git@getsh.org:dotfiles.git
Log | Files | Refs

commit 64d341a49ab983063032805ff181195f8704a485
parent 854d21d1526f27218a10581c4a22d63331e8193f
Author: Bharatvaj <bharatvaj@yahoo.com>
Date:   Wed, 15 Dec 2021 00:23:20 +0530

Vim plugin changes

wellle/context.vim is removed as sometimes it is taking much time to render the scroll

justinmk/vim-sneak and tpope/vim-unimpaired are added as I've gotten somewhat familiar with them

Tmux + vim configuration finally added! Not using tpm still. Still not that used to tmux. As a side effect of tmux buffer navigation, usual vim buffer navigation has been removed to avoid conflicts

Diffstat:
M.config/tmux/tmux.conf | 19+++++++++++++++++++
M.config/vim/keybindings/keybindings.vim | 6------
M.config/vim/plugin/plugin.vim | 3++-
A.config/vim/themes/themes.vim | 0
4 files changed, 21 insertions(+), 7 deletions(-)

diff --git a/.config/tmux/tmux.conf b/.config/tmux/tmux.conf @@ -40,3 +40,22 @@ set -g status-bg black set -g status-fg white set -g window-status-current-style "bg=white,fg=black" +# Smart pane switching with awareness of Vim splits. +# See: https://github.com/christoomey/vim-tmux-navigator +is_vim="ps -o state= -o comm= -t '#{pane_tty}' \ + | grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?(view|n?vim?x?)(diff)?$'" +bind-key -n 'C-h' if-shell "$is_vim" 'send-keys C-h' 'select-pane -L' +bind-key -n 'C-j' if-shell "$is_vim" 'send-keys C-j' 'select-pane -D' +bind-key -n 'C-k' if-shell "$is_vim" 'send-keys C-k' 'select-pane -U' +bind-key -n 'C-l' if-shell "$is_vim" 'send-keys C-l' 'select-pane -R' +tmux_version='$(tmux -V | sed -En "s/^tmux ([0-9]+(.[0-9]+)?).*/\1/p")' +if-shell -b '[ "$(echo "$tmux_version < 3.0" | bc)" = 1 ]' \ + "bind-key -n 'C-\\' if-shell \"$is_vim\" 'send-keys C-\\' 'select-pane -l'" +if-shell -b '[ "$(echo "$tmux_version >= 3.0" | bc)" = 1 ]' \ + "bind-key -n 'C-\\' if-shell \"$is_vim\" 'send-keys C-\\\\' 'select-pane -l'" + +bind-key -T copy-mode-vi 'C-h' select-pane -L +bind-key -T copy-mode-vi 'C-j' select-pane -D +bind-key -T copy-mode-vi 'C-k' select-pane -U +bind-key -T copy-mode-vi 'C-l' select-pane -R +bind-key -T copy-mode-vi 'C-\' select-pane -l diff --git a/.config/vim/keybindings/keybindings.vim b/.config/vim/keybindings/keybindings.vim @@ -3,12 +3,6 @@ nnoremap <leader>t :tabnew<cr> nnoremap <leader>p :Rg<cr> nnoremap <leader>f :find -" Buffer Navigation -nnoremap <C-J> <C-W><C-J> -nnoremap <C-K> <C-W><C-K> -nnoremap <C-L> <C-W><C-L> -nnoremap <C-H> <C-W><C-H> - " Buffer Creation nnoremap <Leader>v :vsplit<enter> nnoremap <Leader>s :split<enter> diff --git a/.config/vim/plugin/plugin.vim b/.config/vim/plugin/plugin.vim @@ -12,9 +12,10 @@ call plug#begin($XDG_DATA_HOME."/vim/plugged") Plug 'tpope/vim-surround' Plug 'tpope/vim-fugitive' Plug 'tpope/vim-repeat' + Plug 'tpope/vim-unimpaired' Plug 'tommcdo/vim-ninja-feet' Plug 'ap/vim-css-color' - Plug 'wellle/context.vim' + Plug 'justinmk/vim-sneak' Plug 'easymotion/vim-easymotion' Plug 'SirVer/ultisnips' Plug 'sainnhe/gruvbox-material' diff --git a/.config/vim/themes/themes.vim b/.config/vim/themes/themes.vim