Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Version 4.08

- Incoporate changes from pull request 12- viki#InterVikiDest(): Use g:vikiIndex (again)- viki#InterVikiDest: FIX check if i_index exists- viki_viki#CompleteExtendedNameDef(): Use match() instead of =~ (work-around)- iskeyword+=192-255- Allow digits in interviki names- FIX #13: viki_viki#SetupBuffer(): remove "::" from interviki names for use in interviki_rx- vikiBaseDirs: A list of directories where to look for "file words" and "hyper words"- CollectVikiWords(): Use correct directory for hypewords- Priority lists: Highlight #Y, #Z as comments (like #X)- viki#DirListing(): Improve display for "**/*.*" pattern (requires proper rewrite)- FIX #14: Move definition of g:vikiFoldMethodVersion back to plugin/viki.vim- syntax: g:vikiIndentedPriorityLists can also be window- or buffer-local- If the SetSyntax plugin is installed, set tw to 0 the cursor is over priority lists- syn cluster vikiPriorityListGenMD5 checksum: 059e1b085b663c1d2d498756fbba39f6
  • Loading branch information...
commit e670431db6884fb8d83b7359a6324808ff8fd184 1 parent d40bf74
@tomtom tomtom authored committed
View
184 autoload/viki.vim
@@ -3,8 +3,8 @@
" @Website: http://www.vim.org/account/profile.php?user_id=4037
" @License: GPL (see http://www.gnu.org/licenses/gpl.txt)
" @Created: 2007-03-25.
-" @Last Change: 2014-01-29.
-" @Revision: 1353
+" @Last Change: 2014-10-21.
+" @Revision: 1433
exec 'runtime! autoload/viki/enc_'. substitute(&enc, '[\/<>*+&:?]', '_', 'g') .'.vim'
@@ -345,7 +345,9 @@ endif
if v:version >= 700 && !exists("g:vikiHyperWordsFiles")
- " A list of files that contain special viki names
+ " A list of files that contain special viki names.
+ " Can also be buffer-local.
+ " See also |g:vikiBaseDirs|.
" :read: let g:vikiHyperWordsFiles = [...] "{{{2
let g:vikiHyperWordsFiles = [
\ get(split(&rtp, ','), 0).'/vikiWords.txt',
@@ -354,6 +356,14 @@ if v:version >= 700 && !exists("g:vikiHyperWordsFiles")
endif
+if !exists('g:vikiBaseDirs')
+ " Where |g:vikiHyperWordsFiles| are looked for.
+ " Can also be buffer-local.
+ " '.' will be expanded to the directory of the current buffer.
+ let g:vikiBaseDirs = ['.'] "{{{2
+endif
+
+
if !exists("g:vikiMapFunctionality")
" Define which keys to map
" b ... go back
@@ -378,18 +388,6 @@ if !exists("g:vikiMapFunctionalityMinor")
let g:vikiMapFunctionalityMinor = 'f b p mf mb tF c q e' "{{{2
endif
-if !exists("g:vikiFoldMethodVersion")
- " :nodoc:
- " Choose folding method version
- " Viki supports several methods (1..7) for defining folds. If you
- " find that text entry is slowed down it is probably due to the
- " chosen fold method. You could try to use another method (see
- " ../ftplugin/viki.vim for alternative methods) or check out this
- " vim tip:
- " http://vim.wikia.com/wiki/Keep_folds_closed_while_inserting_text
- let g:vikiFoldMethodVersion = 8 "{{{2
-endif
-
if !exists("g:vikiFoldBodyLevel")
" Consider fold levels bigger that this as text body, levels smaller
" than this as headings
@@ -454,7 +452,8 @@ endif
let g:viki#quit = 0
let s:positions = {}
-let s:InterVikiRx = '^\(['. g:vikiUpperCharacters .']\+\)::\(.*\)$'
+let s:InterVikiNameRx = '^\(['. g:vikiUpperCharacters .'0-9]\+\)'
+let s:InterVikiRx = s:InterVikiNameRx .'::\(.*\)$'
let s:hookcursormoved_oldpos = []
" let s:vikiSelfEsc = '\'
" let s:vikiEnabledID = loaded_viki .'_'. strftime('%c')
@@ -754,6 +753,15 @@ function! viki#GetInterVikis() "{{{3
endf
+" Get a rx that matches a simple word
+function! viki#GetSimpleRx4SimpleWikiWord() "{{{3
+ let upper = s:UpperCharacters()
+ let lower = s:LowerCharacters()
+ let rx = '['.upper.lower.'0-9]\+'
+ return rx
+endf
+
+
" Get a rx that matches a simple name
function! viki#GetSimpleRx4SimpleWikiName() "{{{3
let upper = s:UpperCharacters()
@@ -1357,48 +1365,59 @@ function! viki#CollectFileWords(table, simpleWikiName) "{{{3
call add(patterns, suffix)
end
for p in patterns
- let files = glob(expand('%:p:h').'/*'. p)
- if files != ''
- let files_l = split(files, '\n')
- call filter(files_l, '!isdirectory(v:val) && v:val != expand("%:p")')
- if !empty(files_l)
- for w in files_l
- let ww = s:CanonicHyperWord(fnamemodify(w, ":t:r"))
- if !has_key(a:table, ww) &&
- \ (a:simpleWikiName == '' || ww !~# a:simpleWikiName)
- let a:table[ww] = w
- endif
- endfor
+ for base_dir in tlib#var#Get('vikiBaseDirs', 'bg')
+ " TLogVAR base_dir
+ let files = glob(base_dir .'/*'. p)
+ " TLogVAR files
+ if files != ''
+ let files_l = split(files, '\n')
+ call filter(files_l, '!isdirectory(v:val) && v:val != expand("%:p")')
+ " TLogVAR files_l
+ if !empty(files_l)
+ for w in files_l
+ let ww = s:CanonicHyperWord(fnamemodify(w, ":t:r"))
+ " TLogVAR w, ww
+ if !has_key(a:table, ww) &&
+ \ (a:simpleWikiName == '' || ww !~# a:simpleWikiName)
+ let a:table[ww] = w
+ endif
+ endfor
+ endif
endif
- endif
+ endfor
endfor
endf
function! viki#CollectHyperWords(table) "{{{3
- let vikiWordsBaseDir = expand('%:p:h')
- for filename in g:vikiHyperWordsFiles
- if filename =~ '^\./'
- let bn = fnamemodify(filename, ':t')
- let filename = vikiWordsBaseDir . filename[1:-1]
- let acc = []
- for dir in tlib#file#Split(vikiWordsBaseDir)
- call add(acc, dir)
- let fn = tlib#file#Join(add(copy(acc), bn))
- call s:CollectVikiWords(a:table, fn, vikiWordsBaseDir)
- endfor
- else
- call s:CollectVikiWords(a:table, filename, vikiWordsBaseDir)
- endif
+ for base_dir in tlib#var#Get('vikiBaseDirs', 'bg')
+ if base_dir == '.'
+ let base_dir = expand('%:p:h')
+ endif
+ for filename in tlib#var#Get('vikiHyperWordsFiles', 'bg')
+ if filename =~ '^\./'
+ let bn = fnamemodify(filename, ':t')
+ let filename = base_dir . filename[1:-1]
+ let acc = []
+ for dir in tlib#file#Split(base_dir)
+ call add(acc, dir)
+ let fn = tlib#file#Join(add(copy(acc), bn))
+ call s:CollectVikiWords(a:table, fn, base_dir)
+ endfor
+ else
+ call s:CollectVikiWords(a:table, filename, base_dir)
+ endif
+ endfor
endfor
endf
function! s:CollectVikiWords(table, filename, basedir) "{{{3
- " TLogVAR a:filename, a:basedir
+ " TLogVAR a:filename, a:basedir, filereadable(a:filename)
if filereadable(a:filename)
let dir = fnamemodify(a:filename, ':p:h')
- " TLogVAR dir
+ let cwd = getcwd()
+ " TLogVAR dir, a:filename, a:basedir
call tlib#dir#Push(dir, 1)
try
let hyperWords = readfile(a:filename)
@@ -1415,8 +1434,7 @@ function! s:CollectVikiWords(table, filename, basedir) "{{{3
call remove(a:table, mkey)
endif
elseif !has_key(a:table, mkey)
- " TLogVAR mval
- " call TLogDBG(viki#IsInterViki(mval))
+ " TLogVAR mval, viki#IsInterViki(mval)
if viki#IsInterViki(mval)
let interviki = viki#InterVikiName(mval)
let suffix = viki#InterVikiSuffix(mval, interviki)
@@ -1428,7 +1446,7 @@ function! s:CollectVikiWords(table, filename, basedir) "{{{3
\ 'name': name,
\ }
else
- let a:table[mkey] = tlib#file#Relative(mval, a:basedir)
+ let a:table[mkey] = tlib#file#Relative(mval, cwd)
" TLogVAR mkey, mval, a:basedir, a:table[mkey]
endif
endif
@@ -2154,15 +2172,15 @@ endf
" If txt matches a viki name typed as defined by compound return a
" structure defining this viki name.
-function! viki#LinkDefinition(txt, col, compound, ignoreSyntax, type) "{{{3
+function! viki#LinkDefinition(txt, col, compound, ignoreSyntax, type) "{{{3
" TLogVAR a:txt, a:col, a:compound, a:ignoreSyntax, a:type
exe a:compound
if erx != ''
let ebeg = -1
- let cont = match(a:txt, erx, 0)
+ let cont = match(a:txt, erx, 0)
" TLogVAR cont
while (ebeg >= 0 || (0 <= cont) && (cont <= a:col))
- let contn = matchend(a:txt, erx, cont)
+ let contn = matchend(a:txt, erx, cont)
" TLogVAR ebeg, cont, elen, contn
if (cont <= a:col) && (a:col < contn)
let ebeg = match(a:txt, erx, cont)
@@ -2171,7 +2189,7 @@ function! viki#LinkDefinition(txt, col, compound, ignoreSyntax, type) "{{{3
else
let cont = match(a:txt, erx, contn)
endif
- endwh
+ endwh
" TLogVAR ebeg
if ebeg >= 0
let part = strpart(a:txt, ebeg, elen)
@@ -2299,13 +2317,18 @@ endf
" Return an interviki's root directory
function! viki#InterVikiDest(vikiname, ...)
TVarArg 'ow', ['rx', 0]
+ " TLogVAR ow, rx
+ if a:vikiname =~ s:InterVikiNameRx .'$'
+ let vikiname = a:vikiname .'::'
+ else
+ let vikiname = a:vikiname
endif
- if empty(ow)
- let ow = viki#InterVikiName(a:vikiname)
+ if empty(ow)
+ let ow = viki#InterVikiName(vikiname)
let v_dest = viki#InterVikiPart(vikiname)
- else
+ else
let v_dest = vikiname
- endif
+ endif
let vd = s:InterVikiDef(vikiname, ow)
" TLogVAR vd
if vd != ''
@@ -2322,9 +2345,9 @@ function! viki#InterVikiDest(vikiname, ...)
else
let i_dest = fnamemodify(i_dest, ':p')
if empty(v_dest)
- if !exists('i_index')
+ if !exists('i_index')
let suffix = viki#InterVikiSuffix(vikiname)
- let findex = fnamemodify(i_dest .'/'. g:vikiIndex . suffix, ':p')
+ let findex = fnamemodify(i_dest .'/'. g:vikiIndex . suffix, ':p')
" TLogVAR vikiname, suffix, g:vikiIndex, findex
if filereadable(findex)
let i_index = g:vikiIndex
@@ -2444,6 +2467,7 @@ endf
" viki#GetLink(ignoreSyntax, ?txt, ?col=0, ?supported=b:vikiNameTypes)
function! viki#GetLink(ignoreSyntax, ...) "{{{3
let col = a:0 >= 2 ? a:2 : 0
+ let types = a:0 >= 3 ? a:3 : b:vikiNameTypes
" TLogVAR a:ignoreSyntax, col, types
if a:0 >= 1 && a:1 != ''
let txt = a:1
@@ -2471,11 +2495,9 @@ function! viki#GetLink(ignoreSyntax, ...) "{{{3
endif
let txt = getline('.')
let col = col('.') - 1
- endif
- " TLogDBG "txt=". txt
- " TLogDBG "col=". col
- " TLogDBG "tryAll=". tryAll
+ endif
" TLogVAR txt, col, tryAll, vikiType
+ if (tryAll || vikiType == 2) && viki#IsSupportedType('e', types)
" TLogDBG 'vikiType 2'
if exists('b:getExtVikiLink')
exe 'let def = ' . b:getExtVikiLink.'()'
@@ -2487,6 +2509,7 @@ function! viki#GetLink(ignoreSyntax, ...) "{{{3
return viki#DispatchOnFamily('CompleteExtendedNameDef', '', def)
endif
endif
+ if (tryAll || vikiType == 3) && viki#IsSupportedType('u', types)
" TLogDBG 'vikiType 3'
if exists('b:getURLViki')
exe 'let def = ' . b:getURLViki . '()'
@@ -2498,6 +2521,7 @@ function! viki#GetLink(ignoreSyntax, ...) "{{{3
return viki#DispatchOnFamily('CompleteExtendedNameDef', '', def)
endif
endif
+ if (tryAll || vikiType == 4) && viki#IsSupportedType('x', types)
" TLogDBG 'vikiType 4'
if exists('b:getCmdViki')
exe 'let def = ' . b:getCmdViki . '()'
@@ -2509,6 +2533,7 @@ function! viki#GetLink(ignoreSyntax, ...) "{{{3
return viki#DispatchOnFamily('CompleteCmdDef', '', def)
endif
endif
+ if (tryAll || vikiType == 1) && viki#IsSupportedType('s', types)
" TLogDBG 'vikiType 1'
if exists('b:getVikiLink')
exe 'let def = ' . b:getVikiLink.'()'
@@ -3017,7 +3042,7 @@ endf
endf
-function! s:CollectFileNames(lb, le, bang) "{{{3
+function! s:CollectFileNames(lb, le, bang) "{{{3
call s:InitIsDir()
let afile = viki#FilesGetFilename(getline('.'))
let acc = []
@@ -3031,6 +3056,14 @@ function! s:CollectFileNames(lb, le, bang) "{{{3
return acc
endf
+
+function! s:InitIsDir() "{{{3
+ let cd = getcwd()
+ if get(s:isdir, '.', '') != cd
+ let s:isdir = {'.': cd}
+ endif
+endf
+
let s:isdir = {}
@@ -3105,6 +3138,7 @@ endf
"
" Comments (i.e. text after the file link) are maintained if possible
" and if list is not "detail".
+function! viki#DirListing(lhs, lhb, indent, region) "{{{3
call s:InitIsDir()
let args = s:GetRegionArgs(a:lhs, a:lhb - 1)
" TLogVAR args
@@ -3119,6 +3153,7 @@ function! viki#DirListing(lhs, lhb, indent, region) "{{{3
let patt = viki#InterVikiDest(patt)
elseif patt !~ '^\([%\\/]\|\w\+:\)' && !&autochdir && bufdir != getcwd()
let patt = tlib#file#Join([bufdir, patt])
+ endif
let s:dirlisting_depth_cwd = s:GetDepth(getcwd())
" TLogVAR patt
if patt =~ '^[^\\/*?]*[*?]'
@@ -3127,6 +3162,7 @@ function! viki#DirListing(lhs, lhb, indent, region) "{{{3
let patt_parts = split(patt, '[*?]')
" TLogVAR patt_parts
let s:dirlisting_depth0 = s:GetDepth(patt_parts[0])
+ endif
" echom "DBG dirlisting_depth0" s:dirlisting_depth0
let view = winsaveview()
let t = @t
@@ -3153,6 +3189,7 @@ function! viki#DirListing(lhs, lhb, indent, region) "{{{3
let ls1 = []
let rootdir = ''
for lsitem in ls
+ let lsdir = s:IsDir(lsitem)
" TLogVAR lsitem, lsdir, show_dirs
if lsdir
if show_dirs
@@ -3163,8 +3200,13 @@ function! viki#DirListing(lhs, lhb, indent, region) "{{{3
let lsdirname = fnamemodify(lsitem, ':p:h')
" TLogVAR lsdirname, index(ls1,lsdirname)
if empty(rootdir) || strwidth(lsdirname) < strwidth(rootdir)
+ let rootdir = lsdirname
+ let rootdirn = len(lsdirname)
" TLogVAR rootdir
- endif
+ endif
+ if strpart(lsdirname, 0, rootdirn) ==# rootdir
+ let lsdirname = './'. strpart(lsdirname, rootdirn)
+ endif
if lsdirname != './' && index(ls1, lsdirname) == -1
call add(ls1, lsdirname)
endif
@@ -3241,11 +3283,13 @@ endf
endf
+function! s:GetFileEntry(file, region, deep, list, head, args) "{{{3
+ " TLogVAR a:file, a:deep, a:list, a:head, a:args
" TLogVAR a:region
let f = []
+ let props = {}
let is_dir = 0
let d = s:GetDepth(a:file) - s:dirlisting_depth0
- let attr = []
let attr = []
if index(a:list, 'detail') != -1
let props.type = getftype(a:file)
@@ -3267,6 +3311,7 @@ function! s:GetFileEntry(file, region, deep, list, head, args) "{{{3
endif
if index(a:list, 'flat') == -1
let prefix = repeat(' ', d)
+ if a:deep
" echom "DBG" s:getfileentry_deep d
if s:getfileentry_deep < d
let prefix .= is_dir ? '`+' : '`|'
@@ -3332,7 +3377,13 @@ endf
endf
-function! s:GetDepth(file) "{{{3
+function! s:GetDepth(file) "{{{3
+ let depth = len(substitute(a:file, '[^\/]', '', 'g'))
+ if s:IsDir(a:file)
+ let depth -= 1
+ else
+ let depth += 1
+ endif
return depth
endf
@@ -3882,3 +3933,4 @@ function! viki#CollectSyntaxRegionsFiletypes() "{{{3
" echom "DBG" string(s:valid_filetypes)
return keys(ftypes)
endf
+
View
13 autoload/viki_viki.vim
@@ -3,8 +3,8 @@
" @Website: http://www.vim.org/account/profile.php?user_id=4037
" @License: GPL (see http://www.gnu.org/licenses/gpl.txt)
" @Created: 2007-09-03.
-" @Last Change: 2013-10-02.
-" @Revision: 0.0.210
+" @Last Change: 2014-05-13.
+" @Revision: 0.0.226
if !exists('g:viki_viki#conceal_extended_link_markup')
@@ -77,7 +77,12 @@ function! viki_viki#SetupBuffer(state, ...) "{{{3
endif
" TLogVAR b:vikiAnchorNameRx
- let interviki = '\<['. b:vikiUpperCharacters .']\+::'
+ let interviki_names = map(copy(viki#GetInterVikis()), 'substitute(v:val, ''::$'', "", "")')
+ if empty(interviki_names)
+ let interviki_rx = '\<['. b:vikiUpperCharacters .'0-9]\+::'
+ else
+ let interviki_rx = '\<\%('. join(interviki_names, '\|') .'\)::'
+ endif
" if viki#IsSupportedType("sSc") && !(dontSetup =~? "s")
if viki#IsSupportedType("s") && !(dontSetup =~? "s")
@@ -109,7 +114,7 @@ function! viki_viki#SetupBuffer(state, ...) "{{{3
let simpleHyperWords = substitute(simpleHyperWords, ' \+', '\\s\\+', 'g')
endif
endif
- let b:vikiSimpleNameRx = '\C\(\('. interviki .'\)\?'.
+ let b:vikiSimpleNameRx = '\C\(\('. interviki_rx .'\)\?'.
\ '\('. simpleHyperWords . quotedVikiName . simpleWikiName .'\)\)'.
\ '\(#\('. b:vikiAnchorNameRx .'\)\>\)\?'
let b:vikiSimpleNameSimpleRx = '\C\(\<['.b:vikiUpperCharacters.']\+::\)\?'.
View
18 doc/viki.txt
@@ -950,6 +950,7 @@ Contents~
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|
@@ -990,6 +991,7 @@ Contents~
VikiOpenFileUrl ............................ |VikiOpenFileUrl()|
VikiOpenSpecialProtocol .................... |VikiOpenSpecialProtocol()|
viki#GetInterVikis ......................... |viki#GetInterVikis()|
+ viki#GetSimpleRx4SimpleWikiWord ............ |viki#GetSimpleRx4SimpleWikiWord()|
viki#GetSimpleRx4SimpleWikiName ............ |viki#GetSimpleRx4SimpleWikiName()|
viki#CanonicFilename ....................... |viki#CanonicFilename()|
viki#FindRx ................................ |viki#FindRx()|
@@ -1498,7 +1500,15 @@ g:vikiBalloonEncoding (default: &enc)
*g:vikiHyperWordsFiles*
g:vikiHyperWordsFiles (default: [...])
- A list of files that contain special viki names
+ 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')
@@ -1737,6 +1747,10 @@ VikiOpenSpecialProtocol(url)
*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
@@ -2387,4 +2401,4 @@ syntax/texmath.vim~
-vim:tw=78:fo=tcq2:isk=!-~,^*,^|,^":ts=8:ft=help:norl:
+vim:tw=78:fo=w2croql:isk=!-~,^*,^|,^":ts=8:ft=help:norl:
View
25 plugin/viki.vim
@@ -2,8 +2,8 @@
" @Author: Tom Link (micathom AT gmail com?subject=vim)
" @License: GPL (see http://www.gnu.org/licenses/gpl.txt)
" @Created: 08-Dec-2003.
-" @Last Change: 2014-01-28.
-" @Revision: 2759
+" @Last Change: 2014-10-21.
+" @Revision: 2766
"
" GetLatestVimScripts: 861 1 viki.vim
"
@@ -31,7 +31,7 @@ if !exists('g:loaded_tlib') || g:loaded_tlib < 106
finish
endif
endif
-let loaded_viki = 407
+let loaded_viki = 408
if !exists("tlist_viki_settings")
@@ -106,6 +106,18 @@ if !exists('g:vikiIndentedPriorityLists')
let g:vikiIndentedPriorityLists = 1 "{{{2
endif
+if !exists("g:vikiFoldMethodVersion")
+ " :nodoc:
+ " Choose folding method version
+ " Viki supports several methods (1..7) for defining folds. If you
+ " find that text entry is slowed down it is probably due to the
+ " chosen fold method. You could try to use another method (see
+ " ../ftplugin/viki.vim for alternative methods) or check out this
+ " vim tip:
+ " http://vim.wikia.com/wiki/Keep_folds_closed_while_inserting_text
+ let g:vikiFoldMethodVersion = 8 "{{{2
+endif
+
" -1 ... open all links in a new windows
" -2 ... open all links in a new windows but split vertically
@@ -149,7 +161,7 @@ endf
" VikiDefine(name, prefix, ?suffix="*", ?index="Index.${suffix}")
" suffix == "*" -> g:vikiNameSuffix
function! VikiDefine(name, prefix, ...) "{{{3
- if a:name =~ '[^A-Z]'
+ if a:name =~ '[^A-Z0-9]'
throw 'Invalid interviki name: '. a:name
endif
call add(g:vikiInterVikiNames, a:name .'::')
@@ -256,3 +268,8 @@ augroup viki
autocmd ColorScheme * if &filetype == 'viki' | set filetype=viki | endif
augroup END
+
+if exists('g:loaded_setsyntax') && g:loaded_setsyntax > 0
+ let g:setsyntax_options['viki']['vikiPriorityListTodoGen'] = {'&l:tw': 0}
+endif
+
View
11 syntax/viki.vim
@@ -2,8 +2,8 @@
" @Author: Tom Link (micathom AT gmail com?subject=vim)
" @License: GPL (see http://www.gnu.org/licenses/gpl.txt)
" @Created: 30-Dez-2003.
-" @Last Change: 2013-10-17.
-" @Revision: 0.1102
+" @Last Change: 2014-10-29.
+" @Revision: 0.1112
if version < 600
syntax clear
@@ -251,15 +251,18 @@ else
syn match vikiContact /\s\+\zs@[^[:punct:][:space:]]\+/ contained containedin=vikiPriorityListTodoGen
endif
+" syn cluster vikiPriorityListTodoInline contains=@vikiPriorityListTodo,vikiTag,vikiContact
-let s:plquant = g:vikiIndentedPriorityLists ? '\+' : '*'
+let s:plquant = tlib#var#Get('vikiIndentedPriorityLists', 'wbg') ? '\+' : '*'
exec 'syn match vikiPriorityListTodoGen /^[[:blank:]]'. s:plquant .'\zs#\(T: \+.\{-}\u.\{-}:\|\d*\u\d*\(\s\+'. s:progress .'\)\?\)\s.*$/ contains=vikiContact,vikiTag,@vikiPriorityListTodo,@vikiText'
exec 'syn match vikiPriorityListDoneGen /^[[:blank:]]'. s:plquant .'\zs#\(T: \+x\([0-9%-]\+\)\?.\{-}\u.\{-}:\|\(T: \+\)\?\d*\u\d* \+x'. s:progress .'\?\):\? .*/'
-exec 'syn match vikiPriorityListDoneX /^[[:blank:]]'. s:plquant .'\zs#X\d\?\s.*/'
+exec 'syn match vikiPriorityListDoneX /^[[:blank:]]'. s:plquant .'\zs#[X-Z]\d\?\s.*/'
unlet s:plquant
+syn cluster vikiPriorityListGen contains=vikiPriorityListTodoGen,vikiPriorityListDoneX,vikiPriorityListDoneGen
+
syntax sync minlines=2
" syntax sync maxlines=50
Please sign in to comment.
Something went wrong with that request. Please try again.