sponsor Vim development Vim logo Vim Book Ad

Acpp : Does a better job than A script

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

created by
michael kapelko
 
script type
utility
 
description
If you call "Acpp" when editing "/path/to/file/src/Window.cpp", the script:
* sees if there's "/path/to/file/src/" directory;
** if so:
*** switch to "/path/to/file/include/Window" if it exists;
*** switch to "/path/to/file/include/Window.h" even if it doesn't exist;
** if not:
*** switch to "/path/to/file/src/Window" if it exists;
*** switch to "/path/to/file/src/Window.h" even if it doesn't exist.

If you call "Acpp" when editing "/path/to/file/include/Window"
or "/path/to/file/include/Window.h", the script:
* sees if there's "/path/to/file/src/" directory;
** if so:
*** switch to "/path/to/file/src/Window.cpp" even if it doesn't exist.

It does not strictly depend on Vim 7, it's just the version I have, the script should work fine with previous versions too.
 
install details
I simply added the following line into my ~/.vimrc file:
source ~/acpp.vim
You can also place it to /usr/share/vim/vim71/plugin directory (substitute vim71 with your vimVERSION)
 

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
acpp.vim 1.0 2013-08-02 7.0 michael kapelko Switching between .h/.h-less header and .cpp source files both with include/src scheme and simply in the same directory.
acpp.vim 0.01 2007-12-05 7.0 michael kapelko Initial upload
ip used for rating: 54.166.66.204

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.
   
SourceForge.net Logo