开发者

Notepad++ tab color

开发者 https://www.devze.com 2023-02-15 12:42 出处:网络
Is there a way to change the color of a开发者_StackOverflow tab (in the tab bar) according to the path of the file?

Is there a way to change the color of a开发者_StackOverflow tab (in the tab bar) according to the path of the file? I tried with the PythonScript plugin, but couldn't find a method to change the color of a tab.

I need this because I edit scripts from two environments at the same time, from a LIVE environment, and from a development environment, and I need to be extra careful when editing a LIVE file.


I was looking for a programmatic way to change the color of the tabs, and reviewed the online documentation of Notepad++ but did not find anything about it. So, instead, I propose the following method for your case, it could be helpful to always know which of your files are from the development environment and which from the live environment:

  1. Open a blank instance of Notepad++:

    Notepad++ tab color

  2. Now start a macro recording: Press Start Recording button on Notepad++ toolbar:

    Notepad++ tab color

  3. Open a new document

    Notepad++ tab color

  4. Now you'll have two open blank tabs.

    Notepad++ tab color


    Right click newly open tab and click in option Move to other view from contextual menu

    Notepad++ tab color

  5. You'll have a window splitted vertically and your two tabs will be displayed next to each other. You'll use these two tabs as separated "containers" for your files

    Notepad++ tab color

  6. Press Stop Recording button:

    Notepad++ tab color

  7. Save your just recorded macro:

    Notepad++ tab color


    assign a keyboard shortcut:

    Notepad++ tab color

  8. Now you can run that recorded macro (from Macro menu, or invoking keyboard shortcut you assigned), every time you want to work on your two environments.

    Notepad++ tab color

  9. (Optional) Right click vertical separator between "containers" and click Rotate to right

    Notepad++ tab color


    Now your "containers" will be split horizontally and will be displayed one above the other. Personally, I'd recommend you this layout.

    Notepad++ tab color

  10. Click on the tab at first "container" and from there, open all your "dev" environment files; and analogously open all your "live" environment files from second "container". Note that currently selected container has a more intensely coloured active tab.

    Notepad++ tab color

  11. If you notice that your working space is small, drag the separator to increase your current "container" size, but I recommend you not to take it completely towards the end, because it will make difficult to differentiate which of the two "containers" you are working on.

    Notepad++ tab color

Note: If you, mistakenly opened a file of an environment from the wrong "container" you'll always be able to fix that by dragging the tab and dropping it to the other "container":

Notepad++ tab color

So you'll always keep control of what files must be on each container.

Notepad++ tab color

That's it. I hope this info will be helpful for you.


About changing the color of the tab (not folder specific).

Notepad++ has a file called stylers.xml, located in the roaming folder or in the program folder. It also depends in the installation & windows version. If it does not exists then it is self generated.

At the very end of the file, it says

  <WidgetStyle name="Inactive tabs" styleID="0" fgColor="xxxxx" bgColor="xxxxxx" />

And here it is possible to change the color of the inactive tab. However, it does not work, it is a bug that has been "fixed" countless of times in the past. To the date, the current version 6.2.3 UNICODE, changing the values does nothing.

So far, editing the stylers.xml:

6.2.3 = does nothing

Notepad++ tab color

design guideline, gray + gray = not good.

6.2.0 = does nothing

6.1.8 = works.

Notepad++ tab color

Nice contrast

6.1 = works.

5.9.8 = works.

5.7 = edit works.

ps: sadly,it is not possible to change the fonts of the tabs.


Wanted to add this as a comment, the button's not there. You can solve your actual problem by using multiple instances of notepad++, refer this. You can save different sessions and optionally use the "Open File In Solution (OFIS)" plug-in.


I've if you've picked a different Style like 'Black Board', then you will have to change these setting in it's .XML in '/themes', and these setting are found at the bottom of the file.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号