diff --git a/README.md b/README.md index f690904..0b8d0e5 100644 --- a/README.md +++ b/README.md @@ -190,22 +190,22 @@ require("oil").setup({ -- Set to `false` to remove a keymap -- See :help oil-actions for a list of all available actions keymaps = { - ["g?"] = "actions.show_help", + ["g?"] = { "actions.show_help", mode = "n" }, [""] = "actions.select", - [""] = { "actions.select", opts = { vertical = true }, desc = "Open the entry in a vertical split" }, - [""] = { "actions.select", opts = { horizontal = true }, desc = "Open the entry in a horizontal split" }, - [""] = { "actions.select", opts = { tab = true }, desc = "Open the entry in new tab" }, + [""] = { "actions.select", opts = { vertical = true } }, + [""] = { "actions.select", opts = { horizontal = true } }, + [""] = { "actions.select", opts = { tab = true } }, [""] = "actions.preview", - [""] = "actions.close", + [""] = { "actions.close", mode = "n" }, [""] = "actions.refresh", - ["-"] = "actions.parent", - ["_"] = "actions.open_cwd", - ["`"] = "actions.cd", - ["~"] = { "actions.cd", opts = { scope = "tab" }, desc = ":tcd to the current oil directory", mode = "n" }, - ["gs"] = "actions.change_sort", + ["-"] = { "actions.parent", mode = "n" }, + ["_"] = { "actions.open_cwd", mode = "n" }, + ["`"] = { "actions.cd", mode = "n" }, + ["~"] = { "actions.cd", opts = { scope = "tab" }, mode = "n" }, + ["gs"] = { "actions.change_sort", mode = "n" }, ["gx"] = "actions.open_external", - ["g."] = "actions.toggle_hidden", - ["g\\"] = "actions.toggle_trash", + ["g."] = { "actions.toggle_hidden", mode = "n" }, + ["g\\"] = { "actions.toggle_trash", mode = "n" }, }, -- Set to false to disable all of the above keymaps use_default_keymaps = true, diff --git a/doc/oil.txt b/doc/oil.txt index 63bca11..8540cbd 100644 --- a/doc/oil.txt +++ b/doc/oil.txt @@ -75,22 +75,22 @@ CONFIG *oil-confi -- Set to `false` to remove a keymap -- See :help oil-actions for a list of all available actions keymaps = { - ["g?"] = "actions.show_help", + ["g?"] = { "actions.show_help", mode = "n" }, [""] = "actions.select", - [""] = { "actions.select", opts = { vertical = true }, desc = "Open the entry in a vertical split" }, - [""] = { "actions.select", opts = { horizontal = true }, desc = "Open the entry in a horizontal split" }, - [""] = { "actions.select", opts = { tab = true }, desc = "Open the entry in new tab" }, + [""] = { "actions.select", opts = { vertical = true } }, + [""] = { "actions.select", opts = { horizontal = true } }, + [""] = { "actions.select", opts = { tab = true } }, [""] = "actions.preview", - [""] = "actions.close", + [""] = { "actions.close", mode = "n" }, [""] = "actions.refresh", - ["-"] = "actions.parent", - ["_"] = "actions.open_cwd", - ["`"] = "actions.cd", - ["~"] = { "actions.cd", opts = { scope = "tab" }, desc = ":tcd to the current oil directory", mode = "n" }, - ["gs"] = "actions.change_sort", + ["-"] = { "actions.parent", mode = "n" }, + ["_"] = { "actions.open_cwd", mode = "n" }, + ["`"] = { "actions.cd", mode = "n" }, + ["~"] = { "actions.cd", opts = { scope = "tab" }, mode = "n" }, + ["gs"] = { "actions.change_sort", mode = "n" }, ["gx"] = "actions.open_external", - ["g."] = "actions.toggle_hidden", - ["g\\"] = "actions.toggle_trash", + ["g."] = { "actions.toggle_hidden", mode = "n" }, + ["g\\"] = { "actions.toggle_trash", mode = "n" }, }, -- Set to false to disable all of the above keymaps use_default_keymaps = true,