Skip to content

Commit 0417ebb

Browse files
authored
feat: add <C-w> mapping for inputs, fixes #366 (#376)
1 parent 0719fd5 commit 0417ebb

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

lua/neo-tree/sources/filesystem/lib/filter.lua

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,8 @@ M.show_filter = function(state, search_as_you_type, fuzzy_finder_mode)
155155
restore_height()
156156
end, { noremap = true })
157157

158+
input:map("i", "<C-w>", "<C-S-w>", { noremap = true })
159+
158160
input:on({ event.BufLeave, event.BufDelete }, function()
159161
vim.cmd("stopinsert")
160162
input:unmount()

lua/neo-tree/ui/inputs.lua

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ M.show_input = function(input, callback)
1818
input:unmount()
1919
end, { noremap = true })
2020

21+
input:map("i", "<C-w>", "<C-S-w>", { noremap = true })
22+
2123
local event = require("nui.utils.autocmd").event
2224
input:on({ event.BufLeave, event.BufDelete }, function()
2325
input:unmount()

0 commit comments

Comments
 (0)