You are here: PSPad forum > English discussion forum > Re: how to insert a literal Tab if needed sometimes?
Posted by: ryleybob | Date: 2025-09-23 08:44 | IP: IP Logged
Hi
I have configured PSPad to insert spaces in the text when I enter tab. That is the way I need it 99.9% of the time.
However, there are exceptions when I want to insert a tab character to the text. Is that possible without changing temporarily the PSPad configuration and changing it back afterward?
It looks like I can't even insert a tab character from the clipboard, it's also converted to spaces.
Posted by: pspad | Date: 2025-09-23 08:50 | IP: IP Logged
Hello
I will check it out and find any solution.
Posted by: pspad | Date: 2025-09-24 07:58 | IP: IP Logged
Hello
Here is solution using PSPad scripting.
In program settings / System ensure that PSpad scripting is enabled
Go to folder with PSPad installation, find subfolders .\Script\VBScript
Create new file, e.g. RealTab.vbs and paste following content into it:
Quote:' it will insert reat tab on the cursot position
const module_name = "Real TAB"
const module_ver = "1.1"Sub RealTab
If (editorsCount = 0) Then
Exit Sub
End If
Set editor = newEditor()
editor.assignActiveEditor
editor.SelText Chr(9)
end sub' name "Init" is required, its called automatically during initialization to create menu items
sub Init
addMenuItem "Real TAB","", "RealTab", ""
end sub
After PSpad start the new item "Real TAB" appears in the Sript menu.
If you want to add shortcut, modify RealTab.vbs and add shortcut to line as last parameter, e.g.
addMenuItem "Real TAB","", "RealTab", "Shit+Ctrl+R"
Posted by: vbr | Date: 2025-09-24 21:13 | IP: IP Logged
Hello,
a quick and dirty way I use in similar (rare) cases is a regular expression replacement of some (temporarily inserted), selected, text with the literal:
\t
Another way is to use the Tools panel - ASCII Table (Alt+A),
double click the leftmost item in the 9th row:
9 09 TAB &tab
(I had expected, the keyboard shortcut Alt+009 would work in PSPad too, but apparently, it doesn't; maybe there are some overrides for this character (?).)
hth,
vbr
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