vim mode for zsh

This commit is contained in:
Bartek Stalewski 2020-11-27 01:01:44 +01:00
parent d13ebe7eff
commit 4041089c4b
3 changed files with 9 additions and 6 deletions

View file

@ -45,10 +45,10 @@ nmap <C-p> :Files<CR>
nmap <C-a> :Files ~<CR>
nmap <C-n> :tabnew<CR>
nmap <C-q> :tabclose<CR>
nmap <C-k> :tabprevious<CR>
nmap <C-h> :tabprevious<CR>
nmap <C-j> :tabprevious<CR>
nmap <C-k> :tabnext<CR>
nmap <C-l> :tabnext<CR>
nmap <C-Left> :tabprev<CR>
nmap <C-Right> :tabnext<CR>
map <leader>b <Esc>:set cc=79<CR>
map <leader>nb <Esc>:set cc=0<CR>

View file

@ -169,7 +169,8 @@
# Default prompt symbol.
typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_VIINS_CONTENT_EXPANSION=''
# Prompt symbol in command vi mode.
typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_VICMD_CONTENT_EXPANSION=''
typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_VICMD_CONTENT_EXPANSION=' '
# Prompt symbol in command vi mode.
# Prompt symbol in visual vi mode.
typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_VIVIS_CONTENT_EXPANSION='V'
# Prompt symbol in overwrite vi mode.
@ -1523,8 +1524,9 @@
# Tell `p10k configure` which file it should overwrite.
typeset -g POWERLEVEL9K_CONFIG_FILE=${${(%):-%x}:a}
typeset -g POWERLEVEL9K_VI_INSERT_MODE_STRING=
typeset -g POWERLEVEL9K_VI_COMMAND_MODE_STRING=COMMAND
typeset -g POWERLEVEL9K_VI_MODE_NORMAL_FOREGROUND=196
typeset -g POWERLEVEL9K_VI_COMMAND_MODE_STRING='VI MODE'
typeset -g POWERLEVEL9K_VI_MODE_NORMAL_FOREGROUND=15
typeset -g POWERLEVEL9K_VI_MODE_NORMAL_BACKGROUND=1
(( ${#p10k_config_opts} )) && setopt ${p10k_config_opts[@]}
'builtin' 'unset' 'p10k_config_opts'

View file

@ -5,6 +5,7 @@ bindkey "^E" vi-end-of-line
bindkey "^P" up-line-or-history
bindkey "^N" down-line-or-history
bindkey "^K" forward-char
bindkey "^U" kill-whole-line
autoload -U promptinit && promptinit
autoload -U compinit && compinit -d $XDG_DATA_HOME/zsh/zcompdump