Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #5460

    ttwi
    Member

    “snippet” function in visual studio and many other IDEs saves a lot of time while programming, I really hope EmEditor would have a decent plugin which implements the same function.

    #5551

    jonhutch24
    Member

    I second that motion. This kind of functionality would make EmEditor nearly invaluable to me as a programmer.

    #5687

    jonhutch24
    Member

    Ok what I would REALLY like is tab stops in the snippets. That’s my request! :)

    #5688

    Yutaka Emura
    Keymaster

    jonhutch24 wrote:
    Ok what I would REALLY like is tab stops in the snippets. That’s my request! :)

    I am not sure what you want. You can use t as a tab character.

    #5704

    jonhutch24
    Member

    Sorry, let me show you an example

    Let’s say I make a snippet and it looks like this (this is just in theory):

    if $con1$ = $con2$ then
    $expression$
    end if

    Now when I run the snippet I’d like $con1$ already highlighted so I could just write over it, and when when I hit the tab key, it would move to $con2$ and highlight it so I could write over it, and when I hit tab again it would move to $expression$ and highlight it so I could type over it.

    So my typing would look something like this:
    Run the snippet
    var1 -> TAB -> 23 -> TAB -> writeline(“It’s 23!”)

    and the text editor in the end would have:
    if var1 = 23 then
    writeline(“It’s 23!”)
    end if

    does this make any more sense? Sorry, I’m not very good at explaining things some times… :-?

    #5705

    Yutaka Emura
    Keymaster

    jonhutch24 wrote:
    Sorry, let me show you an example

    Let’s say I make a snippet and it looks like this (this is just in theory):

    if $con1$ = $con2$ then
    $expression$
    end if

    Now when I run the snippet I’d like $con1$ already highlighted so I could just write over it, and when when I hit the tab key, it would move to $con2$ and highlight it so I could write over it, and when I hit tab again it would move to $expression$ and highlight it so I could type over it.

    So my typing would look something like this:
    Run the snippet
    var1 -> TAB -> 23 -> TAB -> writeline(“It’s 23!”)

    and the text editor in the end would have:
    if var1 = 23 then
    writeline(“It’s 23!”)
    end if

    does this make any more sense? Sorry, I’m not very good at explaining things some times… :-?

    Yes, that makes a perfect sense. Thanks!

    #5709

    jonhutch24
    Member

    Another request for the snippets, is text expansion.

    Take my last example for instance:
    The snippet is:
    if $con1$ = $con2$ then
    $expression$
    end if

    It would be nice if I could assign a command to type (in this example “ifstate”) and type something like:
    ifstate -> TAB

    And then have the snippet put the entire snippet in with $con1$ already highlighted. Not sure if this interferes with any of the other systems already in place, but it would be SUPER useful instead of having to go back and forth to the snippet pane. :D Thanks for the great product!

    #5717

    jonhutch24
    Member

    YAR! (Yet another Request)

    Along with everything mentioned above, the ability to complete multiple tab stops by naming them the same and only typing over one.

    Example (since I suck at explaining things):

    I have the snippet:

    while $var1$ = $answer$ continue
    msgbox(“The user answered:” & $answer$)
    end while

    so when I fire it up (maybe by typing “mywhile” and hitting tab ;) ) I type something like this:
    userAnswer -> TAB -> “Forty two” -> TAB

    and the string “Forty two” is put in both places where $answer$ is so in the end it looks like:

    while userAnswer = “Forty two” continue
    msgbox(“The user answered:” & “Forty two” )
    end while

    Does this make sense? I know I’m asking a lot from this snippet plug in. But it’s a VERY useful feature when doing a lot of repetitive coding… Thanks so much for your input and time!
    :-D

    #5718

    blackhawk
    Participant

    I agree. So long as when you replace the first one, it does all the rest, then moves to the next tag.

    Second me on this one!

    #5719

    jonhutch24
    Member

    blackhawk wrote:
    I agree. So long as when you replace the first one, it does all the rest, then moves to the next tag.

    Good catch blackhawk! I knew I was forgetting something in that last example. :-? Yes, it would need to move on to the next unaltered tag when you hit tab. :-)

    Edit: I just realized that this thread may not be the best place to do this. This thread (I believe) was started in regards to the autocomplete plugin. My requests are more snippet plug-in oriented. If you need us to move this to a new thread, I’ll be more than happy to copy and paste (or retype if necessary) everything others and myself have requested the snippet plugin do.

    #5939

    jonhutch24
    Member

    Just checking on the status of this and wondering if we’ll be seeing these features anytime soon?

    #5943

    Yutaka Emura
    Keymaster

    I will consider that in future. Thanks!

Viewing 12 posts - 1 through 12 (of 12 total)

You must be logged in to reply to this topic.