Search code examples
python-3.xpep8jupyter-notebook

ipython3 notebook vertical margin/marker line at 80 characters


  1. How to make ipython3 notebook show a vertical margin/marker line at 80 characters ?
  2. How to get i-bar location in ipython3 notebook ? (e.g. line 30 character 56)

These features assist in writing codes complying with PEP8. These features are available in Spyder.

Update 1: What I want is a vertical margin/marker line as shown in modified screenshot of the spyder. The other feature I am looking forward to is identification of location of i-bar. These two features are marked in the attached picture.

A similar solution is also okay. Modified screenshot of spyder

update 2: I did not find anything like this on the internet.

update 3: Jupyter Lab has a ruler setting (Sept 2020), details provided in the answer


Solution

  • Using jupyterlab version 3.3.0 the Advanced Settings Editor (Shortcut: Ctrl+,) has got a nice GUI and a ruler can be set easily under the header "Rulers".

    Just click on "Add" and set the wanted number. The changes are applied immediately.

    add ruler