Ervin Peters:
> The only thing I stumble over sometimes is the key handling when some
> autocomplete suggestion is displayed.
> I would expect that there is one configurable 'accept-key' like [tab] or
> [enter]
Both Tab and Enter are accept keys as that is the behaviour of
other editors such as Visual Studio and is expected by users.
> and the others work as usual in editing, but now, all those
> key-hits are swallowed by that dammend autocomplete suggestion display
> window. Especially the Problem occured in Endline Situations, like
> ...
> I know there is some navigation necessary when using multiple
> suggestions for autocomplete, but I use the one line mode.
There is no one line mode from the point of view of the
autocompletion code. It is just a list with a single element. In SciTE
there is a trigger autocomplete.choose.single that starts
autocompletion whn there is one possibility. Having the autocompletion
code change behaviour when its list has only one element would be
inconsistent and lead to users needing to look and recognise single
line mode or they may lose the autocompletion unexpectedly.
> Is it possible
> a: configure the 'autocompleteacceptkey'?
The accept action is not directly triggered by a key but rather by
the SCI_NEWLINE or SCI_TAB commands. You can map the Enter or Tab keys
to your own code using user.shortcuts. For example, assigning to tool
command 11 (tool commands start at ID 1100):
user.shortcuts=Enter|1111|
command.11.*=doEnter
command.mode.11.*=subsystem:lua,savebefore:no
with this definition in the Lua Startup Script
function doEnter()
if editor:AutoCActive() then
editor:AutoCCancel()
end
editor:NewLine()
end
may do what you want.
> b: to force the autocompletewindow in onelinemode to grab only [ESC] and
> the configured [$autocompleteacceptkey] and leave the others at the
> edit-window?
A single accept key will not be a compatible change.
> c: to force the autocompletewindow in multilinemode to grab
> only [ESC], [Cursor up], [Cursor down] and the configured
> [$autocompleteacceptkey] and leave the others at the
> edit-window?
Large lists need Page Up and Down, Home and End. All typed keys and
backspace affect the selection so need to be seen by autocompletion.
You could intercept the other navigation keys as described above for
Enter.
Neil
_______________________________________________
Scite-interest mailing list
[email protected]
http://mailman.lyra.org/mailman/listinfo/scite-interest