notepad-plus-plus / notepad-plus-plus/notepad-plus-plus

Feature request: Transpose multiple selections

Open
#6,226 20 comments 1 reaction 1 assignee View on GitHub

@donho is already working on this.

Since Dec 30, 2019.

Dominant language
C++
Stars
29.4k
Forks
5.4k
PR merge metrics
No merged PRs in 30d

Description

When multi-editing (Ctrl+select) is enabled, and there are 2 selections, then Ctrl+T (Transpose) should swap the contents of those 2 selections. This should not affect the clipboard, and it should not affect which selection-position is the main selection. If there is only 1 selection, Ctrl+T should do as it does now (transpose lines). If there are 3 or more selections it should rotate their contents.

The same should apply to the rows of a rectangular or column selection (Alt-select) irrespective of whether multi-editing is enabled.

The Edit menu should contain an item "Transpose Ctrl+T". It might change from "Transpose Lines" to "Transpose Selections" to "Transpose Rows" depending on the nature of the selection(s).

This feature exists in Sublime Text:
https://stackoverflow.com/questions/16801313/swapping-text-selections-in-sublime-text-2
and in Visual Studio (via a plug-in):
https://marketplace.visualstudio.com/items?itemName=SSDiver2112.SwapSelection

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.