-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvimrc
154 lines (130 loc) · 3.48 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
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
set nocompatible " be iMproved, required filetype off " required
:let maplocalleader = ','
set rtp+=~/.vim/bundle/vundle/
call vundle#begin()
" let Vundle manage Vundle, required
Plugin 'gmarik/vundle'
Plugin 'scrooloose/nerdtree'
Plugin 'tpope/vim-vinegar'
Plugin 'tpope/vim-fugitive'
Plugin 'kljohann/vim-gitmodeline'
Plugin 'kien/ctrlp.vim'
Plugin 'jelera/vim-javascript-syntax'
Plugin 'vim-scripts/JavaScript-Indent'
Plugin 'Raimondi/delimitMate'
Plugin 'othree/javascript-libraries-syntax.vim'
Plugin 'bling/vim-airline'
Plugin 'mustache/vim-mustache-handlebars'
Plugin 'altercation/vim-colors-solarized'
Plugin 'nathanaelkane/vim-indent-guides'
Plugin 'rstacruz/sparkup'
Plugin 'vim-scripts/indenthtml.vim'
Plugin 'scrooloose/syntastic'
Plugin 'msanders/snipmate.vim'
Plugin 'hail2u/vim-css3-syntax'
Plugin 'groenewege/vim-less'
Plugin 'editorconfig/editorconfig-vim'
call vundle#end() " required
filetype on
filetype plugin on
filetype plugin indent on
set enc=utf-8
set fileencoding=utf-8
set fileencodings=ucs-bom,utf8,prc
syntax enable
set background=dark
colorscheme solarized
set noswapfile
let NERDTreeHijackNetrw = 1
let g:html_indent_inctags = "li"
set autoindent
set cindent
" ##### Basic options {{{
" Display incomplete commands.
set showcmd
" Display the mode you're in.
set showmode
" Intuitive backspacing.
set backspace=indent,eol,start
" Handle multiple buffers better.
set hidden
" Enhanced command line completion.
set wildmenu
" Complete files like a shell.
set wildmode=list:longest
" Case-insensitive searching.
set ignorecase
" But case-sensitive if expression contains a capital letter.
set smartcase
" Show line numbers.
set number
" Show cursor position.
set ruler
" Highlight matches as you type.
set incsearch
" Don't highlight matches.
set nohlsearch
" Turn off line wrapping.
set nowrap
" Show 3 lines of context around the cursor.
set scrolloff=3
" Set the terminal's title
set title
" No beeping.
set visualbell
" Don't make a backup before overwriting a file.
set nobackup
" And again.
set nowritebackup
" Keep swap files in one location
set directory=$HOME/.vim/tmp//,.
" Global tab width.
set tabstop=2
" And again, related.
set shiftwidth=2
set expandtab
" Files open expanded
set foldlevelstart=20
" Use decent folding
set foldmethod=indent
" Show the status line all the time
set laststatus=2
" Useful status information at bottom of screen
set statusline=[%n]\ %<%.99f\ %h%w%m%r%y\ %{exists('*CapsLockStatusline')?CapsLockStatusline():''}%=%-16(\ %l,%c-%v\ %)%P
" Enable syntax highlighting
syntax on
" Sets the c
let mapleader = ","
noremap H ^
noremap L $
nnoremap <C-h> <C-w>h
nnoremap <C-j> <C-w>j
nnoremap <C-k> <C-w>k
nnoremap <C-l> <C-w>l
nnoremap <C-b> :bn<CR>
" Create windows
nnoremap <leader>v <C-w>v<C-w>l
nnoremap <leader>m <C-w>s<C-w>j
nnoremap <leader>d :bd<CR>
nnoremap <leader>q <C-w>q
" }}}
" ##### Folding {{{
" Toggles folding with space
nnoremap <leader><Space> za
inoremap <C-a> <C-x><C-o>
let g:airline#extensions#tabline#enabled = 1
let g:ctrlp_working_path_mode = 'a'
set statusline+=%#warningmsg#
set statusline+=%{SyntasticStatuslineFlag()}
set statusline+=%*
let g:syntastic_always_populate_loc_list = 1
let g:syntastic_auto_loc_list = 1
let g:syntastic_check_on_open = 1
let g:syntastic_check_on_wq = 1
let g:syntastic_enable_signs = 1
let g:syntastic_aggregate_errors = 1
" Custom ignores
let g:ctrlp_custom_ignore = 'node_modules\|DS_Store'
let g:solarized_termcolors=256
set background=dark
colorscheme solarized