Skip to content

Commit ccab9d5

Browse files
fix: only map ~ for normal mode (#484)
Allows to switch character case with ~ (tilde) in visual mode while preserving existing ~ :tcd functionality. Related to [1]. [1]: #397 "bug: ~ not respected"
1 parent 9e6fb84 commit ccab9d5

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ require("oil").setup({
201201
["-"] = "actions.parent",
202202
["_"] = "actions.open_cwd",
203203
["`"] = "actions.cd",
204-
["~"] = { "actions.cd", opts = { scope = "tab" }, desc = ":tcd to the current oil directory" },
204+
["~"] = { "actions.cd", opts = { scope = "tab" }, desc = ":tcd to the current oil directory", mode = "n" },
205205
["gs"] = "actions.change_sort",
206206
["gx"] = "actions.open_external",
207207
["g."] = "actions.toggle_hidden",

doc/oil.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ CONFIG *oil-confi
8686
["-"] = "actions.parent",
8787
["_"] = "actions.open_cwd",
8888
["`"] = "actions.cd",
89-
["~"] = { "actions.cd", opts = { scope = "tab" }, desc = ":tcd to the current oil directory" },
89+
["~"] = { "actions.cd", opts = { scope = "tab" }, desc = ":tcd to the current oil directory", mode = "n" },
9090
["gs"] = "actions.change_sort",
9191
["gx"] = "actions.open_external",
9292
["g."] = "actions.toggle_hidden",

lua/oil/config.lua

+1-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ local default_config = {
7171
["-"] = "actions.parent",
7272
["_"] = "actions.open_cwd",
7373
["`"] = "actions.cd",
74-
["~"] = { "actions.cd", opts = { scope = "tab" }, desc = ":tcd to the current oil directory" },
74+
["~"] = { "actions.cd", opts = { scope = "tab" }, desc = ":tcd to the current oil directory", mode = "n" },
7575
["gs"] = "actions.change_sort",
7676
["gx"] = "actions.open_external",
7777
["g."] = "actions.toggle_hidden",

0 commit comments

Comments
 (0)