Auto-complete improvements (aka intellisense)

Let us know what you would like to see in the next version of this software

Moderator: kfury77

Forum rules
Please follow these guidelines when posting feature requests. This will help to increase the value of your contribution.
  • Do not create new topics for already requested features. Add your comments to the existing feature request topics instead;
  • Create separate topic for each feature suggestion. Do NOT post a number of non-related feature suggestions in a single topic;
  • Give your topic a meaningful title. Do NOT create topics with meaningless titles, such as "My Suggestion" or "My Problem".
Please note that we DO READ all suggestions, even if a reply is not posted. Thanks!
Post Reply
Charybdis
Posts: 10
Joined: Thu Aug 02, 2007 2:12 pm

Auto-complete improvements (aka intellisense)

Post by Charybdis »

I think the Text Editor > Auto Replace and Libraries could integrate together.

For example, I create this snippet:

<img src="|" width="" height="" alt="" />

| is the place of the caret. Then I could assign hotkey and also auto replace function to this snippet:

1. I type: img
2. Hit Space
3. My image snippet is inserted, and the caret is placed as mentioned above.

Right now, when I use auto replace, the caret is placed after the whole replacement.




My second request: I am in HTML editor, and I want to use HTML auto complete. This new behaviour would be better:

1. I hit Ctrl+Space
2. This shows auto-complete
3. I type a HTML tag, or choose from the list, but I dont type the angle brackets!!! only the name of the HTML tag
4. Hit enter
5. The HTML tag with brackets and also the endig tag inserted, for example: <div>|</div> ( | = the place of the caret)

So in this case I needn't type the angle brackets at all. At the moment, I must type the < bracket to show auto-complete.

My custom snippets could listed in auto-complete window, too.

Auto-complete should work, if I make a selection, hit Ctrl+Space, choose a tag, hit enter, then the selection should wrapped by the tag.

Third request is: enable auto-complete by CSS class and id names.

For example, I type this:

<div class=" at this point, auto-complete shows me the available CSS classes.

Or I type this in the CSS editor:

div. at this point, auto-complete shows me the available class names to div.

My final request is only a small thing: provide auto-complete in CSS for pseudo-classes, pseudo-elemetns and 17 color names.



This features would be nice :)

By the way, here is a very inspirative video, how to improve the HTML editor:

http://macromates.com/screencast/insert_html_tags.mov

This is what TextMate can do! TextMate can edit HTML tags very fast, you do not need to type angle brackets. (My second request could eliminate angle brackets, too.)

I hope these help!
User avatar
notuo
Posts: 258
Joined: Sat Jul 09, 2005 8:07 pm
Location: Tlalpan, Mexico City, Mexico

Post by notuo »

Agree, That was nice
User avatar
chrisjlocke
Top Contributor
Posts: 995
Joined: Mon Aug 01, 2005 4:12 pm
Location: Essex, UK
Contact:

Post by chrisjlocke »

Not a 100% solution, but you can change / edit the auto complete list. You could add <div></div> in the list, for example. It won't help move the caret for you though.

See this topic that Syrupcore created recently.
http://forums.blumentals.net/viewtopic.php?t=2378
blank
Posts: 19
Joined: Wed May 30, 2007 10:01 pm

Re: Auto-complete improvements (aka intellisense)

Post by blank »

Charybdis wrote:For example, I create this snippet:

<img src="|" width="" height="" alt="" />
What would be even more awesome is if there was an 'intelligent tabbing' system when working inside of a tag. So if your caret is positioned as shown above and you hit the tab key, the caret jumps between the next set of quotation marks (so the caret would be shown as width="|"). Hitting tab again would move the caret to the height attribute, and so on. If the attribute already has a value, that value would be selected.

'Intelligent tag tabbing' would probably only be truly handy in combination with the Editor/Auto Replace/Library integration. But I still think it would be a neat and unique feature that would speed up work.
turicon
Posts: 26
Joined: Thu Aug 16, 2007 8:48 am
Location: Sinsheim/Germany and Cherkassy/Ukraine
Contact:

Re: Auto-complete improvements (aka intellisense)

Post by turicon »

Charybdis wrote:I think the Text Editor > Auto Replace and Libraries could integrate together.

For example, I create this snippet:

img src="|" width="" height="" alt=""...
You have this Feature. 8)

Go to "Library", click "New Snippet" and in the DialogWindow see the Link at the bottom "replacement tokens". Read this and than make your Snippet, insert one ore more "Prompt message(s)" and assign a Shortcut, ready...

Turicon
Charybdis
Posts: 10
Joined: Thu Aug 02, 2007 2:12 pm

Re: Auto-complete improvements (aka intellisense)

Post by Charybdis »

turicon wrote:
Charybdis wrote:I think the Text Editor > Auto Replace and Libraries could integrate together.

For example, I create this snippet:

img src="|" width="" height="" alt=""...
You have this Feature. 8)

Go to "Library", click "New Snippet" and in the DialogWindow see the Link at the bottom "replacement tokens". Read this and than make your Snippet, insert one ore more "Prompt message(s)" and assign a Shortcut, ready...

