Community
    • Login

    How to specify user defined language on the command line

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    languagescriptudl
    4 Posts 3 Posters 5.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.
    • Mario ValleM
      Mario Valle
      last edited by

      Greetings,
      I’m trying to use NP++ as a quick note taking tool. So I have a script that runs it this way (my UDL is called Markdown):

      @start "PostIt" /B "C:\Program Files (x86)\Notepad++\notepad++.exe" -multiInst -lMarkdown "References.md" "post-it.txt"
      

      Without the -l option the first file is opened as Markdown (correctly) and the second one as text. But I want to force also the second file to open as Markdown. But with the -l option both files are (incorrectly) opened as normal text files.
      What I’m missing? (NP++ 6.9.1 on Windows 7 64bits)
      Thanks for your help!
      mario

      1 Reply Last reply Reply Quote 0
      • guy038G
        guy038
        last edited by guy038

        Hello Mario,

        I haven’t got the Markdown language installed, in my local 6.9.1 N++ configuration, but I suppose that the problem is due to the fact that you wrote -lMarkdown, instead of lmarkdown !

        Indeed, after the -l parameter, you need to write the language’s name is lower case, exclusively !

        For instance, the command line, below, in a DOS window or inside a batch file :

        @start "PostIt" /B "C:\_691\Notepad++.exe" -nosession -lpython Test_1.py Test_2.py change.log
        

        launch Notepad++ and opens the two Python files, as well as the common change.log file, with the Python language :-))

        Note : As I usually have the option Remember current session for next launch, and some tabs opened in N++, I added the -nosession parameter, in the command line above.

        Best Regards,

        guy038

        1 Reply Last reply Reply Quote 0
        • dailD
          dail
          last edited by

          @guy038 is correct that you need lowercase names for built in languages. However it doesn’t look currently possible to use the -l parameter for user defined languages.

          1 Reply Last reply Reply Quote 0
          • Mario ValleM
            Mario Valle
            last edited by

            This is what I suspected. Time to find another solution.
            Thanks again
            mario

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