DEV Community

Eric Curtin
Eric Curtin

Posted on

3 1

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!

Image of Datadog

Create and maintain end-to-end frontend tests

Learn best practices on creating frontend tests, testing on-premise apps, integrating tests into your CI/CD pipeline, and using Datadog’s testing tunnel.

Download The Guide

Top comments (0)

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more