Util: count_exe

This commit is contained in:
Tinmarino 2020-05-17 14:06:41 -04:00
parent f4c983b6b5
commit 077467877d
1 changed files with 9 additions and 0 deletions

View File

@ -3,6 +3,15 @@
" Description: Utility functions
" 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
let chars = ''
if a:0 > 0