A modern side panel for Vim
Begin by creating a new panel with the
Load this panel in the current window with
Add entries to the panel with the
The path you just added will act as a root and you can now expand and browse it. At any time you can add other roots to the panel.
To get rid of a root, select it and use the
:VimpanelRemove command. This does not delete anything from
the filesystem, it just takes it off the panel.
Sort your panel entries by editing the Vimpanel storage file. The format of this file is painfully simple:
each line is an entry to the panel. There is a
:VimpanelEdit command that makes this easier, by opening up
You will need to refresh the panel after this, with the
:VimpanelRefresh command or the
Inside the panel, focus on a single directory by entering explorer mode:
In this mode, you can also move up a dir by using the
u key, or change the root by using the
Exit explorer mode at any time by pressing
Inside the panel, several actions and filesystem operations are available. Check the full list below.
When you're done working, save the state of you panel and everything else you have on the screen:
This uses Vim's
mksession command and some extra magic to save the state of your panels (the state
is defined by which dirs are expanded and which are closed).
When you're ready to work again, load up that session using:
And that's about it. To make your life easier, you can use abbreviations or mappings for all these commands.
Here are some recommendations to put in your
map <leader>ss :VimpanelSessionMake<CR> map <leader>sl :VimpanelSessionLoad<CR> cabbrev vp Vimpanel cabbrev vl VimpanelLoad cabbrev vc VimpanelCreate cabbrev ve VimpanelEdit cabbrev vr VimpanelRemove
Tip: autocomplete works for panel names, so you can press
vl<space><tab> and get a full list of panel names.
<CR> or double-click expand directory or open file <F5> refresh panel <C-c> or yy copy selected node (file or dir) <C-v> or p paste nodes dd delete node r rename node a add new node ff copy node path to clipboard
You can use visual selection (
V) to grab some files and then press
y to copy them.
Paste them anywhere else with the
Toggle explorer mode by selecting a folder and pressing the
x key. In this mode you can freely explore the filesystem.
The selected folder will become the root of the tree, but you can change to another root using the
c key or explore the
parent directory using the
u key (move up).
Why is this mode needed? For 2 main reasons:
Vimpanel is built on a heavily modified NERDTree API.
You will find many similarities with NERDTree but many key differences as well.