Tuesday, August 6, 2013

Re: Official petition for Bram Moolenaar to become a front end developer

On Tuesday, August 6, 2013 1:45:28 PM UTC-5, glts wrote:
> On Tuesday, August 6, 2013 8:05:25 PM UTC+2, Andrew Ray wrote:
> > > Editing HTML is a pain. I hope someone fixes the indent plugin for
> > > that. And no, it's not going to be part of core Vim, a plugin should be
> > > able to handle it.
> >
> > Why is cindent in the core of vim? Why does C get special treatment?
> > At first glance it makes it seem like vim has a language bias. I don't
> > know the history though. *Is* it from vi?
>
> C gets special treatment. See 'cindent', 'cscope', etc.
> Lisp gets special treatment. See 'lispwords', etc.
> nroff gets special treatment. See 'sections', 'paragraphs'.
> And so on.
>

It looks like 'indentexpr' was introduced back in version 6 sometime. 'cindent' existed before that.

My guess is that Bram and other Vim developers realized it would be unmaintainable to require a C code patch to support indentation of every single filetype Vim would ever edit. So instead they allowed indenting ANY filetype in an extensible way, by introducing the 'indentexpr' and related options. See :help new-indent-flex. So this is the preferred method going forward.

--
--
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 vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

No comments:

Post a Comment