Author |
Topic |
|
foxmuldr
Tomato Guru
USA
414 Posts |
Posted - Dec 12 2016 : 08:56:38 AM
|
Something like this:
Best regards, Rick C. Hodgin
|
|
feline
Whole Tomato Software
United Kingdom
19021 Posts |
Posted - Dec 12 2016 : 10:43:09 AM
|
I am not sure how or why this would help. What are you doing, and working with, that would benefit from this? The single vertical indicator makes sense when you have a maximum line length policy, but this only needs the one indicator. |
zen is the art of being at one with the two'ness |
|
|
foxmuldr
Tomato Guru
USA
414 Posts |
Posted - Dec 12 2016 : 3:18:04 PM
|
quote: Originally posted by feline
I am not sure how or why this would help. What are you doing, and working with, that would benefit from this? The single vertical indicator makes sense when you have a maximum line length policy, but this only needs the one indicator.
I have dyslexia and align things vertically in my code so a different part of my brain (a part that doesn't have to read content to decipher things) is responsible for breaking things out for me.
A common example is:
| | |
|type |function_name |(int param1, int param2, ...);
| | |
Another is:
struct SWhatever
{
| | |
|type |name; |// Comment
| | |
};
Best regards, Rick C. Hodgin
|
|
|
feline
Whole Tomato Software
United Kingdom
19021 Posts |
Posted - Dec 13 2016 : 3:25:03 PM
|
Have you considered using an IDE macro or code formatting tool, to align your code like this, after you have edited it?
In VS2010, under:
Tools menu -> Macros -> Macros IDE...
and look in the VSEditor file, and there is a sub called LineEmUp(), which is designed to do exactly this sort of thing.
You can also use VA Snippets to insert blocks of code that already have the desired formatting alignment, helping. |
zen is the art of being at one with the two'ness |
|
|
foxmuldr
Tomato Guru
USA
414 Posts |
Posted - Dec 13 2016 : 5:18:59 PM
|
quote: Originally posted by feline
Have you considered using an IDE macro or code formatting tool, to align your code like this, after you have edited it?
In VS2010, under:
Tools menu -> Macros -> Macros IDE...
and look in the VSEditor file, and there is a sub called LineEmUp(), which is designed to do exactly this sort of thing.
You can also use VA Snippets to insert blocks of code that already have the desired formatting alignment, helping.
I have used macro tools before. I still use them for some things. I would prefer to see the visual cues because then they're there giving my mind geometry to work with while developing.
Best regards, Rick C. Hodgin
|
|
|
feline
Whole Tomato Software
United Kingdom
19021 Posts |
Posted - Dec 14 2016 : 12:41:40 PM
|
You could try doing a horizontal split in the editor, so you have the top / bottom of the file visible, with marker points inserted there, to help you keep aligned.
Alternatively, a search of the Visual Studio gallery turned up "Editor Guidelines"
https://marketplace.visualstudio.com/items?itemName=PaulHarrington.EditorGuidelines
which seems designed to add exactly what you are looking for. |
zen is the art of being at one with the two'ness |
|
|
foxmuldr
Tomato Guru
USA
414 Posts |
Posted - Dec 14 2016 : 1:19:40 PM
|
quote: Originally posted by feline Alternatively, a search of the Visual Studio gallery turned up "Editor Guidelines" https://marketplace.visualstudio.com/items?itemName=PaulHarrington.EditorGuidelines which seems designed to add exactly what you are looking for.
Yes. It's pretty much exactly what I'm looking for. It doesn't work for VS2008 and earlier though.
quote: feline: "I am not sure how or why this would help."
94,385 installs in the 2012 and later version. 52,632 installs in the 2010 version.
Seems to be a popular feature. That many installs total would place it on page 2 of the free extensions available.
It doesn't work in VS2008 and before. There is a manual registry workaround: https://blogs.msdn.microsoft.com/saraford/2004/11/15/guidelines-a-hidden-feature-for-the-visual-studio-editor/
Would still prefer to have this integrated into VAX. You already have logic to draw the one line. How much more difficult to add more?
Best regards, Rick C. Hodgin
|
Edited by - foxmuldr on Dec 14 2016 1:19:53 PM |
|
|
foxmuldr
Tomato Guru
USA
414 Posts |
Posted - Dec 14 2016 : 1:24:49 PM
|
quote: Originally posted by foxmuldr
quote: Originally posted by feline Alternatively, a search of the Visual Studio gallery turned up "Editor Guidelines" https://marketplace.visualstudio.com/items?itemName=PaulHarrington.EditorGuidelines which seems designed to add exactly what you are looking for.
Yes. It's pretty much exactly what I'm looking for. It doesn't work for VS2008 and earlier though.
quote: feline: "I am not sure how or why this would help."
94,385 installs in the 2012 and later version. 52,632 installs in the 2010 version.
Seems to be a popular feature. That many installs total would place it on page 2 of the free extensions available.
It doesn't work in VS2008 and before. There is a manual registry workaround: https://blogs.msdn.microsoft.com/saraford/2004/11/15/guidelines-a-hidden-feature-for-the-visual-studio-editor/
Would still prefer to have this integrated into VAX. You already have logic to draw the one line. How much more difficult to add more?
UPDATE: The manual registry workaround works perfectly in VS2008. I used "RGB(192,192,255) 4, 16, 32, 68" for my files, and it places and highlights them beautifully. In order to get it to work in VS2010 you have to add this manual registry entry AND install the extension. I haven't tried it in VS2003 or earlier yet, or VS2012 or later yet.
UPDATE 2: One downside is these vertical lines show up also in the Code Definition Window, and not just in the editor window.
Best regards, Rick C. Hodgin
|
Edited by - foxmuldr on Dec 15 2016 08:58:16 AM |
|
|
feline
Whole Tomato Software
United Kingdom
19021 Posts |
Posted - Dec 15 2016 : 1:32:15 PM
|
While we still support VS2008 and earlier, these IDE's are not that widely used these days, and we are currently working to fully support VS2017. So while adding this may well be a small feature, since you are specifically looking for support in VS2008 and earlier, sadly this is unlikely to happen.
These IDE's require a different way of interacting with the editor, compared to VS2010 and above, so adding this in these IDE's would not even automatically provide this in all IDE's. Hopefully the registry key work around is working well enough for you. |
zen is the art of being at one with the two'ness |
|
|
foxmuldr
Tomato Guru
USA
414 Posts |
Posted - Dec 16 2016 : 11:19:39 AM
|
quote: Originally posted by feline
While we still support VS2008 and earlier, these IDE's are not that widely used these days, and we are currently working to fully support VS2017. So while adding this may well be a small feature, since you are specifically looking for support in VS2008 and earlier, sadly this is unlikely to happen.
These IDE's require a different way of interacting with the editor, compared to VS2010 and above, so adding this in these IDE's would not even automatically provide this in all IDE's. Hopefully the registry key work around is working well enough for you.
I've offered before to help Whole Tomato Software make changes like this. I would do it for free, under NDA, and for these express purposes of adding the features I'd like that I've been told won't be added, and also even adding some for other people as time allows.
You already have code which draws the line somewhere. The change required would be along these lines:
// Old code:
if (vertical_line_checkbox)
draw_line(..UI parameters..);
// New code:
for (int i = 0; i < 4; i++)
{
if (vertical_line_checkbox[i])
draw_line(..i's UI parameters..);
}
// You could also do it like this:
if (vertical_line_checkbox1) draw_line(..UI 1's parameters..);
if (vertical_line_checkbox2) draw_line(..UI 2's parameters..);
if (vertical_line_checkbox3) draw_line(..UI 3's parameters..);
if (vertical_line_checkbox4) draw_line(..UI 4's parameters..);
I realize it's a low priority. It would be very nice to have the vertical lines only appear in the editor window as VAX shows them today, and not also in the Code Definition window as this registry key work around operates.
Best regards, Rick C. Hodgin
|
|
|
feline
Whole Tomato Software
United Kingdom
19021 Posts |
Posted - Dec 19 2016 : 07:56:30 AM
|
We appreciate the offer, but sadly things are not always this simple. In an ideal world, the code would be as simple as you suggest. But remember different IDE's need to be handled differently. Also, since we are working behind the IDE's back, the same drawing often has to happen in more than one place.
This is before we start considering interaction problems, or breaking something else while making a change. Working around the IDE is not as easy as it seems.
For the registry lines, and the code definition window, are you mainly using this for your own code, or for the Win32 API, or some other 3rd party library? I would have thought you would want these lines if you were looking at the definitions of your own code. |
zen is the art of being at one with the two'ness |
|
|
foxmuldr
Tomato Guru
USA
414 Posts |
Posted - Dec 19 2016 : 09:14:45 AM
|
quote: Originally posted by feline
We appreciate the offer, but sadly things are not always this simple. In an ideal world, the code would be as simple as you suggest. But remember different IDE's need to be handled differently. Also, since we are working behind the IDE's back, the same drawing often has to happen in more than one place.
This is before we start considering interaction problems, or breaking something else while making a change. Working around the IDE is not as easy as it seems.
For the registry lines, and the code definition window, are you mainly using this for your own code, or for the Win32 API, or some other 3rd party library? I would have thought you would want these lines if you were looking at the definitions of your own code.
Thank you for your assistance, feline. Your help is appreciated.
Best regards, Rick C. Hodgin
|
|
|
|
Topic |
|
|
|