summaryrefslogtreecommitdiff
path: root/nvim/nvim/ftplugin/markdown.vim
blob: 73952661f63f46149249fc3a111aa4d8ec5933c6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
setlocal syntax=markdown

" Spellcheck in markdown (automatic to english)
setlocal spelllang=en
setlocal spell

" Auto-capitalize script
augroup SENTENCES
    au!
    autocmd InsertCharPre * if &ft=='markdown' | if search('\v(%^|[.!?]\_s+|\_^\-\s|\_^title\:\s|\n\n)%#', 'bcnw') != 0 | let v:char = toupper(v:char) | endif | endif
augroup END

let g:markdown_folding=1

" Syncronize syntax from the beginning of the file
:syntax sync fromstart