[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Konsole: Tab titles gnome-terminal style?



On Thursday 11 November 2004 08:40 am, Carles Cufi wrote:
> Hi,
>
> I see... Problem is, I'd like it to change dynamically, without me
> having to set it manually or with a shell command (i.e. dcop). The
> window title for Konsole shows me something like (editing file
> main.mk with vi in directory /home/carles/project/):
>
> main.mk (~/project) - VIM - Shell No. 2 - Konsole
>
> and when I switch to Shell (#1):
>
> project.c (~/project) - VIM - Shell - Konsole

Maybe someone who knows vim better can help here; try the following in
your .vimrc:

augroup konsole
  autocmd!
  " Change the tab name to the file in your current buffer is seeing
  autocmd BufEnter * !dcop "$KONSOLE_DCOP_SESSION" renameSession "<afile>:t"
augroup END

It doesn't work very well (requires ENTER at each buffer change), but 
will hopefully be a template for something more useful.  It needs things 
like saving the original tab name, too.
-- 
Rob



Reply to: