iTerm2 Configuration in Mac: Line editor configuration


As a Linux programmer, I used terminal tools a lot in my daily life, I use terminal tools to search dictionary, to play multimedia resources, to editor files, I also can play movies in the terminal, do you believe that? I also use terminal tool to suspend my Laptop. 

You know something changed after I am rich, I purchased a MacBook, which is really beautified. As I start my Macbook journey, I remembered that the first application I opened is Terminal, but it was so silly. I felt so uncomfortable without an awesome terminal tool. Then I found iTerm2, which was said the best in Mac.

But the nightmare was just the beginning, iTerm2 was great, it is the Macbook's keyboard layout, there are only left Ctrl key. Damn, that meaning I have to change the memory muscles to adjust the familiar finger gestures, especially the line editor navigation key bindings like Ctrl+A to the beginning of a line, Ctrl+E to an end of the line, ...

Tonight, I finally found the right ways to remap the key-binding to the familiar finger gestures. When I click Ctrl+A, it actually sends the hex code 0x01. This website list all the key-mappings. In Macbook, Alt key replaces the Ctrl key's position, and Command key replace the Alt key's position. In order to replace less key-binding, I decided to remap Command+A to play the same function as Ctrl+A. So the solution is to let Command+A send the same hex code 0x01.

Open the iTerm2's preference, and select the keys tab to remap the following key-bindings:

Command+A --> 0x01
Command+B --> 0x02
Command+F --> 0x06
Command+E --> 0x05

 as the following figures show up.



Comments

Popular posts from this blog

Bluedroid stack in android

How to setup a NAT server?

Network programming in elisp