diff options
| -rw-r--r-- | fish/conf.d/quickedit.fish | 15 | ||||
| -rw-r--r-- | tmux/tmux.conf | 1 |
2 files changed, 15 insertions, 1 deletions
diff --git a/fish/conf.d/quickedit.fish b/fish/conf.d/quickedit.fish index 974a739..b33e3b7 100644 --- a/fish/conf.d/quickedit.fish +++ b/fish/conf.d/quickedit.fish @@ -55,11 +55,24 @@ function quickedit switch (count $files) case 0 echo No result found + cd $prev_dir return case 1 set file_path $files[1] case '*' - set file_path (printf '%s\n' $files | fzf) + set file_path (printf '%s\n' $files REINDEX ABORT | fzf) + end + + if test "$file_path" = ABORT; or test -z "$file_path" + cd $prev_dir + return + end + + if test "$file_path" = REINDEX + rm -f $QUICKEDIT_DIR/.index + cd $prev_dir + quickedit $argv + return end if editor::helix::open_with_lock $file_path diff --git a/tmux/tmux.conf b/tmux/tmux.conf index 0a673ef..14df7fb 100644 --- a/tmux/tmux.conf +++ b/tmux/tmux.conf @@ -22,6 +22,7 @@ bind-key f popup -E -w 99% -h 99% -d '#{pane_current_path}' "fish -c 'tmux new-s bind-key e run-shell -b "cd '#{pane_current_path}' && hexai-tmux-edit --pane '#{pane_id}'" bind-key N popup -E -w 99% -h 99% -d ~/Notes "fish -c 'tmux::attach notes'" bind-key t popup -E -w 99% -h 99% -d '#{pane_current_path}' "fish -c 'tmux::attach (basename (pwd))-tmp-scratch'" +bind-key Q popup -E -w 99% -h 99% "fish -c 'tmux new-session -A -s quickedit quickedit'" # bind-key b break-pane -d bind-key c new-window -c '#{pane_current_path}' |
