Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Notepad++ tab color

Is there a way to change the color of a 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.

like image 908
DonkeyMaster Avatar asked Mar 07 '11 15:03

DonkeyMaster


People also ask

Does Notepad support color?

To aid in text editing, Notepad++ (as a text editor) offers features that will color text based on syntax (the programming-language syntax-highlighter lexers) or based on temporary information like “right click > style”.

How do I view tabs in notepad?

Go to Settings > Preferences... > General and under the Document List Panel heading, select the Show checkbox. A vertical list of all open tabs opens on the left.

How do I change the header color in Notepad++?

OK, Go in Menu Settings->Style Configurator-> than in "Langugage" List select Global Styles. After in Style list select "Selected text colour" and after you will get screen as shown on screenshot. On right side of window you will be able tyo change colour of selected text.


1 Answers

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++:
    blank

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

  3. Open a new document
    new

  4. Now you'll have two open blank tabs.
    2 blank tabs
    Right click newly open tab and click in option Move to other view from contextual menu
    move to other view

  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
    2 containers

  6. Press Stop Recording button:
    stop

  7. Save your just recorded macro:
    save
    assign a keyboard shortcut:
    keyboard shortcut

  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.
    run macro

  9. (Optional) Right click vertical separator between "containers" and click Rotate to right
    rotate to right
    Now your "containers" will be split horizontally and will be displayed one above the other. Personally, I'd recommend you this layout.
    horizontal layout

  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.
    distributing environments

  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.
    expand live

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":
fixing mistake

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

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

like image 88
Francisco Alvarado Avatar answered Dec 16 '22 07:12

Francisco Alvarado