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

How to access region-specific registers? #209

Open
cander111 opened this issue May 6, 2022 · 1 comment
Open

How to access region-specific registers? #209

cander111 opened this issue May 6, 2022 · 1 comment

Comments

@cander111
Copy link

cander111 commented May 6, 2022

I often need to evaluate small selections of text with python, which can be accomplished with a selection in visual mode with the following command:

c<C-R>=py3eval(@")<CR><ESC>

This command works by first deleting the text into the " register, and then retrieving the contents of " as the input for the py3eval() command.

If I have some selections in visual-multi mode that I want to evaluate, typing c behaves as expected, but then is there a way to get the value of each region's register?

@mg979
Copy link
Owner

mg979 commented May 6, 2022

Try :help vm-transform, but it works from normal mode.

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

2 participants