52 lines
2.2 KiB
VimL
52 lines
2.2 KiB
VimL
aug Status
|
|
au!
|
|
au BufNew,BufEnter *.md set laststatus=0
|
|
au BufHidden,BufLeave *.md set laststatus=2
|
|
aug END
|
|
|
|
let g:markdown_syntax_conceal = 0
|
|
let g:markdown_fenced_languages = ['html', 'css', 'yaml', 'toml', 'sh', 'viml=vim']
|
|
|
|
setlocal nonumber norelativenumber
|
|
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 errorformat="%f",\ line\ %l:\ %m
|
|
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>
|