迁移仓库

This commit is contained in:
zeek 2020-02-23 22:09:42 +08:00
commit e6e987eab5
21 changed files with 2569 additions and 0 deletions

2
.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
_book
node_modules

1393
.vim/colors/gruvbox.vim Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,413 @@
" Vim color file
"
" Author: Liu-Cheng Xu
" URL: https://github.com/liuchengxu/space-vim-dark
"
" Note: Inspired by spacemacs-dark theme
hi clear
if v:version > 580
" no guarantees for version 5.8 and below, but this makes it stop
" complaining
hi clear
if exists('g:syntax_on')
syntax reset
endif
endif
let g:colors_name='space-vim-dark'
" refer to http://www.calmar.ws/vim/256-xterm-24bit-rgb-color-chart.html
let s:color256 = {
\ 0 : '#000000', 1 : '#800000', 2 : '#008000', 3 : '#808000', 4 : '#000080', 5 : '#800080', 6 : '#008080' , 7 : '#c0c0c0',
\ 8 : '#808080', 9 : '#ff0000', 10 : '#00ff00', 11 : '#ffff00', 12 : '#0000ff', 13 : '#ff00ff', 14 : '#00ffff', 15 : '#ffffff',
\ 16 : '#000000', 17 : '#00005f', 18 : '#000087', 19 : '#0000af', 20 : '#0000d7', 21 : '#0000ff',
\ 22 : '#005f00', 23 : '#005f5f', 24 : '#005f87', 25 : '#005faf', 26 : '#005fd7', 27 : '#005fff',
\ 28 : '#008700', 29 : '#00875f', 30 : '#008787', 31 : '#0087af', 32 : '#0087d7', 33 : '#0087ff',
\ 34 : '#00af00', 35 : '#00af5f', 36 : '#00af87', 37 : '#00afaf', 38 : '#00afd7', 39 : '#00afff',
\ 40 : '#00d700', 41 : '#00d75f', 42 : '#00d787', 43 : '#00d7af', 44 : '#00d7d7', 45 : '#00d7ff',
\ 46 : '#00ff00', 47 : '#00ff5f', 48 : '#00ff87', 49 : '#00ffaf', 50 : '#00ffd7', 51 : '#00ffff',
\ 52 : '#5f0000', 53 : '#5f005f', 54 : '#5f0087', 55 : '#5f00af', 56 : '#5f00d7', 57 : '#5f00ff',
\ 58 : '#5f5f00', 59 : '#5f5f5f', 60 : '#5f5f87', 61 : '#5f5faf', 62 : '#5f5fd7', 63 : '#5f5fff',
\ 64 : '#5f8700', 65 : '#5f875f', 66 : '#5f8787', 67 : '#5f87af', 68 : '#5f87d7', 69 : '#5f87ff',
\ 70 : '#5faf00', 71 : '#5faf5f', 72 : '#5faf87', 73 : '#5fafaf', 74 : '#5fafd7', 75 : '#5fafff',
\ 76 : '#5fd700', 77 : '#5fd75f', 78 : '#5fd787', 79 : '#5fd7af', 80 : '#5fd7d7', 81 : '#5fd7ff',
\ 82 : '#5fff00', 83 : '#5fff5f', 84 : '#5fff87', 85 : '#5fffaf', 86 : '#5fffd7', 87 : '#5fffff',
\ 88 : '#870000', 89 : '#87005f', 90 : '#870087', 91 : '#8700af', 92 : '#8700d7', 93 : '#8700ff',
\ 94 : '#875f00', 95 : '#875f5f', 96 : '#875f87', 97 : '#875faf', 98 : '#875fd7', 99 : '#875fff',
\ 100 : '#878700', 101 : '#87875f', 102 : '#878787', 103 : '#8787af', 104 : '#8787d7', 105 : '#8787ff',
\ 106 : '#87af00', 107 : '#87af5f', 108 : '#87af87', 109 : '#87afaf', 110 : '#87afd7', 111 : '#87afff',
\ 112 : '#87d700', 113 : '#87d75f', 114 : '#87d787', 115 : '#87d7af', 116 : '#87d7d7', 117 : '#87d7ff',
\ 118 : '#87ff00', 119 : '#87ff5f', 120 : '#87ff87', 121 : '#87ffaf', 122 : '#87ffd7', 123 : '#87ffff',
\ 124 : '#af0000', 125 : '#af005f', 126 : '#af0087', 127 : '#af00af', 128 : '#af00d7', 129 : '#af00ff',
\ 130 : '#af5f00', 131 : '#af5f5f', 132 : '#af5f87', 133 : '#af5faf', 134 : '#af5fd7', 135 : '#af5fff',
\ 136 : '#af8700', 137 : '#af875f', 138 : '#af8787', 139 : '#af87af', 140 : '#af87d7', 141 : '#af87ff',
\ 142 : '#afaf00', 143 : '#afaf5f', 144 : '#afaf87', 145 : '#afafaf', 146 : '#afafd7', 147 : '#afafff',
\ 148 : '#afd700', 149 : '#afd75f', 150 : '#afd787', 151 : '#afd7af', 152 : '#afd7d7', 153 : '#afd7ff',
\ 154 : '#afff00', 155 : '#afff5f', 156 : '#afff87', 157 : '#afffaf', 158 : '#afffd7', 159 : '#afffff',
\ 160 : '#d70000', 161 : '#d7005f', 162 : '#d70087', 163 : '#d700af', 164 : '#d700d7', 165 : '#d700ff',
\ 166 : '#d75f00', 167 : '#d75f5f', 168 : '#d75f87', 169 : '#d75faf', 170 : '#d75fd7', 171 : '#d75fff',
\ 172 : '#d78700', 173 : '#d7875f', 174 : '#d78787', 175 : '#d787af', 176 : '#d787d7', 177 : '#d787ff',
\ 178 : '#d7af00', 179 : '#d7af5f', 180 : '#d7af87', 181 : '#d7afaf', 182 : '#d7afd7', 183 : '#d7afff',
\ 184 : '#d7d700', 185 : '#d7d75f', 186 : '#d7d787', 187 : '#d7d7af', 188 : '#d7d7d7', 189 : '#d7d7ff',
\ 190 : '#d7ff00', 191 : '#d7ff5f', 192 : '#d7ff87', 193 : '#d7ffaf', 194 : '#d7ffd7', 195 : '#d7ffff',
\ 196 : '#ff0000', 197 : '#ff005f', 198 : '#ff0087', 199 : '#ff00af', 200 : '#ff00d7', 201 : '#ff00ff',
\ 202 : '#ff5f00', 203 : '#ff5f5f', 204 : '#ff5f87', 205 : '#ff5faf', 206 : '#ff5fd7', 207 : '#ff5fff',
\ 208 : '#ff8700', 209 : '#ff875f', 210 : '#ff8787', 211 : '#ff87af', 212 : '#ff87d7', 213 : '#ff87ff',
\ 214 : '#ffaf00', 215 : '#ffaf5f', 216 : '#ffaf87', 217 : '#ffafaf', 218 : '#ffafd7', 219 : '#ffafff',
\ 220 : '#ffd700', 221 : '#ffd75f', 222 : '#ffd787', 223 : '#ffd7af', 224 : '#ffd7d7', 225 : '#ffd7ff',
\ 226 : '#ffff00', 227 : '#ffff5f', 228 : '#ffff87', 229 : '#ffffaf', 230 : '#ffffd7', 231 : '#ffffff',
\
\ 232 : '#080808', 233 : '#121212', 234 : '#1c1c1c', 235 : '#262626', 236 : '#303030', 237 : '#3a3a3a',
\ 238 : '#444444', 239 : '#4e4e4e', 240 : '#585858', 241 : '#606060', 242 : '#666666', 243 : '#767676',
\ 244 : '#808080', 245 : '#8a8a8a', 246 : '#949494', 247 : '#9e9e9e', 248 : '#a8a8a8', 249 : '#b2b2b2',
\ 250 : '#bcbcbc', 251 : '#c6c6c6', 252 : '#d0d0d0', 253 : '#dadada', 254 : '#e4e4e4', 255 : '#eeeeee',
\ }
" ========|===========
" Red | 160 168
" Blue | 67 68 111
" Yellow | 114 179
" Orange | 173 178
" Purple | 140
" Magenta | 128
" ========|===========
let s:colors = {
\ 16: '#292b2e', 24: '#3C8380', 28: '#c269fe', 30: '#2aa1ae', 36: '#20af81', 40: '#00ff00',
\ 59: '#FF73B9', 68: '#4f97d7', 75: '#FF62B0', 76: '#86dc2f', 81: '#f9bb00', 88: '#330033',
\ 104: '#df90ff', 114: '#67b11d', 128: '#e76a49', 135: '#B7B7FF', 136: '#dc752f', 139: '#d698fe',
\ 140: '#b888e2', 141: '#9a9aba', 151: '#74BAAC', 160: '#e0211d', 161: '#E469FE', 167: '#ce537a',
\ 168: '#ce537a', 169: '#bc6ec5', 171: '#6094DB', 173: '#e18254', 176: '#E697E6', 177: '#D881ED',
\ 178: '#d1951d', 179: '#d4b261', 196: '#e0211d', 204: '#ce537a', 207: '#FF68DD', 214: '#FF4848',
\ 218: '#d19a66', 225: '#FFC8C8', 229: '#fff06a', 233: '#303030', 234: '#212026', 235: '#292b2e',
\ 236: '#34323e', 238: '#544a65', 241: '#534b5d', 244: '#b4d1b6',
\ }
function! s:hi(item, fg, bg, cterm, gui)
let l:fg = empty(a:fg) ? '' : printf('ctermfg=%d guifg=%s', a:fg, get(s:colors, a:fg, s:color256[a:fg]))
let l:bg = empty(a:bg) ? '' : printf('ctermbg=%d guibg=%s', a:bg, get(s:colors, a:bg, s:color256[a:bg]))
let l:style = printf('cterm=%s gui=%s', a:cterm, a:gui)
execute 'hi '.a:item.' '.l:fg.' '.l:bg.' '.l:style
endfunction
let s:fg = 249
let s:bg = get(g:, 'space_vim_dark_background', 235)
let s:bias = s:bg - 235
let s:bg0 = s:bg - 1
let s:bg1 = s:bg + 1
let s:bg2 = s:bg + 2
let s:bg3 = s:bg + 3
let s:bg4 = s:bg + 4
" call s:hi(item, fg, bg, cterm, gui)
call s:hi('Normal' , 249 , s:bg , 'None' , 'None')
call s:hi('Cursor' , 235 , 178 , 'bold' , 'bold')
call s:hi('LineNr' , 238+s:bias , s:bg0 , 'None' , 'None')
call s:hi('CursorLine' , '' , s:bg0 , 'None' , 'None')
call s:hi('CursorLineNr' , 134 , s:bg0 , 'None' , 'None')
call s:hi('CursorColumn' , '' , s:bg0 , 'None' , 'None')
call s:hi('ColorColumn' , '' , s:bg0 , 'None' , 'None')
" bug. opposite here.
call s:hi('StatusLine' , 140 , s:bg2 , 'None' , 'None')
call s:hi('StatusLineNC' , 242 , s:bg1 , 'None' , 'None')
call s:hi('StatusLineTerm' , 140 , s:bg2 , 'bold' , 'bold')
call s:hi('StatusLineTermNC' , 244 , s:bg1 , 'bold' , 'bold')
call s:hi('TabLine' , 66 , s:bg3 , 'None' , 'None')
call s:hi('TabLineSel' , 178 , s:bg4 , 'None' , 'None')
call s:hi('TabLineFill' , 145 , s:bg2 , 'None' , 'None')
call s:hi('WildMenu' , 214 , s:bg3 , 'None' , 'None')
call s:hi('Boolean' , 178 , '' , 'None' , 'None')
call s:hi('Character' , 75 , '' , 'None' , 'None')
call s:hi('Number' , 176 , '' , 'None' , 'None')
call s:hi('Float' , 135 , '' , 'None' , 'None')
call s:hi('String' , 36 , '' , 'None' , 'None')
call s:hi('Conditional' , 68 , '' , 'bold' , 'bold')
call s:hi('Constant' , 218 , '' , 'None' , 'None')
call s:hi('Debug' , 225 , '' , 'None' , 'None')
call s:hi('Define' , 177 , '' , 'None' , 'None')
call s:hi('Delimiter' , 151 , '' , 'None' , 'None')
call s:hi('DiffAdd' , '' , 24 , 'None' , 'None')
call s:hi('DiffChange' , 181 , 239 , 'None' , 'None')
call s:hi('DiffDelete' , 162 , 53 , 'None' , 'None')
call s:hi('DiffText' , '' , 102 , 'None' , 'None')
call s:hi('Exception' , 204 , '' , 'bold' , 'bold')
call s:hi('Function' , 169 , '' , 'bold' , 'bold')
call s:hi('Identifier' , 167 , '' , 'None' , 'None')
call s:hi('Ignore' , 244 , '' , 'None' , 'None')
call s:hi('Operator' , 111 , '' , 'None' , 'None')
call s:hi('FoldColumn' , 67 , s:bg1 , 'None' , 'None')
call s:hi('Folded' , 133 , s:bg1 , 'bold' , 'bold')
call s:hi('PreCondit' , 139 , '' , 'None' , 'None')
call s:hi('PreProc' , 176 , '' , 'None' , 'None')
call s:hi('Question' , 81 , '' , 'None' , 'None')
call s:hi('Directory' , 67 , '' , 'bold' , 'bold')
call s:hi('Repeat' , 68 , '' , 'bold' , 'bold')
call s:hi('Keyword' , 68 , '' , 'bold' , 'bold')
call s:hi('Statement' , 68 , '' , 'None' , 'None')
call s:hi('Structure' , 68 , '' , 'bold' , 'bold')
call s:hi('Label' , 104 , '' , 'None' , 'None')
call s:hi('Macro' , 140 , '' , 'None' , 'None')
call s:hi('Type' , 68 , '' , 'None' , 'None')
call s:hi('Typedef' , 68 , '' , 'None' , 'None')
call s:hi('Underlined' , '' , '' , 'underline' , 'underline')
call s:hi('Search' , 16 , 76 , 'bold' , 'bold')
call s:hi('IncSearch' , 16 , 76 , 'bold' , 'bold')
call s:hi('MatchParen', 40 , s:bg0 , 'bold,underline', 'bold,underline')
call s:hi('ModeMsg' , 229 , '' , 'None' , 'None')
" Popup menu
call s:hi('Pmenu' , 141 , s:bg1 , 'None' , 'None')
call s:hi('PmenuSel' , 251 , 97 , 'None' , 'None')
call s:hi('PmenuSbar' , 28 , 233 , 'None' , 'None')
call s:hi('PmenuThumb' , 160 , 97 , 'None' , 'None')
" SignColumn may relate to ale sign
call s:hi('SignColumn' , 118 , s:bg , 'None' , 'None')
call s:hi('Todo' , 172 , s:bg , 'bold' , 'bold')
" VertSplit consistent with normal background to hide it
call s:hi('VertSplit' , s:bg0 , '' , 'None' , 'None')
call s:hi('Warning' , 136 , '' , 'bold' , 'bold')
call s:hi('WarningMsg' , 136 , '' , 'bold' , 'bold')
call s:hi('Error' , 160 , s:bg , 'bold' , 'bold')
call s:hi('ErrorMsg' , 196 , s:bg , 'bold' , 'bold')
call s:hi('Special' , 169 , '' , 'None' , 'None')
call s:hi('SpecialKey' , 59 , '' , 'None' , 'None')
call s:hi('SpecialChar' , 171 , '' , 'bold' , 'bold')
call s:hi('SpecialComment' , 24 , '' , 'None' , 'None')
call s:hi('SpellBad' , 168 , '' , 'underline' , 'undercurl')
call s:hi('SpellCap' , 110 , '' , 'underline' , 'undercurl')
call s:hi('SpellLocal' , 253 , '' , 'underline' , 'undercurl')
call s:hi('SpellRare' , 218 , '' , 'underline' , 'undercurl')
call s:hi('Tag' , 161 , '' , 'None' , 'None')
call s:hi('Title' , 176 , '' , 'None' , 'None')
call s:hi('StorageClass' , 178 , '' , 'bold' , 'bold')
call s:hi('Comment' , 30 , '' , 'None' , 'italic')
call s:hi('Visual' , '' , s:bg3 , 'None' , 'None')
call s:hi('VisualNOS' , '' , s:bg3 , 'None' , 'None')
" tilde group
call s:hi('NonText' , 241 , '' , 'None' , 'None')
hi MatchParen guibg=NONE
hi SignColumn guibg=NONE
hi link qfLineNr Type
"""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Language
"""""""""""""""""""""""""""""""""""""""""""""""""""""""
" markdown
call s:hi('markdownH1' , 68 , '' , 'bold' , 'bold')
call s:hi('markdownH2' , 36 , '' , 'bold' , 'bold')
call s:hi('markdownH3' , 114 , '' , 'bold' , 'bold')
call s:hi('markdownH4' , 178 , '' , 'bold' , 'bold')
call s:hi('markdownH5' , 68 , '' , 'None' , 'None')
call s:hi('markdownH6' , 36 , '' , 'None' , 'None')
call s:hi('mkdCode' , 114 , '' , 'None' , 'None')
call s:hi('mkdItalic' , 36 , '' , 'None' , 'italic')
" c
call s:hi('cConstant' , 178 , '' , 'none' , 'none')
call s:hi('cCustomClass' , 167 , '' , 'bold' , 'bold')
" cpp
call s:hi('cppSTLexception', 199, '', 'bold', 'bold')
call s:hi('cppSTLnamespace', 178, '', 'bold', 'bold')
" css
call s:hi('cssTagName' , 68 , '' , 'bold' , 'bold')
call s:hi('cssProp' , 169 , '' , 'bold' , 'bold')
" dot
call s:hi('dotKeyChar' , 176 , '' , 'none' , 'none')
call s:hi('dotType' , 178 , '' , 'none' , 'none')
" sh
call s:hi('shSet' , 68 , '' , 'bold' , 'bold')
call s:hi('shLoop' , 68 , '' , 'bold' , 'bold')
call s:hi('shFunctionKey' , 68 , '' , 'bold' , 'bold')
call s:hi('shTestOpr' , 178 , '' , 'none' , 'none')
" solidity
call s:hi('solContract' , 178 , '' , 'bold' , 'bold')
" vimL
call s:hi('vimLet' , 68 , '' , 'bold' , 'bold')
call s:hi('vimFuncKey' , 68 , '' , 'bold' , 'bold')
call s:hi('vimCommand' , 68 , '' , 'bold' , 'bold')
call s:hi('vimGroup' , 67 , '' , 'bold' , 'bold')
call s:hi('vimHiGroup' , 67 , '' , 'bold' , 'bold')
" rust
call s:hi('rustKeyword' , 68 , '' , 'bold' , 'bold')
call s:hi('rustModPath' , 68 , '' , 'none' , 'none')
call s:hi('rustTrait' , 168 , '' , 'bold' , 'bold')
" json
call s:hi('jsonStringSQError', 160, '', 'none', 'none')
" xml
call s:hi('xmlTag' , 167 , '' , 'none' , 'none')
call s:hi('xmlEndTag' , 167 , '' , 'none' , 'none')
call s:hi('xmlTagName' , 167 , '' , 'none' , 'none')
" go
call s:hi('goType' , 176 , '' , 'none' , 'none')
call s:hi('goFloat' , 135 , '' , 'none' , 'none')
call s:hi('goField' , 68 , '' , 'none' , 'none')
call s:hi('goTypeName' , 169 , '' , 'bold' , 'bold')
call s:hi('goFunction' , 169 , '' , 'bold' , 'bold')
call s:hi('goMethodCall' , 168 , '' , 'bold' , 'bold')
call s:hi('goReceiverType' , 114 , '' , 'none' , 'none')
call s:hi('goFunctionCall' , 169 , '' , 'bold' , 'bold')
call s:hi('goFormatSpecifier' , 68 , '' , 'none' , 'none')
call s:hi('goTypeConstructor' , 178 , '' , 'none' , 'none')
call s:hi('goPredefinedIdentifiers' , 140 , '' , 'none' , 'none')
" make
call s:hi('makeCommands' , 68 , '' , 'none' , 'none')
call s:hi('makeSpecTarget' , 68 , '' , 'bold' , 'bold')
" java
call s:hi('rustScopeDecl' , 68 , '' , 'bold' , 'bold')
call s:hi('javaClassDecl' , 168 , '' , 'bold' , 'bold')
" scala
call s:hi('scalaKeyword' , 68 , '' , 'bold' , 'bold')
call s:hi('scalaNameDefinition' , 68 , '' , 'bold' , 'bold')
" ruby
call s:hi('rubyClass' , 68 , '' , 'bold' , 'bold')
call s:hi('rubyDefine' , 68 , '' , 'bold' , 'bold')
call s:hi('rubyInterpolationDelimiter' , 176 , '' , 'none' , 'none')
" html
hi link htmlSpecialTagName Tag
call s:hi('htmlItalic' , 36 , '' , 'None' , 'italic')
" python-mode
call s:hi('pythonLambdaExpr' , 105 , '' , 'none' , 'none')
call s:hi('pythonClass' , 207 , '' , 'bold' , 'bold')
call s:hi('pythonParameters' , 147 , '' , 'none' , 'none')
call s:hi('pythonParam' , 108 , '' , 'none' , 'none')
call s:hi('pythonBrackets' , 183 , '' , 'none' , 'none')
call s:hi('pythonClassParameters' , 111 , '' , 'none' , 'none')
call s:hi('pythonBuiltinType' , 68 , '' , 'none' , 'none')
call s:hi('pythonBuiltinObj' , 71 , '' , 'bold' , 'bold')
call s:hi('pythonBuiltinFunc' , 169 , '' , 'bold' , 'bold')
call s:hi('pythonOperator' , 68 , '' , 'bold' , 'bold')
call s:hi('pythonInclude' , 68 , '' , 'bold' , 'bold')
call s:hi('pythonSelf' , 68 , '' , 'bold' , 'bold')
call s:hi('pythonStatement' , 68 , '' , 'bold' , 'bold')
call s:hi('pythonDottedName' , 169 , '' , 'bold' , 'bold')
call s:hi('pythonDecorator' , 169 , '' , 'bold' , 'bold')
call s:hi('pythonException' , 166 , '' , 'bold' , 'bold')
call s:hi('pythonError' , 195 , '' , 'none' , 'none')
call s:hi('pythonIndentError' , 196 , '' , 'none' , 'none')
call s:hi('pythonSpaceError' , 196 , '' , 'none' , 'none')
"""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Plugins
"""""""""""""""""""""""""""""""""""""""""""""""""""""""
" ALE
hi link ALEErrorSign Error
hi link ALEWarningSign Warning
" vim-easymotion
call s:hi('EasyMotionTarget' , 76 , '' , 'bold' , 'bold')
call s:hi('EasyMotionTarget2First' , 162 , '' , 'bold' , 'bold')
call s:hi('EasyMotionTarget2Second' , 69 , '' , 'bold' , 'bold')
" vim-markdown
call s:hi('htmlH1' , 68 , '' , 'bold' , 'bold')
call s:hi('htmlH2' , 36 , '' , 'bold' , 'bold')
call s:hi('htmlH3' , 114 , '' , 'bold' , 'bold')
call s:hi('htmlH4' , 178 , '' , 'bold' , 'bold')
call s:hi('htmlH5' , 68 , '' , 'None' , 'None')
call s:hi('htmlH6' , 36 , '' , 'None' , 'None')
" vim-indent-guides
let g:indent_guides_auto_colors = 0
call s:hi('IndentGuidesOdd' , '' , 237 , 'none' , 'none')
call s:hi('IndentGuidesEven' , '' , 239 , 'none' , 'none')
" vim-gitgutter
call s:hi('GitGutterAdd' , 36 , '' , 'none' , 'none')
call s:hi('GitGutterChange' , 178 , '' , 'none' , 'none')
call s:hi('GitGutterDelete' , 160 , '' , 'none' , 'none')
call s:hi('GitGutterChangeDelete' , 140 , '' , 'none' , 'none')
" vim-signify
call s:hi('SignifySignAdd' , 36 , '' , 'none' , 'none')
call s:hi('SignifySignChange' , 178 , '' , 'none' , 'none')
call s:hi('SignifySignDelete' , 160 , '' , 'none' , 'none')
call s:hi('SignifySignChangeDelete', 140 , '' , 'none' , 'none')
" vim-startify
hi link StartifyFile Normal
call s:hi('StartifyHeader' , 177 , '' , 'none' , 'none')
call s:hi('startifySection' , 68 , '' , 'bold' , 'bold')
" YouCompleteMe
call s:hi('YcmErrorSection' , 249 , 5 , 'none' , 'none')
call s:hi('YcmWarningSection' , 249 , 60 , 'none' , 'none')
" vim-leader-guide
hi link LeaderGuideDesc Normal
call s:hi('LeaderGuideKeys' , 169 , '' , 'bold' , 'bold')
call s:hi('LeaderGuideBrackets' , 36 , '' , 'none' , 'none')
" NERDTree
call s:hi('NERDTreeCWD' , 169 , '' , 'bold' , 'bold')
call s:hi('NERDTreeUp' , 68 , '' , 'bold' , 'bold')
call s:hi('NERDTreeDir' , 68 , '' , 'bold' , 'bold')
call s:hi('NERDTreeDirSlash' , 68 , '' , 'bold' , 'bold')
call s:hi('NERDTreeOpenable' , 68 , '' , 'bold' , 'bold')
call s:hi('NERDTreeClosable' , 68 , '' , 'bold' , 'bold')
" Tagbar
call s:hi('TagbarKind' , 169 , '' , 'bold' , 'bold')
call s:hi('TagbarScope' , 169 , '' , 'bold' , 'bold')
call s:hi('TagbarHighlight' , 16 , 36 , 'bold' , 'bold')
call s:hi('TagbarNestedKind' , 68 , '' , 'bold' , 'bold')
call s:hi('TagbarVisibilityPublic' , 34 , '' , 'none' , 'none')
" vim-signature
call s:hi('SignatureMarkText', 178, '', 'bold', 'bold')
" vim_current_word
call s:hi('CurrentWord' , '' , s:bg1 , 'underline' , 'underline')
call s:hi('CurrentWordTwins' , '' , s:bg1 , 'none' , 'none')
delf s:hi
unlet s:color256 s:colors s:bg
" Must be at the end, because of ctermbg=234 bug.
" https://groups.google.com/forum/#!msg/vim_dev/afPqwAFNdrU/nqh6tOM87QUJ
set background=dark

