title: vim hard line breaks and non-breaking spaces with pandoc
body: <p>I'm using vim with pandoc and need to use non-breaking spaces fairly regularly, which is achieved in pandoc by backslash-escaping a regular space (i.e., "\ "). I would prefer to use hard line breaks in vim, but when I do so and a non-breaking space occurs at the end of a line, the space character is deleted and the backslash remains at the end of the line -- and this signals the end of the paragraph to pandoc.</p>
  
  <p>Is there a way I can tell vim to treat "\ " as a printed character when it reformats paragraphs with hard line breaks?</p>
  
  <p>As an example, if I write the following:</p>
  
  <pre><code>This line contains a non-breaking space\ because I don't want a break after space.
  </code></pre>
  
  <p>What I <em>want</em> vim to do is this:</p>
  
  <pre><code>This line contains a non-breaking
  space\ because I don't want a break after
  space.
  </code></pre>
  
  <p>But what it <em>does</em> is this:</p>
  
  <pre><code>This line contains a non-breaking space\
  because I don't want a break after space.
  </code></pre>
  
  <p>My workaround for the moment is to stick to soft line breaks, and I've remapped <code>h</code> to <code>gh</code> etc. to make that easier to deal with. I'm also trying to figure out whether there is an alternative way to specify a non-breaking space to pandoc that will be less confusing to vim.</p>