googlecolab / colabtools

Python libraries for Google Colaboratory
Apache License 2.0
2.16k stars 700 forks source link

How to disable blinking cursor in a cell? #987

Open al-yakubovich opened 4 years ago

al-yakubovich commented 4 years ago

It is very distractive.

For jupyter notebook I use the following script:

%%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;
tnovikoff commented 4 years ago

Thank you for the feature request. Tracking internally at b/149117189.

timmb commented 4 years ago

Also can't deal with a blinking cursor.

@al-yakubovich I have found a workaround for this. Using Firefox with the Stylus extension, make a custom CSS rule targeting research.google.com with this:

.focused .cursor {
    visibility: inherit !important;
    background-color: #ff009d !important;
}

(Colour change is optional but helps you see the cursor.)

david-charles-king commented 2 years ago

I made a Stylish theme to implement this in Chrome.

I removed the colour change of the cursor.

Thanks @timmb I borrowed your code!