vim-tmux-navigator working on nzxt
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
# basic {{{
|
||||
# basic [[[
|
||||
|
||||
# reload config file (change file location to your the tmux.conf you want to use)
|
||||
bind r source-file ~/.tmux.conf
|
||||
@@ -11,18 +11,32 @@ set -g mouse on
|
||||
# clear rename prompt
|
||||
bind-key , command-prompt "rename-window '%%'"
|
||||
|
||||
# }}} #
|
||||
# ]]] #
|
||||
|
||||
# panes{{{
|
||||
# panes[[[
|
||||
|
||||
bind h split-window -h
|
||||
bind v split-window -v
|
||||
unbind '"'
|
||||
unbind %
|
||||
|
||||
# vim-tmux-navigator{{{
|
||||
# vim-tmux-navigator[[[
|
||||
|
||||
is_vim="ps -o state= -o comm= -t '#{pane_tty}' \
|
||||
| grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?(view|n?vim?x?)(diff)?$'"
|
||||
|
||||
{{ if .gui }}
|
||||
bind-key -n M-h if-shell "$is_vim" "send-keys M-h" "select-pane -L"
|
||||
bind-key -n M-j if-shell "$is_vim" "send-keys M-j" "select-pane -D"
|
||||
bind-key -n M-k if-shell "$is_vim" "send-keys M-k" "select-pane -U"
|
||||
bind-key -n M-l if-shell "$is_vim" "send-keys M-l" "select-pane -R"
|
||||
bind-key -n M-\ if-shell "$is_vim" "send-keys M-\\" "select-pane -l"
|
||||
bind-key -T copy-mode-vi M-h select-pane -L
|
||||
bind-key -T copy-mode-vi M-j select-pane -D
|
||||
bind-key -T copy-mode-vi M-k select-pane -U
|
||||
bind-key -T copy-mode-vi M-l select-pane -R
|
||||
bind-key -T copy-mode-vi M-\ select-pane -l
|
||||
{{ else }}
|
||||
bind-key -n C-Left if-shell "$is_vim" "send-keys C-Left" "select-pane -L"
|
||||
bind-key -n C-Down if-shell "$is_vim" "send-keys C-Down" "select-pane -D"
|
||||
bind-key -n C-Up if-shell "$is_vim" "send-keys C-Up" "select-pane -U"
|
||||
@@ -33,12 +47,9 @@ bind-key -T copy-mode-vi C-Down select-pane -D
|
||||
bind-key -T copy-mode-vi C-Up select-pane -U
|
||||
bind-key -T copy-mode-vi C-Right select-pane -R
|
||||
bind-key -T copy-mode-vi C-\ select-pane -l
|
||||
# bind-key -T copy-mode-vi M-h select-pane -L
|
||||
# bind-key -T copy-mode-vi M-j select-pane -D
|
||||
# bind-key -T copy-mode-vi M-k select-pane -U
|
||||
# bind-key -T copy-mode-vi M-l select-pane -R
|
||||
# bind-key -T copy-mode-vi M-\ select-pane -l
|
||||
# }}}
|
||||
{{ end }}
|
||||
|
||||
# ]]]
|
||||
|
||||
# kill panes without confirmation
|
||||
bind-key x kill-pane
|
||||
@@ -50,9 +61,9 @@ bind-key & kill-window
|
||||
# bind -n C-Left select-pane -L
|
||||
# bind -n C-l select-pane -R
|
||||
|
||||
# }}}
|
||||
# ]]]
|
||||
|
||||
# plugins {{{
|
||||
# plugins [[[
|
||||
|
||||
set -g @plugin 'tmux-plugins/tpm'
|
||||
set -g @plugin 'tmux-plugins/tmux-sensible'
|
||||
@@ -64,4 +75,4 @@ set -g @plugin 'christoomey/vim-tmux-navigator'
|
||||
|
||||
run -b '~/.tmux/plugins/tpm/tpm'
|
||||
|
||||
# }}} plugins #
|
||||
# ]]] plugins #
|
||||
@@ -271,27 +271,21 @@ Plug 'scrooloose/nerdtree'
|
||||
Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' }
|
||||
Plug 'junegunn/fzf.vim'
|
||||
Plug 'christoomey/vim-tmux-navigator'
|
||||
" mappings [[[ "
|
||||
|
||||
let g:tmux_navigator_no_mappings = 1
|
||||
{{ if eq .linux_os "arch" }}
|
||||
nnoremap <A-j> :TmuxNavigateDown<cr>
|
||||
nnoremap <A-k> :TmuxNavigateUp<cr>
|
||||
nnoremap <A-h> :TmuxNavigateLeft<cr>
|
||||
nnoremap <A-l> :TmuxNavigateRight<cr>
|
||||
{{ end }}
|
||||
" nnoremap <C-Down> :TmuxNavigateDown<cr>
|
||||
" nnoremap <C-Up> :TmuxNavigateUp<cr>
|
||||
" nnoremap <C-Left> :TmuxNavigateLeft<cr>
|
||||
" nnoremap <C-Right> :TmuxNavigateRight<cr>
|
||||
" nnoremap <silent> <leader>j :TmuxNavigateDown<cr>
|
||||
" nnoremap <silent> <leader>k :TmuxNavigateUp<cr>
|
||||
" nnoremap <silent> <leader>h :TmuxNavigateLeft<cr>
|
||||
" nnoremap <silent> <leader>l :TmuxNavigateRight<cr>
|
||||
" nnoremap <silent> <C-j> :TmuxNavigateDown<cr>
|
||||
" nnoremap <silent> <C-k> :TmuxNavigateUp<cr>
|
||||
" nnoremap <silent> <C-h> :TmuxNavigateLeft<cr>
|
||||
" nnoremap <silent> <C-l> :TmuxNavigateRight<cr>
|
||||
" nnoremap <silent> <A-j> :TmuxNavigateDown<cr>
|
||||
" nnoremap <silent> <A-k> :TmuxNavigateUp<cr>
|
||||
" nnoremap <silent> <A-h> :TmuxNavigateLeft<cr>
|
||||
" nnoremap <silent> <A-l> :TmuxNavigateRight<cr>
|
||||
" nnoremap <silent> <M-j> :TmuxNavigateDown<cr>
|
||||
" nnoremap <silent> <M-k> :TmuxNavigateUp<cr>
|
||||
" nnoremap <silent> <M-h> :TmuxNavigateLeft<cr>
|
||||
" nnoremap <silent> <M-l> :TmuxNavigateRight<cr>
|
||||
|
||||
" ]]] mappings "
|
||||
" ]]] vim-plug "
|
||||
|
||||
" Mappings [[[ "
|
||||
|
||||
@@ -13,6 +13,7 @@ r ~/linux-config/dot_config/ranger/rc.conf.tmpl
|
||||
sr ~/linux-config/configs/ranger/shortcuts.conf
|
||||
ss ~/.shortcuts
|
||||
st ~/st/config.def.h
|
||||
t ~/linux-config/dot_tmux.conf.tmpl
|
||||
u ~/linux-config/dot_Xresources.tmpl
|
||||
v ~/linux-config/dot_vimrc.tmpl
|
||||
x ~/linux-config/dot_config/fish/config.fish.tmpl
|
||||
@@ -38,7 +39,7 @@ mc ~/coding/mf-site/assets/sass/main.scss
|
||||
mi ~/coding/mf-site/ideas.md
|
||||
ne ~/linux-config/configs/neofetch/config.conf
|
||||
re README.md
|
||||
t todo.md
|
||||
td todo.md
|
||||
tt txt/todo.md
|
||||
tm ~/.vim/plugged/vim-snippets/UltiSnips/texmath.snippets
|
||||
tp /tmp/
|
||||
|
||||
Reference in New Issue
Block a user