Re: windows line breaks in txt files

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The emacs editor can easily handle a variety of line ending
conventions as part of it's Mule (multi-language extensions) package. 
It will automatically detect the type of line ending present in a file
and use that.  If it is using CR+LF rather than the Unix default of
just LF, then the string "(DOS)" will appear on the bottom status
line.

The easiest way to start a new file with dos-style end of line is to
just add one line, and at the end of the line place a CR character by
typing: control-Q control-M.  You should see a "^M" at the end of the
line.  Save the file.  Delete the emacs buffer/window.  Then reload
the file and emacs will autodetect it as a DOS-style file.

Another way to change emac's end of line style is within your text
buffer enacs M-x set-buffer-file-coding-system  [the M-x is
emacs-speak for the meta/alt key, or alternatively ESC x].  (Or if
running graphically under X11, select from the menus
Options->Mule->Set Coding Systems->For Saving This Buffer.)  Then at
the prompt enter one of these two:

  undecided-dos
  undecided-unix

-- 
Deron Meranda


On Mon, 29 Nov 2004 10:15:27 -0500, Matthew Miller <mattdm@xxxxxxxxxx> wrote:
> On Mon, Nov 29, 2004 at 04:04:14PM +0100, Duncan Lithgow wrote:
> > How can i configure my editors to use windows line breaks? Or do I just
> > avoid text files and stick to openoffice or something.


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux