-
Notifications
You must be signed in to change notification settings - Fork 0
/
.vimrc
61 lines (49 loc) · 1.41 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
set t_Co=256
set laststatus=2
syntax enable
set background=dark
" colorscheme solarized
colorscheme slate
set nocompatible
set number
set ruler
set hls
" This shows what you are typing as a command.
set showcmd
set foldmethod=marker
" syntax
filetype on
filetype plugin on
filetype indent on
set grepprg=grep\ -nH\ $*
augroup filetypedetect
au BufNewFile,BufRead *.pig set filetype=pig syntax=pig
augroup END
set autoindent
set expandtab
set smarttab
set shiftwidth=4
set softtabstop=4
set wildmenu
set wildmode=list:longest,full
set statusline=%F%m%r%h%w\ (%{&ff}){%Y}\ [%l,%v][%p%%]
" Avro
au BufRead,BufNewFile *.avdl setlocal filetype=avro-idl
au BufRead,BufNewFile *.avsc set filetype=json
" JSON
" https://www.vim.org/scripts/script.php?script_id=1945
au! BufRead,BufNewFile *.json set filetype=json
augroup json_autocmd
autocmd!
autocmd FileType json set autoindent
autocmd FileType json set formatoptions=tcq2l
autocmd FileType json set textwidth=78 shiftwidth=2
autocmd FileType json set softtabstop=2 tabstop=8
autocmd FileType json set expandtab
" This will fold lines - only enable if you want this by default
" autocmd FileType json set foldmethod=syntax
augroup END
" Git commit message wordwrap and spellchecking
autocmd Filetype gitcommit setlocal spell textwidth=72
" Alternative JSON formatting option. Will use 4 spaces for tab.
command JsonFormat %!python -m json.tool