From d14af8a1d9148b47b92bc9656201c917d02069c5 Mon Sep 17 00:00:00 2001 From: wsdjeg Date: Wed, 31 May 2023 20:10:25 +0800 Subject: [PATCH] perf(neotree): add `ctrl-h` key binding --- config/plugins/neo-tree.vim | 3 +++ docs/documentation.md | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/config/plugins/neo-tree.vim b/config/plugins/neo-tree.vim index 1fd0ab0d6..f2d729845 100644 --- a/config/plugins/neo-tree.vim +++ b/config/plugins/neo-tree.vim @@ -180,6 +180,9 @@ require("neo-tree").setup({ mappings = { [""] = "navigate_up", ["."] = "set_root", + [""] = function(state) + vim.cmd('call SpaceVim#plugins#projectmanager#current_root()') + end, ["H"] = "toggle_hidden", ["/"] = "fuzzy_finder", ["D"] = "fuzzy_finder_directory", diff --git a/docs/documentation.md b/docs/documentation.md index bf545abe2..cb847ff19 100644 --- a/docs/documentation.md +++ b/docs/documentation.md @@ -897,6 +897,7 @@ To change the filemanager plugin insert the following to the `[options]` section # - nerdtree (default) # - vimfiler: you need to build the vimproc.vim in bundle/vimproc.vim directory # - defx: requires +py3 feature + # - neo-tree: require neovim 0.7.0 filemanager = "nerdtree" ``` @@ -955,7 +956,7 @@ Navigation is centered on the `hjkl` keys with the hope of providing a fast navi | `<` | decrease filetree screenwidth | | `` | Jump to first line | | `` | Jump to last line | -| `Ctrl-Home` | Switch to project root directory | +| `Ctrl-h` | Switch to project root directory | | `Ctrl-r` | Redraw | #### Open file with file tree.