soywiki 0.0.6 → 0.0.7

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 +2 -0
  2. data/lib/soywiki.rb +1 -1
  3. data/lib/soywiki.vim +11 -4
  4. metadata +2 -2
data/README.markdown CHANGED
@@ -297,6 +297,8 @@ anything, and it erases the WikiWord that got expanded.
297
297
 
298
298
  * `,x` expands a wiki page seamfully
299
299
  * `,X` expands a wiki page seamlessly
300
+ * `,vx` expands a wiki page seamfully and opens on a vertical split
301
+ * `,vX` expands a wiki page seamlessly and opens on a vertical split
300
302
 
301
303
  Both modes of expansion are useful when you want to assemble a long
302
304
  piece of writing by using one page as a master outline that links to
data/lib/soywiki.rb CHANGED
@@ -27,7 +27,7 @@ end
27
27
 
28
28
 
29
29
  module Soywiki
30
- VERSION = '0.0.6'
30
+ VERSION = '0.0.7'
31
31
  WIKI_WORD = /\b([a-z][\w_]+\.)?[A-Z][a-z]+[A-Z]\w*\b|\.[A-Z][a-z]+[A-Z]\w*\b/
32
32
 
33
33
  def self.run
data/lib/soywiki.vim CHANGED
@@ -467,7 +467,7 @@ endfunc
467
467
  " This opens a new buffer with all the lines with just WikiLinks on them
468
468
  " expanded (recursively). This is not a wiki buffer but a text buffer
469
469
 
470
- func! s:expand(seamless)
470
+ func! s:expand(seamless, vertical)
471
471
  if a:seamless == 1
472
472
  " seamful, the default
473
473
  echom "Expanding seamfully. Please wait."
@@ -476,7 +476,11 @@ func! s:expand(seamless)
476
476
  echom "Expanding seamlessly. Please wait."
477
477
  let res = system(s:expand_command . " seamful " . bufname('%'))
478
478
  endif
479
- new
479
+ if a:vertical
480
+ vnew
481
+ else
482
+ new
483
+ endif
480
484
  setlocal buftype=nofile "scratch buffer for viewing; user can write
481
485
  silent! put =res
482
486
  silent! 1delete
@@ -548,8 +552,11 @@ func! s:prep_buffer()
548
552
  command! -buffer SWBlame :call s:show_blame()
549
553
  noremap <buffer> <leader>b :call <SID>show_blame()<CR>
550
554
 
551
- noremap <buffer> <leader>x :call <SID>expand(0)<CR>
552
- noremap <buffer> <leader>X :call <SID>expand(1)<CR>
555
+ noremap <buffer> <leader>x :call <SID>expand(0,0)<CR>
556
+ noremap <buffer> <leader>X :call <SID>expand(1,0)<CR>
557
+ noremap <buffer> <leader>vx :call <SID>expand(0,1)<CR>
558
+ noremap <buffer> <leader>vX :call <SID>expand(1,1)<CR>
559
+ noremap <buffer> <leader>VX :call <SID>expand(1,1)<CR>
553
560
 
554
561
  noremap <silent> <leader>? :call <SID>show_help()<cr>
555
562
 
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 0
8
- - 6
9
- version: 0.0.6
8
+ - 7
9
+ version: 0.0.7
10
10
  platform: ruby
11
11
  authors:
12
12
  - Daniel Choi