-
Notifications
You must be signed in to change notification settings - Fork 9
/
.vimrc
194 lines (147 loc) · 4.31 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
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
"##############################################################"
" vim: set foldmarker={,} foldlevel=0 foldmethod=marker :
"
" Vim Configuration
"
" Hangchen YU
"
" This is the personal Vim configuration of Hangchen YU.
"
" File: vimrc
"
"##############################################################"
" General Settings {
" We use Vim settings
set nocompatible " Must be the first line
" Load external settings
set exrc
" set secure
" Set Yuhc Vim Configuration path
let $YUPATH=$HOME."/.yuhc-vim"
" Uncomment the next 4 lines if you use GVim in Windows
"if has('gui_running')
" " Set Yuhc Vim Configuration path
" let $YUPATH="D:\.yuhc-vim"
"endif
" Disable backup
set nobackup
set nowritebackup
" Set some search options
"set incsearch
set ignorecase
set hlsearch
" remap space to clear highlight
nmap <SPACE> <SPACE>:noh<CR>
" Spell Checking
set spell spelllang=en_us
"set nospell
"set spelllang=en,es,it
set spellsuggest=5
" Setup Vundle Support {
filetype off " Required by Vundle
" set the runtime path to include Vundle and initialize
set rtp+=$YUPATH/bundle/Vundle.vim
" Uncomment this if you use GVim in Windows
"if has('gui_running')
" set rtp+=D:\.yuhc-vim\bundle\Vundle.vim
" let path='D:\.yuhc-vim\bundle'
" call vundle#begin(path)
"else
call vundle#begin()
"endif
" Let Vundle manage Vundle, this is required
Plugin 'gmarik/Vundle.vim'
" }
" }
" Formatting {
" Set maximum width of text line
set textwidth=110
set colorcolumn=120
highlight ColorColumn ctermbg=darkgray
" Tabs settings
set expandtab
set tabstop=4
set shiftwidth=4
" Automatic Indentation
set autoindent
set shiftwidth=4
let g:autoformat_autoindent = 0
let g:autoformat_retab = 0
let g:autoformat_remove_trailing_spaces = 1
autocmd BufWrite * :set fileformat=unix
" }
" Programming Settings {
" Set backspace key working properly
set backspace=indent,eol,start
" Set folding method and leave all folds open
set fdm=indent
set foldlevel=99
" Enconding text
set encoding=utf8
" Syntax
syntax on
" Include Library
let &path.="src/include,/usr/include/AL,"
set includeexpr=substitute(v:fname,'\\.','/','g')
" YouCompleteMe
let g:ycm_global_ycm_extra_conf='~/.vim/bundle/YouCompleteMe/.ycm_extra_conf.py'
" }
" Vim UI {
" Color Scheme and Background
"colorscheme default
"set background=light
colorscheme buddy
set background=dark
" Statusline
set laststatus=2
set statusline=%F%m%r%h%w\ [%{&ff}]\ [%Y]\ [ASCII=\%03.3b\ HEX=\%02.2B]\ [POS=%04l,%04v\ %p%%\ %L]
" Line numbers
set number
"highlight LineNr ctermfg=grey
" Set visual bell
set vb
" Disable mouse in a terminal
set mouse=
" }
" GVim GUI {
" Set useful settings for GVim in case .gvimrc is missing
" Note that gvimrc file is always sourced after the vimrc file.
if has('gui_running')
" Color Scheme and Background
colorscheme default
set background=light
"set background=dark
" Enable mouse in a windows
set mouse=a
endif
" }
" External Configurations {
" Load Plugins
source $YUPATH/plugins.vim
"
" All of your Plugins must be added before the following line
call vundle#end() " required
filetype plugin indent on " required
"
" Brief help
" :PluginList - lists configured plugins
" :PluginInstall - installs plugins; append `!` to update or just :PluginUpdate
" :PluginSearch foo - searches for foo; append `!` to refresh local cache
" :PluginClean - confirms removal of unused plugins; append `!` to auto-approve removal
"
" see :h vundle for more details or wiki for FAQ
" Key Mappings
source $YUPATH/mappings.vim
" File Types
source $YUPATH/filetypes.vim
" Abbreviations
source $YUPATH/abbreviations.vim
" Customizations
source $YUPATH/custom.vim
" }
" Uncomment this if you use GVim in Windows
" Vundle fix to load bundles
"if has('gui_running')
" call vundle#config#require(g:bundles)
"endif
" End of vimrc