Skip to content

Instantly share code, notes, and snippets.

@ringmaster
Created June 10, 2011 14:14
Show Gist options
  • Save ringmaster/1018904 to your computer and use it in GitHub Desktop.
Save ringmaster/1018904 to your computer and use it in GitHub Desktop.
Updated section of the .zshrc file to enable nano-like keybindings
#####################
# SHELL ENVIRONMENT #
#####################
## Ctrl-W stops at a directory
## see http://www.zsh.org/mla/users/1995/msg00088.html
WORDCHARS='*?_-.[]~\!#$%^(){}<>|`@#$%^*()+:?'
## set up my prompt
export PS1="%{${fg[yellow]}%}[%n@%m] %{${fg[green]}%}%3~ %# %{${fg[default]}%}"
export RPS1="%{${fg[yellow]}%}%T%{${fg[default]}%}"
export EDITOR=nano
bindkey -e
export PATH=/usr/local/jre/bin:$HOME/bin:/usr/local/bin:/usr/local/mysql/bin:/usr/local/apache2/bin:/usr/local/php/bin:/usr/
local/openssl/bin:$PATH
# export CLASSPATH=$CLASSPATH:/usr/local/rhino/js.jar
export DISPLAY=:0.0
bindkey "\e[1~" beginning-of-line # Home
bindkey "\e[4~" end-of-line # End
bindkey "\e[5~" beginning-of-history # PageUp
bindkey "\e[6~" end-of-history # PageDown
bindkey "\e[2~" quoted-insert # Ins
bindkey "\e[3~" delete-char # Del
bindkey "\e[5C" forward-word
bindkey "\eOc" emacs-forward-word
bindkey "\e[5D" backward-word
bindkey "\eOd" emacs-backward-word
bindkey "\e\e[C" forward-word
bindkey "\e\e[D" backward-word
bindkey "\e[Z" reverse-menu-complete # Shift+Tab
# for rxvt
bindkey "\e[7~" beginning-of-line # Home
bindkey "\e[8~" end-of-line # End
# for non RH/Debian xterm, can't hurt for RH/Debian xterm
bindkey "\eOH" beginning-of-line
bindkey "\eOF" end-of-line
# for freebsd console
bindkey "\e[H" beginning-of-line
bindkey "\e[F" end-of-line
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment