-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.vimrc
133 lines (102 loc) · 2.57 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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
" enable vim enhancements
set nocompatible
" required for vundle
filetype off
" vundle plugin manager
set rtp+=~/.plugins/vundle
call vundle#begin()
Plugin 'VundleVim/Vundle.vim'
" plugins
Plugin 'fatih/vim-go'
Plugin 'gcmt/taboo.vim'
Plugin 'bling/vim-airline'
Plugin 'ervandew/supertab'
Plugin 'ctrlpvim/ctrlp.vim'
Plugin 'tpope/vim-fugitive'
Plugin 'tpope/vim-surround'
Plugin 'scrooloose/nerdtree'
Plugin 'hashivim/vim-packer'
Plugin 'raimondi/delimitmate'
Plugin 'hashivim/vim-vagrant'
Plugin 'tpope/vim-commentary'
Plugin 'airblade/vim-gitgutter'
Plugin 'hashivim/vim-terraform'
Plugin 'Xuyuanp/nerdtree-git-plugin'
" syntax plugins
Plugin 'stephpy/vim-yaml'
Plugin 'saltstack/salt-vim'
Plugin 'glench/vim-jinja2-syntax'
" theme plugins
Plugin 'chriskempson/base16-vim'
Plugin 'vim-airline/vim-airline-themes'
" start vundle
call vundle#end()
filetype plugin indent on
""" theme/colour configuration
colorscheme base16-bright
let base16colorspace=256
let g:airline_theme='base16_shell'
""" misc. config
"" decrease updatetime to speed up gitgutter
set updatetime=250
" enable syntax highlighting etc.
syntax enable
" indentation
set autoindent
" folding
set foldmethod=indent
" line numbers
set number
highlight LineNr ctermfg=DarkGrey ctermbg=Black
" spaces > tabs
set expandtab
set smarttab
" tab size
set tabstop=2
set softtabstop=2
set shiftwidth=2
set expandtab
" mouse support
set mouse=n
" searching
set ignorecase
set smartcase
set incsearch
set hlsearch
nmap <leader>c :nohlsearch<CR>
" show commands at bottom of the screen
set showcmd
" split navigation
nnoremap <C-J> <C-W><C-J>
nnoremap <C-K> <C-W><C-K>
nnoremap <C-L> <C-W><C-L>
nnoremap <C-H> <C-W><C-H>
" tab navigation
nnoremap <C-Left> :tabprevious<CR>
nnoremap <C-Right> :tabnext<CR>
" buffer navigation
nnoremap <Tab> :bnext<CR>
nnoremap <S-Tab> :bprevious<CR>
""" plugin configuration
" saltstack: force jinja syntax
let g:sls_use_jinja_syntax = 1
" gitgutter: colours
let g:gitgutter_set_sign_backgrounds = 1
highlight SignColumn ctermbg=Black
" ctrlp: ignore these filetypes/dirs
let g:ctrlp_custom_ignore = {
\ 'dir': '\v[\/](\.(git|hg|svn)|\_site)$',
\ 'file': '\v\.(exe|so|dll|class|png|jpg|jpeg)$',
\}
" ctrlp: use a leader instead of the actual named binding
nmap <leader>p :CtrlP<cr>
" ctrlp: easy bindings for its various modes
nmap <leader>bb :CtrlPBuffer<cr>
nmap <leader>bm :CtrlPMixed<cr>
nmap <leader>bs :CtrlPMRU<cr>
" airline: tabline
let g:airline#extensions#tabline#enabled = 1
" terraform: disable folding
let g:terraform_fold_sections=0
" terraform: format on save
let g:terraform_fmt_on_save=1