diff --git a/autoload/vimwiki/u.vim b/autoload/vimwiki/u.vim index d3a2584..04771d3 100644 --- a/autoload/vimwiki/u.vim +++ b/autoload/vimwiki/u.vim @@ -21,6 +21,18 @@ function! vimwiki#u#cursor(lnum, cnum) abort endfunction +" Returns: OS name, human readable +function! vimwiki#u#os_name() abort + if vimwiki#u#is_windows() + return 'Windows' + elseif vimwiki#u#is_macos() + return 'Mac' + else + return 'Linux' + endif +endfunction + + function! vimwiki#u#is_windows() abort return has('win32') || has('win64') || has('win95') || has('win16') endfunction diff --git a/plugin/vimwiki.vim b/plugin/vimwiki.vim index 125753b..4ed64c1 100644 --- a/plugin/vimwiki.vim +++ b/plugin/vimwiki.vim @@ -211,6 +211,8 @@ function! s:get_version() abort let l:plugin_branch = system('git --git-dir ' . s:plugin_dir . '/.git rev-parse --abbrev-ref HEAD') let l:plugin_date = system('git --git-dir ' . s:plugin_dir . '/.git show -s --format=%ci') if v:shell_error == 0 + echo 'Os: ' . vimwiki#u#os_name() + echo 'Vim: ' . v:version echo 'Branch: ' . l:plugin_branch echo 'Revision: ' . l:plugin_rev echo 'Date: ' . l:plugin_date