From 5212f84c900cd38da9a08232a268ab54a117a363 Mon Sep 17 00:00:00 2001 From: Price Hiller Date: Tue, 17 Oct 2023 16:24:50 -0500 Subject: [PATCH] fix(nvim): correctly insert raw tab for tab switch binding --- dots/.config/nvim/lua/core/mappings.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dots/.config/nvim/lua/core/mappings.lua b/dots/.config/nvim/lua/core/mappings.lua index d2a4a68c..6ebc0b51 100755 --- a/dots/.config/nvim/lua/core/mappings.lua +++ b/dots/.config/nvim/lua/core/mappings.lua @@ -96,7 +96,7 @@ M.setup = function() -- Binding to insert literal tab vim.keymap.set("i", "", function() if vim.opt_local.expandtab:get() then - vim.api.nvim_feedkeys("\t", "m", false) + vim.api.nvim_feedkeys(vim.api.nvim_replace_termcodes("", true, false, true), "m", true) else local spaces = string.rep(" ", vim.opt_local.shiftwidth:get() or 4) vim.api.nvim_feedkeys(spaces, "m", false)