Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Version 3.11

- Default values for g:vikiOpenUrlWith_ANY and g:vikiOpenFileWith_ANY on Macs (thanks mboniou)
- Correct default value for g:vikiOpenFileWith_ANY @ Windows
- Disabled regions' #END-syntax
- Don't define interviki commands if a command of the same name already exists.
  • Loading branch information...
commit d26f2c7e54034d29bcd9973cec0c50d59bb008c5 1 parent ffdbcfe
@tomtom tomtom authored committed
View
32 autoload/viki.vim
@@ -1,10 +1,10 @@
" viki.vim
-" @Author: Thomas Link (micathom AT gmail com?subject=vim-viki)
+" @Author: Tom Link (micathom AT gmail com?subject=vim-viki)
" @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: 2008-08-28.
-" @Revision: 0.475
+" @Last Change: 2009-02-15.
+" @Revision: 0.521
if &cp || exists("loaded_viki_auto") "{{{2
finish
@@ -62,7 +62,11 @@ function! viki#Define(name, prefix, ...) "{{{3
end
" let vname = escape(vname, ' \%#')
" exec 'command! -bang -nargs=? -complete=customlist,viki#EditComplete '. a:name .' call viki#Edit(escape(empty(<q-args>) ?'. string(vname) .' : <q-args>, "#"), "<bang>")'
- exec 'command! -bang -nargs=? -complete=customlist,viki#EditComplete '. a:name .' call viki#Edit(empty(<q-args>) ?'. string(vname) .' : viki#InterEditArg('. string(a:name) .', <q-args>), "<bang>")'
+ if !exists(':'+ a:name)
+ exec 'command -bang -nargs=? -complete=customlist,viki#EditComplete '. a:name .' call viki#Edit(empty(<q-args>) ? '. string(vname) .' : viki#InterEditArg('. string(a:name) .', <q-args>), "<bang>")'
+ else
+ echom "Viki: Command already exists. Cannot define a command for "+ a:name
+ endif
if g:vikiMenuPrefix != ''
if g:vikiMenuLevel > 0
let name = [ a:name[0 : g:vikiMenuLevel - 1] .'&'. a:name[g:vikiMenuLevel : -1] ]
@@ -336,7 +340,7 @@ function! s:MarkInexistent(line1, line2, ...) "{{{3
let partx = escape(v_part, "'\"\\/")
endif
" elseif v_part =~ b:vikiCmdSimpleRx
- " <+TBD+>
+ " <+TODO+>
else
" TLogDBG "else3 => 0"
let check = 0
@@ -1900,8 +1904,10 @@ endf
" Command line completion of :VikiEdit
function! viki#EditComplete(ArgLead, CmdLine, CursorPos) "{{{3
- " TLogVAR a:ArgLead, a:CmdLine, a:CursorPos
- let arglead = a:ArgLead
+ " TLogVAR a:ArgLead, a:CmdLine, a:CursorPos
+ " let arglead = a:ArgLead
+ let rx_pre = '^\s*\(\d*\(verb\|debug\|sil\|sp\|vert\|tab\)\w\+!\?\s\+\)*'
+ let arglead = matchstr(a:CmdLine, rx_pre .'\(\u\+\)\s\zs.*')
let ii = matchstr(a:CmdLine, rx_pre .'\zs\(\u\+\)\ze\s')
" TLogVAR ii
if !empty(ii) && arglead !~ '::'
@@ -1927,6 +1933,7 @@ function! viki#EditComplete(ArgLead, CmdLine, CursorPos) "{{{3
let r = '^'. viki#InterVikiDest('\(.\{-}\)', i, 1) .'$'
" TLogVAR f,d,r
let d = substitute(d, '\', '/', 'g')
+ let rv = split(glob(d), '\n')
" call map(rv, 'escape(v:val, " ")')
" TLogVAR d,rv
if sfx != ''
@@ -1943,6 +1950,8 @@ function! viki#EditComplete(ArgLead, CmdLine, CursorPos) "{{{3
let rv = split(glob(arglead.'*'.sfx), '\n')
" TLogVAR rv
call map(rv, 's:EditCompleteAgent('. string(i) .', v:val, v:val)')
+ " TLogVAR rv
+ " call map(rv, 'escape(v:val, " ")')
" TLogVAR rv
if arglead == ''
let rv += s:InterVikis
@@ -1950,6 +1959,7 @@ function! viki#EditComplete(ArgLead, CmdLine, CursorPos) "{{{3
let rv += filter(copy(s:InterVikis), 'v:val =~ ''\V\^''.arglead')
endif
endif
+ " TLogVAR rv
" call map(rv, 'substitute(v:val, ''^\(.\{-}\s\ze\S*$'', "", "")')
" call map(rv, 'escape(v:val, "%# ")')
return rv
@@ -1980,6 +1990,7 @@ fun! viki#GetIndent()
fun! viki#GetIndent()
let lr = &lazyredraw
set lazyredraw
+ try
let cnum = v:lnum
" Find a non-blank line above the current line.
let lnum = prevnonblank(v:lnum - 1)
@@ -1996,10 +2007,11 @@ fun! viki#GetIndent()
" return 0
" end
+ let line = getline(lnum) " last line
" TLogVAR lnum, ind, line
-
let cind = indent(cnum)
+ let cline = getline(cnum)
" TLogVAR v:lnum, cnum, cind, cline
" Do not change indentation in regions
@@ -2035,7 +2047,7 @@ fun! viki#GetIndent()
endif
let markRx = '^\s\+\([#?!+]\)\1\{2,2}\s\+'
- let listRx = '^\s\+\([-+*#?@]\|[0-9#]\+\.\|[a-zA-Z?]\.\)\s\+'
+ let listRx = '^\s\+\([-+*#?@]\|[0-9#]\+\.\|[a-zA-Z?]\.\)\s\+'
let priRx = '^\s\+#[A-Z]\d\? \+\([x_0-9%-]\+ \+\)\?'
let descRx = '^\s\+.\{-1,}\s::\s\+'
@@ -2086,7 +2098,7 @@ fun! viki#GetIndent()
return pind + swhalf
endif
endif
-
+
" TLogVAR cind, ind
if cind < ind
let rv = (cind / &sw) * &sw
View
6 autoload/viki_anyword.vim
@@ -1,9 +1,9 @@
" vikiAnyWord.vim
-" @Author: Thomas Link (mailto:micathom AT gmail com?subject=vim-vikiAnyWord)
+" @Author: Tom Link (mailto:micathom AT gmail com?subject=vim-vikiAnyWord)
" @License: GPL (see http://www.gnu.org/licenses/gpl.txt)
" @Created: 04-Apr-2005.
-" @Last Change: 2007-10-12.
-" @Revision: 0.35
+" @Last Change: 2009-02-15.
+" @Revision: 0.36
if &cp || exists('loaded_viki_anyword')
finish
View
6 autoload/viki_latex.vim
@@ -1,9 +1,9 @@
" vikiLatex.vim -- viki add-on for LaTeX
-" @Author: Thomas Link (micathom AT gmail com?subject=vim)
+" @Author: Tom Link (micathom AT gmail com?subject=vim)
" @License: GPL (see http://www.gnu.org/licenses/gpl.txt)
" @Created: 28-Jän-2004.
-" @Last Change: 2007-10-05.
-" @Revision: 0.195
+" @Last Change: 2009-02-15.
+" @Revision: 0.196
if &cp || exists('loaded_viki_latex')
finish
View
8 autoload/viki_viki.vim
@@ -1,10 +1,10 @@
" vikiDeplate.vim
-" @Author: Thomas Link (micathom AT gmail com?subject=[vim])
+" @Author: Tom Link (micathom AT gmail com?subject=[vim])
" @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: 2008-08-28.
-" @Revision: 0.0.107
+" @Last Change: 2009-02-15.
+" @Revision: 0.0.111
if &cp || exists("loaded_viki_viki")
finish
@@ -493,7 +493,7 @@ function! viki_viki#CompleteCmdDef(def) "{{{3
let v_dest = viki#FindFileWithSuffix(id, viki#GetSpecialFilesSuffixes())
endif
elseif v_name =~ "^#INC"
- " <+TBD+> Search path?
+ " <+TODO+> Search path?
elseif v_name =~ '^{ref\>'
let v_anchor = v_dest
let v_name = g:vikiSelfRef
View
6 compiler/deplate.vim
@@ -1,9 +1,9 @@
" viki.vim
-" @Author: Thomas Link (micathom AT gmail com?subject=vim)
+" @Author: Tom Link (micathom AT gmail com?subject=vim)
" @License: GPL (see http://www.gnu.org/licenses/gpl.txt)
" @Created: 25-Apr-2004.
-" @Last Change: 2007-08-27.
-" @Revision: 0.42
+" @Last Change: 2009-02-15.
+" @Revision: 0.43
"
" Description:
" Use deplate as the "compiler" for viki files.
View
2  doc/viki.txt
@@ -484,7 +484,7 @@ Textstyles~
__emphasized__, ''typewriter''
-< NOTE: There must not by a whitespace after the opening mark.
+< 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 --
View
6 ftplugin/bib/viki.vim
@@ -1,10 +1,10 @@
" viki.vim -- Make adaptions for bibtex
-" @Author: Thomas Link (micathom AT gmail com?subject=vim)
+" @Author: Tom Link (micathom AT gmail com?subject=vim)
" @Website: http://members.a1.net/t.link/
" @License: GPL (see http://www.gnu.org/licenses/gpl.txt)
" @Created: 28-Jul-2004.
-" @Last Change: 2007-08-27.
-" @Revision: 0.8
+" @Last Change: 2009-02-15.
+" @Revision: 0.9
let b:vikiAnchorRx = '\^\c\s\*@\[a-z]\+\s\*{\s\*%{ANCHOR}\s\*,\.\*\$'
View
6 ftplugin/viki.vim
@@ -1,9 +1,9 @@
" viki.vim -- the viki ftplugin
-" @Author: Thomas Link (micathom AT gmail com?subject=vim)
+" @Author: Tom Link (micathom AT gmail com?subject=vim)
" @License: GPL (see http://www.gnu.org/licenses/gpl.txt)
" @Created: 12-Jän-2004.
-" @Last Change: 2008-02-14.
-" @Revision: 404
+" @Last Change: 2009-02-15.
+" @Revision: 405
" if !g:vikiEnabled
" finish
View
6 indent/viki.vim
@@ -1,10 +1,10 @@
" viki.vim -- viki indentation
-" @Author: Thomas Link (micathom AT gmail com?subject=vim)
+" @Author: Tom Link (micathom AT gmail com?subject=vim)
" @Website: http://members.a1.net/t.link/
" @License: GPL (see http://www.gnu.org/licenses/gpl.txt)
" @Created: 16-Jän-2004.
-" @Last Change: 2007-09-03.
-" @Revision: 0.263
+" @Last Change: 2009-02-15.
+" @Revision: 0.264
if !g:vikiEnabled
finish
View
23 plugin/viki.vim
@@ -1,9 +1,9 @@
" Viki.vim -- Some kind of personal wiki for Vim
-" @Author: Thomas Link (micathom AT gmail com?subject=vim)
+" @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: 2008-08-28.
-" @Revision: 2610
+" @Last Change: 2009-03-20.
+" @Revision: 2627
"
" GetLatestVimScripts: 861 1 viki.vim
"
@@ -41,7 +41,7 @@ if !exists('g:loaded_tlib') || g:loaded_tlib < 15
finish
endif
endif
-let loaded_viki = 310
+let loaded_viki = 311
" This is what we consider nil, in the absence of nil in vimscript
let g:vikiDefNil = ''
@@ -189,7 +189,7 @@ endif
" If non-nil, use the parent document's suffix.
if !exists("g:vikiUseParentSuffix") | let g:vikiUseParentSuffix = 0 | endif "{{{2
-" Default file suffix.
+" Default file suffix (including the optional period, e.g. '.txt').
if !exists("g:vikiNameSuffix") | let g:vikiNameSuffix = "" | endif "{{{2
" Prefix for anchors
@@ -362,7 +362,9 @@ if !exists("g:vikiOpenFileWith_ANY") "{{{2
if exists('g:netrw_browsex_viewer')
let g:vikiOpenFileWith_ANY = "exec 'silent !'. g:netrw_browsex_viewer .' '. shellescape('%{FILE}')"
elseif has("win32") || has("win16") || has("win64")
- let g:vikiOpenFileWith_ANY = "exec 'silent !cmd /c start '. shellescape('%{FILE}')"
+ let g:vikiOpenFileWith_ANY = "exec 'silent ! start \"\" '. shellescape('%{FILE}')"
+ elseif has("mac")
+ let g:vikiOpenFileWith_ANY = "exec 'silent !open '. shellescape('%{FILE}')"
elseif $GNOME_DESKTOP_SESSION_ID != ""
let g:vikiOpenFileWith_ANY = "exec 'silent !gnome-open '. shellescape('%{FILE}')"
elseif $KDEDIR != ""
@@ -443,6 +445,8 @@ if !exists("g:vikiOpenUrlWith_ANY") "{{{2
" let g:vikiOpenUrlWith_ANY = "exec 'silent !". g:netrw_browsex_viewer ." '. escape('%{URL}', ' &!%')"
if has("win32")
let g:vikiOpenUrlWith_ANY = "exec 'silent !rundll32 url.dll,FileProtocolHandler '. shellescape('%{URL}')"
+ elseif has("mac")
+ let g:vikiOpenUrlWith_ANY = "exec 'silent !open '. escape('%{URL}', ' &!%')"
elseif $GNOME_DESKTOP_SESSION_ID != ""
let g:vikiOpenUrlWith_ANY = "exec 'silent !gnome-open '. shellescape('%{URL}')"
elseif $KDEDIR != ""
@@ -1025,5 +1029,12 @@ rtp-directory (thanks to M Brandmeyer)
- FIX: automatically set marks (#m? type of anchors)
- Anchor regexp can be configured via g:vikiAnchorNameRx
+3.11
+- Disabled regions' #END-syntax
+- Don't define interviki commands if a command of the same name already
+exists.
+- Default values for g:vikiOpenUrlWith_ANY and g:vikiOpenFileWith_ANY on
+Macs (thanks mboniou)
+- Correct default value for g:vikiOpenFileWith_ANY @ Windows
" vim: ff=unix
View
6 syntax/texmath.vim
@@ -1,10 +1,10 @@
" texmath.vim
-" @Author: Thomas Link (mailto:micathom AT gmail com?subject=[vim])
+" @Author: Tom Link (mailto:micathom AT gmail com?subject=[vim])
" @Website: http://www.vim.org/account/profile.php?user_id=4037
" @License: GPL (see http://www.gnu.org/licenses/gpl.txt)
" @Created: 2007-11-15.
-" @Last Change: 2008-01-23.
-" @Revision: 0.0.15
+" @Last Change: 2009-02-15.
+" @Revision: 0.0.16
" Use only as embedded syntax to be included from other syntax files.
View
14 syntax/viki.vim
@@ -1,9 +1,9 @@
" viki.vim -- the viki syntax file
-" @Author: Thomas Link (micathom AT gmail com?subject=vim)
+" @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: 2008-08-20.
-" @Revision: 0.862
+" @Last Change: 2009-02-15.
+" @Revision: 0.864
if !g:vikiEnabled
finish
@@ -141,10 +141,10 @@ syn region vikiRegion matchgroup=vikiMacroDelim
\ start=/^[[:blank:]]*#\([A-Z]\([a-z][A-Za-z]*\)\?\>\|!!!\)\(\\\n\|.\)\{-}<<\z(.*\)$/
\ end=/^[[:blank:]]*\z1[[:blank:]]*$/
\ contains=@vikiText,vikiRegionNames
-syn region vikiRegionWEnd matchgroup=vikiMacroDelim
- \ start=/^[[:blank:]]*#\([A-Z]\([a-z][A-Za-z]*\)\?\>\|!!!\)\(\\\n\|.\)\{-}:[[:blank:]]*$/
- \ end=/^[[:blank:]]*#End[[:blank:]]*$/
- \ contains=@vikiText,vikiRegionNames
+" syn region vikiRegionWEnd matchgroup=vikiMacroDelim
+" \ start=/^[[:blank:]]*#\([A-Z]\([a-z][A-Za-z]*\)\?\>\|!!!\)\(\\\n\|.\)\{-}:[[:blank:]]*$/
+" \ end=/^[[:blank:]]*#End[[:blank:]]*$/
+" \ contains=@vikiText,vikiRegionNames
syn region vikiRegionAlt matchgroup=vikiMacroDelim
\ start=/^[[:blank:]]*\z(=\{4,}\)[[:blank:]]*\([A-Z][a-z]*\>\|!!!\)\(\\\n\|.\)\{-}$/
\ end=/^[[:blank:]]*\z1\([[:blank:]].*\)\?$/
Please sign in to comment.
Something went wrong with that request. Please try again.