Advertisement
PikMike

Untitled

Oct 9th, 2016
477
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.38 KB | None | 0 0
  1. import sublime, sublime_plugin
  2.  
  3. class PasteFixCommand(sublime_plugin.TextCommand):
  4.     def run(self, edit):
  5.         s = sublime.get_clipboard().replace("«", '"').replace("»", '"')
  6.         pos = self.view.sel()[0].begin()
  7.         reg = sublime.Region(self.view.sel()[0].begin(), self.view.sel()[-1].end())
  8.         self.view.erase(edit, reg)
  9.         self.view.insert(edit, pos, s)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement