org-vim is an outliner/organization plugin for vim. It provides syntax highlighting and some keyboard shortcuts for common operations for the "ov" filetype.
If you're using pathogen, drop this
project under ~/.vim/bundle
. Otherwise, you'll need to copy some files:
$ cp ftplugin/ov.vim ~/.vim/ftplugin/ov.vim
$ cp syntax/ov.vim ~/.vim/syntax/ov.vim
Append to .vimrc
file:
filetype plugin on " if you don't already have it
au BufRead,BufNewFile *.ov set filetype=ov
Files with an extension of .ov will automatically get syntax highlighting and some keyboard shortcuts in normal mode. If the file you're editing doesn't have the .ov extension, you can set the filetype manually.
:set filetype=ov
Outlines are done with hashes (#) at the beginning of the line. Each hash represents a new level.
Example:
# Level 1
## Level 2
Text in "Level 2" does not require any sort of indentation.
## Level 2b
Additional text in level 2b.
Lists start the line with a number followed by a period (1.), a dash (-), or an asterik (*). These items may be preceded with any amount of whitespace.
Examples:
1. First item
2. Second item
Text can be wrapped around
3. Third item
- Unordered list item
- Unordered list item again
* Asteriks may also be used
* For unordered list items
Todos start with square brackes with a space between them ([ ]). To mark an item as done, replace the space with an 'x' ([x]).
Examples:
[ ] Unfinished item
[ ] Unfinished item #2
[x] Finished item
Table borders are done via pluses and dashes (+----+----+). Columns are separated using vertical bars (|).
Example:
+-----+-------+-------+
| Fox | Quick | Brown |
+-----+-------+-------+
| Dog | Lazy | Green |
+-----+-------+-------+
Tags are any words prefixed with an at-sign (@). They are not required to be at the beginning of a line.
Examples:
@maybe
Tags can follow paragraphs. @tag
Highlighting text is done via mustaches ({{ }}).
Example:
Normal text followed by {{ highlighted text }}.
Separators are done via repeat equal signs (=). All characters on the line must be an equal sign, no whitespace is allowed.
Example:
============================================================================
q=
inserts a separatorql
re-numbers ordered listsqn
moves cursor to next outline headerqN
moves cursor to previous outline headerqs
moves cursor to next separatorqS
moves cursor to previous separatorqt
auto formats table at cursorqo
appends new list line to any listqx
toggles the current todo itemqz
folds the current file according to its outline
Copyright Hugh Bien - http://hughbien.com. Released under BSD license, see LICENSE.md for more info.