Bug 106582

Summary: Kate Snippets plugin - multiple Snippet Books
Product: [Applications] kate Reporter: Philip Cain <philipacamaniac>
Component: generalAssignee: KWrite Developers <kwrite-bugs-null>
Status: RESOLVED WORKSFORME    
Severity: wishlist CC: jowenn
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Debian testing   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: Mockup

Description Philip Cain 2005-06-01 03:30:32 UTC
Version:            (using KDE KDE 3.4.1)
Installed from:    Debian testing/unstable Packages
OS:                Linux

This should be filed under kdeaddons, but I couldn't find the kate-plugins app within kdeaddons.

We need some sort of Snippet Book/Library support in Kate, and the ability to import/export SnippetBooks rather than individual Snippets. Custom SnippetBooks could be uploaded to kde-files.org or someplace.

Here is an example - I download an XHTML SnippetBook from kde-files.org, and import the Book into the Snippet plugin. Now I choose XHTML Tags from a dropdown menu within the Snippet Sidebar, and viola! I'm shown a list of tasty valid XHTML tags to use at my disposal.

SnippetBook ideas (anyone could make these and upload them if the functionality was there):

XHTML Tags
HTML Character Entities
CSS Tags
CSS Color Codes
W3C Doctype Declarations
Regular Expressions
C++
Javascript
etc, etc...


SCREENSHOT (MOCKUP ONLY): http://www.philipandjenny.com/wp-content/SnippetBooks.png
Comment 1 Philip Cain 2005-06-01 03:31:21 UTC
Created attachment 11281 [details]
Mockup
Comment 2 Anders Lund 2005-06-01 10:46:35 UTC
On Wednesday 01 June 2005 03:30, Philip Cain wrote:
> This should be filed under kdeaddons, but I couldn't find the kate-plugins
> app within kdeaddons.


This is the best place, the right people see it here :-)

> We need some sort of Snippet Book/Library support in Kate, and the ability
> to import/export SnippetBooks rather than individual Snippets. Custom
> SnippetBooks could be uploaded to kde-files.org or someplace.
>
> Here is an example - I download an XHTML SnippetBook from kde-files.org,
> and import the Book into the Snippet plugin. Now I choose XHTML Tags from a
> dropdown menu within the Snippet Sidebar, and viola! I'm shown a list of
> tasty valid XHTML tags to use at my disposal.


Yes, I have that on my TODO. The ablility to have several files, which can 
have some meta data in them (such as a title) and the ability to set mimetype 
association pr item/file. And as a user I want to be able to select which 
files to be active.

-anders
Comment 3 Michael L. 2006-04-10 15:10:04 UTC
Interestingly, this seems to be related to something that I suggested some time ago related to KDevelop's snippet support:
http://bugs.kde.org/show_bug.cgi?id=106165

Maybe we could start to combine the various ideas in order to come up with a generic design that could be useful for either purpose?
Basically, any sort of snippet module should probably not have to bother in what type of application (editor vs. IDE) it is used?

That way we would also avoid duplicate work because much of the code could be re-used.
Comment 4 mlemos 2006-07-31 01:20:27 UTC
I do not use Windows but the other day I saw a presentation of a MS Visual Studio on which the presenter would paste some pre-defined code to gain presentation. The code appears listed in a dock window with custom labels, rather then the actual code.

Sometimes I need to make presentations and demo projects on which it would be a great help to be able to use a dock window for the same purpose as Visual Studio's.

It seems this code snippets plug-in is exactly what I am looking for. If so, is there an expected release plan for this feature request?

Note: I am using Kate 2.4.1 (KDE 3.4.2). I don't know if this feature was implemented in later versions. Since this request is opened I assumed that the feature is not yet implemented.
Comment 5 deleted_email_KsJQa 2006-11-04 14:08:55 UTC
*** This bug has been confirmed by popular vote. ***
Comment 6 zmi 2007-10-08 19:15:27 UTC
Do not forget also du some kind of Groups and items like in kdevelop snippets
and the ability to show them according to language (highlighting style).

It would be also good idea to add to rightclick menu in kate some point to snippets
Comment 7 Dominik Haumann 2011-07-14 20:26:25 UTC
Is this fixed, Milian?
Comment 8 Joseph Wenninger 2012-10-27 23:29:35 UTC
Snippet plugins already supports multiple repositories and GHNS. A merged version of the kate and the kdevelop gui is moved into the kate part itself