Friday, August 5, 2011

Re: tabline

> > I noticed that while in /tmp
>
> > :tabnew /tmp/file
>
> > write /tmp/file in the tab title.
> > For me it's strange that /tmp is written.
> > Because by default the tab title is the file name relative to
> > the current directory. And moreover vim seems able to update
> > titles (I see it when I do successively :cd and :cd /tmp)
> > Do I miss something here?
> > Do you think it is normal?
>
> looks abnormal to me, if you're already on /tmp, and /tmp is
> the current working directory, that you'd create a new file
> there specifying the absolute path -- why not instead enter
>
> :tabnew file
>
> your way causes 5 extra keystrokes, guaranteeing a loss at
> vimgolf

Actually I never type such a command in the command line. But I had the
problem in a script.
I had a list of absolute paths,
list=[ path1, path2, ..., pathN ]

And I wanted to do
for path in list
let path=fnamemodify( path, ':.' )
exe 'tabnew' path
endfor

Without the problem above I wouldn't need the fnamemodify command.

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

No comments: