-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvimrc
More file actions
235 lines (195 loc) · 5.17 KB
/
Copy pathvimrc
File metadata and controls
235 lines (195 loc) · 5.17 KB
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
235
" .vimrc
" "
" " Copyright (c) 2006 by PiT (Pierre BETTENS) <pbettens@heb.be>
" " Modified by sPlacentino <39631@heb.be>
"
"
set nocompatible
call pathogen#infect()
"
set shell=$SHELL
" Indentation
set autoindent
set smartindent
" Parenthesis balance
set showmatch
" Line wrapping
set tabstop=4
set shiftwidth=4
set textwidth=80
"
set colorcolumn=81
set scrolloff=5
"
set nu
"
set vb
set incsearch
"
set encoding=utf-8
"set autochdir
"LOOK AND FEEL CONFIGURATION
syntax enable
set background=dark " dark | light "
"" SOLARIZED COLORS
"let g:solarized_termcolors=256 "default value is 16
"colorscheme solarized
"
"" SEOUL COLORS
"colorscheme seoul256
colorscheme flattown
if $TERM =~ '256color'
set t_Co=256
elseif $TERM =~ '^xterm$'
set t_Co=256
endif
"END-LOOK AND FEEL CONFIGURATION
"AIRLINE
let g:airline#extensions#tabline#enabled = 1
if !exists('g:airline_symbols')
let g:airline_symbols = {}
endif
" unicode symbols
let g:airline_left_sep = '»'
let g:airline_left_sep = '▶'
let g:airline_right_sep = '«'
let g:airline_right_sep = '◀'
let g:airline_symbols.linenr = '␊'
let g:airline_symbols.linenr = ''
let g:airline_symbols.linenr = '¶'
let g:airline_symbols.branch = '⎇'
let g:airline_symbols.paste = 'ρ'
let g:airline_symbols.paste = 'Þ'
let g:airline_symbols.paste = '∥'
let g:airline_symbols.whitespace = 'Ξ'
set laststatus=2
highlight StatusLine term=bold cterm=bold ctermbg=9
"END-AIRLINE
" JS
let g:javascript_conceal_function = "ƒ"
let g:javascript_conceal_null = "ø"
let g:javascript_conceal_this = "@"
let g:javascript_conceal_return = "⇚"
let g:javascript_conceal_undefined = "¿"
let g:javascript_conceal_NaN = "ℕ"
let g:javascript_conceal_prototype = "¶"
let g:javascript_conceal_static = "•"
let g:javascript_conceal_super = "Ω"
" END-JS
"
set wildmode=longest,list
" Unmap direction keys
map <up> <nop>
map <down> <nop>
map <left> <nop>
map <right> <nop>
imap <up> <nop>
imap <down> <nop>
imap <left> <nop>
imap <right> <nop>
" Remap ESC key
:imap ;: <Esc>
:map ;: <Esc>
"NERDTREE
map <F9> :NERDTreeTabsToggle<CR>
let g:nerdtree_tabs_open_on_console_startup=1
"END-NERDTREE
"TABULAR
let g:tabular_loaded = 1
"END TABULAR
"
"SYNTASTIC
map <F8> :SyntasticCheck<CR>
let g:syntastic_cpp_compiler = 'g++'
let g:syntastic_cpp_compiler_options = '-std=c++11 -pedantic-errors'
let g:syntastic_cpp_check_header = 1
let g:syntastic_cpp_auto_refresh_includes = 1
let g:syntastic_c_compiler = 'gcc'
let g:syntastic_compiler_options = '-std=c99 -pedantic-errors'
let g:syntastic_check_header = 1
let g:syntastic_auto_refresh_includes = 1
let g:syntastic_c#_compiler = 'mcs'
let g:syntastic_c#_check_header = 1
let g:syntastic_c#_auto_refresh_includes = 1
let g:syntastic_scala_compiler = 'scalac'
let g:syntastic_scala_checkers = 'fsc'
let g:syntastic_error_symbol = '✘'
let g:syntastic_warning_symbol = "▲"
"END-SYNTASTIC
"ctrlp
let g:ctrlp_map = '<c-p>'
let g:ctrlp_cmd = 'CtrlP'
"
"LATEX
let g:tex_indent_items = 1
"END-LATEX
"EASY TAG
" ----- xolox/vim-easytags settings -----
"Where to look for tags files
set tags=./.tags;,~/.vimtags
"Sensible defaults
let g:easytags_events = ['BufReadPost', 'BufWritePost']
let g:easytags_async = 1
let g:easytags_dynamic_files = 2
let g:easytags_resolve_links = 1
let g:easytags_suppress_ctags_warning = 1
" ----- majutsushi/tagbar settings -----
" Open/close tagbar with \b
nmap <silent> <leader>b :TagbarToggle<CR>
"END-EASY TAG
" Dictonnaire français, monsieur.
map <silent> <F6> "<Esc>:silent setlocal spell! spelllang=fr<CR>"
" Using alt+{j,k,l,m} to move while using INSERT MODE
"inoremap <A-h> <C-o>h
"inoremap <A-j> <C-o>j
"inoremap <A-k> <C-o>k
"inoremap <A-l> <C-o>l
" Generics abbreviations
abbr retrun return
abbr lenght length
abbr rigth right
" Bash abbreviations
abbr _script #!/bin/sh
" Scala abbreviations
abbr smain def main(args : Array[String]) =
abbr ifargs if (args.length > 0 && args(0).matches("\\d+"))<CR>
" LaTeX abbreviations
abbr _chap \chapter{}<ESC>i
abbr s{ \section{
abbr ss{ \subsection{
abbr sss{ \subsubsection{
abbr bf{ \textbf{
abbr it{ \textit{<esc>la
abbr tt{ \texttt{
abbr sc{ \textsc{
abbr \i \item
abbr threadI \textit{thread}
abbr mutexI \textit{mutex}
" Pandoc abbreviations
abbr _** ****<ESC>hi
" HTML abbreviations
abbr _doc <!DOCTYPE html><CR>
abbr _docc <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><CR>
abbr _link <link rel="stylesheet" type="text/css" href="theme.css"><CR>
abbr _html <html><CR><CR></html><ESC>ki
abbr _body <body><CR><CR></body><ESC>ki
abbr _head <head><CR><CR></head><ESC>ki
abbr _meta <meta content="text/html" charset="utf-8" http-equiv="Content-Type" />
abbr _title <title><CR><CR></title><ESC>ki
abbr _br <br /><CR>
abbr __p <p><CR><CR></p><ESC>ki
abbr _hh1 <h1><CR><CR></h1><ESC>ki
abbr _input <input type="submit" value=""><ESC>hi
" Write corresponding brace
inoremap {<CR> {<CR>}<C-o>O
" Comment (visual bloc)
vmap ;c <ESC>`<i/*<cr><ESC>`>a<cr>*/<ESC>
vmap ;j <ESC>`<i/**<cr><ESC>`>a<cr>*/<ESC>
" LaTeX commands
com L w|!latex %
com V !xdvi %:r &
com Pdf w|!pdflatex %
com Xpdf !xpdf %:r.pdf &
com Pdc w|!pandoc % -o %:r.pdf
filetype plugin on
filetype indent on