0

I have found the question answered about file-type/extension here: How do I get Notepad++ to associate a file type with a language?

There is a description about using the Style Configuration to associate a user extension with a language. That has worked great for me in other situations. However, this is different....

We have literally thousands of schemas applied to this database, all with different filenames. The standard for filenames is:

<OWNER>SCHEMA.<NUMBER>.TXT (for example, ADMSCHEMA.414.TXT). It would be great to associate these with SQL, but I do not want every txt file that is opened to be assumed SQL language. If the world were perfect, I would have any file that includes *SCHEMA*TXT to be assumed of the SQL language.

Anyone know if that can be done?

YeeP
  • 1

1 Answers1

0

If you are allowed to change the extensions of these files, then you could create your own file extension and associate it with Notepad++. Changing file name extension is not changing the data in those files.

  1. Change ADMSCHEMA.414.TXT to ADMSCHEMA.414.TXT.MVCE.
  2. Associate MVCE with Notepad++.
  3. Start Notepad++ and go to Style Configurator.
  4. Select SQL and type in MVCE in the "User ext" box.
  5. Click Save & Close. Done!

If you do this, I suggest you keep the "TXT" so you have .TXT.MVCE instead of replacing it as in .MVCE. This helps you identify the original file name extension and file type. It's a good practice. It's the same idea as in .tar.gz archive files.

Samir
  • 21,235