update
This commit is contained in:
parent
c6df006a61
commit
e2b46a793c
20
vimrc
20
vimrc
|
@ -1,3 +1,4 @@
|
|||
|
||||
" #plugins {{{
|
||||
|
||||
if empty(glob('~/.vim/autoload/plug.vim'))
|
||||
|
@ -149,6 +150,7 @@ runtime macros/matchit.vim
|
|||
|
||||
"}}}
|
||||
|
||||
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
|
||||
" #plugin settings {{{
|
||||
|
||||
|
@ -510,6 +512,7 @@ let g:instant_markdown_open_to_the_world = 1
|
|||
|
||||
"}}}
|
||||
|
||||
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
|
||||
" #functions {{{
|
||||
function! SetColor(name, fg, bg, fg_l, bg_l, style) abort"{{{
|
||||
|
@ -605,25 +608,23 @@ endfunction"}}}
|
|||
function! MyFoldText() "{{{
|
||||
|
||||
let l:linecount = v:foldend - v:foldstart - 1
|
||||
let l:line = getline(v:foldstart)
|
||||
let l:line = substitute(getline(v:foldstart), "\{\{\{", "", "")
|
||||
let l:line = substitute(l:line, "\^\" ", "", "")
|
||||
|
||||
let l:postfix = ' +' . l:linecount . ' ' . v:folddashes . '|'
|
||||
while len(l:postfix) < 11
|
||||
let l:postfix = ' ' . l:postfix
|
||||
endwhile
|
||||
" unicode characters counted as 2 digits in length - TODO find fix
|
||||
" checkout strlen
|
||||
" let l:postfix = ' •••••••••••• +' . l:linecount . ' ' . v:folddashes . '|'
|
||||
|
||||
let l:len_line = len(l:line)
|
||||
let l:len_postfix = len(l:postfix)
|
||||
|
||||
" TODO use width of window maybe (i fit's less than 80)
|
||||
if l:len_line + l:len_postfix <= 80
|
||||
let l:padding = ' ' . ' - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -'[l:len_line + l:len_postfix + 4:79]
|
||||
if l:padding[:-1] !== '-'
|
||||
let l:padding = ' ' . l:padding [0:-1]
|
||||
endif
|
||||
let l:padding = substitute(l:padding, "-", "•", "g")
|
||||
let l:foldtext = l:line . l:padding . l:postfix
|
||||
else
|
||||
let l:foldtext = l:line[:76 - l:len_postfix] . '...' . l:postfix
|
||||
|
@ -843,6 +844,7 @@ endfunction
|
|||
"}}}
|
||||
"}}}
|
||||
|
||||
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
|
||||
" #settings {{{
|
||||
scriptencoding utf-8
|
||||
|
@ -950,6 +952,7 @@ set listchars=eol:¬,tab:>-,trail:~,extends:>,precedes:<,space:·
|
|||
set foldtext=MyFoldText()
|
||||
"}}}
|
||||
|
||||
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
|
||||
" #mappings {{{
|
||||
let g:mapleader = ' '
|
||||
|
@ -1060,6 +1063,7 @@ inoremap '; '';<Left><Left>
|
|||
"}}}
|
||||
"}}}
|
||||
|
||||
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
|
||||
" #abbreviations {{{
|
||||
iabbrev adn and
|
||||
|
@ -1067,6 +1071,7 @@ iabbrev waht what
|
|||
iabbrev tehn then
|
||||
"}}}
|
||||
|
||||
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
|
||||
" #autocommands {{{
|
||||
|
||||
|
@ -1135,6 +1140,7 @@ augroup END
|
|||
"}}}
|
||||
" }}}
|
||||
|
||||
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
|
||||
" #statusline {{{
|
||||
set statusline=%!GetStatus(1)
|
||||
|
@ -1318,6 +1324,7 @@ augroup END
|
|||
"}}}
|
||||
"}}}
|
||||
|
||||
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
|
||||
" #tabline {{{
|
||||
if exists('+showtabline')
|
||||
|
@ -1394,6 +1401,7 @@ if exists('+showtabline')
|
|||
endif " exists("+showtabline")
|
||||
"}}}
|
||||
|
||||
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
|
||||
" #pymode {{{
|
||||
let g:pymode = 1
|
||||
|
@ -1418,6 +1426,6 @@ let g:pymode_syntax_highlight_exceptions = 1
|
|||
let g:pymode_syntax_slow_sync = 1
|
||||
"}}}
|
||||
|
||||
|
||||
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
|
||||
" vim: foldmethod=marker
|
||||
|
|
Loading…
Reference in New Issue