Skip to content

Conversation

@awvalenti
Copy link
Contributor

I propose this PR to change vertical block movement. Old behavior: count means "total distance of the movement". New behavior: count means "destination position of block, relative to cursor". See #79.

I made a few experiments and I believe this could become the new default behavior, without requiring configuration. I don't see much usefulness in thinking in terms of distance instead of destination. This is because many (most?) Vim users use relative line numbers all the time. In case you disagree and prefer this to be an opt-in feature, I can add a config for it.

@matze
Copy link
Owner

matze commented Jan 30, 2026

I think it should be made an opt-in feature because a) it is pretty breaking behaviour and b) at least I don't use relative line numbers.

@awvalenti awvalenti force-pushed the master branch 4 times, most recently from f9a4bca to 9c93997 Compare January 30, 2026 17:20
@awvalenti
Copy link
Contributor Author

OK, it's opt-in now. I renamed MoveBlockDown to MoveBlockCountLinesDown to be unequivocal, but added vmap <silent> <Plug>MoveBlockDown <Plug>MoveBlockCountLinesDown so that mappings using previous name keep working. Same with Up.

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

Successfully merging this pull request may close these issues.

2 participants