mikavilpas / yazi.nvim

A Neovim Plugin for the yazi terminal file manager
MIT License
217 stars 7 forks source link

How to open `yazi` with current buffer file selected? #90

Closed kohane27 closed 1 month ago

kohane27 commented 1 month ago

Hello! Hope you're doing well. Thank you for creating this plugin!

Description

How to open yazi with current buffer file selected?

With ranger.nvim, there is the following API:

require("ranger-nvim").open(select_current_file: true)

It seems this feature is not yet existed?

Thank you!

mikavilpas commented 1 month ago

Hi! Yes, this can be done.

Try this:

-- will select the current file / directory by default
require("yazi").yazi()

-- you can also pass explicitly it as the second argument
require("yazi").yazi({}, "/path/to/file")
kohane27 commented 1 month ago

I must be blind! Apologies for the noise and thank you for such a quick reply; I really appreciate it. Thank you again and have a good day:)

mikavilpas commented 1 month ago

Haha, no problem 😄