3

Is there an Add_in to Visual studio which automatically inserts underscores between my method name Words?

For example i will write "public void ChangeEmail Should Update Email()" then press a shortcut and it will convert to "public void ChangeEmail_Should_Update_Email()"

Amr Elgarhy
  • 66,568
  • 69
  • 184
  • 301

2 Answers2

3

You can use Jean-Paul Boodhoo's BDD Macro - not sure about automatic though.

Note, more recently Jean-Paul has decided to move towards using AutoHotKey instead - see the following - posts So Long BDD Macro - Hello Autohotkey!!! and BDD AutoHotKey Script Update - Take 2.

Bermo
  • 4,921
  • 1
  • 28
  • 31
1

ReSharper can do this. You set your naming convention, type it incorrectly and CTRL-Enter will fix it. Among the millions of other features ReSharper adds to VS...

Samuel Neff
  • 73,278
  • 17
  • 138
  • 182
  • the only problem with resharper is that you still have to write code – John Nicholas Jul 20 '10 at 16:50
  • good to know that reSharper can do it, i didn't test resharper on VS 2010, is it working fine?, asking about performance and compatibility. – Amr Elgarhy Jul 20 '10 at 21:58
  • Yes, ReSharper works great on 2010 and they just recently released 5.1 which has a lot of bug fixes (none of which were ones we ran into though). – Samuel Neff Jul 21 '10 at 04:51