Improve ruby desc snippet

Instead of dummy text, first argument for `describe` becomes a class
name derived from a file name. Example:
file:              some_class_spec.rb
describe argument: SomeClass
This commit is contained in:
Bruno Sutic 2013-09-21 12:18:02 +02:00
parent dec4556898
commit 83345ba694

View File

@ -957,7 +957,7 @@ snippet tctss
# Rspec snippets # # Rspec snippets #
########################## ##########################
snippet desc snippet desc
describe ${1:class_name} do describe ${1:`substitute(substitute(vim_snippets#Filename(), '_spec$', '', ''), '\(_\|^\)\(.\)', '\u\2', 'g')`} do
${0} ${0}
end end
snippet descm snippet descm