From ed46f1c5e82709417085b1a3b7708b209c5f4bfe Mon Sep 17 00:00:00 2001 From: ottjk Date: Sat, 30 Dec 2023 19:23:04 -0500 Subject: initial commit --- nvim/after/plugin/oil.lua | 48 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 nvim/after/plugin/oil.lua (limited to 'nvim/after/plugin/oil.lua') diff --git a/nvim/after/plugin/oil.lua b/nvim/after/plugin/oil.lua new file mode 100644 index 0000000..f2a2c7d --- /dev/null +++ b/nvim/after/plugin/oil.lua @@ -0,0 +1,48 @@ +require("oil").setup({ + -- Oil will take over directory buffers (e.g. `vim .` or `:e src/`) + -- Set to false if you still want to use netrw. + default_file_explorer = true, + -- Id is automatically added at the beginning, and name at the end + -- See :help oil-columns + columns = { + "icon", + -- "permissions", + -- "size", + -- "mtime", + }, + -- Buffer-local options to use for oil buffers + buf_options = { + buflisted = false, + bufhidden = "hide", + }, + -- Send deleted files to the trash instead of permanently deleting them (:help oil-trash) + delete_to_trash = true, + -- Skip the confirmation popup for simple operations + skip_confirm_for_simple_edits = false, + -- Selecting a new/moved/renamed file or directory will prompt you to save changes first + prompt_save_on_select_new_entry = true, + -- 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 = "", nowait = true }) + -- Additionally, if it is a string that matches "actions.", + -- it will use the mapping at require("oil.actions"). + -- Set to `false` to remove a keymap + -- See :help oil-actions for a list of all available actions + keymaps = { + ["g?"] = "actions.show_help", + [""] = "actions.select", + [""] = "actions.select_vsplit", + [""] = "actions.select_split", + [""] = "actions.select_tab", + [""] = "actions.preview", + [""] = "actions.close", + [""] = "actions.refresh", + ["-"] = "actions.parent", + ["_"] = "actions.open_cwd", + ["`"] = "actions.cd", + ["~"] = "actions.tcd", + ["gs"] = "actions.change_sort", + ["g."] = "actions.toggle_hidden", + }, + -- Set to false to disable all of the above keymaps + use_default_keymaps = true, +}) -- cgit v1.3