Indent guide tool-tip suggestion

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Indent guide tool-tip suggestion

WingIDE - User mailing list
... while I'm on the subject of the indent guides...

I think it would be quite useful if there was an option such that floating the mouse over an indent guide would show a tooltip containing the statement that this indent level starts with.

In deeply nested code, that would help avoid adding code at the wrong indent level, and would also help while just reading the code to determine which code is nested within what.

It would take the place of the curly-brace-pair highlighting that IDEs have for brace-oriented languages, though of course python's required indentation itself already contributes some readability.

The tooltip could perhaps be suppressed if the start of the indent region was within the display and thus already visible.






_________________________________________________
Wing Python IDE users list
http://wingware.com/lists/wingide
Reply | Threaded
Open this post in threaded view
|

Re: Indent guide tool-tip suggestion

WingIDE - User mailing list
Graham Wideman via wingide-users wrote:
> I think it would be quite useful if there was an option such that floating the mouse over an indent guide would show a tooltip containing the statement that this indent level starts with.
>
> In deeply nested code, that would help avoid adding code at the wrong indent level, and would also help while just reading the code to determine which code is nested within what.
>
> It would take the place of the curly-brace-pair highlighting that IDEs have for brace-oriented languages, though of course python's required indentation itself already contributes some readability.
>
> The tooltip could perhaps be suppressed if the start of the indent region was within the display and thus already visible.

Thanks for the suggestion.  I'll add this as a feature request.

One thing to note: If blocks get too long it's often an indication that
code should be split up into functions or methods, to make it more
readable and easier to change over time.  Of course sometimes it's
unavoidable or can't be changed easily, and I think the idea of tooltips
is a good one.

Thanks,

--

Stephan Deibel
Wing Python IDE | The Intelligent Development Environment for Python



_________________________________________________
Wing Python IDE users list
http://wingware.com/lists/wingide
Reply | Threaded
Open this post in threaded view
|

Re: Indent guide tool-tip suggestion

WingIDE - User mailing list
Thanks for considering the tool-tip suggestion.

On this:

> One thing to note: If blocks get too long it's often
> an indication that code should be split up into functions or methods,

Hahaha, I was pretty sure _someone_ would jump in with that comment, to the point that I even wrote in my original message "No doubt purists will advise against long blocks and deep indentation..." etc, but deleted it, feeling bad about pre-berating my fellow humans. :-)


At 4/9/2019 04:45 AM, Wingware Support wrote:

>Graham Wideman via wingide-users wrote:
>>I think it would be quite useful if there was an option such that floating the mouse over an indent guide would show a tooltip containing the statement that this indent level starts with.
>>
>>In deeply nested code, that would help avoid adding code at the wrong indent level, and would also help while just reading the code to determine which code is nested within what.
>>
>>It would take the place of the curly-brace-pair highlighting that IDEs have for brace-oriented languages, though of course python's required indentation itself already contributes some readability.
>>
>>The tooltip could perhaps be suppressed if the start of the indent region was within the display and thus already visible.
>
>Thanks for the suggestion.  I'll add this as a feature request.
>
>One thing to note: If blocks get too long it's often an indication that code should be split up into functions or methods, to make it more readable and easier to change over time.  Of course sometimes it's unavoidable or can't be changed easily, and I think the idea of tooltips is a good one.
>
>Thanks,
>
>--
>
>Stephan Deibel
>Wing Python IDE | The Intelligent Development Environment for Python
>
>

_________________________________________________
Wing Python IDE users list
http://wingware.com/lists/wingide