WOIM.vim


Ⅰ. 插件描述

WOIM outliner (replaced by HyperList: Script# 4006)

Ⅱ. 基本信息

创建日期:  2009-01-16
使用用户:  1
Github星:  2
插件作者:  Geir Isene

Ⅲ. 安装方法

使用Vundle管理器安装

在你的.vimrc下添加:
Plugin '/woim-vim'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall

对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。

使用NeoBundle管理器安装

在你的.vimrc下添加:
NeoBundle '/woim-vim'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall

使用VimPlug管理器安装

在你的.vimrc下添加:
Plug '/woim-vim'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall

使用Pathogen管理器安装

在终端中运行以下命令:
cd ~/.vim/bundle
git clone https://github.com/vim-scripts/WOIM.vim

Ⅳ. 文档说明

THIS PLUGIN HAS BEEN REPLACED WITH THE HYPERLIST PLUGIN - SEE: http://www.vim.org/scripts/script.php?script_id=4006

It's an Outliner, a TODO-list solution, a project management tool, a Business Process Management aid, a data modeler, a Use Case facilitator, a way to describe the human DNA or the history of the universe ;) It can also encrypt your lists and be used as a very structured  password safe.

WOIM is a methodology to describe anything - any state, item(s), pattern, action, process, transition, program, instruction set etc.

This plugin does both highlighting and various automatic handling of WOIM lists, like collapsing lists or parts of lists in a sophisticated way.

The plugin incorporates encryption. You can encrypt any part of a WOIM list or take advantage of the autoencryption feature by making the WOIM list a dot file - i.e. prefixing the file name with a dot (such as ".test.woim"). You can use this plugin to make a password safe - it turns off viminfo and swap files to ensure security.

For information on WOIM, read the WOIM description in full:

http://isene.com/woim.pdf

INSTRUCTIONS

Use tabs/shifts or * for indentations

Use <SPACE> to toggle one fold
Use 0 to 9, a, b, c, d, e, f to show up to 15 levels expanded

Use <leader>s to remove underlining of States (prefixed with S:)
Use <leader>S to add underlining of States (prefixed with S:)
Use <leader>t to remove underlining of Transitions (prefixed with T:)
Use <leader>T to add underlining of Transitions (prefixed with T:)

Use <leader>v to add a checkbox at start of item or to toggle a checkbox
Use <leader>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 WOIM reference to jump to that destination in a WOIM list. 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 <leader><SPACE> to go to the next open template element (a template element is a WOIM item ending in an equal sign)

As a sort of "presentation mode", you can traverse a WOIM list by using g<DOWN> or g<UP> to view only the current line and its ancestors. An alternative is <leader><DOWN> and <leader><UP> to open more levels down.

Use <leader>L to convert the entire document to LaTaX

The LaTeX conversion includes color coding of the various elements similar to the colors used for WOIM files within VIM.

Use <leader>z to encrypt the current line (including all sublevels if folded)
Use <leader>Z to encrypt the current file (all lines)
Use <leader>x to decrypt the current line (mark all subsequent encrypted lines)
Use <leader>X to decrypt the current file (all lines)

If you want a WOIM list to be automatically encrypted upon saving and decrypted upon opening it, just prefix the filename with a dot (like ".test.woim").

When using encryption in a WOIM list 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

To use a WOIM list within any other file type, you can use nested syntax. Add the following to that other syntax highlighting plugin file:

  syn include @WOIM ~/.vim/syntax/woim.vim
  syn region WoimSnip matchgroup=Snip start="WOIMstart" end="WOIMend" contains=@WOIM
  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 extension like this:

WOIMstart
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
WOIMend

The "WOIMstart" and "WOIMend" must be at the start of the line.

添加新评论