In Vim how to switch quickly between .h and .cpp files with the same name?

后端 未结 6 2027
太阳男子
太阳男子 2020-12-23 16:55

Suppose I have a folder with lots of .h and .cpp files. I frequently need to do the following:

  1. open a file prefix_SomeReallyLongFileName.h,
6条回答
  •  無奈伤痛
    2020-12-23 17:10

    Install “unimpaired” and then use ]f and [f to go the previous and next file. Since source and header have they same name except for the suffix, they are next and previous files.

提交回复
热议问题