美文网首页
Mac 开发环境搭建

Mac 开发环境搭建

作者: jockerMe | 来源:发表于2017-08-05 20:01 被阅读27次

    Homebrew

    /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
    

    终端

    ITem2
    oh-my-zsh
    ITem-ColorTheme

    # 从github上下载oh-my-zsh到本地
    git clone git://github.com/robbyrussell/oh-my-zsh.git ~/.oh-my-zsh
    # 修改默认zshrc配置文件
    cp ~/.oh-my-zsh/templates/zshrc.zsh-template ~/.zshrc
    # 将终端默认shell改为zsh
    chsh -s /bin/zsh
    
    # 修改.zshrc文件对其进行个性化定制 
    vim ~/.zshrc
    
    # 在其中添加如下配置选项
    # vim,zsh配置文件快速修改
    alias zshconfig='vim ~/.zshrc'
    alias vimconfig='vim ~/.zshrc'
    # 各种压缩包快捷解压
    alias -s zip='unzip'
    alias -s gz='tar -xzvf'
    alias -s tgz='tar -xzvf'
    alias -s bz2='tar -xjvf'
    # 在命令中直接输入以各种后缀结尾的文件,直接只用vim打开
    alias -s py=gvim
    alias -s txt=gvim
    alias -s java=gvim
    alias -s c=gvim
    # 快捷命令
    alias cls='clear'
    alias ll='ls -l'
    alias la='ls -a'
    

    Vim

    Vundle

    git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim
    

    Vim配置文件

    set nocompatible              " be iMproved, required
    filetype off                  " required
    
    " set the runtime path to include Vundle and initialize
    set rtp+=~/.vim/bundle/Vundle.vim
    call vundle#begin()
    " alternatively, pass a path where Vundle should install plugins
    "call vundle#begin('~/some/path/here')
    
    " let Vundle manage Vundle, required
    Plugin 'VundleVim/Vundle.vim'
    
    " -------------------------------------------------------------
    " The following are examples of different formats supported.
    " Keep Plugin commands between vundle#begin/end.
    " plugin on GitHub repo
    Plugin 'tpope/vim-fugitive'
    " plugin from http://vim-scripts.org/vim/scripts.html
    " Plugin 'L9'
    " Git plugin not hosted on GitHub
    Plugin 'git://git.wincent.com/command-t.git'
    " git repos on your local machine (i.e. when working on your own plugin)
    " Plugin 'file:///home/gmarik/path/to/plugin'
    " The sparkup vim script is in a subdirectory of this repo called vim.
    " Pass the path to set the runtimepath properly.
    Plugin 'rstacruz/sparkup', {'rtp': 'vim/'}
    " Install L9 and avoid a Naming conflict if you've already installed a
    " different version somewhere else.
    " Plugin 'ascenator/L9', {'name': 'newL9'}
    " -------------------------------------------------------------
    " Myscritp
    
    Plugin 'Lokaltog/vim-powerline'
    Plugin 'altercation/vim-colors-solarized'
    Plugin 'tomasr/molokai'
    
    
    " -------------------------------------------------------------
    
    " All of your Plugins must be added before the following line
    call vundle#end()            " required
    filetype plugin indent on    " required
    " To ignore plugin indent changes, instead use:
    "filetype plugin on
    "
    " Brief help
    " :PluginList       - lists configured plugins
    " :PluginInstall    - installs plugins; append `!` to update or just :PluginUpdate
    " :PluginSearch foo - searches for foo; append `!` to refresh local cache
    " :PluginClean      - confirms removal of unused plugins; append `!` to auto-approve removal
    "
    " see :h vundle for more details or wiki for FAQ
    " Put your non-Plugin stuff after this line
    
    
    
    " 显示状态栏
    set laststatus=2
    " 显示光标当前位置
    set ruler
    " 开启行号显示
    set number
    " 高亮显示当前行/列
    set cursorline
    set cursorcolumn
    " 高亮显示搜索结果
    set hlsearch
    " 配色方案
    colorscheme solarized
    " 开启语法高亮功能
    syntax enable
    " 允许使用指定语法高亮配色方案替换默认方案
    syntax on
    " 自适应不同语言智能缩进
    filetype indent on
    

    Mysql

    Mysql
    MysqlWorkbench
    Mysql环境配置,否则会提示找不到mysql命令

    # MYSQL
    export MYSQL_HOME=/usr/local/mysql
    export PATH=$PATH:$MYSQL_HOME/bin
    

    Python

    OSError: [Errno 1] Operation not permitted:

    # 当出现osError Operation not permitted 时
    # 重启电脑,cmd + R 进入恢复模式,点击实用工具,打开终端,输入csrutil disable
    # 重启电脑 csrutil status 确认模式在 disable状态下,然后安装
    
    # 按照pip包管理软件
    sudo easy_install pip
    sudo pip install ipython
    

    Shadowsocks

    Shadowsocks-qt


    Atom

    相关文章

      网友评论

          本文标题:Mac 开发环境搭建

          本文链接:https://www.haomeiwen.com/subject/gvvklxtx.html