Nvim : Rekey toggle tab size to <Leader><Tab>.
This commit is contained in:
parent
ba85621ab4
commit
382b6bdb5e
|
@ -20,7 +20,7 @@ function toggle_tab_width()
|
|||
end
|
||||
end
|
||||
|
||||
rekey_normal("<Leader>'", "<cmd>lua toggle_tab_width()<cr>")
|
||||
rekey_normal("<Leader><Tab>", "<cmd>lua toggle_tab_width()<cr>")
|
||||
|
||||
-- Repeat previous command.
|
||||
rekey_normal("<Leader>.", "@:")
|
||||
|
|
|
@ -4,16 +4,16 @@ vim.g.loaded_netrwPlugin = 1
|
|||
|
||||
local function my_on_attach(bufnr)
|
||||
local api = require "nvim-tree.api"
|
||||
|
||||
|
||||
local function opts(desc)
|
||||
return { desc = "nvim-tree: " .. desc, buffer = bufnr, noremap = true, silent = true, nowait = true }
|
||||
end
|
||||
|
||||
|
||||
-- Default mappings.
|
||||
api.config.mappings.default_on_attach(bufnr)
|
||||
|
||||
|
||||
-- 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
|
||||
|
||||
-- Set termguicolors to enable highlight groups.
|
||||
|
|
Loading…
Reference in a new issue