soywiki 0.5.3 → 0.5.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README.markdown +1 -1
- data/lib/soywiki.rb +1 -1
- data/lib/soywiki.vim +6 -4
- metadata +2 -2
data/README.markdown
CHANGED
@@ -181,7 +181,7 @@ commands:
|
|
181
181
|
while the cursor is on the top line to close the new window
|
182
182
|
* `CTRL-h` does the same, but in a regular split window
|
183
183
|
* `q` closes a split window
|
184
|
-
* `,H` takes you to the `HomePage` of the namespace if it exists and you're not already on it. Otherwise, it takes you to `main.Homepage`.
|
184
|
+
* `,H` takes you to the `HomePage` of the current namespace if it exists and you're not already on it. Otherwise, it takes you to `main.Homepage`.
|
185
185
|
|
186
186
|
These key mappings may not be very mnemonic, but they are easy to
|
187
187
|
memorize through muscle memory and were chosen to keep the hands
|
data/lib/soywiki.rb
CHANGED
data/lib/soywiki.vim
CHANGED
@@ -5,6 +5,8 @@
|
|
5
5
|
" This regex matches namedspaced WikiWords and unqualified WikiWords
|
6
6
|
let s:wiki_link_pattern = '\C\m\<\([a-z][[:alnum:]_]\+\.\)\?[A-Z][a-z]\+[A-Z]\w*\>'
|
7
7
|
let s:http_link_pattern = 'https\?:[^ >)\]]\+'
|
8
|
+
let s:wiki_or_web_link_pattern = '\C\<\([a-z][[:alnum:]_]\+\.\)\?[A-Z][a-z]\+[A-Z]\w*\>\|https\?:[^ >)\]]\+'
|
9
|
+
|
8
10
|
let s:rename_links_command = 'soywiki-rename '
|
9
11
|
let s:find_pages_linking_in_command = 'soywiki-pages-linking-in '
|
10
12
|
let s:expand_command = 'soywiki-expand '
|
@@ -121,9 +123,9 @@ func! s:find_next_wiki_link(backward)
|
|
121
123
|
" don't wrap
|
122
124
|
if a:backward == 1
|
123
125
|
normal lb
|
124
|
-
let result = search(s:
|
126
|
+
let result = search(s:wiki_or_web_link_pattern, 'Wb')
|
125
127
|
else
|
126
|
-
let result = search(s:
|
128
|
+
let result = search(s:wiki_or_web_link_pattern, 'W')
|
127
129
|
endif
|
128
130
|
if (result == 0)
|
129
131
|
return ""
|
@@ -586,7 +588,8 @@ func! s:global_mappings()
|
|
586
588
|
command! -bar -nargs=1 SWNamespaceSearch :call s:wiki_search(<f-args>, 1)
|
587
589
|
|
588
590
|
autocmd BufReadPost,BufNewFile,WinEnter,BufEnter,BufNew,BufAdd * call s:highlight_wikiwords()
|
589
|
-
autocmd BufEnter * call s:prep_buffer()
|
591
|
+
autocmd BufReadPost,BufNewFile,WinEnter,BufEnter,BufNew,BufAdd * call s:prep_buffer()
|
592
|
+
" autocmd BufEnter * call s:prep_buffer()
|
590
593
|
endfunc
|
591
594
|
|
592
595
|
" this checks if the buffer is a SoyWiki file (from firstline)
|
@@ -624,7 +627,6 @@ func! s:prep_buffer()
|
|
624
627
|
nnoremap <buffer> \ gqap
|
625
628
|
nnoremap <buffer> <Leader>- o<Esc>k72i-<Esc><CR>
|
626
629
|
nnoremap <buffer> <Leader>d :r !date<CR>o
|
627
|
-
|
628
630
|
" set nu
|
629
631
|
setlocal completefunc=CompletePageTitle
|
630
632
|
augroup <buffer>
|