On 31/10/06, Peter Hodge <[EMAIL PROTECTED]> wrote:
--- Nick Gravgaard <[EMAIL PROTECTED]> wrote:
<snip>
> BTW, does anyone know if it's possible to implement elastic tabstops > as a vim script? It would need to be called whenever a character is > inserted or deleted and would then modify the size of the tabstops. > The tabstops would need to have different widths on different lines. > Is this possible? Actually, you might be able to get it done with Vimscript, but you'd need to use space characters instead of tabs.
So is there no way of using tabs and get tabstops to have different widths on different lines? :( I think this would be by far the best solution if possible.
You would map <TAB> to call a function which examines the current line, the line above, the line below, and inserts the correct number of spaces, and also adjusts the lines above or below accordingly.
It would have to be more than just tab, but everytime the text changes in any way (character insertion/deletion and cutting/pasting)! Is this possible too?
Also, if you're inserting spaces instead of tabs, it's backwards compatible with just about everything, which would be great.
Sure, but now we're just using spaces to line things up in a new indenting style which wasn't really what I had in mind. I suppose I could try and convert multiple tabs to spaces on saving but this isn't ideal in my opinion...