1
0
Fork 0

Add more zsh keys

This commit is contained in:
Malte Brandy 2020-10-15 19:19:39 +02:00
parent d9ae3cf6f0
commit f25261264e
No known key found for this signature in database
GPG key ID: 226A2D41EF5378C9

View file

@ -36,6 +36,26 @@ fzf-directory-history-search() {
LBUFFER=$( sed "s/\\$//;s/'//g" ~/.chpwd-recent-dirs | fzf +s | sed -E 's/\\/\\\\/g;s/^/cd /')
zle redisplay
}
zle -N fzf-directory-history-search
bindkey '^T' fzf-directory-history-search
fzf-directory-search() {
LBUFFER=$( fd -t d | fzf | sed -E 's/\\/\\\\/g;s/^/cd /')
zle redisplay
}
zle -N fzf-directory-search
bindkey '^S' fzf-directory-search
fzf-vim-search() {
LBUFFER=$( fd -t f | fzf | sed -E 's/\\/\\\\/g;s/^/vim /')
zle redisplay
}
zle -N fzf-vim-search
bindkey '^V' fzf-vim-search
fzf-git-checkout() {
LBUFFER=$( git branch --list | fzf | sed -E 's/ \* //;s/^/git checkout /')
zle redisplay
}
zle -N fzf-git-checkout
bindkey '^G' fzf-git-checkout