This is probably a question for another forum than Serverfault, but simply put:
.cfg is not a single well-defined file format, though you can usually assume it's a plaintext configuration file with human-readable contents.
From your question I assume it's a file for a Windows-based software. In that case Notepad is the easiest built-in way not to introduce problems. Just remember the following:
Notepad by default adds a .txt extension to file names. You need to Save as...
and switch the Save as type
field to All files (*.*)
in the save dialog before storing the file with a .cfg
suffix.
Windows by default hides file suffixes, so unless you take the previous step, files will look as though they have a .cfg
suffix in the File Explorer/Computer view, but will in fact have a hidden .txt
suffix and not be read by the software.
I suspect these two points explain why you couldn't get a (presumably correctly formatted) config file to work with your program.
Once you've outgrown Notepad, there's a bunch of editors to choose from:
- Notepad++ (as mentioned by @Norbert Weuster) is a nice pretty lightweight tool.
- Many programmers like to use the Sublime text editor, which can be used in a free mode but becomes a lot more powerful if you pay for it.
- If you can live with Electron apps (as opposed to native ones), Visual Studio Code is a pretty decent-looking "free" text editor.