Skip to content


What is the Eclipse shortcut to change the end of line delimiter?

Okay, we’ve all been there. And, honestly, if you haven’t, you should get out a bit. You’re writing code on one platform, but that code came from another developer who wrote it on another platform (or better yet, maybe it’s met for a production environment built on another platform). In my case, it’s getting code from someone who’s been working on a Windows box and tweaking it to run on my Mac. Inevitably you get the fun end of line (EOL) character mismatch. The problem is pretty straightforward, but how do you fix it?

Well, I use Eclipse and I’m sure others out there do as well, so here’s how to figure it out in Eclipse. First, use Ctrl+3 to pull up Eclipse search. I had no idea this existed, but man it’s awesome. More info on this awesome search here. It supports searching across Perspectives, Commands, Menus and more as well as the camel case search many of us have come to love from Ctrl+Shift+R. I searched for “delimiter” and it pulled up three commands that will take care of the line delimiters for the big three – Windows, Mac and Unix. Okay, that’s fine, but I want a shortcut. No problem. Just go to into the Preferences and look in General > Keys. Again, I typed delimiter, highlighted the appropriate command. I chose a short cut of Ctrl+Shift+D for delimiter, but obviously pick whatever you want.

Hopefully that little insight is helpful.

Posted in Dev Tools.

Tagged with , .