{"id":1275,"date":"2014-05-13T16:56:12","date_gmt":"2014-05-13T16:56:12","guid":{"rendered":"http:\/\/blog.filipesaraiva.info\/?p=1275"},"modified":"2014-05-13T16:56:12","modified_gmt":"2014-05-13T16:56:12","slug":"code-completion-in-cantor-script-editor","status":"publish","type":"post","link":"https:\/\/filipe.saraiva.tec.br\/blog\/?p=1275","title":{"rendered":"Code completion in Cantor script editor"},"content":{"rendered":"<p style=\"text-align: justify;\">Some <a href=\"http:\/\/blog.filipesaraiva.info\/?p=1239\" target=\"_blank\">months ago I wrote<\/a> 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 &#8211; so let&#8217;s see the new code completion in Cantor script editor!<\/p>\n<p style=\"text-align: justify;\">I coded a default syntax highlighting to each backend in script editor. Script editor is based on <a href=\"http:\/\/kate-editor.org\/about-katepart\/\" target=\"_blank\">KatePart\/KTextEditor<\/a>, a great piece of code from KDE libs used in several KDE softwares like KWrite, Kate, Kile, KDevelop, and more.<\/p>\n<p style=\"text-align: justify;\">The Kate guys released a new feature in KDE 4.13 release: an <a href=\"http:\/\/scummos.blogspot.com.br\/2014\/02\/kate-intelligent-code-completion-for.html\" target=\"_blank\">improved code completion<\/a> for all languages supported by KTextEditor. It use the same XML file to syntax highlighting from each language to provide this new code completion.<\/p>\n<p style=\"text-align: justify;\">As I coded the default syntax highlighting, the code completion for the script editor was enabled as default too. Amazing!<\/p>\n<p style=\"text-align: justify;\">So, let&#8217;s see some pictures about this feature:<\/p>\n<p style=\"text-align: center;\"><a href=\"http:\/\/blog.filipesaraiva.info\/wp-content\/uploads\/2014\/05\/code-completion-scilab-cantor.png\"><img loading=\"lazy\" decoding=\"async\" data-attachment-id=\"1276\" data-permalink=\"https:\/\/filipe.saraiva.tec.br\/blog\/?attachment_id=1276\" data-orig-file=\"https:\/\/filipe.saraiva.tec.br\/blog\/wp-content\/uploads\/2014\/05\/code-completion-scilab-cantor.png\" data-orig-size=\"504,627\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}\" data-image-title=\"code-completion-scilab-cantor\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/filipe.saraiva.tec.br\/blog\/wp-content\/uploads\/2014\/05\/code-completion-scilab-cantor-241x300.png\" data-large-file=\"https:\/\/filipe.saraiva.tec.br\/blog\/wp-content\/uploads\/2014\/05\/code-completion-scilab-cantor.png\" class=\"size-full wp-image-1276\" src=\"http:\/\/blog.filipesaraiva.info\/wp-content\/uploads\/2014\/05\/code-completion-scilab-cantor.png\" alt=\"code-completion-scilab-cantor\" width=\"504\" height=\"627\" srcset=\"https:\/\/filipe.saraiva.tec.br\/blog\/wp-content\/uploads\/2014\/05\/code-completion-scilab-cantor.png 504w, https:\/\/filipe.saraiva.tec.br\/blog\/wp-content\/uploads\/2014\/05\/code-completion-scilab-cantor-241x300.png 241w\" sizes=\"auto, (max-width: 504px) 100vw, 504px\" \/><\/a><\/p>\n<p style=\"text-align: center;\"><em>Code completion in Scilab<\/em><\/p>\n<p style=\"text-align: justify;\">This figure we use code completion to write a <em>plot<\/em> command in script editor from Scilab backend.<\/p>\n<p style=\"text-align: center;\">\n<a href=\"http:\/\/blog.filipesaraiva.info\/wp-content\/uploads\/2014\/05\/code-completion-maxima-cantor.png\"><img loading=\"lazy\" decoding=\"async\" data-attachment-id=\"1277\" data-permalink=\"https:\/\/filipe.saraiva.tec.br\/blog\/?attachment_id=1277\" data-orig-file=\"https:\/\/filipe.saraiva.tec.br\/blog\/wp-content\/uploads\/2014\/05\/code-completion-maxima-cantor.png\" data-orig-size=\"504,627\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}\" data-image-title=\"code-completion-maxima-cantor\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/filipe.saraiva.tec.br\/blog\/wp-content\/uploads\/2014\/05\/code-completion-maxima-cantor-241x300.png\" data-large-file=\"https:\/\/filipe.saraiva.tec.br\/blog\/wp-content\/uploads\/2014\/05\/code-completion-maxima-cantor.png\" class=\"size-large wp-image-1277\" src=\"http:\/\/blog.filipesaraiva.info\/wp-content\/uploads\/2014\/05\/code-completion-maxima-cantor.png\" alt=\"code-completion-maxima-cantor\" width=\"504\" height=\"627\" srcset=\"https:\/\/filipe.saraiva.tec.br\/blog\/wp-content\/uploads\/2014\/05\/code-completion-maxima-cantor.png 504w, https:\/\/filipe.saraiva.tec.br\/blog\/wp-content\/uploads\/2014\/05\/code-completion-maxima-cantor-241x300.png 241w\" sizes=\"auto, (max-width: 504px) 100vw, 504px\" \/><\/a><\/p>\n<p style=\"text-align: center;\"><em>Code completion in Maxima<\/em><\/p>\n<p style=\"text-align: justify;\">In Maxima backend we can see the code completion working not only to the commands with initial string typed: for example, <em>contour_plot<\/em> is suggested in the figure.<\/p>\n<p style=\"text-align: justify;\">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.<\/p>\n<p style=\"text-align: justify;\">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 &#8211; for example, in Python I can use <em>import numpy<\/em> 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.<\/p>\n<p style=\"text-align: justify;\">But it is work to the future. For now, you can have fun with this new code completion., and thanks for all <a href=\"http:\/\/kate-editor.org\/\" target=\"_blank\">Kate developers<\/a> for this nice feature!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>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 &#8211; so let&#8217;s see the new code completion in Cantor script editor! I coded a default syntax highlighting to each backend in script editor.&hellip;&nbsp;<a href=\"https:\/\/filipe.saraiva.tec.br\/blog\/?p=1275\" class=\"\" rel=\"bookmark\">Continue a ler &raquo;<span class=\"screen-reader-text\">Code completion in Cantor script editor<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"neve_meta_sidebar":"","neve_meta_container":"","neve_meta_enable_content_width":"","neve_meta_content_width":0,"neve_meta_title_alignment":"","neve_meta_author_avatar":"","neve_post_elements_order":"","neve_meta_disable_header":"","neve_meta_disable_footer":"","neve_meta_disable_title":"","jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[9],"tags":[58,11,26,51,109,104,41,52],"class_list":["post-1275","post","type-post","status-publish","format-standard","hentry","category-software-livre","tag-cantor","tag-desenvolvimento","tag-kde","tag-planet-mageia-english","tag-planet-python","tag-planet-scipy","tag-planeta-psl-pi","tag-planetkde-english"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p1p2Jh-kz","jetpack_sharing_enabled":true,"jetpack_likes_enabled":false,"_links":{"self":[{"href":"https:\/\/filipe.saraiva.tec.br\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1275","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/filipe.saraiva.tec.br\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/filipe.saraiva.tec.br\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/filipe.saraiva.tec.br\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/filipe.saraiva.tec.br\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1275"}],"version-history":[{"count":1,"href":"https:\/\/filipe.saraiva.tec.br\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1275\/revisions"}],"predecessor-version":[{"id":1278,"href":"https:\/\/filipe.saraiva.tec.br\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1275\/revisions\/1278"}],"wp:attachment":[{"href":"https:\/\/filipe.saraiva.tec.br\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1275"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/filipe.saraiva.tec.br\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1275"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/filipe.saraiva.tec.br\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1275"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}