문서의 선택한 두 판 사이의 차이를 보여줍니다.
| 다음 판 | 이전 판 | ||
| application:vim:fileformat [2007/09/24 13:31] – 새로 만듬 starlits | application:vim:fileformat [2025/10/03 22:30] (현재) – 바깥 편집 127.0.0.1 | ||
|---|---|---|---|
| 줄 1: | 줄 1: | ||
| ====== File Format ====== | ====== File Format ====== | ||
| + | |||
| ===== 개요 ===== | ===== 개요 ===== | ||
| 줄 7: | 줄 8: | ||
| ^ OS ^ Format ^ 키 or ASCII ^ | ^ OS ^ Format ^ 키 or ASCII ^ | ||
| - | ^ Unix | <LF> (line feed) | < | + | ^ Unix | <LF> (line feed) | '' |
| - | ^ Mac | <CR> (carriage return) | < | + | ^ Mac | <CR> (carriage return) | '' |
| - | ^ Dos | < | + | ^ Dos | < |
| 줄 40: | 줄 41: | ||
| - The true fileformat is not found in ' | - The true fileformat is not found in ' | ||
| - There is a mix of line-ending sequences. \\ This can happen when mixing tools made for different platforms. | - There is a mix of line-ending sequences. \\ This can happen when mixing tools made for different platforms. | ||
| + | |||
| + | |||
| 줄 47: | 줄 50: | ||
| | File contents | Line 1 \\ Line 2 | | | File contents | Line 1 \\ Line 2 | | ||
| - | | unix line-ends, ff=mac | < | + | | unix line-ends, ff=mac | '' |
| | unix line-ends, ff=dos | Line 1 \\ Line 2 | | | unix line-ends, ff=dos | Line 1 \\ Line 2 | | ||
| - | | dos line-ends, ff=unix | < | + | | dos line-ends, ff=unix | '' |
| - | Line 2^M</ | + | | dos line-ends, ff=mac | '' |
| - | | dos line-ends, ff=mac | < | + | | mac line-ends, ff=unix | '' |
| - | ^JLine 2 | + | | mac line-ends, ff=dos |
| - | ^J</ | + | |
| - | | mac line-ends, ff=unix | < | + | |
| - | | mac line-ends, ff=dos | + | |
| 줄 67: | 줄 67: | ||
| ===== Fixing Inconsistent Line Endings ===== | ===== Fixing Inconsistent Line Endings ===== | ||
| - | - If you have extra leading or trailing characters (^M in unix or ^J in mac), use **: | + | - If you have extra leading or trailing characters (^M in unix or ^J in mac), use **:%s/\r/'' |
| - If you have long lines (mac line-ends with ff=dos or unix, unix line ends with ff=mac), use **: | - If you have long lines (mac line-ends with ff=dos or unix, unix line ends with ff=mac), use **: | ||
| - If you are curious, the reasoning behind this methodology appears below. | - If you are curious, the reasoning behind this methodology appears below. | ||
| + | |||
| ===== The Nitty-Gritty (핵심) ===== | ===== The Nitty-Gritty (핵심) ===== | ||