Community
    • Login

    User defined language: Restrict line length

    Scheduled Pinned Locked Moved General Discussion
    2 Posts 2 Posters 319 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.
    • Frank HelkF
      Frank Helk
      last edited by

      Maybe that’s a wish from the good old times, but …

      I’m working with some scientific software that needs its input files as plaintext files - a classic case for np++. I’ve taken a look at defining a user defined language for the input file syntax, but ran into a nasty thing:

      That software has its origins in the ninteen-fifties, when FORTRAN was the real hot stuff (and a real relief from coding in machine code …). Therefore the input line length is restricted to 80 characters (the maximum capacity of a common punch card at that time :). Since transgressing that limit is a common mistake in these input files, which usually causes cryptic error messages (never ever reading “line loo long” …), I’d like to include that restriction into the language definition.

      I can’t find an option for that … any hint ?

      If there no option for that now, I herewith declare that as a feature wish !

      Greetings

      Alan KilbornA 1 Reply Last reply Reply Quote 0
      • Alan KilbornA
        Alan Kilborn @Frank Helk
        last edited by Alan Kilborn

        @Frank-Helk

        While you can’t restrict line-length, you can set something up to get a visual indication for problem lines; an example setup:

        43a97056-b81c-4011-975c-c1cd8083b954-image.png

        Produces a look like this:

        8830f27d-bf23-411f-9481-8c9db3c10d5a-image.png

        which clearly identifies long lines in cyan color. The color can of course be changed to whatever you like.

        If you’d like something that will explicitly inform you of long lines, I can assist you in writing a script to do so. Post back if you’d like to try this approach. Here’s an existing script that might help: https://community.notepad-plus-plus.org/post/35567

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