-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathinit.vim
107 lines (91 loc) · 2.76 KB
/
init.vim
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
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" https://github.com/linjiX/nvim "
" _ _ _ _ __ __ __ _ "
" | |(_) _ __ (_)(_)\ \/ / / /_ __ __ __(_) _ __ ___ "
" | || || '_ \ | || | \ / / /| '_ \\ \ / /| || '_ ` _ \ "
" | || || | | | | || | / \ / / | | | |\ V / | || | | | | | "
" |_||_||_| |_|_/ ||_|/_/\_\/_/ |_| |_| \_/ |_||_| |_| |_| "
" |__/ "
" "
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
let mapleader="\<Space>"
let $VIM_HOME = expand('<sfile>:p:h')
" create cache directory
let $MY_CACHE_PATH = has('macunix') ? $HOME .'/Library/Caches/vim_cache'
\ : $HOME .'/.cache/vim_cache'
if !isdirectory($MY_CACHE_PATH)
call mkdir($MY_CACHE_PATH, 'p')
endif
" Plug 'sheerun/vim-polyglot'
let g:polyglot_disabled = ['sh', 'python-compiler']
" source all configurations
source $VIM_HOME/plugs.vim
if !exists('g:auto_installation')
let s:configs = split(glob($VIM_HOME .'/common/*.vim'))
let s:configs += split(glob($VIM_HOME .'/config/*.vim'))
for s:config in s:configs
execute 'source '. s:config
endfor
endif
silent! colorscheme solarized
" silent! colorscheme molokai
set nobackup
set number
set nowrap
set confirm
set cursorline
set cursorcolumn
set colorcolumn=100
set signcolumn=number
set textwidth=0
set splitright
set lazyredraw
set mouse=
set list
set listchars=tab:-->,nbsp:+,precedes:<,extends:>
set hidden
set wildmode=longest:full,full
set scrolloff=1
set history=30
set updatetime=10
set synmaxcol=500
set expandtab
set tabstop=4
set softtabstop=4
set shiftwidth=4
set completeopt-=preview
set diffopt+=vertical
set path=.,/usr/include,/usr/local/include
set ttimeoutlen=25
if has('macunix')
set clipboard=unnamed
else
set clipboard=unnamedplus
endif
set fillchars=fold:\ ,vert:│
set foldlevel=100
set foldtext=fold#Text()
" for echodoc
set noshowmode
set shortmess+=cS
" Disable generate '.netrwhist'
let g:netrw_dirhistmax = 0
if has('nvim')
set inccommand=nosplit
set guicursor=n-v-c:block,i-ci-ve:ver25,r-cr:hor20,o:hor50
\,a:blinkwait700-blinkoff400-blinkon250-Cursor/lCursor
\,sm:block-blinkwait175-blinkoff150-blinkon175
else
" Change cursor shape in different modes
let &t_EI .= "\e[1 q" " EI = NORMAL mode (ELSE)
let &t_SR .= "\e[3 q" " SR = REPLACE mode
let &t_SI .= "\e[5 q" " SI = INSERT mode
let &t_Co = 256
endif
if has('gui_running')
set guifont=Consolas-with-Yahei:h14
if has('macunix')
set macmeta
endif
endif
scriptencoding utf-8