1
0
mirror of https://github.com/jdhao/nvim-config.git synced 2025-06-08 14:14:33 +02:00

add iso time utils function

This commit is contained in:
jdhao 2021-11-01 22:39:36 +08:00
parent 51c19507b7
commit 2d27a699dc

View File

@ -153,6 +153,11 @@ function! utils#Get_titlestr() abort
return l:title_str
endfunction
" Output current time in ISO format.
function! utils#iso_time() abort
return strftime('%Y-%m-%d %H:%M:%S%z')
endfunction
" Check if we are inside a Git repo.
function! utils#Inside_git_repo() abort
let res = system('git rev-parse --is-inside-work-tree')