On Wed, May 17, 2006 at 07:50:08PM -0700, Suresh Govindachar wrote:
>
> cga2000 wrote:
>
> > But I was not thinking of these tab stops..
> > more in the line of typewriter stuff, I guess.
>
> Creating an imap involving the following
> operations might do the job:
>
> "---set up the typewriter style tab-stops---
> let twtabs=[3, 5, 10, 28, 40, 58]
> "---then imap <tab> to
> " something involving the following---
> let idx=0
> while (getpos('.')[2] >= twtabs[idx])
> let idx += 1
> endwhile
> "---then something like---
> cursor(0, twtabs[idx])
> "---or---
> normal (twtabs[idx] - getpos('.')[2])l
>
> --Suresh
I already implemented that. See the VarTab() function in foo.vim
(my file of example vim functions):
http://www.vim.org/script.php?script_id=72
HTH --Benji Fisher