Set Atom cursor to font size, not line height


I’m new in using this wonderfull text editor. I’m really happy with it! :smiley:

By the way, i have setup custom line height (3) and my font size is set at 16. But, my cursor is always following line height size, how can I make it to follow my font size?

If you still confused what I mean, please check this pic

Thanks… :+1:


Try this in ~/.atom/styles.less:

.editor:not(.mini) .cursor {
	height: 16px !important;
	margin-top: 16px;


whoaa… thats work. But it looks weird when I zoom my font using Command-+. What should I do? Is it possible to make it dynamically resize when I resize my font size?


You could try to use em for font sizing, that way it should scale correctly.


I’m not sure. The problem is the font size is set programmatically and isn’t available to styles :frowning:

Edit: Using ems seems to work pretty well.

.editor:not(.mini) .cursor {
	height: 1em !important;
	margin-top: 1em;


Man, this works. Thanks :wink: