Notebook: Support for a non-blinking cursor

Created on 27 Jun 2016  路  7Comments  路  Source: jupyter/notebook

Jupyter has a blinking cursor. Ideally, this should be based on my OS preferences.

At least on my Fedora system, Firefox seems learn this from Gnome.

Does the browser expose this? Can Jupyter get this property and use it?

(Apologies if this is a dupe, didn't see it...)

Most helpful comment

You can add "CodeCell": { "cm_config": {"cursorBlinkRate": 0}} inside .jupyter/nbconfig/notebook.json and restart jupyter notebook for cursor to stop blinking:

A piece of my config:

{
  ...
  "CodeCell": {
    "cm_config": {
      "autoCloseBrackets": false,
      "cursorBlinkRate": 0
    }
  },
  ...
}

All 7 comments

I doubt this is something browsers expose. Our text editor component is CodeMirror. If that exposes a way to control cursor-blinkitude, we could add a separate setting for it.

yes, codemirror as a cursorblinkyness-like option.

You can set hat with though your custom.js likely.

I certainly can't work with a blinking cursor so hope no blinking becomes a configuration option.

I really like jupyter notebook, big thanks to the developers. However, I too am afflicted by the cursor blink phenotype. Fortunately someone has explained a solution on their blog:
http://pirsquared.org/blog/notebook-blink.html

At least the last part apparently worked for me - i.e. pasting and running the following javascript code in one of the current notebook's cells:

%%javascript
var rate = 0;
// apply setting to  all current CodeMirror instances
IPython.notebook.get_cells().map(
    function(c) {  return c.code_mirror.options.cursorBlinkRate=rate;  }
);

// make sure new CodeMirror instance also use this setting
CodeMirror.defaults.cursorBlinkRate=rate;

You can add "CodeCell": { "cm_config": {"cursorBlinkRate": 0}} inside .jupyter/nbconfig/notebook.json and restart jupyter notebook for cursor to stop blinking:

A piece of my config:

{
  ...
  "CodeCell": {
    "cm_config": {
      "autoCloseBrackets": false,
      "cursorBlinkRate": 0
    }
  },
  ...
}

@SergeyDidenko
Seem to be a great solution but I cannot find .jupyter/nbconfig/notebook.json for Anaconda distribution.

Just another use case for this - I work remote using anydesk and the inherent latency in a remote session makes the blinking cursor quite wonky and hard to follow

Was this page helpful?
0 / 5 - 0 ratings