On Tuesday 07 April 2009 11:33 am, Henry Bush wrote:
> 
> I want to save the title of the konsole window when i enter vim, then
> return it back afterwards. The code in my .vimrc atm looks like:
> 
>   let $ORIGKONSOLETITLE = system("dcop $KONSOLE_DCOP_SESSION sessionName")
>   autocmd BufReadPost * :silent !dcop $KONSOLE_DCOP_SESSION renameSession %
>   autocmd VimLeave * :!dcop $KONSOLE_DCOP_SESSION renameSession
> $ORIGKONSOLETITLE
> 
> But my title doesn't get changed on exit. Bizarrely, if I swap
> $ORIGKONSOLETITLE for $PWD it works.
> 
> Does anyone have any clue what might be going on here? The only
> difference between variables seems to be whitespace at the end (which
> I don't seem to be able to get rid of, at least by putting a sed at
> the end of the command on the "let" line).
> 
> All suggestions gratefully received :-)

i just run

<umctb>
#!/bin/bash
if (($# == 0)); then
    echo -ne '\033]0;\007'
else
    echo -ne '\033]0;'$@'\007'
fi
</umctb>

after any vim or midnight commander session that's had the temerity
to mess with my title

i will send the un-acronymized meaning of the name of this module
directly to anyone interested (it's got a bad word in it)

sc



--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply via email to