From 4c641c4435be7fd28029931a15389c1d43bfb624 Mon Sep 17 00:00:00 2001 From: Chun Li Date: Tue, 14 Apr 2026 22:41:40 -0700 Subject: [PATCH] Fix minor issues with vim and zsh --- README.md | 9 ++++++++- tmux/.tmux.conf | 5 ++++- vim/.vimrc | 2 +- vim/.vimrc.bundles | 1 + zsh/.zshrc | 4 ++++ 5 files changed, 18 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index e06f384..f56ee83 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,14 @@ git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ~/powerlevel10k stow git zsh nvim vim tmux jj kitty ``` -> Note: on Debian, zsh-autosuggestions path differs — update the `source` line in `.zshrc` if needed. +## vim + +Install [vim-plug](https://github.com/junegunn/vim-plug): + +```shell +curl -fLo ~/.vim/autoload/plug.vim --create-dirs \ +https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim +``` ## Neovim diff --git a/tmux/.tmux.conf b/tmux/.tmux.conf index cdf0950..a4210c2 100644 --- a/tmux/.tmux.conf +++ b/tmux/.tmux.conf @@ -46,6 +46,9 @@ bind-key ] paste-buffer if-shell '[[ -n "$WAYLAND_DISPLAY" ]]' \ 'bind-key -T copy-mode-vi Enter send-keys -X copy-pipe-and-cancel "wl-copy --foreground"' \ 'bind-key -T copy-mode-vi Enter send-keys -X copy-pipe-and-cancel "xclip -display $DISPLAY -selection clipboard -in"' +if-shell '[[ -n "$WAYLAND_DISPLAY" ]]' \ + 'bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel "wl-copy --foreground"' \ + 'bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel "xclip -display $DISPLAY -selection clipboard -in"' bind-key -T copy-mode-vi v send-keys -X begin-selection # Status Bar (Rosé Pine) @@ -64,7 +67,7 @@ set -g visual-activity on set-option -g repeat-time 0 # From tmux-sensible -set -s escape-time 0 +set -s escape-time 20 set -g history-limit 50000 set -g display-time 750 set -g default-terminal "xterm-256color" diff --git a/vim/.vimrc b/vim/.vimrc index f18b273..55c7ed2 100644 --- a/vim/.vimrc +++ b/vim/.vimrc @@ -29,7 +29,7 @@ endif " enable syntax highlighting syntax enable filetype plugin indent on -colorscheme molokai +colorscheme rosepine highlight Comment ctermfg=blue " make comments readable set autoindent set autoread " reload files when changed on disk, i.e. via `git checkout` diff --git a/vim/.vimrc.bundles b/vim/.vimrc.bundles index e8a9d48..f7d9110 100644 --- a/vim/.vimrc.bundles +++ b/vim/.vimrc.bundles @@ -12,3 +12,4 @@ Plug 'tpope/vim-fugitive' Plug 'tpope/vim-sensible' Plug 'vim-airline/vim-airline' Plug 'wlangstroth/vim-racket' +Plug 'rose-pine/vim' diff --git a/zsh/.zshrc b/zsh/.zshrc index 519ee0d..f2fafec 100644 --- a/zsh/.zshrc +++ b/zsh/.zshrc @@ -17,6 +17,10 @@ bindkey '\e[3~' delete-char # Delete key bindkey '\e[1;3C' forward-word # Alt+Right bindkey '\e[1;3D' backward-word # Alt+Left +# Consume focus event sequences from tmux so they don't leak as input +bindkey '\e[I' redisplay # focus gained +bindkey '\e[O' redisplay # focus lost + # Completion autoload -Uz compinit && compinit if [[ -f /usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh ]]; then