Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow to use Ctrl+Backspace for deleting words to the left #714

Open
ghost opened this issue Mar 27, 2023 · 8 comments
Open

Allow to use Ctrl+Backspace for deleting words to the left #714

ghost opened this issue Mar 27, 2023 · 8 comments

Comments

@ghost
Copy link

ghost commented Mar 27, 2023

Problem

Usually in VSCode and other terminal emulators you're able to remove the last piece of code with Ctrl+Supr.

This is muscle memory for me

Proposal

For example, given the command git clone https://, it would remove all the text from the currently selected position until it finds a symbol or space. One key press would lead to git clone https, another would lead to git clone, etc.

Prior Art (Optional)

Will post some art soon, can't access github on gnome web right now. Also, willing to contribute this if someone points out exactly how to do it :)

@stan-janssen
Copy link
Contributor

stan-janssen commented Mar 27, 2023

I agree it would be nice to get this consistent with other text editing environments.

For what it's worth: you can use Alt + Backspace to delete the entire word (up to the text space) to the left of the cursor.

Ctrl + Delete (forward-delete, that is) does work to delete up to the next non-alphanumeric character to the right of the cursor.

I think this can only realistically be implemented in the libvte, which is the terminal emulator that elementary Terminal uses.

@ghost
Copy link
Author

ghost commented Mar 27, 2023

Ok, should open an issue in libvte repository :)

A separate issue but do you think it would be possible to use the same color palette both on the terminal app and code editor? It's a blueish theme, and doesn't blend with the rest of the widgets of Code - elementary/code#1295

@jeremypw
Copy link
Collaborator

@aitor-gomila Should the title of this issue be "Allow use of Ctrl + Super shortcut for delete word left"? Ctrl + Del already works for delete word right. As Alt + BackSpace already works for delete word left it may be possible to capture Ctrl + Super (if it is not already captured by the window manager) and feed Alt + BackSpace into the terminal instead.

@ghost
Copy link
Author

ghost commented Mar 27, 2023

The thing is, since we already have a (uncommon in my opinion) shortcut for deleting words to the left, instead of changing that should we make it clearer for users?

Same case for Super + space for opening the applications menu, I'm an elementary user since 6.0 and the first days I was using it it bothered me to use the mouse to open the application menu.

I did not know there was an option to change that, or an alternative button for it until I read an issue about that 2 days ago. Which is quite advanced, since you target normal people without a lot of computer knowledge.

@stan-janssen
Copy link
Contributor

@jeremypw I think @aitor-gomila uses "Supr" as in the Spanish key for delete.

@ghost
Copy link
Author

ghost commented Mar 27, 2023

Yes, I meant backspace (is that how it's called?) thanks for clarifying

@ghost ghost changed the title Allow to use Ctrl+Del shortcut Allow to use Ctrl+Backspace for deleting words to the left Mar 27, 2023
@jeremypw
Copy link
Collaborator

OK, so we could map Ctrl + BackSpace to Alt + BackSpace then. Making shortcuts discoverable is a bigger issue, affecting all apps. They can be put in menus and tooltips but in a case like this it is more problematic as there is no actionable widget with the same effect. Some ideas were discussed here elementary/shortcut-overlay#53 but there are technical difficulties that are yet to be resolved.

@ghost
Copy link
Author

ghost commented Mar 27, 2023

In this case if the team decided to stick with Alt + BackSpace I would add a tiny alert (like android tooltips) that tells you what shortcut to use.

image

Same for the Super key, on the shortcuts app, add a bold warning or something like that which tells you to use the appropiate shortcut (Super + Space) and a link to change the setting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants