.vimrcと.gvimrcを分ける。

めんどくさがって全部一緒にしてたらterminalのvim起動時にエラーが出るので分けました。

# .vimrc
let g:neocomplcache_enable_at_startup = 1

call pathogen#infect()
syntax on
filetype plugin indent on
colorscheme wombat
set ts=2 sw=2 et

let g:indent_guides_enable_on_vim_startup = 1
let g:indent_guides_start_level = 2
let g:indent_guides_guide_size = 1

let g:rails_syntax=1

set laststatus=2 " show bottom statusline
set nocompatible
set noswapfile
set nobackup
set number " line number
set wrap
set clipboard=unnamed
set autoread " autored when the file is modified
set expandtab
set incsearch
set showmatch
set modifiable

compiler ruby
let ruby_space_errors=1

augroup InsertHook
autocmd!
autocmd InsertEnter * highlight StatusLine guifg=#ccdc90 guibg=#2E4340
autocmd InsertLeave * highlight StatusLine guifg=#2E4340 guibg=#ccdc90
augroup END

let g:neocomplcache_enable_at_startup = 1

set guifont=Menlo:h12
set guioptions-=T
set showtabline=2

set guioptions-=r " disable right scroll bar
set guioptions-=R
set guioptions-=l " disable left scroll bar
set guioptions-=L

" fullscreen mode
set fuoptions=maxvert,maxhorz
autocmd GUIEnter * set fullscreen

" set current directory to the working object
autocmd BufEnter * silent! lcd %:p:h

日に日に使いやすくなってきています。

.vimrc

現時点ではこんな状態。MacVimの設定も混ざってるのでそっちは.gvimrcに入れて整理したい。

let g:neocomplcache_enable_at_startup = 1

call pathogen#infect()
syntax on
filetype plugin indent on
colorscheme wombat
set ts=2 sw=2 et

let g:indent_guides_enable_on_vim_startup = 1
let g:indent_guides_start_level = 2
let g:indent_guides_guide_size = 1

set guifont=Menlo:h12
set guioptions-=T
set laststatus=2
set showtabline=2

set guioptions-=r " 右スクロールバー非表示
set guioptions-=R
set guioptions-=l " 左スクロールバー非表示
set guioptions-=L

"フルスクリーンモード
set fuoptions=maxvert,maxhorz
autocmd GUIEnter * set fullscreen


set nocompatible
set noswapfile
set nobackup
set number
set wrap
set clipboard=unnamed
set autoread
set expandtab
set incsearch
set showmatch
set modifiable

compiler ruby
"余分なスペースを表示
let ruby_space_errors=1

まだまだ設定の余地はあるけど時間食うので少しずつやっていきます。

Vim Indent Guides

nathanaelkane / vim-indent-guides
インデントの表示を分かりやすく。

$ cd ~/.vim/bundle
$ git clone git://github.com/nathanaelkane/vim-indent-guides.git
$ vim ~/.vimrc

# 自分の設定
colorscheme wombat
set ts=2 sw=2 et
let g:indent_guides_enable_on_vim_startup = 1
let g:indent_guides_start_level = 2
let g:indent_guides_guide_size = 1

neocomplcache

vimで自動補完を実現するplugin
Shougo / neocomplcache
ダウンロードしたファイルを展開後、~/.vimディレクトリ直下に置く。bundleでの管理は(たぶん)出来ないので注意。

# .gvimrcではダメらしい
$ vim ~/.vimrc

let g:neocomplcache_enable_at_startup = 1