1

Re: Select entire C# method?

Hey vi experts,

Is there a way I can reliably select/move by an entire C# method?

If I am at the start of the method, then ]] is supposed to be the move command for an entire method for c/c++/Java. However it doesn't quite work for C#. This is true in viemu and vim. If you do ]], it will move you to the end of the current class, something about C# markup makes vi not quite sure where methods end. I want to do v]] to visually select an entire method.

viB from within the method will select the entire body, that's not bad. But I'd love to grab the signature and the closing brace too.

Any ideas?

2

Re: Select entire C# method?

Press V, move to the opening { then %.