Snippets support

This forum is user-to-user based and not regularly monitored by IDM.
Please see the note at the top of this page on how to contact IDM.

Snippets support

Postby estebant » Fri Oct 27, 2006 4:33 pm

It'll be fantastic UltraEdit will support Snippets like TextMate.

We need it.

Thnx.
User avatar
estebant
Newbie
 
Posts: 1
Joined: Thu Oct 26, 2006 11:00 pm

Re: Snippets support

Postby deckyon » Fri Oct 27, 2006 4:39 pm

Another good product to take examples from for dealing with snippets is PrimalScript and PrimalCode. I love having a selection of often used code to select from. I have kind of made something like this work in UE by creating a directory and adding snippets there as .snp files, then opening them, cut and pasting the text into my source file.
User avatar
deckyon
Newbie
 
Posts: 9
Joined: Thu Nov 03, 2005 12:00 am

Re: Snippets support

Postby Mofi » Fri Oct 27, 2006 4:49 pm

Hint: Read about Auto Completion and Is it possible to have more than 50 text blocks.

I don't know anything about TextMate, PrimalScript and PrimalCode nor have I ever seen its "snippets" support. So maybe UE templates and tags cannot be compared with their snippets support. How powerful the macro solution is depends on you.
User avatar
Mofi
Grand Master
Grand Master
 
Posts: 4039
Joined: Thu Jul 29, 2004 11:00 pm
Location: Vienna

Code Snippets

Postby schwoortz » Fri Jan 12, 2007 1:36 pm

Hi everyone,

I'm considering to now use UE instead of Homesite as my HTML/CSS/JS/PHP Editor. One feature I miss is the "Code-Snippets" function, where I can define and organize pieces of code (hundreds, organized in folders) that I reuse all the time. Is there anything like that in UE? Am I just missing it?

Greetings,
schwoortz

--
Michael Schwarz - Berlin
User avatar
schwoortz
Newbie
 
Posts: 3
Joined: Fri Jan 12, 2007 12:00 am

Re: Code Snippets

Postby mrainey56 » Fri Jan 12, 2007 1:47 pm

You probably should consider a commercial clipboard manager if you have a large code collection, for example ClipMate.

I don't use it and am not endorsing it - just reporting.
User avatar
mrainey56
Master
Master
 
Posts: 212
Joined: Tue Jul 27, 2004 11:00 pm
Location: Spartanburg, South Carolina

Re: Snippets support

Postby schwoortz » Mon Jan 15, 2007 9:07 am

Thank's everybody for your suggestions, and yes, I now use ClipMate for various things (thanks for that info), but: The Snippet functionality that I mean includes code-snippets, that can be "wrapped around" marked text. E.g.:
List-Link-Snippet:
<li><a href="#" title="" class="clientX_leftNav">
...there comes my marked text...
<a></li>

This is so useful. I haven't checked out PrimalScript yet - mabe it's in there...
User avatar
schwoortz
Newbie
 
Posts: 3
Joined: Fri Jan 12, 2007 12:00 am

Re: Snippets support

Postby Mofi » Mon Jan 15, 2007 11:00 am

schwoortz wrote:The Snippet functionality that I mean includes code-snippets, that can be "wrapped around" marked text.

In UltraEdit this can be done

  • with Templates - see Advanced - Display/Modify Templates; press F1 when dialog is open to get the help and use forum search for more infos.
  • with Tags - see Views - Views/Lists - Tag List; press right mouse button in the list window and select Modify Tags to create your own tags; help can be found in UltraEdit help and with the forum search.
  • with HTML Toolbar - see Advanced - Configuration - Toolbars / Menus - HTML Toolbar; help can be found in UltraEdit help and with the forum search.
If they are correct defined, they insert the text around the currently selected text, if there is a selection. The cursor position after inserting the "snippet" can be also controlled.
User avatar
Mofi
Grand Master
Grand Master
 
Posts: 4039
Joined: Thu Jul 29, 2004 11:00 pm
Location: Vienna

Re: Snippets support

Postby schwoortz » Mon Jan 15, 2007 11:22 am

Mofi! Thanks!! That's it and it is by far better than the Homesite Version. I like this tool. I'm about to buy this thing -:)

Greetings from Berlin,
schwoortz
User avatar
schwoortz
Newbie
 
Posts: 3
Joined: Fri Jan 12, 2007 12:00 am

Re: Snippets support

Postby Fortis » Fri Jan 26, 2007 6:46 pm

I completely agree with adding snippet support. I've been a long time UltraEdit user (way back), but I do 50% of my development on OS X and I use TextMate there.

TextMate is awesome, not only for snippets, but for many reasons. UltraEdit does most of the things that TextMate does, though not as slickly, but the lack of snippets (as well as other bundle stuff) is a big loss for me when I work in UltraEdit.

There is a TextMate clone being built for Windows called E Text Editor which looks interesting; but I do enjoy UltraEdit and wished it had something similar to snippets and bundles.

To see then in action, watch this screencast:
TextMate Screencast
User avatar
Fortis
Newbie
 
