Util: count_exe

This commit is contained in:
Tinmarino 2020-05-17 14:06:41 -04:00
parent f4c983b6b5
commit 077467877d

View File

@ -3,6 +3,15 @@
" Description: Utility functions " Description: Utility functions
" Home: https://github.com/vimwiki/vimwiki/ " Home: https://github.com/vimwiki/vimwiki/
" Execute: string v:count times
function! vimwiki#u#count_exe(cmd) abort
for i in range( max([1, v:count]) )
exe a:cmd
endfor
endfunction
function! vimwiki#u#trim(string, ...) abort function! vimwiki#u#trim(string, ...) abort
let chars = '' let chars = ''
if a:0 > 0 if a:0 > 0