Suggest completions only after typed n chars

Started by Stefan, May 13, 2009, 11:53:49 AM

Previous topic - Next topic

Stefan

Related >to< feature wish:   "Suggest only after typed [ 5] chars"

Scenario:
I have:
-- set "Suggest completions when they save [ 8] chars"
-- typed 'automobil' once before in my text.

If i type now an 'a' i get an suggestion about 'automobil'

Problem:
But this is to much "noise" for me. I mean i get to often an suggestion.

Solution to discuss:
In other editors i have seen an option like:
"Suggest only after typed [ 5] chars "

So in my case i would get an suggestion only if i had typed at least 'autom' , but not for 'auto' .

Implementation brain storming:
"Suggest completions when they save n chars" need to have an own check box in options dialog to enable this feature,
"Suggest completions only after typed n chars" need to have an check box there too

"Suggest completions only after typed n chars" should be checked first,
then "Suggest completions when they save n chars" as second
and if this all is true show the suggestion.


Conclusion:
Perhaps this is an candidate for the todo list? :D
Stefan, HippoEDIT beta tester 
HippoEDIT - the editor programmers wants to code thyself when they are dreaming.        -Don't just edit. HippoEDIT!-

alex

Hello Stefan,

saying the truth, I could not understand why you need this...
Reason for this feature to save your typing. So if you can save at least n characters (do not type by yourself but allow HE to insert them for you) then hint should be shown.

With your example 'automobil' you can save only 4 characters after typing 'autom', so why to at all suggest something. Probably the feature you need is to disable code hints if it is not a template hint, because you typing too fast :) And you always can use Completion List (Ctrl+Space) to see full list of completions when you want.

I would assume if you set to Suggest completions when they save [ 255] chars then you should not see  suggestion code hints. But this is does not work, and probably this is a bug that should be fixed.

And also, in which other editor you have seen this (would like to check what they are doing):
QuoteIn other editors i have seen an option like:
"Suggest only after typed [ 5] chars "

Best regards,
Alex.
HippoEDIT team
[url="http://www.hippoedit.com/"]http://www.hippoedit.com/[/url]

Stefan

#2
1) i like suggestion for longer words
2) i don't like to see hints that often, even on first char

> With your example 'automobil' you can save only 4 characters after typing 'autom', so why to at all suggest something.
I don't want suggestion for this example ( i have set "Suggest completions when they save [ 8] chars")
But i want suggestion if this  'automobil' would be the begin of an longer word, like  'var=automobiles_still_in_stock'   (well, or like this)
But if i want to type 'auto' only, i don't want to see any suggestions for other, longer words.

My point is:
- i like auto completion
- i don't like to see this if i would type short words only.

To often i want type 'fun' and then do an RETURN,
but i was auto suggested with 'function'   - which was be entered then by pressing RETURN, and i have to undo it.


I think i want to set:
"[  ] Suggest completions when they save [   ] chars"
"[X] Suggest completions only after typed [ 6]  chars"  , no matter what i save :D





>And also, in which other editor you have seen this
I don't remember by now, please wait an moment (or two)
EDIT:
- first is Boxer
- second is UltraEdit
-


----       ----       ----       ----       ----       ----       

EDIT 2:

Oh, i see i was not clear:

Quote from: Stefan
Solution to discuss:
In other editors i have seen an option like:
"Suggest only after typed [ 5] chars "

So in my case i would get an suggestion only if i had typed at least 'autom' , but not for 'auto' .
Quote from: Alex
With your example 'automobil' you can save only 4 characters after typing 'autom', so why to at all suggest something.
...because other editor didn't have this HE feature ("[  ] Suggest completions when they save [  8] chars") :D ;D


This correspond  to my statement above:
Quote from: StefanI think i want to set:
"[  ] Suggest completions when they save [   ] chars"
"[X] Suggest completions only after typed [ 6]  chars"  , no matter what i save



--- but please don't make extra work for me, if you didn't see an use ---

.
Stefan, HippoEDIT beta tester 
HippoEDIT - the editor programmers wants to code thyself when they are dreaming.        -Don't just edit. HippoEDIT!-

alex

Ok, I am convinced.
This is not too much work, so I can add this in new beta.
I would only add this option in same way as it already done for save suggestions (edit field with slider) because default can be set to 1 and then it would work same way as without it. And also you can combine it with save suggestion option.
HippoEDIT team
[url="http://www.hippoedit.com/"]http://www.hippoedit.com/[/url]

Stefan

No need for hurriedness, but thank you for  consider it :D   *pattingthehippo*
Stefan, HippoEDIT beta tester 
HippoEDIT - the editor programmers wants to code thyself when they are dreaming.        -Don't just edit. HippoEDIT!-

JJK

As Stefan, I think it would be useful, for the reasons he exposed.
Sometimes it is annoying to get suggestion of completion whereas it would be as simple as to type some letters.
But no hurry neither, except if it is simple to code :)

Arthur

Thinking, is it possible to do a quick toggle (on/off) for the word completion to be accessible say from within the right-click menu?

alex

Hello Arthur,

I do not think that this setting would be often changed, so I do not want to add it or to context menu or to toolbar.
Maybe if somebody else would request.

But I have implemented Stefan suggestion (it was easy). So maybe because of this woul be no need in such option any more ;)

Best regards,
Alex.
HippoEDIT team
[url="http://www.hippoedit.com/"]http://www.hippoedit.com/[/url]

Arthur


Stefan

Quote from: Arthur on May 14, 2009, 05:08:04 AM
Does this thread http://forum.hippoedit.com/index.php/topic,314.0.html then become redundant?

No.
The thread you linked to is about
"Suggest completions when they save [  ] chars"

This thread here is about
"Suggest completions only after typed [  ]  chars"

Since we want to keep issues separated in this forum,
there are two separate threads for each feature, to make clear what answer was to what question.
(I know it's not always clear and easy to do that that way, but sometimes i try :D )
Stefan, HippoEDIT beta tester 
HippoEDIT - the editor programmers wants to code thyself when they are dreaming.        -Don't just edit. HippoEDIT!-

alex

Hello Stefan,

please check new beta from today. It should contain your request.
Beta history I would update later.

Best regards,
Alex.
HippoEDIT team
[url="http://www.hippoedit.com/"]http://www.hippoedit.com/[/url]

Stefan

#11
WOW very fine. Now this features works as i had expected it from the beginning, i think.

I have set  "Options > Code Completion > Enable Code Hints"  to:
     "Suggest completions when they save 2 chars"
     "Suggest completions only after typed 6 chars"

Now i get suggestions only i have typed at least 6 chars, and if i would save 2 chars typing at least. Fine!
(well, i will set 'save 2'  to something higher)

Thank you, Alex!

EDIT for update:  see related new feature:
>>Delay for showing Code Hint tooltip added.
Maybe this can help with situation of pressing <enter> at the end of line<<
Stefan, HippoEDIT beta tester 
HippoEDIT - the editor programmers wants to code thyself when they are dreaming.        -Don't just edit. HippoEDIT!-