From 26c157a6f4a3b3a3f8e698d608c69a56c4c79301 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9rald=20Quintana?= Date: Wed, 2 Mar 2016 22:07:34 +0100 Subject: [PATCH 1/4] Add Windows/Linux keymap --- keymaps/intellij-idea-keymap.cson | 125 ++++++++++++++++++++++++++++-- 1 file changed, 118 insertions(+), 7 deletions(-) diff --git a/keymaps/intellij-idea-keymap.cson b/keymaps/intellij-idea-keymap.cson index 31ede8a..439b93a 100644 --- a/keymaps/intellij-idea-keymap.cson +++ b/keymaps/intellij-idea-keymap.cson @@ -1,12 +1,35 @@ # The descriptions above the key bindings are the ones from the IntelliJ IDEA Max OS X Keymap -# Use more specific selector than core key bindings +################################################################################ +# Multi-platform # +################################################################################ 'atom-workspace atom-text-editor:not([mini])': ########### # Editing # ########### + # Smart line join + 'ctrl-shift-j': 'editor:join-lines' + + ############## + # Navigation # + ############## + + # Select current file or symbol in any view + 'alt-f1': 'tree-view:reveal-active-file' + + +################################################################################ +# Mac OS # +################################################################################ +# Use more specific selector than core key bindings +'.platform-darwin atom-workspace atom-text-editor:not([mini])': + + ########### + # Editing # + ########### + # Duplicate current line or selected block 'cmd-d': 'editor:duplicate-lines' @@ -19,9 +42,6 @@ # Delete line at caret 'cmd-backspace': 'editor:delete-line' - # Smart line join - 'ctrl-shift-j': 'editor:join-lines' - # Move line up 'cmd-shift-up': 'editor:move-line-up' @@ -63,9 +83,6 @@ # Recent files popup 'cmd-e': 'fuzzy-finder:toggle-buffer-finder' - # Select current file or symbol in any view - 'alt-f1': 'tree-view:reveal-active-file' - ################## # Live Templates # ################## @@ -82,3 +99,97 @@ # Find action 'cmd-shift-a': 'command-palette:toggle' + +################################################################################ +# Windows & Linux # +################################################################################ + +# Even if not editor pane is active +'.platform-win32, .platform-linux': + ############## + # Navigation # + ############## + + # Go to class + 'ctrl-n': 'fuzzy-finder:toggle-file-finder' + + # Go to file + 'ctrl-shift-n': 'fuzzy-finder:toggle-file-finder' + + # Open Settings + 'ctrl-alt-s': 'settings-view:open' + + # Project View + 'alt-1': 'tree-view:toggle-focus' + +# Editor pane is active +'.platform-win32 atom-text-editor:not([mini]), .platform-linux atom-text-editor:not([mini])': + + ########### + # Editing # + ########### + + # Duplicate current line or selected block + 'ctrl-d': 'editor:duplicate-lines' + + # Delete line at caret + 'shift-delete': 'editor:delete-line' + + # Move line up + 'ctrl-shift-up': 'editor:move-line-up' + + # Move line down + 'ctrl-shift-down': 'editor:move-line-down' + + # Select Word + 'ctrl-w': 'editor:select-word' + + ################## + # Search/Replace # + ################## + + # Replace + 'ctrl-r': 'find-and-replace:show' + + # Find in path + 'ctrl-shift-f': 'project-find:show' + + # Replace in path + 'ctrl-shift-r': 'project-find:show' + + ############## + # Navigation # + ############## + + # Go to next editor tab + 'alt-right' : 'pane:show-next-item' + + # Go to previous editor tab + 'alt-left' : 'pane:show-previous-item' + + # Close active tab + 'ctrl-f4': 'pane:close' + + # Go to line + 'ctrl-l': 'go-to-line:toggle' + + # Recent files popup + 'ctrl-e': 'fuzzy-finder:toggle-buffer-finder' + + + ################## + # Live Templates # + ################## + + # Insert live templates + 'ctrl-j': 'snippets:available' + + ########### + # General # + ########### + + # Open corresponding tool window + 'ctrl-1': 'tree-view:toggle' + + # Find action + 'ctrl-shift-a': 'command-palette:toggle' From 97021715a49b1d94c5fdf8484ef53b5a2a4dfca6 Mon Sep 17 00:00:00 2001 From: Gerald Quintana Date: Fri, 4 Mar 2016 12:33:45 +0100 Subject: [PATCH 2/4] Synchronize Windows/Linux/Mac keymaps --- keymaps/intellij-idea-keymap.cson | 58 +++++++++++++------------------ 1 file changed, 25 insertions(+), 33 deletions(-) diff --git a/keymaps/intellij-idea-keymap.cson b/keymaps/intellij-idea-keymap.cson index 439b93a..b7400da 100644 --- a/keymaps/intellij-idea-keymap.cson +++ b/keymaps/intellij-idea-keymap.cson @@ -1,4 +1,5 @@ -# The descriptions above the key bindings are the ones from the IntelliJ IDEA Max OS X Keymap +# The descriptions above the key bindings are the ones from the IntelliJ IDEA Keymap +# Use more specific selector than core key bindings ################################################################################ # Multi-platform # @@ -21,9 +22,8 @@ ################################################################################ -# Mac OS # +# Mac OS only # ################################################################################ -# Use more specific selector than core key bindings '.platform-darwin atom-workspace atom-text-editor:not([mini])': ########### @@ -66,7 +66,7 @@ ############## # Go to class - 'cmd-o': 'fuzzy-finder:toggle-buffer-finder' + 'cmd-o': 'fuzzy-finder:toggle-file-finder' # Go to file 'cmd-shift-o': 'fuzzy-finder:toggle-file-finder' @@ -103,27 +103,7 @@ ################################################################################ # Windows & Linux # ################################################################################ - -# Even if not editor pane is active -'.platform-win32, .platform-linux': - ############## - # Navigation # - ############## - - # Go to class - 'ctrl-n': 'fuzzy-finder:toggle-file-finder' - - # Go to file - 'ctrl-shift-n': 'fuzzy-finder:toggle-file-finder' - - # Open Settings - 'ctrl-alt-s': 'settings-view:open' - - # Project View - 'alt-1': 'tree-view:toggle-focus' - -# Editor pane is active -'.platform-win32 atom-text-editor:not([mini]), .platform-linux atom-text-editor:not([mini])': +'.platform-win32 atom-workspace atom-text-editor:not([mini]), .platform-win32 atom-workspace atom-text-editor:not([mini])': ########### # Editing # @@ -132,8 +112,18 @@ # Duplicate current line or selected block 'ctrl-d': 'editor:duplicate-lines' + # Select successively increasing code blocks + 'alt-up': 'editor:select-to-next-subword-boundary' + + # Decrease current selection to previous state + 'alt-down': 'editor:select-to-previous-subword-boundary' + # Delete line at caret 'shift-delete': 'editor:delete-line' + 'ctrl-y': 'editor:delete-line' + + # Smart line join + 'ctrl-shift-j': 'editor:join-lines' # Move line up 'ctrl-shift-up': 'editor:move-line-up' @@ -141,9 +131,6 @@ # Move line down 'ctrl-shift-down': 'editor:move-line-down' - # Select Word - 'ctrl-w': 'editor:select-word' - ################## # Search/Replace # ################## @@ -161,14 +148,17 @@ # Navigation # ############## + # Go to class + 'ctrl-n': 'fuzzy-finder:toggle-file-finder' + + # Go to file + 'ctrl-shift-n': 'fuzzy-finder:toggle-file-finder' + # Go to next editor tab - 'alt-right' : 'pane:show-next-item' + 'alt-right': 'pane:show-next-item' # Go to previous editor tab - 'alt-left' : 'pane:show-previous-item' - - # Close active tab - 'ctrl-f4': 'pane:close' + 'alt-left': 'pane:show-previous-item' # Go to line 'ctrl-l': 'go-to-line:toggle' @@ -176,6 +166,8 @@ # Recent files popup 'ctrl-e': 'fuzzy-finder:toggle-buffer-finder' + # Select current file or symbol in any view + 'alt-f1': 'tree-view:reveal-active-file' ################## # Live Templates # From 3efd469d68e1fef9ea17ef2427e2d5de0b782666 Mon Sep 17 00:00:00 2001 From: Gerald Quintana Date: Fri, 4 Mar 2016 12:36:54 +0100 Subject: [PATCH 3/4] Fix Linux selector --- keymaps/intellij-idea-keymap.cson | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keymaps/intellij-idea-keymap.cson b/keymaps/intellij-idea-keymap.cson index b7400da..c4f862c 100644 --- a/keymaps/intellij-idea-keymap.cson +++ b/keymaps/intellij-idea-keymap.cson @@ -103,7 +103,7 @@ ################################################################################ # Windows & Linux # ################################################################################ -'.platform-win32 atom-workspace atom-text-editor:not([mini]), .platform-win32 atom-workspace atom-text-editor:not([mini])': +'.platform-win32 atom-workspace atom-text-editor:not([mini]), .platform-linux atom-workspace atom-text-editor:not([mini])': ########### # Editing # From 920219d96eacfa203207b57b35b4964ebf48752e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9rald=20Quintana?= Date: Sat, 5 Mar 2016 15:25:56 +0100 Subject: [PATCH 4/4] Fix some Window key shortcuts Take @guylabs comments into account Add link to Reference cards --- keymaps/intellij-idea-keymap.cson | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/keymaps/intellij-idea-keymap.cson b/keymaps/intellij-idea-keymap.cson index c4f862c..e4c706d 100644 --- a/keymaps/intellij-idea-keymap.cson +++ b/keymaps/intellij-idea-keymap.cson @@ -24,6 +24,8 @@ ################################################################################ # Mac OS only # ################################################################################ +# https://resources.jetbrains.com/assets/products/intellij-idea/IntelliJIDEA_ReferenceCard_mac.pdf + '.platform-darwin atom-workspace atom-text-editor:not([mini])': ########### @@ -103,6 +105,8 @@ ################################################################################ # Windows & Linux # ################################################################################ +# https://resources.jetbrains.com/assets/products/intellij-idea/IntelliJIDEA_ReferenceCard.pdf + '.platform-win32 atom-workspace atom-text-editor:not([mini]), .platform-linux atom-workspace atom-text-editor:not([mini])': ########### @@ -113,18 +117,15 @@ 'ctrl-d': 'editor:duplicate-lines' # Select successively increasing code blocks - 'alt-up': 'editor:select-to-next-subword-boundary' + 'ctrl-w': 'editor:select-to-next-subword-boundary' # Decrease current selection to previous state - 'alt-down': 'editor:select-to-previous-subword-boundary' + 'ctrl-shift-w': 'editor:select-to-previous-subword-boundary' # Delete line at caret 'shift-delete': 'editor:delete-line' 'ctrl-y': 'editor:delete-line' - # Smart line join - 'ctrl-shift-j': 'editor:join-lines' - # Move line up 'ctrl-shift-up': 'editor:move-line-up'