Home Download Buy Blog Forum Support

Please help updating plugin

Please help updating plugin

Postby jonathanh on Thu Jan 09, 2014 6:41 am

Hello! I 'wrote' this plugin for ST2 that would automatically create and update a timestamp in my source files:
https://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!
jonathanh
 
Posts: 3
Joined: Thu Jan 09, 2014 6:38 am

Re: Please help updating plugin

Postby tito on Thu Jan 09, 2014 11:32 am

Give APIs, let the community build the rest!
https://github.com/titoBouzout
tito
 
Posts: 855
Joined: Thu Sep 29, 2011 2:27 pm
Location: Montevideo, Uruguay

Re: Please help updating plugin

Postby jonathanh on Thu Jan 09, 2014 8:48 pm

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.
jonathanh
 
Posts: 3
Joined: Thu Jan 09, 2014 6:38 am

Re: Please help updating plugin

Postby jonathanh on Fri Jan 10, 2014 12:36 am

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
Code: Select all
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)
https://gist.github.com/jonathanhirz/8344462
jonathanh
 
Posts: 3
Joined: Thu Jan 09, 2014 6:38 am

Re: Please help updating plugin

Postby tito on Fri Jan 10, 2014 1:25 am

! :)
Give APIs, let the community build the rest!
https://github.com/titoBouzout
tito
 
Posts: 855
Joined: Thu Sep 29, 2011 2:27 pm
Location: Montevideo, Uruguay


Return to Plugin Development

Who is online

Users browsing this forum: Exabot [Bot] and 6 guests