sponsor Vim development Vim logo Vim Book Ad

cdevframework : C/C++ development framework

 script karma  Rating -1/3, Downloaded by 660  Comments, bugs, improvements  Vim wiki

created by
Fabien Bouleau
script type
With time and experience, I ended setting up vim to ease my life while developing in C++. This is the very basic version of it, and it will most probably grow with time.


Run vim from within the root directory of your project ($HOME/Projects/myproject for instance). The script sets up the CTRL-W_s shortcut to ask for a source file extension as well as header file extension, then the source files base path and header files base path. From then on, each time you press the shortcut, you will be asked only for the file name you want to edit, without extension or path. It will then open them side by side. The idea is to go to the window with <CTRL-W>j and <CTRL-W>k and press <CTRL-W>_ to maximize the height.

The script also adds the "globals" option to sessionoptions in order to keep the base paths and extensions for when the session is saved with:

    :mksession! <filename>

To reload the session, then use:

    vim -S <filename>

Another hint: I like having the filename list next to the source code, by doing:

    :vsplit .
    :vertical resize 32
    :set wfw
install details
Simply drop it in the vim plugins folder ($HOME/.vim/plugin).

rate this script Life Changing Helpful Unfulfilling 
script versions (upload new version)

Click on the package to download.

package script version date Vim version user release notes
cdevframework.vim 0.1 2011-07-27 7.0 Fabien Bouleau Initial upload
ip used for rating:

If you have questions or remarks about this site, visit the vimonline development pages. Please use this site responsibly.
Questions about Vim should go to the maillist. Help Bram help Uganda.