mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-02-03 02:30:03 +08:00
commit
4830864e24
@ -77,7 +77,7 @@ SpaceVim load custom configuration from `~/.SpaceVim.d/init.vim`,
|
|||||||
|
|
||||||
here is an example:
|
here is an example:
|
||||||
|
|
||||||
```viml
|
```vim
|
||||||
" Here are some basic customizations, please refer to the ~/.SpaceVim.d/init.vim
|
" Here are some basic customizations, please refer to the ~/.SpaceVim.d/init.vim
|
||||||
" file for all possible options:
|
" file for all possible options:
|
||||||
let g:spacevim_default_indent = 3
|
let g:spacevim_default_indent = 3
|
||||||
|
@ -16,7 +16,7 @@ function! s:self.open(opts) abort
|
|||||||
let mode = get(a:opts, 'mode', 'vertical topleft split')
|
let mode = get(a:opts, 'mode', 'vertical topleft split')
|
||||||
let cmd = get(a:opts, 'cmd', '')
|
let cmd = get(a:opts, 'cmd', '')
|
||||||
if empty(buf)
|
if empty(buf)
|
||||||
exe mode bufopt
|
exe mode buf
|
||||||
else
|
else
|
||||||
exe mode buf
|
exe mode buf
|
||||||
endif
|
endif
|
||||||
|
@ -13,5 +13,9 @@ function! s:self._update() abort
|
|||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! s:self._jump(tabnr, bufid) abort
|
function! s:self._jump(tabnr, bufid) abort
|
||||||
|
exe 'tabnext' . a:tabnr
|
||||||
|
if index(tabpagebuflist(a:tabnr), a:bufid) != -1
|
||||||
|
let winnr = bufwinnr(bufname(a:bufid))
|
||||||
|
exe winnr . 'wincmd w'
|
||||||
|
endif
|
||||||
endfunction
|
endfunction
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
function! SpaceVim#layers#lang#markdown#plugins() abort
|
function! SpaceVim#layers#lang#markdown#plugins() abort
|
||||||
let plugins = []
|
let plugins = []
|
||||||
call add(plugins, ['plasticboy/vim-markdown',{ 'on_ft' : 'markdown'}])
|
call add(plugins, ['gabrielelana/vim-markdown',{ 'on_ft' : 'markdown'}])
|
||||||
|
call add(plugins, ['joker1007/vim-markdown-quote-syntax',{ 'on_ft' : 'markdown'}])
|
||||||
call add(plugins, ['mzlogin/vim-markdown-toc',{ 'on_ft' : 'markdown'}])
|
call add(plugins, ['mzlogin/vim-markdown-toc',{ 'on_ft' : 'markdown'}])
|
||||||
call add(plugins, ['iamcco/mathjax-support-for-mkdp',{ 'on_ft' : 'markdown'}])
|
call add(plugins, ['iamcco/mathjax-support-for-mkdp',{ 'on_ft' : 'markdown'}])
|
||||||
call add(plugins, ['iamcco/markdown-preview.vim',{ 'on_ft' : 'markdown'}])
|
call add(plugins, ['iamcco/markdown-preview.vim',{ 'on_ft' : 'markdown'}])
|
||||||
@ -8,18 +9,25 @@ function! SpaceVim#layers#lang#markdown#plugins() abort
|
|||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! SpaceVim#layers#lang#markdown#config() abort
|
function! SpaceVim#layers#lang#markdown#config() abort
|
||||||
let g:vim_markdown_fenced_languages = [ 'c++=cpp' , 'viml=vim', 'bash=sh', 'ini=dosini']
|
let g:markdown_enable_mappings = 0
|
||||||
let g:vim_markdown_conceal = 0
|
let g:markdown_enable_insert_mode_leader_mappings = 0
|
||||||
let g:vim_markdown_folding_disabled = 1
|
let g:markdown_enable_spell_checking = 0
|
||||||
let g:vim_markdown_frontmatter = 1
|
let g:markdown_quote_syntax_filetypes = {
|
||||||
let g:vim_markdown_toml_frontmatter = 1
|
\ "vim" : {
|
||||||
|
\ "start" : "\\%(vim\\|viml\\)",
|
||||||
|
\},
|
||||||
|
\}
|
||||||
augroup SpaceVim_lang_markdown
|
augroup SpaceVim_lang_markdown
|
||||||
au!
|
au!
|
||||||
autocmd BufEnter *.md call s:mappings()
|
autocmd BufEnter *.md call s:mappings()
|
||||||
augroup END
|
augroup END
|
||||||
|
if executable('firefox')
|
||||||
|
let g:mkdp_path_to_chrome= 'firefox'
|
||||||
|
endif
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! s:mappings() abort
|
function! s:mappings() abort
|
||||||
let g:_spacevim_mappings_space.l = {'name' : '+Language Specified'}
|
let g:_spacevim_mappings_space.l = {'name' : '+Language Specified'}
|
||||||
call SpaceVim#mapping#space#langSPC('nmap', ['l','ft'], "Tabularize /|", 'Format table under cursor', 1)
|
call SpaceVim#mapping#space#langSPC('nmap', ['l','ft'], "Tabularize /|", 'Format table under cursor', 1)
|
||||||
|
call SpaceVim#mapping#space#langSPC('nmap', ['l','p'], "MarkdownPreview", 'Real-time markdown preview', 1)
|
||||||
endfunction
|
endfunction
|
||||||
|
12
docs/layers/lang/markdown.md
Normal file
12
docs/layers/lang/markdown.md
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
# [Layers](https://spacevim.org/layers) > lang#markdown
|
||||||
|
|
||||||
|
This layer is for editing markdown file.
|
||||||
|
|
||||||
|
Mappings
|
||||||
|
|
||||||
|
Key | mode | description
|
||||||
|
--- | --- | ------------
|
||||||
|
SPC l ft | Normal | Format table under cursor
|
||||||
|
SPC l p | Normal | Real-time markdown preview
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user