-
Notifications
You must be signed in to change notification settings - Fork 0
/
.vimrc
71 lines (64 loc) · 1.8 KB
/
.vimrc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
set number
set autoindent
set tabstop=2
set shiftwidth=2
set expandtab
set hlsearch
nmap <Esc><Esc> :nohlsearch<CR><Esc>
" 保存時に行末の空白を除去する
autocmd BufWritePre * :%s/\s\+$//ge
" 保存時にtabを2スペースに変換する
autocmd BufWritePre * :%s/\t/ /ge
" 保存時の処理後カーソル位置を戻す
function! s:remove_dust()
let cursor = getpos(".")
%s/\s\+$//ge
%s/\t/ /ge
call setpos(".", cursor)
unlet cursor
endfunction
autocmd BufWritePre * call <SID>remove_dust()
augroup Binary
au!
au BufReadPre *.bin let &bin=1
au BufReadPost * if &bin | %!xxd
au BufReadPost * set ft=xxd | endif
au BufWritePre * if &bin | %!xxd -r
au BufWritePre * endif
au BufWritePost * if &bin | %!xxd
au BufWritePost * set nomod | endif
augroup END
au BufRead,BufNewFile *.json set filetype=json
au BufRead,BufNewFile *.json.jpbuilder,*.json.jbuilder set filetype=ruby
"" Vundle
"set nocompatible
"filetype plugin indent off
"
"if has('vim_starting')
" set runtimepath+=~/.vim/bundle/neobundle.vim
" call neobundle#begin(expand('~/.vim/bundle/'))
" NeoBundleFetch 'Shougo/neobundle.vim'
" call neobundle#end()
"endif
"
"NeoBundleFetch 'Shougo/neobundle.vim'
"
"NeoBundle 'Shougo/neocomplcache'
"NeoBundle 'Shougo/neocomplcache-rsense'
"NeoBundle 'elzr/vim-json'
"NeoBundle 'slim-template/vim-slim.git'
"NeoBundle 'mattn/emmet-vim'
"NeoBundle 'tpope/vim-rails'
"
"filetype plugin indent on
"" neocomplcache
"let g:neocomplcache_enable_at_startup = 1
"let g:neocomplcache_max_list = 20
"let g:neocomplcache_manual_completion_start_length = 3
"let g:neocomplcache_enable_ignore_case = 1
"let g:neocomplcache_enable_smart_case = 1
"" demiliter for function compl
"if !exists('g:neocomplcache_delimiter_patterns')
" let g:neocomplcache_delimiter_patterns = {}
"endif
syntax enable