From 152a6622596ec434e16d4859ac9be3890d1673fc Mon Sep 17 00:00:00 2001 From: wsdjeg Date: Sat, 18 Feb 2017 13:31:38 +0800 Subject: [PATCH 1/2] Add lang#markdown layer --- autoload/SpaceVim/default.vim | 1 - autoload/SpaceVim/layers/lang.vim | 3 --- autoload/SpaceVim/layers/lang/markdown.vim | 11 +++++++++++ 3 files changed, 11 insertions(+), 4 deletions(-) create mode 100644 autoload/SpaceVim/layers/lang/markdown.vim diff --git a/autoload/SpaceVim/default.vim b/autoload/SpaceVim/default.vim index e617d3657..973aaf603 100644 --- a/autoload/SpaceVim/default.vim +++ b/autoload/SpaceVim/default.vim @@ -94,7 +94,6 @@ function! SpaceVim#default#SetOptions() abort set laststatus=2 set completeopt=longest,menu set wildignorecase - let g:markdown_fenced_languages = ['vim', 'java', 'bash=sh', 'sh', 'html', 'python'] set mouse= set hidden set ttimeout diff --git a/autoload/SpaceVim/layers/lang.vim b/autoload/SpaceVim/layers/lang.vim index 9c2b06a71..154ee46be 100644 --- a/autoload/SpaceVim/layers/lang.vim +++ b/autoload/SpaceVim/layers/lang.vim @@ -16,7 +16,6 @@ function! SpaceVim#layers#lang#plugins() abort \ ['syngan/vim-vimlint', { 'on_ft' : 'vim'}], \ ['ynkdir/vim-vimlparser', { 'on_ft' : 'vim'}], \ ['todesking/vint-syntastic', { 'on_ft' : 'vim'}], - \ ['plasticboy/vim-markdown', { 'on_ft' : 'markdown'}], \ ['elixir-lang/vim-elixir', { 'on_ft' : 'elixir'}], \ ['PotatoesMaster/i3-vim-syntax', { 'on_ft' : 'i3'}], \ ['isundil/vim-irssi-syntax', { 'on_ft' : 'irssi'}], @@ -28,6 +27,4 @@ function! SpaceVim#layers#lang#plugins() abort endfunction function! SpaceVim#layers#lang#config() abort - let g:vim_markdown_conceal = 0 - let g:vim_markdown_folding_disabled = 1 endfunction diff --git a/autoload/SpaceVim/layers/lang/markdown.vim b/autoload/SpaceVim/layers/lang/markdown.vim new file mode 100644 index 000000000..aeefdcaa5 --- /dev/null +++ b/autoload/SpaceVim/layers/lang/markdown.vim @@ -0,0 +1,11 @@ +function! SpaceVim#layers#lang#markdown#plugins() abort + let plugins = [] + call add(plugins, ['plasticboy/vim-markdown',{ 'on_ft' : 'markdown'}]) + return plugins +endfunction + +function! SpaceVim#layers#lang#markdown#config() abort + let g:vim_markdown_conceal = 0 + let g:vim_markdown_folding_disabled = 1 + let g:markdown_fenced_languages = ['vim', 'java', 'bash=sh', 'sh', 'html', 'python'] +endfunction From ac190d2814d510b8cfb1e92b4e5a48cfa8d3d4ae Mon Sep 17 00:00:00 2001 From: wsdjeg Date: Sat, 18 Feb 2017 19:40:28 +0800 Subject: [PATCH 2/2] Add markdown preview plugin --- autoload/SpaceVim/default.vim | 1 + autoload/SpaceVim/layers/lang/markdown.vim | 2 ++ autoload/SpaceVim/layers/tools.vim | 1 - 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/autoload/SpaceVim/default.vim b/autoload/SpaceVim/default.vim index 973aaf603..0fe329f7f 100644 --- a/autoload/SpaceVim/default.vim +++ b/autoload/SpaceVim/default.vim @@ -117,6 +117,7 @@ function! SpaceVim#default#SetPlugins() abort call add(g:spacevim_plugin_groups, 'python') call add(g:spacevim_plugin_groups, 'scala') call add(g:spacevim_plugin_groups, 'lang#go') + call add(g:spacevim_plugin_groups, 'lang#markdown') call add(g:spacevim_plugin_groups, 'scm') call add(g:spacevim_plugin_groups, 'editing') call add(g:spacevim_plugin_groups, 'indents') diff --git a/autoload/SpaceVim/layers/lang/markdown.vim b/autoload/SpaceVim/layers/lang/markdown.vim index aeefdcaa5..a763ad434 100644 --- a/autoload/SpaceVim/layers/lang/markdown.vim +++ b/autoload/SpaceVim/layers/lang/markdown.vim @@ -1,6 +1,8 @@ function! SpaceVim#layers#lang#markdown#plugins() abort let plugins = [] call add(plugins, ['plasticboy/vim-markdown',{ 'on_ft' : 'markdown'}]) + call add(plugins, ['iamcco/mathjax-support-for-mkdp',{ 'on_ft' : 'markdown'}]) + call add(plugins, ['iamcco/markdown-preview.vim',{ 'on_ft' : 'markdown'}]) return plugins endfunction diff --git a/autoload/SpaceVim/layers/tools.vim b/autoload/SpaceVim/layers/tools.vim index 3d476ea0f..8024bb046 100644 --- a/autoload/SpaceVim/layers/tools.vim +++ b/autoload/SpaceVim/layers/tools.vim @@ -9,7 +9,6 @@ function! SpaceVim#layers#tools#plugins() abort \ ['MattesGroeger/vim-bookmarks', { 'on_map' : 'Bookmark', 'loadconf_before' : 1}], \ ['google/vim-searchindex'], \ ['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'}],