Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

43 lines (33 sloc) 1.046 kB
" viki.vim -- the viki ftplugin
" @Author: Thomas Link (samul AT web.de)
" @License: GPL (see http://www.gnu.org/licenses/gpl.txt)
" @Created: 12-Jän-2004.
" @Last Change: 08-Sep-2004.
" @Revision: 20
if exists("b:did_ftplugin")
finish
endif
let b:did_ftplugin = 1
let b:vikiCommentStart = "%"
let b:vikiCommentEnd = ""
exe "setlocal commentstring=". b:vikiCommentStart ."%s". b:vikiCommentEnd
exe "setlocal comments=:". b:vikiCommentStart
setlocal foldmethod=expr
setlocal foldexpr=VikiFoldLevel(v:lnum)
fun! VikiFoldLevel(lnum)
" let head = matchend(getline(a:lnum), '\V\^'. escape(b:vikiHeadingStart, '\') .'\ze\s\+')
let head = matchend(getline(a:lnum), '\V\^'. b:vikiHeadingStart .'\+\ze\s\+')
if head > 0
return ">". head
else
" return foldlevel(a:lnum - 1)
return "="
endif
endfun
if !hasmapto(":VikiFind")
nnoremap <buffer> <c-tab> :VikiFindNext<cr>
nnoremap <buffer> <c-s-tab> :VikiFindPrev<cr>
endif
" compiler deplate
let b:vikiEnabled = 2
" vim: ff=unix
Jump to Line
Something went wrong with that request. Please try again.