andreyorst / fzf.kak

FZF for Kakoune
MIT License
143 stars 33 forks source link

Feature to allow users to open a file in the same directory as the current file #98

Closed sidkshatriya closed 2 years ago

sidkshatriya commented 2 years ago

Let say you have a file open in a kakoune buffer and you are currently interested in opening another file only in the same directory as the current file. You could do this with the usual <fzf-mode> f but that could list many files you are not interested in.

Add functionality and shortcut <fzf-mode> F that will list the files only in the directory of the currently displayed file. This is useful when your kakoune current directory is different from the directory of the currently displayed file.

E.g. if you have /home/abc/xzy/lmn/hello.cpp open in kakoune and your current directory in kakoune is /home/abc/xyz then <fzf-mode> F will list all files in /home/abc/xyz/lmn as candidates for opening.

andreyorst commented 2 years ago

Nice addition! Thanks