PSPadをダウンロードしてインストールします。
次に、次のスクリプトをのVBSファイルに保存し、<PSPadFolder>\Script\VBScript
PSPadを再度開きます。
'Enclose It! by Lukman
const module_name = "Enclose It!"
const module_ver = "0.1"
const enclose_token = "_SRC_"
const enclose_hotkey = "CTRL+Q"
enclose_last = enclose_token
sub Init
addMenuItem "Enclose It!","", "EncloseIt", enclose_hotkey
end sub
sub EncloseIt
encloser = InputBox("Enclose content", module_name, enclose_last)
If encloser = False Then Exit Sub
Set editor = newEditor()
editor.assignActiveEditor
editor.selText Replace(encloser, enclose_token, editor.selText)
enclose_last = encloser
end sub
次に、ドキュメントを開きます。
ドキュメント内のテキストを強調表示し、Ctrl + Q
ホットキー(スクリプト自体でカスタマイズ可能)を押して、デフォルトが設定された入力ダイアログを開きます_SRC_
。キーワードをに変更して<?php echo _('_SRC_'); ?>
Enterキーを押すだけです。繰り返す。(スクリプトは最後に使用されたキーワードを記憶しているため、すべてを再入力する必要はありません)。