Sublime Text: Switch files to different folders
I have opened a C ++ project in Sublime Text
and I am working on a Windows environment. I need to switch between .cpp
and .h
files. There is a Alt+ command Othat can switch these files if they are in the same folder. but my files are placed like this:
-
.h
inmyfolder/include/subfolder/
-
.cpp
inmyfolder/src/subfolder/
The file names are the same, they are just different from each other. I'm using Ctrl+ right now p, but I want one command to do this. Thanks in Advance
+3
source to share
2 answers
This may not be exactly what you want, but here is a workaround to accomplish what you ask: if you download and install the CTags plugin for Sublime
, you can:
- Create tags with Ctrl+ t, Ctrl+r
- CtrlThe + t, Ctrl+ twill force you to jump to the definition (from title to source) of what is under the cursor.
- Ctrl+ t Ctrl+ bto "bounce back" (to the title)
[EDIT]
- It seems that someone has implemented a plugin to accomplish what you want (haven't tested it, note that the README says it will look for matches outside the current folder, but only in already open files)
- FWIW, the original function is in
Packages/Default/switch_file.py
(also you might want to take a look at the codeVim
equivalent )
+1
source to share