sponsor Vim development Vim logo Vim Book Ad

intermediate Tip #74: Using Vim as an outline processor

 tip karma   Rating 53/17, Viewed by 3548 

created:   June 5, 2001 12:01      complexity:   intermediate
author:   Steve Litt      as of Vim:   6.0

With the addition of folding, Vim6 can function as a high performance outline processor. Simply :set ai and in insert mode use backspace to promote and tab to demote headlines.

In command mode, << promotes (n<< to promote multiple lines), and >> demotes. Also, highlight several headlines and < or > to promote or demote.

:set foldmethod=indent, and then your z commands can expand or collapse headline trees, filewide or by the tree.

The VimOutliner GPL distro contains the scripts and configs to easily configure Vim6 as an outliner, including scripts to create tag files enabling interoutline hyperlinking.

The VimOutliner project is at http://www.troubleshooters.com/projects/vimoutliner/index.htm.

Steve (Litt)
[email protected]

 rate this tip  Life Changing Helpful Unfulfilling 

<<Using vim as calculator | Remap CAPSLOCK key in Windows 2000 Professional and NT4.0 >>

Additional Notes

Anonymous, June 9, 2001 20:15
Awesome.... just what I needed!
[email protected], September 8, 2003 10:23
If you're interested in outlining in Vim, you should also check out my TVO
https://www.vim8.org/script.php?script_id=517
[email protected], March 2, 2004 1:46
Maybe the question is silly, but how can I re-indent a certain part of Code? Thanks!
[email protected], March 2, 2004 2:25
Found the answer as ={motion}. I Would like a hint in 'indenting' file.
If you have questions or remarks about this site, visit the vimonline development pages. Please use this site responsibly.
Questions about Vim should go to [email protected] after searching the archive. Help Bram help Uganda.
Sponsored by Web Concept Group Inc. SourceForge Logo