updated for version 7.0148
diff --git a/runtime/autoload/zip.vim b/runtime/autoload/zip.vim
new file mode 100644
index 0000000..751b1a1
--- /dev/null
+++ b/runtime/autoload/zip.vim
@@ -0,0 +1,226 @@
+" zip.vim: Handles browsing zipfiles
+"            AUTOLOAD PORTION
+" Date:			Sep 16, 2005
+" Version:		2
+" Maintainer:	Charles E Campbell, Jr <drchipNOSPAM at campbellfamily dot biz>
+" License:		Vim License  (see vim's :help license)
+" Copyright:    Copyright (C) 2005 Charles E. Campbell, Jr. {{{1
+"               Permission is hereby granted to use and distribute this code,
+"               with or without modifications, provided that this copyright
+"               notice is copied with it. Like anything else that's free,
+"               zipPlugin.vim is provided *as is* and comes with no warranty
+"               of any kind, either expressed or implied. By using this
+"               plugin, you agree that in no event will the copyright
+"               holder be liable for any damages resulting from the use
+"               of this software.
+
+" ---------------------------------------------------------------------
+" Initialization: {{{1
+let s:keepcpo= &cpo
+set cpo&vim
+if exists("g:loaded_zip")
+ finish
+endif
+
+let g:loaded_zip= "v2"
+
+" ----------------
+"  Functions: {{{1
+" ----------------
+
+" ---------------------------------------------------------------------
+" zip#Browse: {{{2
+fun! zip#Browse(zipfile)
+"  call Dfunc("zip#Browse(zipfile<".a:zipfile.">)")
+
+  " sanity checks
+  if !executable("unzip")
+   echohl Error | echo "***error*** (zip#Browse) unzip not available on your system"
+   call inputsave()|call input("Press <cr> to continue")|call inputrestore()
+"   call Dret("zip#Browse")
+   return
+  endif
+  if !filereadable(a:zipfile)
+   echohl Error | echo "***error*** (zip#Browse) File not readable<".a:zipfile.">" | echohl None
+   call inputsave()|call input("Press <cr> to continue")|call inputrestore()
+"   call Dret("zip#Browse")
+   return
+  endif
+  if &ma != 1
+   set ma
+  endif
+  let w:zipfile= a:zipfile
+
+  setlocal noswapfile
+  setlocal buftype=nofile
+  setlocal bufhidden=hide
+  setlocal nobuflisted
+  setlocal nowrap
+  set ft=tar
+
+  " give header
+  exe "$put ='".'\"'." zip.vim version ".g:loaded_zip."'"
+  exe "$put ='".'\"'." Browsing zipfile ".a:zipfile."'"
+  exe "$put ='".'\"'." Select a file with cursor and press ENTER"."'"
+  $put =''
+  0d
+  $
+
+  exe "silent r! unzip -l ".a:zipfile
+  $d
+  silent 4,$v/^\s\+\d\+\s\{0,5}\d/d
+  silent  4,$s/^\%(.*\)\s\+\(\S\)/\1/
+
+  setlocal noma nomod ro
+  noremap <silent> <buffer> <cr> :call <SID>ZipBrowseSelect()<cr>
+
+"  call Dret("zip#Browse")
+endfun
+
+" ---------------------------------------------------------------------
+" ZipBrowseSelect: {{{2
+fun! s:ZipBrowseSelect()
+"  call Dfunc("ZipBrowseSelect() zipfile<".w:zipfile.">")
+  let fname= getline(".")
+
+  " sanity check
+  if fname =~ '^"'
+"   call Dret("ZipBrowseSelect")
+   return
+  endif
+  if fname =~ '/$'
+   echohl Error | echo "***error*** (zip#Browse) Please specify a file, not a directory" | echohl None
+   call inputsave()|call input("Press <cr> to continue")|call inputrestore()
+"   call Dret("ZipBrowseSelect")
+   return
+  endif
+
+"  call Decho("fname<".fname.">")
+
+  " get zipfile to the new-window
+  let zipfile= substitute(w:zipfile,'.zip$','','e')
+
+  new
+  wincmd _
+  exe "e zipfile:".zipfile.':'.fname
+  filetype detect
+
+"  call Dret("ZipBrowseSelect")
+endfun
+
+" ---------------------------------------------------------------------
+" zip#Read: {{{2
+fun! zip#Read(fname,mode)
+"  call Dfunc("zip#Read(fname<".a:fname.">,mode=".a:mode.")")
+  let zipfile = substitute(a:fname,'zipfile:\(.\{-}\):.*$','\1','')
+  let fname   = substitute(a:fname,'zipfile:.\{-}:\(.*\)$','\1','')
+"  call Decho("zipfile<".zipfile."> fname<".fname.">")
+
+  exe "r! unzip -p ".zipfile." ".fname
+
+  " cleanup
+  0d
+  set nomod
+
+"  call Dret("zip#Read")
+endfun
+
+" ---------------------------------------------------------------------
+" zip#Write: {{{2
+fun! zip#Write(fname)
+"  call Dfunc("zip#Write(fname<".a:fname.")")
+
+  " sanity checks
+  if !executable("zip")
+   echohl Error | echo "***error*** (zip#Write) sorry, your system doesn't appear to have the zip pgm" | echohl None
+   call inputsave()|call input("Press <cr> to continue")|call inputrestore()
+"   call Dret("zip#Write")
+   return
+  endif
+  if !exists("*mkdir")
+   echohl Error | echo "***error*** (zip#Write) sorry, mkdir() doesn't work on your system" | echohl None
+   call inputsave()|call input("Press <cr> to continue")|call inputrestore()
+"   call Dret("zip#Write")
+   return
+  endif
+
+  let curdir= getcwd()
+  let tmpdir= tempname()
+"  call Decho("orig tempname<".tmpdir.">")
+  if tmpdir =~ '\.'
+   let tmpdir= substitute(tmpdir,'\.[^.]*$','','e')
+  endif
+"  call Decho("tmpdir<".tmpdir.">")
+  call mkdir(tmpdir,"p")
+
+  " attempt to change to the indicated directory
+  try
+   exe "cd ".escape(tmpdir,' \')
+  catch /^Vim\%((\a\+)\)\=:E344/
+   echohl Error | echo "***error*** (zip#Write) cannot cd to temporary directory" | Echohl None
+   call inputsave()|call input("Press <cr> to continue")|call inputrestore()
+"   call Dret("zip#Write")
+   return
+  endtry
+"  call Decho("current directory now: ".getcwd())
+
+  " place temporary files under .../_ZIPVIM_/
+  if isdirectory("_ZIPVIM_")
+   call s:Rmdir("_ZIPVIM_")
+  endif
+  call mkdir("_ZIPVIM_")
+  cd _ZIPVIM_
+"  call Decho("current directory now: ".getcwd())
+
+  let zipfile = substitute(a:fname,'zipfile:\(.\{-}\):.*$','\1','')
+  let fname   = substitute(a:fname,'zipfile:.\{-}:\(.*\)$','\1','')
+  let dirpath = substitute(fname,'/[^/]\+$','','e')
+  if zipfile !~ '/'
+   let zipfile= curdir.'/'.zipfile
+  endif
+"  call Decho("zipfile<".zipfile."> fname<".fname.">")
+
+  call mkdir(dirpath,"p")
+  exe "w! ".fname
+  if executable("cygpath")
+   let dirpath = substitute(system("cygpath ".dirpath),'\n','','e')
+   let zipfile = substitute(system("cygpath ".zipfile),'\n','','e')
+  endif
+
+"  call Decho("zip -u ".zipfile.".zip ".fname)
+  call system("zip -u ".zipfile.".zip ".fname)
+  if v:shell_error != 0
+   echohl Error | echo "***error*** (zip#Write) sorry, unable to update ".zipfile." with ".fname | echohl None
+   call inputsave()|call input("Press <cr> to continue")|call inputrestore()
+  endif
+  
+  " cleanup and restore current directory
+  cd ..
+  call s:Rmdir("_ZIPVIM_")
+  exe "cd ".escape(curdir,' \')
+  setlocal nomod
+
+"  call Dret("zip#Write")
+endfun
+
+" ---------------------------------------------------------------------
+" Rmdir: {{{2
+fun! s:Rmdir(fname)
+"  call Dfunc("Rmdir(fname<".a:fname.">)")
+  if has("unix")
+   call system("/bin/rm -rf ".a:fname)
+  elseif has("win32") || has("win95") || has("win64") || has("win16")
+   if &shell =~? "sh$"
+    call system("/bin/rm -rf ".a:fname)
+   else
+    call system("del /S ".a:fname)
+   endif
+  endif
+"  call Dret("Rmdir")
+endfun
+
+" ------------------------------------------------------------------------
+" Modelines And Restoration: {{{1
+let &cpo= s:keepcpo
+unlet s:keepcpo
+" vim:ts=8 fdm=marker
diff --git a/runtime/compiler/eruby.vim b/runtime/compiler/eruby.vim
new file mode 100644
index 0000000..5d85bf1
--- /dev/null
+++ b/runtime/compiler/eruby.vim
@@ -0,0 +1,38 @@
+" Vim compiler file
+" Language:	eRuby
+" Maintainer:	Doug Kearns <djkea2 at gus.gscit.monash.edu.au>
+" Info:		$Id$
+" URL:		http://vim-ruby.sourceforge.net
+" Anon CVS:	See above site
+" Licence:	GPL (http://www.gnu.org)
+" Disclaimer:
+"    This program is distributed in the hope that it will be useful,
+"    but WITHOUT ANY WARRANTY; without even the implied warranty of
+"    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+"    GNU General Public License for more details.
+" ----------------------------------------------------------------------------
+
+if exists("current_compiler")
+  finish
+endif
+let current_compiler = "eruby"
+
+if exists(":CompilerSet") != 2		" older Vim always used :setlocal
+  command -nargs=* CompilerSet setlocal <args>
+endif
+
+let s:cpo_save = &cpo
+set cpo-=C
+
+CompilerSet makeprg=eruby
+
+CompilerSet errorformat=eruby:\ %f:%l:%m,
+		       \%E%f:%l:\ %m,
+		       \%-Z%p^,
+		       \%C%m,
+		       \%-G%.%#
+
+let &cpo = s:cpo_save
+unlet s:cpo_save
+
+" vim: nowrap sw=2 sts=2 ts=8 ff=unix:
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt
index 6e3d26c..368b444 100644
--- a/runtime/doc/eval.txt
+++ b/runtime/doc/eval.txt
@@ -1,4 +1,4 @@
-*eval.txt*      For Vim version 7.0aa.  Last change: 2005 Sep 12
+*eval.txt*      For Vim version 7.0aa.  Last change: 2005 Sep 15
 
 
 		  VIM REFERENCE MANUAL    by Bram Moolenaar
@@ -4972,7 +4972,7 @@
 	   echo "Done!"
 	endfunction
 
-The file name and the name used before the colon in the function must match
+The file name and the name used before the # in the function must match
 exactly, and the defined function must have the name exactly as it will be
 called.
 
@@ -4983,9 +4983,6 @@
 
 Vim will look for the file "autoload/foo/bar.vim" in 'runtimepath'.
 
-The name before the first colon must be at least two characters long,
-otherwise it looks like a scope, such as "s:".
-
 This also works when reading a variable that has not been set yet: >
 
 	:let l = foo#bar#lvar
diff --git a/runtime/doc/filetype.txt b/runtime/doc/filetype.txt
index e68b75a..07d4425 100644
--- a/runtime/doc/filetype.txt
+++ b/runtime/doc/filetype.txt
@@ -1,4 +1,4 @@
-*filetype.txt*  For Vim version 7.0aa.  Last change: 2005 Aug 30
+*filetype.txt*  For Vim version 7.0aa.  Last change: 2005 Sep 16
 
 
 		  VIM REFERENCE MANUAL    by Bram Moolenaar
@@ -184,7 +184,8 @@
 <  3. To use the new filetype detection you must restart Vim.
 
    The files in the "ftdetect" directory are used after all the default
-   checks, thus they can overrule a previously detected file type.
+   checks, thus they can overrule a previously detected file type.  But you
+   can also use |:setfiletype| to keep a previously detected filetype.
 
 B. If you want to detect your file after the default file type checks.
 
diff --git a/runtime/doc/tags b/runtime/doc/tags
index 4dc0414..4512122 100644
--- a/runtime/doc/tags
+++ b/runtime/doc/tags
@@ -5294,7 +5294,6 @@
 hebrew.txt	hebrew.txt	/*hebrew.txt*
 help	various.txt	/*help*
 help-context	help.txt	/*help-context*
-help-tags	tags	1
 help-translated	various.txt	/*help-translated*
 help-xterm-window	various.txt	/*help-xterm-window*
 help.txt	help.txt	/*help.txt*
diff --git a/runtime/doc/todo.txt b/runtime/doc/todo.txt
index 65e76b9..cbd77d0 100644
--- a/runtime/doc/todo.txt
+++ b/runtime/doc/todo.txt
@@ -1,4 +1,4 @@
-*todo.txt*      For Vim version 7.0aa.  Last change: 2005 Sep 14
+*todo.txt*      For Vim version 7.0aa.  Last change: 2005 Sep 16
 
 
 		  VIM REFERENCE MANUAL	  by Bram Moolenaar
@@ -30,6 +30,8 @@
 							*known-bugs*
 -------------------- Known bugs and current work -----------------------
 
+Test11 fails sometimes. (athena, huge features)
+
 ccomplete:
 - How to use a popup menu?
 - When a typedef or struct is local to a file only use it in that file?
diff --git a/runtime/doc/version7.txt b/runtime/doc/version7.txt
index ce0b32b..e4e981b 100644
--- a/runtime/doc/version7.txt
+++ b/runtime/doc/version7.txt
@@ -1,4 +1,4 @@
-*version7.txt*  For Vim version 7.0aa.  Last change: 2005 Sep 13
+*version7.txt*  For Vim version 7.0aa.  Last change: 2005 Sep 15
 
 
 		  VIM REFERENCE MANUAL    by Bram Moolenaar
@@ -1361,4 +1361,7 @@
 GUI: When scrolling with the scrollbar and there is a line that doesn't fit
 redrawing may fail.  Make sure w_skipcol is valid before redrawing.
 
+"dFxd;" deleted the character under the cursor, "d;" didn't remember the
+exclusiveness of the motion.
+
  vim:tw=78:ts=8:ft=help:norl:
diff --git a/runtime/doc/zip.txt b/runtime/doc/zip.txt
new file mode 100644
index 0000000..aa95460
--- /dev/null
+++ b/runtime/doc/zip.txt
@@ -0,0 +1,31 @@
+*zip.txt*	Zip File Interface				Sep 16, 2005
+
+Author:  Charles E. Campbell, Jr.  <NdrOchip@ScampbellPfamily.AbizM>
+	  (remove NOSPAM from Campbell's email first)
+Copyright:    Copyright (C) 2005 Charles E. Campbell, Jr. {{{1 *zip-copyright*
+              Permission is hereby granted to use and distribute this code,
+	      with or without modifications, provided that this copyright
+	      notice is copied with it. Like anything else that's free,
+	      zip.vim and zipPlugin.vim are provided *as is* and comes with no
+	      warranty of any kind, either expressed or implied. By using this
+	      plugin, you agree that in no event will the copyright holder be
+	      liable for any damages resulting from the use of this software.
+
+==============================================================================
+1. Contents					*zip* *zip-contents*
+   1. Contents..................................................|zip-contents|
+   2. Usage.....................................................|zip-usage|
+   3. History...................................................|zip-history|
+
+==============================================================================
+2. Usage					*zip-usage* *zip-manual*
+
+==============================================================================
+3. History					*zip-history*
+   v2 Sep 16, 2005 * silenced some commands (avoiding hit-enter prompt)
+                   * began testing under Windows; works thus far
+		   * filetype detection fixed
+   v1 Sep 15, 2005 * Initial release, had browsin, reading, and writing
+
+==============================================================================
+vim:tw=78:ts=8:ft=help
diff --git a/runtime/ftplugin/ruby.vim b/runtime/ftplugin/ruby.vim
index e21afee..b262258 100644
--- a/runtime/ftplugin/ruby.vim
+++ b/runtime/ftplugin/ruby.vim
@@ -1,14 +1,125 @@
 " Vim filetype plugin
-" Language:     Ruby
-" Maintainer:   Gavin Sinclair <gsinclair@soyabean.com.au>
-" Last Change:  2002/08/12
-" URL: www.soyabean.com.au/gavin/vim/index.html
+" Language:	Ruby
+" Maintainer:	Gavin Sinclair <gsinclair at soyabean.com.au>
+" Info:         $Id$
+" URL:          http://vim-ruby.sourceforge.net
+" Anon CVS:     See above site
+" Licence:      GPL (http://www.gnu.org)
+" Disclaimer:
+"    This program is distributed in the hope that it will be useful,
+"    but WITHOUT ANY WARRANTY; without even the implied warranty of
+"    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+"    GNU General Public License for more details.
+" ----------------------------------------------------------------------------
+"
+" Original matchit support thanks to Ned Konz.  See his ftplugin/ruby.vim at
+"   http://bike-nomad.com/vim/ruby.vim.
+" ----------------------------------------------------------------------------
 
 " Only do this when not done yet for this buffer
 if (exists("b:did_ftplugin"))
-    finish
+  finish
 endif
 let b:did_ftplugin = 1
 
-" There are no known setting particularly appropriate for Ruby.  Please
-" contact the maintainer if you think of some.
+let s:cpo_save = &cpo
+set cpo&vim
+
+" Matchit support
+if exists("loaded_matchit") && !exists("b:match_words")
+  let b:match_ignorecase = 0
+
+ " TODO: improve optional do loops
+ let b:match_words =
+    \ '\%(' .
+    \     '\%(\%(\.\|\:\:\)\s*\)\@<!\<\%(class\|module\|begin\|def\|case\|for\|do\)\>' .
+    \   '\|' .
+    \     '\%(\%(^\|\.\.\.\=\|[\,;=([<>~\*/%!&^|+-]\)\s*\)\@<=\%(if\|unless\|until\|while\)\>' .
+    \ '\)' .
+    \ ':' .
+    \ '\%(' .
+    \     '\%(\%(\.\|\:\:\)\s*\)\@<!\<\%(else\|elsif\|ensure\|when\)\>' .
+    \   '\|' .
+    \     '\%(\%(^\|;\)\s*\)\@<=\<rescue\>' .
+    \ '\)' .
+    \ ':' .
+    \ '\%(\%(\.\|\:\:\)\s*\)\@<!\<end\>'
+
+  let b:match_skip =
+     \ "synIDattr(synID(line('.'),col('.'),0),'name') =~ '" .
+     \ "\\<ruby\\%(String\\|StringDelimiter\\|ASCIICode\\|Interpolation\\|" .
+     \ "NoInterpolation\\|Escape\\|Comment\\|Documentation\\)\\>'"
+
+endif
+
+setlocal formatoptions-=t formatoptions+=croql
+
+setlocal include=^\\s*\\<\\(load\\\|\w*require\\)\\>
+setlocal includeexpr=substitute(substitute(v:fname,'::','/','g'),'$','.rb','')
+setlocal suffixesadd=.rb
+
+" TODO:
+"setlocal define=^\\s*def
+
+setlocal comments=:#
+setlocal commentstring=#\ %s
+
+if !exists("s:rubypath")
+  if executable("ruby")
+    if &shellxquote == "'"
+      let s:rubypath = system('ruby -e "puts (begin; require %q{rubygems}; Gem.all_load_paths; rescue LoadError; []; end + $:).join(%q{,})"')
+    else
+      let s:rubypath = system("ruby -e 'puts (begin; require %q{rubygems}; Gem.all_load_paths; rescue LoadError; []; end + $:).join(%q{,})'")
+    endif
+    let s:rubypath = substitute(s:rubypath,',.$',',,','')
+  else
+    " If we can't call ruby to get its path, just default to using the
+    " current directory and the directory of the current file.
+    let s:rubypath = ".,,"
+  endif
+endif
+
+let &l:path = s:rubypath
+
+if has("gui_win32") && !exists("b:browsefilter")
+  let b:browsefilter = "Ruby Source Files (*.rb)\t*.rb\n" .
+                     \ "All Files (*.*)\t*.*\n"
+endif
+
+let b:undo_ftplugin = "setl fo< inc< inex< sua< def< com< cms< path< "
+      \ "| unlet! b:browsefilter b:match_ignorecase b:match_words b:match_skip"
+
+let &cpo = s:cpo_save
+unlet s:cpo_save
+
+"
+" Instructions for enabling "matchit" support:
+"
+" 1. Look for the latest "matchit" plugin at
+"
+"         http://www.vim.org/scripts/script.php?script_id=39
+"
+"    It is also packaged with Vim, in the $VIMRUNTIME/macros directory.
+"
+" 2. Copy "matchit.txt" into a "doc" directory (e.g. $HOME/.vim/doc).
+"
+" 3. Copy "matchit.vim" into a "plugin" directory (e.g. $HOME/.vim/plugin).
+"
+" 4. Ensure this file (ftplugin/ruby.vim) is installed.
+"
+" 5. Ensure you have this line in your $HOME/.vimrc:
+"         filetype plugin on
+"
+" 6. Restart Vim and create the matchit documentation:
+"
+"         :helptags ~/.vim/doc
+"
+"    Now you can do ":help matchit", and you should be able to use "%" on Ruby
+"    keywords.  Try ":echo b:match_words" to be sure.
+"
+" Thanks to Mark J. Reed for the instructions.  See ":help vimrc" for the
+" locations of plugin directories, etc., as there are several options, and it
+" differs on Windows.  Email gsinclair@soyabean.com.au if you need help.
+"
+
+" vim: nowrap sw=2 sts=2 ts=8 ff=unix:
diff --git a/runtime/indent/ruby.vim b/runtime/indent/ruby.vim
index ce078f2..ff22bbb 100644
--- a/runtime/indent/ruby.vim
+++ b/runtime/indent/ruby.vim
@@ -1,11 +1,20 @@
 " Vim indent file
