Mac自帶終端工具Terminal(終端),雖然性能有所增強(qiáng)购桑,但是iterm2更好用一些汹族。
快捷鍵:
新建標(biāo)簽:command + t
關(guān)閉標(biāo)簽:command + w
查找:command + f ?(備注 ?:加上tab,就會(huì)自動(dòng)補(bǔ)齊后面的,shift ?+ tab 會(huì)自動(dòng)補(bǔ)齊前面)
切換全屏:command + enter
分屏 : command + d
水平分屏 : command + shift + d
切換標(biāo)簽:command + 數(shù)字 command + 左右方向鍵
清除屏幕 : command + r? || control + l
查看剪貼板歷史:command + shift + h(如果需要將剪切板的歷史記錄保存到磁盤(pán)其兴,在Preferences > General > Save copy/paste history to disk.中設(shè)置顶瞒。)
刪除(清除)一行 : control +u?
刪除當(dāng)前的字符 : control + d
刪除之前的字符 : control + h
刪除之前的單詞 : control + w
刪除之后的文本 : control ?+ k
將光標(biāo)移到行尾 : control + e
將光標(biāo)移到行首 : control +a
交換光標(biāo)處文本 : control + t
清除屏幕 : command + r ?|| control + l
搜索歷史命令 ?: control ?+ ?r?
備注 :粘貼--直接選中就可以,上一條命令--鍵盤(pán)的向上方向鍵
配色的相關(guān)設(shè)置 :
1元旬,vim或者open -e 打開(kāi)~/.bash_profile
2,把下面一段話貼進(jìn)去
#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='\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;36m\]\w\[\033[00m\]\$ '
#enables colorfor iTerm
export TERM=xterm-color
3 mac 注銷(xiāo)
4 重新打開(kāi)iterm
5 preference->profiles->Terminal->xterm-new
5.1 Colors菜單榴徐,選擇LoadPresents,import就可以選擇下載好的配色方案了
備注 : 可以在gitlab上進(jìn)行下載配色(個(gè)人覺(jué)得沒(méi)有必要)
半透明 設(shè)置:?
原文章參考 :http://www.cr173.com/html/48065_1.html
其他(git 中用到的終端命令):
1.創(chuàng)建文件 :touch a.html
2.創(chuàng)建并編輯文件 : vim a.html
3.創(chuàng)建并添加內(nèi)容 : echo nihao >>a.html
4.查看文件內(nèi)容 : cat a.html
5.查看隱藏文件 : ls-ah