Community
    • Login

    Auto New Line When Typing {

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    7 Posts 3 Posters 6.6k Views 2 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Muhammad Adam FirdausM Offline
      Muhammad Adam Firdaus
      last edited by

      I want to make auto complete settings like this:

      .class-css {
           automatically add new line before closing tag
           so I can write here without try to enter or tab again.
      }

      or

      function () {
           automatically push “}” to bottom with one auto indent.
      }

      Thanks for your suggestions.

      1 Reply Last reply Reply Quote 0
      • Peter StotzP Offline
        Peter Stotz
        last edited by

        I use PhraseExpress (a Text Expander) for such and even more effortful auto complete settings.
        This works very well.
        For the free test version see here:
        http://www.phraseexpress.com/freeware.htm#freeware

        peter

        1 Reply Last reply Reply Quote 1
        • Peter StotzP Offline
          Peter Stotz
          last edited by Peter Stotz

          For example: This PhraseExpress phrase

          .class-css{#asc 123}{#asc 13}{#TAB}{#asc 13}{#asc 125}{#left -count 2}

          causes this output:

          .class-css{
          –> _
          }

          _ = cursor position
          –> = TAB (The Forumsoftware cannot represent this)

          peter

          1 Reply Last reply Reply Quote 1
          • dailD Offline
            dail
            last edited by

            You can simply enable auto completion. Settings > Preferences > Auto-completion and make sure { is checkmarked.

            Muhammad Adam FirdausM 1 Reply Last reply Reply Quote 0
            • Muhammad Adam FirdausM Offline
              Muhammad Adam Firdaus @dail
              last edited by

              @dail I have tried this step, but this setting wouldn’t make closing “}” to bottom as desired.
              I’d like to make closing “}” to bottom automatically like I mentioned above:

              .class-css {
                  |
              }

              so:

              .class-css {
                  I begin write here;
              }

              or

              function() {
                  |
              }

              So I’d wrote:

              function() {
                  if(blablabla)
              }

              Any suggestions as simply as notepad++?

              1 Reply Last reply Reply Quote 0
              • dailD Offline
                dail
                last edited by

                If I type

                .class-css {|
                

                It automatically becomes

                .class-css {|}
                

                And then I press enter:

                .class-css {
                    |
                }
                

                Is this not what you are wanting?

                Muhammad Adam FirdausM 1 Reply Last reply Reply Quote 0
                • Muhammad Adam FirdausM Offline
                  Muhammad Adam Firdaus @dail
                  last edited by

                  @dail almost!

                  But, I’ve found that setting when we type “{”, it’s automatically create closing “}” with one tab indent or without we press ENTER.
                  Unfortunately, I forgot that settings.

                  1 Reply Last reply Reply Quote 0

                  Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                  Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                  With your input, this post could be even better 💗

                  Register Login
                  • First post
                    Last post
                  The Community of users of the Notepad++ text editor.
                  Powered by NodeBB | Contributors