-" Language:	Ruby
-" Maintainer:	Gavin Sinclair <gsinclair@soyabean.com.au>
-" Last Change:	2003 May 11
-" URL: www.soyabean.com.au/gavin/vim/index.html
-" Changes: (since vim 6.1)
-"  - indentation after a line ending in comma, etc, (even in a comment) was
-"    broken, now fixed (2002/08/14)
+" Language:     Ruby
+" Maintainer:   Gavin Sinclair <gsinclair at soyabean.com.au>
+" Developer:    Nikolai Weibull <source at pcppopper.org>
+" Info:         $Id$
+" URL:          http://vim-ruby.rubyforge.org/
+" Anon CVS:     See above site
+" Licence:      GPL (http://www.gnu.org)
+" Disclaimer:
+"    This program is distributed in the hope that it will be useful,
+"    but WITHOUT ANY WARRANTY; without even the implied warranty of
+"    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+"    GNU General Public License for more details.
+" ----------------------------------------------------------------------------
+
+" 0. Initialization {{{1
+" =================
 
 " Only load this indent file when no other was loaded.
 if exists("b:did_indent")
@@ -13,55 +22,363 @@
 endif
 let b:did_indent = 1
 
+" Now, set up our indentation expression and keys that trigger it.
 setlocal indentexpr=GetRubyIndent()
-setlocal nolisp
-setlocal nosmartindent
-setlocal autoindent
-setlocal indentkeys+==end,=else,=elsif,=when,=ensure,=rescue
+setlocal indentkeys=0{,0},0),0],!^F,o,O,e
+setlocal indentkeys+==end,=elsif,=when,=ensure,=rescue,==begin,==end
 
 " Only define the function once.
 if exists("*GetRubyIndent")
   finish
 endif
 
+let s:cpo_save = &cpo
+set cpo&vim
+
+" 1. Variables {{{1
+" ============
+
+" Regex of syntax group names that are or delimit string or are comments.
+let s:syng_strcom = '\<ruby\%(String\|StringDelimiter\|ASCIICode' .
+      \ '\|Interpolation\|NoInterpolation\|Escape\|Comment\|Documentation\)\>'
+
+" Regex of syntax group names that are strings or comments.
+let s:syng_strcom2 = '\<ruby\%(String' .
+      \ '\|Interpolation\|NoInterpolation\|Escape\|Comment\|Documentation\)\>'
+
+" Regex of syntax group names that are strings.
+let s:syng_string =
+      \ '\<ruby\%(String\|Interpolation\|NoInterpolation\|Escape\)\>'
+
+" Regex of syntax group names that are strings or documentation.
+let s:syng_stringdoc =
+  \'\<ruby\%(String\|Interpolation\|NoInterpolation\|Escape\|Documentation\)\>'
+
+" Expression used to check whether we should skip a match with searchpair().
+let s:skip_expr =
+      \ "synIDattr(synID(line('.'),col('.'),0),'name') =~ '".s:syng_strcom."'"
+
+" Regex used for words that, at the start of a line, add a level of indent.
+let s:ruby_indent_keywords = '^\s*\zs\<\%(module\|class\|def\|if\|for' .
+      \ '\|while\|until\|else\|elsif\|case\|when\|unless\|begin\|ensure' .
+      \ '\|rescue\)\>' .
+      \ '\|\%([*+/,=:-]\|<<\|>>\)\s*\zs' .
+      \    '\<\%(if\|for\|while\|until\|case\|unless\|begin\)\>'
+
+" Regex used for words that, at the start of a line, remove a level of indent.
+let s:ruby_deindent_keywords =
+      \ '^\s*\zs\<\%(ensure\|else\|rescue\|elsif\|when\|end\)\>'
+
+" Regex that defines the start-match for the 'end' keyword.
+"let s:end_start_regex = '\%(^\|[^.]\)\<\%(module\|class\|def\|if\|for\|while\|until\|case\|unless\|begin\|do\)\>'
+" TODO: the do here should be restricted somewhat (only at end of line)?
+let s:end_start_regex = '^\s*\zs\<\%(module\|class\|def\|if\|for' .
+      \ '\|while\|until\|case\|unless\|begin\)\>' .
+      \ '\|\%([*+/,=:-]\|<<\|>>\)\s*\zs' .
+      \    '\<\%(if\|for\|while\|until\|case\|unless\|begin\)\>' .
+      \ '\|\<do\>'
+
+" Regex that defines the middle-match for the 'end' keyword.
+let s:end_middle_regex = '\<\%(ensure\|else\|\%(\%(^\|;\)\s*\)\@<=\<rescue\>\|when\|elsif\)\>'
+
+" Regex that defines the end-match for the 'end' keyword.
+let s:end_end_regex = '\%(^\|[^.]\)\@<=\<end\>'
+
+" Expression used for searchpair() call for finding match for 'end' keyword.
+let s:end_skip_expr = s:skip_expr .
+      \ ' || (expand("<cword>") == "do"' .
+      \ ' && getline(".") =~ "^\\s*\\<while\\|until\\|for\\>")'
+
+" Regex that defines continuation lines, not including (, {, or [.
+let s:continuation_regex = '\%([\\*+/.,=:-]\|\W[|&?]\|||\|&&\)\s*\%(#.*\)\=$'
+
+" Regex that defines continuation lines.
+" TODO: this needs to deal with if ...: and so on
+let s:continuation_regex2 =
+      \ '\%([\\*+/.,=:({[-]\|\W[|&?]\|||\|&&\)\s*\%(#.*\)\=$'
+
+" Regex that defines blocks.
+let s:block_regex =
+      \ '\%(\<do\>\|{\)\s*\%(|\%([*@]\=\h\w*,\=\s*\)\%(,\s*[*@]\=\h\w*\)*|\)\=\s*\%(#.*\)\=$'
+
+" 2. Auxiliary Functions {{{1
+" ======================
+
+" Check if the character at lnum:col is inside a string, comment, or is ascii.
+function s:IsInStringOrComment(lnum, col)
+  return synIDattr(synID(a:lnum, a:col, 0), 'name') =~ s:syng_strcom
+endfunction
+
+" Check if the character at lnum:col is inside a string or comment.
+function s:IsInStringOrComment2(lnum, col)
+  return synIDattr(synID(a:lnum, a:col, 0), 'name') =~ s:syng_strcom2
+endfunction
+
+" Check if the character at lnum:col is inside a string.
+function s:IsInString(lnum, col)
+  return synIDattr(synID(a:lnum, a:col, 0), 'name') =~ s:syng_string
+endfunction
+
+" Check if the character at lnum:col is inside a string or documentation.
+function s:IsInStringOrDocumentation(lnum, col)
+  return synIDattr(synID(a:lnum, a:col, 0), 'name') =~ s:syng_stringdoc
+endfunction
+
+" Find line above 'lnum' that isn't empty, in a comment, or in a string.
+function s:PrevNonBlankNonString(lnum)
+  let in_block = 0
+  let lnum = prevnonblank(a:lnum)
+  while lnum > 0
+    " Go in and out of blocks comments as necessary.
+    " If the line isn't empty (with opt. comment) or in a string, end search.
+    let line = getline(lnum)
+    if line =~ '^=begin$'
+      if in_block
+        let in_block = 0
+      else
+        break
+      endif
+    elseif !in_block && line =~ '^=end$'
+      let in_block = 1
+    elseif !in_block && line !~ '^\s*#.*$' && !(s:IsInStringOrComment(lnum, 1)
+          \ && s:IsInStringOrComment(lnum, strlen(line)))
+      break
+    endif
+    let lnum = prevnonblank(lnum - 1)
+  endwhile
+  return lnum
+endfunction
+
+" Find line above 'lnum' that started the continuation 'lnum' may be part of.
+function s:GetMSL(lnum)
+  " Start on the line we're at and use its indent.
+  let msl = a:lnum
+  let lnum = s:PrevNonBlankNonString(a:lnum - 1)
+  while lnum > 0
+    " If we have a continuation line, or we're in a string, use line as MSL.
+    " Otherwise, terminate search as we have found our MSL already.
+    let line = getline(lnum)
+    let col = match(line, s:continuation_regex2) + 1
+    if (col > 0 && !s:IsInStringOrComment(lnum, col))
+          \ || s:IsInString(lnum, strlen(line))
+      let msl = lnum
+    else
+      break
+    endif
+    let lnum = s:PrevNonBlankNonString(lnum - 1)
+  endwhile
+  return msl
+endfunction
+
+" Check if line 'lnum' has more opening brackets than closing ones.
+function s:LineHasOpeningBrackets(lnum)
+  let open_0 = 0
+  let open_2 = 0
+  let open_4 = 0
+  let line = getline(a:lnum)
+  let pos = match(line, '[][(){}]', 0)
+  while pos != -1
+    if !s:IsInStringOrComment(a:lnum, pos + 1)
+      let idx = stridx('(){}[]', line[pos])
+      if idx % 2 == 0
+        let open_{idx} = open_{idx} + 1
+      else
+        let open_{idx - 1} = open_{idx - 1} - 1
+      endif
+    endif
+    let pos = match(line, '[][(){}]', pos + 1)
+  endwhile
+  return (open_0 > 0) . (open_2 > 0) . (open_4 > 0)
+endfunction
+
+function s:Match(lnum, regex)
+  let col = match(getline(a:lnum), a:regex) + 1
+  return col > 0 && !s:IsInStringOrComment(a:lnum, col) ? col : 0
+endfunction
+
+function s:MatchLast(lnum, regex)
+  let line = getline(a:lnum)
+  let col = match(line, '.*\zs' . a:regex)
+  while col != -1 && s:IsInStringOrComment(a:lnum, col)
+    let line = strpart(line, 0, col)
+    let col = match(line, '.*' . a:regex)
+  endwhile
+  return col + 1
+endfunction
+
+" 3. GetRubyIndent Function {{{1
+" =========================
+
 function GetRubyIndent()
