Improve display of whitespace on notepad++

Solution 1:

Based on this discussion I found there are two ways to increase the whitespace character size by sending commands to Scintilla which is the underlying editor component that Notepad++ is using. In the example below I have set the size to 3 which has increased the size of the dot rendered from 1 x 1 pixels to 3 x 3 pixels:

Before:

enter image description here

After:

enter image description here

Note that there seems to be a bug because the character is not centered, so you may have to experiment with the value based on what font size you are using.


Method A using Python

  1. Install the Python scripting add on for Notepad++ from SourceForge (the version from the Notepad++ add-on manager doesn't currently work)

  2. Run a new instance of normal Notepad as an administrator

  3. Use it to open the following path:

    [Notepad++ main install directory]\plugins\PythonScript\scripts\startup.py

  4. Append the following at the bottom:

     editor.setWhitespaceSize(3)
    
  5. Save the file.

  6. Open Notepad++

  7. Choose Plugins -> Python Script -> Configuration

  8. Ensure Initialisation is set to ATSTARTUP and save

  9. Restart Notepad++ and spaces should now show as much larger dots automatically


Method B using macros

It is also possible to do it purely with macros and no extra plugins. You could edit the shortcuts.xml file in %AppData%\Notepad++ using notepad and add the following before the closing </Macros> tag:

<Macro name="Increase Whitespace Size" Ctrl="yes" Alt="yes" Shift="no" Key="100">
   <Action type="0" message="2086" wParam="3" lParam="0" sParam="" />
</Macro>

This will give you a new macro called Increase Whitespace Size which will do the same thing as the Python script. It will show up under the Macro menu and can be given a shortcut using the Shortcut Mapper.

Solution 2:

The OP explicitly said they can change the color, but color wasn't enough.

For me, color would be enough to achieve OP's goal of

Improve display of whitespace on notepad++

To change color, as it says here:

The colour for both can be set from the Styler Configurator, Global styles, White space symbol.

Specifically, in Notepad ++ v6.8.1

  1. Settings (Ctrl+t)
  2. Style Configurator
  3. Set "Language" to "Global Styles"
  4. Set "Style" to "White space symbol"
  5. Change Foreground Color, verify sufficient visibility / contrast
  6. Choose Save & Close

Before Before changing whitespace foreground color for visibility / contrast - barely visible After After changing whitespace foreground color for visibility / contrast - very distinct