ecomba / vim-ruby-refactoring

Refactoring tool for Ruby in vim!
520 stars 52 forks source link

RenameLocalVariable :) #3

Closed nrocy closed 14 years ago

nrocy commented 14 years ago

Hey!

Does what it says on the tin, I've merged upstream already so should be an easy merge for you :)

Also there's a technique in there for backing up @registers to avoid clobbering them, according to #vim on FreeNode, you can't yank into local variables. :(

ecomba commented 14 years ago

Ooops!

Error detected while processing function RenameLocalVariable: line 29: E486: Pattern not found: <\zssomething>\ze[^(]

nrocy commented 14 years ago

Oops indeed!

Was it a variable in a method, or in global scope? Got a snippet/steps to reproduce please?

ecomba commented 14 years ago

I had this method here:

26 def arg 27 something = 3+4 28 bla + somethig 29 return something 30 end

Selected in visual mode the first occurrence of "something" and tried to run the script rrlv

nrocy commented 14 years ago

Hey Enrique,

Have added a dependency check into the plugin for now, it's actually fairly hard to match the corresponding end token. As such, figure better safe than sorry :) Gives an error message stating requirement, and where to download plugin from.

ecomba commented 14 years ago

Well done!