• Login
Community
  • Login

CLI Parameter "-l" does not work with user defined languages

Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
command lineudluserlang
3 Posts 2 Posters 1.4k 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.
  • T
    TMuel1123
    last edited by Mar 21, 2018, 9:59 AM

    Hi,

    I use Notepad++ in version 7.5.6

    I have prepared a user defined language to highlight target files for CNC-Machines which use a certain CNC.
    <UserLang name="G-Code" ext="DIN din NC nc CNC cnc BEV bev MHT mht target.txt" udlVersion="2.1">
    The name of the user language is “G-Code”.

    If I use the CLI in the following way
    Notepad++ -lG-Code myTextfile.txt

    I also have also tried to rename the language to “GCode” and use the following command line:
    Notepad++ -lGCode myTextfile.txt

    in both cases the code highlight of my user defined language is not selected.
    If I open a file with one of the defined file extensions it works properly and selects the correct user defined language.

    Have I done something wrong or is it just not implemented for user defined languages?

    Thanks in advance
    TMuel

    1 Reply Last reply Reply Quote 0
    • J
      Jim Dailey
      last edited by Mar 21, 2018, 3:32 PM

      @TMuel1123 in your ext definition I see target.txt, but I do not see txt. Maybe that’s your problem…

      1 Reply Last reply Reply Quote 0
      • T
        TMuel1123
        last edited by Mar 21, 2018, 6:56 PM

        Hi Jim,

        I assumed the -l parameter as an override function for the detection of the language by the files extension. because if i try -lbash then it highlites it with the Bash code highlitning.

        If I use a *.din file it ofcause works, but then it uses the detection for the language of the file extension and i could omit the -l parameter.

        it is my intention to have the target.txt in my definition, because i dont want to have the highlight for all text files, but i ofetn open files which have the name target.txt, which i always want to have highlighted.

        Best regards
        TMuel

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