consolodate with develop
This commit is contained in:
parent
29a95ec965
commit
b6adf06830
|
@ -1,32 +1,12 @@
|
|||
# Plugins
|
||||
set-environment -g TMUX_PLUGIN_MANAGER_PATH "$TMUX_PLUGINS"
|
||||
set -g @plugin 'tmux-plugins/tpm'
|
||||
set -g @plugin 'tmux-plugins/tmux-prefix-highlight'
|
||||
set -g @prefix_highlight_prefix_prompt 'Pre'
|
||||
set -g @prefix_highlight_fg 'yellow'
|
||||
set -g @prefix_highlight_bg 'default'
|
||||
set -g @plugin 'tmux-plugins/tmux-copycat'
|
||||
set -g @plugin 'tmux-plugins/tmux-yank'
|
||||
if "test -f ~/.config/tmux/plugins.conf" {
|
||||
source-file ~/.config/tmux/plugins.conf
|
||||
}
|
||||
|
||||
# Integration with vim-tmux-navigator & fzf
|
||||
is_vim="ps -o state= -o comm= -t '#{pane_tty}' \
|
||||
| grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?(view|n?vim?x?)(diff)?$'"
|
||||
is_fzf="ps -o state= -o comm= -t '#{pane_tty}' \
|
||||
| grep -iqE '^[^TXZ ]+ +(\\S+\\/)?fzf$'"
|
||||
bind -n C-M-Left run "($is_vim && tmux send-keys C-h) \
|
||||
|| tmux select-pane -L"
|
||||
bind -n C-M-Down run "($is_vim && tmux send-keys C-j) \
|
||||
|| ($is_fzf && tmux send-keys C-j) \
|
||||
|| tmux select-pane -D"
|
||||
bind -n C-M-Up run "($is_vim && tmux send-keys C-k) \
|
||||
|| ($is_fzf && tmux send-keys C-k) \
|
||||
|| tmux select-pane -U"
|
||||
bind -n C-M-Right run "($is_vim && tmux send-keys C-l) \
|
||||
|| tmux select-pane -R"
|
||||
bind-key -T copy-mode-vi 'C-M-Left' select-pane -L
|
||||
bind-key -T copy-mode-vi 'C-M-Down' select-pane -D
|
||||
bind-key -T copy-mode-vi 'C-M-Up' select-pane -U
|
||||
bind-key -T copy-mode-vi 'C-M-Right' select-pane -R
|
||||
if "test -f ~/.config/tmux/early.conf" {
|
||||
source-file ~/.config/tmux/early.conf
|
||||
}
|
||||
|
||||
set-option -g prefix C-a
|
||||
set-option -g set-titles on
|
||||
|
@ -69,5 +49,9 @@ bind - last-window \; swap-pane -s tmux-zoom.0 \; kill-window -t tmux-zoom
|
|||
# prefix + / to search
|
||||
bind-key / copy-mode \; send-key ?
|
||||
|
||||
if "test -f ~/.config/tmux/late.conf" {
|
||||
source-file ~/.config/tmux/late.conf
|
||||
}
|
||||
|
||||
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
|
||||
run -b "$TMUX_PLUGINS/tpm/tpm"
|
||||
|
|
22
vimrc
22
vimrc
|
@ -289,10 +289,10 @@ if has_key(plugs, 'coc.nvim') && executable("node")
|
|||
xmap <silent> <leader>/ <Plug>(coc-codeaction-selected)
|
||||
|
||||
" rename symbol
|
||||
nnoremap <silent> <leader>rn <Plug>(coc-rename)
|
||||
nmap <silent> <leader>rn <Plug>(coc-rename)
|
||||
" goto definition / references
|
||||
nnoremap <silent> <leader>gd <Plug>(coc-definition)
|
||||
nnoremap <silent> <leader>gr <Plug>(coc-references)
|
||||
nmap <silent> <leader>gd <Plug>(coc-definition)
|
||||
nmap <silent> <leader>gr <Plug>(coc-references)
|
||||
|
||||
" Use tab for trigger completion with characters ahead and navigate.
|
||||
" NOTE: Use command ':verbose imap <tab>' to make sure tab is not mapped by
|
||||
|
@ -367,11 +367,21 @@ if has_key(plugs, 'fzf.vim')
|
|||
\ fzf#vim#files(<q-args>, fzf#vim#with_preview({'source': 'rg --files --hidden --glob "!**/.git/**" ' }), <bang>0)
|
||||
endif
|
||||
|
||||
nnoremap <silent> <A-g> :Rg<CR>
|
||||
nnoremap <A-g> :Rg
|
||||
nnoremap <leader><A-g> :Rg!
|
||||
nnoremap <silent> <A-S-g> :Rg<CR>
|
||||
nnoremap <silent> <leader><A-S-g> :Rg!<CR>
|
||||
endif
|
||||
|
||||
nnoremap <silent> <A-f> :Files<CR>
|
||||
nnoremap <silent> <A-b> :Buffers<CR>
|
||||
nnoremap <A-f> :Files
|
||||
nnoremap <leader><A-f> :Files!
|
||||
nnoremap <silent> <A-S-f> :Files<CR>
|
||||
nnoremap <silent> <leader><A-S-f> :Files!<CR>
|
||||
|
||||
nnoremap <A-b> :Buffers
|
||||
nnoremap <leader><A-b> :Buffers!
|
||||
nnoremap <silent> <A-S-b> :Buffers<CR>
|
||||
nnoremap <silent> <leader><A-S-b> :Buffers!<CR>
|
||||
endif
|
||||
|
||||
" Vim Tmux unified movement
|
||||
|
|
33
zshrc
33
zshrc
|
@ -15,7 +15,10 @@ typeset -U PATH path fpath
|
|||
path=( /bin /sbin /usr/bin /usr/sbin $path )
|
||||
[[ -d ~/bin ]] && path=( ~/bin $path )
|
||||
|
||||
# sdkman support
|
||||
[[ -f ~/.sdkman/bin/sdkman-init.sh ]] && source ~/.sdkman/bin/sdkman-init.sh
|
||||
|
||||
# nvm
|
||||
[[ -f /usr/share/nvm/init-nvm.sh ]] && source /usr/share/nvm/init-nvm.sh
|
||||
|
||||
# jaesve support
|
||||
|
@ -148,25 +151,26 @@ source $PSOXIZSH/zsh-custom/zshnip/zshnip.zsh
|
|||
( which nvim &>/dev/null ) && export EDITOR='nvim'
|
||||
|
||||
# Set zsh tmux config path
|
||||
if which tmux &>/dev/null; then
|
||||
for tmux_config in {~/.config/tmux,~/.tmux,/etc/tmux}; do
|
||||
if [ -d "$tmux_config" ]; then
|
||||
TMUX_PATH="$tmux_config"
|
||||
break
|
||||
fi
|
||||
done
|
||||
if which tmux &>/dev/null
|
||||
then
|
||||
|
||||
[ -z "$TMUX_PATH" ] && TMUX_PATH=~/.config/tmux
|
||||
export TMUX_PATH=$TMUX_PATH
|
||||
|
||||
[ -d "$TMUX_PATH" ] && [ -d "$TMUX_PATH/plugins" ] || { mkdir -vp $TMUX_PATH && cp -r $PSOXIZSH/tmux/. $TMUX_PATH }
|
||||
# If a .conf is detected override the default zsh tmux path
|
||||
[ -f "$TMUX_PATH/tmux.conf" ] && export ZSH_TMUX_CONFIG="$TMUX_PATH/tmux.conf"
|
||||
# Bootstrap the user's plugin directory, if required
|
||||
[ -d "$TMUX_PATH/plugins" ] || { mkdir -vp "$TMUX_PATH/plugins" && cp -r "$PSOXIZSH/tmux/plugins" "$TMUX_PATH/plugins" }
|
||||
|
||||
export TMUX_PLUGINS="$TMUX_PATH/plugins"
|
||||
# Both tmux and TPM are very opininated about where configs must live,
|
||||
# and TPM will only expand one layer of source-file directives, so we
|
||||
# symlink the base config to the user local config file, if it doesn't
|
||||
# exist.
|
||||
[ ! -f ~/.tmux.conf ] && ln -s $PSOXIZSH/tmux/tmux.conf ~/.tmux.conf
|
||||
[ ! -f "$TMUX_PATH/plugins.conf" ] && ln -s "$PSOXIZSH/tmux/fragment/plugins.conf" "$TMUX_PATH/plugins.conf"
|
||||
|
||||
export TMUX_PATH=$TMUX_PATH TMUX_PLUGINS="$TMUX_PATH/plugins" TMUX_CONFIG=~/.tmux.conf
|
||||
fi
|
||||
|
||||
if which fzf &>/dev/null; then
|
||||
if which fzf &>/dev/null
|
||||
then
|
||||
# Press ? inside a C-r search to get a preview window, useful for long commands
|
||||
export FZF_CTRL_R_OPTS="--preview 'echo {}' --preview-window down:3:hidden:wrap --bind '?:toggle-preview'"
|
||||
which tmux &> /dev/null && export FZF_TMUX=1
|
||||
|
@ -203,7 +207,8 @@ setopt no_bang_hist cdable_vars auto_name_dirs
|
|||
|
||||
# Finally, make sure the terminal is in application mode, when zle is
|
||||
# active. Only then are the values from $terminfo valid.
|
||||
if (( ${+terminfo[smkx]} )) && (( ${+terminfo[rmkx]} )); then
|
||||
if (( ${+terminfo[smkx]} )) && (( ${+terminfo[rmkx]} ))
|
||||
then
|
||||
function zle-line-init () {
|
||||
echoti smkx
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue