PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Forums Hébergement > Forum Serveur - Sécurité et techniques > comp.unix.shell > vi filename in xterm title
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
comp.unix.shell Using and programming the Unix shell.

vi filename in xterm title

Réponse
 
LinkBack Outils de la discussion
Vieux 25/03/2008, 04h51   #1
Michael B Allen
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut vi filename in xterm title

I use vim "minimal" which apparently does not support the 'set title' command.

Can anyone recommend a method for setting the xterm title to the filename being edited by vi?

If vi exported FILENAME it would be easy to setup an alias for vi that called the following before launching vi:

PROMPT_COMMAND='echo -ne "\033]0;${FILENAME}\007"'

But I suspect there is a way to do it using vi and I just don't know about it.

Ideas?

Mike
  Réponse avec citation
Vieux 25/03/2008, 05h28   #2
Bill Marcum
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: vi filename in xterm title

On 2008-03-25, Michael B Allen <miallen@ioplex.com> wrote:
>
>
> I use vim "minimal" which apparently does not support the 'set title'
> command.
>
> Can anyone recommend a method for setting the xterm title to the
> filename being edited by vi?
>
> If vi exported FILENAME it would be easy to setup an alias for vi that
> called the following before launching vi:
>
> PROMPT_COMMAND='echo -ne "\033]0;${FILENAME}\007"'
>
> But I suspect there is a way to do it using vi and I just don't know
> about it.
>

Unless you use csh or tcsh, functions are almost always preferable to
aliases. A function would just have to determine which argument(s)
is/are filenames before passing the arguments to vi.
  Réponse avec citation
Vieux 27/03/2008, 02h31   #3
h3xx
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: vi filename in xterm title

On Mar 24, 10:51 pm, Michael B Allen <mial...@ioplex.com> wrote:
> I use vim "minimal" which apparently does not support the 'set title' command.
>
> Can anyone recommend a method for setting the xterm title to the filename being edited by vi?
>
> If vi exported FILENAME it would be easy to setup an alias for vi that called the following before launching vi:
>
> PROMPT_COMMAND='echo -ne "\033]0;${FILENAME}\007"'
>
> But I suspect there is a way to do it using vi and I just don't know about it.
>
> Ideas?
>
> Mike


Don't bother with that. Just add the following line to your ~/.vimrc:

set title

If you want more information, just type `: title'
  Réponse avec citation
Vieux 27/03/2008, 02h58   #4
Kenny McCormack
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: vi filename in xterm title

In article <969f0565-b705-4ec1-b38e-6c585f87ab99@k13g2000hse.googlegroups.com>,
h3xx <amphetamachine@gmail.com> wrote:
>On Mar 24, 10:51 pm, Michael B Allen <mial...@ioplex.com> wrote:
>> I use vim "minimal" which apparently does not support the 'set title' command.
>>
>> Can anyone recommend a method for setting the xterm title to the

>filename being edited by vi?
>>
>> If vi exported FILENAME it would be easy to setup an alias for vi that

>called the following before launching vi:
>>
>> PROMPT_COMMAND='echo -ne "\033]0;${FILENAME}\007"'
>>
>> But I suspect there is a way to do it using vi and I just don't know about it.
>>
>> Ideas?
>>
>> Mike

>
>Don't bother with that. Just add the following line to your ~/.vimrc:
>
> set title
>
>If you want more information, just type `: title'


What part of:

I use vim "minimal" which apparently does not support the 'set
title' command.

did you not get?

  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 18h44.


Édité par : vBulletin® version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,08748 seconds with 12 queries