t9md/vim-snipplr — pull request #2 by symsec (2012-10-19 22:22:25+00:00)
Title: A few updates + extra info

Some updates / bug fixes for latest ruby and errors caused by SnipplrList + elaborated README a bit more on the expected result of the SnipplrList command (not showing a list of the remote snippets - instead shows local snippets).

Patch of the ruby file below:

--- vim-snipplr/bin/snipplr.rb	2012-10-20 00:05:01.147384459 +0200
+++ /home/susy/.vim/bundle/vim-snipplr/bin/snipplr.rb	2012-10-19 23:59:40.613995222 +0200
@@ -238,10 +238,10 @@
opts.on( "-i", "--info id", String, "display info for snippet"){ |v| OPT[:cmd] = "info"; OPT[:query] = v }
opts.on( "-d", "--delete id", String, "delete id's snippet from local cache"){ |v| OPT[:cmd] = "delete"; OPT[:id] = v }
opts.on( "-l", "--list","list entries."){ OPT[:cmd] = "list" }
-opts.on( "--lang lang", String, "show only specified lang for list."){ |OPT[:lang]| }
-opts.on( "-t", "--target [mine|all]","target for remote list[mine|all]."){ |OPT[:target]| }
+opts.on( "--lang lang", String, "show only specified lang for list."){ |v| OPT[:lang] = v }
+opts.on( "-t", "--target [mine|all]","target for remote list[mine|all]."){ |v| OPT[:target] = v }
opts.on( "--langlist","list supported language list"){ OPT[:cmd] = "langlist" }
-opts.on( "--nocache", "don't use local cache"){ |OPT[:nocache]| }
+opts.on( "--nocache", "don't use local cache"){ |v| OPT[:nocache] = v }

begin
opts.parse!
@@ -264,7 +264,7 @@
puts snipplr.list
#when "list_remote":
#puts snipplr.list_remote
- when "langlist":
+ when "langlist"
puts snipplr.langlist
else
puts opts.help