Skip to content

ravinggenius/vim-open

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 

Repository files navigation

About

Vim-open assumes you a have a projects directory somewhere, under which you have a directory for each project. For instance:

~/Code/
├── project_one/
├── project_two/
├── client_one/
│   ├── project_x/
│   └── project_y/
├── client_two/
│   └── project_z/
└── etc/

As long as your projects are within the top two directories of your projects directory, everything works nicely. To tell vim-open where your projects directory is, see configuration options below.

Configuration

let g:project_dir = '~/all/my/projects'
required This tells vim-open where to look for projects.

let g:open_dir_auto_open_nerdtree = 0
If you have NERDTree and want it to auto-open when opening a project, set to 1. Otherwise you can ignore this option.

let g:open_dir_callback = 'CtrlP'
In addition to (or instead of) opening NERDTree, you can specify an arbitrary callback command to execute when vim-open runs. For instance you can use this to prime CtrlP's cache. Please see note in usage below.

Usage

:Open project_two
Changes vim's working directory to project_two, opens the project's README (if present), opens NERDTree (if configured) and executes callback in g:open_dir_callback. This is how you will normally use vim-open.

:OpenDir ~/some/other/dir
Changes vim's working directory to ~/some/other/dir, opens the directory's README (if present), opens NERDTree (if configured) and executes callback in g:open_dir_callback. This is useful if you need to open an arbitrary directory.

:OpenVimrc
Changes vim's working directory to ~/.vim, opens ~/.vimrc and opens NERDTree (if configured). Please note that the callback in g:open_dir_callback will be ignored.

About

Commands for opening projects in Vim

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Vim Script 100.0%