The cursor is meant to tell the user the current location.
The human visual system has a pre-cortical lag of roughly 50-90 ms (read more about P1).
That's how long it takes from something changing on the screen to cause an avalanche of photons to barrel towards your eyeball, be phototransduced and processed by several stages of cells in the retina, finally causing retinal ganglion cells to fire an action potential down their axons through the optic nerve, make its way to a processing relay station called the LGN, with those cells firing action potential down their axons, with those spikes finally ending up in the primary visual cortex.
By ~150 ms, our brains have processed the visual input enough to perform a non- trivial ammount of object recognition.
The default blink rate for CodeMirror is 530ms.
That's as slow as molasses in January!
Say that I've been distracted and looked away from the screen. When I look back at the scree, half of the time it will take 3 times longer for me to get the information that I want ("where's my cursor") than if that cursor was clearly visible at all times. Now it's not always that bad, because sometimes my gaze will land on the screen and even though the cursor isn't visible, it appears in a few milliseconds, and so it takes just as long as if the cursor was there the whole time. But if I happen to be particularly unlucky (there's a reason I don't gamble), it can take 6 times longer.
Try it out
Make the change stick
IPython has a notion of profiles to allow for different kinds of configurations.
If this is news to you, you've probably just been using the
and not known it. In the shell, run the
ipython profile create command to be
sure (don't worry, if you alreay have a profile, this won't overwrite it). Now
ipython locate profile will tell you the directory which contains all of the
configuration for the
!ipython profile create
!ipython locate profile
x = !ipython locate profile
db/ history.sqlite history.sqlite-journal ipython_config.py ipython_nbconvert_config.py ipython_notebook_config.py log/ pid/ security/ startup/ static/
There's a lot of stuff there, but we just need to add our one line to the end of the file in
!echo "codemirror.defaults.cursorblinkrate=0" >> custom.js
"I want it all and I want it now!"
You say you don't want to save your current notebook and reload it to get the updated CodeMirror settings? You just want all cells in the current notebook to change their behavior? Well, OK, Freddie:
I hope you enjoyed this little IPython customization detour. If you want more information about how to get rid of blinking in other programs you use every day, here is an invaluable resource on that matter.
Remember, blinking in user interfaces is bad, but blinking in vision is very important.