Getting Started With the Kate Text Editor: Kate For Coders
In the last two articles (part 1, part 2), I looked at getting started with Kate, and then at some of the more advanced features and configuration options. This final article covers features that you may find useful if you regularly write code or markup.
Syntax highlighting automatically colours different words and lines in your file according to their function. So comments will be shown in a different colour from the main code, quoted strings in a different colour again, and so on. It's incredibly useful if you work with any kind of programming, scripting, or markup language.
Kate's predefined syntax highlighting settings cover the vast majority of programming/scripting languages and markup languages, as well as some configuration file types, diff, LDIF and MySQL, and several assembler types. When you open a file, Kate will attempt to automatically detect and apply the appropriate highlighting setting, or you can apply a setting from the Tools->Highlighting menu.
Just in case your preferred language isn't one of the many provided, you can also define your own syntax highlightings, or if you want to vary the ones that are provided, there's scope for that too. Kate's syntax highlighting rules are XML files containing rules for detecting text, keyword lists, and style definitions: to change the behaviour, edit these files.
The Kate syntax highlighting system aims to use the same colours for the same/similar formats across languages, making them easier for you to understand intuitively. It does this by having a set of default styles (e.g. dsNormal, for normal text, dsComment, and dsError) which are used for these sections of the file. This also makes it easier for you to generate your own styles, should you need to.
If you spend a lot of time typing, it's useful to be able to navigate around a file without having to move your hand to the mouse. Unfortunately, Kate doesn't seem to have any keyboard navigation shortcuts, as far as I could tell, or to support the standard readline ones (e.g. Ctrl-A for beginning of line). Navigation is entirely with arrow keys, and Ctrl-arrow to move a word at a time. This isn't uncommon in graphical text editors, but if you're used to the extensive keyboard navigation options of editors like emacs and vi(m), it can feel a bit clunky.
One nice touch is that using Ctrl + the up/down arrows scrolls the file without moving the insert point – so you can go check a function definition or anything else elsewhere in your file without losing where you're editing.
Solid state disks (SSDs) made a splash in consumer technology, and now the technology has its eyes on the enterprise storage market. Download this eBook to see what SSDs can do for your infrastructure and review the pros and cons of this potentially game-changing storage technology.
- 1Linux Top 3: GNOME 3.12 and New Betas for Ubuntu 14.04 and OpenMandriva Lx 2014.0
- 2Linux Top 3: Linus Lashes out, Linux 3.14 Gets PIE and Ubuntu One is Done.
- 3Linux Top 3: Ubuntu 14.04, Debian Gives Squeeze More Life and Red Hat Goes Atomic
- 4Linux Top 3: Linux 3.11, Kubuntu Goes Commercial
- 5Linux Top 3: RHEL 6.5, Debian 7.2 and EOL for Linux 3.0.x