Sublime Forum

Please help updating plugin

#1

Hello! I ‘wrote’ this plugin for ST2 that would automatically create and update a timestamp in my source files:
gist.github.com/jonathanhirz/7507767
I recently updated to ST3 and the changes to begin_edit() and end_edit() have broken this for me. I have tried for a few hours to fix this, but my python skills are lacking and seriously failing me. I realize this is a pretty specific fix, but I would appreciate any help. Or if someone has a better way to get a ‘CREATED’ and last ‘MODIFIED’ timestamp into code, that would be great too.

Thanks!

0 Likes

#2

gist.github.com/titoBouzout/8332237

0 Likes

#3

This looks great, thank you! I will test it out when I get home, but it looks like it works (the timeStamp code changed in the “readme” at the top).

Didn’t know about this extra edit plugin thing. Thanks for the help.

0 Likes

#4

Ok I must be missing something. Does edit.py exist as a separate plugin? Does it need to go somewhere special? I’m getting the error

File "/Users/jonathan/Library/Application Support/Sublime Text 3/Packages/User/timestamp.py", line 32, in on_load with Edit(view) as edit: NameError: global name 'Edit' is not defined

// Nevermind, I got it working. I didn’t realize that was all supposed to go in one file. THANK YOU AGAIN, now that my OCD itch has been scratched, I can get back to work. =]

I made one small change to the variable names in the on_load function so they matched up (replacement vs. timestamp)
gist.github.com/jonathanhirz/8344462

0 Likes

#5

! :smile:

0 Likes