|
|
|
|
||||||
| comp.unix.shell Using and programming the Unix shell. |
![]() |
|
|
LinkBack | Outils de la discussion |
|
|
#1 |
|
Messages: n/a
Hébergeur: |
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 |
|
|
|
#2 |
|
Messages: n/a
Hébergeur: |
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. |
|
|
|
#3 |
|
Messages: n/a
Hébergeur: |
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' |
|
|
|
#4 |
|
Messages: n/a
Hébergeur: |
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? |
|
![]() |
| Outils de la discussion | |
|
|