1

If I have a file type open that Notepad++ "knows" about-- that is, the file type appears in the file type dropdown menu in the "Save As..." dialog box-- the file type is maintained after a "Save As..." or a "Save a Copy As..." action.

However, no extension is provided when NP doesn't know about the file type I am working with, and I end up having to manually add the extension every time.

How can this problem be addressed? Is there a way to add a file extension to the file types NP++ "knows" about?

| improve this question | | | | |
1

There is no need

The SaveAs window will default to showing .txt in the file type drop-down, but if a type is given as part of the filename, it will use that instead.

For example, if you create a new file and name it newfile.zzz, open it with Np++ and then choose SaveAs... it will appear as:

File name:          newfile.zzz
Save as type:       Normal text file (*.txt)

However, if you just click the Save button at this point, the file will be saved as just newfile.zzz and not newfile.zzz.txt

If you don't want .txt appearing in the type

In Settings->Preferences->Default Directory tick "Use new style save dialog" and it will default to showing all types (*.*) when you go to save.

Adding a language

If the language exists as one that notepad knows about, but with a unique file extension, then you can add that extension in the style configurator.

Settings->Style Configurator->Language

Select your language and add your extension at the bottom, in the User ext box.

If Notepad++ doesn't know about your language, then you can add one:

Language->Define your language

The minimum amount you need to do is Save As, set your language name, then set the file extension you want.

This may help, but I haven't tested it.

| improve this answer | | | | |
  • I'll add a screenshot or .gif of this in action when I get home, if that will help. – Baldrickk Apr 4 '19 at 15:27
  • This does not work this way for me in v7.5.9. Follow these steps: 1. create a new file (Ctl+N) 2. Save as "foo.zzz" 3. Save as "bar" (hit enter), the file extension is removed. – Rick supports Monica Apr 4 '19 at 21:07
  • Follow up: the solution is your last suggestion-- add a new language. You have to add the user defined language AND associate its file extension. THEN it will all work as wanted. THANKS! – Rick supports Monica Apr 4 '19 at 21:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.