-  " Find a non-blank line above the current line.
-  let lnum = prevnonblank(v:lnum - 1)
+  " 3.1. Setup {{{2
+  " ----------
+
+  " Set up variables for restoring position in file.  Could use v:lnum here.
+  let vcol = col('.')
+
+  " 3.2. Work on the current line {{{2
+  " -----------------------------
+
+  " Get the current line.
+  let line = getline(v:lnum)
+  let ind = -1
+
+  " If we got a closing bracket on an empty line, find its match and indent
+  " according to it.  For parentheses we indent to its column - 1, for the
+  " others we indent to the containing line's MSL's level.  Return -1 if fail.
+  let col = matchend(line, '^\s*[]})]')
+  if col > 0 && !s:IsInStringOrComment(v:lnum, col)
+    call cursor(v:lnum, col)
+    let bs = strpart('(){}[]', stridx(')}]', line[col - 1]) * 2, 2)
+    if searchpair(escape(bs[0], '\['), '', bs[1], 'bW', s:skip_expr) > 0
+      let ind = line[col-1]==')' ? virtcol('.')-1 : indent(s:GetMSL(line('.')))
+    endif
+    return ind
+  endif
+
+  " If we have a =begin or =end set indent to first column.
+  if match(line, '^\s*\%(=begin\|=end\)$') != -1
+    return 0
+  endif
+
+  " If we have a deindenting keyword, find its match and indent to its level.
+  " TODO: this is messy
+  if s:Match(v:lnum, s:ruby_deindent_keywords)
+"    let lnum = s:PrevNonBlankNonString(v:lnum - 1)
+"
+"    if lnum == 0
+"      return 0
+"    endif
+"
+"    return indent(v:lnum) - &sw
+    call cursor(v:lnum, 1)
+    if searchpair(s:end_start_regex, s:end_middle_regex, s:end_end_regex, 'bW',
+            \ s:end_skip_expr) > 0
+      if strpart(getline('.'), 0, col('.') - 1) =~ '=\s*'
+        let ind = virtcol('.') - 1
+      else
+        let ind = indent('.')
+      endif
+    endif
+    return ind
+  endif
+
+  " If we are in a multi-line string or line-comment, don't do anything to it.
+  if s:IsInStringOrDocumentation(v:lnum, matchend(line, '^\s*') + 1)
+    return indent('.')
+  endif
+
+  " 3.3. Work on the previous line. {{{2
+  " -------------------------------
+
+  " Find a non-blank, non-multi-line string line above the current line.
+  let lnum = s:PrevNonBlankNonString(v:lnum - 1)
 
   " At the start of the file use zero indent.
   if lnum == 0
     return 0
   endif
 
-  " If the line trailed with [*+,.(] - but not in a comment - trust the user
-  if getline(lnum) =~ '\(\[^#\].*\)?\(\*\|\.\|+\|,\|(\)\(\s*#.*\)\=$'
-    return -1
-  endif
-
-  " Add a 'shiftwidth' after lines beginning with:
-  " module, class, dev, if, for, while, until, else, elsif, case, when, {
+  " Set up variables for current line.
+  let line = getline(lnum)
   let ind = indent(lnum)
-  let flag = 0
-  if getline(lnum) =~ '^\s*\(module\>\|class\>\|def\>\|if\>\|for\>\|while\>\|until\>\|else\>\|elsif\>\|case\>\|when\>\|unless\|begin\|ensure\>\|rescue\>\)'
-	\ || getline(lnum) =~ '{\s*$'
-	\ || getline(lnum) =~ '\({\|\<do\>\).*|.*|\s*$'
-	\ || getline(lnum) =~ '\<do\>\(\s*#.*\)\=$'
-    let ind = ind + &sw
-    let flag = 1
+
+  " If the previous line ended with a block opening, add a level of indent.
+  if s:Match(lnum, s:block_regex)
+    return indent(s:GetMSL(lnum)) + &sw
   endif
 
-  " Subtract a 'shiftwidth' after lines ending with
-  " "end" when they begin with while, if, for, until
-  if flag == 1 && getline(lnum) =~ '\<end\>\(\s*#.*\)\=$'
-    let ind = ind - &sw
+  " If the previous line contained an opening bracket, and we are still in it,
+  " add indent depending on the bracket type.
+  if line =~ '[[({]'
+    let counts = s:LineHasOpeningBrackets(lnum)
+    if counts[0] == '1' && searchpair('(', '', ')', 'bW', s:skip_expr) > 0
+      return virtcol('.')
+    elseif counts[1] == '1' || counts[2] == '1'
+      return ind + &sw
+    else
+      call cursor(v:lnum, vcol)
+    end
   endif
 
-  " Subtract a 'shiftwidth' on end, else and, elsif, when and }
-  if getline(v:lnum) =~ '^\s*\(end\>\|else\>\|elsif\>\|when\>\|ensure\>\|rescue\>\|}\)'
-    let ind = ind - &sw
+  " If the previous line ended with an "end", match that "end"s beginning's
+  " indent.
+  let col = s:Match(lnum, '\%(^\|[^.]\)\<end\>\s*\%(#.*\)\=$')
+  if col > 0
+    call cursor(lnum, col)
+    if searchpair(s:end_start_regex, '', s:end_end_regex, 'bW',
+                \ s:end_skip_expr) > 0
+      let n = line('.')
+      let ind = indent('.')
+      let msl = s:GetMSL(n)
+      if msl != n
+        let ind = indent(msl)
+      end
+      return ind
+    endif
+  end
+
+  let col = s:Match(lnum, s:ruby_indent_keywords)
+  if col > 0
+    call cursor(lnum, col)
+    let ind = virtcol('.') - 1 + &sw
+"    let ind = indent(lnum) + &sw
+    " TODO: make this better (we need to count them) (or, if a searchpair
+    " fails, we know that something is lacking an end and thus we indent a
+    " level
+    if s:Match(lnum, s:end_end_regex)
+      let ind = indent('.')
+    endif
+    return ind
   endif
 
+  " 3.4. Work on the MSL line. {{{2
+  " --------------------------
+
+  " Set up variables to use and search for MSL to the previous line.
+  let p_lnum = lnum
+  let lnum = s:GetMSL(lnum)
+
+  " If the previous line wasn't a MSL and is continuation return its indent.
+  " TODO: the || s:IsInString() thing worries me a bit.
+  if p_lnum != lnum
+    if s:Match(p_lnum,s:continuation_regex)||s:IsInString(p_lnum,strlen(line))
+      return ind
+    endif
+  endif
+
+  " Set up more variables, now that we know we wasn't continuation bound.
+  let line = getline(lnum)
+  let msl_ind = indent(lnum)
+
+  " If the MSL line had an indenting keyword in it, add a level of indent.
+  " TODO: this does not take into account contrived things such as
+  " module Foo; class Bar; end
+  if s:Match(lnum, s:ruby_indent_keywords)
+    let ind = msl_ind + &sw
+    if s:Match(lnum, s:end_end_regex)
+      let ind = ind - &sw
+    endif
+    return ind
+  endif
+
+  " If the previous line ended with [*+/.-=], indent one extra level.
+  if s:Match(lnum, s:continuation_regex)
+    if lnum == p_lnum
+      let ind = msl_ind + &sw
+    else
+      let ind = msl_ind
+    endif
+  endif
+
+  " }}}2
+
   return ind
 endfunction
 
-" vim:sw=2
+" }}}1
+
+let &cpo = s:cpo_save
+unlet s:cpo_save
+
+" vim: nowrap sw=2 sts=2 ts=8 ff=unix:
diff --git a/runtime/keymap/tamil_tscii.vim b/runtime/keymap/tamil_tscii.vim
new file mode 100644
index 0000000..fa07c17
--- /dev/null
+++ b/runtime/keymap/tamil_tscii.vim
@@ -0,0 +1,572 @@
+" Keymap file for the editing Tamil language files in TSCII encoding.

+"

+" Maintainer: Yegappan Lakshmanan (yegappan AT yahoo DOT com)

+" Last updated: August 4, 2005

+"

+" You will need a fixed width TSCII font to use this encoding.  The

+" Avarangal TSCII fixed width font (TSC_AvarangalFxd) is used to test

+" this keymap.

+"

+" Visit http://www.tscii.org for more information about the TSCII

+" encoding.

+" 

+let b:keymap_name = "tamil_tscii"

+

+loadkeymap

+

+" Uyir (Vowels) letters

+a      <char-171>

+aa     <char-172>

+A      <char-172>

+i      <char-173>

+ii     <char-174>

+I      <char-174>

+u      <char-175>

+uu     <char-176>

+U      <char-176>

+e      <char-177>

+ee     <char-178>

+E      <char-178>

+ai     <char-179>

+o      <char-180>

+oo     <char-181>

+O      <char-181>

+au     <char-182>

+q      <char-183>

+

+" mey (Consonants) letters

+k      <char-236>

+ka     <char-184>

+kaa    <char-184><char-161>

+kA     <char-184><char-161>

+ki     <char-184><char-162>

+kii    <char-184><char-163>

+kI     <char-184><char-163>

+ku     <char-204>

+kuu    <char-220>

+kU     <char-220>

+ke     <char-166><char-184>

+kee    <char-167><char-184>

+kE     <char-167><char-184>

+kai    <char-168><char-184>

+ko     <char-166><char-184><char-161>

+koo    <char-167><char-184><char-161>

+kO     <char-167><char-184><char-161>

+kau    <char-166><char-184><char-199>

+

+g      <char-236>

+ga     <char-184>

+gaa    <char-184><char-161>

+gA     <char-184><char-161>

+gi     <char-184><char-162>

+gii    <char-184><char-163>

+gI     <char-184><char-163>

+gu     <char-204>

+guu    <char-220>

+gU     <char-220>

+ge     <char-166><char-184>

+gee    <char-167><char-184>

+gE     <char-167><char-184>

+gai    <char-168><char-184>

+go     <char-166><char-184><char-161>

+goo    <char-167><char-184><char-161>

+gO     <char-167><char-184><char-161>

+gau    <char-166><char-184><char-199>

+

+ng     <char-237>

+nga    <char-185>

+ngaa   <char-185><char-161>

+ngA    <char-185><char-161>

+ngi    <char-185><char-162>

+ngii   <char-185><char-163>

+ngI    <char-185><char-163>

+ngu    <char-153>

+nguu   <char-155>

+ngU    <char-155>

+nge    <char-166><char-185>

+ngee   <char-167><char-185>

+ngE    <char-167><char-185>

+ngai   <char-168><char-185>

+ngo    <char-166><char-185><char-161>

+ngoo   <char-167><char-185><char-161>

+ngO    <char-167><char-185><char-161>

+ngau   <char-166><char-185><char-199>

+

+ch     <char-238>

+cha    <char-186>

+chaa   <char-186><char-161>

+chA    <char-186><char-161>

+chi    <char-186><char-162>

+chii   <char-186><char-163>

+chI    <char-186><char-163>

+chu    <char-204>

