Split Vim mode ZSH configuration into separate configuration function

This commit is contained in:
Eryn Wells 2013-10-02 09:13:43 -07:00
parent 0929a3a7ab
commit ace3fd5a31

15
zshrc
View file

@ -61,12 +61,21 @@ function configure_zle #{{{
[[ -z "$ZLE_MODE" ]] && ZLE_MODE='vim' [[ -z "$ZLE_MODE" ]] && ZLE_MODE='vim'
if [[ $ZLE_MODE == 'vim' ]]; then if [[ $ZLE_MODE == 'vim' ]]; then
bindkey -v bindkey -v
configure_zle_vim
elif [[ $ZLE_MODE == 'emacs' ]]; then elif [[ $ZLE_MODE == 'emacs' ]]; then
bindkey -e bindkey -e
configure_zle_emacs
fi fi
# Allow deleting over the start of insert mode # Allow deleting over the start of insert mode
zle -A .backward-delete-char vi-backward-delete-char zle -A .backward-delete-char vi-backward-delete-char
} #}}}
function configure_zle_vim #{{{
{
# Remove the delay when pressing escape to get to Insert mode.
bindkey -rpM viins '\e'
# Edit commands in $EDITOR on 'v' in command mode # Edit commands in $EDITOR on 'v' in command mode
autoload -Uz edit-command-line autoload -Uz edit-command-line
@ -75,6 +84,12 @@ function configure_zle #{{{
} #}}} } #}}}
function configure_zle_emacs #{{{
{
} #}}}
function configure_modules_and_functions #{{{ function configure_modules_and_functions #{{{
{ {
local myfpath="$HOME/.zsh/func" local myfpath="$HOME/.zsh/func"