sublime_alignment icon indicating copy to clipboard operation
sublime_alignment copied to clipboard

Doesn't work at all for me (full steps)

Open andyjeffries opened this issue 14 years ago • 22 comments

I'm using the latest dev build (although I was using released versions). This is what I've tried (also posted to the forum):

  1. Install Alignment via Package:Install

  2. Create a Ruby file containing the following:

[code]key1 = "foo", longer_key = "bar"[/code]

  1. Select that text

  2. I tried using Ctrl+Cmd+a, nothing happened

  3. I changed the key binding in Preferences | Key Binding User to:

{ "keys": ["super+ctrl+]"], "command": "alignment" }

  1. I tried Ctrl+Cmd+], nothing happened

  2. 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?

andyjeffries avatar Dec 15 '11 09:12 andyjeffries

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?

wbond avatar Dec 16 '11 05:12 wbond

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...

andyjeffries avatar Dec 16 '11 09:12 andyjeffries

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.

wbond avatar Dec 16 '11 16:12 wbond

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 :-)

andyjeffries avatar Dec 16 '11 16:12 andyjeffries

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

tonyxiao avatar Feb 07 '12 03:02 tonyxiao

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.

skhilko avatar Feb 07 '12 07:02 skhilko

I had the same issue on dev version (2176) and solved the problem restarting the app.

amelandri avatar Feb 09 '12 13:02 amelandri

Saving the alignment.py and then reloading ST fixes the problem. Thanks guys

joshmfrankel avatar Feb 24 '12 20:02 joshmfrankel

I just had this issue as well. Restarting sublime (beta build 2181) fixed the issue for me. No need to touch alignment.py.

mm53bar avatar Mar 01 '12 14:03 mm53bar

Same issue, restarting sublime did not fix it -- but opening and saving the .py file did. Thanks guys.

deanrather avatar Jun 15 '12 04:06 deanrather

Same issue. Opening and saving Alignment.py fixed it for me. Thanks!

MattBruce avatar Jul 02 '12 10:07 MattBruce

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.

guilbep avatar Jul 26 '12 14:07 guilbep

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

kapooostin avatar Aug 05 '12 21:08 kapooostin

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

kapooostin avatar Aug 05 '12 21:08 kapooostin

:+1: for me as well. saving + restarting fixed it.

jmazzi avatar Dec 19 '12 18:12 jmazzi

Same issue, resaving alignment.py fixed it, it stayed with a restart

ST V2.0.1 built 2217 Ubuntu x64

digikata avatar May 22 '13 15:05 digikata

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?

nifr avatar Jun 30 '13 16:06 nifr

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.

erbridge avatar Nov 04 '13 00:11 erbridge

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 ?

TontonSancho avatar Mar 14 '14 08:03 TontonSancho

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!

angiechan avatar Apr 23 '14 23:04 angiechan

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.

slhck avatar Mar 26 '15 15:03 slhck

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.

mhabets avatar Apr 13 '16 15:04 mhabets