Fetching contributors…
Cannot retrieve contributors at this time
2405 lines (1861 sloc) 101 KB
*viki.txt* A personal wiki for vim
Author: Tom Link, micathom at gmail com
This plugin adds wiki-like hypertext capabilities to Vim. You can use viki as
a "minor" mode (i.e., as an add-on to any other mode) or as a full-fledged
wiki mode. There is also an add-on plugin for "wikifying" latex documents by
turning some latex commands into wiki names. If viki is properly configured,
activating a reference to an image, a webpage etc. will view that resource in
an external viewer.
From http://sourceforge.net/projects/deplate/ you can download a ruby based
tool to convert viki markup to LaTeX, HTML, or DocBook. On its homepage
(http://deplate.sf.net) you can read a more detailed specification of the
markup.
MINOR WIKI MODE:
Just type |:VikiMinorMode| and all wiki names and URLs will be highlighted.
When the cursor is over a wiki name, you can press <c-cr> to jump to (or
create) the referred page (on a terminal use <LocalLeader>vf). Pressing
<LocalLeader>vb brings you back to the original document. Alternatively, you
can use <m-leftmouse> and <m-rightmouse> to jump back and forth. (NOTE: In
minor mode, it's possible that viki words and URLs are not highlighted when
they are included in some syntactic regions.)
FULL WIKI MODE:
In full mode, viki becomes a personal wiki
(http://c2.com/cgi/wiki?PersonalWiki). Set 'filetype' to viki or execute
|:VikiMode|. The full wiki mode is like the minor mode but with folding
support, syntax highlighting (for headings, lists, tables, textstyles etc.),
and additional key bindings (i.e., you can press <c-tab> or <s-c-tab> to move
the cursor to the next/previous viki name).
BUT HEY, WHAT IS A WIKI ANYWAY:
Among the vast amount of possible definitions, I prefer this one, which is my
own anyway :-): a wiki is a simple way of creating hypertexts. In its basic
form creating a hyperlink is as easy as writing a word in CamelCase (although
this sometimes turn out to be more annoying than useful) or by a rather
minimalist markup -- in the case of viki, this would be [[destination]] or
[-destination-].
You begin by creating a directory where your wiki files should go to and by
creating a wiki index -- a master file that contains references to sub-pages.
After a while you end up with many small, tightly interlinked files/notes.
Wikis also come with a rather subtle markup. Here is a simple comparison of
two examples of LaTeX and viki markup so that you get the idea of what it
looks like:
LaTeX: \section{Title}
Viki: * Title
LaTeX: \emph{text}
Viki: __text__
And some wikis provide tools for translating this markup to other formats
(like viki does in the form of the "deplate" program, which can translate viki
markup to LaTeX, HTML, and Docbook). Unfortunately, just about every wiki has
its own markup.
*viki-support*
VIKI Forum (questions, feature requests):
http://sourceforge.net/projects/deplate/forums/forum/700962
Bug tracker:
https://github.com/tomtom/deplate/issues
Demo:
http://vimsomnia.blogspot.com/2010/11/vikitasks-viki-demonstration-personal.html
-----------------------------------------------------------------------
Install~
In order to install the vba, open the vba file in VIM and type: >
:so %
See :help vimball for details.
This script requires tlib (vimscript #1863) to be installed.
Also available via git: http://github.com/tomtom/viki_vim/
*viki-requirements*
Requirements:
- tlib (vimscript #1863)
*viki-related-plugins*
Optional enhancements:
- vikitasks (vimscript #2894): Distributed TODO lists
- hookcursormoved (vimscript #2037): Enhanced detection of hyperlinks to
inexistent destinations.
- vxfold (vimscript #3004): Provides org-mode like fold cycling
- VOoM (vimscript #2657): A two-pane outliner with support for viki
- kpsewhich (not a vim plugin :-) for LaTeX support
Post-Install~
Viki requires the following minimal lines to be added to |vimrc|: >
:set nocompatible
:filetype plugin indent on
:syntax on
You might also want to set 'expandtab' (local to buffer) in
after/ftplugin/viki.vim: >
setlocal expandtab
Viki will be automatically loaded when starting vim. In case you have vim
already running and don't want to restart it, you can also type: >
:runtime plugin/viki.vim
Viki doesn't set the viki filetype for you. How you set the filetype is up to
you to decide. Basically, there are two possibilities: based on a suffix or
based on the location. See |viki-filetype-detection|.
Customization: *viki-customization*
It's probably a good idea to check the values of the following variables:
- |g:vikiUpperCharacters| and |g:vikiLowerCharacters|; for the most
commonly used foreign language characters in a Western European
context set these variables to something like (this refers to the
characters allowed in simple viki names and in anchors; for East Asian
languages you probably prefer to use quoted viki names anyway): >
" this is in iso-latin-1
let g:vikiLowerCharacters = "a-zäöüßáàéèíìóòçñ"
let g:vikiUpperCharacters = "A-ZÄÖÜ"
<
- |vikiNameTypes| (see |viki-names|): control which type of viki names you
want to use (this allows you to turn off, e.g., simple viki names)
You might also need to configure some external programs (use the variables
g:vikiOpenUrlWith_{PROTOCOL} and g:vikiOpenFileWith_{SUFFIX}) like in this
example: >
let g:vikiOpenUrlWith_mailto = 'thunderbird -compose %{URL}'
let g:vikiOpenFileWith_html = "silent !firefox %{FILE}"
let g:vikiOpenFileWith_ANY = "silent !start %{FILE}"
You should at least check the definitions of |g:vikiOpenFileWith_ANY|
and |g:vikiOpenUrlWith_ANY|.
This way, if you had, e.g., pdftotext (from the xpdf distribution) installed,
you could make viki to open references to pdf files right in VIM: >
fun! ConvertPDF()
if !exists("b:convertedPDF")
exec "cd ". expand("%:p:h")
exec "%!pdftotext ". expand("%:t") ." -"
:%!par 72w
cd -
setlocal noswapfile buftype=nowrite
let b:convertedPDF = 1
endif
endf
let g:vikiOpenFileWith_pdf = 'call viki#OpenLink("%{FILE}", "", 1)|silent call ConvertPDF()'
*viki-intervikis*
Later on, you probably want to define some intervikis. A |interviki| is a
shortcut to a different viki directory/namespace, so that you have to care
less about page names.
There are two ways to define an interviki:
1. Use |VikiDefine()|: >
call VikiDefine('SCI', $HOME."/Projects/Sci/Ideas", ".txt")
< This command will automatically define a menu for each interviki
(unless g:vikiMenuPrefix is empty) and it will also define a command
with the name of the interviki that can be used to quickly access viki
files from the vim command line.
The disadvantage of this approach is that you can define
intervikis only after plugin/viki.vim was loaded -- e.g. in
after/plugin/viki.vim.
2. Use |g:viki_intervikis| (a dictionary). The values can be either a list
(arguments for |VikiDefine()|) or a string. >
let g:viki_intervikis = {}
let g:viki_intervikis['SCI'] = [$HOME."/Projects/Sci/Ideas", ".txt"]
let g:viki_intervikis['PROJ'] = $HOME."/Projects"
< This variable has to be set in vimrc before loading the vim
plugin.
Your newly defined interviki can then be accessed as SCI::ThisIdea,
which would refer to the file "~/Projects/Sci/Ideas/ThisIdea.txt".
VikiDefine also defines a command (:SCI in this example) that opens a wiki's
index file (an optional 4th argument or "${g:vikiIndex}.${suffix}").
Intervikis can also be defined as patterns or functions as in the following
example: >
fun! GetAddress(vikiname)
let surname = substitute(a:vikiname, '^\(\u.\{-}\)\(\u\U*\)\?$', '\1', '')
let firstname = substitute(a:vikiname, '^\(\u.\{-}\)\(\u\U*\)\?$', '\2', '')
return 'https://www.example.com/cgi/search.cgi?search='. surname .','. firstname
endf
call VikiDefine('CONTACT', '*GetAddress("%s")')
call VikiDefine('INDEX', '%/foo/%s/index.html')
CONTACT::JohnDoe would the refer to
https://www.example.com/cgi/search.cgi?search=Dow,John and [[INDEX::bar]]
would refer to /foo/bar/index.html
In order to use the LaTeX enabled viki variant, add this to your |vimrc| file: >
au FileType tex let b:vikiFamily="LaTeX"
In order to automatically set |deplate| as the compiler for viki files: >
" we want to allow deplate to execute ruby code and external helper
" application
let g:deplatePrg = "deplate -x -X "
au FileType viki compiler deplate
*viki-filetype-detection*
By default, the filetype of files matching the suffix defined in
|g:vikiNameSuffix| will be set to viki.
You can also use |:autocmd| to set the filetype depending on the path: >
autocmd BufRead,BufNewFile $HOME/MyWiki/* set filetype=viki
If the variables b:getVikiLink or b:getExtVikiLink exist, their values are
used as _function_ names for returning the current viki name's definition. A
viki definition is an array of the three elements name, destination, anchor.
If the variables b:editVikiPage or b:createVikiPage exist, their values are
interpreted as _command_ names for editing readable or creating new wiki
pages.
For a better highlighting of viki files, also check out these variables:
- |g:vikiTypewriterFont| (see |viki-textstyles|)
- |g:vikiHeadingFont| (see |viki-headings|)
- |g:vikiHyperLinkColor|
- |g:vikiInexistentColor|
*viki-indent-disable*
In order to disable the indentation plugin, define the variable g:vikiNoIndent
and set it to whatever you want.
-----------------------------------------------------------------------
*viki-names*
Viki Names~
A viki name is either:
*viki-simple-names*
1. Simple wiki names -- these refer to files in the same directory as the
current file:
a. a word in CamelCase
VikiName
VikiName#anchor
NOTE: A simple viki name may include characters from
|g:vikiUpperCharacters| and |g:vikiLowerCharacters|.
b. some text between "[-" and "-]"
[-name-]
[-some name-]#there
NOTE: "[--]" refers to the current file.
NOTE: Anyways, the characters []:*&?<>/|\" are not allowed in
names as they usually cause trouble when included in file names.
*interviki*
c. an "inter wiki" name, where the first part (in upper-case letters)
is a shortcut to some other viki, so that you have to care less about
page names
OTHERVIKI::VikiName
OTHERVIKI::VikiName#there
OTHERVIKI::[-some name-]
OTHERVIKI::[-some name-]#there
E.g., if you had two intervikis defined, say SCI and COMP, you
could the refer to their pages as in: >
Couldn't SCI::ThisIdeaOfMine be combined with COMP::ThisIdeaOfMine?
<
NOTE: You can define intervikis with the VikiDefine command: >
VikiDefine OTHERVIKI /home/t/Wiki .vik
< Then OTHERVIKI::VikiName points to the file "/home/t/Wiki/VikiName.vik".
NOTE: Set the string variable g:vikiInter{NAME}_suffix (see
|curly-braces-names|) in order to override the settings of
|b:vikiNameSuffix| and |g:vikiUseParentSuffix| for references to
the other viki.
NOTE: If the variable |b:vikiNameSuffix| is defined, it will be added to
simple wiki names so that the simple wiki name "OtherFile" refers to
"OtherFile.suffix" -- e.g. for interlinking LaTeX-files.
Alternatively, you can set |g:vikiUseParentSuffix| to non-zero in order
to make viki always append the "parent" file's suffix to the
destination file.
*viki-extended-names*
2. an extended wiki name of the form:
[[destination]]
[[OTHERVIKI::destination]]
[[destination][name]]
[[destination#anchor][name]]
[[#anchor]]
[[#anchor][name]]
NOTE: The destination name is taken literally, i.e. variables like
|g:vikiUseParentSuffix| or |b:vikiNameSuffix| have no effect.
NOTE: Opening extended wiki names referring to files with suffixes
matching one of |vikiSpecialFiles| (e.g. [[test.jpg]]) can be
delegated to the operating system -- see |VikiOpenSpecialFile()|. The
same is true for names matching |vikiSpecialProtocols|, which will be
opened with |VikiOpenSpecialProtocol()|.
NOTE: In extended wiki names, destination path is relative to the
document's current directory if it doesn't match
"^\(\/\|[a-z]:\|[a-z]\+://\)". I.e. [[../test]] refers to the
directory parent to the document's directory. A tilde at the beginning
will be replaced with $HOME.
*viki-urls*
3. an URL
It is assumed that these URLs should be opened with an external
program; this behaviour can be changed by redefining the function
|VikiOpenSpecialProtocol()|.
4. Hyperwords (not supported by deplate)
Hyperwords are defined in either ./.vikiWords or
&rtp[0]/vikiWords.txt each word in a line in the form
"word<tab>destination", where <tab> is the tab character (code
9). Lines beginning with '%' are ignored. These words are
automatically highlighted. Depending on your setting of
|vikiNameTypes|, viki may try to make hyperwords out of the
filenames in the current buffer's directory. I.e. if
|vikiNameSuffix| is '.viki' and there is a file 'example.viki'
in the same directory as the current buffer's file, then each
occurrence of the word 'example' will be turned into a clickable
link. You can prevent a file name from being highlighted as
hyperword by defining an entry in the vikiWords file with "-" as
destination.
Adding #[a-z0-9]\+ to the wiki name denotes a reference to a specific anchor.
Examples for wiki names referring to an anchor: >
ThatPage#there
[[anyplace/filename.viki#there]]
[[anyplace/filename.viki#there][Filename]]
A anchor is marked as "^".b:commentStart."\?#[a-z0-9]\+" in the destination
file. If |b:commentStart| is not defined, the EnhancedCommentify-variables or
|&commentstring| will be used instead. Examples ('|' = beginning of line):
- LaTeX file, b:commentStart is set to "%"
|%#anchor
|#anchor
- C file, |&commentstring| is set to "/*%s*/"
|/*#anchor */
- Text file, b:commentStart is undefined
|#anchor
NOTE: If "#" is the comment character (as in ruby), a space should follow the
comment character in order to distinguish comments from anchors.
NOTE: In "full" viki mode (when invoked via VikiMode) comments are marked
with "%" by default (see g:vikiCommentStart). An anchor has thus to be
written as in the LaTeX example.
NOTE: |deplate| attaches an anchor to the previous element (e.g. |viki-tables|).
-----------------------------------------------------------------------
*viki-markup*
Pseudo Markup~
The pseudo markup is to some degree compatible with emacs-wiki, which in turn
is to some degree compatible with some other wiki -- i.e., it's compatible
enough to edit and work with files in emacs-wiki markup, but in some aspects
it's more restrictive. To convert viki markup to other formats, see the
|deplate|.
*viki-headings*
Headings~
* Level 1
** Level 2
...
NOTE: Headings can span more than one line by putting a backslash ('\') at
the end of the line.
NOTE: If |g:vikiHeadingFont| is defined, the heading will be set in this
font.
*viki-lists*
Lists: (indented)~
- Item
* Item
+ Item
1. Item 1
a. Item a
B. Item B
# Item
# Item 1
# Item 2
@ Item A
@ Item B
NOTE: "@" (unordered lists) and "#" (ordered lists) are the preferred markers.
*viki-descriptions*
Descriptions: (indented)~
Item :: Description
*viki-tasks*
Tasks: (indented)~
Viki supports some markup for task/priority lists. Basic syntax: >
#C9 DATE TAGS CONTACTS MESSAGE
where:
C ... category (a single upper case letter)
9 ... priority (a number from 0 to 9)
DATE ... a date or date range formatted as YEAR-MONTH-DAY or
YEAR-MONTH-DAY..YEAR-MONTH-DAY
TAGS ... a list of tags formatted as :tag1 :tag2
CONTACTS ... a list of tags formatted as @contact1 @contact2
MESSAGE ... some text
Examples: >
#A1 _ Important task
#A2 x Less important task (done)
#A2 90% Less important task (mostly completed)
#B2 2005-10-30 Less important task with deadline
#B2 x2005-10-25 Less important task (completed)
#X2 2005-10-25 Task (completed)
#A2 2005-10-25..2005-11-25 Task with date range
#A2 2005-10-25 :garden Task with a tag
#A2 2005-10-25 :garden @Anne Task with a tag & contact
You can switch category, priority, and date: >
#1A _ Important task
#2A x Less important task (done)
#2005-10-30 2A Important task
#2005-11-11 1A Most important task
#x2005-10-30 3A Less important task (done)
*viki-tables*
Tables~
|| Head || Category ||
| Row | Value |
#CAPTION: This Table
#label
NOTE: Rows can span more than one line by putting a backslash ('\') at the end
of the line.
*viki-symbols*
Symbols~
<-, ->, <=, =>, <~, ~>, <->, <=>, <~>, !=, ~~, ..., --, ==
*viki-markers*
Markers~
+++, ###, ???, !!!
*viki-strings*
Strings~
"Text in \"quotes\""
NOTE: See also |g:vikiMarkupEndsWithNewline|.
*viki-textstyles*
Textstyles~
__emphasized__, ''typewriter''
< NOTE: There must not be a whitespace after the opening mark.
NOTE: For the word styles, there must be a non-word character (|/\W|)
before the opening mark, i.e. a__b__c will be highlighted as normal text --
it won't be highlighted. You could use the continuous markup for putting
the "b" in the example in italic.
NOTE: If |g:vikiTypewriterFont| is defined, this font will be used to
highlight text in typewriter style.
NOTE: See also |g:vikiMarkupEndsWithNewline|.
*viki-comments*
Comments (whole lines)~
%Comment
*viki-regions*
Regions~
#Type [OPTIONS] <<EndOfRegion
Text ...
EndOfRegion
For a list of supported regions see the |deplate| documentation.
*viki-sharp-commands*
One-line commands~
#COMMAND [OPTIONS]: ARGS
OPTIONS have the form
- OPTION! ... set option to true
- OPTION=VALUE
- the characters "!" and "=" have to be escaped with a backslash
Commands are applied only if the option "fmt" isn't given or if it matches the
formatter regexp.
Short list of available COMMANDS "COMMAND" (see also |deplate|):
- INC: INCLUDED FILENAME
- FIG [here!|top!|bottom!]: FILENAME
- CAP [above!|below!]: TEXT
- TITLE: TEXT
- AUTHOR: TEXT
- AUTHORNOTE: TEXT
- DATE: [TEXT|now|today]
- MAKETITLE [page!]
- LIST [page!]: [contents|tables|figures|index]
- PAGE
It depends on the formatter if these options have any effect.
- DOC ... document options
- OPT ... element options (applies to the previous element)
*viki-macros*
Curly braces~
Curly braces should be escaped with a backslash (i.e., \{ and \}), as they
usually mark macros: >
{MACRO [OPTIONS]: ARGS...}
<
Short list of available macros (see also |deplate|):
- {fn: ID}
- inserts a footnote as defined by in a Fn or Footnote region.
- output depends on the formatter
- Example: >
Foo bar{fn: x} foo bar.
#Fn: x <<EOF
Bla bla.
EOF
< - {cite: ID}
- output depends on the formatter
- {date: [format string|now|today]}
- the format string uses ruby's strftime method.
- {ins: LITERALLY INSERTED TEXT}
- Example: {ins fmt=html: &lt;&lt;}
- {doc: ID}
- access document options, e.g. {opt: author}
- {opt: ID}
- access element (paragraph, table etc.) options
- {ruby [alt=ALTERNATIVE OUTPUT]: RUBY CODE}
- if the evaluation of ruby code is disabled, the text given in the
alt option or an empty string will be inserted
- a sequence of ruby commands must be separated by semicolons
Common options:
- fmt=FORMATTER, nofmt=UNMATCHED FORMATTER
NOTE: Macros cannot cross paragraph borders, i.e., they must not contain empty
lines. Using newlines in a macro argument is useless, as the macro text will
be collapsed to one single line.
*viki-backslash*
Backslashes~
- A backslash at the end of the line should make a pattern include the
next line.
- In general, a backslash should be an escape character that prevents the
vikification of the following character.
- A backslash should itself be escaped by a backslash.
\_nounderline_, \NoVikiName
-----------------------------------------------------------------------
*viki-key-bindings*
Default Key Binding~
<c-cr> ... |viki#MaybeFollowLink()|: Usually only works when the cursor is over
a wiki syntax group -- if the second argument is 1 it tries to interpret the
text under the cursor as a wiki name anyway. (NOTE: If you're working on a
terminal, <c-cr> most likely won't work. Use <LocalLeader>vf instead.)
<LocalLeader>vf ... Open in window
<LocalLeader>vt ... Open in a new tab
<LocalLeader>vs ... Open in a new window
<LocalLeader>vv ... Open in a new window but split vertically
- see also |vikiSplit|
<LocalLeader>v1 - <LocalLeader>v4 ... Open in window 1-4
<LocalLeader>ve ... |:VikiEdit| edit a viki page
<LocalLeader>vb <LocalLeader>v<left> ... |viki#GoBack()|
<LocalLeader>v<bs> <LocalLeader>v<up> ... |viki#GoParent()|
<LocalLeader>vq ... |:VikiQuote| mark selected text a quoted viki name
<LocalLeader>vd ... |:VikiMarkInexistent| in the whole document
<LocalLeader>vp ... |:VikiMarkInexistent| in the current paragraph
If |g:vikiMapMouse| is true then these mappings are active, too:
<m-leftmouse> ... |viki#MaybeFollowLink()|
<m-leftmouse> ... |viki#GoBack()| (always jumps to the last known entry point)
Additional Key Binding In Full Viki Mode
<c-tab>, <LocalLeader>vn ... |:VikiFindNext|
<s-c-tab>, <LocalLeader>vN ... |:VikiFindPrev|
*viki-highlight*
Highlighting~
Viki.vim defines several new highlight groups. Precaution is taken to select
different colours depending on the background, but colour schemes are ignored.
The colors are tested using color scheme with a white background.
- vikiHyperLink
- vikiHeading
- vikiList
- vikiTableHead
- vikiTableRow
- vikiSymbols
- vikiMarkers
- vikiAnchor
- vikiString
- vikiBold
- vikiItalic
- vikiUnderline
- vikiTypewriter
- vikiCommand
-----------------------------------------------------------------------
Generated regions~
Viki provides the following region types with programmatically generated
contents:
#Files ... List files matching a pattern
#Grep ... List lines in files matching a pattern
Default Key Binding~
<LocalLeader>vu ... Update the current #Files or #Grep region
<LocalLeader>vU ... Update all #Files or #Grep regions
*viki-files*
Files Region~
Viki knows a special #Files region that allows users to quickly generate
catalogs for viki files in a directory.
Example: >
#Files glob=lib/** types=f <<
[[example1.rb]!] This is an example file
[[example2.rb]!] This is another example
[[lib/example1.rb]!]
[[lib/example2.rb]!]
#Files glob=*.viki types=f <<
[[example.viki]!] The manual
Multiple patterns are separated by a pipe ("|") character. The filenames
are stored as extended viki names. Each line can take a comment that is
restored upon automatic update.
For a list of available arguments, see |viki#DirListing()|.
The following arguments can be used to deal with #Files regions. An
additional <bang> ("!") makes these command work on just files in the
same directory or a subdirectory as the file on the current line.
Default Key Binding~
<LocalLeader>vx ... :VikiFilesExec
<LocalLeader>vX ... :VikiFilesExec!
Example: >
Use ":VikiFilesExec! e" (<LocalLeader>vXe<cr>) to edit all the files in
the same directory or a subdirectory of the current file under the cursor.
*viki-grep*
Grep Region~
#Grep regions can be used to list files matching a pattern.
Example: >
#Grep glob=*.viki rx=test <<
[[/home/user/Wiki/Tester.viki#l=53][Tester.viki]] :: How to test!
[[/home/user/Wiki/Tests.viki#l=12][Tests.viki]] :: This is another test.
The #Grep region can e.g. be used get a list of back-references.
-----------------------------------------------------------------------
*viki-compile*
Viki Compile~
The compile plugin simply defines |deplate| as the current file's |makeprg|.
It also provides basic support for |deplate|'s error messages.
The compiler plugin provides a command for setting compiler options:
- DeplateSetCompiler [FLAGS]
E.g. when using the lvimrc plugin, you could put something like this into the
current directorie's .lvimrc-file for putting the output into a dedicated
directory: >
DeplateSetCompiler -d ../html
-----------------------------------------------------------------------
*viki-latex* *vikiLatex*
Viki LaTeX~
The archiv includes an experimental add-on for using LaTeX commands as simple
wiki names. Among the commands that are to some degree used as hyperlinks or
anchors:
- \viki[anchor]{name}
- \input
- \include
- \usepackage
- \psfig
- \includegraphics
- \bibliography
- \label (as anchors)
- \ref (in the current file only)
Limitations: There must not be spaces between between the leading backslash,
the command name, and its arguments. A command must not span several lines.
Simple viki names (including |interviki|, CamelCase, and quoted viki names)
are disabled -- as they wouldn't be of much use in a LaTeX document anyway.
(Well, as a matter of fact they aren't disabled but LaTeX commands are defined
as simple viki names.)
This plugin also highlights a hypothetical \viki[anchor]{name} command, which
could be defined as: \newcommand{\viki}[2][]{#2}
If b:vikiFamily is set to "latex", then calling |:VikiMinorMode| will use
these commands instead of normal viki names. This change can be made permanent
by adding this line to your |vimrc| file: >
au FileType tex let b:vikiFamily="latex"
<
LaTeX support is switched on with the command |:VikiMinorModeLaTeX|. This
command sets b:vikiFamily to "latex" and calls |:VikiMinorMode|. This
command relies on the external kpsewhich tool, which has to be installed on
your computer.
*vikiLatex-UserCommands*
You can extend the list of supported commands by listing your commands in
g:vikiLaTeXUserCommands and by defining a corresponding function called
VikiLaTeX_{YourCommand}(args, opts). VikiLaTeX assumes that a command looks
like this: \latexcommand[opts]{args}. This function should return a string
that defines the variable dest (=destination file) as well as, optionally,
anchor and name -- see |:return| for an explanation of how this works. A
simple minded example: >
let g:vikiLaTeXUserCommands = 'other\|self'
fun! VikiLaTeX_other(args, opts)
return 'let dest="'.a:args.'.tex" | let anchor="'.a:opts.'"'
endfun
fun! VikiLaTeX_self(args, opts)
return 'let dest="'.g:vikiSelfRef.'" | let anchor="'.a:opts.'"'
endfun
-----------------------------------------------------------------------
*viki-anyword*
Viki Any Word~
If b:vikiFamily or g:vikiFamily is set to "anyword", then any word becomes a
potential viki link.
This feature conflicts with the highlighting of links to inexistent files.
Links to inexistent files are displayed as normal text.
-----------------------------------------------------------------------
*viki-bibtex*
Viki BibTeX~
The bibtex ftplugin defines record labels as anchors. Thus, if make an
|interviki| definition point to your bib files you can refer to bib entries as
viki names. Example: >
call VikiDefine('BIB', $HOME ."/local/share/texmf/bibtex/bib/tml", ".bib")
Then, activating the following viki name
BIB::[-monos-]#rec02
would open the file monos.bib and search for the record rec02.
-----------------------------------------------------------------------
*viki-tags*
Ctags~
For ctags support (e.g. in conjunction with taglist) add this to your .ctags
file (this assumes that *.viki files are in viki mode; you have to adjust the
file suffix if you choose a different suffix): >
--langdef=deplate
--langmap=deplate:.viki
--regex-deplate=/^(\*+ .+)/\1/s,structure/
--regex-deplate=/^(#[a-z][a-z0-9]+)/\1/s,structure/
--regex-deplate=/\[\[[^\]]+\]\[([^\]]+)\]\]/\1/r,reference/
--regex-deplate=/\[\[([^\]]+)\]\]/\1/r,reference/
--regex-deplate=/([A-Z][a-z]+([A-Z][a-z]+)+)/\1/r,reference/
--regex-deplate=/([a-z]+:\/\/[A-Za-z0-9.:%?=&_~@\/|-]+)/\1/u,url/
For use with taglist, the variable "tlist_viki_settings" is already set for
you.
-----------------------------------------------------------------------
*deplate*
Deplate~
deplate is a ruby script/library that converts viki markup to:
- html
- htmlslides
- latex
- docbook
Download the latest version from http://sourceforge.net/projects/deplate/.
deplate's markup is not 100% identical with the standard viki mode's one.
E.g., it doesn't support underline, italic markup. deplate sometimes failes
with cryptic error messages and it doesn't always give the results one would
expect. On the other hand, it features inclusion of LaTeX snippets, footnotes,
references, an autogenerated index etc.
-----------------------------------------------------------------------
========================================================================
Contents~
tlist_viki_settings ........................ |tlist_viki_settings|
g:vikiMenuPrefix ........................... |g:vikiMenuPrefix|
g:vikiMenuLevel ............................ |g:vikiMenuLevel|
g:vikiFancyHeadings ........................ |g:vikiFancyHeadings|
g:vikiMarkInexistent ....................... |g:vikiMarkInexistent|
g:vikiHighlightMath ........................ |g:vikiHighlightMath|
g:vikiNameSuffix ........................... |g:vikiNameSuffix|
g:vikiIndex ................................ |g:vikiIndex|
g:viki_intervikis .......................... |g:viki_intervikis|
g:vikiSaveHistory .......................... |g:vikiSaveHistory|
g:vikiAutoupdateFiles ...................... |g:vikiAutoupdateFiles|
g:vikiFoldLevel ............................ |g:vikiFoldLevel|
g:vikiIndentedPriorityLists ................ |g:vikiIndentedPriorityLists|
b:vikiNoSimpleNames ........................ |b:vikiNoSimpleNames|
b:vikiDisableType .......................... |b:vikiDisableType|
VikiMakeName ............................... |VikiMakeName()|
VikiDefine ................................. |VikiDefine()|
:VikiDefine ................................ |:VikiDefine|
:VikiMinorMode ............................. |:VikiMinorMode|
:VikiMinorModeMaybe ........................ |:VikiMinorModeMaybe|
:VikiMinorModeViki ......................... |:VikiMinorModeViki|
:VikiMinorModeLaTeX ........................ |:VikiMinorModeLaTeX|
:VikiMinorModeAnyWord ...................... |:VikiMinorModeAnyWord|
:VikiMode .................................. |:VikiMode|
:VikiModeMaybe ............................. |:VikiModeMaybe|
:VikiBrowse ................................ |:VikiBrowse|
:VikiHome .................................. |:VikiHome|
:VIKI ...................................... |:VIKI|
g:vikiUpperCharacters ...................... |g:vikiUpperCharacters|
g:vikiLowerCharacters ...................... |g:vikiLowerCharacters|
g:vikiAnchorNameRx ......................... |g:vikiAnchorNameRx|
g:vikiUrlRestRx ............................ |g:vikiUrlRestRx|
g:viki#error_malformed_names ............... |g:viki#error_malformed_names|
g:vikiSpecialProtocols ..................... |g:vikiSpecialProtocols|
g:vikiSpecialProtocolsExceptions ........... |g:vikiSpecialProtocolsExceptions|
g:vikiSpecialFiles ......................... |g:vikiSpecialFiles|
g:vikiSpecialFilesExceptions ............... |g:vikiSpecialFilesExceptions|
g:viki_highlight_hyperlink_light ........... |g:viki_highlight_hyperlink_light|
g:viki_highlight_hyperlink_dark ............ |g:viki_highlight_hyperlink_dark|
g:viki_highlight_inexistent_light .......... |g:viki_highlight_inexistent_light|
g:viki_highlight_inexistent_dark ........... |g:viki_highlight_inexistent_dark|
g:vikiPromote .............................. |g:vikiPromote|
g:vikiUseParentSuffix ...................... |g:vikiUseParentSuffix|
g:vikiAnchorMarker ......................... |g:vikiAnchorMarker|
g:vikiFreeMarker ........................... |g:vikiFreeMarker|
g:vikiPostFindAnchor ....................... |g:vikiPostFindAnchor|
g:vikiNameTypes ............................ |g:vikiNameTypes|
g:vikiExplorer ............................. |g:vikiExplorer|
g:viki#cmd_no_fnameescape .................. |g:viki#cmd_no_fnameescape|
g:vikiHide ................................. |g:vikiHide|
g:vikiNoWrapper ............................ |g:vikiNoWrapper|
g:vikiCacheInexistent ...................... |g:vikiCacheInexistent|
g:vikiMapInexistent ........................ |g:vikiMapInexistent|
g:vikiMapKeys .............................. |g:vikiMapKeys|
g:vikiMapQParaKeys ......................... |g:vikiMapQParaKeys|
g:vikiHCM .................................. |g:vikiHCM|
g:vikiMapBeforeKeys ........................ |g:vikiMapBeforeKeys|
g:vikiFamily ............................... |g:vikiFamily|
g:vikiDirSeparator ......................... |g:vikiDirSeparator|
g:vikiTextstylesVer ........................ |g:vikiTextstylesVer|
g:vikiHomePage ............................. |g:vikiHomePage|
g:vikiFeedbackMin .......................... |g:vikiFeedbackMin|
g:vikiMapLeader ............................ |g:vikiMapLeader|
g:vikiAutoMarks ............................ |g:vikiAutoMarks|
g:VIKIBACKREFS ............................. |g:VIKIBACKREFS|
g:vikiBalloonLines ......................... |g:vikiBalloonLines|
g:vikiBalloon .............................. |g:vikiBalloon|
g:vikiBalloonEncoding ...................... |g:vikiBalloonEncoding|
g:vikiHyperWordsFiles ...................... |g:vikiHyperWordsFiles|
g:vikiBaseDirs ............................. |g:vikiBaseDirs|
g:vikiMapFunctionality ..................... |g:vikiMapFunctionality|
g:vikiMapFunctionalityMinor ................ |g:vikiMapFunctionalityMinor|
g:vikiFoldBodyLevel ........................ |g:vikiFoldBodyLevel|
g:vikiFolds ................................ |g:vikiFolds|
g:viki#files_head_rx ....................... |g:viki#files_head_rx|
g:viki#use_texmath ......................... |g:viki#use_texmath|
g:viki#code_syntax ......................... |g:viki#code_syntax|
g:viki#code_syntax_map ..................... |g:viki#code_syntax_map|
:VikiFindNext .............................. |:VikiFindNext|
:VikiFindPrev .............................. |:VikiFindPrev|
:VikiMarkInexistent ........................ |:VikiMarkInexistent|
:VikiQuote ................................. |:VikiQuote|
:VikiGoBack ................................ |:VikiGoBack|
:VikiJump .................................. |:VikiJump|
:VikiIndex ................................. |:VikiIndex|
:VikiEdit .................................. |:VikiEdit|
:VikiEditTab ............................... |:VikiEditTab|
:VikiEditInWin1 ............................ |:VikiEditInWin1|
:VikiEditInWin2 ............................ |:VikiEditInWin2|
:VikiEditInWin3 ............................ |:VikiEditInWin3|
:VikiEditInWin4 ............................ |:VikiEditInWin4|
:VikiFilesUpdate ........................... |:VikiFilesUpdate|
:VikiFilesUpdateAll ........................ |:VikiFilesUpdateAll|
:VikiGrepUpdate ............................ |:VikiGrepUpdate|
:VikiGrepUpdateAll ......................... |:VikiGrepUpdateAll|
:VikiFileExec .............................. |:VikiFileExec|
:VikiFilesExec ............................. |:VikiFilesExec|
:VikiFilesCmd .............................. |:VikiFilesCmd|
:VikiFilesCall ............................. |:VikiFilesCall|
viki#Mode .................................. |viki#Mode()|
VikiOpenAsWorkspace ........................ |VikiOpenAsWorkspace()|
g:vikiOpenFileWith_ANY ..................... |g:vikiOpenFileWith_ANY|
VikiOpenSpecialFile ........................ |VikiOpenSpecialFile()|
g:vikiOpenUrlWith_mailbox .................. |g:vikiOpenUrlWith_mailbox|
VikiOpenMailbox ............................ |VikiOpenMailbox()|
g:vikiUrlFileAs ............................ |g:vikiUrlFileAs|
g:vikiOpenUrlWith_file ..................... |g:vikiOpenUrlWith_file|
VikiOpenFileUrl ............................ |VikiOpenFileUrl()|
VikiOpenSpecialProtocol .................... |VikiOpenSpecialProtocol()|
viki#GetInterVikis ......................... |viki#GetInterVikis()|
viki#GetSimpleRx4SimpleWikiWord ............ |viki#GetSimpleRx4SimpleWikiWord()|
viki#GetSimpleRx4SimpleWikiName ............ |viki#GetSimpleRx4SimpleWikiName()|
viki#CanonicFilename ....................... |viki#CanonicFilename()|
viki#FindRx ................................ |viki#FindRx()|
viki#FindPrevHeading ....................... |viki#FindPrevHeading()|
viki#FindNextHeading ....................... |viki#FindNextHeading()|
viki#IsSupportedType ....................... |viki#IsSupportedType()|
viki#RxFromCollection ...................... |viki#RxFromCollection()|
viki#HighlightInexistent ................... |viki#HighlightInexistent()|
viki#MarkInexistentInElement ............... |viki#MarkInexistentInElement()|
viki#ExprMarkInexistentInElement ........... |viki#ExprMarkInexistentInElement()|
viki#MarkInexistentInRange ................. |viki#MarkInexistentInRange()|
viki#MarkInexistentInitial ................. |viki#MarkInexistentInitial()|
viki#SaveCache ............................. |viki#SaveCache()|
viki#CheckInexistent ....................... |viki#CheckInexistent()|
viki#SetBufferVar .......................... |viki#SetBufferVar()|
viki#DispatchOnFamily ...................... |viki#DispatchOnFamily()|
viki#IsHyperWord ........................... |viki#IsHyperWord()|
viki#HyperWordValue ........................ |viki#HyperWordValue()|
viki#CollectFileWords ...................... |viki#CollectFileWords()|
viki#CollectHyperWords ..................... |viki#CollectHyperWords()|
viki#MapMarkInexistent ..................... |viki#MapMarkInexistent()|
viki#HookCheckPreviousPosition ............. |viki#HookCheckPreviousPosition()|
viki#RestoreCursorPosition ................. |viki#RestoreCursorPosition()|
viki#SaveCursorPosition .................... |viki#SaveCursorPosition()|
viki#DebugCursorPosition ................... |viki#DebugCursorPosition()|
viki#MapFunctionality ...................... |viki#MapFunctionality()|
viki#MinorMode ............................. |viki#MinorMode()|
viki#MinorModeReset ........................ |viki#MinorModeReset()|
viki#IsInRegion ............................ |viki#IsInRegion()|
viki#GoParent .............................. |viki#GoParent()|
viki#GoBack ................................ |viki#GoBack()|
viki#SubstituteArgs ........................ |viki#SubstituteArgs()|
VikiAnchor_l ............................... |VikiAnchor_l()|
VikiAnchor_line ............................ |VikiAnchor_line()|
VikiAnchor_rx .............................. |VikiAnchor_rx()|
VikiAnchor_vim ............................. |VikiAnchor_vim()|
viki#GetAnchorRx ........................... |viki#GetAnchorRx()|
viki#SetAnchorMarks ........................ |viki#SetAnchorMarks()|
viki#GetWinNr .............................. |viki#GetWinNr()|
viki#SetWindow ............................. |viki#SetWindow()|
viki#OpenLink .............................. |viki#OpenLink()|
viki#Family ................................ |viki#Family()|
viki#DecomposeUrl .......................... |viki#DecomposeUrl()|
viki#GetSpecialFilesSuffixes ............... |viki#GetSpecialFilesSuffixes()|
viki#GetSpecialFilesSuffixesRx ............. |viki#GetSpecialFilesSuffixesRx()|
viki#IsSpecialFile ......................... |viki#IsSpecialFile()|
viki#IsSpecialProtocol ..................... |viki#IsSpecialProtocol()|
viki#IsSpecial ............................. |viki#IsSpecial()|
viki#MakeUrl ............................... |viki#MakeUrl()|
viki#MakeDef ............................... |viki#MakeDef()|
viki#SplitDef .............................. |viki#SplitDef()|
viki#MalformedName ......................... |viki#MalformedName()|
viki#LinkDefinition ........................ |viki#LinkDefinition()|
viki#WithSuffix ............................ |viki#WithSuffix()|
viki#ExpandSimpleName ...................... |viki#ExpandSimpleName()|
viki#IsInterViki ........................... |viki#IsInterViki()|
viki#InterVikiName ......................... |viki#InterVikiName()|
viki#InterVikiPart ......................... |viki#InterVikiPart()|
viki#InterVikiDest ......................... |viki#InterVikiDest()|
viki#InterVikiSuffix ....................... |viki#InterVikiSuffix()|
viki#ExtendedModifier ...................... |viki#ExtendedModifier()|
viki#FindFileWithSuffix .................... |viki#FindFileWithSuffix()|
viki#GetLink ............................... |viki#GetLink()|
viki#MaybeFollowLink ....................... |viki#MaybeFollowLink()|
viki#InterEditArg .......................... |viki#InterEditArg()|
viki#HomePage .............................. |viki#HomePage()|
viki#Edit .................................. |viki#Edit()|
viki#Browse ................................ |viki#Browse()|
viki#BrowseComplete ........................ |viki#BrowseComplete()|
viki#EditComplete .......................... |viki#EditComplete()|
viki#Index ................................. |viki#Index()|
viki#FindNextRegion ........................ |viki#FindNextRegion()|
viki#GetIndent ............................. |viki#GetIndent()|
viki#ExecExternal .......................... |viki#ExecExternal()|
viki#RegionUpdate .......................... |viki#RegionUpdate()|
viki#RegionUpdateAll ....................... |viki#RegionUpdateAll()|
viki#FilesExec ............................. |viki#FilesExec()|
viki#FilesCmd .............................. |viki#FilesCmd()|
viki#FilesCall ............................. |viki#FilesCall()|
viki#FilesRegionUpdateAll .................. |viki#FilesRegionUpdateAll()|
viki#FilesRegionUpdate ..................... |viki#FilesRegionUpdate()|
viki#DirListing ............................ |viki#DirListing()|
viki#FilesGetFilename ...................... |viki#FilesGetFilename()|
viki#FilesGetComment ....................... |viki#FilesGetComment()|
viki#Balloon ............................... |viki#Balloon()|
viki#MatchList ............................. |viki#MatchList()|
viki#ListItemTextObject .................... |viki#ListItemTextObject()|
viki#SelectListItem ........................ |viki#SelectListItem()|
viki#ShiftListItem ......................... |viki#ShiftListItem()|
viki#MoveListItem .......................... |viki#MoveListItem()|
viki#FoldLevel ............................. |viki#FoldLevel()|
viki#FoldText .............................. |viki#FoldText()|
viki#UpdateHeadings ........................ |viki#UpdateHeadings()|
viki#GrepRegionUpdateAll ................... |viki#GrepRegionUpdateAll()|
viki#GrepRegionUpdate ...................... |viki#GrepRegionUpdate()|
viki#CollectSyntaxRegionsFiletypes ......... |viki#CollectSyntaxRegionsFiletypes()|
viki_anyword#MinorMode ..................... |viki_anyword#MinorMode()|
viki_anyword#SetupBuffer ................... |viki_anyword#SetupBuffer()|
viki_anyword#DefineMarkup .................. |viki_anyword#DefineMarkup()|
viki_anyword#DefineHighlighting ............ |viki_anyword#DefineHighlighting()|
:VikiHiLink ................................ |:VikiHiLink|
:VikiHiLink ................................ |:VikiHiLink|
viki_anyword#Find .......................... |viki_anyword#Find()|
viki_latex#SetupBuffer ..................... |viki_latex#SetupBuffer()|
viki_latex#CheckFilename ................... |viki_latex#CheckFilename()|
viki_latex#CompleteSimpleNameDef ........... |viki_latex#CompleteSimpleNameDef()|
viki_latex#MinorMode ....................... |viki_latex#MinorMode()|
g:viki_viki#conceal_extended_link_markup ... |g:viki_viki#conceal_extended_link_markup|
g:viki_viki#conceal_extended_link_cchar .... |g:viki_viki#conceal_extended_link_cchar|
viki_viki#SetupBuffer ...................... |viki_viki#SetupBuffer()|
viki_viki#DefineMarkup ..................... |viki_viki#DefineMarkup()|
viki_viki#DefineHighlighting ............... |viki_viki#DefineHighlighting()|
viki_viki#MapKeys .......................... |viki_viki#MapKeys()|
n_<c-cr> ................................... |n_<c-cr>|
i_<c-cr> ................................... |i_<c-cr>|
n_<m-leftmouse> ............................ |n_<m-leftmouse>|
i_<m-leftmouse> ............................ |i_<m-leftmouse>|
n_<m-rightmouse> ........................... |n_<m-rightmouse>|
i_<m-rightmouse> ........................... |i_<m-rightmouse>|
n_<c-tab> .................................. |n_<c-tab>|
n_<c-s-tab> ................................ |n_<c-s-tab>|
viki_viki#MinorMode ........................ |viki_viki#MinorMode()|
viki_viki#FindAnchor ....................... |viki_viki#FindAnchor()|
viki_viki#CompleteExtendedNameDef .......... |viki_viki#CompleteExtendedNameDef()|
viki_viki#CompleteCmdDef ................... |viki_viki#CompleteCmdDef()|
viki_viki#CompleteSimpleNameDef ............ |viki_viki#CompleteSimpleNameDef()|
viki_viki#Find ............................. |viki_viki#Find()|
:CompilerSet ............................... |:CompilerSet|
DeplateCompilerSet ......................... |DeplateCompilerSet()|
:DeplateCompilerSet ........................ |:DeplateCompilerSet|
b:vikiCommentStart ......................... |b:vikiCommentStart|
b:vikiCommentEnd ........................... |b:vikiCommentEnd|
b:vikiHeadingMaxLevel ...................... |b:vikiHeadingMaxLevel|
b:vikiMaxFoldLevel ......................... |b:vikiMaxFoldLevel|
b:vikiInverseFold .......................... |b:vikiInverseFold|
[[ ......................................... |[[|
][ ......................................... |][|
]] ......................................... |]]|
[] ......................................... |[]|
v_<expr> ................................... |v_<expr>|
o_ii ....................................... |o_ii|
:HiLink .................................... |:HiLink|
:HiLink .................................... |:HiLink|
:HiLink .................................... |:HiLink|
:HiLink .................................... |:HiLink|
========================================================================
plugin/viki.vim~
*tlist_viki_settings*
tlist_viki_settings (default: "deplate;s:structure")
Support for the taglist plugin.
*g:vikiMenuPrefix*
g:vikiMenuPrefix (default: "Plugin.Viki.")
The prefix for the menu of intervikis. Set to '' in order to remove the
menu.
*g:vikiMenuLevel*
g:vikiMenuLevel (default: 1)
Make submenus for N letters of the interviki names.
*g:vikiFancyHeadings*
g:vikiFancyHeadings (default: 0)
If non-nil, display headings of different levels in different colors
*g:vikiMarkInexistent*
g:vikiMarkInexistent (default: 1)
If non-zero, highligh links to existent or inexistent files in
different colours.
*g:vikiHighlightMath*
g:vikiHighlightMath (default: 'latex')
If "latex", use the texmathMath |syn-cluster| to highlight
mathematical formulas.
*g:vikiNameSuffix*
g:vikiNameSuffix (default: ".viki")
Default file suffix (including the optional period, e.g. '.viki').
Can also be buffer-local.
*g:vikiIndex*
g:vikiIndex (default: 'index')
The default filename for an interviki's index name
*g:viki_intervikis*
g:viki_intervikis (default: {})
Definition of intervikis. (This variable won't be evaluated until
autoload/viki.vim is loaded).
*g:vikiSaveHistory*
g:vikiSaveHistory (default: index(split(&viminfo, ','), '!') != -1)
If non-nil, cache back-links information
*g:vikiAutoupdateFiles*
g:vikiAutoupdateFiles (default: 0)
If true, automatically update all |viki-files| regions.
*g:vikiFoldLevel*
g:vikiFoldLevel (default: 5)
If > 0, set the 'foldlevel' of viki files to this value. (This is
only useful if 'foldlevel' still has the default value of 0.)
*g:vikiIndentedPriorityLists*
g:vikiIndentedPriorityLists (default: 1)
If true, priority lists must be indented by at least one
whitespace character.
*b:vikiNoSimpleNames*
b:vikiNoSimpleNames (default: 0)
If non-nil, simple viki names are disabled.
*b:vikiDisableType*
b:vikiDisableType (default: "")
Disable certain viki name types (see |vikiNameTypes|).
E.g., in order to disable CamelCase names only, set this variable to 'c'.
*VikiMakeName()*
VikiMakeName(iviki, name, ...)
Return a viki name for a vikiname on a specified interviki
VikiMakeName(iviki, name, ?quote=1)
*VikiDefine()*
VikiDefine(name, prefix, ...)
Define an interviki name
VikiDefine(name, prefix, ?suffix="*", ?index="Index.${suffix}")
suffix == "*" -> g:vikiNameSuffix
*:VikiDefine*
VikiDefine NAME BASE ?SUFFIX
Define an interviki. See also |VikiDefine()|.
*:VikiMinorMode*
:VikiMinorMode
NOTE: Be aware that we cannot highlight a reference if the text is embedded
in syntax group that doesn't allow inclusion of arbitrary syntax elemtents.
*:VikiMinorModeMaybe*
:VikiMinorModeMaybe
*:VikiMinorModeViki*
:VikiMinorModeViki
*:VikiMinorModeLaTeX*
:VikiMinorModeLaTeX
*:VikiMinorModeAnyWord*
:VikiMinorModeAnyWord
*:VikiMode*
:VikiMode
Basically the same as: >
set ft=viki
< The main difference between these two is that VikiMode unlets
b:did_ftplugin to make sure that the ftplugin gets loaded.
*:VikiModeMaybe*
:VikiModeMaybe
*:VikiBrowse*
:VikiBrowse
*:VikiHome*
:VikiHome
Open the |viki-homepage|.
*:VIKI*
:VIKI
Open the |viki-homepage|.
========================================================================
autoload/viki.vim~
Simple Viki Names [2]: *viki-vars-simple-names*
*g:vikiUpperCharacters*
g:vikiUpperCharacters (default: "A-Z")
A simple viki name is made from a series of upper and lower characters
(i.e. CamelCase-names). These two variables define what is considered as
upper and lower-case characters. We don't rely on the builtin
functionality for this.
*g:vikiLowerCharacters*
g:vikiLowerCharacters (default: "a-z")
Extended Viki Names [2]: *viki-vars-ext-names*
- b:vikiExtendedNameRx, b:vikiExtendedNameSimpleRx[1]
- b:vikiExtendedNameNameIdx, b:vikiExtendedNameDestIdx,
b:vikiExtendedNameAnchorIdx
URLs [2]: *viki-vars-urls*
- b:vikiUrlRx, b:vikiUrlSimpleRx[1]
- b:vikiUrlNameIdx, b:vikiUrlDestIdx, b:vikiUrlAnchorIdx
NOTE: [1] The same as *Rx variables but with less groups.
NOTE: [2] These variables are defined by |VikiSetupBuffer()|.
- b:vikiAnchorRx *b:vikiAnchorRx*
If this variable exists, the string "%{ANCHOR}" will be replaced with the
search text. The expression has to conform to the very nomagic |/\V|
syntax.
*g:vikiAnchorNameRx*
g:vikiAnchorNameRx (default: '')
Characters allowed in anchors
Defaults to:
[b:vikiLowerCharacters][b:vikiLowerCharacters + b:vikiUpperCharacters + '_0-9]*
*g:vikiUrlRestRx*
g:vikiUrlRestRx (default: '['. g:vikiLowerCharacters . g:vikiUpperCharacters .'0-9?%_=&+-]*')
*g:viki#error_malformed_names*
g:viki#error_malformed_names (default: 0)
If true, throw an error on malformed viki names.
*g:vikiSpecialProtocols*
g:vikiSpecialProtocols (default: 'https\?\|ftps\?\|nntp\|mailto\|mailbox\|file')
URLs matching these protocols are handled by |VikiOpenSpecialProtocol()|.
Can also be buffer-local.
*g:vikiSpecialProtocolsExceptions*
g:vikiSpecialProtocolsExceptions (default: "")
Exceptions from g:vikiSpecialProtocols
*g:vikiSpecialFiles*
g:vikiSpecialFiles (default: [...])
Files matching these suffixes are handled by |viki#OpenSpecialFile()|.
Can also be buffer-local.
*g:vikiSpecialFilesExceptions*
g:vikiSpecialFilesExceptions (default: "")
Exceptions from g:vikiSpecialFiles
*g:viki_highlight_hyperlink_light*
g:viki_highlight_hyperlink_light (default: 'term=underline cterm=underline gui=underline ctermfg=DarkBlue guifg=DarkBlue')
*g:viki_highlight_hyperlink_dark*
g:viki_highlight_hyperlink_dark (default: 'term=underline cterm=underline gui=underline ctermfg=LightBlue guifg=#bfbfff')
*g:viki_highlight_inexistent_light*
g:viki_highlight_inexistent_light (default: 'term=underline cterm=underline gui=underline ctermfg=DarkRed guifg=DarkRed')
*g:viki_highlight_inexistent_dark*
g:viki_highlight_inexistent_dark (default: 'term=underline cterm=underline gui=underline ctermfg=Red guifg=Red')
*g:vikiPromote*
g:vikiPromote (default: 0)
If set to true, any files loaded by viki will become viki enabled (in
minor mode); this was the default behaviour in earlier versions
*g:vikiUseParentSuffix*
g:vikiUseParentSuffix (default: 1)
If true, use the parent document's suffix.
If true, always append the "parent" file's suffix to the
destination file name. I.e. if the current file is "ThisIdea.txt"
the the viki name "OtherIdea" will refer to the file
"OtherIdea.txt".
*g:vikiAnchorMarker*
g:vikiAnchorMarker (default: "#")
Prefix for anchors
*g:vikiFreeMarker*
g:vikiFreeMarker (default: 0)
If true and an explicitly marked anchor isn't found, search for the anchor
text as such. This search will be case-insensitive. deplate won't be able
to deal with such pseudo-references, of course.
*g:vikiPostFindAnchor*
g:vikiPostFindAnchor (default: 'norm! zz')
*g:vikiNameTypes*
g:vikiNameTypes (default: "csSeuixwf")
Disable certain types of viki names globally or for a single buffer.
(experimental, doesn't fully work yet)
List of enabled viki name types:
s ... Simple viki name
c ... CamelCase
S ... simple, quoted viki name
i ... |interviki|
w ... Hyperwords
f ... file-bases hyperwords
e ... Extended viki name
u ... URL
x ... Directives (some commands, regions ...)
*g:vikiExplorer*
g:vikiExplorer (default: "Sexplore")
Which directory explorer to use to edit directories
*g:viki#cmd_no_fnameescape*
g:viki#cmd_no_fnameescape (default: '^\(\ue\|E\)xplore\>')
A |regexp| matching commands for which the filename should not be
pre-processed with |fnameescape()| when opening a file.
*g:vikiHide*
g:vikiHide (default: '')
If hide or update: use the respective command when leaving a buffer
If a dirty buffers gets hidden, vim usually complains. This can be
tiresome -- depending on your editing habits. When this variable is set to
"hide", vim won't complain. If you set it to "update", a viki buffer will
be automatically updated before editing a different file. If you leave
this empty (""), the default behaviour is in effect. See also |hidden|.
*g:vikiNoWrapper*
g:vikiNoWrapper (default: '\cexplore')
Don't use g:vikiHide for commands matching this rx
*g:vikiCacheInexistent*
g:vikiCacheInexistent (default: 0)
Cache information about a document's inexistent names
If non-zero, save patterns for |g:vikiMarkInexistent| for later
re-use using |tlib#cache#Filename()|. You might want to delete old
files from the |g:tlib_cache| directory from time to time.
*g:vikiMapInexistent*
g:vikiMapInexistent (default: 1)
If non-nil, map keys that trigger the evaluation of inexistent names
*g:vikiMapKeys*
g:vikiMapKeys (default: "]).,;:!?\"' ")
Map these keys for g:vikiMapInexistent to LineQuick
*g:vikiMapQParaKeys*
g:vikiMapQParaKeys (default: "\n")
Map these keys for g:vikiMapInexistent to ParagraphVisible
*g:vikiHCM*
g:vikiHCM (default: ['syntaxleave_oneline'])
Install hooks for these conditions (requires hookcursormoved to be
installed)
"linechange" could cause some slowdown.
*g:vikiMapBeforeKeys*
g:vikiMapBeforeKeys (default: ']')
Check the viki name before inserting this character
*g:vikiFamily*
g:vikiFamily (default: "viki")
Some functions a gathered in families/classes. See vikiLatex.vim for
an example.
By defining this variable, family specific functions will be called for:
- viki#{b:vikiFamily}#SetupBuffer(state)
- viki#{b:vikiFamily}#DefineMarkup(state)
- viki#{b:vikiFamily}#DefineHighlighting(state)
- viki#{b:vikiFamily}#CompleteSimpleNameDef(def)
- viki#{b:vikiFamily}#CompleteExtendedNameDef(def)
- viki#{b:vikiFamily}#FindAnchor(anchor)
If one of these functions is undefined for a "viki family", then the
default one is called.
Apart from the default behaviour the following families are defined:
- latex (see |viki-latex|)
- anyword (see |viki-anyword|)
*g:vikiDirSeparator*
g:vikiDirSeparator (default: "/")
The directory separator
*g:vikiTextstylesVer*
g:vikiTextstylesVer (default: 2)
The version of Deplate markup.
Defines the markup of |viki-textstyles| like emphasized or code.
*g:vikiHomePage*
g:vikiHomePage (default: '')
The default viki page (as absolute filename).
An absolute filename that is the general viki homepage (see also
|:VikiEdit| and |:VikiHome|).
*g:vikiFeedbackMin*
g:vikiFeedbackMin (default: &lines)
How often the feedback is changed when marking inexisting links
*g:vikiMapLeader*
g:vikiMapLeader (default: '<LocalLeader>v')
The map leader for most viki key maps.
*g:vikiAutoMarks*
g:vikiAutoMarks (default: 1)
If non-nil, anchors like #mX are turned into vim marks
*g:VIKIBACKREFS*
g:VIKIBACKREFS (default: {})
The variable that keeps back-links information
*g:vikiBalloonLines*
g:vikiBalloonLines (default: '&lines / 3')
An expression that evaluates to the number of lines that should be
included in the balloon tooltop text if &ballonexpr is set to
viki#Balloon().
*g:vikiBalloon*
g:vikiBalloon (default: 1)
If true, show some line of the target file in a balloon tooltip
window.
*g:vikiBalloonEncoding*
g:vikiBalloonEncoding (default: &enc)
*g:vikiHyperWordsFiles*
g:vikiHyperWordsFiles (default: [...])
A list of files that contain special viki names.
Can also be buffer-local.
See also |g:vikiBaseDirs|.
*g:vikiBaseDirs*
g:vikiBaseDirs (default: ['.'])
Where |g:vikiHyperWordsFiles| are looked for.
Can also be buffer-local.
'.' will be expanded to the directory of the current buffer.
*g:vikiMapFunctionality*
g:vikiMapFunctionality (default: 'ALL')
Define which keys to map
b ... go back
c ... follow link (c-cr)
e ... edit
F ... find
f ... follow link (<LocalLeader>v)
i ... check for inexistant destinations
I ... map keys in g:vikiMapKeys and g:vikiMapQParaKeys
m[fb] ... map mouse (depends on f or b)
p ... edit parent (or backlink)
q ... quote
tF ... tab as find
Files ... #Files related
Grep ... #Grep related
let g:vikiMapFunctionality = 'mf mb tF c q e i I Files'
*g:vikiMapFunctionalityMinor*
g:vikiMapFunctionalityMinor (default: 'f b p mf mb tF c q e')
Define which keys to map in minor mode (invoked via :VikiMinorMode)
*g:vikiFoldBodyLevel*
g:vikiFoldBodyLevel (default: 6)
Consider fold levels bigger that this as text body, levels smaller
than this as headings
This variable is only used if |g:vikiFoldMethodVersion| is 1.
If set to 0, the "b" mode in |vikiFolds| will set the body level
depending on the headings used in the current buffer. Otherwise
|b:vikiHeadingMaxLevel| + 1 will be used.
*g:vikiFolds*
g:vikiFolds (default: 'hf')
Define which elements should be folded:
h :: Heading
H :: Headings (but inverse folding)
l :: Lists
b :: The body has max heading level + 1. This is slightly faster
than the other version as vim never has to scan the text; but
the behaviour may vary depending on the sequence of headings if
|vikiFoldBodyLevel| is set to 0.
f :: Files regions.
s :: ???
This variable is only used if |g:vikiFoldMethodVersion| is 1.
*g:viki#files_head_rx*
g:viki#files_head_rx (default: '^\(\*\s\+\)')
If a "head" argument is passed to the #Files region, the retrieved
lines will be preprocessed by removing text matching this
expression.
*g:viki#use_texmath*
g:viki#use_texmath (default: 1)
If true, load syntax/texmath.vim for a prettier display of
mathematical formulas.
*g:viki#code_syntax*
g:viki#code_syntax (default: [])
A list of filetypes for which to always enable syntax highlighting
of #Code regions.
The buffer is scanned once for #Code regions with known filetypes.
New #Code regions may not be properly highlighted. You can
circumvent this problem by adding names of frequently used
syntaxes/filetypes.
*g:viki#code_syntax_map*
g:viki#code_syntax_map (default: {})
A dictionary that maps syntaxes for #Code regions to vim
filetypes.
*:VikiFindNext*
:VikiFindNext
Find the next viki name or URL
*:VikiFindPrev*
:VikiFindPrev
Find the previous viki name or URL
*:VikiMarkInexistent*
:VikiMarkInexistent
Update the highlighting of links to inexistent files.
VikiMarkInexistent can take a range as argument.
*:VikiQuote*
:VikiQuote
Mark selected text as a quoted simple viki name, i.e., enclose it in
[- and -].
This command requires imaps to be installed.
*:VikiGoBack*
:VikiGoBack
*:VikiJump*
:VikiJump
*:VikiIndex*
:VikiIndex
*:VikiEdit*
VikiEdit[!] NAME
Edit the wiki page called NAME. If the NAME is '*', the |viki-homepage| will
be opened. This is a convenient way to edit any wiki page from vim's command
line. If you call :VikiEdit! (with bang), the homepage will be opened first,
so that the homepage's customizations (and not the current buffer's one) are
in effect. There are a few gotchas:
1. Viki doesn't define a default directory for wiki pages. Thus a wiki page
will be looked for in the directory of the current buffer --
whatever this is -- and the customizations of this buffer are in
effect. You can circumvent this problem by using |interviki|
names or define a |viki-homepage| and call :VikiEdit! with a
bang.
2. Viki relies on some buffer local variables to be set. As customizability
is one viki's main design goal (although, one might want to
discuss whether I overdid it), there are no global settings that
would define what a valid viki name is supposed to look like. As
a consequence, if you disabled a certain type of wiki name in the
current buffer, you won't be able to edit a wiki page of this
type. E.g.: If the current buffer contains a LaTeX file,
|vikiFamily| is most likely set to "LaTeX" (see |viki-latex|).
For the LaTeX family, e.g., CamelCase and interwiki names are
disabled. Consequently, you can't do, e.g., >
:VikiEdit IDEAS::WikiPage
< Again, you can circumvent this problem by defining a
|viki-homepage| and call :VikiEdit! with a bang.
*:VikiEditTab*
:VikiEditTab
*:VikiEditInWin1*
:VikiEditInWin1
*:VikiEditInWin2*
:VikiEditInWin2
*:VikiEditInWin3*
:VikiEditInWin3
*:VikiEditInWin4*
:VikiEditInWin4
*:VikiFilesUpdate*
:VikiFilesUpdate
Update the current |viki-files| #Files region under the cursor.
*:VikiFilesUpdateAll*
:VikiFilesUpdateAll
Update all |viki-files| #Files regions in the current buffer.
*:VikiGrepUpdate*
:VikiGrepUpdate
Update the current |viki-grep| #Grep region under the cursor.
*:VikiGrepUpdateAll*
:VikiGrepUpdateAll
Update all |viki-grep| #Grep regions in the current buffer.
*:VikiFileExec*
:VikiFileExec
*:VikiFilesExec*
:VikiFilesExec
|:execute| a vim command after doing some replacements with the command
string. For each formatted string the command is issued only once --
i.e. you can work easily with the directories. If no special formatting
string is contained, the preformatted filename is appended to the command.
%{FILE} ... filename
%{FFILE} ... preformatted filename (with '#%\ ' escaped)
%{DIR} ... file's directory
*:VikiFilesCmd*
:VikiFilesCmd
|:execute| VikiCmd_{VIKI_COMMAND_NAME} FILENAME
*:VikiFilesCall*
:VikiFilesCall
|:call| VikiCmd_{FUNCTION_NAME}(FILENAME)
*viki#Mode()*
viki#Mode(...)
This is mostly a legacy function. Using set ft=viki should work too.
*VikiOpenAsWorkspace()*
VikiOpenAsWorkspace(file)
*g:vikiOpenFileWith_ANY*
g:vikiOpenFileWith_ANY (default: "exec 'silent !'. g:netrw_browsex_viewer .' '. shellescape('%{FILE}')")
*VikiOpenSpecialFile()*
VikiOpenSpecialFile(file)
Handles filenames that match |vikiSpecialFiles|.
If g:vikiOpenFileWith_{SUFFIX} is defined, it contains a command
definition for opending files of this type. "%{FILE}" is replaced with the
file name ("%%" = "%") and the resulting string is executed. Example: >
let g:vikiOpenFileWith_html = '!firefox %{FILE}'
< The contents of variable g:vikiOpenFileWith_ANY will be used as fallback
command. Under Windows, g:vikiOpenFileWith_ANY defaults to "silent !cmd /c
start".
All suffixes are translated to lower case.
*g:vikiOpenUrlWith_mailbox*
g:vikiOpenUrlWith_mailbox (default: "call VikiOpenMailbox('%{URL}')")
*VikiOpenMailbox()*
VikiOpenMailbox(url)
*g:vikiUrlFileAs*
g:vikiUrlFileAs (default: 'special')
Possible values: special*, query, normal
*g:vikiOpenUrlWith_file*
g:vikiOpenUrlWith_file (default: "call VikiOpenFileUrl('%{URL}')")
*VikiOpenFileUrl()*
VikiOpenFileUrl(url)
*VikiOpenSpecialProtocol()*
VikiOpenSpecialProtocol(url)
Handles filenames that match |vikiSpecialProtocols|.
If g:vikiOpenUrlWith_{PROTOCOL} is defined, it contains a command definition
for opending urls of this type. "%{URL}" is replaced with the url ("%%" =
"%") and the resulting string is executed. Example: >
let g:vikiOpenUrlWith_mailto = '!thunderbird -compose %{URL}'
< The contents of variable g:vikiOpenUrlWith_ANY will be used as fallback
command. Under Windows, g:vikiOpenUrlWith_ANY defaults to "silent
!rundll32 url.dll ...".
All protocol names are translated to lower case.
*viki#GetInterVikis()*
viki#GetInterVikis()
*viki#GetSimpleRx4SimpleWikiWord()*
viki#GetSimpleRx4SimpleWikiWord()
Get a rx that matches a simple word
*viki#GetSimpleRx4SimpleWikiName()*
viki#GetSimpleRx4SimpleWikiName()
Get a rx that matches a simple name
*viki#CanonicFilename()*
viki#CanonicFilename(fname)
Make all filenames use slashes
*viki#FindRx()*
viki#FindRx()
Build the rx to find viki names
*viki#FindPrevHeading()*
viki#FindPrevHeading()
Find the previous heading
*viki#FindNextHeading()*
viki#FindNextHeading()
Find the next heading
*viki#IsSupportedType()*
viki#IsSupportedType(type, ...)
Test whether we want to markup a certain viki name type for the current
buffer
viki#IsSupportedType(type, ?types=b:vikiNameTypes)
*viki#RxFromCollection()*
viki#RxFromCollection(coll)
Build an rx from a list of names
*viki#HighlightInexistent()*
viki#HighlightInexistent()
Actually highlight inexistent file names
*viki#MarkInexistentInElement()*
viki#MarkInexistentInElement(elt)
Check a text element for inexistent names
*viki#ExprMarkInexistentInElement()*
viki#ExprMarkInexistentInElement(elt, key)
*viki#MarkInexistentInRange()*
viki#MarkInexistentInRange(line1, line2)
*viki#MarkInexistentInitial()*
viki#MarkInexistentInitial()
First-time markup of inexistent names. Handles cached values. Called
from syntax/viki.vim
*viki#SaveCache()*
viki#SaveCache(...)
*viki#CheckInexistent()*
viki#CheckInexistent()
The function called from autocommands: re-check for inexistent names
when re-entering a buffer.
*viki#SetBufferVar()*
viki#SetBufferVar(name, ...)
Initialize buffer-local variables on the basis of other variables "..."
or from a global variable.
*viki#DispatchOnFamily()*
viki#DispatchOnFamily(fn, ...)
Call a fn.family if existent, call fn otherwise.
viki#DispatchOnFamily(fn, ?family='', *args)
*viki#IsHyperWord()*
viki#IsHyperWord(word)
*viki#HyperWordValue()*
viki#HyperWordValue(word)
*viki#CollectFileWords()*
viki#CollectFileWords(table, simpleWikiName)
*viki#CollectHyperWords()*
viki#CollectHyperWords(table)
*viki#MapMarkInexistent()*
viki#MapMarkInexistent(key, element)
Map a key that triggers checking for inexistent names
*viki#HookCheckPreviousPosition()*
viki#HookCheckPreviousPosition(mode)
In case this function gets called repeatedly for the same position, check only once.
*viki#RestoreCursorPosition()*
viki#RestoreCursorPosition(...)
Restore the cursor position
viki#RestoreCursorPosition(?line, ?VCol, ?EOL, ?Winline)
*viki#SaveCursorPosition()*
viki#SaveCursorPosition()
Save the cursor position
*viki#DebugCursorPosition()*
viki#DebugCursorPosition(...)
Display a debug message
*viki#MapFunctionality()*
viki#MapFunctionality(mf, key)
Check if the key maps should support a specified functionality
*viki#MinorMode()*
viki#MinorMode(...)
*viki#MinorModeReset()*
viki#MinorModeReset()
Re-set minor mode if the buffer is already in viki minor mode.
*viki#IsInRegion()*
viki#IsInRegion(line)
Check whether line is within a region syntax
*viki#GoParent()*
viki#GoParent()
Jump to the parent buffer (or go back in history).
If b:vikiParent is defined, open this viki name, otherwise use
|viki#GoBack()|.
*viki#GoBack()*
viki#GoBack(...)
Go back in history.
Viki keeps record about the "source" files from where a viki page was
entered. Calling this function jumps back to the "source" file (if only
one such back reference is known) or let's you select from a list of
"source" files. The information is stored in buffer variables -- i.e.,
it gets lost after closing the buffer. Care was taken to reduce
information clutter, which is why the number of possible back references
per "source" file was limited to one.
*viki#SubstituteArgs()*
viki#SubstituteArgs(str, ...)
Expand template strings as in
"foo %{FILE} bar", 'FILE', 'file.txt' => "foo file.txt bar"
*VikiAnchor_l()*
VikiAnchor_l(arg)
Handle special anchors in extented viki names
Example: [[index#l=10]]
*VikiAnchor_line()*
VikiAnchor_line(arg)
Example: [[index#line=10]]
*VikiAnchor_rx()*
VikiAnchor_rx(arg)
Example: [[index#rx=foo]]
*VikiAnchor_vim()*
VikiAnchor_vim(arg)
Example: [[index#vim=/foo]]
*viki#GetAnchorRx()*
viki#GetAnchorRx(anchor)
Return an rx for searching anchors
*viki#SetAnchorMarks()*
viki#SetAnchorMarks()
Set automatic anchor marks: #ma => 'a
*viki#GetWinNr()*
viki#GetWinNr(...)
Get the window number where the destination file should be opened
*viki#SetWindow()*
viki#SetWindow(winNr)
Set the window where to open a file/display a buffer
*viki#OpenLink()*
viki#OpenLink(filename, anchor, ...)
Open a filename in a certain window and jump to an anchor if any
viki#OpenLink(filename, anchor, ?create=0, ?postcmd='', ?wincmd=0)
*viki#Family()*
viki#Family(...)
Get the current viki family
*viki#DecomposeUrl()*
viki#DecomposeUrl(dest)
Decompose an url into filename, anchor, args
*viki#GetSpecialFilesSuffixes()*
viki#GetSpecialFilesSuffixes()
Get a list of special files' suffixes
*viki#GetSpecialFilesSuffixesRx()*
viki#GetSpecialFilesSuffixesRx(...)
Get an rx matching special files' suffixes
*viki#IsSpecialFile()*
viki#IsSpecialFile(dest)
Check if dest is a special file
*viki#IsSpecialProtocol()*
viki#IsSpecialProtocol(dest)
Check if dest uses a special protocol
*viki#IsSpecial()*
viki#IsSpecial(dest)
Check if dest is somehow special
*viki#MakeUrl()*
viki#MakeUrl(dest, anchor)
*viki#MakeDef()*
viki#MakeDef(v_name, v_dest, v_anchor, v_part, v_type)
Return a structure or whatever describing a viki name/link
*viki#SplitDef()*
viki#SplitDef(def)
Legacy function: Today we would use dictionaries for this
Return vimscript code that defines a set of variables on the basis of a
viki name definition
*viki#MalformedName()*
viki#MalformedName(msg)
*viki#LinkDefinition()*
viki#LinkDefinition(txt, col, compound, ignoreSyntax, type)
If txt matches a viki name typed as defined by compound return a
structure defining this viki name.
*viki#WithSuffix()*
viki#WithSuffix(fname)
Return a viki filename with a suffix
*viki#ExpandSimpleName()*
viki#ExpandSimpleName(dest, name, suffix)
Return the real destination for a simple viki name
*viki#IsInterViki()*
viki#IsInterViki(vikiname)
Check whether a vikiname uses an interviki
*viki#InterVikiName()*
viki#InterVikiName(vikiname)
Get the interviki name of a vikiname
*viki#InterVikiPart()*
viki#InterVikiPart(vikiname)
Get the plain vikiname of a vikiname
*viki#InterVikiDest()*
viki#InterVikiDest(vikiname, ...)
Return an interviki's root directory
*viki#InterVikiSuffix()*
viki#InterVikiSuffix(vikiname, ...)
Return an interviki's suffix
*viki#ExtendedModifier()*
viki#ExtendedModifier(part)
Return the modifiers in extended viki names
*viki#FindFileWithSuffix()*
viki#FindFileWithSuffix(filename, suffixes)
Complete a file's basename on the basis of a list of suffixes
*viki#GetLink()*
viki#GetLink(ignoreSyntax, ...)
This is the core function that builds a viki name definition from what
is under the cursor.
viki#GetLink(ignoreSyntax, ?txt, ?col=0, ?supported=b:vikiNameTypes)
*viki#MaybeFollowLink()*
viki#MaybeFollowLink(oldmap, ignoreSyntax, ?winNr=0)
Follow a viki name if any or complain about not having found a valid
viki name under the cursor.
oldmap: If there isn't a viki link under the cursor:
"" ... throw error
1 ... return \<c-cr>
whatever ... return whatever
ignoreSyntax: If there isn't a viki syntax group under the cursor:
0 ... no viki name found
1 ... look if there is a viki name under cursor anyways
*viki#InterEditArg()*
viki#InterEditArg(iname, name)
*viki#HomePage()*
viki#HomePage(?winNr=0)
Open the homepage.
*viki#Edit()*
viki#Edit(name, ?ignoreSpecial=0, ?winNr=0)
Edit a vikiname
*viki#Browse()*
viki#Browse(name)
*viki#BrowseComplete()*
viki#BrowseComplete(ArgLead, CmdLine, CursorPos)
*viki#EditComplete()*
viki#EditComplete(ArgLead, CmdLine, CursorPos)
Command line completion of |:VikiEdit|
*viki#Index()*
viki#Index()
Edit the current directory's index page
*viki#FindNextRegion()*
viki#FindNextRegion(name)
*viki#GetIndent()*
viki#GetIndent()
Indentation
*viki#ExecExternal()*
viki#ExecExternal(cmd)
*viki#RegionUpdate()*
viki#RegionUpdate()
Update the current #Files or #Grep region.
*viki#RegionUpdateAll()*
viki#RegionUpdateAll()
Update all #Files or #Grep in the current buffer.
#Files related stuff
*viki#FilesExec()*
viki#FilesExec(cmd, bang, ...)
*viki#FilesCmd()*
viki#FilesCmd(cmd, bang)
*viki#FilesCall()*
viki#FilesCall(cmd, bang)
*viki#FilesRegionUpdateAll()*
viki#FilesRegionUpdateAll()
*viki#FilesRegionUpdate()*
viki#FilesRegionUpdate()
*viki#DirListing()*
viki#DirListing(lhs, lhb, indent, region)
Update a #Files region. The following arguments are allowed to specify
how the file list should be displayed:
glob=PATTERN ... A file pattern with |wildcards|. % and # (see
|cmdline-special|) are expanded too. The pattern
can also refer to an |interviki| (e.g. NOTES::*.txt).
Multiple patterns are separated by "|" (e.g.
*.txt|*.viki).
head=NUMBER .... Display the first N lines of the file's content
list=detail .... Include additional file info
list=flat ...... Display a flat list
types=[fd] ..... Whether to display files (f) and directories (d)
filter=REGEXP .. List only those files matching a |regexp|
exclude=REGEXP . Don't list files matching a |regexp|
sort=name|time|head ... Sort the list on the files' names, times,
or head lines. If the argument begins with "-",
the list is displayed in reverse order.
format=expr Filename format string (see |expand()|)
Comments (i.e. text after the file link) are maintained if possible
and if list is not "detail".
*viki#FilesGetFilename()*
viki#FilesGetFilename(t)
*viki#FilesGetComment()*
viki#FilesGetComment(t)
*viki#Balloon()*
viki#Balloon()
*viki#MatchList()*
viki#MatchList(lnum)
*viki#ListItemTextObject()*
viki#ListItemTextObject()
" *viki-text-objects* *ii*
" Create a new text-object ii that works on a inner list item. Once the
" maps are enabled, users may, e.g., visually select an item in a list
" by typing vii. See |viki#SelectListItem()| for a definition of what is
" considered a list item.
"
" The maps are local to the current buffer. Add this line to your
" |vimrc| file in order to enable the ii text-object for all viki
" buffers:>
" au FileType viki call viki#MapListItemTextObject()
*viki#SelectListItem()*
viki#SelectListItem(lnum)
Visually select the list item at line lnum.
A list item also contains all its child items. E.g. in a list like:>
1. Venenatis diam dignissim dui. Praesent risus.
2. Tincidunt facilisis, est nisi pellentesque ligula.
a. Adipiscing dui non quam.
b. Duis posuere tortor.
3. Massa lorem, dignissim at, vehicula et.
If the cursor is placed on item #2, this function also selects the
items a and b.
If the |tinykeymap| plugin is installed, a gl map is created to move
around list items.
If you use the tinymode plugin, add the following to lines to your
|vimrc| file:
call tinymode#EnterMap("listitem_move", "gl")
call tinymode#ModeMsg("listitem_move", "Move list item: h/j/k/l")
call tinymode#Map("listitem_move", "h", "silent call viki#ShiftListItem('<')")
call tinymode#Map("listitem_move", "l", "silent call viki#ShiftListItem('>')")
call tinymode#Map("listitem_move", "j", "silent call viki#MoveListItem('down')")
call tinymode#Map("listitem_move", "k", "silent call viki#MoveListItem('up')")
*viki#ShiftListItem()*
viki#ShiftListItem(direction)
*viki#MoveListItem()*
viki#MoveListItem(direction)
*viki#FoldLevel()*
viki#FoldLevel(lnum)
*viki#FoldText()*
viki#FoldText()
*viki#UpdateHeadings()*
viki#UpdateHeadings()
*viki#GrepRegionUpdateAll()*
viki#GrepRegionUpdateAll()
*viki#GrepRegionUpdate()*
viki#GrepRegionUpdate()
*viki#CollectSyntaxRegionsFiletypes()*
viki#CollectSyntaxRegionsFiletypes()
========================================================================
autoload/viki_anyword.vim~
*viki_anyword#MinorMode()*
viki_anyword#MinorMode(state)
""" Any Word
*viki_anyword#SetupBuffer()*
viki_anyword#SetupBuffer(state, ...)
*viki_anyword#DefineMarkup()*
viki_anyword#DefineMarkup(state)
*viki_anyword#DefineHighlighting()*
viki_anyword#DefineHighlighting(state, ...)
*:VikiHiLink*
:VikiHiLink
*:VikiHiLink*
:VikiHiLink
*viki_anyword#Find()*
viki_anyword#Find(flag, ...)
========================================================================
autoload/viki_latex.vim~
*viki_latex#SetupBuffer()*
viki_latex#SetupBuffer(state, ...)
*viki_latex#CheckFilename()*
viki_latex#CheckFilename(filename, ...)
*viki_latex#CompleteSimpleNameDef()*
viki_latex#CompleteSimpleNameDef(def)
*viki_latex#MinorMode()*
viki_latex#MinorMode(state)
========================================================================
autoload/viki_viki.vim~
*g:viki_viki#conceal_extended_link_markup*
g:viki_viki#conceal_extended_link_markup (default: has('conceal'))
If true, |conceal| the markup of extended links with names.
*g:viki_viki#conceal_extended_link_cchar*
g:viki_viki#conceal_extended_link_cchar (default: '^')
If |conceal| is used, append this character to links.
*viki_viki#SetupBuffer()*
viki_viki#SetupBuffer(state, ...)
"" viki/deplate
Prepare a buffer for use with viki.vim. Setup all buffer-local
variables etc.
This also sets up the rx for the different viki name types.
viki_viki#SetupBuffer(state, ?dontSetup='')
*viki_viki#DefineMarkup()*
viki_viki#DefineMarkup(state)
Define viki core syntax groups for hyperlinks
*viki_viki#DefineHighlighting()*
viki_viki#DefineHighlighting(state)
Define the highlighting of the core syntax groups for hyperlinks
*viki_viki#MapKeys()*
viki_viki#MapKeys(state)
Define viki-related key maps
*n_<c-cr>*
n_<c-cr> ... :call viki#MaybeFollowLink(0,1)<cr>
*i_<c-cr>*
i_<c-cr> ... <c-o>:call viki#MaybeFollowLink(0,1)<cr>
*n_<m-leftmouse>*
n_<m-leftmouse> ... <leftmouse>:call viki#MaybeFollowLink(0,1)<cr>
&& !hasmapto("viki#MaybeFollowLink")
*i_<m-leftmouse>*
i_<m-leftmouse> ... <leftmouse><c-o>:call viki#MaybeFollowLink(0,1)<cr>
*n_<m-rightmouse>*
n_<m-rightmouse> ... <leftmouse>:call viki#GoBack(0)<cr>
*i_<m-rightmouse>*
i_<m-rightmouse> ... <leftmouse><c-o>:call viki#GoBack(0)<cr>
*n_<c-tab>*
n_<c-tab> ... :VikiFindNext<cr>
*n_<c-s-tab>*
n_<c-s-tab> ... :VikiFindPrev<cr>
*viki_viki#MinorMode()*
viki_viki#MinorMode(state)
Initialize viki as minor mode (add-on to some buffer filetype)
state ... no-op:0, minor:1, major:2
*viki_viki#FindAnchor()*
viki_viki#FindAnchor(anchor)
Find an anchor
*viki_viki#CompleteExtendedNameDef()*
viki_viki#CompleteExtendedNameDef(def)
Complete missing information in the definition of an extended viki name
*viki_viki#CompleteCmdDef()*
viki_viki#CompleteCmdDef(def)
Complete missing information in the definition of a command viki name
*viki_viki#CompleteSimpleNameDef()*
viki_viki#CompleteSimpleNameDef(def)
Complete missing information in the definition of a simple viki name
*viki_viki#Find()*
viki_viki#Find(flag, ...)
Find a viki name
viki_viki#Find(flag, ?count=0, ?rx=nil)
========================================================================
compiler/deplate.vim~
*:CompilerSet*
:CompilerSet
*DeplateCompilerSet()*
DeplateCompilerSet(options)
*:DeplateCompilerSet*
:DeplateCompilerSet
========================================================================
ftplugin/viki.vim~
*b:vikiCommentStart*
b:vikiCommentStart (default: "%")
Defines the prefix of comments when in "full" viki mode.
In minor mode this variable is set to either:
- b:commentStart
- b:ECcommentOpen
- matchstr(&commentstring, "^\\zs.*\\ze%s")
*b:vikiCommentEnd*
b:vikiCommentEnd (default: "")
*b:vikiHeadingMaxLevel*
b:vikiHeadingMaxLevel (default: -1)
*b:vikiMaxFoldLevel*
b:vikiMaxFoldLevel (default: 5)
*b:vikiInverseFold*
b:vikiInverseFold (default: 0)
If set, the section headings' levels are folded in reversed order
so that |b:vikiMaxFoldLevel| corresponds to the top level and 1 to
the lowest level. This is useful when maintaining a file with a
fixed structure where the important things happen in subsections
while the top sections change little.
*[[*
[[ ... :call viki#FindPrevHeading()<cr>
*][*
][ ... :call viki#FindNextHeading()<cr>
*]]*
]] ... ][
*[]*
[] ... [[
*v_<expr>*
v_<expr> ... ii viki#ListItemTextObject()
*o_ii*
o_ii ... :normal Vii<cr>
========================================================================
syntax/viki.vim~
*:HiLink*
:HiLink
*:HiLink*
:HiLink
========================================================================
syntax/texmath.vim~
*:HiLink*
:HiLink
*:HiLink*
:HiLink
Copied from $VIMRUNTIME/syntax/tex.vim
vim:tw=78:fo=w2croql:isk=!-~,^*,^|,^":ts=8:ft=help:norl: