Compare commits

...

5 Commits
v1.0 ... master

Author SHA1 Message Date
LingZhaoHui b5d27f387d add spacevim config 2022-11-13 21:56:29 +08:00
LingZhaoHui cb3a4dd9aa add spacevim config 2022-11-13 21:55:01 +08:00
LingZhaoHui 568b4fe8d3 add YouCompleteMe 2022-03-23 21:34:47 +08:00
LingZhaoHui e3b24de47b 更新 2022-02-06 12:10:54 +08:00
LingZhaoHui b763d31324 update 2021-11-28 20:18:39 +08:00
8 changed files with 177 additions and 82 deletions

View File

@ -1,6 +1,6 @@
# 上古神器VIM
Vim 是一款比较古老的编辑器对于Linux下的用户来讲是一款非常好的编辑器特别是远程终端连接的时候比较方便但是对于普通的
java等项目来讲就是没有现在的一些编辑器方便(个人感觉是这样的也可能是我没有使用好vim),但是一般情况下使用vim还是比较好的
Vim 是一款比较古老的编辑器,对于Linux下的用户来讲是一款非常好的编辑器,特别是远程终端连接的时候比较方便,但是对于普通的
java等项目来讲就是没有现在的一些编辑器方便(个人感觉是这样的,也可能是我没有使用好vim),但是一般情况下使用vim还是比较好的
一种选择。
## 说明

97
init.toml Normal file
View File

@ -0,0 +1,97 @@
#=============================================================================
# dark_powered.toml --- dark powered configuration example for SpaceVim
# Copyright (c) 2016-2022 Wang Shidong & Contributors
# Author: Wang Shidong < wsdjeg@outlook.com >
# URL: https://spacevim.org
# License: GPLv3
#=============================================================================
# All SpaceVim option below [option] section
[colorschemeoptions]
# set spacevim theme. by default colorscheme layer is not loaded,
# if you want to use more colorscheme, please load the colorscheme
# layer
colorscheme = "SpaceVim"
# Disable guicolors in basic mode, many terminal do not support 24bit
colorscheme_bg = "light"
# true colors
enable_guicolors = true
# Disable statusline separator, if you want to use other value, please
# install nerd fonts
# Enable autocomplete layer
[[layers]]
name = 'autocomplete'
auto_completion_return_key_behavior = "complete"
auto_completion_tab_key_behavior = "smart"
auto_completion_delay = 200
auto_completion_complete_with_key_sequence = "nil"
auto_completion_complete_with_key_sequence_delay = 0.1
[[layers]]
name = "lang#python"
[[layers]]
name = "format"
[[layers]]
name = 'lang#c'
enable_clang_syntax_highlight = true
[[layers]]
name = "lsp"
enabled_clients = ['clangd']
filetypes = [
"c",
"cpp"
]
[layers.override_cmd]
c = ["clangd"]
[[layers]]
name = "ui"
enable_scrollbar = true
enable_sidebar = false
[[layers]]
name = 'shell'
default_position = 'top'
default_height = 30
[[layers]]
name = "incsearch"
[[layers]]
name = "lang#markdown"
[[layers]]
name = "git"
git_plugin = 'fugitive'
[[layers]]
name = "lang#cmake"
[[layers]]
name = "lang#java"
[[layers]]
name = "lang#python"
[[layers]]
name = "colorscheme"
[[layers]]
name = "gtags"
gtagslabel = "pygments"
[options]
# 文件树插件可选值包括:
# - nerdtree (默认)
# - vimfiler: 需要编译 vimproc.vim, 在目录 bundle/vimproc.vim 下
# - defx: 需要 +py3 支持
filemanager = "vimfiler"
enable_filetree_gitstatus = true
project_rooter_patterns = ['.git/', '_darcs/', '.hg/', '.bzr/', '.svn/']
filetree_direction = "left"
colorscheme = "gruvbox"
colorscheme_bg = "dark"

View File

@ -454,6 +454,7 @@ call s:HL('GruvboxYellowSign', s:yellow, s:sign_column, s:invert_signs)
call s:HL('GruvboxBlueSign', s:blue, s:sign_column, s:invert_signs)
call s:HL('GruvboxPurpleSign', s:purple, s:sign_column, s:invert_signs)
call s:HL('GruvboxAquaSign', s:aqua, s:sign_column, s:invert_signs)
call s:HL('GruvboxOrangeSign', s:orange, s:sign_column, s:invert_signs)
" }}}
@ -688,8 +689,8 @@ hi! link EasyMotionShade Comment
" }}}
" Sneak: {{{
autocmd ColorScheme gruvbox hi! link Sneak Search
autocmd ColorScheme gruvbox hi! link SneakLabel Search
hi! link Sneak Search
hi! link SneakLabel Search
" }}}
" Indent Guides: {{{
@ -888,6 +889,30 @@ hi! link NERDTreeToggleOff GruvboxRed
call s:HL('multiple_cursors_cursor', s:none, s:none, s:inverse)
call s:HL('multiple_cursors_visual', s:none, s:bg2)
" }}}
" coc.nvim: {{{
hi! link CocErrorSign GruvboxRedSign
hi! link CocWarningSign GruvboxOrangeSign
hi! link CocInfoSign GruvboxYellowSign
hi! link CocHintSign GruvboxBlueSign
hi! link CocErrorFloat GruvboxRed
hi! link CocWarningFloat GruvboxOrange
hi! link CocInfoFloat GruvboxYellow
hi! link CocHintFloat GruvboxBlue
hi! link CocDiagnosticsError GruvboxRed
hi! link CocDiagnosticsWarning GruvboxOrange
hi! link CocDiagnosticsInfo GruvboxYellow
hi! link CocDiagnosticsHint GruvboxBlue
hi! link CocSelectedText GruvboxRed
hi! link CocCodeLens GruvboxGray
call s:HL('CocErrorHighlight', s:none, s:none, s:undercurl, s:red)
call s:HL('CocWarningHighlight', s:none, s:none, s:undercurl, s:orange)
call s:HL('CocInfoHighlight', s:none, s:none, s:undercurl, s:yellow)
call s:HL('CocHintHighlight', s:none, s:none, s:undercurl, s:blue)
" }}}
" Filetype specific -----------------------------------------------------------

View File

