7

Convert all LF to CRLF

or

Convert all CRLF to LF?

UGH.

Comments
  • 1
    First 🙃
  • 12
    @filthyranter you troublemaker you

    Convert all crlf to lf, thank me later.
  • 0
  • 2
    When working with certain Windows legacy software (e.g. notepad 😀) use git core.autocrlf=true on Windows and core.autocrlf=input everywhere else to let git fix line endings automatically on commit/checkout. Otherwise convert to LF once and be happy.
  • 5
    Crlf --> lf and never use notepad
  • 0
    Depends what platform you're targeting. If it's a Microsoft technology, keep the CR-LF.
  • 0
    @d4ng3r0u5 many editors on Windows now support lf. Vi comes to mind. Notepad++ as well.

    History lesson: a standard vga or text mode driver will interpret lf as move cursor down one and cr as move cursor to beginning of line, and that determines where in the text buffer to write a byte. (VGA frame 1). The reason Linux and unix use lf only is because of the terminal cooker code. If you switch a terminal to raw mode (horrific don't do that) it will still require crlf. So terminals are reinterpreting some characters before printing them to the raw buffer. This also disables line buffering and characters from stdin become readable from the moment the character is pressed on the keyboard

    Dos never had a cooked terminal and since windows is absurdly backwards compatible to a fault, they kept this ridiculous nuance.

    So in conclusion: as long as your editor knows what it is who cares one just as extra terminal control baked into it. Although I care because I hate Microsoft.
  • 0
    Use LF, CRLF is a pain in the ass outside Windows, while LF is supported by many Windows things too
  • 0
    git config --global core.autocrlf input
    # Configure Git on OS X or Linux to properly handle line endings

    git config --global core.autocrlf true
    # Configure Git on Windows to properly handle line endings

    *Stolen from within documentation
  • 0
    @keibak however if you want to compile llvm with CMake+Make, it will break with CRLF. Line endings are a pain in the ass
  • 0
    Thanks y'all.
Add Comment