soywiki 0.3.5 → 0.3.6
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 +6 -4
- data/lib/soywiki.rb +1 -1
- data/lib/soywiki.vim +4 -2
- metadata +2 -2
data/README.markdown
CHANGED
@@ -199,7 +199,8 @@ When you're on a wiki page and you want to see all the other wiki pages
|
|
199
199
|
that link in to it, press `,M`. If there is only one page that links in,
|
200
200
|
you'll be taken there automatically.
|
201
201
|
|
202
|
-
* `,o` opens the first web hyperlink on or after the cursor
|
202
|
+
* `,o` opens the first web hyperlink on or after the cursor in the default external web browser
|
203
|
+
* `,O` opens the first web hyperlink on or after the cursor in Vim using `netrw`
|
203
204
|
|
204
205
|
`,o` opens the next hyperlink on or after the cursor. These are the URLs
|
205
206
|
that begin with http:// or https://. You can also use `ENTER` when the
|
@@ -212,9 +213,10 @@ adding this to your `~/.vimrc`:
|
|
212
213
|
|
213
214
|
let g:SoyWiki#browser_command = "your browser command here"
|
214
215
|
|
215
|
-
If your Vim has `netrw
|
216
|
-
window by putting the cursor
|
217
|
-
|
216
|
+
If your Vim has `netrw` installed, you can open a hyperlink directly in
|
217
|
+
same Vim window by putting the cursor on a web hyperlink and typing `,O`
|
218
|
+
(capital O). This will open the webpage in a vertical split window,
|
219
|
+
using `elinks` or whatever browser you set as your `g:netrw_http_cmd`.
|
218
220
|
See `:help netrw` for more information.
|
219
221
|
|
220
222
|
Tip: I personally like using `netrw` (configured to use elinks) a lot
|
data/lib/soywiki.rb
CHANGED
data/lib/soywiki.vim
CHANGED
@@ -561,7 +561,8 @@ func! s:global_mappings()
|
|
561
561
|
noremap <leader>M :call <SID>list_pages_linking_in()<CR>
|
562
562
|
noremap <silent> <leader>o :call <SID>find_next_href_and_open()<cr>
|
563
563
|
nnoremap <silent> q :close<cr>
|
564
|
-
|
564
|
+
" for netrw vertical split
|
565
|
+
nnoremap ,O :exec "silent rightbelow vsplit ". expand("<cWORD>")<cr>
|
565
566
|
|
566
567
|
command! -bar -nargs=1 -range -complete=file SWAppend :<line1>,<line2>call s:extract(<f-args>, 'append', 0)
|
567
568
|
command! -bar -nargs=1 -range -complete=file SWInsert :<line1>,<line2>call s:extract(<f-args>, 'insert', 0)
|
@@ -578,7 +579,7 @@ endfunc
|
|
578
579
|
" this checks if the buffer is a SoyWiki file (from firstline)
|
579
580
|
" and then turns on syntax coloring and mappings as necessary
|
580
581
|
func! s:prep_buffer()
|
581
|
-
if (s:is_wiki_page())
|
582
|
+
if (s:is_wiki_page() && !exists("b:mappings_loaded"))
|
582
583
|
set textwidth=72
|
583
584
|
nnoremap <buffer> <cr> :call <SID>follow_link_under_cursor(0)<cr>
|
584
585
|
nnoremap <buffer> <c-l> :call <SID>follow_link_under_cursor(2)<cr>
|
@@ -614,6 +615,7 @@ func! s:prep_buffer()
|
|
614
615
|
au!
|
615
616
|
autocmd BufWritePost <buffer> call s:save_revision()
|
616
617
|
augroup END
|
618
|
+
let b:mappings_loaded = 1
|
617
619
|
endif
|
618
620
|
endfunc
|
619
621
|
|