At the intersection of less and vi...
Sep. 14th, 2006 01:51 pmDid something neat today. I knew it was theoretically possible, but I just hadn't needed it until today, nor did I know the exact mechanics of implementing it.
I had keyed in
I escaped from insert mode into command mode and then yanked a similar line to copy as a template. I pasted the line and then modified it to my liking. I was curious as to whether escaping the insert mode would drop me out of this instance of
After the
Sweet.
Now I know how that works.
I had keyed in
less .bashrc to see some aliases, and realized I needed to add another one. I remembered that it's supposed to be possible to open vi from the less ouput. So, I said, "what the hey," and keyed in vi -- which dropped me into insert mode immediately.I escaped from insert mode into command mode and then yanked a similar line to copy as a template. I pasted the line and then modified it to my liking. I was curious as to whether escaping the insert mode would drop me out of this instance of
vi, since it was being invoked through another program.After the
:wq, I was dropped back into the less output, with my new addition visible. Sweet.
Now I know how that works.