Add: ShowVersion: os and vim version for easyer issue debug
This commit is contained in:
parent
e850cb8562
commit
ee38764480
@ -21,6 +21,18 @@ function! vimwiki#u#cursor(lnum, cnum) abort
|
|||||||
endfunction
|
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
|
function! vimwiki#u#is_windows() abort
|
||||||
return has('win32') || has('win64') || has('win95') || has('win16')
|
return has('win32') || has('win64') || has('win95') || has('win16')
|
||||||
endfunction
|
endfunction
|
||||||
|
@ -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_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')
|
let l:plugin_date = system('git --git-dir ' . s:plugin_dir . '/.git show -s --format=%ci')
|
||||||
if v:shell_error == 0
|
if v:shell_error == 0
|
||||||
|
echo 'Os: ' . vimwiki#u#os_name()
|
||||||
|
echo 'Vim: ' . v:version
|
||||||
echo 'Branch: ' . l:plugin_branch
|
echo 'Branch: ' . l:plugin_branch
|
||||||
echo 'Revision: ' . l:plugin_rev
|
echo 'Revision: ' . l:plugin_rev
|
||||||
echo 'Date: ' . l:plugin_date
|
echo 'Date: ' . l:plugin_date
|
||||||
|
Loading…
Reference in New Issue
Block a user