Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Bash keyboard shortcuts in iTerm like Alt+d and Alt+f [closed]

Everyone at work recommended iTerm2 to me instead of the native Terminal. But iTerm2 doesn't seem to allow me to use bash shortcuts like Alt+B and Alt+F to jump back/forward between tokens, or Alt+D to delete a word.

I can't imagine this isn't available. Can anyone help me out?

like image 567
rewolf Avatar asked Sep 20 '13 18:09

rewolf


People also ask

What is an Alt bash?

So What Is An "Alt Bash?" Alt Bashes are parties thrown to celebrate the not-so-celebrated moments. Alt Bashes are heavily trending this year! It's all about celebrating things that are a triumph to you, but might not seem so by society.

What is comparable to Alt Mac?

The PC-keyboard equivalent of Alt on a Mac is called the Option key, and you'll find the Option Key on your Mac if you go two keys to the left of the spacebar.

Which bash shortcut or command is used to clear characters from the cursor to the end of the command line?

Ctrl+D or Delete – remove or deletes the character under the cursor. Ctrl+K – removes all text from the cursor to the end of the line.


1 Answers

The Option key (the Mac name for the Alt key) by default has other uses. Press Command+O to open the list of profiles, select Default (I assume that is the profile you are using), and click "Edit Profiles...". In the resulting window, click on the "Keys" tab, and select "+Esc" for one or both option keys. This should cause iTerm to treat the Option key the way you are accustomed.

Alternatively, you can simply use the Escape key instead.

enter image description here

like image 103
chepner Avatar answered Sep 17 '22 15:09

chepner