We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 78cdf5d commit bbfdf77Copy full SHA for bbfdf77
lua/better_escape.lua
@@ -89,10 +89,13 @@ local function map_keys()
89
for mode, keys in pairs(settings.mappings) do
90
local map_opts = { expr = true }
91
for key, subkeys in pairs(keys) do
92
- vim.keymap.set(mode, key, function()
93
- log_key(key)
94
- return key
95
- end, map_opts)
+ -- Ensure correct registration of bidirectional mappings (e.g., `kj` and `jk`). #67
+ if vim.fn.maparg(key, mode) == "" then
+ vim.keymap.set(mode, key, function()
+ log_key(key)
96
+ return key
97
+ end, map_opts)
98
+ end
99
for subkey, mapping in pairs(subkeys) do
100
if mapping then
101
if not parent_keys[mode] then
0 commit comments