Skip to content

Instantly share code, notes, and snippets.

@austinjdean
Created September 9, 2014 20:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save austinjdean/af50ee3b7098d353e7f5 to your computer and use it in GitHub Desktop.
Save austinjdean/af50ee3b7098d353e7f5 to your computer and use it in GitHub Desktop.
# open file to line number
self.view.window().open_file("{0}:{1}:{2}".format(file_path_full, line_num, 0), sublime.ENCODED_POSITION)
# ^
# You can replace this 0 with a column variable (I think - not tested)
#
# At this point, file_path_full is:
# C:\Users\Austin\Desktop\test.txt
#
# Of course Python prints two backslashes for escape character reasons, but that will not have an adverse effect on the code itself.
#
# line_num is:
# 82
#
# really any integer will do.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment