[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-usability
Subject: Adding KDE-wide text autocompletion (emacs, M-/ , dabbrev-expand)?
From: Maurizio Colucci <seguso.forever () tin ! it>
Date: 2004-07-19 20:09:36
Message-ID: 200407192209.44990.seguso.forever () tin ! it
[Download RAW message or body]
Hello,
Altough a die-hard emacs user, many times I tried to use editors like kwrite,
kate, kdevelop, eric3, etc. Unfortunately there is one thing in emacs I
cannot do without: the autocompletion feature (M-/). I think it's called
dabbrev-expand in emacs.
Actually, this feature is so important I have wondered how can programmers
actually use kdevelop/kwrite. And imagine having it in kmail, knode!
------
In case someone is interested in implementing it, here are some errors to
avoid:
1) Suppose I type one letter, or a sequence of letters, then press M-/. Then,
the completions should be ordered by DISTANCE, not alphabetically (like eric3
does). This is crucial (ask me why if you are interested.).
Example:
Imagine we press M-/ when the cursor is in position | in the following buffer:
hbbbbbbb
hddddddd
h|
hccccccccc
haaaaaaaaa
Then, the completions should appear in this order:
[ hdddddd, hcccccccc, hbbbbbbb, haaaaaa]
that is, not ordered by name, but by distance (and if two words have the same
distance, you prefer the one above).
2) To make the usage of completions more intuitive, you may think of using an
openoffice-like or eric3-like approach, i.e. a popup list. But IMHO this is
not a good idea, because the list would popup only when I have typed a
letter; but in emacs you can press M-/ also when you haven't typed any
letter! In that case, the meaning of M-/ changes completely:
Example: suppose the cursor is in position | in the following buffer:
aa ddd aa bbb ccc aa |
and I press M-/. Then the program should insert "bbb", i.e the nearest word
that follows "aa". If I press M-/ again, it should delete the "bbb" just
added, and insert "ddd" --- that is the next nearest word that follows "aa".
And so on.
Comments?
Mau
_______________________________________________
kde-usability mailing list
kde-usability@kde.org
https://mail.kde.org/mailman/listinfo/kde-usability
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic