soywiki 0.5.7 → 0.5.8
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/plugin.erb +16 -0
- data/lib/soywiki.rb +7 -1
- data/lib/soywiki.vim +1 -1
- metadata +3 -2
data/lib/plugin.erb
ADDED
@@ -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
|
+
|
data/lib/soywiki.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
require 'string_ext'
|
2
2
|
|
3
3
|
module Soywiki
|
4
|
-
VERSION = '0.5.
|
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__)
|
data/lib/soywiki.vim
CHANGED
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 5
|
8
|
-
-
|
9
|
-
version: 0.5.
|
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
|