What if you wanted retab to behave just as it does, except not modify
the existing tabstop value? I always set it back to what it was after
using the command.
On Oct 14, 8:59 am, "A. S. Budden" <[EMAIL PROTECTED]> wrote:
> 2008/10/14 Hoss <[EMAIL PROTECTED]>:
> [snip]
>
> > It would be nice if you could do the reverse operation, i.e. replace
> > spaces with the appropriate number of tabs according to a given
> > tabstop value so that visual positioning was preserved.
>
> I'm not sure of the details, but have you tried:
>
> :set noexpandtab
> :retab!
>
> (Note the '!' on the end of the retab line). This has the
> disadvantage that it will use tabs throughout the line rather than
> just at the start. If you want to just use tabs for indenting, you
> can do:
>
> execute '[EMAIL PROTECTED]( \{'.&ts.'}\)[EMAIL PROTECTED]("\t",
> len(submatch(0))/'.&ts.')@'
>
> (I have this mapped to the command :RetabIndents)
>
> Al
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---