195
.vim/conf/base.vim Normal file
View File

@ -0,0 +1,195 @@
let g:airline_powerline_fonts = 1
" scrooloose/nerdtree
let NERDTreeWinPos='left'
let NERDTreeWinSize=40
let NERDChristmasTree=0
let NERDTreeChDirMode=2
let NERDTreeShowBookmarks=1
"autocmd VimEnter * NERDTree
map :silent! NERDTreeToggle
let NERDTreeShowBookmarks=1
let NERDTreeIgnore=['\~$', '\.pyc$', '\.swp$', '.obj$', '.o$', '.so', '.egg$', '^.git$', '^.svn$', '^.hg$', '^node_modules$']
autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTreeType") &&b:NERDTreeType == "primary") | q | endif
"map <leader>n :NERDTreeToggle<CR>
map <leader><F9> :NERDTreeToggle<CR>
" Xuyuanp/nerdtree-git-plugin
let g:NERDTreeIndicatorMapCustom = {
\ "Modified" : "✹",
\ "Staged" : "✚",
\ "Untracked" : "✭",
\ "Renamed" : "➜",
\ "Unmerged" : "═",
\ "Deleted" : "✖",
\ "Dirty" : "✗",
\ "Clean" : "✔︎",
\ "Unknown" : "?"
\ }
" majutsushi/tagbar
let g:tagbar_width=35
nmap <F8> :TagbarToggle<CR>
autocmd BufReadPost *.cpp,*.c,*.h,*.hpp,*.cc,*.cxx,*.java,*.py,*.js,*.sql call tagbar#autoopen()
let g:tagbar_ctags_bin='/usr/bin/ctags'
" vim-airline/vim-airline
let g:airline#symbols = {}
let g:airline#extensions#tabline#enabled = 1
let g:airline_powerline_fonts = 1
set t_Co=256
let g:airline_theme="badwolf"
let g:airline_symbols = {}
set laststatus=2
let g:airline#extensions#tabline#enabled = 1
let g:airline#extensions#tabline#buffer_nr_show=1
let g:airline_detect_modidied=1
let g:airline_detect_paste=1
set lazyredraw
" scrooloose/syntastic
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
" 禁止检查java文件
"let g:syntastic_mode_map = {'mode': 'active', 'passive_filetypes': ['java'] }
let g:ale_echo_msg_error_str = 'E'
let g:ale_echo_msg_warning_str = 'W'
let g:ale_echo_msg_format = '[%linter%] %s [%severity%]'
nmap <Leader>en <Plug>(ale_next)
nmap <Leader>ep <Plug>(ale_previous)
nnoremap <Leader>ts :ALEToggle<CR>
"Valloric/YouCompleteMe
let g:ycm_warning_symbol = '>*'
let g:ycm_auto_trigger = 1
" for ycm
let g:ycm_error_symbol = '>>'
let g:ycm_warning_symbol = '>*'
let g:ycm_autoclose_preview_window_after_completion = 1
let g:ycm_autoclose_preview_window_after_insertion = 1
nnoremap <leader>gl :YcmCompleter GoToDeclaration<CR>
nnoremap <leader>gf :YcmCompleter GoToDefinition<CR>
nnoremap <leader>gg :YcmCompleter GoToDefinitionElseDeclaration<CR>
nnoremap <F4> :YcmDiags<CR>
inoremap <C-o> <C-x><C-o>
let g:ycm_semantic_triggers = {
\ 'c' : ['->', ' ', '.', ' ', '(', '[', '&'],
\ 'cpp,objcpp' : ['->', '.', ' ', '(', '[', '&', '::'],
\ 'perl' : ['->', '::', ' '],
\ 'php' : ['->', '::', '.'],
\ 'cs,java,javascript,d,vim,python,perl6,scala,vb,elixir,go' : ['.'],
\ 'ruby' : ['.', '::'],
\ 'lua' : ['.', ':']
\ }
nnoremap <leader>jd :YcmCompleter GoToDefinitionElseDeclaration<CR>
let g:ycm_collect_identifiers_from_tag_files = 1
let g:ycm_min_num_of_chars_for_completion=2
let g:ycm_always_populate_location_list = 1
set completeopt=longest,menu
let g:ycm_seed_identifiers_with_syntax=1
let g:ycm_complete_in_comments = 0
let g:ycm_complete_in_strings = 1
let g:ycm_key_list_stop_completion = ['<CR>']
let g:ycm_use_ultisnips_completer = 1
autocmd FileType css set omnifunc=csscomplete#CompleteCSS
autocmd FileType html set omnifunc=htmlcomplete#CompleteTags
autocmd FileType javascript set omnifunc=javascriptcomplete#CompleteJS
autocmd FileType xml set omnifunc=xmlcomplete#CompleteTags
if !empty(glob("~/.vim/plugged/YouCompleteMe/third_party/ycmd/cpp/ycm/.ycm_extra_conf.py"))
let g:ycm_global_ycm_extra_conf = '~/.vim/plugged/YouCompleteMe/third_party/ycmd/cpp/ycm/.ycm_extra_conf.py'
endif
let g:ycm_server_keep_logfiles = 1
":imap <S-tab> <c-x><c-o>
let g:ycm_key_list_select_completion = ['<Down>']
let g:ycm_key_list_previous_completion = ['<Up>']
let g:ycm_server_python_interpreter='/usr/bin/python3'
" jiangmiao/auto-pairs
let g:AutoPairsFlyMode = 1
" haya14busa/incsearch.vim
let g:ctrlp_map = '<c-p>'
let g:ctrlp_cmd = 'CtrlP'
let g:ctrlp_root_markers = ['pom.xml', '.p4ignore']
set wildignore+=*/tmp/*,*.so,*.swp
let g:ctrlp_custom_ignore = '\v[\/]\.(git|hg|svn)$'
let g:ctrlp_custom_ignore = {
\ 'dir': '\v[\/]\.(git|hg|svn)$',
\ 'file': '\v\.(exe|so|dll)$',
\ 'link': 'some_bad_symbolic_links',
\ }
let g:ctrlp_user_command = ['.git', 'cd %s && git ls-files -co --exclude-standard']
let g:ctrlp_switch_buffer = 'et'
if executable('ag')
" Use Ag over Grep
set grepprg=ag\ --nogroup\ --nocolor
" Use ag in CtrlP for listing files.
let g:ctrlp_user_command = 'ag %s -l --nocolor -g ""'
" Ag is fast enough that CtrlP doesn't need to cache
let g:ctrlp_use_caching = 0
endif
let g:ctrlp_funky_matchtype = 'path'
nnoremap <Leader>fu :CtrlPFunky<Cr>
nnoremap <Leader>fU :execute 'CtrlPFunky ' . expand('<cword>')<Cr>
let g:ctrlp_funky_syntax_highlight = 1
let g:ctrlp_extensions = ['funky']
set hlsearch
let g:incsearch#auto_nohlsearch = 1
map n <Plug>(incsearch-nohl-n)
map N <Plug>(incsearch-nohl-N)
"map * <Plug>(incsearch-nohl-*)
map # <Plug>(incsearch-nohl-#)
map g* <Plug>(incsearch-nohl-g*)
map g# <Plug>(incsearch-nohl-g#)
" honza/vim-snippets
"let g:UltiSnipsExpandTrigger="<tab>"
"let g:UltiSnipsJumpForwardTrigger="<c-b>"
"let g:UltiSnipsJumpBackwardTrigger="<c-z>"
"let g:UltiSnipsEditSplit="vertical"
" sjl/gundo.vim
"noremap <leader>h :GundoToggle<CR>
noremap <leader>ut :UndotreeToggle<CR>
if has("persistent_undo")
set undodir=~/.undodir/
set undofile
endif
" thinca/vim-quickrun
let g:quickrun_config = {
\ "_" : {
\ "outputter" : "message",
\ },
\}
let g:quickrun_no_default_key_mappings = 1
nmap <Leader>r <Plug>(quickrun)
map <F10> :QuickRun<CR>
" mhinz/vim-startify
let g:startify_custom_header=[
\' ____________ __ ',
\' / ____/ ____/ / /_ ',
\' _____ / /___/ /_____ / /_/ __ _______ ',
\' /__ / / ____/ ____/ /___/ / /\ / / __ / ',
\' / /__/ /___/ /___/ / __/ / /\ \ / / /_/ / / ',
\' /____/_____/_____/_/\_\/_/_/ \_\/_/\____/ / ',
\' _____/ / ',
\' /______/ ',
\' @author:zeekling<zeekling@163.com> ',
\' ']
let g:startify_custom_footer=['结尾', ' 不想看到你']
" ryanoasis/vim-devicons
let g:webdevicons_enable_nerdtree = 1 " 我的电脑上显示有点问题
let g:prepare_code_plugin_path = expand($HOME . "/.vim/plugged/prepare-code")
set cc=120

20
.vim/conf/c.vim Normal file
View File

@ -0,0 +1,20 @@
autocmd FileType c set omnifunc=ccomplete#Complete
let g:C_UseTool_cmake = 'yes'
let g:C_UseTool_doxygen = 'yes'
" mrtazz/DoxygenToolkit.vim
let g:DoxygenToolkit_authorName="zeekling"
let s:licenseTag = "\n* Copyright(C) "
let s:licenseTag = s:licenseTag . "For free "
let s:licenseTag = s:licenseTag . "All right "
let g:DoxygenToolkit_licenseTag = s:licenseTag
let g:DoxygenToolkit_briefTag_funcName="yes"
let g:doxygen_enhanced_color=1
let g:DoxygenToolkit_paramTag_pre="@Param "
let g:DoxygenToolkit_returnTag="@Return "
let g:DoxygenToolkit_briefTag_pre="@apiNote "
let g:DoxygenToolkit_versionTag="@version "
let g:DoxygenToolkit_throwTag_pre = "@exception "
set cc=120

20
.vim/conf/html.vim Normal file
View File

@ -0,0 +1,20 @@
let g:user_emmet_install_global = 0
autocmd FileType html,css EmmetInstall
" pangloss/vim-javascript
let g:javascript_plugin_jsdoc = 1
let g:javascript_plugin_ngdoc = 1
let g:javascript_plugin_flow = 1
augroup javascript_folding
au!
au FileType javascript setlocal foldmethod=syntax
augroup END
" hail2u/vim-css3-syntax
augroup VimCSS3Syntax
autocmd!
autocmd FileType css setlocal iskeyword+=-
augroup END
set cc=120

3
.vim/conf/init.vim Normal file
View File

@ -0,0 +1,3 @@

28
.vim/conf/java.vim Normal file
View File

@ -0,0 +1,28 @@
" java
autocmd FileType java setlocal omnifunc=javacomplete#Complete
nmap <F4> <Plug>(JavaComplete-Imports-AddSmart)
imap <F4> <Plug>(JavaComplete-Imports-AddSmart)
nmap <F5> <Plug>(JavaComplete-Imports-Add)
imap <F5> <Plug>(JavaComplete-Imports-Add)
nmap <F6> <Plug>(JavaComplete-Imports-AddMissing)
imap <F6> <Plug>(JavaComplete-Imports-AddMissing)
nmap <F7> <Plug>(JavaComplete-Imports-RemoveUnused)
imap <F7> <Plug>(JavaComplete-Imports-RemoveUnused)
autocmd FileType java inoremap <buffer> . .<C-X><C-O><C-P><Down>
let g:JavaComplete_ShowExternalCommandsOutput = 1
" mrtazz/DoxygenToolkit.vim
let g:DoxygenToolkit_authorName="zeekling"
let s:licenseTag = "\n* Copyright(C) "
let s:licenseTag = s:licenseTag . "For free "
let s:licenseTag = s:licenseTag . "All right "
let g:DoxygenToolkit_licenseTag = s:licenseTag
let g:DoxygenToolkit_briefTag_funcName="yes"
let g:doxygen_enhanced_color=1
let g:DoxygenToolkit_paramTag_pre="@Param "
let g:DoxygenToolkit_returnTag="@Return "
let g:DoxygenToolkit_briefTag_pre="@apiNote "
let g:DoxygenToolkit_versionTag="@version "
let g:DoxygenToolkit_throwTag_pre = "@exception "
set cc=120

17
.vim/conf/load.vim Normal file
View File

@ -0,0 +1,17 @@
function! LoadPlugs()
call GitExits()
if exists("g:git_exits")
if g:git_exits == "True"
call plug#load("nerdtree-git-plugin")
endfunction
function! GitExits()
python3 << EOF
import vim
import ./script/vim_utils.py as utils
exits = utils.git_exits()
vim.command("set g:git_exits=%s" % exits)
EOF
endfunction

12
.vim/conf/markdown.vim Normal file
View File

@ -0,0 +1,12 @@
let g:vim_markdown_folding_disabled = 1
let g:vim_markdown_folding_style_pythonic = 1
let g:vim_markdown_toc_autofit = 1
let g:vim_markdown_new_list_item_indent = 2
let g:vim_markdown_frontmatter=1
" 正对本系统上没有安装google浏览只安装了chromium
"let g:mkdp_path_to_chrome = "/usr/bin/chromium"
let g:mkdp_path_to_chrome = "google-chrome-stable"
"let g:mkdp_path_to_chrome = "/usr/bin/firefox"
set cc=120

10
.vim/conf/python.vim Normal file
View File

@ -0,0 +1,10 @@
"autocmd FileType python set omnifunc=pythoncomplete#Complete
let g:pydiction_location = '~/.vim/plugged/pydiction/complete-dict'
autocmd FileType python setlocal completeopt-=preview
let g:jedi#completions_command = "<C-Space>"
set cc=120
" set cc=79
let g:pymode_python = 'python3'
" Pylint configuration file
let g:pymode_lint_config = '$HOME/pylint.rc'
let g:pymode_options_max_line_length = 120

32
.vim/conf/script/vim_utils.py Executable file
View File

@ -0,0 +1,32 @@
#!/usr/bin/env python3
# -*- utf-8 -*-
import os
curr_dir = os.getcwd()
def git_exits(dir_name: object = None):
if dir_name is None:
dir_name = curr_dir
print(dir_name)
git_fold = ""
if dir_name.endswith('/'):
git_fold = dir_name + '.git'
else:
git_fold = dir_name + '/.git'
print("git fold :", git_fold)
if os.path.exists(git_fold):
return True
parent_path = os.path.dirname(dir_name)
if parent_path == "/":
return False
else:
return git_exits(parent_path)
if __name__ == "__main__":
if git_exits("/home/zeek/project/ml/basic"):
print("存在")
else:
print("不存在")

2
.vim/conf/sql.vim Normal file
View File

@ -0,0 +1,2 @@
set cc=120

11
.vim/custom/functions.vim Normal file
View File

@ -0,0 +1,11 @@
" my functions
autocmd BufNewFile *.sh,*.py exec ":call AutoSetFileHead()"
function! AutoSetFileHead()
if &filetype == 'sh'
call setline(1, "\#!/bin/bash")
endif
if &filetype == 'python'
call setline(1, "\# -*- coding: utf-8 -*-")
endif
endfunction

130
.vim/vimrc Normal file
View File

@ -0,0 +1,130 @@
" ____________ __
" / ____/ ____/ / /_
" _____ / /___/ /_____ / /_/ __ _______
" /__ / / ____/ ____/ /___/ / /\ / / __ /
" / /__/ /___/ /___/ / __/ / /\ \ / / /_/ / /
" /____/_____/_____/_/\_\/_/_/ \_\/_/\____/ /
" _____/ /
" /______/
" @author:zeekling<zeekling@163.com>
"
" 插件
filetype off " required!
filetype indent on
call plug#begin('~/.vim/plugged')
Plug 'tpope/vim-fugitive', {'on': 'LoadPlugs'}
Plug 'ascenator/L9', {'name': 'newL9','for':'vim'}
Plug 'scrooloose/nerdtree'
Plug 'Xuyuanp/nerdtree-git-plugin', {'on': 'LoadPlugs'}
Plug 'majutsushi/tagbar',{'for':['java','sql','python','c','html','css','javascript','go']}
Plug 'vim-airline/vim-airline'
Plug 'vim-airline/vim-airline-themes'
Plug 'bling/vim-bufferline'
" Plug 'terryma/vim-multiple-cursors'
" Plug 'powerline/fonts'
if v:version < 800
Plug 'scrooloose/syntastic',{'for':['java','sql','python','c','html','css','javascript']}
else
Plug 'w0rp/ale',{'for':['java','sql','python','c','html','css','javascript','go','sh','shell'], 'merged' : 0, 'loadconf_before' : 1} " 语法检测
endif
Plug 'godlygeek/tabular' ,{'on':'Tabbar'} " 代码美化工具
Plug 'jiangmiao/auto-pairs'
" Plug 'kien/rainbow_parentheses.vim'
" Plug 'roxma/vim-paste-easy' " Easy paste
"Plug 'ctrlpvim/ctrlp.vim'
Plug 'tacahiroy/ctrlp-funky'
" Plug 'rking/ag.vim'
Plug 'haya14busa/incsearch.vim'
" Plug 'Raimondi/delimitMate'
" Plug 'morhetz/gruvbox'
Plug 'mhinz/vim-signify'
Plug 'terryma/vim-smooth-scroll'
Plug 'mhinz/vim-startify'
" Plug 'rodjek/vim-puppet'
Plug 'tpope/vim-fugitive', {'on': 'LoadPlugs'}
Plug 'will133/vim-dirdiff',{'on':['DirDiff']}
Plug 'Chiel92/vim-autoformat', {'on': 'Autoformat'}
"Plug 'SirVer/ultisnips' | Plug 'honza/vim-snippets' ,{'for':['java','sql','python','c','html','css','javascript']}
" Plug 'godlygeek/tabular'
" Plug 'mbbill/undotree'
" Plug 'romainl/vim-cool'
Plug 'liuchengxu/space-vim-dark'
Plug 'ryanoasis/vim-devicons'
" Plug 'Raimondi/delimitMate'
Plug 'tiagofumo/vim-nerdtree-syntax-highlight'
Plug 'Yggdroot/LeaderF', { 'do': './install.sh' }
" 自动补全html/xml标签
Plug 'docunext/closetag.vim', { 'for': ['html', 'xml'] }
Plug 'mattn/emmet-vim',{'for':['html','xml']}
Plug 'gko/vim-coloresque' ,{'for':['html','xml','css',]}
Plug 'pangloss/vim-javascript',{'for':['html','css','javascript']}
Plug 'hail2u/vim-css3-syntax',{'for':['html','css','javascript']}
" 快速赋值语句对齐
Plug 'junegunn/vim-easy-align',{'for':['java','c','python','markdown','sh','shell','c++','sql']}
" quickrun
Plug 'thinca/vim-quickrun',{'for':['java','c','python','sh','shell','c++']}
Plug 'chrisbra/changesPlugin'
" auto complete
"Plug 'SirVer/ultisnips',{'for':['java','sql','vim','python','c','html','css','javascript','sh','shell']}
"Plug 'honza/vim-snippets',{'for':['java','sql','vim','python','c','html','css','javascript','sh','shell']}
Plug 'ycm-core/YouCompleteMe',{'do':'./install.py --clang-completer --java-completer','for':['java','sql','vim','python','c','html','css','javascript','sh','shell']}
" Plug 'maralla/completor.vim',{'for':['java','sql','vim','python','c','html','css','javascript','sh','shell']}
Plug 'shougo/neocomplete.vim',{'for':['java','sql','vim','python','c','html','css','javascript','sh','shell']}
" java
Plug 'artur-shaik/vim-javacomplete2', {'for':'java'}
Plug 'mrtazz/DoxygenToolkit.vim', {'for':['java','c','c++']}
Plug 'airblade/vim-rooter', {'for':'java'}
" c
Plug 'vim-scripts/a.vim', {'for':['c','c++']}
Plug 'vim-scripts/c.vim', {'for':['c','c++']}
" markdown
Plug 'plasticboy/vim-markdown', { 'for': 'markdown' }
Plug 'iamcco/mathjax-support-for-mkdp', { 'for': 'markdown' }
Plug 'iamcco/markdown-preview.vim', { 'for': 'markdown' }
" python
" Plug 'rkulla/pydiction', { 'for': 'python' }
" Plug 'hdima/python-syntax', { 'for': 'python' }
" Plug 'hynek/vim-python-pep8-indent', { 'for': 'python' }
" Plug 'Glench/Vim-Jinja2-Syntax', { 'for': 'python' }
"Plug 'davidhalter/jedi-vim', { 'for': 'python' }
Plug 'python-mode/python-mode', { 'for': 'python','branch': 'develop' }
Plug 'tell-k/vim-autopep8', {'for': 'python'}
" Plug 'fisadev/vim-isort',{'for':'python'}
" sql
" Plug 'joereynolds/SQHell.vim',{'for':'sql'}
" on 语句不起作用
Plug 'mattn/vim-sqlfmt',{'on':'SQLfmt'}
" bash
Plug 'vim-scripts/bash-support.vim',{'for':['sh','bash']}
Plug 'chxuan/prepare-code'
call plug#end()
autocmd FileType java source ~/.vim/conf/java.vim
autocmd FileType c source ~/.vim/conf/c.vim
autocmd FileType python source ~/.vim/conf/python.vim
autocmd BufNewFile,BufRead *.md,*.markdown,*.mkd source ~/.vim/conf/markdown.vim
autocmd FileType sql source ~/.vim/conf/sql.vim
autocmd FileType html,css,javascript source ~/.vim/conf/html.vim
if filereadable(expand("~/.vim/conf/load.vim"))
source ~/.vim/conf/load.vim
endif
if filereadable(expand('~/.vim/conf/base.vim'))
source ~/.vim/conf/base.vim
endif
filetype plugin indent on
if filereadable(expand('~/.vim/custom/functions.vim'))
source ~/.vim/custom/functions.vim
endif

127
.vimrc Normal file
View File

@ -0,0 +1,127 @@
" ____________ __
" / ____/ ____/ / /_
" _____ / /___/ /_____ / /_/ __ _______
" /__ / / ____/ ____/ /___/ / /\ / / __ /
" / /__/ /___/ /___/ / __/ / /\ \ / / /_/ / /
" /____/_____/_____/_/\_\/_/_/ \_\/_/\____/ /
" _____/ /
" /______/
" @author:zeekling<zeekling@163.com>
"
" 插件
filetype off " required!
filetype indent on
call plug#begin('~/.vim/plugged')
Plug 'tpope/vim-fugitive', {'on': 'LoadPlugs'}
Plug 'ascenator/L9', {'name': 'newL9','for':'vim'}
Plug 'scrooloose/nerdtree'
Plug 'Xuyuanp/nerdtree-git-plugin', {'on': 'LoadPlugs'}
Plug 'majutsushi/tagbar',{'for':['java','sql','python','c','html','css','javascript','go']}
Plug 'vim-airline/vim-airline'
Plug 'vim-airline/vim-airline-themes'
Plug 'bling/vim-bufferline'
" Plug 'terryma/vim-multiple-cursors'
" Plug 'powerline/fonts'
if v:version < 800
Plug 'scrooloose/syntastic',{'for':['java','sql','python','c','html','css','javascript']}
else
Plug 'w0rp/ale',{'for':['java','sql','python','c','html','css','javascript','go','sh','shell'], 'merged' : 0, 'loadconf_before' : 1} " 语法检测
endif
Plug 'godlygeek/tabular' ,{'on':'Tabbar'} " 代码美化工具
Plug 'jiangmiao/auto-pairs'
" Plug 'kien/rainbow_parentheses.vim'
" Plug 'roxma/vim-paste-easy' " Easy paste
"Plug 'ctrlpvim/ctrlp.vim'
Plug 'tacahiroy/ctrlp-funky'
" Plug 'rking/ag.vim'
Plug 'haya14busa/incsearch.vim'
" Plug 'Raimondi/delimitMate'
" Plug 'morhetz/gruvbox'
Plug 'mhinz/vim-signify'
Plug 'terryma/vim-smooth-scroll'
Plug 'mhinz/vim-startify'
" Plug 'rodjek/vim-puppet'
Plug 'tpope/vim-fugitive', {'on': 'LoadPlugs'}
Plug 'will133/vim-dirdiff',{'on':['DirDiff']}
Plug 'Chiel92/vim-autoformat', {'on': 'Autoformat'}
Plug 'SirVer/ultisnips' | Plug 'honza/vim-snippets' ,{'for':['java','sql','python','c','html','css','javascript']}
" Plug 'godlygeek/tabular'
" Plug 'mbbill/undotree'
" Plug 'romainl/vim-cool'
Plug 'liuchengxu/space-vim-dark'
Plug 'ryanoasis/vim-devicons'
" Plug 'Raimondi/delimitMate'
Plug 'tiagofumo/vim-nerdtree-syntax-highlight'
Plug 'Yggdroot/LeaderF', { 'do': './install.sh' }
" 自动补全html/xml标签
Plug 'docunext/closetag.vim', { 'for': ['html', 'xml'] }
Plug 'mattn/emmet-vim',{'for':['html','xml']}
Plug 'gko/vim-coloresque' ,{'for':['html','xml','css',]}
Plug 'pangloss/vim-javascript',{'for':['html','css','javascript']}
Plug 'hail2u/vim-css3-syntax',{'for':['html','css','javascript']}
" 快速赋值语句对齐
Plug 'junegunn/vim-easy-align',{'for':['java','c','python','markdown','sh','shell','c++','sql']}
" quickrun
Plug 'thinca/vim-quickrun',{'for':['java','c','python','sh','shell','c++']}
" auto complete
Plug 'Valloric/YouCompleteMe',{'do':'./install.py --clang-completer --clang-completer','for':['java','sql','vim','python','c','html','css','javascript','sh','shell']}
" Plug 'maralla/completor.vim',{'for':['java','sql','vim','python','c','html','css','javascript','sh','shell']}
Plug 'SirVer/ultisnips',{'for':['java','sql','vim','python','c','html','css','javascript','sh','shell']}
Plug 'honza/vim-snippets',{'for':['java','sql','vim','python','c','html','css','javascript','sh','shell']}
Plug 'shougo/neocomplete.vim',{'for':['java','sql','vim','python','c','html','css','javascript','sh','shell']}
" java
Plug 'artur-shaik/vim-javacomplete2', {'for':'java'}
Plug 'mrtazz/DoxygenToolkit.vim', {'for':['java','c','c++']}
Plug 'airblade/vim-rooter', {'for':'java'}
" c
Plug 'vim-scripts/a.vim', {'for':['c','c++']}
Plug 'vim-scripts/c.vim', {'for':['c','c++']}
" markdown
Plug 'plasticboy/vim-markdown', { 'for': 'markdown' }
Plug 'iamcco/mathjax-support-for-mkdp', { 'for': 'markdown' }
Plug 'iamcco/markdown-preview.vim', { 'for': 'markdown' }
" python
" Plug 'rkulla/pydiction', { 'for': 'python' }
" Plug 'hdima/python-syntax', { 'for': 'python' }
" Plug 'hynek/vim-python-pep8-indent', { 'for': 'python' }
" Plug 'Glench/Vim-Jinja2-Syntax', { 'for': 'python' }
" Plug 'davidhalter/jedi-vim', { 'for': 'python' }
Plug 'python-mode/python-mode', { 'for': 'python','branch': 'develop' }
Plug 'tell-k/vim-autopep8', {'for': 'python'}
" Plug 'fisadev/vim-isort',{'for':'python'}
" sql
" Plug 'joereynolds/SQHell.vim',{'for':'sql'}
" on 语句不起作用
Plug 'mattn/vim-sqlfmt',{'on':'SQLfmt'}
" bash
Plug 'vim-scripts/bash-support.vim',{'for':['sh','bash']}
Plug 'chxuan/prepare-code'
call plug#end()
autocmd FileType java source ~/.vim/conf/java.vim
autocmd FileType c source ~/.vim/conf/c.vim
autocmd FileType python source ~/.vim/conf/python.vim
autocmd BufNewFile,BufRead *.md,*.markdown,*.mkd source ~/.vim/conf/markdown.vim
autocmd FileType sql source ~/.vim/conf/sql.vim
autocmd FileType html,css,javascript source ~/.vim/conf/html.vim
if filereadable(expand("~/.vim/conf/load.vim"))
source ~/.vim/conf/load.vim
endif
if filereadable(expand('~/.vim/conf/base.vim'))
source ~/.vim/conf/base.vim
endif
filetype plugin indent on
if filereadable(expand('~/.vim/custom/functions.vim'))
source ~/.vim/custom/functions.vim
endif

30
README.md Normal file
View File

@ -0,0 +1,30 @@
# 上古神器VIM
Vim 是一款比较古老的编辑器对于Linux下的用户来讲是一款非常好的编辑器特别是远程终端连接的时候比较方便但是对于普通的
java等项目来讲就是没有现在的一些编辑器方便(个人感觉是这样的也可能是我没有使用好vim),但是一般情况下使用vim还是比较好的
一种选择。
## 说明
### 要求
* `vim7.5.15`以上
* `python2.7+`,`python3+`
## vim 8 安装
本人在使用`centos 7` 的源安装vim时发现源中的`vim`版本比较低,于是在网上找了教程,安装了`vim 8`
[vim 8 安装教程](vim安装.md)
## 配置vim
1. 安装依赖包
`debian` 系列
```sh
apt install ctags cmake make build-essential python-dev python3-dev
```
`redhat` 系列可以找到相同的包安装即可,其他相同
2. 克隆项目到本地
```sh
git clone git@www.zeekling.cn:linux/vimrc.git
```
3. 执行安装脚本
```sh
./install.sh
```

25
install.sh Executable file
View File

@ -0,0 +1,25 @@
#!/usr/bin/env bash
echo " ____________ __ "
echo " / ____/ ____/ / /_ "
echo " _____ / /___/ /_____ / /_/ __ _______ "
echo " /__ / / ____/ ____/ /___/ / /\ / / __ / "
echo " / /__/ /___/ /___/ / __/ / /\ \ / / /_/ / / "
echo " /____/_____/_____/_/\_\/_/_/ \_\/_/\____/ / "
echo " _____/ / "
echo " /______/ "
echo " @author:zeekling<zeekling@163.com> "
echo " "
if [ ! -d '~/.vim/autoload/plug.vim' ];then
echo "开始安装vim-plug"
curl -fLo ~/.vim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
echo "安装vim-plug完成"
fi
PLUG_FILE="~/.vim/plugged"
if [ ! -f ${PLUG_FILE} ]; then
mkdir ${PLUG_FILE} -p
fi
echo "拷贝配置文件"
cp .vimrc ~/.vimrc && cp -rf .vim/* ~/.vim/
echo "拷贝完成,打开vim"

34
plug.md Normal file
View File

@ -0,0 +1,34 @@
## 简介
主要用来讲述`vimrc`中相关插件的用途等。
#### 插件管理工具
1. `vim-plug`工具
之前使用的`vundle`下载速度比较慢,换成比较快的`vim-plug`
#### 配置文件用途详解
* [~/.vim/vimrc](http://www.zeekling.cn/gogs/zeek/vim_config/src/master/vim/vimrc) 用来配置vim主要需要使用的插件
* [~/.vim/conf/](http://www.zeekling.cn/gogs/zeek/vim_config/src/master/vim/conf) 用来放置vim对应类型插件的配置类
型,比如`python.vim`表示`python`需要插件对应的配置文件
#### 主要插件和功能
* [Valloric/YouCompleteMe](https://github.com/Valloric/YouCompleteMe) 代码自动用来补全,补全功能虽然比不过一些ide但是
用来平时一些练习还是可以的
* [tpope/vim-fugitive](https://github.com/tpope/vim-fugitive) 集成Git相关
* [ascenator/L9](https://github.com/ascenator/L9) vimscript相关库
* [scrooloose/nerdtree](https://github.com/scrooloose/nerdtree) 显示树形目录结构
* [Xuyuanp/nerdtree-git-plugin](https://github.com/Xuyuanp/nerdtree-git-plugin) 树形目录结构显示git项目中文件状态
* [majutsushi/tagbar](https://github.com/majutsushi/tagbar) 显示类、方法、变量
* [vim-airline/vim-airline](https://github.com/vim-airline/vim-airline) 状态栏美化
* [vim-airline/vim-airline-themes](https://github.com/vim-airline/vim-airline-themes) 状态栏主题
* [bling/vim-bufferline](https://github.com/bling/vim-bufferline) 状态栏显示buffer
* [scrooloose/syntastic](https://github.com/scrooloose/syntastic) and [w0rp/ale](https://github.com/w0rp/ale) 语法检查后
者支持vim8更好一点
* [godlygeek/tabular](https://github.com/godlygeek/tabular) 代码、注释、表格对齐
* [jiangmiao/auto-pairs](https://github.com/jiangmiao/auto-pairs) 补全括号等
* [roxma/vim-paste-easy](https://github.com/roxma/vim-paste-easy) paste插件
* [DoxygenToolkit.vim](https://github.com/DoxygenToolkit.vim) 自动注释
* [artur-shaik/vim-javacomplete2](https://github.com/artur-shaik/vim-javacomplete2) java代码补全,结合YouCompleteMe可以使用
* [scrooloose/nerdtree](https://github.com/scrooloose/nerdtree) vim里面文件显示
* [c.vim](https://github.com/c.vim) C语言自动补全,结合YouCompleteMe可以使用
<span style="color:red;">未完待续</span>

10
requirement.txt Normal file
View File

@ -0,0 +1,10 @@
autopep8
flake8
isort
pylint
pyre-check
vulture
prospector
pycodestyle
python-language-server
vim-vint

55
vim安装.md Normal file
View File

@ -0,0 +1,55 @@
## 简介
vim 是一款比较好用的编辑器被称为编辑器之神。当然linux或者unix默认的vim编辑器比较丑要经过一系列的美化
对于使用者的要求比较高,没有耐心者勿用。
## vim 安装
### 卸载旧的`vim`
在安装`vim 8`之前要将旧的`vim`卸载掉,不然`vim 8`编译安装完之后还是之前旧的`vim`;由于本人就使用过`red hat` 系列的`centos`
和`debian` 系列的`ubuntu`、`kali`等`Linux`操作系统,所以卸载方法就提供了两种。
1. red hat 系列卸载方法:
```sh
sudo yum remove vim
```
2. debian系列卸载方法
```sh
sudo apt-get remove vim --purge
```
在最新的ubuntu中可以使用以下命令
```sh
sudo apt remove vim --purge
```
### vim 8的安装步骤
#### <span style="color:red;"> 注意</span>
1. 在安装vim 8之前要保证自己gcc 编译器的版本是5及其以上如果不是则请先安装gcc 5,我现在用的centos 7 中自带的gcc 的版本是4.8所以重新安装了gcc 5
#### 开始安装
```sh
git clone https://github.com/vim/vim.git
cd vim
./configure \
--enable-perlinterp \
--enable-python3interp \
--enable-rubyinterp \
--enable-cscope \
--enable-gui=auto \
--enable-gtk2-check \
--enable-gnome-check \
--with-features=huge \
--enable-multibyte \
--with-x \
--with-compiledby="xorpd" \
--with-python3-config-dir=/usr/lib/python3.4/config-3.4m-x86_64-linux-gnu \
--prefix=/opt/vim74
make
sudo make install
```
---------
跟新时间2017-07-04