1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-01-23 20:00:05 +08:00

perf(neotree): update neo-tree key binding

This commit is contained in:
wsdjeg 2023-06-11 21:20:42 +08:00
parent 5b75fb7b6a
commit b981945a13

View File

@ -86,7 +86,6 @@ require('neo-tree').setup({
['o'] = 'open', ['o'] = 'open',
['<esc>'] = 'revert_preview', ['<esc>'] = 'revert_preview',
['P'] = { 'toggle_preview', config = { use_float = true } }, ['P'] = { 'toggle_preview', config = { use_float = true } },
['l'] = 'open',
['s'] = 'open_vsplit', ['s'] = 'open_vsplit',
-- ["S"] = "split_with_window_picker", -- ["S"] = "split_with_window_picker",
-- ["s"] = "vsplit_with_window_picker", -- ["s"] = "vsplit_with_window_picker",
@ -166,6 +165,8 @@ require('neo-tree').setup({
window = { window = {
mappings = { mappings = {
['<bs>'] = 'navigate_up', ['<bs>'] = 'navigate_up',
['<Left>'] = 'close_node',
['h'] = 'close_node',
['<Cr>'] = 'set_root', ['<Cr>'] = 'set_root',
['<C-h>'] = function(state) ['<C-h>'] = function(state)
vim.cmd('call SpaceVim#plugins#projectmanager#current_root()') vim.cmd('call SpaceVim#plugins#projectmanager#current_root()')
@ -179,6 +180,8 @@ require('neo-tree').setup({
['f'] = 'filter_on_submit', ['f'] = 'filter_on_submit',
['<c-x>'] = 'clear_filter', ['<c-x>'] = 'clear_filter',
['[g'] = 'prev_git_modified', ['[g'] = 'prev_git_modified',
['<Right>'] = 'open',
['l'] = 'open',
['N'] = { ['N'] = {
'add', 'add',
-- this command supports BASH style brace expansion ("x{a,b,c}" -> xa,xb,xc). see `:h neo-tree-file-actions` for details -- this command supports BASH style brace expansion ("x{a,b,c}" -> xa,xb,xc). see `:h neo-tree-file-actions` for details