Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Batch find and replace for Sublime Text 2

I have to paste code from a latex source repeatedly, so I have to do a lot of find and replace operations every time ('"a' => 'ä', '"o' => 'ö', ...).

Is there a way to store those search & replace rules, so I can execute all of them with one keypress for example?

like image 330
hoeni Avatar asked Sep 06 '13 11:09

hoeni


People also ask

How do you replace all words in Sublime Text?

To use Find and Replace in Sublime Text 3, you can either click “Find” in the top-bar, then select “Replace” from the list, or you can press the keyboard shortcut Ctrl+H – the same way it works in, for example, Microsoft Office Word.

How do I change occurrences in sublime?

Alt+F3 gives a really simple way to do find and replace: Use it to select all occurrences of the current word or selection, then just start typing to replace or edit them all at once.


1 Answers

Did you check RegReplace? It is a simple find and replace sequencer plugin for Sublime Text 2. It can be installed through Package Installer.

In the end you will have to create some files that will look as follow:

{
    "keys": ["ctrl+shift+t"],
    "command": "reg_replace",
    "args": {"replacements": ["change_a_accent", "change_o_accent"]}
}
like image 80
Rubens Mariuzzo Avatar answered Oct 06 '22 00:10

Rubens Mariuzzo