-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinit.vim
More file actions
171 lines (141 loc) · 4.39 KB
/
init.vim
File metadata and controls
171 lines (141 loc) · 4.39 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
"| / ___|___ ___ _ __ ___ ___ ___ |__ / |__ _ _ |
"|| | / _ \/ __| '_ ` _ \ / _ \/ __| / /| '_ \| | | ||
"|| |__| (_) \__ \ | | | | | (_) \__ \ / /_| | | | |_| ||
"| \____\___/|___/_| |_| |_|\___/|___/ /____|_| |_|\__,_||
"+-------------------------------------------------------+
" ==== Install plugs with vim-plug ====
call plug#begin('~/.vim/plugged')
Plug 'dag/vim2hs'
Plug 'Valloric/YouCompleteMe'
Plug 'itchyny/vim-haskell-indent'
Plug 'OCamlPro/ocp-indent'
Plug 'scrooloose/syntastic'
Plug 'nathanaelkane/vim-indent-guides'
Plug 'rizzatti/dash.vim'
Plug 'vim-scripts/DrawIt'
Plug 'LaTeX-Box-Team/LaTeX-Box'
Plug 'junegunn/vim-easy-align'
Plug 'scrooloose/nerdtree', {'on': 'NERDTreeToggle'}
Plug 'tpope/vim-sensible'
Plug 'chriskempson/tomorrow-theme'
Plug 'scrooloose/nerdcommenter'
Plug 'flazz/vim-colorschemes'
Plug 'tpope/vim-commentary'
Plug 'Raimondi/delimitMate'
Plug 'kien/ctrlp.vim'
Plug 'easymotion/vim-easymotion'
Plug 'KabbAmine/vCoolor.vim'
Plug 'sophacles/vim-processing'
Plug 'MarcWeber/vim-addon-mw-utils'
Plug 'tomtom/tlib_vim'
Plug 'garbas/vim-snipmate'
Plug 'honza/vim-snippets'
Plug 'severin-lemaignan/vim-minimap'
Plug 'majutsushi/tagbar'
Plug 'bling/vim-airline'
Plug 'tpope/vim-unimpaired'
Plug 'chrisbra/csv.vim'
Plug 'fadein/FIGlet.vim'
" Plug 'Shougo/neocomplete.vim'
Plug 'jpalardy/vim-slime'
call plug#end()
" ==== Personall Preferences ====
" Display line numbers
set nu
" Auto indenting
set ai
" Enable syntax
syntax on
" Set encoding
set encoding=utf-8
" Apply colorscheme
colorscheme Monokai
" colorscheme Solarized
" colorscheme default
set background=dark
" Set filetype options
filetype indent plugin on
" Set to save to file automatically
set noswapfile
" Disable bells
set visualbell
" List end of line files and tabs files
set listchars=tab:▸\ ,eol:¬
set list
" Set the mouse
set mouse=a
set tabstop=4
set shiftwidth=4
set softtabstop=4
set smarttab
set expandtab
" ==== Toggle NERDTree ====
map <C-n> :NERDTreeToggle<CR>
" ==== Enable easy align ====
vmap <Enter> <Plug>(EasyAlign)
nmap ga <Plug>(EasyAlign)
" ==== Map window switching ====
nmap <silent> <A-Up> :wincmd k<CR>
nmap <silent> <A-Down> :wincmd j<CR>
nmap <silent> <A-Left> :wincmd h<CR>
nmap <silent> <A-Right> :wincmd l<CR>
let g:python_host_prog="/usr/local/bin/python"
" ==== Plugin Specific options ====
" Enable better indent
let g:indent_guides_auto_color = 1
hi IndentGuidesOdd ctermbg=black
hi IndentGuidesEven ctermbg=darkgrey
autocmd VimEnter * :IndentGuidesToggle
" EasyMotion
map / <Plug>(easymotion-sn)
omap / <Plug>(easymotion-tn)
set nohlsearch
" Toogle Tagbar
nmap <C-l> :TagbarToggle<CR>
" Airline
let g:airline#extensions#tabline#enabled = 1
let g:airline_powerline_fonts=1
" Dash plugin
nmap <silent> <leader>d <Plug>DashSearch
" Latex Box
let g:LatexBox_ignore_warnings = [
\ 'Package hyperref Warning',
\ 'Latex Warning',
\ 'Package caption Warning',
\ 'Underfull'
\ ]
let g:slime_target = "tmux"
" Syntastics
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 = 0
let g:syntastic_ocaml_checkers = ['merlin']
" Ocaml
set rtp^="/usr/local/share/ocp-indent/vim"
" ## added by OPAM user-setup for vim / base ## 9a3a300d80f2faeb258825d3e0c1947c ## you can edit, but keep this line
let s:opam_share_dir = system("opam config var share")
let s:opam_share_dir = substitute(s:opam_share_dir, '[\r\n]*$', '', '')
let s:opam_configuration = {}
function! OpamConfOcpIndex()
execute "set rtp+=" . s:opam_share_dir . "/ocp-index/vim"
endfunction
let s:opam_configuration['ocp-index'] = function('OpamConfOcpIndex')
function! OpamConfMerlin()
let l:dir = s:opam_share_dir . "/merlin/vim"
execute "set rtp+=" . l:dir
endfunction
let s:opam_configuration['merlin'] = function('OpamConfMerlin')
let s:opam_packages = ["ocp-index", "merlin"]
let s:opam_check_cmdline = ["opam list --installed --short --safe --color=never"] + s:opam_packages
let s:opam_available_tools = systemlist(join(s:opam_check_cmdline, ' '))
for tool in s:opam_packages
" Respect package order (merlin should be after ocp-index)
if count(s:opam_available_tools, tool) > 0
call s:opam_configuration[tool]()
endif
endfor
" ## end of OPAM user-setup addition for vim / base ## keep this line