I suggest you ...

convert single line if statement to multi line if statement

This is a minor but irritating issue.

Suppose that I have the following line of code:

If someValue = True Then DoSomething()

and I need to change it to:

If someValue Then
DoSomething()
DoSomethingElse()
End If

Then I insert the cursor after the 'Then' and press 'enter' resulting in:

If someValue = True Then
<Cursor Here>
End IF
DoSomething()

I think that it would generally be more useful if the editor could do this instead:

If someValue = True Then
DoSomething()
<Cursor Here>
End IF

22 votes
Vote
Sign in
Check!
(thinking…)
Reset
or sign in with
  • facebook
  • google
    Password icon
    I agree to the terms of service
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    Robert SmithRobert Smith shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →

    1 comment

    Sign in
    Check!
    (thinking…)
    Reset
    or sign in with
    • facebook
    • google
      Password icon
      I agree to the terms of service
      Signed in as (Sign out)
      Submitting...
      • AnonymousAnonymous commented  ·   ·  Flag as inappropriate

        I find this an annoyance as well. When updating code, while the single line IF was efficient and all that was needed originally, sometimes it needs to be made more complex, and thus go from a inline IF to a normal IF.

      Feedback and Knowledge Base