trying to fix

This commit is contained in:
Chris Cochrun 2022-01-03 12:41:35 -06:00
parent fa407dfeb6
commit e013d7569e
22945 changed files with 447936 additions and 0 deletions

View file

@ -0,0 +1 @@
<!-- 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>