Skip to content
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

initial ST3 support #38

Merged
merged 4 commits into from
Aug 8, 2013
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 10 additions & 9 deletions Alignment.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,15 @@
import os
import sys

# This is necessary due to load order of packages in Sublime Text 2
sys.path.append(os.path.join(sublime.packages_path(), 'Default'))
indentation = __import__('indentation')
reload(indentation)
del sys.path[-1]

normed_rowcol = indentation.line_and_normed_pt

try:
from Default.indentation import line_and_normed_pt as normed_rowcol
except ImportError:
# This is necessary due to load order of packages in Sublime Text 2
sys.path.append(os.path.join(sublime.packages_path(), 'Default'))
indentation = __import__('indentation')
reload(indentation)
del sys.path[-1]
normed_rowcol = indentation.line_and_normed_pt

def convert_to_mid_line_tabs(view, edit, tab_size, pt, length):
spaces_end = pt + length
Expand Down Expand Up @@ -182,4 +183,4 @@ def run(self, edit):
view.insert(edit, region.b, ' ' * length)
if settings.get('mid_line_tabs') and not use_spaces:
convert_to_mid_line_tabs(view, edit, tab_size, region.b,
length)
length)