Editing Markdown with Vi and copying in Email

Many times, when you are documenting a project, you just want to copy in some email. This turns out to be quite difficult to do, so here’s a guide:

  1. If you do a simple copy and paste into a text file, the indents are going to be horrible as is the word wrap. A simple fix if you are using vi is to use the command gq which is the formatting command.
  2. Remember that G is going about going, so, for instance, gq<movement will do automatic wrapping to wherever you are going. So gqq means just reformat the current like gq} means reformat to the first blank line. Pretty useful.
  3. There will. oftentimes be images and things inside an email. So how do you deal with those. Well, Markdown makes it pretty easy to add an image, with the syntax where you just add an exclamation point in front of a traditional reference, so ![image.png] just display the image. If you want to add a text reference for non-image display then it is !(friendly description of image)[image.png]
  4. It’s oftentimes easier if you are going to do this for many images, to just rename them all en mass with the Mac Finder Rename.

I’m Rich & Co.

Welcome to Tongfamily, our cozy corner of the internet dedicated to all things technology and interesting. Here, we invite you to join us on a journey of tips, tricks, and traps. Let’s get geeky!

Let’s connect