Wisely add "end" in ruby, endfunction/endif/more in vim script, etc