mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-02-03 00:10:07 +08:00
perf(neo-tree): make <cr>
set root or open file
This commit is contained in:
parent
c269420878
commit
c2e4697ed7
@ -167,7 +167,15 @@ require('neo-tree').setup({
|
||||
['<bs>'] = 'navigate_up',
|
||||
['<Left>'] = 'close_node',
|
||||
['h'] = 'close_node',
|
||||
['<Cr>'] = 'set_root',
|
||||
['<Cr>'] = function(state) -- {{{
|
||||
local node = state.tree:get_node()
|
||||
if node.type == 'directory' then
|
||||
state.commands['set_root'](state)
|
||||
else
|
||||
state.commands['open'](state)
|
||||
end
|
||||
end,
|
||||
-- }}}
|
||||
['<C-h>'] = function(state)
|
||||
vim.cmd('call SpaceVim#plugins#projectmanager#current_root()')
|
||||
end,
|
||||
|
Loading…
Reference in New Issue
Block a user