Skip to content

Commit

Permalink
fold doc comments
Browse files Browse the repository at this point in the history
  • Loading branch information
raichoo committed May 1, 2014
1 parent 0ac9719 commit 9447c81
Showing 1 changed file with 21 additions and 5 deletions.
26 changes: 21 additions & 5 deletions ftplugin/idris.vim
@@ -1,14 +1,30 @@
if exists("b:did_ftplugin")
finish
endif

setlocal shiftwidth=2
setlocal tabstop=2
setlocal expandtab

let idris_response=0
let idris_response = 0
let b:did_ftplugin = 1

if exists("b:did_ftplugin")
finish
endif
function! IdrisDocFold(lineNum)
let line = getline(a:lineNum)

let b:did_ftplugin = 1
if line =~ "^\s*|||"
return "1"
endif

return "0"
endfunction

function! IdrisFold(lineNum)
return IdrisDocFold(a:lineNum)
endfunction

setlocal foldmethod=expr
setlocal foldexpr=IdrisFold(v:lnum)

function! IdrisResponseWin()
if (!bufexists("idris-response"))
Expand Down

0 comments on commit 9447c81

Please sign in to comment.