Skip to content

[Feature request]: Duplicate lazy line selection #3110

@Gavin-Holt

Description

@Gavin-Holt

Hi

My name is Gavin, and I am a lazy line selector.

I have tried to go straight, but lack the willpower to make pinpoint accurate line selections.

I blame a troubled relationship with the mouse, we never bonded, and I have no love for the little rodent.

My condition is so bad, that sometimes my lazy line selection is backwards - from bottom up!

Thankfully, there is a near perfect solution, the micro editor.

Micro will act upon partially selected lines:

  • MoveLinesDown
  • MoveLinesUp
  • IndentSelection
  • OutSelection
  • lua:comment.comment
  • Textfilter
  • SpawnMultiCursorSelect

The only irregular command I have discovered so far is DuplicateLine, and it trips me up hourly. With no selection, the current line is duplicated. However, with any text selected - only that text is duplicated (see #416).

To duplicate a set of lines, I have to make a pinpoint selection, remembering to include the end-of-line character (not selected with a simple shift end!).

I guess many users will be accustomed to the default behaviour, and it would be unfair for my affliction to inconvenience the majority of law-abiding precision line selectors.

My ideal solution would be a pair of functions DuplicateLinesBelow and DuplicateLinesAbove, which would make copies of the current lazy line selections above or below AND leave my selection (and clipboard) unchanged. e.g.

Before DuplicateLinesBelow :

image

After DuplicateLinesBelow :

image

I am not good at manipulating bp.Cursor.Loc, so a Lua solution is beyond my abilities.

Any help for an incurable lazy line selector would be welcome.

Kind Regards Gavin Holt

OS: Windows 10
Version: 2.0.13
Commit hash: 68d88b5
Compiled on December 12, 2023

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions