esc fix tmux+vim

This commit is contained in:
Christoph J. Scherr 2023-03-06 13:05:17 +01:00
parent d78f810849
commit 83397a1837
6 changed files with 12 additions and 7 deletions

View File

@ -43,7 +43,3 @@ sudo bash -c 'cp -r $(pwd)/home/.config ~'
sudo bash -c 'cp -r $(pwd)/home/.tmux.conf ~' sudo bash -c 'cp -r $(pwd)/home/.tmux.conf ~'
sudo bash -c 'ln ~/.zsh/zshrc ~/.zshrc' sudo bash -c 'ln ~/.zsh/zshrc ~/.zshrc'
# Install Vim Stuff
sudo sh -c 'curl -fLo "${XDG_DATA_HOME:-$HOME/.local/share}"/nvim/site/autoload/plug.vim --create-dirs \
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim'

View File

@ -20,7 +20,8 @@ set ttyfast " Speed up scrolling in Vim
set fdm=indent " foldingmethod syntax set fdm=indent " foldingmethod syntax
set foldlevel=10 " only fold when a certain complexity is reached by default. This applies only at startup. set foldlevel=10 " only fold when a certain complexity is reached by default. This applies only at startup.
"set spell " enable spell check (may need to download language package) "set spell " enable spell check (may need to download language package)
set timeout timeoutlen=200 set timeout timeoutlen=400
set ttimeoutlen=0
" Avoid showing message extra message when using completion" " Avoid showing message extra message when using completion"
set shortmess+=c set shortmess+=c

View File

@ -20,7 +20,8 @@ set ttyfast " Speed up scrolling in Vim
set fdm=indent " foldingmethod syntax set fdm=indent " foldingmethod syntax
set foldlevel=10 " only fold when a certain complexity is reached by default. This applies only at startup. set foldlevel=10 " only fold when a certain complexity is reached by default. This applies only at startup.
"set spell " enable spell check (may need to download language package) "set spell " enable spell check (may need to download language package)
set timeout timeoutlen=200 set timeout timeoutlen=400
set ttimeoutlen=0
" Avoid showing message extra message when using completion" " Avoid showing message extra message when using completion"
set shortmess+=c set shortmess+=c

View File

@ -81,6 +81,9 @@ bind -T copy-mode-vi y send-keys -X copy-selection
# Smart pane switching with awareness of Vim splits. # Smart pane switching with awareness of Vim splits.
# See: https://github.com/christoomey/vim-tmux-navigator # See: https://github.com/christoomey/vim-tmux-navigator
# send esc to the process instantly!
set-option -s escape-time 10
is_vim="ps -o state= -o comm= -t '#{pane_tty}' \ is_vim="ps -o state= -o comm= -t '#{pane_tty}' \
| grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?(view|n?vim?x?)(diff)?$'" | grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?(view|n?vim?x?)(diff)?$'"
bind -n C-h if-shell "$is_vim" "send-keys C-h" "select-pane -L" bind -n C-h if-shell "$is_vim" "send-keys C-h" "select-pane -L"

View File

@ -84,6 +84,9 @@ bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "wl-copy"
# Smart pane switching with awareness of Vim splits. # Smart pane switching with awareness of Vim splits.
# See: https://github.com/christoomey/vim-tmux-navigator # See: https://github.com/christoomey/vim-tmux-navigator
# send esc to the process instantly!
set-option -s escape-time 10
is_vim="ps -o state= -o comm= -t '#{pane_tty}' \ is_vim="ps -o state= -o comm= -t '#{pane_tty}' \
| grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?(view|n?vim?x?)(diff)?$'" | grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?(view|n?vim?x?)(diff)?$'"
bind -n C-h if-shell "$is_vim" "send-keys C-h" "select-pane -L" bind -n C-h if-shell "$is_vim" "send-keys C-h" "select-pane -L"

View File

@ -20,7 +20,8 @@ set ttyfast " Speed up scrolling in Vim
set fdm=indent " foldingmethod syntax set fdm=indent " foldingmethod syntax
set foldlevel=10 " only fold when a certain complexity is reached by default. This applies only at startup. set foldlevel=10 " only fold when a certain complexity is reached by default. This applies only at startup.
"set spell " enable spell check (may need to download language package) "set spell " enable spell check (may need to download language package)
set timeout timeoutlen=200 set timeout timeoutlen=400
set ttimeoutlen=0
" Avoid showing message extra message when using completion" " Avoid showing message extra message when using completion"
set shortmess+=c set shortmess+=c