Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import sublime, sublime_plugin
- class PasteFixCommand(sublime_plugin.TextCommand):
- def run(self, edit):
- s = sublime.get_clipboard().replace("«", '"').replace("»", '"')
- pos = self.view.sel()[0].begin()
- reg = sublime.Region(self.view.sel()[0].begin(), self.view.sel()[-1].end())
- self.view.erase(edit, reg)
- self.view.insert(edit, pos, s)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement