From: Hiroshi Shirosaki Date: Thu, 7 Jan 2016 13:43:20 +0000 (+0900) Subject: Use function! as with the other code X-Git-Url: https://git.madduck.net/etc/vim.git/commitdiff_plain/6c3e0bc575abd9618070fad8a27f50a41751136f?hp=199bfeab2aed677af025283e4e2c0b8784cfa5dd Use function! as with the other code --- diff --git a/after/ftplugin/markdown.vim b/after/ftplugin/markdown.vim index e635f6d..1d0572c 100644 --- a/after/ftplugin/markdown.vim +++ b/after/ftplugin/markdown.vim @@ -6,17 +6,17 @@ " " original version from Steve Losh's gist: https://gist.github.com/1038710 -func! s:is_mkdCode(lnum) +function! s:is_mkdCode(lnum) return synIDattr(synID(a:lnum, 1, 0), 'name') == 'mkdCode' -endfunc +endfunction -func! s:effective_line(lnum) +function! s:effective_line(lnum) let line = getline(a:lnum) return (line !~ '^[=-#]' || s:is_mkdCode(a:lnum)) ? '' : line -endfunc +endfunction if get(g:, "vim_markdown_folding_style_pythonic", 0) - func! Foldexpr_markdown(lnum) + function! Foldexpr_markdown(lnum) let l2 = s:effective_line(a:lnum+1) if l2 =~ '^==\+\s*' " next line is underlined (level 1) @@ -37,9 +37,9 @@ if get(g:, "vim_markdown_folding_style_pythonic", 0) " keep previous foldlevel return '=' endif - endfunc + endfunction - fun! Foldtext_markdown() + function! Foldtext_markdown() let line = getline(v:foldstart) let has_numbers = &number || &relativenumber let nucolwidth = &fdc + has_numbers * &numberwidth @@ -49,9 +49,9 @@ if get(g:, "vim_markdown_folding_style_pythonic", 0) let line = substitute(line, '\%("""\|''''''\)', '', '') let fillcharcount = windowwidth - len(line) - len(foldedlinecount) + 1 return line . ' ' . repeat("-", fillcharcount) . ' ' . foldedlinecount - endfunc + endfunction else - func! Foldexpr_markdown(lnum) + function! Foldexpr_markdown(lnum) let l2 = s:effective_line(a:lnum+1) if l2 =~ '^==\+\s*' " next line is underlined (level 1) @@ -79,7 +79,7 @@ else " keep previous foldlevel return '=' endif - endfunc + endfunction endif if !get(g:, "vim_markdown_folding_disabled", 0)