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

Query replace? #126

Open
kevin-coelho opened this issue Jan 19, 2016 · 8 comments
Open

Query replace? #126

kevin-coelho opened this issue Jan 19, 2016 · 8 comments

Comments

@kevin-coelho
Copy link

I'm used to emacs M-% opening query replace, however on ST2 (Windows 7), I'm getting split screens by pressing M-%. How can I resolve this?

@canoeberry
Copy link
Collaborator

You should be able to specify your own binding for super+% or alt+%.

@kevin-coelho
Copy link
Author

Sorry if I was unclear - I'm trying to do a query replace. What is the command for this in sublemacspro? It seems that the standard behavior in emacs has been overridden and I don't know the key binding for query replace using sublemacspro.

@canoeberry
Copy link
Collaborator

Maybe CMD-R (on Macs, anyway).

@canoeberry
Copy link
Collaborator

I should probably delete that key binding … I never use it because I use multi cursor support in the incremental search instead.

@kevin-coelho
Copy link
Author

In order of key commands, what would I press to search for something, then end my search and create multi-cursors at the start locations of all my search results? ctrl+s, then alt+a, then return? That doesn't seem to work for me.

@canoeberry
Copy link
Collaborator

I cannot figure out how to get Windows to stop stealing the alt and super keys. So yeah, it's kinda hard to do right now. Sorry. I don't know enough about Windows. I installed sublime in my virtual machine last weekend but couldn't get past this.

If you can get sublime to honor the key bindings, you would do this:

ctrl+s "some text"

and then ctrl+s again to skip to the next one, or cmd+d or alt+d to skip to the next one but leave a cursor at the current one, or cmd+a to select all future ones (in the current direction) and/or another cmd+a to select the rest of them in the other direction, and then press Return to start editing all the cursors. It's brilliant because, of course, it's much more powerful than query-replace because you can type whatever you want and perform editing commands.

One of the thing things you can do, for example, is commands like kill-line or set a mark on each cursor and kill a region, and then yank it back at each cursor. It's very powerful, not built-in to basic sublime. That is the properly managed multiple separate kill buffers for each cursor isn't part of regular sublime but it means you can do some amazing things.

But again, not until we figure out how to get the key bindings past Windows.

@kevin-coelho
Copy link
Author

Any suggestions for this or would it require a sublemacs patch to fix?

@canoeberry
Copy link
Collaborator

I think the problem is with Sublime. Certain keys do not seem to be bindable for some reason.

However, I didn’t dig deep enough to be sure, so I suppose it’s really up to me to make sure.

But if you want to search sublime to see if there are any issues about key binding being honored on windows, that would be helpful :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants