Soft Wraps in Sublime and Vim

Alternate Title: The Tyranny of Version Control

One disadvantage to blogging with git is that if you use hard breaks to wrap your lines, diffs will not work as well. Moving a word from one line to the next will appear as a change even though there was no actual content change.

If you choose not to use hard breaks, the trade-off is that editors which do not automatically wrap text will display all your paragraphs as single lines.

Sublime Text

Fortunately, Sublime Text makes it easy to configure syntax specific preferences. This allows you to customize settings for a particular file type, such as Markdown, and avoid having to change your word wrap settings globally.

Open a Markdown file, and click on Sublime Text > Preferences > Settings - More > Syntax Specific - User. My Markdown specific settings looks like this:

  "extensions": ["md"],
  "word_wrap": true,
  "wrap_width": 80


Add the following to your ~/.vimrc:

au BufNewFile,BufRead *.md set wrap linebreak nolist
au BufNewFile,BufRead *.md set columns=80

It does not work so well with split panes, but is serviceable if you're only editing one file.