Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 07 Oct 2007 20:14:07 -0700
From:      LI Xin <delphij@delphij.net>
To:        Chess Griffin <chess@chessgriffin.com>
Cc:        freebsd-doc@FreeBSD.org
Subject:   Re: Two space indentation displays incorrectly in diff
Message-ID:  <4709A07F.1020201@delphij.net>
In-Reply-To: <20071007231017.1a29bec8@chessgriffin.com>
References:  <20071007231017.1a29bec8@chessgriffin.com>

index | next in thread | previous in thread | raw e-mail

[-- Attachment #1 --]
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=tcq2l textwidth=70 shiftwidth=2
> softtabstop=2 tabstop=8
> 
> When I edit the sgml, it looks ok:
> 
>     <sect2 id="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="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="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.  
> 
> 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.

I think it's just fine.  If you apply it through patch(1) then it will
understand that it's a <TAB> so the result would be what you expect.

Cheers,
-- 
Xin LI <delphij@delphij.net>	http://www.delphij.net/
FreeBSD - The Power to Serve!


[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHCaB/OfuToMruuMARCqplAJ9DWk1l20mdrWAPPzb2bzef40vLYACfbVny
BB8JS2jsiKIK5XQViTdmfvM=
=t922
-----END PGP SIGNATURE-----
help

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4709A07F.1020201>