0

(related to How can I tell Notepad++ to always use a particular language with a particular file extension )

I want to have Notepad++ to associate wscript files with the Python language. Is there a way to do this? It has no extension.

8
  • There is nothing stopping you giving them an extension. vbs for example. vba and js would also be appropriate.
    – DavidPostill
    Oct 9, 2015 at 16:39
  • No, that is not appropriate. I am using a tool called waf which mandates using a file named wscript with no extension. Please don't assume this is an xy-problem.
    – Jason S
    Oct 9, 2015 at 16:41
  • I didn't suggest it was. Clearly you have missed important information from the question.
    – DavidPostill
    Oct 9, 2015 at 16:42
  • "..." ok... I stated the question exactly as I wanted to.
    – Jason S
    Oct 9, 2015 at 16:43
  • I don't know of any way to do this automatically, but menu > language > python will do want when the wscript file has been opened ...
    – DavidPostill
    Oct 9, 2015 at 16:46

1 Answer 1

1

Create a symlink to the wscript file but give the link the correct extension, e.g.

mklink /H wscript.py wscript

When you edit the wscript.py file you should find that notepad correctly treats it as a Python file.

1
  • +1 for creativity, but I have a bunch of these directories and I don't want to have to do that in each case.
    – Jason S
    Oct 14, 2015 at 16:47

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .