emacs/var/elfeed/db/data/f0/f0b960e8820657a11ca12de920a282637950479f
2022-01-03 12:49:32 -06:00

1 line
1.3 KiB
Plaintext

<!-- SC_OFF --><div class="md"><p>When we are in the middle of a line, <code>open-line</code> splits current line at the cursor while saving the cursor&#39;s position, but the opened line below isn&#39;t indented.</p> <p>Is there a version which can indent the line below? </p> <p>&quot;RET C-p C-e&quot; seems a bit verbose.</p> <p>I can write a simple command line <code>(save-excursion (newline-and-indent))</code> but I&#39;d love to know if there are any existing ones.</p> <p>Edit: use case (assume that the cursor is at &quot;|&quot;):</p> <pre><code> &lt;html-tag|&gt;&lt;/html-tag&gt; &lt;!-- What C-o does --&gt; &lt;html-tag| &gt;&lt;/html-tag&gt; &lt;!-- What M-j does --&gt; &lt;html-tag |&gt;&lt;/html-tag&gt; &lt;!-- What I need --&gt; &lt;html-tag| &lt;!-- we write the attributes here --&gt; &gt;&lt;/html-tag&gt; &lt;!-- This is great, too! --&gt; &lt;html-tag | &gt;&lt;/html-tag&gt; </code></pre> <p>Edit: explained the use case more thoroughly.</p> </div><!-- SC_ON --> &#32; submitted by &#32; <a href="https://www.reddit.com/user/takutekato"> /u/takutekato </a> <br/> <span><a href="https://www.reddit.com/r/emacs/comments/rcfggm/is_there_an_indented_version_of_openline/">[link]</a></span> &#32; <span><a href="https://www.reddit.com/r/emacs/comments/rcfggm/is_there_an_indented_version_of_openline/">[comments]</a></span>