Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

History plugin: add an option to show/hide line numbers #970

Closed
spyder-bot opened this issue Feb 17, 2015 · 10 comments
Closed

History plugin: add an option to show/hide line numbers #970

spyder-bot opened this issue Feb 17, 2015 · 10 comments

Comments

@spyder-bot
Copy link
Collaborator

From [email protected] on 2012-03-11T00:27:55Z

Enhancement Request

When using Spyder with IPython it is often helpful to make quick macros of code when working on the command line. To do this efficiently, one must know which lines from the history to place in the macro. As I often work with the history visible it would be helpful if there were an option to display the history line numbers in the pane for easy reference.

Spyder 2.1.17
Windows 7 x64

Original issue: http://code.google.com/p/spyderlib/issues/detail?id=970

@spyder-bot
Copy link
Collaborator Author

From pierre.raybaut on 2012-03-18T08:55:30Z

Summary: History plugin: add an option to show/hide line numbers
Labels: -Type-Defect -Priority-Medium Type-Enhancement Priority-Low

@spyder-bot
Copy link
Collaborator Author

From pierre.raybaut on 2012-03-18T08:55:39Z

Labels: Cat-HistoryLog

@spyder-bot
Copy link
Collaborator Author

From pierre.raybaut on 2012-03-18T14:05:22Z

Labels: -Type-Enhancement Type-Enh

@spyder-bot
Copy link
Collaborator Author

From ccordoba12 on 2013-02-13T09:19:28Z

Labels: MS-v2.3

@spyder-bot
Copy link
Collaborator Author

From pierre.raybaut on 2013-05-11T05:51:59Z

Labels: -MS-v2.3 MS-v2.4

@csabella
Copy link
Contributor

Would it be OK for me to work on this issue? I'll try to add tests for history.py at the same time.

@dalthviz
Copy link
Member

Hi @csabella thanks for willing to help! and go ahead! just make sure to take as base of your PR the master branch :)

@rlaverde
Copy link
Member

@csabella Thanks again for contributing to spyder 😄

You need to add a PanelManager and a LineNumberArea panel to it, you could take a look to the CodeEditor code (History shares the same base class with the editor and works somehow similar), If you need help ask us in gitter

@csabella
Copy link
Contributor

I did it a little differently than adding a PanelManager, but it seems to work OK. It already creates an instance of CodeEditor, which has linenumber as a setup argument. Instead of it always being False, it's now controlled by config.

@rlaverde
Copy link
Member

rlaverde commented Sep 29, 2017

I did it a little differently than adding a PanelManager, but it seems to work OK. It already creates an instance of CodeEditor, which has linenumber as a setup argument. Instead of it always being False, it's now controlled by config.

I was wrong, I thought History inherits of TextEditBaseWidget instead of CodeEditor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants