Community
    • Login

    How to add .bas and .frm to Notepad++?

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    2 Posts 2 Posters 1.1k 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.
    • OvalPistonO
      OvalPiston
      last edited by

      When I open a .bas or .frm file (vb6), only where the text is, there is a black background, yet under Style Configurator, the VB / VBS have white set as the background color. It is ONLY where text is. I tried adding “bas frm” to the “User ext. :” field for C++, then for PowerShell, but neither had any effect.

      PeterJonesP 1 Reply Last reply Reply Quote 0
      • PeterJonesP
        PeterJones @OvalPiston
        last edited by

        @OvalPiston ,

        By default, .bas is associated with the Language > F > Freenbasic. If you look in Style Configurator, it should have FreeBASIC between Fortran and GDScript:

        3627a079-9929-4e39-8dd2-e3ecf6230d19-image.png

        If you don’t have that entry, then your stylers.xml (or whatever theme you’ve picked) is out of date, and doesn’t have that language; that might explain why the background is not matching (because nothing is defined). If you wanted to use FreeBASIC for .bas files, you could open C:\Program Files\Notepad++\stylers.model.xml, and then copy the FreeBASIC section into your active stylers.xml (usually in %AppData%\Notepad++\stylers.xml) or into your theme XML of choice. Restart Notepad++, and FreeBASIC should now be in your Style Configurator. (But you only need to bother with these steps if you want to use FreeBASIC syntax highlighting. If you want to treat .bas and .frm as Visual Basic, then see the next paragraph.) Alternately, maybe you’ll see FreeBASIC listed, but it will show background colors that aren’t as you expect – in which case, you could change the colors there, if you wanted.

        But you said you want .bas to apply to Visual Basic; to do that, you would change the VB / VBS language’s User ext.: settings. If you have it set to bas frm, like in my screenshot below, then .bas and .frm files will default to using the VB/VBS color settings.

        caad295f-726a-48c8-a69e-7bac29b5cd1e-image.png

        If you already have a .bas file open, it won’t immediately take effect (because Notepad++ decides on filetype when the file is first opened, so it will have loaded that file with .bas associated with FreeBASIC). Thus, if you close the file then immediately open it again (Ctrl+W, Ctrl+Shift+T), or open a new .bas that isn’t already open, Notepad++ will know to treat it as Visual Basic code rather than FreeBASIC code. And every one you open from now on will also follow Visual Basic syntax highlighting.

        ce96eed3-8d75-4bc5-b765-67f3650b3f7c-image.png

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