vile
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [vile] Indentation/trailing spacing


From: Paul van Tilburg
Subject: Re: [vile] Indentation/trailing spacing
Date: Tue, 10 Jun 2014 15:17:11 +0200
User-agent: Mutt/1.5.23 (2014-03-12)

On Tue, Jun 10, 2014 at 06:16:44AM -0400, Michael Tiernan wrote:
> On 6/10/14 6:02 AM, Paul van Tilburg wrote:
> > In vim there is a thing such as list/listchars [1] to reveal these
> > differences (or special characters for that matter).  Is there something
> > like that in vile?  Or would that require a filter on top of an syntax
> > filter?
> >
> The simplelist approach would be:
>   :set list
> which will show you all the characters, even hidden ones.

Ah thanks, yes.. I should have tried list a bit.
But, the main difference with vim is still then that one cannot
configure the formatting in vile.  AFAIK vim uses listchars to format
the special chars and even fill tabstops so one can find the errors. 
Example:

    def foo
        >---bar
    >--->---baz
    end

In vile/vim with just :set list:

    def foo
          ^Ibar
    ^I^Ibaz
    end

IMO by far not as useful.
(Of course one can always detab/entab a file before editing, but this is
not always a solution because messy as this might be one might want to
keep the diff as small as possible, so in that case I'd just prefer to
see what's going on.)

> To clear the trailing whitespace:
>   ^ATg
> That will apply the "trim trailing whitespace" function globally and
> nuke all the annoying crud.

I'm guessing you have a macro connected to that then?  For me ^A-Tg is
bound to execute-macro-11.

> To fix the space/tab thing, say the original spacing was "intended" to
> be five spaces, you can then set the following:
>   :set sw=5 ts=5
> Then, use:
>   ^ACTRL-Ig
> which will then change all space/tab filled indents to one tab set at
> "ts" characters.

Yes, I was aware of this, or ^A-<space>g for the inverse.

Cheers,
Paul

-- 
Web: http://paul.luon.net/home/      | E-mail: address@hidden
Jabber/GTalk: address@hidden          | GnuPG key ID: 0x50064181



reply via email to

[Prev in Thread] Current Thread [Next in Thread]