From 32d15bee18f68fa56221cf390a1334e1574847f2 Mon Sep 17 00:00:00 2001 From: shaoying Date: Sun, 30 Aug 2020 12:42:45 +0800 Subject: [PATCH] opt some --- etc/conf/vimrc | 84 +++++++++----------------------------------------- etc/init.shy | 1 + src/main.go | 10 +++++- src/main.shy | 5 ++- 4 files changed, 27 insertions(+), 73 deletions(-) diff --git a/etc/conf/vimrc b/etc/conf/vimrc index 6e7466c0..2eb0a2dc 100644 --- a/etc/conf/vimrc +++ b/etc/conf/vimrc @@ -5,9 +5,9 @@ ":PlugInstall " "}}} -"加载插件"{{{ +"插件列表"{{{ call plug#begin() -" Plug 'vim-scripts/matrix.vim--Yang' +Plug 'vim-scripts/matrix.vim--Yang' Plug 'vim-airline/vim-airline' Plug 'airblade/vim-gitgutter' Plug 'scrooloose/nerdtree' @@ -20,40 +20,15 @@ Plug 'tpope/vim-fugitive' Plug 'gcmt/taboo.vim' set sessionoptions+=tabpages,globals -let g:go_highlight_functions=1 Plug 'fatih/vim-go' let g:go_version_warning=0 +let g:go_highlight_functions=1 Plug 'chr4/nginx.vim' Plug 'othree/html5.vim' +Plug 'vim-scripts/python.vim' Plug 'plasticboy/vim-markdown' +Plug 'vim-syntastic/syntastic' -" Plug 'vim-airline/vim-airline-themes' -" Plug 'ntpeters/vim-better-whitespace' -" Plug 'easymotion/vim-easymotion' -" -" -" let g:Tlist_WinWidth=45 -" let g:Tlist_Exit_OnlyWindow=1 -" let g:Tlist_Enable_Fold_Column=0 -" nnoremap :TlistToggle -" -" Plug 'rking/ag.vim' -" nnoremap :Ag =expand("") -" -" Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' } -" nnoremap :FZF -q =expand("") -" -" Plug 'godlygeek/tabular' -" Plug 'vim-scripts/python.vim' -" -" Plug 'vim-syntastic/syntastic' -" Plug 'Valloric/YouCompleteMe' -" let g:ycm_confirm_extra_conf=1 -" let g:syntastic_enable_signs=1 -" let g:ycm_python_binary_path='/usr/bin/python' -" nnoremap gd :YcmCompleter GoToDeclaration -" nnoremap gD :YcmCompleter GoToReferences -" call plug#end() "}}} " 基本配置"{{{ @@ -64,7 +39,6 @@ set relativenumber set cursorline set cursorcolumn set scrolloff=3 - set t_Co=256 set mouse=a @@ -79,7 +53,6 @@ set incsearch set nowrapscan set smartcase set ignorecase - set showmatch set matchtime=2 @@ -94,17 +67,12 @@ set backspace=indent,eol,start set foldenable set foldmethod=marker "}}} -"快捷键映射"{{{ +"按键映射"{{{ nnoremap h nnoremap j nnoremap k nnoremap l nnoremap : - -cnoremap jk -cnoremap W w -cnoremap wa wa -inoremap jk "}}} " 编程配置{{{ set keywordprg=man\ -a @@ -116,27 +84,19 @@ function! Config(type) if a:type == "go" set foldmethod=syntax set foldnestmax=3 - set tags+=ctx.tags,golang.tags - " autocmd BufWritePost *.go !goimports -w elseif a:type == "shy" set filetype=shy set commentstring=#%s - elseif a:type == "son" - set commentstring=#%s - elseif a:type == "tmpl" - set foldmethod=indent - elseif a:type == "conf" - set filetype=nginx elseif a:type == "json" set foldmethod=syntax + elseif a:type == "conf" + set filetype=nginx elseif a:type == "xml" set filetype=xml elseif a:type == "css" set filetype=css set foldmethod=marker set foldmarker={,} - elseif a:type == "txt" - set noexpandtab elseif a:type == "js" set filetype=javascript source ~/.vim/syntax/javascript.vim @@ -147,35 +107,21 @@ endfunction autocmd BufNewFile,BufReadPost *.go call Config("go") autocmd BufNewFile,BufReadPost *.shy call Config("shy") -autocmd BufNewFile,BufReadPost *.tmpl call Config("tmpl") -autocmd BufNewFile,BufReadPost *.conf call Config("conf") autocmd BufNewFile,BufReadPost *.json call Config("json") - +autocmd BufNewFile,BufReadPost *.conf call Config("conf") autocmd BufNewFile,BufReadPost *.wxml call Config("xml") autocmd BufNewFile,BufReadPost *.wxss call Config("css") -autocmd BufNewFile,BufReadPost *.txt call Config("txt") autocmd BufNewFile,BufReadPost *.js call Config("js") +if filereadable(expand("~/.auto.vim")) | source ~/.auto.vim | endif +if filereadable(expand("~/.local.vim")) | source ~/.local.vim | endif + autocmd BufReadPost * normal `" -if filereadable(expand("~/.vim_local")) | source ~/.vim_local | endif -if filereadable(expand("usr/publish/auto.vim")) | source usr/publish/auto.vim | endif - +"}}} +"主题色系"{{{ colorscheme torte highlight Comment ctermfg=cyan ctermbg=darkblue -highlight Pmenu ctermfg=cyan ctermbg=darkblue highlight PmenuSel ctermfg=darkblue ctermbg=cyan +highlight Pmenu ctermfg=cyan ctermbg=darkblue "}}} -" -nnoremap :NERDTreeToggle - -" " miss -" highlight StatusLine ctermfg=white ctermbg=black -" highlight LineNr ctermfg=white ctermbg=black -" highlight CursorLineNr ctermfg=white ctermbg=black -" -" highlight kitMiss ctermfg=white -" syntax match kitMiss ".*" -" syntax match kitMiss "\".*\"" - - diff --git a/etc/init.shy b/etc/init.shy index 6442bb43..5d330788 100644 --- a/etc/init.shy +++ b/etc/init.shy @@ -1,5 +1,6 @@ ~aaa role white void web.code.inner + role white void usr.publish role white void tmp role black tech ssh diff --git a/src/main.go b/src/main.go index 04f2e1b0..fbd9daec 100644 --- a/src/main.go +++ b/src/main.go @@ -19,12 +19,20 @@ import ( _ "github.com/shylinux/golang-story/src/compile" _ "github.com/shylinux/golang-story/src/project" _ "github.com/shylinux/golang-story/src/runtime" - _ "github.com/shylinux/linux-story/src/busybox" + + _ "github.com/shylinux/linux-story/src/android" + _ "github.com/shylinux/linux-story/src/centos" + _ "github.com/shylinux/linux-story/src/context" + _ "github.com/shylinux/linux-story/src/ubuntu" + _ "github.com/shylinux/linux-story/src/gcc" _ "github.com/shylinux/linux-story/src/gdb" _ "github.com/shylinux/linux-story/src/glibc" + + _ "github.com/shylinux/linux-story/src/busybox" _ "github.com/shylinux/linux-story/src/kernel" _ "github.com/shylinux/linux-story/src/qemu" + _ "github.com/shylinux/mysql-story/src/client" _ "github.com/shylinux/mysql-story/src/server" _ "github.com/shylinux/nginx-story/src/server" diff --git a/src/main.shy b/src/main.shy index b0526154..878ad21b 100644 --- a/src/main.shy +++ b/src/main.shy @@ -24,14 +24,13 @@ chapter "管理" field "下载管理" web.code.install field "服务管理" cli.daemon -chapter "Tech" +chapter "技术" field webpack web.code.webpack field binpack web.code.binpack field modpack web.code.modpack - +chapter "理论" source usr/learning/自然/编程/数据结构.shy - source usr/learning/自然/编程/设计模式.shy chapter "Logo"