http://facelessuser.github.io/RegReplace/
Reg Replace 可以按照你指定的順序作一系列的 Regex Relpace ,當你每次都需要整理某種特定的文件內容的時候,你可以寫好一套規則,接下來所有的文件來只需要按一鍵就可以完成所有該做的修改。
舉個例子:如果我們想要把所有的 a 都變成 b
點擊 Settings - User 後寫入下面的文字
{
"replacements": {
// Example replacements
"a to b": {
"find": "a",
"replace": "b",
"literal": true,
"greedy": true,
"case": true
}
}
}
點擊 Commands - User 後寫入下面的文字
[
{
"caption": "Reg Replace: test a to b",
"command": "reg_replace",
"args": {"replacements": ["a to b"]}
}
]
點擊 Tools 的 Command Palette...
在文字框輸入 Reg Replace: test a to b 後按下enter 或選取下面的 Reg Replace: test a to b
然後你目前在編輯的所有 a 都會變成 b


