Using Vim when coding a large-scale application

large-scale-projectvim

I'm starting to learn Vim, and following some of the advices given here in stackexchange. I'm beginning to use it in some toy projects and I'm cool with that.
But I started to wonder how you can be productive without opening other files all the time just to know how's that class' Name, what's that macro included in other file, etc. etc.

What are the common advices you can give?

Best Answer

One aspect of experienced programmers who move from an IDE to a console / xterm environment, is finding a replacement for the indexing of source code objects (function names, variables). I believe the general term used for Microsoft's Visual Studio is Intellisense or something like that.

In the Unix/Linux world, such as vim, one tool used if ctags or the popular multiple language Open Source implementation, exuberant ctags. It is not vim specific, and is supported by a number of Unix, Linux, MS Windows, Mac OS text editors, including Emacs, CRiSP, vile & a number of other vi clones, nedit, gedit, JED, UltraEdit, BBEdit, and DreamWeaver (some of these are via third-party plugins).

Beyond that, good design and thoughtful decomposition, organization of larger projects makes the project manageable in that there are only 1-2 obvious potential places to look for any given bit of information (typedef or class definitions, etc.).

Also I use multiple instances of vim (often via view for read-only viewing of source files), as well as a limited use of multiple edit buffers per vim instance (primarily for moving or refactoring code between files). I find using only a few source files open at a time can help in its own small way, to keep me focused on the task on hand.

Related Topic