Your message dated Mon, 4 Aug 2008 14:26:08 -0400
with message-id <[EMAIL PROTECTED]>
and subject line Re: Bug#493753: vim: default configuration does not properly 
handle tabs
has caused the Debian Bug report #493753,
regarding vim: default configuration does not properly handle tabs
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [EMAIL PROTECTED]
immediately.)


-- 
493753: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=493753
Debian Bug Tracking System
Contact [EMAIL PROTECTED] with problems
--- Begin Message ---
Package: vim
Version: 1:7.1.314-3+b1
Severity: normal

I have always had a problem with vim on Debian where tabs are not
handled correctly.  You can reproduce by creating a text file as such:

=======================================================================
No indent
        one tab indent, line one
        one tab indent, line two
        one tab indent, line three
No indent
=======================================================================

Close vim, cat that file, copy it.  Open vim (use vim or vi), and paste the 
file.

You will get something like this, with extra tabs inserted every time
vim sees a tab on a line of pasted content:

=======================================================================
No indent
        one tab indent, line one
                one tab indent, line two
                        one tab indent, line three
                        No indent
========================================================================

This really sucks when you want to do something like cat
/etc/samba/smb.conf and paste it into vim (say, a bug report).

When starting this bug report, reportbug asked me to try vim using

`vim -U NONE -u NONE` to see if it was a configuration error

I tried that, and lo and behold I *DID NOT* see the above behavior.

I have not customized my vim settings from the default ones included in
the package.  Tested with konsole and xterm.  I don't have my mouse set
up with a normal VT login so I don't do a lot of copy/paste there.

Which of the default settings would cause the extra tabs to be inserted?

-- System Information:
Debian Release: lenny/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: i386 (i686)

Kernel: Linux 2.6.25-2-686 (SMP w/1 CPU core)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages vim depends on:
ii  libacl1                   2.2.47-2       Access control list shared library
ii  libc6                     2.7-10         GNU C Library: Shared libraries
ii  libgpm2                   1.20.4-2       General Purpose Mouse - shared lib
ii  libncurses5               5.6+20080713-1 shared libraries for terminal hand
ii  libselinux1               2.0.65-2       SELinux shared libraries
ii  vim-common                1:7.1.314-3+b1 Vi IMproved - Common files
ii  vim-runtime               1:7.1.314-3    Vi IMproved - Runtime files

vim recommends no packages.

Versions of packages vim suggests:
pn  ctags                         <none>     (no description available)
pn  vim-doc                       <none>     (no description available)
pn  vim-scripts                   <none>     (no description available)

-- no debconf information



--- End Message ---
--- Begin Message ---
On Mon, Aug 04, 2008 at 10:11:07AM -0800, James F Zuelow Jr wrote:
> I have always had a problem with vim on Debian where tabs are not
> handled correctly.  You can reproduce by creating a text file as such:
> 
> =======================================================================
> No indent
>       one tab indent, line one
>       one tab indent, line two
>       one tab indent, line three
> No indent
> =======================================================================
> 
> Close vim, cat that file, copy it.  Open vim (use vim or vi), and paste the 
> file.
> 
> You will get something like this, with extra tabs inserted every time
> vim sees a tab on a line of pasted content:

This problem is two-fold.  First, is that the 'autoindent' option is set
in /etc/vim/vimrc.  This causes Vim to do some automatic indentation.
Second, is that Vim doesn't know that you're pasting text, so it just
indents as if you were typing.

The general fix here is to ":set paste", paste your text, and then
":set nopaste".  This works no matter the Vim setup you have.

If you're using gvim (or vim in a proper terminal with ":set mouse=i"),
Vim *can* detect that you are pasting and the text will be pasted as
expected.

Closing the bug since it is expected behavior with known workarounds.

-- 
James
GPG Key: 1024D/61326D40 2003-09-02 James Vega <[EMAIL PROTECTED]>

Attachment: signature.asc
Description: Digital signature


--- End Message ---

Reply via email to