Thanks for the reply. I still have some questions. Suppose I have the
directory structure as below and this is the way it is displayed in
vim.

../
island_ccu_pmu/
| hacks/
| | library_setup_boerne.tcl*
| outputs/
| gen_db.tcl
| island_ccu_pmu.magma-no-pg.v*
| island_ccu_pmu.magma_output.sdc
| pt_shell.log
| setup_design*

> Unfortunately, since netrw long predates vim's introduction of Lists,
> its use of them isn't as prevalent as I'd wish -- and there isn't such a
> list to be passed along.  However, especially for local listings, the
> b:netrw_curdir variable holds the current directory.  You can use
> vim's glob() function with that.
>

I'm not sure if b:netrw_curdir will help in all cases. It just gives
the current directory, which may not be the top most (that is, base)
directory shown in the tree. For example, when I go to the line for
the 'hacks' directory and press 'enter', this directory gets expanded
(as shown above) and b:netrw_curdir gets set to this directory.

Is there a variable that gives the name and full path of the base
directory? If I have the full base directory name, then I can
construct the full path of the other files and directories shown below
it by correctly parsing the file.

BTW, I don't get anything when I do ":help b:netrw_curdir". Is there
any explanation for this and similar variables somewhere?

> However, you could just construct a list of filenames from the buffers'
> names, using redir @a, ls!, redir END , and manipulate the resulting
> text into a match/match2/match3 type of command.  Use windo and
> execute that command in all windows having filetype netrw.
>

Yes, that's what I'm thinking too. But in order to compare each
filename from the buffer list to the files listed in netrw window, I
need to construct the complete path for each filename displayed on the
netrw window. And to get the complete path, I have to parse the netrw
directory listing and also have to know the base directory (full path)
under which these are listed. Hence my earlier question on how to get
the full path for the base dir.

Also, how do I get the name of the buffers and their attributes (like
active/hidden, etc)? Which variables are these stored in?

Thanks much.

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

Reply via email to