On Feb 11, 12:06 am, Yarin <[email protected]> wrote: > Hello, > I've recently made a useful addition/extension for version 7.3: > It's basically elastic tabs, but it aligns the dust-covered vertical > tab character instead (because aligning the standard tab would break > lots of stuff). The diff is here: > > http://naqua.net/p/vim/vim73_clustervtabs.diff > > Trying it out as is simple as applying the diff, turning on > clustervtabs with :set cvt, and placing vtabs (for that, a mapping > is probably preferable, as Ctrl-K Ctrl-K Ctrl-K is annoying)
I haven't tried the patch yet, though I probably will at some point for curiosity's sake. Elastic tabstops sound like a very interesting idea! I don't like two things conceptually about this patch, though. First, why 'clustervtabs'? I like 'elastictabstop' or 'tabcolumnblock' or something that describes better the purpose of the feature. (I get the "column block" term from http://nickgravgaard.com/elastictabstops/ ). Secondly, while you are correct that modifying the behavior of real tabs will affect a large amount of Vim's code, I think it is a bad idea to hijack the meaning of vertical tabs rather than using horizontal tabs as intended by the design of an elastic tabstop feature. I feel using vertical tabs is a bad idea, because: 1. Opening the document created by Vim with this feature enabled, will look completely wrong in other editors. One of the best parts of the elastic tabstops concept is that documents using them will still look "OK" in editors which don't support them. 2. Opening the document created in a different editor supporting elastic tabstops, in Vim, will not show elastic tabstops, even though Vim supposedly supports them. 3. Entering vertical tab characters is cumbersome, as you yourself mention. 4. Vertical tab characters actually do have meaning (even if rarely or never used these days), and "align text horizontally" is NOT that meaning. I don't think Vim should willfully do the wrong thing here. 5. Opening a document created with vertical tabs in an old Vim, or a Vim without this option enabled will (I believe) show a control character in place of the tab. If you feel working out all the kinks is too daunting a task for one developer, you could consider making a clone of the repository on Google Code, applying your patch, and getting people to help mature the feature alongside Vim development. As I said I have not tried the patch, but it seems you have a very good start which is functional enough for people to start playing with, at least. > > Is there any chance of getting this merged with VIM? > I cannot imagine this patch will be included in 7.3, but perhaps 7.4 or 8.0 (obviously I cannot speak for Bram here, he may decide not to include it at all). But there are other tab-related patches out there which also might be considered for future Vims. One is variable tabstops; a step up from strictly fixed-width tabstops, but not as automatic or convenient as elastic tabstops (although perhaps more versatile). The other I can think of is the ability for a wrapped line (via :set 'wrap') to maintain the indent of the line for the wrapped text. If I understand elastic tabstops properly, in that they set up "column blocks", the latter would actually make a lot of sense for the default behavior if the elastic tabstop option (whatever it ends up being called) is enabled; wrapped text should conceptually stay in the same column block as the text at the beginning of the line. -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php
