specky/plugin/specky.vim
branchvim-stuff
changeset 5 3346aa8d5364
parent 3 db3e3abfc647
child 6 31d00503e038
--- a/specky/plugin/specky.vim	Sat Mar 28 02:57:39 2009 +0000
+++ b/specky/plugin/specky.vim	Fri Apr 03 23:34:00 2009 +0000
@@ -58,11 +58,11 @@
 "
 function! <SID>SpecSwitcher()
 
-	" If we aren't in a ruby file (specs are ruby-mode too) then we probably
-	" don't care too much about this function.
+	" If we aren't in a ruby or rspec file then we probably don't care
+	" too much about this function.
 	"
-	if &ft != 'ruby'
-		call s:err( "Not currently in ruby-mode." )
+	if &ft != 'ruby' && &ft != 'rspec'
+		call s:err( "Not currently in ruby or rspec mode." )
 		return
 	endif
 
@@ -122,7 +122,7 @@
 		execute ":normal viWc'" . l:word . "'"
 
 	elseif l:type == "'"
-		if &ft == "ruby"
+		if &ft == 'ruby' || &ft == 'rspec'
 			" Single quote to symbol
 			"
 			execute ':normal viWc:' . l:word