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:
After:
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
-
Install the Python scripting add on for Notepad++ from SourceForge (the version from the Notepad++ add-on manager doesn't currently work)
-
Run a new instance of normal Notepad as an administrator
-
Use it to open the following path:
[Notepad++ main install directory]\plugins\PythonScript\scripts\startup.py
-
Append the following at the bottom:
editor.setWhitespaceSize(3)
-
Save the file.
-
Open Notepad++
-
Choose Plugins -> Python Script -> Configuration
-
Ensure Initialisation is set to ATSTARTUP and save
-
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
- Settings (Ctrl+t)
- Style Configurator
- Set "Language" to "Global Styles"
- Set "Style" to "White space symbol"
- Change Foreground Color, verify sufficient visibility / contrast
- Choose Save & Close
Before After