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
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
|
scriptencoding utf-8
set encoding=utf-8
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" I Figured I should start taking notes for the eventual time I forget some
" shit
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" If you want to take the current buffer and save it as some fancy ass
" formatted HTML then you can just use the :TOhtml Command
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
execute pathogen#infect('bundle/{}', 'themes/{}')
" Maily for the ability to match HTML tags with '%'
runtime macros/matchit.vim
" colorscheme 256_noir
" My old standard theme
colorscheme distinguished
" colorscheme solarized
" set background=dark
" colorscheme solarized
" let g:solarized_termcolors=256
" set background=dark
" Love hate relationship with this thing. I guess it's back
map <C-n> :NERDTreeToggle<CR>
" To enable/disable the autocomplete dropdown
nmap <leader> [ :AcpDisable<CR>
nmap <leader> ] :AcpEnable<CR>
" Gundo
nnoremap <F5> :GundoToggle<CR>
" Show me where I should end my lines
set colorcolumn=80
" Allow me to hide buffers w/o saving
set hidden
" Persistent undo
set undofile
set undodir=~/.vimundo
set undolevels=1000
set undoreload=10000
" lots of history, it's always nice to find old nasty command that happen
" to be really useful
set history=10000
" Be smart about the mouse
set mouse+=a
if &term =~ '^screen'
" tmux knows the extended mouse mode
set ttymouse=xterm2
endif
" Always show status line
set laststatus=2
" Enable the list of buffers
let g:airline#extensions#tabline#enabled = 1
" Show just the filename
let g:airline#extensions#tabline#fnamemod = ':t'
" Backslash l
nmap <leader>l :set list!<CR>
" If you want listchars
set list
" set listchars=tab:\|\
set listchars=tab:▸\ ,eol:¬,trail:•
" set listchars=tab:▸\ ,eol:¬
" set listchars=tab:\|\ ,eol:↴
" set listchars=tab:\|\ ,eol:$
" set listchars=tab:\⇒\ ,eol:↴
" Tabs show up as MARCON, aka 0xC2 0xAF
" Misc symbols for tabs: ¯ ⇒ ⇥ ⇨ ⇏ ⇸ →
" This lets you just hit enter instead
" of pressing control-n Some people like it
" personally I'm not that much of a fan
" set completeopt=longest,menuone
" Omni completion
filetype plugin on
set omnifunc=syntaxcomplete#Complete
" Keep the newbs from using arrow keys
inoremap <Left> <NOP>
inoremap <Right> <NOP>
inoremap <Up> <NOP>
inoremap <Down> <NOP>
nmap <F8> :TagbarToggle<CR>
let g:ctrlp_follow_symlinks = 1
let g:ctrlp_working_path_mode = 0
" Line numbers
set nu
" Derp
syntax on
" syntax off
" Case insensitive searching by default
set ic
" Highlight my searches by default
set hls
set encoding=utf-8 " The encoding displayed.
set fileencoding=utf-8 " The encoding written to file.
" Do not read modeline from comments
set nomodeline
" No more swap files
set updatecount=0
" Vi in-compatibility
set nocompatible
set tabstop=4
set shiftwidth=4
set noexpandtab
autocmd Filetype python call SetPythonOptions()
autocmd Filetype htmldjango call SethtmldjangoOptions()
autocmd Filetype json call SetJsonOptions()
autocmd Filetype javascript call SetjavascriptOptions()
autocmd Filetype php call SetPHPOptions()
autocmd Filetype html call SetHTMLOptions()
autocmd Filetype sh call SetShellOptions()
autocmd Filetype go call SetGoOptions()
autocmd Filetype yaml call SetYamlOptions()
autocmd Filetype markdown call SetMarkdownOptions()
function SetMarkdownOptions()
set spell
set tabstop=4
set shiftwidth=4
set expandtab
AcpDisable
endfunction
function SetPythonOptions()
set tabstop=4
set shiftwidth=4
set expandtab
filetype indent on
set smartindent
endfunction
function SetjavascriptOptions()
set tabstop=2
set shiftwidth=2
set expandtab
filetype indent on
set smartindent
endfunction
function SetJsonOptions()
set tabstop=3
set shiftwidth=3
set expandtab
filetype indent on
set smartindent
endfunction
function SethtmldjangoOptions()
set tabstop=2
set shiftwidth=2
set expandtab
filetype indent on
set smartindent
endfunction
function SetPHPOptions()
set colorcolumn=120
set tabstop=4
set shiftwidth=4
set expandtab
filetype indent on
set smartindent
endfunction
function SetHTMLOptions()
set colorcolumn=120
set tabstop=2
set shiftwidth=2
set expandtab
filetype indent on
set smartindent
endfunction
function SetShellOptions()
set tabstop=4
set shiftwidth=4
set noexpandtab
filetype indent on
set smartindent
endfunction
function SetGoOptions()
" colorscheme acme
" syntax off
" colorscheme 256_noir
AcpDisable
set nolist
set noic
set nolist
endfunction
function SetYamlOptions()
" set listchars=tab:▸\ ,eol:¬,trail:•,space:·
set listchars=tab:▸\ ,eol:¬,trail:•
set expandtab
set noic
endfunction
" This is specifically for Salt's state files 'sls'
autocmd BufNewFile,BufRead *.sls set filetype=yaml
function! PhpSyntaxOverride()
hi! def link phpDocTags phpDefine
hi! def link phpDocParam phpType
endfunction
augroup phpSyntaxOverride
autocmd!
autocmd FileType php call PhpSyntaxOverride()
augroup END
|