zsh

Helpful Commands

My settings

Kill the lag

By default, there is a 0.4 second delay after you hit the key and when the mode change is registered. This results in a very jarring and frustrating transition between modes. Let's reduce this delay to 0.1 seconds.

export KEYTIMEOUT=1

Reference

Theme

I use oh-my-zsh to handle themes, and use the af-magic theme. I customize the theme's prompt to only display the current directory (instead of the pull path) as follows:

# primary prompt 
PROMPT='$FG[237]----------------------------------------------------------->
$FG[032]%c\ 
$(git_prompt_info) \ 
$FG[105]%(!.#.»)%{$reset_color%} ' 
PROMPT2='%{$fg[red]%}\ %{$reset_color%}' 
RPS1='${return_code}'

The key change is using $FG[032]%c\ instead of $FG[032]%~\.

Plugins

Plugins can add very useful functionality, but the number of plugins used impacts start-up performance. That being said, I use the following plugins:

  • git

  • vi-mode

  • history-substring-search

Last updated