-
Notifications
You must be signed in to change notification settings - Fork 149
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add argument to open Oil in Preview-Mode #339
Labels
enhancement
New feature or request
Comments
It will be great If can support open in preview mode. Meanwhile, I'm using this to achieve it. vim.keymap.set('n', '-', function()
require('oil').open()
require('oil.util').run_after_load(0, function()
oil.select({ preview = true })
end)
end)
|
AirKoala
added a commit
to AirKoala/dotfiles
that referenced
this issue
Apr 12, 2024
This is what I'm using as a workaround to try opening the preview only after its available vim.keymap.set('n', '-', function()
oil.open()
-- Wait until oil has opened, for a maximum of 1 second.
vim.wait(1000, function()
return oil.get_cursor_entry() ~= nil
end)
if oil.get_cursor_entry() then
oil.open_preview()
end
end) |
1 task
AirKoala
added a commit
to AirKoala/dotfiles
that referenced
this issue
Nov 16, 2024
AirKoala
added a commit
to AirKoala/dotfiles
that referenced
this issue
Jan 8, 2025
stevearc
added a commit
that referenced
this issue
Jan 24, 2025
This is now supported as part of the |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Did you check existing requests?
Describe the feature
It would be great if
open
had an argument for enabling preview mode as soon as Oil opens.Suggestion:
Provide background
I couldn't find a way to open Oil with preview-mode activated initially.
I tried the following but preview triggers too early this way:
What is the significance of this feature?
nice to have
Additional details
Edit: This is just an issue for opening Oil for the first time in a session. So maybe it would be better to offer an option for
setup
to enable preview by default.The text was updated successfully, but these errors were encountered: