Ctrl-y – Paste previously copied ctrl-u command in to the terminal.Ctrl-u – Copy entire command to clipboard.Home – Similar to End, except jumps to the beginning of the line.End – SImilar to ctrl-e this will send your cursor to the end of the line.
There are some really nice additions that zsh offers over vanilla bash. Next, add the following to your global key bindings, iTerm -> Preferences -> Keys.įinally, it is also worth pointing out that I use zsh for my default shell. To do this, click iTerm -> Preferences -> Profiles -> Keys and find the binding for option left arrow and option right arrow and remove them from the default profile. The first step is to disable the custom binding in the iTerm preferences. The only thing I have been interested in so far is the navigation which I will highlight below.Īdjust iTerm keybindings – As I mentioned, I am used to using Linux keybinding so a natural fit for my purposes is the option key. I really haven’t dug through all the options in iTerm but there are a huge number of options and customizations that can made. The transition for me took a little bit but iTerm has definitely helped me out immensely, as well as a few other ticks learned along the way.
Coming primarily from a Linux background the hotkey bindings in Mac OS X are a little bit different than what I am used to and were initially a challenge for me to get accustomed to. If you simply want to add the option that turns on the correct hotkey bindings for your terminal, add this line to your ~/.nf file set-window-option -g xterm-keys onĪlso, if you are a Mac user, and don’t already know about it, I highly recommend checking out iTerm2.
nf file if you’re interested in screen style bindings plus configuration for hotkeys. If you use tmux as your CLI session manager you may not be able to use some of the mentioned hotkeys to get around by default if you don’t have some settings turned on in your configuration file. There are a few things that I would quickly like to note. If you spend any amount of time in the terminal you should hopefully know about some of these tricks already but more importantly, if you’re like me, are always looking for ways to improve the efficiency of your bash workflow and making your life easier. I have been piecing together useful terminal shortcuts, commands and productivity tools since I started using Linux back in the day. This article was first published by the author on his blog.I have been meaning to write this post for quite a while now but have always managed to forget. Now we can skip entire words on the command line interface by holding down the left ⌥ key and hitting ← or →. After we are done, we may need to restart the iTerm to be able to use the changes that we just made. Now we need to repeat a similar process for the ⌥→ keyboard shortcut with the following settings: To make this work for the right option key, you need to set the key modifier to act as an escape sequence.įirst, you need to set your left ⌥ key to act as an escape character.Īfter that, you can either change the current shortcut for ⌥ ← or create a new one, in the profile shortcut keys, with the following settings: All you have to do is make a few configurations in the iTerm preferences, and you are good to go.
In other words, you do not need to install anything else in your OS X.
You only need to make a few keystroke changes in your iTerm preferences and you are done. You do not need to pay 1 BTC to Apple to get this working. It turns out that this is quite possible and doesn’t cause much pain and effort on your side.
One feature that I wanted after my migration from Windows to OS X was the ability to jump between words in the command line, and not having to go through the whole line, character by character. ITerm is a great terminal replacement that I like to use.