moved MyFoldText() to vimrc.functions.vim)

This commit is contained in:
ManjaroOne666 2018-05-08 22:08:26 +01:00
parent 901a4efcb2
commit cc88bbe738
1 changed files with 15 additions and 2 deletions

View File

@ -89,6 +89,20 @@ function! GetStatusFrag(condition, colorname, conditionprefix, text) abort
endfunction endfunction
"}}} "}}}
function! MyFoldText()
"{{{
let l:linecount = v:foldend - v:foldstart - 1
let l:line = getline(v:foldstart)
let l:prefix = '|+' . l:linecount . v:folddashes . '| '
let l:subexp = '^ \{,' . len(l:prefix) . '}'
let l:foldtext = substitute(l:line, l:subexp, l:prefix, '')
return l:foldtext
endfunction
"}}}
function! CheckLineEnding() abort function! CheckLineEnding() abort
:normal $"{{{ :normal $"{{{
if getline('.')[col('.')-1] == ';' || getline('.')[col('.')-1] == ',' if getline('.')[col('.')-1] == ';' || getline('.')[col('.')-1] == ','
@ -151,8 +165,7 @@ endfunction
function! GetLinterStatus(key) abort function! GetLinterStatus(key) abort
let l:linter = ale#statusline#Count(bufnr(''))"{{{ let l:linter = ale#statusline#Count(bufnr(''))"{{{
" return l:linter[a:key] return l:linter[a:key]
return 3
endfunction endfunction
"}}} "}}}