- Fixes issues with Vim's spell checker not spell checking regular text in Org-mode files. - Disables the use of italic fonts by default (an option is now provided to change this behaviour). - Disabled conceal for all elements except hyperlinks. - Concealed elements are now only unconcealed when editing the text. - Re-organised blocks in the syntax file.
28 lines
746 B
VimL
28 lines
746 B
VimL
" =============================================================
|
|
" Description: Configure Org-mode folding
|
|
" Author: Alex Vear (axvr)
|
|
" Licence: ISC (2019)
|
|
" =============================================================
|
|
|
|
setlocal conceallevel=2
|
|
setlocal concealcursor=nc
|
|
setlocal commentstring=#%s
|
|
|
|
function! OrgFold()
|
|
let l:depth = match(getline(v:lnum), '\(^\*\+\)\@<=\( .*$\)\@=')
|
|
if l:depth > 0 && synIDattr(synID(v:lnum, 1, 1), 'name') =~# 'orgHeading'
|
|
return ">" . l:depth
|
|
endif
|
|
return "="
|
|
endfunction
|
|
|
|
setlocal foldexpr=OrgFold()
|
|
setlocal foldmethod=expr
|
|
|
|
" Make folds more readable
|
|
setlocal foldtext=getline(v:foldstart)
|
|
setlocal fillchars-=fold:-
|
|
setlocal fillchars+=fold:\
|
|
|
|
" TODO add working links?
|