Last active
July 27, 2021 09:36
-
-
Save soft2help/f64bd7ff1078cf29da714eabf00ff756 to your computer and use it in GitHub Desktop.
Braces (curly braces) in same line in visual code
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // in first place you should install domir.regreplace and enable it after in your settings.json inside .vscode folder or in global settings | |
| // Each time that the file is save it will put first brace in same line of declaration | |
| //in here i use it to php file but can be any file that you want. check the extension documentation https://marketplace.visualstudio.com/items?itemName=DomiR.regreplace | |
| { | |
| "regreplace.commands": [ | |
| { | |
| "name": "brace on same line", | |
| "match": "\\.php?$", | |
| "regexp": "\\)(\\s*)\\n(\\s*)\\{(\\s*)\\n", | |
| "global": true, | |
| "replace": "){\n" | |
| }] | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment