Re: Two space indentation displays incorrectly in diff
--nextPart4243409.gHYmf1S2Wy
Content-Type: text/plain;
charset="iso-8859-6"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline
On Monday 08 October 2007, Chess Griffin wrote:
> Hello,
>
> I am working on some more doc diffs to submit and I am paying careful
> attention to the FDP Primer. The problem is that when I insert a
> two space indent after the first line of a <para>, it shows up as 1
> space when I create the diff -u.
>
> This is in my .vimrc:
>
> autocmd BufNewFile,BufRead *.sgml,*.ent,*.html,*.tex,*.xsl set
> autoindent formatoptions=3Dtcq2l textwidth=3D70 shiftwidth=3D2
> softtabstop=3D2 tabstop=3D8
>
> When I edit the sgml, it looks ok:
>
> <sect2 id=3D"consoles-vidcontrol">
> <title>Changing Console Video Modes</title>
>
> <para>The FreeBSD console default video mode may be adjusted to
> 1024x768, 1280x1024, or any other size supported by your
> graphics chip and monitor. To use a different video mode, you
> must first recompile your kernel and include two additional
> options:</para>
>
> But in the diff it looks like this:
>
> + <sect2 id=3D"consoles-vidcontrol">
> + <title>Changing Console Video Modes</title>
> +
> + <para>The FreeBSD console default video mode may be adjusted to
> + 1024x768, 1280x1024, or any other size supported by your
> + graphics chip and monitor. To use a different video mode, you
> + must first recompile your kernel and include two additional
> + options:</para>
>
> It appears that there is only a one space indent after the first <para>
> line.
>
> I also did ":set list" on the diff and it looks like this:
>
> + <sect2 id=3D"consoles-vidcontrol">$
> + <title>Changing Console Video Modes</title>$
> +$
> + <para>The FreeBSD console default video mode may be adjusted to$
> +^I1024x768, 1280x1024, or any other size supported by your$
> +^Igraphics chip and monitor. To use a different video mode, you$
> +^Imust first recompile your kernel and include two additional$
> +^Ioptions:</para>$
>
> I am stumped as to why this occurs or how to fix it.
Obviously vim in converting the 8 spaces into one tab. When displayed=20
this turns into "indentation to the first tabstop (=3D8)" which means only=
=20
and indentation of 7 is visible (deducting the plus sign).
I don't know how to teach vim not to do the conversion and I don't know if=
=20
that might even be the right formatting, but I hope this helps.
> When the diff is applied to the original source, it comes
> out fine, so maybe it's ok?
>
> Any advice from expert vimmers would be greatly appreciated.
>
> Thank you.
> Chess
=2D-=20
/"\ Best regards, | mlaier@freebsd.org
\ / Max Laier | ICQ #67774661
X http://pf4freebsd.love2party.net/ | mlaier@EFnet
/ \ ASCII Ribbon Campaign | Against HTML Mail and News
--nextPart4243409.gHYmf1S2Wy
Content-Type: application/pgp-signature; name=signature.asc
Content-Description: This is a digitally signed message part.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.4 (FreeBSD)
iD8DBQBHCabtXyyEoT62BG0RAtVtAJ4zwwYPOA0wmzsQ7jMy+Aipv0OpeACfX98t
rdIEc5prqWiefL/81tFBtS0=
=bxLE
-----END PGP SIGNATURE-----
--nextPart4243409.gHYmf1S2Wy--
討論串 (同標題文章)
完整討論串 (本文為第 3 之 6 篇):