New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ST3 support? (hangs on ST3) #1
Comments
BTW I'm more than happy to help out - but need some pointers as to where to start regarding the upgrading. |
I'm not a python developer but it turned out this was easy fix. Just googled these two links - link one and link two. class SplitScreenCommand(sublime_plugin.WindowCommand):
def run(self):
win = self.window
# Group check
if win.num_groups() == 1:
win.show_input_panel("Split ratios", "60:40", self.splitWindow, None, None)
def splitWindow(self, inp):
parts = re.split("\\s*,\\s*", inp)
horiz = parts[0] or "1"
vert = parts[1] or "1" if len(parts) > 1 else "1"
# Python 3 fix
vert = list(map(float, re.split(":", vert)))
horiz = list(map(float, re.split(":", horiz)))
vertTotal = sum(vert)
horizTotal = sum(horiz)
# Python 3 fix
vert = list(map((lambda x: x / vertTotal), vert))
horiz = list(map((lambda x: x / horizTotal), horiz))
cols = addUp(horiz)
rows = addUp(vert)
cells = []
for x, val1 in enumerate(horiz):
for y, val2 in enumerate(vert):
cells.append([x, y, x + 1, y + 1])
# Toggle sidebar
self.window.run_command('toggle_side_bar')
# Set layout
self.window.run_command("set_layout", {
"cols": cols,
"rows": rows,
"cells": cells
})
# Leave focus on current group
self.window.run_command("focus_group", { "group": 0 }) You can just comment lines you dont need, like sidebar toogle and focus. I added this because this correspond to my common workflow! |
Thanks for replying @gecbla . However, since I have moved back to emacs I won't be attempting this fix :( |
First of all, thanks for this awesome plugin.
Are you planning on ST3 support? Right now this plugin makes ST3 hang and then crash on Mac OSX. Details:
Environment
Steps to reproduce
Alt+Shift+S
7:3
The text was updated successfully, but these errors were encountered: