Files
org.vim/ftplugin/org.vim
Alex Vear 481fde5dc4 Fix issues with spell check and disable italic font by default
- 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.
2019-02-24 14:59:22 +00:00

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?