MAC环境下开发环境的搭建

1.  安装brew。

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


2.  ls命令显示不同的颜色

    $vi ~/.bash_profile

    添加下面内容:

    export LS_OPTIONS='--color=auto' # 如果没有指定,则自动选择颜色

    export CLICOLOR='Yes' #是否输出颜色

    export LSCOLORS='Exfccxdxbxegedabagacad' #指定颜色


3. git命令自动补齐。

    $  brew list

    $  brew install bash-completion

    $  brew info bash-completion

        (将if......fi之间的内容拷贝到~/.bash_profile)

    $  git clone https://github.com/git/git.git

    $  cd contrib/completion/

    $  cp git-completion.bash ~/.git-completion.bash

        (在~/.bash_profile里面添加source ~/.git-completetion.bash,然后重启即可)。



4.  vim配置文件(~/.vimrc)

=====================

syntax on

filetype on


set ru


set backspace=indent,eol,start

set whichwrap=b,s,<,>,[,]

set nocompatible

set number

set history=1000

set background=dark


set autoindent

set smartindent


set expandtab

set tabstop=4

set shiftwidth=4


set showmatch

set guioptions-=T

set vb t_vb=

set ruler

set nohls

set cindent

set incsearch

colorscheme evening
















你可能感兴趣的:(mac开发环境)