summaryrefslogtreecommitdiff
path: root/zsh
diff options
context:
space:
mode:
authorUrbain Vaes <urbain@vaes.uk>2018-01-30 12:03:20 +0100
committerUrbain Vaes <urbain@vaes.uk>2018-01-30 12:03:20 +0100
commitcb3297183a9da5db43556e1391eac1df508c72d5 (patch)
treec8b97c5542496ec4a90e0f6cb04db083984bceed /zsh
parent688260bd74442ad04bf91460f497697e019d8d18 (diff)
Add zsh bindings
Diffstat (limited to 'zsh')
-rw-r--r--zsh/.zsh/.zshrc37
1 files changed, 22 insertions, 15 deletions
diff --git a/zsh/.zsh/.zshrc b/zsh/.zsh/.zshrc
index 3da2f82..b69c258 100644
--- a/zsh/.zsh/.zshrc
+++ b/zsh/.zsh/.zshrc
@@ -1,15 +1,3 @@
-## My bindings {{{
-bindkey -v
-bindkey -a 'k' history-beginning-search-backward
-bindkey -a 'j' history-beginning-search-forward
-bindkey '^P' history-beginning-search-backward
-bindkey '^N' history-beginning-search-forward
-bindkey '^b' backward-char
-bindkey '^f' forward-char
-bindkey '^a' beginning-of-line
-bindkey '^e' end-of-line
-bindkey '^v' visual-mode
-# }}}
## zgen {{{
[ ! -d ~/.zsh/zgen ] && git clone https://github.com/tarjoilija/zgen.git ~/.zsh/zgen
@@ -45,15 +33,35 @@ fi
# Autosuggestion
{
ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE='fg=6'
- bindkey '^y' autosuggest-accept
}
# }}}
+## Overwrite default options {{{
PROMPT='%0~ $ '
# Options
unsetopt histverify
-
+# }}}
+## My bindings {{{
+bindkey -v
+bindkey -a 'k' history-beginning-search-backward
+bindkey -a 'j' history-beginning-search-forward
+bindkey '^?' backward-delete-char # backspace
+bindkey '^N' history-beginning-search-forward
+bindkey '^P' history-beginning-search-backward
+bindkey '^a' beginning-of-line
+bindkey '^b' backward-char
+bindkey '^e' end-of-line
+bindkey '^f' forward-char
+bindkey '^g' jump
+bindkey '^h' backward-delete-char
+bindkey '^k' kill-line
+bindkey '^u' kill-whole-line
+bindkey '^v' visual-mode
+bindkey '^w' backward-kill-word
+bindkey '^y' autosuggest-accept
+bindkey '^z' z
+# }}}
## fzf {{{
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
@@ -66,7 +74,6 @@ z() {
zle && zle reset-prompt
}
zle -N z
-bindkey '^z' z
# }}}
## Colors {{{