Skip to content
This repository has been archived by the owner on Mar 13, 2023. It is now read-only.

Commit

Permalink
Merge pull request #115 from doingweb/master
Browse files Browse the repository at this point in the history
Redefining keymaps to avoid conflicts with default Atom keymaps
  • Loading branch information
sergeche committed Jul 23, 2014
2 parents 420fb9b + be32c2f commit 5024cdd
Show file tree
Hide file tree
Showing 2 changed files with 69 additions and 39 deletions.
52 changes: 27 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,31 +33,33 @@ Please report any problems at [issue tracker](https://github.com/emmetio/emmet-a

You can change these Preferences > Emmet.

* <kbd>⇥</kbd> / <kbd>⌘⇧E</kbd>: Expand Abbreviation
* <kbd>⌘⌥⏎</kbd>: Expand Abbreviation (interactive)
* <kbd>⌃W</kbd>: Wrap with Abbreviation
* <kbd>⌃D</kbd>: Balance (outward)
* <kbd>⌥D</kbd>: Balance (inward)
* <kbd>⌃⌥J</kbd>: Go to Matching Pair
* <kbd>⌃→</kbd>: Next Edit Point
* <kbd>⌃←</kbd>: Previous Edit Point
* <kbd>⌃⇧→</kbd>: Select Next Item
* <kbd>⌃⇧←</kbd>: Select Previous Item
* <kbd>⌘</kbd>/: Toggle Comment
* <kbd>⌘J</kbd>: Split/Join Tag
* <kbd>⌘</kbd>': Remove Tag
* <kbd>⌘Y</kbd>: Evaluate Math Expression
* <kbd>⌃⌥↑</kbd>: Increment Number by 0.1
* <kbd>⌃⌥↓</kbd>: Decrement Number by 0.1
* <kbd>⌃⌥⌘↑</kbd>: Increment Number by 1
* <kbd>⌃⌥⌘↓</kbd>: Decrement Number by 1
* <kbd>⌃⌥⌘⇧↑</kbd>: Increment Number by 10
* <kbd>⌃⌥⌘⇧↓</kbd>: Decrement Number by 10
* <kbd>⌘R</kbd>: Reflect CSS value
* <kbd>⌃I</kbd>: Update Image Size
* <kbd>⌃⇧I</kbd>: Encode/Decode image to data:URL
* <kbd>⌃U</kbd>: Update Tag
* <kbd>⌘M</kbd>: Merge Lines
Command | Darwin | Linux/Windows
------- | ------ | -------------
Expand Abbreviation | <kbd>tab</kbd> or <kbd>shift</kbd> + <kbd>⌘</kbd> + <kbd>e</kbd> | <kbd>tab</kbd> or <kbd>ctrl</kbd> + <kbd>e</kbd>
Expand Abbreviation (interactive) | <kbd>alt</kbd> + <kbd>⌘</kbd> + <kbd>enter</kbd> | <kbd>ctrl</kbd> + <kbd>alt</kbd> + <kbd>enter</kbd>
Wrap with Abbreviation | <kbd>ctrl</kbd> + <kbd>w</kbd> | <kbd>ctrl</kbd> + <kbd>alt</kbd> + <kbd>w</kbd>
Balance (outward) | <kbd>ctrl</kbd> + <kbd>d</kbd> | <kbd>ctrl</kbd> + <kbd>,</kbd>
Balance (inward) | <kbd>alt</kbd> + <kbd>d</kbd> | <kbd>ctrl</kbd> + <kbd>shift</kbd> + <kbd>0</kbd>
Go to Matching Pair | <kbd>ctrl</kbd> + <kbd>alt</kbd> + <kbd>j</kbd> | <kbd>ctrl</kbd> + <kbd>alt</kbd> + <kbd>j</kbd>
Next Edit Point | <kbd>ctrl</kbd> + <kbd>→</kbd> | <kbd>ctrl</kbd> + <kbd>alt</kbd> + <kbd>→</kbd>
Previous Edit Point | <kbd>ctrl</kbd> + <kbd>←</kbd> | <kbd>ctrl</kbd> + <kbd>alt</kbd> + <kbd>←</kbd>
Select Next Item | <kbd>ctrl</kbd> + <kbd>shift</kbd> + <kbd>→</kbd> | <kbd>ctrl</kbd> + <kbd>shift</kbd> + <kbd>.</kbd>
Select Previous Item | <kbd>ctrl</kbd> + <kbd>shift</kbd> + <kbd>←</kbd> | <kbd>ctrl</kbd> + <kbd>shift</kbd> + <kbd>,</kbd>
Toggle Comment | <kbd>⌘</kbd> + <kbd>/</kbd> | <kbd>ctrl</kbd> + <kbd>shift</kbd> + <kbd>/</kbd>
Split/Join Tag | <kbd>shift</kbd> + <kbd>⌘</kbd> + <kbd>j</kbd> | <kbd>ctrl</kbd> + <kbd>shift</kbd> + <kbd>`</kbd>
Remove Tag | <kbd>⌘</kbd> + <kbd>'</kbd> | <kbd>ctrl</kbd> + <kbd>shift</kbd> + <kbd>;</kbd>
Evaluate Math Expression | <kbd>shift</kbd> + <kbd>⌘</kbd> + <kbd>y</kbd> | <kbd>ctrl</kbd> + <kbd>shift</kbd> + <kbd>y</kbd>
Increment Number by 0.1 | <kbd>ctrl</kbd> + <kbd>alt</kbd> + <kbd>↑</kbd> | <kbd>alt</kbd> + <kbd>↑</kbd>
Decrement Number by 0.1 | <kbd>ctrl</kbd> + <kbd>alt</kbd> + <kbd>↓</kbd> | <kbd>alt</kbd> + <kbd>↓</kbd>
Increment Number by 1 | <kbd>ctrl</kbd> + <kbd>alt</kbd> + <kbd>⌘</kbd> + <kbd>↑</kbd> | <kbd>ctrl</kbd> + <kbd>↑</kbd>
Decrement Number by 1 | <kbd>ctrl</kbd> + <kbd>alt</kbd> + <kbd>⌘</kbd> + <kbd>↓</kbd> | <kbd>ctrl</kbd> + <kbd>↓</kbd>
Increment Number by 10 | <kbd>ctrl</kbd> + <kbd>alt</kbd> + <kbd>⌘</kbd> + <kbd>shift</kbd> + <kbd>↑</kbd> | <kbd>shift</kbd> + <kbd>alt</kbd> + <kbd>↑</kbd>
Decrement Number by 10 | <kbd>ctrl</kbd> + <kbd>alt</kbd> + <kbd>⌘</kbd> + <kbd>shift</kbd> + <kbd>↓</kbd> | <kbd>shift</kbd> + <kbd>alt</kbd> + <kbd>↓</kbd>
Reflect CSS value | <kbd>shift</kbd> + <kbd>⌘</kbd> + <kbd>r</kbd> | <kbd>ctrl</kbd> + <kbd>shift</kbd> + <kbd>r</kbd>
Update Image Size | <kbd>ctrl</kbd> + <kbd>i</kbd> | <kbd>ctrl</kbd> + <kbd>u</kbd>
Encode/Decode image to data:URL | <kbd>ctrl</kbd> + <kbd>shift</kbd> + <kbd>i</kbd> | <kbd>ctrl</kbd> + <kbd>'</kbd>
Update Tag | <kbd>ctrl</kbd> + <kbd>shift</kbd> + <kbd>u</kbd> | <kbd>ctrl</kbd> + <kbd>shift</kbd> + <kbd>'</kbd>
Merge Lines | <kbd>shift</kbd> + <kbd>⌘</kbd> + <kbd>m</kbd> | <kbd>ctrl</kbd> + <kbd>shift</kbd> + <kbd>m</kbd>

All actions and their keyboard shortcuts are available under Packages > Emmet menu item.

Expand Down
56 changes: 42 additions & 14 deletions keymaps/emmet.cson
Original file line number Diff line number Diff line change
@@ -1,13 +1,44 @@
'.editor:not(.mini)':
'cmd-E': 'emmet:expand-abbreviation'
'ctrl-e': 'emmet:expand-abbreviation'
'ctrl-,': 'emmet:balance-outward'
'ctrl-shift-0': 'emmet:balance-inward'
'ctrl-alt-j': 'emmet:matching-pair'
'ctrl-alt-right': 'emmet:next-edit-point'
'ctrl-alt-left': 'emmet:prev-edit-point'
'ctrl-shift-`': 'emmet:split-join-tag'
'ctrl-shift-;': 'emmet:remove-tag'
'ctrl-shift-y': 'emmet:evaluate-math-expression'
'alt-up': 'emmet:increment-number-by-01'
'alt-down': 'emmet:decrement-number-by-01'
'ctrl-up': 'emmet:increment-number-by-1'
'ctrl-down': 'emmet:decrement-number-by-1'
'alt-shift-up': 'emmet:increment-number-by-10'
'alt-shift-down': 'emmet:decrement-number-by-10'
'ctrl-shift-.': 'emmet:select-next-item'
'ctrl-shift-,': 'emmet:select-previous-item'
'ctrl-shift-r': 'emmet:reflect-css-value'
'ctrl-u': 'emmet:update-image-size'
"ctrl-'": 'emmet:encode-decode-data-url'
"ctrl-shift-'": 'emmet:update-tag'
'ctrl-shift-m': 'emmet:merge-lines'
'ctrl-alt-w': 'emmet:wrap-with-abbreviation'
'ctrl-alt-enter': 'emmet:interactive-expand-abbreviation'

# more specificity to Emmet to override Tab key action for snippets plugin
'.pane .editor:not(.mini)':
'tab': 'emmet:expand-abbreviation-with-tab'
'ctrl-shift-/': 'emmet:toggle-comment'
'enter': 'emmet:insert-formatted-line-break-only'

'.platform-darwin .editor:not(.mini)':
'cmd-shift-e': 'emmet:expand-abbreviation'
'ctrl-d': 'emmet:balance-outward'
'alt-d': 'emmet:balance-inward'
'ctrl-alt-j': 'emmet:matching-pair'
'ctrl-right': 'emmet:next-edit-point'
'ctrl-left': 'emmet:prev-edit-point'
'cmd-J': 'emmet:split-join-tag'
"cmd-shift-j": 'emmet:split-join-tag'
"cmd-'": 'emmet:remove-tag'
'cmd-Y': 'emmet:evaluate-math-expression'
'cmd-shift-y': 'emmet:evaluate-math-expression'
'ctrl-alt-up': 'emmet:increment-number-by-01'
'ctrl-alt-down': 'emmet:decrement-number-by-01'
'ctrl-alt-cmd-up': 'emmet:increment-number-by-1'
Expand All @@ -16,16 +47,13 @@
'ctrl-alt-cmd-shift-down': 'emmet:decrement-number-by-10'
'ctrl-shift-right': 'emmet:select-next-item'
'ctrl-shift-left': 'emmet:select-previous-item'
'cmd-R': 'emmet:reflect-css-value'
'ctrl-I': 'emmet:update-image-size'
'ctrl-shift-I': 'emmet:encode-decode-data-url'
'ctrl-U': 'emmet:update-tag'
'cmd-M': 'emmet:merge-lines'
'cmd-shift-r': 'emmet:reflect-css-value'
'ctrl-i': 'emmet:update-image-size'
"ctrl-shift-i": 'emmet:encode-decode-data-url'
'ctrl-shift-u': 'emmet:update-tag'
'cmd-shift-m': 'emmet:merge-lines'
'ctrl-w': 'emmet:wrap-with-abbreviation'
'cmd-alt-enter': 'emmet:interactive-expand-abbreviation'
'alt-cmd-enter': 'emmet:interactive-expand-abbreviation'

# more specificity to Emmet to override Tab key action for snippets plugin
'.pane .editor:not(.mini)':
'tab': 'emmet:expand-abbreviation-with-tab'
'.platform-darwin .pane .editor:not(.mini)':
'cmd-/': 'emmet:toggle-comment'
'enter': 'emmet:insert-formatted-line-break-only'

0 comments on commit 5024cdd

Please sign in to comment.