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

Use 2-leftmouse to toggle tree

ref: https://github.com/Shougo/defx.nvim/issues/135
This commit is contained in:
Shidong Wang 2019-06-08 20:57:16 +08:00
parent 81b56a907c
commit 103fe0763c

View File

@ -99,8 +99,13 @@ function! s:defx_init()
\ defx#is_directory() ?
\ defx#do_action('open_directory') : defx#do_action('drop')
nnoremap <silent><buffer><expr> <2-LeftMouse>
\ defx#is_directory() ?
\ defx#do_action('open_tree') : defx#do_action('drop')
\ defx#is_directory() ?
\ (
\ defx#is_opened_tree() ?
\ defx#do_action('close_tree') :
\ defx#do_action('open_tree')
\ )
\ : defx#do_action('drop')
nnoremap <silent><buffer><expr> sg
\ defx#do_action('drop', 'vsplit')
nnoremap <silent><buffer><expr> sv