Easily open relevant groupings of files in Vim. This plugin is currently simplistic and hacky. I am developing it slowly over time. If you start using it please let me know what you need from it by submitting issues.
I use it along with The NERD tree and CtrlP.Vim in order to easily call up files from within a project and make working in Vim more like working in an IDE. Both those plugins are far more mature and powerful than this one is, plus the guys who wrote them are way better with VimL than I am. I recommend them both above this one, but they can be used to complement each other.
Open a tab and populate it with related files
The main command is
:Tabv. It takes one argument, which is the "root" or
"stem" of the set of files you want to open (see below for examples). It
attempts to guess the type of project you are working on and open the files
variant of this command is
:Tvword, which does the same thing but using the
word under cursor instead of a command-mode argument.
Example in a C++ project:
Example in a C++ project, using the
<> extension, which will cause only the
unit tests and header file to be loaded (not the source file; C++ templates do
no have source files):
The same command is available wrapped/aliased for use in shell environments
(Bash and PowerShell). For Bash, source the
tabv.sh file in your
for PowerShell source the
tabv.ps1 in your
$profile. Two addition commands
are define in each environment:
sp, which will open two files split
vertically or horizontally.
Open relevant files for already opened file in same tab
Will attempt to figure out where the unit tests for the current buffer are and open them in a vertically split window:
I recommend installing with Pathogen,
thus (you may need to
cd ~/.vim/bundle git clone https://github.com/Kazark/vim-tabv.git
Note: you may have to use
~\vimfiles instead of
~/.vim if you are on
To run the specs, you will need Vader installed as a Vim plugin. The from within the Tabv repository, do:
cd specs vim +Vader*
this will run all the specs. For more information, see Vader's documentation.