Add simpler navigation
This commit is contained in:
parent
82604bbe81
commit
40706f22b1
5 changed files with 54 additions and 21 deletions
|
|
@ -22,7 +22,6 @@ alias ls="ls -h --color=auto"
|
||||||
export CC=gcc
|
export CC=gcc
|
||||||
export CXX=g++
|
export CXX=g++
|
||||||
alias did="vim +'normal Go' +'r!date' ~/Documents/did.txt"
|
alias did="vim +'normal Go' +'r!date' ~/Documents/did.txt"
|
||||||
xmodmap -e 'clear Lock' -e 'keycode 0x42 = Escape'
|
|
||||||
|
|
||||||
alias lcat='pygmentize -g -O style=colorful,linenos=1 | grep -P "^\d\d\d\d:"'
|
alias lcat='pygmentize -g -O style=colorful,linenos=1 | grep -P "^\d\d\d\d:"'
|
||||||
alias ccat='pygmentize -g'
|
alias ccat='pygmentize -g'
|
||||||
|
|
|
||||||
17
.gitignore
vendored
17
.gitignore
vendored
|
|
@ -2,3 +2,20 @@
|
||||||
.python_history
|
.python_history
|
||||||
.bash_history
|
.bash_history
|
||||||
.vim/undo
|
.vim/undo
|
||||||
|
# Swap
|
||||||
|
[._]*.s[a-v][a-z]
|
||||||
|
[._]*.sw[a-p]
|
||||||
|
[._]s[a-rt-v][a-z]
|
||||||
|
[._]ss[a-gi-z]
|
||||||
|
[._]sw[a-p]
|
||||||
|
|
||||||
|
# Session
|
||||||
|
Session.vim
|
||||||
|
|
||||||
|
# Temporary
|
||||||
|
.netrwhist
|
||||||
|
*~
|
||||||
|
# Auto-generated tag files
|
||||||
|
tags
|
||||||
|
# Persistent undo
|
||||||
|
[._]*.un~
|
||||||
|
|
|
||||||
1
.profile
1
.profile
|
|
@ -25,3 +25,4 @@ fi
|
||||||
if [ -d "$HOME/.local/bin" ] ; then
|
if [ -d "$HOME/.local/bin" ] ; then
|
||||||
PATH="$HOME/.local/bin:$PATH"
|
PATH="$HOME/.local/bin:$PATH"
|
||||||
fi
|
fi
|
||||||
|
xmodmap -e 'clear Lock' -e 'keycode 0x42 = Escape'
|
||||||
|
|
|
||||||
53
.tmux.conf
53
.tmux.conf
|
|
@ -67,10 +67,10 @@ bind - split-window -v
|
||||||
bind _ split-window -h
|
bind _ split-window -h
|
||||||
|
|
||||||
# pane navigation
|
# pane navigation
|
||||||
bind -r h select-pane -L # move left
|
#bind -r h select-pane -L # move left
|
||||||
bind -r j select-pane -D # move down
|
#bind -r j select-pane -D # move down
|
||||||
bind -r k select-pane -U # move up
|
#bind -r k select-pane -U # move up
|
||||||
bind -r l select-pane -R # move right
|
#bind -r l select-pane -R # move right
|
||||||
bind > swap-pane -D # swap current pane with the next one
|
bind > swap-pane -D # swap current pane with the next one
|
||||||
bind < swap-pane -U # swap current pane with the previous one
|
bind < swap-pane -U # swap current pane with the previous one
|
||||||
|
|
||||||
|
|
@ -157,12 +157,41 @@ if -b '[ -c /dev/clipboard ]' 'bind y run -b "tmux save-buffer - > /dev/clipboar
|
||||||
bind b list-buffers # list paste buffers
|
bind b list-buffers # list paste buffers
|
||||||
bind p paste-buffer # paste from the top paste buffer
|
bind p paste-buffer # paste from the top paste buffer
|
||||||
bind P choose-buffer # choose which buffer to paste from
|
bind P choose-buffer # choose which buffer to paste from
|
||||||
|
bind C-l send-keys 'C-l'
|
||||||
|
|
||||||
# -- user defined overrides ----------------------------------------------------
|
# -- user defined overrides ----------------------------------------------------
|
||||||
|
|
||||||
if '[ -f ~/.tmux.conf.local ]' 'source ~/.tmux.conf.local'
|
if '[ -f ~/.tmux.conf.local ]' 'source ~/.tmux.conf.local'
|
||||||
|
|
||||||
|
set -g @plugin 'tmux-plugins/tpm'
|
||||||
|
set -g @plugin 'tmux-plugins/tmux-sensible'
|
||||||
|
set -g @plugin 'tmux-plugins/tmux-yank'
|
||||||
|
set -g @plugin 'tmux-plugins/tmux-copycat'
|
||||||
|
set -g @plugin 'nhdaly/tmux-better-mouse-mode'
|
||||||
|
set -g @plugin 'christoomey/vim-tmux-navigator'
|
||||||
|
|
||||||
|
# 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 -iE '^[^TXZ ]+ +(\\S+\\/)?g?vim(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"
|
||||||
|
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
|
||||||
|
|
||||||
|
# Other examples:
|
||||||
|
# set -g @plugin 'github_username/plugin_name'
|
||||||
|
# set -g @plugin 'git@github.com/user/plugin'
|
||||||
|
# set -g @plugin 'git@bitbucket.com/user/plugin'
|
||||||
|
|
||||||
|
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
|
||||||
|
run '~/.tmux/plugins/tpm/tpm'
|
||||||
|
|
||||||
# -- 8< ------------------------------------------------------------------------
|
# -- 8< ------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
@ -1150,17 +1179,3 @@ run 'cut -c3- ~/.tmux.conf | sh -s _apply_configuration'
|
||||||
# }
|
# }
|
||||||
#
|
#
|
||||||
# "$@"
|
# "$@"
|
||||||
# List of plugins
|
|
||||||
set -g @plugin 'tmux-plugins/tpm'
|
|
||||||
set -g @plugin 'tmux-plugins/tmux-sensible'
|
|
||||||
set -g @plugin 'tmux-plugins/tmux-yank'
|
|
||||||
set -g @plugin 'tmux-plugins/tmux-copycat'
|
|
||||||
set -g @plugin 'nhdaly/tmux-better-mouse-mode'
|
|
||||||
|
|
||||||
# Other examples:
|
|
||||||
# set -g @plugin 'github_username/plugin_name'
|
|
||||||
# set -g @plugin 'git@github.com/user/plugin'
|
|
||||||
# set -g @plugin 'git@bitbucket.com/user/plugin'
|
|
||||||
|
|
||||||
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
|
|
||||||
run '~/.tmux/plugins/tpm/tpm'
|
|
||||||
|
|
|
||||||
3
.vimrc
3
.vimrc
|
|
@ -172,7 +172,7 @@ endf
|
||||||
nn <C-g> :call JumpToDef()<cr>
|
nn <C-g> :call JumpToDef()<cr>
|
||||||
ino <C-g> <esc>:call JumpToDef()<cr>i
|
ino <C-g> <esc>:call JumpToDef()<cr>i
|
||||||
|
|
||||||
nmap <C-a> :MerlinTypeOf<cr>
|
nmap <C-t> :MerlinTypeOf<cr>
|
||||||
|
|
||||||
" replace currently selected text with default register
|
" replace currently selected text with default register
|
||||||
" without yanking it
|
" without yanking it
|
||||||
|
|
@ -243,6 +243,7 @@ Plug 'kien/ctrlp.vim'
|
||||||
Plug 'udalov/kotlin-vim'
|
Plug 'udalov/kotlin-vim'
|
||||||
Plug 'ervandew/supertab'
|
Plug 'ervandew/supertab'
|
||||||
Plug 'simnalamburt/vim-mundo'
|
Plug 'simnalamburt/vim-mundo'
|
||||||
|
Plug 'christoomey/vim-tmux-navigator'
|
||||||
"Plug 'baabelfish/nvim-nim'
|
"Plug 'baabelfish/nvim-nim'
|
||||||
call plug#end()
|
call plug#end()
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue