Doesn't work at all for me (full steps)
I'm using the latest dev build (although I was using released versions). This is what I've tried (also posted to the forum):
-
Install Alignment via Package:Install
-
Create a Ruby file containing the following:
[code]key1 = "foo", longer_key = "bar"[/code]
-
Select that text
-
I tried using Ctrl+Cmd+a, nothing happened
-
I changed the key binding in Preferences | Key Binding User to:
{ "keys": ["super+ctrl+]"], "command": "alignment" }
-
I tried Ctrl+Cmd+], nothing happened
-
I opened the console and ran:
[code]view.run_command('alignment')[/code]
Nothing happened...
Also tried it using a JSON file as it apparently adds a ":" for JSON files, that didn't work either.
Can you help me figure out what I'm doing wrong?
I am unable to replicate this issue. You mention having a development version, in addition to the releases. There are no newer development builds than the latest release.
Can you open your console (ctrl+`) and scroll to near the top. You should see a block of "Reloading plugin /file/path/to/plugin.py" statements. Do you see any mention of Alignment.py? While you are in there, check to see if any errors are listed in the console.
The only thing I can imagine is going wrong is that some other plugin you have installed has grabbed both of the keyboard shortcuts you have tried. What other packages do you have installed?
Also, what platform are you on, and what version of sublime are you running?
Hey Will, I meant a development version of Sublime Text 2 (Dev build) as well as having previously tried the released alpha versions.
I do see Alignment.py:
Reloading plugin /Users/andy/Library/Application Support/Sublime Text 2/Packages/Alignment/Alignment.py
There are no errors/before after it. https://gist.github.com/9086154aa67ca4803346
Packages installed: Alignment, alternative_autocompletion, git, Goto Documentation, HTML5, (my own one containing snippets only), Package Control, Sublime Brackets, Terminal, Theme Soda, WordHighlight, ZenCoding.
I understand where you're going about the keyboard shortcuts, but as I wrote above I also tried it using the console and typing the command : view.run_command('alignment') - and that didn't work either.
I'm using OS X and 2147 (previously 2145).
Let me know if you need anything else...
I apologize for missing your comment the run_command() statement.
The only time I've seen anything like this before is when a python module dependency was not loading properly. To see if this is the issue, can you open Alignment.py and hit save? This will cause Sublime to reload the plugin, and if it is a dependency issue, the plugin should now work.
How weird! Doing that worked. I then restarted so I could reply with "Ha, but it doesn't work after closing/re-opening sublime - but it still works!!!
I don't know what's going on, but I'm happy that it's now working for me :-)
Exact same error, works now, thanks a ton! I was getting this error in my console previously though, not sure if this has anything to do with it
Reloading plugin /Users/Tony/Library/Application Support/Sublime Text 2/Packages/AAAPackageDev/build_sys_dev.py
Reloading plugin /Users/Tony/Library/Application Support/Sublime Text 2/Packages/AAAPackageDev/commands_file_dev.py
Reloading plugin /Users/Tony/Library/Application Support/Sublime Text 2/Packages/AAAPackageDev/completions_dev.py
Reloading plugin /Users/Tony/Library/Application Support/Sublime Text 2/Packages/AAAPackageDev/json2plist.py
Reloading plugin /Users/Tony/Library/Application Support/Sublime Text 2/Packages/AAAPackageDev/package_dev.py
Reloading plugin /Users/Tony/Library/Application Support/Sublime Text 2/Packages/AAAPackageDev/settings_dev.py
Reloading plugin /Users/Tony/Library/Application Support/Sublime Text 2/Packages/AAAPackageDev/setup.py
Traceback (most recent call last):
File "./sublime_plugin.py", line 59, in reload_plugin
File "./setup.py", line 588, in <module>
url='http://sublimetext.info',
File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/distutils/core.py", line 106, in setup
attrs['script_name'] = os.path.basename(sys.argv[0])
AttributeError: 'module' object has no attribute 'argv'
Reloading plugin /Users/Tony/Library/Application Support/Sublime Text 2/Packages/AAAPackageDev/snippet_dev.py
Reloading plugin /Users/Tony/Library/Application Support/Sublime Text 2/Packages/AAAPackageDev/sublime_inspect.py
Reloading plugin /Users/Tony/Library/Application Support/Sublime Text 2/Packages/AAAPackageDev/syntax_def_dev.py
Reloading plugin /Users/Tony/Library/Application Support/Sublime Text 2/Packages/Alignment/Alignment.py
Reloading plugin /Users/Tony/Library/Application Support/Sublime Text 2/Packages/Default/comment.py
Having the same problem with the v2.0.0 on linux. Just installed it via Package Control to see how it works on js files.. No errors in the console, Alignment.py seems to be loading fine. The trick with manual save of Alignment.py doesn't work.
I had the same issue on dev version (2176) and solved the problem restarting the app.
Saving the alignment.py and then reloading ST fixes the problem. Thanks guys
I just had this issue as well. Restarting sublime (beta build 2181) fixed the issue for me. No need to touch alignment.py.
Same issue, restarting sublime did not fix it -- but opening and saving the .py file did. Thanks guys.
Same issue. Opening and saving Alignment.py fixed it for me. Thanks!
Looks like I have a hint about the reason. When I save the Alignment.py the compile version (Alignment.pyc) went from 1kb to 4kb in the finder.
Saving the alignment.py and then reloading ST helped me only once. Is there another way to fix it?
Win7 x64, ST build 2216 portable
Saving the alignment.py and then reloading ST helped me only once. Is there another way to fix it?
Win7 x64, ST build 2216 portable
:+1: for me as well. saving + restarting fixed it.
Same issue, resaving alignment.py fixed it, it stayed with a restart
ST V2.0.1 built 2217 Ubuntu x64
Windows 7 x64 - ST3 3.0.48-x64
Installed plugin using:
git clone -b python3 git://github.com/kevinsperrine/sublime_alignment.git
Afterwards shortcut didn't do anything but running view.run_command('alignment') from console worked.
opening/saving Alignment.py and restarting ST3 didn't fix the issue.
re-binding the alignment keybinding to ctrl+shift+aworked flawlessly.
Tested using a fresh install with only sublime_alignment and no other plugin ctrl+alt+a doesn't work :-/
Searching for ctrl+alt+a does not find anything in my user keybindings. Only similar matches are:
{ "keys": ["ctrl+a"], "command": "select_all" }, { "keys": ["ctrl+k", "ctrl+a"], "command": "select_to_mark" }, { "keys": ["alt+a"], "command": "toggle_preserve_case", "context": [ { "key": "setting.is_widget", "operator": "equal", "operand": true } ] },
Any ideas?
I had a similar issue with ST3 on Linux installed with Package Control. I found that the .sublime-package hadn't been extracted. Manually extracting the file into the Packages directory solved the problem for me.
I had the same problem than the first description of the bug: 1/ Sublime text 3 (build 3059 on a Linux x64 3.2.0-60-generic) 2/ Sublime Alignment installation via Pakcage Control 3/ Trying to align something ... Nothing happened 4/ Trying to run_command ... Nothing happened (in fact running an unknown 'foo' nor 'alignment' command has the same result ... nothing appears in the console) 5/ Restarting Sublime Text 6/ Alignement work ! (both with run_command and by key shortcut)
Is there a missing plugin registration at package control hot-installation ?
Initial install of alignment plugin with Package Control also didn't work for me. However, after restarting Sublime Text, the alignment shortcut worked for me!
For me it did not work (on Windows) because KeePass 2 was using the Ctrl-Alt-A shortcut for its auto-type feature.
I had to disable the KeePass keyboard shortcut and alignment started working again.
Same issue for me with ST3 on Ubuntu 14.10. FindKeyConflicts doesn't find any conflict with ctrl+alt+a. Nevertheless, changing the key binding for something else worked for me.