EmEditor (text editor) Forum Index
   Enhancement Suggestions about Plug-ins
     AutoComplete plugin - Please make it closer to the "snippet" function in Visual Studio
Register To Post

Threaded | Newest First Previous Topic | Next Topic | Bottom
Poster Thread
ttwi
Posted on: 2/17/2008 6:20 am
Just popping in
Joined: 10/7/2007
From:
Posts: 3
AutoComplete plugin - Please make it closer to the "snippet" function in Visual Studio
"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.
jonhutch24
Posted on: 3/6/2008 5:32 am
Just popping in
Joined: 3/3/2008
From:
Posts: 10
Re: AutoComplete plugin - Please make it closer to the "snippet" function in Visual Studio
I second that motion. This kind of functionality would make EmEditor nearly invaluable to me as a programmer.
jonhutch24
Posted on: 4/23/2008 6:01 am
Just popping in
Joined: 3/3/2008
From:
Posts: 10
Re: AutoComplete plugin - Please make it closer to the "snippet" function in Visual Studio
Ok what I would REALLY like is tab stops in the snippets. That's my request! :)
Yutaka
Posted on: 4/23/2008 8:05 am
Webmaster
Joined: 9/28/2006
From: Redmond
Posts: 2401
Re: AutoComplete plugin - Please make it closer to the "snippet" function in Visual Studio
Quote:

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.


----------------
Yutaka Emura
Developer of EmEditor
http://www.emeditor.com/

jonhutch24
Posted on: 4/25/2008 6:46 am
Just popping in
Joined: 3/3/2008
From:
Posts: 10
Re: AutoComplete plugin - Please make it closer to the "snippet" function in Visual Studio
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...
Yutaka
Posted on: 4/25/2008 7:59 am
Webmaster
Joined: 9/28/2006
From: Redmond
Posts: 2401
Re: AutoComplete plugin - Please make it closer to the "snippet" function in Visual Studio
Quote:

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!


----------------
Yutaka Emura
Developer of EmEditor
http://www.emeditor.com/

jonhutch24
Posted on: 4/25/2008 12:13 pm
Just popping in
Joined: 3/3/2008
From:
Posts: 10
Re: AutoComplete plugin - Please make it closer to the "snippet" function in Visual Studio
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!
jonhutch24
Posted on: 4/28/2008 6:54 am
Just popping in
Joined: 3/3/2008
From:
Posts: 10
Re: AutoComplete plugin - Please make it closer to the "snippet" function in Visual Studio
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!
blackhawk
Posted on: 4/28/2008 7:02 am
Not too shy to talk
Joined: 2/13/2008
From:
Posts: 34
Re: AutoComplete plugin - Please make it closer to the "snippet" function in Visual Studio
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!
jonhutch24
Posted on: 4/28/2008 7:43 am
Just popping in
Joined: 3/3/2008
From:
Posts: 10
Re: AutoComplete plugin - Please make it closer to the "snippet" function in Visual Studio
Quote:

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.
(1) 2 »
Threaded | Newest First Previous Topic | Next Topic | Top


Register To Post
 
English čeština Deutsch español français italiano 日本語 한국어 Русский 简体中文 繁體中文