A simple multi project manager
Install with vim-plug or vundle
- Add a mproj section to your '~/.vimrc'
- Add your projects to the 'g:MProjProjectList'
- Call the command 'MProjToggle' to show project list.
- Click 'o' to open the selected project.
function! OpenVimrc()
" do something when opening 'vimrc' project
echo 'opening vimrc'
endfunction
function! CloseVimrc()
" do something when closing 'vimrc' project
echo 'closing vimrc'
endfunction
" Specify names and paths for your projects
" Use the 'open' key to specify the callback function when opening the project
" Use the 'close' key to specify the callback function when closing the project
let g:MProjProjectList = [
\{
\'name':'vimrc',
\'path':'C:\Users\lv99\.vim',
\'open': function('OpenVimrc'),
\'close': function('CloseVimrc'),
\},
\{
\'name':'mproj',
\'path':'C:\Users\lv99\.vim\plugged\MultiProject.vim',
\},
\]
" Key map to toggle the window.
nmap <F2> :MProjToggle <CR>
Reload .vimrc and :MProjToggle
to open the window.
Command | Description |
---|---|
MProjToggle |
Open/close project list. |
Flag | Default | Description |
---|---|---|
g:MProjWinPos |
left | Default windows position |
g:MProjWinSize |
31 | Default windows size |
g:MProjProjectList |
[] | Specify names and paths for your projects |
g:MProjAutoHide |
1 | Default to close the MProj window after opening project |
- 'o' - Open project
- 'Ctrl-o' -Open project directory in Windows File Explorer
MIT