Writing Kate plugins and enhancing Kate 