On Thu, 30 Aug 2018 00:20:18 +0100 David Woodfall <[email protected]> wrote:
> On Wednesday 29 August 2018 18:47, > Lifepillar <[email protected]> put forth the proposition: > > There's a meme (if it may be called so) circulating on Twitter > > about using Fibonacci sequences for indentation. Just for fun, > > I wanted to see if it could be implemented using the vartabs > > feature. I thought that this would do it (for C files): > > > > set shiftwidth=0 > > set noexpandtab > > Won't this change *all* tab indents to the same size? Surely you need > to use expandtab? > > > set vartabstop=1,1,2,3,5,8,13,21,34 > > set autoindent > > set smartindent > > set ft=c > > > > With the above settings, it appears that the value of tabstop > > is used. This seems to agree with shiftwidth's documentation: > > “When [shiftwidth is] zero the 'ts' value will be used”, but > > not with tabstop's help: “the value of 'tabstop' will be > > ignored while 'vartabstop' is set”. Putting together the two, > > I would expect the above to use vartabstop. > > > > Am I missing something? > > I think it may need more work than that, but I may be wrong. > > You may need to indentexpr to a custom function and use that > to set ind. > > See :help indentexpr It looks like someone else saw that twitter post :) https://github.com/dodie/vim-fibo-indent Related: https://github.com/dodie/vim-disapprove-deep-indentation ಠ_ಠ -Dave -- -- You received this message from the "vim_use" 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 --- You received this message because you are subscribed to the Google Groups "vim_use" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
