doc: move vinegar-style to wiki

This commit is contained in:
Alexander Courtis 2023-01-17 12:02:42 +11:00
parent 1b13a49f91
commit e8a89db1bb

View File

@ -9,7 +9,6 @@ CONTENTS *nvim-tree*
2. Quickstart |nvim-tree-quickstart|
3. Commands |nvim-tree-commands|
4. Setup/Configuration |nvim-tree-setup|
4.1 Vinegar Style |nvim-tree-vinegar|
5. Api |nvim-tree-api|
6. Mappings |nvim-tree-mappings|
7. Highlight Groups |nvim-tree-highlight|
@ -1207,47 +1206,6 @@ Configuration for diagnostic logging.
|nvim-tree.filesystem_watchers| processing, verbose.
Type: `boolean`, Default: `false`
==============================================================================
4.1 VINEGAR STYLE *nvim-tree-vinegar*
|nvim_tree_vinegar| *nvim_tree_vinegar*
nvim-tree can behave like vinegar. To allow this, you will need to configure
it in a specific way:
- Use `require"nvim-tree".open_replacing_current_buffer()` instead of the
default open command.
You can easily implement a toggle using this too:
>
local function toggle_replace()
local view = require"nvim-tree.view"
local api = require"nvim-tree.api"
if view.is_visible() then
api.tree.close()
else
require"nvim-tree".open_replacing_current_buffer()
end
end
<
- Use the `edit_in_place` action to edit files. It's bound to `<C-e>` by
default, vinegar uses `<CR>`. You can override this with:
>
require"nvim-tree".setup {
view = {
mappings = {
list = {
{ key = "<CR>", action = "edit_in_place" }
}
}
}
}
<
Going up a dir is bound to `-` by default in nvim-tree which is identical to
vinegar, no change is needed here.
You'll also need to set |nvim-tree.hijack_netrw| to `true` during setup.
A good functionality to enable is |nvim-tree.hijack_directories|.
==============================================================================
5. API *nvim-tree-api*