Author |
Topic |
|
Adequat
Tomato Guru
182 Posts |
Posted - Feb 05 2014 : 07:25:22 AM
|
Navigating with VA is just great. But the navigation is limited to code symbols. A great addition (and relative simple I think), would be to have the possibility to navigate among custom symbols located in comments. Let me explain: Let's say I have a complex piece of code, and to better understand it, I write some comments. Inside this comment, I would like to jump (with the touch of a key) to another part of my code where some other comments will be useful (just like an hyperlink can do). Something like:
// VA::EXPLAIN1. This is my comment. See also VA::EXPLAIN2
Somewhere else:
// VA::EXPLAIN2. This is another comment in another file. See also VA::EXPLAIN1
|
|
feline
Whole Tomato Software
United Kingdom
19022 Posts |
Posted - Feb 05 2014 : 3:35:43 PM
|
We are considering extending Find References to search for tags / markers in strings, like this, so you could use Find References to see all instances of this marker, which should help here:
case=9563
The problem, at least in this example, of going there directly is that we don't know where "there" is. But if you wanted to try something, you could try:
#ifdef VA_HELPER_TARGET void VA_EXPLAIN1() { } #endif
and then, add a comment:
// see marker point VA_EXPLAIN1()
you can now use Alt-g from the comment, to the function body. This does require a function as a target, but it does not need to be a live or actual function. |
zen is the art of being at one with the two'ness |
|
|
Adequat
Tomato Guru
182 Posts |
Posted - Feb 13 2014 : 02:03:35 AM
|
>>you can now use Alt-g from the comment.
Your trick is nice. Simply, this remain a trick (the fake function declaration). Hence my idea: to define a new type of tag to use in comments, with a VA syntax, to make it more obvious about its purpose and help you parsing it. Eg. "VA:MyTag".
|
|
|
Adequat
Tomato Guru
182 Posts |
|
feline
Whole Tomato Software
United Kingdom
19022 Posts |
Posted - Feb 19 2014 : 12:43:51 PM
|
This is an interesting idea, and I do see the appeal. I have put in a feature request to see what our developers make of this:
case=80318
For now, I realise that the dummy functions are not very elegant, but they are a solution. Alternatively you can always use the IDE's Find in Files, to search for your marker comment. Quite a bit slower, especially for a large solution, but it is something you can do currently. |
zen is the art of being at one with the two'ness |
|
|
sean
Whole Tomato Software
USA
2817 Posts |
|
|
Topic |
|