Skip to content

Instantly share code, notes, and snippets.

@sillyslux
Last active March 25, 2016 23:08
Show Gist options
  • Save sillyslux/762509632d47b9f52622 to your computer and use it in GitHub Desktop.
Save sillyslux/762509632d47b9f52622 to your computer and use it in GitHub Desktop.
Atom setup
atom.contextMenu.add
'atom-text-editor': [{
type: 'separator'
},{
label: 'fold all'
command: 'editor:fold-all'
},{
label: 'unfold all'
command: 'editor:unfold-all'
},{
label: 'fold 1'
command: 'editor:fold-at-indent-level-1'
},{
label: 'fold 2'
command: 'editor:fold-at-indent-level-2'
},{
type: 'separator'
}]
atom.commands.add 'atom-text-editor',
'user:copy': (event) ->
currentSelection = atom.workspace.getActiveTextEditor().getSelectedText()
if currentSelection == "" then event.preventDefault() else atom.clipboard.write(currentSelection)
atom.keymaps.add('', {body:{'ctrl-c':'user:copy'}}, 0)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment