Author Topic: Suggest completions only after typed n chars  (Read 947 times)

Offline Stefan

  • Administrator
  • Hero Member
  • *****
  • Posts: 774
  • Karma: +6/-0
    • View Profile
Suggest completions only after typed n chars
« on: May 13, 2009, 10:53:49 am »
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
« Last Edit: May 13, 2009, 10:59:47 am by Stefan »
Stefan, HippoEDIT beta tester  (HippoEDIT News On Twitter: http://twitter.com/hippoedit/)

Offline alex

  • Developer
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1712
  • Karma: +29/-2
    • View Profile
    • HippoEDIT
Re: Suggest completions only after typed n chars
« Reply #1 on: May 13, 2009, 11:21:23 am »
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):
Quote
In other editors i have seen an option like:
"Suggest only after typed [ 5] chars "

Best regards,
Alex.

Offline Stefan

  • Administrator
  • Hero Member
  • *****
  • Posts: 774
  • Karma: +6/-0
    • View Profile
Re: Suggest completions only after typed n chars
« Reply #2 on: May 13, 2009, 11:40:11 am »
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: Stefan
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



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

.
« Last Edit: May 17, 2009, 04:54:40 pm by Stefan »

Offline alex

  • Developer
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1712
  • Karma: +29/-2
    • View Profile
    • HippoEDIT
Re: Suggest completions only after typed n chars
« Reply #3 on: May 13, 2009, 03:59:53 pm »
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.

Offline Stefan

  • Administrator
  • Hero Member
  • *****
  • Posts: 774
  • Karma: +6/-0
    • View Profile
Re: Suggest completions only after typed n chars
« Reply #4 on: May 13, 2009, 06:02:21 pm »
No need for hurriedness, but thank you for  consider it :D   *pattingthehippo*

Online JJK

  • Full Member
  • ***
  • Posts: 151
  • Karma: +2/-0
    • View Profile
Re: Suggest completions only after typed n chars
« Reply #5 on: May 13, 2009, 09:41:57 pm »
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 :)

Offline Arthur

  • Hero Member
  • *****
  • Posts: 624
  • Karma: +1/-0
  • He who is ashamed of asking is afraid of learning.
    • View Profile
    • My Blog
Re: Suggest completions only after typed n chars
« Reply #6 on: May 13, 2009, 09:46:57 pm »
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?

Offline alex

  • Developer
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1712
  • Karma: +29/-2
    • View Profile
    • HippoEDIT
Re: Suggest completions only after typed n chars
« Reply #7 on: May 13, 2009, 10:55:04 pm »
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.

Offline Arthur

  • Hero Member
  • *****
  • Posts: 624
  • Karma: +1/-0
  • He who is ashamed of asking is afraid of learning.
    • View Profile
    • My Blog
Re: Suggest completions only after typed n chars
« Reply #8 on: May 14, 2009, 04:08:04 am »
Does this thread http://forum.hippoedit.com/index.php/topic,314.0.html then become redundant?

Offline Stefan

  • Administrator
  • Hero Member
  • *****
  • Posts: 774
  • Karma: +6/-0
    • View Profile
Re: Suggest completions only after typed n chars
« Reply #9 on: May 14, 2009, 07:34:24 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 )

Offline alex

  • Developer
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1712
  • Karma: +29/-2
    • View Profile
    • HippoEDIT
Re: Suggest completions only after typed n chars
« Reply #10 on: May 14, 2009, 10:35:15 am »
Hello Stefan,

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

Best regards,
Alex.

Offline Stefan

  • Administrator
  • Hero Member
  • *****
  • Posts: 774
  • Karma: +6/-0
    • View Profile
Re: Suggest completions only after typed n chars
« Reply #11 on: May 14, 2009, 11:49:24 am »
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<<
« Last Edit: June 07, 2009, 09:48:29 pm by Stefan »

 

Related Topics

  Subject / Started by Replies Last post
8 Replies
1657 Views
Last post February 19, 2009, 05:00:48 pm
by alex
2 Replies
489 Views
Last post February 23, 2009, 12:26:19 pm
by alex
3 Replies
590 Views
Last post April 19, 2009, 10:42:25 pm
by alex
1 Replies
324 Views
Last post July 29, 2009, 10:35:19 am
by alex
3 Replies
76 Views
Last post April 24, 2012, 06:54:32 pm
by alex