Mercurial > ec-dotfiles
comparison rc/vimrc @ 467:8ef5ddb9b54b
Support for json
| author | Edho Arief <edho@myconan.net> |
|---|---|
| date | Fri, 24 May 2013 18:47:59 +0900 |
| parents | 57b104afb2ac |
| children | 86873b811343 |
comparison
equal
deleted
inserted
replaced
| 466:8e194cfa2f5f | 467:8ef5ddb9b54b |
|---|---|
| 35 map <C-t><C-m> :NERDTreeMirror<cr> | 35 map <C-t><C-m> :NERDTreeMirror<cr> |
| 36 | 36 |
| 37 nmap _cs :let @/ = ''<cr> | 37 nmap _cs :let @/ = ''<cr> |
| 38 nmap _pa :set number! list!<cr> | 38 nmap _pa :set number! list!<cr> |
| 39 | 39 |
| 40 " format JSON | |
| 41 map <leader>j <esc>:%!python -m json.tool<cr> | |
| 42 | |
| 40 "autocmd VimEnter * NERDTree | 43 "autocmd VimEnter * NERDTree |
| 41 "autocmd BufEnter * NERDTreeMirror | 44 "autocmd BufEnter * NERDTreeMirror |
| 42 | 45 |
| 43 if has('syntax') | 46 if has('syntax') |
| 44 syntax on | 47 syntax on |
| 48 let g:solarized_termtrans=1 | 51 let g:solarized_termtrans=1 |
| 49 colorscheme solarized | 52 colorscheme solarized |
| 50 endif | 53 endif |
| 51 | 54 |
| 52 if has("autocmd") | 55 if has("autocmd") |
| 56 augroup json_autocmd | |
| 57 autocmd! | |
| 58 autocmd FileType json set autoindent | |
| 59 autocmd FileType json set formatoptions=tcq2l | |
| 60 autocmd FileType json set textwidth=78 shiftwidth=2 | |
| 61 autocmd FileType json set softtabstop=2 tabstop=8 | |
| 62 autocmd FileType json set expandtab | |
| 63 autocmd FileType json set foldmethod=syntax | |
| 64 augroup END | |
| 65 au! BufRead,BufNewFile *.json set filetype=json | |
| 53 autocmd BufRead,BufNewFile supervisord.conf :set ft=dosini | 66 autocmd BufRead,BufNewFile supervisord.conf :set ft=dosini |
| 54 autocmd BufRead,BufNewFile Gemfile :set ft=ruby | 67 autocmd BufRead,BufNewFile Gemfile :set ft=ruby |
| 55 autocmd BufRead,BufNewFile config.ru :set ft=ruby | 68 autocmd BufRead,BufNewFile config.ru :set ft=ruby |
| 56 autocmd BufRead,BufNewFile crontab.* :set noet | 69 autocmd BufRead,BufNewFile crontab.* :set noet |
| 57 autocmd BufRead,BufNewFile crontab :set noet | 70 autocmd BufRead,BufNewFile crontab :set noet |
