Localization bracket extension for Visual Studio Code
Surround the selection with localization brackets.
Features
Inserts open and close notations on both ends of the current selection(s).
The following commands have been implemented:
Command |
Description |
Notation |
Suggested Key |
extension.embraceLocalization |
Surround with Locale Brackets |
{{ __(' ') }} |
cmd+k, cmd+l |
extension.embraceLocalizationPhp |
Surround with Locale Brackets |
__(' ') |
cmd+k, cmd+p |
|
|
|
|
How to Use
Select the text that you need to surround and press the configured key binding.
Configuration
To avoid shortcut conflicts and localization issues, this extension does not set key bindings by itself.
To configure your own keyboard shortcuts, open the Command Palette with ctrl+shift+p
, select Preferences: Open Keyboard Shortcuts and paste the following lines to your keybindings.json file. Modify the key combinations and available commands as you please.
{
"key": "cmd+k cmd+l",
"command": "extension.embraceLocalization",
"when": "editorHasSelection && editorTextFocus"
},
{
"key": "cmd+k cmd+p",
"command": "extension.embraceLocalizationPhp",
"when": "editorHasSelection && editorTextFocus"
}
Source
https://github.com/
Support, issues and bug reports
Create an issue
Release Notes
0.0.1
Initial release.