Atom - changing keyboard shortcuts for defult actions
the delete line function in the atom-editor on Mac is assigned to ^ + ⇧ + k. I've a two questions:
- How can I reassign this action to ⌘ + D?
- Follow-up with the first one, is there a convenient way of browsing existing command and assigned keyboard shortcuts?
I would be obliged if the answer would provide a comprehensive extract keymap.cson
file and/or any other files that have to be modified to make this work.
macos mac keyboard keyboard-shortcuts atom-editor
add a comment |
the delete line function in the atom-editor on Mac is assigned to ^ + ⇧ + k. I've a two questions:
- How can I reassign this action to ⌘ + D?
- Follow-up with the first one, is there a convenient way of browsing existing command and assigned keyboard shortcuts?
I would be obliged if the answer would provide a comprehensive extract keymap.cson
file and/or any other files that have to be modified to make this work.
macos mac keyboard keyboard-shortcuts atom-editor
add a comment |
the delete line function in the atom-editor on Mac is assigned to ^ + ⇧ + k. I've a two questions:
- How can I reassign this action to ⌘ + D?
- Follow-up with the first one, is there a convenient way of browsing existing command and assigned keyboard shortcuts?
I would be obliged if the answer would provide a comprehensive extract keymap.cson
file and/or any other files that have to be modified to make this work.
macos mac keyboard keyboard-shortcuts atom-editor
the delete line function in the atom-editor on Mac is assigned to ^ + ⇧ + k. I've a two questions:
- How can I reassign this action to ⌘ + D?
- Follow-up with the first one, is there a convenient way of browsing existing command and assigned keyboard shortcuts?
I would be obliged if the answer would provide a comprehensive extract keymap.cson
file and/or any other files that have to be modified to make this work.
macos mac keyboard keyboard-shortcuts atom-editor
macos mac keyboard keyboard-shortcuts atom-editor
asked Apr 8 '16 at 17:11
KonradKonrad
282317
282317
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
Let's start with the second part of your question, since it gives you an understanding of what we're going to do. There are two ways to find existing keybindings:
Open settings, click on Keybindings and type
delete-line
. Words are usually separated by a single dash, though there are exceptions such asnewline
.Install the
keybinding-resolver
and open it using the Cmd. shortcut. The resolver will display any shortcut as you type.
Both options will display the triggered command and the selector in which the shortcut is working. In our case the command is editor:delete-line
and the selector atom-text-editor:not([mini])
. We will use both when creating our custom keybinding.
Open the keymap from the menu (Atom > Keymap) or the command palette (“Application: Open Your Keymap”). I've commented a working example to explain each step:
'atom-text-editor:not([mini])':
# Unbind default Cmd-D shortcut
'cmd-d': 'unbind!'
# Assign new shortcut
'cmd-d': 'editor:delete-line'
# Optional: Unbind default editor:delete-line shortcut
'ctrl-shift-k': 'unbind!'
Hope this helps!
It's not working for me it's showing "Duplicate key 'cmd-d'", what I should do here?
– Unnikrishnan
Nov 20 '17 at 6:50
add a comment |
Found another discussion and adding the following to the keymap (Atom > Keymap) did the trick for me in Atom 1.34.0 :
'.platform-darwin atom-text-editor':
'cmd-d': 'editor:delete-line'
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "3"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1063130%2fatom-changing-keyboard-shortcuts-for-defult-actions%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
Let's start with the second part of your question, since it gives you an understanding of what we're going to do. There are two ways to find existing keybindings:
Open settings, click on Keybindings and type
delete-line
. Words are usually separated by a single dash, though there are exceptions such asnewline
.Install the
keybinding-resolver
and open it using the Cmd. shortcut. The resolver will display any shortcut as you type.
Both options will display the triggered command and the selector in which the shortcut is working. In our case the command is editor:delete-line
and the selector atom-text-editor:not([mini])
. We will use both when creating our custom keybinding.
Open the keymap from the menu (Atom > Keymap) or the command palette (“Application: Open Your Keymap”). I've commented a working example to explain each step:
'atom-text-editor:not([mini])':
# Unbind default Cmd-D shortcut
'cmd-d': 'unbind!'
# Assign new shortcut
'cmd-d': 'editor:delete-line'
# Optional: Unbind default editor:delete-line shortcut
'ctrl-shift-k': 'unbind!'
Hope this helps!
It's not working for me it's showing "Duplicate key 'cmd-d'", what I should do here?
– Unnikrishnan
Nov 20 '17 at 6:50
add a comment |
Let's start with the second part of your question, since it gives you an understanding of what we're going to do. There are two ways to find existing keybindings:
Open settings, click on Keybindings and type
delete-line
. Words are usually separated by a single dash, though there are exceptions such asnewline
.Install the
keybinding-resolver
and open it using the Cmd. shortcut. The resolver will display any shortcut as you type.
Both options will display the triggered command and the selector in which the shortcut is working. In our case the command is editor:delete-line
and the selector atom-text-editor:not([mini])
. We will use both when creating our custom keybinding.
Open the keymap from the menu (Atom > Keymap) or the command palette (“Application: Open Your Keymap”). I've commented a working example to explain each step:
'atom-text-editor:not([mini])':
# Unbind default Cmd-D shortcut
'cmd-d': 'unbind!'
# Assign new shortcut
'cmd-d': 'editor:delete-line'
# Optional: Unbind default editor:delete-line shortcut
'ctrl-shift-k': 'unbind!'
Hope this helps!
It's not working for me it's showing "Duplicate key 'cmd-d'", what I should do here?
– Unnikrishnan
Nov 20 '17 at 6:50
add a comment |
Let's start with the second part of your question, since it gives you an understanding of what we're going to do. There are two ways to find existing keybindings:
Open settings, click on Keybindings and type
delete-line
. Words are usually separated by a single dash, though there are exceptions such asnewline
.Install the
keybinding-resolver
and open it using the Cmd. shortcut. The resolver will display any shortcut as you type.
Both options will display the triggered command and the selector in which the shortcut is working. In our case the command is editor:delete-line
and the selector atom-text-editor:not([mini])
. We will use both when creating our custom keybinding.
Open the keymap from the menu (Atom > Keymap) or the command palette (“Application: Open Your Keymap”). I've commented a working example to explain each step:
'atom-text-editor:not([mini])':
# Unbind default Cmd-D shortcut
'cmd-d': 'unbind!'
# Assign new shortcut
'cmd-d': 'editor:delete-line'
# Optional: Unbind default editor:delete-line shortcut
'ctrl-shift-k': 'unbind!'
Hope this helps!
Let's start with the second part of your question, since it gives you an understanding of what we're going to do. There are two ways to find existing keybindings:
Open settings, click on Keybindings and type
delete-line
. Words are usually separated by a single dash, though there are exceptions such asnewline
.Install the
keybinding-resolver
and open it using the Cmd. shortcut. The resolver will display any shortcut as you type.
Both options will display the triggered command and the selector in which the shortcut is working. In our case the command is editor:delete-line
and the selector atom-text-editor:not([mini])
. We will use both when creating our custom keybinding.
Open the keymap from the menu (Atom > Keymap) or the command palette (“Application: Open Your Keymap”). I've commented a working example to explain each step:
'atom-text-editor:not([mini])':
# Unbind default Cmd-D shortcut
'cmd-d': 'unbind!'
# Assign new shortcut
'cmd-d': 'editor:delete-line'
# Optional: Unbind default editor:delete-line shortcut
'ctrl-shift-k': 'unbind!'
Hope this helps!
edited Apr 11 '16 at 7:50
answered Apr 9 '16 at 20:05
idlebergidleberg
967413
967413
It's not working for me it's showing "Duplicate key 'cmd-d'", what I should do here?
– Unnikrishnan
Nov 20 '17 at 6:50
add a comment |
It's not working for me it's showing "Duplicate key 'cmd-d'", what I should do here?
– Unnikrishnan
Nov 20 '17 at 6:50
It's not working for me it's showing "Duplicate key 'cmd-d'", what I should do here?
– Unnikrishnan
Nov 20 '17 at 6:50
It's not working for me it's showing "Duplicate key 'cmd-d'", what I should do here?
– Unnikrishnan
Nov 20 '17 at 6:50
add a comment |
Found another discussion and adding the following to the keymap (Atom > Keymap) did the trick for me in Atom 1.34.0 :
'.platform-darwin atom-text-editor':
'cmd-d': 'editor:delete-line'
add a comment |
Found another discussion and adding the following to the keymap (Atom > Keymap) did the trick for me in Atom 1.34.0 :
'.platform-darwin atom-text-editor':
'cmd-d': 'editor:delete-line'
add a comment |
Found another discussion and adding the following to the keymap (Atom > Keymap) did the trick for me in Atom 1.34.0 :
'.platform-darwin atom-text-editor':
'cmd-d': 'editor:delete-line'
Found another discussion and adding the following to the keymap (Atom > Keymap) did the trick for me in Atom 1.34.0 :
'.platform-darwin atom-text-editor':
'cmd-d': 'editor:delete-line'
answered Jan 17 at 13:48
marvinmarvin
1
1
add a comment |
add a comment |
Thanks for contributing an answer to Super User!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1063130%2fatom-changing-keyboard-shortcuts-for-defult-actions%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown