
If I hit Ctrl+ D alone (I selected d for delete), nothing happens. These make sure that the characters alone just do nothing but making sure the character is "typed" (they insert themselves on the shell). disable the bell this can be all looked up on the bash webpage).

~ means home directory in bash, as stated above, you can name the file as you like and also place it where you like as long as you feed the right path+name to bind. To make sure they are applied, you need to modify a file named ".bashrc" that bash reads in upon start-up (you must create it, if it does not exist) and make the following call there: bind -f ~/.bash_key_bindings There you can set some general bash options and you can also set key bindings.

bash_key_bindings and put it into my home directory. You need to create a file, name as you wish, I named mine. Please also note that you can customize them. Here's a look of default bindings for Bash: Ctrl+ A and Ctrl+ E) are bindings you will find in many other programs and they are used for ages, BTW also work in most UI apps. I often hit the wrong button ( cmd / control / alt) with an arrow key and so i have my arrow key combinations with those buttons all set to jump forward and back words, but please do what fits you best.Īctually it depends on what shell you use, however most shells have similar bindings.
#ITERM2 SKIP WORD PLUS#
#ITERM2 SKIP WORD HOW TO#
How to set up custom keyboard preferences in iterm2 Try it and you will never go back to regular terminal :) Also it has a lot more options for customization, like keyboard shortcuts.Īlso I love that you can use cmd and 1-9 to switch between tabs.
#ITERM2 SKIP WORD FREE#
It's free and much nicer than plain old terminal. CTRL+ S to forward search (works in ZSH for me but not bash).CTRL+ R to reverse search for commands you typed in the past from your history.CTRL+ Y to paste text from the kill buffer.

CTRL+ W to remove the word backwards from cursor position.ALT+ D to delete a word starting from the current cursor position.CTRL+ K to kill the line starting from the cursor position.In iTerm2 select Profiles -> Keys -> General and select "Option key as Esc+."Īdditionally some Emacs-style key bindings for simple text navigation seem to work on bash shells. You can do this in Terminal by accessing preferences (CMD+,) and selecting Profiles -> Keyboard. Note that you have to make set the Option key to act like the Meta key. If the above still doesn't work and you are using OS X 10.9 (Mavericks) or there abouts, you probably need to disable the global Mission Control shortcuts which prevent Control+arrow keys from reaching iTerm, even if Mission Control itself is disabled.On macOS (all versions) the following keyboard shortcuts work by default. This is why you'll need to "catch" this sequence and tell readline what to do. Why is this? You've set up your profile to use the Xterm defaults: See this documentation for more about the built-in zsh line editor (zle). To get the same functionality, you could add the following to your ~/.zshrc to use ctrl: bindkey -e

Zsh by default does not use the readline library and therefore won't read ~/.inputrc. If you want to use the alt key instead for word-to-word movement (like default OS X behavior), use: "\e[1 9D": backward-word See this archived Wiki post for some more explanation. Just add the following to ~/.inputrc: "\e[1 5D": backward-word
