Wednesday, June 26, 2013

folding output of tree command?

Hi list,

Im looking for some expression to fold the output of tree command, i.e.:

├── opt
├── run -> /run
├── spool
│ ├── anacron
│ ├── asterisk [error opening dir]
│ ├── cron
│ │ ├── atjobs
│ │ ├── atspool
│ │ └── crontabs
│ ├── cups [error opening dir]
│ ├── libreoffice
│ │ └── uno_packages
│ ├── lintian
│ ├── mail -> ../mail
│ ├── plymouth
│ ├── rsyslog
│ └── samba
└── tmp

So imho I have to find a way to count the number of "│" (including the
following spaces), so i could define a rule to open/cloes the folds
recursivly. Any idea for an appropriate expression doing this?

Tfh!
Oliver


--
--
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

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

No comments: