soywiki 0.5.2 → 0.5.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. data/README.markdown +1 -0
  2. data/lib/soywiki.rb +1 -1
  3. data/lib/soywiki.vim +11 -0
  4. metadata +2 -2
data/README.markdown CHANGED
@@ -181,6 +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
185
 
185
186
  These key mappings may not be very mnemonic, but they are easy to
186
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.2'
4
+ VERSION = '0.5.3'
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
@@ -552,6 +552,15 @@ func! s:find_next_href_and_open()
552
552
  endif
553
553
  endfunc
554
554
 
555
+ func! s:goto_homepage()
556
+ let namespace_home = s:page_namespace()."/HomePage"
557
+ if (filereadable(namespace_home)) && bufname('%') != namespace_home
558
+ call s:load_page(namespace_home, 0)
559
+ else
560
+ call s:load_page("main.HomePage", 0)
561
+ endif
562
+ endfunc
563
+
555
564
  " --------------------------------------------------------------------------------
556
565
  " HELP
557
566
  func! s:show_help()
@@ -608,6 +617,8 @@ func! s:prep_buffer()
608
617
  noremap <buffer> <leader>hx :call <SID>expand(0,0)<CR>
609
618
  noremap <buffer> <leader>hX :call <SID>expand(1,0)<CR>
610
619
 
620
+ noremap <buffer> <leader>H :call <SID>goto_homepage()<CR>
621
+
611
622
  noremap <silent> <leader>? :call <SID>show_help()<cr>
612
623
 
613
624
  nnoremap <buffer> \ gqap
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 5
8
- - 2
9
- version: 0.5.2
8
+ - 3
9
+ version: 0.5.3
10
10
  platform: ruby
11
11
  authors:
12
12
  - Daniel Choi