Skip to content

Instantly share code, notes, and snippets.

@cjus
Created February 15, 2016 17:23
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cjus/54bca2152e5aaf87d9dc to your computer and use it in GitHub Desktop.
Save cjus/54bca2152e5aaf87d9dc to your computer and use it in GitHub Desktop.
At semi-colon to line in Atom

While working in Javascipt we need to quickly append semi-colons to most lines. These settings modify Atom to map command-; to add a semi-colon to the end of the current line.

In init.coffee:

atom.commands.add 'atom-text-editor', 'custom:semicolonize', ->
  editor = @getModel()
  editor.moveToEndOfLine()
  editor.insertText(';')

In keymap.cson

'atom-workspace atom-text-editor':
  'cmd-;': 'custom:semicolonize'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment