Split Vim mode ZSH configuration into separate configuration function
This commit is contained in:
parent
0929a3a7ab
commit
ace3fd5a31
1 changed files with 15 additions and 0 deletions
15
zshrc
15
zshrc
|
@ -61,12 +61,21 @@ function configure_zle #{{{
|
|||
[[ -z "$ZLE_MODE" ]] && ZLE_MODE='vim'
|
||||
if [[ $ZLE_MODE == 'vim' ]]; then
|
||||
bindkey -v
|
||||
configure_zle_vim
|
||||
elif [[ $ZLE_MODE == 'emacs' ]]; then
|
||||
bindkey -e
|
||||
configure_zle_emacs
|
||||
fi
|
||||
|
||||
# Allow deleting over the start of insert mode
|
||||
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
|
||||
autoload -Uz edit-command-line
|
||||
|
@ -75,6 +84,12 @@ function configure_zle #{{{
|
|||
} #}}}
|
||||
|
||||
|
||||
function configure_zle_emacs #{{{
|
||||
{
|
||||
|
||||
} #}}}
|
||||
|
||||
|
||||
function configure_modules_and_functions #{{{
|
||||
{
|
||||
local myfpath="$HOME/.zsh/func"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue