dylanaraps / fff.vim

A plugin for vim/neovim which allows you to use fff as a file opener.
MIT License
104 stars 11 forks source link

Open to directory containing file of current buffer #7

Open roginfarrer opened 4 years ago

roginfarrer commented 4 years ago

Just discovered fff and fff.vim, and really enjoying using it!

One thing I miss from other vim-like file management plugins is opening it directly to the directory containing the file from my current buffer (like in dirvish or netrw). For example, if I'm in a project, and the current buffer is open to project/src/tests/foo.test.js, I would like to be able to open fff to project/src/tests/ instead of project/

davidlm83 commented 4 years ago

Personnaly I put autocmd BufEnter * silent! lcd %:p:h in my init.vim as mentionned here https://vim.fandom.com/wiki/Set_working_directory_to_the_current_file