I was using Windows and Ubuntu previously and in their terminal, when I used to press Ctrl + Backspace
it used to delete the last word till any punctuation. For example, if I had typed:
ls -l /usr/local/foo
on the terminal and pressed Ctrl + Backspace, then the result would be ls -l /usr/local/
.
I am very new to the Mac world and searched a lot of places but I could not find this behaviour. I did find that Ctrl+W deletes the entire word till whitespace and the result would be ls -l
.
I would like to keep this Ctrl+W behaviour as well as get back the Ctrl + Backspace behaviour that I had on Windows and Ubuntu.
How can I achieve this?
Best Answer
To get this to work the way you want, you have to set the option key to be used as a Meta key. To do this:
Now to achieve what you want, do as follows:
Press option + delete to delete back one word