I can't indent html at all.

Tim Pope vim-ruby-devel at tpope.info
Fri May 11 11:04:13 EDT 2007


On Fri, May 11, 2007 at 08:57:16AM -0500, Ryan Shillington wrote:
> Yes, when I run :scriptnames line 35 is c:\vim\vim70\indent\html.vim. "let
> b:eruby_subtype_indentexpr" returns "HtmlIndentGet(v:lnum)".
> 
> To Tim, yes, I do have syntax highlighting turned on, and it's working.  I
> have the following lines in my _vimrc:
> 
> syntax on             " Enable syntax highlighting
> filetype on           " Enable filetype detection
> filetype indent on    " Enable filetype-specific indenting
> filetype plugin on    " Enable filetype-specific plugins
> 
> Sorry to be such a pain.  Thanks again for your help.
> 
> Ryan

Please check the value of "set indentexpr?" and confirm that it is
"GetErubyIndent()".  If it is, try putting the cursor on a line that
is indenting incorrectly (like line 2 of the following example)

<table>
<tr>

Then do

:let v:lnum = line(".")|echo GetErubyIndent()

This function is supposed to return the number of spaces that the line
should start with.  Tell me what it returns.  This might be an error
message, or multiple error messages.  If you have trouble copying and
pasting these errors, do

:redir @">

before the command and

redir END

afterwords.  This will copy the content where it can be pasted with
"p".

Cheers,
Tim


More information about the vim-ruby-devel mailing list