![]() ![]() Your command line navigation will now be faster and more precise. option-d: option-del: Delete the word on the left iTerm makes this a bit tricky because it doesn’t allow you to specify a character by its hexadecimal (or decimal, or octal) value. ![]() The cursor will now “jump” over entire words as it does on other applications. It’s generally present on two key bindings: alt-d and alt-del (del on a Mac is delete on other computers, the key above the arrows on a full keyboard). Click “OK”.Ĭlose the menu and begin using the Alt and the left/right arrows immediately. This time, in the “Esc +” field, type lowercase “f”. Open the same context menu for Alt plus right ⌥→ and again change the action to “Send Escape Sequence”. In the “Esc +” field, type lowercase “b” and click “OK”. Double click it.Ĭhange the action from “Send Hex Code” to “Send Escape Sequence” (you might have to scroll a bit to find this). For example + Left Arrow is usually the same as Home (go to beginning of current line) but that doesnt work in the shell. Within the “Key Mappings” pane, find the mapping for the Alt and left keys, which will look like this: ⌥←. iterm2.md Tabs and Windows Basic Moves Moving Faster A lot of shell shortcuts work in iterm and its good to learn these because arrow keys, home/end keys and Mac equivalents dont always work. Open the “Preferences” menu: either find it in the “iTerm2” dropdown menu along the top of the screen or press the Cmd and comma keys. Note: I refer to the “Alt” key throughout this post, which is the text written on my old 2013 MacBook Pro keyboard, but this is normally called the “Option” key in MacOS. An autocomplete window opens showing the top 20 choices for words beginning what what. With a little config, you can change this behaviour, which I’ll explain below. To use autocomplete, type the beginning of a word and then press cmd. However, on first install, you can’t use the Option or Alt key (this key: ⌥) as you would in other applications: you can’t skip or jump over words by pressing Alt and the left or right keys. It has many more handy features than Terminal, is free to download and is also open source □. Optionally, if you still want to use option instead of ctrl + shift, you can use option + ⟵ and option + ⟶ when assigning the keyboard shortcut to jump words and option + delete when assigning the keyboard shortcut for deleting words.ITerm2 is a replacement for the default Terminal application on MacOS. Then for the Action select Send Hex Code and use the code 17 in the field. Then, in the Action dropdown, select Send Escape Sequence and enter the same letter ( b or f) as the keyboard shortcut you entered.ĭo it for the other key and that’s all there is to it! How To Assign Ctrl + Shift + Delete To Delete Whole WordsĪssign a keyboard shortcut, in the same way as above, and use ctrl + shift + delete as the Keyboard Shortcut. ![]() In the Keyboard Shortcut field, push the keys ctrl + shift + b or ctrl + shift + f and you should see something like ^⬆︎B or ^⬆︎F. Select the + button at the bottom to add a new shortcut. To assign the shortcut open the iTerm preferences and choose the keys tab. How To Use Ctrl + Shift + f and Ctrl + Shift + b To Jump Words If you don’t use those keyboard shortcuts they will take time to get used to, but I like them particularily because I don’t have to lift my hands off of home row to reach the arrow keys. If you use ctrl + b and ctrl + f to navigate cursor, I recommend give these steps a try. I found this to be easier to use given the placement of capslock (which should be your ctrl!) and shift on the keyboard, compared to option. I’m already used to using ctrl + f and ctrl + b to move the cursor forward and backward in terminal and, instead of option, decided to give ctrl + shift a try. I tried it for a while and found the option key to be placed in such a weird position on the Apple keyboards that I wouldn’t use option and often forget about it while in the “programming zone”. I really feel like I’m missing out on being able to jump words when working in terminal and found some blogs on how to do it by using option. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |