You are here: PSPad forum > English discussion forum > PowerShell here-string recognition
Posted by: clanman | Date: 2025-05-28 11:43 | IP: IP Logged
In PowerShell there is such a thing as a here-string (see half way down learn.microsoft.com) for hear-string information.
what I am trying to do is tell PSPad @' and @" are the beginning of a here-string and an accompanying '@ or "@ characters. Everything within the matching characters should be treated as a string.
Posted by: pspad | Date: 2025-05-28 12:17 | IP: IP Logged
PowerShell highlighter is hard coded. It must be modified to be able work with this kind of strings.
Can you send me some code examples into support mail?
Posted by: pspad | Date: 2025-07-10 10:27 | IP: IP Logged
Hello
PWS here-string support was added. Will be available in the next build.
Posted by: pspad | Date: 2025-07-11 07:41 | IP: IP Logged
New build in developer forum has been already released
Posted by: hajexav908 | Date: 2025-08-09 08:54 | IP: IP Logged
To configure PSPad to recognize PowerShell here-strings (@' ... '@ and @" ... "@) as strings, you’ll want to define these delimiters properly in its syntax highlighting settings. PSPad allows you to customize syntax highlighting by specifying string delimiters.
Here’s what you need to do:
Open PSPad.
Go to Settings > Configure User Defined Languages.
Select the PowerShell language or create a new user-defined language for PowerShell.
Find the Strings or Quotes section.
Add the following pairs as string delimiters:
Start: @' End: '@
Start: @" End: "@
This tells PSPad that everything between those start and end markers should be treated as a string, just like regular single or double-quoted strings.
Note:
Make sure to include the @ symbol as part of the delimiter to match PowerShell here-string syntax exactly.
If PSPad does not support multi-character delimiters directly, you might need to adjust or check if your version supports it or if you can define a keyword-based rule.
If you want me to, I can help create a sample snippet or a User Defined Language XML for PSPad to handle here-strings properly. Would you like that?
Posted by: pspad | Date: 2025-08-09 10:54 | IP: IP Logged
Hello
Maybe you mistook editor. PSPad doesnt use xml language definition.
Multiline syntax is already supported in the last build for PowerShell
Editor PSPad - freeware editor, © 2001 - 2025 Jan Fiala, Hosted by Webhosting TOJEONO.CZ, design by WebDesign PAY & SOFT, code Petr Dvořák, Privacy policy and GDPR