For me, because of laziness. I do not even want to read http://docs.sublimetext.info/en/latest/reference/symbols.html and write
.tmPreferences files for myself since
CTags is working.
The following things are what I ran into quite a long time ago and I re-tested them today after I saw this post.
Let's say I create a ST project which has the following directory structure.
echo MY_CONSTANT; // this prints: HELLO
Okay, that's our environment. Now, let's work on our project.
- close all tabs
- Oh, what's the value/definition of
- Press F12 and nothing happens.
- Press Ctrl+R and find nothing.
- Press Ctrl+Shift+R and find nothing.
CTags, after tags are built, Ctrl+T, Ctrl+T and voila!
Let's say I do not know there is a plugin named CTags. After reading the ST document, I write a simple
.tmPreferences for PHP as below.
Symbol List - Constants.tmPreferences,
<?xml version="1.0" encoding="UTF-8"?>
<string>Symbols List: Constants</string>
Okay, now F12 works for me, cheers!
- Should I maintain this
.tmPreference for myself?
- There is no special scope for
define('MY_CONSTANT', 'HELLO');, using
meta.string-contents.quoted.single.php as the capture scope would inject quite lots of crap into your symbol list. Maybe I should report this to ST official?
I am not saying ST cannot do what CTags can do. But how much effort people want to put with a comparison to just install CTags? You just cannot expect everyone dig into the issue like this.
I think most of users do not know what happened. They just try F12 and let it go. Where is the doc? What should I do to fix this? How many cases are just like this and I have to write my own
.tmPreference? I do not care. Maybe just install CTags.
Actually, CTags is not omnipotent. I use both CTags and F12.