Indent problems with symbols containing keywords - solved?
Cezary Bagiński
cezary.baginski at gmail.com
Mon Mar 16 19:51:25 EDT 2009
Hi,
The following gives the wrong indent (vim 7.1.314, Ubuntu):
---------(after indent its the same)-------
class AAA
def aaa
a = [ :title,
:from,
:until,
]
end
end
-----------------
It seems the 'until' is matched, even when it's a symbol. I dug through
the 'syntax/ruby.vim' I already had, since the rubyforge git access is
broken (?).
The following is the best I could think of:
add the \@<! pattern to ignore symbols, replacing all instances of
keyword matchers, like:
\\<\\(while\\|until\\|for\\)\\>")'
with:
\\<\\(while\\|[:]\@<!until\\|for\\)\\>")'
I did it for just the until keyword and it seems to work fine.
Could the problem be caused by Vim treating the ':' char as part of a
keyword?
Thanks in advance.
More information about the vim-ruby-devel
mailing list