Community
    • Login

    Auto add list dashes

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    2 Posts 2 Posters 509 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.
    • The-EpicT
      The-Epic
      last edited by

      Is there a way to have the dash on the next line of a yaml file get auto-added

      for example, currently this happens

      example:
        list:
          - "cool entry"
          # 4 spaces, rest blank
      

      but im wondering if i can make n++ auto add the dash for that next line

      PeterJonesP 1 Reply Last reply Reply Quote 0
      • PeterJonesP
        PeterJones @The-Epic
        last edited by

        @The-Epic ,

        Sorry. That feature doesn’t exist in Notepad++. For language-specific things like that, the developer usually relies on someone creating a plugin that handles language-specific tasks (like the abundance of plugins that add features for XML, HTML, JSON, and the like). But I don’t know of any plugin directed at adding features for YAML.

        If you had one of the scripting plugins (like PythonScript, but there are other scripting plugins also available), you could register a function that watches for keystrokes, and does something like “if the RETURN key is hit, and the current line starts with spaces then -, then make the new line start with the same indentation and -”

        1 Reply Last reply Reply Quote 2
        • First post
          Last post
        The Community of users of the Notepad++ text editor.
        Powered by NodeBB | Contributors