Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Cleanup key bindings.

  • Loading branch information...
commit 18b90685f81d407c2f9e3b87112c681829d4ccc8 1 parent e2bbe1b
@mikemcquaid authored
Showing with 8 additions and 23 deletions.
  1. +2 −11 bashrc.sh
  2. +6 −12 zshrc.sh
View
13 bashrc.sh
@@ -37,18 +37,9 @@ export HISTCONTROL=ignoredups
export PROMPT_COMMAND='history -a'
export HISTIGNORE="&:ls:[bf]g:exit"
-# allow the use of the Delete/Insert keys
-bind '"\e[3~" delete-char'
-bind '"\e[2~" quoted-insert'
+# fix delete key on OSX
+[ $OSX ] && bind '"\e[3~" delete-char'
# alternate mappings for Ctrl-U/V to search the history
bind '"^u" history-search-backward'
bind '"^v" history-search-forward'
-
-# mappings for Ctrl-left-arrow and Ctrl-right-arrow for word moving
-bind '"\e[1;5C" forward-word'
-bind '"\e[1;5D" backward-word'
-bind '"\e[5C" forward-word'
-bind '"\e[5D" backward-word'
-bind '"\e\e[C" forward-word'
-bind '"\e\e[D" backward-word'
View
18 zshrc.sh
@@ -72,24 +72,18 @@ RPROMPT='%{$fg_bold[red]%}$(git_branch)%{$fg_bold[yellow]%}$(svn_branch)%b[%{$fg
# History file
export HISTFILE=~/.zsh_history
+# more OSX/Bash-like word jumps
+export WORDCHARS=''
+
# use emacs bindings even with vim as EDITOR
bindkey -e
# fix backspace on Debian
-bindkey "^?" backward-delete-char
+[ $LINUX ] && bindkey "^?" backward-delete-char
-# allow the use of the Delete/Insert keys
-bindkey "\e[3~" delete-char
-bindkey "\e[2~" quoted-insert
+# fix delete key on OSX
+[ $OSX ] && bindkey "\e[3~" delete-char
# alternate mappings for Ctrl-U/V to search the history
bindkey "^u" history-beginning-search-backward
bindkey "^v" history-beginning-search-forward
-
-# mappings for Ctrl-left-arrow and Ctrl-right-arrow for word moving
-bindkey "\e[1;5C" forward-word
-bindkey "\e[1;5D" backward-word
-bindkey "\e[5C" forward-word
-bindkey "\e[5D" backward-word
-bindkey "\e\e[C" forward-word
-bindkey "\e\e[D" backward-word
Please sign in to comment.
Something went wrong with that request. Please try again.