2
1

More than 5 years have passed since last update.

MacBookAir再インストール時の設定

Last updated at Posted at 2015-06-06

MacBookAir再インストール時の設定

Mac 初期化

1. Mac再起動
2. Command + r
3. ディスクユーティリティ > Macintosh HD > 除去タブ > 除去ボタンクリック
4. ディスクユーティリティ終了
5. Wifiアクセス
6. OS X を再インストール

参考サイトはこちら

Xcodeインストール

1. App Storeからダウンロード及びインストール
2. https://developer.apple.com/downloads/index.action
3. Appleログイン
4. 該当バージョンのCommand Line Tools for Xcodeダウンロード及びインストール

git-completion.bash設定

$ sudo find / -name git-completion.bash
$ mkdir -p /usr/local/git/contrib/completion/
$ mv git-completion.bash /usr/local/git/contrib/completion/

bash設定

$ vi ~/.bash_profile
~/.bash_profile
source ~/.bashrc
$ vi ~/.bashrc
~/.bashrc
# Git branch in prompt.
parse_git_branch() {
    git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/'
}
# git settings
source /usr/local/git/contrib/completion/git-completion.bash
GIT_PS1_SHOWDIRTYSTATE=true
#export PS1="\u@\h \W\[\033[32m\]\$(parse_git_branch)\[\033[00m\] $ "
export PS1='\[\033[32m\]\u\[\033[00m\]:\[\033[36m\]\w\[\033[31m\]$(parse_git_branch)\[\033[00m\]\$ '

alias ll='ls -la'
$ source ~/.bash_profile

homebrewインストール

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

Mac Terminal のカラー設定をSolarized にする

Solarized をダウンロード

$ git clone https://github.com/altercation/solarized.git ~/solarized
$ cd ~/solarized/vim-colors-solarized/colors
$ mkdir -p ~/.vim/colors/
$ cp solarized.vim ~/.vim/colors/

Terminal の設定でSolarized プロファイルを読み込む

1. メニューバー > ターミナル > 環境設定
2. タブ > 設定
3. プロファイル下部 > 歯車ボタン > 読み込む
4. ダウンロードしたSolarized(e.g. Solarized Dark.terminal)を選択してプロファイルにロードする(Dark, Light はお好みで)
5. ついでに、そのプロファイルをデフォルトに設定しておくといい

vim カラー設定

$ vi ~/.vimrc
~/.vimrc
syntax enable
set background=dark

GNU 版ls(gls)とかが入ってるcoreutils をインストール

$ brew install coreutils

Solarized のディレクトリカラー設定ファイルを任意の場所へダウンロード

$ git clone https://github.com/seebi/dircolors-solarized.git ~/dircolors-solarized

ls コマンドをgls コマンドに置換え

$ vi ~/.bash_profile
~/.bashrc
alias ls='gls --color=auto'
~/.bashrc
eval $(gdircolors ~/dircolors-solarized/dircolors.ansi-universal)
2
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
1