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

View > Toggle line numbers #1676

Merged
merged 4 commits into from
Aug 16, 2016
Merged

Conversation

gnestor
Copy link
Contributor

@gnestor gnestor commented Aug 12, 2016

Implementation of #1312. I moved the button from the toolbar to the View menu.

demo

Persist the configuration of toggling in nbconfig.
@gnestor
Copy link
Contributor Author

gnestor commented Aug 12, 2016

Added line number config persistence thanks to @Carreau and c040464

@gnestor
Copy link
Contributor Author

gnestor commented Aug 12, 2016

@Carreau I think this is ready to merge if you would like to have the honors...

@minrk minrk added this to the 5.0 milestone Aug 13, 2016
@rgbkrk
Copy link
Member

rgbkrk commented Aug 16, 2016

Wonderful.

@ellisonbg ellisonbg merged commit 6c8d453 into jupyter:master Aug 16, 2016
@ellisonbg
Copy link
Contributor

Merged!

@rgbkrk rgbkrk deleted the toggle-line-numbers branch August 16, 2016 23:33
@minrk minrk mentioned this pull request Sep 12, 2016
@maver1ck
Copy link

Is there an option to make line numbers enabled by default ?

@rgbkrk
Copy link
Member

rgbkrk commented Jun 22, 2017

@maver1ck In your ~/.jupyter/nbconfig/notebook.jsonset:

{
  "Cell": {
    "cm_config": {
      "lineNumbers": true
    }
  }
}

@juhasch
Copy link
Contributor

juhasch commented Jun 22, 2017

Or run this in Python once (use 'CodeCell' if you want line numbers only in code cells):

from notebook.services.config import ConfigManager
c = ConfigManager()
c.update('notebook', {"CodeCell": {"cm_config": {"lineNumbers": True}}})

(Thanks to @takluyver in #2040)

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 6, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants