Gedit

Differences between revisions 6 and 7
Revision 6 as of 2008-07-04 08:53:05
Size: 1229
Editor: 212
Comment:
Revision 7 as of 2008-07-09 05:28:06
Size: 1260
Editor: client-86-24-144-11
Comment: Wiki clean. Added to CategoryLookMergeDelete.
Deletions are marked like this. Additions are marked like this.
Line 32: Line 32:
----
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)