Menu

Adding comments to .BAT files

2007-02-20
2012-11-13
  • Nobody/Anonymous

    I'm trying to add REM or :: to selected lines
    in a .BAT file using Ctrl+Q or Ctrl+Shift+Q.
    It does not work for me (N++ 4.0.2).

    All batch language tokens are recognized and
    colored fine.

    Can anybody help? Where is this defined? Does
    N++ support only comment tokens of a single character?

    Keyboard Freak

     
    • steakhacher

      steakhacher - 2007-02-20

      To solve this problem:
      Open file C:\Program Files\Notepad++\langs.xmlC:\Program Files\Notepad++\langs.xml
      Replace         <Language name="batch" ext="bat cmd nt">
      by              <Language name="batch" ext="bat cmd nt" commentLine="REM">

      And it is good

       
      • Nobody/Anonymous

        Brilliant, thanks! In fact, I found another post of
        yours on the same subject from about a week ago that I missed.

        By the way, I use "::" rather than "REM" because it's much
        more efficient.