Bug#493753: vim: default configuration does not properly handle tabs

James F Zuelow Jr james_zuelow at ci.juneau.ak.us
Mon Aug 4 18:11:07 UTC 2008

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

More information about the pkg-vim-maintainers mailing list