From 9c469a7cdab300ae53387f438dde353bc64d23c1 Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Sun, 29 Nov 2009 22:01:46 +0100 Subject: vim stuff Signed-off-by: Florian Pritz --- .vim/colors/vo_dark.vim | 81 +++ .vim/colors/vo_light.vim | 81 +++ .vim/doc/tags | 64 +++ .vim/doc/vo_readme.txt | 1242 +++++++++++++++++++++++++++++++++++++++++++++ .vim/filetype.vim | 1 + .vim/ftdetect/vo_base.vim | 84 +++ .vim/ftplugin/vo_base.vim | 676 ++++++++++++++++++++++++ .vim/syntax/vo_base.vim | 312 ++++++++++++ 8 files changed, 2541 insertions(+) create mode 100755 .vim/colors/vo_dark.vim create mode 100755 .vim/colors/vo_light.vim create mode 100755 .vim/doc/vo_readme.txt create mode 100644 .vim/filetype.vim create mode 100755 .vim/ftdetect/vo_base.vim create mode 100755 .vim/ftplugin/vo_base.vim create mode 100755 .vim/syntax/vo_base.vim (limited to '.vim') diff --git a/.vim/colors/vo_dark.vim b/.vim/colors/vo_dark.vim new file mode 100755 index 0000000..894f17a --- /dev/null +++ b/.vim/colors/vo_dark.vim @@ -0,0 +1,81 @@ +let g:colors_name="VO Dark" +hi normal guifg=white guibg=black ctermfg=white ctermbg=black +hi StatusLine guifg=white guibg=black ctermfg=white ctermbg=black +hi StatusLineNC guifg=white guibg=black ctermfg=white ctermbg=black +hi VertSplit guifg=white guibg=black ctermfg=white ctermbg=black +hi OL1 guifg=white ctermfg=white +hi OL2 guifg=red ctermfg=red +hi OL3 guifg=lightblue ctermfg=lightblue +hi OL4 guifg=violet ctermfg=magenta +hi OL5 guifg=white ctermfg=white +hi OL6 guifg=red ctermfg=red +hi OL7 guifg=lightblue ctermfg=lightblue +hi OL8 guifg=violet ctermfg=magenta +hi OL9 guifg=white ctermfg=white + +" colors for tags +hi outlTags guifg=darkred ctermfg=darkred + +" color for body text +hi BT1 guifg=green ctermfg=green +hi BT2 guifg=green ctermfg=green +hi BT3 guifg=green ctermfg=green +hi BT4 guifg=green ctermfg=green +hi BT5 guifg=green ctermfg=green +hi BT6 guifg=green ctermfg=green +hi BT7 guifg=green ctermfg=green +hi BT8 guifg=green ctermfg=green +hi BT9 guifg=green ctermfg=green + +" color for pre-formatted text +hi PT1 guifg=blue ctermfg=cyan +hi PT2 guifg=blue ctermfg=cyan +hi PT3 guifg=blue ctermfg=cyan +hi PT4 guifg=blue ctermfg=cyan +hi PT5 guifg=blue ctermfg=cyan +hi PT6 guifg=blue ctermfg=cyan +hi PT7 guifg=blue ctermfg=cyan +hi PT8 guifg=blue ctermfg=cyan +hi PT9 guifg=blue ctermfg=cyan + +" color for tables +hi TA1 guifg=darkviolet ctermfg=cyan +hi TA2 guifg=darkviolet ctermfg=cyan +hi TA3 guifg=darkviolet ctermfg=cyan +hi TA4 guifg=darkviolet ctermfg=cyan +hi TA5 guifg=darkviolet ctermfg=cyan +hi TA6 guifg=darkviolet ctermfg=cyan +hi TA7 guifg=darkviolet ctermfg=cyan +hi TA8 guifg=darkviolet ctermfg=cyan +hi TA9 guifg=darkviolet ctermfg=cyan + +" color for user text (wrapping) +hi UT1 guifg=darkred ctermfg=cyan +hi UT2 guifg=darkred ctermfg=cyan +hi UT3 guifg=darkred ctermfg=cyan +hi UT4 guifg=darkred ctermfg=cyan +hi UT5 guifg=darkred ctermfg=cyan +hi UT6 guifg=darkred ctermfg=cyan +hi UT7 guifg=darkred ctermfg=cyan +hi UT8 guifg=darkred ctermfg=cyan +hi UT9 guifg=darkred ctermfg=cyan + +" color for user text (non-wrapping) +hi UB1 guifg=darkgray ctermfg=cyan +hi UB2 guifg=darkgray ctermfg=cyan +hi UB3 guifg=darkgray ctermfg=cyan +hi UB4 guifg=darkgray ctermfg=cyan +hi UB5 guifg=darkgray ctermfg=cyan +hi UB6 guifg=darkgray ctermfg=cyan +hi UB7 guifg=darkgray ctermfg=cyan +hi UB8 guifg=darkgray ctermfg=cyan +hi UB9 guifg=darkgray ctermfg=cyan + +" colors for folded sections +hi Folded guifg=darkcyan guibg=bg ctermfg=cyan ctermbg=black +hi FoldColumn guifg=darkcyan guibg=bg ctermfg=cyan ctermbg=black + +" colors for experimental spelling error highlighting +" this only works for spellfix.vim with will be cease to exist soon +hi spellErr gui=underline guifg=yellow cterm=underline ctermfg=yellow +hi BadWord gui=underline guifg=yellow cterm=underline ctermfg=yellow diff --git a/.vim/colors/vo_light.vim b/.vim/colors/vo_light.vim new file mode 100755 index 0000000..beef395 --- /dev/null +++ b/.vim/colors/vo_light.vim @@ -0,0 +1,81 @@ +let g:colors_name="VO Light" +hi normal guifg=black guibg=white ctermfg=white ctermbg=black +hi StatusLine guifg=black guibg=white ctermfg=white ctermbg=black +hi StatusLineNC guifg=black guibg=white ctermfg=white ctermbg=black +hi VertSplit guifg=black guibg=white ctermfg=white ctermbg=black +hi OL1 guifg=black ctermfg=black +hi OL2 guifg=red ctermfg=red +hi OL3 guifg=blue ctermfg=blue +hi OL4 guifg=darkviolet ctermfg=magenta +hi OL5 guifg=black ctermfg=black +hi OL6 guifg=red ctermfg=red +hi OL7 guifg=blue ctermfg=blue +hi OL8 guifg=darkviolet ctermfg=magenta +hi OL9 guifg=black ctermfg=black + +" colors for tags +hi outlTags guifg=darkred ctermfg=darkred + +" color for body text +hi BT1 guifg=darkgreen ctermfg=green +hi BT2 guifg=darkgreen ctermfg=green +hi BT3 guifg=darkgreen ctermfg=green +hi BT4 guifg=darkgreen ctermfg=green +hi BT5 guifg=darkgreen ctermfg=green +hi BT6 guifg=darkgreen ctermfg=green +hi BT7 guifg=darkgreen ctermfg=green +hi BT8 guifg=darkgreen ctermfg=green +hi BT9 guifg=darkgreen ctermfg=green + +" color for pre-formatted text +hi PT1 guifg=darkblue ctermfg=cyan +hi PT2 guifg=darkblue ctermfg=cyan +hi PT3 guifg=darkblue ctermfg=cyan +hi PT4 guifg=darkblue ctermfg=cyan +hi PT5 guifg=darkblue ctermfg=cyan +hi PT6 guifg=darkblue ctermfg=cyan +hi PT7 guifg=darkblue ctermfg=cyan +hi PT8 guifg=darkblue ctermfg=cyan +hi PT9 guifg=darkblue ctermfg=cyan + +" color for tables +hi TA1 guifg=darkviolet ctermfg=cyan +hi TA2 guifg=darkviolet ctermfg=cyan +hi TA3 guifg=darkviolet ctermfg=cyan +hi TA4 guifg=darkviolet ctermfg=cyan +hi TA5 guifg=darkviolet ctermfg=cyan +hi TA6 guifg=darkviolet ctermfg=cyan +hi TA7 guifg=darkviolet ctermfg=cyan +hi TA8 guifg=darkviolet ctermfg=cyan +hi TA9 guifg=darkviolet ctermfg=cyan + +" color for user text (wrapping) +hi UT1 guifg=darkred ctermfg=cyan +hi UT2 guifg=darkred ctermfg=cyan +hi UT3 guifg=darkred ctermfg=cyan +hi UT4 guifg=darkred ctermfg=cyan +hi UT5 guifg=darkred ctermfg=cyan +hi UT6 guifg=darkred ctermfg=cyan +hi UT7 guifg=darkred ctermfg=cyan +hi UT8 guifg=darkred ctermfg=cyan +hi UT9 guifg=darkred ctermfg=cyan + +" color for user text (non-wrapping) +hi UB1 guifg=darkgray ctermfg=cyan +hi UB2 guifg=darkgray ctermfg=cyan +hi UB3 guifg=darkgray ctermfg=cyan +hi UB4 guifg=darkgray ctermfg=cyan +hi UB5 guifg=darkgray ctermfg=cyan +hi UB6 guifg=darkgray ctermfg=cyan +hi UB7 guifg=darkgray ctermfg=cyan +hi UB8 guifg=darkgray ctermfg=cyan +hi UB9 guifg=darkgray ctermfg=cyan + +" colors for folded sections +hi Folded guifg=darkcyan guibg=bg ctermfg=cyan ctermbg=white +hi FoldColumn guifg=darkcyan guibg=bg ctermfg=cyan ctermbg=white + +" colors for experimental spelling error highlighting +" this only works for spellfix.vim with will be cease to exist soon +hi spellErr gui=underline guifg=darkred cterm=underline ctermfg=darkred +hi BadWord gui=underline guifg=darkred cterm=underline ctermfg=darkred diff --git a/.vim/doc/tags b/.vim/doc/tags index 2c89b70..93b871e 100644 --- a/.vim/doc/tags +++ b/.vim/doc/tags @@ -1,4 +1,11 @@ +'snippets' snipMate.txt /*'snippets'* +.snippet snipMate.txt /*.snippet* +.snippets snipMate.txt /*.snippets* Align-copyright Align.txt /*Align-copyright* +ExtractSnips() snipMate.txt /*ExtractSnips()* +ExtractSnipsFile() snipMate.txt /*ExtractSnipsFile()* +Filename() snipMate.txt /*Filename()* +ResetSnippets() snipMate.txt /*ResetSnippets()* align Align.txt /*align* align-align Align.txt /*align-align* align-codepoint Align.txt /*align-codepoint* @@ -83,3 +90,60 @@ alignmap-tt Align.txt /*alignmap-tt* alignmap-t~ Align.txt /*alignmap-t~* alignmaps Align.txt /*alignmaps* alignusage Align.txt /*alignusage* +g:snippets_dir snipMate.txt /*g:snippets_dir* +g:snips_author snipMate.txt /*g:snips_author* +i_CTRL-R_ snipMate.txt /*i_CTRL-R_* +list-snippets snipMate.txt /*list-snippets* +multi_snip snipMate.txt /*multi_snip* +otl2html vo_readme.txt /*otl2html* +snipMate snipMate.txt /*snipMate* +snipMate-$# snipMate.txt /*snipMate-$#* +snipMate-${#:} snipMate.txt /*snipMate-${#:}* +snipMate-${#} snipMate.txt /*snipMate-${#}* +snipMate-author snipMate.txt /*snipMate-author* +snipMate-commands snipMate.txt /*snipMate-commands* +snipMate-contact snipMate.txt /*snipMate-contact* +snipMate-description snipMate.txt /*snipMate-description* +snipMate-disadvantages snipMate.txt /*snipMate-disadvantages* +snipMate-expandtab snipMate.txt /*snipMate-expandtab* +snipMate-features snipMate.txt /*snipMate-features* +snipMate-filename snipMate.txt /*snipMate-filename* +snipMate-indenting snipMate.txt /*snipMate-indenting* +snipMate-placeholders snipMate.txt /*snipMate-placeholders* +snipMate-remap snipMate.txt /*snipMate-remap* +snipMate-settings snipMate.txt /*snipMate-settings* +snipMate-usage snipMate.txt /*snipMate-usage* +snipMate.txt snipMate.txt /*snipMate.txt* +snippet snipMate.txt /*snippet* +snippet-syntax snipMate.txt /*snippet-syntax* +snippets snipMate.txt /*snippets* +vimoutliner vo_readme.txt /*vimoutliner* +vo vo_readme.txt /*vo* +vo-activities vo_readme.txt /*vo-activities* +vo-advanced vo_readme.txt /*vo-advanced* +vo-auto-install vo_readme.txt /*vo-auto-install* +vo-cautions vo_readme.txt /*vo-cautions* +vo-checkbox vo_readme.txt /*vo-checkbox* +vo-color vo_readme.txt /*vo-color* +vo-command vo_readme.txt /*vo-command* +vo-debian vo_readme.txt /*vo-debian* +vo-executable-lines vo_readme.txt /*vo-executable-lines* +vo-hoisting vo_readme.txt /*vo-hoisting* +vo-install vo_readme.txt /*vo-install* +vo-license vo_readme.txt /*vo-license* +vo-maketags vo_readme.txt /*vo-maketags* +vo-manual-install vo_readme.txt /*vo-manual-install* +vo-menu vo_readme.txt /*vo-menu* +vo-objects vo_readme.txt /*vo-objects* +vo-other-files vo_readme.txt /*vo-other-files* +vo-other-info vo_readme.txt /*vo-other-info* +vo-philosophy vo_readme.txt /*vo-philosophy* +vo-plugins vo_readme.txt /*vo-plugins* +vo-post-processors vo_readme.txt /*vo-post-processors* +vo-running vo_readme.txt /*vo-running* +vo-scripts vo_readme.txt /*vo-scripts* +vo-testing vo_readme.txt /*vo-testing* +vo-troubleshooting vo_readme.txt /*vo-troubleshooting* +vo-updating vo_readme.txt /*vo-updating* +vo-version vo_readme.txt /*vo-version* +vo_readme.txt vo_readme.txt /*vo_readme.txt* diff --git a/.vim/doc/vo_readme.txt b/.vim/doc/vo_readme.txt new file mode 100755 index 0000000..2102a08 --- /dev/null +++ b/.vim/doc/vo_readme.txt @@ -0,0 +1,1242 @@ +*vo_readme.txt* VimOutliner 0.3.4 for Vim 6.1+ *vo* *vimoutliner* + +Contents + + LICENSE |vo-license| + VERSION |vo-version| + INSTALLING AND TESTING VIMOUTLINER |vo-install| + Automatic method |vo-auto-install| + Updating an existing installation |vo-updating| + Manual method |vo-manual-install| + Color schemes |vo-color| + Testing |vo-testing| + Debian |vo-debian| + USING VIMOUTLINER ON OTHER FILE TYPES |vo-other-files| + TROUBLESHOOTING |vo-troubleshooting| + VIMOUTLINER PHILOSOPHY |vo-philosophy| + RUNNING VIMOUTLINER |vo-running| + What are the comma comma commands |vo-command| + How do you perform basic VimOutliner activities |vo-activities| + Menu |vo-menu| + Vim Outliner objects |vo-objects| + Post Processors |vo-post-processors| + CAUTIONS!!! |vo-cautions| + ADVANCED |vo-advanced| + Executable Lines |vo-executable-lines| + PLUGINS |vo-plugins| + Checkboxes |vo-checkbox| + Hoisting |vo-hoisting| + SCRIPTS |vo-scripts| + vo_maketags.pl |vo-maketags| + otl2html.py |otl2html| + OTHER INFORMATION |vo-other-info| + +------------------------------------------------------------------------- +LICENSE *vo-license* + + VimOutliner Copyright (C) 2001, 2003 by Steve Litt + Copyright (C) 2004 by Noel Henson + Licensed under the GNU General Public License (GPL), version 2 + Absolutely no warranty, see COPYING file for details. + + If your distro doesn't come with this file + HTML: http://www.gnu.org/copyleft/gpl.html + Text: http://www.gnu.org/copyleft/gpl.txt + +------------------------------------------------------------------------- +VERSION *vo-version* + + Version 0.3.4 + Released + + Additions/changes: + Added ,,cp which works like ,,c% but forces % signs to be added + Color schemes have been added + Checkboxes and hoisting default to 'on' + Modified ,,cb and ,,c% (and ,,cp) to work only on headings + Fixed the ,,cz command to make the correct call + Added descriptions of VO objects to help + (headings, text, tables, etc.) + + Bug fixes: + W18 errors have been fixed + +------------------------------------------------------------------------- +INSTALLING AND TESTING VIMOUTLINER *vo-install* + + How do I install VimOutliner? + Automatic Method |vo-auto-install| + Updating |vo-updating| + Manual Method |vo-manual-install| + Testing |vo-testing| + + Automatic method *vo-auto-install* + + The new automatic installation targets Unix-compatible + platforms. + $ tar xzvf vimoutliner-0.3.x.tar.gz + $ cd vimoutliner + $ sh install.sh + + First you can decide whether to install the VimOutliner + files or abort the process leaving everything unchanged. + Assuming you confirmed the installation, the script + creates the necessary directory tree and copies the files + which provide the core functionality and documentation. + + With the second question you decide whether you want to + install some brand new add-ons, currently implementing + hoisting and checkboxes. + + Updating an existing installation *vo-updating* + + Updating an existing installation might require some + manual work. + + If you are already working with a previous VimOutliner + release, there is a slight chance that the current directory + tree is different from your current one. In this case, you + will have to manually migrate your files to the new locations. + + The installation script creates unique backups of files + being replaced with newer versions. So if you put some + local customisations into, say $HOME/.vimoutlinerrc, you'll + probably have to merge the backup with the new file by hand. + + + Manual method *vo-manual-install* + + You can also copy the files from the unpacked distribution + tarball into their destination folders by yourself. The + following steps are a description of what has to go where + and assume some knowledge of your vim setup. + + If you encounter problems, please contact the mailinglist + for an immediate solution and more complete future + documentation. www.lists.vimoutliner.org + + If you want to setup VimOutliner on a system running Microsoft + Windows, the directory $HOME denotes the base folder of the + vim installation. If you're on Unix based system, $HOME + is as usual. + + You need the following subtrees in your $HOME directory: + $HOME/.vim/ + doc/ ftdetect/ ftplugin/ syntax/ + $HOME/.vimoutliner/ + plugins/ scripts/ + + The distribution tarball unpacks into a directory vimoutliner + with the following contents + add-ons/ + plugins/ (2) + scripts/ (2) + doc/ (1) + ftdetect/ (1) + ftplugin/ (1) + install.sh* + scripts/ (2) + syntax/ (1) + vimoutlinerrc (3) + + (1) The content of these folders should be copied to their + namesakes in the $HOME/.vim folder + (2) The content of these folders should be copied to their + namesakes in the $HOME/.vimoutliner folder + (3) This file needs to be moved to $HOME/.vimoutlinerrc + + Your $HOME/.vimrc file should contain the lines + filetype plugin indent on + syntax on + + Your $HOME/.vim/ftplugin/vo_base.vim file should contain + the lines + runtime! ftdetect/*.vim + + Finally, you need to integrate the online help provided + with VimOutliner into the vim help system. Start vim + and execute the following command: + :helptags $HOME/.vim/doc + + At this point, VimOutliner should be functional. + Type "help vo" to get started. + + Color Schemes *vo-color* + + Color schemes specify the colors Vim Outliner uses when + displaying an outline. Colors are specified by object and level. + These objects currently include: headings, body text, pre- + formatted body text, tables and others. See |vo-objects| for + more information. + + Color scheme files are located in the system-wide vim colors + directory and/or your $HOME/.vim/colors directory. You can + select from any of the provided schemes. Vim Outliner internally + includes a scheme the matches vo_light.vim. + + To override the default color scheme you can edit these lines + in your $HOME/.vimoutlinerrc file: + + "Custom Colors ********************************** + " Uncomment this next line to force using VO on + " a light background + " colorscheme vo_light + " Uncomment this next line to force using VO on + " a dark background + " colorscheme vo_dark + + To create your own scheme follow these simple steps: + + 1. Move to your $HOME/.vim/colors directory. + If you don't have one, create it. + + 2. Make a copy of one of the included schemes to use + as a starting point. You should be able to find them + in places like: $HOME/.vim/colors and + /usr/share/vim/vim63/colors. Put the copy in your + own colors directory ($HOME/.vim/colors) + + 3. Edit the scheme file to change whatever colors you + wish. + + 4. Select the scheme in your $HOME/.vimoutlinerrc file. + The line should look something like this: + + colorscheme noel + + That's all there is to it. + + Testing base functionality *vo-testing* + + rm $HOME/vo_test.otl + gvim $HOME/vo_test.otl + or vim $HOME/vo_test.otl + Verify the following: + Tabs indent the text + Different indent levels are different colors + Lines starting with a colon and space word-wrap + Lines starting with colons are body text. They should + word wrap and should be a special color (typically + green, but it can vary). Verify that paragraphs of body + text can be reformatted with the Vim gq commands. + + Verify interoutline linking + + Interoutline linking currently requires a working perl installation + to generate the necessary tag file. We are looking into porting + this to vim's own scripting language. + + Place the following two lines in $HOME/vo_test.otl: + _tag_newfile + $HOME/vo_newfile.otl + Note that in the preceding, the 2nd line should be indented + from the first. + + To create VimOutliner's tag file $HOME/.vimoutliner/vo_tags.tag, + run vo_maketags.pl, which resides in $HOME/.vimoutliner/scripts/: + $ $HOME/.vimoutliner/scripts/vo_maketags.pl $HOME/vo_test.otl + + In $HOME/vo_test.otl + Cursor to the _tag_newfile marker + Press Ctrl+K + You should be brought to $HOME/vo_newfile.otl + Press Ctrl+N + You should be brought back to $HOME/vo_test.otl + Note: + Ctrl+K is a VimOutliner synonym for Ctrl+] + Ctrl+N is a VimOutliner synonym for Ctrl+T + + Debian Installation *vo-debian* + + Debian does include Vim Outliner as a package. However some + Debian version require this line to be added to your .vimrc file: + + syntax on + +------------------------------------------------------------------------- +USING VIMOUTLINER ON OTHER FILE TYPES *vo-other-files* + + How do I use VimOutliner on non .otl files + + Overview + Previous VimOutliner versions used the ol script to invoke + VimOutliner. As of VimOutliner 0.3.0, the ol script is no + longer necessary nor provided. Instead, VimOutliner is now a + Vim plugin, so Vim does all the work. + + This makes VimOutliner much simpler to use in most cases, + but Vim plugins are file extension based, meaning that if + you want to use VimOutliner on a file extension other than + .otl, you must declare that file extension in + $HOME/.vim/ftdetect/vo_base.vim. In this section we'll + use the .emdl extension (Easy Menu Definition Language) + as an example. + + To enable VimOutliner work with .emdl files, do this: + vim $HOME/.vim/ftdetect/vo_base.vim + Right below the line reading: + au! BufRead,BufNewFile *.otl setfiletype vo_base + Insert the following line: + au! BufRead,BufNewFile *.emdl setfiletype vo_base + Save and exit + Test with the following: + gvim $HOME/vo_test.emdl + You should get + level colors, + body text (lines starting with colon) + comma comma commands (try ,,2 and ,,1) + +------------------------------------------------------------------------- +TROUBLESHOOTING *vo-troubleshooting* + + Troubleshooting + + I can't switch between colon based and space based body text + See next question + + My ,,b and ,,B don't do anything. How do I fix it? + vim $HOME/.vim/ftplugin/vo_base.vim + Search for use_space_colon + Make sure it is set to 0, not 1 + Rerun Vim, and ,,b and ,,B should work + + I don't get VimOutliner features on files of extension .whatever + vim $HOME/.vim/ftdetect/vo_base.vim + Right below the line reading: + au! BufRead,BufNewFile *.otl setfiletype vo_base + Insert the following line: + au! BufRead,BufNewFile *.whatever setfiletype vo_base + Save and exit + +------------------------------------------------------------------------- +VIMOUTLINER PHILOSOPHY *vo-philosophy* + + Authoring Speed + VimOutliner is an outline processor with many of the same + features as Grandview, More, Thinktank, Ecco, etc. Features + include tree expand/collapse, tree promotion/demotion, level + sensitive colors, interoutline linking, and body text. + + What sets VimOutliner apart from the rest is that it's been + constructed from the ground up for fast and easy authoring. + Keystrokes are quick and easy, especially for someone knowing the + Vim editor. The mouse is completely unnecessary (but is supported + to the extent that Vim supports the mouse). Many of the + VimOutliner commands start with a double comma because that's + very quick to type. + + Many outliners are prettier than VimOutliner. Most other + outliners are more intuitive for the newbie not knowing Vim. Many + outliners are more featureful than VimOutliner (although + VimOutliner gains features monthly and is already very powerful). + Some outliners are faster on lookup than VimOutliner. But as far + as we know, NO outliner is faster at getting information out of + your mind and into an outline than VimOutliner. + + VimOutliner will always give you lightning fast authoring. That's + our basic, underlying philosophy, and will never change, no + matter what features are added. + + Vim integration + Earlier VimOutliner versions prided themselves on being + standalone applications, self-contained in a single directory + with a special script to run everything. + + As of 0.3.0, VimOutliner is packaged as a Vim Plugin, eliminating + the need for the ol script, which many saw as clumsy. Given that + all VimOutliner features are produced by the Vim engine, it makes + perfect sense to admit that VimOutliner is an add-on to Vim. + + Therefore VimOutliner now prides itself in being a Vim plugin. + With the VimOutliner package installed, the Vim editor yields the + VimOutliner feature set for files whose extensions are listed as + vo_base types in $HOME/.vim/ftplugin/vo_base.vim. + + The Vim Plugin philosophy yields several benefits: + Less reliance on Perl, bash and environment vars + (upcoming) Portability between Linux, Windows and Mac + (upcoming) Installation via Vim script + +------------------------------------------------------------------------- +RUNNING VIMOUTLINER *vo-running* + + Vim knowledge is a prerequisite + Overview + You needn't be a Vim expert to use VimOutliner. If you know + the basics -- inserting and deleting linewise and + characterwise, moving between command and insert modes, use + of Visual Mode selections,and reformatting, you should be + well equipped to use VimOutliner. + + VimOutliner is a set of Vim scripts and configurations. Its + features all come from the Vim editor's engine. If you do not + know Vim, you'll need to learn the Vim basics before using + VimOutliner. Start by taking the Vim tutorial. The tutorial + should take about 2 hours. + + VimOutliner is so fast, that if you often use outlining, + you'll make up that time within a week. + + Taking the Vim tutorial + Run vim or gvim + Type the command, :help tutor + Follow the instructions + + What are the comma comma commands *vo-command* + Overview + For maximum authoring speed, VimOutliner features are + accessed through keyboard commands starting with 2 commas. + The double comma followed by a character is incredibly fast + to type. + + We expect to create more comma comma commands, so try not to + create your own, as they may clash with later comma comma + commands. If you have an exceptionally handy command, please + report it to the VimOutliner list. Perhaps others could + benefit from it. + + Command list + ,,D all VimOutliner reserved command + ,,H all reserved for manual de-hoisting (add-on) + ,,h all reserved for hoisting (add-on) + ,,1 all set foldlevel=0 + ,,2 all set foldlevel=1 + ,,3 all set foldlevel=2 + ,,4 all set foldlevel=3 + ,,5 all set foldlevel=4 + ,,6 all set foldlevel=5 + ,,7 all set foldlevel=6 + ,,8 all set foldlevel=7 + ,,9 all set foldlevel=8 + ,,0 all set foldlevel=99999 + ,,- all Draw dashed line + ,,f normal Directory listing of the current directory + ,,s normal Sort sub-tree under cursor ascending + ,,S normal Sort sub-tree under cursor descending + ,,t normal Append timestamp (HH:MM:SS) to heading + ,,T normal Pre-pend timestamp (HH:MM:SS) to heading + ,,T normal Pre-pend timestamp (HH:MM:SS) to heading + ,,t insert Insert timestamp (HH:MM:SS) at cursor + ,,d normal Append datestamp (YYYY-MM-DD) to heading + ,,d insert Insert datestamp (YYYY-MM-DD) at cursor + ,,D normal Pre-pend datestamp (YYYY-MM-DD) to heading + ,,B normal Make body text start with a space + ,,b normal Make body text start with a colon and space + ,,w insert Save changes and return to insert mode + ,,e normal Execute the executable tag line under cursor + + What are some other VimOutliner Commands + + Overview + Naturally, almost all Vim commands work in VimOutliner. + Additionally, VimOutliner adds a few extra commands besides + the comma comma commands discussed previously. + + Command list: + Ctrl+K Follow tag (Synonym for Ctrl+]) + Ctrl+N Return from tag (Synonym for Ctrl+T) + Q Reformat (Synonym for gq) + + How do you perform basic VimOutliner activities *vo-activities* + + How do I collapse a tree within command mode? + zc + (note: a full list of folding commands |fold-commands|) + + How do I expand a tree within command mode? + To expand one level: + zo + To expand all the way down + zO + + How do I demote a headline? + In command mode, >> + In insert mode at start of the line, press the Tab key + In insert mode within the headline, Ctrl+T + + How do I promote a headline? + In command mode, << + In insert mode at start of the line, press the Backspace key + In insert mode within the headline, Ctrl+D + + How do I promote or demote several consecutive headlines? + Highlight the lines with the V command + Press < to promote or > to demote. You can precede + the < or > with a count to promote or demote several levels + + How do I promote or demote an entire tree? + Collapse the tree + Use << or >> as appropriate + + How do I collapse an entire outline? + ,,1 + + How do I maximally expand an entire outline? + ,,0 + + How do I expand an outline down to the third level? + ,,3 + + How do I move a tree? + Use Vim's visual cut and paste + + How do I create body text? + Open a blank line below a headline + Start the line with a colon followed by a space + Continue to type. Your text will wrap + + How do I reformat body text? + Highlight (Shift+V) the body text to be reformatted + Use the gq command to reformat + + How do I reformat one paragraph of body text? + The safest way is highlighting. + DANGER! Other methods can reformat genuine headlines. + + How do I switch between colon based and space based body text? + ,,b for colon based, ,,B for space based + + What if ,,b and ,,B don't work + Change variable use_space_colon from 1 to 0 + in $HOME/.vim/ftplugin/vo_base.vim + + How do I perform a wordcount? + Use the command :w !wc + The space before the exclamation point is a MUST. + + Menu *vo-menu* + + There is a simple menu included in Vim Outliner when running + in GUI mode. Named 'VO', you can usually find it right next to the + 'Help' menu. There are commands to change the fold level and select + alternate color schemes. There is also entries for common tools. + Currently there are only two entries for running the otl2html.py + script included with VO. + + The first otl2html.py tool item executes the script with default + options. The only control a user has it to modify the nnnnnn.css + file. + + The second tool item calls a shell script, 'myotl2html.sh'. This + script should be provided by the user and is not included in VO + releases. A sample myotl2html.sh script might look like this: + + #!/bin/bash + otl2html.py -S pjtstat.css $1 > $HOME/public_html/$1.html + + If you have several different types of reports you create regularly, + you can create your own menu entries. Just add lines like these to + your ~/.vimoutlinerrc file: + + amenu &VO.&Reports.&Big\ Project :!otl2html.py -S big.css % > %.html + amenu &VO.&Reports.&Hot\ List :!otl2html.py -S todo.css % > %.html + amenu &VO.&Reports.&Weekly :!otl2html.py -S weekly.css % > %.html + + I'm sure you get the idea. + + Vim Outliner Objects *vo-objects* + + There are several object/line types that VO supports. The most + common on simple headings and body text. Simple headings are + tab-indented line that start with any non-whitespace character + except: : ; | < >. These characters specify other objects. Here + is a list of each of the non-heading types: + : body text (wrapping) + ; preformatted body text (non-wrapping) + | table + > user-defined, text block (wrapping) + < user-defined, preformatted text block (non-wrapping) + + The body text marker, :, is used to specify lines that are + automatically wrapped and reformatted. VO and post-processors are + free to wrap and reformat this text as well as use proportionally- + spaced fonts. A post-processor will probably change the appearance + of what you have written. If you are writing a book or other + document, most of the information you enter will be body text. + + Here is an example: + + Kirby the Wonder Dog + : Kirby is nine years old. He understand about 70-100 + : English words. Kirby also understands 11 different hand + : signals. He is affectionate, playful and attentive. + : + : His breeding is unknown. He appears to be a mix between + : a german shepherd and a collie. + + When folded, body text looks something like this: + + Kirby the Wonder Dog + [TEXT] -------------------------------- (6 lines) + + The preformatted text marker, ;, is used to mark text that should + not be reformatted nor wrapped by VO or any post-processor. A post- + processor would use a fixed-space font, like courier, to render + these lines. A post-processor will probably not change the + appearance of what you have written. This is useful for making text + picture, program code or other format-dependent text. + + Here is an example: + + Output waveform + ; _______ ______ + ; _____/ \______________/ + ; |-10us--|----35us------| + + When folded, preformatted body text looks something like this: + + Output waveform + [TEXT BLOCK] -------------------------- (6 lines) + + The table marker, |, is used to create tables. This is an excellent + way to show tabular data. The marker is used as if it were are real + vertical line. A || (double-|) is optionally used to mark a table + heading line. This is useful for post-processors. + + Here is an example: + + Pets + || Name | Age | Animal | Inside/Outside | + | Kirby | 9 | dog | both | + | Hoover | 1 | dog | both | + | Sophia | 9 | cat | inside | + + There is no automatic alignment of columns yet. It must be done + manually. The post-processor, otl2thml.py, does have alignment + functions. See its documentation for more information. + + When folded, a table looks something like this: + + Pets + [TABLE] ------------------------------- (4 lines) + + User-defined text is similar to body text but more flexible and it's + use is not pre-defined by Vim Outliner. The basic, user-defined + text block marker, >, behaves just like body text. + + For example: + + Kirby the Wonder Dog + > Kirby is nine years old. He understand about 70-100 + > English words. Kirby also understands 11 different hand + > signals. He is affectionate, playful and attentive. + > + > His breeding is unknown. He appears to be a mix between + > a german shepherd and a collie. + + When folded, body text looks something like this: + + Kirby the Wonder Dog + [USER] -------------------------------- (6 lines) + + But unlike body text, user-defined text can be expanded. You could + have user-defined text types. If you were writing a book, in + addition to body text for paragraphs you might need special + paragraphs for tips and warnings. User-defined text blocks can + accomplish this: + + >Tips + > Don't forget to back up your computer daily. You don't + > need to back up the entire computer. You just need to + > backup up the files that have changed. + >Warning + >Never store you backup floppy disks on the side of you + >file cabinets by adhering them with magnets. + + A post processor will know how to remove the style tags (Tips and + Warning) and you want the text to be formatted. + + When folded, the above would appear as: + + [USER Tips] --------------------------- (4 lines) + [USER Warning]------------------------- (3 lines) + + The user-defined, preformatted text block marker, <, behaves just + like preformatted text. But like >, it leaves the functional + definition up to the user. A simple user-defined, preformatted text + block could be: + + Tux + < _.._ + < .-' `-. + < : ; + < ; ,_ _, ; + < : \{" "}/ : + < ,'.'"=..=''.'. + < ; / \ / \ ; + < .' ; '.__.' ; '. + < .-' .' '. '-. + < .' ; ; '. + < / / \ \ + < ; ; ; ; + < ; `-._ _.-' ; + < ; ""--. .--"" ; + < '. _ ; ; _ .' + < {""..' '._.-. .-._.' '..""} + < \ ; ; / + < : : : : + < : :.__.: : + < \ /"-..-"\ / fsc + < '-.__.' '.__.-' + + When folded it would be: + + Tux + [USER BLOCK] -------------------------- (6 lines) + + Like user-defined text, these blocks can be given user-defined + styles. For example: + + 0) + let l:searchline = l:searchline-1 + endwhile + return l:searchline + endif +endfunction +"}}}3 +" FindLastChild(line) {{{3 +" Return the line number of the last decendent of parent line +function! FindLastChild(line) + let l:parentindent = Ind(a:line) + let l:searchline = a:line+1 + while Ind(l:searchline) > l:parentindent + let l:searchline = l:searchline+1 + endwhile + return l:searchline-1 +endfunction +"}}}3 +" MoveDown() {{{3 +" Move a heading down by one +" Used for sorts and reordering of headings +function! MoveDown() + call cursor(line("."),0) + del x + put x +endfunction +"}}}3 +" DelHead() {{{3 +" Delete a heading +" Used for sorts and reordering of headings +function! DelHead(line) + let l:fstart = foldclosed(a:line) + if l:fstart == -1 + let l:execstr = a:line . "del x" + else + let l:fend = foldclosedend(a:line) + let l:execstr = l:fstart . "," . l:fend . "del x" + endif + exec l:execstr +endfunction +" PutHead() {{{3 +" Put a heading +" Used for sorts and reordering of headings +function! PutHead(line) + let l:fstart = foldclosed(a:line) + if l:fstart == -1 + let l:execstr = a:line . "put x" + exec l:execstr + else + let l:fend = foldclosedend(a:line) + let l:execstr = l:fend . "put x" + exec l:execstr + endif +endfunction +"}}}3 +" NextHead(line) {{{3 +" Return line of next heanding +" Used for sorts and reordering of headings +function! NextHead(line) + let l:fend = foldclosedend(a:line) + if l:fend == -1 + return a:line+1 + else + return l:fend+1 + endif +endfunction +"}}}3 +" CompHead(line) {{{3 +" Compare this heading and the next +" Return 1: next is greater, 0 next is same, -1 next is less +function! CompHead(line) + let l:thisline=getline(a:line) + let l:nextline=getline(NextHead(a:line)) + if l:thisline <# l:nextline + return 1 + elseif l:thisline ># l:nextline + return -1 + else + return 0 + endif +endfunction +"}}}3 +" Sort1Line(line) {{{3 +" Compare this heading and the next and swap if out of order +" Dir is 0 for forward, 1 for reverse +" Return a 1 if a change was made +function! Sort1Line(line,dir) + if (CompHead(a:line) == -1) && (a:dir == 0) + call DelHead(a:line) + call PutHead(a:line) + return 1 + elseif (CompHead(a:line) == 1) && (a:dir == 1) + call DelHead(a:line) + call PutHead(a:line) + return 1 + else + return 0 + endif +endfunction +"}}}3 +" Sort1Pass(start,end,dir) {{{3 +" Compare this heading and the next and swap if out of order +" Dir is 0 for forward, 1 for reverse +" Return a 0 if no change was made, other wise return the change count +function! Sort1Pass(fstart,fend,dir) + let l:i = a:fstart + let l:changed = 0 + while l:i < a:fend + let l:changed = l:changed + Sort1Line(l:i,a:dir) + let l:i = NextHead(l:i) + endwhile + return l:changed +endfunction +"}}}3 +" Sort(start,end,dir) {{{3 +" Sort this range of headings +" dir: 0 = ascending, 1 = decending +function! SortRange(fstart,fend,dir) + let l:changed = 1 + while l:changed != 0 + let l:changed = Sort1Pass(a:fstart,a:fend,a:dir) + endwhile +endfunction +"}}}3 +" SortChildren(dir) {{{3 +" Sort the children of a parent +" dir: 0 = ascending, 1 = decending +function! SortChildren(dir) + let l:oldcursor = line(".") + let l:fstart = FindParent(line(".")) + let l:fend = FindLastChild(l:fstart) + let l:fstart = l:fstart + if l:fend <= l:fstart + 1 + return + endif + call append(line("$"),"Temporary last line for sorting") + mkview + let l:execstr = "set foldlevel=" . foldlevel(l:fstart) + exec l:execstr + call SortRange(l:fstart + 1,l:fend,a:dir) + call cursor(line("$"),0) + del x + loadview + call cursor(l:oldcursor,0) +endfunction +"}}}3 +"}}}2 +" MakeChars() {{{2 +" Make a string of characters +" Used for strings of repeated characters +function MakeChars(count,char) + let i = 0 + let l:chars="" + while i < a:count + let l:chars = l:chars . a:char + let i = i + 1 + endwhile + return l:chars +endfunction +"}}}2 +" MakeSpaces() {{{2 +" Make a string of spaces +function MakeSpaces(count) + return MakeChars(a:count," ") +endfunction +"}}}2 +" MakeDashes() {{{2 +" Make a string of dashes +function MakeDashes(count) + return MakeChars(a:count,"-") +endfunction +"}}}2 +" MyFoldText() {{{2 +" Create string used for folded text blocks +function MyFoldText() + let l:MySpaces = MakeSpaces(&sw) + let l:line = getline(v:foldstart) + let l:bodyTextFlag=0 + if l:line =~ "^\t* \\S" || l:line =~ "^\t*\:" + let l:bodyTextFlag=1 + let l:MySpaces = MakeSpaces(&sw * (v:foldlevel-1)) + let l:line = l:MySpaces."[TEXT]" + elseif l:line =~ "^\t*\;" + let l:bodyTextFlag=1 + let l:MySpaces = MakeSpaces(&sw * (v:foldlevel-1)) + let l:line = l:MySpaces."[TEXT BLOCK]" + elseif l:line =~ "^\t*\> " + let l:bodyTextFlag=1 + let l:MySpaces = MakeSpaces(&sw * (v:foldlevel-1)) + let l:line = l:MySpaces."[USER]" + elseif l:line =~ "^\t*\>" + let l:ls = stridx(l:line,">") + let l:le = stridx(l:line," ") + if l:le == -1 + let l:l = strpart(l:line, l:ls+1) + else + let l:l = strpart(l:line, l:ls+1, l:le-l:ls-1) + endif + let l:bodyTextFlag=1 + let l:MySpaces = MakeSpaces(&sw * (v:foldlevel-1)) + let l:line = l:MySpaces."[USER ".l:l."]" + elseif l:line =~ "^\t*\< " + let l:bodyTextFlag=1 + let l:MySpaces = MakeSpaces(&sw * (v:foldlevel-1)) + let l:line = l:MySpaces."[USER BLOCK]" + elseif l:line =~ "^\t*\<" + let l:ls = stridx(l:line,"<") + let l:le = stridx(l:line," ") + if l:le == -1 + let l:l = strpart(l:line, l:ls+1) + else + let l:l = strpart(l:line, l:ls+1, l:le-l:ls-1) + endif + let l:bodyTextFlag=1 + let l:MySpaces = MakeSpaces(&sw * (v:foldlevel-1)) + let l:line = l:MySpaces."[USER BLOCK ".l:l."]" + elseif l:line =~ "^\t*\|" + let l:bodyTextFlag=1 + let l:MySpaces = MakeSpaces(&sw * (v:foldlevel-1)) + let l:line = l:MySpaces."[TABLE]" + endif + let l:sub = substitute(l:line,'\t',l:MySpaces,'g') + let l:len = strlen(l:sub) + let l:sub = l:sub . " " . MakeDashes(58 - l:len) + let l:sub = l:sub . " (" . ((v:foldend + l:bodyTextFlag)- v:foldstart) + if ((v:foldend + l:bodyTextFlag)- v:foldstart) == 1 + let l:sub = l:sub . " line)" + else + let l:sub = l:sub . " lines)" + endif + return l:sub +endfunction +"}}}2 +" InsertDate() {{{2 +" Insert today's date. +function InsertDate(ba) + let @x = strftime("%Y-%m-%d") + if a:ba == "0" + normal! "xp + else + normal! "xP + endif +endfunction +"}}}2 +" InsertSpaceDate() {{{2 +" Insert a space, then today's date. +function InsertSpaceDate() + let @x = " " + let @x = @x . strftime("%Y-%m-%d") + normal! "xp +endfunction +"}}}2 +" InsertTime() {{{2 +" Insert the time. +function InsertTime(ba) + let @x = strftime("%T") + if a:ba == "0" + normal! "xp + else + normal! "xP + endif +endfunction +"}}}2 +" InsertSpaceTime() {{{2 +" Insert a space, then the time. +function InsertSpaceTime() + let @x = " " + let @x = @x . strftime("%T") + normal! "xp +endfunction +"}}}2 +" Ind(line) {{{2 +" Determine the indent level of a line. +" Courtesy of Gabriel Horner +function! Ind(line) + return indent(a:line)/&tabstop +endfunction +"}}}2 +" BodyText(line) {{{2 +" Determine the indent level of a line. +function! BodyText(line) + return (match(getline(a:line),"^\t*:") == 0) +endfunction +"}}}2 +" PreformattedBodyText(line) {{{2 +" Determine the indent level of a line. +function! PreformattedBodyText(line) + return (match(getline(a:line),"^\t*;") == 0) +endfunction +"}}}2 +" PreformattedUserText(line) {{{2 +" Determine the indent level of a line. +function! PreformattedUserText(line) + return (match(getline(a:line),"^\t*<") == 0) +endfunction +"}}}2 +" PreformattedUserTextLabeled(line) {{{2 +" Determine the indent level of a line. +function! PreformattedUserTextLabeled(line) + return (match(getline(a:line),"^\t*<\S") == 0) +endfunction +"}}}2 +" PreformattedUserTextSpace(line) {{{2 +" Determine the indent level of a line. +function! PreformattedUserTextSpace(line) + return (match(getline(a:line),"^\t*< ") == 0) +endfunction +"}}}2 +" UserText(line) {{{2 +" Determine the indent level of a line. +function! UserText(line) + return (match(getline(a:line),"^\t*>") == 0) +endfunction +"}}}2 +" UserTextSpace(line) {{{2 +" Determine the indent level of a line. +function! UserTextSpace(line) + return (match(getline(a:line),"^\t*> ") == 0) +endfunction +"}}}2 +" UserTextLabeled(line) {{{2 +" Determine the indent level of a line. +function! UserTextLabeled(line) + return (match(getline(a:line),"^\t*>\S") == 0) +endfunction +"}}}2 +" PreformattedTable(line) {{{2 +" Determine the indent level of a line. +function! PreformattedTable(line) + return (match(getline(a:line),"^\t*|") == 0) +endfunction +"}}}2 +" MyFoldLevel(Line) {{{2 +" Determine the fold level of a line. +function MyFoldLevel(line) + let l:myindent = Ind(a:line) + let l:nextindent = Ind(a:line+1) + + if BodyText(a:line) + if (BodyText(a:line-1) == 0) + return '>'.(l:myindent+1) + endif + if (BodyText(a:line+1) == 0) + return '<'.(l:myindent+1) + endif + return (l:myindent+1) + elseif PreformattedBodyText(a:line) + if (PreformattedBodyText(a:line-1) == 0) + return '>'.(l:myindent+1) + endif + if (PreformattedBodyText(a:line+1) == 0) + return '<'.(l:myindent+1) + endif + return (l:myindent+1) + elseif PreformattedTable(a:line) + if (PreformattedTable(a:line-1) == 0) + return '>'.(l:myindent+1) + endif + if (PreformattedTable(a:line+1) == 0) + return '<'.(l:myindent+1) + endif + return (l:myindent+1) + elseif PreformattedUserText(a:line) + if (PreformattedUserText(a:line-1) == 0) + return '>'.(l:myindent+1) + endif + if (PreformattedUserTextSpace(a:line+1) == 0) + return '<'.(l:myindent+1) + endif + return (l:myindent+1) + elseif PreformattedUserTextLabeled(a:line) + if (PreformattedUserTextLabeled(a:line-1) == 0) + return '>'.(l:myindent+1) + endif + if (PreformattedUserText(a:line+1) == 0) + return '<'.(l:myindent+1) + endif + return (l:myindent+1) + elseif UserText(a:line) + if (UserText(a:line-1) == 0) + return '>'.(l:myindent+1) + endif + if (UserTextSpace(a:line+1) == 0) + return '<'.(l:myindent+1) + endif + return (l:myindent+1) + elseif UserTextLabeled(a:line) + if (UserTextLabeled(a:line-1) == 0) + return '>'.(l:myindent+1) + endif + if (UserText(a:line+1) == 0) + return '<'.(l:myindent+1) + endif + return (l:myindent+1) + else + if l:myindent < l:nextindent + return '>'.(l:myindent+1) + endif + if l:myindent > l:nextindent + "return '<'.(l:nextindent+1) + return (l:myindent) + "return '<'.(l:nextindent-1) + endif + return l:myindent + endif +endfunction +"}}}2 +" Spawn(line) {{{2 +" Execute an executable line +" Courtesy of Steve Litt +if !exists("loaded_steveoutliner_functions") + let loaded_steveoutliner_functions=1 +function Spawn() + let theline=getline(line(".")) + let idx=matchend(theline, "_exe_\\s*") + if idx == -1 + echo "Not an executable line" + else + let command=strpart(theline, idx) + let command="!".command + exec command + endif +endfunction +endif +"}}}2 +" This should be a setlocal but that doesn't work when switching to a new .otl file +" within the same buffer. Using :e has demonstrates this. +set foldtext=MyFoldText() + +setlocal fillchars=|, + +endif " if !exists("loaded_vimoutliner_functions") +" End Vim Outliner Functions + +" Vim Outliner Key Mappings {{{1 +" insert the date +nmap d $:call InsertSpaceDate() +imap d ~x:call InsertDate(0)a +nmap D ^:call InsertDate(1)a + + +" insert the time +nmap t $:call InsertSpaceTime() +imap t ~x:call InsertTime(0)a +nmap T ^:call InsertTime(1)a + +" sort a list naturally +map s :call SortChildren(0) +" sort a list, but you supply the options +map S :call SortChildren(1) + +" invoke the file explorer +map f :e . +imap f :e . + +" Insert a fence for segemented lists. +" I also use this divider to create a
when converting to html +map - o----------------------------------------0 +imap - ---------------------------------------- + +" switch document between the two types of bodytext styles +if use_space_colon == 1 + " First, convert document to the marker style + map b :%s/\(^\t*\) :/\1/e:%s/\(^\t*\) /\1 : /e:let @/="" + " Now, convert document to the space style + map B :%s/\(^\t*\) :/\1/e:let @/="" +else + " First, convert document to the marker style + map b :%s/\(^\t*\):/\1/e:%s/\(^\t*\) /\1: /e:let @/="" + " Now, convert document to the space style + map B :%s/\(^\t*\):/\1/e:let @/="" +endif + +" Steve's additional mappings start here +map +map +map 0 :set foldlevel=99999 +map 9 :set foldlevel=8 +map 8 :set foldlevel=7 +map 7 :set foldlevel=6 +map 6 :set foldlevel=5 +map 5 :set foldlevel=4 +map 4 :set foldlevel=3 +map 3 :set foldlevel=2 +map 2 :set foldlevel=1 +map 1 :set foldlevel=0 +map ,, :source $HOME/.vimoutliner/outliner.vim +map! w :wa +nmap e :call Spawn() +" Steve's additional mappings end here + +" Placeholders for already assigned but non-functional commands +map h :echo "VimOutliner reserved command: ,,h" +imap h :echo "VimOutliner reserved command: ,,h" +map H :echo "VimOutliner reserved command: ,,H" +imap H :echo "VimOutliner reserved command: ,,H" + +" End of Vim Outliner Key Mappings }}}1 +" Menu Entries {{{1 +" VO menu +amenu &VO.Expand\ Level\ &1 :set foldlevel=0 +amenu &VO.Expand\ Level\ &2 :set foldlevel=1 +amenu &VO.Expand\ Level\ &3 :set foldlevel=2 +amenu &VO.Expand\ Level\ &4 :set foldlevel=3 +amenu &VO.Expand\ Level\ &5 :set foldlevel=4 +amenu &VO.Expand\ Level\ &6 :set foldlevel=5 +amenu &VO.Expand\ Level\ &7 :set foldlevel=6 +amenu &VO.Expand\ Level\ &8 :set foldlevel=7 +amenu &VO.Expand\ Level\ &9 :set foldlevel=8 +amenu &VO.Expand\ Level\ &All :set foldlevel=99999 +amenu &VO.-Sep1- : +amenu &VO.&Tools.&otl2thml\.py\ (otl2html\.py\ thisfile\ -S\ nnnnnn\.css\ >\ thisfile\.html) :!otl2html.py -S nnnnnn.css % > %.html +amenu &VO.&Tools.&myotl2thml\.sh\ (myotl2html\.sh\ thisfile) :!myotl2html.sh % +amenu &VO.-Sep2- : +amenu &VO.&Color\ Scheme :popup Edit.Color\ Scheme +amenu &VO.-Sep3- : +amenu &VO.&Help.&Index :he vo +amenu &VO.&Help.&,,\ Commands :he vo-command +amenu &VO.&Help.&Checkboxes :he vo-checkbox +amenu &VO.&Help.&Hoisting :he vo-hoisting +amenu &Help.-Sep1- : +" Help menu additions +amenu &Help.&Vim\ Outliner.&Index :he vo +amenu &Help.&Vim\ Outliner.&,,\ Commands :he vo-command +amenu &Help.&Vim\ Outliner.&Checkboxes :he vo-checkbox +amenu &Help.&Vim\ Outliner.&Hoisting :he vo-hoisting +"}}}1 +" Auto-commands {{{1 +if !exists("autocommand_vo_loaded") + let autocommand_vo_loaded = 1 + au BufNewFile,BufRead *.otl setf vo_base +" au CursorHold *.otl syn sync fromstart + set updatetime=500 +endif +"}}}1 + +" this command needs to be run every time so Vim doesn't forget where to look +setlocal tags^=$HOME/.vimoutliner/vo_tags.tag + +" Added an indication of current syntax as per Dillon Jones' request +let b:current_syntax = "outliner" + +" Personal configuration options files as per Matej Cepl +setlocal runtimepath+=$HOME/.vimoutliner,$HOME +ru! .vimoutlinerrc vimoutlinerrc +" More sophisticated version of the modules loading; thanks to Preben 'Peppe' +" Guldberg for telling me how to split string and make semi-lists with vim. +" - Matej Cepl +let s:tmp = g:vo_modules_load . ':' +let s:idx = stridx(s:tmp, ':') + +while (s:idx != -1) + let s:part = strpart(s:tmp, 0, s:idx) + let s:tmp = strpart(s:tmp, s:idx + 1) + let s:idx = stridx(s:tmp, ':') + "exec 'ru! ftplugin/vo_' . part . '.vim' + exec "runtime! plugins/vo_" . s:part . ".vim" +endwhile + +" The End +" vim600: set foldmethod=marker foldlevel=0: diff --git a/.vim/syntax/vo_base.vim b/.vim/syntax/vo_base.vim new file mode 100755 index 0000000..52ff5c8 --- /dev/null +++ b/.vim/syntax/vo_base.vim @@ -0,0 +1,312 @@ +"######################################################################### +"# syntax/vo_base.vim: VimOutliner syntax highlighting +"# version 0.3.0 +"# Copyright (C) 2001,2003 by Steve Litt (slitt@troubleshooters.com) +"# +"# This program is free software; you can redistribute it and/or modify +"# it under the terms of the GNU General Public License as published by +"# the Free Software Foundation; either version 2 of the License, or +"# (at your option) any later version. +"# +"# This program is distributed in the hope that it will be useful, +"# but WITHOUT ANY WARRANTY; without even the implied warranty of +"# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +"# GNU General Public License for more details. +"# +"# You should have received a copy of the GNU General Public License +"# along with this program; if not, write to the Free Software +"# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +"# +"# Steve Litt, slitt@troubleshooters.com, http://www.troubleshooters.com +"######################################################################### + +" HISTORY {{{1 +"######################################################################### +"# V0.1.0 Pre-alpha +"# Set of outliner friendly settings +"# Steve Litt, 5/28/2001 +"# End of version 0.1.0 +"# +"# V0.1.1 Pre-alpha +"# No change +"# +"# Steve Litt, 5/28/2001 +"# End of version 0.1.1 +"# +"# V0.1.2 Pre-alpha +"# No Change +"# Steve Litt, 5/30/2001 +"# End of version 0.1.2 +"# V0.1.3 Pre-alpha +"# No Change +"# Steve Litt, 5/30/2001 +"# End of version 0.1.3 +"# V0.2.0 +"# Noel Henson adds code for outliner-friendly expand and +"# collapse, comma comma commands, color coding, hooks for a +"# spellchecker, sorting, and date insertion. +"# Noel Henson, 11/24/2002 +"# End of version 0.2.0 +"# END OF HISTORY +"# +"######################################################################### + +" Level Colors {{{1 +" colors for outline levels 1-9 +" Light background {{{2 +" added this next conditional at Dillon's recommendation +if &background == "light" + hi OL1 guifg=black ctermfg=black + hi OL2 guifg=red ctermfg=red + hi OL3 guifg=blue ctermfg=blue + hi OL4 guifg=darkviolet ctermfg=magenta + hi OL5 guifg=black ctermfg=black + hi OL6 guifg=red ctermfg=red + hi OL7 guifg=blue ctermfg=blue + hi OL8 guifg=darkviolet ctermfg=magenta + hi OL9 guifg=black ctermfg=black + + " colors for tags + hi outlTags guifg=darkred ctermfg=darkred + + " color for body text + hi BT1 guifg=darkgreen ctermfg=green + hi BT2 guifg=darkgreen ctermfg=green + hi BT3 guifg=darkgreen ctermfg=green + hi BT4 guifg=darkgreen ctermfg=green + hi BT5 guifg=darkgreen ctermfg=green + hi BT6 guifg=darkgreen ctermfg=green + hi BT7 guifg=darkgreen ctermfg=green + hi BT8 guifg=darkgreen ctermfg=green + hi BT9 guifg=darkgreen ctermfg=green + + " color for pre-formatted text + hi PT1 guifg=darkblue ctermfg=cyan + hi PT2 guifg=darkblue ctermfg=cyan + hi PT3 guifg=darkblue ctermfg=cyan + hi PT4 guifg=darkblue ctermfg=cyan + hi PT5 guifg=darkblue ctermfg=cyan + hi PT6 guifg=darkblue ctermfg=cyan + hi PT7 guifg=darkblue ctermfg=cyan + hi PT8 guifg=darkblue ctermfg=cyan + hi PT9 guifg=darkblue ctermfg=cyan + + " color for tables + hi TA1 guifg=darkviolet ctermfg=cyan + hi TA2 guifg=darkviolet ctermfg=cyan + hi TA3 guifg=darkviolet ctermfg=cyan + hi TA4 guifg=darkviolet ctermfg=cyan + hi TA5 guifg=darkviolet ctermfg=cyan + hi TA6 guifg=darkviolet ctermfg=cyan + hi TA7 guifg=darkviolet ctermfg=cyan + hi TA8 guifg=darkviolet ctermfg=cyan + hi TA9 guifg=darkviolet ctermfg=cyan + + " color for user text (wrapping) + hi UT1 guifg=darkred ctermfg=cyan + hi UT2 guifg=darkred ctermfg=cyan + hi UT3 guifg=darkred ctermfg=cyan + hi UT4 guifg=darkred ctermfg=cyan + hi UT5 guifg=darkred ctermfg=cyan + hi UT6 guifg=darkred ctermfg=cyan + hi UT7 guifg=darkred ctermfg=cyan + hi UT8 guifg=darkred ctermfg=cyan + hi UT9 guifg=darkred ctermfg=cyan + + " color for user text (non-wrapping) + hi UB1 guifg=darkgray ctermfg=cyan + hi UB2 guifg=darkgray ctermfg=cyan + hi UB3 guifg=darkgray ctermfg=cyan + hi UB4 guifg=darkgray ctermfg=cyan + hi UB5 guifg=darkgray ctermfg=cyan + hi UB6 guifg=darkgray ctermfg=cyan + hi UB7 guifg=darkgray ctermfg=cyan + hi UB8 guifg=darkgray ctermfg=cyan + hi UB9 guifg=darkgray ctermfg=cyan + + " colors for folded sections + hi Folded guifg=darkcyan guibg=bg ctermfg=cyan ctermbg=white + hi FoldColumn guifg=darkcyan guibg=bg ctermfg=cyan ctermbg=white + + " colors for experimental spelling error highlighting + " this only works for spellfix.vim with will be cease to exist soon + hi spellErr gui=underline guifg=darkred cterm=underline ctermfg=darkred + hi BadWord gui=underline guifg=darkred cterm=underline ctermfg=darkred +" Dark background {{{2 +else + hi OL1 guifg=white ctermfg=white + hi OL2 guifg=red ctermfg=red + hi OL3 guifg=lightblue ctermfg=lightblue + hi OL4 guifg=darkviolet ctermfg=magenta + hi OL5 guifg=white ctermfg=white + hi OL6 guifg=red ctermfg=red + hi OL7 guifg=lightblue ctermfg=lightblue + hi OL8 guifg=darkviolet ctermfg=magenta + hi OL9 guifg=white ctermfg=white + + " colors for tags + hi outlTags guifg=darkred ctermfg=darkred + + " color for body text + hi BT1 guifg=darkgreen ctermfg=green + hi BT2 guifg=darkgreen ctermfg=green + hi BT3 guifg=darkgreen ctermfg=green + hi BT4 guifg=darkgreen ctermfg=green + hi BT5 guifg=darkgreen ctermfg=green + hi BT6 guifg=darkgreen ctermfg=green + hi BT7 guifg=darkgreen ctermfg=green + hi BT8 guifg=darkgreen ctermfg=green + hi BT9 guifg=darkgreen ctermfg=green + + " color for pre-formatted text + hi PT1 guifg=darkblue ctermfg=cyan + hi PT2 guifg=darkblue ctermfg=cyan + hi PT3 guifg=darkblue ctermfg=cyan + hi PT4 guifg=darkblue ctermfg=cyan + hi PT5 guifg=darkblue ctermfg=cyan + hi PT6 guifg=darkblue ctermfg=cyan + hi PT7 guifg=darkblue ctermfg=cyan + hi PT8 guifg=darkblue ctermfg=cyan + hi PT9 guifg=darkblue ctermfg=cyan + + " color for tables + hi TA1 guifg=darkviolet ctermfg=cyan + hi TA2 guifg=darkviolet ctermfg=cyan + hi TA3 guifg=darkviolet ctermfg=cyan + hi TA4 guifg=darkviolet ctermfg=cyan + hi TA5 guifg=darkviolet ctermfg=cyan + hi TA6 guifg=darkviolet ctermfg=cyan + hi TA7 guifg=darkviolet ctermfg=cyan + hi TA8 guifg=darkviolet ctermfg=cyan + hi TA9 guifg=darkviolet ctermfg=cyan + + " color for user text (wrapping) + hi UT1 guifg=darkred ctermfg=cyan + hi UT2 guifg=darkred ctermfg=cyan + hi UT3 guifg=darkred ctermfg=cyan + hi UT4 guifg=darkred ctermfg=cyan + hi UT5 guifg=darkred ctermfg=cyan + hi UT6 guifg=darkred ctermfg=cyan + hi UT7 guifg=darkred ctermfg=cyan + hi UT8 guifg=darkred ctermfg=cyan + hi UT9 guifg=darkred ctermfg=cyan + + " color for user text (non-wrapping) + hi UB1 guifg=darkgray ctermfg=cyan + hi UB2 guifg=darkgray ctermfg=cyan + hi UB3 guifg=darkgray ctermfg=cyan + hi UB4 guifg=darkgray ctermfg=cyan + hi UB5 guifg=darkgray ctermfg=cyan + hi UB6 guifg=darkgray ctermfg=cyan + hi UB7 guifg=darkgray ctermfg=cyan + hi UB8 guifg=darkgray ctermfg=cyan + hi UB9 guifg=darkgray ctermfg=cyan + + " colors for folded sections + hi Folded guifg=darkcyan guibg=bg ctermfg=cyan ctermbg=black + hi FoldColumn guifg=darkcyan guibg=bg ctermfg=cyan ctermbg=black + + " colors for experimental spelling error highlighting + " this only works for spellfix.vim with will be cease to exist soon + hi spellErr gui=underline guifg=yellow cterm=underline ctermfg=yellow + hi BadWord gui=underline guifg=yellow cterm=underline ctermfg=yellow +endif + +" Syntax {{{1 +syn clear +syn sync fromstart + +syn match outlTags '_tag_\w*' contained + +" Noel's style of body text {{{2 +syntax region BT1 start=+^ \S+ skip=+^ \S+ end=+^\S+me=e-1 end=+^\(\t\)\{1}\S+me=e-2 contains=spellErr,SpellErrors,BadWord contained +syntax region BT2 start=+^\(\t\)\{1} \S+ skip=+^\(\t\)\{1} \S+ end=+^\(\t\)*\S+me=s-1 contains=spellErr,SpellErrors,BadWord contained +syntax region BT3 start=+^\(\t\)\{2} \S+ skip=+^\(\t\)\{2} \S+ end=+^\(\t\)*\S+me=s-1 contains=spellErr,SpellErrors,BadWord contained +syntax region BT4 start=+^\(\t\)\{3} \S+ skip=+^\(\t\)\{3} \S+ end=+^\(\t\)*\S+me=s-1 contains=spellErr,SpellErrors,BadWord contained +syntax region BT5 start=+^\(\t\)\{4} \S+ skip=+^\(\t\)\{4} \S+ end=+^\(\t\)*\S+me=s-1 contains=spellErr,SpellErrors,BadWord contained +syntax region BT6 start=+^\(\t\)\{5} \S+ skip=+^\(\t\)\{5} \S+ end=+^\(\t\)*\S+me=s-1 contains=spellErr,SpellErrors,BadWord contained +syntax region BT7 start=+^\(\t\)\{6} \S+ skip=+^\(\t\)\{6} \S+ end=+^\(\t\)*\S+me=s-1 contains=spellErr,SpellErrors,BadWord contained +syntax region BT8 start=+^\(\t\)\{7} \S+ skip=+^\(\t\)\{7} \S+ end=+^\(\t\)*\S+me=s-1 contains=spellErr,SpellErrors,BadWord contained +syntax region BT9 start=+^\(\t\)\{8} \S+ skip=+^\(\t\)\{8} \S+ end=+^\(\t\)*\S+me=s-1 contains=spellErr,SpellErrors,BadWord contained + +"comment-style bodytext as per Steve Litt {{{2 +syntax region BT1 start=+^:+ skip=+^:+ end=+^\S+me=e-1 end=+^\(\t\)\{1}\S+me=e-2 contains=spellErr,SpellErrors,BadWord contained +syntax region BT2 start=+^\(\t\)\{1}:+ skip=+^\(\t\)\{1}:+ end=+^\(\t\)*\S+me=s-1 contains=spellErr,SpellErrors,BadWord contained +syntax region BT3 start=+^\(\t\)\{2}:+ skip=+^\(\t\)\{2}:+ end=+^\(\t\)*\S+me=s-1 contains=spellErr,SpellErrors,BadWord contained +syntax region BT4 start=+^\(\t\)\{3}:+ skip=+^\(\t\)\{3}:+ end=+^\(\t\)*\S+me=s-1 contains=spellErr,SpellErrors,BadWord contained +syntax region BT5 start=+^\(\t\)\{4}:+ skip=+^\(\t\)\{4}:+ end=+^\(\t\)*\S+me=s-1 contains=spellErr,SpellErrors,BadWord contained +syntax region BT6 start=+^\(\t\)\{5}:+ skip=+^\(\t\)\{5}:+ end=+^\(\t\)*\S+me=s-1 contains=spellErr,SpellErrors,BadWord contained +syntax region BT7 start=+^\(\t\)\{6}:+ skip=+^\(\t\)\{6}:+ end=+^\(\t\)*\S+me=s-1 contains=spellErr,SpellErrors,BadWord contained +syntax region BT8 start=+^\(\t\)\{7}:+ skip=+^\(\t\)\{7}:+ end=+^\(\t\)*\S+me=s-1 contains=spellErr,SpellErrors,BadWord contained +syntax region BT9 start=+^\(\t\)\{8}:+ skip=+^\(\t\)\{8}:+ end=+^\(\t\)*\S+me=s-1 contains=spellErr,SpellErrors,BadWord contained + +"Preformatted body text {{{2 +syntax region PT1 start=+^;+ skip=+^;+ end=+^\S+me=e-1 end=+^\(\t\)\{1}\S+me=e-2 contains=spellErr,SpellErrors,BadWord contained +syntax region PT2 start=+^\(\t\)\{1};+ skip=+^\(\t\)\{1};+ end=+^\(\t\)*\S+me=s-1 contains=spellErr,SpellErrors,BadWord contained +syntax region PT3 start=+^\(\t\)\{2};+ skip=+^\(\t\)\{2};+ end=+^\(\t\)*\S+me=s-1 contains=spellErr,SpellErrors,BadWord contained +syntax region PT4 start=+^\(\t\)\{3};+ skip=+^\(\t\)\{3};+ end=+^\(\t\)*\S+me=s-1 contains=spellErr,SpellErrors,BadWord contained +syntax region PT5 start=+^\(\t\)\{4};+ skip=+^\(\t\)\{4};+ end=+^\(\t\)*\S+me=s-1 contains=spellErr,SpellErrors,BadWord contained +syntax region PT6 start=+^\(\t\)\{5};+ skip=+^\(\t\)\{5};+ end=+^\(\t\)*\S+me=s-1 contains=spellErr,SpellErrors,BadWord contained +syntax region PT7 start=+^\(\t\)\{6};+ skip=+^\(\t\)\{6};+ end=+^\(\t\)*\S+me=s-1 contains=spellErr,SpellErrors,BadWord contained +syntax region PT8 start=+^\(\t\)\{7};+ skip=+^\(\t\)\{7};+ end=+^\(\t\)*\S+me=s-1 contains=spellErr,SpellErrors,BadWord contained +syntax region PT9 start=+^\(\t\)\{8};+ skip=+^\(\t\)\{8};+ end=+^\(\t\)*\S+me=s-1 contains=spellErr,SpellErrors,BadWord contained + +"Preformatted tables {{{2 +syntax region TA1 start=+^|+ skip=+^|+ end=+^\S+me=e-1 end=+^\(\t\)\{1}\S+me=e-2 contains=spellErr,SpellErrors,BadWord contained +syntax region TA2 start=+^\(\t\)\{1}|+ skip=+^\(\t\)\{1}|+ end=+^\(\t\)*\S+me=s-1 contains=spellErr,SpellErrors,BadWord contained +syntax region TA3 start=+^\(\t\)\{2}|+ skip=+^\(\t\)\{2}|+ end=+^\(\t\)*\S+me=s-1 contains=spellErr,SpellErrors,BadWord contained +syntax region TA4 start=+^\(\t\)\{3}|+ skip=+^\(\t\)\{3}|+ end=+^\(\t\)*\S+me=s-1 contains=spellErr,SpellErrors,BadWord contained +syntax region TA5 start=+^\(\t\)\{4}|+ skip=+^\(\t\)\{4}|+ end=+^\(\t\)*\S+me=s-1 contains=spellErr,SpellErrors,BadWord contained +syntax region TA6 start=+^\(\t\)\{5}|+ skip=+^\(\t\)\{5}|+ end=+^\(\t\)*\S+me=s-1 contains=spellErr,SpellErrors,BadWord contained +syntax region TA7 start=+^\(\t\)\{6}|+ skip=+^\(\t\)\{6}|+ end=+^\(\t\)*\S+me=s-1 contains=spellErr,SpellErrors,BadWord contained +syntax region TA8 start=+^\(\t\)\{7}|+ skip=+^\(\t\)\{7}|+ end=+^\(\t\)*\S+me=s-1 contains=spellErr,SpellErrors,BadWord contained +syntax region TA9 start=+^\(\t\)\{8}|+ skip=+^\(\t\)\{8}|+ end=+^\(\t\)*\S+me=s-1 contains=spellErr,SpellErrors,BadWord contained + +"wrapping user text {{{2 +syntax region UT1 start=+^>+ skip=+^>+ end=+^\S+me=e-1 end=+^\(\t\)\{1}\S+me=e-2 contains=spellErr,SpellErrors,BadWord contained +syntax region UT2 start=+^\(\t\)\{1}>+ skip=+^\(\t\)\{1}>+ end=+^\(\t\)*\S+me=s-1 contains=spellErr,SpellErrors,BadWord contained +syntax region UT3 start=+^\(\t\)\{2}>+ skip=+^\(\t\)\{2}>+ end=+^\(\t\)*\S+me=s-1 contains=spellErr,SpellErrors,BadWord contained +syntax region UT4 start=+^\(\t\)\{3}>+ skip=+^\(\t\)\{3}>+ end=+^\(\t\)*\S+me=s-1 contains=spellErr,SpellErrors,BadWord contained +syntax region UT5 start=+^\(\t\)\{4}>+ skip=+^\(\t\)\{4}>+ end=+^\(\t\)*\S+me=s-1 contains=spellErr,SpellErrors,BadWord contained +syntax region UT6 start=+^\(\t\)\{5}>+ skip=+^\(\t\)\{5}>+ end=+^\(\t\)*\S+me=s-1 contains=spellErr,SpellErrors,BadWord contained +syntax region UT7 start=+^\(\t\)\{6}>+ skip=+^\(\t\)\{6}>+ end=+^\(\t\)*\S+me=s-1 contains=spellErr,SpellErrors,BadWord contained +syntax region UT8 start=+^\(\t\)\{7}>+ skip=+^\(\t\)\{7}>+ end=+^\(\t\)*\S+me=s-1 contains=spellErr,SpellErrors,BadWord contained +syntax region UT9 start=+^\(\t\)\{8}>+ skip=+^\(\t\)\{8}>+ end=+^\(\t\)*\S+me=s-1 contains=spellErr,SpellErrors,BadWord contained + +"non-wrapping user text {{{2 +syntax region UB1 start=+^<+ skip=+^<+ end=+^\S+me=e-1 end=+^\(\t\)\{1}\S+me=e-2 contains=spellErr,SpellErrors,BadWord contained +syntax region UB2 start=+^\(\t\)\{1}<+ skip=+^\(\t\)\{1}<+ end=+^\(\t\)*\S+me=s-1 contains=spellErr,SpellErrors,BadWord contained +syntax region UB3 start=+^\(\t\)\{2}<+ skip=+^\(\t\)\{2}<+ end=+^\(\t\)*\S+me=s-1 contains=spellErr,SpellErrors,BadWord contained +syntax region UB4 start=+^\(\t\)\{3}<+ skip=+^\(\t\)\{3}<+ end=+^\(\t\)*\S+me=s-1 contains=spellErr,SpellErrors,BadWord contained +syntax region UB5 start=+^\(\t\)\{4}<+ skip=+^\(\t\)\{4}<+ end=+^\(\t\)*\S+me=s-1 contains=spellErr,SpellErrors,BadWord contained +syntax region UB6 start=+^\(\t\)\{5}<+ skip=+^\(\t\)\{5}<+ end=+^\(\t\)*\S+me=s-1 contains=spellErr,SpellErrors,BadWord contained +syntax region UB7 start=+^\(\t\)\{6}<+ skip=+^\(\t\)\{6}<+ end=+^\(\t\)*\S+me=s-1 contains=spellErr,SpellErrors,BadWord contained +syntax region UB8 start=+^\(\t\)\{7}<+ skip=+^\(\t\)\{7}<+ end=+^\(\t\)*\S+me=s-1 contains=spellErr,SpellErrors,BadWord contained +syntax region UB9 start=+^\(\t\)\{8}<+ skip=+^\(\t\)\{8}<+ end=+^\(\t\)*\S+me=s-1 contains=spellErr,SpellErrors,BadWord contained + +"comment-style bodytext formatting as per Steve Litt +syntax match Comment "^\s*:.*$" +setlocal fo-=t fo+=crqno +setlocal com=sO:\:\ -,mO:\:\ \ ,eO:\:\:,:\:,sO:\>\ -,mO:\>\ \ ,eO:\>\>,:\> + +" Headings {{{2 +syntax region OL1 start=+^[^:\t]+ end=+^[^:\t]+me=e-1 contains=outlTags,BT1,BT2,PT1,PT2,TA1,TA2,UT1,UT2,UB1,UB2,spellErr,SpellErrors,BadWord,OL2 keepend +syntax region OL2 start=+^\t[^:\t]+ end=+^\t[^:\t]+me=e-2 contains=outlTags,BT2,BT3,PT2,PT3,TA2,TA3,UT2,UT3,UB2,UB3,spellErr,SpellErrors,BadWord,OL3 keepend +syntax region OL3 start=+^\(\t\)\{2}[^:\t]+ end=+^\(\t\)\{2}[^:\t]+me=e-3 contains=outlTags,BT3,BT4,PT3,PT4,TA3,TA4,UT3,UT4,UB3,UB4,spellErr,SpellErrors,BadWord,OL4 keepend +syntax region OL4 start=+^\(\t\)\{3}[^:\t]+ end=+^\(\t\)\{3}[^:\t]+me=e-4 contains=outlTags,BT4,BT5,PT4,PT5,TA4,TA5,UT4,UT5,UB4,UB5,spellErr,SpellErrors,BadWord,OL5 keepend +syntax region OL5 start=+^\(\t\)\{4}[^:\t]+ end=+^\(\t\)\{4}[^:\t]+me=e-5 contains=outlTags,BT5,BT6,PT5,PT6,TA5,TA6,UT5,UT6,UB5,UB6,spellErr,SpellErrors,BadWord,OL6 keepend +syntax region OL6 start=+^\(\t\)\{5}[^:\t]+ end=+^\(\t\)\{5}[^:\t]+me=e-6 contains=outlTags,BT6,BT7,PT6,PT7,TA6,TA7,UT6,UT7,UB6,UB7,spellErr,SpellErrors,BadWord,OL7 keepend +syntax region OL7 start=+^\(\t\)\{6}[^:\t]+ end=+^\(\t\)\{6}[^:\t]+me=e-7 contains=outlTags,BT7,BT8,PT7,PT8,TA7,TA8,UT7,UT8,UB7,UB8,spellErr,SpellErrors,BadWord,OL8 keepend +syntax region OL8 start=+^\(\t\)\{7}[^:\t]+ end=+^\(\t\)\{7}[^:\t]+me=e-8 contains=outlTags,BT8,BT9,PT8,PT9,TA8,TA9,UT8,UT9,UB8,UB9,spellErr,SpellErrors,BadWord,OL9 keepend +syntax region OL9 start=+^\(\t\)\{8}[^:\t]+ end=+^\(\t\)\{8}[^:\t]+me=e-9 contains=outlTags,BT9,PT9,TA9,UT9,UB9,spellErr,SpellErrors,BadWord keepend + +" Auto-commands {{{1 +if !exists("autocommand_vo_loaded") + let autocommand_vo_loaded = 1 + au BufNewFile,BufRead *.otl setf outliner +" au CursorHold *.otl syn sync fromstart + set updatetime=500 +endif + +" The End +" vim600: set foldmethod=marker foldlevel=0: -- cgit v1.2.3-24-g4f1b