Many editors have a feature that is often called "Code Snippets". Typically, it is a list on the sidebar. In the simplest form, snippets are just pieces of text that can be inserted in the document. On more advanced implementations, macros etc. could be executed.
I think Code Snippets would be a useful addition to Vedit, too.
The snippets could be used for example for inserting HTML tags.
And it should be quite easy to implement.
Just add one more tab in the "File Selector" sidebar.
It could be implemented for example the same way as User and Tools menus. Or preferably, using the syntax of keyboard file.
You could load snippets the same way as you load the menus. A snippet file would contain a single line for each entry: the name of snipped followed by the contents. If the format of keyboard file is used, the contents could be plain text, keyboard commands, or macros. You could then use keyboard macros from the keyboard macro library in the snippets tab, too.
The problem with User and Tools menus (like my HTML menu) is that only a limited number of items can be included. On the sidebar, there is much more room and the snippets would be always visible. Even better if the snippets could be organized in categories as folding list (like in the Projects tab). And of course the snippet filename should be stored with projects, just like User and Tools menus.
When the number of tabs increases, it would be a good idea to have option to configure which tabs are displayed in the sidebar.
--
Pauli
|
|