Remove new line before brace in template

Home Forums Multi-Edit Lite Support (Lite) Remove new line before brace in template

This topic contains 3 replies, has 1,132 voices, and was last updated by  Clay Martin 4 years, 4 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #2982

    tman
    Participant

    Working with PHP template. How do I remove the new line before the braces are expanded? For example, my "if" currently expands to:
    if ( )
    {

    }

    All the existing code I am editing looks like:

    if ( ) {

    }

    In the existing code there is never a new line before the opening brace, including for do and select constructs. I’ve tried a few things but nothing works so far (the template changes are effective immediately, correct?) The template syntax is

    if <^PAREN> <^BRACE2>

    BRACE2 is: <!C^CIndentTmp /S=PHP/N=BRACE2_><-XCUR><-SCUR><-RCUR><-XCUR>

    There is not a BRACE2_ entry as shown in the /N parameter, but there are

    BRACE2_0:
    {<-SIND>
    <-TAB><-SCUR>
    }

    BRACE2_1:
    <-SIND>
    {
    <-TAB><-SCUR>
    }

    BRACE2_2:
    {<-TAB><-SCIND><-SCUR><-RIND>
    }

    BRACE2_3:
    <-SIND>
    <-TAB>{
    <-TAB><-SCUR>
    <-TAB>}

    Maybe this is something in the CIndentTmp macro, but I’m at a loss right now.

    #9627

    Clay Martin
    Keymaster

    Hi,
    If you go to Tools-Customize-General and press the Languages button. Find PHP in the list, select it, then press Edit. Press the Formatting/Config button (lower right corner) then choose different options from the indent style selector. I think "0" is the one you want.

    Thanks,
    Clay

    #9628

    tman
    Participant

    Thanks. I posted on the weekend and didn’t realize posts weren’t approved over weekends, so did some further digging and found this out.

    #9630

    Clay Martin
    Keymaster

    Hi,
    Its not over the weekend, instead, when someone new joins the forum, there first post needs to be approved. After that, all posts are approved automatically. Just a little spam control.

    Thanks,
    Clay

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.