16

When I try to save a file, the default extension is All types (*.*). It basically saves it without an extension, for example, just new 1 instead of new 1.txt.

“Default language” option in Settings → Preferences → New Document is set to “Normal Text”.

I Googled and saw that you can change the default save extension in langs.xml.

I've opened it but as far as I've understood the .txt file extension is already set as a default extension:

<Language name="normal" ext="txt" />

What do I do to make the default extension .txt?

Screenshots:

The “New document” settings menu:

The “New Document” settings menu

Trying to save the file and it wants to save to All types (*.*), not as Normal text:

“Save As” dialog

Larper
  • 175
  • 1
  • 1
  • 7
  • sad this is still broken 4 years later – dangel Dec 04 '19 at 01:40
  • Ignore the answers below. This issue was fixed in version 7.8.7, so there's no reason to revert to the older save dialog. If you're still having this issue, try updating Notepad++. – Pikamander2 Mar 20 '21 at 07:09

7 Answers7

23

New style save dialog has to be set to disabled for file extension suffix to work.

  1. Menu » Settings » Preferences
  2. "Default Directory" tab
  3. Uncheck "Use new style save dialog (without file extension feature)"
iairu
  • 376
  • 2
  • 6
21

Version v7.8.7 of Notepad++ fixed this issue, so try updating Notepad++.


If you need to use an older version of Notepad++ for some reason, you can avoid this issue by switching to the older save dialog prompts (this worked on versions 7.3.2, 7.3.3. and 7.4.2):

Settings->Preferences->Default Directory->uncheck Use new style save dialog…

(Source) Posted by (Claudia Frank)

Hastur
  • 18,764
  • 9
  • 52
  • 95
Ken
  • 226
  • 2
  • 3
  • Note: The issue was fixed in version 7.8.7, so this is no longer necessary. Try updating Notepad++ instead. – Pikamander2 Mar 20 '21 at 07:09
  • Sadly the fix broke something else. Now you can't save with an extension that's not on Notepad++'s "approved list". It will append `.txt` to such extensions... Actually, in the giant dropdown list of "Save as Type" there is an option for `*.*`, but it's pretty hard to find. – Fizz Jan 05 '22 at 15:07
  • Giant thread about the latter issue https://github.com/notepad-plus-plus/notepad-plus-plus/issues/8398 The dev's (bad) conclusion/reasoning was: "Notepad works like this". But Notepad was really only meant for one type of files.. so appending the default extension in multi-language editor like N++... a bad idea. At least they kept https://github.com/notepad-plus-plus/notepad-plus-plus/issues/8616 open, which is about the (un)usability of always manually selecting `*.*` in the ginormous list. – Fizz Jan 05 '22 at 15:14
2

How do I set the default save extension back to the .txt default?

  1. Menu → "Settings" → "Preferences", or Alt+T then Enter

  2. Select "New Document" tab

  3. Set "Default Language" to Normal Text

    enter image description here

  4. Click "Close"

  5. Menu → "File" → "New", or Ctrl+N

  6. Menu → File → "Save As", or Ctrl+Alt+S

    enter image description here

  7. Click "Save"

  8. The file (in the above example) will be saved with the name new 1.txt

    enter image description here

    enter image description here

DavidPostill
  • 153,128
  • 77
  • 353
  • 394
  • Default language is already put to "Normal Text" – Larper Dec 27 '15 at 21:04
  • @Larper When you click `Save` it will save the file (in this case) as `new 1.txt` as per your request. Does this not meet your requirements? If not please [edit your question](http://superuser.com/posts/1018523/edit) and explain why this answer does not work for you. – DavidPostill Dec 27 '15 at 22:23
  • I edited the question. – Larper Dec 28 '15 at 09:31
  • @Larper Your question still does not make sense. I already told you the file gets saved as `new 1.txt`. You **do not have to type** `.txt` yourself. – DavidPostill Dec 28 '15 at 09:34
  • @Larper To make your question clear please add appropriate screen shots to your question, in particular those matching the notepad++ ones I have posted in my answer. – DavidPostill Dec 28 '15 at 09:40
  • @Larper What is your Menu -> Language set to for your problem file? "User defined" if so make sure it is set to "Normal Text". – DavidPostill Dec 28 '15 at 09:43
  • @Larper Have you tried 1/ restarting notepad++? 2/ reinstalling notepad++? – DavidPostill Dec 28 '15 at 09:50
  • @Larper Note that changing default extension does not work for already open files, only for new created files. – DavidPostill Dec 28 '15 at 09:52
  • My point is that **for me** it still doesn't get saved as *new 1.txt*. It gets saved without an extension as *new 1*. I added screenshots but I can only add 2 links in a post because I don't have 10 reputation. Here is the last screenshot, you can see it saves without an extension. http://puu.sh/mbmMY/fc96875e88.png I haven't tried reinstalling. I will try. – Larper Dec 28 '15 at 14:57
  • I have the same issue, see [this screenshot](https://i.imgur.com/2qkef2Y.pngt). Default language is set to "normal text" in Notepad++ settings and `` in `langs.xml`. – user198350 May 17 '17 at 19:39
  • @user598527 Did you close all files and restart notepad++ before testing? Note also that changing default extension does not work for already open files, only for new created files – DavidPostill May 17 '17 at 19:44
  • Yes, countless of times. I've had this issue for months, may have started after a Notepad++ update. All files are saved without an extension by default, as "all types". – user198350 May 17 '17 at 19:55
  • @user598527 Another answer (from the OP) says that a reinstall of notepad++ fixed it for them. – DavidPostill May 17 '17 at 19:56
  • I will try reinstalling as well. I'm currently using the Notepad++ version 7.4, the issue has persisted over several versions. – user198350 May 17 '17 at 20:00
  • 1
    @user598527 I'm running 7.2.2 and have never had the problem (on Windows 7). I'm updating to 7.4 right now. – DavidPostill May 17 '17 at 20:03
  • This answer is valid... when you apply the answer of @ken. This answer uses the 'old' save dialog in which the missing extension problem is not present. – Michel Nov 04 '20 at 09:00
1

Notepad 7.5.6 - mar 19 2018:

You have to choose between two Save File dialog bugs:

"Use new style dialog..." setting checked:
Default file extension is not used.

"Use new style dialog..." setting unchecked:
If you paste in the file name textbox a folder path without trailing "\", then click on Save button to set the folder path, Notepad considers the path last folder is a file name (and asks you to confirm for file replacement).

figolu
  • 111
  • 2
0

Reinstalling Notepad++ fixed the issue.

Larper
  • 175
  • 1
  • 1
  • 7
0

A fix that worked for windows 10: File explorer -> View -> checking the "File name extensions" fixed the issue for me.

Now when i use ctrl+alt+s, it automatically uses the file extension of the file i'm saving the copy of.

amis
  • 1
0

Version v8.1.2 (August 2021) was not saving the new documents as .txt even when the "Default Language" was normal text. To fix it, I found the following solution:

  • Settings → Preferences → New Document -> Change the "Default Language" to another extension like "Java".
  • Click Close.
  • Open the same settings page again and change it back to "None (Normal Text)"
  • Click Close again and it will save the default extension as txt this time