toggle tabstop

This commit is contained in:
andrzej 2024-05-29 16:10:51 +02:00
parent e6225d00a0
commit 684a6f3641
1 changed files with 10 additions and 0 deletions

View File

@ -42,4 +42,14 @@ vim.keymap.set({ "i", "n" }, "<M-->", "<cmd>b#<cr>", { desc = "Previous buffer."
--SUPER COMMA --SUPER COMMA
-- go to next comma and press enter -- go to next comma and press enter
vim.keymap.set("n", "<M-,>", "f,a<cr><esc>") vim.keymap.set("n", "<M-,>", "f,a<cr><esc>")
-- add a comma at end of line and CR
vim.keymap.set("i", "<M-,>", "<esc>A,<cr><esc>") vim.keymap.set("i", "<M-,>", "<esc>A,<cr><esc>")
--TOGGLE TABSTOP
vim.keymap.set("n", "<M-t>", function()
if vim.opt.tabstop:get() > 2 then
vim.opt.tabstop = 2
else
vim.opt.tabstop = 8
end
end)