Snippets support

Snippets support

1
NewbieNewbie
1

    Oct 27, 2006#1

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

    We need it.

    Thanks.

    Update: Support for snippets added to UltraEdit in v18.00 and UEStudio v12.00 named Smart Templates.

    9
    NewbieNewbie
    9

      Oct 27, 2006#2

      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.

      6,686585
      Grand MasterGrand Master
      6,686585

        Oct 27, 2006#3

        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.
        Best regards from an UC/UE/UES for Windows user from Austria

        3
        NewbieNewbie
        3

          Code Snippets

          Jan 12, 2007#4

          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

          206
          MasterMaster
          206

            Re: Code Snippets

            Jan 12, 2007#5

            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.
            Software For Metalworking
            http://closetolerancesoftware.com

            3
            NewbieNewbie
            3

              Jan 15, 2007#6

              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...

              6,686585
              Grand MasterGrand Master
              6,686585

                Jan 15, 2007#7

                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.
                Best regards from an UC/UE/UES for Windows user from Austria

                3
                NewbieNewbie
                3

                  Jan 15, 2007#8

                  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

                  1
                  NewbieNewbie
                  1

                    Jan 26, 2007#9

                    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

                    2
                    NewbieNewbie
                    2

                      Jul 24, 2008#10

                      I too would love to see "snippets" support.

                      1
                      NewbieNewbie
                      1

                        Mar 04, 2009#11

                        Any news about this feature? Seems to be the only feature missed in this great editor/IDE

                        14
                        Basic UserBasic User
                        14

                          May 12, 2009#12

                          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...

                          2362
                          MasterMaster
                          2362

                            May 13, 2009#13

                            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.
                            “Don’t document the problem, fix it.” – Atli Björgvin Oddsson

                            9
                            NewbieNewbie
                            9

                              May 13, 2009#14

                              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.

                              2362
                              MasterMaster
                              2362

                                May 14, 2009#15

                                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.
                                “Don’t document the problem, fix it.” – Atli Björgvin Oddsson

                                Read more posts (6 remaining)