fix(shell/vscode): make alt+left/right work in VSCode terminal

This commit is contained in:
Jim Myhrberg
2025-08-25 16:37:13 +01:00
parent 0224bd608c
commit 1f558c9f95
2 changed files with 12 additions and 0 deletions

11
zsh/vscode.zsh Normal file
View File

@@ -0,0 +1,11 @@
#
# VSCode environment setup.
#
if [[ $TERM_PROGRAM == "vscode" ]]; then
bindkey -e
# Fix alt+left/right inserting `;3D` and `;3C` instead of word navigation.
bindkey '\e[1;3D' backward-word # Alt+Left
bindkey '\e[1;3C' forward-word # Alt+Right
fi

1
zshrc
View File

@@ -304,6 +304,7 @@ source "$DOTZSH/nix.zsh"
source "$DOTZSH/restish.zsh"
source "$DOTZSH/tldr.zsh"
source "$DOTZSH/tmux.zsh"
source "$DOTZSH/vscode.zsh"
source "$DOTZSH/zoxide.zsh"
# Development