You are not logged in.

#1 2014-12-09 00:00:27

xtian
Member
Registered: 2013-08-25
Posts: 179

Is there an IDE which supports snippets with popup arguments?

Is there a text editor or plugin which supports selecting from default arguments?

Geany package has the Snippet plugin. From their manual page

Basic snippet.conf entry:
    [Default]
    myname=Enrico Tröger

And then there's the feature to add a wildcard:
    Template wildcards
    [Default]
    myname=My name is {developer}

This will replace myname with "My name is " and the value of the template preference developer.

What I'd like to find is something similar to the wildcard:
    myname=My name is ("Chris" | "Xtian" | "CSimon")

This way I can complete the phrase "My name is" with any of these three options, similar to the current auto-complete.  (only autocompelete matches only what's in the document, and you can't limit it just to preset values)

I want to make some bog simple flat file xml-templates. Define something like a database field with a list of predetermined values, so I don't get field value identity problems.

Any ideas for VIM or geany?

Last edited by xtian (2014-12-09 00:02:25)

Offline

#2 2014-12-09 18:47:04

drcouzelis
Member
From: Connecticut, USA
Registered: 2009-11-09
Posts: 4,092
Website

Re: Is there an IDE which supports snippets with popup arguments?

May I ask what your real goal is? (I assume you don't ACTUALLY want to auto-complete "My name is"...) tongue

Can it be accomplish some other way? For example, creating a Vim shortcut that will type the phrase you want?

Offline

#3 2014-12-09 21:04:34

xtian
Member
Registered: 2013-08-25
Posts: 179

Re: Is there an IDE which supports snippets with popup arguments?

As I noted in the post, I want to make some bog-simple flat file xml-templates.

The functionality is really important so they're easier to maintain. I'm using geany right now, since its a little more convenient when copying text from web pages. Right now I have Snippets working to insert the exact wrappers. However, some of the elements are repetitive, and I wish to keep them consistent. And autocomplete is catching some of these words correctly and some not correctly. I don't need autocomplete for the whole document, but I very much would like it for these structural bits which snippets are so good (and convenient) at putting into a text doc. As I was re-purposing the snippet.conf and adding all these elements to classify the content files I was making, I realized how much the process was like making a database table. Combine this feature with templates and what you have is a single file as a single record, with the fields inside the document. Now I can parse these files for content with a script. If I'm using VIM or Geany, then all the better.

Offline

Board footer

Powered by FluxBB