+chuu   <char-221>

+chU    <char-221>

+che    <char-166><char-186>

+chee   <char-167><char-186>

+chE    <char-167><char-186>

+chai   <char-168><char-186>

+cho    <char-166><char-186><char-161>

+choo   <char-167><char-186><char-161>

+chO    <char-167><char-186><char-161>

+chau   <char-166><char-186><char-199>

+

+s      <char-238>

+sa     <char-186>

+saa    <char-186><char-161>

+sA     <char-186><char-161>

+si     <char-186><char-162>

+sii    <char-186><char-163>

+sI     <char-186><char-163>

+su     <char-204>

+suu    <char-221>

+sU     <char-221>

+se     <char-166><char-186>

+see    <char-167><char-186>

+sE     <char-167><char-186>

+sai    <char-168><char-186>

+so     <char-166><char-186><char-161>

+soo    <char-167><char-186><char-161>

+sO     <char-167><char-186><char-161>

+sau    <char-166><char-186><char-199>

+

+nj     <char-239>

+nja    <char-187>

+njaa   <char-187><char-161>

+njA    <char-187><char-161>

+nji    <char-187><char-162>

+njii   <char-187><char-163>

+njI    <char-187><char-163>

+nju    <char-154>

+njuu   <char-156>

+njU    <char-156>

+nje    <char-166><char-187>

+njee   <char-167><char-187>

+njE    <char-167><char-187>

+njai   <char-168><char-187>

+njo    <char-166><char-187><char-161>

+njoo   <char-167><char-187><char-161>

+njO    <char-167><char-187><char-161>

+njau   <char-166><char-187><char-199>

+

+t      <char-240>

+ta     <char-188>

+taa    <char-188><char-161>

+tA     <char-188><char-161>

+ti     <char-202>

+tii    <char-203>

+tI     <char-203>

+tu     <char-206>

+tuu    <char-222>

+tU     <char-222>

+te     <char-166><char-188>

+tee    <char-167><char-188>

+tE     <char-167><char-188>

+tai    <char-168><char-188>

+to     <char-166><char-188><char-161>

+too    <char-167><char-188><char-161>

+tO     <char-167><char-188><char-161>

+tau    <char-166><char-188><char-199>

+

+d      <char-240>

+da     <char-188>

+daa    <char-188><char-161>

+dA     <char-188><char-161>

+di     <char-202>

+dii    <char-203>

+dI     <char-203>

+du     <char-206>

+duu    <char-222>

+dU     <char-222>

+de     <char-166><char-188>

+dee    <char-167><char-188>

+dE     <char-167><char-188>

+dai    <char-168><char-188>

+do     <char-166><char-188><char-161>

+doo    <char-167><char-188><char-161>

+dO     <char-167><char-188><char-161>

+dau    <char-166><char-188><char-199>

+

+N      <char-241>

+Na     <char-189>

+Naa    <char-189><char-161>

+NA     <char-189><char-161>

+Ni     <char-189><char-162>

+Nii    <char-189><char-163>

+NI     <char-189><char-163>

+Nu     <char-207>

+Nuu    <char-223>

+NU     <char-223>

+Ne     <char-166><char-189>

+Nee    <char-167><char-189>

+NE     <char-167><char-189>

+Nai    <char-168><char-189>

+No     <char-166><char-189><char-161>

+Noo    <char-167><char-189><char-161>

+NO     <char-167><char-189><char-161>

+Nau    <char-166><char-189><char-199>

+

+th     <char-242>

+tha    <char-190>

+thaa   <char-190><char-161>

+thA    <char-190><char-161>

+thi    <char-190><char-162>

+thii   <char-190><char-163>

+thI    <char-190><char-163>

+thu    <char-208>

+thuu   <char-224>

+thU    <char-224>

+the    <char-166><char-190>

+thee   <char-167><char-190>

+thE    <char-167><char-190>

+thai   <char-168><char-190>

+tho    <char-166><char-190><char-161>

+thoo   <char-167><char-190><char-161>

+thO    <char-167><char-190><char-161>

+thau   <char-166><char-190><char-199>

+

+w      <char-243>

+wa     <char-191>

+waa    <char-191><char-161>

+wA     <char-191><char-161>

+wi     <char-191><char-162>

+wii    <char-191><char-163>

+wI     <char-191><char-163>

+wu     <char-209>

+wuu    <char-225>

+wU     <char-225>

+we     <char-166><char-191>

+wee    <char-167><char-191>

+wE     <char-167><char-191>

+wai    <char-168><char-191>

+wo     <char-166><char-191><char-161>

+woo    <char-167><char-191><char-161>

+wO     <char-167><char-191><char-161>

+wau    <char-166><char-191><char-199>

+

+n-     <char-243>

+n-a    <char-191>

+n-aa   <char-191><char-161>

+n-A    <char-191><char-161>

+n-i    <char-191><char-162>

+n-ii   <char-191><char-163>

+n-I    <char-191><char-163>

+n-u    <char-209>

+n-uu   <char-225>

+n-U    <char-225>

+n-e    <char-166><char-191>

+n-ee   <char-167><char-191>

+n-E    <char-167><char-191>

+n-ai   <char-168><char-191>

+n-o    <char-166><char-191><char-161>

+n-oo   <char-167><char-191><char-161>

+n-O    <char-167><char-191><char-161>

+n-au   <char-166><char-191><char-199>

+

+p      <char-244>

+pa     <char-192>

+paa    <char-192><char-161>

+pA     <char-192><char-161>

+pi     <char-192><char-162>

+pii    <char-192><char-163>

+pI     <char-192><char-163>

+pu     <char-210>

+puu    <char-226>

+pU     <char-226>

+pe     <char-166><char-192>

+pee    <char-167><char-192>

+pE     <char-167><char-192>

+pai    <char-168><char-192>

+po     <char-166><char-192><char-161>

+poo    <char-167><char-192><char-161>

+pO     <char-167><char-192><char-161>

+pau    <char-166><char-192><char-199>

+

+b      <char-244>

+ba     <char-192>

+baa    <char-192><char-161>

+bA     <char-192><char-161>

+bi     <char-192><char-162>

+bii    <char-192><char-163>

+bI     <char-192><char-163>

+bu     <char-210>

+buu    <char-226>

+bU     <char-226>

+be     <char-166><char-192>

+bee    <char-167><char-192>

+bE     <char-167><char-192>

+bai    <char-168><char-192>

+bo     <char-166><char-192><char-161>

+boo    <char-167><char-192><char-161>

+bO     <char-167><char-192><char-161>

+bau    <char-166><char-192><char-199>

+

+m      <char-245>

+ma     <char-193>

+maa    <char-193><char-161>

+mA     <char-193><char-161>

+mi     <char-193><char-162>

+mii    <char-193><char-163>

+mI     <char-193><char-163>

+mu     <char-211>

+muu    <char-227>

+mU     <char-227>

+me     <char-166><char-193>

+mee    <char-167><char-193>

+mE     <char-167><char-193>

+mai    <char-168><char-193>

+mo     <char-166><char-193><char-161>

+moo    <char-167><char-193><char-161>

+mO     <char-167><char-193><char-161>

+mau    <char-166><char-193><char-199>

+

+y      <char-246>

+ya     <char-194>

+yaa    <char-194><char-161>

+yA     <char-194><char-161>

+yi     <char-194><char-162>

+yii    <char-194><char-163>

+yI     <char-194><char-163>

+yu     <char-212>

+yuu    <char-228>

+yU     <char-228>

+ye     <char-166><char-194>

+yee    <char-167><char-194>

+yE     <char-167><char-194>

+yai    <char-168><char-194>

+yo     <char-166><char-194><char-161>

+yoo    <char-167><char-194><char-161>

+yO     <char-167><char-194><char-161>

+yau    <char-166><char-194><char-199>

+

+r      <char-247>

+ra     <char-195>

+raa    <char-195><char-161>

+rA     <char-195><char-161>

+ri     <char-195><char-162>

+rii    <char-195><char-163>

+rI     <char-195><char-163>

+ru     <char-213>

+ruu    <char-229>

+rU     <char-229>

+re     <char-166><char-195>

+ree    <char-167><char-195>

+rE     <char-167><char-195>

+rai    <char-168><char-195>

+ro     <char-166><char-195><char-161>

+roo    <char-167><char-195><char-161>

+rO     <char-167><char-195><char-161>

+rau    <char-166><char-195><char-199>

+

+l      <char-248>

+la     <char-196>

+laa    <char-196><char-161>

+lA     <char-196><char-161>

+li     <char-196><char-162>

+lii    <char-196><char-163>

+lI     <char-196><char-163>

+lu     <char-214>

+luu    <char-230>

