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

Repeat Argument Doesn't Seem to Work with Play Macro #178

Open
Remillard opened this issue Aug 15, 2017 · 5 comments
Open

Repeat Argument Doesn't Seem to Work with Play Macro #178

Remillard opened this issue Aug 15, 2017 · 5 comments

Comments

@Remillard
Copy link

I'm not entirely sure how this ought to work, but it seems to be working differently in different situations. So you can issue meta-2 meta-3 ctrl-f and the cursor will move forward 23 spaces.

However, I defined a macro that would insert a space, move the point down, and move the point back (just spacing text over.) I tried meta-5 ctrl-x e and it doesn't seem to repeat a macro 5 times.

@canoeberry
Copy link
Collaborator

canoeberry commented Aug 15, 2017 via email

@Remillard
Copy link
Author

I'll see if I can't get something like that to work. I have SBP installed as a *.sublime-package but maybe I can get it to work if I extract it and remove it from the Package Control list.

For that matter, ctrl-u doesn't work exactly the way it ought to as you should be able to redefine the repeat rate with ctrl-u <nums> ctrl-u and update the repeat value, but again without the same infrastructure as emacs, that might well be impossible, though it might be possible to define a different keybind for updating the value that ctrl-u represents.

@DeeeeLAN
Copy link

I know this is an old ticket, but I wanted to mention that adding run_macro to the repeatable_cmds array definitely fixes this issue. I think that change should be merged to master.

What are the possibilities of getting repeat applied to normal typing? For example, pressing ctrl+u then a letter and it repeats the letter 4 times?

I am used to using the repeat command in emacs like so: ctrl+u, 5, a to have a repeated 5 times. Is there a way to add this to the repeat command in sublime?

@canoeberry
Copy link
Collaborator

Sorry - I have been so busy I haven't been able to do any work on this plugin. I have changes I like but am unsure about that I haven't released yet. In fact, I am not sure I remember how to make a release!

Regarding your desire to insert multiple characters with the numeric arg, the only way to do that would be to create a command which prompts for a character to insert. It's a real drag. There is no way to create a keyboard binding for all the insertable keys. I'd literally have to create a binding for each character and that would just be a real drag.

@DeeeeLAN
Copy link

That's fine, I figured that was the case. And honestly, I rarely need to repeat a character like that, and if I did, I already texted that if I just stick that character in a macro, I can use the above to repeat the macro however many times and it works fine. It isn't 100% parity with emacs, but in the end, the functionality is the same, so I am happy.

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

3 participants