Author |
Topic |
|
foxmuldr
Tomato Guru
USA
416 Posts |
Posted - Nov 07 2013 : 07:15:44 AM
|
Suppose I type:
void main(void)
{
foo = 3;
}
At this point "foo" isn't known. If I then navigate up above and start typing "int f," would it be possible for VAX to suggest "foo" (since it is an unknown symbol in the current context, and therefore may be a likely candidate for nearby use)?
Best regards, Rick C. Hodgin
|
Edited by - foxmuldr on Nov 07 2013 07:16:47 AM |
|
jay.carlton
Ketchup Master
USA
65 Posts |
Posted - Nov 07 2013 : 11:14:43 AM
|
What if you could just right-click on an undefined or unrecognized symbol and add a forward declaration, #include, or local, global, or class scope definition?
|
|
|
foxmuldr
Tomato Guru
USA
416 Posts |
Posted - Nov 07 2013 : 11:59:15 AM
|
That feature exists using right-click on the unrecognized symbol, Refactor (VA X) -> Create From Usage... -> and then the dialog box. But, it doesn't add it where I want, but always at the top, and it also doesn't use my column spacing as I like to align my symbol names vertically (dyslexia, makes it easier to "read" for me).
I want to be somewhere in the code and as I begin typing, VAX suggests the unknown names in scope, so I can even continue using them with the VAX speedups in tow before I define the variable. |
|
|
accord
Whole Tomato Software
United Kingdom
3287 Posts |
Posted - Nov 26 2013 : 6:05:02 PM
|
foxmuldr: We are considering something like this at some point.
case=46359
Regarding Create from Usage: What you mean by "column spacing"? You want a tab between the type and the variable name?
quote: it doesn't add it where I want, but always at the top
What if you could add on the previous line? Would it make any difference regarding the usability of this feature?
jay.carlton: We already have Add Include refactoring: just right click on a symbol and select it from the Refactor (VA) submenu.
http://www.wholetomato.com/products/features/autoUsing.asp#include
We are considering to add refactoring command for Add Forward Declaration, at some point:
case=27045 |
|
|
foxmuldr
Tomato Guru
USA
416 Posts |
Posted - Nov 27 2013 : 09:26:40 AM
|
quote: Originally posted by accordRegarding Create from Usage: What you mean by "column spacing"? You want a tab between the type and the variable name?
I have dyslexia. As a result, I use a lot of vertical column spacing for my software because my brain doesn't read well, but when data is organized into columns and groups, it makes it much easier for me to understand than if I try to read through line-by-line.
In my case, I use this general format (use the widest definition in the block, and align everything a tab or two over from that):
int i, count, total;
char* foo;
struct SWhatever lsw;
...rather than:
int i, count, total;
char* foo;
struct SWhatever lsw;
The second form is literally almost unreadable to me. I have to really, really concentrate to sift through it. As a result, if I were to receive source code like that I would actually go through first and insert tabs and vertically align the variable names before I would even attempt to understand it. :-)
It's one of the reasons for certain things I use NetBeans. It has automatic syntax formatting. It's very nice to open certain files in because I can generally deal with the standard ANSI C (slightly modified of course). :-)
You can see an example of this here beginning around line 70: https://github.com/RickCHodgin/libsf/blob/master/vvm/core/vvmoss/vo_sup.cpp
It's no biggie. I don't expect VAX to do that for me. But, the ability to include as auto-suggests the recent unknown variable names would be nice -- mainly because in the midst of coding I often code ahead of my variable definitions because as I'm coding I'm thinking about how to "sort it out" (so to speak). |
|
|
feline
Whole Tomato Software
United Kingdom
19022 Posts |
Posted - Nov 27 2013 : 09:57:06 AM
|
For lining up the declarations, if your IDE has macros (VS2010 and earlier), look in:
IDE Tools menu -> Macros -> Macro Explorer
look for:
Samples -> VSEditor -> LineEmUp
which has the description:
'' LineEmUp aligns all text in the selected lines based on word breaks. '' Useful for creating vertically aligned variable or method declarations.
I have not used this macro myself, but it sounds like it should help. |
zen is the art of being at one with the two'ness |
|
|
foxmuldr
Tomato Guru
USA
416 Posts |
Posted - Nov 27 2013 : 10:23:16 AM
|
Thank you, feline. |
|
|
sean
Whole Tomato Software
USA
2817 Posts |
Posted - Jul 13 2018 : 3:17:33 PM
|
case=27045 is implemented in build 2283. |
|
|
|
Topic |
|