soywiki 0.0.8 → 0.0.9
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/soywiki.rb +1 -1
- data/lib/soywiki.vim +10 -8
- metadata +2 -2
data/lib/soywiki.rb
CHANGED
data/lib/soywiki.vim
CHANGED
@@ -6,6 +6,7 @@
|
|
6
6
|
" .WikiWords in a namespace
|
7
7
|
let s:wiki_link_pattern = '\C\<\([a-z][[:alnum:]_]\+\.\)\?[A-Z][a-z]\+[A-Z]\w*\>\|\.[A-Z][a-z]\+[A-Z]\w*\>'
|
8
8
|
|
9
|
+
let s:http_link_pattern = 'https\?:[^ >)\]]\+'
|
9
10
|
let s:rename_links_command = 'soywiki-rename '
|
10
11
|
let s:find_pages_linking_in_command = 'soywiki-pages-linking-in '
|
11
12
|
let s:expand_command = 'soywiki-expand '
|
@@ -493,9 +494,8 @@ endfunc
|
|
493
494
|
"------------------------------------------------------------------------
|
494
495
|
|
495
496
|
func! s:open_href()
|
496
|
-
let
|
497
|
-
let
|
498
|
-
let href = matchstr(getline(line('.')), pattern)
|
497
|
+
let line = search(s:http_link_pattern, 'cw')
|
498
|
+
let href = matchstr(getline(line('.')), s:http_link_pattern)
|
499
499
|
let command = g:SoyWiki#browser_command . " '" . href . "' "
|
500
500
|
call system(command)
|
501
501
|
echom command
|
@@ -570,10 +570,12 @@ func! s:prep_buffer()
|
|
570
570
|
endfunc
|
571
571
|
|
572
572
|
func! s:highlight_wikiwords()
|
573
|
-
if (s:is_wiki_page())
|
574
|
-
exe "match
|
575
|
-
|
576
|
-
|
573
|
+
if (s:is_wiki_page())
|
574
|
+
" exe ":match Constant /". s:http_link_pattern . "/"
|
575
|
+
"exe ":2match Comment /". s:wiki_link_pattern. "/"
|
576
|
+
syntax clear
|
577
|
+
exe "syn match Comment /". s:wiki_link_pattern. "/"
|
578
|
+
exe "syn match Constant /". s:http_link_pattern . "/"
|
577
579
|
endif
|
578
580
|
endfunc
|
579
581
|
|
@@ -603,5 +605,5 @@ else
|
|
603
605
|
endif
|
604
606
|
|
605
607
|
call s:get_page_list()
|
606
|
-
syntax
|
608
|
+
syntax enable
|
607
609
|
let mapleader = ','
|