Gedit

Differences between revisions 1 and 9 (spanning 8 versions)
Revision 1 as of 2008-01-22 09:32:07
Size: 598
Editor: 212
Comment:
Revision 9 as of 2008-10-14 13:05:35
Size: 1268
Editor: 84-73-45-14
Comment: line "#!/bin/sed -f" didn't show, interpreted as parse statement
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
== PHP editing ==

 * [[http://www.micahcarrick.com/11-14-2007/gedit-symbol-browser-plugin.html|Gedit Symbol Browser plugin]] - for easy overview of PHP code
 * [[http://www.stambouliote.de/projects/gedit_plugins.html|Class browser plugin]] - also for easy overview of PHP code

Line 3: Line 9:
By default gedit displays both windows and unix linebreaks properly, but it creates unix linebreaks. This can even give a resulting file with a mix of windows and unix linebreaks. It can be a problem if you e.g. want to create .bat files on linux and execute them on windows. By default gedit displays both windows and unix linebreaks properly, but it creates unix linebreaks. This can even give a resulting file with a mix of windows and unix linebreaks. It can be a problem if you e.g. want to create .bat files on linux and execute them on windows. But it's possible to convert all linebreaks in a file to windows linebreaks, by enabling the external tools plugin and using a simple script.
Line 5: Line 11:
It's possible to convert all linebreaks in a file to windows linebreaks, by enabling the external tools plugin and using this script:

{{{
Script for converting all linebreaks to windows linebreaks:
{{{#!
Line 15: Line 20:
This can convert all linebreaks to unix linebreaks:

{{{
Script for converting all linebreaks to unix linebreaks:
{{{#!
Line 23: Line 27:


=== Tip ===

If you replace the two first tools from the external tools list, you can let windows linebreaks have ctrl+F8 as shortcut and let unix linebreaks have ctrl+F7 as linebreaks. That makes it easy to press ctrl+F8 and then ctrl+F9 to close the shell output window.
----
CategoryLookMergeDelete

PHP editing

Windows linebreaks

By default gedit displays both windows and unix linebreaks properly, but it creates unix linebreaks. This can even give a resulting file with a mix of windows and unix linebreaks. It can be a problem if you e.g. want to create .bat files on linux and execute them on windows. But it's possible to convert all linebreaks in a file to windows linebreaks, by enabling the external tools plugin and using a simple script.

Script for converting all linebreaks to windows linebreaks:

s/\r//g
s/$//g
s/$/\r/

Script for converting all linebreaks to unix linebreaks:

s/\r//g
s/$//g

Tip

If you replace the two first tools from the external tools list, you can let windows linebreaks have ctrl+F8 as shortcut and let unix linebreaks have ctrl+F7 as linebreaks. That makes it easy to press ctrl+F8 and then ctrl+F9 to close the shell output window.


CategoryLookMergeDelete

Gedit (last edited 2008-10-14 13:05:35 by 84-73-45-14)