These shortcuts are based on the syntax highlighter that is currently active.
(Normally determined by the file name extension.) Unfortunately, there is
nothing like a "generic highlighter" that would work for txt files.
But you can always switch to the html (or some other) highlighter, regardless of
the type of file you are currently editing. Use the icon left of the line
numbering icon on the toolbar.
And there are always the scripts. The help file has a few good scripting
examples, and there's the
extensions section (viz http://www.pspad.com/en/pspad-extensions.php ) with
a wealth of knowledge.

In VBScript, I would try the following (untested):

const module_name = "makebold"

Sub Main
  Dim myeditor, tmp
  Set myeditor = NewEditor
  myeditor.assignActiveEditor
  tmp = myeditor.selText()
  myeditor.selText("<b>"&tmp&"</b>")
End Sub

Sub Init
  addMenuItem "Bold", "Format", "Main", "Ctrl+b"
End Sub


P.S. I'm AFK till next Monday.
P.P.S. The code highlighting in this forum sucks.

-- 
<http://forum.pspad.com/read.php?2,42858,42940>
PSPad freeware editor http://www.pspad.com

Odpovedet emailem