mirror of
https://github.com/LunarVim/LunarVim.git
synced 2025-08-04 18:14:40 +02:00
new nvimtree bindings
This commit is contained in:
parent
5ecdae981f
commit
4c9ef378bc
1 changed files with 4 additions and 37 deletions
|
@ -48,44 +48,11 @@ M.config = function()
|
|||
symlink = ""
|
||||
}
|
||||
}
|
||||
local tree_cb = require'nvim-tree.config'.nvim_tree_callback
|
||||
|
||||
local tree_cb = require"nvim-tree.config".nvim_tree_callback
|
||||
|
||||
g.nvim_tree_bindings = {
|
||||
["u"] = ":lua require'some_module'.some_function()<cr>",
|
||||
["<CR>"] = tree_cb("edit"),
|
||||
["l"] = tree_cb("edit"),
|
||||
["o"] = tree_cb("edit"),
|
||||
["h"] = tree_cb("close_node"),
|
||||
["<2-LeftMouse>"] = tree_cb("edit"),
|
||||
["<2-RightMouse>"] = tree_cb("cd"),
|
||||
["<C-]>"] = tree_cb("cd"),
|
||||
["<C-v>"] = tree_cb("vsplit"),
|
||||
["v"] = tree_cb("vsplit"),
|
||||
["<C-x>"] = tree_cb("split"),
|
||||
["<C-t>"] = tree_cb("tabnew"),
|
||||
["<"] = tree_cb("prev_sibling"),
|
||||
[">"] = tree_cb("next_sibling"),
|
||||
["<BS>"] = tree_cb("close_node"),
|
||||
["<S-CR>"] = tree_cb("close_node"),
|
||||
["<Tab>"] = tree_cb("preview"),
|
||||
["I"] = tree_cb("toggle_ignored"),
|
||||
["H"] = tree_cb("toggle_dotfiles"),
|
||||
["R"] = tree_cb("refresh"),
|
||||
["a"] = tree_cb("create"),
|
||||
["d"] = tree_cb("remove"),
|
||||
["r"] = tree_cb("rename"),
|
||||
["<C-r>"] = tree_cb("full_rename"),
|
||||
["x"] = tree_cb("cut"),
|
||||
["c"] = tree_cb("copy"),
|
||||
["p"] = tree_cb("paste"),
|
||||
["y"] = tree_cb("copy_name"),
|
||||
["Y"] = tree_cb("copy_path"),
|
||||
["gy"] = tree_cb("copy_absolute_path"),
|
||||
["[c"] = tree_cb("prev_git_item"),
|
||||
["]c"] = tree_cb("next_git_item"),
|
||||
["-"] = tree_cb("dir_up"),
|
||||
["q"] = tree_cb("close")
|
||||
vim.g.nvim_tree_bindings = {
|
||||
{ key = "l", cb = tree_cb("edit")},
|
||||
{ key = "h", cb = tree_cb("close_node")}
|
||||
}
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue