How to specify user defined language on the command line
-
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 -
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 oflmarkdown
!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
-
@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. -
This is what I suspected. Time to find another solution.
Thanks again
mario