Open computersarecool opened 8 years ago
Not currently. What's the usecase?
On Tue, Oct 18, 2016 at 1:48 AM, Willy Nolan notifications@github.com wrote:
I actually like the extra new line at the end of the file. Is there a way not to remove it?
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/lewang/ws-butler/issues/26, or mute the thread https://github.com/notifications/unsubscribe-auth/AAjzbJsWQrVMRu2xARP_zP6OQ5Kl-SGNks5q1F2-gaJpZM4KZZnP .
Le
I have been told it is good practice
Have you consulted the documentation for require-final-newline
?
Yes and I currently have it set to t
which means it should add a new line when the file is about to be saved. Unfortunately it looks like butler removes the newline after this.
Ok, that's a bug then. I'll take a closer look when I get a chance.
Thanks
It looks like you have code here specifically trying to avoid this but it is removing the newline on my files.
Can you give repro steps from emacs -Q
? I just saved a file that had require-final-newline
set to t and the final newline was added.
Steps to reproduce:
Start emacs -Q
Install ws-butler
Visit file testing.js
Enable linum-mode
(to see line numbers)
Enable ws-butler-mode
Type const http = require('http')
followed by 3 new lines
On line 2 type console.log(http)
Type C-x C-s
File will be truncated to two lines
wc -l testing.js
= 2
I actually like the extra new line at the end of the file. Is there a way not to remove it?