Sublime Forum

RegReplace for ST2

#1

Having difficulty setting up a command to use the RegReplace plugin.
Documentation may be ST3 specific. I’m using ST2.

In C:\Users{ME}\AppData\Roaming\Sublime Text 2\Packages\RegReplace\Default.sublime-commands
I can change the caption and see if affected in the Command Menu

To this file I added (without the comment symbols)
// {
// “caption”: “RegReplace: My test command”,
// “command”: “reg_replace”,
// “args”: {
// “replacements”: [
// “reg_test_replace”
// ]
// }
// }

In C:\Users{ME}\AppData\Roaming\Sublime Text 2\Packages\User\reg_replace_rules_sublime-settings
I added this code in the Example replacements section:
// Example replacements
“format”: “3.0”,
“replacements”: {

// Test the RegReplace Sublime Plugin
“reg_test_replace”: {
“find” : “testxxxxx”,
“replace”: “it works!”
}
}

This corrupted the Command Menu so that RegReplace doesn’t show up .

I don’t know if “format” refers to Sublime Text version or something else.
So I tried changing it to 2.0 but the effect was the same

Also, I don’t see any of the example replacement selections in the menu for RegReplace.
But I assumed that had something to do with those replacement examples not being tied to a command in Default.sublime-commands.

Thanks in advance for any advise. And before you say upgrade to 3.0, that isn’t an option at this time.

0 Likes

#2

I am not using it but the “latest” ST2 release is https://github.com/facelessuser/RegReplace/tree/st2-1.10.1. Maybe its readme can help you. Of course, you have to make sure you are using a ST2 compatible version.

0 Likes

#3

RegReplace is only for ST3. Sorry. Time to upgrade.

1 Like

#4

I see. I hadn’t seen this. The plugin was started with ST2 so functionality is probably limited.

Thanks for the replies.

0 Likes