Vim


The g command in vim

My knowledge of g in vi is kind of ironic. I first learned about it when I learned the etymology of grep. It was from the ed command g/re/p. Ed wasn’t a visual editor. You essentially kept the file in your head and then could bring it up line by line - and change it line by line - in an editor. So the g/re/p command was really useful because you could print all lines (p) that matched a pattern (re) over the entire file (g).

Why vim was opening markdown files slowly.

A few months back I upgraded my vim configuration to use pathogen for managing my vim plugins. Since adding plugins was now a doddle I found a few lists of “super-duper useful vim plugins you must have” and just installed them blindly. Along the way I also configured how various plugins and the like were configured. This included a one-line change to associate .md files with markdown (by default they associate Modula-2 which I haven’t written code in for 20+ years).