Blinking Cursor


#1

Is there a way to turn off the blinking cursor? A blinking cursor drives me nuts and I always turn it off if I can.


Blinking cursor by CSS Animation
How to stop the blinking of cursor?
#2

You can do this by editing your ~/.atom/stylesheet.css file (click Atom > Open Your Stylesheet). Then add this:

.editor.is-focused .cursor.blink-off {
  visibility: visible;
}

Press save and you should see the cursor stop blinking.

Edit: @mkleehammer pointed out that the selector needed to be more specific.


Caret blinks during typing
React Editor does not respect cursor settings
#3

That is really nice thanks.


#5

Any hints on how to control the blink frequency? The default blink rate is faster than OSX default by just enough that it drives me absolutely nuts.


#6

So, figured it out:
The cursor blink period is controlled by a hard-coded value in Resources/app/src/cursor-view.js inside the app package (right click Atom.app, ‘Show Package Contents’).

The culprit is on line 27:

CursorView.blinkPeriod = 800;

(default blink rate on OSX is 1000ms)

I’m currently digging around in the atom.config stuff to see if there’s a good way to set this in config.cson…

Update: As far as I can tell, there’s no way to set this via config. Editing cursor-view.js with your desired value and restarting Atom works, though.


How to set cursorBlinkPeriod in new react.js editor
#7

Somewhat question related: Is there anyway to instead make the cursor a square, like in vim when in the command line?


#8

#9

Is there any way to blink smoothly? As it done in sublime’s "caret_style": "phase"? (see #1 here)


#10

Yep! You can do it with css transitions: http://qrohlf.com/posts/atom-initial-impressions/


#11

This stopped working recently, after the switch to the React editor I think. Just tested again on 0.120 OS X. Any ideas?


#12

I believe the solution is here:


#13

That discusses changing the blink period, but I couldn’t find a number to turn it off. However, I dug through the Atom code and discovered that the classes may have changed. This works:

.editor.is-focused .cursors.blink-off .cursor {
  visibility: visible;
}

#14

None of the CSS approaches suggested here work for me in stopping the cursor from blinking, in the latest build.


#15

I got it to work like this:

.editor-contents.is-focused .cursors.blink-off .cursor {
   opacity: 100;
}

The visibility: visible suggestion doesn’t work.

But maybe ideally you’d stop the editor from inserting and removing the .blink-off class on an interval.


#16

All the previous suggestions didn’t work. This seems to work:

atom-text-editor::shadow .cursors .cursor {
  opacity: 100;
}

I found the snippet in the README of the block-cursor package.


#17

It’s actually

atom-text-editor::shadow .cursors.no-blink .cursor {
  opacity: 1;
}

that disables the cursor blinking


#18

This doesn’t doesn’t disable cursor blinking in Version 0.188.0.


#19

This is what made it work for me using Atom v0.189.0-ca39bde:

atom-text-editor::shadow .cursors .cursor {
  opacity: 1;
}

#20

Just tested it, and @leedohm’s suggestion should work in v0.188.0. Are you by any chance using packages that alter the cursor?


#21

It could also be the syntax theme you’re using. What syntax theme do you use?