Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

initial ST3 support #38

Merged
merged 4 commits into from Aug 8, 2013

Conversation

Projects
None yet
Contributor

kevinsperrine commented Feb 12, 2013

No description provided.

Geczy commented Feb 15, 2013

Yess! Thank you!

Not only does this fix ST3 compatibility, this pull also makes CTRL + ALT + A on Windows work without having to change anything. Also fixes #33

Contributor

kevinsperrine commented Feb 15, 2013

If it fixes the ctrl+alt+a issues, that's only a fortunate side effect of the ST3 switch (or related so something else entirely), because I didn't touch anything dealing with it.

Geczy commented Feb 15, 2013

Yeah I realized that when checking your commit, maybe ST3 fixed it.

@kevinsperrine kevinsperrine referenced this pull request Feb 15, 2013

Closed

ST3 version? #36

Owner

wbond commented Feb 15, 2013

Have you tested this with both ST2 and ST3? I don't think this will work in ST2 as it stands.

Owner

wbond commented Feb 15, 2013

@Geczy The ctrl+alt+a issues are usually some sort of .pyc caching issue. If you open the .py file and save it, that should fix it too.

Contributor

kevinsperrine commented Feb 15, 2013

@wbond, I had not, so this pull should take care of that. I've tested on Mac OSX ST2 and ST3.

wbond commented on e948cff Feb 15, 2013

It would probably be cleaner and more pythonic to use a try/except clause instead of if/else. You can catch an ImportError I believe since Default.indentation won't be available on ST2.

Owner

kevinsperrine replied Feb 15, 2013

You are correct, but I, being the Python newb that I am, did not know that. Thank You, sir. I have updated the code.

No worries, I appreciate you taking the time to test this out and get it working. It is easy for me to take a few seconds and review things, but with so many things going on it can be harder for me to get the time to sit down and open up different versions of ST and test things.

wbond commented on ebb2263 Feb 15, 2013

I hope you don't mind my suggestions, but I was just looking over this, and for the ST3 try portion, you should be able to do:

from Default.indentation import line_and_normed_pt as normed_rowcol

Unfortunately the same thing is not possible with the ST2 part since it is more manually importing the Default package.

Owner

kevinsperrine replied Feb 15, 2013

I don't mind. It's a great way for me a expand my python knowledge, and yes, that does work on ST3.

@wbond please pull, I can't live without alignment, I'm such an OCD freak.

No news on this ?

Owner

wbond commented Mar 11, 2013

I'm slogged down in the details of getting Package Control fully working on ST3. Hopefully after all of that infrastructure and changes are in place, it will be much simpler to do new releases. Sorry for the delay.

LeonB commented Mar 12, 2013

@wbond: thanks for all the hard work!

Can't wait for this to get merged and thanks @wbond for making Sublime such a great tool.

LeonB commented Apr 23, 2013

@kevinsperrine Installed your python3 branch. Works greatforme ™️

Well... I was about to do a pull request of my own for this, but it is nearly identical to this one XD

xrstf commented May 10, 2013

This plugin is one of the blockers for my switch to ST3, so it would be great to see this merged :-)

This souldn't stop anyone from switching, you can easily use the fixed version of Alignment by doing this (you'll need to have Alignment installed via Package Control first, this will just override the files) :

git clone -b python3 git://github.com/kevinsperrine/sublime_alignment.git "/Users/YOURUSER/Library/Application Support/Sublime Text 3/Packages/Alignment"

nifr commented Jun 30, 2013

This seems to make it work under ST3 Windows 7 x64 but it does not fix the ctrl+alt+a keybinding for me.

I have a fresh install of ST 3.0.48-x64 with no other plugin and ctrl+alt+a doesn't do anything. Binding alignment to another key combination works. executing from commandline ( view.run_command('alignment') ) does work too.

Opened and saved Alignment.py ,deleted everything in the Data\Cache folder , restarted ST3 with no result.

Any ideas?

EHadoux commented Jul 9, 2013

The tip from @Anahkiasen worked flawlessly for me in ST3, even with the default ctrl+alt+a keybinding.
Thanks :)

wbond added a commit that referenced this pull request Aug 8, 2013

@wbond wbond merged commit b93ba6b into wbond:master Aug 8, 2013

Woo! Thanks @wbond!

mogab9 commented Aug 10, 2013

Thank you guys!

@kevinsperrine kevinsperrine deleted the kevinsperrine:python3 branch Aug 13, 2013

Just FYI, tip from @Anahkiasen didn't work for me. I had Alignment installed via Package Controll.

What did work for me is this:

  1. I removed Alignment from Package Controll
  2. cd ~/Library/Application\ Support/Sublime\ Text\ 3/Packages
  3. git clone git@github.com:wbond/sublime_alignment.git Alignment

And then cmd+ctrl+a is wooooooorking! WooooOOoooOOooo! :)

Alignement works directly from Package Control now so that's why.

Hmmm that's weird, it didn't work for me when I installed it via Package Controll. O_o

Thank you @Gavrisimo, that finally got it working again.

I had previously tried to install it via Package Control, but it never worked. So this morning I removed it, and tried reinstalling it, and the installation seemed to finish, but when I checked under installed packages, it wasn't even there. (That's when I gave up on Package Control and followed @Gavrisimo's steps instead.) Anyone else have this problem? Should I open a bug for it?

Owner

wbond commented Jan 17, 2014

@callumlocke Alignment has supported ST3 for almost 6 months now. If you are having trouble installing it, be sure to turn on the Package Control debug setting (https://sublime.wbond.net/docs/settings#setting-debug). If you can't figure out why it isn't installing, post the full debug log from your Console on the Package Control issue tracker.

Eptis commented Jan 28, 2014

I'm getting this error when trying to install through package control:

Package Control: Unable to find a sublime-package file for Alignment
Package Control: Unable to find file package-metadata.json in the package Alignment
Package Control: Download Debug
URL: https://codeload.github.com/wbond/sublime_alignment/zip/2.1.0
Resolved IP: 192.30.252.147
Timeout: 30
Package Control: Urllib Debug Proxy
http_proxy:
https_proxy:
proxy_username:
proxy_password:
Package Control: Urllib HTTPS Debug General
Connecting to codeload.github.com on port 443
reloading Packages/User/Preferences.sublime-settings
found 1 files for base name Spacegray.sublime-theme
theme loaded
Package Control: Urllib HTTPS Debug General
Connecting to codeload.github.com on port 443
CA certs file at /Users/dennis/Library/Application Support/Sublime Text 3/Packages/User/Package Control.ca-bundle
Successfully upgraded connection to codeload.github.com:443 with SSL
Server SSL certificate:
subject: CN=*.github.com,O=GitHub, Inc.,L=San Francisco,S=California,C=US
common name: *.github.com
expire date: Jul 9 12:00:00 2014 GMT
Certificate validated for codeload.github.com
Package Control: Urllib HTTPS Debug Write
GET /wbond/sublime_alignment/zip/2.1.0 HTTP/1.1
Connection: Keep-Alive
Accept-Encoding: gzip,deflate
Host: codeload.github.com
User-Agent: Sublime Package Control v2.0.0-alpha7
Package Control: Urllib HTTPS Debug Read
HTTP/1.1 200 OK
Content-Length: 7639
Content-Type: application/zip
Content-Disposition: attachment; filename=sublime_alignment-2.1.0.zip
Date: Tue, 28 Jan 2014 11:25:15 GMT
Exception in thread Thread-17:
Traceback (most recent call last):
File "X/threading.py", line 639, in _bootstrap_inner
File "/Users/dennis/Library/Application Support/Sublime Text 3/Packages/Package Control/package_control/package_installer.py", line 241, in run
self.result = self.manager.install_package(self.package)
File "/Users/dennis/Library/Application Support/Sublime Text 3/Packages/Package Control/package_control/package_manager.py", line 489, in install_package
package_bytes = download_manager.fetch(url, 'Error downloading package.')
File "/Users/dennis/Library/Application Support/Sublime Text 3/Packages/Package Control/package_control/download_manager.py", line 180, in fetch
return self.downloader.download(url, error_message, timeout, 3, prefer_cached)
File "/Users/dennis/Library/Application Support/Sublime Text 3/Packages/Package Control/package_control/downloaders/urllib_downloader.py", line 113, in download
http_file = self.opener.open(request, timeout=timeout)
File "X/urllib/request.py", line 473, in open
File "X/urllib/request.py", line 491, in _open
File "X/urllib/request.py", line 451, in _call_chain
File "/Users/dennis/Library/Application Support/Sublime Text 3/Packages/Package Control/package_control/http/validating_https_handler.py", line 44, in https_open
return self.do_open(http_class_wrapper, req)
File "/Users/dennis/Library/Application Support/Sublime Text 3/Packages/Package Control/package_control/http/persistent_handler.py", line 94, in do_open
if r.is_keep_alive():
File "/Users/dennis/Library/Application Support/Sublime Text 3/Packages/Package Control/package_control/http/debuggable_http_response.py", line 58, in is_keep_alive
if connection.lower() == 'keep-alive':
AttributeError: 'NoneType' object has no attribute 'lower'

@Eptis can you clone the repository manually?

Eptis commented Jan 29, 2014

Yup, that works.

Met vriendelijke groet/Kind regards,

Dennis tel

On Wednesday 29 January 2014 at 09:43, James Brooks wrote:

@Eptis (https://github.com/Eptis) can you clone the repository manually?


Reply to this email directly or view it on GitHub (#38 (comment)).

Maybe a firewall issue or something is wrong with your installation of PC?

Eptis commented Jan 29, 2014

That would be weard since i’m on a mac, other github installs work and I don’t think I’m behind a firewall.

Met vriendelijke groet/Kind regards,

Dennis tel

On Wednesday 29 January 2014 at 12:12, James Brooks wrote:

Maybe a firewall issue or something is wrong with your installation of PC?


Reply to this email directly or view it on GitHub (#38 (comment)).

Owner

wbond commented Jan 29, 2014

@Eptis You are using a very old alpha version of Package Control. Please wipe all traces from the Packages/ and Installed Packages/ folders and then install fresh from https://sublime.wbond.net/installation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment