You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
CMD + Backspace while at Col 1 should remove line #16460
CMD + Backspace at the end of a line properly removes the characters line, leaving the cursor at Col 1. But using the same combo a second time does nothing. You have to release CMD for Backspace to remove the line. You should be able to keep CMD pressed and either remove all the characters in a line, or remove the line itself if the line is empty.
Steps to Reproduce:
Starting at the right of a line of characters, use CMD + Backspace to remove the characters.
Hit the same combo again, and the line isn't removed.
Changkun Ou (@changkun) This issue is about the behavior in the text editor when the cursor is at the begin of the line. Please open a separate issue for your request (which might depend on the shell you are using).
I see that a corresponding pull request is already merged. Can anyone tell me is this already included in release build? I still encounter this issue on the latest editor version.
Similarly stymied by this after moving from Sublime, I have the following short-term fix. This is a 'close enough' fix to what I am used to, but with one caveat: It doesn't stop at the linebreak like Sublime, but always removes the line break you're up against.
Activity
chrmarti commentedon Dec 5, 2016
You can use
Shift+Cmd+Kto delete the current line.WhatsThatItsPat commentedon Dec 5, 2016
Sure, but I think what I'm explaining is standard for other editors and text areas (like the one I'm typing in now).
chrmarti commentedon Dec 5, 2016
Indeed, reopening to track as a feature request.
atipugin commentedon May 4, 2017
+1
changkun commentedon Jun 4, 2017
I have the same issue and I am on mac. The vscode version is 1.12.2.
The cmd+backspace works fine when edit text focused. So, I added a key binding for clear all left action when terminal focus:
[ { "key": "cmd+backspace", "command": "deleteAllLeft", "when": "terminalFocus" } ]However, the cmd+backspace doesn't work. What did I do wrong? Moreover, the cmd+k also doesn't work when the terminal focused.
chrmarti commentedon Jun 5, 2017
Changkun Ou (@changkun) This issue is about the behavior in the text editor when the cursor is at the begin of the line. Please open a separate issue for your request (which might depend on the shell you are using).
lukeed commentedon Oct 29, 2017
Any update on this? Or any short-term fix? TBH it's really the only lingering habit I have that trips me up in Code.
chrmarti commentedon Oct 30, 2017
I just found that Cmd + Delete (delete right of cursor) works. (But no update.)
poohitan commentedon Mar 18, 2018
I see that a corresponding pull request is already merged. Can anyone tell me is this already included in release build? I still encounter this issue on the latest editor version.
chrmarti commentedon Mar 19, 2018
poohitan (@poohitan) Not sure which pull request you refer to, but the above one seems still pending.
poohitan commentedon Mar 19, 2018
Christof Marti (@chrmarti) yes, I referred to the one above, I wonder how did I saw it as merged, I guess it was the lack of sleep :). Sorry.
zArubaru commentedon Apr 30, 2018
Just switched over from Sublime, wishing this would be fixed :/
alastairjwright commentedon Jun 12, 2018
Cmd + backspace is the fastest way to delete lines of code in an upward direction.
Really hoping this gets fixed!
jandor64 commentedon Jun 30, 2018
Similarly stymied by this after moving from Sublime, I have the following short-term fix. This is a 'close enough' fix to what I am used to, but with one caveat: It doesn't stop at the linebreak like Sublime, but always removes the line break you're up against.
I went with deleteAllLeft rather than deleteLine, since you may wish to preserve what's to the right of your cursor.
rebornix commentedon Oct 24, 2019
This is fixed already.