soywiki 0.5.3 → 0.5.4

Sign up to get free protection for your applications and to get access to all the features.
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
@@ -1,7 +1,7 @@
1
1
  require 'string_ext'
2
2
 
3
3
  module Soywiki
4
- VERSION = '0.5.3'
4
+ VERSION = '0.5.4'
5
5
  WIKI_WORD = /\b([a-z][\w_]+\.)?[A-Z][a-z]+[A-Z]\w*\b/
6
6
  HYPERLINK = %r|\bhttps?://[^ >)\n\]]+|
7
7
 
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:wiki_link_pattern, 'Wb')
126
+ let result = search(s:wiki_or_web_link_pattern, 'Wb')
125
127
  else
126
- let result = search(s:wiki_link_pattern, 'W')
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>
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 5
8
- - 3
9
- version: 0.5.3
8
+ - 4
9
+ version: 0.5.4
10
10
  platform: ruby
11
11
  authors:
12
12
  - Daniel Choi