Hello, I'm looking for a way for newly created files to be auto-saved with a predefined extension. In my case, it is ".cfg".
When I open a new blank tab and then "Save As", I want my file to be saved with a specific extension type, if I write it out in the textbox. As an example, I could write out "Test-File-001.json" and the file would be named like this. If I DON'T specify an extension type I want the file extension to automatically be ".cfg". In this second use-case, I would simply write out "Test-File-001" (without an extension type) and CudaText would save my file as "Test-File-001.cfg".
There was a way to do it with Notepad++ but I can't remember if it was an option in Notepad++ itself or if it was a Plugin that allowed users to do it.
I've looked in the config and I've looked for Plugins but I haven't found anything.
Does anyone know if this is something that can be done in CudaText?
Thanks!
Option to Auto-Append Extension Type to a File for "Save As"
-
- Posts: 3
- Joined: 24.09.2025 22:32
-
- Posts: 2644
- Joined: 25.08.2021 18:15
Re: Option to Auto-Append Extension Type to a File for "Save As"
I experimented with an empty lexer with only file-extension 'cfg' set in it.
create file Cfg.lcf in the folder data/lexlib:
then set the option in user.json:
now if I save new doc as 'new' it saves file 'new.cfg'.
create file Cfg.lcf in the folder data/lexlib:
Code: Select all
object SyntAnal21: TLibSyntAnalyzer
Extentions = 'cfg'
LexerName = 'Cfg'
end
Code: Select all
"newdoc_lexer": "Cfg",
-
- Posts: 3
- Joined: 24.09.2025 22:32
Re: Option to Auto-Append Extension Type to a File for "Save As"
Well hot dang! That worked on the first try! CudaText = Very Cool ➔ ✔Check
-
- Posts: 2644
- Joined: 25.08.2021 18:15
Re: Option to Auto-Append Extension Type to a File for "Save As"
Thank you, now let's advertise the editor on blogs/forums. 

-
- Posts: 3
- Joined: 24.09.2025 22:32
Re: Option to Auto-Append Extension Type to a File for "Save As"
Oh! I forgot to say: Thank you!
And:
for advertising.
And:
-
- Posts: 2644
- Joined: 25.08.2021 18:15
Re: Option to Auto-Append Extension Type to a File for "Save As"
I mean, if you can help to spread the word, ie advertise the program, it will be good.