How to stop the blinking of cursor?


#1

Hello. I have found this. I have linux elementary (in every aspect till now was the same as Ubuntu) i have gone to Edit -> Open your Stylesheet and after i pasted

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

my file looks like:

/*
 * Your Stylesheet
 *
 * This stylesheet is loaded when Atom starts up and is reloaded automatically
 * when it is changed and saved.
 *
 * Add your own CSS or Less to fully customize Atom.
 * If you are unfamiliar with Less, you can read more about it here:
 * http://lesscss.org
 */
 .editor.is-focused .cursor.blink-off {
     visibility: visible;
 }

/*
 * Examples
 * (To see them, uncomment and save)
 */

// style the background color of the tree view
.tree-view {
  // background-color: whitesmoke;
}

// style the background and foreground colors on the atom-text-editor-element itself
atom-text-editor {
  // color: white;
  // background-color: hsl(180, 24%, 12%);
}

// To style other content in the text editor's shadow DOM, use the ::shadow expression
atom-text-editor::shadow .cursor {
  // border-color: red;

}
though the cursor still blinks. Any ideas?


#2

Maybe this package ?

Or for the css solution there seems to be a few variant.
The last one being

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

#3

Author of the cursor-blink-interval package here. If you just want to disable cursor blinking entirely, I would suggest you go the CSS route instead of using the cursor-blink-interval package. While the package can disable cursor blinking (actually it sets the blinking interval to ~50 days :stuck_out_tongue:) it uses some private APIs that may change anytime, breaking the package. The snippet by @jeancroy will just work :slight_smile: (unless, off course, in the future another property than opacity is used to hide the cursor, but I can’t see why that would happen)


#4

I kinda like the idea of properly fixing the blinking instead of switching between two identical UI state.
But I hear you on the probability that a monkey patch break.

BTW for the 50 days thingy. Does it stay on for 50 days then OFF for 50 days ?


#5

Yeah that’s what it does :stuck_out_tongue: There’s no way to consistently disable cursor blinking, because Atom re-enables it at certain events. At least that’s what it did when I last updated the package, a long time ago. Luckily, when you focus another editor, the cursor will start in the blink-on state and is visible again for another 50 days. So you’d have to have one single editor focused for 50 days for the cursor to disappear…

Edit: Oops, I just did the calculations again, and it’s “just” 25 days. That is the max value for chrome’s setInterval. Atom went crazy when trying to set an interval at a value > (2^31) - 1 (milliseconds).


#7

Exactly what i wanted :slight_smile:


#8

It’s been nearly 2 years since this discussion was created, and there is still no obvious way to get rid of that pesky cursor blink! None of the advice here is working in Atom 1.11.2, and this is the only topic I can find…

Does anyone know a working method to get rid of the blinking cursor?


#9

It looks like this works:

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

I personally prefer this version that makes the cursor pulse instead of blink:

atom-text-editor, atom-text-editor::shadow {
  .cursor {
    transition: opacity 0.5s;
  }
}

#10

I like Block Cursor. I set cursor background of ‘blink off’ the same as ‘blink on’ . It’s blinking. But you don’t even realize it.


#11

And here it is a totally unnecessary color changing cursor :stuck_out_tongue:


atom-text-editor::shadow .cursor {
border-color: yellow;
transition: border-color 1s;
}

atom-text-editor, atom-text-editor::shadow {
.cursors.blink-off .cursor {
opacity: 1;
border-color: red;
}
}

#12

to stop Atom cursor from blinking, write in ~/.atom/style.less:

atom-text-editor .cursor
  { opacity: 1 !important }

optionally, to make it to block:

atom-text-editor .cursor
  { border-width: 1vh }

#13

Done. Thank you!