+lU     <char-230>

+le     <char-166><char-196>

+lee    <char-167><char-196>

+lE     <char-167><char-196>

+lai    <char-168><char-196>

+lo     <char-166><char-196><char-161>

+loo    <char-167><char-196><char-161>

+lO     <char-167><char-196><char-161>

+lau    <char-166><char-196><char-199>

+

+v      <char-249>

+va     <char-197>

+vaa    <char-197><char-161>

+vA     <char-197><char-161>

+vi     <char-197><char-162>

+vii    <char-197><char-163>

+vI     <char-197><char-163>

+vu     <char-215>

+vuu    <char-231>

+vU     <char-231>

+ve     <char-166><char-197>

+vee    <char-167><char-197>

+vE     <char-167><char-197>

+vai    <char-168><char-197>

+vo     <char-166><char-197><char-161>

+voo    <char-167><char-197><char-161>

+vO     <char-167><char-197><char-161>

+vau    <char-166><char-197><char-199>

+

+z      <char-250>

+za     <char-198>

+zaa    <char-198><char-161>

+zA     <char-198><char-161>

+zi     <char-198><char-162>

+zii    <char-198><char-163>

+zI     <char-198><char-163>

+zu     <char-216>

+zuu    <char-232>

+zU     <char-232>

+ze     <char-166><char-198>

+zee    <char-167><char-198>

+zE     <char-167><char-198>

+zai    <char-168><char-198>

+zo     <char-166><char-198><char-161>

+zoo    <char-167><char-198><char-161>

+zO     <char-167><char-198><char-161>

+zau    <char-166><char-198><char-199>

+

+L      <char-251>

+La     <char-199>

+Laa    <char-199><char-161>

+LA     <char-199><char-161>

+Li     <char-199><char-162>

+Lii    <char-199><char-163>

+LI     <char-199><char-163>

+Lu     <char-217>

+Luu    <char-233>

+LU     <char-233>

+Le     <char-166><char-199>

+Lee    <char-167><char-199>

+LE     <char-167><char-199>

+Lai    <char-168><char-199>

+Lo     <char-166><char-199><char-161>

+Loo    <char-167><char-199><char-161>

+LO     <char-167><char-199><char-161>

+Lau    <char-166><char-199><char-199>

+

+R      <char-252>

+Ra     <char-200>

+Raa    <char-200><char-161>

+RA     <char-200><char-161>

+Ri     <char-200><char-162>

+Rii    <char-200><char-163>

+RI     <char-200><char-163>

+Ru     <char-218>

+Ruu    <char-234>

+RU     <char-234>

+Re     <char-166><char-200>

+Ree    <char-167><char-200>

+RE     <char-167><char-200>

+Rai    <char-168><char-200>

+Ro     <char-166><char-200><char-161>

+Roo    <char-167><char-200><char-161>

+RO     <char-167><char-200><char-161>

+Rau    <char-166><char-200><char-199>

+

+n      <char-253>

+na     <char-201>

+naa    <char-201><char-161>

+nA     <char-201><char-161>

+ni     <char-201><char-162>

+nii    <char-201><char-163>

+nI     <char-201><char-163>

+nu     <char-219>

+nuu    <char-235>

+nU     <char-235>

+ne     <char-166><char-201>

+nee    <char-167><char-201>

+nE     <char-167><char-201>

+nai    <char-168><char-201>

+no     <char-166><char-201><char-161>

+noo    <char-167><char-201><char-161>

+nO     <char-167><char-201><char-161>

+nau    <char-166><char-201><char-199>

+

+" Grantha letters

+j      <char-136>

+ja     <char-131>

+jaa    <char-131><char-161>

+jA     <char-131><char-161>

+ji     <char-131><char-162>

+jii    <char-131><char-163>

+jI     <char-131><char-163>

+ju     <char-131><char-164>

+juu    <char-131><char-164>

+jU     <char-131><char-165>

+je     <char-166><char-131>

+jee    <char-167><char-131>

+jE     <char-167><char-131>

+jai    <char-168><char-131>

+jo     <char-166><char-131><char-161>

+joo    <char-167><char-131><char-161>

+jO     <char-167><char-131><char-161>

+jau    <char-166><char-131><char-199>

+

+sh     <char-137>

+sha    <char-132>

+shaa   <char-132><char-161>

+shA    <char-132><char-161>

+shi    <char-132><char-162>

+shii   <char-132><char-163>

+shI    <char-132><char-163>

+shu    <char-131><char-164>

+shuu   <char-131><char-164>

+shU    <char-131><char-165>

+she    <char-166><char-132>

+shee   <char-167><char-132>

+shE    <char-167><char-132>

+shai   <char-168><char-132>

+sho    <char-166><char-132><char-161>

+shoo   <char-167><char-132><char-161>

+shO    <char-167><char-132><char-161>

+shau   <char-166><char-132><char-199>

+

+S      <char-138>

+Sa     <char-133>

+Saa    <char-133><char-161>

+SA     <char-133><char-161>

+Si     <char-133><char-162>

+Sii    <char-133><char-163>

+SI     <char-133><char-163>

+Su     <char-133><char-164>

+Suu    <char-133><char-165>

+SU     <char-133><char-165>

+Se     <char-166><char-133>

+See    <char-167><char-133>

+SE     <char-167><char-133>

+Sai    <char-168><char-133>

+So     <char-166><char-133><char-161>

+Soo    <char-167><char-133><char-161>

+SO     <char-167><char-133><char-161>

+Sau    <char-166><char-133><char-199>

+

+h      <char-139>

+ha     <char-134>

+haa    <char-134><char-161>

+hA     <char-134><char-161>

+hi     <char-134><char-162>

+hii    <char-134><char-163>

+hI     <char-134><char-163>

+hu     <char-134><char-164>

+huu    <char-134><char-165>

+hU     <char-134><char-165>

+he     <char-166><char-134>

+hee    <char-167><char-134>

+hE     <char-167><char-134>

+hai    <char-168><char-134>

+ho     <char-166><char-134><char-161>

+hoo    <char-167><char-134><char-161>

+hO     <char-167><char-134><char-161>

+hau    <char-166><char-134><char-199>

+

+x      <char-140>

+xa     <char-135>

+xaa    <char-135><char-161>

+xA     <char-135><char-161>

+xi     <char-135><char-162>

+xii    <char-135><char-163>

+xI     <char-135><char-163>

+xu     <char-135><char-164>

+xuu    <char-135><char-165>

+xU     <char-135><char-165>

+xe     <char-166><char-135>

+xee    <char-167><char-135>

+xE     <char-167><char-135>

+xai    <char-168><char-135>

+xo     <char-166><char-135><char-161>

+xoo    <char-167><char-135><char-161>

+xO     <char-167><char-135><char-161>

+xau    <char-166><char-135><char-199>

+

+sri     <char-130>

+

diff --git a/runtime/syntax/eruby.vim b/runtime/syntax/eruby.vim
index 85b3cfb..59f042d 100644
--- a/runtime/syntax/eruby.vim
+++ b/runtime/syntax/eruby.vim
@@ -10,7 +10,6 @@
 "    but WITHOUT ANY WARRANTY; without even the implied warranty of
 "    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 "    GNU General Public License for more details.
-" ----------------------------------------------------------------------------
 
 " For version 5.x: Clear all syntax items
 " For version 6.x: Quit when a syntax file was already loaded
@@ -33,9 +32,12 @@
   syn include @rubyTop syntax/ruby.vim
 endif
 
-syn region erubyOneLiner matchgroup=erubyDelimiter start="^\s*\zs%" end="$"  contains=@rubyTop,erubyDelimiter keepend
-syn region erubyBlock    matchgroup=erubyDelimiter start="<%=\="    end="%>" contains=@rubyTop containedin=ALLBUT,erubyComment keepend 
-syn region erubyComment  matchgroup=erubyDelimiter start="<%#"      end="%>" keepend
+syn cluster erubyRegions contains=erubyOneLiner,erubyBlock,erubyExpression,erubyComment
+
+syn region  erubyOneLiner   matchgroup=erubyDelimiter start="^%%\@!" end="$"  contains=@rubyTop	       containedin=ALLBUT,@erubyRegions keepend oneline
+syn region  erubyBlock	    matchgroup=erubyDelimiter start="<%%\@!" end="%>" contains=@rubyTop	       containedin=ALLBUT,@erubyRegions
+syn region  erubyExpression matchgroup=erubyDelimiter start="<%="    end="%>" contains=@rubyTop	       containedin=ALLBUT,@erubyRegions
+syn region  erubyComment    matchgroup=erubyDelimiter start="<%#"    end="%>" contains=rubyTodo,@Spell containedin=ALLBUT,@erubyRegions keepend
 
 " Define the default highlighting.
 " For version 5.7 and earlier: only when not done already
@@ -59,4 +61,4 @@
   unlet main_syntax
 endif
 
-" vim: sw=2 sts=2 ts=8 ff=unix nowrap:
+" vim: nowrap sw=2 sts=2 ts=8 ff=unix:
diff --git a/src/ops.c b/src/ops.c
index b1b22a4..dc0e52b 100644
--- a/src/ops.c
+++ b/src/ops.c
@@ -2140,8 +2140,8 @@
     pos_T		pos;
 #ifdef FEAT_VISUAL
     struct block_def	bd;
-#endif
     int			todo;
+#endif
     int			did_change = 0;
 
     if (u_save((linenr_T)(oap->start.lnum - 1),
@@ -2158,10 +2158,10 @@
 	    pos.col = bd.textcol;
 	    for (todo = bd.textlen; todo > 0; --todo)
 	    {
-#ifdef FEAT_MBYTE
+# ifdef FEAT_MBYTE
 		if (has_mbyte)
 		    todo -= (*mb_ptr2len)(ml_get_pos(&pos)) - 1;
-#endif
+# endif
 		did_change |= swapchar(oap->op_type, &pos);
 		if (inc(&pos) == -1)	    /* at end of file */
 		    break;
@@ -2195,16 +2195,13 @@
 	else if (!oap->inclusive)
 	    dec(&(oap->end));
 
-	for (todo = oap->end.col - pos.col + 1; todo > 0; --todo)
+	while (ltoreq(pos, oap->end))
 	{
-#ifdef FEAT_MBYTE
-	    if (has_mbyte)
-		todo -= (*mb_ptr2len)(ml_get_pos(&pos)) - 1;
-#endif
 	    did_change |= swapchar(oap->op_type, &pos);
 	    if (inc(&pos) == -1)    /* at end of file */
 		break;
 	}
+
 	if (did_change)
 	{
 	    changed_lines(oap->start.lnum, oap->start.col, oap->end.lnum + 1,
diff --git a/src/screen.c b/src/screen.c
index 6e25471..f497f37 100644
--- a/src/screen.c
+++ b/src/screen.c
@@ -2931,7 +2931,7 @@
 	    wp->w_cursor.lnum = lnum;
 	    wp->w_cursor.col = ptr - line;
 	    len = spell_move_to(wp, FORWARD, TRUE, TRUE, &spell_attr);
-	    if (len == 0 || wp->w_cursor.col > ptr - line)
+	    if (len == 0 || (int)wp->w_cursor.col > ptr - line)
 	    {
 		/* no bad word found at line start, don't check until end of a
 		 * word */
diff --git a/src/search.c b/src/search.c
index 456b694..2ed15df 100644
--- a/src/search.c
+++ b/src/search.c
@@ -1440,6 +1440,11 @@
 	/* For multi-byte re-use last bytes[] and bytelen. */
     }
 
+    if (dir == BACKWARD)
+	cap->oap->inclusive = FALSE;
+    else
+	cap->oap->inclusive = TRUE;
+
     p = ml_get_curline();
     col = curwin->w_cursor.col;
     len = (int)STRLEN(p);
diff --git a/src/testdir/test58.ok b/src/testdir/test58.ok
index 9fba6bc..736e992 100644
--- a/src/testdir/test58.ok
+++ b/src/testdir/test58.ok
@@ -34,7 +34,7 @@
 déôl
 ['deol', 'déôr', 'test']
 end
-['put', 'test', 'uk']
+['put', 'OK', 'test']
 the
 ['put', 'uk', 'test']
 gebletegek
@@ -75,7 +75,7 @@
 bad
 ['put', 'uk', 'OK']
 inputs
-['input', 'puts', 'put']
+['input', 'puts', 'outputs']
 comment
 ['Comment']
 ok
@@ -143,7 +143,7 @@
 pro
 ['bork', 'end', 'word']
 borkborkborkborkborkbork
-['borkbork borkborkborkbork', 'borkborkbork borkborkbork', 'borkborkborkborkbork bork']
+['bork borkborkborkborkbork', 'borkbork borkborkborkbork', 'borkborkbork borkborkbork']
 tomatotomatotomato
 ['tomato tomatotomato', 'tomatotomato tomato', 'tomato tomato tomato']
 endstart
@@ -153,13 +153,13 @@
 startstart
 ['start start']
 wordend
-['word end', 'wordword', 'word']
+['word end', 'word', 'wordword']
 wordstart
 ['word start', 'bork start']
 startwordwordwordwordend
 ['startwordwordwordword end', 'startwordwordwordword', 'start wordwordwordword end']
 borkpreborkpreborkbork
-['borkpreborkprebork bork', 'borkprebork preborkbork', 'bork preborkpreborkbork']
+['bork preborkpreborkbork', 'borkprebork preborkbork', 'borkpreborkprebork bork']
 
 test 5-5
 # file: Xtest.latin1.spl
@@ -211,7 +211,7 @@
 meea2
 ['meea1', 'meeaé', 'lead']
 prabar
-['prebar', 'leadbar', 'bar']
+['prebar', 'bar', 'leadbar']
 probarbirk
 ['prebarbork']
 middle
@@ -243,7 +243,7 @@
 meea2
 ['meea1', 'meeaé', 'lead']
 prabar
-['prebar', 'leadbar', 'bar']
+['prebar', 'bar', 'leadbar']
 probarmaat
 ['prebarmeat']
 middle
diff --git a/src/testdir/test59.ok b/src/testdir/test59.ok
index c37ecb8..8f47667 100644
--- a/src/testdir/test59.ok
+++ b/src/testdir/test59.ok
@@ -34,7 +34,7 @@
 déôl
 ['deol', 'déôr', 'test']
 end
-['put', 'test', 'uk']
+['put', 'OK', 'test']
 the
 ['put', 'uk', 'test']
 gebletegek
@@ -75,7 +75,7 @@
 bad
 ['put', 'uk', 'OK']
 inputs
-['input', 'puts', 'put']
+['input', 'puts', 'outputs']
 comment
 ['Comment']
 ok
@@ -143,7 +143,7 @@
 pro
 ['bork', 'end', 'word']
 borkborkborkborkborkbork
-['borkbork borkborkborkbork', 'borkborkbork borkborkbork', 'borkborkborkborkbork bork']
+['bork borkborkborkborkbork', 'borkbork borkborkborkbork', 'borkborkbork borkborkbork']
 tomatotomatotomato
 ['tomato tomatotomato', 'tomatotomato tomato', 'tomato tomato tomato']
 endstart
@@ -153,13 +153,13 @@
 startstart
 ['start start']
 wordend
-['word end', 'wordword', 'word']
+['word end', 'word', 'wordword']
 wordstart
 ['word start', 'bork start']
 startwordwordwordwordend
 ['startwordwordwordword end', 'startwordwordwordword', 'start wordwordwordword end']
 borkpreborkpreborkbork
-['borkpreborkprebork bork', 'borkprebork preborkbork', 'bork preborkpreborkbork']
+['bork preborkpreborkbork', 'borkprebork preborkbork', 'borkpreborkprebork bork']
 
 test 5-5
 # file: Xtest.utf-8.spl
@@ -211,7 +211,7 @@
 meea2
 ['meea1', 'meeaé', 'lead']
 prabar
-['prebar', 'leadbar', 'bar']
+['prebar', 'bar', 'leadbar']
 probarbirk
 ['prebarbork']
 middle
@@ -243,7 +243,7 @@
 meea2
 ['meea1', 'meeaé', 'lead']
 prabar
-['prebar', 'leadbar', 'bar']
+['prebar', 'bar', 'leadbar']
 probarmaat
 ['prebarmeat']
 middle
diff --git a/src/version.h b/src/version.h
index 9402b51..f4c9e71 100644
--- a/src/version.h
+++ b/src/version.h
@@ -36,5 +36,5 @@
 #define VIM_VERSION_NODOT	"vim70aa"
 #define VIM_VERSION_SHORT	"7.0aa"
 #define VIM_VERSION_MEDIUM	"7.0aa ALPHA"
-#define VIM_VERSION_LONG	"VIM - Vi IMproved 7.0aa ALPHA (2005 Sep 14)"
-#define VIM_VERSION_LONG_DATE	"VIM - Vi IMproved 7.0aa ALPHA (2005 Sep 14, compiled "
+#define VIM_VERSION_LONG	"VIM - Vi IMproved 7.0aa ALPHA (2005 Sep 16)"
+#define VIM_VERSION_LONG_DATE	"VIM - Vi IMproved 7.0aa ALPHA (2005 Sep 16, compiled "