On Wed, Nov 25, 2009 at 2:09 AM, Tim Chase <[email protected]> wrote:

>
> >> I would like to write a vim script which reads into a list, the
> >> directory tree...
> >> how it is possible to get the subdirectories into a list ? (from PWD
> >> for example.)
>
> You can read in the output of a shell command, so you can use
>
>   :r !find .
>
> on most *nix-like OSes, or on Windows, you can do any of the
> following
>
>   :r !dir /s/b
>   :r !dir /s/b/a        "include hid/sys files
>   :r !tree              "just subdirs
>   :r !tree /f           "include files
>   :r !tree /f /a        "files and ascii-tree representation
>
> It's OS-specific, so you'd have to read up on your variant.  The
> "find" command is super-powerful in tuning the files returned (be
> sure to read up at the man-pages), whereas the "dir"/"tree"
> commands are a bit wanting in flexibility of output.
>

Thanks! Tim

I believe this tip is also useful for me and my friends.


-- 
Regards, Isaac. (李霆钧)
> http://delicious.com/litingjun
> http://litingjun.amplify.com

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

Reply via email to