With vim running on cygwin, I would like to automatically set the window title on the active buffer name.
I wrote this:
function! SetMinttyTitle()
silent !clear
execute "!" . "echo -ne '\\e]0;". @% . "\\a' 2>&1 > /dev/null"
endfunction
au BufNewFile,BufEnter,BufRead * call SetMinttyTitle()
Unfortunately It doesn't work as expected. I didn't find the way to get rid of this message
"Press ENTER or type command to continue"
How can I run my command on the background?