vim hard line breaks and non-breaking spaces with pandoc -
i'm using vim pandoc , need use non-breaking spaces regularly, achieved in pandoc backslash-escaping regular space (i.e., "\ "). prefer use hard line breaks in vim, when , non-breaking space occurs @ end of line, space character deleted , backslash remains @ end of line -- , signals end of paragraph pandoc.
is there way can tell vim treat "\ " printed character when reformats paragraphs hard line breaks?
as example, if write following:
this line contains non-breaking space\ because don't want break after space.
what want vim this:
this line contains non-breaking space\ because don't want break after space.
but does this:
this line contains non-breaking space\ because don't want break after space.
my workaround moment stick soft line breaks, , i've remapped h
gh
etc. make easier deal with. i'm trying figure out whether there alternative way specify non-breaking space pandoc less confusing vim.
use proper utf-8 character non-breaking space (u+00a0) instead of \
. in vim, can insert it ctrl-v x 0
.
in ~/.vimrc
file add following highlight non-breaking spaces:
set list set listchars=nbsp:.
Comments
Post a Comment