dgy
/
hexagons
Archived
1
0
Fork 0
This repository has been archived on 2021-03-24. You can view files and clone it, but cannot push or open issues or pull requests.
hexagons/.config/nvim/after/ftplugin/markdown.vim

42 lines
1.9 KiB
VimL

setlocal nonumber norelativenumber laststatus=0 showmode
setlocal signcolumn=no textwidth=80 wrap sw=2
setlocal tabstop=2 noexpandtab softtabstop=0 linebreak
setlocal autoindent ruler colorcolumn=80
setlocal complete+=kspell
setlocal spell spelllang=es,en_us,cjk
setlocal formatoptions=1tqnw
setlocal comments=n:>
setlocal formatlistpat=^\\s* " Optional leading whitespace
setlocal formatlistpat+=[ " Start character class
setlocal formatlistpat+=\\[({]\\? " | Optionally match opening punctuation
setlocal formatlistpat+=\\( " | Start group
setlocal formatlistpat+=[0-9]\\+ " | | Numbers
setlocal formatlistpat+=\\\| " | | or
setlocal formatlistpat+=[a-zA-Z]\\+ " | | Letters
setlocal formatlistpat+=\\) " | End group
setlocal formatlistpat+=[\\]:.)} " | Closing punctuation
setlocal formatlistpat+=] " End character class
setlocal formatlistpat+=\\s\\+ " One or more spaces
setlocal formatlistpat+=\\\| " or
setlocal formatlistpat+=^\\s*[-+*]\\s\\+ " Bullet points
setlocal comments=b:*,b:-
setlocal commentstring=<!--%s-->
" Spellcheck
nnoremap <buffer> <silent> <F7> [s
nnoremap <buffer> <silent> <F8> ]s
nnoremap <buffer> <silent> <F9> z=
nnoremap <buffer> <silent> <F10> z=1<CR><CR>
nnoremap <buffer> <silent> <F11> zg
inoremap <buffer> <C-l> <c-g>u<Esc>[s1z=`]a<c-g>u
" Todo list
nnoremap <buffer> <silent> <C-a> i-[]
nnoremap <buffer> <silent> <C-d> :.s/\[\]/\[x\]<Enter>
inoremap <buffer> <silent> <C-a> -[]
inoremap <buffer> <silent> <C-d> <esc>:.s/\[\]/\[x\]<Enter>
" Markdown jump to next heading
nnoremap <buffer> <silent> ]] :<C-u>call <SID>dead#functions#JumpToNextHeading("down", v:count1)<CR>
nnoremap <buffer> <silent> [[ :<C-u>call <SID>dead#functions#JumpToNextHeading("up", v:count1)<CR>