lib/soywiki.vim in soywiki-0.5.3 vs lib/soywiki.vim in soywiki-0.5.4

- old
+ new

@@ -3,10 +3,12 @@ " License: MIT License (c) 2011 Daniel Choi " This regex matches namedspaced WikiWords and unqualified WikiWords let s:wiki_link_pattern = '\C\m\<\([a-z][[:alnum:]_]\+\.\)\?[A-Z][a-z]\+[A-Z]\w*\>' let s:http_link_pattern = 'https\?:[^ >)\]]\+' +let s:wiki_or_web_link_pattern = '\C\<\([a-z][[:alnum:]_]\+\.\)\?[A-Z][a-z]\+[A-Z]\w*\>\|https\?:[^ >)\]]\+' + let s:rename_links_command = 'soywiki-rename ' let s:find_pages_linking_in_command = 'soywiki-pages-linking-in ' let s:expand_command = 'soywiki-expand ' let s:ls_command = 'soywiki-ls-t ' let s:search_for_link = "" @@ -119,13 +121,13 @@ func! s:find_next_wiki_link(backward) let n = 0 " don't wrap if a:backward == 1 normal lb - let result = search(s:wiki_link_pattern, 'Wb') + let result = search(s:wiki_or_web_link_pattern, 'Wb') else - let result = search(s:wiki_link_pattern, 'W') + let result = search(s:wiki_or_web_link_pattern, 'W') endif if (result == 0) return "" end return s:link_under_cursor() @@ -584,11 +586,12 @@ command! -bar -nargs=1 SWSearch :call s:wiki_search(<f-args>, 0) command! -bar -nargs=1 SWNamespaceSearch :call s:wiki_search(<f-args>, 1) autocmd BufReadPost,BufNewFile,WinEnter,BufEnter,BufNew,BufAdd * call s:highlight_wikiwords() - autocmd BufEnter * call s:prep_buffer() + autocmd BufReadPost,BufNewFile,WinEnter,BufEnter,BufNew,BufAdd * call s:prep_buffer() + " autocmd BufEnter * call s:prep_buffer() endfunc " this checks if the buffer is a SoyWiki file (from firstline) " and then turns on syntax coloring and mappings as necessary func! s:prep_buffer() @@ -622,10 +625,9 @@ noremap <silent> <leader>? :call <SID>show_help()<cr> nnoremap <buffer> \ gqap nnoremap <buffer> <Leader>- o<Esc>k72i-<Esc><CR> nnoremap <buffer> <Leader>d :r !date<CR>o - " set nu setlocal completefunc=CompletePageTitle augroup <buffer> au! autocmd BufWritePost,BufUnload <buffer> call s:save_revision()