Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Selection order and clipboard interaction #342

Open
Strackeror opened this issue Aug 6, 2024 · 0 comments
Open

Selection order and clipboard interaction #342

Strackeror opened this issue Aug 6, 2024 · 0 comments

Comments

@Strackeror
Copy link
Contributor

So, I realized something a bit annoying when interacting with multiple selections and the system clipboard, which is that selection are ordered in the inverse of the order they were selected.

For example, doing a naive split by lines on a few json keys results in this:
image

This is pretty consistent within dance, adding selections also 'pushes' other selections back, so generally this feels pretty natural as long as you stay within dance. However, you end up with a very surprising behavior when you actually copy to the system clipboard, yanking the selection on the screenshot and pasting here ends up in this:

    "@vscode/test-electron": "^2.1.3",
    "@typescript-eslint/parser": "^5.23.0",
    "@typescript-eslint/eslint-plugin": "^5.23.0",
    "@types/vscode": "^1.63.0",
    "@types/node": "^17.0.33",
    "@types/mocha": "^9.1.1",
    "@types/glob": "^7.2.0",

The keys have indeed inverted order, how inconvenient !
It also makes something like the index in pipes unnatural to use in a lot of cases where I wanted to use it.

Is this behavior on purpose ? If so, should it be changed ? Maybe it should be an setting somewhere ?
Of note is that helix and kakoune both sidestep this problem by always having selections in document order and nothing else, maybe that could be an option as well ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant