Advertisement
Guest User

Untitled

a guest
Mar 29th, 2017
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.65 KB | None | 0 0
  1. # Your init script
  2. #
  3. # Atom will evaluate this file each time a new window is opened. It is run
  4. # after packages are loaded/activated and after the previous editor state
  5. # has been restored.
  6. #
  7. # An example hack to make opened Markdown files always be soft wrapped:
  8. #
  9. # path = require 'path'
  10. #
  11. # atom.workspaceView.eachEditorView (editorView) ->
  12. # editor = editorView.getEditor()
  13. # if path.extname(editor.getPath()) is '.md'
  14. # editor.setSoftWrap(true)
  15.  
  16. atom.commands.add 'atom-text-editor', 'custom:copy-paste-line', ->
  17. editor = atom.views.getView(atom.workspace.getActiveTextEditor())
  18. return unless editor
  19. atom.commands.dispatch(editor, 'editor:select-line')
  20. atom.commands.dispatch(editor, 'core:copy')
  21. atom.commands.dispatch(editor, 'core:paste')
  22. atom.commands.dispatch(editor, 'core:paste')
  23. atom.commands.dispatch(editor, 'core:move-up')
  24.  
  25. atom.commands.add 'atom-text-editor', 'custom:copy-comment-paste-line', ->
  26. editor = atom.views.getView(atom.workspace.getActiveTextEditor())
  27. return unless editor
  28. atom.commands.dispatch(editor, 'editor:select-line')
  29. atom.commands.dispatch(editor, 'core:copy')
  30. atom.commands.dispatch(editor, 'core:paste')
  31. atom.commands.dispatch(editor, 'core:move-up')
  32. atom.commands.dispatch(editor, 'editor:toggle-line-comments')
  33. atom.commands.dispatch(editor, 'core:move-down')
  34. atom.commands.dispatch(editor, 'core:paste')
  35. atom.commands.dispatch(editor, 'core:move-up')
  36.  
  37. atom.commands.add 'atom-text-editor', 'custom:lint-fix', ->
  38. editor = atom.views.getView(atom.workspace.getActiveTextEditor())
  39. return unless editor
  40. atom.commands.dispatch(editor, 'core:save')
  41. atom.commands.dispatch(editor, 'linter-eslint:fix-file')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement