Sunday, September 30, 2018

Re: from the old vi faq

On 30.09.18 03:15, Eli the Bearded wrote:
> http://www.faqs.org/faqs/editor-faq/vi/part2/
> ------ start quote 8< ------
> 6.1 - Silly vi tricks

Seems to be a typo there? For decades some have used them as _Standard_
Vi(m) Operations, especially xp, as mistyping is more common than the
need for the others.

> Note: Also check out the Silly macros down below. Many macros and
> tricks are interchangeable.
>
> xp This will delete the character under the cursor, and put it
> afterwards. In other words, it swaps the location of two characters.
>
> ddp Similar to xp, but swapping lines.
>
> yyp duplicate a line
>
> uu Undo and redo last change. (This will take you to the last
> modification to the file without changing anything.) You can also use
> this to compare the changes to a line. Make the changes to the line,
> press U to undo the changes to the current line, and then press u to
> toggle between the two versions.

Must have encountered that, way back, because my fingers use u^r these days.

What I'd group with the above is "deep", to swap two words with the
cursor on the space preceding the first. (Most used while rephrasing a
sentence in a post, I find.)

What makes a *nix environment fun is the diversity of ways to skin any
cat, and I tend to us tac to reverse line order, as it's quicker than
looking up a vim way to do it - at least in my case. (And I don't think
of vim as another emacs.)

Erik

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment