# Your keymap # # Atom keymaps work similarly to style sheets. Just as style sheets use # selectors to apply styles to elements, Atom keymaps use selectors to associate # keystrokes with events in specific contexts. Unlike style sheets however, # each selector can only be declared once. # # You can create a new keybinding in this file by typing "key" and then hitting # tab. # # Here's an example taken from Atom's built-in keymap: # # 'atom-text-editor': # 'enter': 'editor:newline' # # 'atom-workspace': # 'ctrl-shift-p': 'core:move-up' # 'ctrl-p': 'core:move-down' # # You can find more information about keymaps in these guides: # * http://flight-manual.atom.io/using-atom/sections/basic-customization/#customizing-keybindings # * http://flight-manual.atom.io/behind-atom/sections/keymaps-in-depth/ # # If you're having trouble with your keybindings not working, try the # Keybinding Resolver: `Cmd+.` on macOS and `Ctrl+.` on other platforms. See the # Debugging Guide for more information: # * http://flight-manual.atom.io/hacking-atom/sections/debugging/#check-the-keybindings # # This file uses CoffeeScript Object Notation (CSON). # If you are unfamiliar with CSON, you can read more about it in the # 'body': # http://flight-manual.atom.io/using-atom/sections/basic-customization/#configuring-with-cson 'body.platform-darwin, body.platform-win32, body.platform-linux': # disable default ctrl-k keybindings 'ctrl-k ctrl-b': 'unset!' # recreate emacs bindings 'ctrl-g': 'core:cancel' '.platform-win32 atom-text-editor, .platform-linux atom-text-editor': # disable default ctrl-k keybindings 'ctrl-k ctrl-d': 'unset!' 'body': # disable default ctrl-k keybindings 'ctrl-k up': 'unset!' 'ctrl-k down': 'unset!' 'ctrl-k left': 'unset!' 'ctrl-k right': 'unset!' 'ctrl-k ctrl-w': 'unset!' 'ctrl-k alt-ctrl-w': 'unset!' 'ctrl-k ctrl-p': 'unset!' 'ctrl-k ctrl-n': 'unset!' 'ctrl-k ctrl-up': 'unset!' 'ctrl-k ctrl-down': 'unset!' 'ctrl-k ctrl-left': 'unset!' 'ctrl-k ctrl-right': 'unset!' # recreate emacs bindings 'ctrl-x ctrl-l': 'editor:lower-case' 'ctrl-x ctrl-u': 'editor:upper-case' 'ctrl-x h': 'core:select-all' 'alt-x': 'command-palette:toggle' 'ctrl-g': 'core:cancel' 'ctrl-x s': 'window:save-all' 'ctrl-x k': 'core:close' 'ctrl-x ctrl-c': 'core:close' 'ctrl-x ctrl-s': 'core:save' 'ctrl-x 0': 'pane:close' 'ctrl-x 1': 'pane:close-other-items' 'ctrl-x 2': 'pane:split-down' 'ctrl-x 3': 'pane:split-right' 'ctrl-x b': 'fuzzy-finder:toggle-buffer-finder' 'ctrl-x ctrl-f': 'fuzzy-finder:toggle-file-finder' 'ctrl-x o': 'window:focus-next-pane' # file and command palette 'ctrl-q': 'find-and-replace:select-next' 'atom-workspace atom-text-editor': # disable default ctrl-k keybindings "ctrl-k ctrl-u": "unset!" "ctrl-k ctrl-l": "unset!" "atom-workspace atom-text-editor:not([mini])": # disable default ctrl-k keybindings "ctrl-k ctrl-0": "unset!" "ctrl-k ctrl-1": "unset!" "ctrl-k ctrl-2": "unset!" "ctrl-k ctrl-3": "unset!" "ctrl-k ctrl-4": "unset!" "ctrl-k ctrl-5": "unset!" "ctrl-k ctrl-6": "unset!" "ctrl-k ctrl-7": "unset!" "ctrl-k ctrl-8": "unset!" "ctrl-k ctrl-9": "unset!" 'background-tips, .tree-view, atom-text-editor.vim-mode-plus:not(.insert-mode)': # core app stuff 'space f s': 'core:save' 'space b d': 'core:close' # buffer delete 'space b c': 'core:close' # buffer close 'space q q': 'application:quit' 'space a k': 'application:open-your-keymap' 'space a r': 'window:reload' 'space a s': 'application:show-settings' # file and command palette # 'space space': 'easy-motion-redux:words_starting' 'space space' : 'command-palette:toggle' 'space b b' : 'fuzzy-finder:toggle-buffer-finder' 'space b f' : 'find-and-replace:show' 'space g f' : 'fuzzy-finder:toggle-git-status-finder' 'space s a p': 'fuzzy-grep:toggle' 'space s s' : 'fuzzy-grep:toggleLastSearch' 'space f f' : 'fuzzy-finder:toggle-file-finder' # 'space f r' : 'find-and-replace:show' 'space r f' : 'recent-finder:toggle' 'space f y' : 'editor:copy-project-path' # windows/panes 'space 1' : 'window:focus-pane-on-left' 'space 2' : 'window:focus-pane-on-right' 'space b n': 'pane:show-next-item' # 'buffer next' 'space b p': 'pane:show-previous-item' # 'butter preview' 'space w w': 'window:focus-next-pane' 'space w H': 'pane:split-left-and-copy-active-item' 'space w J': 'pane:split-down-and-copy-active-item' 'space w K': 'pane:split-up-and-copy-active-item' 'space w L': 'pane:split-right-and-copy-active-item' 'space w v': 'pane:split-right-and-copy-active-item' 'space w c': 'pane:close' # 'window close' ('vim' window) 'space w k': 'window:focus-pane-above' 'space w j': 'window:focus-pane-below' 'space w h': 'window:focus-pane-on-left' 'space w l': 'window:focus-pane-on-right' 'space w enter': 'vim-mode-plus:maximize-pane' 'space s c': 'window:close' # 'screen close' 'space t t': 'tree-view:toggle' # 'files toggle' 'space p t': 'tree-view:toggle' # 'project toggle' 'space f t': 'tree-view:reveal-active-file' # 'file reveal' # Surround family 'space y s' : 'vim-mode-plus:surround' 'space y s w': 'vim-mode-plus:surround-word' 'space y m s': 'vim-mode-plus:map-surround' 'space d S' : 'vim-mode-plus:delete-surround' 'space d s' : 'vim-mode-plus:delete-surround-any-pair' 'space c S' : 'vim-mode-plus:change-surround' 'space c s' : 'vim-mode-plus:change-surround-any-pair' # git commands 'space g s' : 'git-plus:status' 'space g a' : 'git-plus:add' 'space g b' : 'git-blame:toggle' 'space g c' : 'git-plus:commit' 'space g e' : 'find-and-replace:select-all' 'space g h n': 'git-diff:move-to-next-diff' 'space g h p': 'git-diff:move-to-previous-diff' 'space g h l': 'git-diff:toggle-diff-list' 'space g g' : 'git-plus:menu' 'space g d' : 'git-plus:diff' 'space g t' : 'git-time-machine:toggle' 'space g q' : 'goto-definition:go' # lint / annotations 'space e n' : 'linter:next-error' 'space e p' : 'linter:previous-error' 'space e N' : 'linter:previous-error' 'space e e' : 'linter:lint' # 'space t m f': 'linter:toggle' 'space e t' : 'linter:toggle' # editor view options 'space t n': 'editor:toggle-line-numbers' 'space t i': 'editor:toggle-indent-guide' 'space t w': 'editor:toggle-soft-wrap' 'space t v': 'window:toggle-invisibles' # bookmarks 'space j m': 'bookmarks:toggle-bookmark' 'space j c': 'bookmarks:clear-bookmarks' 'space j n': 'bookmarks:jump-to-next-bookmark' 'space j p': 'bookmarks:jump-to-previous-bookmark' # comments 'g c': 'editor:toggle-line-comments' # jumpy 'space j w': 'jumpy:toggle' # Bindings for 'Narrow' plugin 'atom-text-editor.vim-mode-plus.normal-mode': 'space n l': 'narrow:lines' 'space n f': 'narrow:fold' 'space o': 'narrow:fold' 'space n s c': 'narrow:search-current-project' 'space n s s': 'narrow:search' 'space n c': 'narrow:focus' # 'ctrl-r ctrl-r': 'core:redo' # 'atom-text-editor.vim-mode-plus.insert-mode.autocomplete-active': 'atom-text-editor.vim-mode-plus.insert-mode': # recreate emacs bindings 'ctrl-b': 'core:move-left' 'ctrl-f': 'core:move-right' 'ctrl-n': 'core:move-down' 'ctrl-p': 'core:move-up' 'alt-b': 'editor:move-to-beginning-of-word' 'alt-f': 'editor:move-to-end-of-word' 'alt-e': 'editor:move-to-end-of-word' 'ctrl-a': 'editor:move-to-beginning-of-line' 'ctrl-e': 'editor:move-to-end-of-screen-line' 'alt-m': 'editor:move-to-first-character-of-line' 'ctrl-d': 'core:delete' 'alt-d': 'editor:delete-to-end-of-word' 'alt-backspace': 'editor:delete-to-beginning-of-word' 'ctrl-k': 'editor:delete-to-end-of-line' 'ctrl-/': 'core:undo' 'alt-/': 'core:redo' 'alt-g alt-g': 'go-to-line:toggle' 'alt-w': 'core:copy' 'ctrl-w': 'core:cut' 'ctrl-y': 'core:paste' 'alt-;': 'editor:toggle-line-comments' 'alt-.': 'symbols-view:toggle-file-symbols' 'alt-{': 'editor:move-to-beginning-of-previous-paragraph' 'alt-}': 'editor:move-to-beginning-of-next-paragraph' # 'alt-/': 'autocomplete:toggle' 'alt-<': 'core:move-to-top' 'alt->': 'core:move-to-bottom' 'ctrl-shift-backspace': 'editor:delete-line' 'ctrl-j': 'editor:newline' 'ctrl-t': 'editor:transpose' 'alt-q': 'autoflow:reflow-selection' 'alt-v': 'core:page-up' 'ctrl-v': 'core:page-down' 'ctrl-_': 'core:undo' 'ctrl-r': 'find-and-replace:show' 'ctrl-s': 'find-and-replace:show' # emmet 'ctrl-m': 'emmet:expand-abbreviation' # disabled because the semantics are slightly different than emacs # 'ctrl-l': 'editor:scroll-to-cursor' # 'ctrl-o': 'editor:newline-above' '.command-palette, .fuzzy-finder, .symbols-view, .tool-panel': 'ctrl-n': 'core:move-down' 'ctrl-p': 'core:move-up' 'ctrl-b': 'core:move-left' 'ctrl-f': 'core:move-right' 'alt-b': 'editor:move-to-beginning-of-word' 'alt-f': 'editor:move-to-end-of-word' 'alt-e': 'editor:move-to-end-of-word' 'alt-m': 'editor:move-to-first-character-of-line' 'alt-d': 'editor:delete-to-end-of-word' 'alt-backspace': 'editor:delete-to-beginning-of-word' 'ctrl-k': 'editor:delete-to-end-of-line' 'ctrl-/': 'core:undo' 'alt-/': 'core:redo' 'alt-w': 'core:copy' 'ctrl-w': 'core:cut' 'ctrl-y': 'core:paste' # TODO merge keybinding below to initScript # 'ctrl-a': 'editor:move-to-beginning-of-line' # 'ctrl-e': 'editor:move-to-end-of-screen-line' # 'ctrl-d': 'core:delete'