From 4052c38b1664bf07b49ddc64418eae2195a9bcf8 Mon Sep 17 00:00:00 2001 From: Ethan Fischer Date: Tue, 19 Sep 2023 11:28:02 -0500 Subject: [PATCH] Update zshrc --- zshrc | 45 +++++++++++++++++++++++++++++++++++---------- 1 file changed, 35 insertions(+), 10 deletions(-) diff --git a/zshrc b/zshrc index 26cb63f..1a7bc83 100644 --- a/zshrc +++ b/zshrc @@ -7,10 +7,15 @@ fi # If you come from bash you might have to change your $PATH. # export PATH=$HOME/bin:/usr/local/bin:$PATH +export PATH="/Applications/Xcode.app/Contents/Developer/usr/bin:$PATH" # Path to your oh-my-zsh installation. export ZSH="$HOME/.oh-my-zsh" + +setopt auto_cd +cdpath=($HOME $HOME/repos $HOME/repos/ICS) + # Set name of the theme to load --- if set to "random", it will # load a random theme each time oh-my-zsh is loaded, in which case, # to know which specific one was loaded, run: echo $RANDOM_THEME @@ -77,7 +82,7 @@ ZSH_THEME="powerlevel10k/powerlevel10k" # Custom plugins may be added to $ZSH_CUSTOM/plugins/ # Example format: plugins=(rails git textmate ruby lighthouse) # Add wisely, as too many plugins slow down shell startup. -plugins=(git zsh-autosuggestions zsh-syntax-highlighting) +plugins=(git zsh-autosuggestions zsh-syntax-highlighting vi-mode) source $ZSH/oh-my-zsh.sh @@ -106,13 +111,14 @@ source $ZSH/oh-my-zsh.sh # Example aliases # alias zshconfig="mate ~/.zshrc" # alias ohmyzsh="mate ~/.oh-my-zsh" -alias smxg="cd ~/repos/ics/InContext.SMXGo" -alias smxgu="cd ~/repos/ics/InContext.SMXGo/unityprojects/smxgo_unityproject" +# +alias smxg="cd ~/Repos/ICS/InContext.SMXGo" +alias smxgu="cd ~/Repos/ICS/InContext.SMXGo/unityprojects/smxgo_unityproject" alias lg="lazygit" alias aliase="nvim ~/.zshrc" alias sp="nvim ~/Documents/Notes/ScratchPad.txt" alias vim=nvim -alias e.="nautilus ." +alias e.="open ." alias src="source ~/.zshrc" alias ics="cd ~/Repos/ICS" alias vs="open *.sln" @@ -132,6 +138,7 @@ alias ch="git checkout $*" alias mm="git checkout master ; git pull ; git checkout - ; git merge master" alias wmm="git checkout main ; git pull ; git checkout - ; git merge main" alias nuke="git reset --hard ; git clean -fd" +alias inst="adb install unityprojects/smxgo_unityproject/unitybuild.apk" @@ -154,17 +161,35 @@ function pr() { pr_url="https://incontextsolutions.visualstudio.com/ICS/_git/$repo/pullrequest/$pr_id" # Open the PR in the browser - xdg-open $pr_url + open $pr_url } # To customize prompt, run `p10k configure` or edit ~/.p10k.zsh. [[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh +export PATH=$PATH:~/Android/Sdk/platform-tools +export PATH=$PATH:~/Library/Android/sdk/platform-tools +# Change cursor shape for vi-mode +function zle-keymap-select { + if [[ ${KEYMAP} == vicmd ]]; then + echo -ne "\e[2 q" + elif [[ ${KEYMAP} == main ]]; then + echo -ne "\e[6 q" + fi + zle reset-prompt + zle -R +} -setopt auto_cd -cdpath=($HOME $HOME/repos $HOME/repos/ICS) - - +zle -N zle-keymap-select +zle-line-init() { + zle -K viins # initiate `vi insert` as keymap (can be removed if `bindkey -V` has been set elsewhere) + echo -ne "\e[6 q" +} +zle -N zle-line-init +KEYTIMEOUT=1 +#end change cursor shape for vi-mode -export PATH=$PATH:~/Android/Sdk/platform-tools +# accept autosuggestions +bindkey "^[[Z" autosuggest-accept +# End accept autosuggestions