Home Download Buy Blog Forum Support

Questions about tab completion

Questions about tab completion

Postby bizoo on Mon Feb 28, 2011 4:08 pm

I've some issues with the new tab completion system.
When the right word/snippet is inserted it's great, but what to do when it's not the case ?

Actually I:

1. type the part of a word
2. Insert Best Completion (tab)
!Wrong action/word
3. undo the Insert Best Completion (ctrl+z)
4. open the completion lookup (ctrl+space)
5. select the right item.

As the selected item is remembered, next time it work great except for word that are similar:
'wh' for when, what, while, where, ...

My questions are:
1. Is there a quicker way to correct a wrong completion ?
2. For case when best completion could not find an item with enough confidence, isn't it better to show the lookup ?
3. Is code completion now case sensitive ?
ex:
Code: Select all
procedure TwxServerThread.Home;
begin
end;

'twx' tab or ctrl+space doesn't return anything.

On Build 2032 Win7 64
bizoo
 
Posts: 883
Joined: Wed Dec 08, 2010 6:53 am
Location: Switzerland

Re: Questions about tab completion

Postby allaire on Tue Apr 12, 2011 3:49 am

this is a great question, I'm wondering too!
allaire
 
Posts: 15
Joined: Mon Apr 11, 2011 6:44 pm

Re: Questions about tab completion

Postby guillermooo on Tue Apr 12, 2011 5:47 am

bizoo wrote:2. For case when best completion could not find an item with enough confidence, isn't it better to show the lookup ?


With tab_completion on, pressing Tab will always cause Sublime to make a decision for you and insert the "best" match (in case of several matches with the same prefix, I think the final selection is done by alphabetical order). The behavior of tab_completion is explained here:

http://sublimetext.info/docs/extensibil ... tions.html

Conversely, Ctrl+spacebar will never make a decision for you when faced with ambiguity; it will show the autocomplete list instead so you can pick an suggestion.

bizoo wrote:3. Is code completion now case sensitive


It seems so, yeah.
Last edited by guillermooo on Tue Apr 12, 2011 8:29 am, edited 1 time in total.
guillermooo
 
Posts: 728
Joined: Thu Jul 23, 2009 9:06 am

Re: Questions about tab completion

Postby qqq on Tue Apr 12, 2011 8:04 am

guillermooo wrote:With tab_completion on, pressing Tab will always cause Sublime to make a decision for you and insert the "best" match (in case of several matches with the same prefix, I think the final selection is done by alphabetical order). The behavior of tab_complete is explained here:
I wonder why, when in scope of both HTML and PHP, a>tab triggers: abs() (trigger:abs) and not <a> (trigger: a). And why pressing one or two keys triggers functions like cairo_ps_surface_dsc_begin_page_setup() (trigger: cairo_ps_surface_dsc_begin_page_setup) instead of much simpler HTML tags. It is "best" at best.
ST2 Win7 64-bit
qqq
 
Posts: 57
Joined: Tue Mar 08, 2011 9:49 am

Re: Questions about tab completion

Postby guillermooo on Tue Apr 12, 2011 8:33 am

That's a good question... Probably due to scope selectors in snippets, but I don't really know how that works or if it influences the sort order for completions (rather than just snippet filtering before extracting completions).
guillermooo
 
Posts: 728
Joined: Thu Jul 23, 2009 9:06 am

Re: Questions about tab completion

Postby jps on Tue Apr 12, 2011 10:33 pm

qqq wrote:a>tab triggers: abs() (trigger:abs) and not <a> (trigger: a).


It doesn't. Within a PHP block <?php ... ?>, a,tab will insert abs, and outside of such a block, a,tab will insert an <a>.
jps
Site Admin
 
Posts: 3067
Joined: Wed Mar 19, 2008 12:33 pm


Return to General Discussion

Who is online

Users browsing this forum: Google [Bot] and 33 guests