Unexpected Ctrl + Del behaviour #3362
Comments
@izuzak Oops, forgot to give that info. OS: Windows 7 x64 When I press Ctrl+Del in the middle of a line, it behaves as expected. But at the end of a line, it just deletes the line below straight away, even in safe-mode. |
+1, if I understood you correctly I am experiencing the same issue In Sublime text pressing Ctrl + Del (or backspace) will remove all whitespace and stop when it hits either a newline or non-whitespace character. Atom does not stop on non-whitespace characters and removes them as well which is very annoying after you are used to Sublime's behaviour (I think most editors out there are same as ST) For example I have the following text (the pipe symbol is representing the cursor):
Now if I press Ctrl + Del in ST I will have this:
While Atom does this:
Removing the whole line above is a much rarer use case then removing whitespace, plus on Linux you can use backspace/del to remove all whitespace backward/forward which is very handy (if you press it again it will remove everything until the next newline character giving same result as atom). |
This is not a windows-only issue. |
@YemSalat Thanks for providing more details, I've updated the labels |
I think #4026 is a duplicate of this. |
@jhasse that issue does show the exact problem I was having, haven't tested the fix that user got merged though |
As mentioned in #4026, you can rebind via: '.editor':
'ctrl-backspace': 'editor:delete-to-previous-word-boundary'
'ctrl-delete': 'editor:delete-to-next-word-boundary' |
Spot the odd one out. Please change the default. |
I also think that the default needs to be changed. In #4026 it is justified by the fact that this behavior "is similar to most text boxes on your system" I do not think that Atom should be copying other editors, but this is not "copying" - this is complying with common code editor logic. |
👍 change the default |
👍 This is probably my nr 1 grief with text editing in atom! |
This is so incredibly annoying, +1 |
👍 |
👍 |
1 similar comment
+1 |
+1, number one reason to keep going back to sublime. |
+1 |
@denisazevedo You can use reactions now, instead of +1 comments. Edit: I see that you have in some cases. |
PLEASE change this default so I don't need to configure the keybindings on every new machine. |
+1 |
I dont suppose we have any progress to this? It has been 2 years T_T ps I am more than willing to work on this if someone can point me in the right direction |
Just submitted a PR to fix this: #12098 |
+1 trying out Atom after using Sublime. The current delete-to-end-of-word behavior was unexpected/undesirable for me. |
I have been using Atom for about 6 months now, and this is still my most unfavorite feature. I have see a couple of these threads that eventually point to a PR that end the same way it did. Closed; without a merge. @glen-84 summed it up best with his comment. If this doesn't change soon I'll have to take break back to Brackets, while I know others who will go to VS Code (shudder). |
An easy fix for getting the sublime text behavior for CTRL-BACKSPACE and CTRL-DELETE : 'atom-workspace atom-text-editor':
'ctrl-backspace': 'editor:delete-to-previous-word-boundary'
'ctrl-delete': 'editor:delete-to-next-word-boundary' |
Well, there is still a thing that don't work like sublime text. |
I think we had to migrate our whole codebase to |
Hello. I also face this issue. Ctrl+Delete deletes the whole line instead of just the white space. The same thing with Ctrl+Backspace. Atom version 1.23.3 Update upon reading #4026 (comment) I've found out that I just have to include his comment into the config and yey, there's working (I used ctrl instead of alt). |
Thank you, please make this the default. |
Pretty please? |
Thanks for your contribution! This issue has been automatically marked as stale because it has not had recent activity. Because the Atom team treats their issues as their backlog, stale issues are closed. If you would like this issue to remain open:
Issues that are labeled as triaged will not be automatically marked as stale. |
This issue has been automatically locked since there has not been any recent activity after it was closed. If you can still reproduce this issue in Safe Mode then please open a new issue and fill out the entire issue template to ensure that we have enough information to address your issue. Thanks! |
In other programs, pressing Ctrl + Del on the end of a line would delete newline characters and bring the next line after the cursor.
Example in Sublime Text:
(https://s.kpvp.in/gifs/WfVaC.gif)
The text was updated successfully, but these errors were encountered: