Stories
Slash Boxes
Comments

SoylentNews is people

posted by chromas on Wednesday August 22 2018, @09:22PM   Printer-friendly
from the :wq dept.

Over at The New Stack is a brief but entertaining history of the editor vi and Vim.

"The editor was optimized so that you could edit and feel productive when it was painting slower than you could think. Now that computers are so much faster than you can think, nobody understands this anymore," Joy said. "It was a world that is now extinct. People don't know that vi was written for a world that doesn't exist anymore."


Original Submission

 
This discussion has been archived. No new comments can be posted.
Display Options Threshold/Breakthrough Mark All as Read Mark All as Unread
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
  • (Score: 2) by tangomargarine on Thursday August 23 2018, @06:20PM (3 children)

    by tangomargarine (667) on Thursday August 23 2018, @06:20PM (#725324)

    You've got a section of indented code you want to move back a level

    C-u -4 C-x TAB

    The "C-u -4" is just telling it to perform the "indent by 1 space" operation negative four times, though.

    And, the part that column-operating editors ALL get wrong, but Brief got right is: the cursor jumps from your insertion point to the bottom left of the inserted rectangle.

    Yeah, for some reason the emacs default for inserting registers leaves the cursor at the beginning of it, too. Had to figure out how to change that setting.

    --
    "Is that really true?" "I just spent the last hour telling you to think for yourself! Didn't you hear anything I said?"
    Starting Score:    1  point
    Karma-Bonus Modifier   +1  

    Total Score:   2  
  • (Score: 2) by JoeMerchant on Thursday August 23 2018, @07:55PM (2 children)

    by JoeMerchant (3937) on Thursday August 23 2018, @07:55PM (#725377)

    So, even if I could remember and easily execute C-u -4 C-x TAB, why would I want to?

    Cursor to one corner
    Alt-A
    Cursor to other corner (visual editing, horrors, but at least it's a character interface)
    Alt-B
    Ctrl-X

    Not only is it faster and simpler to execute, it's also something approaching intuitive.

    --
    🌻🌻 [google.com]
    • (Score: 2) by tangomargarine on Thursday August 23 2018, @08:16PM (1 child)

      by tangomargarine (667) on Thursday August 23 2018, @08:16PM (#725384)

      So, even if I could remember and easily execute C-u -4 C-x TAB, why would I want to?

      My point is just that this is something you can do with various editors. Which is better is subjective.

      Or if we want to literally do it your way using emacs rectangle mode, Ctrl+SPACE at beginning, arrow to select,* C-x r k, which is an exactly equal number of keys.

      C-x is the standard keychord before any sort of default macro, (R)ectangle (K)ill.

      *you don't have to do anything to denote the end of the selection

      it's also something approaching intuitive.

      Ha. Yeah, because anything involving rectangular selections is ever intuitive, sure.

      YMMV

      --
      "Is that really true?" "I just spent the last hour telling you to think for yourself! Didn't you hear anything I said?"
      • (Score: 2) by JoeMerchant on Friday August 24 2018, @02:13AM

        by JoeMerchant (3937) on Friday August 24 2018, @02:13AM (#725550)

        I think if more editors had good rectangle selection implementations, that coding style conventions would be different than they are, more matrix oriented. It doesn't happen all the time, but many times I do find situations where organizing code into a 2D array on the editing screen both makes it more readable, and much more easily edited with rectangle selection manipulations.

        --
        🌻🌻 [google.com]