iTerm2设置的弯路

iTerm2 设置的弯路

1. 下载iTerm2

  • 官网下载
  • iterm2官网

2. iTerm2 的配色方案

  • iterm2 - preferences - profiles - color Preset进行配色预设,可以到网上下载喜欢的配色方案
  • key的设置:快捷键 option + space
  • 宽度设置
  • 背景透明度与模糊度:profiles - window中设置

3. bash更改配色方案

  • 修改 ~/.bash_profile 插入以下内容,注意export后面是空格,完成后 source .bash_profile
export  CLICOLOR=1
LSCOLORS=gxfxcxdxbxegedabagacad
export PS1='\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;36m\]\w\[\033[00m\]\$'

export TERM=xterm-color
  • 设置终端 xterm-256color
  • ls显示彩色,注意mac下ls 与Linux下ls是不同的
alias ls ='ls-G' # OS X
alias ls = 'ls --color= atuo'  # Linux

4. on the zsh 方案

  • 切换到 zsh, 注意 mac os 系统已经有zsh了
chsh -s /bin/zsh # 切换默认shell

5. 奇怪的问题

  • 设置结束后,每次重启iterm2,都会弹出“can't load xxxx”的错误
  • 排查的问题:Preferences - General - 最下面有一个Preferences ,之前打勾了 “load Preferences from a custom folder or URL”,去掉之后就OK

6. iterm2的使用

  • iterm2很强大,建议在使用中探索

你可能感兴趣的:(iTerm2设置的弯路)