GNOME Bugzilla – Bug 311835
Feature request: Word auto-complet
Last modified: 2019-03-23 20:33:49 UTC
Kate has a greate feature in it, that if gedit had then I'd switch straight away. It was a word autocomplete. Nothing as complex as you might find in a IBM IDE, be really handy for writing complex scripts and avoiding errors. Basically, it keeps a list of the words in the document you are currently editing, then were you start typing a new word, it offers a list of completions that you can then select one from. It's an amazingly simple idea, but also amazingly useful.
Yeah, it's an amazingly feature. I am using it with Anjuta 1.2.4, but I don't need all those IDE tools, so I disabled most of them. I hope someone will add this feature to Gedit, so if support to CR+LF/CR/LF conversions is also added (bug 103753, which I think should be a blocker bug for 2.14), I can finally switch. Paolo Borelli told about a auto-complete plugin that someone wrote for older versions (http://mail.gnome.org/archives/gedit-list/2005-June/msg00007.html): "There was a guy working on a automplete plugin some time ago... http://usuarios.lycos.es/acisif/gedit/autocomplete/autocomplete.html unfortunately the plugin was not stable enough and had some problems so it couldn't be included in gedit itself and we haven't heard back from the guy. If someone wants to resume (or rewrite) such a plugin he can check the archives for some suggestion etc. We still think it would be a useful addition, but we son't have time to work on that ourselves."
I saw the screen record of the new interactive search UI (http://www.gnome.org/~pborelli/screenshots/gedit-search.gif). Everything needed by text auto-complete feature is there: text lookup as you type and list of matches to select. It is basically the new interactive search, without the dialog, without text highlighting and without moving text view or the cursor position to another line or column. Maybe the implementation of auto-complete feature in the core is easier than write a plugin with a lot of code duplicated...
Created attachment 58174 [details] Plugin description
Created attachment 58175 [details] Python implementation Here is a quick and dirty implementation of a completion plugin in python. It does not use gedit's search feature, but it uses a GtkEntryCompletion.
neat! I'll give it a try soon. Feel free to add it to live.gnome.org/Gedit
I've tried the plugin and it works different from the Anjuta style. Using the plugin, you hace to press alt+/ to show the completion while in Anjuta the autocompletion shows automatically. I would like to see it working like in Anjuta.
*** This bug has been marked as a duplicate of bug 439174 ***