Permalink
Browse files

Version 3.17

- FIX: g:vikiOpenUrlWith_ANY for Windows
- Moved definition of fold related variables to ftplugin/viki.vim
- viki_viki: Anchors in URLs can start with an upper case character
- viki#RestoreCursorPosition(): use winrestview() (reported by Marko Mahnic)
  • Loading branch information...
1 parent 402051c commit a8f14b018095365c15bafaacb79adcde35843940 @tomtom tomtom committed with Mar 9, 2010
Showing with 46 additions and 31 deletions.
  1. +8 −5 autoload/viki.vim
  2. +8 −4 autoload/viki_viki.vim
  3. +21 −2 ftplugin/viki.vim
  4. +9 −20 plugin/viki.vim
View
@@ -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: 2010-02-20.
-" @Revision: 0.614
+" @Last Change: 2010-03-09.
+" @Revision: 0.621
" call tlog#Log('Load: '. expand('<sfile>')) " vimtlib-sfile
@@ -427,7 +427,8 @@ endif
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}')"
+ " let g:vikiOpenUrlWith_ANY = "exec 'silent !rundll32 url.dll,FileProtocolHandler '. shellescape('%{URL}')"
+ let g:vikiOpenUrlWith_ANY = "exec 'silent ! RunDll32.EXE URL.DLL,FileProtocolHandler '. shellescape('%{URL}', 1)"
elseif has("mac")
let g:vikiOpenUrlWith_ANY = "exec 'silent !open '. escape('%{URL}', ' &!%')"
elseif $GNOME_DESKTOP_SESSION_ID != ""
@@ -1189,8 +1190,9 @@ function! viki#RestoreCursorPosition(...) "{{{3
if has_key(s:positions, bn)
let ve = &virtualedit
set virtualedit=all
- exe 'keepjumps norm! '. s:positions[bn].w0 .'zt'
- call setpos('.', s:positions[bn].pos)
+ " exe 'keepjumps norm! '. s:positions[bn].w0 .'zt'
+ " call setpos('.', s:positions[bn].pos)
+ call winrestview(s:positions[bn].view)
let &virtualedit = ve
endif
endf
@@ -1205,6 +1207,7 @@ function! viki#SaveCursorPosition() "{{{3
let bn = bufnr('%')
let s:positions[bn] = {
\ 'pos': getpos('.'),
+ \ 'view': winsaveview(),
\ 'w0': line('w0'),
\ }
" \ 'eol': (col('.') == col('$')),
View
@@ -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: 2010-01-03.
-" @Revision: 0.0.124
+" @Last Change: 2010-02-28.
+" @Revision: 0.0.127
let s:save_cpo = &cpo
set cpo&vim
@@ -128,10 +128,14 @@ function! viki_viki#SetupBuffer(state, ...) "{{{3
if viki#IsSupportedType("u") && !(dontSetup =~# "u")
let urlChars = 'A-Za-z0-9.,:%?=&_~@$/|+-'
+ " let b:vikiUrlRx = '\<\(\('.b:vikiSpecialProtocols.'\):['. urlChars .']\+\)'.
+ " \ '\(#\('. b:vikiAnchorNameRx .'\)\)\?'. b:vikiUrlRestRx
+ " let b:vikiUrlSimpleRx = '\<\('. b:vikiSpecialProtocols .'\):['. urlChars .']\+'.
+ " \ '\(#'. b:vikiAnchorNameRx .'\)\?'. b:vikiUrlRestRx
let b:vikiUrlRx = '\<\(\('.b:vikiSpecialProtocols.'\):['. urlChars .']\+\)'.
- \ '\(#\('. b:vikiAnchorNameRx .'\)\)\?'. b:vikiUrlRestRx
+ \ '\(#\(['. b:vikiLowerCharacters . b:vikiUpperCharacters .'_0-9%]\+\)\)\?'. b:vikiUrlRestRx
let b:vikiUrlSimpleRx = '\<\('. b:vikiSpecialProtocols .'\):['. urlChars .']\+'.
- \ '\(#'. b:vikiAnchorNameRx .'\)\?'. b:vikiUrlRestRx
+ \ '\(#['. b:vikiLowerCharacters . b:vikiUpperCharacters .'_0-9%]\+\)\?'. b:vikiUrlRestRx
let b:vikiUrlNameIdx = 0
let b:vikiUrlDestIdx = 1
let b:vikiUrlAnchorIdx = 4
View
@@ -2,8 +2,8 @@
" @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: 2009-12-26.
-" @Revision: 416
+" @Last Change: 2010-02-28.
+" @Revision: 418
" if !g:vikiEnabled
" finish
@@ -21,8 +21,27 @@ let b:did_ftplugin = 1
let b:vikiCommentStart = "%"
let b:vikiCommentEnd = ""
let b:vikiHeadingMaxLevel = -1
+
+
if !exists("b:vikiMaxFoldLevel") | let b:vikiMaxFoldLevel = 5 | endif "{{{2
if !exists("b:vikiInverseFold") | let b:vikiInverseFold = 0 | endif "{{{2
+" 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 !exists("g:vikiFoldBodyLevel") | let g:vikiFoldBodyLevel = 6 | endif "{{{2
+
+" Choose folding method version
+if !exists("g:vikiFoldMethodVersion") | let g:vikiFoldMethodVersion = 4 | endif "{{{2
+
+" What is considered for folding.
+" This variable is only used if g:vikiFoldMethodVersion is 1.
+if !exists("g:vikiFolds") | let g:vikiFolds = 'hf' | endif "{{{2
+
+" Context lines for folds
+if !exists("g:vikiFoldsContext") "{{{2
+ let g:vikiFoldsContext = [2, 2, 2, 2]
+endif
+
exec "setlocal commentstring=". substitute(b:vikiCommentStart, "%", "%%", "g")
\ ."%s". substitute(b:vikiCommentEnd, "%", "%%", "g")
View
@@ -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: 2010-02-20.
-" @Revision: 2678
+" @Last Change: 2010-03-09.
+" @Revision: 2686
"
" GetLatestVimScripts: 861 1 viki.vim
"
@@ -40,7 +40,7 @@ if !exists('g:loaded_tlib') || g:loaded_tlib < 32
finish
endif
endif
-let loaded_viki = 316
+let loaded_viki = 317
" Configuration {{{1
@@ -65,23 +65,6 @@ if !exists('g:vikiMenuLevel')
let g:vikiMenuLevel = 1 "{{{2
endif
-" 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 !exists("g:vikiFoldBodyLevel") | let g:vikiFoldBodyLevel = 6 | endif "{{{2
-
-" Choose folding method version
-if !exists("g:vikiFoldMethodVersion") | let g:vikiFoldMethodVersion = 4 | endif "{{{2
-
-" What is considered for folding.
-" This variable is only used if g:vikiFoldMethodVersion is 1.
-if !exists("g:vikiFolds") | let g:vikiFolds = 'hf' | endif "{{{2
-
-" Context lines for folds
-if !exists("g:vikiFoldsContext") "{{{2
- let g:vikiFoldsContext = [2, 2, 2, 2]
-endif
-
" if !exists("g:vikiBasicSyntax") | let g:vikiBasicSyntax = 0 | endif "{{{2
" If non-nil, display headings of different levels in different colors
if !exists("g:vikiFancyHeadings") | let g:vikiFancyHeadings = 0 | endif "{{{2
@@ -719,5 +702,11 @@ VikiDefine()) in order to reduce startup time
3.16
- FIX: Handling of cursor positions (reported by Marko Mahnic)
+3.17
+- FIX: g:vikiOpenUrlWith_ANY for Windows
+- Moved definition of fold related variables to ftplugin/viki.vim
+- viki_viki: Anchors in URLs can start with an upper case character
+- viki#RestoreCursorPosition(): use winrestview() (reported by Marko Mahnic)
+
" vim: ff=unix

0 comments on commit a8f14b0

Please sign in to comment.