From 4b9e71b5a570448869b6c1a3f910fe1d7d345e37 Mon Sep 17 00:00:00 2001 From: wsdjeg Date: Sat, 14 Jan 2017 19:49:19 +0800 Subject: [PATCH] Split tools --- autoload/SpaceVim/layers/core.vim | 3 ++ autoload/SpaceVim/layers/edit.vim | 14 ++++++ autoload/SpaceVim/layers/git.vim | 1 + autoload/SpaceVim/layers/github.vim | 2 + autoload/SpaceVim/layers/lang.vim | 9 +++- autoload/SpaceVim/layers/tools.vim | 39 +++++++++++++++ autoload/SpaceVim/layers/ui.vim | 20 ++++++++ autoload/SpaceVim/plugins.vim | 78 ----------------------------- 8 files changed, 87 insertions(+), 79 deletions(-) create mode 100644 autoload/SpaceVim/layers/edit.vim create mode 100644 autoload/SpaceVim/layers/tools.vim create mode 100644 autoload/SpaceVim/layers/ui.vim diff --git a/autoload/SpaceVim/layers/core.vim b/autoload/SpaceVim/layers/core.vim index a5eb33f1b..b52f6805e 100644 --- a/autoload/SpaceVim/layers/core.vim +++ b/autoload/SpaceVim/layers/core.vim @@ -2,9 +2,12 @@ function! SpaceVim#layers#core#plugins() abort return [ \ ['Shougo/vimproc.vim', {'build' : 'make'}], \ ['hecal3/vim-leader-guide', {'loadconf': 1, 'loadconf_before' : 1, 'merged' : 0}], + \ ['benizi/vim-automkdir'], + \ ['airblade/vim-rooter'], \ ] endfunction function! SpaceVim#layers#core#config() abort + let g:rooter_silent_chdir = 1 endfunction diff --git a/autoload/SpaceVim/layers/edit.vim b/autoload/SpaceVim/layers/edit.vim new file mode 100644 index 000000000..a5b02f653 --- /dev/null +++ b/autoload/SpaceVim/layers/edit.vim @@ -0,0 +1,14 @@ +function! SpaceVim#layers#edit#plugins() abort + return [ + \ ['tpope/vim-surround'], + \ ['terryma/vim-multiple-cursors'], + \ ['scrooloose/nerdcommenter'], + \ ] +endfunction + +function! SpaceVim#layers#edit#config() abort + let g:multi_cursor_next_key='' + let g:multi_cursor_prev_key='' + let g:multi_cursor_skip_key='' + let g:multi_cursor_quit_key='' +endfunction diff --git a/autoload/SpaceVim/layers/git.vim b/autoload/SpaceVim/layers/git.vim index 7951ae903..0c8c51170 100644 --- a/autoload/SpaceVim/layers/git.vim +++ b/autoload/SpaceVim/layers/git.vim @@ -4,6 +4,7 @@ function! SpaceVim#layers#git#plugins() abort \ ['gregsexton/gitv', { 'on_cmd':['Gitv']}], \ ['junegunn/gv.vim', { 'on_cmd' : 'GV'}], \ ['lambdalisue/vim-gita', {'on_cmd': 'Gita'}], + \ ['tpope/vim-fugitive'], \ ] endfunction diff --git a/autoload/SpaceVim/layers/github.vim b/autoload/SpaceVim/layers/github.vim index 43f104b8d..3ce14453e 100644 --- a/autoload/SpaceVim/layers/github.vim +++ b/autoload/SpaceVim/layers/github.vim @@ -1,6 +1,8 @@ function! SpaceVim#layers#github#plugins() abort return [ \ ['junegunn/vim-github-dashboard', { 'on_cmd':['GHD','GHA','GHActivity','GHDashboard']}], + \ ['jaxbot/github-issues.vim', { 'on_cmd' : 'Gissues'}], + \ ['wsdjeg/GitHub-api.vim'], \ ] endfunction diff --git a/autoload/SpaceVim/layers/lang.vim b/autoload/SpaceVim/layers/lang.vim index 8eb19aac7..38da00deb 100644 --- a/autoload/SpaceVim/layers/lang.vim +++ b/autoload/SpaceVim/layers/lang.vim @@ -21,7 +21,7 @@ function! SpaceVim#layers#lang#plugins() abort \ ['leshill/vim-json', { 'on_ft' : ['javascript','json']}], \ ['othree/javascript-libraries-syntax.vim', { 'on_ft' : ['javascript','coffee','ls','typescript']}], \ ['wsdjeg/vim-dict', { 'on_ft' : 'java'}], - \ ['wsdjeg/java_getset.vim', { 'on_ft' : 'java'}], + \ ['wsdjeg/java_getset.vim', { 'on_ft' : 'java', 'loadconf' : 1}], \ ['wsdjeg/JavaUnit.vim', { 'on_ft' : 'java'}], \ ['vim-jp/vim-java', { 'on_ft' : 'java'}], \ ['syngan/vim-vimlint', { 'on_ft' : 'vim'}], @@ -35,6 +35,7 @@ function! SpaceVim#layers#lang#plugins() abort \ ['lervag/vimtex', { 'on_ft' : 'tex'}], \ ['vimperator/vimperator.vim', { 'on_ft' : 'vimperator'}], \ ['fatih/vim-go', { 'on_ft' : 'go', 'loadconf_before' : 1}], + \ ['rust-lang/rust.vim', {'merged' : 1}], \ ] if g:spacevim_enable_javacomplete2_py call add(plugins , ['wsdjeg/vim-javacomplete2', { 'on_ft' : ['java','jsp'], 'loadconf' : 1}]) @@ -43,3 +44,9 @@ function! SpaceVim#layers#lang#plugins() abort endif return plugins endfunction + +function! SpaceVim#layers#lang#config() abort + let g:racer_cmd = $HOME.'/.cargo/bin/racer' + let g:vim_markdown_conceal = 0 + let g:vim_markdown_folding_disabled = 1 +endfunction diff --git a/autoload/SpaceVim/layers/tools.vim b/autoload/SpaceVim/layers/tools.vim new file mode 100644 index 000000000..c35f60bd9 --- /dev/null +++ b/autoload/SpaceVim/layers/tools.vim @@ -0,0 +1,39 @@ +function! SpaceVim#layers#tools#plugins() abort + return [ + \ ['tpope/vim-scriptease'], + \ ['wsdjeg/vim-cheat', { 'on_cmd' : 'Cheat'}], + \ ['wsdjeg/SourceCounter.vim', { 'on_cmd' : 'SourceCounter'}], + \ ['junegunn/goyo.vim', { 'on_cmd' : 'Goyo', 'loadconf' : 1}], + \ ['Yggdroot/LeaderF', {'merged' : 0}], + \ ['google/vim-searchindex'], + \ ['tweekmonster/helpful.vim', {'on_cmd': 'HelpfulVersion'}], + \ ['simnalamburt/vim-mundo', { 'on_cmd' : 'MundoToggle'}], + \ ['wsdjeg/MarkDown.pl', { 'on_cmd' : 'MarkDownPreview'}], + \ ['mhinz/vim-grepper' , { 'on_cmd' : 'Grepper', 'loadconf' : 1} ], + \ ['tpope/vim-projectionist',{'on_cmd':['A','AS','AV','AT','AD','Cd','Lcd','ProjectDo']}], + \ ['ntpeters/vim-better-whitespace',{'on_cmd' : 'StripWhitespace'}], + \ ['junegunn/rainbow_parentheses.vim',{'on_cmd' : 'RainbowParentheses'}], + \ ['tyru/open-browser.vim', { + \'on_cmd' : ['OpenBrowserSmartSearch','OpenBrowser','OpenBrowserSearch'], + \'on_map' : '(openbrowser-', + \ 'loadconf' : 1, + \}], + \ ['godlygeek/tabular', { 'on_cmd': 'Tabularize'}], + \ ['airblade/vim-gitgutter',{'on_cmd' : 'GitGutterEnable'}], + \ ['itchyny/calendar.vim', { 'on_cmd' : 'Calendar'}], + \ ['wsdjeg/Mysql.vim', { 'on_cmd' : 'SQLGetConnection'}], + \ ['wsdjeg/job.vim', { 'merged' : 0}], + \ ] +endfunction + +function! SpaceVim#layers#tools#config() abort + nnoremap :MundoToggle + augroup rainbow_lisp + autocmd! + autocmd FileType lisp,clojure,scheme,java RainbowParentheses + augroup END + let g:rainbow#max_level = 16 + let g:rainbow#pairs = [['(', ')'], ['[', ']'],['{','}']] + " List of colors that you do not want. ANSI code or #RRGGBB + let g:rainbow#blacklist = [233, 234] +endfunction diff --git a/autoload/SpaceVim/layers/ui.vim b/autoload/SpaceVim/layers/ui.vim new file mode 100644 index 000000000..b6aa4c018 --- /dev/null +++ b/autoload/SpaceVim/layers/ui.vim @@ -0,0 +1,20 @@ +scriptencoding utf-8 +function! SpaceVim#layers#ui#plugins() abort + return [ + \ ['Yggdroot/indentLine'], + \ ['mhinz/vim-signify'], + \ ['majutsushi/tagbar', {'loadconf' : 1}], + \ ] +endfunction + +function! SpaceVim#layers#ui#config() abort + let g:indentLine_color_term = 239 + let g:indentLine_color_gui = '#09AA08' + let g:indentLine_char = '¦' + let g:indentLine_concealcursor = 'niv' " (default 'inc') + let g:indentLine_conceallevel = 2 " (default 2) + let g:indentLine_fileTypeExclude = ['help', 'startify', 'vimfiler'] + let g:signify_disable_by_default = 0 + let g:signify_line_highlight = 0 + noremap :TagbarToggle +endfunction diff --git a/autoload/SpaceVim/plugins.vim b/autoload/SpaceVim/plugins.vim index f9912cd8b..0c78fe54e 100644 --- a/autoload/SpaceVim/plugins.vim +++ b/autoload/SpaceVim/plugins.vim @@ -6,26 +6,9 @@ function! SpaceVim#plugins#load() abort call s:load_plugins() - call zvim#plug#add('tpope/vim-scriptease') - call zvim#plug#add('tpope/vim-fugitive') - call zvim#plug#add('tpope/vim-surround') - call zvim#plug#add('terryma/vim-multiple-cursors') - let g:multi_cursor_next_key='' - let g:multi_cursor_prev_key='' - let g:multi_cursor_skip_key='' - let g:multi_cursor_quit_key='' "web plugins - call zvim#plug#add('wsdjeg/SourceCounter.vim', { 'on_cmd' : 'SourceCounter'}) - if zvim#plug#tap('java_getset.vim') - call zvim#plug#defind_hooks('java_getset.vim') - endif - call zvim#plug#add('jaxbot/github-issues.vim', { 'on_cmd' : 'Gissues'}) - call zvim#plug#add('wsdjeg/Mysql.vim', { 'on_cmd' : 'SQLGetConnection'}) - call zvim#plug#add('wsdjeg/vim-cheat', { 'on_cmd' : 'Cheat'}) - call zvim#plug#add('wsdjeg/job.vim', { 'merged' : 0}) - call zvim#plug#add('wsdjeg/GitHub-api.vim') call zvim#plug#add('vim-airline/vim-airline', { 'merged' : 0}) call zvim#plug#add('vim-airline/vim-airline-themes', { 'merged' : 0}) if zvim#plug#tap('vim-airline') @@ -48,7 +31,6 @@ function! SpaceVim#plugins#load() abort vnoremap (wildfire-water) let g:wildfire_objects = ["i'", 'i"', 'i)', 'i]', 'i}', 'ip', 'it'] - call zvim#plug#add('scrooloose/nerdcommenter') call zvim#plug#add('easymotion/vim-easymotion',{'on_map' : '(easymotion-prefix)'}) if zvim#plug#tap('vim-easymotion') map (easymotion-prefix) @@ -59,32 +41,7 @@ function! SpaceVim#plugins#load() abort if zvim#plug#tap('vim-startify') call zvim#plug#defind_hooks('vim-startify') endif - call zvim#plug#add('mhinz/vim-signify') - let g:signify_disable_by_default = 0 - let g:signify_line_highlight = 0 - call zvim#plug#add('mhinz/vim-grepper' , { 'on_cmd' : 'Grepper' } ) - if zvim#plug#tap('vim-grepper') - call zvim#plug#defind_hooks('vim-grepper') - endif - call zvim#plug#add('airblade/vim-rooter') - let g:rooter_silent_chdir = 1 - call zvim#plug#add('Yggdroot/indentLine') - let g:indentLine_color_term = 239 - let g:indentLine_color_gui = '#09AA08' - let g:indentLine_char = '¦' - let g:indentLine_concealcursor = 'niv' " (default 'inc') - let g:indentLine_conceallevel = 2 " (default 2) - let g:indentLine_fileTypeExclude = ['help', 'startify', 'vimfiler'] - call zvim#plug#add('godlygeek/tabular', { 'on_cmd': 'Tabularize'}) - call zvim#plug#add('benizi/vim-automkdir') - "[c ]c jump between prev or next hunk - call zvim#plug#add('airblade/vim-gitgutter',{'on_cmd' : 'GitGutterEnable'}) - call zvim#plug#add('itchyny/calendar.vim', { 'on_cmd' : 'Calendar'}) call zvim#plug#add('lilydjwg/fcitx.vim', { 'on_i' : 1}) - call zvim#plug#add('junegunn/goyo.vim', { 'on_cmd' : 'Goyo'}) - if zvim#plug#tap('goyo.vim') - call zvim#plug#defind_hooks('goyo.vim') - endif "vim Wimdows config call zvim#plug#add('scrooloose/nerdtree',{'on_cmd':'NERDTreeToggle'}) if zvim#plug#tap('nerdtree') @@ -102,37 +59,15 @@ function! SpaceVim#plugins#load() abort autocmd FileType nerdtree nnoremap :call OpenOrCloseNERDTree() augroup END endif - call zvim#plug#add('tpope/vim-projectionist',{'on_cmd':['A','AS','AV','AT','AD','Cd','Lcd','ProjectDo']}) call zvim#plug#add('Xuyuanp/nerdtree-git-plugin') call zvim#plug#add('taglist.vim',{'on_cmd' : 'TlistToggle'}) if zvim#plug#tap('taglist.vim') call zvim#plug#defind_hooks('taglist.vim') noremap :TlistToggle endif - call zvim#plug#add('ntpeters/vim-better-whitespace',{'on_cmd' : 'StripWhitespace'}) - call zvim#plug#add('junegunn/rainbow_parentheses.vim',{'on_cmd' : 'RainbowParentheses'}) - augroup rainbow_lisp - autocmd! - autocmd FileType lisp,clojure,scheme,java RainbowParentheses - augroup END - let g:rainbow#max_level = 16 - let g:rainbow#pairs = [['(', ')'], ['[', ']'],['{','}']] - " List of colors that you do not want. ANSI code or #RRGGBB - let g:rainbow#blacklist = [233, 234] - call zvim#plug#add('majutsushi/tagbar') - if zvim#plug#tap('tagbar') - call zvim#plug#defind_hooks('tagbar') - noremap :TagbarToggle - endif "}}} call zvim#plug#add('floobits/floobits-neovim', { 'on_cmd' : ['FlooJoinWorkspace','FlooShareDirPublic','FlooShareDirPrivate']}) - call zvim#plug#add('wsdjeg/MarkDown.pl', { 'on_cmd' : 'MarkDownPreview'}) - "call zvim#plug#add('plasticboy/vim-markdown', { 'on_ft' : 'markdown'}) - let g:vim_markdown_conceal = 0 - let g:vim_markdown_folding_disabled = 1 - call zvim#plug#add('simnalamburt/vim-mundo', { 'on_cmd' : 'MundoToggle'}) - nnoremap :MundoToggle call zvim#plug#add('TaskList.vim', { 'on_cmd' : 'TaskList'}) map td TaskList call zvim#plug#add('ianva/vim-youdao-translater', { 'on_cmd' : ['Ydv','Ydc','Yde']}) @@ -141,19 +76,6 @@ function! SpaceVim#plugins#load() abort call zvim#plug#add('editorconfig/editorconfig-vim', { 'on_cmd' : 'EditorConfigReload'}) call zvim#plug#add('junegunn/fzf', { 'on_cmd' : 'FZF'}) nnoremap fz :FZF - call zvim#plug#add('tyru/open-browser.vim', { - \'on_cmd' : ['OpenBrowserSmartSearch','OpenBrowser','OpenBrowserSearch'], - \'on_map' : '(openbrowser-', - \}) - if zvim#plug#tap('open-brower.vim') - call zvim#plug#defind_hooks('open-brower.vim') - endif - let g:racer_cmd = $HOME.'/.cargo/bin/racer' - call zvim#plug#add('rust-lang/rust.vim', {'merged' : 1}) - call zvim#plug#add('tweekmonster/helpful.vim', {'on_cmd': 'HelpfulVersion'}) - " google plugins - call zvim#plug#add('google/vim-searchindex') - call zvim#plug#add('Yggdroot/LeaderF', {'merged' : 0}) call s:disable_plugins(g:spacevim_disabled_plugins)