best way to create a 2nd line edge

57 views
Skip to first unread message

Felipe Vieira

unread,
Jun 24, 2016, 5:11:39 PM6/24/16
to spyder
Hey guys,

first post on this mailing list.

I'm a long user of spyder and maybe it is time to go one step ahead. Motivated by the line lenght of 72 for docstrings I would like to add the possibility of a 2nd vertical line to spyder ('edge line').

Therefore I would like to have two vertical lines, one at 72 and other at 79.

I'm new to the code and pyqt. I have fiddled with the code for a while but could not do it.

Can any of you point me in the right direction? Is there a special documentation for devs or just 'read the code'?

Thank you and congrats with the amazing software.

Jitse Niesen

unread,
Jun 28, 2016, 2:12:22 PM6/28/16
to spyder
On Friday, 24 June 2016 22:11:39 UTC+1, Felipe Vieira wrote:

I'm a long user of spyder and maybe it is time to go one step ahead. Motivated by the line lenght of 72 for docstrings I would like to add the possibility of a 2nd vertical line to spyder ('edge line').
[...]
Can any of you point me in the right direction? Is there a special documentation for devs or just 'read the code'?

Hello Felipe,

There is no special documentation. I'm afraid you have to work with the code.

Where are you stuck? In case you haven't yet found it, the file you need to look at is spyderlib/widgets/sourcecode/codeeditor.py ; search for "EdgeLine" and "edge_line". I guess at first instance you should duplicate the code for creating an EdgeLine in the CodeEditor class in order to get a second line.

Issues 3064 and 3069 are related so you may also have a look at them.

Good luck!
Jitse

Felipe Vieira

unread,
Jul 1, 2016, 10:27:43 AM7/1/16
to spyder
Jitse,

thanks for your help. I tried a lot of different approaches like creating a new attribute (.column2) and duplicating every command related to edge_line, creating a new class EdgeLine2 among other things. It looks like the setting of new edge lines overrides the previous one.

I stopped looking but may try it again some other time.

: )

Gonzalo Peña-Castellanos

unread,
Oct 12, 2016, 4:22:45 PM10/12/16
to spyder, fmv...@gmail.com
Hi Felipe

Thanks for using Spyder and your interest in developing this feature. This work is already implemented in the following PR
https://github.com/spyder-ide/spyder/pull/3512

Where we are decoupling the editor and making it truly language agnostic.

This will be available for Spyder 4.0 (hopefully by the end of Jully 2017)

Cheers
Reply all
Reply to author
Forward
0 new messages