Am thinking whether it's achievable to make shortcut key-bindings on user sublime key-map, so that one-key-triggered "find reg expression and replace-all" if can assign custom keybinding will save a lot of work.
For example can be applied to make below answer into shortcut: Sublime Text 2: How to delete blank/empty lines
Thanks to Joyas's answer, Below is the usage that could achieve the above task.
1.install RegReplace plugin for sublime 2/3
2.configure user reg replace function
{
"replacements": {
"remove_blank_lines": {
"find" : "(^\n)",
"replace": "",
"greedy_replace": true
}
}
}
3.configure key bindings
{
"keys": ["ctrl+shift+y"],
"command": "reg_replace",
"args": {"replacements": ["remove_blank_lines"]}
}
- go to font-end press shortcut and it works so good!