Mercurial > dotfiles
comparison dot_zshrc @ 542:89769aa79628
add zsh-vi-mode plugin
author | zegervdv <zegervdv@me.com> |
---|---|
date | Sat, 29 Jan 2022 22:12:33 +0100 |
parents | 9036f18c5ad4 |
children | c071fc2dc6fc |
comparison
equal
deleted
inserted
replaced
541:80622cb35a3e | 542:89769aa79628 |
---|---|
65 RPROMPT='${vcs_info_msg_0_} ${vim_mode}' | 65 RPROMPT='${vcs_info_msg_0_} ${vim_mode}' |
66 | 66 |
67 zmodload -i zsh/complist | 67 zmodload -i zsh/complist |
68 | 68 |
69 bindkey -v | 69 bindkey -v |
70 | |
71 bindkey '^[[A' history-substring-search-up | |
72 bindkey '^[[B' history-substring-search-down | |
73 bindkey "$terminfo[kcuu1]" history-substring-search-up | |
74 bindkey "$terminfo[kcud1]" history-substring-search-down | |
75 bindkey '^p' history-substring-search-up | |
76 bindkey '^n' history-substring-search-down | |
77 | |
78 bindkey '^f' autosuggest-accept | |
79 | 70 |
80 zmodload zsh/complist | 71 zmodload zsh/complist |
81 bindkey -M menuselect 'h' vi-backward-char | 72 bindkey -M menuselect 'h' vi-backward-char |
82 bindkey -M menuselect 'k' vi-up-line-or-history | 73 bindkey -M menuselect 'k' vi-up-line-or-history |
83 bindkey -M menuselect 'j' vi-down-line-or-history | 74 bindkey -M menuselect 'j' vi-down-line-or-history |
230 export HGEDITOR=nvim | 221 export HGEDITOR=nvim |
231 | 222 |
232 export RIPGREP_CONFIG_PATH=$HOME/.config/ripgrep/ripgreprc | 223 export RIPGREP_CONFIG_PATH=$HOME/.config/ripgrep/ripgreprc |
233 export BAT_CONFIG_PATH=$HOME/.config/bat/config | 224 export BAT_CONFIG_PATH=$HOME/.config/bat/config |
234 | 225 |
235 [ -f ~/.fzf.zsh ] && source ~/.fzf.zsh | |
236 | |
237 bindkey '^t' push-line-or-edit | |
238 | 226 |
239 [ -f ~/.zshrc.local ] && source ~/.zshrc.local | 227 [ -f ~/.zshrc.local ] && source ~/.zshrc.local |
240 | 228 |
241 # Must run after brew is loaded | 229 # Must run after brew is loaded |
242 export SUDO_EDITOR=$(which nvim) | 230 export SUDO_EDITOR=$(which nvim) |
250 source ~/.zsh/fast-syntax-highlighting/fast-syntax-highlighting.plugin.zsh | 238 source ~/.zsh/fast-syntax-highlighting/fast-syntax-highlighting.plugin.zsh |
251 | 239 |
252 source ~/.zsh/zsh-histdb/sqlite-history.zsh | 240 source ~/.zsh/zsh-histdb/sqlite-history.zsh |
253 source ~/.zsh/fzf-histdb.zsh | 241 source ~/.zsh/fzf-histdb.zsh |
254 | 242 |
255 bindkey '^r' histdb-fzf-widget | 243 # The plugin will auto execute this zvm_after_init function |
244 function zvm_after_init() { | |
245 [ -f ~/.fzf.zsh ] && source ~/.fzf.zsh | |
246 bindkey '^r' histdb-fzf-widget | |
247 bindkey '^t' push-line-or-edit | |
248 | |
249 bindkey '^[[A' history-substring-search-up | |
250 bindkey '^[[B' history-substring-search-down | |
251 bindkey "$terminfo[kcuu1]" history-substring-search-up | |
252 bindkey "$terminfo[kcud1]" history-substring-search-down | |
253 bindkey '^p' history-substring-search-up | |
254 bindkey '^n' history-substring-search-down | |
255 | |
256 bindkey '^f' autosuggest-accept | |
257 } | |
258 | |
259 source ~/.zsh/zsh-vi-mode.zsh | |
256 | 260 |
257 _zsh_autosuggest_strategy_histdb_top_here() { | 261 _zsh_autosuggest_strategy_histdb_top_here() { |
258 local query="select commands.argv from | 262 local query="select commands.argv from |
259 history left join commands on history.command_id = commands.rowid | 263 history left join commands on history.command_id = commands.rowid |
260 left join places on history.place_id = places.rowid | 264 left join places on history.place_id = places.rowid |