0

How can I set the background color of the editor for a specific language in notepad++?

I know there are similar question on superuser but they don't solve the following problem I have:

If I change all the background colors in let's say the Python color settings, it only changes the background color where text/code is, but the rest of the editor still uses the default background color.

How can I change the background so that, for example in an opened .py file, all of the editor background has the same color and in another language it has another color?

1

As the above commenter said, normally it is not possible.

BUT

if you really

really really really want this

then you can achieve this by a workaround:

  1. At Notepad++ Download page, choose download called Notepad++ zip package

  2. Extract the archive multiple times, e.g. into
    C:\Tools\Notepad++\Python\ C:\Tools\Notepad++\XML\ C:\Tools\Notepad++\SQL\

  3. Configure file associations of desired file types to open in desired instances of Notepad++. E.g. let .py files open with C:\Tools\Notepad++\Python\notepad++.exe and .xml files open with C:\Tools\Notepad++\XML\notepad++.exe. So double-clicking a .py file will open different Notepad++ than double-clicking of .xml file.

  4. Now, each of your Notepad++ instances can have its own background settings, indentation settings and any normally-impossible-per-file-type settings you want.


UPDATE: in your profile, you say you are hobby programmer. So if you wish, you can write your plugin for Notepad++ – it can be possibly done in less than 10 minutes.

  • I was hoping for a solution to use different backgrounds in different tabs of the same application instance, rather than having to open a new instance for each file type. Maybe a future version of notepad++ will support individual background color for each file type. – uzumaki May 31 '16 at 0:05
  • @uzumaki – Ineed, my answer was for case if you really need it. If it is only a "nice to have" feature you request with all the comfort, then as I wrote at the beginning, there is no way. Of course, you can always add the feature into Notepad++ by yourself. Or fill a feature request. Again, in case if you would really need this, isn't that small compromise with comfort in order to achieve color backgrounds acceptable? – miroxlav May 31 '16 at 10:43
  • @uzumaki – you was hoping for something different, but you did not indicate that constraint it in the question. So now, if you have answer fully-covering all viewpoints (1-not possible; 2-alternative way; 3-what will surely work) maybe it could be fair to accept it, don't you think? – miroxlav Jul 6 '16 at 8:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.