Kate Modes & Filetypes

Thursday, 9 February 2006 | Christoph Cullmann
Modes allow the user to override the default configuration for documents of specified mimetypes or file extensions. When the editor loads a document and the mimetype or file extensions match for one of the defined filetypes, KatePart will read the configuration from the mode and apply the modelines defined. If more filetypes match, the one with the highest priority will be used. To create a filetype, go into the settings dialog available in Kate via Settings > Configure Kate > Open/Save > Modes/Filetypes, then press the New button and fill in the properties. Read More

.kateconfig Files

Thursday, 9 February 2006 | Christoph Cullmann
Kate allows you to specify local document variables by setting the corresponding modelines. The hidden file .kateconfig provides exactly the same functionality, but for all files in the directory. Enable the Feature To use a .kateconfig file you first have to enable the feature by invoking Settings > Configure Kate. In the config page Open/Save you can find the option Search depth for config file, which defaults to Do not use a config file. Read More

Kate Modelines

Thursday, 9 February 2006 | Christoph Cullmann
Kate Part’s modelines – also called Kate document variables – are Kate Part’s implementation of document variables, similar to Emacs and vim modelines. Document variables can be used to set Kate settings local to a file. This is for example for using another indenter than the one defined in the GUI settings. Or assume you work on two projects, the first indents with spaces and the second with tabs, then you can simply add a modeline that contains the specific document variables that set the specific indentation properties. Read More

Writing a Syntax Highlighting File

Thursday, 24 March 2005 | Christoph Cullmann
Note: Please refer to the Kate Handbook for the most recent version of how to write syntax highlighting files. Hint: If you want to write a syntax highlighting file, the XML Completion plugin might be of great help. This section is an overview of the Highlight Definition XML format in KDE4. Based on a small example it will describe the main components and their meaning and usage. The next section will go into detail with the highlight detection rules. Read More

Writing a Kate Plugin

Tuesday, 6 January 2004 | Christoph Cullmann
Introduction First at all, why writing plugins for an editor ? Good question, and I hope I have a good answer: Because we want Kate to be small and all extended features not all users need should go into plugins (like CVS suppport, project managment, coffee cooking ;) Therefore Kate provides a quite full-featured plugin interface and interfaces to all important stuff in the Kate application (the documents, views, windows, sidebar …). Read More