Turicon
No, this is not what I need.

I said auto replace and libraries do not integrate together.

You can position the caret in a snippet, but you are unable to set auto-replace for a snippet.

And by auto-replace you are unable to position the caret.
User avatar
syrupcore
Top Contributor
Posts: 917
Joined: Thu Jul 21, 2005 12:58 am
Location: Portland, Oregon, usa
Contact:

Post by syrupcore »

wow. wow. I'd never considered using autoreplace like you appear to be using it. sort of a secret snippets library. Chris'll tell you, I can't get enough access to snippets, lazy bastard that I am. I just loaded a few common ones up and it works like a charm. instead of trying come up with keyboard shortcuts to remember for everything, I now just type for instance "loreml" to get a block of lorem ipsum text. sweet!

for what it's worth, I really like the tabbed autocomplete from the video. it's more explicit than space so that if you don't want something replaced, it's easy to move forward.
User avatar
syrupcore
Top Contributor
Posts: 917
Joined: Thu Jul 21, 2005 12:58 am
Location: Portland, Oregon, usa
Contact:

Post by syrupcore »

I didn't really understand your first request initially but now I get it after playing with autocomplete for a while.

Because it wasn't clear to me, I wanna re word your request in case it wasn't clear to karlis and team as well. Please consider adding the ability to assign typed words to snippets in addition to keyboard shortcuts. Seems like the logic to trigger some action based on a word is already baked into the app (auto replace). If we could map that same triggering logic to snippets, that would give editors access to tokens and cursor insert points in a very fluid way.

It's a fantastic (and I think worthy of consideration) request. Fantastic because it seems like a fairly simple addition to the program but would open up a world of easy editing for those who need to churn out a lot of code on any given day.
Charybdis
Posts: 10
Joined: Thu Aug 02, 2007 2:12 pm

Post by Charybdis »

syrupcore wrote:I didn't really understand your first request initially but now I get it after playing with autocomplete for a while.

Because it wasn't clear to me, I wanna re word your request in case it wasn't clear to karlis and team as well. Please consider adding the ability to assign typed words to snippets in addition to keyboard shortcuts. Seems like the logic to trigger some action based on a word is already baked into the app (auto replace). If we could map that same triggering logic to snippets, that would give editors access to tokens and cursor insert points in a very fluid way.

It's a fantastic (and I think worthy of consideration) request. Fantastic because it seems like a fairly simple addition to the program but would open up a world of easy editing for those who need to churn out a lot of code on any given day.
Yes, and the new Ctrl+Space behaviour would be more convenient than the auto-replace:

1. I type in editor: div (without angle brackets!)
2. I hit Ctrl+Space
3. Because div matches only for 1 tag, the editor auto-completes it like this ( | means the caret position after auto-complete):

<div>|</div>

4. If the div could match for more than 1 entry, then show the auto-complete window to allow me to choose.


And you could you auto-complete with selection:

1. Select a text you want to surround with a tag.
2. After you selected a paragraph, or a text, hit Ctrl+Space.
3. Type div, then hit Enter, or choose div from the list, then hit Enter
4. The editor sorrounds the selected text or paragraph like this:
<div>This is some selected text...</div
User avatar
syrupcore
Top Contributor
Posts: 917
Joined: Thu Jul 21, 2005 12:58 am
Location: Portland, Oregon, usa
Contact:

Post by syrupcore »

there's a small catch with using autocomplete as a 'secret extra snippets' library - it will only replace your inserted text with single line replaces. so, replacing "pinclude" with <?php include(""); ?> is simple enough but replacing "ul..." with

Code: Select all

<ul>
   <li></li>
   <li></li>
</ul>
isn't possible.

Maybe in a future version... it's still very cool for lots and lots of things besides &. Thanks for the idea Charybdis.
User avatar
syrupcore
Top Contributor
Posts: 917
Joined: Thu Jul 21, 2005 12:58 am
Location: Portland, Oregon, usa
Contact:

Post by syrupcore »

karlis, any thoughts on Charybdis' suggestion? Possible? Maybe?
User avatar
Karlis
Site Admin
Posts: 3605
Joined: Mon Jul 15, 2002 5:24 pm
Location: Riga, Latvia, Europe
Contact:

Post by Karlis »

Integrating Auto-Replace and Library is exactly what we are going to dol, but with a minor difference. We plan to leave auto-replace as is and add "special words" for Library items. So you will have to type the special word to include your snippet and after that press some shhortcut (most likely not the space).

E.g. you type swi, hit say ctrl+j and you got switch statement inserted. So this is what we are going to do. You will be able to assign special word to every snippet. Also you will be able to call snippets as code templates (remember Homesite?) by hitting Ctrl+J or something.
Karlis Blumentals
Blumentals Software
www.blumentals.net
User avatar
syrupcore
Top Contributor
Posts: 917
Joined: Thu Jul 21, 2005 12:58 am
Location: Portland, Oregon, usa
Contact:

Post by syrupcore »

yes! That's exactly what I was hoping for. Seriously, this is the most exciting new development in a long time for my coding style. I can't wait and completely volunteer myself to the beta test gods.

Will
Post Reply