DEV Community

Bruno Haible
Bruno Haible

Posted on

Kubuntu 26.04 — Customizing KDE kate

After customizing KDE in general, you will want to customize its advanced text editor, called "kate".

Start it and then do these settings changes:

  Settings > Configure kate > Appearance > Borders: Left side: Show line numbers: Disable.

Enter fullscreen mode Exit fullscreen mode

Line numbers in every editor window is overkill. I want to concentrate on the text.

  Settings > Configure kate > Editing > General: Automatically close bracket when opening bracket is typed: Disable.

Enter fullscreen mode Exit fullscreen mode

While it can be a nice feature, it ends up disturbing me when I type code more often than it is helpful.

  Settings > Configure kate > Editing > Indentation: Tab width 8
  Settings > Configure kate > Editing > Indentation: Indentation width 8

Enter fullscreen mode Exit fullscreen mode

In Unix, a tab is 8 columns wide, not 4. I don't want glibc source code to look misindented just because my editor's settings are wrong.

  Settings > Configure kate > Editing > Indentation: Backspace key in leading blank space unindents: Disable.
  Settings > Configure kate > Editing > Indentation: Adjust indentation of code pasted from the clipboard: Disable.

Enter fullscreen mode Exit fullscreen mode

Automatic indentation adjustments do the wrong thing for me too often. Especially with C code that uses GNU style indentation.

  Settings > Configure kate > Open/Save > Advanced: Write a backup file on save for local files: Enable.

Enter fullscreen mode Exit fullscreen mode

I don't want to lose hours of editing just by making a mistake in a file once and saving. A backup file is a good insurance. If the backup files clutter up over time, it's easy to remove them: rm -f $(find . -type f -name '*~').

  Settings > Configure Keyboard Shortcuts > katepart > Dynamic Word Wrap: F10

Enter fullscreen mode Exit fullscreen mode

Sometimes I want wrapped lines, sometimes I don't. It depends on what I do. So I use F10 to toggle word wrap on/off.

  File > Print/Export > Print > Options>> > Header & Footer: Print header: Disable.
  File > Print/Export > Print > Options>> > Header & Footer: Print footer: Disable.
  File > Print/Export > Print > PDF > Properties > Page > Margins (= [Kate Print Settings][Margins])
    top=10.29
    left=8.79
    right=3.79
    bottom=5.29
Enter fullscreen mode Exit fullscreen mode

These are good settings for printing something in such a way that there will be no loss at the margins. This dialog tells the printing applications where on each page to place the contents.

Top comments (0)