Skip to content

Multi-cursor editing in the Linux SQL editor #3648

Open

Description

@datlechin

Problem

The Linux SQL editor has one cursor. linux/ROADMAP.md, Backlog, SQL editor, lists "Multi-cursor editing." Renaming an alias in five places, or adding a column to several lines of an INSERT, takes five separate edits.

The editor is GtkSourceView, and the sourceview5 0.11 bindings the app uses (linux/Cargo.toml:92) expose no multi-cursor API, so this is work in the app or upstream, not a setting to turn on.

Proposed solution

  • Add a cursor at the next match of the selection, and select all matches of it.
  • Add a cursor on the line above or below.
  • Add or remove a cursor with a modifier and click.
  • Typing, deleting, pasting and moving by word apply at every cursor, and one undo takes back the whole edit.
  • Escape returns to one cursor.
  • Pick shortcuts that do not clash with GNOME's or the app's own, and list them in the shortcuts dialog.
  • Decide whether to build it on GtkTextBuffer marks in the app or to work on it with GtkSourceView upstream, and record the choice.

Done means: three cursors type and delete together in an editor tab, and one undo reverts all three edits.

Alternatives considered

Find and replace with Ctrl+H covers renaming, not editing several lines at once.

Platform

Linux

Related database type

N/A / General

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions