From f2e01d7e513067ddb57c75f6e38cdcf434946cf8 Mon Sep 17 00:00:00 2001 From: Max Christian Pohle Date: Mon, 22 Oct 2018 00:02:58 +0200 Subject: Major refactoring for version 2.0 vim-plug has been removed and replaced with Vims internal bundle mechanism. But I already noticed, that there is also GLVM now and started trying that as well. --- plugin/max-set-window-title.vim | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 plugin/max-set-window-title.vim (limited to 'plugin/max-set-window-title.vim') diff --git a/plugin/max-set-window-title.vim b/plugin/max-set-window-title.vim new file mode 100644 index 0000000..1a84ac3 --- /dev/null +++ b/plugin/max-set-window-title.vim @@ -0,0 +1,21 @@ + + +augroup SET_WINDOW_TITLE + set title + set titlelen=40 + + " set window title for screen(3) + " if &term == "screen" || &term == "xterm" + if &term == "screen" + set t_ts=k + set t_fs=\ + endif + + " autocmd BufEnter * let &titlestring = hostname() . "[vim(" . expand("%:t") . ")]" + " autocmd CursorHold * let &titlestring = "%t %y ".$USER."@".hostname().":%{expand("%:~:.:h")}" + " Fix terminal title ================================================================================================= + " autocmd VimEnter * let &t_EI .= "\[0 q" + " autocmd VimEnter * let &t_SI = "\]12;green\x7" + autocmd VimLeave * silent !echo -ne "\033]112\007" +augroup END + -- cgit v1.2.3