Tuesday, June 4, 2013

Re: I'm unable to override indentexpr

On Tue, 4 Jun 2013 19:11:19 -0700
Gary Johnson <garyjohn@spocom.com> wrote:

> On 2013-06-04, Steve Litt wrote:
> > Hi all,
> >
> > I'm using Vim 7.3 in Xubuntu 12.10. When editing my html files, this
> > happens when I set indentexpr?:
> >
> > indentexpr=HtmlIndentGet(v:lnum)
> >
> > That's no good because HtmlIndentGet(v:lnum) does a horrible job of
> > indenting: I'd rather have no indentation at all. No prob -- I'll
> > just set indentexpr=, thereby getting rid of Vim-furnished
> > indentation. So, in ~/.vim/after/ftplugin/html.vim, I put
> > indentexpr=. It changes nothing. verb set indentexpr? says:
> >
> > indentexpr=HtmlIndentGet(v:lnum)
> > Last set from /usr/share/vim/vim73/indent/html.vim
>
> To override indent settings, you must put your settings in
> ~/.vim/after/indent/html.vim.
> ^^^^^^

Thanks Gary,

You're right. I confirmed it by making ~/.vim/after/indent/html.vim,
putting in indentexpr=, and running Vim again. I can toggle indentexpr
by commenting and uncommenting that line in
~/.vim/after/indent/html.vim, so you're for sure right.

But I don't understand how my ~/.vim/after/ftplugin/html.vim got
executed, yet didn't change indentexpr. Does Vim throw away certain
categories of changes depending on the directory? You told me the fix
for my problem, and I thank you profusely for that. Now I'd like to
understand the process Vim uses to set all this stuff.

Thanks,

SteveT

--
--
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: