oil.nvim icon indicating copy to clipboard operation
oil.nvim copied to clipboard

Add option to open in float by default

Open nihancj opened this issue 2 years ago • 2 comments

set to true, Oil will open in float mode when :Oil command is used

Solves #298

nihancj avatar Feb 17 '24 05:02 nihancj

Making this work on :e . does seem hard. Would you be able to give some thoughts on where to start?

Also what about adding a :Oil --normal flag that opens oil in normal window mode.

nihancj avatar Feb 22 '24 12:02 nihancj

Well this is where we switch the buffer from path/to/file to oil://path/to/file https://github.com/stevearc/oil.nvim/blob/29a06fcc906f57894c1bc768219ba590e03d1121/lua/oil/init.lua#L687-L690

You would have to somehow instead restore whatever the previous buffer was in this window (might be difficult or impossible if the buffer had bufhidden=wipe), then open the floating oil win.

Instead of --normal I think --no-float would be better.

stevearc avatar Mar 03 '24 02:03 stevearc