kamiyaa / joshuto

ranger-like terminal file manager written in Rust
https://crates.io/crates/joshuto
GNU Lesser General Public License v3.0
3.43k stars 150 forks source link

open file in vim (same window) #394

Closed bashfulrobot closed 1 year ago

bashfulrobot commented 1 year ago

This is more of a question.

The behaviour that I am looking for is:

Is this possible?

Right now, when I open the file, it pops a new terminal but does not seem to be using my Neovim settings, etc.

Thank you.

Akmadan23 commented 1 year ago

Make sure that in your mimetype.toml you have something like this

[class]

text = [
  { command = "nvim" }
]

and not

[class]

text = [
  { command = "nvim", fork = true }
]

so that neovim will replace joshuto instead of spawning a new window.

kamiyaa commented 1 year ago

Right now, when I open the file, it pops a new terminal but does not seem to be using my Neovim settings, etc.

This might be because you are using xdg_open to open vim.

You can edit joshuto.toml to disable xdg open. Then configure mimetype.toml like @Akmadan23 mentioned above

bashfulrobot commented 1 year ago

I had disabled the xdg previously. And ultimately gotten it working with the mine type stuff.

Thanks all!