Background color, notepad++ for highlighting purposes - colors

Is there a way in Notepad++ to highlight a snippet of text and change it's background color? I would like it to remain that color within the editor for highlighting purposes. I don't want the color to change the code at all.

You can get the effect you want by right-clicking on the highlighted snippet and selecting "Style token" -> "Using (n)th style".
This will also highlight any other sections of your code which are identical to the one you selected, which may or may not be what you want. However the highlighting will only remain for as long as you have that file open in notepad++. If you close it, you will lose the highlighting.

In Notepad++
First select the line/words to be highlighted
Go to 'Search' Menu
Select 'Mark All'.
There you will find 5 sub-menu as 'using [1..5]th style'.
(using 1st style : cyan colour) .
(2nd : light brown) .
(3rd : yellow) .
(4th : purple) .
(5th : green) .
However the highlighting will only remain for as long as you have that file open in notepad++. If you close it, you will lose the highlighting.

You can also define a language that set the snippet as a keyword and choose style for it.

Related

Find and replace within selection in sublime text 3?

I've read this thread indicating how to find and replace within selection in ST2. Despite reading this thread but still cannot figure out if it's possible to do a simple find and replace within selection in ST3?
Ensure the find and replace panel is closed.
Select the text in which you want to perform the find/replace - i.e. define your selection.
Open the Find/Replace panel - if desired, you can use a keybinding to run the show_panel command by going to preferences -> keybindings, then adding this line to the user keybindings: { "keys": ["ctrl+shift+s"], "command": "show_panel", "args": { "panel": "replace", "in_selection": true } } to ensure that the "in selection" mode is active and skip the next step. (see the forums for more available args.)
Turn on "in selection" mode if it is not already active by clicking on the button in the panel.
Enter your find/replace terms and perform your find/replace
If you want to change the selection you are searching within, you will need to close and re-open the panel.
If the region/selection you are searching within always contains multiple lines, you may want to consider setting the following preference for convenience:
// When auto_find_in_selection is enabled, the "Find in Selection" flag
// will be enabled automatically when multiple lines of text are selected
"auto_find_in_selection": true,
Select the word by pressing CMD+D it selects 1 from whole file and show transparent selection of all related word you can press more times CMD+D for selecting all word then edit it all words take places
You can (using ctrl-h, then toggling the 'in selection' option from the dialog), but it's a bad design IMO. Firstly, if you have an area of text highlighted when you request 'replace', it should assume "replace in selection" automatically. Secondly, as soon as you choose 'replace' it thoughtfully cancels the text selection for you. The whole process ends up involving cumbersome repetition, or an illogical sequence of steps. Visual Studio gets the UI design right; Sublime does not.
Searching and/or replacing within only a selected area in Sublime is indeed possible.
If you have text selected, once you open the Find or Replace panels, you can select the button for Find in Selection (which is turned off by default unless you have the auto_find_in_selection turned on and select multiple lines) to have the operation you carry out only apply to the selected area.
In this example I'm doing the following:
Pressing Alt+F3 to select all instances of the word to, showing how many of them there are
Select the first paragraph and then open the Find and Replace panel with Ctrl+H
Turn on the option to operate within the selection
Replace all instances of the word to with the word FROM
Show that the instances of to outside of the selection are still there untouched.
Select the line/word/code and Press Ctrl+d.
Matched piece of text will be selected and will have cursor after them.
You can edit them together.
Ctrl+h is the shortcut for 'Copy and Replace' in all versions of Sublime.

Background color change of found text in notepad++

when i search a text pattern using "find all in current document" option in Find window, how to set the background of the selected result. Like currently i am searching "I" in the complete file, need the search result background to change when i select a particular line.
attaching a snapshot of same.
Settings > Style Configurator
Under Language find "Search result" (on my notepad++ this is the one at the bottom)
Under style change as wished

In Visual Studio, how can I change/disable the line-highlight color when I double-click on a row in "Find Results"?

Sorry for the complicated title.
Screenshot here:
Basically:
Do a "Find in Files" search in VS.
Double click on one of the results.
The line in the editor window is highlighted with dark blue (in my case).
The highlight does not go away unless I do another "Find in Files" search and click on another result.
The problems:
The highlight is too dark/overpowering.
I can't see other highlights (like selecting text, or even where my cursor is).
I want the highlight to go away while I'm editing the file.
So my questions:
Can I change the color of this highlight to something less powerful? (a nice light gray perhaps) I can't seem to tell which of the color-coding options changes this one.
Can I clear this highlight somehow while editing (without needing to do another search)
Can I disable this highlighting completely?
Thanks!
PS. I'm not interested in the line-highlight color in the "Find Results" window itself - just the highlight that appears in my text-editor window after I double-click on one of the results.
Try changing your color settings.
Tools -> Options -> Fonts and Colors
Select "Show settings for: Find Results Window" and change the "Current List Location" background color.

Netbeans color theming problem

I'm trying to sort out my netbeans color theme and I'm almost there apart from one annoying highlight I can't seem to find anywhere! It only shows it self in HTML and CSS that I have seen so far!
Its the highlighting that happens when you click on an Id or class value for html elements, or elements in css
Have a look at the picture below and see if you can identify the option that defines the highlight below!
It appears to be the Cascading Style Sheet color for Mark Occurrences.
Tools|Options|Fonts & Colors, Select Language: Cascading Style Sheet, Select Category: Mark Occurrences.
It appears to be related to (but not exactly the same as) NetBeans bug 189963, and may be worth noting on that bug that the highlight color suffers the same problem as the base color.
BTW, When I changed the color value for that one and clicked on OK, it did not immediately update the editor window. I had to select something else for it to mark occurrences of, and as soon as I did that I saw the new color.

Change active line color in Dreamweaver

Is there any way to change the active line in Dreamweaver to something? Like yellow such as most text editors support. I've searched the preferences and don't seem to see it. Would make it much easier to see which line I'm currently on.
In Dreamweaver CS4, you can click on the line number to the left of the text and it will highlight the line. As soon as press an up or down arrow key or click on another part of the text, the highlight goes away. I think that's about as close as you're going to get. They probably don't offer a constant highlight because it would interfere with the code coloring.

Resources