Add code to wrap text in different modes

Currently this is only done for Markdown, however more can easily be
added. We've opted to keep these settings in one place for all modes,
rather than split them into each mode's settings so that we can share
common settings easily across modes.