| 1 | " design |
|---|
| 2 | set background=dark |
|---|
| 3 | colorscheme xoria256 |
|---|
| 4 | |
|---|
| 5 | " syntax |
|---|
| 6 | set nocompatible |
|---|
| 7 | syntax on |
|---|
| 8 | filetype on |
|---|
| 9 | filetype indent on |
|---|
| 10 | filetype plugin on |
|---|
| 11 | |
|---|
| 12 | " tab |
|---|
| 13 | set tabstop=2 |
|---|
| 14 | set shiftwidth=2 |
|---|
| 15 | set softtabstop=2 |
|---|
| 16 | set expandtab |
|---|
| 17 | |
|---|
| 18 | " show number, cursorline, ruler |
|---|
| 19 | set nu |
|---|
| 20 | set cursorline |
|---|
| 21 | set ruler |
|---|
| 22 | |
|---|
| 23 | set smartindent |
|---|
| 24 | set hlsearch |
|---|
| 25 | set laststatus=2 |
|---|
| 26 | set backspace=indent,eol,start |
|---|
| 27 | |
|---|
| 28 | |
|---|
| 29 | "<TAB>で補完 |
|---|
| 30 | function InsertTabWrapper() |
|---|
| 31 | if pumvisible() |
|---|
| 32 | return "\<c-n>" |
|---|
| 33 | endif |
|---|
| 34 | let col = col('.') - 1 |
|---|
| 35 | if !col || getline('.')[col -1] !~ '\k\|<\|/' |
|---|
| 36 | return "\<tab>" |
|---|
| 37 | elseif exists('&omnifunc') && &omnifunc == '' |
|---|
| 38 | return "\<c-n>" |
|---|
| 39 | else |
|---|
| 40 | return "\<c-x>\<c-o>" |
|---|
| 41 | endif |
|---|
| 42 | endfunction |
|---|
| 43 | inoremap <tab> <c-r>=InsertTabWrapper()<cr> |
|---|
| 44 | |
|---|
| 45 | " rails.vim |
|---|
| 46 | let g:rails_level=4 |
|---|
| 47 | let g:rails_default_file="app/controllers/application.rb" |
|---|
| 48 | |
|---|
| 49 | " rubycomplete.vim |
|---|
| 50 | let g:rubycomplete_buffer_loading = 1 |
|---|
| 51 | let g:rubycomplete_rails = 1 |
|---|
| 52 | let g:rubycomplete_classes_in_global = 1 |
|---|
| 53 | |
|---|
| 54 | " autocomplpop.vim |
|---|
| 55 | let g:AutoComplPop_CompleteOption = '.,w,b,u,t,i,k' |
|---|
| 56 | let g:AutoComplPop_IgnoreCaseOption = 1 |
|---|
| 57 | |
|---|
| 58 | let g:AutoComplPop_BehaviorKeywordLength = 6 |
|---|
| 59 | let g:AutoComplPop_BehaviorFileLength = 1 |
|---|
| 60 | let g:AutoComplPop_BehaviorRubyOmniMethodLength = 6 |
|---|
| 61 | let g:AutoComplPop_BehaviorRubyOmniSymbolLength = 6 |
|---|
| 62 | let g:AutoComplPop_BehaviorPythonOmniLength = 4 |
|---|
| 63 | let g:AutoComplPop_BehaviorHTMLOmniLength = 1 |
|---|
| 64 | let g:AutoComplPop_BehaviorCssOmniPropertyLength = 1 |
|---|
| 65 | let g:AutoComplPop_BehaviorCssOmniValueLength = 1 |
|---|
| 66 | |
|---|
| 67 | " fuzzyfinder.vim |
|---|
| 68 | nmap bg :FuzzyFinderBuffer<CR> |
|---|
| 69 | |
|---|
| 70 | " 辞書 |
|---|
| 71 | autocmd FileType javascript let g:AutoComplPop_CompleteOption = '.,w,b,u,t,i,k~/.vim/dict/javascript.dict' |
|---|
| 72 | |
|---|
| 73 | " Greasemonkey用テンプレート |
|---|
| 74 | autocmd BufNewFile *.user.js 0r $HOME/.vim/template/greasemonkey.txt |
|---|
| 75 | |
|---|