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
-lparameter, 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.loglaunch 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
-nosessionparameter, 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
-lparameter for user defined languages. -
This is what I suspected. Time to find another solution.
Thanks again
mario
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login