Skip to content

Instantly share code, notes, and snippets.

@gdm85
Last active November 13, 2016 07:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gdm85/ce95bc6677f2fa2696bfef9f121b1d4c to your computer and use it in GitHub Desktop.
Save gdm85/ce95bc6677f2fa2696bfef9f121b1d4c to your computer and use it in GitHub Desktop.
D-Lang IDE with Atom: init.coffee
## main article: https://medium.com/@gdm85/atom-editor-building-with-f5-edc228034ec0
atom.commands.add 'atom-text-editor', 'dlang:save-run', ->
editor = atom.workspace.getActiveTextEditor()
editor.save()
atom.commands.dispatch(atom.views.getView(editor), 'atom-shell-commands:dfmt-run')
atom.commands.add 'atom-text-editor', 'dlang:save-build', ->
editor = atom.workspace.getActiveTextEditor()
editor.save()
atom.commands.dispatch(atom.views.getView(editor), 'atom-shell-commands:dfmt-build')
atom.commands.add 'atom-text-editor', 'custom:cut-line', ->
editor = atom.workspace.getActiveTextEditor()
editor.selectLinesContainingCursors()
editor.cutSelectedText()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment