Sublime Text 3 is looking great, but one item that is keeping me from switching is the compatibility of Clipboard Commands. The only thing I use this plugin for is the "clean_paste" function which basically makes pasting copied content from Microsoft Word (or any other text editor) strip out the funny characters it normally comes with. Does anyone know of a native function that ST3 provides that I can map a keybinding to? Here is what ClipboardCommand does (in the ST2 version):
class ClipboardCommandsPastePlainText(sublime_plugin.TextCommand):
def run(self, edit):
copy(clean_paste(clipboard()))
self.view.run_command('paste')
Possibly more of a Python question in general as well, but you can also create your own keybindings and this one basically just references that command:
"caption": "Clipboard: Paste Plain Text",
"command": "clipboard_commands_paste_plain_text"
So if the command is something I could just put that function into that'd be great, but not sure how that works in Python. Thanks for any help!
clean_copyandclean_paste. - Blenderclean_pasteinto it instead of referencing a Class definition as it is does originally. Or, if this makes the question clearer, a how I could perform a clean paste from Miscrosoft Word into ST3 (so I can get rid of all the "special/encoded characters" - Zachclean_pastefunction to python3, which could probably be done with2to3as it doesn't seem complicated - the class itself is fine. But I also don't see a valid question here: if it's "can someone port this to ST3" this would be off topic, ask on the ST forums. A better question would be "can you help me port this to ST3", but this would require you to try something first. Right now it just reads like you just want someone to do work for you for a few internet points... - l4mpi