vimoutliner-0.3.4/0000755000175000017500000000000010255542735012557 5ustar noelnoelvimoutliner-0.3.4/vimoutlinerrc0000644000175000017500000000277610255542735015420 0ustar noelnoel"Extra mappings ***************************************************** "This mapping is fold-level and fold-state dependent "map dd p "map dd P "Common Plugins " This variable holds name of all VO modules you want to load. Do NOT use ru " directly in this file, because you will get into many strange surprises. If " you do not want to load any VO modules leave it blank (default). This " variable can be freely modified in ~/.vimoutlinerrc. "let g:vo_modules2load = "" let g:vo_modules_load = "checkbox:hoist" "User Preferences *************************************************** "let maplocalleader = ",," " this is prepended to VO key mappings "setlocal ignorecase " searches ignore case "setlocal smartcase " searches use smart case "setlocal wrapmargin=5 "setlocal tw=78 "setlocal tabstop=4 " tabstop and shiftwidth must match "setlocal shiftwidth=4 " values from 2 to 8 work well "setlocal background=dark " for dark backgrounds setlocal nowrap "Hoisting *********************************************************** "Uncomment and set to 1 to debug hoisting let g:hoistParanoia=0 "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 " Or create your own color scheme. You can find sample files in Vim's " colors directory. There may even be a colors directory in your own " $HOME/.vim directory. vimoutliner-0.3.4/colors/0000755000175000017500000000000010255542735014060 5ustar noelnoelvimoutliner-0.3.4/colors/vo_light.vim0000644000175000017500000000540610255542735016415 0ustar noelnoellet 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 vimoutliner-0.3.4/colors/vo_dark.vim0000644000175000017500000000530510255542735016225 0ustar noelnoellet 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 vimoutliner-0.3.4/VERSION0000644000175000017500000000076110255542735013633 0ustar noelnoelVERSION *vo-version* Version 0.3.4 Released Additions/changes: added ,,cp as an alias to ,,c% 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 vimoutliner-0.3.4/install.sh0000755000175000017500000001002110255542735014556 0ustar noelnoel#!/bin/bash homedir=$HOME #homedir=./test vimdir=$homedir/.vim vodir=$homedir/.vimoutliner OS=`uname` #BACKUP FILE NAMES bext=`date +_%T_%F.old` if [ $OS == Linux ] ; then backupargs="-bS $bext" elif [ $OS == FreeBSD ] ; then backupargs="-bB $bext" else backupargs=""; fi #SOME FUNCTIONS function sure? { read -p" (y/N)? " echo test $REPLY = "y" || test $REPLY = "Y" } function make_dir { test -d $1 || { echo " creating: $1" mkdir $1 created=1 } } function copyfile { echo " installing: $2/$1" install $backupargs $1 $2/$1 } function copydir { files=`ls $1` for i in $files; do echo " installing: $2/$i" install $backupargs $1/$i $2 done } #START THE INSTALL cat <> $homedir/.vimrc } egrep -lq "syntax[[:space:]]+on" $homedir/.vimrc || \ { modified=1 echo "syntax on" >> $homedir/.vimrc } if [ $modified -eq 0 ] ; then echo " not modified"; else echo " modifying $homedir/.vimrc" fi #TWEAK .vim/filetype.vim modified=0 echo checking/creating/modifying $homedir/.vim/filetype.vim test -f $homedir/.vim/filetype.vim || \ { echo " creating $homedir/.vim/filetype.vim" touch $homedir/.vim/filetype.vim } egrep -lq "runtime\! ftdetect/\*.vim" $homedir/.vim/filetype.vim || \ { echo " modifying $homedir/.vim/filetype.vim" modified=1 echo "runtime! ftdetect/*.vim" >> $homedir/.vim/filetype.vim } if [ $modified -eq 0 ] ; then echo " not modified"; fi #COPY FILES AND BACKUP ANY EXISTING FILES echo "installing files and making backups if necessary (*$bext)" copyfile syntax/vo_base.vim $vimdir copyfile ftplugin/vo_base.vim $vimdir copyfile ftdetect/vo_base.vim $vimdir copyfile doc/vo_readme.txt $vimdir copyfile colors/vo_dark.vim $vimdir copyfile colors/vo_light.vim $vimdir copyfile scripts/vo_maketags.pl $vodir cp -f vimoutlinerrc .vimoutlinerrc copyfile .vimoutlinerrc $homedir #INCORPORATE DOCS echo installing documentation vim -c "helptags $HOME/.vim/doc" -c q #INSTALL THE ADD-ONS cat <> 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: vimoutliner-0.3.4/add-ons/0000755000175000017500000000000010255542735014104 5ustar noelnoelvimoutliner-0.3.4/add-ons/plugins/0000755000175000017500000000000010255542735015565 5ustar noelnoelvimoutliner-0.3.4/add-ons/plugins/vo_hoist.vim0000755000175000017500000002113110255542735020135 0ustar noelnoel"###################################################################### "# VimOutliner Hoisting "# Copyright (C) 2003 by Noel Henson noel@noels-lab.com "# The file is currently an experimental part of Vim Outliner. "# "# 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. "###################################################################### " Detailed Revision Log {{{1 "vo_hoist.vim "Internal RCS "$Revision: 1.10 $" "$Date: 2005/06/12 15:53:54 $ "$Log: vo_hoist.vim,v $ "Revision 1.10 2005/06/12 15:53:54 noel "Moved key mappings so they work with Matej' new way to load plugins. " "Revision 1.9 2003/11/12 17:26:09 noel "Added a command to place the cursor on the first line of "a hoisted outline. " "Revision 1.8 2003/11/12 17:10:51 noel "Fixed a bug that occurs on a level 1 heading with no children. " "Revision 1.7 2003/10/23 22:14:14 noel "Minor changes to DeHoist() to compensate for current foldlevel settings. " "Revision 1.6 2003/08/17 15:35:24 noel "Put the new mappings in the correct place this time. "Added a : and to the ZZ command. " "Revision 1.5 2003/08/17 14:47:42 noel "Added ZZ, qa, and x to the list of commands that de-hoist the current "outline. " "Revision 1.4 2003/08/17 00:07:31 noel "Added "silent" to commands generating tedious messages. " "Revision 1.3 2003/08/16 20:08:06 noel "Removed a need to exclude fold level 1 headings. " "Revision 1.2 2003/08/16 19:02:44 noel "First fully functional version. May need some tweaks but it works and is "quite easy to use. " "Revision 1.1 2003/08/14 21:05:05 noel "First publicly available, experiment verison " "}}}2 " Load the plugin {{{1 " mappings {{{1 map h :call Hoist(line(".")) map H :call DeHoistThis(line(".")) "}}}1 if exists("g:did_vo_hoist") finish endif if !exists("g:hoistParanoia") let g:hoistParanoia=0 endif let g:did_vo_hoist = 1 " Functions {{{1 " RemoveTabsLine(line,tabs) {{{2 " remove specified number of tabs from the begining of line function! RemoveTabsLine(line,tabs) return substitute(getline(a:line),"^\\(\\t\\)\\{".a:tabs."}", "", "") endfunction "}}}2 " MakeTempFilename(line) {{{2 " return a string to use as the temporary filename for the hoisted area function! MakeTempFilename(line) return "vo_hoist.".a:line.strftime(".%Y%m%d%H%M%S").".otl" endfunction "}}}2 " AddHoistFilename(line) {{{2 " Add a temporary filename to a parent line to indicate hoisting function! AddHoistFilename(line) let l:newparent = getline(a:line)." __hoist:".MakeTempFilename(a:line) call setline(a:line,l:newparent) endfunction "}}}2 "}}}2 " DeleteHoistFilename(line) {{{2 " Delete a temporary filename from a parent line function! DeleteHoistFilename(line) call setline(a:line,substitute(getline(a:line)," __hoist:.*","","")) endfunction "}}}2 " ExtractHoistFilename(line) {{{2 " Extract a filename from a hoisted parent function! ExtractHoistFilename(line) return substitute(getline(a:line),".* __hoist:","","") endfunction "}}}2 " IsParent(line) {{{2 " Return 1 if this line is a parent function! IsParent(line) return (Ind(a:line)+1) == Ind(a:line+1) endfunction "}}}2 " IsHoistedParent(line) {{{2 " Return 1 if this line is a parent with hoisted children function! IsHoistParent(line) return match(getline(a:line)," __hoist:","") != -1 endfunction "}}}2 " FindParent(line) {{{2 " Return line if parent, parent line if not function! FindParent(line) if IsParent(a:line) return a:line else let l:parentindent = Ind(a:line)-1 let l:searchline = a:line while (Ind(l:searchline) != l:parentindent) && (l:searchline > 0) let l:searchline = l:searchline-1 endwhile return l:searchline endif endfunction "}}}2 " FindLastChild(line) {{{2 " 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 "}}}2 "}}}2 " Hoist(line) {{{2 " Write the offspring of a parent to a new file, open it and remove the " leading tabs. function! Hoist(line) let l:parent = FindParent(a:line) if l:parent == 0 return endif call cursor(l:parent,1) let l:firstline = l:parent+1 let l:childindent = Ind(l:firstline) let l:lastline = FindLastChild(l:parent) let l:filename = MakeTempFilename(l:parent) echo l:firstline.",".l:lastline."w! ".l:filename let l:folded = foldclosed(l:parent) call cursor(l:parent,1) normal zo exe l:firstline.",".l:lastline."w! ".l:filename call AddHoistFilename(l:parent) silent write " log what we did incase we need to recover manually let l:doit = l:parent."write! >> .vo_hoist.".bufname(bufnr("%")).".log" exe l:doit let l:parentbuffer = bufnr("%") "WARNING: switching files let l:doit = "silent e +%s/^\\\\(\\\t\\\\)\\\\{" let l:doit = l:doit.l:childindent."}// ".l:filename." | " let l:doit = l:doit."let b:myParentBuffer = ".l:parentbuffer." | " let l:doit = l:doit."let b:myParentLine = ".l:parent." | " let l:doit = l:doit."call cursor(1,1)|" let l:doit = l:doit."let b:hoisted = 1" exe l:doit silent write endfunction "}}}2 " DeleteChildren(line) {{{2 " Delete the existing offspring of a parent function! DeleteChildren(line) let l:parent = FindParent(a:line) let l:firstline = l:parent+1 let l:lastline = FindLastChild(l:parent) exe l:firstline.",".l:lastline."d" endfunction "}}}2 " MakeTabString(n) {{{2 " Return a string of n tabs function! MakeTabString(n) let l:string = "" let l:i = 0 while l:i < a:n let l:string = l:string."\t" let l:i = l:i +1 endwhile return l:string endfunction "}}}2 " AddChildren(line) {{{2 " Add left-justified children to parent. The filename is extracted from the " end of the parent line. The parent is assumed to have no children at this " point. function! AddChildren(line) let l:filename = ExtractHoistFilename(a:line) if filereadable(l:filename) == 1 if a:line == line("$") exe "read ".l:filename if a:line != line("$") exe a:line+1.",$"." s/^/".MakeTabString(Ind(a:line)+1)."/" endif else exe a:line+1."ma v" call cursor(a:line,1) exe "read ".l:filename if a:line+1 != line("'v") exe a:line+1.",'v-1"." s/^/".MakeTabString(Ind(a:line)+1)."/" endif endif endif endfunction "}}}2 " DeleteHoistFile(line) {{{2 " Delete a temporary filename from a parent line function! DeleteHoistFile(line) if g:hoistParanoia return endif let l:filename = ExtractHoistFilename(a:line) call delete(l:filename) let l:filename = l:filename."~" call delete(l:filename) endfunction "}}}2 " DeHoistThis(line) {{{2 " Remove the old children, add the new children and remove the __hoist data " leading tabs from this file. function! DeHoistThis(line) let l:parent = FindParent(a:line) let l:folded = foldclosed(l:parent) call cursor(l:parent,1) if l:folded == l:parent normal zo endif call DeleteChildren(l:parent) call AddChildren(l:parent) call DeleteHoistFile(l:parent) call DeleteHoistFilename(l:parent) if l:folded == l:parent normal zc endif endfunction "}}}2 " DeHoist() {{{2 " Remove the old children, add the new children and remove the __hoist data " leading tabs from the calling file. function! DeHoist() silent write if bufexists(b:myParentBuffer) == 0 return endif let l:myParentBuffer = b:myParentBuffer let l:myParentLine = b:myParentLine bdelete " Warning switching files exe "buffer ".l:myParentBuffer call cursor(l:myParentLine,1) let l:parent = FindParent(l:myParentLine) let l:folded = foldclosed(l:parent) call cursor(l:parent,1) " if l:folded == l:parent " normal zo " endif normal zv silent call DeleteChildren(l:parent) silent call AddChildren(l:parent) silent call DeleteHoistFile(l:parent) silent call DeleteHoistFilename(l:parent) if l:folded == l:parent call cursor(l:parent,1) normal zc endif silent write endfunction "}}}2 "}}}1 " Autocommands {{{1 au BufReadPost vo_hoist.*.otl cmap wq call DeHoist() au BufReadPost vo_hoist.*.otl cmap qa call DeHoist() au BufReadPost vo_hoist.*.otl cmap q call DeHoist() au BufReadPost vo_hoist.*.otl cmap x call DeHoist() au BufReadPost vo_hoist.*.otl nmap ZZ :call DeHoist() "}}}1 " vim600: set foldlevel=0 foldmethod=marker: vimoutliner-0.3.4/add-ons/plugins/vo_checkbox.vim0000755000175000017500000002212310255542735020577 0ustar noelnoel"###################################################################### "# VimOutliner Checkboxes "# Copyright (C) 2003 by Noel Henson noel@noels-lab.com "# The file is currently an experimental part of Vim Outliner. "# "# 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. "###################################################################### " Detailed Revision Log {{{1 "vo_checkbox.vim "Internal RCS "$Revision: 1.22 $" "$Date: 2005/06/11 16:34:25 $ "$Log: vo_checkbox.vim,v $ "Revision 1.22 2005/06/11 16:34:25 noel "Modified ,,cz to recompute completion on an entire tree. " "Revision 1.21 2005/06/11 15:54:05 noel "Modified the behavior of ,,cp to always include the % sign. Even on childless "parents. " "Revision 1.20 2005/06/11 14:01:42 noel "Modified computation of percentage completion to work on a heading "that has not children. Now if a childless heading is marked done, "the percentage shown will be 100% instead of 0%. " "Revision 1.18 2005/06/07 15:08:59 noel "Fixed a bug that added checkboxes to body text, preformatted body text, "tables, user-defined text and user-defined preformatted text lines. "Fixed a bug where ,,cb would modify terms like 'test%' or ',,c%'. Now "it only modifies this term: ' [0-9]*%'. " "Revision 1.17 2005/06/07 13:53:22 noel "Added ,,cp. It is the same as ,,c% " "Revision 1.16 2004/05/27 22:22:48 noel "Made ,,cd smart so it would try to delete non-existent checkboxes. "Fixed a recursion bug in NewHMD to branches with a single child would "be computed properly. " "Revision 1.15 2004/05/27 18:11:53 noel "Added smart (only the entire tree in which the child exists), automatic "completion calculations to the ,,cx command. "Added smart (only for parents, not children) '%' sign insertion for ",,c%. " "Revision 1.14 2004/05/17 15:53:38 noel "Modified SwitchBox() to be more selective. " "Revision 1.13 2004/05/17 15:43:23 noel "Fixed a broken key mapping: ,,c%. " "Revision 1.12 2004/02/23 12:19:27 noel "Fixed Up-to-date problem. "Fixed 'Safely script names'. " "Revision 1.11 2003/09/05 16:37:55 cepl "Added ,cp binding for the new function InsertCheckBoxPerCent, "which adds not only the checkbox but also percentage sign. " "Revision 1.10 2003/08/23 16:42:15 noel "Modified completion percentages to be recursive. "This: "[_] 0% Project " [_] 33% Task " [_] Subtask " [X] Subtask " [X] Subtask " [_] 0% Task " [_] Subtask " [_] 50% Subtask " [X] Subsubtask " [_] Subsubtask " [X] Subsubtask " [_] Subsubtask " "Becomes this: "[_] 29% Project " [_] 33% Task " [_] Subtask " [X] Subtask " [X] Subtask " [_] 25% Task " [_] Subtask " [_] 50% Subtask " [X] Subsubtask " [_] Subsubtask " [X] Subsubtask " [_] Subsubtask " "Revision 1.9 2003/08/16 13:49:53 noel "added ! to functions. " "Revision 1.8 2003/08/11 19:16:28 noel "Fixed a bug in which any line that contained the letter x was counted as "completed. " "Revision 1.7 2003/08/03 23:56:46 noel " "Replaced HowManyDone() with a new routine. The new routine is recursive, "ignores headings that don't have checkboxes and does not care what the "current folding states of the parent or children are. The heading at the "top of the tree does not even need to have a checkbox. This will work: " "Projects " [_] Software " [_] Input " [_] Processing " [_] Math " [_] Database " [_] Networking " [_] Output " [_] Hardware " [_] Keyboard " [_] Harddisk " [_] Processor " [_] Printer " "One only needs to ,,cx on Projects to update everything (everything shown). "As before, including a % on a parent heading with childred, will be replaced "with a percentage of completion. Nice work Matej! " "Revision 1.6 2003/07/14 00:36:57 noel "Changed [x] to [X] to make it look more full. If the consensus is "[x], I'll gladly put it back. " "Revision 1.5 2003/07/10 16:29:50 cepl "Calculation of the subtree completion added. The very first alpha "draft. " "Revision 1.3 2003/07/09 13:10:57 matej "The first draft of the work done in subtree. " "Revision 1.2 2003/07/08 17:58:56 matej "Pøidáno ,cx a ,ci zmìnìn na ,cb. " "Revision 1.1 2003/07/08 17:39:12 matej "Initial revision " "Revision 1.3 2003/07/07 14:17:04 noel "Fixed the folding of the new headers. " "Revision 1.2 2003/07/07 14:14:02 noel "Added appropriate headers. "}}}1 " InsertCheckBox() {{{1 " Insert a checkbox at the beginning of a header without disturbing the " current folding. function! InsertCheckBox() let @x = "[_] " normal! ^"xP endfunction "}}}1 " Safely InsertCheckBox() {{{1 " Insert a checkbox at the beginning of a header without disturbing the " current folding only if there is no checkbox already. function! SafelyInsertCheckBox() if match(getline("."),"^\t\t*\[<>:;|\]") != -1 return endif if match(getline("."),"[\[X_\]]") == -1 let @x = "[_] " normal! ^"xP endif endfunction "}}}1 " Safely InsertCheckBoxPercent() {{{1 " Insert a checkbox and % sign at the beginning of a header without disturbing " the current folding only if there is no checkbox already. function! SafelyInsertCheckBoxPercent() if match(getline("."),"^\t\t*\[<>:;|\]") != -1 return endif if match(getline("."), "[\[X_\]]") == -1 if Ind(line(".")+1) > Ind(line(".")) let @x = "[_] % " else let @x = "[_] " endif normal! ^"xP endif endfunction "}}}1 " Safely InsertCheckBoxPercentAlways() {{{1 " Insert a checkbox and % sign at the beginning of a header without disturbing " the current folding only if there is no checkbox already. Include the " checkbox even on childless headings. function! SafelyInsertCheckBoxPercentAlways() if match(getline("."),"^\t\t*\[<>:;|\]") != -1 return endif if match(getline("."), "[\[X_\]]") == -1 let @x = "[_] % " normal! ^"xP endif endfunction "}}}1 " SwitchBox() {{{1 " Switch the state of the checkbox on the current line. function! SwitchBox() let questa = strridx(getline("."),"[_]") let questb = strridx(getline("."),"[X]") if (questa != -1) || (questb != -1) if (questa != -1) substitute/\[_\]/\[X\]/ else substitute/\[X\]/\[_\]/ endif endif endfunction "}}}1 " DeleteCheckbox() {{{1 " Delete a checkbox if one exists function! DeleteCheckbox() let questa = strridx(getline("."),"[_]") let questb = strridx(getline("."),"[X]") if (questa != -1) || (questb != -1) if (questa != -1) substitute/\(^\s*\)\[_\] \(.*\)/\1\2/ else substitute/\(^\s*\)\[X\] \(.*\)/\1\2/ endif endif endfunction "}}}1 " Ind(line) {{{1 " Return the index of the line. " Remove it when using the new version of VO function! Ind(line) return indent(a:line) / &tabstop endf " FindRootParent(line) {{{1 " returns the line number of the root parent for any child function! FindRootParent(line) if Ind(a:line) == 0 return (a:line) endif let l:i = a:line while l:i > 1 && Ind(l:i) > 0 let l:i = l:i - 1 endwhile return l:i endf " NewHMD(line) {{{1 " (How Many Done) " Calculates proportion of already done work in the subtree function! NewHMD(line) let l:done = 0 let l:count = 0 let l:i = 1 while Ind(a:line) < Ind(a:line+l:i) if (Ind(a:line)+1) == (Ind(a:line+l:i)) let l:childdoneness = NewHMD(a:line+l:i) if l:childdoneness >= 0 let l:done = l:done + l:childdoneness let l:count = l:count+1 endif endif let l:i = l:i+1 endwhile let l:proportion=0 if l:count>0 let l:proportion = ((l:done * 100)/l:count)/100 else if match(getline(a:line),"\\[X\\]") != -1 let l:proportion = 100 else let l:proportion = 0 endif endif call setline(a:line,substitute(getline(a:line)," [0-9]*%"," ".l:proportion."%","")) if l:proportion == 100 call setline(a:line,substitute(getline(a:line),"\\[.\\]","[X]","")) return 100 elseif l:proportion == 0 && l:count == 0 if match(getline(a:line),"\\[X\\]") != -1 return 100 elseif match(getline(a:line),"\\[_\\]") != -1 return 0 else return -1 endif else call setline(a:line,substitute(getline(a:line),"\\[.\\]","[_]","")) return l:proportion endif endf " mappings {{{1 " insert a chechbox map cb :call SafelyInsertCheckBox() map c% :call SafelyInsertCheckBoxPercent() map cp :call SafelyInsertCheckBoxPercentAlways() map cB :call InsertCheckBox() " delete a chechbox map cd :call DeleteCheckbox() " switch the status of the box map cx :call SwitchBox():call NewHMD(FindRootParent(line("."))) " calculate the proportion of work done on the subtree map cz :call NewHMD(FindRootParent(line("."))) "}}}1 " vim600: set foldlevel=0 foldmethod=marker: vimoutliner-0.3.4/add-ons/plugins/vo_hoist.otl0000644000175000017500000000610010255542735020134 0ustar noelnoelHoisting What is it? : Hoisting is a way to focus on a particular area of an outline. Only the : offspring from a selected parent will be shown. The offspring are : left-justified just as if they were the top level headings and had no : parent. Installation Get the newest, possibly unstable vo_hoist.vim CVS server: :pserver:anonymous@red.noels-lab.com:2401/usr/local/cvsroot : no password is required Web: http://red.noels-lab.com/cgi-bin/cvsweb.cgi/ VimOutliner mailing list Put it where you put your other experimental vim scrips perhaps this is ~/.vimoutliner/ Add this line to your ~/.vimoutlinerrc so /vo_hoist.vim Optionally set the hoistParanoia variable : If you are really paranoid about loosing your data during shakedown : of vo_hoist.vim, you can add this to your ~/.vimoutlinerrc file. It : will prevent VO from automatically removing the temporary hoist : files. This will have a tendency to hugely increase the number of : files in your working directory (but if you're paranoid... ;) ) let g:hoistParanoia = 1 How do I use it? Hoisting : Whenever you open a VO document, hoisting will be available. Invocation Place the cursor on the parent to be hoisted ,,h You will need to hit to accept some informational messages You should now see the children of the selected parent ready for editing Treat this document just like a normal .otl file De-hoisting : From within the hoisted document you simply need to quit. The : hoisted data will be saved in place of the old children. The cursor : will be returned to the hoisted parent. Invocation The :q, :wq, :x and ZZ perform a de-hoist operation A write will automatically be done to save any changes Manual De-hoisting : Should the de-hoisting ever fail or should an operator quit Vim (by : closing the window with the mouse, say), a manual de-hoisting will : need to be performed. You can find a currently hoisted parent by searching for __hoist Place the cursor on the parent with the __hoist tag ,,H The edited, hoisted offspring will replace the current offspring The __hoist tag will be removed The Hoist Tag Example Tag : The hoist tag is added to a hoisted parent for error recovery. It : includes a filename, a line number and a timestamp. Example Tag __hoist:vo_hoist.46.20030816124249.otl Tag Components Tag Marker __hoist: Easy search and replace Filename Prefix vo_hoist. Needed to comply with VO standards for file naming Parent Line Number (at time of hoisting) 46. Timestamp 20030816124249 YYYYMMDDhhmmss Filename Suffix .otl Duh The Log Files : Log files of the hoists are created to aid in error recovery should that : become necessary. They are created in the same directory as the working : .otl file. Log Filename .vo_hoist..log Example Log Filename .vo_hoist.test.otl.log Contents There is one line per hoist operation Each is comprised of a parent with a __hoist tag Limitations 1 Level Deep : Until debug is complete, hoisting is limited to one level. vimoutliner-0.3.4/add-ons/plugins/vo_checkbox.otl0000644000175000017500000001637410255542735020612 0ustar noelnoelCheckboxes: vo_checkbox What is it? : Checkboxes is a plugin for project, task and list managment. It add an : understanding of check boxes and percentage of task completion to Vim : Outliner. It adds just three tags and six commands. Installation This should already be included in your Vim Outliner package If not, get it The newest, stable version is here: www.vimoutliner.org Get the newest, possibly unstable vo_checkbox.vim CVS server: :pserver:anonymous@red.noels-lab.com:2401/usr/local/cvsroot (no password is required) Web: http://red.noels-lab.com/cgi-bin/cvsweb.cgi/ VimOutliner mailing list Put it where you put your other vim scrips perhaps this is ~/.vimoutliner/experimental/plugins/ perhaps this is ~/.vimoutliner/ Perhaps this is something entirely different Add this line to your ~/.vimoutlinerrc so /vo_checkbox.vim The Checkbox Tags [_] an unchecked item or incomplete task [X] a checked item or complete task % a placeholder for percentage of completion The Checkbox Commands : The default for Vim Outliner is ,, so we will use this : leader in the command discussions. ,,cb Create a check box : This works for the current heading or selected range of lines : including folds. Visual selection of the range of headings works : nicely. This command is currently not aware of body text. This : limited awareness needs to be fixed before this plugin can be : included in the standard Vim Outliner plugins. ,,cB Create a check box (even if one exists) ,,c% Create a checkbox and % symbol : This works just like ,,cb but add a % symbol for use in completion : calculations. ,,cx Change check box state : If there is a checkbox on the line the cursor is on, change its : state. If it's checked, uncheck it and vice-versa. Then recompute : the completion of the entire branch starting from the root parent. ,,cd Delete a checkbox : Delete the left-most check box on the selected heading(s). ,,cz Compute completion : Starting at the heading the cursor is on, recursively compute the : completion level of all sub-headings. How do I use it? Start with a simple example : Let's start with planning a small party; say a barbeque. Make the initial outline Barbeque Guests Bill and Barb Larry and Louise Marty and Mary Chris and Christine David and Darla Noel and Susan Food Chicken Ribs Corn on the cob Salad Desert Beverages Soda Iced Tea Beer Party Favors Squirt guns Hats Name tags Materials Paper Plates Napkins Trash Containers Add the check boxes : This can be done by visually selecting them and typing ,,cb. : When done, you should see this: [_] Barbeque [_] Guests [_] Bill and Barb [_] Larry and Louise [_] Marty and Mary [_] Chris and Christine [_] David and Darla [_] Noel and Susan [_] Food [_] Chicken [_] Ribs [_] Corn on the cob [_] Salad [_] Desert [_] Beverages [_] Soda [_] Iced Tea [_] Beer [_] Party Favors [_] Squirt guns [_] Hats [_] Name tags [_] Materials [_] Paper Plates [_] Napkins [_] Trash Containers Now check off what's done : Checking off what is complete is easy with the ,,cx command. : Just place the cursor on a heading and ,,cx it. Now you can see : what's done as long as the outline is fully expanded. [_] Barbeque [_] Guests [X] Bill and Barb [X] Larry and Louise [X] Marty and Mary [X] Chris and Christine [X] David and Darla [X] Noel and Susan [_] Food [X] Chicken [X] Ribs [_] Corn on the cob [_] Salad [X] Desert [_] Beverages [_] Soda [X] Iced Tea [X] Beer [_] Party Favors [_] Squirt guns [_] Hats [_] Name tags [_] Materials [X] Paper Plates [_] Napkins [X] Trash Containers Getting more advanced Now summarize what's done : You can summarize what is done with the ,,cz command. Place the : cursor on the 'Barbeque' heading and ,,cz it. The command will : recursively process the outline and update the check boxes of : the parent headlines. You should see: : (Note: the only change is on the 'Guests' heading. It changed : because all of its children are complete.) [_] Barbeque [X] Guests [X] Bill and Barb [X] Larry and Louise [X] Marty and Mary [X] Chris and Christine [X] David and Darla [X] Noel and Susan [_] Food [X] Chicken [X] Ribs [_] Corn on the cob [_] Salad [X] Desert [_] Beverages [_] Soda [X] Iced Tea [X] Beer [_] Party Favors [_] Squirt guns [_] Hats [_] Name tags [_] Materials [X] Paper Plates [_] Napkins [X] Trash Containers Add percentages for a better view : You can get a much better view of what's going on, especially : with collapsed headings, if you add percentages. Place a % on : each heading that has children like this: [_] % Barbeque [X] % Guests [X] Bill and Barb [X] Larry and Louise [X] Marty and Mary [X] Chris and Christine [X] David and Darla [X] Noel and Susan [_] % Food [X] Chicken [X] Ribs [_] Corn on the cob [_] Salad [X] Desert [_] % Beverages [_] Soda [X] Iced Tea [X] Beer [_] % Party Favors [_] Squirt guns [_] Hats [_] Name tags [_] % Materials [X] Paper Plates [_] Napkins [X] Trash Containers Now compute the percentage of completion : After adding the % symbols, place the cursor on the 'Barbeque' : heading and execute ,,cz as before. Keep in mind that the : recursive percentages are weighted. You should see: [_] 58% Barbeque [X] 100% Guests [X] Bill and Barb [X] Larry and Louise [X] Marty and Mary [X] Chris and Christine [X] David and Darla [X] Noel and Susan [_] 60% Food [X] Chicken [X] Ribs [_] Corn on the cob [_] Salad [X] Desert [_] 66% Beverages [_] Soda [X] Iced Tea [X] Beer [_] 0% Party Favors [_] Squirt guns [_] Hats [_] Name tags [_] 66% Materials [X] Paper Plates [_] Napkins [X] Trash Containers Complete a few more just for fun : Mark Salad and Soda and recompute with ,,cz and you should : see the ouline below. : : Try plaing around with zc and zo to see the effects of opening : and closing folds. Even if you place the cursor on 'Barbeque' : and zo it, you still have a good understanding of how complete : the project is. [_] 69% Barbeque [X] 100% Guests [X] Bill and Barb [X] Larry and Louise [X] Marty and Mary [X] Chris and Christine [X] David and Darla [X] Noel and Susan [_] 80% Food [X] Chicken [X] Ribs [_] Corn on the cob [X] Salad [X] Desert [X] 100% Beverages [X] Soda [X] Iced Tea [X] Beer [_] 0% Party Favors [_] Squirt guns [_] Hats [_] Name tags [_] 66% Materials [X] Paper Plates [_] Napkins [X] Trash Containers Limitations Body text is not yet supported : ,,cb will falsely add a check box to body text. vimoutliner-0.3.4/add-ons/scripts/0000755000175000017500000000000010255542735015573 5ustar noelnoelvimoutliner-0.3.4/add-ons/scripts/otl2html.py0000555000175000017500000010023010255542735017707 0ustar noelnoel#!/usr/bin/python # otl2html.py # convert a tab-formatted outline from VIM to HTML # # Copyright 2001 Noel Henson All rights reserved # # ALPHA VERSION!!! # $Revision: 1.43 $ # $Date: 2005/06/07 13:16:40 $ # $Author: noel $ # $Source: /home/noel/active/NoelOTL/RCS/otl2html.py,v $ # $Locker: $ ########################################################################### # Basic function # # This program accepts text outline files and converts them # to HTML. The outline levels are indicated by tabs. A line with no # tabs is assumed to be part of the highest outline level. # # 10 outline levels are supported. These loosely correspond to the # HTML H1 through H9 tags. Alphabetic, numeric and bullet formats # are also supported. # # CSS support has been added. # ########################################################################### # include whatever mdules we need import sys from string import * from re import * from time import * ########################################################################### # global variables formatMode = "indent" copyright = "" level = 0 div = 0 silentdiv = 0 slides = 0 hideComments = 0 showTitle = 1 inputFile = "" outline = [] flatoutline = [] inBodyText = 0 # 0: no, 1: text, 2: preformatted text, 3: table styleSheet = "nnnnnn.css" inlineStyle = 0 ########################################################################### # function definitions # usage # print the simplest form of help # input: none # output: simple command usage is printed on the console def showUsage(): print print "Usage:" print "otl2html.py [options] inputfile > outputfile" print "Options" print " -p Presentation: slide show output for use with HtmlSlides." print " -D First-level is divisions (
) for making" print " pretty web pages." print " -s sheet Use the specified style sheet with a link. This is the" print " default." print " -S sheet Include the specified style sheet in-line the output. For" print " encapsulated style." print " -T The first line is not the title. Treat it as outline data" print " -c comments (line with [ as the first non-whitespace" print " character. Ending with ] is optional." print " -C copyright Override the internal copyright notice with the" print " one supplied in the quoted string following this" print " flag. Single or double quotes can be used." print " -v Print version (RCS) information." print " -H Show the file syntax help." print "output is on STDOUT" print " Note: if neither -s or -S are specified, otl2html.py will default to -s. It" print " will try to use the css file 'nnnnnn.css' if it exists. If it does not" print " exist, it will be created automatically." print def showSyntax(): print print "Syntax" print "Syntax is Vim Outliner's normal syntax. The following are supported:" print print " Text" print " : Body text marker. This text will wrap in the output." print " ; Preformmated text. This text will will not wrap." print print " Tables" print " || Table header line." print " | Table and table columns. Example:" print " || Name | Age | Animal |" print " | Kirby | 9 | Dog |" print " | Sparky | 1 | Bird |" print " | Sophia | 8 | Cat |" print " This will cause an item to be left-justified." print " | whatever |" print " This will cause an item to be right-justified." print " | whatever |" print " This will cause an item to be centered." print " | whatever |" print print " Character Styles" print " ** Bold. Example: **Bold Text**" print " // Italic. Example: //Italic Text//" print " +++ Highlight. Example: +++Highlight Text+++" print " --- Strikeout. Example: ---Strikeout Text---" print " Insane ---+++//**Wow! This is insane!**//+++---" print " Just remember to keep it all on one line." print " Horizontal Rule" print " ---------------------------------------- (40 dashes)." print " Copyright" print " (c) or (C) Converts to a standard copyright symbol." print print " Including Images (for web pages)" print " [imagename] Examples:" print " [logo.gif] [photo.jpg] [car.png]" print " [http://i.a.cnn.net/cnn/.element/img/1.1/logo/logl.gif]" print " or from a database:" print " [http://www.lab.com/php/image.php?id=4]" print print " Including links (for web pages)" print " [link text-or-image] Examples:" print " [about.html About] [http://www.cnn.com CNN]" print " or with an image:" print " [http://www.ted.com [http://www.ted.com/logo.png]]" print print " Note:" print " When using -D, the top-level headings become divisions (
)" print " and will be created using a class of the heading name. Spaces" print " are not allowed. If a top-level heading begins with '_', it" print " will not be shown but the division name will be the same as" print " without the '_'. Example: _Menu will have a division name of" print " Menu and will not be shown." print # version # print the RCS version information # input: none # output: RSC version information is printed on the console def showVersion(): print print "RCS" print " $Revision: 1.43 $" print " $Date: 2005/06/07 13:16:40 $" print " $Author: noel $" print # getArgs # Check for input arguments and set the necessary switches # input: none # output: possible console output for help, switch variables may be set def getArgs(): global inputfile, debug, formatMode, slides, hideComments, copyright, styleSheet, inlineStyle, div, showTitle if (len(sys.argv) == 1): showUsage() sys.exit()() else: for i in range(len(sys.argv)): if (i != 0): if (sys.argv[i] == "-d"): debug = 1 # test for debug flag elif (sys.argv[i] == "-?"): # test for help flag showUsage() # show the help sys.exit() # exit elif (sys.argv[i] == "-p"): # test for the slides flag slides = 1 # set the slides flag elif (sys.argv[i] == "-D"): # test for the divisions flag div = 1 # set the divisions flag elif (sys.argv[i] == "-T"): # test for the no-title flag showTitle = 0 # clear the show-title flag elif (sys.argv[i] == "-c"): # test for the comments flag hideComments = 1 # set the comments flag elif (sys.argv[i] == "-C"): # test for the copyright flag copyright = sys.argv[i+1] # get the copyright i = i + 1 # increment the pointer elif (sys.argv[i] == "-s"): # test for the style sheet flag styleSheet = sys.argv[i+1] # get the style sheet name formatMode = "indent" # set the format i = i + 1 # increment the pointer elif (sys.argv[i] == "-S"): # test for the style sheet flag styleSheet = sys.argv[i+1] # get the style sheet name formatMode = "indent" # set the format inlineStyle = 1 i = i + 1 # increment the pointer elif (sys.argv[i] == "--help"): showUsage() sys.exit() elif (sys.argv[i] == "-h"): showUsage() sys.exit() elif (sys.argv[i] == "-H"): showSyntax() sys.exit() elif (sys.argv[i] == "-v"): showVersion() sys.exit() elif (sys.argv[i][0] == "-"): print "Error! Unknown option. Aborting" sys.exit() else: # get the input file name inputfile = sys.argv[i] # getLineLevel # get the level of the current line (count the number of tabs) # input: linein - a single line that may or may not have tabs at the beginning # output: returns a number 1 is the lowest def getLineLevel(linein): strstart = lstrip(linein) # find the start of text in line x = find(linein,strstart) # find the text index in the line n = count(linein,"\t",0,x) # count the tabs return(n+1) # return the count + 1 (for level) # getLineTextLevel # get the level of the current line (count the number of tabs) # input: linein - a single line that may or may not have tabs at the beginning # output: returns a number 1 is the lowest def getLineTextLevel(linein): strstart = lstrip(linein) # find the start of text in line x = find(linein,strstart) # find the text index in the line n = count(linein,"\t",0,x) # count the tabs n = n + count(linein," ",0,x) # count the spaces return(n+1) # return the count + 1 (for level) # colonStrip(line) # stip a leading ':', if it exists # input: line # output: returns a string with a stipped ':' def colonStrip(line): if (line[0] == ":"): return lstrip(line[1:]) else: return line # semicolonStrip(line) # stip a leading ';', if it exists # input: line # output: returns a string with a stipped ';' def semicolonStrip(line): if (line[0] == ";"): return line[1:] else: return line # dashStrip(line) # stip a leading '-', if it exists # input: line # output: returns a string with a stipped '-' def dashStrip(line): if (line[0] == "-"): return line[1:] else: return line # pipeStrip(line) # stip a leading '|', if it exists # input: line # output: returns a string with a stipped '|' def pipeStrip(line): if (line[0] == "|"): return line[1:] else: return line # plusStrip(line) # stip a leading '+', if it exists # input: line # output: returns a string with a stipped '+' def plusStrip(line): if (line[0] == "+"): return line[1:] else: return line # handleBodyText # print body text lines with a class indicating level, if style sheets # are being used. otherwise print just

# input: linein - a single line that may or may not have tabs at the beginning # output: through standard out def handleBodyText(linein,lineLevel): global inBodyText if (inBodyText == 2): print "" if (inBodyText == 3): print "" print "" + colonStrip(rstrip(lstrip(linein))), # handlePreformattedText # print preformatted text lines with a class indicating level, if style sheets # are being used. otherwise print just

# input: linein - a single line that may or may not have tabs at the beginning
# output: through standard out

def handlePreformattedText(linein,lineLevel):
  global inBodyText
  if (inBodyText == 1): print "

" if (inBodyText == 3): print "" print "" + semicolonStrip(rstrip(lstrip(linein))), # isAlignRight # return flag # input: coldata, a string def isAlignRight(coldata): l = len(coldata) if (coldata[0:2] == " ") and (coldata[l-2:l] != " "): return 1 else: return 0 # isAlignLeft # return flag # input: coldata, a string def isAlignLeft(coldata): l = len(coldata) if (coldata[0:2] != " ") and (coldata[l-2:l] == " "): return 1 else: return 0 # isAlignCenter # return flag # input: coldata, a string def isAlignCenter(coldata): l = len(coldata) if (coldata[0:2] == " ") and (coldata[l-2:l] == " "): return 1 else: return 0 # getColumnAlignment(string) # return string # input: coldata # output: or or or def getColumnAlignment(coldata): if isAlignCenter(coldata): return '' if isAlignRight(coldata): return '' if isAlignLeft(coldata): return '' return '' # handleTableColumns # return the souce for a row's columns # input: linein - a single line that may or may not have tabs at the beginning # output: string with the columns' source def handleTableColumns(linein,lineLevel): out = "" coldata = lstrip(rstrip(linein)) coldata = coldata.split("|") for i in range(1,len(coldata)-1): out += getColumnAlignment(coldata[i]) out += lstrip(rstrip(coldata[i]))+'' return out # handleTableHeaders # return the souce for a row's headers # input: linein - a single line that may or may not have tabs at the beginning # output: string with the columns' source def handleTableHeaders(linein,lineLevel): out = "" coldata = lstrip(rstrip(linein)) coldata = coldata.split("|") for i in range(2,len(coldata)-1): out += getColumnAlignment(coldata[i]) out += lstrip(rstrip(coldata[i]))+'' out = replace(out,' tag if necessary # input: linein - a single line that may or may not have tabs at the beginning # output: through standard out def handleTable(linein,lineLevel): global inBodyText if (inBodyText == 1): print "

" if (inBodyText == 2): print "
" if (inBodyText != 3): print "" inBodyText = 3 print handleTableRow(linein,lineLevel), # linkOrImage # if there is a link to an image or another page, process it # input: line # output: modified line def linkOrImage(line): line = sub('\[(\S+?)\]','\\1',line) line = sub('\[(\S+)\s(.*?)\]','\\2',line) line = replace(line,'X','[X]') line = replace(line,'_','[_]') return line # divName # create a name for a division # input: line # output: division name def divName(line): global silentdiv line = lstrip(rstrip(line)) if (line[0] == '_'): silentdiv = 1 line = line[1:] line = replace(line, ' ', '_') return'
' # getTitleText(line) # extract some meaningful text to make the document title from the line # input: line # output: modified line def getTitleText(line): out = sub('.*#(.*)#.*','\\1',line); out = sub('<.*>','',out); # if (out != ""): out = sub('\"(.*?)\"','\\1',line); return(out); # stripTitleText(line) # strip the title text if it is enclosed in double-quotes # input: line # output: modified line def stripTitleText(line): out = sub('#\W*.*#','',line); return(out); # beautifyLine(line) # do some optional, simple beautification of the text in a line # input: line # output: modified line def beautifyLine(line): if (lstrip(rstrip(line)) == "----------------------------------------"): return "


" out = line line = "" while (line != out): line = out out = linkOrImage(out) # out = replace(out,'**','',1) out = sub('\*\*(.*?)\*\*','\\1',out) # out = replace(out,'//','',1) out = sub('\/\/(.*?)\/\/','\\1',out) # out = replace(out,'+++','',1) out = sub('\+\+\+(.*?)\+\+\+','\\1',out) # out = replace(out,'---','',1) out = sub('\-\-\-(.*?)\-\-\-','\\1',out) out = sub('\(c\)','©',out) out = sub('\(C\)','©',out) return out # closeLevels # generate the number of or tags necessary to proplerly finish # input: format - a string indicating the mode to use for formatting # level - an integer between 1 and 9 that show the current level # (not to be confused with the level of the current line) # output: through standard out def closeLevels(): global level, formatMode while (level > 0): if (formatMode == "bullets"): print "" if (formatMode == "alpha") or (formatMode == "numeric") or \ (formatMode == "roman") or (formatMode == "indent"): print "" level = level - 1 # processLine # process a single line # input: linein - a single line that may or may not have tabs at the beginning # format - a string indicating the mode to use for formatting # level - an integer between 1 and 9 that show the current level # (not to be confused with the level of the current line) # output: through standard out def processLine(linein): global level, formatMode, slides, hideComments, inBodyText, styleSheet, inlineStyle, div, silentdiv if (lstrip(linein) == ""): return linein = beautifyLine(linein) lineLevel = getLineLevel(linein) if ((hideComments == 0) or (lineLevel != (find(linein,"[")+1))): if (lineLevel > level): # increasing depth while (lineLevel > level): if (formatMode == "indent" or formatMode == "simple"): if (inBodyText == 1): print"

" inBodyText = 0 elif (inBodyText == 2): print"" inBodyText = 0 elif (inBodyText == 3): print"
" inBodyText = 0 if not (div == 1 and lineLevel == 1): print "
    " else: sys.exit("Error! Unknown formatMode type") level = level + 1 elif (lineLevel < level): # decreasing depth while (lineLevel < level): if (inBodyText == 1): print"

    " inBodyText = 0 elif (inBodyText == 2): print"" inBodyText = 0 elif (inBodyText == 3): print"" inBodyText = 0 print "
" level = level - 1 if (div == 1 and level == 1): if (silentdiv == 0): print'' else: slientdiv = 0 print'
' else: print # same depth if (div == 1 and lineLevel == 1): print divName(linein) if (silentdiv == 0): print "
    " if (slides == 0): if (lineLevel == find(linein," ") +1 ) or \ (lineLevel == find(linein,":") +1 ): if (inBodyText != 1): handleBodyText(linein,lineLevel) elif (colonStrip(rstrip(lstrip(linein))) == ""): print "

    " handleBodyText(linein,lineLevel) else: print colonStrip(rstrip(lstrip(linein))), elif (lineLevel == find(linein,";") +1 ): if (inBodyText != 2): handlePreformattedText(linein,lineLevel) elif (semicolonStrip(rstrip(lstrip(linein))) == ""): print "" handlePreformattedText(linein,lineLevel) else: print semicolonStrip(rstrip(lstrip(linein))), elif (lineLevel == find(linein,"|") +1 ): if (inBodyText != 3): handleTable(linein,lineLevel) elif (pipeStrip(rstrip(lstrip(linein))) == ""): print "" handleTtable(linein,lineLevel) else: print handleTableRow(linein,lineLevel), else: if (inBodyText == 1): print"

    " inBodyText = 0 elif (inBodyText == 2): print"" inBodyText = 0 elif (inBodyText == 3): print"" inBodyText = 0 if (silentdiv == 0): print "" + lstrip(rstrip(dashStrip(lstrip(linein)))), elif (lineLevel == find(linein,"+ ") +1 ): print " class=\"LN" + str(lineLevel) + "\"", print ">" + lstrip(rstrip(plusStrip(lstrip(linein)))), else: print " class=\"L" + str(lineLevel) + "\"", print ">" + rstrip(lstrip(linein)), else: silentdiv = 0 else: if (lineLevel == 1): if (linein[0] == " "): if (inBodyText == 0): handleBodyText(linein,lineLevel) else: print rstrip(lstrip(linein)), else: print "
    " print rstrip(lstrip(linein)), print "
    \n" else: if (lineLevel == find(linein," ") +1 ) or \ (lineLevel == find(linein,":") +1 ): if (inBodyText == 0): handleBodyText(linein,lineLevel) else: print rstrip(lstrip(linein)), else: if (inBodyText == 1): print"

    " inBodyText = 0 print "" + rstrip(lstrip(linein)), # flatten # Flatten a subsection of an outline. The index passed is the outline section # title. All sublevels that are only one level deeper are indcluded in the current # subsection. Then there is a recursion for those items listed in the subsection. # Exits when the next line to be processed is of the same or lower outline level. # (lower means shallower) # input: idx - the index into the outline. The indexed line is the title. # output: adds reformatted lines to flatoutline[] def flatten(idx): if (outline[idx] == ""): return if (len(outline) <= idx): return titleline = outline[idx] titlelevel = getLineLevel(titleline) if (getLineLevel(outline[idx+1]) > titlelevel): if (titleline[titlelevel-1] != " "): flatoutline.append(lstrip(titleline)) exitflag = 0 while (exitflag == 0): if (idx < len(outline)-1): idx = idx + 1 currlevel = getLineLevel(outline[idx]) if (currlevel == titlelevel + 1): if (currlevel == find(outline[idx]," ") +1): flatoutline.append("\t " + lstrip(outline[idx])) else: flatoutline.append("\t" + lstrip(outline[idx])) elif (currlevel <= titlelevel): exitflag = 1 else: exitflag = 1 level = titlelevel return def createCSS(): global styleSheet output = " /* copyright notice and filename */\n" output += "body { \n" output += " font-family: helvetica,arial,sans-serif;\n" output += " font-size: 10pt;\n" output += "}\n" output += " /* title at the top of the page */\n" output += "H1 { \n" output += " font-family: helvetica,arial,sans-serif;\n" output += " font-size: 14pt;\n" output += " font-weight: bold;\n" output += " text-align: center;\n" output += " color: black;\n" output += " background-color: #ddddee;\n" output += " padding-top: 20px;\n" output += " padding-bottom: 20px;\n" output += "}\n" output += "H2 { \n" output += " font-family: helvetica,arial,sans-serif;\n" output += " font-size: 12pt;\n" output += " font-weight: bold;\n" output += " text-align: left;\n" output += " color: black;\n" output += "}\n" output += "H3 { \n" output += " font-family: helvetica,arial,sans-serif;\n" output += " font-size: 12pt;\n" output += " text-align: left;\n" output += " color: black;\n" output += "}\n" output += "H4 { \n" output += " font-family: helvetica,arial,sans-serif;\n" output += " font-size: 12pt;\n" output += " text-align: left;\n" output += " color: black;\n" output += "}\n" output += "H5 { \n" output += " font-family: helvetica,arial,sans-serif;\n" output += " font-size: 10pt;\n" output += " text-align: left;\n" output += " color: black;\n" output += "}\n" output += " /* outline level spacing */\n" output += "OL { \n" output += " padding-bottom: 8pt;\n" output += "}\n" output += " /* global heading settings */\n" output += "LI { \n" output += " font-family: helvetica,arial,sans-serif;\n" output += " color: black;\n" output += " font-weight: normal;\n" output += " list-style: lower-alpha;\n" output += " padding-top: 4px;\n" output += "}\n" output += " /* level 1 heading overrides */\n" output += "LI.L1 { \n" output += " font-size: 12pt;\n" output += " font-weight: bold;\n" output += " list-style: none;\n" output += "}\n" output += " /* level 2 heading overrides */\n" output += "LI.L2 { \n" output += " font-size: 10pt;\n" output += " font-weight: bold;\n" output += " list-style: none;\n" output += "}\n" output += " /* level 3 heading overrides */\n" output += "LI.L3 { \n" output += " font-size: 10pt;\n" output += " list-style: none;\n" output += "}\n" output += " /* level 4 heading overrides */\n" output += "LI.L4 { \n" output += " font-size: 10pt;\n" output += " list-style: none;\n" output += "}\n" output += " /* level 5 heading overrides */\n" output += "LI.L5 { \n" output += " font-size: 10pt;\n" output += " list-style: none;\n" output += "}\n" output += " /* level 6 heading overrides */\n" output += "LI.L6 { \n" output += " font-size: 10pt;\n" output += " list-style: none;\n" output += "}\n" output += " /* level 7 heading overrides */\n" output += "LI.L7 { \n" output += " font-size: 10pt;\n" output += " list-style: none;\n" output += "}\n" output += " /* level 1 bullet heading overrides */\n" output += "LI.LB1 { \n" output += " font-size: 12pt;\n" output += " font-weight: bold;\n" output += " list-style: disc;\n" output += "}\n" output += " /* level 2 bullet heading overrides */\n" output += "LI.LB2 { \n" output += " font-size: 10pt;\n" output += " font-weight: bold;\n" output += " list-style: disc;\n" output += "}\n" output += " /* level 3 bullet heading overrides */\n" output += "LI.LB3 { \n" output += " font-size: 10pt;\n" output += " list-style: disc;\n" output += "}\n" output += " /* level 4 bullet heading overrides */\n" output += "LI.LB4 { \n" output += " font-size: 10pt;\n" output += " list-style: disc;\n" output += "}\n" output += " /* level 5 bullet heading overrides */\n" output += "LI.LB5 { \n" output += " font-size: 10pt;\n" output += " list-style: disc;\n" output += "}\n" output += " /* level 6 bullet heading overrides */\n" output += "LI.LB6 { \n" output += " font-size: 10pt;\n" output += " list-style: disc;\n" output += "}\n" output += " /* level 7 bullet heading overrides */\n" output += "LI.LB7 { \n" output += " font-size: 10pt;\n" output += " list-style: disc;\n" output += "}\n" output += " /* level 1 numeric heading overrides */\n" output += "LI.LN1 { \n" output += " font-size: 12pt;\n" output += " font-weight: bold;\n" output += " list-style: decimal;\n" output += "}\n" output += " /* level 2 numeric heading overrides */\n" output += "LI.LN2 { \n" output += " font-size: 10pt;\n" output += " font-weight: bold;\n" output += " list-style: decimal;\n" output += "}\n" output += " /* level 3 numeric heading overrides */\n" output += "LI.LN3 { \n" output += " font-size: 10pt;\n" output += " list-style: decimal;\n" output += "}\n" output += " /* level 4 numeric heading overrides */\n" output += "LI.LN4 { \n" output += " font-size: 10pt;\n" output += " list-style: decimal;\n" output += "}\n" output += " /* level 5 numeric heading overrides */\n" output += "LI.LN5 { \n" output += " font-size: 10pt;\n" output += " list-style: decimal;\n" output += "}\n" output += " /* level 6 numeric heading overrides */\n" output += "LI.LN6 { \n" output += " font-size: 10pt;\n" output += " list-style: decimal;\n" output += "}\n" output += " /* level 7 numeric heading overrides */\n" output += "LI.LN7 { \n" output += " font-size: 10pt;\n" output += " list-style: decimal;\n" output += "}\n" output += " /* body text */\n" output += "P {\n" output += " font-family: helvetica,arial,sans-serif;\n" output += " font-size: 9pt;\n" output += " font-weight: normal;\n" output += " color: darkgreen;\n" output += "}\n" output += " /* preformatted text */\n" output += "PRE { \n" output += " font-family: fixed;\n" output += " font-size: 9pt;\n" output += " font-weight: normal;\n" output += " color: darkblue;\n" output += "}\n" output += "\n" output += "TABLE {\n" output += " margin-top: 1em;\n" output += " font-family: helvetica,arial,sans-serif;\n" output += " font-size: 12pt;\n" output += " font-weight: normal;\n" output += " border-collapse: collapse;\n" output += "}\n" output += "\n" output += "TH {\n" output += " border: 1px solid black;\n" output += " padding: 0.5em;\n" output += " background-color: #eeddee;\n" output += "}\n" output += "\n" output += "TD {\n" output += " border: 1px solid black;\n" output += " padding: 0.5em;\n" output += " background-color: #ddeeee;\n" output += "}\n" output += "\n" output += "CODE {\n" output += " background-color: yellow;\n" output += "}\n" output += "\n" output += "TABLE.TAB1 {\n" output += " margin-top: 1em;\n" output += " font-family: helvetica,arial,sans-serif;\n" output += " font-size: 12pt;\n" output += " font-weight: normal;\n" output += " border-collapse: collapse;\n" output += "}\n" output += "TABLE.TAB2 {\n" output += " margin-top: 1em;\n" output += " font-family: helvetica,arial,sans-serif;\n" output += " font-size: 11pt;\n" output += " font-weight: normal;\n" output += " border-collapse: collapse;\n" output += "}\n" output += "TABLE.TAB3 {\n" output += " margin-top: 1em;\n" output += " font-family: helvetica,arial,sans-serif;\n" output += " font-size: 10pt;\n" output += " font-weight: normal;\n" output += " border-collapse: collapse;\n" output += "}\n" output += "TABLE.TAB4 {\n" output += " margin-top: 1em;\n" output += " font-family: helvetica,arial,sans-serif;\n" output += " font-size: 10pt;\n" output += " font-weight: normal;\n" output += " border-collapse: collapse;\n" output += "}\n" output += "TABLE.TAB5 {\n" output += " margin-top: 1em;\n" output += " font-family: helvetica,arial,sans-serif;\n" output += " font-size: 10pt;\n" output += " font-weight: normal;\n" output += " border-collapse: collapse;\n" output += "}\n" output += "TABLE.TAB6 {\n" output += " margin-top: 1em;\n" output += " font-family: helvetica,arial,sans-serif;\n" output += " font-size: 10pt;\n" output += " font-weight: normal;\n" output += " border-collapse: collapse;\n" file = open(styleSheet,"w") file.write(output) def printHeader(linein): global styleSheet, inlineStyle print "" print "" + getTitleText(linein) + "" print"" print"" print"" try: file = open(styleSheet,"r") except IOError, e: createCSS() file = open(styleSheet,"r") if (styleSheet != "" and inlineStyle == 0): print "" if (styleSheet != "" and inlineStyle == 1): print "" print "" def printFirstLine(linein): print "
    " print "

    " + stripTitleText(rstrip(lstrip(linein))) +"

    " print "
    " print "
    " def printFooter(): global slides, div print "
    " if (slides == 0 and div == 0): print "
    " print "
    " print copyright print "
    " print inputfile + "   " + strftime("%Y/%m/%d %H:%M",localtime(time())) print "
    " print "" def main(): global showTitle getArgs() flatouline = [] file = open(inputfile,"r") if (slides == 0): firstLine = beautifyLine(lstrip(rstrip(file.readline()))) printHeader(firstLine) if (showTitle == 1): printFirstLine(firstLine) linein = beautifyLine(lstrip(rstrip(file.readline()))) else: linein = firstLine while linein != "": processLine(linein) linein = file.readline() closeLevels() else: linein = beautifyLine(lstrip(rstrip(file.readline()))) outline.append(linein) linein = lstrip(rstrip(file.readline())) while linein != "": outline.append("\t" + linein) linein = rstrip(file.readline()) for i in range (0,len(outline)-1): flatten(i) printHeader(flatoutline[0]) for i in range (0,len(flatoutline)): processLine(flatoutline[i]) printFooter() file.close() main() vimoutliner-0.3.4/syntax/0000755000175000017500000000000010255542735014105 5ustar noelnoelvimoutliner-0.3.4/syntax/vo_base.vim0000644000175000017500000004037210255542735016246 0ustar noelnoel"######################################################################### "# 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: vimoutliner-0.3.4/CHANGELOG0000644000175000017500000014615310255542735014003 0ustar noelnoel? CHANGELOG RCS file: /root/VimOutliner/VimOutliner/INSTALL,v Working file: INSTALL head: 1.2 branch: locks: strict access list: symbolic names: keyword substitution: kv total revisions: 2; selected revisions: 2 description: ---------------------------- revision 1.2 date: 2004-11-27 19:30:43 +0000; author: noel; state: Exp; lines: +2 -2 Minor syntax and installation adjustments. Change to vo_checkbox to fix a typo. ---------------------------- revision 1.1 date: 2004-02-17 22:00:15 +0000; author: noel; state: Exp; These files are only in cvs for backup purposes. They should be extracted from vo_readme.txt and never edited themselves: INSTALL LICENSE VERSION ============================================================================= RCS file: /root/VimOutliner/VimOutliner/Attic/INSTALL.TXT,v Working file: INSTALL.TXT head: 1.3 branch: locks: strict access list: symbolic names: keyword substitution: kv total revisions: 3; selected revisions: 3 description: Quick installation instructions for developers. ---------------------------- revision 1.3 date: 2003-06-20 14:13:15 +0000; author: noel; state: dead; lines: +0 -0 Final documentation tweaks for the final 0.3.0 release. ---------------------------- revision 1.2 date: 2003-06-18 13:50:55 +0000; author: noel; state: Exp; lines: +1 -1 Modified the installation title. ---------------------------- revision 1.1 date: 2003-03-20 22:56:49 +0000; author: noel; state: Exp; Initial revision ============================================================================= RCS file: /root/VimOutliner/VimOutliner/LICENSE,v Working file: LICENSE head: 1.2 branch: locks: strict access list: symbolic names: keyword substitution: kv total revisions: 2; selected revisions: 2 description: ---------------------------- revision 1.2 date: 2004-11-27 19:30:43 +0000; author: noel; state: Exp; lines: +4 -2 Minor syntax and installation adjustments. Change to vo_checkbox to fix a typo. ---------------------------- revision 1.1 date: 2004-02-17 22:00:15 +0000; author: noel; state: Exp; These files are only in cvs for backup purposes. They should be extracted from vo_readme.txt and never edited themselves: INSTALL LICENSE VERSION ============================================================================= RCS file: /root/VimOutliner/VimOutliner/VERSION,v Working file: VERSION head: 1.4 branch: locks: strict access list: symbolic names: keyword substitution: kv total revisions: 4; selected revisions: 4 description: ---------------------------- revision 1.4 date: 2005-06-07 17:48:50 +0000; author: noel; state: Exp; lines: +4 -0 Updated to include help on VO objects. ---------------------------- revision 1.3 date: 2005-06-07 17:41:42 +0000; author: noel; state: Exp; lines: +10 -10 Updated version. ---------------------------- revision 1.2 date: 2004-11-27 19:30:43 +0000; author: noel; state: Exp; lines: +9 -14 Minor syntax and installation adjustments. Change to vo_checkbox to fix a typo. ---------------------------- revision 1.1 date: 2004-02-17 22:00:15 +0000; author: noel; state: Exp; These files are only in cvs for backup purposes. They should be extracted from vo_readme.txt and never edited themselves: INSTALL LICENSE VERSION ============================================================================= RCS file: /root/VimOutliner/VimOutliner/install.sh,v Working file: install.sh head: 1.3 branch: locks: strict access list: symbolic names: keyword substitution: kv total revisions: 3; selected revisions: 3 description: ---------------------------- revision 1.3 date: 2005-06-06 18:42:29 +0000; author: noel; state: Exp; lines: +3 -0 Added support for color schemes. ---------------------------- revision 1.2 date: 2004-11-27 19:30:43 +0000; author: noel; state: Exp; lines: +2 -2 Minor syntax and installation adjustments. Change to vo_checkbox to fix a typo. ---------------------------- revision 1.1 date: 2004-05-02 19:03:01 +0000; author: noel; state: Exp; Added to the distro. ============================================================================= RCS file: /root/VimOutliner/VimOutliner/vimoutlinerrc,v Working file: vimoutlinerrc head: 1.6 branch: locks: strict access list: symbolic names: keyword substitution: kv total revisions: 6; selected revisions: 6 description: ---------------------------- revision 1.6 date: 2005-06-07 12:39:01 +0000; author: noel; state: Exp; lines: +9 -78 Enabled checkboxes and hoisting by default. Added Vim colorscheme support. ---------------------------- revision 1.5 date: 2005-01-19 15:06:20 +0000; author: noel; state: Exp; lines: +4 -3 Fixed another W18 error. Enabled hoisting and checkboxes by default. ---------------------------- revision 1.4 date: 2004-05-24 15:56:34 +0000; author: noel; state: Exp; lines: +45 -0 Added highlighting and folding support for: Tables (marked with '|') User-defined, wrapping text (marked with '>') User-defined, non-wrapping text (marked with '<') ---------------------------- revision 1.3 date: 2004-05-17 17:27:55 +0000; author: noel; state: Exp; lines: +2 -2 Fixed plugin loaders for checkboxes and hoisting. ---------------------------- revision 1.2 date: 2004-03-18 13:23:53 +0000; author: noel; state: Exp; lines: +1 -0 Added a line to change the background. ---------------------------- revision 1.1 date: 2004-02-17 21:50:36 +0000; author: noel; state: Exp; This file will be provided from now on to make it easy for people to customize their settings. The install process will rename this file to .vimoutlinerrc and put it into the user's home directory. ============================================================================= RCS file: /root/VimOutliner/VimOutliner/Attic/vo_INSTALL.TXT,v Working file: vo_INSTALL.TXT head: 1.2 branch: locks: strict access list: symbolic names: keyword substitution: kv total revisions: 2; selected revisions: 2 description: ---------------------------- revision 1.2 date: 2005-06-07 17:24:05 +0000; author: noel; state: dead; lines: +0 -0 *** empty log message *** ---------------------------- revision 1.1 date: 2003-06-26 19:52:07 +0000; author: noel; state: Exp; Initial add to VimOutliner ============================================================================= RCS file: /root/VimOutliner/VimOutliner/Attic/vo_README.otl,v Working file: vo_README.otl head: 1.4 branch: locks: strict access list: symbolic names: keyword substitution: kv total revisions: 4; selected revisions: 4 description: ---------------------------- revision 1.4 date: 2005-06-07 17:24:05 +0000; author: noel; state: dead; lines: +0 -0 *** empty log message *** ---------------------------- revision 1.3 date: 2003-10-17 02:17:07 +0000; author: noel; state: Exp; lines: +2 -2 Changed version numbers. ---------------------------- revision 1.2 date: 2003-06-20 14:13:15 +0000; author: noel; state: Exp; lines: +4 -41 Final documentation tweaks for the final 0.3.0 release. ---------------------------- revision 1.1 date: 2003-06-18 13:55:03 +0000; author: noel; state: Exp; Added this documentation to Vim Outliner. ============================================================================= RCS file: /root/VimOutliner/VimOutliner/add-ons/plugins/vo_checkbox.otl,v Working file: add-ons/plugins/vo_checkbox.otl head: 1.3 branch: locks: strict access list: symbolic names: keyword substitution: kv total revisions: 3; selected revisions: 3 description: ---------------------------- revision 1.3 date: 2004-11-27 19:30:43 +0000; author: noel; state: Exp; lines: +12 -8 Minor syntax and installation adjustments. Change to vo_checkbox to fix a typo. ---------------------------- revision 1.2 date: 2004-05-17 15:57:58 +0000; author: noel; state: Exp; lines: +6 -0 Modified documentation to match current version. ---------------------------- revision 1.1 date: 2003-10-23 22:13:00 +0000; author: noel; state: Exp; Instructions for vo_checkbox.vim ============================================================================= RCS file: /root/VimOutliner/VimOutliner/add-ons/plugins/vo_checkbox.vim,v Working file: add-ons/plugins/vo_checkbox.vim head: 1.18 branch: locks: strict access list: symbolic names: keyword substitution: kv total revisions: 18; selected revisions: 18 description: ---------------------------- revision 1.18 date: 2005-06-07 15:08:59 +0000; author: noel; state: Exp; lines: +12 -45 Fixed a bug that added checkboxes to body text, preformatted body text, tables, user-defined text and user-defined preformatted text lines. Fixed a bug where ,,cb would modify terms like 'test%' or ',,c%'. Now it only modifies this term: ' [0-9]*%'. ---------------------------- revision 1.17 date: 2005-06-07 13:53:22 +0000; author: noel; state: Exp; lines: +8 -2 Added ,,cp. It is the same as ,,c% ---------------------------- revision 1.16 date: 2004-05-27 22:22:48 +0000; author: noel; state: Exp; lines: +24 -4 Made ,,cd smart so it would try to delete non-existent checkboxes. Fixed a recursion bug in NewHMD to branches with a single child would be computed properly. ---------------------------- revision 1.15 date: 2004-05-27 18:11:53 +0000; author: noel; state: Exp; lines: +25 -5 Added smart (only the entire tree in which the child exists), automatic completion calculations to the ,,cx command. Added smart (only for parents, not children) '%' sign insertion for ,,c%. ---------------------------- revision 1.14 date: 2004-05-17 15:53:38 +0000; author: noel; state: Exp; lines: +13 -7 Modified SwitchBox() to be more selective. ---------------------------- revision 1.13 date: 2004-05-17 15:43:23 +0000; author: noel; state: Exp; lines: +7 -3 Fixed a broken key mapping: ,,c%. ---------------------------- revision 1.12 date: 2004-02-23 12:19:27 +0000; author: noel; state: Exp; lines: +26 -9 Fixed Up-to-date problem. Fixed 'Safely script names'. ---------------------------- revision 1.11 date: 2003-09-05 16:37:55 +0000; author: cepl; state: Exp; lines: +41 -2 Added ,cp binding for the new function InsertCheckBoxPerCent, which adds not only the checkbox but also percentage sign. ---------------------------- revision 1.10 date: 2003-08-23 16:42:15 +0000; author: noel; state: Exp; lines: +18 -17 Modified completion percentages to be recursive. This: [_] 0% Project [_] 33% Task [_] Subtask [X] Subtask [X] Subtask [_] 0% Task [_] Subtask [_] 50% Subtask [X] Subsubtask [_] Subsubtask [X] Subsubtask [_] Subsubtask Becomes this: [_] 29% Project [_] 33% Task [_] Subtask [X] Subtask [X] Subtask [_] 25% Task [_] Subtask [_] 50% Subtask [X] Subsubtask [_] Subsubtask [X] Subsubtask [_] Subsubtask ---------------------------- revision 1.9 date: 2003-08-16 13:49:53 +0000; author: noel; state: Exp; lines: +9 -7 added ! to functions. ---------------------------- revision 1.8 date: 2003-08-11 19:16:28 +0000; author: noel; state: Exp; lines: +30 -5 Fixed a bug in which any line that contained the letter x was counted as completed. ---------------------------- revision 1.7 date: 2003-08-03 23:56:46 +0000; author: noel; state: Exp; lines: +89 -40 Replaced HowManyDone() with a new routine. The new routine is recursive, ignores headings that don't have checkboxes and does not care what the current folding states of the parent or children are. The heading at the top of the tree does not even need to have a checkbox. This will work: Projects [_] Software [_] Input [_] Processing [_] Math [_] Database [_] Networking [_] Output [_] Hardware [_] Keyboard [_] Harddisk [_] Processor [_] Printer One only needs to ,,cx on Projects to update everything (everything shown). As before, including a % on a parent heading with childred, will be replaced with a percentage of completion. Nice work Matej! ---------------------------- revision 1.6 date: 2003-07-14 00:36:57 +0000; author: noel; state: Exp; lines: +9 -5 Changed [x] to [X] to make it look more full. If the consensus is [x], I'll gladly put it back. ---------------------------- revision 1.5 date: 2003-07-10 16:29:50 +0000; author: cepl; state: Exp; lines: +75 -3 Calculation of the subtree completion added. The very first alpha draft. ---------------------------- revision 1.4 date: 2003-07-08 23:48:43 +0000; author: noel; state: Exp; lines: +6 -3 Fixed a bug in cd. It used to only delete unchecked boxes. Now it does both. ---------------------------- revision 1.3 date: 2003-07-07 14:17:04 +0000; author: noel; state: Exp; lines: +11 -6 Fixed the folding of the new headers. ---------------------------- revision 1.2 date: 2003-07-07 14:14:02 +0000; author: noel; state: Exp; lines: +24 -0 Added appropriate headers. ---------------------------- revision 1.1 date: 2003-07-07 13:52:45 +0000; author: noel; state: Exp; Changed checkbox.vim to vo_checkbox.vim ============================================================================= RCS file: /root/VimOutliner/VimOutliner/add-ons/plugins/vo_hoist.otl,v Working file: add-ons/plugins/vo_hoist.otl head: 1.1 branch: locks: strict access list: symbolic names: keyword substitution: kv total revisions: 1; selected revisions: 1 description: ---------------------------- revision 1.1 date: 2003-10-23 22:12:20 +0000; author: noel; state: Exp; Instructions for vo_hoist.vim. ============================================================================= RCS file: /root/VimOutliner/VimOutliner/add-ons/plugins/vo_hoist.vim,v Working file: add-ons/plugins/vo_hoist.vim head: 1.9 branch: locks: strict access list: symbolic names: keyword substitution: kv total revisions: 9; selected revisions: 9 description: ---------------------------- revision 1.9 date: 2003-11-12 17:26:09 +0000; author: noel; state: Exp; lines: +6 -2 Added a command to place the cursor on the first line of a hoisted outline. ---------------------------- revision 1.8 date: 2003-11-12 17:10:51 +0000; author: noel; state: Exp; lines: +9 -3 Fixed a bug that occurs on a level 1 heading with no children. ---------------------------- revision 1.7 date: 2003-10-23 22:14:14 +0000; author: noel; state: Exp; lines: +13 -5 Minor changes to DeHoist() to compensate for current foldlevel settings. ---------------------------- revision 1.6 date: 2003-08-17 15:35:24 +0000; author: noel; state: Exp; lines: +10 -9 Put the new mappings in the correct place this time. Added a : and to the ZZ command. ---------------------------- revision 1.5 date: 2003-08-17 14:47:42 +0000; author: noel; state: Exp; lines: +8 -2 Added ZZ, qa, and x to the list of commands that de-hoist the current outline. ---------------------------- revision 1.4 date: 2003-08-17 00:07:31 +0000; author: noel; state: Exp; lines: +13 -10 Added "silent" to commands generating tedious messages. ---------------------------- revision 1.3 date: 2003-08-16 20:08:06 +0000; author: noel; state: Exp; lines: +11 -6 Removed a need to exclude fold level 1 headings. ---------------------------- revision 1.2 date: 2003-08-16 19:02:44 +0000; author: noel; state: Exp; lines: +84 -31 First fully functional version. May need some tweaks but it works and is quite easy to use. ---------------------------- revision 1.1 date: 2003-08-14 21:05:05 +0000; author: noel; state: Exp; First publicly available, experiment verison ============================================================================= RCS file: /root/VimOutliner/VimOutliner/colors/vo_dark.vim,v Working file: colors/vo_dark.vim head: 1.2 branch: locks: strict access list: symbolic names: keyword substitution: kv total revisions: 2; selected revisions: 2 description: ---------------------------- revision 1.2 date: 2005-06-07 15:24:30 +0000; author: noel; state: Exp; lines: +1 -1 The color darkyellow does not appear to exist on some systems. This color has been changed to darkred. ---------------------------- revision 1.1 date: 2005-06-06 18:45:11 +0000; author: noel; state: Exp; These are the new color scheme files. ============================================================================= RCS file: /root/VimOutliner/VimOutliner/colors/vo_light.vim,v Working file: colors/vo_light.vim head: 1.2 branch: locks: strict access list: symbolic names: keyword substitution: kv total revisions: 2; selected revisions: 2 description: ---------------------------- revision 1.2 date: 2005-06-07 15:24:30 +0000; author: noel; state: Exp; lines: +3 -3 The color darkyellow does not appear to exist on some systems. This color has been changed to darkred. ---------------------------- revision 1.1 date: 2005-06-06 18:45:11 +0000; author: noel; state: Exp; These are the new color scheme files. ============================================================================= RCS file: /root/VimOutliner/VimOutliner/doc/vo_readme.txt,v Working file: doc/vo_readme.txt head: 1.9 branch: locks: strict access list: symbolic names: keyword substitution: kv total revisions: 9; selected revisions: 9 description: ---------------------------- revision 1.9 date: 2005-06-07 17:48:21 +0000; author: noel; state: Exp; lines: +4 -0 Added a better VERSION description. ---------------------------- revision 1.8 date: 2005-06-07 16:44:58 +0000; author: noel; state: Exp; lines: +294 -150 Added a section about VO objects. Added the ,,cp command. ---------------------------- revision 1.7 date: 2004-05-28 15:28:47 +0000; author: noel; state: Exp; lines: +274 -28 Added complete help for vo_checkbox.vim. ---------------------------- revision 1.6 date: 2004-05-17 17:16:28 +0000; author: noel; state: Exp; lines: +1 -1 Changed 0.3.2 to 0.3.3 in the tite. ---------------------------- revision 1.5 date: 2004-05-17 15:21:25 +0000; author: noel; state: Exp; lines: +75 -69 Modified to reflecte 0.3.3 changes. ---------------------------- revision 1.4 date: 2004-02-17 21:52:41 +0000; author: noel; state: Exp; lines: +263 -111 Modified heavily by Stefan Schiedl for 0.3.2. ---------------------------- revision 1.3 date: 2003-10-17 02:18:07 +0000; author: noel; state: Exp; lines: +44 -7 Changed version numbers. ---------------------------- revision 1.2 date: 2003-06-20 14:13:15 +0000; author: noel; state: Exp; lines: +5 -42 Final documentation tweaks for the final 0.3.0 release. ---------------------------- revision 1.1 date: 2003-06-18 13:55:03 +0000; author: noel; state: Exp; Added this documentation to Vim Outliner. ============================================================================= RCS file: /root/VimOutliner/VimOutliner/experimental/Attic/checkbox.vim,v Working file: experimental/checkbox.vim head: 1.2 branch: locks: strict access list: symbolic names: keyword substitution: kv total revisions: 2; selected revisions: 2 description: ---------------------------- revision 1.2 date: 2003-07-07 13:52:45 +0000; author: noel; state: dead; lines: +0 -0 Changed checkbox.vim to vo_checkbox.vim ---------------------------- revision 1.1 date: 2003-07-07 01:22:35 +0000; author: noel; state: Exp; Initial experimental version of checkboxes. Contains only one function and two mappings. The only capabilities are to add and delete check boxes from the beginnings of headings. ============================================================================= RCS file: /root/VimOutliner/VimOutliner/filetype/Attic/filetype.vim,v Working file: filetype/filetype.vim head: 1.5 branch: locks: strict access list: symbolic names: arelease: 1.1.1.1 avendor: 1.1.1 testfork: 1.3.0.2 keyword substitution: kv total revisions: 6; selected revisions: 6 description: VimOutliner filetype.vim ---------------------------- revision 1.5 date: 2005-06-07 17:26:52 +0000; author: noel; state: dead; lines: +5 -2 *** empty log message *** ---------------------------- revision 1.4 date: 2003-03-01 17:37:17 +0000; author: noel; state: Exp; lines: +6 -3 Changed the filetype name to our new standard: vo_base ---------------------------- revision 1.3 date: 2003-02-14 17:49:43 +0000; author: noel; state: Exp; lines: +6 -4 Removed unnecessary filetype commands ---------------------------- revision 1.2 date: 2003-02-09 15:07:35 +0000; author: noel; state: Exp; lines: +8 -7 Changed the auto commands. Setting the "filetype plugin indent on" option here does not work with ftplugins. ---------------------------- revision 1.1 date: 2003-02-08 21:11:26 +0000; author: noel; state: Exp; branches: 1.1.1; Initial revision ---------------------------- revision 1.1.1.1 date: 2003-03-20 22:35:15 +0000; author: noel; state: Exp; lines: +17 -8 no message ============================================================================= RCS file: /root/VimOutliner/VimOutliner/filetype/vo_base.vim,v Working file: filetype/vo_base.vim head: 1.1 branch: locks: strict access list: symbolic names: keyword substitution: kv total revisions: 1; selected revisions: 1 description: ---------------------------- revision 1.1 date: 2005-01-19 16:12:37 +0000; author: noel; state: Exp; Finally added to CVS. Don't know how I missed this one. ============================================================================= RCS file: /root/VimOutliner/VimOutliner/ftplugin/vo_base.vim,v Working file: ftplugin/vo_base.vim head: 2.59 branch: locks: strict access list: symbolic names: keyword substitution: kv total revisions: 59; selected revisions: 59 description: Vim Outliner Main Program File ---------------------------- revision 2.59 date: 2005-06-07 19:50:45 +0000; author: noel; state: Exp; lines: +2 -1 Re-removed the did_filetype() function. Restored the original variable-based solution. ---------------------------- revision 2.58 date: 2005-06-07 12:47:38 +0000; author: noel; state: Exp; lines: +1 -2 Modified switch that prevents the filetype from being loaded more than once. ---------------------------- revision 2.57 date: 2004-05-24 22:31:11 +0000; author: noel; state: Exp; lines: +0 -6 Removed a redundant PreformattedBodyText() function. ---------------------------- revision 2.56 date: 2004-05-24 15:56:34 +0000; author: noel; state: Exp; lines: +78 -0 Added highlighting and folding support for: Tables (marked with '|') User-defined, wrapping text (marked with '>') User-defined, non-wrapping text (marked with '<') ---------------------------- revision 2.55 date: 2004-05-17 15:18:20 +0000; author: noel; state: Exp; lines: +20 -1 Added Steve Litt's simple executable lines. ---------------------------- revision 2.54 date: 2004-05-17 14:18:27 +0000; author: noel; state: Exp; lines: +41 -16 Replaced system calls to 'date' with strftime(). Modified the time- and date-stamp functions. normal t append the time to the current heading normal T prepend the time to the current heading insert t insert the time at the cursor normal d append the date to the current heading normal D prepend the date to the current heading insert d insert the date at the cursor ---------------------------- revision 2.53 date: 2004-05-17 13:32:38 +0000; author: noel; state: Exp; lines: +2 -2 Added to end of sort commands. ---------------------------- revision 2.52 date: 2004-05-17 13:30:12 +0000; author: noel; state: Exp; lines: +167 -2 Added child-aware sorting functions. Mapped s to sort ascending. Mapped S to sort descending. ---------------------------- revision 2.51 date: 2004-03-18 13:25:46 +0000; author: noel; state: Exp; lines: +1 -1 Fixed a mapping command for w ---------------------------- revision 2.50 date: 2004-02-17 21:47:31 +0000; author: noel; state: Exp; lines: +0 -217 Removed the detailed revision log. It's getting too big. From now on 'cvs log' will need to be used to see the log. ---------------------------- revision 2.49 date: 2003-10-17 01:37:10 +0000; author: noel; state: Exp; lines: +24 -10 Fixed a minor folding issue. ---------------------------- revision 2.48 date: 2003-08-04 13:25:17 +0000; author: noel; state: Exp; lines: +37 -7 Corrected a type for w ---------------------------- revision 2.47 date: 2003-06-16 23:57:20 +0000; author: noel; state: Exp; lines: +7 -3 Set UseSpaceColon=0. This is now the standard. ---------------------------- revision 2.46 date: 2003-06-04 11:54:25 +0000; author: noel; state: Exp; lines: +24 -6 The behavior of the "d" and "t" commands have been improved and put into functions. These commands are now mapped to call the improved functions. ---------------------------- revision 2.45 date: 2003-06-04 11:25:56 +0000; author: noel; state: Exp; lines: +12 -3 Moved the modification to the tags path outside the "if" statement in autocommands in ftplugin. Completely removed the line from syntax. ---------------------------- revision 2.44 date: 2003-05-27 13:33:34 +0000; author: noel; state: Exp; lines: +45 -29 Added Vim style folds to both vo_base files to make them easier to read. Added a mode line to the end of each to activate the folds. Added a "Documentation" section that is mostly empty. This section will eventually be extracted automatically to form the online help via Vim's built-in help mechanisms. ---------------------------- revision 2.43 date: 2003-05-23 18:36:44 +0000; author: noel; state: Exp; lines: +7 -4 More trouble with the ,,d function and retaining proper indentation. ---------------------------- revision 2.42 date: 2003-05-23 16:02:42 +0000; author: noel; state: Exp; lines: +8 -2 Added tag file support for ~/.vimoutliner. ---------------------------- revision 2.41 date: 2003-05-23 13:55:25 +0000; author: noel; state: Exp; lines: +10 -6 Modified the d and t commands. They did not work properly on closed folds. Commented-out the d and t commands when in insert mode. I have not used them and they don't work properly. ---------------------------- revision 2.40 date: 2003-05-17 23:29:25 +0000; author: noel; state: Exp; lines: +11 -6 Modified date and time (,,d/,,t) to place date/time at beginning of line instead of end of line to allow for sorting. ---------------------------- revision 2.39 date: 2003-05-17 22:49:26 +0000; author: noel; state: Exp; lines: +20 -16 Changed ^M to in all occurrances. Modified date (d) and time (t) to add date/time to end of current line. ---------------------------- revision 2.38 date: 2003-03-05 17:58:22 +0000; author: cepl; state: Exp; lines: +6 -3 Personal configuration file was not run from the user's $HOME directory. Fixed. ---------------------------- revision 2.37 date: 2003-03-03 16:24:49 +0000; author: noel; state: Exp; lines: +6 -3 Added ~/.vim and ~/.vimoutliner as places to look for tag files. ---------------------------- revision 2.36 date: 2003-03-01 17:37:41 +0000; author: noel; state: Exp; lines: +13 -5 Changed the filetype name to our new standard: vo_base ---------------------------- revision 2.35 date: 2003-02-09 15:04:56 +0000; author: noel; state: Exp; lines: +70 -55 Changed key mappings to be local to the current buffer only. They will also be loaded for any subsequent .otl file. Changed key mappings to use an easily modifiable leader. In this case ",,". Changed the scope of some variables. They had a buffer scoping but now have a function scope. ---------------------------- revision 2.34 date: 2003-02-08 22:07:47 +0000; author: noel; state: Exp; lines: +5 -63 Removed spellfix functions. Perhaps I'll make them another plugin. ---------------------------- revision 2.33 date: 2003-02-08 21:31:01 +0000; author: noel; state: Exp; lines: +5 -116 Split out syntax settings as Dillon originally showed. ---------------------------- revision 2.32 date: 2003-01-30 01:47:41 +0000; author: noel; state: Exp; lines: +6 -3 modified switches sent to ispell to make it guess better. ---------------------------- revision 2.31 date: 2003-01-28 22:31:37 +0000; author: noel; state: Exp; lines: +6 -3 Modified setlocal foldtext.... to set foldtext.... ---------------------------- revision 2.30 date: 2003-01-22 22:03:12 +0000; author: noel; state: Exp; lines: +8 -3 Fixed bodytext folding method. ---------------------------- revision 2.29 date: 2003-01-21 00:18:50 +0000; author: noel; state: Exp; lines: +20 -7 Fixed a problem with runtimepath. Added a use_space_colon setting to that one can choose between bodytext marked with a : or with a space-:. ---------------------------- revision 2.28 date: 2003-01-19 16:46:27 +0000; author: noel; state: Exp; lines: +11 -3 Removed some strange escape characters from a revision comment. ---------------------------- revision 2.27 date: 2003-01-19 16:16:54 +0000; author: noel; state: Exp; lines: +101 -88 Added detection of the color scheme and an alternative set of colors for dark backgrounds. (well actually for non-"light" backgrounds) at Dillon Jones' request. Set the "current_syntax" at Dillon's request. Modified the exe lines in the source to remove the debugging style I was using. ---------------------------- revision 2.26 date: 2003-01-16 00:56:51 +0000; author: noel; state: Exp; lines: +26 -23 Changed a bunch of set commands to setlocal commands at the suggestion of Jeffrey Hood. Thanks, Jeffrey! ---------------------------- revision 2.25 date: 2003-01-13 17:05:08 +0000; author: noel; state: Exp; lines: +14 -11 Fixed a problem with the new regex that define headings. ---------------------------- revision 2.24 date: 2003-01-12 19:08:32 +0000; author: noel; state: Exp; lines: +36 -25 Converted from _ to : ---------------------------- revision 2.23 date: 2003-01-11 21:00:33 +0000; author: noel; state: Exp; lines: +55 -38 Added Matej requirement for personalization settings via .vimoutlinerrc. Added Steve's style of bodytext that allows for wrapping and formatting with have the headings wrap as well. It is currently set for "_" as the bodytext marker. Added ,,b to set all bodytext to Steve's style. Added ,,B to set all bodytext to my style. This will also make it possible for Steve's style to be quickly reformatted for pretty printing with :ha. ---------------------------- revision 2.22 date: 2003-01-11 00:35:32 +0000; author: noel; state: Exp; lines: +7 -2 [6~Added support for .vimoutlinerrc in both ~ and ~/.vimoutliner. ---------------------------- revision 2.21 date: 2002-12-12 13:38:58 +0000; author: noel; state: Exp; lines: +10 -3 Fixed a spelling problem when words contain a '. ---------------------------- revision 2.20 date: 2002-12-11 23:33:16 +0000; author: noel; state: Exp; lines: +7 -3 Removed a debug setting, again (sigh). Added some iskeyword symbols so spell-check would work on things like: don't ---------------------------- revision 2.19 date: 2002-12-11 22:55:19 +0000; author: noel; state: Exp; lines: +24 -11 Fixed body text end error. I was checking for too specific a case. ---------------------------- revision 2.18 date: 2002-12-11 14:57:52 +0000; author: noel; state: Exp; lines: +7 -4 Fixed wrapmargin setting and a line counter error during folding. ---------------------------- revision 2.17 date: 2002-12-11 00:42:47 +0000; author: noel; state: Exp; lines: +7 -3 Removed a debug setting, again. ---------------------------- revision 2.16 date: 2002-12-10 22:21:09 +0000; author: noel; state: Exp; lines: +19 -14 Moved body text up one tab level. It seems to be more intuitive to others. ---------------------------- revision 2.15 date: 2002-12-10 19:24:13 +0000; author: noel; state: Exp; lines: +6 -2 Added a function to auto-wrap lines. This could be a problem for entering long headings. ---------------------------- revision 2.14 date: 2002-12-10 18:11:13 +0000; author: noel; state: Exp; lines: +9 -3 Removed a debug feature ---------------------------- revision 2.13 date: 2002-12-10 17:59:42 +0000; author: noel; state: Exp; lines: +45 -15 Added bodytext. Added bodytext folding. Modified MyFoldText to show [TEXT] for folded bodytext. Added an autocommand to re-sync the folding. ---------------------------- revision 2.12 date: 2002-12-09 18:16:49 +0000; author: noel; state: Exp; lines: +11 -4 Fixed a typo and added an extra \ before & for adding upper cas3e words. ---------------------------- revision 2.11 date: 2002-12-09 17:15:37 +0000; author: noel; state: Exp; lines: +13 -5 Added ,,kA. Swapped functions of ,,ka and ,,kA. ,,ka add lowercase version of word to dictionary ,,kA add word as it appears to dictionary ---------------------------- revision 2.10 date: 2002-12-09 17:08:47 +0000; author: noel; state: Exp; lines: +15 -8 Fixed an error that occurs when there is just a single spelling checker. ---------------------------- revision 2.9 date: 2002-12-09 16:42:02 +0000; author: noel; state: Exp; lines: +13 -7 Fixed error messages on searches with no matches. This is part of the spell-check search. ---------------------------- revision 2.8 date: 2002-12-09 14:21:29 +0000; author: noel; state: Exp; lines: +11 -8 Fixed spelling highlighting and and spelling searches so that only real matches are highlighed and possible to jump to with ,,kn and ,,kN (and n and N after that). Modified the "source" statement that load spellfix.vim. Spellfix.vim now needs to be in ~/.vimoutliner. ---------------------------- revision 2.7 date: 2002-12-07 22:08:02 +0000; author: noel; state: Exp; lines: +30 -39 finished integration of spellfix.vim ---------------------------- revision 2.6 date: 2002-12-07 16:46:47 +0000; author: noel; state: Exp; lines: +86 -6 Added these commands to enhance the spelling checker ,,kk speck-check document highlighting errors ,,ka add the word under the cursor to the selected dictionary ,,kn search forward to the next spelling error N and n both work well with this ,,kN search backward to the next spelling error N and n both work well with this ,,kq unhighlight the spelling errors ---------------------------- revision 2.5 date: 2002-11-27 22:54:28 +0000; author: noel; state: Exp; lines: +22 -16 Changed date and time formats. changed the mappings of ,,0-,,9 so that ,,1 corresponds to show only 1 level. ---------------------------- revision 2.4 date: 2002-11-26 00:36:08 +0000; author: noel; state: Exp; lines: +68 -62 Added more comments. Added Steve's GPL header. Will keep the RCS info in my version but will remove it for distribution. ---------------------------- revision 2.3 date: 2002-11-21 19:30:37 +0000; author: noel; state: Exp; lines: +21 -8 Included a patchfile from Steve to: move the if loaded behavior to a place in the file after the settings add an if loaded behavior for the file extension autocommmand added the nocindent setting changed the ,,,, mapping clear the indexexpr setting ---------------------------- revision 2.2 date: 2002-11-16 00:00:10 +0000; author: noel; state: Exp; lines: +215 -196 Added more comments. Switched the polarity of the if exists(loaded_outliner) function Commented-out some experimental features. Grouped the user preferences together and separated out the VimOutliner operational settings. ---------------------------- revision 2.1 date: 2002-11-15 23:37:39 +0000; author: noel; state: Exp; Version 2 Beta Candidate before pre-release modifications ============================================================================= RCS file: /root/VimOutliner/VimOutliner/otf/otf.vim,v Working file: otf/otf.vim head: 1.3 branch: locks: strict access list: symbolic names: keyword substitution: kv total revisions: 3; selected revisions: 3 description: ---------------------------- revision 1.3 date: 2003-06-03 19:56:09 +0000; author: gabriel; state: Exp; lines: +2 -2 changed bash function to perl,corrected file name error in otf.vi ---------------------------- revision 1.2 date: 2003-06-02 21:01:16 +0000; author: gabriel; state: Exp; lines: +9 -9 created wishlist_demo.otl changed output files of Createotl() in otf.vim so users need only a ~/bin directory ---------------------------- revision 1.1 date: 2003-06-01 13:16:32 +0000; author: gabriel; state: Exp; new 'on the fly' files ============================================================================= RCS file: /root/VimOutliner/VimOutliner/otf/otfREADME,v Working file: otf/otfREADME head: 1.4 branch: locks: strict access list: symbolic names: keyword substitution: kv total revisions: 4; selected revisions: 4 description: ---------------------------- revision 1.4 date: 2003-06-03 20:21:43 +0000; author: gabriel; state: Exp; lines: +2 -1 instruction where to put otl.pl ---------------------------- revision 1.3 date: 2003-06-03 19:56:09 +0000; author: gabriel; state: Exp; lines: +2 -3 changed bash function to perl,corrected file name error in otf.vi ---------------------------- revision 1.2 date: 2003-06-02 21:01:16 +0000; author: gabriel; state: Exp; lines: +12 -7 created wishlist_demo.otl changed output files of Createotl() in otf.vim so users need only a ~/bin directory ---------------------------- revision 1.1 date: 2003-06-01 13:16:32 +0000; author: gabriel; state: Exp; new 'on the fly' files ============================================================================= RCS file: /root/VimOutliner/VimOutliner/otf/otl,v Working file: otf/otl head: 1.2 branch: locks: strict access list: symbolic names: keyword substitution: kv total revisions: 2; selected revisions: 2 description: ---------------------------- revision 1.2 date: 2003-06-02 21:01:16 +0000; author: gabriel; state: Exp; lines: +2 -5 created wishlist_demo.otl changed output files of Createotl() in otf.vim so users need only a ~/bin directory ---------------------------- revision 1.1 date: 2003-06-01 13:16:32 +0000; author: gabriel; state: Exp; new 'on the fly' files ============================================================================= RCS file: /root/VimOutliner/VimOutliner/otf/otl.pl,v Working file: otf/otl.pl head: 1.1 branch: locks: strict access list: symbolic names: keyword substitution: kv total revisions: 1; selected revisions: 1 description: ---------------------------- revision 1.1 date: 2003-06-03 19:57:00 +0000; author: gabriel; state: Exp; new script replacing otl ============================================================================= RCS file: /root/VimOutliner/VimOutliner/otf/wishlist_demo.otl,v Working file: otf/wishlist_demo.otl head: 1.3 branch: locks: strict access list: symbolic names: keyword substitution: kv total revisions: 3; selected revisions: 3 description: ---------------------------- revision 1.3 date: 2003-06-03 20:21:43 +0000; author: gabriel; state: Exp; lines: +2 -1 instruction where to put otl.pl ---------------------------- revision 1.2 date: 2003-06-02 21:29:49 +0000; author: gabriel; state: Exp; lines: +28 -18 changed Otl fns branch so it had the correct parents ---------------------------- revision 1.1 date: 2003-06-02 21:01:16 +0000; author: gabriel; state: Exp; created wishlist_demo.otl changed output files of Createotl() in otf.vim so users need only a ~/bin directory ============================================================================= RCS file: /root/VimOutliner/VimOutliner/scripts/vo_maketags.pl,v Working file: scripts/vo_maketags.pl head: 1.1 branch: locks: strict access list: symbolic names: keyword substitution: kv total revisions: 1; selected revisions: 1 description: ---------------------------- revision 1.1 date: 2003-06-20 14:13:15 +0000; author: noel; state: Exp; Final documentation tweaks for the final 0.3.0 release. ============================================================================= RCS file: /root/VimOutliner/VimOutliner/syntax/vo_base.vim,v Working file: syntax/vo_base.vim head: 2.47 branch: locks: strict access list: symbolic names: keyword substitution: kv total revisions: 47; selected revisions: 47 description: Vim Outliner Main Program File ---------------------------- revision 2.47 date: 2005-06-07 15:24:30 +0000; author: noel; state: Exp; lines: +4 -4 The color darkyellow does not appear to exist on some systems. This color has been changed to darkred. ---------------------------- revision 2.46 date: 2005-01-19 15:03:55 +0000; author: noel; state: Exp; lines: +2 -1 Fixed another W18 error. ---------------------------- revision 2.45 date: 2004-11-27 19:30:43 +0000; author: noel; state: Exp; lines: +6 -5 Minor syntax and installation adjustments. Change to vo_checkbox to fix a typo. ---------------------------- revision 2.44 date: 2004-05-24 15:56:34 +0000; author: noel; state: Exp; lines: +142 -19 Added highlighting and folding support for: Tables (marked with '|') User-defined, wrapping text (marked with '>') User-defined, non-wrapping text (marked with '<') ---------------------------- revision 2.43 date: 2004-02-17 21:48:47 +0000; author: noel; state: Exp; lines: +0 -297 Removed the embedded and out-of-date documentation. Removed the detailed revision log. It's too large. From now on 'cvs log' will be needed to see the log. ---------------------------- revision 2.42 date: 2003-10-17 01:34:03 +0000; author: noel; state: Exp; lines: +43 -30 Modified highlighting to support extended character sets. ---------------------------- revision 2.41 date: 2003-06-04 11:25:56 +0000; author: noel; state: Exp; lines: +5 -3 Moved the modification to the tags path outside the "if" statement in autocommands in ftplugin. Completely removed the line from syntax. ---------------------------- revision 2.40 date: 2003-05-27 15:03:26 +0000; author: noel; state: Exp; lines: +88 -23 Added some documentation on the commands. ---------------------------- revision 2.39 date: 2003-05-27 13:33:34 +0000; author: noel; state: Exp; lines: +73 -16 Added Vim style folds to both vo_base files to make them easier to read. Added a mode line to the end of each to activate the folds. Added a "Documentation" section that is mostly empty. This section will eventually be extracted automatically to form the online help via Vim's built-in help mechanisms. ---------------------------- revision 2.38 date: 2003-05-23 16:02:42 +0000; author: noel; state: Exp; lines: +8 -3 Added tag file support for ~/.vimoutliner. ---------------------------- revision 2.37 date: 2003-03-01 17:07:53 +0000; author: noel; state: Exp; lines: +34 -36 Removed the bold and underline glamour. It did not work with the level colorization nor properly cross line boundries. ---------------------------- revision 2.36 date: 2003-02-12 15:40:26 +0000; author: noel; state: Exp; lines: +41 -32 Added some glamour. *word* make word bold and _word_ underlines a word. ---------------------------- revision 2.35 date: 2003-02-09 14:54:10 +0000; author: noel; state: Exp; lines: +7 -3 Removed syntax highlighting for SpellErrors and BadWord. The plugins include their own. ---------------------------- revision 2.34 date: 2003-02-08 21:59:25 +0000; author: noel; state: Exp; lines: +36 -31 Added SpellErrors and BadWord to the contains attributes of headings and bodytext. Now we're compatible with engspchk and vimspell. ---------------------------- revision 2.33 date: 2003-02-08 21:34:46 +0000; author: noel; state: Exp; lines: +5 -213 Split out functions as Dillon originally showed. ---------------------------- revision 2.32 date: 2003-01-30 01:47:41 +0000; author: noel; state: Exp; lines: +6 -3 modified switches sent to ispell to make it guess better. ---------------------------- revision 2.31 date: 2003-01-28 22:31:37 +0000; author: noel; state: Exp; lines: +6 -3 Modified setlocal foldtext.... to set foldtext.... ---------------------------- revision 2.30 date: 2003-01-22 22:03:12 +0000; author: noel; state: Exp; lines: +8 -3 Fixed bodytext folding method. ---------------------------- revision 2.29 date: 2003-01-21 00:18:50 +0000; author: noel; state: Exp; lines: +20 -7 Fixed a problem with runtimepath. Added a use_space_colon setting to that one can choose between bodytext marked with a : or with a space-:. ---------------------------- revision 2.28 date: 2003-01-19 16:46:27 +0000; author: noel; state: Exp; lines: +11 -3 Removed some strange escape characters from a revision comment. ---------------------------- revision 2.27 date: 2003-01-19 16:16:54 +0000; author: noel; state: Exp; lines: +101 -88 Added detection of the color scheme and an alternative set of colors for dark backgrounds. (well actually for non-"light" backgrounds) at Dillon Jones' request. Set the "current_syntax" at Dillon's request. Modified the exe lines in the source to remove the debugging style I was using. ---------------------------- revision 2.26 date: 2003-01-16 00:56:51 +0000; author: noel; state: Exp; lines: +26 -23 Changed a bunch of set commands to setlocal commands at the suggestion of Jeffrey Hood. Thanks, Jeffrey! ---------------------------- revision 2.25 date: 2003-01-13 17:05:08 +0000; author: noel; state: Exp; lines: +14 -11 Fixed a problem with the new regex that define headings. ---------------------------- revision 2.24 date: 2003-01-12 19:08:32 +0000; author: noel; state: Exp; lines: +36 -25 Converted from _ to : ---------------------------- revision 2.23 date: 2003-01-11 21:00:33 +0000; author: noel; state: Exp; lines: +55 -38 Added Matej requirement for personalization settings via .vimoutlinerrc. Added Steve's style of bodytext that allows for wrapping and formatting with have the headings wrap as well. It is currently set for "_" as the bodytext marker. Added ,,b to set all bodytext to Steve's style. Added ,,B to set all bodytext to my style. This will also make it possible for Steve's style to be quickly reformatted for pretty printing with :ha. ---------------------------- revision 2.22 date: 2003-01-11 00:35:32 +0000; author: noel; state: Exp; lines: +7 -2 [6~Added support for .vimoutlinerrc in both ~ and ~/.vimoutliner. ---------------------------- revision 2.21 date: 2002-12-12 13:38:58 +0000; author: noel; state: Exp; lines: +10 -3 Fixed a spelling problem when words contain a '. ---------------------------- revision 2.20 date: 2002-12-11 23:33:16 +0000; author: noel; state: Exp; lines: +7 -3 Removed a debug setting, again (sigh). Added some iskeyword symbols so spell-check would work on things like: don't ---------------------------- revision 2.19 date: 2002-12-11 22:55:19 +0000; author: noel; state: Exp; lines: +24 -11 Fixed body text end error. I was checking for too specific a case. ---------------------------- revision 2.18 date: 2002-12-11 14:57:52 +0000; author: noel; state: Exp; lines: +7 -4 Fixed wrapmargin setting and a line counter error during folding. ---------------------------- revision 2.17 date: 2002-12-11 00:42:47 +0000; author: noel; state: Exp; lines: +7 -3 Removed a debug setting, again. ---------------------------- revision 2.16 date: 2002-12-10 22:21:09 +0000; author: noel; state: Exp; lines: +19 -14 Moved body text up one tab level. It seems to be more intuitive to others. ---------------------------- revision 2.15 date: 2002-12-10 19:24:13 +0000; author: noel; state: Exp; lines: +6 -2 Added a function to auto-wrap lines. This could be a problem for entering long headings. ---------------------------- revision 2.14 date: 2002-12-10 18:11:13 +0000; author: noel; state: Exp; lines: +9 -3 Removed a debug feature ---------------------------- revision 2.13 date: 2002-12-10 17:59:42 +0000; author: noel; state: Exp; lines: +45 -15 Added bodytext. Added bodytext folding. Modified MyFoldText to show [TEXT] for folded bodytext. Added an autocommand to re-sync the folding. ---------------------------- revision 2.12 date: 2002-12-09 18:16:49 +0000; author: noel; state: Exp; lines: +11 -4 Fixed a typo and added an extra \ before & for adding upper cas3e words. ---------------------------- revision 2.11 date: 2002-12-09 17:15:37 +0000; author: noel; state: Exp; lines: +13 -5 Added ,,kA. Swapped functions of ,,ka and ,,kA. ,,ka add lowercase version of word to dictionary ,,kA add word as it appears to dictionary ---------------------------- revision 2.10 date: 2002-12-09 17:08:47 +0000; author: noel; state: Exp; lines: +15 -8 Fixed an error that occurs when there is just a single spelling checker. ---------------------------- revision 2.9 date: 2002-12-09 16:42:02 +0000; author: noel; state: Exp; lines: +13 -7 Fixed error messages on searches with no matches. This is part of the spell-check search. ---------------------------- revision 2.8 date: 2002-12-09 14:21:29 +0000; author: noel; state: Exp; lines: +11 -8 Fixed spelling highlighting and and spelling searches so that only real matches are highlighed and possible to jump to with ,,kn and ,,kN (and n and N after that). Modified the "source" statement that load spellfix.vim. Spellfix.vim now needs to be in ~/.vimoutliner. ---------------------------- revision 2.7 date: 2002-12-07 22:08:02 +0000; author: noel; state: Exp; lines: +30 -39 finished integration of spellfix.vim ---------------------------- revision 2.6 date: 2002-12-07 16:46:47 +0000; author: noel; state: Exp; lines: +86 -6 Added these commands to enhance the spelling checker ,,kk speck-check document highlighting errors ,,ka add the word under the cursor to the selected dictionary ,,kn search forward to the next spelling error N and n both work well with this ,,kN search backward to the next spelling error N and n both work well with this ,,kq unhighlight the spelling errors ---------------------------- revision 2.5 date: 2002-11-27 22:54:28 +0000; author: noel; state: Exp; lines: +22 -16 Changed date and time formats. changed the mappings of ,,0-,,9 so that ,,1 corresponds to show only 1 level. ---------------------------- revision 2.4 date: 2002-11-26 00:36:08 +0000; author: noel; state: Exp; lines: +68 -62 Added more comments. Added Steve's GPL header. Will keep the RCS info in my version but will remove it for distribution. ---------------------------- revision 2.3 date: 2002-11-21 19:30:37 +0000; author: noel; state: Exp; lines: +21 -8 Included a patchfile from Steve to: move the if loaded behavior to a place in the file after the settings add an if loaded behavior for the file extension autocommmand added the nocindent setting changed the ,,,, mapping clear the indexexpr setting ---------------------------- revision 2.2 date: 2002-11-16 00:00:10 +0000; author: noel; state: Exp; lines: +215 -196 Added more comments. Switched the polarity of the if exists(loaded_outliner) function Commented-out some experimental features. Grouped the user preferences together and separated out the VimOutliner operational settings. ---------------------------- revision 2.1 date: 2002-11-15 23:37:39 +0000; author: noel; state: Exp; Version 2 Beta Candidate before pre-release modifications ============================================================================= RCS file: /root/VimOutliner/VimOutliner/tarballs/vimoutliner-0.3.2.tar.gz,v Working file: tarballs/vimoutliner-0.3.2.tar.gz head: 1.1 branch: locks: strict access list: symbolic names: keyword substitution: kv total revisions: 1; selected revisions: 1 description: ---------------------------- revision 1.1 date: 2004-02-23 12:34:28 +0000; author: noel; state: Exp; Adding for posterity's sake. ============================================================================= RCS file: /root/VimOutliner/VimOutliner/tarballs/vimoutliner-0.3.2a.tar.gz,v Working file: tarballs/vimoutliner-0.3.2a.tar.gz head: 1.1 branch: locks: strict access list: symbolic names: keyword substitution: kv total revisions: 1; selected revisions: 1 description: ---------------------------- revision 1.1 date: 2004-02-23 12:34:28 +0000; author: noel; state: Exp; Adding for posterity's sake. ============================================================================= RCS file: /root/VimOutliner/VimOutliner/tarballs/vimoutliner.0.3.1.tgz,v Working file: tarballs/vimoutliner.0.3.1.tgz head: 1.1 branch: locks: strict access list: symbolic names: keyword substitution: kv total revisions: 1; selected revisions: 1 description: ---------------------------- revision 1.1 date: 2003-10-17 02:21:28 +0000; author: noel; state: Exp; Official version 0.3.1 ============================================================================= vimoutliner-0.3.4/INSTALL0000644000175000017500000001331710255542735013615 0ustar noelnoelINSTALLING AND TESTING VIMOUTLINER How do I install VimOutliner? Automatic Method |vo-auto-install| Updating |vo-updating| Manual Method |vo-manual-install| Testing |vo-testing| Automatic method The new automatic installation targets Unix-compatible platforms. $ tar xzvf vimoutliner-0.3.x.tar.gz $ cd vimoutliner $ ./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 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 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. Testing base functionality 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 vimoutliner-0.3.4/ftdetect/0000755000175000017500000000000010255542735014361 5ustar noelnoelvimoutliner-0.3.4/ftdetect/vo_base.vim0000640000175000017500000000530110255542735016507 0ustar noelnoel"# ####################################################################### "# filetype.vim: filetype loader "# VimOutliner functions, commands and settings, version 0.2.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 "# 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 "# "# ####################################################################### "filetype.vim "http://www.troubleshooters.com/projects/vimoutliner "Internal RCS "$Revision: 1.1 $" "$Date: 2005/01/19 16:12:37 $ "$Log: vo_base.vim,v $ "Revision 1.1 2005/01/19 16:12:37 noel "Finally added to CVS. "Don't know how I missed this one. " "Revision 1.4 2003/03/01 17:37:17 noel "Changed the filetype name to our new standard: vo_base " "Revision 1.3 2003/02/14 17:49:43 noel "Removed unnecessary filetype commands " "Revision 1.2 2003/02/09 15:07:35 noel "Changed the auto commands. Setting the "filetype plugin indent on" "option here does not work with ftplugins. " "Revision 1.1 2003/02/08 21:11:26 noel "Initial revision " if exists("did_load_filetypes") finish endif augroup filetypedetect au! BufRead,BufNewFile *.otl setfiletype vo_base au! BufRead,BufNewFile *.oln setfiletype xoutliner augroup END vimoutliner-0.3.4/scripts/0000755000175000017500000000000010255542735014246 5ustar noelnoelvimoutliner-0.3.4/scripts/vo_maketags.pl0000744000175000017500000001575610255542735017122 0ustar noelnoel#!/usr/bin/perl -w # ####################################################################### # vo_maketags.pl: Vim outline tagging system, main program, version 0.1.2 # 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 # V0.1.0 Pre-alpha # Starting at a "top level" indent-defined Vim outline, this # program finds all "tags" defined as headlines starting with # _tag_, and containing a subheadline containing the file # to which the tag should jump. This program creates a tags # file. #Steve Litt, 5/28/2001 #End of version 0.1.0 # # V0.1.1 Pre-alpha # Bug fixes, including ../ resolution # #Steve Litt, 5/28/2001 #End of version 0.1.1 # # # V0.1.2 Pre-alpha # More bug fixes, and facility to create a new outline # file from a tag whose corresponding file doesn't yet # exist. #Steve Litt, 5/30/2001 #End of version 0.1.2 # # V0.1.3 Pre-alpha # More bug fixes. This was the first version released # file from a tag whose corresponding file doesn't yet # exist. #Steve Litt, 6/01/2001 #End of version 0.1.3 # # V0.2.0 Pre-alpha #Steve Litt, 12/03/2002 # This file unchanged. The overall Vimoutliner version # 0.2.0 has extensive improvements, including intuitive # collapse/expand. #End of version 0.2.0 #END OF HISTORY # # # V0.1.2 Pre-alpha # More bug fixes, and facility to create a new outline # file from a tag whose corresponding file doesn't yet # exist. #Steve Litt, 5/30/2001 #End of version 0.1.2 #END OF HISTORY # # ####################################################################### use strict; use vars qw($TAGFILENAME); use Cwd; $TAGFILENAME = $ENV{"HOME"} . "/.vimoutliner/vo_tags.tag"; sub process1Outline($$); #Early prototype the recursive routine sub makeDirectory($); #Early prototype the recursive routine sub makeTagFileStartingAt($) { unless(@ARGV == 1) { usage(); die; } my($absoluteFileName) = deriveAbsoluteFileName(Cwd::cwd(), $_[0]); my(%processedFiles) = (); recordFileAsProcessed($absoluteFileName,\%processedFiles); unlink $TAGFILENAME; process1Outline($absoluteFileName, \%processedFiles); sortAndDeleteDupsFromTagFile(); } sub sortAndDeleteDupsFromTagFile() { my($TEMPTAGFILENAME) = "$ENV{'HOME'}/temptagfile.tag"; system("sort $TAGFILENAME | uniq > $TEMPTAGFILENAME"); system("rm $TAGFILENAME"); system("mv $TEMPTAGFILENAME $TAGFILENAME"); } sub process1Outline($$) { my($fileName) = $_[0]; my($processedFilesHashRef) = $_[1]; unless(fileExists($fileName)) { makeDirectory($fileName); makeEmptyFile($fileName); } print "Begin processing file $fileName.\n"; my($baseDirectory) = getBaseDirectory($fileName); my(%tags) = getTagsFromFile($fileName); my(@tagKeys) = keys(%tags); my($tagKey); foreach $tagKey (@tagKeys) { my($absoluteFileName); if(isAbsoluteFilePath($tags{$tagKey})) { $absoluteFileName = $tags{$tagKey}; } else { $absoluteFileName = deriveAbsoluteFileName($baseDirectory, $tags{$tagKey}); } appendTagToTagFile($tagKey,$absoluteFileName); if(notProcessedYet($absoluteFileName, $processedFilesHashRef)) { recordFileAsProcessed($absoluteFileName,$processedFilesHashRef); process1Outline($absoluteFileName, $processedFilesHashRef); } } } sub appendTagToTagFile($$) { open(TAGFILE, ">>$TAGFILENAME"); print TAGFILE "$_[0] $_[1] :1\n"; close(TAGFILE); } sub makeEmptyFile($) { open(OUTLINEFILE, ">" . $_[0]); close(OUTLINEFILE); } sub makeDirectory($) { my($completeFileName) = $_[0]; my($directoryName) = ($completeFileName =~ m/^(.*?)[^\/]*$/); unless($directoryName eq "") { my($temp) = ($directoryName =~ m/^(.*).$/); makeDirectory($temp); print "Creating $directoryName..."; if(mkdir $directoryName) { print " succeeded.\n"; } else { print " no action: $!.\n"; } } } sub fileExists($) { my($outlineFileName) = $_[0]; my($success) = open(OUTLINEFILE, "<" . $outlineFileName); if($success) { close(OUTLINEFILE); return(1); } else { return(0); } } sub getTagsFromFile($) { my($outlineFileName) = $_[0]; my(%tags); my($tagString) = ""; my($success) = open(OUTLINEFILE, "<" . $outlineFileName); unless($success) { print "Failed to open $outlineFileName\n"; return(()); } while() { my($line) = $_; chomp($line); if($line =~ m/^\s*(_tag_\S+)/) { $tagString = $1; } elsif($tagString ne "") { $line =~ m/^\s*(\S+)/; my($filename) = $1; $tags{$tagString} = deriveAbsoluteFileName(getBaseDirectory($_[0]), $1); $tagString = ""; } } return(%tags); } sub recordFileAsProcessed($$) { my($absoluteFileName) = $_[0]; my($processedFilesHashRef) = $_[1]; ${$processedFilesHashRef}{$absoluteFileName} = "1"; } sub notProcessedYet($$) { my($absoluteFileName) = $_[0]; my(%processedFiles) = %{$_[1]}; if(defined($processedFiles{$absoluteFileName})) { return(0); } else { return(1); } } sub dia($) { print "dia " . $_[0] . "\n"; } sub isAbsoluteFilePath($) { if($_[0] =~ m/^\//) { return 1; } else { return 0; } } sub getFileNameOnly($) { my($fileString); if ($_[0] =~ m/.+\/(.*)$/) { $fileString= $1 } else { $fileString = $_[0]; } return $fileString; } sub getBaseDirectory($) { my($dirString) = ($_[0] =~ m/(.+\/).*$/); return $dirString; } sub deriveAbsoluteFileName($$) { my($absoluteFileName); my($baseDirectory) = $_[0]; my($passedFileName) = $_[1]; unless($baseDirectory =~ m/\/$/) { $baseDirectory= $baseDirectory . "/"; } if($passedFileName =~ m/^\//) { $absoluteFileName = $passedFileName; } else { $absoluteFileName = $baseDirectory . $passedFileName; } $absoluteFileName =~ s/\/\.\//\//g; #remove all "./"; deleteDoubleDots($absoluteFileName); return($absoluteFileName); } sub deleteDoubleDots($) { while($_[0] =~ m/\.\./) { $_[0] =~ s/\/[^\/]*\/\.\.//; } } sub usage() { print "\nUsage is:\n"; print "otltags topLevelOutlineFileName\n\n"; } makeTagFileStartingAt($ARGV[0]) vimoutliner-0.3.4/experimental/0000755000175000017500000000000010255542735015254 5ustar noelnoel