Created
August 13, 2015 20:53
-
-
Save caiodv/a79cad0e0ab3d736afb8 to your computer and use it in GitHub Desktop.
Custom command to log a selected text in Atom.io (must be included in the init.coffee file)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
atom.commands.add 'atom-workspace', 'custom:select_log', -> | |
editor = atom.workspace.getActiveTextEditor() | |
text = editor.getSelectedText() | |
editor.moveToEndOfLine() | |
editor.insertText("\nconsole.log('#{text}:', #{text})") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment