Community
    • Login

    [RESOLVED] How can I personnalize the auto indent function

    Scheduled Pinned Locked Moved Notepad++ & Plugin Development
    3 Posts 2 Posters 354 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.
    • Lhuillier SébastienL
      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
        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
          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
          • First post
            Last post
          The Community of users of the Notepad++ text editor.
          Powered by NodeBB | Contributors