Community
    • Login

    PICK BASIC STYLE PLUGIN?

    Scheduled Pinned Locked Moved Notepad++ & Plugin Development
    2 Posts 2 Posters 3.7k 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.
    • ajtorre27A
      ajtorre27
      last edited by

      Hello,

      I am a programmer / developer that has been working in the PICK platform for 30 years. I love Notepad++, it is a fantastic editor.

      But I don’t seem to see a plugin for BASIC.

      Now I understand that BASIC is an old and archaic programming language, but, It’s still in use. I also understand that BASIC programs, by design, don’t have a qualifying file extension.

      Is there a plugin that I could substitute or perhaps I could create one myself that could be used for the styling of the basic language?

      Thanks and best regards,

      Anthony J. Torre

      1 Reply Last reply Reply Quote 0
      • William NewberyW
        William Newbery
        last edited by

        You could look to see if anyone wrote a BASIC “lexer” for Scintilla (the editor control Notepad++ uses). There is a Visual Basic one already in Notepad++ but guess there is enough differences for that to not really work (sorry, never used BASIC or VB or VB.net)? I also found one in the current source for “blitzbasic”, “purebasic” and “freebasic”, but does not appear to be active in Notepad++.

        https://github.com/notepad-plus-plus/notepad-plus-plus/blob/master/scintilla/lexers/LexBasic.cxx

        To just color “keywords” (e.g. “if”, “else”, “return”, etc.) you have the built in “User defined language” feature (Language -> define Your language…).

        If there are language features you want more complex than what that can handle (context sensitive keywords, string interpolation, etc.) you can write your own lexer DLL. I have been prototyping some stuff at https://github.com/wnewbery/npp-languages which creates a plugin DLL for Notepad++ to load extra languages/styles from. Still deciding how want to deal with code folding, etc., but you have the default ones as complete examples of the lexer part.

        The file extension thing would mean you must manually select the language each time. Although personally a more plugable way would be great as a feature, BASIC is not alone for that (e.g. things like makefile, Gemfile, or Linux scripts using a shebang)

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