Notepad++ Force every file format to selected one when opening any file type

3

I would like to format every opened file in Notepad++ (all files regardless of their extension) to eg. batch or VBS format. Is there a way to achieve that? I've found a setting for formatting new documents, but I want to format opened text files as structured language document.

The reason for that, is that I like visual highlighting data eg. in VBS format when I'm opening my text files, that often includes php code, numeric data etc. and that would help me a lot.

integratorIT

Posted 2015-08-06T06:52:24.077

Reputation: 727

You should [edit] your question and clarify exactly what you want. Do you want to have all files regardless of their extension to have "batch" syntax highlights? The format of an opened already existing file depends on its extension. You cannot change the behaviour of the built in extensions listed in the "Settings" -> "Style Configurator" dialog. – DavidPostill – 2015-08-06T10:52:16.790

yes, exacly this is what i would like to achieve. – integratorIT – 2015-08-06T11:44:53.100

is there a way to force notepad++ to treat .txt files as eg. VBS ? – integratorIT – 2015-08-06T11:46:17.123

Please remember to include @user (example @DavidPostill) in your comment if you want to notify a particular user. Otherwise they may not see your comment. I had to come looking for this update. :( – DavidPostill – 2015-08-06T13:33:01.010

Answers

2

Is there a way to force notepad++ to treat .txt files as VBS?

Use the "Style Configurator" dialog:

  1. Go to "Settings" > "Style Configurator"
  2. Select "Language" > "VB / VBS"
  3. Add "txt" to "User ext:."
  4. Click "Save & Close"

    enter image description here

DavidPostill

Posted 2015-08-06T06:52:24.077

Reputation: 118 938

and how to format every oponed file as vbs...? – integratorIT – 2015-09-28T13:41:17.543

@infografik For each opened file, menu "Language" > "VB" – DavidPostill – 2015-09-28T13:43:21.780

0

You could simply click on 'Language' and choose your prefered highlighting after you've opened any file in notepad++.

Daniel

Posted 2015-08-06T06:52:24.077

Reputation: 49