fix(mappings): remove un-indent mapping in favor of the default <C-D>

This commit is contained in:
2024-03-04 20:19:13 +01:00
parent df6f9c1510
commit 32618ac05b
+7 -7
View File
@@ -62,10 +62,10 @@ vim.keymap.set("", "<C-LeftMouse>", "")
vim.cmd.aunmenu({ "PopUp.-1-", }) vim.cmd.aunmenu({ "PopUp.-1-", })
vim.cmd.aunmenu({ "PopUp.How-to\\ disable\\ mouse", }) vim.cmd.aunmenu({ "PopUp.How-to\\ disable\\ mouse", })
-- Shift+Tab to unindent -- Default bindings that are good to know:
vim.keymap.set("i", "<S-Tab>", function () -- insert mode:
local cursor = vim.api.nvim_win_get_cursor(0) -- <C-T> - indent, see :h i_CTRL-T
local row, col = cursor[1], cursor[2] -- <C-D> - un-indent, see :h i_CTRL-D
vim.cmd.normal("<<") -- normal mode:
vim.api.nvim_win_set_cursor(0, { row, col - vim.o.shiftwidth, }) -- <count?><C-E> - scroll window down <count> lines, see :h CTRL-E
end) -- <count?><C-Y> - scroll window up <count> lines, see :h CTRL-Y