Sublime Forum

How to disable adding end of file newline in ST3?

#1

I’m new to using ST3. I run into an issue with end of file newline lately.

I tried to use Sublime SFTP plugin to edit files on a server. The tool works great so far except this difference in how newline is treated.

So on our sever, I typically save each file with a new line in vim. And when I open the same file using SFTP plugin on a local folder in Mac, ST3 displayed an extra new line in the end… which is annoying…

I saw this was mentioned in this earlier post but I couldn’t find a solution to it so far.

How do I disable this automatic new line in the end?

Thanks!

0 Likes

#2

go to prefrence > Settings -User and add
{
ensure_newline_at_eof_on_save : false
}

0 Likes

#3

I doubt the problem is VIM add it for you and ST just show it while VIM does not.

ensure_newline_at_eof_on_save is false in the default settings for ST3 so nothing will be changed.

0 Likes

#4

thanks for the link. i didn’t realize vim automatically added a newline at end of file…

0 Likes