diff --git a/.vim/autoload/vimrc.vim b/.vim/autoload/vimrc.vim --- a/.vim/autoload/vimrc.vim +++ b/.vim/autoload/vimrc.vim @@ -111,13 +111,25 @@ func! vimrc#PrepDir(path) abort endif endfunc +if has('ruby') + func! s:PruneFiles(path, days) abort + ruby < getftime(file) + 86400 * a:days - call delete(file) - endif - endfor - endif + call s:PruneFiles(a:path, a:days) endfunc +