-
Notifications
You must be signed in to change notification settings - Fork 0
/
vimrc
executable file
·665 lines (566 loc) · 18.4 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
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
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Owner: Vingel - http://www.vingel.com
" Modified: 2011-02-14 18:36:09
" set runtimepath=~/vim,$VIMRUNTIME
" source ~/vim/vimrc
" Get out of VI's compatible mode..
set nocompatible
if v:version < 700
echoerr 'This vimrc requires Vim 7 or later.'
finish
endif
if has("win32")
let $VIMFILES = $VIM.'/vimfiles'
else
let $VIMFILES = $HOME.'/.vim'
endif
let $VIMRC = $VIMFILES.'/vimrc'
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" => VIM UserInterface Settings
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Enable filetype plugin
filetype plugin indent on
set autoindent
set copyindent
" Set mapleader
let mapleader = ","
let g:mapleader = ","
" Set 7 lines to the curors - when moving vertical..
set so=7
" Turn on WiLd menu
set wildmenu
set wildmode=longest,full
set wildignore=*.bak,*.o,*.obj,*.e,*~,*.pyc,*.svn
" Always show current position
set ruler
" Show matching bracets
set showmatch
set showfulltag
" Match Pair
set matchpairs=(:),{:},[:],<:>
" Show matchtime in 0.5s
set matchtime=5
" The commandbar is 2 high
set cmdheight=2
" Show line number
set number
" Line space between
set linespace=2
" Do not redraw, when running macros.. lazyredraw
"set lazyredraw
" Change buffer - without saving
set hidden
" Set backspace
set backspace=start,indent,eol
" Bbackspace and cursor keys wrap to next line
set whichwrap+=<,>,h,l,b,s,[,]
"Ignore case when searching
set ignorecase smartcase
set incsearch
" Set magic on
set magic
" No sound on errors.
set noerrorbells
set novisualbell
set t_vb=
" Make GUI File Open use current directory
set browsedir=buffer
" How many tenths of a second to blink
set mat=2
" Highlight search things
set hlsearch
" Have the mouse enabled all the time:
set mouse=a
" show incomplete commands
set showcmd
" Sets how many lines of history VIM har to remember
set history=800
" Always switch to the current file directory
set autochdir
"Set the terminal title
set title
let &titleold=getcwd()
" Don't break the words with following character
set iskeyword+=_,$,@,%,#,-
set viminfo+=! " make sure it can save viminfo
set autowrite " auto writefile when sth happened such as :make or :last or others.See the help
set makeef=error.log " When using make, where should it dump the file
" Set to auto read when a file is changed from the outside
set autoread
" Folding settings
set nofoldenable "dont fold by default
set foldmarker={,}
set foldopen=block,hor,mark,percent,quickfix,tag
set foldmethod=indent "fold based on indent
set foldnestmax=10 "deepest fold is 10 levels
set foldlevel=1 "this is just what i use
map <leader>f1 :set fdm=manual<cr>
map <leader>f2 :set fdm=indent<cr>
map <leader>f3 :set fdm=marker<cr>
" Text options
set expandtab
set shiftwidth=2
set softtabstop=2
set tabstop=2
set smarttab
set lbr
set tw=500
set isfname-=\= " fix filename completion in VAR=/path
" Don't display start text :help iccf
set shortmess=atI
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" => Shortcuts Mapping
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Select All
map <leader>a ggVG
" Switch to current dir, see also :set autochdir
map <leader>cd :cd %:p:h<cr> :set tags=./tags <cr>
" Temp text buffer
map <leader>e :e ~/.buffer<cr>
" Remove the Windows ^M
map <leader>M :%s/\r//g<cr>
" Fast Quit
map <leader>q :q<cr>
" Fast reloading of the .vimrc
map <leader>es :e $VIMRC<cr>
" 自动载入VIM配置文件
"autocmd! bufwritepost vimrc source $MYVIMRC
"
" Turn backup off
set nobackup
set nowb
set noswapfile
" Undolist
map <leader>u :undolist<cr>
" Undo in insert mode
inoremap <C-z> <C-O>u
if version >= 703
" Turn undofile on
set undofile
" Set undofile path
set undodir=~/tmp/vim/
endif
" 关闭VIM的时候保存会话,按F6读取会话
set sessionoptions=buffers,sesdir,help,tabpages,winsize
let $VIMSESSION = '~/.session.vim'
au VimLeave * mks! $VIMSESSION
nmap <F6> :so $VIMSESSION<CR>
" Fast saving
map <leader>w :w!<cr>
map <c-s> <Esc>:w !sudo tee %
" Copypath
map <leader>file :echo expand("%:p")<cr>
" Mapping Q to exit instead of Ex mode
map Q :x<cr>
nmap :Q :q
nmap :W :w
"nmap :X :x
" Bash like
imap <C-A> <Home>
imap <C-B> <Left>
imap <C-E> <End>
imap <C-F> <Right>
imap <C-K> <Esc>d$i
" Command-line
cnoremap <C-A> <Home>
cnoremap <C-B> <Left>
cnoremap <C-E> <End>
cnoremap <C-F> <Right>
" Key mappings to ease browsing long lines
"noremap <C-J> gj
"noremap <C-K> gk
" Usefull when insert a new indent line
"imap fj <cr><C-O>O
" Remove tag content see :help object-select
"imap jf <C-O>cit
" Switch windows
nmap <Tab> <C-w>w
" Cursor moving in long line
nmap j gj
nmap k gk
" Move lines (Eclipse like)
nmap <C-Down> :<C-u>move .+1<cr>
nmap <C-Up> :<C-u>move .-2<cr>
imap <C-Down> <C-o>:<C-u>move .+1<cr>
imap <C-Up> <C-o>:<C-u>move .-2<cr>
vmap <C-Down> :move '>+1<cr>gv
vmap <C-Up> :move '<-2<cr>gv
" Windows issues
vmap <leader>c "+y
vmap <leader>x "+x
"map <leader>v "+gP
inoremap <leader>v <C-O>"+g
" Super paste
"inoremap <C-v> <esc>:set paste<cr>mui<C-R>+<esc>mv'uV'v=:set nopaste<cr>
"set clipboard=unnamed
" Easily change between backslash and forward slash with f/ or f\
nnoremap <silent> f/ :let tmp=@/<CR>:s:\\:/:ge<CR>:let @/=tmp<CR>
nnoremap <silent> f<Bslash> :let tmp=@/<CR>:s:/:\\:ge<CR>:let @/=tmp<CR>
" Use shell with ctrl-z
"map <C-Z> :shell<cr>
" Remove indenting on empty lines
map <F2> :%s/\s*$//g<cr>:noh<cr>''
" Paste toggle - when pasting something in, don't indent.
set pastetoggle=<F3>
" SVN Diff
map <F7> <leader>cd:new<cr>:read !svn diff<cr>:set syntax=diff buftype=nofile<cr>gg
" ROT13
map <F12> ggVGg?
" Quick Fix
map <leader>cw :cw<cr>
map <F3> :cp<cr>
map <F4> :cn<cr>
" Some nice mapping to switch syntax (useful if one mixes different languages in one file)
map <leader>1 :set syntax=xhtml<cr>
map <leader>2 :set ft=css<cr>
map <leader>3 :set ft=javascript<cr>
map <leader>4 :set syntax=python<cr>
map <leader>5 :set ft=php<cr>
map <leader>$ :syntax sync fromstart<cr>
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" => Moving around and tabs
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Disable Win Alt Key
set winaltkeys=no
" Actually, the tab does not switch buffers, but my arrows
" Use the arrows to something usefull
nmap <C-P> :bp<cr>
nmap <C-N> :bn<cr>
map <C-E> :Bclose<cr>
" Don't close window, when deleting a buffer
command! Bclose call <SID>BufcloseCloseIt()
function! <SID>BufcloseCloseIt()
let l:currentBufNum = bufnr("%")
let l:alternateBufNum = bufnr("#")
if buflisted(l:alternateBufNum)
buffer #
else
bnext
endif
if bufnr("%") == l:currentBufNum
new
endif
if buflisted(l:currentBufNum)
execute("bdelete! ".l:currentBufNum)
endif
endfunction
" Tab configuration
map <leader>tn :tabnext<cr>
map <leader>te :tabedit
try
set switchbuf=usetab
set stal=2
catch
endtry
set guitablabel=%t
""""""""""""""""""""""""""""""
" => Statusline
""""""""""""""""""""""""""""""
" Always hide the statusline
set laststatus=2
function! CurDir()
return
let curdir = substitute(getcwd(), '/Users/saiyagg/', "~/", "g")
return curdir
endfunction
"Format the statusline
"set statusline=%F%m%r%h%w\ %r%{CurDir()}%h\ [%Y,%{&ff},%{(&fenc==\"\")?&enc:&fenc}%{(&bomb?\",BOM\":\"\")}]\ [POS=%l,%v,%p%%,%L]
set statusline=%F%m%r%h%w\ [%Y,%{&ff},%{(&fenc==\"\")?&enc:&fenc}%{(&bomb?\",BOM\":\"\")}]\ [POS=%l,%v,%p%%,%L]
""""""""""""""""""""""""""""""
" => Visual
""""""""""""""""""""""""""""""
function! VisualSearch(direction) range
let l:saved_reg = @"
execute "normal! vgvy"
let l:pattern = escape(@", '\\/.*$^~[]')
let l:pattern = substitute(l:pattern, "\n$", "", "")
if a:direction == 'b'
execute "normal ?" . l:pattern . "^M"
else
execute "normal /" . l:pattern . "^M"
endif
let @/ = l:pattern
let @" = l:saved_reg
endfunction
" Basically you press * or # to search for the current selection !! Really useful
vnoremap <silent> * :call VisualSearch('f')<cr>
vnoremap <silent> # :call VisualSearch('b')<cr>
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" => Parenthesis/bracket expanding
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Map auto complete of (, ", ', [,{
inoremap ( ()<esc>:let leavechar=")"<cr>i
inoremap [ []<esc>:let leavechar="]"<cr>i
inoremap { {}<esc>:let leavechar="}"<cr>i
inoremap < <><esc>:let leavechar=">"<cr>i
"inoremap ' ''<esc>:let leavechar="'"<cr>i
inoremap " ""<esc>:let leavechar='"'<cr>i
inoremap )) (<esc>o)<esc>:let leavechar=")"<cr>O
inoremap ]] [<esc>o]<esc>:let leavechar="]"<cr>O
inoremap }} {<esc>o}<esc>:let leavechar="}"<cr>O
vnoremap #( <esc>`>a)<esc>`<i(<esc>
vnoremap #[ <esc>`>a]<esc>`<i[<esc>
vnoremap #{ <esc>`>a}<esc>`<i{<esc>
vnoremap #< <esc>`>a><esc>`<i<<esc>
vnoremap #' <esc>`>a'<esc>`<i'<esc>
vnoremap #" <esc>`>a"<esc>`<i"<esc>
map <leader>t2 :set shiftwidth=2<cr>
map <leader>t4 :set shiftwidth=4<cr>
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" => Plugin Settings
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" BufExplorer
let g:bufExplorerDefaultHelp=0
let g:bufExplorerMaxHeight=25
let g:bufExplorerResize=1
let g:bufExplorerShowRelativePath=1
let g:bufExplorerSortBy='mru'
let g:bufExplorerSplitBelow=1
let g:bufExplorerSplitRight=0 " 从左边出
let g:bufExplorerSplitVertSize = 30 " 分开高度
let g:bufExplorerSplitVertical=1 " 垂直分开
let g:bufExplorerUseCurrentWindow=1 " 在新窗口打开
" tagbar.vim
map <leader>t :TagbarToggle<cr>
" taglist.vim
set tags=./tags "now using autotag.vim to set tags
map <leader>t :TlistToggle<cr>
let Tlist_Auto_Open = 0 " let the tag list open automagically
let Tlist_Close_OnSelect = 1
let Tlist_Compact_Format = 1 " show small menu
let Tlist_Ctags_Cmd = 'ctags' " location of ctags
let Tlist_Enable_Fold_Column = 0 " do show folding tree
let Tlist_Exist_OnlyWindow = 1 " if you are the last, kill yourself
let Tlist_File_Fold_Auto_Close = 0 " fold closed other trees
let Tlist_GainFocus_On_ToggleOpen = 1
let Tlist_Inc_Winwidth = 0
let Tlist_Show_Menu = 1
let Tlist_Show_One_File = 1 "Show single file tags only
let Tlist_Sort_Type = "name" " order by
let Tlist_Use_Right_Window = 1 " split to the right side of the screen
let Tlist_WinWidth = 40 " 40 cols wide, so i can (almost always) read my functions
let g:tlist_javascript_settings = 'javascript;s:string;a:array;o:object;f:function;m:member'
let g:tlist_php_settings = 'php;c:Classes;f:Functions;d:Constants;j:Javascript Functions'
" NERD_tree.vim
map <leader>n :NERDTree<cr>
map <F8> :NERDTreeToggle<cr>
map <leader>nf :NERDTreeFind<cr>
let g:NERDTreeShowBookmarks = 1
let g:NERDTreeChDirMode = 2
let NERDTreeIgnore=['\.pyc$','\.svn$','\.tmp$','\.bak$','\~$']
" project.vim
map <leader>p :Project<cr>
" matrix.vim
map <leader>m :Matrix<cr>
" html.vim
let g:no_html_toolbar = 1
let g:do_xhtml_mappings = 'yes'
let g:html_tag_case = 'lowercase'
" closetag.vim
let g:closetag_html_style=1
" ToHTML
let use_xhtml = 1
let html_use_css = 1
let html_number_lines = 0
" mru.vim (History file List, Most Recent Used)
map <leader>h :MRU <cr>
let MRU_Max_Entries = 100
let MRU_Max_Menu_Entries = 10
let MRU_Exclude_Files = '^/tmp/.*\|^/var/tmp/.*'
let MRU_Window_Height = 8
" fencview.vim
let g:fencview_autodetect = 0
" acp.vim & SnipMate.vim
let g:acp_behaviorSnipmateLength = 1
let g:acp_completeOption = '.,w,b,u,t,i,k'
let g:acp_enableAtStartup = 1
let g:snips_author = 'Vingel <http://www.vingel.com/>'
"autocmd FileType python set ft=python.django " For SnipMate
autocmd FileType html,htmldjango set ft=html.django_template.jquery " For SnipMate & jquery
"au BufRead,BufNewFile *.c,*.cpp,*.py,*.js 2match Underlined /.\%81v/
au BufRead,BufNewFile *.c,*.cpp,*.py,*.js set colorcolumn=81
" neocomplcache.vim
let g:neocomplcache_enable_at_startup = 1
let g:neocomplcache_enable_smart_case = 1
let g:neocomplcache_enable_auto_select = 1
" matchit.vim
let b:match_ignorecase = 1
" fuf.vim
map <leader>fb :FufDirWithCurrentBufferDir<cr>
map <leader>fd :FufDir<cr>
map <leader>ff :FufFile<cr>
map <leader>ft :FufTag<cr>
map <leader>fh :FufHelp<cr>
" JSLint.vim
if has("win32")
let g:jslint_command = $VIMFILES . '/extra/jslint/jsl.exe'
else
let g:jslint_command = $VIMFILES . '/extra/jslint/jsl'
endif
let g:jslint_command_options = '-conf ' . $VIMFILES . '/extra/jslint/jsl.conf -nofilelisting -nocontext -nosummary -nologo -process'
map <leader>j :call JavascriptLint()<cr>
"
" ZenCoding
let g:user_zen_expandabbr_key = '<c-j>'
let g:use_zen_complete_tag = 1
" Pylint
let g:pylint_onwrite = 0
autocmd FileType python compiler pylint
" Grep
let Grep_Skip_Dirs = 'RCS CVS SCCS .svn generated'
set grepprg=/bin/grep\ -nH
" Command-t
noremap <leader>r :CommandT<cr>
"noremap <leader>y :CommandTFlush<cr>
let g:CommandTMaxHeight = 15
" DoxygenToolkit.vim
map <leader>d :Dox<cr>
" Vim grep
let Grep_Skip_Dirs = 'RCS CVS SCCS .svn generated'
set grepprg=/bin/grep\ -nH
" Python section
" Run the current buffer in python - ie. on leader+space
autocmd FileType python set textwidth=79 " PEP-8 Friendly
autocmd FileType python map <buffer> <leader><space> :w!<cr>:!python %<cr>
" set python modules path so that 'gd' can find it.
autocmd FileType python set path+=~/Dropbox/Library/python,/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/,/usr/lib/python2.5/site-packages/
" Set some bindings up for 'compile' of python
autocmd FileType python set makeprg=python\ -c\ \"import\ py_compile,sys;\ sys.stderr=sys.stdout;\ py_compile.compile(r'%')\"
autocmd FileType python set efm=%C\ %.%#,%A\ \ File\ \"%f\"\\,\ line\ %l%.%#,%Z%[%^\ ]%\\@=%m
" New Python file template
autocmd bufnewfile *.py call setline(1,'#!/usr/bin/env python') |
\ call setline(2,'#coding:utf-8') |
\ call setline(3,'#author: Vingel <http://www.vingel.com>') |
\ call setline(4,'') |
\ call setline(5,'') |
\ exe "normal G"
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" => Set OminComplete
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
set completeopt=longest,menu
autocmd FileType c set omnifunc=ccomplete#Complete
autocmd FileType python set omnifunc=pythoncomplete#Complete
autocmd FileType html,markdown setlocal omnifunc=htmlcomplete#CompleteTags
autocmd FileType xml setlocal omnifunc=xmlcomplete#CompleteTags
autocmd FileType css setlocal omnifunc=csscomplete#CompleteCSS
autocmd FileType javascript setlocal omnifunc=javascriptcomplete#CompleteJS
autocmd FileType php set omnifunc=phpcomplete#CompletePHP
autocmd FileType php setlocal dict+=$VIMFILES/dict/php_functions.txt
autocmd FileType python setlocal omnifunc=pythoncomplete#Complete
"Nginx
autocmd BufRead,BufNewFile /usr/local/nginx/conf/* /etc/nginx/* set ft=nginx
"Velocity
autocmd BufNewFile,BufRead *.vm set ft=html fenc=gbk syntax=velocity
"Markdown
"autocmd BufNewFile,BufRead *.markdown,*.md,*.mdown,*.mkd,*.mkdn
"CSSTidy :brew install csstidy
"autocmd filetype css setlocal equalprg=csstidy\ -\ --silent=true
"Write when you leave insert mode
autocmd InsertLeave * write
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" => Colors & Fonts & Syntax
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Enable syntax
syntax enable
" Syntax
au BufRead,BufNewFile *.js set ft=javascript
au BufNewFile,BufRead *.log setf log
let filetype_m= "objc"
au BufRead,BufNewFile *.go set filetype=go
if has("gui_running")
colorscheme yytextmate
" Highlight current
set cursorline
"set cursorcolumn
hi cursorline guibg=#333333
hi CursorColumn guibg=#333333
" Omni menu colors
hi Pmenu guibg=#333333
hi PmenuSel guibg=#555555 guifg=#ffffff
" Toggle Menu and Toolbar and switch fullscreen mode
set guioptions-=b " Hide bottom scrollbar
set guioptions-=R " Hide right scrollbar
set guioptions-=r
set guioptions-=l " Hide left scrollbar
set guioptions-=L
set guioptions-=m " Hide Menu
set guioptions-=T " Hide Toolbar
map <silent> <F11> :if &guioptions =~# 'm' <Bar>
\set guioptions-=m <bar>
\else <Bar>
\set guioptions+=m <Bar>
\endif<cr>
" Auto Maximize when vim starts.
if has("win32")
au GUIEnter * simalt ~x
elseif has("unix")
au GUIEnter * winpos 0 0
"set lines=999 columns=9999
endif
else
set background=dark
colorscheme vivi
endif
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" => Set FileEncodeing
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Favorite filetypes
set fileformats=unix,dos,mac
if has("multi_byte")
set encoding=utf-8
set fileencoding=utf-8
set fileencodings=utf-8,gbk,chinese,latin1
set formatoptions+=mM " for charactors fold and patch
set nobomb " Don' use Unicode
set helplang=cn
if v:lang =~? '^\(zh\)\|\(ja\)\|\(ko\)'
set ambiwidth=double
endif
if has("win32")
set fileencoding=chinese
" Language messages en_US.utf-8
language messages zh_CN.utf-8
let &termencoding=&encoding
set guifont=Consolas:h12:cDEFAULT
source $VIMRUNTIME\delmenu.vim
source $VIMRUNTIME\menu.vim
set path+=E:\Vingel\bin\python\Lib\site-packages\
elseif has("mac")
colorscheme desert
if has("gui_macvim")
winpos 52 42
let macvim_skip_cmd_opt_movement = 1
let macvim_hig_shift_movement = 1
set transparency=4
set anti " 开启抗锯齿渲染
set guifont=Consolas:h18
"macmenu &File.New\ Tab key=<nop>
endif
"Unix
else
set guifont=Bitstream\ Vera\ Sans\ Mono\ 14
endif
else
echoerr "Sorry, this version of gvim was not compiled with +multi_byte"
endif
if has("autocmd")
au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif
endif
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" My information
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
set dictionary+=$VIMFILES/dict/dicts.txt,/usr/share/dict/words
iab xdate <c-r>=strftime("%Y-%m-%d %H:%M:%S")<cr>
" vim:tw=80 et sw=4 comments=\:\"
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Tips
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" delete blank lines :g/^\s*$/d
" diff :vertical diffsplit filename
" vim plug begin
call plug#begin('~/.vim/plugged')
" Make sure you use single quotes
Plug 'junegunn/vim-emoji'
" Add plugins to &runtimepath
call plug#end()
" vim plug end