Your comments
pos = self.view.viewport_position()self.view.show_at_center(sublime.Region(start, end))new_pos = self.view.viewport_position()if abs(new_pos[0] - pos[0]) <= 1.0 and abs(new_pos[1] - pos[1]) <= 1.0: self.view.set_viewport_position((new_pos[0], new_pos[1] + 1))
Still, strange that an empty file (just <?php, no code) behaves differently
Works:
<?php
class Test{}
Doesn't work:
<?php
It's only fairly recent, I think, that .sublime-project files have supported relative paths. So they can be shared now, whereas they could not before. But you have to edit them manually, and Sublime Text is not very helpful there... you can use another editor, or temporarily rename the file to something else. Hacky either way. :-/
In addition, anytime you add/remove a folder to the project, ST2 will rewrite the project file using — you guessed it! — absolute paths again.
If you're feeling especially industrious (and if you are using git), you can check the project file for absolute paths in a pre-commit hook. Of course, everyone will need to use that script. Now it's just getting silly.
The short answer, in my opinion, is "No." :-(
New feature! Up vote!
Customer support service by UserEcho
Yeah, I get that same NUL symbol.