Menu

#767 modify window and tab title behavior

open-rejected
nobody
5
2009-10-02
2008-11-18
No

I use 'vim' often, and I like the feature where it changes the window title to the name of the file being edited.

When using 'gnome-terminal' on Linux, the window title that 'vim' sends is put on the window title and the tab. When I switch tabs, the window title changes to the match the title of the tab I've switched to, but the name of the file stays on the tab where it is being edited.

When using 'iTerm' on MacOS X, this window title is put only on the window banner, and the tab is unchanged. If I switch tabs, the name of the file no longer appears, and I have to guess which tab to select if I want to get back to editing the file.

I have come to realize that iTerm puts the window title (sent with escape sequence "\033]2;string\007") on the window, and the icon title (sent with "\033]1;string\007") on the tab.

Would it be possible to change this behavior so that the window title can be applied to both the tab and the window? Perhaps some new preferences could be added, such as a selector (shown here with current behavior):
iTerm window title comes from VT100/xterm: [X] title [ ] icon
iTerm tab title comes from VT100/xterm: [ ] title [X] icon
Alternately this could be phrased as:
VT100/xterm window title applies to: [X] window [ ] tab
VT100/xterm icon title applies to: [ ] window [X] tab

Discussion

  • James Bunton

    James Bunton - 2009-09-30

    Why not just configure vim to set use the escape code that you prefer?

     
  • James Bunton

    James Bunton - 2009-09-30
    • status: open --> pending-rejected
     
  • Wayne Brehob

    Wayne Brehob - 2009-10-02

    I have not found a way to make 'vim' send the escape codes that would put the file name on the icon title. There are preferences to turn this behavior on and off, but not to change the escape sequence (that I have found, at least). Even if I could change this, 'vim' would need a way of determining where it's displayed. If I'm remotely logged into a system, how does it know if I'm sitting at home on my Mac using iTerm, or in the office on a Linux box with a gnome-terminal? If these two terminal emulators behaved the same, I would always get the desired behavior.

    Even if iTerm had only one behavior, it seems to me that you'd want the icon title displayed when the iTerm window is minimized, and currently the window title applies to the minimized icon. So if both were to be used, I would think their behavior would be reversed. Of course this part is an opinion, and others may not share it, which is why I suggested preferences to govern the behavior.

     
  • Wayne Brehob

    Wayne Brehob - 2009-10-02
    • status: pending-rejected --> open-rejected
     

Log in to post a comment.