sublimetext - What is line endings in Sublime Text? -


this question has answer here:

i new sublime text , saw there's setting of line endings allows me change 'windows','unix' , 'mac os'. can explain me? thx~

before there computers, people wrote text on typewriters. new line on paper, need feed line (scroll paper 1 line up) , carriage return (put pointer on beginning of line).

new technologies adapted these techniques. on unix-like systems, native editors not set carriage-return (cr) flag, line-feed (lf). in windows, line endings denoted both cr , lf. mac os setting refers classic mac os (pre-os x), used cr. modern mac os (os x , macos) uses lf, unix-based. the wikipedia article on newline has overview.

if working windows only, leave is. if need swap files between unix-like , windows systems, set editor on windows use utf-8 encoding files , line_ending lf only. way circumvent many problems encoding on linux/mac machines.


Comments

Popular posts from this blog

sequelize.js - Sequelize group by with association includes id -

android - Robolectric "INTERNET permission is required" -

java - Android raising EPERM (Operation not permitted) when attempting to send UDP packet after network connection -