aboutsummaryrefslogtreecommitdiff
path: root/zsh/.zshrc
diff options
context:
space:
mode:
Diffstat (limited to 'zsh/.zshrc')
-rw-r--r--zsh/.zshrc18
1 files changed, 8 insertions, 10 deletions
diff --git a/zsh/.zshrc b/zsh/.zshrc
index e98fd80..2bc552c 100644
--- a/zsh/.zshrc
+++ b/zsh/.zshrc
@@ -71,17 +71,15 @@ bindkey '^y' fzf-tmux-project
zle -N fzf-kill-tmux-project
bindkey '^x' fzf-kill-tmux-project
-# Use lf to switch directories and bind it to ctrl-o
-function lfcd () {
- tmp="$(mktemp)"
- lf -last-dir-path="$tmp" "$@"
- if [ -f "$tmp" ]; then
- dir="$(cat "$tmp")"
- rm -f "$tmp" >/dev/null
- [ -d "$dir" ] && [ "$dir" != "$(pwd)" ] && cd "$dir"
- fi
+# Use vifm to switch directories and bind it to ctrl-o
+function vifmcd () {
+ vifm .
+
+ if [ -f ~/.config/vifm/lastdir ]; then
+ cd $(cat ~/.config/vifm/lastdir)
+ fi
}
-bindkey -s '^o' 'lfcd\n'
+bindkey -s '^o' 'vifmcd\n'
# Syntax highlighting, must be last