add mapping to focus nvimtree (349)

This commit is contained in:
siduck76 2021-08-23 16:44:52 +05:30
parent b2ec48ef30
commit ac83f1d580
3 changed files with 6 additions and 3 deletions

View file

@ -158,6 +158,7 @@ end
M.nvimtree = function()
map("n", plugin_maps.nvimtree.toggle, ":NvimTreeToggle <CR>", opt)
map("n", plugin_maps.nvimtree.focus, ":NvimTreeFocus <CR>", opt)
end
M.neoformat = function()

View file

@ -157,14 +157,16 @@ M.mappings.plugin = {
new_file = "<leader>fn", -- basically create a new buffer
open = "<leader>db", -- open dashboard
session_load = "<leader>l", -- load a saved session
session_save = "<leader>s", -- save a session
session_save = "<leader>s",
},
-- note: this is an edditional mapping to escape, escape key will still work
better_escape = {
esc_insertmode = { "jk" }, -- multiple mappings allowed
},
nvimtree = {
toggle = "<C-n>", -- file manager
-- file tree
toggle = "<C-n>",
focus = "<C-h>",
},
neoformat = {
format = "<leader>fm",

View file

@ -247,7 +247,7 @@ return packer.startup(function()
-- file managing , picker etc
use {
"kyazdani42/nvim-tree.lua",
cmd = "NvimTreeToggle",
cmd = {"NvimTreeToggle", "NvimTreeFocus"},
config = function()
require "plugins.configs.nvimtree"
end,