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

1 line
1.6 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!-- SC_OFF --><div class="md"><p><strong>EDIT:</strong> Never mind! The function I was looking for is <code>M-x indent-relative</code>. That solves my problem. I can combine that with return to make a custom function to do what I want.</p> <p>Writing a shell script, Emacs adds 4 tabs and 1 space. I dont want this to happen. I want Emacs to go to the first character in the previous line. Emacs is going wild with auto-formatting. I want electricity. I like electricity. But I dont like auto-formatting. That is, I dont like tons of random tabs and spaces added for no reason.</p> <pre><code>for in i in 1 2 &lt;tab&gt;&lt;tab&gt;&lt;tab&gt;&lt;tab&gt;&lt;space&gt;&lt;cursor is now here&gt; </code></pre> <p>I dont want that. I want :</p> <pre><code>for in i 1 2 &lt;cursor is here&gt; </code></pre> <p><code>M-x electric-indent-mode</code> doesnt work, because then I lose electricity, which is also problematic. I like electricity, but I dont like auto-formatting. Turning off electricity isnt good:</p> <pre><code>for in i 1 2 do &lt;cursor is here&gt; </code></pre> <p>I want the cursor to be aligned with the <code>do</code>, not at the beginning of the line. Does anyone know how to do this?</p> </div><!-- SC_ON --> &#32; submitted by &#32; <a href="https://www.reddit.com/user/SequentialDesign"> /u/SequentialDesign </a> <br/> <span><a href="https://www.reddit.com/r/emacs/comments/rrzl74/how_do_i_disable_autoindent_but_not_electricity/">[link]</a></span> &#32; <span><a href="https://www.reddit.com/r/emacs/comments/rrzl74/how_do_i_disable_autoindent_but_not_electricity/">[comments]</a></span>