Sublime Forum

Suggest autocomplete

#1

I come from OSX and Coda. One of the most useful features it has is a smooth and functional autocomplete. Type “im” and the image tag is suggested. Press enter and the entire code for inserting an image is created. Now I’m sure this could be done via snippets, but I find autocomplete is a faster way and more versatile in many cases. Since you can have multiple choices displayed quickly and easily without memorizing hundreds of key combinations. What I think would be an excellent way of implementing it is to make it user created. Link the autocomplete in with the snippets implementation. So the user can create a snippet and its added to autocomplete as well. So instead of typing “lorem” and then “pressing tab” to insert a lorem ipsum paragraph. You could type “lorem” and different selections of lorem ipsum paragraphs could be available in a menu with a quick arrow or number pad keypress to insert the style you prefer. Another example would be with div. Type div and a menu would pop up with the option to insert “div id and div class”, “div id” or “div class”.

I hope my explanation made sense. I’m searching hard for a OSX replacement of Coda in Windows. But so far I’m fairly disappointed by the available options. Sublime seems like the first innovative editor I’ve come across.

0 Likes

#2

Auto complete is implemented via a fairly simple system atm, it simply offers suggestions based on the current buffer. There’s an entry on the todo list to enable plugins to add their own suggestions to the list. I think integrating snippets with auto complete is a great idea, and it’s definitely a candidate for when auto complete itself is more fleshed out.

0 Likes

#3

I just want to move the focus on this suggestion again and complement it with some little annoyances using autocomplete.

The same word is displayed several times but with different symbols at the end
Example:

  • foobar

  • foobar,

  • foobar;

To me a waste of the rather limited entries (I already increased it to 16 entries).

More annoying is the matter that not all possibilities are offered.

  • When I have ‘Foo.bar’ and type ‘b’ nothing is displayed for word completion.

  • When I have both ‘Foo.bar’ and ‘Foo.rab’ and type ‘Fo’ I get both ‘Foo.bar’ and ‘Foo.rab’ but I just wanted ‘Foo’.

This may seem funny, but I program in the relational not in the object oriented world.

I suggest a file type configuration, possibly completion.tmPreferences, where the use of symbols like ‘.;,’ can be adjusted.

Also, it would be very convenient if I could select the item by simply typing the following letters and enter - rather then bothering the cursor keys.
Maybe the list of possible completions will be adjusted after each letter to show words which could not get in to the list due to the limited entries.

0 Likes

#4

I second that.

0 Likes

#5

I too wish suggestions to popup automatically (without pressing any hotkeys, just like Scite or Scite-Ru). This feature changed my typing habits, I use copy&paste so less frequent, that cannot switch to other editors. So please :smile:

0 Likes