http://blog.csdn.net/lainegates/article/details/38313559
Directory (?) [-]
- Color
- Case sensitive
- Quick Qian
ITEM2 is a very useful terminal under Mac. But the default color is really not good, after a search finally found a more satisfactory.
Color
1. To modify the ~/.bash_profile first. The code is as follows
[Python]View PlainCopy
- #enables Colorin the terminal bash shell export
- Export clicolor=1
- #sets up Thecolor scheme for list export
- Export Lscolors=gxfxcxdxbxegedabagacad
- #sets up Theprompt color (currently a green similar to Linux terminal)
- Export ps1='[n ] m \[email protected]\h[xxm :[n ] m \w[xxm \$ '
- #enables colorfor ITerm
- Export term=xterm-256color
Each code has comments, the 23rd line set the terminal name, that is, the current user name, directory, and color processing, easy to recognize.
2. Select the color scheme you like.
You can select a color scheme in the preferences->profiles->colors load presets. You can also download it yourself. On the site http://iterm2colorschemes.com/, you can find almost all the available color schemes. Let's make our choice.
My color:
Case sensitive
For cases where there are often uppercase letters in a directory, using tab becomes cumbersome. Google has found a workaround to remove the case sensitivity. The code is as follows:
[Python]View PlainCopy
- Echo "set completion-ignore-case on" >> ~/.inputrc
Quick Qian This is probably the charm of the item that attracts the user.
1. + numbers switch directly to and from each tab tab
2. Select Copy + mouse middle button paste, this is very useful
3. + f The content you are looking for is automatically copied
4.+ D horizontal split screen/ ? + SHIFT + D vertical split screen
5. + R = Clear, and just change to a new screen, do not want to clear the same as creating an empty screen
6.ctrl + u Clear space, no matter where the cursor is
7. Enter the start command and press the? +; automatically lists the commands you have entered
8.? + SHIFT + H will list the Clipboard history
9. You can set global shortcut keys in Preferences > Keys to bring up iterm, this can also be done with Alfred
←/ ? → to the Left/ right of one line of command , this function is the same as C+a/c+e
One.← /? → by word move forward /back, quite with c+f/c+b, in fact, this function in the iterm has been pre-defined well,? F/? b, look at your personal habits.
Here are some more common shortcuts on Linux:
C+a/c+e This can be used almost anywhere
C+P/!! Previous Command
C+k from the cursor to the end of the command line (originally C+u is deleted to the beginning of the command, but the iterm is to delete the entire line )
C+w A+d from the cursor to the beginning/ end of the word
C+h C+d Erase the ego before and after the cursor
C+y after pasting to cursor
C+r Search command history, this more common
Window description
Iterm2 's windows are divided into 3 levels: window, tab, pane. Please look.
The bottom side of this figure is tab, the figure is about pane. With these two items, Iterm2 is really useful.
By default, the new pan is a cmd+d with shortcut keys, and the Toggle pane has default settings cmd+[and cmd+]. But the new tab is not the default shortcut key, the user can set their own, in Preferences->keys.
The author sets the new tab shortcut key is cmd+t.
Mac item2 color, case sensitive and common shortcut keys