简体   繁体   中英

How do I stop Eclipse (EPIC Perl) from adding DOS CR/LF to my Perl scripts?

I use Eclipse on Windows to edit files on a remotely mounted Linux SMB share.

Coupled with Samba's stubborn opposition to on-the-fly mapping , Eclipse's insistence on CR/LF creates a real headache with Perl scripts.

Any workarounds?

在Eclipse中,可以在Window > Preferences > General > Workspace > "New text file line delimiter"下找到行尾序列设置。

I just stumbled upon an easy way of fixing these problems when you run into someone else's code that has them.

In Eclipse Kepler (and later), use the menu item File > Convert Line Delimiters To .

In previous versions of Eclipse, you have to user Source > Format. It'll reformat the code, which includes replacing CR/LFs with LFs.

Or maybe you just have to uncheck this flag :
Window/Preferences/General/Editors/Text Editors/Show whitespace characters

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM