@Taras-Tkachenko said in The program forgets settings. Inconvenient view defaults:
It seems that the program forgets at least this setting after the computer is restarted and maybe when it goes into sleep mode.
It should not do that.
That sounds like either you are using multi-instance mode, and you are changing the setting in one of the instances that doesn’t have the “lock” on writing to the config files (only the first copy opened in multi-instance mode is allowed to write the settings to disk); or you have the wrong write-permissions in the folder storing the config.xml (usually %AppData%\Notepad++\config.xml, but it depends on your setup)
But I can be more specific if you share your ?-menu’s Debug Info – that will answer some or all of the questions, after which I or others will be able to ask more direct questions.
Also this late version I’m using does not automatically show all files in the working folder.
There is no version for which that statement is true, in my experience: Notepad++ lists all the files in the working folder when using File > Open, unless you apply a filter. If Windows is hiding files (protected files, or similar), then the same would be true in Windows Explorer, and you can use Windows Explorer settings to change what’s shown in N++ File > Open dialogs, as well.
Now it defaults to TXT every time, every new complete start of the program or every once in a while - possibly another part of its memory that gets reset.
No such thing happens for me. File > Open never has a filter : even when my active file is a Perl script (blah.pl), File > Open properly defaults to showing all types
c3c07b0a-2357-440c-8bd7-1db1ba065e4a-image.png
I create a new file, go to Save As and see an empty folder that is actually full of D files because the new file is TXT by default
Ahh… Save As is different than Open dialogs. IF you have applied a file type to the new file (manually using the Language menu to set the type before you do Save As), then it will default to filtering for that active type, like:
2b342e19-71f0-4d24-a7ca-a7ad3660d511-image.png
However, you are correct, if you have a new # file that hasn’t had a language attached, it will assume a text file (*.txt*) as the filter. You can then click on the Filter’s drop-down and choose D programming language (*.d) if that’s what you want to filter by.
If you want the default language for new files (ie, when you use File > New or equivalent) touse the D language by default, then you can change Settings > Preferences > New Document > Default language using the dropdown:
1e2ba9c3-456e-49bb-ba8f-2f317628756a-image.png
After doing that, when you hit New, the file will start out being of type D programming language and the File > SaveAs filter will default to the D filter, rather than the txt filter.
(If you have a few different “default” languages, depending on what you’re working on that’s ot as practical; if you are in a situation like that – like maybe you want to create new D files and new python .py files with about equal probability – then you can look here for a post where I describe how to create a macro that makes a new file, and changes the language on that new file; and if you wanted, here shows an expanded macro that also immediately runs Save As on your brand-new document after it creates it and sets the language; with either of those styles of macro, you could create two of those macros (one for D, one for PY) with different keyboard shortcuts, and use those shortcuts to create the files instead of using the File > New.
That said, the Filter is easily ignorable in the Save As dialog. If you want to save new 1 as abc123.d, you can type that, and it will use that name, no matter what the filter is currently set to, and it will save it to that name (and pick the right Language as a result). I rarely (almost never? maybe once in decades of use) want to create a new file and then overwrite an existing name, so I guess not seeing all the files doesn’t bother me, or I’m willing to click in the Filter box and pick “All Types”, which is immediately above “Normal text file”, if I really must see all the existing filenames this time.