Posts: 1
Joined: Fri Jan 26, 2007 12:00 am

Re: Snippets support

Postby johnt0244 » Thu Jul 24, 2008 3:08 pm

I too would love to see "snippets" support.
User avatar
johnt0244
Newbie
 
Posts: 2
Joined: Sun Aug 07, 2005 11:00 pm

Re: Snippets support

Postby brutuscat » Wed Mar 04, 2009 2:19 pm

Any news about this feature? Seems to be the only feature missed in this great editor/IDE
brutuscat
Newbie
 
Posts: 1
Joined: Wed Mar 04, 2009 2:17 pm

Re: Snippets support

Postby rpardee » Tue May 12, 2009 3:48 pm

I too would love the snippet support. There's an opportunity to scoop up 'e' users if this can be had--development of that editor seems to be stalled right now...
User avatar
rpardee
Basic User
Basic User
 
Posts: 14
Joined: Sun Sep 19, 2004 11:00 pm

Re: Snippets support

Postby rhapdog » Tue May 12, 2009 8:49 pm

People keep saying they want snippet support, but snippet support is already there, as noted by Mofi a few posts up. It's just called something other than "snippets."

As a matter of fact, there are three distinct ways to handle snippet functionality in UltraEdit, giving users of UltraEdit much more freedom with snippets than other programs can provide.

Here is Mofi's explanation of this again (quoted from above.)

Mofi wrote:
schwoortz wrote:The Snippet functionality that I mean includes code-snippets, that can be "wrapped around" marked text.

In UltraEdit this can be done

  • with Templates - see Advanced - Display/Modify Templates; press F1 when dialog is open to get the help and use forum search for more infos.
  • with Tags - see Views - Views/Lists - Tag List; press right mouse button in the list window and select Modify Tags to create your own tags; help can be found in UltraEdit help and with the forum search.
  • with HTML Toolbar - see Advanced - Configuration - Toolbars / Menus - HTML Toolbar; help can be found in UltraEdit help and with the forum search.
If they are correct defined, they insert the text around the currently selected text, if there is a selection. The cursor position after inserting the "snippet" can be also controlled.


Please, people, before you assume no one has already answered this thread, at least read it.
User avatar
rhapdog
Master
Master
 
Posts: 266
Joined: Tue Apr 01, 2008 10:02 am
Location: Mississippi, USA

Re: Snippets support

Postby deckyon » Wed May 13, 2009 1:34 pm

The solutions Mofi put up are more of "work-arounds" when you look at how PrimalScript(code) work with snippets and templates. PS's use with snippets and templates are much smoother and easier to set up than UE's. However, what he put in as work-arounds will work for 90% of the people requesting this. Spend some time learning the tool, and you can make it do damn near anything you want. The biggest thing about Primalscript/code is that the snippets and templates are automatically sorted by language, assuming you put the right extension on the files.

I used to have PrimalScript (full version) and spent a lot of time getting my UE set up to work exactly the same (as close as possible) as PS.

For anyone considering the "ultimate" editor, it is worthwhile to check out both UE and PS. Get the trials and hammer them out.

BTW, I have been a loyal UE user since 5.0 with the unlimited upgrade support. It is, and should always be, my go-to default editor. With the new UEm, it will be even more so. Depending on if there is a way to exchange licenses.
User avatar
deckyon
Newbie
 
Posts: 9
Joined: Thu Nov 03, 2005 12:00 am

Re: Snippets support

Postby rhapdog » Wed May 13, 2009 9:40 pm

I haven't ever tried PrimalScript. Don't have the time to work with another editor right now with my workload. But, if I understand you correctly (and please correct me if I'm wrong), the difference is that UltraEdit gives you 50 templates that are built into a template file, and PrimalScript allows you to use external files for "each" snippet, thereby eliminating the need for an arbitrary limit on how many you can have. It also allows you to browse directories and it sorts by language to allow easier finding of the ones you want.

Just as UE now has wordfiles separated to separate files, I don't see why the template system can't be changed, or for backwards compatibility kept and a new feature added, to allow it to work more like snippets where you can collect a library. This would definitely allow "code sharing" in a much easier fashion for this type of thing, and I would be all for that.

I would still, with this system, like to have all the same flexibility of "cursor placement" (using the ^) and selected text wrap-around for these "templates" that would be called snippets.

I'll compose an email tomorrow and shoot it off to IDM for a feature request. If enough people request it, they will probably implement it. It would be a great feature.

I currently use a "tool" for that feature, which would need work before release. It basically calls the tool, which brings up a Windows file selection box allowing me to navigate directory and file to select my "snippet". Once selected, it is inserted at the current cursor position. It doesn't handle cursor placement, or any such thing, but a properly done tool that is called by a script could conceivably handle all this as well, whether IDM includes it or not.
User avatar
rhapdog
Master
Master
 
Posts: 266
Joined: Tue Apr 01, 2008 10:02 am
Location: Mississippi, USA

Next

Return to UltraEdit General Discussion