-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to switch between ".h" and ".cpp"? #2
Comments
It was not possible before this commit, I didn't think about that use case. Now it's fix, as the README says just add this line to your .vimrc to be able to switch between ".cpp" and ".h" let g:goto_header_associate_cpp_h = 1 |
@Yohannfra Unfortunately you would need to do something similar to support ".h" -> ".cpp". Some projects use cc instead of cpp. |
@another-pjohnson is right. This issue should not be closed before fixing this. I think that it would be possible to change this string by a regular expression. |
You are right, thanks for reminding me of this issue. What I did with the goto_header_associate_cpp_h variable was a quick hack but it is not a proper solution. There are people using .h, .hh, .hpp, .h++ and many more. I can't hard code a solution like this. A few months ago I started to write a solution to this problem in this repository : https://github.com/Yohannfra/Vim-Quick-Switch but I still have a lot of modifications not commited on my computer and didn't have the time to finish it back then. I'll try to do it asap and merge it back in this plugin. Thanks for your interest and contribution. |
I will merge #2 for now since it's a fix for your use case but this is still a hacky solution that will be removed when I'll merge the new algorithm. |
In my project, the source file are
*.h
and*.cpp
. How to switch between them?The text was updated successfully, but these errors were encountered: