Some months ago I wrote about the new features available in Cantor from KDE 4.13 release. But I did not write about a new nice feature available in that release too – so let’s see the new code completion in Cantor script editor!
I coded a default syntax highlighting to each backend in script editor. Script editor is based on KatePart/KTextEditor, a great piece of code from KDE libs used in several KDE softwares like KWrite, Kate, Kile, KDevelop, and more.
The Kate guys released a new feature in KDE 4.13 release: an improved code completion for all languages supported by KTextEditor. It use the same XML file to syntax highlighting from each language to provide this new code completion.
As I coded the default syntax highlighting, the code completion for the script editor was enabled as default too. Amazing!
So, let’s see some pictures about this feature:
Code completion in Scilab
This figure we use code completion to write a plot command in script editor from Scilab backend.
Code completion in Maxima
In Maxima backend we can see the code completion working not only to the commands with initial string typed: for example, contour_plot is suggested in the figure.
This new code completion is available to all backends that have the script editor plugin implemented. To use it you just type Ctrl+Space in the editor.
There are some improvements to this feature to be implemented in the future. For example, it would be interesting load the functions to modules/packages imported in the editor – for example, in Python I can use import numpy and the numpy functions could be available in code completion too. The variables in the Cantor workspace could be available in the script editor too.
But it is work to the future. For now, you can have fun with this new code completion., and thanks for all Kate developers for this nice feature!