::: Zany's Homepage ::: Zany Wiki | »çÀÌÆ® ÅëÇÕ °Ë»ö
 
 
 

How to convert to/from DOS format in VIM¡¦

°Ô½ÃÆÇ
Unix/Linux
ÀÛ¼ºÀÚ
helix
ÀÛ¼ºÀÏ
2014-02-24 18:14:38
ÀÐÀº¼ö
2688
ÆòÁ¡
   
Ç¥½Ã¿É¼Ç
HTML»ç¿ë | ÀÚµ¿BRűנ| °ø¹é¹®ÀÚÇã¿ë | °¡¿îµ¥Á¤·Ä | °íÁ¤Æø±Û²Ã | ÀÚµ¿URL¸µÅ© | ¸¶¿ì½º¼±ÅÃ
°ü·Ã¸µÅ©01
http://mattfahrner.com/2008/10/09/how-to-convert-tofrom-dos-format-in-vim 
It¡¯s very easy, but also easy to forget how to convert to or from a DOS format file in Unix using ¡°vim¡± (Vi iMproved),
the Open Source ¡°vi¡±. If the file is in DOS format and you want to convert to Unix, use the command:

:set ff=unix

note that ¡°ff¡± is an abreviation for ¡°fileformat¡± which you can also use.

If the file is Unix and you want to write DOS format, use the following command:

:set ff=dos

In both examples it is assuming you are ESCaped out of edit mode and the leading ¡°:¡± is required.

Note that the difference between the two formats is that:

DOS format ends each line with a CRLF (carriage-return line-feed) pair.
Unix format ends each line with a simple LF (line feed).
Neither of these forms should be confused with the C language string delimiter ¡®NUL¡¯ which is an ASCII ¡°zero¡±.
That however is an entirely different subject.

 °Ô½ÃÆÇ ±Û ¸ñ·Ï
No Subject Poster Hits Posted
8928 helix 2692 2014-07-23 19:32:53
8274 helix 2882 2014-05-06 10:12:22
8172 helix 7738 2014-04-21 15:32:25
8050 helix 2225 2014-04-07 15:24:55
7811 helix 2570 2014-03-14 15:39:00
helix 2688 2014-02-24 18:14:38
7576 helix 2371 2014-02-17 15:06:13
7423 helix 2530 2014-02-03 10:34:05
4155 helix 3297 2013-03-23 18:51:07
4148 helix 8147 2013-03-19 15:00:34
4102 helix 5525 2013-02-04 23:29:16
ÄÚ¸àÆ®
ÀÛ¼ºÀÚ
                       
 
zany.kr
  Copyright ¨Ï 2002-2010 Zany's Programming Lab. All Rights Not Reserved.
temporary This Page loads on 0.016 Secs