zoukankan      html  css  js  c++  java
  • homebrew 使用心得

    '''
    安装anaconda
    安装命令:
    brew search anaconda
    brew cask install anaconda
    添加环境变量:
    vi ~/.bash_profile
    export PATH="usr/local/anaconda3/bin:$PATH"
    刷新环境变量:
    source ~/.bash_profile
    试用:
    conda list
    后续:
    conda upgrade anaconda
    conda upgrade anaconda-navigator
    anaconda-navigator --reset
    conda upgrade anaconda-client
    conda upgrade -f anaconda-client
    更改源请看USTC镜像站的帮助页面
    查看环境变量:
    echo $PATH
    编辑环境变量:
    sudo vi /etc/paths

    替换bash为zsh
    安装iterm2: brew search iterm2
    brew cask install iterm2
    安装git:
    brew search git
    brew install git
    更换默认终端:
    chsh -s /bin/zsh(bash)
    安装oh my zsh:
    sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
    oh-my-zsh开源地址:https://github.com/robbyrussell/oh-my-zsh
    安装PowerLine:
    pip install powerline-status --user
    若没有pip先:sudo easy_install pip
    安装PowerFonts: 安装字体库需要首先将项目git clone至本地,然后执行源码中的install.sh。
    在你习惯的位置新建一个文件夹,如:~/Desktop/OpenSource/
    在此文件夹下执行git clone命令:
    git clone https://github.com/powerline/fonts.git --depth=1
    cd fonts
    ./install.sh
    然后更改字体:iTerm2 -> Preferences -> Profiles -> Text
    安装配色方案:
    cd ~/Desktop/OpenSource
    git clone https://github.com/altercation/solarized
    cd solarized/iterm2-colors-solarized/
    open .
    在打开的finder窗口中,双击Solarized Dark.itermcolors和Solarized Light.itermcolors即可安装明暗两种配色.
    安装主题:
    下载agnoster主题,执行脚本安装:
    cd ~/Desktop/OpenSource
    git clone https://github.com/fcamblor/oh-my-zsh-agnoster-fcamblor.git
    cd oh-my-zsh-agnoster-fcamblor/
    ./install
    执行上面的命令会将主题拷贝到oh my zsh的themes中
    拷贝完成后,执行命令打开zshrc配置文件,将ZSH_THEME后面的字段改为agnoster。
    vi ~/.zshrc
    修改完成后按一下esc调出vi命令,输入:wq保存并退出vi模式。
    此时command+Q或source配置文件后,iTerm2变了模样
    安装高亮插件:
    cd ~/.oh-my-zsh/custom/plugins/
    git clone https://github.com/zsh-users/zsh-syntax-highlighting.git
    vi ~/.zshrc
    这时我们再次打开zshrc文件进行编辑。找到plugins,此时plugins中应该已经有了git,我们需要把高亮插件也加上:

    请务必保证插件顺序,zsh-syntax-highlighting必须在最后一个。
    然后在文件的最后一行添加:source ~/.oh-my-zsh/custom/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
    按一下esc调出vi命令,输入:wq保存并退出vi模式。
    执行命令使刚才的修改生效:source ~/.zshrc
    更换背景图片方式:iTerm2 -> Preferences -> Profiles -> Window -> BackGround Image勾选图片即可。
    历史命令智能提示插件:
    cd ~/.oh-my-zsh/custom/plugins/
    git clone https://github.com/zsh-users/zsh-autosuggestions
    vi ~/.zshrc

    Preferences -> Profiles -> Colors 中有Foreground是标准字体颜色,ANSI Colors中Bright的第一个是补全的字体颜色。
    Preferences -> Profiles -> Colors 中有Foreground是标准字体颜色,ANSI Colors中Bright的第一个是补全的字体颜色。

    相关链接:https://www.jianshu.com/p/9c3439cc3bdb
    更多主题可看官网:https://github.com/robbyrussell/oh-my-zsh/wiki/Themes
    另外还有一篇CSDN 的文章在印象笔记。
    

    '''

  • 相关阅读:
    不一样的抽象工厂模式(设计模式七)
    不一样的工厂模式(设计模式六)
    asp .net core 静态文件资源
    asp .net core 中间件
    平时写文档的文档要求
    mysql 悲观锁和乐观锁(二)
    Java实现 LeetCode 836 矩形重叠(暴力)
    Java实现 LeetCode 834 树中距离之和(DFS+分析)
    nmon数据采集参数
    Linux安装iostat命令
  • 原文地址:https://www.cnblogs.com/handy1998/p/10061632.html
Copyright © 2011-2022 走看看