New plugins to the Kate, utils to: Python, JavaScript, Django and XML

The project plugin in kate.git master now has four new more plugins, with many features in each one: Python (autocomplete, smart snippets, parse checker, pep8 checker and pyflakes checker), Javascript (autocompletes, jquery snippet, pretty JSON, and jslint checker), Django (smart snippets and utils to Django template) and XML (pretty xml). There are also many generic functions and generic classes in these that will be useful to the new plugins developers.

I began to develop these plugins in 2009, this was my first version :-). I wanted to set a shortcut to a snippet, as it was not possible (now it is posible) I started to develop these plugins to Kate.

In November 2011, I created a repository on github to develop new features and share them. I have to thank Alejandro Blanco, Jeroen van Veen, Javier Romero, Martin Borho, Justin Chudgar and Yaco Sistemas for helping me in this project.

In October 2012 Christoph Cullmann (Kate maintainer) sent me an e-mail, in which he asked me if I was interested to contribute with KDE project. I answered: “Of course!”…. finally I have a little time, and I have been able to integrate these plugins in the kate.git

Features to Python Plugin:



Python auto complete

Features to Javascript Plugin:

JSLint checker

Features to Django Plugin:

Create a form class

Pretty XML:

Pretty format of an XML code selected

Pretty XML

Generic features:

Also I have added many generic functions and generic classes, likely the more outstanding are the autocompletations. Now you can create a code completion model with very few lines:

import kate
from libkatepate.autocomplete import AbstractJSONFileCodeCompletionModel, reset

class MyCodeCompletionModel(AbstractJSONFileCodeCompletionModel):

    MIMETYPES = [] # List of mimetypes E.G.: ['application/javascript', 'text/html']
    TITLE_AUTOCOMPLETION = "My Auto Completion Model"
    FILE_PATH = 'my_autocompletion.json'
    # Operators to separate the instrunctions
    OPERATORS = ["=", " ", "[", "]", "(", ")", "{", "}", ":", ">", "<",
                 "+", "-", "*", "/", "%", " && ", " || ", ","]

def createSignalAutocompleteJS(view=None, *args, **kwargs):
    view = view or kate.activeView()
    cci = view.codeCompletionInterface()

my_code_completion_model = MyCodeCompletionModel(kate.application)

The my_autocompletion.json file should have this format:

    "xxx": {
      "category": "module",
      "children": {
        "www": {
          "category": "class",
          "children": {}
        "yyy": {
          "category": "constant",
          "children": {}
        "zzz": {
          "category": "function",
          "args": "(x1, x2, x3)",
          "children": {}

I encourage you to participate in the KDE project, for me this participation has been very simple because this community is very, very open.

Thanks all,

Tags:  django  planet  python 

See also: