-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvimrc
76 lines (60 loc) · 1.58 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
72
73
74
75
76
set nocompatible
set backspace=indent,eol,start
set autoindent
set smartindent
set history=50
set ruler
set showcmd
set incsearch
"set shiftwidth=3
"set tabstop=3
"set textwidth=120
set ignorecase
set smartcase
set scrolloff=2
set wildmode=longest,list
set showmatch matchtime=3
set modelines=2
set foldlevelstart=99
set number
" Terraform syntax
let g:terraform_align=1
let g:terraform_fold_sections=1
let g:terraform_remap_spacebar=1
" CFEngine syntax
let g:DisableCF3Ftplugin=1
" run pathogen plugins
execute pathogen#infect()
" CFEngine file settings
au BufRead,BufNewFile *.cf.in set ft=cf3 nofoldenable
au BufRead,BufNewFile *.cf set ft=cf3 nofoldenable
set background=light
set t_Co=256
colorscheme molokai
syntax on
filetype plugin indent on
"let g:rehash256 = 1
" set background black
hi Normal ctermbg=black
set hlsearch
autocmd FileType text setlocal textwidth=78
set cmdheight=2
" Mustache syntax
au BufRead,BufNewFile *.mustache set syntax=mustache
" JSON syntax
let g:vim_json_syntax_conceal = 0
" JSON formatter
nmap =j :%!python -c "import json, sys, collections; print json.dumps(json.load(sys.stdin, object_pairs_hook=collections.OrderedDict), indent=4)"
" YAML syntax
autocmd FileType yaml setlocal ts=2 sts=2 sw=2 expandtab
" Golang syntax
autocmd FileType golang setlocal ts=4 sts=4 sw=2
" Jump to last losition when opening a file
if has("autocmd")
au BufReadPost * if line("'\"") > 0 && line("'\"") <= line("$")
\| exe "normal! g'\"" | endif
endif
" airline
let g:airline#extensions#tabline#enabled = 1
let g:airline#extensions#branch#enabled = 1
let g:airline_theme='dark'