mirror of
https://github.com/jdhao/nvim-config.git
synced 2025-06-08 14:14:33 +02:00
Do no show file time for not listed buffers.
This commit is contained in:
parent
badaed84ca
commit
99cedb6c94
@ -104,11 +104,20 @@ set autowrite
|
|||||||
" lastmod time is drawn from https://stackoverflow.com/q/8426736/6064933
|
" lastmod time is drawn from https://stackoverflow.com/q/8426736/6064933
|
||||||
set title
|
set title
|
||||||
set titlestring=
|
set titlestring=
|
||||||
|
set titlestring=%{Get_titlestr()}
|
||||||
|
|
||||||
|
function! Get_titlestr() abort
|
||||||
|
let l:title_str = ''
|
||||||
if g:is_linux
|
if g:is_linux
|
||||||
set titlestring+=%(%{hostname()}\ \ %)
|
let l:title_str = hostname() . ' '
|
||||||
endif
|
endif
|
||||||
set titlestring+=%(%{expand('%:p:~')}\ \ %)
|
let l:title_str = l:title_str . expand('%:p:~') . ' '
|
||||||
set titlestring+=%{strftime('%Y-%m-%d\ %H:%M',getftime(expand('%')))}
|
if &buflisted
|
||||||
|
let l:title_str = l:title_str . strftime('%Y-%m-%d %H:%M',getftime(expand('%')))
|
||||||
|
endif
|
||||||
|
|
||||||
|
return l:title_str
|
||||||
|
endfunction
|
||||||
|
|
||||||
" Persistent undo even after you close a file and re-open it
|
" Persistent undo even after you close a file and re-open it
|
||||||
set undofile
|
set undofile
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user