DEV Community

Eric Curtin
Eric Curtin

Posted on

CurtineIncSw.vim - switching between implementation and header files

I'm not adverse to using an IDE from time to time. But often I find myself editing C/C++ code from VIM, being the swiss army knife of text editing that it is.

One common task I perform, especially when changing/adding/removing function signatures is switching between header and implementation files.

Sometimes I struggle to remember the location of all 532677 C/C++ files in my repo...

Introducing find

Often I would briefly leave vim and do a find like follows:

find . -name "fileIHadOpenInVim.c"

or

find . -name "fileIHadOpenInVim.h"

Sound familiar?

Try out my VIM plugin, this task becomes a single keystroke in VIM and is optimized for speed and simplicity:

https://github.com/ericcurtin/CurtineIncSw.vim
https://vim.sourceforge.io/scripts/script.php?script_id=5545

Feel free to give feedback, open issues and open PRs!

Top comments (0)