Who needs MSWord when you have vim?

ziggy on 2004-12-28T04:10:32

I've been bit by the gtd bug. At some point, any scheme to get organized is going to require an outliner of some sort. It could be MS Word. It could be Omni Outliner.

But geeks work best with simple formats like text files. And it's easy enough to construct an outline by successive levels of indentation in your favorite text editor. But how to edit an outline, where you want to expand and collapse whole levels, and promote or demote at will?

More importantly, how do you do that in vi? [*]

The answer is The Vim Outliner, courtesy of the indefatigable Ned Konz.

Thanks, Ned. ;-)

 

*: I'm sure there's some ESC-C-M-X-outliner-and-kitchen-sink major mode in emacs. Don't ask me what it is though....


howto in emacs

lachoy on 2004-12-28T14:51:26

FWIW:

ESC-x outline-mode

Usage:

* item one

item one body

** item two

item two body
...

Re:howto in emacs

mdxi on 2004-12-28T23:43:51

Actually, the above example shows one top-level item with a second-level item nested inside it. A simple two item list would look like:

*one
*two


And if you don't want to have to do a M-x ouTABoTAB every time you load your TODO list, just add this at the tail of the file:


### Local Variables: ###
### mode: Outline ###
### End: ###

...or define a mode hook for files named TODO (etc., etc., etc., TMTOWTDI) :D

Word: not at all bad

jplindstrom on 2004-12-28T15:20:24

Actually, the outline view in Word is really good. I find it indispensible when taking notes or planning the structure of a larger piece of text.

The trick is to figure out the keyboard shortcuts for promoting/demoting text and moving things around.

Alt-Shift left/right and up/down is the trick. But I had to create a macro to get back to the Normal style. These shortcuts work in the other view modes as well.