Reputation: 343
When I use the sublime text 2, I install the sublime alignment, but the ctrl+alt+a doesn't work.See the screenshots below for more details.
Upvotes: 10
Views: 14893
Reputation: 431
Key bombination: Ctrl + Alt + A
In the plugin user config file:
{
"alignment_space_chars": [
"=",
"=>",
":"
],
}
To open this configuration file: Preferentes/Package Settings/Alignment/Settings - User
Upvotes: 0
Reputation: 11202
{ "keys": ["alt+a"], "command": "alignment" }
binding.I'm on Sublime 3.
For whatever reason default { "keys": ["ctrl+alt+a"], "command": "alignment" }
that's automatically included on Alingment package install didn't work for me. I did try searching for conflicting keys, nothing found.
But { "keys": ["alt+a"], "command": "alignment" }
did work, now that's what I'm using.
Upvotes: 4
Reputation: 485
Go to Preferences > Package Settings > Alingment > Key Bindings (default) and make sure that there is this code:
[
{ "keys": ["ctrl+alt+a"], "command": "alignment" }
]
Also check all the other key bindings for your other installed packages if there are some conflicts between key bindings (sometimes the same shortcut is used by more than one package).
Upvotes: 10
Reputation: 121
I had the same issue with Alignment plugin.
Follow these steps:
Open the preferences file for Sublime Alignment:
The file should be empty. Put the following in it:
{
// The mid-line characters to align in a multi-line selection, changing
// this to an empty array will disable mid-line alignment
"alignment_chars": [
"=", ":"
]
}
Upvotes: 12
Reputation: 1006
In Preferences > Package Settings > Alignment > Settings – User add :
"alignment_chars": ["=", ":"]
Upvotes: 1
Reputation: 4439
Are you sure you're using Sublime Text 2 and not Sublime Text 3? I ask because I had moved to ST3 and the "alignment" package doesn't work for ST3. I had to use the "AlignTab" package for ST3 to achieve this functionality. Should be able to check in the menu: Sublime Text -> About Sublime Text -> your build number should start with 2 or 3.
Probably isn't your issue, but sometimes it's the simple things that get us!
Upvotes: 5
Reputation: 3067
Open sublime text, and go to Preferences>Browse Packages and find Alignment plugin folder, Inside that folder create a new file "php.sublime-settings" and add below lines to it
{
"alignment_chars": ["=", "=>"]
}
Upvotes: 5
Reputation: 346
You are using a font that has different sizes for characters and spaces. You want a font that has equal sizes for both characters and spaces. Those fonts are called monospaced. I had the same issue with the "Ubuntu" font, once I setted it to "Ubuntu Mono" it worked just fine. I am pretty sure that there are a lot of monospaced fonts out there.
go to preferences > Settings - User and edit the code there, save and you are done.
mine looks like this:
{
"font_face" : "ubuntu mono" ,
"font_size" : 15 ,
}
Upvotes: 12
Reputation: 11
Go to Preferences > Key Bindings (default) and comment out line 564 to 568 like this:
// { "keys": ["super+alt+a"], "command": "toggle_preserve_case", "context":
// [
// { "key": "setting.is_widget", "operator": "equal", "operand": true }
// ]
// },
Upvotes: 1