This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 224313 - CSS property names autocomplete: Suggest most used rather than alphabetically first
Summary: CSS property names autocomplete: Suggest most used rather than alphabetically...
Status: NEW
Alias: None
Product: web
Classification: Unclassified
Component: CSS Editor (show other bugs)
Version: 7.3
Hardware: PC Mac OS X
: P2 normal (vote)
Assignee: Milutin Kristofic
URL:
Keywords:
Depends on:
Blocks: 235151
  Show dependency tree
 
Reported: 2012-12-30 09:22 UTC by bfanger
Modified: 2014-10-06 13:26 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description bfanger 2012-12-30 09:22:28 UTC
In css typing "w" could show "width" as first autocompletion value instead of the rarely used "widows" 

"b" for "background" instead of "backface-visibility" etc.
 
A similar bug is posted for webkit:
https://bugs.webkit.org/show_bug.cgi?id=96763

They already compiled a weighted list of popular/most-used css properties:
https://bugs.webkit.org/attachment.cgi?id=166530&action=review
Comment 1 bfanger 2012-12-30 09:45:26 UTC
I not proposing to sort the list based on weight, the list should still be shown alphabetically.
Just change the default selected entry in the list to the most popular one instead of the first entry.
Comment 2 Marek Fukala 2013-01-02 09:09:26 UTC
(In reply to comment #1)
> I not proposing to sort the list based on weight, the list should still be
> shown alphabetically.
> Just change the default selected entry in the list to the most popular one
> instead of the first entry.

+1 for the whole proposal, but 

I'm not sure if the behaviour above can be done given the current editor completion support and also if it wouldn't be confusing a bit. 

Wouldn't it be satisfactory if the most used items would become "smart items" - that mean the appear at the top of the completion list and are delimited by a separator from the rest?
Comment 3 bfanger 2013-01-02 11:36:40 UTC
If the "smart items" list only contains up to 3 or so it would be satisfactory indeed.

## It optimizes the workflow
1: Type "w" 
2: Waiting for autocomplete list, otherwise tab would insert the tab-character. (Which is very slow compared to the instant autocompletion in Sublime Text, Netbeans seems to have a deliberate delay.. ><)
3: Hit tab for (most common) "width"

I'd prefer it if step 2 was optional and "w" tab means default autocompletion for "w".

## Do "smart items" change based on usage? 
Because Sublime Text remembers the last chosen completion which is annoying, it kills predictability. 
I wouldn't mind if the weights are changed in a new version of netbeans. (Which generally also adds new completion entries).

You could use collected usage or analyzing big chucks of code "in the wild" or preferably a mix of the two.

## It would always show the active autocompletion right below the cursor.
Which is great and can't be done with the default-selection-method if the item is at the bottom of the list.

## Still allows the discovery of available options alphabetically.
Making Netbeans a great editor and a learning tool.