diff options
author | Yaroslav <contact@yaroslavps.com> | 2020-03-31 17:52:49 +0300 |
---|---|---|
committer | Yaroslav <contact@yaroslavps.com> | 2020-03-31 17:52:49 +0300 |
commit | 7217c7749e5403c9c7856c1d12c7986eb9c3b460 (patch) | |
tree | d60a112d9119a51af1cf5f590c5efad81751edf6 /dotfiles/.vim/autoload/airline/extensions/wordcount | |
parent | 9a3aa7b20a67c1b7991da1da9508ad5f78f76352 (diff) | |
download | vimrice-7217c7749e5403c9c7856c1d12c7986eb9c3b460.tar.gz vimrice-7217c7749e5403c9c7856c1d12c7986eb9c3b460.zip |
Goodbye vim, been using neovim for ages now; home directory cleanup
Diffstat (limited to 'dotfiles/.vim/autoload/airline/extensions/wordcount')
-rw-r--r-- | dotfiles/.vim/autoload/airline/extensions/wordcount/formatters/default.vim | 39 |
1 files changed, 0 insertions, 39 deletions
diff --git a/dotfiles/.vim/autoload/airline/extensions/wordcount/formatters/default.vim b/dotfiles/.vim/autoload/airline/extensions/wordcount/formatters/default.vim deleted file mode 100644 index 5682921..0000000 --- a/dotfiles/.vim/autoload/airline/extensions/wordcount/formatters/default.vim +++ /dev/null @@ -1,39 +0,0 @@ -" MIT License. Copyright (c) 2013-2018 Bailey Ling et al. -" vim: et ts=2 sts=2 sw=2 - -scriptencoding utf-8 - -function! airline#extensions#wordcount#formatters#default#update_fmt(...) - let s:fmt = get(g:, 'airline#extensions#wordcount#formatter#default#fmt', '%s words') - let s:fmt_short = get(g:, 'airline#extensions#wordcount#formatter#default#fmt_short', s:fmt == '%s words' ? '%sW' : s:fmt) -endfunction - -" Reload format when statusline is rebuilt -call airline#extensions#wordcount#formatters#default#update_fmt() -if index(g:airline_statusline_funcrefs, function('airline#extensions#wordcount#formatters#default#update_fmt')) == -1 - " only add it, if not already done - call airline#add_statusline_funcref(function('airline#extensions#wordcount#formatters#default#update_fmt')) -endif - -if match(get(v:, 'lang', ''), '\v\cC|en') > -1 - let s:decimal_group = ',' -elseif match(get(v:, 'lang', ''), '\v\cde|dk|fr|pt') > -1 - let s:decimal_group = '.' -else - let s:decimal_group = '' -endif - -function! airline#extensions#wordcount#formatters#default#to_string(wordcount) - if winwidth(0) >= 80 - if a:wordcount > 999 - " Format number according to locale, e.g. German: 1.245 or English: 1,245 - let wordcount = substitute(a:wordcount, '\d\@<=\(\(\d\{3\}\)\+\)$', s:decimal_group.'&', 'g') - else - let wordcount = a:wordcount - endif - let str = printf(s:fmt, wordcount) - else - let str = printf(s:fmt_short, a:wordcount) - endif - return str . g:airline_symbols.space . g:airline_right_alt_sep . g:airline_symbols.space -endfunction |