LinuxCommandLibrary

kate

Edit text files

TLDR

Open specific files

$ kate [path/to/file1 path/to/file2 ...]
copy

Open specific remote files
$ kate [https://example.com/path/to/file1 https://example.com/path/to/file2 ...]
copy

Create a new editor instance even if one is already open
$ kate [[-n|--new]]
copy

Open a file with the cursor at the specific line
$ kate [[-l|--line]] [line_number] [path/to/file]
copy

Open a file with the cursor at the specific line and column
$ kate [[-l|--line]] [line_number] [[-c|--column]] [column_number] [path/to/file]
copy

Create a file from stdin
$ cat [path/to/file] | kate [[-i|--stdin]]
copy

Display help
$ kate [[-h|--help]]
copy

SYNOPSIS

kate [Qt options] [--] [files...] | kate --daemon [files...] | kate --list [files...] | kate --pid[=pid] | kate --restore[=session] | kate --stop

PARAMETERS

-b, --block
    Block until instance exits (non-daemon mode)

--daemon
    Run in daemon mode; subsequent invocations send files to existing instance

--list
    List files open in daemon instance

--pid[=pid]
    Print daemon process ID (optionally check specific PID)

--restore[=session]
    Restore previous session (optionally named)

--stop
    Stop daemon instance

-s, --session session
    Load/save specific session name

--new-session
    Start new session instead of restoring

-h, --help
    Show help message

-v, --version
    Display version information

DESCRIPTION

Kate is the default text editor of the KDE Plasma desktop environment, designed for both general users and developers. It supports multi-document editing, powerful syntax highlighting for over 300 languages, code folding, bracket matching, and auto-completion. Kate features a built-in terminal, session management, plugins for tasks like linting and build integration, and extensive search/replace capabilities including regex support.

Key strengths include its modal editing (vi input mode), project management, and extensibility via scripts in Python, JavaScript, or Ruby. It handles large files efficiently and offers a customizable interface with multiple split views. Kate is lightweight yet feature-rich, making it ideal for coding, note-taking, or configuration editing. Available on Linux, Windows, and macOS via KDE applications.

CAVEATS

Kate requires KDE libraries (KF5/KF6); may not work optimally without Plasma. Daemon mode can lead to stale processes if not stopped properly. Large files (>1GB) may slow down on low-RAM systems.

PLUGINS

Extend via Document Manager, LSP client, terminal, search plugins; install from Settings > Plugins.

VI MODE

Enable modal editing in Tools > Mode > Vi Input Mode for vim-like experience.

HISTORY

Developed since KDE 2.2 (2002) as a fork of KWrite. Major rewrites in KDE 4 (2008) added multi-document support and plugins. KDE Frameworks 5/6 versions (2014+) enhanced performance, LSP integration, and cross-platform compatibility. Maintained by KDE team; version 24.08 as of 2024.

SEE ALSO

kwrite(1), gedit(1), vim(1), nano(1), emacs(1)

Copied to clipboard