cocopon / vaffle.vim

:file_folder: Lightweight, window-based file manager for Vim
MIT License
284 stars 20 forks source link

Show the current file in the active Vaffle buffer #8

Closed cocopon closed 7 years ago

cocopon commented 7 years ago

Hey, i also use :Vaffle %:h, however it would be nice if it could navigate the cursor to the current open file, like NERDTreeFind does. https://github.com/cocopon/vaffle.vim/issues/6#issuecomment-324620928

cocopon commented 7 years ago

Vaffle is not designed like NERDTree but for creating multiple buffers at the same time. In this case Vaffle cannot specify the target for showing the current file. Currently there is no plan to support the feature like that, but created the issue for the future discussion.

amadeus commented 7 years ago

The only way I think this could be reasonably done, and it could be useful, if there was a way to pass a filename as an argument to Vaffle and have it set the cursor on that file.

Then one could create a small vim function that gets the buffer filename and calls Vaffle.

cocopon commented 5 years ago

Maybe I had a little misunderstanding about the issue...

By changes in d85164a, :Vaffle now accepts a file as an argument. :Vaffle % will open the parent directory of the file and focus the file.

amadeus commented 5 years ago

This is great! Thank you so much for this change!