A better Atom
TextEditor#setText()
that preserves cursor/scroll position and selections
$ npm install --save atom-set-text
/** @babel */
import setText from 'atom-set-text';
setText('new text');
Type: string
Text you want to set in the editor.
Default: atom.workspace.getActiveTextEditor()
Editor to set the text in.
MIT © Sindre Sorhus