Skip to content

Instantly share code, notes, and snippets.

@ziazek
Created October 16, 2017 01:59
Show Gist options
  • Save ziazek/9bad1e15bfcaf86fddd9f71c0834bed3 to your computer and use it in GitHub Desktop.
Save ziazek/9bad1e15bfcaf86fddd9f71c0834bed3 to your computer and use it in GitHub Desktop.
Atom keymap
# 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'
'atom-text-editor.vim-mode-plus:not(.insert-mode)':
', . l': 'pane:split-right'
', . j': 'pane:split-down'
', w': 'pane:close'
'-': 'choose-pane:start'
'm m': 'choose-pane:focus-last-focused'
'cmd-shift-enter': 'hey-pane:toggle-focus-of-active-pane'
', j': 'window:focus-pane-below'
', k': 'window:focus-pane-above'
', h': 'window:focus-pane-on-left'
', l': 'window:focus-pane-on-right'
', t': 'tree-view:toggle-focus'
';': 'vim-mode-plus:move-to-previous-fold-start-with-same-indent'
'q': 'vim-mode-plus:move-to-next-fold-start-with-same-indent'
'm k': 'vim-mode-plus:move-to-previous-fold-start'
'n k': 'vim-mode-plus:move-to-previous-fold-end'
'm j': 'vim-mode-plus:move-to-next-fold-start'
'n j': 'vim-mode-plus:move-to-next-fold-end'
'atom-text-editor.vim-mode-plus.insert-mode':
'shift-space': 'core:move-right'
'.markdown-preview':
'-': 'choose-pane:start'
'm m': 'choose-pane:focus-last-focused'
# For tree-view
'.tree-view':
'-': 'choose-pane:start'
'm m': 'choose-pane:focus-last-focused'
# 'esc': 'tree-view: toggle-focus'
# Map '-', so that I can focus last-focused element by typing `-` twice.
'atom-text-editor#choose-pane-editor':
'-': 'choose-pane:last-focused'
# For Emmet expansion in *.html.eex files
'atom-text-editor[data-grammar="text html elixir"]:not([mini]):not(.autocomplete-active)':
'tab': 'emmet:expand-abbreviation-with-tab'
#
# 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
# Atom Flight Manual:
# http://flight-manual.atom.io/using-atom/sections/basic-customization/#_cson
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment