[quote=“edison”]
Are you sure i dont need to put something in the preferences file??
This is literally the same thing you had before, but with more lines after ‘import sublime text’
When I save the file ‘untitled.py’ a duplicate file ‘untitled.pyc’ appears in the same directory, is this normal??
Thanks for you perseverance, there must be a reason why its not working.[/quote]
Yes, I am sure.
The main thing I changed was {}
in the strings to {1}
, but I realize now that this is wrong and should have been {0}
. Please make this change.
Yes, the .pyc file is normal for ST2.
You should check the console for exceptions/tracebacks from the Python code. Both errors I should have been recorded there and easy to debug if you included them in your posts.
The way I wrote it (which you can easily detect if have only a little bit of programming experience) does not automatically save the file, because I don’t know where. It only sets the tab name, which is equivalent to the default name that the file will have when you press ctrl+s for the first time and open the save as dialog.