换行号的问题主要是windows下换行号为\n\r,而linux下为\n所以在windows下编辑过的文本的linux下多显示一个\r,显示为^M
解决方法在eclipse上,首先是将输入的换行号改为linux风格,
Preferences general workspace 右下角为unix
eclipse 与linux 换行号问题-window与unix风格
再显示换行号,
Preferences general editor texteditor 点击 show whitespace characters
eclipse 与linux 换行号问题-window与unix风格
最后将之前的文件换行号全部改为linux风格
点击左边文件框中的文件或文件夹,左上角file convert line delimiters to unix
eclipse 与linux 换行号问题-window与unix风格

还有一个方法
使用命令
unix2dos filename
dos2unix filename

相关文章:

  • 2021-11-17
  • 2021-05-20
  • 2021-06-30
  • 2021-08-12
  • 2021-05-10
  • 2021-06-26
  • 2021-06-09
猜你喜欢
  • 2021-10-19
  • 2021-11-04
  • 2021-12-14
  • 2022-12-23
  • 2021-11-17
相关资源
相似解决方案