How to add a TPL file to Notepad++ as a PHP file
- Click Settings / Style Configurator
- Select PHP in the left list box
- At the bottom of the list boxes, you'll see User Ext:. Enter tpl into that box
- Click Save & Close
Now Notepad++ will recognise .tpl files as PHP files. When you open the next one, it will contain syntax highlighting.
Add to the end of a line
- Replace (Ctrl + H`)
- Search Mode: Regular expression without `. matches newline`
- Find what:
$
- Replace with:
your content
Notepad++ add to every line - Stack Overflow
Multiline Search and Replace
- Notepad++ replace two lines with other (10) lines in open documents - Stack Overflow
- NppToolBucket | phdesign - A .NET plugin for Notepad++
- NppToolBucket contains the following features:
- Multi-line search and replace dialog.
- Change indentation dialog.
- Generate GUID
- Generate Lorem Ipsum
- Compute MD5 Hash
- Compute SHA1 Hash
- Base 64 encode
- Base 64 decode
- NppToolBucket contains the following features:
Delete Specific lines
A couple of methods.
Replace using Regex
- Replace (Ctrl + H`)
- Search Mode: Regular expression without `. matches newline`
- Find what:
<YourCodeOnEachLine>.*\n
- Replace with: nothing
- Replace All
Notes
- The end of line character should be
\n
if straight from your Linux box, but you might just want to check this as it could be\r\n
<YourCodeOnEachLine>
should be swapped for something on each of the lines you want to delete.- Notepad++ Delete Lines with Find & Replace - Super User
- some useful end of line regex that might still be valid.
Bookmark Line Method
Regex General
- Non-Greedy
- Notepad++ supports non-greedy regular expressions, which are useful for matching the shortest possible string that satisfies the pattern. This can be achieved using the
?
operator after a quantifier. - Notepad++ non-greedy regular expressions - Stack Overflow
- you can specify what you don't want:
a[^c]+c
- Which specifies: match
a
, followed by one or more character that isn'tc
, followed byc
. This will matchabc
andadc
.
- Which specifies: match
- you can specify what you don't want:
- Notepad++ Find and Replace Expert Suggestion - Super User
- Notepad++ supports non-greedy regular expressions, which are useful for matching the shortest possible string that satisfies the pattern. This can be achieved using the
Additional Fonts
- Notepad Plus Plus instructions · tonsky/FiraCode Wiki · GitHub - A Free monospaced font with programming ligatures.
- How to install this font into Notepad++
- Ligatures are not on by default, the DirectWrite option needs to be enabled.
Line Endings
A collection of hints and tips of this topic.
- The default Notepad++ font `Courier New` does not support a lot of Unicode characters such as the CRLF character.
- Notepad++ End of Line: How to Change It and Why - Notepad++ end of line settings: Learn how to change the end of line character in Notepad++. This article includes step-by-step instructions and screenshots.
To View Line Endings in Notepad++:
- Go to View > Show Symbol > Show End of Line
- CR LF for Windows line endings
- LF for Unix-style
- CR for old Mac-style
- This will display actual newline characters:
- These aren’t shown as ↵, but they indicate the same thing.
If you want ↵ to Show where Newlines Occur:
Notepad++ supports showing newlines as CR/LF/CRLF
but does not support showing newlines as ↵
, however you can simulate it:
- Use Find and Replace (Ctrl+H)
- Set Search Mode to Extended
- Find: \r\n or \n
- Replace with: ↵\r\n (this will visually insert ↵ at line breaks)
- Be careful—this alters the file.
A question mark or a box is shown instead of the EOL character?
- I am using the Fira Code here for this example but this will apply to all fonts where this occurs
- The EOL character is shown when using the DejaVu Mono font.
- The question mark character is shown is when the required glyph does not exist in the current font.
- When copying text, the glyph references are copied not the characters, so if a character does not show correctly in one application this does not mean this will be the same in another.
The issue you're encountering is due to the Fira Code font not supporting the ↵
character (Unicode U+21B5: "DOWNWARDS ARROW WITH CORNER LEFTWARDS").
Here's a breakdown of what's going on:
- ✅ DejaVu Mono
- DejaVu Mono is a very complete font that includes a wide range of Unicode symbols, including many technical and typographic ones.
- It supports the ↵ character, so it displays correctly.
- ❌ Fira Code
- Fira Code is a monospaced programming font known for its ligatures (like turning
!=
into a neat symbol), but it has a more limited set of Unicode glyphs compared to DejaVu Mono. - It does not include a glyph for
↵
, so Notepad++ shows a replacement character (typically a question mark or a box), indicating a missing glyph.
- Fira Code is a monospaced programming font known for its ligatures (like turning
Solutions or Workarounds
- Use a different symbol:
- You can try using a visually similar symbol that Fira Code does support (e.g.,
↩
,↓
, or⏎
), though it’s not the same.
- You can try using a visually similar symbol that Fira Code does support (e.g.,
- Use a different font:
- If Unicode coverage is important and you're dealing with many special characters, consider using a font like:
- JetBrains Mono
- Cascadia Code
- DejaVu Mono
- DejaVu Sans
- Segoe UI Symbol
- Arial Unicode MS
- Use a custom build of Fira Code with extended Unicode coverage (more advanced).
- If Unicode coverage is important and you're dealing with many special characters, consider using a font like:
- Use a different editor:
- Switch to a different editor that supports font fallback (like VS Code, Sublime Text, etc.).
To Verify a Character is supported in a font
You can test if Fira Code supports a character by:
- Checking it in a font viewer (like BabelMap or FontDrop).
- Viewing it in a browser with Fira Code explicitly set as the font.
- Set your editor to use the required font, then copy and paste in the character from somewhere it is shown correctly.
Why ↵ works in VS Code but Not in Notepad++
VS Code and Notepad++ handle fonts very differently, particularly when it comes to missing glyphs:
- ✅ VS Code: Font Fallback Support
- VS Code uses Electron/Chromium, which supports font fallback.
- When Fira Code doesn't include a glyph (like ↵), VS Code will automatically fall back to another installed font that does support it (e.g., DejaVu Sans Mono or Segoe UI Symbol).
- So even though Fira Code doesn’t include ↵, VS Code silently substitutes it from another font.
- ❌ Notepad++: No Font Fallback
- Notepad++ uses the Windows GDI or Scintilla rendering engine, which lacks proper font fallback.
- If the selected font (Fira Code) doesn’t include a glyph, Notepad++ simply shows a replacement character (usually a box or question mark), because it won’t switch to another font.
✅ Summary
App | Font Used | ↵ Glyph Supported by Font? | Font Fallback? | Result |
---|---|---|---|---|
VS Code | Fira Code | ❌ | ✅ Yes | ✔️ Displays ↵ |
Notepad++ | Fira Code | ❌ | ❌ No | ❌ Question mark |
Themes
- Notepad++ • Dracula Theme - The most famous dark theme for Notepad++ and an ever-growing selection of apps!