-
Notifications
You must be signed in to change notification settings - Fork 0
/
vimrc
175 lines (135 loc) · 3.99 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
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" _ __ __ ____ "
" _ __(_) /_/ /___ __/ __/___ _ __ "
" | | /| / / / __/ __/ / / / /_/ __ \| |/_/ "
" | |/ |/ / / /_/ /_/ /_/ / __/ /_/ /> < "
" |__/|__/_/\__/\__/\__, /_/ \____/_/|_| "
" /____/ "
" "
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
set nocompatible
set background=dark
let mapleader = ','
for ext in ['bundles', 'functions', 'maps']
if filereadable(expand('~/.vim/vimrc.' . ext))
execute 'source ' . expand('~/.vim/vimrc.' . ext)
end
endfor
"
" Appearence
"
syntax on
set number
set ruler
set cursorline
set relativenumber
set shortmess=aoOtI
set laststatus=2
" expand tab to space
set expandtab
set smarttab
set tabstop=4
set softtabstop=4
set shiftwidth=4
set splitright
set splitbelow
set wildmenu
set wildmode=list:longest,full
set hidden
set lazyredraw
" folding
set foldmethod=syntax
set foldnestmax=10
set nofoldenable
" indent
set smartindent
set autoindent
set cindent
" search
set hlsearch
set incsearch
set smartcase
set ignorecase
" utils
set autoread
set showmatch
set pastetoggle=<F5>
" encoding
if has("win32") && !has("gui_running")
set encoding=gbk
set fileencoding=gbk
else
set encoding=utf-8
set fileencoding=utf-8
endif
set fileencodings=utf-8,gbk
set iskeyword-=. " '.' is an end of word designator
set iskeyword-=# " '#' is an end of word designator
set iskeyword-=- " '-' is an end of word designator
set cscopetag
set cscopeprg='gtags-cscope'
let g:nerdtree_tabs_open_on_console_startup=1
let NERDTreeShowHidden=1
let NERDTreeKeepTreeInNewTab=1
let NERDTreeQuickOnOpen=1
let NERDTreeShowBookmarks=1
let NERDTreeIgnore=['\.py[cd]$', '\~$', '\.swo$', '\.swp$', '^\.git$', '^\.hg$', '^\.svn$', '\.bzr$']
let NERDSpaceDelims = 1
let g:airline_powerline_fonts=1
let g:airline_theme='powerlineish'
let g:indentLine_color_term = 242
let g:indentLine_color_gui = '#60666b'
let g:indentLine_char = '┆' " | ┆
"let g:SuperTabDefaultCompletionType='context'
let g:SuperTabDefaultCompletionType = '<c-tab>'
let g:SuperTabMappingForward = '<s-tab>'
let g:SuperTabMappingBackward = '<tab>'
let g:SuperTabNoCompleteAfter = ['^', ',', '\s']
let g:UltiSnipsExpandTrigger="<tab>"
let g:UltiSnipsJumpForwardTrigger="<c-b>"
let g:UltiSnipsJumpBackwardTrigger="<c-z>"
let g:UltiSnipsEditSplit="vertical"
let g:cpp_class_scope_highlight = 1
let g:cpp_experimental_template_highlight = 1
" emmet-vim
let g:user_emmet_install_global = 0
" Templates
let g:templates_no_builtin_templates = 1
" let g:templates_directory = '~/.vim/templates'
let GtagsCscope_Auto_Load = 1
let CtagsCscope_Auto_Map = 1
let GtagsCscope_Quiet = 1
let g:ycm_confirm_extra_conf = 0
let g:ycm_key_list_select_completion = ['<C-TAB>', '<Down>']
let g:ycm_key_list_previous_completion = ['<C-S-TAB>', '<Up>']
let GtagsCscope_Auto_Load = 1
let CtagsCscope_Auto_Map = 1
let GtagsCscope_Quiet = 1
let g:pymode_rope_complete_on_dot = 0
" let g:pymode_rope_completion = 0
" use append instead of replace
let g:erlang_skel_replace = 0
" enable erlang header skel
let g:erlang_skel_header = {}
if !has("win32") || has("gui_running")
colorscheme flatlandia
" Monkey Patching
" original 239
hi LineNr ctermfg=242
end
if has("gui_running")
set guioptions-=T
set guioptions-=r
set guioptions-=L
set columns=100
set lines=28
set guifont=Source\ Code\ Pro\ for\ Powerline\ Medium\ 10
end
if has("win32") && has("gui_running")
set guifont=Sauce_Code_Powerline:h10:cANSI
source $VIMRUNTIME/delmenu.vim
source $VIMRUNTIME/menu.vim
language messages zh_CN.utf-8
end
autocmd FileType ruby,eruby,yml,html,css,scss,sass setlocal shiftwidth=2 softtabstop=2
autocmd FileType html,css,eruby EmmetInstall