[vox-tech] vim leaves # comments at beginning of line when indenting

Bryan Richter vox-tech@lists.lugod.org
Sat, 22 May 2004 12:02:01 -0700


--1yeeQ81UyVL57Vl7
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Issac Trotts wrote:
> As an example, suppose I've written some Python code with a comment
>=20
> # Assorted verbiage here
>=20
> and then decide to indent it.  I position my cursor on the line and
> press the magic vim key sequence >>.  Nothing happens.  I go to other
> lines not beginning with '#' and do the same thing.  They get indented.
> I assume Bram Moolenar didn't do this as a practical joke, so it's a
> mystery to me...  Can someone tell me the rationale, and how to make it
> do what I want anyway?
>=20

Well, that doesn't happen to me, even when editing Python code. I have
all the default syntax files that come with vim on Debian Unstable, and
I haven't coded in Python yet so I just found some random script that is
part of some package and tried it on that. I can imagine that some odd
combination of tabstops, shiftwidths, etc. would lead to some weirdness.
Personally, I use=20

    set nocompatible
    set tabstop=3D4
    set shiftwidth=3D4
    set expandtab

in my ~/.vimrc=20

-Bryan

--1yeeQ81UyVL57Vl7
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: Digital signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iQCVAwUBQK+jqSJt/B67jmzMAQJMOQQAtrlrlN73xvO88ttEy5mhg1Kff/AG7LIt
2K+5w5gekjFXKI6jriwpTUH/Pc+BMmFfhxa/araF6BKqQf7G5HwIeT4C8rxjXOkt
LV+ela8tjzJOapivowVtXANNWvBjhuB/Z2IvEfMKZmhenrAOv0nxr9Xkos1B0q2b
vfJsL3GABKs=
=UwAM
-----END PGP SIGNATURE-----

--1yeeQ81UyVL57Vl7--