Hi, I found that whenever I create and save a blank java files (e.g. click 'New' -> save 'untitled' as 'file_name.java'), the saved files always start with two blank lines. I am wondering how to make it only start with one line.
See the screen shot
https://drive.google.com/file/d/0BzLdl9mTylfjaEk0NmhELUhTWjQ/view?usp=sharin...
cheers
Hi,
Le 18/12/2015 14:18, Daiyue Weng a écrit :
Hi, I found that whenever I create and save a blank java files (e.g. click 'New' -> save 'untitled' as 'file_name.java'), the saved files always start with two blank lines. I am wondering how to make it only start with one line.
That's not actually 2 blank lines, it's a file with one single newline character (either NL (UNIX-ish), CR+NL (Windows-ish) or CR (Old MacOS-ish)). Line 1 you see is before the newline, and line 2 after. So there's actually one single sequence of "content + newline sequence", but is displayed with a second line so you can add stuff after the newline sequence.
By default Geany will ensure there's always at least one newline at the end of the files when it saves it, for various compatibility reasons, and because it's generally what people want (each line with something it in being terminated with a newline). You can disable this in the preferences under *Files -> Saving Files -> Ensure new line at file end*.
Regards, Colomban
Unselect Menu->edit->preferences->files->ensure new line at file end
Cheers Lex
On 18 December 2015 at 23:18, Daiyue Weng daiyueweng@gmail.com wrote:
Hi, I found that whenever I create and save a blank java files (e.g. click 'New' -> save 'untitled' as 'file_name.java'), the saved files always start with two blank lines. I am wondering how to make it only start with one line.
See the screen shot
https://drive.google.com/file/d/0BzLdl9mTylfjaEk0NmhELUhTWjQ/view?usp=sharin...
cheers
Users mailing list Users@lists.geany.org https://lists.geany.org/cgi-bin/mailman/listinfo/users