Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Development Tools

Jitendra Vyas
Jitendra Vyas
2,349 Points

How to stop sublime text from adding a new extra line at the end?

I'm on OSX and using Sublime Text 3 and It's adding a new line at the end of document after I press CMD+S which I don't want.

I have already added below line in Sublime Text user settings

"ensure_newline_at_eof_on_save": false,

But problem is still there. Here is the recorded video of the problem. http://recordit.co/WGyhZPNByz

2 Answers

See if you can use AppCleaner to remove ST. You'll want to drag the app into AppCleaner and delete all files it finds.

Jitendra Vyas
Jitendra Vyas
2,349 Points

It worked after I removed and re-installed. But I think the problem was my project workspace file.

Hello, you can check your settings with Preferences ⇒ Settings - User. Make sure the below line of code is removed, and make sure you've not edited the default settings.

ensure_newline_at_eof_on_save

If that doesn't work, you can refer here to restore the default settings.

Jitendra Vyas
Jitendra Vyas
2,349 Points

Even after following this https://www.sublimetext.com/docs/2/revert.html to remove that folder. Problem is still there. It seems to me that it's a problem in OSX