• Login
Community
  • Login

Auto New Line When Typing {

Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
7 Posts 3 Posters 6.0k Views
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.
  • M
    Muhammad Adam Firdaus
    last edited by Apr 29, 2016, 3:46 PM

    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
    • P
      Peter Stotz
      last edited by Apr 29, 2016, 4:50 PM

      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
      • P
        Peter Stotz
        last edited by Peter Stotz Apr 30, 2016, 12:09 PM Apr 30, 2016, 12:06 PM

        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
        • D
          dail
          last edited by Apr 30, 2016, 1:24 PM

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

          M 1 Reply Last reply May 2, 2016, 8:28 AM Reply Quote 0
          • M
            Muhammad Adam Firdaus @dail
            last edited by May 2, 2016, 8:28 AM

            @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
            • D
              dail
              last edited by May 2, 2016, 12:08 PM

              If I type

              .class-css {|
              

              It automatically becomes

              .class-css {|}
              

              And then I press enter:

              .class-css {
                  |
              }
              

              Is this not what you are wanting?

              M 1 Reply Last reply May 2, 2016, 12:23 PM Reply Quote 0
              • M
                Muhammad Adam Firdaus @dail
                last edited by May 2, 2016, 12:23 PM

                @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
                3 out of 7
                • First post
                  3/7
                  Last post
                The Community of users of the Notepad++ text editor.
                Powered by NodeBB | Contributors