Community
    • Login

    [RESOLVED] How can I personnalize the auto indent function

    Scheduled Pinned Locked Moved Notepad++ & Plugin Development
    3 Posts 2 Posters 790 Views 1 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.
    • Lhuillier SébastienL Offline
      Lhuillier Sébastien
      last edited by Lhuillier Sébastien

      Hello,
      I use N++ for wrintind article for Joomla in HTML5.
      My “intranet” site is a Electronic document management in Joomla. I code every article in text (HTML), no wysiwyg tool.
      SInce few week, I need to add some “french” (I am french) data-* html tag (For example <a href=“MyFile.pdf” data-auteur=“Marcel”, data-date-publication=“2002-09-09”, data-type=“facture”… and so on)
      Every article are written in N++ for havins the “auto-indent” tooL. But, I’d like to personnalise this tool for having a carriage-return before EVERY data-* tag. So :

      <a href="MyFile.pdf" data-auteur="Marcel" data-type="facture data-date="2002-06-05">FACTURE</a>
      

      Should be auto-indent like :

      <a href="MyFile.pdf" 
               data-auteur="Marcel"
               data-type="facture" 
               data-date="2002-06-05" 
               data-... = ... >FACTURE</a>
      

      Can I have this result ?
      Can I code a plugin for that and so Where can I have a tutorial ?

      Thanks a lot

      Lycan ThropeL Lhuillier SébastienL 2 Replies Last reply Reply Quote 0
      • Lycan ThropeL Offline
        Lycan Thrope @Lhuillier Sébastien
        last edited by

        @Lhuillier-Sébastien said in How can I personnalize the auto indent function:

        Can I have this result ?
        Can I code a plugin for that and so Where can I have a tutorial ?

        Someone else may be along with a nifty PythonScript to do this for you, but you can do this now, by simply moving to the data in front of it, hiting return and then tab. Going to the next data and hitting return and now it will break to the indent you set in the last level. Otherwise, it’s going to require a scripting or macro of some time. I’m not that versed, so this is my non-script answer for you. :-)

        1 Reply Last reply Reply Quote 0
        • Lhuillier SébastienL Offline
          Lhuillier Sébastien @Lhuillier Sébastien
          last edited by

          @Lhuillier-Sébastien @Lycan-Thrope
          Hi

          I have another idea from a friend

          https://www.sebastien-lhuillier.com/index.php/informatique/prog-112/scripts-en-vrac/922-comment-reformater-avec-notepad-des-pages-html-dont-les-tag-contiennent-des-propriete-data

          I have tested and It works

          1 Reply Last reply Reply Quote 2

          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