Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

In the past, when I open a gvim session on a remote machine, the title bar of gvim would show the machine name in brackets. I am not sure if this was done by the remote gvim itself, or the local window manager. In the past I have used gnome2, although I am currently using unity (and finding it rather frustrating). Is there some setting I can change to always force remote windows to display the source machine?

share|improve this question
VNC, SSH, or plain X? I know that under SSH (and probably VNC), there is an environment variable the server sets to say that you are using SSH/VNC. So either gvim recognizes this setting, or your remote window manager does. – new123456 Aug 8 '11 at 12:48
Its plain X. It used to work in the past. Dunno if gvim or the window manager is the one that does this. – frankster Aug 8 '11 at 15:55

If the 'title' option is set, Vim will set the window title to the value of 'titlestring'. The first thing you might try is

:set notitle

That should restore the title to whatever the window manager initially set it to, which may include the machine name.

Another solution would be to leave 'title' set and define your own 'titlestring' that would include the name of the host machine. There are some examples under

:help 'titlestring'

and the default format (but not the format string, unfortunately) is shown under

:help 'title'

A simple 'titlestring' setting that would show your host name and file name would be

:let &titlestring = "[".hostname()."] %f"
share|improve this answer
haha I did ":set notitle" and it changed to "Thanks for flying Vim" – frankster Aug 9 '11 at 11:04

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.