20 lines
751 B
VimL
20 lines
751 B
VimL
" PROSE: function to automatically enables markdown plugins for md & txt files
|
|
function! s:Prose()
|
|
call plug#load('vim-pencil')
|
|
call plug#load('goyo.vim')
|
|
call plug#load('limelight.vim')
|
|
call pencil#init()
|
|
" PLUGIN: vim-textobj-sentence
|
|
" enable extended sentence textobject use on md and plaintext files
|
|
call textobj#sentence#init()
|
|
" hide the markdown cruft
|
|
setlocal conceallevel=2
|
|
setlocal foldlevel=2
|
|
endfunction
|
|
" enable syntax highlighting for codeblocks WITHIN markdown
|
|
let g:markdown_fenced_languages = ['html', 'python', 'bash=sh', 'javascipt', 'go']
|
|
|
|
" invoke it manually by writing :Prose
|
|
" or, it will get automatically sourced for certain filetypes in
|
|
" after/ftplugin directory
|
|
command! -nargs=0 Prose call s:Prose()
|