Update gitignore and add wslrc for sourcing on wsl

This commit is contained in:
ItaloBorrelli 2025-05-22 11:14:45 -07:00
parent 88d1681f4d
commit 56ccea6a7b
3 changed files with 21 additions and 3 deletions

5
.gitignore vendored
View File

@ -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

15
.wslrc.zsh Normal file
View File

@ -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

4
.zshrc
View File

@ -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