|
1 |
| ---stylua: ignore |
2 |
| - |
3 | 1 | local default_config = {
|
4 | 2 | -- Oil will take over directory buffers (e.g. `vim .` or `:e src/`)
|
5 | 3 | -- Set to false if you want some other plugin (e.g. netrw) to open when you edit directories.
|
@@ -60,22 +58,22 @@ local default_config = {
|
60 | 58 | -- Set to `false` to remove a keymap
|
61 | 59 | -- See :help oil-actions for a list of all available actions
|
62 | 60 | keymaps = {
|
63 |
| - ["g?"] = "actions.show_help", |
| 61 | + ["g?"] = { "actions.show_help", mode = "n" }, |
64 | 62 | ["<CR>"] = "actions.select",
|
65 |
| - ["<C-s>"] = { "actions.select", opts = { vertical = true }, desc = "Open the entry in a vertical split" }, |
66 |
| - ["<C-h>"] = { "actions.select", opts = { horizontal = true }, desc = "Open the entry in a horizontal split" }, |
67 |
| - ["<C-t>"] = { "actions.select", opts = { tab = true }, desc = "Open the entry in new tab" }, |
| 63 | + ["<C-s>"] = { "actions.select", opts = { vertical = true } }, |
| 64 | + ["<C-h>"] = { "actions.select", opts = { horizontal = true } }, |
| 65 | + ["<C-t>"] = { "actions.select", opts = { tab = true } }, |
68 | 66 | ["<C-p>"] = "actions.preview",
|
69 |
| - ["<C-c>"] = "actions.close", |
| 67 | + ["<C-c>"] = { "actions.close", mode = "n" }, |
70 | 68 | ["<C-l>"] = "actions.refresh",
|
71 |
| - ["-"] = "actions.parent", |
72 |
| - ["_"] = "actions.open_cwd", |
73 |
| - ["`"] = "actions.cd", |
74 |
| - ["~"] = { "actions.cd", opts = { scope = "tab" }, desc = ":tcd to the current oil directory", mode = "n" }, |
75 |
| - ["gs"] = "actions.change_sort", |
| 69 | + ["-"] = { "actions.parent", mode = "n" }, |
| 70 | + ["_"] = { "actions.open_cwd", mode = "n" }, |
| 71 | + ["`"] = { "actions.cd", mode = "n" }, |
| 72 | + ["~"] = { "actions.cd", opts = { scope = "tab" }, mode = "n" }, |
| 73 | + ["gs"] = { "actions.change_sort", mode = "n" }, |
76 | 74 | ["gx"] = "actions.open_external",
|
77 |
| - ["g."] = "actions.toggle_hidden", |
78 |
| - ["g\\"] = "actions.toggle_trash", |
| 75 | + ["g."] = { "actions.toggle_hidden", mode = "n" }, |
| 76 | + ["g\\"] = { "actions.toggle_trash", mode = "n" }, |
79 | 77 | },
|
80 | 78 | -- Set to false to disable all of the above keymaps
|
81 | 79 | use_default_keymaps = true,
|
|
0 commit comments