Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Your init script
- #
- # Atom will evaluate this file each time a new window is opened. It is run
- # after packages are loaded/activated and after the previous editor state
- # has been restored.
- #
- # An example hack to make opened Markdown files always be soft wrapped:
- #
- # path = require 'path'
- #
- # atom.workspaceView.eachEditorView (editorView) ->
- # editor = editorView.getEditor()
- # if path.extname(editor.getPath()) is '.md'
- # editor.setSoftWrap(true)
- atom.commands.add 'atom-text-editor', 'custom:copy-paste-line', ->
- editor = atom.views.getView(atom.workspace.getActiveTextEditor())
- return unless editor
- atom.commands.dispatch(editor, 'editor:select-line')
- atom.commands.dispatch(editor, 'core:copy')
- atom.commands.dispatch(editor, 'core:paste')
- atom.commands.dispatch(editor, 'core:paste')
- atom.commands.dispatch(editor, 'core:move-up')
- atom.commands.add 'atom-text-editor', 'custom:copy-comment-paste-line', ->
- editor = atom.views.getView(atom.workspace.getActiveTextEditor())
- return unless editor
- atom.commands.dispatch(editor, 'editor:select-line')
- atom.commands.dispatch(editor, 'core:copy')
- atom.commands.dispatch(editor, 'core:paste')
- atom.commands.dispatch(editor, 'core:move-up')
- atom.commands.dispatch(editor, 'editor:toggle-line-comments')
- atom.commands.dispatch(editor, 'core:move-down')
- atom.commands.dispatch(editor, 'core:paste')
- atom.commands.dispatch(editor, 'core:move-up')
- atom.commands.add 'atom-text-editor', 'custom:lint-fix', ->
- editor = atom.views.getView(atom.workspace.getActiveTextEditor())
- return unless editor
- atom.commands.dispatch(editor, 'core:save')
- atom.commands.dispatch(editor, 'linter-eslint:fix-file')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement