On Sunday, May 19, 2013 11:06:36 AM UTC-5, Manpreet Singh wrote:
> 
> > This works fine with files, but this fails in weird ways with directories 
> > when I do this:
> 
> > 
> 
> > % mkdir tk11
> 
> > % mkdir tk22
> 
> > % mkdir tk33
> 
> > % mkdir tk44
> 
> > % vim tk??
> 
> > 
> 
> > And then once inside vim
> 
> > 
> 
> > :NT
> 
> > 
> 
> > This opens tk11, tk22, tk22, tk33 and tk33 instead ok the usual tk11, tk22, 
> > tk33 and tk44 sequence. I've reproduced this with Vim 7.3 on Mac and 
> > FreeBSD (and probably Ubuntu also) and see the same behavior everywhere, 
> > with or without plugins disabled. What am I doing wrong here or is it a 
> > bug? 
> 
> > Also, vim -p tk?? works just fine.
> 

I don't know why it's not working, and I don't have time to try debugging the 
script, but I do know that Vim doesn't really edit directories at all.

There is a standard plugin distributed with Vim called netrw which hooks into 
Vim to allow it to :edit a directory by calling netrw's :Explore command 
instead. Or at least, that's how i understand it...I may be wrong. Without 
netrw or a similar plugin, editing a directory gives an error.

You can try invoking :Explore or :Sexplore or :Texplore directly from your 
script, if isdirectory() is true for the file path. I'm not sure whether that 
would work better or not.

-- 
-- 
You received this message from the "vim_dev" 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

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Raspunde prin e-mail lui