Java Eclipse 编辑器:如何将文件格式从 Dos 更改为 Unix
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/2374728/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Eclipse Editor: How to change file format from Dos to Unix
提问by Rachel
I am using eclipse editor to work on my remote files it appears that eclipse editor is set to dos file format, I do not know how to find fileformat set in eclipse editor, but I want it to be set on unix file format.
我正在使用 eclipse 编辑器处理我的远程文件,看来 eclipse 编辑器设置为 dos 文件格式,我不知道如何在 eclipse 编辑器中找到设置的文件格式,但我希望它设置为 unix 文件格式。
How can I set file format options to unix file format in eclipse ?
如何在 eclipse 中将文件格式选项设置为 unix 文件格式?
Similar Question to set file format in VIM
Thanks.
谢谢。
采纳答案by Chad Birch
I don't have Eclipse installed to check, but from some searching it looks like there are two things to do.
我没有安装 Eclipse 来检查,但从一些搜索来看,似乎有两件事要做。
To change the default format for new files:
要更改新文件的默认格式:
Window -> Preferences -> General -> Workspace -> New text file line delimiter
Window -> Preferences -> General -> Workspace -> New text file line delimiter
To convert the file that's open:
要转换打开的文件:
File -> Convert Line Delimiters To -> Unix
File -> Convert Line Delimiters To -> Unix
回答by Sumit Singh
Take look of following image for changing format:
查看以下图像以更改格式:
Window -> Preferences -> General -> Workspace -> New text file line delimiter
回答by someProgrammerGuy
This can even be done more specific, just for a single project:
这甚至可以更具体地完成,仅针对单个项目:
Change Project > Properties > Resource : New Tex File Delimiter
更改项目 > 属性 > 资源:新的 Tex 文件分隔符