Delete/change/yank around indentation scope #1633
drowning-cat
started this conversation in
Show and tell
Replies: 1 comment 2 replies
-
That's really cool!!! Tnx for sharing this 😄 |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Idea
https://www.reddit.com/r/neovim/comments/1i8eyyq/remove_outer_indentation_with_miniindentscope
Video
scope.mp4
Description
After
gcS
, the text will be:After
dS
, the text will be:After
cS
, the text will be:After
yS
, the default register will contain (linewise):Support for
vim.v.operator
:After
2dS
, the text will be:Code
Manual (recommended)
Snacks.scope.get + treesitter
Try using manual first
I won't maintain it
It doesn't work when treesitter isn't applied
Fine, you win
Edge cases
gcS
undo does not restore the cursor properly (see Restore cursor position when triggering undo neovim/neovim#5989).edge
lines are commented out.gcS
only comments the scope, it does not uncomment.Beta Was this translation helpful? Give feedback.
All reactions