Tab Autocomplete

Posted on
  • Hi!

    Just thought you might be interested to know that the latest Espruino builds now have tab-completion on the left-hand side.

    If you type di then [tab] it'll autocomplete to digital and will show you digitalPulse, digitalWrite and digitalRead. You can then just type W [tab] and it'll autocomplete to digitalWrite.

    Same happens with simple a.b type things. For instance Ma [tab] . ra [tab] will give you Math.random.

    It's not perfect yet, but is still pretty handy and will hopefully make writing code on the left-hand side a bit more fun.

  • errata: missed the ...left-hand... side... original post below is right-hand side oriented and has already tool tip in addition to some autocompleteion.

    For console entry autocompletion with tab is just fine, because it is like the linux terminal autocompletion...

    ////////////////////////

    I'm not sure if using tab is a good ide in an editor to trigger autocomplete... since tab means something... May be I do not undertand complely, but I really dislike the time of autocompletion that take more work to not to complete than having to type all. A ctlr or command blank makes more sense to me.... but it may be only beause I'm used to it.

    One can though justify tab as an autocomplete, because once a line is started with a character - at the proper (with tab) indented position, tabs do not matter anymore and canc be use for autocompletion...

  • I'd rather the autocomplete on the right-hand side. Does anyone write anything non-trivial in the left side?

  • Honestly. No pleasing some people :)

    I tend to use the left hand side quite a bit anyway, if only for calling process.memory() and so on.

    There's been autocomplete in the right-hand side for ages. It's good too, as it knows about the type of your variables. Just use Ctrl-Space, which seems to be pretty much the standard shortcut for it.

    There are other interesting shortcuts too - just look on the first page of 'Settings'.

  • Not just for pleasing people... if the autcomplete does not just include the built in things but also the globals (vaiables, functions) of the user code, that would be cool... @Gordon, you have that most likely already in mind... ;-)

  • if the autcomplete does not just include the built in things but also the globals (vaiables, functions) of the user code

    Yes, it does that already... on both sides.

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview
About

Tab Autocomplete

Posted by Avatar for Gordon @Gordon

Actions