PageRenderTime 83ms CodeModel.GetById 64ms app.highlight 9ms RepoModel.GetById 3ms app.codeStats 0ms


HTML | 23 lines | 23 code | 0 blank | 0 comment | 0 complexity | 024c64c37e59aab86b259d42dff50b4d MD5 | raw file
 1<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Line Separators</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2"><link rel="start" href="index.html" title="jEdit 4.3 User's Guide"><link rel="up" href="files.html" title="Chapter 4. Working With Files"><link rel="prev" href="saving.html" title="Saving Files"><link rel="next" href="encodings.html" title="Character Encodings"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Line Separators</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="saving.html">Prev</a> </td><th width="60%" align="center">Chapter 4. Working With Files</th><td width="20%" align="right"> <a accesskey="n" href="encodings.html">Next</a></td></tr></table><hr></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="line-separators"></a>Line Separators</h2></div></div></div><p>Unix systems use newlines (<code class="literal">\n</code>) to mark line
 2        endings in text files. The MacOS uses carriage-returns
 3        (<code class="literal">\r</code>). Windows uses a carriage-return followed by a
 4        newline (<code class="literal">\r\n</code>). jEdit can read and write files in all
 5        three formats.</p><p>The line separator used by the in-memory representation of file
 6        contents is always the newline character. When a file is being loaded,
 7        the line separator used in the file on disk is stored in a per-buffer
 8        property, and all line-endings are converted to newline characters for
 9        the in-memory representation. When the buffer is consequently saved, the
10        value of the property replaces newline characters when the buffer is
11        saved to disk.</p><p>There are several ways to change a buffer's line separator:</p><div class="itemizedlist"><ul type="disc"><li><p>In the <span class="guimenu"><strong>Utilities</strong></span>&gt;<span class="guimenuitem"><strong>Buffer
12                Options</strong></span> dialog box. See <a class="xref" href="buffer-opts.html" title="The Buffer Options Dialog Box">the section called &#8220;The Buffer Options Dialog Box&#8221;</a>.</p></li><li><p>By clicking the line separator indicator in the status
13                bar. See <a class="xref" href="status-bar.html" title="The Status Bar">the section called &#8220;The Status Bar&#8221;</a>.</p></li><li><p>From the keyboard, if a keyboard shortcut has been
14                assigned to the <span class="guimenuitem"><strong>Toggle Line Separator</strong></span>
15                command in the <span class="guibutton"><strong>Shortcuts</strong></span> pane of the
16                <span class="guimenu"><strong>Utilities</strong></span>&gt;<span class="guimenuitem"><strong>Global
17                Options</strong></span> dialog box. By default, this command does
18                not have a keyboard shortcut.</p></li></ul></div><p>By default, new files are saved with your operating system's
19        native line separator. This can be changed in the
20        <span class="guibutton"><strong>General</strong></span> pane of the
21        <span class="guimenu"><strong>Utilities</strong></span>&gt;<span class="guimenuitem"><strong>Global
22        Options</strong></span> dialog box; see <a class="xref" href="global-opts.html#general-pane" title="The General Pane">the section called &#8220;The General Pane&#8221;</a>.
23        Note that changing this setting has no effect on existing files.</p></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="saving.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="files.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="encodings.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Saving Files </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> Character Encodings</td></tr></table></div></body></html>