soywiki 0.5.7 → 0.5.8

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.
Files changed (4) hide show
  1. data/lib/plugin.erb +16 -0
  2. data/lib/soywiki.rb +7 -1
  3. data/lib/soywiki.vim +1 -1
  4. metadata +3 -2
@@ -0,0 +1,16 @@
1
+ " Vim script that turns Vim into a personal wiki
2
+ " Maintainer: Daniel Choi <dhchoi@gmail.com>
3
+ " License: MIT License (c) 2011 Daniel Choi
4
+
5
+ if exists("g:SoyWikiStarterLoaded") || &cp || version < 700
6
+ finish
7
+ endif
8
+ let g:SoyWikiStarterLoaded = 1
9
+
10
+
11
+ func! Soywiki()
12
+ source <%= vimscript_file %>
13
+ endfunc
14
+
15
+ command! -bar -nargs=0 Soywiki :call Soywiki()
16
+
@@ -1,7 +1,7 @@
1
1
  require 'string_ext'
2
2
 
3
3
  module Soywiki
4
- VERSION = '0.5.7'
4
+ VERSION = '0.5.8'
5
5
  WIKI_WORD = /\b([a-z][\w_]+\.)?[A-Z][a-z]+[A-Z]\w*\b/
6
6
  HYPERLINK = %r|\bhttps?://[^ >)\n\]]+|
7
7
 
@@ -24,6 +24,12 @@ END
24
24
  elsif ARGV.first == '--html'
25
25
  self.html_export
26
26
  exit
27
+ elsif ARGV.first == '--install-plugin'
28
+ require 'erb'
29
+ plugin_template = File.read(File.join(File.dirname(__FILE__), 'plugin.erb'))
30
+ vimscript_file = File.join(File.dirname(__FILE__), 'soywiki.vim')
31
+ plugin_body = ERB.new(plugin_template).result(binding)
32
+ File.open("#{ENV['HOME']}/.vim/plugin/soywiki_starter.vim", "w") {|f| f.write plugin_body}
27
33
  else
28
34
  vim = ENV['SOYWIKI_VIM'] || 'vim'
29
35
  vimscript = File.expand_path("../soywiki.vim", __FILE__)
@@ -681,5 +681,5 @@ else
681
681
  endif
682
682
  syntax enable
683
683
  call s:highlight_wikiwords()
684
-
684
+ call s:prep_buffer()
685
685
 
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 5
8
- - 7
9
- version: 0.5.7
8
+ - 8
9
+ version: 0.5.8
10
10
  platform: ruby
11
11
  authors:
12
12
  - Daniel Choi
@@ -57,6 +57,7 @@ files:
57
57
  - bin/soywiki-rename
58
58
  - lib/index_template.html.haml
59
59
  - lib/page_template.html.haml
60
+ - lib/plugin.erb
60
61
  - lib/soywiki.rb
61
62
  - lib/soywiki.vim
62
63
  - lib/soywiki/html.rb