T3S icon indicating copy to clipboard operation
T3S copied to clipboard

Autocomplete as you type

Open dorny opened this issue 11 years ago • 5 comments

Hi, would be possible to provide autocomplete as you type? If it would be too slow, how about show basic sublime autocomplete by default and bind T3S autocomplete to key shortcut?

dorny avatar Oct 20 '13 16:10 dorny

Hello,

Having typescript completion while typing make things too slow (always a little delay that is annoying). Having only sublime basic autocomplete is better. I've added it to the dev branch (the next version of the plugin, witch i don't recommend to use right now cause it's dev and there is still bugs) on top of the current typescript completion option that are :

  1. Member completion on "dot" (object.meth...) and you can continue typing to narrow the result inside the completion results that are shown.
  2. Non member completion : word, variable etc with ctrl+space

Railk avatar Oct 20 '13 18:10 Railk

I'm not sure if it's related but when i try to "cycle expand" using alt+/ it doesn't work in *.ts files. This is a very useful feature to expand current word to a previously typed word so it would be nice if this would work along with t3s wonderful auto-complete function.

finalclass avatar Nov 22 '13 12:11 finalclass

Hello finalclass,

I didn't know alt+/ on SublimeText so i search on the default shortcut settings but i couldn't find it. On windows ST, i can do that with tab ie beginning a word pressing tab will cycle through similar previous words. Are you talking about that ? if so i can do that on .ts files.

If it's not that can you be a bit more specific for me to understand better :)

Railk avatar Nov 22 '13 19:11 Railk

In Default Key map file on Linux it's bound to alt+/

{ "keys": ["alt+/"], "command": "auto_complete" },
{ "keys": ["alt+/"], "command": "replace_completion_with_auto_complete", "context":
    [
        { "key": "last_command", "operator": "equal", "operand": "insert_best_completion" },
        { "key": "auto_complete_visible", "operator": "equal", "operand": false },
        { "key": "setting.tab_completion", "operator": "equal", "operand": true }
    ]
},

I was trying to change the key-bindings but it didn't work:(

This feature is in almost every IDE. For example in Webstorm it is called Hippie Completion and is described here: http://www.jetbrains.com/webstorm/webhelp/hippie-completion-expanding-words.html It's quite useful.

finalclass avatar Nov 24 '13 13:11 finalclass

i'll take a look on my linux virtual machine and see what i can do :)

Railk avatar Nov 24 '13 13:11 Railk