3

I'm using jupyter-vim-binding. I can toggle line numbers with C-o, Shift-L. How can I enable line number upon start-up (i.e. when creating a new code cell)? I'm aware of the customization js file but I'm afraid of breaking the current setup, so would like answers from more seasoned users.

tnabdb
  • 517
  • 2
  • 8
  • 22

1 Answers1

3

The Jupyter Notebook docs show an example to change the default indentation of code cells. You can follow the instructions on that page, but instead pass the lineNumbers argument:

var cell = Jupyter.notebook.get_selected_cell();
var config = cell.config;
var patch = {
    CodeCell:{
        cm_config:{lineNumbers:true}
    }
}
config.update(patch)

You should still be able to toggle line-numbers with the jupyter-vim-binding shortcut.

zarak
  • 2,933
  • 3
  • 23
  • 29