Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,9 @@ require("oil").setup({
delete_to_trash = false,
-- Skip the confirmation popup for simple operations (:help oil.skip_confirm_for_simple_edits)
skip_confirm_for_simple_edits = false,
-- Or
skip_every_confirm = false,
-- To True To Skip Every Confirmation
-- Selecting a new/moved/renamed file or directory will prompt you to save changes first
-- (:help prompt_save_on_select_new_entry)
prompt_save_on_select_new_entry = true,
Expand Down
8 changes: 8 additions & 0 deletions doc/oil.txt
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ CONFIG *oil-confi
delete_to_trash = false,
-- Skip the confirmation popup for simple operations (:help oil.skip_confirm_for_simple_edits)
skip_confirm_for_simple_edits = false,
-- Or
-- skip_every_confirm = true,
-- To Skip Every Confirmation
-- Selecting a new/moved/renamed file or directory will prompt you to save changes first
-- (:help prompt_save_on_select_new_entry)
prompt_save_on_select_new_entry = true,
Expand Down Expand Up @@ -235,6 +238,11 @@ skip_confirm_for_simple_edits *oil.skip_confirm_for_simple_edit
* contain at most one copy or move
* contain at most five creates

skip_every_confirm *oil.skip_every_confirm*
type: `boolean` default: `false`
Before performing filesystem operations, Oil displays a confirmation popup to ensure
that all operations are intentional. When this option is `true`, every confirmation popup will be skipped

prompt_save_on_select_new_entry *oil.prompt_save_on_select_new_entry*
type: `boolean` default: `true`
There are two cases where this option is relevant:
Expand Down
4 changes: 4 additions & 0 deletions lua/oil/config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ local default_config = {
delete_to_trash = false,
-- Skip the confirmation popup for simple operations (:help oil.skip_confirm_for_simple_edits)
skip_confirm_for_simple_edits = false,
-- Skip every confirmation (:help oil.skip_every_confirm)
skip_every_confirm = false,
-- Selecting a new/moved/renamed file or directory will prompt you to save changes first
-- (:help prompt_save_on_select_new_entry)
prompt_save_on_select_new_entry = true,
Expand Down Expand Up @@ -231,6 +233,7 @@ default_config.view_options.highlight_filename = nil
---@field win_options table<string, any>
---@field delete_to_trash boolean
---@field skip_confirm_for_simple_edits boolean
---@field skip_every_confirm boolean
---@field prompt_save_on_select_new_entry boolean
---@field cleanup_delay_ms integer
---@field lsp_file_methods oil.LspFileMethods
Expand Down Expand Up @@ -260,6 +263,7 @@ local M = {}
---@field win_options? table<string, any> Window-local options to use for oil buffers
---@field delete_to_trash? boolean Send deleted files to the trash instead of permanently deleting them (:help oil-trash).
---@field skip_confirm_for_simple_edits? boolean Skip the confirmation popup for simple operations (:help oil.skip_confirm_for_simple_edits).
---@field skip_every_confirm ? boolean Skip the confirmation popup for every operation (:help oil.skip_every_confirm).
---@field prompt_save_on_select_new_entry? boolean Selecting a new/moved/renamed file or directory will prompt you to save changes first (:help prompt_save_on_select_new_entry).
---@field cleanup_delay_ms? integer Oil will automatically delete hidden buffers after this delay. You can set the delay to false to disable cleanup entirely. Note that the cleanup process only starts when none of the oil buffers are currently displayed.
---@field lsp_file_methods? oil.SetupLspFileMethods Configure LSP file operation integration.
Expand Down
4 changes: 4 additions & 0 deletions lua/oil/mutator/confirmation.lua
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,10 @@ M.show = vim.schedule_wrap(function(actions, should_confirm, cb)
cb(true)
return
end
if should_confirm == nil and config.skip_every_confirm then
cb(true)
return
end
if should_confirm == nil and config.skip_confirm_for_simple_edits and is_simple_edit(actions) then
cb(true)
return
Expand Down
5 changes: 5 additions & 0 deletions scripts/generate.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,11 @@ def get_options_detail_vimdoc() -> "VimdocSection":
* contain at most one copy or move
* contain at most five creates

skip_every_confirm *oil.skip_every_confirm*
type: `boolean` default: `false`
Before performing filesystem operations, Oil displays a confirmation popup to ensure
that all operations are intentional. When this option is `true`, every confirmation popup will be skipped

prompt_save_on_select_new_entry *oil.prompt_save_on_select_new_entry*
type: `boolean` default: `true`
There are two cases where this option is relevant:
Expand Down
Loading