Advertisement
Guest User

Untitled

a guest
Sep 16th, 2019
146
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. " 余白文字を指定 {{{
  2. " vert: 垂直分割の区切り文字
  3. " fold: 折畳の余白
  4. " diff: diffの余白
  5. set fillchars=vert:\ ,fold:\ ,diff:\
  6. " }}}
  7.  
  8. " 折畳 {{{
  9. function! MyFoldText() abort
  10. let sushi = ''
  11. " 折畳のレベルによって、お寿司を増やす
  12. for i in range(v:foldlevel)
  13. let sushi .= '🍣'
  14. endfor
  15.  
  16. let line = getline(v:foldstart)
  17. let marker_start = strpart(&foldmarker, 0, 3)
  18. let line = substitute(line, marker_start.'\d\=\|/\*\|\*/', '', 'g')
  19. let line = substitute(line, '^"*\s*', '', 'g')
  20. let line = substitute(line, '"*\s*$', '', 'g')
  21. return ' '.sushi.' '.line
  22. endfunction
  23. set foldtext=MyFoldText()
  24. " }}}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement