Line Feed
Definition of Line Feed
Line Feed (LF) is ASCII code 10. On teletypes, LF advanced the paper one line without moving the print head horizontally - that was Carriage Return's job. Together, CR+LF moved to the start of the next line.
Unix adopted LF alone (\n) as the newline convention. Windows kept CR+LF (\r\n). This remains the single most common text-processing annoyance across platforms. Git's
Unix adopted LF alone (\n) as the newline convention. Windows kept CR+LF (\r\n). This remains the single most common text-processing annoyance across platforms. Git's
core.autocrlf and core.eol settings, EditorConfig's end_of_line, and ESLint's linebreak-style rule all exist because of this split. In C, Python, and most languages, \n represents LF regardless of OS - the runtime handles translation. See other control characters or look up whitespace characters.