You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
40 lines
992 B
Plaintext
40 lines
992 B
Plaintext
12 years ago
|
##### for ~/.zshrc
|
||
|
|
||
|
# enable vim mode on commmand line
|
||
|
bindkey -v
|
||
|
|
||
|
# show vim status
|
||
|
# http://zshwiki.org/home/examples/zlewidgets
|
||
|
function zle-line-init zle-keymap-select {
|
||
|
RPS1="${${KEYMAP/vicmd/-- NORMAL --}/(main|viins)/-- INSERT --}"
|
||
|
RPS2=$RPS1
|
||
|
zle reset-prompt
|
||
|
}
|
||
|
zle -N zle-line-init
|
||
|
zle -N zle-keymap-select
|
||
|
|
||
|
# add missing vim hotkeys
|
||
|
# fixes backspace deletion issues
|
||
|
# http://zshwiki.org/home/zle/vi-mode
|
||
|
bindkey -a u undo
|
||
|
bindkey -a '^R' redo
|
||
|
bindkey '^?' backward-delete-char
|
||
|
bindkey '^H' backward-delete-char
|
||
|
|
||
|
# history search in vim mode
|
||
|
# http://zshwiki.org./home/zle/bindkeys#why_isn_t_control-r_working_anymore
|
||
|
bindkey -M viins '^s' history-incremental-search-backward
|
||
|
bindkey -M vicmd '^s' history-incremental-search-backward
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
##### for ~/tmux.conf
|
||
|
# Lowers the delay time between the prefix key and other keys - fixes pausing in vim
|
||
|
set -sg escape-time 1
|
||
|
|
||
|
# reload .tmux.conf
|
||
|
bind-key r source-file ~/.tmux.conf \; display-message "Configuration reloaded"
|
||
|
|