diff --git a/.bash_aliases b/.bash_aliases index a7ff620..9dc9860 100644 --- a/.bash_aliases +++ b/.bash_aliases @@ -22,7 +22,6 @@ alias ls="ls -h --color=auto" export CC=gcc export CXX=g++ 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 ccat='pygmentize -g' diff --git a/.gitignore b/.gitignore index b725f5f..32b9478 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,20 @@ .python_history .bash_history .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~ diff --git a/.profile b/.profile index d89ea5a..bff14f1 100644 --- a/.profile +++ b/.profile @@ -25,3 +25,4 @@ fi if [ -d "$HOME/.local/bin" ] ; then PATH="$HOME/.local/bin:$PATH" fi +xmodmap -e 'clear Lock' -e 'keycode 0x42 = Escape' diff --git a/.tmux.conf b/.tmux.conf index 0d84719..761b4c8 100644 --- a/.tmux.conf +++ b/.tmux.conf @@ -67,10 +67,10 @@ bind - split-window -v bind _ split-window -h # pane navigation -bind -r h select-pane -L # move left -bind -r j select-pane -D # move down -bind -r k select-pane -U # move up -bind -r l select-pane -R # move right +#bind -r h select-pane -L # move left +#bind -r j select-pane -D # move down +#bind -r k select-pane -U # move up +#bind -r l select-pane -R # move right bind > swap-pane -D # swap current pane with the next 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 p paste-buffer # paste from the top paste buffer bind P choose-buffer # choose which buffer to paste from - +bind C-l send-keys 'C-l' # -- user defined overrides ---------------------------------------------------- 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< ------------------------------------------------------------------------ @@ -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' diff --git a/.vimrc b/.vimrc index 1fbc276..588a2d2 100644 --- a/.vimrc +++ b/.vimrc @@ -172,7 +172,7 @@ endf nn :call JumpToDef() ino :call JumpToDef()i -nmap :MerlinTypeOf +nmap :MerlinTypeOf " replace currently selected text with default register " without yanking it @@ -243,6 +243,7 @@ Plug 'kien/ctrlp.vim' Plug 'udalov/kotlin-vim' Plug 'ervandew/supertab' Plug 'simnalamburt/vim-mundo' +Plug 'christoomey/vim-tmux-navigator' "Plug 'baabelfish/nvim-nim' call plug#end()