From 56ccea6a7b73e8e833c82d35912b1ef8494cd70f Mon Sep 17 00:00:00 2001 From: ItaloBorrelli Date: Thu, 22 May 2025 11:14:45 -0700 Subject: [PATCH] Update gitignore and add wslrc for sourcing on wsl --- .gitignore | 5 ++--- .wslrc.zsh | 15 +++++++++++++++ .zshrc | 4 ++++ 3 files changed, 21 insertions(+), 3 deletions(-) create mode 100644 .wslrc.zsh diff --git a/.gitignore b/.gitignore index 463afa1..68c3f42 100644 --- a/.gitignore +++ b/.gitignore @@ -6,12 +6,10 @@ !.config/neofetch/* -!.config/nvim/init.lua -!.config/nvim/lua/** +!.config/nvim/* !.config/tmux/tmux.conf !.config/tmux/catppuccin.conf -.config/tmux/local.tmux.config !.config/waybar/* @@ -20,3 +18,4 @@ !.zinit.zsh !.zshrc !.zstyle.zsh +!.wslrc.zsh diff --git a/.wslrc.zsh b/.wslrc.zsh new file mode 100644 index 0000000..575ff62 --- /dev/null +++ b/.wslrc.zsh @@ -0,0 +1,15 @@ +# Fix HOME, END, and DEL keys for zsh +bindkey "^[[H" beginning-of-line +bindkey "^[[F" end-of-line +bindkey "^[[3~" delete-char + +# Fix HOME and END for tmux +bindkey "\E[1~" beginning-of-line +bindkey "\E[4~" end-of-line + +# Set vals for C-Right, C-S-Right, C-Left, C-S-Left +# To move through words +bindkey "^[[1;6D" vi-backward-word +bindkey "^[[1;5D" backward-word +bindkey "^[[1;6C" vi-forward-word +bindkey "^[[1;5C" emacs-forward-word diff --git a/.zshrc b/.zshrc index aaa6f82..aa8460f 100644 --- a/.zshrc +++ b/.zshrc @@ -49,4 +49,8 @@ alias vim="nvim" alias vi="nvim" alias python="python3" +# If wsl.conf exists we're probably in WSL and need some changes for terminal commands to work correctly +[[ ! -f /etc/wsl.conf ]] || source ~/.wslrc.zsh + [[ ! -f ~/.localrc.zsh ]] || source ~/.localrc.zsh +