Account Options

  1. Sign in
Google Groups Home
« Groups Home
Incremental SciTE autocompletion
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  17 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Sergey Kishchenko  
View profile  
 More options Dec 9 2008, 12:25 pm
From: Sergey Kishchenko <void...@gmail.com>
Date: Tue, 9 Dec 2008 09:25:31 -0800 (PST)
Local: Tues, Dec 9 2008 12:25 pm
Subject: Incremental SciTE autocompletion
Hi.

SciTE is one of my favourite editors. It have many killer-features,
but I really miss one - Incremental SciTE autocompletion.

Now if you set "autocompleteword.automatic=1" the completion list will
popup automatically but only in case when you have only one completion
variant.

You can hit Ctrl+Enter and all possible choices will popup. I think,
SciTE really misses ability to modify the completion variants list
while typing, incrementally, without hitting ctrl+enter.

I created a patch, that adds this feature to SciTE. Feature can be
turned on by "autocompleteword.incremental=1" property. My solution is
very naive and I want to know, is there any alternative?

Patch:

Index: src/SciTEBase.cxx
===================================================================
RCS file: /cvsroot/scintilla/scite/src/SciTEBase.cxx,v
retrieving revision 1.699
diff -u -p -r1.699 SciTEBase.cxx
--- src/SciTEBase.cxx   27 Nov 2008 22:45:19 -0000      1.699
+++ src/SciTEBase.cxx   9 Dec 2008 13:45:58 -0000
@@ -3084,7 +3084,7 @@ void SciTEBase::CharAdded(char ch) {
                                        StartAutoComplete();
                                }
                        } else if (autoCCausedByOnlyOne) {
-                               StartAutoCompleteWord(true);
+                               StartAutoCompleteWord(!props.GetInt
("autocompleteword.incremental"));
                        }
                } else if (HandleXml(ch)) {
                        // Handled in the routine
@@ -3101,7 +3101,7 @@ void SciTEBase::CharAdded(char ch) {
                                if (autoCompleteStartCharacters.contains(ch)) {
                                        StartAutoComplete();
                                } else if (props.GetInt("autocompleteword.automatic") &&
wordCharacters.contains(ch)) {
-                                       StartAutoCompleteWord(true);
+                                       StartAutoCompleteWord(!props.GetInt
("autocompleteword.incremental"));
                                        autoCCausedByOnlyOne = SendEditor(SCI_AUTOCACTIVE);
                                }
                        }


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Frank Wunderlich  
View profile  
 More options Dec 9 2008, 7:32 pm
From: Frank Wunderlich <frank.wunderl...@gmail.com>
Date: Wed, 10 Dec 2008 01:32:33 +0100
Local: Tues, Dec 9 2008 7:32 pm
Subject: Re: [scite] Incremental SciTE autocompletion
Hi Sergey,
nice patch, i've missed this like you.
but there are some issues with it,
- the list should be also triggered on backspace to increase the list again.
- the list should also be hidden if there is no word anymore.
- the list should be decremented when shown without
autocompleteword.automatic=1 (triggered by ctrl+enter)

if this is patched, maybe neil accept this patch.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Sergey Kishchenko  
View profile  
 More options Dec 10 2008, 9:53 am
From: Sergey Kishchenko <void...@gmail.com>
Date: Wed, 10 Dec 2008 06:53:42 -0800 (PST)
Local: Wed, Dec 10 2008 9:53 am
Subject: Re: Incremental SciTE autocompletion
On 10 дек, 02:32, Frank Wunderlich <frank.wunderl...@gmail.com> wrote:

> Hi Sergey,
> nice patch, i've missed this like you.
> but there are some issues with it,
> - the list should be also triggered on backspace to increase the list again.
> - the list should also be hidden if there is no word anymore.
> - the list should be decremented when shown without
> autocompleteword.automatic=1 (triggered by ctrl+enter)

> if this is patched, maybe neil accept this patch.

Yeah, I foreget about backspace :) I created patches for scintilla and
scite (http://groups.google.com/group/scite-interest/web/
incremental_autocompletion.tar.gz). They fix issues from your list.

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Sergey Kishchenko  
View profile  
 More options Dec 11 2008, 4:30 am
From: Sergey Kishchenko <void...@gmail.com>
Date: Thu, 11 Dec 2008 01:30:23 -0800 (PST)
Local: Thurs, Dec 11 2008 4:30 am
Subject: Re: Incremental SciTE autocompletion
For everyone who wants to see, how this feature work, but don't want
to apply the patch I created the screencast with presentation of
feature. You can find it here: http://tilarids.blogspot.com/2008/12/scite-incremental-autocompletion...

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Luis Rascão  
View profile  
 More options Dec 11 2008, 6:17 am
From: Luis Rascão <luis.ras...@gmail.com>
Date: Thu, 11 Dec 2008 03:17:58 -0800 (PST)
Local: Thurs, Dec 11 2008 6:17 am
Subject: Re: Incremental SciTE autocompletion
Great feature! Nice work!
One note though, i had to set the following properties to get it to
work like in your video:

autocompleteword.automatic=1
autocomplete.choose.single=0
autocompleteword.incremental=1

On Dec 11, 9:30 am, Sergey Kishchenko <void...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Sergey Kishchenko  
View profile  
 More options Dec 11 2008, 10:31 am
From: Sergey Kishchenko <void...@gmail.com>
Date: Thu, 11 Dec 2008 07:31:43 -0800 (PST)
Local: Thurs, Dec 11 2008 10:31 am
Subject: Re: Incremental SciTE autocompletion
On 11 дек, 13:17, Luis Rascão <luis.ras...@gmail.com> wrote:

> Great feature! Nice work!
> One note though, i had to set the following properties to get it to
> work like in your video:

> autocompleteword.automatic=1
> autocomplete.choose.single=0
> autocompleteword.incremental=1

> On Dec 11, 9:30 am, Sergey Kishchenko <void...@gmail.com> wrote:

> > For everyone who wants to see, how this feature work, but don't want
> > to apply the patch I created the screencast with presentation of
> > feature. You can find it here:http://tilarids.blogspot.com/2008/12/scite-incremental-autocompletion...

Yes, i always used

autocompleteword.automatic=1
autocomplete.choose.single=0

so I forgot to say about that.
Frank Wunderlich noticed some bug in implementation, this patch should
fix it http://groups.google.com/group/scite-interest/web/incremental_autocom...


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Frank  
View profile  
 More options Dec 11 2008, 10:54 am
From: Frank <frank.wunderl...@gmail.com>
Date: Thu, 11 Dec 2008 07:54:04 -0800 (PST)
Local: Thurs, Dec 11 2008 10:54 am
Subject: Re: Incremental SciTE autocompletion
Scite-Ru-Patch is listed there:
http://code.google.com/p/scite-ru/issues/detail?id=129

regards Frank


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Neil Hodgson  
View profile  
 More options Dec 11 2008, 8:37 pm
From: "Neil Hodgson" <nyamaton...@gmail.com>
Date: Fri, 12 Dec 2008 12:37:17 +1100
Local: Thurs, Dec 11 2008 8:37 pm
Subject: Re: [scite] Re: Incremental SciTE autocompletion
   The test at the top of  StartAutoCompleteWord is strange: its
effect is to remove the autocompletion if you backspace to the start
of the line. Perhaps it is supposed to remove the autocompletion if
you backspace to the starting point.
   The SCN_AUTOCUPDATED handler will interfere with other uses of
autocompletion such as Complete Symbol and Lua scripts.
   Unless SCN_AUTOCUPDATED is supposed to be fired in more cases then
it is poorly named as it fires only when a character is deleted.
   The relationship between the autocompleteword properties is messy:
perhaps this should be mode 2 of autocompleteword.automatic rather
than a separate property.
   This will need documentation patches to be accepted.

   Neil


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Sergey Kishchenko  
View profile  
 More options Dec 12 2008, 6:02 am
From: Sergey Kishchenko <void...@gmail.com>
Date: Fri, 12 Dec 2008 03:02:23 -0800 (PST)
Local: Fri, Dec 12 2008 6:02 am
Subject: Re: Incremental SciTE autocompletion
On 12 дек, 03:37, "Neil Hodgson" <nyamaton...@gmail.com> wrote:
>    The test at the top of  StartAutoCompleteWord is strange: its
> effect is to remove the autocompletion if you backspace to the start
> of the line. Perhaps it is supposed to remove the autocompletion if
> you backspace to the starting point.

In original implementation autocompletion window is removed when you
backspace to the postion _before_ starting point. It is ok when you
are in the middle of the line, but it is annoying, when you need to
backspace to previous line to hide autocompletion. Test you mentioned
is aimed to fix this problem. It is unrelated to incremental
autocompletion. Probably, it should be discussed in different
thread.
>    The SCN_AUTOCUPDATED handler will interfere with other uses of
> autocompletion such as Complete Symbol and Lua scripts.
>    Unless SCN_AUTOCUPDATED is supposed to be fired in more cases then
> it is poorly named as it fires only when a character is deleted.

Is there any test cases for me to test these features with my patch?
Probably, rename is the only thing that is needed.
>    The relationship between the autocompleteword properties is messy:
> perhaps this should be mode 2 of autocompleteword.automatic rather
> than a separate property.
>    This will need documentation patches to be accepted.

>    Neil

Agreed. I'll work on it.

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Sergey Kishchenko  
View profile  
 More options Dec 12 2008, 11:06 am
From: Sergey Kishchenko <void...@gmail.com>
Date: Fri, 12 Dec 2008 08:06:57 -0800 (PST)
Local: Fri, Dec 12 2008 11:06 am
Subject: Re: Incremental SciTE autocompletion
I thought about this feature and I think it can be improved. I propose
these improvements:
1. Automatic Symbol Completion. It'll work the same as the existing
`autocompleteword.automatic=1` but for symbols (maybe
autocomplete.automatic=1 should switch this feature on)
2. Automatic Incremental Symbol Completion(autocomplete.automatic=2 ?)
---and far far future planning---
3. Mixed Automatic Completion and Mixed Incremental Completion(words
and symbols are mixed together)

I already improved my patch to support Automatic Incremental Symbol
Completion. I must know if anyone needs "Automatic Symbol Completion"
or Mixed Completion to proceed. Also I'll be glad to hear advices
about how all these things should be implemented.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Frank Wunderlich  
View profile  
 More options Dec 12 2008, 12:08 pm
From: Frank Wunderlich <frank.wunderl...@gmail.com>
Date: Fri, 12 Dec 2008 18:08:08 +0100
Local: Fri, Dec 12 2008 12:08 pm
Subject: Re: [scite] Re: Incremental SciTE autocompletion
Sergey Kishchenko, 12.12.2008 17:06:
> 3. Mixed Automatic Completion and Mixed Incremental Completion(words
> and symbols are mixed together)

sciteRu has the ability to show words and symbols from API-Files
together in the autocomplete list without an extra property. maybe you
can look there for the neccessary code. imho neil rejected the patch, so
it's not available in the original scite-version.

regards Frank


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Neil Hodgson  
View profile  
 More options Dec 12 2008, 6:36 pm
From: "Neil Hodgson" <nyamaton...@gmail.com>
Date: Sat, 13 Dec 2008 10:36:42 +1100
Local: Fri, Dec 12 2008 6:36 pm
Subject: Re: [scite] Re: Incremental SciTE autocompletion
Sergey Kishchenko:

> Test you mentioned
> is aimed to fix this problem. It is unrelated to incremental
> autocompletion. Probably, it should be discussed in different
> thread.

   OK. If you want the autocompletion to go away, press Escape.

>>    The SCN_AUTOCUPDATED handler will interfere with other uses of
>> autocompletion such as Complete Symbol and Lua scripts.
>>    Unless SCN_AUTOCUPDATED is supposed to be fired in more cases then
>> it is poorly named as it fires only when a character is deleted.
> Is there any test cases for me to test these features with my patch?
> Probably, rename is the only thing that is needed.

   Using an API file, press Ctrl+I to display API symbols and type
some initial letters. Press backspace and the API symbols go away to
be replaced with words from the current file.

   Neil


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Neil Hodgson  
View profile  
 More options Dec 12 2008, 6:43 pm
From: "Neil Hodgson" <nyamaton...@gmail.com>
Date: Sat, 13 Dec 2008 10:43:00 +1100
Subject: Re: [scite] Re: Incremental SciTE autocompletion
Sergey Kishchenko:

> I thought about this feature and I think it can be improved. I propose
> these improvements:
> 1. Automatic Symbol Completion. It'll work the same as the existing
> `autocompleteword.automatic=1` but for symbols (maybe
> autocomplete.automatic=1 should switch this feature on)

   Then you have to define which takes precedence.

> 2. Automatic Incremental Symbol Completion(autocomplete.automatic=2 ?)
> ---and far far future planning---
> 3. Mixed Automatic Completion and Mixed Incremental Completion(words
> and symbols are mixed together)

   For my own use, I don't want the two sources of words mixed by default.

   Neil


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Sergey Kishchenko  
View profile  
 More options Dec 22 2008, 6:58 am
From: Sergey Kishchenko <void...@gmail.com>
Date: Mon, 22 Dec 2008 03:58:19 -0800 (PST)
Local: Mon, Dec 22 2008 6:58 am
Subject: Re: Incremental SciTE autocompletion
New version can be found here :
http://groups.google.com/group/scite-interest/web/incremental_autocom...
It consists of
1. Incremental word autocompletion(autocompleteword.automatic=1 and
autocompleteword.automatic=2)
2. Incremental symbol autocompletion (autocomplete.automatic=1 and
autocomplete.automatic=2)
3. Docs patch
4. gtk makefile patches (I use `make DEBUG=1 TRACE=1` for tracing)
5. 'Annoying extra backspace to cancel autocompletion' fixed

I found interesting behaviour. If I use api file, then Word
Autocompletion feature doesn't work properly. For example, I have
'some some2 some3' in my file. If I press Ctrl+Enter, popup window
will contain only 'some' word, but it should contain also the 'some2'
and 'some3' words. This bug reproduces in cvs version. I'll try to
find related issue.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Neil Hodgson  
View profile  
 More options Jan 2 2009, 2:20 am
From: "Neil Hodgson" <nyamaton...@gmail.com>
Date: Fri, 2 Jan 2009 18:20:08 +1100
Local: Fri, Jan 2 2009 2:20 am
Subject: Re: [scite] Re: Incremental SciTE autocompletion
Sergey Kishchenko:

> New version can be found here :
> http://groups.google.com/group/scite-interest/web/incremental_autocom...
> It consists of
> 1. Incremental word autocompletion(autocompleteword.automatic=1 and
> autocompleteword.automatic=2)
> 2. Incremental symbol autocompletion (autocomplete.automatic=1 and
> autocomplete.automatic=2)
> 3. Docs patch

   Looks like it still doesn't cope with scripted autocompletion lists.

   To test with scripted autocompletion you can add to your startup
script something like:

function ShowList()
        editor:AutoCShow(1, "abc bbb def")
end

   Then in user properties:

command.name.5.*=ShowList
command.5.*=ShowList()
command.subsystem.5.*=3

   Then restart SciTE.

> 4. gtk makefile patches (I use `make DEBUG=1 TRACE=1` for tracing)

   Don't want this.

> 5. 'Annoying extra backspace to cancel autocompletion' fixed

   When I deliberately start an autocompletion I don't want it to
disappear just because I have undone the typing.

> I found interesting behaviour. If I use api file, then Word
> Autocompletion feature doesn't work properly. For example, I have
> 'some some2 some3' in my file. If I press Ctrl+Enter, popup window
> will contain only 'some' word, but it should contain also the 'some2'
> and 'some3' words. This bug reproduces in cvs version. I'll try to
> find related issue.

   This happens without an API file as well. The set of characters allowed for
the list of words comes from the word.characters.<filepattern> setting
which doesn't include digits. The documentation says that this is supposed
to default to including digits but it doesn't. Probably best to change
default to match documentation.

   Neil


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Sergey Kishchenko  
View profile  
 More options Jan 8 2009, 10:48 am
From: Sergey Kishchenko <void...@gmail.com>
Date: Thu, 8 Jan 2009 07:48:07 -0800 (PST)
Local: Thurs, Jan 8 2009 10:48 am
Subject: Re: Incremental SciTE autocompletion
On 2 янв, 09:20, "Neil Hodgson" <nyamaton...@gmail.com> wrote:

I tried this feature and I didn't find any bugs related to the patch.
Patched SciTE acts the same as the original SciTE. What kind of
problems with scripted autocompletion do you have?

> > 4. gtk makefile patches (I use `make DEBUG=1 TRACE=1` for tracing)

>    Don't want this.

Ok.

> > 5. 'Annoying extra backspace to cancel autocompletion' fixed

>    When I deliberately start an autocompletion I don't want it to
> disappear just because I have undone the typing.

Ok.

>    This happens without an API file as well. The set of characters allowed for
> the list of words comes from the word.characters.<filepattern> setting
> which doesn't include digits. The documentation says that this is supposed
> to default to including digits but it doesn't. Probably best to change
> default to match documentation.

I'll comment in the following bug-tracker's thread.

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Neil Hodgson  
View profile  
 More options Jan 8 2009, 5:10 pm
From: "Neil Hodgson" <nyamaton...@gmail.com>
Date: Fri, 9 Jan 2009 09:10:59 +1100
Local: Thurs, Jan 8 2009 5:10 pm
Subject: Re: [scite] Re: Incremental SciTE autocompletion
Sergey Kishchenko:

> I tried this feature and I didn't find any bugs related to the patch.
> Patched SciTE acts the same as the original SciTE. What kind of
> problems with scripted autocompletion do you have?

   There is a bit of global state associated with the 'only one' mode.
If you cancel (with Esc) from an 'only one' popup, I think that state
persists so when you use backspace on the scripted autocompletion it
replaces the autocompletion with a list of similar words, just as if
it was invoked for that purpose rather than by the script. Any state
changed by entering an 'only one' popup should be cleared when it goes
away for any reason or else the code that responds to the backspace
needs to work out why the autocompletion was shown.

   Neil


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »