Delete PHP closing tags with Sublime Text 2
I wanted to delete all PHP closing tags (?>) from a PHP project. So I used the following regex in Sublime Text 2 to delete them. (The leftmost button activates regular expressions)
(\s*\?>\s*)\z$
It only replaces the closing tags at the end of the file (\z = EOF).
Be sure to apply this only on *.php, and not on *.tpl files.
Edit:
Slight modification for finding files without a newline at the EOF. (\s*.(?!\s+))\z$
Um den “Speichern und Beenden”-Dialog bei Firefox 4 und 5 zu reaktivieren müssen folgende Einstellungen in about:config geändert werden.
browser.showQuitWarning muss neu angelegt und auf true gesetzt werden. browser.warnOnQuit muss auf true gesetzt werden. browser.startup.page muss auf 0 (Leeres Seite) oder 1 (Startseite anzeigen) gesetzt werden.
Und schon kann man wieder entscheiden, ob man die Tabs in der nächsten Session wieder haben möchte.
I modified the files from CodeIgniter like explained by TaggedZi.
Then I added a new user library. Open Aptana 3 and navigate to: Window > Preferences > Aptana > Editors > PHP – Libraries
Click New user library, type in a name and select the path to the modified CodeIgniter library.
Adding a new user library for CodeIgniter 2
Deselect the library and close the Preferences.
Now open the properties of your actual project and go to PHP Buildpath > Libraries. Uncheck “Use Project specified settings”and select the CodeIgniter library.
Changing project properties
Done! Now Aptana 3 autocompletes the CodeIgniter 2 functions.