Sublime Forum

Drag and Drop File Pre-Open hook

#1

I like to create a plugin that will handle a file being dragged and dropped into ST3, and change the file extension to something else if the D&D file name and extension match a certain criteria. for example,

if I D&D a file “save-2020-01-18.jpg”, then I would like to open (or new) a file name "save-2020-01-18.txt.

If the D&D file does not match that pattern, just open it the file itself normally.

Any suggestion how do I go about implement such plugin?

0 Likes