kevinhwang91 / rnvimr

Make Ranger running in a floating window to communicate with Neovim via RPC
BSD 3-Clause "New" or "Revised" License
804 stars 17 forks source link

Use different initial layout when rnvimr is replacing netrw #109

Closed uwla closed 2 years ago

uwla commented 2 years ago

It would be nice if when opening a directory in neovim through the command line nvim dirname, rnvimr would use a different layout (such as full screen) as initial layout. In other words, the initial layout for rnvimr would be different in the cases where it is replacing netrw.

I wish it would display fullscreen when I open a directory through the command line and in the other cases it would not display full screen, but the initial layout and the presets apply to all situations.

Thanks for the plugin!

kevinhwang91 commented 2 years ago

If you opens dirname by e dirname, which layout do you expect?

uwla commented 2 years ago

If you opens dirname by e dirname, which layout do you expect?

I'd expect the same layout I'd get by nvim dirname

Here is a suggestion: pass an option to :RnvimrToggle like :RnvimrToggle --preset=4, so that different initial presets can be bound to different keystrokes. The first preset should then be loaded by nvim dirname and e dirname

kevinhwang91 commented 2 years ago

Please update the code and set let g:rnvimr_layout_ex_index = 3

uwla commented 2 years ago

That worked! Thanks!