开发者

Create new user tool to paste text with EditPlus

I use EditPlus 3.30 as my code editor, but this question also applies to earlier versions. I would like to create a new user tool item on the user tool bar. The default set-up allows you to open a template when you click on an icon. I would like to create an item that instead pastes code from a libray file (*.ctl) or any other text file. In the end, the new user tool item would function just like one of the icons on the hml t开发者_开发问答ool bar.

I don't have extensive programming experience.


EditPlus text editor: How to create a toolbar user tool icon to paste custom code snippets.

Configure the Preference/Tools dialog like this:

Command        CScript.exe C:\Your Path\Pastetext.js
Argument         //NoLogo $(CurRow)
leave initial directory blank
Action         Run as text (Insert)

Save the flowing five lines as Pastetext.js

 var cArgs =                  WScript.Arguments;
var rStr =                  cArgs(0);
var rStr ="<item id='file1' media-type='application/xhtml+xml' href='aSample.html'/>";
// Print filler string
WScript.StdOut.Write(rStr);

//The rStr variable will print where your cursor is in an open document.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