Last active
December 19, 2015 11:19
-
-
Save sgur/5946592 to your computer and use it in GitHub Desktop.
Foldされた領域をバルーンを使ってプレビューする
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" Foldされた領域をプレビューする {{{2 | |
" ------------------------------ | |
function! MyBalloonExpr() | |
let lnum = foldclosed(v:beval_lnum) | |
if lnum == -1 | |
return '' | |
endif | |
let lines = getline(lnum, foldclosedend(lnum)) | |
return iconv(join(len(lines) > &lines ? lines[:&lines] : lines, "\n"), | |
\ &encoding, &termencoding) | |
endfunction | |
set balloonexpr=MyBalloonExpr() | |
set ballooneval |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment