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

add ability to nest levels of ò and ñ #24

Open
tuftman-0 opened this issue May 30, 2018 · 2 comments
Open

add ability to nest levels of ò and ñ #24

tuftman-0 opened this issue May 30, 2018 · 2 comments

Comments

@tuftman-0
Copy link

Hi, I'd really like to be able to make nested loops in V. Would it be possible to add this functionality sometime? so like ò{big loop ò{ loop for each big loop ò} still big loop ò} maybe add a "close loop" character for ò and ñ.

@DJMcMayhem
Copy link
Owner

DJMcMayhem commented May 30, 2018

Hmm. I like this idea in concept. It's actually something I've given quite a bit of thought to before. But there are some issues that would need to be figured out first.

  • Right now, both <M-r> (ò) and <M-q>(ñ) record into register 'q'. So 4ñ<code>ñ is equivalent to qq<code>q3@q. If we allowed nested loops, we'd have to figure out which registers they're going into.

  • Both looping commands rely heavily on the ability to break the loop early, for example by performing an invalid :s/ command or using hjkl to attempt to move out of bounds. What should happen when an inner loop breaks? Right now that would break the outer loop too, but it seems like that would limit usefulness.

@tuftman-0
Copy link
Author

ok, let me know if you'd like me to try to help with something. I don't really know vimscript, but I know python pretty 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

2 participants