Request: user-configurable code template

Discuss and announce AkelPad plugins
Post Reply
  • Author
  • Message
Offline
Posts: 20
Joined: Mon Jan 03, 2011 6:53 pm
Contact:

Request: user-configurable code template

Post by TheDutchJewel »

I'm interested in a plugin which integrate a user-configurable code template collection, like WebEdit for Notepad++? Maybe it's already available, but I can't find anything like that for AkelPad.

More info about WebEdit can be found on this page:
http://sourceforge.net/projects/npp-plu ... s/WebEdit/
WebEdit is another attempt to integrate a user-configurable code template collection into Notepad++. With WebEdit you have the following options:

- create a menu command for pasting some text, possibly surrounding the current selection, if any. Imagine selecting a word and putting "<p>...</p>" around it with a single hotkey. You can create up to 30 such commands and assign keyboard shortcuts to them, or simply use the menu;
- the same 30 commands can also be represented by buttons on the main toolbar for quick access with the mouse;
- you can create a set of "tags" or abbreviations. Type one of them, then press Alt+Enter and it will be replaced with the corresponding block of text. If the replacement consists of multiple lines, all of them will be indented same as the first one. The caret will be placed in a predefined position within the new text. You can have the current clipboard contents (e.g. a function name) pasted on expansion.

The plugin configuration is stored in the WebEdit.ini file. Use "WebEdit\Edit Config" command from the "Plugins" menu to open the file in Notepad++ for editing.

All keyboard shortcuts can be assigned/modified using the standard Shortcut Mapper. For more information see the WebEdit.txt help file.

Offline
Posts: 2247
Joined: Tue Aug 07, 2007 2:03 pm
Location: Vinnitsa, Ukraine

Post by FeyFre »

TheDutchJewel
Templates plugin to insert, surprise, text blocks by given templates.
Insert metyhod of ContextMenu,ToolBar,HotKeys plugin to suuround words with <p>...</p> etc
Coder plugin for abbreviation.
Scripts plugin + zen_coding script set - html & css specified rapid editing(including abbreviations).


Be sure, AkelPad already can do almost all features NP++ have without hard development.

Offline
Posts: 20
Joined: Mon Jan 03, 2011 6:53 pm
Contact:

Post by TheDutchJewel »

That sounds good. Thanks for the quick reply. :)

Can you also give an example about how to surround a selection of text with <p>...</p> etc, and how to link this function to a toolbar button or hotkey?

Offline
Posts: 767
Joined: Mon Sep 28, 2009 10:03 am
Location: Minsk, Belarus

Post by se7h »

TheDutchJewel

Example for Toolbar plugin:

Code: Select all

-"Paragraph" Insert('<p>\s\|</p>',1) Icon("path_to_any_icon")
\s - position of selected text after inserting
\| - position of cursor after inserting

Offline
Posts: 20
Joined: Mon Jan 03, 2011 6:53 pm
Contact:

Post by TheDutchJewel »

se7h
Thanks for the example. It works great. :)
Post Reply