9
11

More than 5 years have passed since last update.

.bashrcとか設定ファイル

Last updated at Posted at 2014-07-21

なんだかOSXでは .bashrcからロードされないので.bash_profileから読む。


    ログイン時のみ実行される。主に環境変数を設定する。
    (exportする変数)に使用。

# .bashrcをロード
source ~/.bashrc
# 続いて 2>/dev/null と書くと、よく見る標準エラー出力を捨てる記述だが今回はコメントアウト。一応。

    OSXでhomebrewのコマンドを優先させるために、/etc/pacthをいじる。

/usr/local/bin
/usr/local/sbin
/usr/bin
/bin
/usr/sbin
/sbin

に変更する。

    対話モードのbashを起動する時に毎回実行される。主に、
        ・環境変数でない変数を設定する (exportしない変数)
        ・エイリアスを定義する
        ・シェル関数を定義する
        ・コマンドライン補完の設定をする
    bashを起動する度に毎回設定する必要がある。
    とりあえず自分用にこんな感じ。

# lsでカラー表示させる
alias ls="ls -G"
alias ll="ls -l"

# viの代わりに macvimをコマンドラインで呼ぶ
alias vi="/Applications/MacVim.app/Contents/MacOS/Vim"
# gvim でコンソールからMacVim.appを起動する
alias gvim="/Applications/MacVim.app/Contents/MacOS/mvim"


    vimのカスタマイズ。Vundleの書き方が変わってた。インストール前にmkdirすること。

" Vundleの設定
set nocompatible              " be iMproved, required
filetype off                  " required

" おまじない
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()

" Vundle本体
Plugin 'gmarik/Vundle.vim'

" Pluginを書く
Plugin 'altercation/vim-colors-solarized'

" おまじない
call vundle#end()            " required
filetype plugin indent on    " required

" ここから.vimrc
syntax enable
set background=dark
colorscheme solarized
9
11
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
9
11