editing NoteTab's *.otl files in vim or gvim
- For vim (or gvim) users who move between Linux and Windows and want to
be able to exploit NoteTab's outline features in either place. Or for
NoteTab users who want to play with gvim and customizable color syntax
Vim is easily configured to "fold" NoteTab's .otl sections into outlines.
Vim or "vi improved" is a popular text editor that runs on Linux and
Windows and virtually every other platform in the world (the gui
version is called gvim). It has a steep learning curve, but can
basically be configured to do anything, including handle .otl files.
Vim configures its filetype options in a file called: filetype.vim
(1) Add these two auto commands somewhere in filetype.vim, or just add
the second line if you already have an augroup named filetypedetect:
autocmd! BufRead,BufNewFile *.otl setfiletype otl
The second line tells vim or gvim to look in its ftplugin directory
for a file called otl.vim, which will tell vim how to handle *.otl files.
(2) Create the otl.vim file in your ftplugin directory. You can tell
it to wrap wherever, set fonts, syntax coloring, any features you
want, but somewhere include these two lines:
These two lines tell vim to use a regex to determine where it folds
its outlines and that expression is H= (or any other regex you'd care
Since NoteTab's .otl files have headings that look like this:
H="blah blah heading" vim now knows to fold all text in between.
Your headings remain intact with all text between them "folded" out of
sight until you wish to open and edit them.