Confessions of a Recovering Proprietary Programmer, Part VI

I have been a happy vi user for almost three decades. My initial choice of vi over emacs was quite simple: the machine that was available at the time could run about ten vi sessions, but only one emacs session. Given that this was a shared machine, use of emacs was therefore socially irresponsible. Given a more capable machine, perhaps I would instead be a happy emacs user. But by now, vi is ingrained firmly in my fingers. Or rather, those features of vi that have been around for some decades are ingrained — I still haven’t figured out what the g command does, aside from trip me up when I don’t quite hit the shift key firmly enough. I am sure that there is some comprehensive vi documentation out there somewhere, but when I search for it, I only find web pages that helpfully offer tutorials on vi features that I have known about for more than a quarter century.

As a result, these days I mostly learn vi by making mistakes. For example, yesterday I downloaded an ASCII-text web page and edited it with2.6.39-rc6-15.5380e723.patch vi. The startup message from vi looked very strange, but life was moving especially quickly that morning, and vi did show me the desired page, so I moved on.

This morning, I saw the same strange startup message. I got done with my vi session, and looked at the file I had downloaded to see if there was anything strange about its permissions or content. There was in fact something very strange, namely that it didn’t exist at all.

The mistake I had made was to give the URL to vi instead of to wget. Nevertheless, vi happily downloaded the web page to /tmp and let me edit it. So, to see one of my recent patches, instead of using a browser, I can type:

vi http://www.rdrop.com/users/paulmck/patches/2.6.39-rc6-15.5380e723.patch

This can be quite nice when testing scripts that automatically download information from the web!

This entry was posted in Uncategorized and tagged . Bookmark the permalink.

4 Responses to Confessions of a Recovering Proprietary Programmer, Part VI

  1. Anonymous says:

    Huh… nifty. Seems one of the standard plugins recognises URLs, and calls wget or curl to fetch the document. Thanks for pointing that out – I’m sure it’ll be useful to know…

  2. paulmckrcu says:

    “:help g” is my friend

    Someone on IRC pointed me at the “:help g” vi commmand. I expect that gj, gk, and gm will be quite useful to me!!!

  3. Anonymous says:

    vim, not vi

    Note that you are using VIM, not vi.

    • Anonymous says:

      Re: vim, not vi

      Indeed, when I type “vi” it executes /usr/bin/vi, which identifies itself as “VIM – Vi IMproved.”

Comments are closed.