Nvim : Rekey toggle tab size to <Leader><Tab>.

This commit is contained in:
Dmitry Voronin 2024-03-26 07:38:57 +03:00
parent ba85621ab4
commit 382b6bdb5e
2 changed files with 5 additions and 5 deletions

View file

@ -20,7 +20,7 @@ function toggle_tab_width()
end end
end end
rekey_normal("<Leader>'", "<cmd>lua toggle_tab_width()<cr>") rekey_normal("<Leader><Tab>", "<cmd>lua toggle_tab_width()<cr>")
-- Repeat previous command. -- Repeat previous command.
rekey_normal("<Leader>.", "@:") rekey_normal("<Leader>.", "@:")

View file

@ -4,16 +4,16 @@ vim.g.loaded_netrwPlugin = 1
local function my_on_attach(bufnr) local function my_on_attach(bufnr)
local api = require "nvim-tree.api" local api = require "nvim-tree.api"
local function opts(desc) local function opts(desc)
return { desc = "nvim-tree: " .. desc, buffer = bufnr, noremap = true, silent = true, nowait = true } return { desc = "nvim-tree: " .. desc, buffer = bufnr, noremap = true, silent = true, nowait = true }
end end
-- Default mappings. -- Default mappings.
api.config.mappings.default_on_attach(bufnr) api.config.mappings.default_on_attach(bufnr)
-- Custom mappings. -- Custom mappings.
vim.keymap.set('n', '<Leader><Tab>', api.tree.change_root_to_node, opts('Cd into')) -- vim.keymap.set('n', '<Leader><Tab>', api.tree.change_root_to_node, opts('Cd into'))
end end
-- Set termguicolors to enable highlight groups. -- Set termguicolors to enable highlight groups.