Skip to content

Commit

Permalink
fix: only map ~ for normal mode (#484)
Browse files Browse the repository at this point in the history
Allows to switch character case with ~ (tilde) in visual mode while
preserving existing ~ :tcd functionality.
Related to [1].

[1]: #397 "bug: ~ not respected"
  • Loading branch information
staticssleever668 authored Oct 4, 2024
1 parent 9e6fb84 commit ccab9d5
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ require("oil").setup({
["-"] = "actions.parent",
["_"] = "actions.open_cwd",
["`"] = "actions.cd",
["~"] = { "actions.cd", opts = { scope = "tab" }, desc = ":tcd to the current oil directory" },
["~"] = { "actions.cd", opts = { scope = "tab" }, desc = ":tcd to the current oil directory", mode = "n" },
["gs"] = "actions.change_sort",
["gx"] = "actions.open_external",
["g."] = "actions.toggle_hidden",
Expand Down
2 changes: 1 addition & 1 deletion doc/oil.txt
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ CONFIG *oil-confi
["-"] = "actions.parent",
["_"] = "actions.open_cwd",
["`"] = "actions.cd",
["~"] = { "actions.cd", opts = { scope = "tab" }, desc = ":tcd to the current oil directory" },
["~"] = { "actions.cd", opts = { scope = "tab" }, desc = ":tcd to the current oil directory", mode = "n" },
["gs"] = "actions.change_sort",
["gx"] = "actions.open_external",
["g."] = "actions.toggle_hidden",
Expand Down
2 changes: 1 addition & 1 deletion lua/oil/config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ local default_config = {
["-"] = "actions.parent",
["_"] = "actions.open_cwd",
["`"] = "actions.cd",
["~"] = { "actions.cd", opts = { scope = "tab" }, desc = ":tcd to the current oil directory" },
["~"] = { "actions.cd", opts = { scope = "tab" }, desc = ":tcd to the current oil directory", mode = "n" },
["gs"] = "actions.change_sort",
["gx"] = "actions.open_external",
["g."] = "actions.toggle_hidden",
Expand Down

0 comments on commit ccab9d5

Please sign in to comment.