Skip to content

Instantly share code, notes, and snippets.

@webarthur
Created February 23, 2017 20:09
Show Gist options
  • Save webarthur/64828c092ee995f0a1ffbd55c027ebf0 to your computer and use it in GitHub Desktop.
Save webarthur/64828c092ee995f0a1ffbd55c027ebf0 to your computer and use it in GitHub Desktop.
Atom author comment (Ctrl + Shift + E)
# init.coffee
atom.commands.add 'atom-text-editor', 'webarthur:comment', ->
return unless editor = atom.workspace.getActiveTextEditor()
selection = editor.getLastSelection()
selection.insertText('// Arthur Araújo ' + new Date().toLocaleDateString() + ' ')
# keymap.cson
'atom-workspace atom-text-editor:not([mini])':
'ctrl-e': 'editor:toggle-line-comments'
'ctrl-shift-e': 'webarthur:comment'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment