" Vimball Archiver by Charles E. Campbell, Jr., Ph.D.
UseVimball
finish
syntax/hyperlist.vim [[[1
551
" Vim syntax and filetype plugin for HyperList files (.hl)
" Language: Self defined markup and functions for HyperLists in Vim
" Author: Geir Isene
" Web_site: http://isene.com/
" WOIM_def: http://isene.com/hyperlist.pdf
" License: I release all copyright claims.
" This code is in the public domain.
" Permission is granted to use, copy modify, distribute, and
" sell this software for any purpose. I make no guarantee
" about the suitability of this software for any purpose and
" I am not liable for any damages resulting from its use.
" Further, I am under no obligation to maintain or extend
" this software. It is provided on an 'as is' basis without
" any expressed or implied warranty.
" Version: 2.1 - compatible with the HyperList definition v. 2
" Modified: 2012-04-16
" Changes: Better syntax highlighting for folds (both term & gui and
" both for dark and light backgrounds).
" Added "sync minlines/maxlines" settings to be changed for
" slow computers.
" INSTRUCTIONS {{{1
"
" Use tabs/shifts or * for indentations
"
" Use to toggle one fold.
" Use \0 to \9, \a, \b, \c, \d, \e, \f to show up to 15 levels expanded.
"
" As a sort of "presentation mode", you can traverse a WOIM list by using
" g or g to view only the current line and its ancestors.
" An alternative is and to open more levels down.
"
" Use "gr" when the cursor is on a reference to jump to the referenced item.
" A reference can be in the list or to a file by the use of
" #file:/pathto/filename, #file:~/filename or #file:filename.
"
" Use u to toggle underlining of Transitions, States or no underlining.
"
" Use v to add a checkbox at start of item or to toggle a checkbox.
" Use V to add/toggle a checkbox with a date stamp for completion.
"
" Use to go to the next open template element.
" (A template element is a HyperList item ending in an equal sign).
"
" Use L to convert the entire document to LaTaX.
" Use H to convert the entire document to HTML.
"
" Use z encrypts the current line (including all sublevels if folded).
" Use Z encrypts the current file (all lines).
" Use x decrypts the current line.
" Use X decrypts the current file (all lines).
" z and x can be used with visual ranges.
"
" A dot file (file name starts with a "." such as .test.woim) is
" automatically encrypted on save and decrypted on opening.
"
" Syntax is updated at start and every time you leave Insert mode.
" Initializing {{{1
if version < 600
syntax clear
elseif exists("b:current_syntax")
finish
endif
" Basic settings {{{1
let b:current_syntax="HyperList"
set autoindent
set textwidth=0
set shiftwidth=2
set tabstop=2
set softtabstop=2
set noexpandtab
set foldmethod=syntax
set fillchars=fold:\
syn sync fromstart
autocmd InsertLeave * :syntax sync fromstart
" Lower the next two values if you have a slow computer
syn sync minlines=50
syn sync maxlines=200
" Functions {{{1
" Folding {{{2
" Mapped to and 0 - f
set foldtext=HLFoldText()
function! HLFoldText()
let line = getline(v:foldstart)
let myindent = indent(v:foldstart)
let line = substitute(line, '^\s*', '', 'g')
while myindent != 0
let myindent = myindent - 1
let line = ' ' . line
endwhile
return line
endfunction
" Underlining States/Transitions {{{2
" Mapped to u
let g:STu=0
hi link HLstate NONE
hi link HLtrans NONE
function! STunderline()
if g:STu == 0
hi link HLtrans NONE
hi link HLstate underlined
let g:STu = 1
elseif g:STu == 1
hi link HLstate NONE
hi link HLtrans underlined
let g:STu = 2
elseif g:STu == 2
hi link HLstate NONE
hi link HLtrans NONE
let g:STu = 0
endif
endfunction
" Checkbox and timestamp {{{2
" Mapped to v and V
function! CheckItem (stamp)
let current_line = getline('.')
if match(current_line,'\V[_]') >= 0
let time = strftime("%Y-%m-%d %H.%M")
exe 's/\V[_]/[x]/'
if a:stamp == "stamped"
exe "normal 0f]a ".time.":"
endif
elseif match(current_line,'\V[x]') >= 0
exe 's/\V[x]/[_]/i'
exe 's/\V[_] \d\d\d\d-\d\d-\d\d \d\d\.\d\d:/[_]/e'
else
exe "normal ^i[_] "
endif
endfunction
" Goto reference {{{2
" Mapped to 'gr'
if !exists("*GotoRef")
function! GotoRef()
let current_line = getline('.')
if match(current_line,'#') >= 0
if match(current_line,'file:') >=0
if match(current_line,"#.* ") >= 0
let ref_word = matchstr(current_line,"#.* ")
else
let ref_word = matchstr(current_line,"#.*$")
endif
let ref_word = substitute(ref_word, '#file:', '', 'g')
exe "edit " . fnameescape(ref_word)
return
endif
if match(current_line,"#\'") >= 0
let ref_word = matchstr(current_line,"#\'.*\'")
let ref_word = substitute(ref_word, "\'", '', 'g')
let ref_word = substitute(ref_word, '#', '', 'g')
let ref_dest = substitute(ref_word, '/', '.*\\n\\s*.\\{-}', 'g')
let ref_dest = "\\\(#\\\'\\\)\\\@= 0
let ref_word = matchstr(current_line,"#.* ")
else
let ref_word = matchstr(current_line,"#.*$")
endif
let ref_word = substitute(ref_word, '#', '', 'g')
let ref_dest = substitute(ref_word, '/', '.*\\n\\s*.\\{-}', 'g')
let ref_dest = "#\\\@H'
function! HTMLconversion ()
try
"Remove VIM tagline
execute '%s/^vim:.*//g'
catch
endtry
try
"first line of a HyperList is bold
execute '%s/^\(\S.*\)$/\1/g'
catch
endtry
try
"HLb
execute '%s/ \@<=\*\(.\{-}\)\* /\1/g'
catch
endtry
try
"HLi
execute '%s/ \@<=\/\(.\{-}\)\/ /\1/g'
catch
endtry
try
"HLu
execute '%s/ \@<=_\(.\{-}\)_ /\1/g'
catch
endtry
try
"HLquote
execute '%s/\(\".*\"\)/\1/g'
catch
endtry
try
"HLcomment
execute '%s/\((.*)\)/\1/g'
catch
endtry
try
"HLindent
execute "%s/\\(\\t\\|\\*\\)\\@<=\\(\\d.\\{-}\\)\\s/\\2 /g"
catch
endtry
try
"HLmulti (+)
execute '%s/\(\t\|\*\)+/\t+/g'
catch
endtry
try
"HLref
execute "%s/\\(#\\{1,2}\\(\\'[a-zA-ZæøåÆØÅ0-9,.:/ _&?%=\\-\\*]\\+\\'\\|[a-zA-ZæøåÆØÅ0-9.:/_&?%=\\-\\*]\\+\\)\\)/\\1/g"
catch
endtry
try
"HLmove
execute '%s/\(>>\|<\|\1/g'
catch
endtry
try
"HLqual
execute '%s/\(\[.\{-}\]\)/\1/g'
catch
endtry
try
"HLop
execute "%s/\\(\\s\\|\\*\\)\\@<=\\([A-ZÆØÅ_/]\\{-2,}:\\s\\)/\\2/g"
catch
endtry
try
"HLtag
execute "%s/\\(\\s\\|\\*\\)\\@<=\\([a-zA-ZæøåÆØÅ0-9,._&?%= \\-\\/+<>#']\\{-2,}:\\s\\)/\\2/g"
catch
endtry
try
"HLsc
execute '%s/\(;\)/\1/g'
catch
endtry
try
"Substitute space in second line of multi-item
execute '%s/\(^\|\t\|\*\)\@<=\(\t\|\*\) /\ \ \ \ \ \ /g'
catch
endtry
try
"Substitute tabs
execute '%s/\(^\|\t\|\*\)\@<=\(\t\|\*\)/\ \ \ \ /g'
catch
endtry
try
"Substitute newlines with
execute '%s/\n/\r/g'
catch
endtry
"Document start
normal ggO
normal o
normal o
normal oHyperList
normal o
normal o
normal o
normal o
"Document end
normal GO
normal o
set filetype=html
endfunction
" LaTeX conversion{{{2
" Mapped to 'L'
function! LaTeXconversion ()
try
"Remove VIM tagline
execute '%s/^vim:.*//g'
catch
endtry
try
"Escape "\"
execute '%s/\\/\\\\/g'
catch
endtry
try
"Escape "{"
execute '%s/{/\\{/g'
catch
endtry
try
"Escape "}"
execute '%s/}/\\}/g'
catch
endtry
try
"HLb
execute '%s/ \@<=\*\(.\{-}\)\* /\\textbf{ \1 }/g'
catch
endtry
try
"HLi
execute '%s/ \@<=\/\(.\{-}\)\/ /\\textsl{ \1 }/g'
catch
endtry
try
"HLu
execute '%s/ \@<=_\(.\{-}\)_ /\\underline{ \1 }/g'
catch
endtry
try
"HLindent
execute '%s/\(\t\|\*\)\@<=\([0-9.]\+\.\s\)/\1\\textcolor{v}{\2}/g'
catch
endtry
try
"HLmulti
execute '%s/\(\t\|\*\)+/\\tab \\textcolor{v}{+}/g'
catch
endtry
try
"HLref
execute "%s/\\(#\\{1,2}\\(\\'[a-zA-ZæøåÆØÅ0-9,.:/ _&?%=\\-\\*]\\+\\'\\|[a-zA-ZæøåÆØÅ0-9.:/_&?%=\\-\\*]\\+\\)\\)/\\\\textcolor{v}{\\1}/g"
catch
endtry
try
"HLquote
execute '%s/\(\".*\"\)/\\textcolor{t}{\1}/g'
catch
endtry
try
"HLcomment
execute '%s/\((.*)\)/\\textcolor{t}{\1}/g'
catch
endtry
try
"HLmove
execute '%s/\(>>\|<\|#']\\{-2,}:\\s\\)/\\\\textcolor{r}{\\emph{\\2}}/g"
catch
endtry
try
"HLsc
execute '%s/\(;\)/\\textcolor{g}{\1}/g'
catch
endtry
try
"Substitute tabs
execute '%s/\(^\|\t\|\*\)\@<=\(\t\|\*\)/ /g'
catch
endtry
"Document start
normal ggO%Created by the HyperList vim plugin, see:
normal o%http://vim.sourceforge.net/scripts/script.php?script_id=2518
normal o
normal o\documentclass[10pt]{article}
normal o\usepackage[margin=1cm]{geometry}
normal o\usepackage[usenames]{color}
normal o\usepackage{alltt}
normal o\definecolor{r}{rgb}{0.5,0,0}
normal o\definecolor{g}{rgb}{0,0.5,0}
normal o\definecolor{b}{rgb}{0,0,0.5}
normal o\definecolor{v}{rgb}{0.4,0,0.4}
normal o\definecolor{t}{rgb}{0,0.4,0.4}
normal o
normal o\begin{document}
normal o\begin{alltt}
"Document end
normal Go\end{alltt}
normal o\end{document}
set filetype=tex
endfunction
" Syntax definitions {{{1
" HyperList elements {{{2
" Identifier (any number in front)
syn match HLident "^\(\t\|\*\)\+[0-9]\S*"
" Multi-line
syn match HLmulti "^\(\t\|\*\)\++ "
" State & Transitions
syn match HLstate "\(\(\s\|\*\)\(S: \|| \)\)\@<=[^;]*" contains=HLtodo,HLop,HLcomment,HLref,HLqual,HLsc,HLmove,HLtag,HLquote
syn match HLtrans "\(\(\s\|\*\)\(T: \|/ \)\)\@<=[^;]*" contains=HLtodo,HLop,HLcomment,HLref,HLqual,HLsc,HLmove,HLtag,HLquote
" Qualifiers are enclosed within [ ]
syn match HLqual "\[.\{-}\]" contains=HLtodo,HLref,HLcomment
" Tags - anything that ends in a colon
syn match HLtag '\(\s\|\*\)\@<=[a-zA-ZæøåÆØÅ0-9,._&?%= \-\/+<>#'\*:]\{-2,}:\s' contains=HLtodo,HLcomment,HLquote,HLref
" HyperList operators
syn match HLop '\(\s\|\*\)\@<=[A-ZÆØÅ_/\-()]\{-2,}:\s' contains=HLcomment,HLquote
" Mark semicolon as stringing together lines
syn match HLsc ";"
" References start with a hash (#)
syn match HLref "#\{1,2}\(\'[a-zA-ZæøåÆØÅ0-9,.:/ _&?%=+\-\*]\+\'\|[a-zA-ZæøåÆØÅ0-9.:/_&?%=+\-\*]\+\)" contains=HLcomment
" Reserved key words
syn keyword HLkey END SKIP
" Marking literal start and end (a whole literal region is folded as one block)
syn match HLlit "\(\s\|\*\)\@<=\\$"
" Content of litaral (with no syntax highlighting)
syn match HLlc "\(\s\|\*\)\\\_.\{-}\(\s\|\*\)\\" contains=HLlit
" Comments are enclosed within ( )
syn match HLcomment "(.\{-})" contains=HLtodo,HLref
" Text in quotation marks
syn match HLquote '".\{-}"' contains=HLtodo,HLref
" TODO or FIXME
syn keyword HLtodo TODO FIXME
" Item motion
syn match HLmove ">>\|<\|0 :set foldlevel=0
map 1 :set foldlevel=1
map 2 :set foldlevel=2
map 3 :set foldlevel=3
map 4 :set foldlevel=4
map 5 :set foldlevel=5
map 6 :set foldlevel=6
map 7 :set foldlevel=7
map 8 :set foldlevel=8
map 9 :set foldlevel=9
map a :set foldlevel=10
map b :set foldlevel=11
map c :set foldlevel=12
map d :set foldlevel=13
map e :set foldlevel=14
map f :set foldlevel=15
map za
map u :call STunderline()
map v :call CheckItem("")
map V :call CheckItem("stamped")
map /=\s*$A
map gr :call GotoRef()
nmap g0zv
nmap gf0zv
nmap 0zvzO
nmap f0zvzO
nmap z V:!openssl bf -e -a -salt 2>/dev/null
vmap z :!openssl bf -e -a -salt 2>/dev/null
nmap Z :%!openssl bf -e -a -salt 2>/dev/null
nmap x V:!openssl bf -d -a 2>/dev/null
vmap x :!openssl bf -d -a 2>/dev/null
nmap X :%!openssl bf -d -a 2>/dev/null
nmap L :call LaTeXconversion()
nmap H :call HTMLconversion()
" vim modeline {{{1
" vim: sw=2 sts=2 et fdm=marker fillchars=fold\:\ :
doc/hyperlist.txt [[[1
1278
*hyperlist.txt* The VIM plugin for HyperList (version 2.1)
HyperList is a way to describe anything - any state, item(s), pattern, action,
process, transition, program, instruction set etc. So, you can use it as an
outliner, a ToDo list handler, a process design tool, a data modeler, or any
other way you want to describe something.
This plugin incorporates encryption. You can encrypt any part of a HyperList or
take advantage of the autoencryption feature by making the HyperList a dot file
- i.e. prefixing the file name wiht a dot (such as ".password.hl"). You can use
this plugin to make a password safe.
The VIM plugin version numbers correspond to the HyperList definition version
numbers with the VIM plugin adding another increment of versioning, e.g VIM
plugin version 2.1.5 would be compatible with HyperList definition version 2.1.
This documentation contains the full HyperList definition. For a more
comprehensive manual that also includes plenty of examples, read the official
definition document:
http://isene.com/hyperlist.pdf
HyperList was formerly known as WOIM. The ftdetect file contains the file
suffix ".woim" for backward compatability so that these file typeas are also
treated as HyperList files.
==============================================================================
CONTENTS *HyperList-Contents*
1 HyperList VIM Plugin....................|HyperList-Plugin|
2 Background and definition...............|HyperList-Background|
3 HyperLists..............................|HyperLists|
4 HyperList Items.........................|HyperList-Item|
4.1 Starter...............................|HyperList-Starter|
4.2 Type..................................|HyperList-Type|
4.3 Content...............................|HyperList-Content|
4.3.1 Elements............................|HyperList-Elements|
4.3.1.1 Operator..........................|HyperList-Operator|
4.3.1.2 Qualifier.........................|HyperList-Qualifier|
4.3.1.3 Tags..............................|HyperList-Tags|
4.3.1.4 Description.......................|HyperList-Description|
4.3.2 Additives...........................|HyperList-Additives|
4.3.2.1 References........................|HyperList-References|
4.3.2.2 Comments..........................|HyperList-Comments|
4.3.2.3 Quotes............................|HyperList-Quotes|
4.3.2.4 Change Markup.....................|HyperList-ChangeMarkup|
4.4 Separator.............................|HyperList-Separator|
5 A self-defining system..................|HyperList-Self-definition|
6 About...................................|HyperList-About|
7 Changelog...............................|HyperList-Changelog|
8 Credits.................................|HyperList-Credits|
9 License.................................|HyperList-License|
==============================================================================
1 HyperList VIM Plugin *HyperList-Plugin*
This plugin does both highlighting and various automatic handling of
HyperLists, like collapsing lists or parts of lists in a sophisticated way.
It includes encryption functionality.
The HyperList plugin for VIM consists of the main file put in the "syntax"
subdirectory. It also includes a file in the "ftdetect" directory so that
files with a ".hl" extension is automatically detected and treated as a
HyperList file.
When working wiht HyperLists in VIM:
Use tabs/shifts or * for indentations.
Use to toggle one fold.
Use \0 to \9, \a, \b, \c, \d, \e, \f to show up to 15 levels expanded.
Use u to toggle underlining of States (prefixed with "S: " or "| "),
Transitions (prefixed with "T: " or "/ ") or underline nothing.
Use v to add a checkbox at start of item or to toggle a checkbox
Use V to add/toggle a checkbox with a date stamp for completion
Use "gr" (without the quotation marks, signifies "Goto Ref") while the cursor
is on a HyperList reference to jump to that destination in a HyperList. Use
"n" after a "gr" to verify that the reference destination is unique. A
reference can be in the list or to a file by the use of
#file:/pathto/filename, #file:~/filename or #file:filename.
Use to go to the next open template element
(A template element is a HyperList item ending in an equal sign).
As a sort of "presentation mode", you can traverse a HyperList by using
g or g to view only the current line and its ancestors.
An alternative is and to open more levels down.
Use L to convert the entire document to LaTaX.
The LaTeX conversion includes color coding of the various elements similar to
the colors used for HyperList files within VIM.
Use z to encrypt the current line (including all sublevels if folded).
Use Z to encrypt the current file (all lines).
Use x to decrypt the current line (mark all subsequent encrypted lines).
Use X to decrypt the current file (all lines).
If you enter the wrong password while trying to decrypt, you will end up with
garbage characters. To fix it, press "u" (undo) and try decrypting again with
the correct password.
If you want a HyperList to be automatically encrypted upon saving and decrypted
upon opening it, just prefix the filename with a dot (like ".password.hl"). It
then turns off viminfo and swapfiles to ensure security.
When using encryption in a HyperList or for the whole file, you will be asked
for a password - twice when saving the file and once when opening it. You must
have OpenSSL in your path to take advantage of these features.
Syntax updated at start and every time you leave Insert mode
If you want to disable or override these keymaps with your own, simply add
to your .vimrc file:
let g:HLDisableMapping = 1
To use HyperLists within other file types (other than ".hl"), you can use
"nested syntax" by adding the following to those syntax files (like the syntax
file for text files (".txt"):
syn include @HL ~/.vim/syntax/hyperlist.vim
syn region HLSnip matchgroup=Snip start="HLstart" end="HLend" contains=@HL
hi link Snip SpecialComment
If you add those three lines in your .vim/syntax/txt.vim you will be able to
include WOIM lists in files with a ".txt", and the following example would
become a HyperList with correct syntax highlighting and folding:
HLstart
This is a WOIM test list
Here is a child to the above item
Here is "grand child"
Here we are one level back
And here's another level down
[5] Dance steps
[3] Hurray
Smile
HLend
The "HLstart" and "HLend" must be at the start of the line.
==============================================================================
2 Background and definition *HyperList-Background*
Having worked extensively with flowcharts, relations diagrams, Warnier-Orr
diagrams and other ways of representing processes, states, instructions,
programs and data models, I knew there was something missing. It would have
been great to have a way of representing anything -- any state or action -- in
a way that would be more conducive to collaboration.
Most people know about flowcharts. But there are other ways of representing
data, states, actions or processes: UML, Sankey diagrams, Decision trees, Petri
Net, Organizational charts, Mind maps, Process Flow diagrams, Feynman diagrams,
Data Flow diagrams, Concept maps, OBASHI, Task lists (or Todo lists),
Warnier/Orr diagrams and various other diagrams. More than we can list here.
They have various uses, various strengths and shortcomings.
Most methodologies for representing states or flows were born out of specific
needs and were not meant to be used as generic methods for representing
literally anything as simple as possible. What if there were a way to represent
any state, set of things, actions, flows or transitions? What if the method
were simple? What if it were also Turing complete?
Enter HyperList -- a system for representing data. Any data. Static or dynamic.
It can be used to describe any state: a thing or set of things, an area, a
concept or collection of concepts, etc. It can also be used to describe any
action or plan, transformation or transition. In fact, it can describe anything
-- with one complete markup set. HyperList can be be used as an outliner on
steroids or a todo-list managing system with unlimited possibilities.
After searching for a complete markup methodology for both states or things and
actions or transitions, I came across the Warnier/Orr diagrams. They seemed to
be the best foundation for what I needed. The methodology was expanded to be
capable of describing anything as easily as possible; I removed the graphical
parts of Warnier/Orr and expanded the system substantially. It turned into WOIM
(Warnier/Orr/Isene/Möller) and later got the more descriptive name of
HyperList. My colleague Egil Möller's personal website: http://redhog.org/
helped in the early refinements.
Besides being the name of the system, "HyperList" is also used when referring
to a list or lists conforming to this system.
The strengths of HyperList are many:
* can represent any state or action with any number of levels
* Turing complete
* text-based
(it is wiki-able -- i.e. it is easy to collaborate when creating HyperList)
* not graphical
(although it can easily be made graphical for ease of consumption or eye candy)
* an easy syntax, humanly very readable
* very compact
* can represent negatives ("NOT:" = "don't do the following actions")
* can represent any number of choices in a decision (hard to do in a flowchart)
* easy to do loop counts
* easy to show attributes such as time or timing, location, person responsible, etc.
* potentially easy to map to other representation methods (graphical or otherwise)
In its simplest form, a HyperList is just a list of Items -- like your regular
shopping list -- but it can be so much more if you need it to be. A couple of
examples will give you the basic idea.
An example of describing a state:
Car (example obviously not complete)
Exterior
Paint
Chrome decor
Windows
Rubber linings
[4] Wheels
Interior
Seats
[2] Front
[3] Back
Mechanics
Motor
[6] Cylinders
[24] Valves
Brakes
A transition example (task list):
Walk the dog
Check the weather
[?rain] AND/OR:
Get rain coat
Get umbrella
Dress for the temperature
Get chain
Call the dog
OR:
Go through the woods
Walk the usual track
AND: (concurrency)
Ensure the dog has done its "tasks"
Ensure the dog is exercised
[5+] throw the favorite stick
Walk home
And this can all be done in collaboration on a wiki. States are described,
processes are mapped, plans and todo lists are forged. It's rather easy, and
HyperList can accommodate any level of complexity.
------------------------------------------------------------------------------
3 HyperLists *HyperLists*
A HyperList consists of one or more HyperList Items.
------------------------------------------------------------------------------
4 HyperList Item *HyperList-Item*
A HyperList Item is a line in a HyperList. It can have "children". Children are
HyperList Items indented to the right below the Item.
A HyperList Item consists of an optional "Starter", an optional "Type",
"Content" and a "Separator" in that sequence. All the various parts of a
HyperList Item are described below and in the sequence they appear in an Item,
as outlined here:
4.1 Starter
4.2 Type
4.3 Content
4.3.1 Element
4.3.1.1 Operator
4.3.1.2 Qualifier
4.3.1.3 Tag
4.3.1.4 Description
4.3.2 Additive
4.3.2.1 Reference
4.3.2.2 Comment
4.3.2.3 Quote
4.3.2.4 Change Markup
4.4 Separator
Look familiar? Yes, it is part of the table of contents at the beginning of
this documentation -- even that is a valid HyperList. If you are reading this
document as a PDF file, you may use the table of contents to jump directly to
any part of the document, as it consists of clickable links.
------------------------------------------------------------------------------
4.1 Starter *HyperList-Starter*
A HyperList Item may begin with a "Starter". A "Starter" can be either an
"Identifier" or a "Multi-line Indicator".
An Identifier is a unique indicator that can be used in referring to that Item.
A numbering scheme such as X.Y.Z can be used, e.g. the first Item in a
HyperList would be 1. The second Item would be 2, etc. A child to the second
Item would be 2.1 and the second child of 2 would be identified as 2.2, whereas
the child of 2.2 would be 2.2.1.
A shorter form consisting of mixing numbers and letters can also be used, such
as 1A1A for the first fourth-level Item. The next fourth-level Item would be
1A1B. When using this scheme, there is no need for any periods. The Identifier
"21T2AD" would be equivalent to "21.20.2.30", saving 4 characters.
An Item that spans more than one line must have a Starter. It does not have to
be an Identifier. You may use a "Multi-line Indicator" instead; just prefix the
Item with a plus sign ("+"), to show that it spans more than one line. The
second line of an Item will be indented to the same level/indent as the first
with an added space in front. If you use a Starter on one Item, then all the
Items in that same group of Items on the same level/indent must also have a
Starter.
In the example below, the first child begins with an Identifier and the second
a Multi-line Indicator. A Multi-line Indicator can also be used for single-line
Items when other Items on the same level span more than one line and thus
require a Multi-line Indicator.
Multi-line Indicator = "+"
1. Following lines are of the same indent with a "space" before
the text
+ If one Item on a certain level/indent is multi-line, all Items
on the same level/indent must start with a plus sign ("+") or #Identifier
The hash sign ("#") near the end will be discussed later in this article.
------------------------------------------------------------------------------
4.2 Type *HyperList-Type*
If it is not obvious or for clarity or strictness, prefix an Item with "S:" if
the Item is a static or a state Item (i.e. something which does not denote
action). Use "T:" for a transition Item (an Item indicating action).
Alternately, you may use "|" instead of "S:", and "/" instead of "T:". The Type
indicator comes after the optional Starter.
Children of a certain Type (either state or transition) inherit their parent's
Type unless otherwise specified.
------------------------------------------------------------------------------
4.3 Content *HyperList-Content*
A HyperList Item must have some sort of Content. The Content can be an
"Element" and/or an "Additive".
------------------------------------------------------------------------------
4.3.1 Elements *HyperList-Elements*
An Element is either an "Operator", a "Qualifier", a "Tag" or a "Description".
Let's treat each of these concepts.
------------------------------------------------------------------------------
4.3.1.1 Operator *HyperList-Operator*
An Operator is anything that operates on an Item or a set of Items. It can be
any of the usual logical operators. It can also be other Operators, such as
"EXAMPLE: ", "EXAMPLES: ", "CHOOSE: ", "ONE OF THESE: ", "IMPLIES: ",
"CONTINUOUS: ", etc. The Operator "CONTINUOUS: " makes an Item or set of Items
run continuously. An Operator is written in capital letters and ends in a colon
and a space.
The Operator "ENCRYPTION: " indicates that the sub-Item(s) are to be encrypted
or that the following block is encrypted. The encrypted block can be properly
indented in the HyperList, or if indentation is part of the encrypted block, it
will be left justified. This is the only Item that is allowed to break the
indentation rules.
If you need to include one or more lines inside a HyperList that include
HyperList expressions you don't want to be interpreted as HyperList
expressions, then use a "literal block". This is equivalent to "pre-formatted"
text in HTML and some word processors. To include such a block of lines, simply
mark the start and end of the literal block with a single backslash ("\") on a
line. Example:
\
This is a block of literal text...
Where nothing counts as HyperList markup
Thus - neither this: [?] nor THIS: #Test - are seen as markup
...until we end this block with...
\
Literal blocks are useful when you want to include, for instance, a block of
programming code in the middle of a HyperList.
------------------------------------------------------------------------------
4.3.1.2 Qualifier *HyperList-Qualifier*
A Qualifier does as its name suggests; it qualifies an Item. A Qualifier limits
the use of an Item. It tells you how many times, at what times and/or under
what conditions an Item is to be executed, exists or is valid. When an Item is
to be included only if several conditions are met, you put all the conditions
into square brackets and separate them by commas. If an Item is to be executed
first for one condition, then for another and then for a third, etc, you
separate them by periods. The usage is best described by a few examples:
* Do Item if "the mail has arrived" = "[The mail has arrived]"
* Do Item 3 times = "[3]"
* Do Item 1 or more times = "[1+]"
* Do Item 2 to 4 times = "[2..4]" (the user may choose 2, 3 or 4 times)
* Do Item 2 times while "foo=true" = "[2, foo=true]"
* Do Item from 3 to 5 times while "bar=false" = "[3..5, bar=false]"
* Do Item less than 4 times only while "zoo=0" = "[<4, zoo=0]"
* Do Item 1 or more times while "Bob is polite" = "[1+, Bob is polite]"
* Do Item a minimum 2 and a maximum 7 of times while it rains and temperature
is less than 5 degrees Celsius = "[2..7, Raining, Temperature <5°C]"
* Do Item in the context of "apples", then "oranges", then "grapes" =
"[Apples. Oranges. Grapes]".
With this you can reuse a procedure in many contexts.
To indicate that an Item is optional, use "[?]". Example:
Receive calls at reception
Pick up the phone and greet the caller
[Caller does not ask for any specific person]
Ask who the caller wants to speak to
[?] Ask the reason for wanting to talk to that person
[Person available] Transfer call; END
[Person not available] Ask if you can leave a message
Take the message
Send the message to the person
The special word "END" and the semicolon in the above example will be explained
later, under "Reference" and "Separator", respectively.
Use a "timestamp" to indicate that an Item is to be done at a certain time, in
a certain time span, before or after a certain time, etc.
A timestamp has the format "YYYY-MM-DD hhmmss", conforming to the standard
ISO-8601. The time/date format can be shortened to the appropriate time
granularity, such as "YYYY-MM-DD hhmm", "YYYY-MM-DD hh" or "YYYY". One can add
a timestamp Qualifier such as "[Time = 2012-12-24 17]" or simply "[2012-12-24 17]".
Timestamps that represent an amount of time may be relative, such as:
* Length of time to wait before doing the Item = "[+YYYY-MM-DD]"
* Less than a certain length of time after previous Item = "[+YYYY-MM-DD]"
* Length of time to wait before doing next Item = "[-YYYY-MM-DD]"
* Less than a certain length of time before next Item = "[-YYYY-MM-DD]"
* Length of time to wait after doing referenced Item = "[+YYYY-MM-DD#OtherItem]"
The last example introduces a new concept, the "Reference". References will be
discussed below.
Other obvious timestamps may be used, such as:
* "[+1 week]"
* "[-2 Martian years]"
Some practical examples:
* Wait one month before doing the Item = "[+YYYY-01-DD]"
* Do Item less than 4 days before next Item = "[>" at the end followed by a Reference showing to
which Item it should be moved below.
To indent an Item to the left, add "". It is possible to combine moving and indenting an Item, i.e.
moving an Item and making it a child of another: ">>#Ref->".
To signify that an Item has been changed from a previous version of a
HyperList, prefix the Item with "<<>>". Inside the angle brackets you may
include information about the change done, e.g. "<>" to show
that the Item was changed by a certain person at a given time.
------------------------------------------------------------------------------
4.4 Separator *HyperList-Separator*
A Separator separates one Item from another. A line in a HyperList is usually
one Item, and Items are then usually separated by a "newline" (hitting the
"Enter" on the keyboard). But it is possible to string several Items together
on one line by separating them with semicolons.
By separating an Item by a newline and then indenting it to the right, you
create a child Item. A child adds information to its parent.
A Separator between two Items with the same or less indent is normally read as
"then". If a parent Item contains a description, the newline Separator and
indent to the right (a child) reads "with" or "consists of". If a parent Item
does not contain a Description, the Separator and indent to the right (a child)
is read as "applies to", and a Separator between the children is read as "and".
A few examples should suffice:
A kitchen
Stove
Table
Plates
Knives
Forks
This would read: "A kitchen with stove and table with plates, knives and
forks".
Time = 2010:
Olympic Games
Soccer world championship
This would read: "Time = 2010: applies to: Olympic Games and Soccer world
championship".
Walk the dog
Check the weather
[?rain] AND/OR:
Get rain coat
Get umbrella
Dress for the temperature
Get chain
And this would read: "Walk the dog consists of Check the weather consists of:
If rain, AND/OR: applies to children: Get rain coat, Get umbrella; then Dress
for the temperature, then Get chain". Or more humanly: "Walk the dog consists
of check the weather, which consists of either/or get the rain coat and get
umbrella. Then dress for the temperature and then get the chain."
Now consider these four examples:
Production
Station 1
Assemble parts A-G
Station 2
Assemble parts H-R
Station 3
Assemble parts S-Z
Production
Station 1; Assemble parts A-G
Station 2; Assemble parts H-R
Station 3; Assemble parts S-Z
Production
[Station 1]
Assemble parts A-G
[Station 2]
Assemble parts H-R
[Station 3]
Assemble parts S-Z
Production
[Station 1] Assemble parts A-G
[Station 2] Assemble parts H-R
[Station 3] Assemble parts S-Z
The first and second examples say exactly the same thing, but the second
example is more efficient as it uses the semicolon as a Separator instead of
using a line break and indent. The same goes for the third and the fourth
examples -- they are equivalent. But how about the difference between the first
two examples and the last two?
When you use a Qualifier as in examples three and four, you accommodate for the
tasks getting done in any chosen sequence. In those two examples, the
production could go, for example, "Station 1", then "Station 3", then "Station 2".
The first and second examples read: "The production consists of: Station 1
assembles parts A-G, then Station 2 assembles parts H-R and finally Station 3
assembles parts S-Z".
The third and fourth examples read: "The production consists of: if or when at
Station 1, assemble parts A-G, if or when at Station 2, assemble parts H-R, and
if or when at Station 3, assemble parts S-Z".
As you can see, there is a subtle but distinct difference.
------------------------------------------------------------------------------
5 A self-defining system *HyperList-Self-definition*
Now that we have covered all the possibilities in a HyperList, it should be
obvious that HyperList could extend into a vast array of descriptions. It is
even possible to write a parser or compiler for HyperList and use it as a
programming language.
Is it possible to compact the descriptions above into a HyperList? Yes, indeed.
The HyperList system is self-describing.
HyperList can be done in many different ways -- from informal to strict and
from high-level to very detailed. The power of the tool resides with the user.
To illustrate the flexibility of HyperList, we will show the definition of this
methodology in three steps -- from a very informal and high-level description,
to a more strict but still high-level -- to the fully-detailed definition of
HyperList.
First, here is a simple list showing what HyperList is all about:
HyperList Item parts (in sequence):
Starter (optional)
Identifier or Multi-line Indicator
Type (optional)
State or transition
Content (can be an Element and/or an Additive)
Element
Either an Operator, Qualifier, Tag, or Description
Additive
Either a Reference, Comment, Quote, or Change Markup
Separator
Newline or semicolon
Now, that's a very simple HyperList. Let's make the same simple list more
strict by using the system concisely:
HyperList Item parts
[?] Starter; OR:
Identifier
Multi-line Indicator
[?] Type; OR:
State
Transition
Content; AND/OR:
Element; AND/OR:
Operator
Qualifier
Tag
Description
Additive; AND/OR:
Reference
Comment
Quote
Change Markup
Separator; OR:
Newline
Semicolon
That wasn't so intricate either, and that list is more easily parsable by a
computer program if one wanted to automatically create graphical
representation.
How about the full and complete definition, including all imaginable details of
how any HyperList could conceivably be structured. Fasten your seat belt.
The following list shows the legal structure and syntax of a HyperList. It
covers all you have read above.
HLstart
HyperList
[1+] HyperList Item
[?] Starter; OR:
Identifier (Numbers: Format = "1.1.1.1", Mixed: Format = "1A1A")}
[Multi-line Item] The Identifier serves as a plus sign ("+")}
#1
Multi-line Indicator = "+"
1 Following lines are of same indent with a "space" before
the text
+ If one Item on a certain indent is multi-line, all Items on the same indent
(including single-line Items) must start with a plus sign ("+")} or #Identifier
[?] Type
OR:
State = "S:" or "|"
Transition = "T:" or "/"
Children inherit Type from parent unless marked with different Type
Can be skipped when the Item is obviously a state or transition
Content; AND/OR:
Element; AND/OR:
Operator
Anything operating on an Item or a set of Items
[Set of Items] Items are indented below the Operator
Can be any of the usual logical operators
Is written in capitals ending in a colon and a space
EXAMPLES: "AND: ", "OR: ", "AND/OR: ", "NOT: ", "IMPLIES: "
Can contain a Comment to specify the Operator
EXAMPLE: "OR(PRIORITY): "
Sub-Items are to be chosen in the order of priority as listed
To make the Item run continuously, use "CONTINUOUS: "
Item is done concurrent with remaining Items
The Operator can be combined with a timestamp Tag
EXAMPLE: "CONTINUOUS: YYYY-MM-07:" = Do the Item weekly
To show that an Item is encrypted or is to be encrypted, use "ENCRYPTION: "
OR:
The encrypted block can be correctly indented
The encrypted block contains indentation and is left justified
This would seem to break the list, but is allowed
A block can be included of "literal text" negating any HyperList markup
Use a HyperList Item containing only the Operator "\"} to mark start/end
EXAMPLE:
\
This is a block of literal text...
Where nothing counts as HyperList markup
Thus - neither this: [?] nor THIS: #Test - are seen as markup
...until we end this block with...
\
Qualifier
Any statement in square brackets that qualifies an Item
Specifies under what conditions an Item is to be executed, exists or is valid
Several Qualifiers can be strung together, separated by commas
All Qualifiers need to be fulfilled for the Item to be valid
EXAMPLE: "[+YYYY-MM-DD 02.30, Button color = Red, 4, ?] Push button"
Successive Qualifiers can be strung together, separated by periods\textcolor; EXAMPLE:
"[Apples. Oranges. Grapes]"
Do Item in the context of "apples", then "oranges", then "grapes"
EXAMPLES:
Do Item 3 times = "[3]"
Do Item if "the mail has arrived" = "[The mail has arrived]"
Do Item 2 times while "foo=true" = "[2, foo=true]"
Do Item from 3 to 5 times while "bar=false" = "[3..5, bar=false]"
Do Item 1 or more times = "[1+]"
Do Item 1 or more times while "Bob is polite" = "[1+, Bob is polite]"
Do Item up to 4 times only while "zoo=0" = "[<4, zoo=0]"
Optional Item = "[?]"
Timestamp Qualifier = "[YYYY-MM-DD hh.mm.ss]"
Shorten the format to the appropriate granularity
Time relations
Length of time to wait before doing the Item = "[+YYYY-MM-DD]"
Less than a certain length of time after previous Item = "[+YYYY-MM-DD]"
Length of time to wait before doing next Item = "[-YYYY-MM-DD]"
Less than a certain length of time before next Item = "[-YYYY-MM-DD]"
Length of time to wait after doing referenced Item = "[+YYYY-MM-DD#Item]"
Other obvious time indicators may be used; EXAMPLES:
"[+1 week]"
"[-2 Martian years]"
EXAMPLES:
Wait one month before doing the Item = "[+YYYY-01-DD]"
Do Item less than 4 days before next Item = "[>#Reference"
This moves the Item just below the referenced Item
Move the Item one level in by adding "" at the end of the Item
EXAMPLE: Move an Item as a child to referenced Item = ">>#Reference->"
Changed Item
Prefix an Item with "<<>>" to signify that a change has been made
Add information inside the angle brackets as appropriate
EXAMPLE: To show who changed it and when = "<>"
Separator
OR:
Semicolon
A semicolon is used to separate two HyperList Items on the same line
Newline
Used to add another Item on the same level
Indent
A Tab or an asterisk ("*")}
Used to add a child
A child adds information to its parent
A child is another regular #'HyperList Item'
Definition
A Separator and the same or less indent normally reads "then:"
[parent contains #Description]}
The Separator and right indent reads "with:" or "consists of:"
[NOT: parent contains #Description]}
The Separator and right indent reads "applies to:"
A Separator between the children reads "and:"
HLend
Read and re-read the HyperList above and you will be a HyperList master after a
while. It's all there. The whole markup.
==============================================================================
6 About *HyperList-About*
The author of the VIM plugin for HyperList is also the chief maintainer of the
HyperList definition itself; Geir Isene . More at http//isene.com
==============================================================================
7 Changelog *HyperList-Changelog*
VERSION 2 2012-04-28
Changes:
Upgraded to reflect the new Hyperlist version (2.1)
VERSION 2 2012-03-28
Changes:
Name change (from WOIM to HyperList)
Complete overhaul of the definition document (http://isene.com/hyperlist.pdf)
Complete overhaul of the plugin documentation (this file)
Underlining of States and Transitions now toggles with u
Included "|" as alternative for "S: " and "/" for "T: "
Upgraded LaTeX export
Lots of minor fixes
VERSION 1.7 2012-01-01
Changes:
Expanded "gr" (Goto Reference):
Made it possible to reference external files by the use of
#file:/pathto/filename, #file:~/filename or #file:filename
As long as the reference is prefixed with "file:" after
the "#", the command "gr" will open the referenced file.
Added HTML conversion vith the use of H.
Improved LaTeX conversion.
After an HTML/LaTeX conversion, filetype is set to html/tex.
Changed the color of multi-indicator (+) from red to purple.
VERSION 1.6 2011-12-08
Changes:
Added marking of literal regions with special marking of start/end ("\")
Added and
Fixed syntax marking for State/Transitions where indent is "*"
Fixed escaping "\", "{" and "}" for LaTeX conversion
VERSION 1.5.3 2011-09-18
Changes:
New feature: LaTeX conversion: Turn your WOIM list into a LaTeX document.
Mapped to L (feature suggested by Shantanu Kulkarni).
Added "set autoindent" to plugin settings (thanks to Shantanu Kulkarni).
Minor fixes.
Updated documentation.
VERSION 1.5.2 2011-09-08
Changes:
Added "presentation mode" where you can traverse a WOIM list with
"g" or "g" to view only the current line and its ancestors.
Changed Quotes and Comments to only cover one line (before when it
covered several lines, the plugin became very slow for large lists).
Added instructions in doc file on using WOIM list in other file types.
VERSION 1.5.1 2011-08-16
Changes:
Minor updates to the documentation.
VERSION 1.5.0 2011-08-16
Changes:
Added encryption via OpenSSL:
z encrypts the current line (including all sublevels if folded)
Z encrypts the current file (all lines)
x decrypts the current line
X decrypts the current file (all lines)
A dot file (file name starts with a "." such as .test.woim) is
automatically encrypted on save and decrypted on opening.
VERSION 1.4.7 2011-06-02
Changes:
Modified the GotoRef function (fixed a bug and included feed back)
Better syntax highlighting for folding in gvim
Updating the README_WOIM and documentation files + other cosmetic changes
Added the possibility of disabling/overriding the WOIM plugin key mapping
Added an ftdetect file into woim.vba
(Thanks to Sergey Khorev for the last two improvements)
VERSION 1.4.6 2011-05-31
Perfection:
Minor fixes due to a bout of perfectionism.
VERSION 1.4.5 2011-05-30
Overhaul:
Created the documentation, including the whole WOIM definition to make it
easily accessible within VIM. Added the INSTALL and README files.
Created a Vimball file ("woim.vba") for easy install. Simply do:
vim woim.vba
:so %
:q
VERSION 1.4.2 2011-05-29
Fixed "gr" (Goto Ref) for references with single quotes ('')
Added the search pattern from "gr" to the search register so that "n" can
successively be used to test if the referenced destination is unique (which
it should be).
VERSION 1.4.1 2011-05-27
New feature:
Goto Reference: With the cursor at a WOIM reference, press "gr" to jump to
that reference in the WOIM list.
Now you can navigate more easily in WOIM lists.
VERSION 1.4 2011-05-23
This could have been the long awaited version 1.0 - but instead I decided to
synchronize the version numbering of this VIM plugin and the WOIM description
itself. From now on the releases will be synchronized, with minor fixes in
the VIM plugin released as minor releases (i.e. a fix to 1.4 would be 1.4.1
and would still be on par with the WOIM definition version 1.4). The version
1.4 of the WOIM definition adds time repetition as well as "checking" of
todo-list items.
This release:
New feature: Added the option of checkboxes for items (Thanks to Christopher
Truett (VIM script #3584). You can now easily add a checkbox in front of any
item by v and subsequently toggle that checkbox via the same
(v) or V if you want to add a time stamp to a box that you
"check" (this also toggles the timestamp if you "uncheck" the item).
Fixes: Some minor cleanup.
VERSION 0.9.9 2011-04-17
Fix: Fixed interference between Operators and Tags
VERSION 0.9.8 2010-12-14
Feature: States (S:) is underlined by default. s removes the
underlining, while S turns on underlining of States. Transitions are
not underlined by default. T turns on underlining, while t
removes the underlining of Transitions.
Fix: Removed unnecessary "contained" to make lists syntax marked even within
stub lists.
Fix: Small fixes in grouping and containing of elements.
VERSION 0.9.6 2010-12-03
Feature: Added "*" as possible indentation
Fix: Changed Multiline indicator from "*" to "+"
Now compatible with WOIM v. 1.2
VERSION 0.9.3 2009-12-11
Christian Bryn caught an important bug/lacking setting. The syntax file
now sets noexpandtab.
VERSION 0.9.2 2009-10-25
A few needed minor fixes.
VERSION 0.9.1 2009-08-21
New_feature:
Added highlighting of item motions:
<< means "delete this item" (put at the end of a line)
>>#1.1. means "move this item to after item 1.1."
-> means "indent item right"
>#1.-> means "move item to after item 1. and indent right"
VERSION 0.9 2009-08-10
New_feature: Accommodated for the use of subroutine calls (##ref)
Fix: Cleaned up syntax variable names to fit modern WOIM
Fix: Multi-lines have consecutive lines start with a
Fix: Quotes or Comment can now span several lines
Fix: Comments allowed in Operators
Fix: Comments and references allowed inside Qualifiers
Fix: Identifier must end in a period and then a space
Bug_fix: Allowing a period to be part of a tag
Bug_fix: Fixed wrong markup for astrices not used for multi-line
VERSION 0.8.6 2009-07-24
Bug fix: Corrected attributes ending in capitals that was treated as a WOIMkey
Bug fix: Fixed references containing a hyphen
VERSION 0.8.5 2009-07-23
New feature: Expanded Attributes to include relative times and
greater/smaller than.
New feature: References with spaces are now accommodated for by putting it in
quotes.
New feature: Made references in attributes possible.
Bug fix: Fixed references that includes ampersands ("&").
VERSION 0.8.1 2009-07-22
Bug fix: Fixed highlighting of attributes with a colon (like time stamps)
VERSION 0.8 2009-07-21
New feature: Expanded folding to a maximum of 15 levels with folding levels
set with a to f for levels 10 to 15. Improvement: Better
syntax highlighting for indexes
Bug fix: Fixed syntax syncing when entering the document in the first place
VERSION 0.7.2 2009-07-15
Better syntax highlighting for references.
Added unobtrusive highlighting of vim bottom set-lines.
VERSION 0.7.1 2009-06-16
Bug fix: Fixed an error in syntax highlighting properties containing a "-"
(like ISO dates).
VERSION 0.7 2009-06-13
Added macro to jump to next point in a template and fill in the value. A
template item is an item that ends in an equal sign and where the value after
the equal sign is to be filled out. Example:
ExampleTask
Task name =
Responsible person =
Deadline =
VERSION 0.6 2009-04-13
Some minor adjustments, but a needed upgrade if you are a WOIM user.
VERSION 0.4 2009-01-16
Initial upload
==============================================================================
8 Credits *HyperList-Credits*
Thanks to Jean-Dominique Warnier and Kenneth Orr for the original idea of this
type of markup.
Thanks to Egil Möller for helping to cultivate the first versions.
Thanks to Axel Liljencrantz for his input in outlining WOIM.
Thanks to Christian Bryn for testing of the plugin.
Thanks to Christopher Truett for his Checkbox VIM plugin.
Thanks to Noah Spurrier for his OpenSSL VIM plugin.
==============================================================================
9 License *HyperList-License*
I release all copyright claims. This code is in the public domain. Permission
is granted to use, copy modify, distribute, and sell this software for any
purpose. I make no guarantee about the suitability of this software for any
purpose and I am not liable for any damages resulting from its use. Further, I
am under no obligation to maintain or extend this software. It is provided on
an 'as is' basis without any expressed or implied warranty.
ftdetect/hyperlist.vim [[[1
50
" WOIM files are included for backward compatability (HyperList was earlier WOIM)
au BufRead,BufNewFile *.hl set filetype=hyperlist
au BufRead,BufNewFile *.woim set filetype=hyperlist
" Using code from openssl.vim by Noah Spurrier
" dot-files (files starting with ".") gets auto en-/decryption
augroup hl_autoencryption
autocmd!
autocmd BufReadPre,FileReadPre .*.hl set viminfo=
autocmd BufReadPre,FileReadPre .*.hl set noswapfile
autocmd BufReadPre,FileReadPre .*.hl set bin
autocmd BufReadPre,FileReadPre .*.hl set cmdheight=2
autocmd BufReadPre,FileReadPre .*.hl set shell=/bin/sh
autocmd BufReadPost,FileReadPost .*.hl %!openssl bf -d -a 2>/dev/null
autocmd BufReadPost,FileReadPost .*.hl set nobin
autocmd BufReadPost,FileReadPost .*.hl set cmdheight&
autocmd BufReadPost,FileReadPost .*.hl set shell&
autocmd BufReadPost,FileReadPost .*.hl execute ":doautocmd BufReadPost ".expand("%:r")
autocmd BufWritePre,FileWritePre .*.hl set bin
autocmd BufWritePre,FileWritePre .*.hl set cmdheight=2
autocmd BufWritePre,FileWritePre .*.hl set shell=/bin/sh
autocmd BufWritePre,FileWritePre .*.hl %!openssl bf -e -a -salt 2>/dev/null
autocmd BufWritePost,FileWritePost .*.hl silent u
autocmd BufWritePost,FileWritePost .*.hl set nobin
autocmd BufWritePost,FileWritePost .*.hl set cmdheight&
autocmd BufWritePost,FileWritePost .*.hl set shell&
augroup END
augroup woim_autoencryption
autocmd!
autocmd BufReadPre,FileReadPre .*.woim set viminfo=
autocmd BufReadPre,FileReadPre .*.woim set noswapfile
autocmd BufReadPre,FileReadPre .*.woim set bin
autocmd BufReadPre,FileReadPre .*.woim set cmdheight=2
autocmd BufReadPre,FileReadPre .*.woim set shell=/bin/sh
autocmd BufReadPost,FileReadPost .*.woim %!openssl bf -d -a 2>/dev/null
autocmd BufReadPost,FileReadPost .*.woim set nobin
autocmd BufReadPost,FileReadPost .*.woim set cmdheight&
autocmd BufReadPost,FileReadPost .*.woim set shell&
autocmd BufReadPost,FileReadPost .*.woim execute ":doautocmd BufReadPost ".expand("%:r")
autocmd BufWritePre,FileWritePre .*.woim set bin
autocmd BufWritePre,FileWritePre .*.woim set cmdheight=2
autocmd BufWritePre,FileWritePre .*.woim set shell=/bin/sh
autocmd BufWritePre,FileWritePre .*.woim %!openssl bf -e -a -salt 2>/dev/null
autocmd BufWritePost,FileWritePost .*.woim silent u
autocmd BufWritePost,FileWritePost .*.woim set nobin
autocmd BufWritePost,FileWritePost .*.woim set cmdheight&
autocmd BufWritePost,FileWritePost .*.woim set shell&
augroup END
README_HyperList [[[1
97
GENERAL INFORAMTION ABOUT THE VIM PLUGIN FOR HYPERLISTS (version 2)
HyperLists are used to describe anything - any state, item(s), pattern,
action, process, transition, program, instruction set etc. So, you can use
it as an outliner, a ToDo list handler, a process design tool, a data
modeler, or any other way you want to describe something.
This plugin does both highlighting and various automatic handling of
HyperLists, like collapsing lists or parts of lists in a sophisticated
way.
The plugin incorporates encryption. You can encrypt any part of a
HyperList or take advantage of the autoencryption feature by making the
HyperList a dot file - i.e. prefixing the file name wiht a dot (such as
".test.woim"). You can use this plugin to make a password safe.
As you most certainly have already done, to install the HyperList plugin
for VIM, dowmload woim.vba and do:
vim hyperlist.vba
:so %
:q
You will then discover that this file (README_HyperList will appear in the
VIM directory, while the documentation will be placed in the "doc"
subdirectory, the HyperList plugin will be placed in the "syntax"
subdirectory. A HyperList filetype detection file is placed in the
"ftdetect" subdirectory.
From now on all files with the ".hl" file extension will be treated as a
HyperList file, syntax highlighted corrrectly and you can use all the neat
HyperList functionality for VIM.
To use HyperLists within other file types (other than ".hl"), add the
following to those syntax files:
syn include @HL ~/.vim/syntax/hyperlist.vim
syn region HLSnip matchgroup=Snip start="HLstart" end="HLend" contains=@HL
hi link Snip SpecialComment
The documentation file contains all of the HyperList definition and is
part of the full specification for HyperList as found here:
http://isene.com/hyperlist.pdf
INSTRUCTIONS
Use tabs/shifts or * for indentations.
Use to toggle one fold.
Use \0 to \9, \a, \b, \c, \d, \e, \f to show up to 15 levels expanded.
As a sort of "presentation mode", you can traverse a WOIM list by using
g or g to view only the current line and its ancestors.
An alternative is and to open more levels down.
Use "gr" when the cursor is on a reference to jump to the referenced item.
A reference can be in the list or to a file by the use of
#file:/pathto/filename, #file:~/filename or #file:filename.
Use u to toggle underlining of Transitions, States or no underlining.
Use v to add a checkbox at start of item or to toggle a checkbox.
Use V to add/toggle a checkbox with a date stamp for completion.
Use to go to the next open template element
(A template element is a WOIM item ending in an equal sign).
Use L to convert the entire document to LaTaX.
Use H to convert the entire document to HTML.
Use z encrypts the current line (including all sublevels if folded).
Use Z encrypts the current file (all lines).
Use x decrypts the current line.
Use X decrypts the current file (all lines).
z and x can be used with visual ranges.
A dot file (file name starts with a "." such as .test.woim) is
automatically encrypted on save and decrypted on opening.
Syntax is updated at start and every time you leave Insert mode.
For this help and more, including the full WOIM definition/description, type
:help HyperList
If you use tab completion after the "HyperList", you will find all the help
tags in the documentation.
Enjoy.
Geir Isene
...explorer of free will
http://isene.com