@ -79,10 +79,11 @@ let s:colors = {
\ 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',
\ 168: '#ce537a', 169: '#bc6ec5', 170: '#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', 239: '#44505c', 241: '#534b5d', 243: '#65737e',
\ 244: '#b4d1b6',
\ }
function! s:hi(item, fg, bg, cterm, gui)
@ -94,6 +95,7 @@ endfunction
let s:fg = 249
let s:bg = get(g:, 'space_vim_dark_background', 235)
let s:bg = max([s:bg, 233])
let s:bias = s:bg - 235
let s:bg0 = s:bg - 1
@ -107,12 +109,12 @@ let s:bg4 = s:bg + 4
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('LineNr' , 239+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')
call s:hi('CursorLine' , '' , s:bg0 , 'None' , 'None')
call s:hi('CursorLineNr' , 170 , 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')
@ -138,10 +140,10 @@ 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')
hi DiffAdd term=bold cterm=reverse ctermfg=142 ctermbg=235 gui=reverse guifg=#b8bb26 guibg=#29422d
hi DiffChange term=bold cterm=reverse ctermfg=107 ctermbg=235 gui=reverse guifg=#8ec07c guibg=#32322c
hi DiffDelete term=bold cterm=reverse ctermfg=160 ctermbg=235 gui=reverse guifg=#e0211d guibg=#282828
hi DiffText term=reverse cterm=reverse ctermfg=214 ctermbg=235 gui=reverse guifg=#fabd2f guibg=#282828
call s:hi('Exception' , 204 , '' , 'bold' , 'bold')
call s:hi('Function' , 169 , '' , 'bold' , 'bold')
@ -169,7 +171,7 @@ 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('IncSearch' , 16 , 167 , 'bold' , 'bold')
call s:hi('MatchParen', 40 , s:bg0 , 'bold,underline', 'bold,underline')
call s:hi('ModeMsg' , 229 , '' , 'None' , 'None')
@ -196,10 +198,10 @@ 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('SpecialComment' , 243 , '' , 'None' , 'None')
call s:hi('SpellBad' , 168 , '' , 'underline' , 'undercurl')
call s:hi('SpellCap' , 110 , '' , 'underline' , 'undercurl')
call s:hi('SpellBad' , 168 , 52 , 'underline' , 'undercurl')
call s:hi('SpellCap' , 110 , 25 , 'underline' , 'undercurl')
call s:hi('SpellLocal' , 253 , '' , 'underline' , 'undercurl')
call s:hi('SpellRare' , 218 , '' , 'underline' , 'undercurl')
@ -214,6 +216,11 @@ call s:hi('VisualNOS' , '' , s:bg3 , 'None' , 'None')
" tilde group
call s:hi('NonText' , 241 , '' , 'None' , 'None')
call s:hi('Terminal' , 249 , s:bg , 'None' , 'None')
call s:hi('diffAdded' , 36 , '' , 'None' , 'None')
call s:hi('diffRemoved' , 167 , '' , 'None' , 'None')
hi MatchParen guibg=NONE
hi SignColumn guibg=NONE
@ -255,12 +262,15 @@ call s:hi('shFunctionKey' , 68 , '' , 'bold' , 'bold')
call s:hi('shTestOpr' , 178 , '' , 'none' , 'none')
" solidity
call s:hi('solContract' , 178 , '' , 'bold' , 'bold')
call s:hi('solContract' , 178 , '' , 'bold' , 'bold')
call s:hi('solContractName' , 168 , '' , 'bold' , 'bold')
call s:hi('solBuiltinType' , 176 , '' , 'none' , 'none')
" 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('vimMap' , 68 , '' , 'none' , 'none')
call s:hi('vimGroup' , 67 , '' , 'bold' , 'bold')
call s:hi('vimHiGroup' , 67 , '' , 'bold' , 'bold')
@ -269,6 +279,11 @@ call s:hi('rustKeyword' , 68 , '' , 'bold' , 'bold')
call s:hi('rustModPath' , 68 , '' , 'none' , 'none')
call s:hi('rustTrait' , 168 , '' , 'bold' , 'bold')
" toml
call s:hi('tomlTable' , 169 , '' , 'bold' , 'bold')
call s:hi('tomlKey' , 68 , '' , 'none' , 'none')
call s:hi('tomlComment' , 30 , '' , 'none' , 'italic')
" json
call s:hi('jsonStringSQError', 160, '', 'none', 'none')
@ -277,6 +292,12 @@ call s:hi('xmlTag' , 167 , '' , 'none' , 'none')
call s:hi('xmlEndTag' , 167 , '' , 'none' , 'none')
call s:hi('xmlTagName' , 167 , '' , 'none' , 'none')
" js
call s:hi('jsReturn' , 68 , '' , 'bold' , 'bold')
hi link jsObjectKey Type
hi link jsFuncBlock Identifier
hi link jsVariableDef Title
" go
call s:hi('goType' , 176 , '' , 'none' , 'none')
call s:hi('goFloat' , 135 , '' , 'none' , 'none')
@ -310,6 +331,7 @@ call s:hi('rubyInterpolationDelimiter' , 176 , '' , 'none' , 'none')
" html
hi link htmlSpecialTagName Tag
call s:hi('htmlItalic' , 36 , '' , 'None' , 'italic')
hi htmlBold cterm=bold gui=bold
" python-mode
call s:hi('pythonLambdaExpr' , 105 , '' , 'none' , 'none')
@ -390,6 +412,8 @@ 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')
call s:hi('NERDTreeExecFile' , 167 , '' , 'bold' , 'bold')
hi link NERDTreeLinkTarget Macro
" Tagbar
call s:hi('TagbarKind' , 169 , '' , 'bold' , 'bold')
@ -405,6 +429,10 @@ call s:hi('SignatureMarkText', 178, '', 'bold', 'bold')
call s:hi('CurrentWord' , '' , s:bg1 , 'underline' , 'underline')
call s:hi('CurrentWordTwins' , '' , s:bg1 , 'none' , 'none')
" quick-scope
call s:hi('QuickScopePrimary' , 155 , '' , 'underline' , 'underline')
call s:hi('QuickScopeSecondary' , 81 , '' , 'underline' , 'underline')
delf s:hi
unlet s:color256 s:colors s:bg

View File

@ -16,18 +16,6 @@ autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTreeType") &&b:NERDTreeT
"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

View File

@ -1,32 +0,0 @@
#!/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("不存在")

View File

@ -34,6 +34,7 @@ Plug 'jiangmiao/auto-pairs'
Plug 'tacahiroy/ctrlp-funky'
" Plug 'rking/ag.vim'
Plug 'haya14busa/incsearch.vim'
Plug 'ycm-core/YouCompleteMe'
" Plug 'Raimondi/delimitMate'
Plug 'morhetz/gruvbox'
Plug 'mhinz/vim-signify'
@ -57,14 +58,14 @@ 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 '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 --java-completer','for':['java','sql','vim','python','c','html','css','javascript','sh','shell']}
" Plug 'Valloric/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 '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']}

View File

@ -32,20 +32,8 @@ sudo apt remove vim --purge
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.9/config-3.9m-x86_64-linux-gnu \
--prefix=/opt/vim82
./configure
--with-features=huge --enable-multibyte --enable-pythoninterp=dynamic --with-python-config-dir=/usr/lib/python2.7/config-x86_64-linux-gnu --enable-python3interp=dynamic --with-python3-config-dir=/usr/lib/python3.9/config-3.9-x86_64-linux-gnu --enable-cscope --enable-gui=auto --enable-gtk2-check --enable-fontset --enable-largefile --disable-netbeans --with-compiledby="lingzhaohui@zeekling.cn" --enable-fail-if-missing --prefix=/home/zeekling/software/vim8.2
make
sudo make install