On Thu, May 18, 2006 at 01:55:03PM EDT, Hari Krishna Dara wrote:
> 
> On Thu, 18 May 2006 at 8:23am, Benji Fisher wrote:
> 
> > 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
> >
> 
> Oops... I searched for scripts and didn't find anything dealing with
> this kind of tabs, so got curious and went ahead and wrote a small
> plugin for this. I hope there is more to be offered in this, than your
> VarTab() function, especially that there is a GUI tabstop setter, and it
> maps <Tab> to insert the right number of spaces.
> 
> I am attaching the plugin, and hope to get some feedback. You need
> genutils.vim also, and read the plugin header.

Thanks to all. This was just a general question.. something I planned
to keep on the back burner for a while.. so I'm not sure when I will
have the time to look into this further. 

Saving this thread for later reference.

cga

Reply via email to