[Mac]terminal

下载了个iterm2

顺道把现在terminal的配置记录一下。

xxxx之类的是记得要替换一下。

#~/.bashrc
export PYENV_ROOT="${HOME}/.pyenv"
if [ -d "${PYENV_ROOT}" ]; then
    export PATH=${PYENV_ROOT}/bin:$PATH
    eval "$(pyenv init -)"
fi

PATH=/Users/xxx/Library/Python/2.7/bin:$PATH
complete -C '/Users/xxx/Library/Python/2.7/bin/aws_completer' aws

########to connect to servers
alias conS1='ssh -p 222 xxx@xx.xx.xx.xx'
alias conS3='ssh -p 22  xxx@xx.xx.xx.xx'
alias conS4='ssh -p 222 xxx@xx.xx.xx.xx'

######to change color
if [ $UID -eq 0 ]; then
    PS1="\[\033[31m\]\u@\h\[\033[00m\]:\[\033[01m\]\w\[\033[00m\]\\$ "
else
    PS1="\[\033[36m\]\u@\h\[\033[00m\]:\[\033[01m\]\w\[\033[00m\]\\$ "
fi
alias ls='ls -FG'
alias ll='ls -alFG'
###############

vim ~/.bash_profile


if [ -f ~/.bashrc ]; then
  . ~/.bashrc
fi
# added by Anaconda3 2018.12 installer
# >>> conda init >>>
# !! Contents within this block are managed by 'conda init' !!
__conda_setup="$(CONDA_REPORT_ERRORS=false '/anaconda3/bin/conda' shell.bash hook 2> /dev/null)"
if [ $? -eq 0 ]; then
    \eval "$__conda_setup"
else
    if [ -f "/anaconda3/etc/profile.d/conda.sh" ]; then
        . "/anaconda3/etc/profile.d/conda.sh"
        CONDA_CHANGEPS1=false conda activate base
    else
        \export PATH="/anaconda3/bin:$PATH"
    fi
fi
unset __conda_setup
# <<< conda init <<<

########### iTerm-Color
#enables colorin the terminal bash shell export
#export CLICOLOR=1
#setsup 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-256color
#######################
#~/.vimrc
#这样vim就有颜色了
filetype plugin indent on
syntax on

:set tabstop=4
:set shiftwidth=4
# /.ssh/config
Host    S2
    HostName    xxx.xx.55.8
    Port        22
    User        na.xxxx
    #IdentifyFile   ~/.ssh/id_rsa
    ProxyCommand    ssh -W %h:%p S1
    ServerAliveInterval 60
    ServerAliveCountMax     100000
    LocalCommand        "cd /dynamicpop/"

Host    S1
    HostName    xx.xxx.51.220
    Port        222
    User        na.xxxx
    IdentityFile    ~/.ssh/id_rsa
    ServerAliveInterval 60
    ServerAliveCountMax 100000

Host    D1
    HostName    xx.xxx.51.220
    Port        222
    User        na.xxxx
    IdentityFile    ~/.ssh/id_rsa
    LocalForward    15439 redshift-xxxxxxxxxxx.com:15439
    ServerAliveInterval    60
    ServerAliveCountMax    100000

iterm2

install

brew cask install iterm2

setting

Set hot-key to open and close the terminal to command + option + i

preferences -> keys -> Hotkey(show/hide all windows with a system-wide hotkey)

配置颜色

https://www.jianshu.com/p/6e964940139c
(他让改bash_profile那里就不要改了)
下载https://iterm2colorschemes.com (tar.gz)
iTerm2 的 Preferences >> Profiles >> Colors >> 右下角的 ColorPresets…>> import… >> 刚才解压的那个文件的"schemes"

  • 2
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值