Skip to content

Instantly share code, notes, and snippets.

@monners
Last active September 28, 2017 21:06
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save monners/eae81e8f98806770f6e8 to your computer and use it in GitHub Desktop.
Save monners/eae81e8f98806770f6e8 to your computer and use it in GitHub Desktop.
Atom keymap.cson
# 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.
#
# 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:
# * https://atom.io/docs/latest/using-atom-basic-customization#customizing-key-bindings
# * https://atom.io/docs/latest/behind-atom-keymaps-in-depth
#
# This file uses CoffeeScript Object Notation (CSON).
# If you are unfamiliar with CSON, you can read more about it here:
# https://github.com/bevry/cson#what-is-cson
# Better cursor navigation shortcuts
# Pro-tip: rebind Capslock to be ctrl for best results
'.platform-darwin atom-text-editor':
'ctrl-k': 'editor:move-to-end-of-word',
'ctrl-shift-k': 'editor:select-to-end-of-word'
'ctrl-j': 'editor:move-to-beginning-of-word',
'ctrl-shift-j': 'editor:select-to-beginning-of-word',
'ctrl-e': 'editor:move-to-end-of-line',
'alt-cmd-down': 'editor:move-line-down',
'alt-cmd-up': 'editor:move-line-up',
# Change Grammar shortcut to something less stupid
'cmd-shift-P': 'grammar-selector:show',
# Split pane saner binding
'cmd-alt-l': 'pane:split-right',
'cmd-alt-j': 'pane:split-left',
'cmd-alt-k': 'pane:split-down',
'cmd-alt-i': 'pane:split-up',
'cmd-b': 'pane:close'
# Override autocomplete-plus's annoying use of 'enter'
'.platform-darwin atom-text-editor.autocomplete-active':
'tab': 'autocomplete-plus:confirm',
'enter': 'editor:newline'
# Emmet syntax override
'.platform-darwin atom-text-editor[data-grammar="text html mustache"]:not([mini])':
'tab': 'emmet:expand-abbreviation-with-tab',
'ctrl-e': 'editor:move-to-end-of-line'
# Rebind command palette shortcut
'.platform-darwin, .platform-darwin .command-palette atom-text-editor':
'cmd-p': 'command-palette:toggle',
# Rebind grammar selector
'ctrl-l': 'grammar-selector:show'
# Close other tabs shortcut
'atom-workspace':
'cmd-o': 'tabs:close-other-tabs'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment