Find file
Fetching contributors…
Cannot retrieve contributors at this time
9 lines (7 sloc) 286 Bytes
import sublime, sublime_plugin
import os
class CopyPathToClipboard(sublime_plugin.TextCommand):
def run(self, edit):
line_number, column = self.view.rowcol(self.view.sel()[0].begin())
line_number += 1
sublime.set_clipboard(self.view.file_name() + ":" + str(line_number))