plugins.oil.settings
Options provided to the require('oil').setup
function.
Type: attribute set of anything
Default:
{ }
Example:
{
columns = [
"icon"
];
keymaps = {
"<C-c>" = false;
"<C-l>" = false;
"<C-r>" = "actions.refresh";
"<leader>qq" = "actions.close";
"y." = "actions.copy_entry_path";
};
skip_confirm_for_simple_edits = true;
view_options = {
show_hidden = false;
};
win_options = {
concealcursor = "ncv";
conceallevel = 3;
cursorcolumn = false;
foldcolumn = "0";
list = false;
signcolumn = "no";
spell = false;
wrap = false;
};
}
Declared by:
plugins.oil.settings.cleanup_delay_ms
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.
Type: null or unsigned integer, meaning >=0, or value false (singular enum)
Default:
null
Plugin default: 2000
Declared by:
plugins.oil.settings.columns
Columns can be specified as a string to use default arguments (e.g. "icon"
),
or as a table to pass parameters (e.g. {"size", highlight = "Special"}
)
Default: ["icon"]
Type: list of (string or attribute set of anything or raw lua code)
Default:
[ ]
Example:
[
"type"
{
__unkeyed = "icon";
default_file = "bar";
directory = "dir";
highlight = "Foo";
}
"size"
"permissions"
]
Declared by:
plugins.oil.settings.constrain_cursor
Constrain the cursor to the editable parts of the oil buffer.
Set to false
to disable, or “name” to keep it on the file names.
Type: null or string or value false (singular enum)
Default:
null
Plugin default: "editable"
Declared by:
plugins.oil.settings.default_file_explorer
Oil will take over directory buffers (e.g. vim .
or :e src/
).
Set to false if you still want to use netrw.
Type: null or boolean or raw lua code
Default:
null
Plugin default: true
Declared by:
plugins.oil.settings.delete_to_trash
Deleted files will be removed with the trash_command (below).
Type: null or boolean or raw lua code
Default:
null
Plugin default: false
Declared by:
plugins.oil.settings.experimental_watch_for_changes
Set to true to watch the filesystem for changes and reload oil.
Type: null or boolean or raw lua code
Default:
null
Plugin default: false
Declared by:
plugins.oil.settings.keymaps
Keymaps in oil buffer.
Can be any value that vim.keymap.set
accepts OR a table of keymap options with a
callback
(e.g. { callback = function() ... end, desc = "", mode = "n" }
).
Additionally, if it is a string that matches “actions.<name>”, it will use the mapping at
require("oil.actions").<name>
.
Set to false
to remove a keymap.
See :help oil-actions
for a list of all available actions.
Type: null or (attribute set of (string or attribute set of anything or value false (singular enum) or raw lua code))
Default:
null
Plugin default:
{
"-" = "actions.parent";
"<C-c>" = "actions.close";
"<C-h>" = "actions.select_split";
"<C-l>" = "actions.refresh";
"<C-p>" = "actions.preview";
"<C-s>" = "actions.select_vsplit";
"<C-t>" = "actions.select_tab";
"<CR>" = "actions.select";
_ = "actions.open_cwd";
"`" = "actions.cd";
"g." = "actions.toggle_hidden";
"g?" = "actions.show_help";
"g\\" = "actions.toggle_trash";
gs = "actions.change_sort";
gx = "actions.open_external";
"~" = "actions.tcd";
}
Declared by:
plugins.oil.settings.keymaps_help
Configuration for the floating keymaps help window.
Type: null or (attribute set of (anything or raw lua code))
Default:
null
Plugin default:
{
border = "rounded";
}
Declared by:
plugins.oil.settings.prompt_save_on_select_new_entry
Selecting a new/moved/renamed file or directory will prompt you to save changes first.
Type: null or boolean or raw lua code
Default:
null
Plugin default: true
Declared by:
plugins.oil.settings.skip_confirm_for_simple_edits
Skip the confirmation popup for simple operations.
Type: null or boolean or raw lua code
Default:
null
Plugin default: false
Declared by:
plugins.oil.settings.use_default_keymaps
Set to false to disable all of the above keymaps.
Type: null or boolean or raw lua code
Default:
null
Plugin default: true
Declared by: