Initial commit

This commit is contained in:
Alex Vear
2018-12-08 22:40:13 +00:00
commit 0406612877
5 changed files with 143 additions and 0 deletions

26
ftplugin/org.vim Normal file
View File

@@ -0,0 +1,26 @@
" =============================================================
" Description: Configure Org-mode folding
" Author: Alex Vear (axvr)
" Licence: ISC (2018)
" =============================================================
setlocal conceallevel=2
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?