Current Line Highlighting

From Notepad++ Wiki
Jump to: navigation, search
Current Line Highlighting

Notepad++ enables highlighting the line the caret is on, which is called the current line. The caret is the small blinking thing which marks where the next typed character will go. "Cursor" is an alternate word, but better reserved to the sprite that moves with the mouse or similar pointing device.

The highlighting is toggled by the Enable current line Highlight checkbox on the Settings -> Preferences -> Editing -> {{{2}}} tab.

The uniform background color used to mark the current line can be set from Settings -> Styler Configurator -> Global Styles , Current line background. The foreground color remains what it was.

You can request for a background that blends with current background instead of overriding it. Here is a macro you can invoke to do that:

<Macro name=" transCL" Ctrl="yes" Alt="yes" Shift="no" Key="100">
   <Action type="0" message=" 2470" wParam= blend factor lParam="0" sParam=""/>

blend factor is a double quoted integer between 1 and 256. The higher the integer, the more opaque the added background highlighting will be. Use 256 for a totally opaque color, which is the default.

Because macros don't take parameters, you'll need to add as many macros as desired values for the blend factor. One for a value in the 128-160 range and one for 256 should be enough, but you can play at will in order to find the ideal mix for you.