soywiki 0.5.2 → 0.5.3
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 -0
- data/lib/soywiki.rb +1 -1
- data/lib/soywiki.vim +11 -0
- 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
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
|