Files
cshenv/vim/vimrc.functions
ADAM David Alan Martin 0dd3953f81 Add mongo core syntax changes.
Some of these I'll port into my new central file arrangements.
2018-06-21 00:05:42 -04:00

23 lines
555 B
Plaintext

function! MyFoldText()
" This function attempts to fetch out a definition line
" for correct foldtext
let line = getline( v:foldstart )
let typeline = getline( 1 + v:foldstart )
let defline = " ".getline( 2 + v:foldstart )." {".typeline."} "
let sub = substitute( line, '/\*\|\*/\|{{{\d\=', '', 'g' )
let nm= substitute( sub, ' *\| *', '', 'g' )
if ( nm == "func" )
return v:folddashes . defline
else
return v:folddashes . sub
endif
endfunction
function! SyntaxItem()
return synIDattr(synID(line("."),col("."),1),"name")
endfunction