]> granicus.if.org Git - vim/commitdiff
updated for version 7.0150
authorBram Moolenaar <Bram@vim.org>
Sun, 25 Sep 2005 22:16:38 +0000 (22:16 +0000)
committerBram Moolenaar <Bram@vim.org>
Sun, 25 Sep 2005 22:16:38 +0000 (22:16 +0000)
38 files changed:
runtime/autoload/csscomplete.vim
runtime/autoload/htmlcomplete.vim
runtime/autoload/netrw.vim
runtime/compiler/eruby.vim
runtime/doc/diff.txt
runtime/doc/eval.txt
runtime/doc/insert.txt
runtime/doc/map.txt
runtime/doc/message.txt
runtime/doc/options.txt
runtime/doc/pi_netrw.txt
runtime/doc/spell.txt
runtime/doc/tags
runtime/filetype.vim
runtime/indent/eruby.vim [new file with mode: 0644]
runtime/indent/php.vim
runtime/indent/ruby.vim
runtime/indent/sml.vim [new file with mode: 0644]
runtime/plugin/NetrwPlugin.vim
runtime/plugin/NetrwSettings.vim
runtime/spell/en.ascii.spl
runtime/spell/en.latin1.spl
runtime/spell/en.utf-8.spl
runtime/syntax/ruby.vim
src/diff.c
src/edit.c
src/ex_docmd.c
src/ex_getln.c
src/feature.h
src/fileio.c
src/main.aap
src/message.c
src/move.c
src/option.c
src/quickfix.c
src/spell.c
src/testdir/test59.in
src/version.h

index 8ac3600611af85c352d63d2a6a3dd9f9a055f48a..9461f39b8fb289ae78cd072cb006a95fa7597225 100644 (file)
@@ -1,7 +1,7 @@
 " Vim completion script
 " Language:    CSS 2.1
 " Maintainer:  Mikolaj Machowski ( mikmach AT wp DOT pl )
-" Last Change: 2005 Sep 19
+" Last Change: 2005 Sep 23
 
 function! csscomplete#CompleteCSS(findstart, base)
 if a:findstart
@@ -18,6 +18,8 @@ else
        " 3. if } we are outside of css definitions
        " 4. for comments ignoring is be the easiest but assume they are the same
        "    as 1. 
+       " 5. if @ complete at-rule
+       " 6. if ! complete important
        
        let line = a:base
        let res = []
@@ -26,14 +28,16 @@ else
 
        " We need the last occurrence of char so reverse line
        let revline = join(reverse(split(line, '.\zs')), '')
+
        let openbrace  = stridx(revline, '{')
        let closebrace = stridx(revline, '}')
-       let colon       = stridx(revline, ':')
-       let semicolon   = stridx(revline, ';')
-       let opencomm    = stridx(revline, '*/') " Line was reversed
-       let closecomm   = stridx(revline, '/*') " Line was reversed
-       let style       = stridx(revline, '=\s*elyts') " Line was reversed
-       let atrule      = stridx(revline, '@')
+       let colon      = stridx(revline, ':')
+       let semicolon  = stridx(revline, ';')
+       let opencomm   = stridx(revline, '*/') " Line was reversed
+       let closecomm  = stridx(revline, '/*') " Line was reversed
+       let style      = stridx(revline, '=\s*elyts') " Line was reversed
+       let atrule     = stridx(revline, '@')
+       let exclam     = stridx(revline, '!')
 
        if openbrace > -1
                let borders[openbrace] = "openbrace"
@@ -59,6 +63,9 @@ else
        if atrule > -1
                let borders[atrule] = "atrule"
        endif
+       if exclam > -1
+               let borders[exclam] = "exclam"
+       endif
 
        if len(borders) == 0 || borders[min(keys(borders))] =~ '^\(openbrace\|semicolon\|opencomm\|closecomm\|style\)$'
                " Complete properties
@@ -318,6 +325,22 @@ else
 
                return []
 
+       elseif borders[min(keys(borders))] == 'exclam'
+
+               " Complete values
+               let impbase = matchstr(line, '.\{-}!\s*\ze[a-zA-Z ]*$')
+               let entered_imp = matchstr(line, '.\{-}!\s*\zs[a-zA-Z ]*$')
+
+               let values = ["important"]
+
+               for m in values
+                       if m =~? '^'.entered_imp
+                               call add(res, impbase . m)
+                       endif
+               endfor
+
+               return res
+
        elseif borders[min(keys(borders))] == 'atrule'
 
                let afterat = matchstr(line, '.*@\zs.*')
@@ -368,7 +391,7 @@ else
 
                endif
 
-               let values = ["charset", "page", "media", "import"]
+               let values = ["charset", "page", "media", "import", "font-face"]
 
                let atrulebase = matchstr(line, '.*@\ze[a-zA-Z -]*$')
                let entered_atrule = matchstr(line, '.*@\zs[a-zA-Z-]*$')
index ab50952435fffaaebd2fc42269e6cca1af64ef0c..9dd5830a1206a867508e2ef03063d7b67971ab4d 100644 (file)
@@ -1,7 +1,7 @@
 " Vim completion script
 " Language:    XHTML 1.0 Strict
 " Maintainer:  Mikolaj Machowski ( mikmach AT wp DOT pl )
-" Last Change: 2005 Sep 19
+" Last Change: 2005 Sep 23
 
 function! htmlcomplete#CompleteTags(findstart, base)
   if a:findstart
@@ -66,8 +66,13 @@ function! htmlcomplete#CompleteTags(findstart, base)
                " it possible?
                " Also retrieving class names from current file and linked
                " stylesheets.
-               if a:base =~ "\\(on[a-z]*\\|style\\|class\\)\\s*=\\s*[\"']"
-                       if a:base =~ "class\\s*=\\s*[\"'][a-zA-Z0-9_ -]*$"
+               if a:base =~ "\\(on[a-z]*\\|id\\|style\\|class\\)\\s*=\\s*[\"']"
+                       if a:base =~ "\\(id\\|class\\)\\s*=\\s*[\"'][a-zA-Z0-9_ -]*$"
+                               if a:base =~ "class\\s*=\\s*[\"'][a-zA-Z0-9_ -]*$"
+                                       let search_for = "class"
+                               elseif a:base =~ "id\\s*=\\s*[\"'][a-zA-Z0-9_ -]*$"
+                                       let search_for = "id"
+                               endif
                                " Handle class name completion
                                " 1. Find lines of <link stylesheet>
                                " 1a. Check file for @import
@@ -76,9 +81,22 @@ function! htmlcomplete#CompleteTags(findstart, base)
                                let head = getline(search('<head\>'), search('<\/head>'))
                                let headjoined = join(copy(head), ' ')
                                if headjoined =~ '<style'
-                                       let stylehead = substitute(headjoined, '+>\*[', ' ', 'g')
-                                       let styleheadlines = split(stylehead)
-                                       let headclasslines = filter(copy(styleheadlines), "v:val =~ '\\([a-zA-Z0-9:]\\+\\)\\?\\.[a-zA-Z0-9_-]\\+'")
+                                       let stylehead = substitute(headjoined, '+>\*[,', ' ', 'g')
+                                       if search_for == 'class'
+                                               let styleheadlines = split(stylehead)
+                                               let headclasslines = filter(copy(styleheadlines), "v:val =~ '\\([a-zA-Z0-9:]\\+\\)\\?\\.[a-zA-Z0-9_-]\\+'")
+                                       else
+                                               let stylesheet = split(headjoined, '[{}]')
+                                               " Get all lines which fit id syntax
+                                               let classlines = filter(copy(stylesheet), "v:val =~ '#[a-zA-Z0-9_-]\\+'")
+                                               " Filter out possible color definitions
+                                               call filter(classlines, "v:val !~ ':\\s*#[a-zA-Z0-9_-]\\+'")
+                                               " Filter out complex border definitions
+                                               call filter(classlines, "v:val !~ '\\(none\\|hidden\\|dotted\\|dashed\\|solid\\|double\\|groove\\|ridge\\|inset\\|outset\\)\\s*#[a-zA-Z0-9_-]\\+'")
+                                               let templines = join(classlines, ' ')
+                                               let headclasslines = split(templines)
+                                               call filter(headclasslines, "v:val =~ '#[a-zA-Z0-9_-]\\+'")
+                                       endif
                                        let internal = 1
                                else
                                        let internal = 0
@@ -93,13 +111,15 @@ function! htmlcomplete#CompleteTags(findstart, base)
                                                let styletable += [matchstr(line, "href\\s*=\\s*[\"']\\zs\\f\\+\\ze")]
                                        endif
                                endfor
-                               for file in filestable
+                               for file in styletable
                                        if filereadable(file)
                                                let stylesheet = readfile(file)
                                                let secimport = filter(copy(stylesheet), "v:val =~ '@import'")
                                                if len(secimport) > 0
                                                        for line in secimport
-                                                               let secimportfiles += [matchstr(line, "import\\s\\+\\(url(\\)\\?[\"']\\?\\zs\\f\\+\\ze")]
+                                                               let secfile = matchstr(line, "import\\s\\+\\(url(\\)\\?[\"']\\?\\zs\\f\\+\\ze")
+                                                               let secfile = fnamemodify(file, ":p:h").'/'.secfile
+                                                               let secimportfiles += [secfile]
                                                        endfor
                                                endif
                                        endif
@@ -109,10 +129,24 @@ function! htmlcomplete#CompleteTags(findstart, base)
                                for file in cssfiles
                                        if filereadable(file)
                                                let stylesheet = readfile(file)
-                                               let stylefile = join(stylesheet)
-                                               let stylefile = substitute(stylefile, '+>\*[', ' ', 'g')
-                                               let stylesheet = split(stylefile)
-                                               let classlines = filter(copy(stylesheet), "v:val =~ '\\([a-zA-Z0-9:]\\+\\)\\?\\.[a-zA-Z0-9_-]\\+'")
+                                               let stylefile = join(stylesheet, ' ')
+                                               let stylefile = substitute(stylefile, '+>\*[,', ' ', 'g')
+                                               if search_for == 'class'
+                                                       let stylesheet = split(stylefile)
+                                                       let classlines = filter(copy(stylesheet), "v:val =~ '\\([a-zA-Z0-9:]\\+\\)\\?\\.[a-zA-Z0-9_-]\\+'")
+                                               else
+                                                       let stylesheet = split(stylefile, '[{}]')
+                                                       " Get all lines which fit id syntax
+                                                       let classlines = filter(copy(stylesheet), "v:val =~ '#[a-zA-Z0-9_-]\\+'")
+                                                       " Filter out possible color definitions
+                                                       call filter(classlines, "v:val !~ ':\\s*#[a-zA-Z0-9_-]\\+'")
+                                                       " Filter out complex border definitions
+                                                       call filter(classlines, "v:val !~ '\\(none\\|hidden\\|dotted\\|dashed\\|solid\\|double\\|groove\\|ridge\\|inset\\|outset\\)\\s*#[a-zA-Z0-9_-]\\+'")
+                                                       let templines = join(classlines, ' ')
+                                                       let stylelines = split(templines)
+                                                       let classlines = filter(stylelines, "v:val =~ '#[a-zA-Z0-9_-]\\+'")
+
+                                               endif
                                        endif
                                        " We gathered classes definitions from all external files
                                        let classes += classlines
@@ -120,43 +154,71 @@ function! htmlcomplete#CompleteTags(findstart, base)
                                if internal == 1
                                        let classes += headclasslines
                                endif
-                               let elements = {}
-                               for element in classes
-                                       if element =~ '^\.'
-                                               let class = matchstr(element, '^\.\zs[a-zA-Z][a-zA-Z0-9_-]*\ze')
-                                               let class = substitute(class, ':.*', '', '')
-                                               if has_key(elements, "common")
-                                                       let elements["common"] .= " ".class
-                                               else
-                                                       let elements["common"] = class
-                                               endif
-                                       else
-                                               let class = matchstr(element, '[a-zA-Z1-6]*\.\zs[a-zA-Z][a-zA-Z0-9_-]*\ze')
-                                               let tagname = tolower(matchstr(element, '[a-zA-Z1-6]*\ze.'))
-                                               if tagname != ''
-                                                       if has_key(elements, tagname)
-                                                               let elements[tagname] .= " ".class
+
+                               if search_for == 'class'
+                                       let elements = {}
+                                       for element in classes
+                                               if element =~ '^\.'
+                                                       let class = matchstr(element, '^\.\zs[a-zA-Z][a-zA-Z0-9_-]*\ze')
+                                                       let class = substitute(class, ':.*', '', '')
+                                                       if has_key(elements, 'common')
+                                                               let elements['common'] .= ' '.class
                                                        else
-                                                               let elements[tagname] = class
+                                                               let elements['common'] = class
+                                                       endif
+                                               else
+                                                       let class = matchstr(element, '[a-zA-Z1-6]*\.\zs[a-zA-Z][a-zA-Z0-9_-]*\ze')
+                                                       let tagname = tolower(matchstr(element, '[a-zA-Z1-6]*\ze.'))
+                                                       if tagname != ''
+                                                               if has_key(elements, tagname)
+                                                                       let elements[tagname] .= ' '.class
+                                                               else
+                                                                       let elements[tagname] = class
+                                                               endif
                                                        endif
                                                endif
+                                       endfor
+
+                                       if has_key(elements, tag) && has_key(elements, 'common')
+                                               let values = split(elements[tag]." ".elements['common'])
+                                       elseif has_key(elements, tag) && !has_key(elements, 'common')
+                                               let values = split(elements[tag])
+                                       elseif !has_key(elements, tag) && has_key(elements, 'common')
+                                               let values = split(elements['common'])
+                                       else
+                                               return []
                                        endif
-                               endfor
 
-                               if has_key(elements, tag) && has_key(elements, "common")
-                                       let values = split(elements[tag]." ".elements["common"])
-                               elseif has_key(elements, tag) && !has_key(elements, "common")
-                                       let values = split(elements[tag])
-                               elseif !has_key(elements, tag) && has_key(elements, "common")
-                                       let values = split(elements["common"])
-                               else
-                                       return []
+                               elseif search_for == 'id'
+                                       " Find used IDs
+                                       " 1. Catch whole file
+                                       let filelines = getline(1, line('$'))
+                                       " 2. Find lines with possible id
+                                       let used_id_lines = filter(filelines, 'v:val =~ "id\\s*=\\s*[\"''][a-zA-Z0-9_-]\\+"')
+                                       " 3a. Join all filtered lines 
+                                       let id_string = join(used_id_lines, ' ')
+                                       " 3b. And split them to be sure each id is in separate item
+                                       let id_list = split(id_string, 'id\s*=\s*')
+                                       " 4. Extract id values
+                                       let used_id = map(id_list, 'matchstr(v:val, "[\"'']\\zs[a-zA-Z0-9_-]\\+\\ze")')
+                                       let joined_used_id = ','.join(used_id, ',').','
+
+                                       let allvalues = map(classes, 'matchstr(v:val, ".*#\\zs[a-zA-Z0-9_-]\\+")')
+
+                                       let values = []
+
+                                       for element in classes
+                                               if joined_used_id !~ ','.element.','
+                                                       let values += [element]
+                                               endif
+
+                                       endfor
+
                                endif
 
                                " We need special version of sbase
                                let classbase = matchstr(a:base, ".*[\"']")
-                           let classquote = matchstr(classbase, '.$')
-
+                               let classquote = matchstr(classbase, '.$')
 
                                let entered_class = matchstr(attr, ".*=\\s*[\"']\\zs.*")
 
@@ -229,6 +291,10 @@ function! htmlcomplete#CompleteTags(findstart, base)
                                        let values = ["text", "password", "checkbox", "radio", "submit", "reset", "file", "hidden", "image", "button"]
                                elseif a:base =~ '^button'
                                        let values = ["button", "submit", "reset"]
+                               elseif a:base =~ '^style'
+                                       let values = ["text/css"]
+                               elseif a:base =~ '^script'
+                                       let values = ["text/javascript"]
                                endif
                        else
                                return []
@@ -313,11 +379,11 @@ function! htmlcomplete#CompleteTags(findstart, base)
                elseif tag == 'q'
                        let attrs = coreattrs + ["cite"]
                elseif tag == 'script'
-                       let attrs = ["id", "charset", "type", "src", "defer", "xml:space"]
+                       let attrs = ["id", "charset", "type=\"text/javascript\"", "type", "src", "defer", "xml:space"]
                elseif tag == 'select'
                        let attrs = coreattrs + ["name", "size", "multiple", "disabled", "tabindex", "onfocus", "onblur", "onchange"]
                elseif tag == 'style'
-                       let attrs = coreattrs + ["id", "type", "media", "title", "xml:space"]
+                       let attrs = coreattrs + ["id", "type=\"text/css\"", "type", "media", "title", "xml:space"]
                elseif tag == 'table'
                        let attrs = coreattrs + ["summary", "width", "border", "frame", "rules", "cellspacing", "cellpadding"]
                elseif tag =~ '^\(thead\|tfoot\|tbody\|tr\)$'
index c7434af9b517665f543e5ddcfacabaa77fac548d..10dd28542d534ad694551668afa4bc063c9ac7c0 100644 (file)
@@ -1,7 +1,6 @@
 " netrw.vim: Handles file transfer and remote directory listing across a network
 "            AUTOLOAD PORTION
-" Date:                Sep 12, 2005
-" Version:     70
+" Last Change: Aug 29, 2005
 " Maintainer:  Charles E Campbell, Jr <drchipNOSPAM at campbellfamily dot biz>
 " GetLatestVimScripts: 1075 1 :AutoInstall: netrw.vim
 " Copyright:    Copyright (C) 1999-2005 Charles E. Campbell, Jr. {{{1
 "  But be doers of the Word, and not only hearers, deluding your own selves {{{1
 "  (James 1:22 RSV)
 " =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
-
-" Exception for &cp: {{{1
-if &cp
-  finish
-endif
+let s:keepcpo= &cpo
+set cpo&vim
+" call Decho("doing autoload/netrw.vim")
 if v:version < 700
  echohl WarningMsg | echo "***netrw*** you need vim version 7.0 or later for version ".g:loaded_netrw." of netrw" | echohl None
  finish
 endif
-let g:loaded_netrw = "v70"
-let s:keepcpo      = &cpo
-set cpo&vim
-" call Decho("doing autoload/netrw.vim")
 
 " ---------------------------------------------------------------------
 " Default values for global netrw variables {{{1
@@ -1133,7 +1126,7 @@ fun! s:NetBrowse(dirname)
 "   call Decho("new path<".path.">")
 
    " remote-read the requested file into current buffer
-   keepjumps keepalt enew!
+   enew!
    set ma
 "   call Decho("exe file .method."://".user.machine."/".escape(path,s:netrw_cd_escape))
    exe "file ".method."://".user.machine."/".escape(path,s:netrw_cd_escape)
@@ -1143,7 +1136,7 @@ fun! s:NetBrowse(dirname)
    keepjumps 1d
 
    " save certain window-oriented variables into buffer-oriented variables
-   call s:SetBufWinVars()
+   call s:BufWinVars()
    call s:NetOptionRestore()
    setlocal nomod
 
@@ -1169,7 +1162,7 @@ fun! s:NetBrowse(dirname)
    endif
   else
 "   call Decho("generate a new buffer")
-   keepjumps keepalt enew!
+   enew!
   endif
 
   " rename file to reflect where its from
@@ -1207,7 +1200,7 @@ fun! s:NetBrowse(dirname)
   nnoremap <buffer> <silent> U         :<c-u>call <SID>NetBookmarkDir(5,expand("%"))<cr>
   nnoremap <buffer> <silent> v         :call <SID>NetSplit(1)<cr>
   nnoremap <buffer> <silent> x         :call <SID>NetBrowseX(<SID>NetBrowseChgDir(expand("%"),<SID>NetGetWord()),1)<cr>
-  nnoremap <buffer> <silent> <2-leftmouse>     :call <SID>NetBrowse(<SID>NetBrowseChgDir(expand("%"),<SID>NetGetWord()))<cr>
+  nnoremap <buffer> <silent> <2-leftmouse> :call <SID>NetBrowse(<SID>NetBrowseChgDir(expand("%"),<SID>NetGetWord()))<cr>
   exe 'nnoremap <buffer> <silent> <del>        :call <SID>NetBrowseRm("'.user.machine.'","'.path.'")<cr>'
   exe 'vnoremap <buffer> <silent> <del>        :call <SID>NetBrowseRm("'.user.machine.'","'.path.'")<cr>'
   exe 'nnoremap <buffer> <silent> d    :call <SID>NetMakeDir("'.user.machine.'")<cr>'
@@ -1267,7 +1260,6 @@ fun! s:NetBrowse(dirname)
     if g:netrw_ftp_browse_reject != ""
      exe "silent! g/".g:netrw_ftp_browse_reject."/keepjumps d"
     endif
-    silent! keepjumps %s/\r$//e
 
     " if there's no ../ listed, then put ./ and ../ in
     let line1= line(".")
@@ -1282,9 +1274,9 @@ fun! s:NetBrowse(dirname)
     keepjumps norm! 0
 
     " more cleanup
-    exe 'silent! keepjumps '.w:netrw_bannercnt.',$s/^\(\%(\S\+\s\+\)\{7}\S\+\)\s\+\(\S.*\)$/\2/e'
-    exe "silent! keepjumps ".w:netrw_bannercnt.',$g/ -> /s# -> .*/$#/#e'
-    exe "silent! keepjumps ".w:netrw_bannercnt.',$g/ -> /s# -> .*$#/#e'
+    exe 'keepjumps silent! '.w:netrw_bannercnt.',$s/^\(\%(\S\+\s\+\)\{7}\S\+\)\s\+\(\S.*\)$/\2/e'
+    exe "keepjumps silent! ".w:netrw_bannercnt.',$g/ -> /s# -> .*/$#/#e'
+    exe "keepjumps silent! ".w:netrw_bannercnt.',$g/ -> /s# -> .*$#/#e'
    endif
 
   else
@@ -1341,33 +1333,33 @@ fun! s:NetBrowse(dirname)
     keepjumps norm! 0
     endif
 
-    exe 'silent keepjumps '.w:netrw_bannercnt.',$s/ -> .*$//e'
-    exe 'silent keepjumps '.w:netrw_bannercnt.',$s/^\(\%(\S\+\s\+\)\{7}\S\+\)\s\+\(\S.*\)$/\2\t\1/e'
-    exe 'silent keepjumps '.w:netrw_bannercnt
+    exe 'keepjumps silent '.w:netrw_bannercnt.',$s/ -> .*$//e'
+    exe 'keepjumps silent '.w:netrw_bannercnt.',$s/^\(\%(\S\+\s\+\)\{7}\S\+\)\s\+\(\S.*\)$/\2\t\1/e'
+    exe w:netrw_bannercnt
    endif
 
    if line("$") >= w:netrw_bannercnt
     if g:netrw_sort_by =~ "^n"
      call s:SetSort()
      if g:netrw_sort_direction =~ 'n'
-      exe 'silent keepjumps '.w:netrw_bannercnt.',$sort'
+      exe 'keepjumps silent '.w:netrw_bannercnt.',$sort'
      else
-      exe 'silent keepjumps '.w:netrw_bannercnt.',$sort!'
+      exe 'keepjumps silent '.w:netrw_bannercnt.',$sort!'
      endif
-     exe 'silent keepjumps '.w:netrw_bannercnt.',$s/^\d\{3}\///e'
+     exe 'keepjumps silent '.w:netrw_bannercnt.',$s/^\d\{3}\///e'
     endif
     if w:netrw_longlist == 1
      " shorten the list to keep its width <= winwidth characters
-     exe "silent keepjumps ".w:netrw_bannercnt.',$s/\t[-dstrwx]\+/\t/e'
+     exe "keepjumps silent ".w:netrw_bannercnt.',$s/\t[-dstrwx]\+/\t/e'
     endif
    endif
   endif
 
+  " cleanup any windows mess at end-of-line
+  keepjumps silent! %s/\r$//e
   call s:NetrwWideListing()
   if line("$") >= w:netrw_bannercnt
-   " place cursor on the top-left corner of the file listing
    exe "keepjumps ".w:netrw_bannercnt
-   norm! 0
   endif
 
   call s:NetOptionRestore()
@@ -1457,7 +1449,7 @@ fun! s:NetGetWord()
     let s:netrw_skipbrowse= 1
     echo 'Pressing "a" also works'
    elseif line("$") > w:netrw_bannercnt
-    exe 'silent keepjumps '.w:netrw_bannercnt
+    exe w:netrw_bannercnt
    endif
 
   elseif w:netrw_longlist == 0
@@ -1698,7 +1690,7 @@ fun! s:NetBrowseX(fname,remote)
    " create a local copy
    let fname= tempname().".".exten
 "   call Decho("create a local copy of <".a:fname."> as <".fname.">")
-   exe "silent keepjumps bot 1new ".a:fname
+   exe "keepjumps silent bot 1new ".a:fname
    set bh=delete
    exe "w! ".fname
    q
@@ -1823,14 +1815,14 @@ fun! s:NetBrowseFtpCmd(path,cmd)
 
   " cleanup for Windows
   if has("win32") || has("win95") || has("win64") || has("win16")
-   silent! keepjumps! %s/\r$//e
+   keepjumps silent!! %s/\r$//e
   endif
   if a:cmd == "dir"
    " infer directory/link based on the file permission string
-   silent! keepjumps g/d\%([-r][-w][-x]\)\{3}/s@$@/@
-   silent! keepjumps g/l\%([-r][-w][-x]\)\{3}/s/$/@/
+   keepjumps silent! g/d\%([-r][-w][-x]\)\{3}/s@$@/@
+   keepjumps silent! g/l\%([-r][-w][-x]\)\{3}/s/$/@/
    if w:netrw_longlist == 0 || w:netrw_longlist == 2
-    exe "silent! keepjumps ".curline.',$s/^\%(\S\+\s\+\)\{8}//e'
+    exe "keepjumps silent! ".curline.',$s/^\%(\S\+\s\+\)\{8}//e'
    endif
   endif
 
@@ -1868,9 +1860,9 @@ fun! s:NetrwListHide()
    " Prune the list by hiding any files which match
 "   call Decho("pruning <".hide."> listhide<".listhide.">")
    if g:netrw_hide == 1
-    exe 'silent keepjumps '.w:netrw_bannercnt.',$g~'.hide.'~d'
+    exe 'keepjumps silent '.w:netrw_bannercnt.',$g~'.hide.'~d'
    elseif g:netrw_hide == 2
-    exe 'silent keepjumps '.w:netrw_bannercnt.',$v~'.hide.'~d'
+    exe 'keepjumps silent '.w:netrw_bannercnt.',$v~'.hide.'~d'
    endif
   endwhile
 
@@ -2004,7 +1996,7 @@ fun! s:NetrwWideListing()
      exe "silent keepjumps norm! 0\<c-v>".newcolqty.'j$hx'.w:netrw_bannercnt.'G$p'
     endif
     exe "silent keepjumps ".newcolstart.','.newcolend.'d'
-    exe 'silent keepjumps '.w:netrw_bannercnt
+    exe w:netrw_bannercnt
    endwhile
    exe "silent keepjumps ".w:netrw_bannercnt.',$s/\s\+$//e'
    set noma nomod
@@ -2138,7 +2130,7 @@ fun! s:NetBookmarkDir(chg,curdir)
   if exists("w:netrw_bannercnt") && line(".") <= w:netrw_bannercnt
    " looks like a "b" was pressed while in the banner region
    if line("$") > w:netrw_bannercnt
-    exe 'silent keepjumps '.w:netrw_bannercnt
+    exe w:netrw_bannercnt
    endif
    echo ""
 "  call Dret("NetBookmarkDir - ignoring")
@@ -2237,10 +2229,12 @@ endfun
 " ---------------------------------------------------------------------
 " NetObtain: obtain file under cursor (for remote browsing support) {{{2
 fun! s:NetObtain()
+  if !exists("s:netrw_users_stl")
+   let s:netrw_users_stl= &stl
+  endif
   let fname= expand("<cWORD>")
-
-  " NetrwStatusLine support - for obtaining support
-  call s:SetupNetrwStatusLine('%f %h%m%r%=%9*Obtaining '.fname)
+  exe 'set stl=%f\ %h%m%r%=Obtaining\ '.escape(fname,' ')
+  redraw!
 
 "  call Dfunc("NetObtain() method=".w:netrw_method)
   if exists("w:netrw_method") && w:netrw_method =~ '[235]'
@@ -2318,8 +2312,6 @@ fun! s:NetObtain()
      echohl Error | echo "***netrw*** this system doesn't support ftp" | echohl None
      call inputsave()|call input("Press <cr> to continue")|call inputrestore()
     endif
-    let &stl        = s:netrw_users_stl
-    let &laststatus = s:netrw_users_ls
 "    call Dret("NetObtain")
     return
    endif
@@ -2343,8 +2335,7 @@ fun! s:NetObtain()
   endif
 
   " restore status line
-  let &stl        = s:netrw_users_stl
-  let &laststatus = s:netrw_users_ls
+  let &stl= s:netrw_users_stl
   redraw!
 
 "  call Dret("NetObtain")
@@ -2413,7 +2404,7 @@ fun! netrw#DirBrowse(dirname)
 
   " get cleared buffer
   if bufnum < 0 || !bufexists(bufnum)
-   keepjumps keepalt enew!
+   keepalt enew!
 "   call Decho("enew buffer")
   else
    exe "keepalt b ".bufnum
@@ -2505,7 +2496,7 @@ fun! netrw#DirBrowse(dirname)
   nnoremap <buffer> <silent> U         :<c-u>call <SID>NetBookmarkDir(5,expand("%"))<cr>
   nnoremap <buffer> <silent> v         :call <SID>NetSplit(3)<cr>
   nnoremap <buffer> <silent> x         :call <SID>NetBrowseX(<SID>LocalBrowseChgDir(b:netrw_curdir,<SID>NetGetWord(),0),0)"<cr>
-  nnoremap <buffer> <silent> <2-leftmouse>     :call <SID>LocalBrowse(<SID>LocalBrowseChgDir(b:netrw_curdir,<SID>NetGetWord()))<cr>
+  nnoremap <buffer> <silent> <2-leftmouse> :exe "call <SID>LocalRefresh(<SID>LocalBrowseChgDir(b:netrw_curdir,<SID>NetGetWord()))"<cr>
   nnoremap <buffer> <silent> <s-up>    :Pexplore<cr>
   nnoremap <buffer> <silent> <s-down>  :Nexplore<cr>
   exe 'nnoremap <buffer> <silent> <del>        :call <SID>LocalBrowseRm("'.b:netrw_curdir.'")<cr>'
@@ -2583,19 +2574,19 @@ fun! netrw#DirBrowse(dirname)
      call s:SetSort()
 
      if g:netrw_sort_direction =~ 'n'
-      exe 'silent keepjumps '.w:netrw_bannercnt.',$sort'
+      exe 'keepjumps silent '.w:netrw_bannercnt.',$sort'
      else
-      exe 'silent keepjumps '.w:netrw_bannercnt.',$sort!'
+      exe 'keepjumps silent '.w:netrw_bannercnt.',$sort!'
      endif
-     exe 'silent keepjumps '.w:netrw_bannercnt.',$s/^\d\{3}\///e'
+     exe 'keepjumps silent '.w:netrw_bannercnt.',$s/^\d\{3}\///e'
 
     else
      if g:netrw_sort_direction =~ 'n'
-      exe 'silent keepjumps '.w:netrw_bannercnt.',$sort'
+      exe 'keepjumps silent '.w:netrw_bannercnt.',$sort'
      else
-      exe 'silent keepjumps '.w:netrw_bannercnt.',$sort!'
+      exe 'keepjumps silent '.w:netrw_bannercnt.',$sort!'
      endif
-     exe 'silent keepjumps '.w:netrw_bannercnt.',$s/^\d\{-}\///e'
+     exe 'keepjumps silent '.w:netrw_bannercnt.',$s/^\d\{-}\///e'
     endif
 
    endif
@@ -2603,16 +2594,14 @@ fun! netrw#DirBrowse(dirname)
 
   call s:NetrwWideListing()
   if exists("w:netrw_bannercnt") && line("$") > w:netrw_bannercnt
-   " place cursor on the top-left corner of the file listing
-   exe 'silent '.w:netrw_bannercnt
-   norm! 0
+   exe w:netrw_bannercnt
   endif
 
   " record previous current directory
   let w:netrw_prvdir= b:netrw_curdir
 
   " save certain window-oriented variables into buffer-oriented variables
-  call s:SetBufWinVars()
+  call s:BufWinVars()
   call s:NetOptionRestore()
   setlocal noma nomod nonu bh=hide nobl
 
@@ -2712,7 +2701,7 @@ fun! s:LocalBrowseList()
   endwhile
   
   " cleanup any windows mess at end-of-line
-  silent! keepjumps %s/\r$//e
+  keepjumps silent! %s/\r$//e
   setlocal ts=32
 
 "  call Dret("LocalBrowseList")
@@ -3043,8 +3032,12 @@ fun! netrw#Explore(indx,dosplit,style,...)
      endif
     endif
 
-    " NetrwStatusLine support - for exploring support
+    " NetrwStatusLine support
     let w:netrw_explore_indx= indx
+    if !exists("s:netrw_users_stl")
+     let s:netrw_users_stl= &stl
+    endif
+    set stl=%f\ %h%m%r%=%{NetrwStatusLine()}
 "    call Decho("explorelist<".join(w:netrw_explore_list,',')."> len=".w:netrw_explore_listlen)
 
     " sanity check
@@ -3057,21 +3050,15 @@ fun! netrw#Explore(indx,dosplit,style,...)
     endif
 
     exe "let dirfile= w:netrw_explore_list[".indx."]"
-"    call Decho("dirfile=w:netrw_explore_list[indx=".indx."]= <".dirfile.">")
+"    call Decho("dirfile<".dirfile."> indx=".indx)
     let newdir= substitute(dirfile,'/[^/]*$','','e')
 "    call Decho("newdir<".newdir.">")
-
 "    call Decho("calling LocalBrowse(newdir<".newdir.">)")
     call s:LocalBrowse(newdir)
-    if w:netrw_longlist == 0 || w:netrw_longlist == 1
-     call search('^'.substitute(dirfile,"^.*/","","").'\>',"W")
-    else
-     call search('\<'.substitute(dirfile,"^.*/","","").'\>',"w")
-    endif
+    call search(substitute(dirfile,"^.*/","",""),"W")
     let w:netrw_explore_mtchcnt = indx + 1
     let w:netrw_explore_bufnr   = bufnr(".")
     let w:netrw_explore_line    = line(".")
-    call s:SetupNetrwStatusLine('%f %h%m%r%=%9*%{NetrwStatusLine()}')
 "    call Decho("explore: mtchcnt=".w:netrw_explore_mtchcnt." bufnr=".w:netrw_explore_bufnr." line#".w:netrw_explore_line)
 
    else
@@ -3090,74 +3077,13 @@ fun! netrw#Explore(indx,dosplit,style,...)
 "  call Dret("Explore")
 endfun
 
-" ---------------------------------------------------------------------
-" SetupNetrwStatusLine: {{{2
-fun! s:SetupNetrwStatusLine(statline)
-"  call Dfunc("SetupNetrwStatusLine(statline<".a:statline.">)")
-
-  if !exists("s:netrw_setup_statline")
-   let s:netrw_setup_statline= 1
-"   call Decho("do first-time status line setup")
-
-   if !exists("s:netrw_users_stl")
-    let s:netrw_users_stl= &stl
-   endif
-   if !exists("s:netrw_users_ls")
-    let s:netrw_users_ls= &laststatus
-   endif
-
-   " set up User9 highlighting as needed
-   let keepa= @a
-   redir @a
-   try
-    hi User9
-   catch /^Vim\%((\a\+)\)\=:E411/
-    if &bg == "dark"
-     hi User9 ctermfg=yellow ctermbg=blue guifg=yellow guibg=blue
-    else
-     hi User9 ctermbg=yellow ctermfg=blue guibg=yellow guifg=blue
-    endif
-   endtry
-   redir END
-   let @a= keepa
-  endif
-
-  " set up status line (may use User9 highlighting)
-  " insure that windows have a statusline
-  " make sure statusline is displayed
-  let &stl=a:statline
-  set laststatus=2
-"  call Decho("stl=".&stl)
-  redraw!
-
-"  call Dret("SetupNetrwStatusLine : stl=".&stl)
-endfun
-
 " ---------------------------------------------------------------------
 " NetrwStatusLine: {{{2
 fun! NetrwStatusLine()
-
-  " vvv NetrwStatusLine() debugging vvv
-"  let g:stlmsg=""
-"  if !exists("w:netrw_explore_bufnr")
-"   let g:stlmsg="!X<explore_bufnr>"
-"  elseif w:netrw_explore_bufnr != bufnr(".")
-"   let g:stlmsg="explore_bufnr!=".bufnr(".")
-"  endif
-"  if !exists("w:netrw_explore_line")
-"   let g:stlmsg=" !X<explore_line>"
-"  elseif w:netrw_explore_line != line(".")
-"   let g:stlmsg=" explore_line!={line(.)<".line(".").">"
-"  endif
-"  if !exists("w:netrw_explore_list")
-"   let g:stlmsg=" !X<explore_list>"
-"  endif
-  " ^^^ NetrwStatusLine() debugging ^^^
-
+"  let g:stlmsg= "Xbufnr=".w:netrw_explore_bufnr." bufnr=".bufnr(".")." Xline#".w:netrw_explore_line." line#".line(".")
   if !exists("w:netrw_explore_bufnr") || w:netrw_explore_bufnr != bufnr(".") || !exists("w:netrw_explore_line") || w:netrw_explore_line != line(".") || !exists("w:netrw_explore_list")
    " restore user's status line
-   let &stl        = s:netrw_users_stl
-   let &laststatus = s:netrw_users_ls
+   let &stl= s:netrw_users_stl
    if exists("w:netrw_explore_bufnr")|unlet w:netrw_explore_bufnr|endif
    if exists("w:netrw_explore_line")|unlet w:netrw_explore_line|endif
    return ""
@@ -3410,12 +3336,6 @@ fun! NetUserPass(...)
 "  call Decho("a:0=".a:0." case >1: a:2<".a:2.">")
   let g:netrw_passwd=a:2
  endif
-
- " surround password with double-quotes if it contains embedded blanks
- if g:netrw_passwd !~ '^"' && g:netrw_passwd =~ ' '
-  let g:netrw_passwd= '"'.g:netrw_passwd.'"'
- endif
-
 "  call Dret("NetUserPass")
 endfun
 
@@ -3472,21 +3392,22 @@ fun! s:NetOptionRestore()
   endif
   unlet w:netoptionsave
  
-  if exists("w:aikeep")| let &ai= w:aikeep|endif
-  if (has("netbeans_intg") || has("sun_workshop")) && exists("w:acdkeep")
-   let &acd= w:acdkeep
-   unlet w:acdkeep
-  endif
-  if exists("w:cinkeep") |let &cin    = w:cinkeep |unlet w:cinkeep |endif
-  if exists("w:cinokeep")|let &cino   = w:cinokeep|unlet w:cinokeep|endif
-  if exists("w:comkeep") |let &com    = w:comkeep |unlet w:comkeep |endif
-  if exists("w:cpokeep") |let &cpo    = w:cpokeep |unlet w:cpokeep |endif
-  if exists("w:dirkeep") |exe "lcd ".w:dirkeep    |unlet w:dirkeep |endif
-  if exists("w:gdkeep")  |let &gd     = w:gdkeep  |unlet w:gdkeep  |endif
-  if exists("w:repkeep") |let &report = w:repkeep |unlet w:repkeep |endif
-  if exists("w:twkeep")  |let &tw     = w:twkeep  |unlet w:twkeep  |endif
+  let &ai      = w:aikeep
+  if has("netbeans_intg") || has("sun_workshop")
+   let &acd     = w:acdkeep
+  endif
+  let &cin     = w:cinkeep
+  let &cino    = w:cinokeep
+  let &com     = w:comkeep
+  let &cpo     = w:cpokeep
+  if exists("w:dirkeep")
+   exe "lcd ".w:dirkeep
+  endif
+  let &gd      = w:gdkeep
+  let &report   = w:repkeep
+  let &tw      = w:twkeep
   if exists("w:swfkeep")
-   if &directory == "" && exists("w:swfkeep")
+   if &directory == ""
     " user hasn't specified a swapfile directory;
     " netrw will temporarily make the swapfile
     " directory the current local one.
@@ -3498,6 +3419,17 @@ fun! s:NetOptionRestore()
    endif
    unlet w:swfkeep
   endif
+  unlet w:aikeep
+  unlet w:cinkeep
+  unlet w:cinokeep
+  unlet w:comkeep
+  unlet w:cpokeep
+  unlet w:gdkeep
+  unlet w:repkeep
+  unlet w:twkeep
+  if exists("w:dirkeep")
+   unlet w:dirkeep
+  endif
  
 "  call Dret("NetOptionRestore")
 endfun
@@ -3509,7 +3441,7 @@ endfun
 "               example and as a fix for a Windows 95 problem: in my
 "               experience, win95's ftp always dumped four blank lines
 "               at the end of the transfer.
-if has("win95") && exists("g:netrw_win95ftp") && g:netrw_win95ftp
+if has("win95") && g:netrw_win95ftp
  fun! NetReadFixup(method, line1, line2)
 "   call Dfunc("NetReadFixup(method<".a:method."> line1=".a:line1." line2=".a:line2.")")
    if method == 3   " ftp (no <.netrc>)
@@ -3610,14 +3542,14 @@ fun! s:SetSort()
     return
    endif
    if seq == '*'
-    exe 'silent keepjumps '.w:netrw_bannercnt.',$v/^\d\{3}\//s/^/'.spriority.'/'
+    exe 'keepjumps silent '.w:netrw_bannercnt.',$v/^\d\{3}\//s/^/'.spriority.'/'
    else
-    exe 'silent keepjumps '.w:netrw_bannercnt.',$g/'.eseq.'/s/^/'.spriority.'/'
+    exe 'keepjumps silent '.w:netrw_bannercnt.',$g/'.eseq.'/s/^/'.spriority.'/'
    endif
    let priority = priority + 1
   endwhile
 
-  exe 'silent keepjumps '.w:netrw_bannercnt.',$s/^\(\d\{3}\/\)\%(\d\{3}\/\)\+/\1/e'
+  exe 'keepjumps silent '.w:netrw_bannercnt.',$s/^\(\d\{3}\/\)\%(\d\{3}\/\)\+/\1/e'
 
 "  call Dret("SetSort")
 endfun
@@ -3655,14 +3587,14 @@ fun! s:CopyWinVars()
 endfun
 
 " ---------------------------------------------------------------------
-" SetBufWinVars: (used by NetBrowse() and LocalBrowse()) {{{1
+" BufWinVars: (used by NetBrowse() and LocalBrowse()) {{{1
 "   To allow separate windows to have their own activities, such as
 "   Explore **/pattern, several variables have been made window-oriented.
 "   However, when the user splits a browser window (ex: ctrl-w s), these
-"   variables are not inherited by the new window.  SetBufWinVars() and
+"   variables are not inherited by the new window.  BufWinVars() and
 "   UseBufWinVars() get around that.
-fun! s:SetBufWinVars()
-"  call Dfunc("SetBufWinVars()")
+fun! s:BufWinVars()
+"  call Dfunc("BufWinVars()")
   if exists("w:netrw_longlist")       |let b:netrw_longlist        = w:netrw_longlist       |endif
   if exists("w:netrw_bannercnt")      |let b:netrw_bannercnt       = w:netrw_bannercnt      |endif
   if exists("w:netrw_method")         |let b:netrw_method          = w:netrw_method         |endif
@@ -3673,7 +3605,7 @@ fun! s:SetBufWinVars()
   if exists("w:netrw_explore_bufnr")  |let b:netrw_explore_bufnr   = w:netrw_explore_bufnr  |endif
   if exists("w:netrw_explore_line")   |let b:netrw_explore_line    = w:netrw_explore_line   |endif
   if exists("w:netrw_explore_list")   |let b:netrw_explore_list    = w:netrw_explore_list   |endif
-"  call Dret("SetBufWinVars")
+"  call Dret("BufWinVars")
 endfun
 
 " ---------------------------------------------------------------------
index 5d85bf14f28a6f31704823d586a2f59e34bada2e..77292bce1385d5b369ae146b26052dafc7a6d76b 100644 (file)
@@ -24,13 +24,22 @@ endif
 let s:cpo_save = &cpo
 set cpo-=C
 
-CompilerSet makeprg=eruby
+if exists("eruby_compiler") && eruby_compiler == "eruby"
+  CompilerSet makeprg=eruby
+else
+  CompilerSet makeprg=erb
+endif
 
-CompilerSet errorformat=eruby:\ %f:%l:%m,
-                      \%E%f:%l:\ %m,
-                      \%-Z%p^,
-                      \%C%m,
-                      \%-G%.%#
+CompilerSet errorformat=
+    \eruby:\ %f:%l:%m,
+    \%+E%f:%l:\ parse\ error,
+    \%W%f:%l:\ warning:\ %m,
+    \%E%f:%l:in\ %*[^:]:\ %m,
+    \%E%f:%l:\ %m,
+    \%-C%\tfrom\ %f:%l:in\ %.%#,
+    \%-Z%\tfrom\ %f:%l,
+    \%-Z%p^,
+    \%-G%.%#
 
 let &cpo = s:cpo_save
 unlet s:cpo_save
index 7d6383126a4a0cb1526feee531ca7d244b9ca331..fdd820f84e2644ac5e80db398d5d9a3ae036ba8d 100644 (file)
@@ -1,4 +1,4 @@
-*diff.txt*      For Vim version 7.0aa.  Last change: 2005 Apr 26
+*diff.txt*      For Vim version 7.0aa.  Last change: 2005 Sep 21
 
 
                  VIM REFERENCE MANUAL    by Bram Moolenaar
@@ -218,7 +218,7 @@ It is an error if there is no change for the cursor to move to.
 
 ==============================================================================
 4. Diff copying                        *copy-diffs* *E99* *E100* *E101* *E102* *E103*
-
+                                                               *merge*
 There are two commands to copy text from one buffer to another.  The result is
 that the buffers will be equal within the specified range.
 
@@ -235,6 +235,8 @@ that the buffers will be equal within the specified range.
                Modify another buffer to undo difference with the current
                buffer.  Just like ":diffget" but the other buffer is modified
                instead of the current one.
+               When [bufspec] is omitted and there is more than one other
+               buffer in diff mode where 'modifiable' is set this fails.
                See below for [range].
 
                                                        *do*
index ed6ee899aca24931a07c398ee7c873219005cda3..6c32f1653ebd0bc8a29eecc2e4629fd8f6a25d5b 100644 (file)
@@ -1,4 +1,4 @@
-*eval.txt*      For Vim version 7.0aa.  Last change: 2005 Sep 20
+*eval.txt*      For Vim version 7.0aa.  Last change: 2005 Sep 25
 
 
                  VIM REFERENCE MANUAL    by Bram Moolenaar
@@ -2547,11 +2547,12 @@ getcmdpos()                                             *getcmdpos()*
 getcmdtype()                                           *getcmdtype()*
                Return the current command-line type. Possible return values
                are:
-                   /   Search forward command
-                   ?   Search backward command
-                   :   Ex-command mode
-                   @   Input mode
-                   >   Debug mode
+                   :   normal Ex command
+                   >   debug mode command |debug-mode|
+                   /   forward search command
+                   ?   backward search command
+                   @   |input()| command
+                   -   |:insert| or |:append| command
                Only works when editing the command line, thus requires use of
                |c_CTRL-\_e| or |c_CTRL-R_=|.  Returns an empty string
                otherwise.
@@ -2939,8 +2940,8 @@ input({prompt} [, {text} [, {completion}]])               *input()*
                        :  echo "Cheers!"
                        :endif
 <
-               If the optional {text} is present, this is used for the
-               default reply, as if the user typed this.  Example: >
+               If the optional {text} is present and not empty, this is used
+               for the default reply, as if the user typed this.  Example: >
                        :let color = input("Color? ", "white")
 
 <              The optional {completion} argument specifies the type of
@@ -4049,10 +4050,30 @@ soundfold({word})
                the method can be quite slow.
 
                                                        *spellbadword()*
-spellbadword() Return the badly spelled word under or after the cursor.
-               The cursor is moved to the start of the bad word.
-               When no bad word is found in the cursor line an empty String
-               is returned and the cursor doesn't move.
+spellbadword([{sentence}])
+               Without argument: The result is the badly spelled word under
+               or after the cursor.  The cursor is moved to the start of the
+               bad word.  When no bad word is found in the cursor line the
+               result is an empty string and the cursor doesn't move.
+
+               With argument: The result is the first word in {sentence} that
+               is badly spelled.  If there are no spelling mistakes the
+               result is an empty string.
+
+               The return value is a list with two items:
+               - The badly spelled word or an empty string.
+               - The type of the spelling error:
+                       "bad"           spelling mistake
+                       "rare"          rare word
+                       "local"         word only valid in another region
+                       "caps"          word should start with Capital
+               Example: >
+                       echo spellbadword("the quik brown fox")
+<                      ['quik', 'bad'] ~
+
+               The spelling information for the current window is used.  The
+               'spell' option must be set and the value of 'spelllang' is
+               used.
 
                                                        *spellsuggest()*
 spellsuggest({word} [, {max}])
index 30fe2d4f1ff0a0f6645ea70d566dd0453bc7b482..f668c0093686ebbc396f48a705697a54639c4684 100644 (file)
@@ -1,4 +1,4 @@
-*insert.txt*    For Vim version 7.0aa.  Last change: 2005 Sep 18
+*insert.txt*    For Vim version 7.0aa.  Last change: 2005 Sep 23
 
 
                  VIM REFERENCE MANUAL    by Bram Moolenaar
@@ -988,20 +988,35 @@ are included.
 
 (X)HTML                                                *ft-html-omni*
 
-When using after CTRL-X CTRL-O after "<" it is completed with tag name
-available in current context. Inside of tag completion aids to choose
-proper attributes, and when possible choose appropriate attribute value
-including class names for CSS styles.
-
-When used after "</" CTRL-X CTRL-O will close the last opened tag.
+CTRL-X CTRL-O provides completion of various elements of (X)HTML files.
+It is designed to support writing of XHTML 1.0 Strict files but will
+also works for other versions of HTML. Features:
+
+- after "<" complete tag name depending on context (no div suggest
+  inside of an a tag)
+- inside of tag complete proper attributes (no width attribute for an
+  a tag)
+- when attribute has limited number of possible values help to complete
+  them
+- complete values of "class" and "id" attributes with data obtained from
+  style tag and included CSS files
+- when completing "style" attribute or working inside of "style" tag
+  switch to |ft-css-omni| completion
+- when used after "</" CTRL-X CTRL-O will close the last opened tag
 
 File htmlcomplete.vim provides through |autoload| mechanism
 GetLastOpenTag function which can be used in XML files to get name of
-last open tag with: >
+last open tag with (b:unaryTagsStack has to be defined): >
 
         :echo htmlcomplete#GetLastOpenTag("b:unaryTagsStack")
 
 
+CSS                                                     *ft-css-omni*
+
+Complete properties and their appropriate values according to CSS 2.1
+specification. 
+
+
 ==============================================================================
 8. Insert mode commands                                        *inserting*
 
index c33023a75e944e490b21da312ef5726d4f2affac..618c76712e22d11da40f30e5deab86b06cbc329c 100644 (file)
@@ -1,4 +1,4 @@
-*map.txt*       For Vim version 7.0aa.  Last change: 2005 Aug 16
+*map.txt*       For Vim version 7.0aa.  Last change: 2005 Sep 22
 
 
                  VIM REFERENCE MANUAL    by Bram Moolenaar
@@ -306,11 +306,12 @@ If you type a space, then "foo" will get inserted, plus the space.  If you
 type "a", then "bar" will get inserted.
 {Vi does not allow ambiguous mappings}
 
-                                                       *map_CTRL_C*
-It's not possible to use a CTRL-C in the {lhs}.  You just can't map CTRL-C.
-The reason is that CTRL-C must always be available to break a running command.
-Exception: When using the GUI version on MS-Windows CTRL-C can be mapped to
-allow a Copy command to the clipboard.  Use CTRL-Break to interrupt Vim.
+                                                       *map_CTRL-C*
+Using CTRL-C in the {lhs} is possible, but it will only work when Vim is
+waiting for a key, not when Vim is busy with something.  When Vim is busy
+CTRL-C interrupts/breaks the command.
+When using the GUI version on MS-Windows CTRL-C can be mapped to allow a Copy
+command to the clipboard.  Use CTRL-Break to interrupt Vim.
 
                                                        *map_space_in_lhs*
 To include a space in {lhs} precede it with a CTRL-V (type two CTRL-Vs for
index a1c18bed9962a3614b6c6775c0b02596ac3918ed..87429e03029e4a57e0ff3109a04295c6b3ddbf88 100644 (file)
@@ -1,4 +1,4 @@
-*message.txt*   For Vim version 7.0aa.  Last change: 2005 Aug 01
+*message.txt*   For Vim version 7.0aa.  Last change: 2005 Sep 25
 
 
                  VIM REFERENCE MANUAL    by Bram Moolenaar
@@ -23,7 +23,7 @@ The number of remembered messages is fixed at 20.
 
                                                                *g<*
 The "g<" command can be used to see the last page of previous command output.
-This is especially useful if you accidentally typed <Space> at the hit-return
+This is especially useful if you accidentally typed <Space> at the hit-enter
 prompt.
 Note: when you stopped the output with "q" at the more prompt only up to that
 point will be displayed.
@@ -813,4 +813,8 @@ Any other key causes the meaning of the keys to be displayed.
 Note: The typed key is directly obtained from the terminal, it is not mapped
 and typeahead is ignored.
 
+The |g<| command can be used to see the last page of previous command output.
+This is especially useful if you accidentally typed <Space> at the hit-enter
+prompt.
+
  vim:tw=78:ts=8:ft=help:norl:
index 7cc817043848bd14298f718248b1ace45b597d8b..39a6f40ce617135c913c5723bb477889cee9987f 100644 (file)
@@ -1,4 +1,4 @@
-*options.txt*  For Vim version 7.0aa.  Last change: 2005 Sep 13
+*options.txt*  For Vim version 7.0aa.  Last change: 2005 Sep 25
 
 
                  VIM REFERENCE MANUAL    by Bram Moolenaar
@@ -3647,9 +3647,11 @@ A jump table for the options with a short description can be found at |Q_op|.
        Pattern to be used to find an include command.  It is a search
        pattern, just like for the "/" command (See |pattern|).  The default
        value is for C programs.  This option is used for the commands "[i",
-       "]I", "[d", etc.  The 'isfname' option is used to recognize the file
-       name that comes after the matched pattern.  See |option-backslash|
-       about including spaces and backslashes.
+       "]I", "[d", etc.
+       Normally the 'isfname' option is used to recognize the file name that
+       comes after the matched pattern.  But if both "\zs" and "\ze" appear
+       in the pattern then the text spanned by them is used as the file name.
+       See |option-backslash| about including spaces and backslashes.
 
                                                *'includeexpr'* *'inex'*
 'includeexpr' 'inex'   string  (default "")
@@ -5160,6 +5162,9 @@ A jump table for the options with a short description can be found at |Q_op|.
        Minimal number of lines to scroll when the cursor gets off the
        screen (e.g., with "j").  Not used for scroll commands (e.g., CTRL-E,
        CTRL-D).  Useful if your terminal scrolls very slowly.
+       When set to a negative number from -1 to -100 this is used as the
+       percentage of the window height.  Thus -50 scrolls half the window
+       height.
        NOTE: This option is set to 1 when 'compatible' is set.
 
                                                *'scrolloff'* *'so'*
index 4d446f6927253b1d23ca95621e797c2871a63d16..d1ca623d70a3923fcd7871eacbb1296f51fb7580 100644 (file)
@@ -1,4 +1,4 @@
-*pi_netrw.txt*  For Vim version 7.0.  Last change: Sep 12, 2005
+*pi_netrw.txt*  For Vim version 7.0.  Last change: Aug 25, 2005
 
 
                VIM REFERENCE MANUAL    by Charles E. Campbell, Jr.
@@ -25,7 +25,7 @@
 4.  Transparent File Transfer............................|netrw-transparent|
 5.  Ex Commands..........................................|netrw-ex|
 6.  Variables and Options................................|netrw-var|
-7.  Directory Browsing...................................|netrw-browse| {{{1
+7.  Directory Browser....................................|netrw-browse| {{{1
       Maps...............................................|netrw-maps|
       Exploring..........................................|netrw-explore-cmds|
       Quick Reference Commands Table.....................|netrw-browse-cmds|
@@ -40,7 +40,7 @@
       Making A New Directory.............................|netrw-d|
       Deleting Files Or Directories......................|netrw-delete|
       Renaming Files Or Directories......................|netrw-move|
-      Hiding Files Or Directories........................|netrw-a|
+      Hiding Files Or Directories........................|g:netrw-a|
       Edit File Or Directory Hiding List.................|netrw-h|
       Browsing With A Horizontally Split Window..........|netrw-o|
       Preview Window.....................................|netrw-p|
@@ -194,8 +194,8 @@ file using root-relative paths, use the full path:
 2. Network-Oriented File Transfer                              *netrw-xfer*
 
 Network-oriented file transfer under Vim is implemented by a VimL-based script
-(<netrw.vim>) using plugin techniques.  It currently supports both reading and
-writing across networks using rcp, scp, ftp or ftp+<.netrc>, scp, fetch,
+(<netrw.vim>) using plugin techniques.  It currently supports both reading
+and writing across networks using rcp, scp, ftp or ftp+<.netrc>, scp, fetch,
 dav/cadaver, rsync, or sftp.
 
 http is currently supported read-only via use of wget or fetch.
@@ -206,23 +206,24 @@ FileReadCmd, BufWriteCmd) to intercept reads/writes with url-like filenames. >
 
        ex. vim ftp://hostname/path/to/file
 <
-The characters preceding the colon specify the protocol to use; in the
-example, its ftp.  The <netrw.vim> script then formulates a command or a
-series of commands (typically ftp) which it issues to an external program
-(ftp, scp, etc) which does the actual file transfer/protocol.  Files are read
-from/written to a temporary file (under Unix/Linux, /tmp/...) which the
-<netrw.vim> script will clean up.
-
-One may modify any protocol's implementing external application by setting a
-variable (ex. scp uses the variable g:netrw_scp_cmd, which is defaulted to
-"scp -q").
+The characters preceding the colon specify the protocol to use;
+in the example, its ftp.  The <netrw.vim> script then formulates
+a command or a series of commands (typically ftp) which it issues
+to an external program (ftp, scp, etc) which does the actual file
+transfer/protocol.  Files are read from/written to a temporary file
+(under Unix/Linux, /tmp/...) which the <netrw.vim> script will
+clean up.
+
+One may modify any protocol's implementing external application
+by setting a variable (ex. scp uses the variable g:netrw_scp_cmd,
+which is defaulted to "scp -q").
 
 Ftp, an old protocol, seems to be blessed by numerous implementations.
-Unfortunately, some implementations are noisy (ie., add junk to the end of the
-file).  Thus, concerned users may decide to write a NetReadFixup() function
-that will clean up after reading with their ftp.  Some Unix systems (ie.,
-FreeBSD) provide a utility called "fetch" which uses the ftp protocol but is
-not noisy and more convenient, actually, for <netrw.vim> to use.
+Unfortunately, some implementations are noisy (ie., add junk to the end
+of the file).  Thus, concerned users may decide to write a NetReadFixup()
+function that will clean up after reading with their ftp.  Some Unix systems
+(ie., FreeBSD) provide a utility called "fetch" which uses the ftp protocol
+but is not noisy and more convenient, actually, for <netrw.vim> to use.
 Consequently, if "fetch" is executable, it will be used to do reads for
 ftp://... (and http://...) .  See |netrw-var| for more about this.
 
@@ -331,9 +332,8 @@ The script attempts to get passwords for ftp invisibly using |inputsecret()|,
 a built-in Vim function.  See |netrw-uidpass| for how to change the password
 after one has set it.
 
-Unfortunately there doesn't appear to be a way for netrw to feed a password to
-scp.  Thus every transfer via scp will require re-entry of the password.
-However, |netrw-listhack| can help with this problem.
+Unfortunately there doesn't appear to be a way for netrw to feed a password
+to scp.  Thus every transfer via scp will require re-entry of the password.
 
 
 ==============================================================================
@@ -341,28 +341,21 @@ However, |netrw-listhack| can help with this problem.
 
 Network-oriented file transfers are available by default whenever
 |'nocompatible'| mode is enabled.  The <netrw.vim> file resides in your
-system's vim-plugin directory and is sourced automatically whenever you bring
-up vim.  I suggest that, at a minimum, you have at least the following in your
-<.vimrc> customization file: >
-       set nocp
-       if version >= 600
-         filetype plugin indent on
-       endif
-<
+system's vim-plugin directory and is sourced automatically whenever you
+bring up vim.
+
 
 ==============================================================================
 4. Transparent File Transfer                           *netrw-transparent*
 
 Transparent file transfers occur whenever a regular file read or write
 (invoked via an |:autocmd| for |BufReadCmd| or |BufWriteCmd| events) is made.
-Thus one may use files across networks just as simply as if they were local. >
+Thus one may use files across networks as if they were local. >
 
        vim ftp://[user@]machine/path
        ...
        :wq
 
-See |netrw-activate| for more on how to encourage your vim to use plugins
-such as netrw.
 
 ==============================================================================
 5. Ex Commands                                         *netrw-ex*
@@ -376,14 +369,15 @@ additional commands available.
 :[range]Nw {netfile} [{netfile}]...
                Write the specified lines to the {netfile}.
 
-:Nread         Read the specified lines into the current
+:Nread
+               Read the specified lines into the current
                buffer from the file specified in
                b:netrw_lastfile.
 
 :Nread {netfile} {netfile}...
                Read the {netfile} after the current line.
 
-                                                               *netrw-uidpass*
+                                                                       *netrw-uidpass*
 :call NetUserPass()
                If b:netrw_uid and b:netrw_passwd don't exist,
                this function query the user for them.
@@ -407,11 +401,10 @@ additional commands available.
 
 The script <netrw.vim> uses several variables which can affect <netrw.vim>'s
 behavior.  These variables typically may be set in the user's <.vimrc> file:
-(also see |netrw-settings|) >
-
-                        -------------
-                        Netrw Options
-                        -------------
+>
+                                -------------
+                               Netrw Options
+                                -------------
        Option                  Meaning
        --------------          -----------------------------------------------
 <
@@ -434,7 +427,7 @@ behavior.  These variables typically may be set in the user's <.vimrc> file:
        g:netrw_silent          =0 transfers done normally
                                =1 transfers done silently
         g:netrw_uid             Holds current user-id for ftp.
-                                =1 use alternate ftp         (user uid password)
+                                =1 use alternate ftp          (user uid password)
                                 (see |netrw-options|)
         g:netrw_use_nt_rcp      =0 don't use WinNT/2K/XP's rcp (default)
                                 =1 use WinNT/2K/XP's rcp, binary mode
@@ -488,12 +481,12 @@ variables listed below, and may be modified by the user.
     -------------------------------------------------------------------------
 <
                                                                *netrw-ftp*
-The first two options both help with certain ftp's that give trouble
-otherwise.  In order to best understand how to use these options if ftp is
-giving you troubles, a bit of discussion follows on how netrw does ftp reads.
+The first two options both help with certain ftp's that give trouble otherwise.
+In order to best understand how to use these options if ftp is giving you
+troubles, a bit of discussion follows on how netrw does ftp reads.
 
-The g:netrw_..._cmd variables specify the external program to use handle the
-associated protocol (rcp, ftp, etc), plus any options.
+The g:netrw_..._cmd variables specify the external program to use handle
+the associated protocol (rcp, ftp, etc), plus any options.
 
 The g:netrw_list_cmd's HOSTNAME entry will be changed via substitution with
 whatever the current request is for a hostname.
@@ -526,8 +519,8 @@ userid and password.  The transferred file is put into a temporary file.
 The temporary file is then read into the main editing session window that
 requested it and the temporary file deleted.
 
-If your ftp doesn't accept the "user" command and immediately just demands a
-userid, then try putting "let netrw_ftp=1" in your <.vimrc>.
+If your ftp doesn't accept the "user" command and immediately just demands
+userid, then try putting "let netrw_ftp=1" in your <.vimrc>.
 
                                                                *netrw-cadaver*
 To handle the SSL certificate dialog for untrusted servers, one may pull
@@ -554,12 +547,12 @@ messages) you may write a NetReadFixup(tmpfile) function:
       endif
     endfunction
 >
-The NetReadFixup() function will be called if it exists and thus allows you to
-customize your reading process.  As a further example, <netrw.vim> contains
-just such a function to handle Windows 95 ftp.  For whatever reason, Windows
-95's ftp dumps four blank lines at the end of a transfer, and so it is
-desirable to automate their removal.  Here's some code taken from <netrw.vim>
-itself:
+The NetReadFixup() function will be called if it exists and thus allows
+you to customize your reading process.  As a further example, <netrw.vim>
+contains just such a function to handle Windows 95 ftp.  For whatever
+reason, Windows 95's ftp dumps four blank lines at the end of a transfer,
+and so it is desirable to automate their removal.  Here's some code taken
+from <netrw.vim> itself:
 >
     if has("win95") && g:netrw_win95ftp
      fun! NetReadFixup(method, line1, line2)
@@ -572,7 +565,7 @@ itself:
 >
 
 ==============================================================================
-7. Directory Browsing  *netrw-browse* *netrw-dir* *netrw-list* *netrw-help*
+7. Directory Browser   *netrw-browse* *netrw-dir* *netrw-list* *netrw-help*
 
 MAPS                                                                   *netrw-maps*
      ?................Help.......................................|netrw-help|
@@ -739,7 +732,7 @@ NETRW BROWSER VARIABLES                                     *netrw-browse-var*
 INTRODUCTION TO DIRECTORY BROWSING                     *netrw-browse-intro*
 
 Netrw supports the browsing of directories on the local system and on remote
-hosts, including listing files and directories, entering directories, editing
+hosts, including generating listing directories, entering directories, editing
 files therein, deleting files/directories, making new directories, and moving
 (renaming) files and directories.  The Netrw browser generally implements the
 previous explorer maps and commands for remote directories, although details
@@ -750,15 +743,13 @@ ftp.  The protocol in the url, if it is ftp, will cause netrw to use ftp
 in its remote browsing.  Any other protocol will be used for file transfers,
 but otherwise the ssh protocol will be used to do remote directory browsing.
 
-To use Netrw's remote directory browser, simply attempt to read a "file" with a
+To enter the netrw directory browser, simply attempt to read a "file" with a
 trailing slash and it will be interpreted as a request to list a directory:
 
        vim [protocol]://[user@]hostname/path/
 
-For local directories, the trailing slash is not required.
-
-If you'd like to avoid entering the password in for remote directory listings
-with ssh or scp, see |netrw-listhack|.
+If you'd like to avoid entering the password in for directory listings, scp,
+ssh interaction, etc, see |netrw-listhack|.
 
                                *netrw-explore*  *netrw-pexplore*
                                *netrw-hexplore* *netrw-sexplore*
@@ -792,8 +783,7 @@ By default, these commands use the current file's directory.  However, one
 may explicitly provide a directory (path) to use.
 
 (Following needs v7.0 or later)                        *netrw-starstar*
-When Explore, Sexplore, Hexplore, or Vexplore are used with a **,
-such as:
+When Explore, Sexplore, Hexplore, or Vexplore are used like
 >
        :Explore **/filename_pattern
 <
@@ -807,8 +797,7 @@ The directory display is updated to show the subdirectory containing a
 matching file.  One may then proceed to the next (or previous) matching files'
 directories by using Nexplore or Pexplore, respectively.  If your console or
 gui produces recognizable shift-up or shift-down sequences, then you'll likely
-find using shift-downarrow and shift-uparrow convenient.  They're mapped by
-netrw:
+find the following mappings convenient:
 
        <s-down>  == Nexplore, and
        <s-up>    == Pexplore.
@@ -833,12 +822,11 @@ refresh a local directory by using ":e .".
 
 GOING UP                                               *netrw--*
 
-To go up a directory, press - or press the <cr> when atop the ../ directory
+To go up a directory, press - or his the <cr> when atop the ../ directory
 entry in the listing.
 
-Netrw will use the command in |g:netrw_list_cmd| to perform the directory
-listing operation after changing HOSTNAME to the host specified by the
-user-provided url.  By default netrw provides the command as:
+Netrw will modify the command in |g:netrw_list_cmd| to perform the directory
+listing operation.  By default the command is:
 
        ssh HOSTNAME ls -FLa
 
@@ -853,13 +841,7 @@ BROWSING                                                   *netrw-cr*
 Browsing is simple: move the cursor onto a file or directory of interest.
 Hitting the <cr> (the return key) will select the file or directory.
 Directories will themselves be listed, and files will be opened using the
-protocol given in the original read request.  
-
-  CAVEAT: There are three forms of listing (see |netrw-i|).  Netrw assumes
-  that two or more spaces delimit filenames and directory names for the long
-  and wide listing formats.  Thus, if your filename or directory name has two
-  or more spaces embedded in it, or any trailing spaces, then you'll need to
-  use the "thin" format to select it.
+protocol given in the original read request.
 
 
 OBTAINING A FILE                                               *netrw-O*
@@ -867,21 +849,7 @@ OBTAINING A FILE                                           *netrw-O*
 When browsing a remote directory, one may obtain a file under the cursor (ie.
 get a copy on your local machine, but not edit it) by pressing the O key.
 Only ftp and scp are supported for this operation (but since these two are
-available for browsing, that shouldn't be a problem).  The status bar
-will then show, on its right hand side, a message like "Obtaining filename".
-The statusline will be restored after the transfer is complete.
-
-Netrw can also "obtain" a file using the local browser.  Netrw's display
-of a directory is not necessarily the same as Vim's "current directory",
-unless |g:netrw_keepdir| is set to 0 in the user's <.vimrc>.  One may select
-a file using the local browser (by putting the cursor on it) and pressing
-"O" will then "obtain" the file; ie. copy it to Vim's current directory.
-
-Related topics:
- * To see what the current directory is, use |:pwd|
- * To make the currently browsed directory the current directory, see |netrw-c|
- * To automatically make the currently browsed directory the current
-   directory, see |g:netrw_keepdir|.
+available for browsing, that shouldn't be a problem).
 
 
 THIN, LONG, AND WIDE LISTINGS                                  *netrw-i*
@@ -891,27 +859,21 @@ The "i" map cycles between the thin, long, and wide listing formats.
 The short listing format gives just the files' and directories' names.
 
 The long listing is either based on the "ls" command via ssh for remote
-directories or displays the filename, file size (in bytes), and the time and
-date of last modification for local directories.  With the long listing
-format, netrw is not able to recognize filenames which have trailing spaces.
-Use the thin listing format for such files.
+directories or displays the filename, file size (in bytes), and the
+time and date of last modification for local directories.
 
-The wide listing format has a multi-column display of the various files in the
-netrw current directory, rather like the Unix "ls" presents.  In this mode the
-"b" and "B" maps are not available; instead, use Nb (|netrw-Nb|) and NB
-(|netrw-NB|).  The wide listing format uses two or more contiguous spaces to
-delineate filenames; when using that format, netrw won't be able to recognize
-or use filenames which have two or more contiguous spaces embedded in the name
-or any trailing spaces.  The thin listing format will, however, work with such
-files.
+The wide listing format has a multi-column display of the various
+files in the netrw current directory, rather like the Unix "ls" presents.
+In this mode the "b" and "B" maps are not available; instead, use
+Nb (|netrw-Nb|) and NB (|netrw-NB|).
 
 
 MAKING A NEW DIRECTORY                                         *netrw-d*
 
-With the "d" map one may make a new directory either remotely (which depends
-on the global variable g:netrw_mkdir_cmd) or locally (which depends on the
-global variable g:netrw_local_mkdir).  Netrw will issue a request for the new
-directory's name.  A bare <CR> at that point will abort the making of the
+With the "d" map one may make a new directory either remotely (which
+depends on the global variable g:netrw_mkdir_cmd) or locally (which depends on
+the global variable g:netrw_local_mkdir).  Netrw will issue a request for the
+new directory's name.  A bare <CR> at that point will abort the making of the
 directory.  Attempts to make a local directory that already exists (as either
 a file or a directory) will be detected, reported on, and ignored.
 
@@ -919,12 +881,12 @@ a file or a directory) will be detected, reported on, and ignored.
 DELETING FILES OR DIRECTORIES                  *netrw-delete* *netrw-D*
 
 Deleting/removing files and directories involves moving the cursor to the
-file/directory to be deleted and pressing "D".  Directories must be empty
-first before they can be successfully removed.  If the directory is a softlink
-to a directory, then netrw will make two requests to remove the directory
-before succeeding.  Netrw will ask for confirmation before doing the
-removal(s).  You may select a range of lines with the "V" command (visual
-selection), and then pressing "D".
+file/directory to be deleted and pressing "D".  Directories must be empty first
+before they can be successfully removed.  If the directory is a softlink to a
+directory, then netrw will make two requests to remove the directory before
+succeeding.  Netrw will ask for confirmation before doing the removal(s).
+You may select a range of lines with the "V" command (visual selection),
+and then pressing "D".
 
 The g:netrw_rm_cmd, g:netrw_rmf_cmd, and g:netrw_rmdir_cmd variables are used
 to control the attempts to remove files and directories.  The g:netrw_rm_cmd
@@ -959,19 +921,19 @@ One may rename a block of files and directories by selecting them with
 the V (|linewise-visual|).
 
 
-HIDING FILES OR DIRECTORIES                            *netrw-a*
+HIDING FILES OR DIRECTORIES                            *g:netrw-a*
 
-Netrw's browsing facility allows one to use the hiding list in one of three
-ways: ignore it, hide files which match, and show only those files which
-match.  The "a" map allows the user to cycle about these three ways.
+Netrw's browsing facility allows one to use the hiding list in one of
+three ways: ignore it, hide files which match, and show only those files
+which match.  The "a" map allows the user to cycle about these three ways.
 
-The g:netrw_list_hide variable holds a comma delimited list of patterns (ex.
-\.obj) which specify the hiding list. (also see |netrw-h|)  To set the hiding
-list, use the <c-h> map.  As an example, to hide files which begin with a ".",
-one may use the <c-h> map to set the hiding list to '^\..*' (or one may put
-let g:netrw_list_hide= '^\..*' in one's <.vimrc>).  One may then use the "a"
-key to show all files, hide matching files, or to show only the matching
-files.
+The g:netrw_list_hide variable holds a comma delimited list of patterns
+(ex. \.obj) which specify the hiding list. (also see |netrw-h|)  To
+set the hiding list, use the <c-h> map.  As an example, to hide files
+which begin with a ".", one may use the <c-h> map to set the hiding
+list to '^\..*' (or one may put  let g:netrw_list_hide= '^\..*' in
+one's <.vimrc>).  One may then use the "a" key to show all files,
+hide matching files, or to show only the matching files.
 
 
 EDIT FILE OR DIRECTORY HIDING LIST             *netrw-h* *netrw-edithide*
@@ -979,8 +941,7 @@ EDIT FILE OR DIRECTORY HIDING LIST          *netrw-h* *netrw-edithide*
 The "<ctrl-h>" map brings up a requestor allowing the user to change the
 file/directory hiding list.  The hiding list consists of one or more patterns
 delimited by commas.  Files and/or directories satisfying these patterns will
-either be hidden (ie. not shown) or be the only ones displayed (see
-|netrw-a|).
+either be hidden (ie. not shown) or be the only ones displayed (see |netrw-a|).
 
 
 BROWSING WITH A HORIZONTALLY SPLIT WINDOW              *netrw-o* *netrw-horiz*
@@ -989,9 +950,9 @@ Normally one enters a file or directory using the <cr>.  However, the "o" map
 allows one to open a new window to hold the new directory listing or file.  A
 horizontal split is used.  (for vertical splitting, see |netrw-v|)
 
-Normally, the o key splits the window horizontally with the new window and
-cursor at the top.  To change to splitting the window horizontally with the
-new window and cursor at the bottom, have
+Normally, the o key splits the window horizontally with the new window
+and cursor at the top.  To change to splitting the window horizontally
+with the new window and cursor at the bottom, have
 
        let g:netrw_alto = 1
 
@@ -1000,30 +961,30 @@ in your <.vimrc>.
 
 PREVIEW WINDOW                                 *netrw-p* *netrw-preview*
 
-One may use a preview window (currently only for local browsing) by using the
-"p" key when the cursor is atop the desired filename to be previewed.
+One may use a preview window (currently only for local browsing) by using
+the "p" key when the cursor is atop the desired filename to be previewed.
 
 
 SELECTING SORTING STYLE                                *netrw-s* *netrw-sort*
 
-One may select the sorting style by name, time, or (file) size.  The "s" map
-allows one to circulate amongst the three choices; the directory listing will
-automatically be refreshed to reflect the selected style.
+One may select the sorting style by name, time, or (file) size.  The
+"s" map allows one to circulate amongst the three choices; the directory
+listing will automatically be refreshed to reflect the selected style.
 
 
 EDITING THE SORTING SEQUENCE           *netrw-S* *netrw-sortsequence*
 
-When "Sorted by" is name, one may specify priority via the sorting sequence
-(g:netrw_sort_sequence).  The sorting sequence typically prioritizes the
-name-listing by suffix, although any pattern will do.  Patterns are delimited
-by commas.  The default sorting sequence is:
+When "Sorted by" is name, one may specify priority via the sorting
+sequence (g:netrw_sort_sequence).  The sorting sequence typically
+prioritizes the name-listing by suffix, although any pattern will do.
+Patterns are delimited by commas.  The default sorting sequence is:
 >
        [\/]$,*,\.bak$,\.o$,\.h$,\.info$,\.swp$,\.obj$
 <
-The lone * is where all filenames not covered by one of the other patterns
-will end up.  One may change the sorting sequence by modifying the
-g:netrw_sort_sequence variable (either manually or in your <.vimrc>) or by
-using the "S" map.
+The lone * is where all filenames not covered by one of the other
+patterns will end up.  One may change the sorting sequence by modifying
+the g:netrw_sort_sequence variable (either manually or in your <.vimrc>)
+or by using the "S" map.
 
 
 REVERSING SORTING ORDER                        *netrw-r* *netrw-reverse*
@@ -1050,20 +1011,20 @@ q map to list both the bookmarks and history. (see |netrw-q|)
 
 BROWSING WITH A VERTICALLY SPLIT WINDOW                                *netrw-v*
 
-Normally one enters a file or directory using the <cr>.  However, the "v" map
-allows one to open a new window to hold the new directory listing or file.  A
-vertical split is used.  (for horizontal splitting, see |netrw-o|)
+Normally one enters a file or directory using the <cr>.  However, the "v"
+map allows one to open a new window to hold the new directory listing or
+file.  A vertical split is used.  (for horizontal splitting, see |netrw-o|)
 
-Normally, the v key splits the window vertically with the new window and
-cursor at the left.  To change to splitting the window vertically with the new
-window and cursor at the right, have
+Normally, the v key splits the window vertically with the new window
+and cursor at the left.  To change to splitting the window vertically
+with the new window and cursor at the right, have
 
        let g:netrw_altv = 1
 
 in your <.vimrc>.
 
 
-CUSTOMIZING BROWSING WITH A USER FUNCTION      *netrw-x* *netrw-handler*
+CUSTOMIZING BROWSING WITH A USER FUNCTION              *netrw-x* *netrw-handler*
 
 One may "enter" a file with a special handler, thereby firing up a browser or
 other application, for example, on a file by hitting the "x" key.  The special
@@ -1075,9 +1036,9 @@ handler varies:
   * otherwise the NetrwFileHandler plugin is used.
 
 The file's suffix is used by these various approaches to determine an
-appropriate application to use to "handle" these files.  Such things as
-OpenOffice (*.sfx), visualization (*.jpg, *.gif, etc), and PostScript (*.ps,
-*.eps) can be handled.
+appropriate application to use to "handle" these files.  Such things
+as OpenOffice (*.sfx), visualization (*.jpg, *.gif, etc), and PostScript
+(*.ps, *.eps) can be handled.
 
 The NetrwFileHandler applies a user-defined function to a file, based on its
 extension.  Of course, the handler function must exist for it to be called!
@@ -1102,8 +1063,8 @@ g:netrw_keepdir to 0 (say, in your <.vimrc>) will tell netrw to have the
 currently browsed directory be the current directory.
 
 With the default setting for g:netrw_keepdir, in order to make the two
-directories the same, use the "c" map (just type c).  That map will set the
-current directory to the current browsing directory.
+directories the same, use the "c" map (just type c).  That map will set
+the current directory to the current browsing directory.
 
 
 BOOKMARKING A DIRECTORY                *netrw-b* *netrw-bookmark* *netrw-bookmarks*
@@ -1126,8 +1087,8 @@ To change directory back to a bookmarked directory, use
 
        {cnt}B
 
-Any count may be used to reference any of the bookmarks.  See |netrw-b| on
-how to bookmark a directory and |netrw-q| on how to list bookmarks.
+Any count may be used to reference any of the bookmarks.  See |netrw-b|
+for how to bookmark a directory and |netrw-q| for how to list them.
 
 When wide listing is in use (see |netrw-i|), then the B map is not available;
 instead, use {cnt}NB.
@@ -1157,9 +1118,9 @@ NETRW SETTINGS                                            *netrw-settings*
 With the NetrwSettings.vim plugin, >
        :NetrwSettings
 will bring up a window with the many variables that netrw uses for its
-settings.  You may change any of their values; when you save the file, the
-settings therein will be used.  One may also press "?" on any of the lines for
-help on what each of the variables do.
+settings.  You may change any of their values; when you save the file,
+the settings therein will be used.  One may also press "?" on any of
+the lines for help on what each of the variables do.
 
 
 ==============================================================================
@@ -1240,10 +1201,10 @@ which is loaded automatically at startup (assuming :set nocp).
 
        1. Get the <Decho.vim> script, available as:
 
-            http://mysite.verizon.net/astronaut/vim/index.html#vimlinks_scripts
-            as "Decho, a vimL debugging aid"
+               http://mysite.verizon.net/astronaut/vim/index.html#vimlinks_scripts
+               as "Decho, a vimL debugging aid"
           or
-            http://vim.sourceforge.net/scripts/script.php?script_id=120
+               http://vim.sourceforge.net/scripts/script.php?script_id=120
 
           and put it into your local plugin directory.
 
@@ -1279,14 +1240,6 @@ which is loaded automatically at startup (assuming :set nocp).
 ==============================================================================
 10. History                                            *netrw-history*
 
-       v70: * when using |netrw-O|, the "Obtaining filename" message is now
-              shown using |hl-User9|.  If User9 has not been defined, netrw
-              will define it.
-       v69: * Bugfix: win95/98 machines were experiencing a
-              "E121: Undefined variable: g:netrw_win95ftp" message
-       v68: * double-click-leftmouse selects word under mouse
-       v67: * Passwords which contain blanks will now be surrounded by
-              double-quotes automatically (Yongwei)
        v66: * Netrw now seems to work with a few more Windows situations
             * O now obtains a file: remote browsing file -> local copy,
               locally browsing file -> current directory (see :pwd)
@@ -1443,7 +1396,7 @@ which is loaded automatically at startup (assuming :set nocp).
        Vim editor      by Bram Moolenaar (Thanks, Bram!)
        dav             support by C Campbell
        fetch           support by Bram Moolenaar and C Campbell
-       ftp             support by C Campbell <NdrOchip@ScampbellPfamily.AbizM>
+       ftp             support by C Campbell <NdrOchip@ScampbellPfamily.AbizM> - NOSPAM
        http            support by Bram Moolenaar <bram@moolenaar.net>
        rcp
        rsync           support by C Campbell (suggested by Erik Warendorph)
@@ -1453,13 +1406,11 @@ which is loaded automatically at startup (assuming :set nocp).
        inputsecret(), BufReadCmd, BufWriteCmd contributed by C Campbell
 
        Jérôme Augé          -- also using new buffer method with ftp+.netrc
-       Bram Moolenaar          -- obviously vim itself, :e and v:cmdarg use,
-                                  fetch,...
+       Bram Moolenaar          -- obviously vim itself, :e and v:cmdarg use, fetch,...
        Yasuhiro Matsumoto      -- pointing out undo+0r problem and a solution
        Erik Warendorph         -- for several suggestions (g:netrw_..._cmd
                                   variables, rsync etc)
-       Doug Claar              -- modifications to test for success with ftp
-                                  operation
+       Doug Claar              -- modifications to test for success with ftp operation
 
 ==============================================================================
  vim:tw=78:ts=8:ft=help:norl:fdm=marker
index d2fa97629b1646fdb17b7f227e9bcb377301677c..023476a91088b5d1ad490dea15a43900511917c0 100644 (file)
@@ -1,4 +1,4 @@
-*spell.txt*    For Vim version 7.0aa.  Last change: 2005 Sep 12
+*spell.txt*    For Vim version 7.0aa.  Last change: 2005 Sep 25
 
 
                  VIM REFERENCE MANUAL    by Bram Moolenaar
@@ -1124,6 +1124,10 @@ Don't include simple one-character replacements or swaps.  Vim will try these
 anyway.  You can include whole words if you want to, but you might want to use
 the "file:" item in 'spellsuggest' instead.
 
+You can include a space by using an underscore:
+
+       REP the_the the ~
+
 
 SIMILAR CHARACTERS                                     *spell-MAP*
 
index cc4d2a8a73c2f37d7691dbdf72a46924df43c08e..36d9b2271c5ae711422ae827d0f37ff7245285c3 100644 (file)
@@ -4973,6 +4973,7 @@ ft-chill-syntax   syntax.txt      /*ft-chill-syntax*
 ft-cobol-syntax        syntax.txt      /*ft-cobol-syntax*
 ft-coldfusion-syntax   syntax.txt      /*ft-coldfusion-syntax*
 ft-csh-syntax  syntax.txt      /*ft-csh-syntax*
+ft-css-omni    insert.txt      /*ft-css-omni*
 ft-cweb-syntax syntax.txt      /*ft-cweb-syntax*
 ft-cynlib-syntax       syntax.txt      /*ft-cynlib-syntax*
 ft-desktop-syntax      syntax.txt      /*ft-desktop-syntax*
@@ -5082,6 +5083,7 @@ g'a       motion.txt      /*g'a*
 g,     motion.txt      /*g,*
 g0     motion.txt      /*g0*
 g8     various.txt     /*g8*
+g:netrw-a      pi_netrw.txt    /*g:netrw-a*
 g:netrw_alto   pi_netrw.txt    /*g:netrw_alto*
 g:netrw_altv   pi_netrw.txt    /*g:netrw_altv*
 g:netrw_cygwin pi_netrw.txt    /*g:netrw_cygwin*
@@ -5705,7 +5707,7 @@ map-self-destroy  tips.txt        /*map-self-destroy*
 map-typing     map.txt /*map-typing*
 map-which-keys map.txt /*map-which-keys*
 map.txt        map.txt /*map.txt*
-map_CTRL_C     map.txt /*map_CTRL_C*
+map_CTRL-C     map.txt /*map_CTRL-C*
 map_backslash  map.txt /*map_backslash*
 map_bar        map.txt /*map_bar*
 map_empty_rhs  map.txt /*map_empty_rhs*
@@ -5747,6 +5749,7 @@ menu-priority     gui.txt /*menu-priority*
 menu-separator gui.txt /*menu-separator*
 menu.vim       gui.txt /*menu.vim*
 menus  gui.txt /*menus*
+merge  diff.txt        /*merge*
 message-history        message.txt     /*message-history*
 message.txt    message.txt     /*message.txt*
 messages       message.txt     /*messages*
@@ -5853,7 +5856,6 @@ netrw-O   pi_netrw.txt    /*netrw-O*
 netrw-R        pi_netrw.txt    /*netrw-R*
 netrw-S        pi_netrw.txt    /*netrw-S*
 netrw-U        pi_netrw.txt    /*netrw-U*
-netrw-a        pi_netrw.txt    /*netrw-a*
 netrw-activate pi_netrw.txt    /*netrw-activate*
 netrw-b        pi_netrw.txt    /*netrw-b*
 netrw-bookmark pi_netrw.txt    /*netrw-bookmark*
@@ -7322,13 +7324,6 @@ zf       fold.txt        /*zf*
 zg     spell.txt       /*zg*
 zh     scroll.txt      /*zh*
 zi     fold.txt        /*zi*
-zip    zip.txt /*zip*
-zip-contents   zip.txt /*zip-contents*
-zip-copyright  zip.txt /*zip-copyright*
-zip-history    zip.txt /*zip-history*
-zip-manual     zip.txt /*zip-manual*
-zip-usage      zip.txt /*zip-usage*
-zip.txt        zip.txt /*zip.txt*
 zj     fold.txt        /*zj*
 zk     fold.txt        /*zk*
 zl     scroll.txt      /*zl*
index a09f895487bc653024a73456dbee4ad0e4a785ba..af6465fd85a86aebc4690d52d323a386cb005031 100644 (file)
@@ -1,7 +1,7 @@
 " Vim support file to detect file types
 "
 " Maintainer:  Bram Moolenaar <Bram@vim.org>
-" Last Change: 2005 Sep 19
+" Last Change: 2005 Sep 25
 
 " Listen very carefully, I will say this only once
 if exists("did_load_filetypes")
@@ -16,7 +16,7 @@ set cpo&vim
 augroup filetypedetect
 
 " Ignored extensions
-au BufNewFile,BufRead *.orig,*.bak,*.old,*.new,*.rpmsave,*.rpmnew
+au BufNewFile,BufRead ?\+.orig,?\+.bak,?\+.old,?\+.new,?\+.rpmsave,?\+.rpmnew
        \ exe "doau filetypedetect BufRead " . expand("<afile>:r")
 au BufNewFile,BufRead *~
        \ let s:name = expand("<afile>") |
@@ -26,7 +26,7 @@ au BufNewFile,BufRead *~
        \ endif |
        \ unlet s:name |
        \ unlet s:short
-au BufNewFile,BufRead *.in
+au BufNewFile,BufRead ?\+.in
        \ if expand("<afile>:t") != "configure.in" |
        \   exe "doau filetypedetect BufRead " . expand("<afile>:r") |
        \ endif
diff --git a/runtime/indent/eruby.vim b/runtime/indent/eruby.vim
new file mode 100644 (file)
index 0000000..664f9c2
--- /dev/null
@@ -0,0 +1,20 @@
+" Vim indent file
+" Language:     Ruby
+" Maintainer:  Doug Kearns <djkea2 at gus.gscit.monash.edu.au>
+" 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.
+" ----------------------------------------------------------------------------
+
+" Only load this indent file when no other was loaded.
+if exists("b:did_indent")
+  finish
+endif
+
+runtime! indent/html.vim
index 3e7a990239fdf712eb232d1e5a3356ef856e6423..22210cee7a1938bc4b837ce8b37ec7fcc558d6ca 100644 (file)
@@ -2,30 +2,27 @@
 " Language:    PHP
 " Author:      John Wellesz <John.wellesz (AT) teaser (DOT) fr>
 " URL:         http://www.2072productions.com/vim/indent/php.vim
-" Last Change: 2005 Aug 15
-" Version: 1.17
+" Last Change: 2005 September 22th
+" Version: 1.181
 "
-" For a complete change log and lots of comments in the code, download the script on
-" 2072productions.com at the URI provided above.
-" 
+" The change log and all the comments have been removed from this file.
 "
-" 
-"  If you find a bug, please e-mail me at John.wellesz (AT) teaser (DOT) fr
-"  with an example of code that break the algorithm.
+" For a complete change log and fully commented code, download the script on
+" 2072productions.com at the URI provided above.
 "
 "
-"      Thanks a lot for using this script.
+"  If you find a bug, please e-mail me at John.wellesz (AT) teaser (DOT) fr
+"  with an example of code that breaks the algorithm.
 "
 "
 " NOTE: This script must be used with PHP syntax ON and with the php syntax
-"              script by Lutz Eymers (http://www.isp.de/data/php.vim ) that's the script bundled with Gvim.
+"      script by Lutz Eymers (http://www.isp.de/data/php.vim ) that's the script bundled with Gvim.
 "
 "
 "      In the case you have syntax errors in your script such as end of HereDoc
 "      tags not at col 1 you'll have to indent your file 2 times (This script 
 "      will automatically put HereDoc end tags at col 1).
 " 
-"
 " NOTE: If you are editing file in Unix file format and that (by accident)
 " there are '\r' before new lines, this script won't be able to proceed
 " correctly and will make many mistakes because it won't be able to match
 " silently remove them when VIM load this script (at each bufread).
 
 " Options: PHP_default_indenting = # of sw (default is 0), # of sw will be
-"                 added to the indent of each line of PHP code.
+"         added to the indent of each line of PHP code.
 "
 " Options: PHP_removeCRwhenUnix = 1 to make the script automatically remove CR
-"                 at end of lines (by default this option is unset), NOTE that you
-"                 MUST remove CR when the fileformat is UNIX else the indentation
-"                 won't be correct...
+"         at end of lines (by default this option is unset), NOTE that you
+"         MUST remove CR when the fileformat is UNIX else the indentation
+"         won't be correct...
 "
 " Options: PHP_BracesAtCodeLevel = 1 to indent the '{' and '}' at the same
-"                 level than the code they contain.
-"                 Exemple:
-"                      Instead of:
-"                              if ($foo)
+"         level than the code they contain.
+"         Exemple:
+"              Instead of:
+"                      if ($foo)
+"                      {
+"                              foo();
+"                      }
+"
+"              You will write:
+"                      if ($foo)
 "                              {
-"                                      foo();
+"                              foo();
 "                              }
 "
-"                      You will write:
-"                              if ($foo)
-"                                      {
-"                                      foo();
-"                                      }
-"
-"                      NOTE: The script will be a bit slower if you use this option because
-"                      some optimizations won't be available.
+"              NOTE: The script will be a bit slower if you use this option because
+"              some optimizations won't be available.
 
 
 if exists("b:did_indent")
-       finish
+    finish
 endif
 let b:did_indent = 1
 
-"      This script set the option php_sync_method of PHP syntax script to 0
-"      (fromstart indenting method) in order to have an accurate syntax.
-"      If you are using very big PHP files (which is a bad idea) you will
-"      experience slowings down while editing, if your code contains only PHP
-"      code you can comment the line below.
 
 let php_sync_method = 0
 
 
 if exists("PHP_default_indenting")
-       let b:PHP_default_indenting = PHP_default_indenting * &sw
+    let b:PHP_default_indenting = PHP_default_indenting * &sw
 else
-       let b:PHP_default_indenting = 0
+    let b:PHP_default_indenting = 0
 endif
 
 if exists("PHP_BracesAtCodeLevel")
-       let b:PHP_BracesAtCodeLevel = PHP_BracesAtCodeLevel
+    let b:PHP_BracesAtCodeLevel = PHP_BracesAtCodeLevel
 else
-       let b:PHP_BracesAtCodeLevel = 0
+    let b:PHP_BracesAtCodeLevel = 0
 endif
 
 
@@ -108,24 +100,21 @@ let b:optionsset = 0
 setlocal nosmartindent
 setlocal noautoindent 
 setlocal nocindent
-setlocal nolisp " autoindent must be on, so this line is also useless...
+setlocal nolisp
 
 setlocal indentexpr=GetPhpIndent()
 setlocal indentkeys=0{,0},0),:,!^F,o,O,e,*<Return>,=?>,=<?,=*/
 
 
-if version <= 603 && &encoding == 'utf-8'
-       let s:searchpairflags = 'bW'
-else
-       let s:searchpairflags = 'bWr'
-endif
+
+let s:searchpairflags = 'bWr'
 
 if &fileformat == "unix" && exists("PHP_removeCRwhenUnix") && PHP_removeCRwhenUnix
-       silent! %s/\r$//g
+    silent! %s/\r$//g
 endif
 
 if exists("*GetPhpIndent")
-       finish " XXX
+    finish " XXX
 endif
 
 let s:endline= '\s*\%(//.*\|#.*\|/\*.*\*/\s*\)\=$'
@@ -134,537 +123,544 @@ let s:PHP_startindenttag = '<?\%(.*?>\)\@!\|<script[^>]*>\%(.*<\/script>\)\@!'
 
 
 function! GetLastRealCodeLNum(startline) " {{{
-       "Inspired from the function SkipJavaBlanksAndComments by Toby Allsopp for indent/java.vim 
-       let lnum = a:startline
-       let old_lnum = lnum
-
-       while lnum > 1
-               let lnum = prevnonblank(lnum)
+    let lnum = a:startline
+    let old_lnum = lnum
+
+    while lnum > 1
+       let lnum = prevnonblank(lnum)
+       let lastline = getline(lnum)
+
+       if b:InPHPcode_and_script && lastline =~ '?>\s*$'
+           let lnum = lnum - 1
+       elseif lastline =~ '^\s*?>.*<?\%(php\)\=\s*$'
+           let lnum = lnum - 1
+       elseif lastline =~ '^\s*\%(//\|#\|/\*.*\*/\s*$\)'
+           let lnum = lnum - 1
+       elseif lastline =~ '\*/\s*$'
+           call cursor(lnum, 1)
+           if lastline !~ '^\*/'
+               call search('\*/', 'W')
+           endif
+           let lnum = searchpair('/\*', '', '\*/', s:searchpairflags)
+
+           let lastline = getline(lnum)
+           if lastline =~ '^\s*/\*'
+               let lnum = lnum - 1
+           else
+               break
+           endif
+
+
+       elseif lastline =~? '\%(//\s*\|?>.*\)\@<!<?\%(php\)\=\s*$\|^\s*<script\>'
+
+           while lastline !~ '\(<?.*\)\@<!?>' && lnum > 1
+               let lnum = lnum - 1
                let lastline = getline(lnum)
+           endwhile
+           if lastline =~ '^\s*?>'
+               let lnum = lnum - 1
+           else
+               break
+           endif
+
+
+       elseif lastline =~? '^\a\w*;$' && lastline !~? s:notPhpHereDoc
+           let tofind=substitute( lastline, '\([^;]\+\);', '<<<\1$', '')
+           while getline(lnum) !~? tofind && lnum > 1
+               let lnum = lnum - 1
+           endwhile
+       else
+           break 
+       endif
+    endwhile
 
-               if b:InPHPcode_and_script && lastline =~ '?>\s*$'
-                       let lnum = lnum - 1
-               elseif lastline =~ '^\s*?>.*<?\%(php\)\=\s*$'
-                       let lnum = lnum - 1
-               elseif lastline =~ '^\s*\%(//\|#\|/\*.*\*/\s*$\)' " if line is under comment
-                       let lnum = lnum - 1
-               elseif lastline =~ '\*/\s*$' " skip multiline comments
-                       call cursor(lnum, 1)
-                       call search('\*/\zs', 'W') " positition the cursor after the first */
-                       let lnum = searchpair('/\*', '', '\*/\zs', s:searchpairflags) " find the most outside /*
-
-                       let lastline = getline(lnum)
-                       if lastline =~ '^\s*/\*' " if line contains nothing but comment
-                               let lnum = lnum - 1 " do the job again on the line before (a comment can hide another...)
-                       else
-                               break
-                       endif
-
-                       
-               elseif lastline =~? '\%(//\s*\|?>.*\)\@<!<?\%(php\)\=\s*$\|^\s*<script\>' " skip non php code
-
-                       while lastline !~ '\(<?.*\)\@<!?>' && lnum > 1
-                               let lnum = lnum - 1
-                               let lastline = getline(lnum)
-                       endwhile
-                       if lastline =~ '^\s*?>' " if line contains nothing but end tag 
-                               let lnum = lnum - 1
-                       else
-                               break " else there is something important before the ?>
-                       endif
-
-
-               elseif lastline =~? '^\a\w*;$' && lastline !~? s:notPhpHereDoc " match the end of a heredoc
-                       let tofind=substitute( lastline, '\([^;]\+\);', '<<<\1$', '')
-                       while getline(lnum) !~? tofind && lnum > 1
-                               let lnum = lnum - 1
-                       endwhile
-               else
-                       break " if none of these were true then we are done
-               endif
-       endwhile
+    if lnum==1 && getline(lnum)!~ '<?'
+       let lnum=0
+    endif
 
-       if lnum==1 && getline(lnum)!~ '<?'
-               let lnum=0
-       endif
-       
-       if b:InPHPcode_and_script && !b:InPHPcode
-               let b:InPHPcode_and_script = 0
-       endif
-       return lnum
-endfunction
-" }}}
+    if b:InPHPcode_and_script && !b:InPHPcode
+       let b:InPHPcode_and_script = 0
+    endif
+    return lnum
+endfunction " }}}
 
 function! Skippmatch()  " {{{
-       let synname = synIDattr(synID(line("."), col("."), 0), "name")
-       if synname == "Delimiter" || synname == "phpParent" || synname == "javaScriptBraces" || synname == "phpComment" && b:UserIsTypingComment
-               return 0
-       else
-               return 1
-       endif
-endfun
-" }}}
+    let synname = synIDattr(synID(line("."), col("."), 0), "name")
+    if synname == "Delimiter" || synname == "phpParent" || synname == "javaScriptBraces" || synname == "phpComment" && b:UserIsTypingComment
+       return 0
+    else
+       return 1
+    endif
+endfun " }}}
 
 function! FindOpenBracket(lnum) " {{{
-       call cursor(a:lnum, 1) " set the cursor to the start of the lnum line
-       return searchpair('{', '', '}', 'bW', 'Skippmatch()')
-endfun
-" }}}
+    call cursor(a:lnum, 1)
+    return searchpair('{', '', '}', 'bW', 'Skippmatch()')
+endfun " }}}
 
 function! FindTheIfOfAnElse (lnum, StopAfterFirstPrevElse) " {{{
-" A very clever recoursive function created by me (John Wellesz) that find the "if" corresponding to an
-" "else". This function can easily be adapted for other languages :)
-       
-       if getline(a:lnum) =~# '^\s*}\s*else\%(if\)\=\>'
-               let beforeelse = a:lnum " we do this so we can find the opened bracket to speed up the process
-       else
-               let beforeelse = GetLastRealCodeLNum(a:lnum - 1)
-       endif
 
-       if !s:level
-               let s:iftoskip = 0
-       endif
+    if getline(a:lnum) =~# '^\s*}\s*else\%(if\)\=\>'
+       let beforeelse = a:lnum
+    else
+       let beforeelse = GetLastRealCodeLNum(a:lnum - 1)
+    endif
 
-       if getline(beforeelse) =~# '^\s*\%(}\s*\)\=else\%(\s*if\)\@!\>'
-               let s:iftoskip = s:iftoskip + 1
-       endif
-       
-       if getline(beforeelse) =~ '^\s*}'
-               let beforeelse = FindOpenBracket(beforeelse)
+    if !s:level
+       let s:iftoskip = 0
+    endif
 
-               if getline(beforeelse) =~ '^\s*{'
-                       let beforeelse = GetLastRealCodeLNum(beforeelse - 1)
-               endif
-       endif
+    if getline(beforeelse) =~# '^\s*\%(}\s*\)\=else\%(\s*if\)\@!\>'
+       let s:iftoskip = s:iftoskip + 1
+    endif
 
+    if getline(beforeelse) =~ '^\s*}'
+       let beforeelse = FindOpenBracket(beforeelse)
 
-       if !s:iftoskip && a:StopAfterFirstPrevElse && getline(beforeelse) =~# '^\s*\%([}]\s*\)\=else\%(if\)\=\>'
-               return beforeelse
+       if getline(beforeelse) =~ '^\s*{'
+           let beforeelse = GetLastRealCodeLNum(beforeelse - 1)
        endif
+    endif
 
-       if getline(beforeelse) !~# '^\s*if\>' && beforeelse>1 || s:iftoskip && beforeelse>1
-               
-               if  s:iftoskip && getline(beforeelse) =~# '^\s*if\>'
-                       let s:iftoskip = s:iftoskip - 1
-               endif
 
-               let s:level =  s:level + 1
-               let beforeelse = FindTheIfOfAnElse(beforeelse, a:StopAfterFirstPrevElse)
+    if !s:iftoskip && a:StopAfterFirstPrevElse && getline(beforeelse) =~# '^\s*\%([}]\s*\)\=else\%(if\)\=\>'
+       return beforeelse
+    endif
+
+    if getline(beforeelse) !~# '^\s*if\>' && beforeelse>1 || s:iftoskip && beforeelse>1
+
+       if  s:iftoskip && getline(beforeelse) =~# '^\s*if\>'
+           let s:iftoskip = s:iftoskip - 1
        endif
 
-       return beforeelse
+       let s:level =  s:level + 1
+       let beforeelse = FindTheIfOfAnElse(beforeelse, a:StopAfterFirstPrevElse)
+    endif
 
-endfunction
-" }}}
+    return beforeelse
+
+endfunction " }}}
 
 function! IslinePHP (lnum, tofind) " {{{
-       let cline = getline(a:lnum)
+    let cline = getline(a:lnum)
 
-       if a:tofind==""
-               let tofind = "^\\s*[\"']*\s*\\zs\\S" " This correct the issue where lines beginning by a 
-               " single or double quote were not indented in some cases.
-       else
-               let tofind = a:tofind
-       endif
+    if a:tofind==""
+       let tofind = "^\\s*[\"']*\s*\\zs\\S"
+    else
+       let tofind = a:tofind
+    endif
 
-       let tofind = tofind . '\c' " ignorecase
+    let tofind = tofind . '\c'
 
-       let coltotest = match (cline, tofind) + 1 "find the first non blank char in the current line
-       
-       let synname = synIDattr(synID(a:lnum, coltotest, 0), "name") " ask to syntax what is its name
+    let coltotest = match (cline, tofind) + 1
 
-       if synname =~ '^php' || synname=="Delimiter" || synname =~? '^javaScript'
-               return synname
-       else
-               return ""
-       endif
-endfunction
-" }}}
+    let synname = synIDattr(synID(a:lnum, coltotest, 0), "name")
+
+    if synname =~ '^php' || synname=="Delimiter" || synname =~? '^javaScript'
+       return synname
+    else
+       return ""
+    endif
+endfunction " }}}
 
 let s:notPhpHereDoc = '\%(break\|return\|continue\|exit\);'
-let s:blockstart = '\%(\%(\%(}\s*\)\=else\%(\s\+\)\=\)\=if\>\|while\>\|switch\>\|for\%(each\)\=\>\|declare\>\|[|&]\)'
+let s:blockstart = '\%(\%(\%(}\s*\)\=else\%(\s\+\)\=\)\=if\>\|else\>\|while\>\|switch\>\|for\%(each\)\=\>\|declare\>\|class\>\|[|&]\)'
 
 let s:autorestoptions = 0
 if ! s:autorestoptions
-       au BufWinEnter,Syntax   *.php,*.php3,*.php4,*.php5      call ResetOptions()
-       let s:autorestoptions = 1
+    au BufWinEnter,Syntax *.php,*.php3,*.php4,*.php5 call ResetOptions()
+    let s:autorestoptions = 1
 endif
 
 function! ResetOptions()
-       if ! b:optionsset
-               setlocal formatoptions=qroc
-               let b:optionsset = 1
-       endif
+    if ! b:optionsset
+       setlocal formatoptions=qroc
+       let b:optionsset = 1
+    endif
 endfunc
 
 function! GetPhpIndent()
-       "##############################################
-       "########### MAIN INDENT FUNCTION #############
-       "##############################################
-
-       let UserIsEditing=0
-       if      b:PHP_oldchangetick != b:changedtick
-               let b:PHP_oldchangetick = b:changedtick
-               let UserIsEditing=1
-       endif
-
-       if b:PHP_default_indenting
-               let b:PHP_default_indenting = g:PHP_default_indenting * &sw
-       endif
 
-       let cline = getline(v:lnum) " current line
+    let UserIsEditing=0
+    if b:PHP_oldchangetick != b:changedtick
+       let b:PHP_oldchangetick = b:changedtick
+       let UserIsEditing=1
+    endif
 
-       if !b:PHP_indentinghuge && b:PHP_lastindented > b:PHP_indentbeforelast 
-               if b:PHP_indentbeforelast
-                       let b:PHP_indentinghuge = 1
-                       echom 'Large indenting detected, speed optimizations engaged'
-               endif
-               let b:PHP_indentbeforelast = b:PHP_lastindented
-       endif
+    if b:PHP_default_indenting
+       let b:PHP_default_indenting = g:PHP_default_indenting * &sw
+    endif
 
-       if b:InPHPcode_checked && prevnonblank(v:lnum - 1) != b:PHP_lastindented
-               if b:PHP_indentinghuge
-                       echom 'Large indenting deactivated'
-                       let b:PHP_indentinghuge = 0
-                       let b:PHP_CurrentIndentLevel = b:PHP_default_indenting
-               endif
-               let b:PHP_lastindented = v:lnum
-               let b:PHP_LastIndentedWasComment=0
-               let b:PHP_InsideMultilineComment=0
-               let b:PHP_indentbeforelast = 0
-               
-               let b:InPHPcode = 0
-               let b:InPHPcode_checked = 0
-               let b:InPHPcode_and_script = 0
-               let b:InPHPcode_tofind = ""
+    let cline = getline(v:lnum)
 
-       elseif v:lnum > b:PHP_lastindented " we are indenting line in > order (we can rely on the line before)
-               let real_PHP_lastindented = b:PHP_lastindented
-               let b:PHP_lastindented = v:lnum
+    if !b:PHP_indentinghuge && b:PHP_lastindented > b:PHP_indentbeforelast 
+       if b:PHP_indentbeforelast
+           let b:PHP_indentinghuge = 1
+           echom 'Large indenting detected, speed optimizations engaged'
        endif
+       let b:PHP_indentbeforelast = b:PHP_lastindented
+    endif
 
+    if b:InPHPcode_checked && prevnonblank(v:lnum - 1) != b:PHP_lastindented
+       if b:PHP_indentinghuge
+           echom 'Large indenting deactivated'
+           let b:PHP_indentinghuge = 0
+           let b:PHP_CurrentIndentLevel = b:PHP_default_indenting
+       endif
+       let b:PHP_lastindented = v:lnum
+       let b:PHP_LastIndentedWasComment=0
+       let b:PHP_InsideMultilineComment=0
+       let b:PHP_indentbeforelast = 0
 
-       if !b:InPHPcode_checked " {{{ One time check
-               let b:InPHPcode_checked = 1
-
-               let synname = IslinePHP (prevnonblank(v:lnum), "") " the line could be blank (if the user presses 'return')
+       let b:InPHPcode = 0
+       let b:InPHPcode_checked = 0
+       let b:InPHPcode_and_script = 0
+       let b:InPHPcode_tofind = ""
 
-               if synname!=""
-                       if synname != "phpHereDoc"
-                               let b:InPHPcode = 1
-                               let b:InPHPcode_tofind = ""
+    elseif v:lnum > b:PHP_lastindented
+       let real_PHP_lastindented = b:PHP_lastindented
+       let b:PHP_lastindented = v:lnum
+    endif
 
-                               if synname == "phpComment"
-                                       let b:UserIsTypingComment = 1
-                               else
-                                       let b:UserIsTypingComment = 0
-                               endif
 
-                               if synname =~? '^javaScript'
-                                       let b:InPHPcode_and_script = 1
-                               endif
+    if !b:InPHPcode_checked " {{{ One time check
+       let b:InPHPcode_checked = 1
 
-                       else
-                               let b:InPHPcode = 0
-                               let b:UserIsTypingComment = 0
+       let synname = IslinePHP (prevnonblank(v:lnum), "")
 
-                               let lnum = v:lnum - 1
-                               while getline(lnum) !~? '<<<\a\w*$' && lnum > 1
-                                       let lnum = lnum - 1
-                               endwhile
+       if synname!=""
+           if synname != "phpHereDoc"
+               let b:InPHPcode = 1
+               let b:InPHPcode_tofind = ""
 
-                               let b:InPHPcode_tofind = substitute( getline(lnum), '^.*<<<\(\a\w*\)\c', '^\\s*\1;$', '')
-                       endif
-               else " IslinePHP returned "" => we are not in PHP or Javascript
-                       let b:InPHPcode = 0
-                       let b:UserIsTypingComment = 0
-                       " Then we have to find a php start tag...
-                       let b:InPHPcode_tofind = '<?\%(.*?>\)\@!\|<script.*>'
+               if synname == "phpComment"
+                   let b:UserIsTypingComment = 1
+               else
+                   let b:UserIsTypingComment = 0
                endif
-       endif "!b:InPHPcode_checked }}}
-
-
-       let lnum = prevnonblank(v:lnum - 1)
-       let last_line = getline(lnum)
-
-       if b:InPHPcode_tofind!=""
-               if cline =~? b:InPHPcode_tofind
-                       let     b:InPHPcode = 1
-                       let b:InPHPcode_tofind = ""
-                       let b:UserIsTypingComment = 0
-                       if cline =~ '\*/' " End comment tags must be indented like start comment tags
-                               call cursor(v:lnum, 1)
-                               call search('\*/\zs', 'W')
-                               let lnum = searchpair('/\*', '', '\*/\zs', s:searchpairflags) " find the most outside /*
-
-                               let b:PHP_CurrentIndentLevel = b:PHP_default_indenting
-                               let b:PHP_LastIndentedWasComment = 0 " prevent a problem if multiline /**/ comment are surounded by
-                                                                                                        " other types of comments
-                               
-                               if cline =~ '^\s*\*/'
-                                       return indent(lnum) + 1
-                               else
-                                       return indent(lnum)
-                               endif
-
-                       elseif cline =~? '<script\>' " a more accurate test is useless since there isn't any other possibility
-                               let b:InPHPcode_and_script = 1
-                       endif
+
+               if synname =~? '^javaScript'
+                   let b:InPHPcode_and_script = 1
                endif
-       endif
 
+           else
+               let b:InPHPcode = 0
+               let b:UserIsTypingComment = 0
 
-       if b:InPHPcode
+               let lnum = v:lnum - 1
+               while getline(lnum) !~? '<<<\a\w*$' && lnum > 1
+                   let lnum = lnum - 1
+               endwhile
 
-               if !b:InPHPcode_and_script && last_line =~ '\%(<?.*\)\@<!?>\%(.*<?\)\@!' && IslinePHP(lnum, '?>')=="Delimiter"
-                       if cline !~? s:PHP_startindenttag
-                               let b:InPHPcode = 0
-                               let b:InPHPcode_tofind = s:PHP_startindenttag
-                       elseif cline =~? '<script\>'
-                               let b:InPHPcode_and_script = 1
-                       endif
+               let b:InPHPcode_tofind = substitute( getline(lnum), '^.*<<<\(\a\w*\)\c', '^\\s*\1;$', '')
+           endif
+       else
+           let b:InPHPcode = 0
+           let b:UserIsTypingComment = 0
+           let b:InPHPcode_tofind = '<?\%(.*?>\)\@!\|<script.*>'
+       endif
+    endif "!b:InPHPcode_checked }}}
 
-               elseif last_line =~? '<<<\a\w*$' 
-                       let b:InPHPcode = 0
-                       let b:InPHPcode_tofind = substitute( last_line, '^.*<<<\(\a\w*\)\c', '^\\s*\1;$', '')
 
-               elseif !UserIsEditing && cline =~ '^\s*/\*\%(.*\*/\)\@!' && getline(v:lnum + 1) !~ '^\s*\*' " XXX indent comments
-                       let b:InPHPcode = 0
-                       let b:InPHPcode_tofind = '\*/'
+    " Test if we are indenting PHP code {{{
+    let lnum = prevnonblank(v:lnum - 1)
+    let last_line = getline(lnum)
 
-               elseif cline =~? '^\s*</script>'
-                       let b:InPHPcode = 0
-                       let b:InPHPcode_tofind = s:PHP_startindenttag
+    if b:InPHPcode_tofind!=""
+       if cline =~? b:InPHPcode_tofind
+           let b:InPHPcode = 1
+           let b:InPHPcode_tofind = ""
+           let b:UserIsTypingComment = 0
+           if cline =~ '\*/'
+               call cursor(v:lnum, 1)
+               if cline !~ '^\*/'
+                   call search('\*/', 'W')
                endif
-       endif " }}}
-
-       if !b:InPHPcode && !b:InPHPcode_and_script
-               return -1
-       endif
+               let lnum = searchpair('/\*', '', '\*/', s:searchpairflags)
 
+               let b:PHP_CurrentIndentLevel = b:PHP_default_indenting
 
-       " Indent successive // or # comment the same way the first is {{{
-       if cline =~ '^\s*\%(//\|#\|/\*.*\*/\s*$\)'
-               if b:PHP_LastIndentedWasComment == 1
-                       return indent(real_PHP_lastindented) " line replaced in 1.02
-               endif
-               let b:PHP_LastIndentedWasComment = 1
-       else
                let b:PHP_LastIndentedWasComment = 0
-       endif
-       " }}}
-       
-       " Indent multiline /* comments correctly {{{
-       
-
-       if b:PHP_InsideMultilineComment || b:UserIsTypingComment
-               if cline =~ '^\s*\*\%(\/\)\@!'   " if cline == '*'
-                       if last_line =~ '^\s*/\*' " if last_line == '/*'
-                               return indent(lnum) + 1
-                       else
-                               return indent(lnum)
-                       endif
+
+               if cline =~ '^\s*\*/'
+                   return indent(lnum) + 1
                else
-                       let b:PHP_InsideMultilineComment = 0
+                   return indent(lnum)
                endif
-       endif
-       
-       if !b:PHP_InsideMultilineComment && cline =~ '^\s*/\*' " if cline == '/*'
-               let b:PHP_InsideMultilineComment = 1
-               return -1
-       endif
-       " }}}
 
-       if cline =~# '^\s*<?' && cline !~ '?>' " Added the ^\s* part in version 1.03
-               return 0
+           elseif cline =~? '<script\>'
+               let b:InPHPcode_and_script = 1
+           endif
        endif
+    endif
 
-       if  cline =~ '^\s*?>' && cline !~# '<?'  
-               return 0
-       endif
+    if b:InPHPcode
 
-       if cline =~? '^\s*\a\w*;$' && cline !~? s:notPhpHereDoc
-               return 0
-       endif
-       " }}}
+       if !b:InPHPcode_and_script && last_line =~ '\%(<?.*\)\@<!?>\%(.*<?\)\@!' && IslinePHP(lnum, '?>')=="Delimiter"
+           if cline !~? s:PHP_startindenttag
+               let b:InPHPcode = 0
+               let b:InPHPcode_tofind = s:PHP_startindenttag
+           elseif cline =~? '<script\>'
+               let b:InPHPcode_and_script = 1
+           endif
 
-       let s:level = 0
+       elseif last_line =~? '<<<\a\w*$' 
+           let b:InPHPcode = 0
+           let b:InPHPcode_tofind = substitute( last_line, '^.*<<<\(\a\w*\)\c', '^\\s*\1;$', '')
 
-       let lnum = GetLastRealCodeLNum(v:lnum - 1)
-       let last_line = getline(lnum)    " last line
-       let ind = indent(lnum) " by default
-       let endline= s:endline
+       elseif !UserIsEditing && cline =~ '^\s*/\*\%(.*\*/\)\@!' && getline(v:lnum + 1) !~ '^\s*\*'
+           let b:InPHPcode = 0
+           let b:InPHPcode_tofind = '\*/'
 
-       if ind==0 && b:PHP_default_indenting
-               let ind = b:PHP_default_indenting
+       elseif cline =~? '^\s*</script>'
+           let b:InPHPcode = 0
+           let b:InPHPcode_tofind = s:PHP_startindenttag
        endif
+    endif " }}}
+
+    if !b:InPHPcode && !b:InPHPcode_and_script
+       return -1
+    endif
+
 
-       if lnum == 0
-               return b:PHP_default_indenting
+    " Indent successive // or # comment the same way the first is {{{
+    if cline =~ '^\s*\%(//\|#\|/\*.*\*/\s*$\)'
+       if b:PHP_LastIndentedWasComment == 1
+           return indent(real_PHP_lastindented)
        endif
+       let b:PHP_LastIndentedWasComment = 1
+    else
+       let b:PHP_LastIndentedWasComment = 0
+    endif " }}}
 
+    " Indent multiline /* comments correctly {{{
 
-       if cline =~ '^\s*}\%(}}\)\@!'
-               let ind = indent(FindOpenBracket(v:lnum))
-               let b:PHP_CurrentIndentLevel = b:PHP_default_indenting
-               return ind
+    if b:PHP_InsideMultilineComment || b:UserIsTypingComment
+       if cline =~ '^\s*\*\%(\/\)\@!'
+           if last_line =~ '^\s*/\*'
+               return indent(lnum) + 1
+           else
+               return indent(lnum)
+           endif
+       else
+           let b:PHP_InsideMultilineComment = 0
        endif
+    endif
 
-       if cline =~ '^\s*\*/' " End comment tags must be indented like start comment tags
-               call cursor(v:lnum, 1)
-               call search('\*/\zs', 'W')
-               let lnum = searchpair('/\*', '', '\*/\zs', s:searchpairflags) " find the most outside /*
+    if !b:PHP_InsideMultilineComment && cline =~ '^\s*/\*'
+       let b:PHP_InsideMultilineComment = 1
+       return -1
+    endif " }}}
 
-               let b:PHP_CurrentIndentLevel = b:PHP_default_indenting
 
-               if cline =~ '^\s*\*/'
-                       return indent(lnum) + 1
-               else
-                       return indent(lnum)
-               endif
-       endif
+    " Things always indented at col 1 (PHP delimiter: <?, ?>, Heredoc end) {{{
+    if cline =~# '^\s*<?' && cline !~ '?>'
+       return 0
+    endif
 
-       let defaultORcase = '^\s*\%(default\|case\).*:'
+    if  cline =~ '^\s*?>' && cline !~# '<?'  
+       return 0
+    endif
 
-       if last_line =~ '[;}]'.endline && last_line !~# defaultORcase 
-               if ind==b:PHP_default_indenting " if no indentation for the previous line
-                       return b:PHP_default_indenting
-               elseif b:PHP_indentinghuge && ind==b:PHP_CurrentIndentLevel && cline !~# '^\s*\%(else\|\%(case\|default\).*:\|[})];\=\)' && last_line !~# '^\s*\%(\%(}\s*\)\=else\)' && getline(GetLastRealCodeLNum(lnum - 1))=~';'.endline
-                       return b:PHP_CurrentIndentLevel
-               endif
+    if cline =~? '^\s*\a\w*;$' && cline !~? s:notPhpHereDoc
+       return 0
+    endif " }}}
+
+    let s:level = 0
+
+    let lnum = GetLastRealCodeLNum(v:lnum - 1)
+    let last_line = getline(lnum)
+    let ind = indent(lnum)
+    let endline= s:endline
+
+    if ind==0 && b:PHP_default_indenting
+       let ind = b:PHP_default_indenting
+    endif
+
+    if lnum == 0
+       return b:PHP_default_indenting
+    endif
+
+
+    if cline =~ '^\s*}\%(}}\)\@!'
+       let ind = indent(FindOpenBracket(v:lnum))
+       let b:PHP_CurrentIndentLevel = b:PHP_default_indenting
+       return ind
+    endif
+
+    if cline =~ '^\s*\*/'
+       call cursor(v:lnum, 1)
+       if cline !~ '^\*/'
+           call search('\*/', 'W')
        endif
+       let lnum = searchpair('/\*', '', '\*/', s:searchpairflags)
 
-       let LastLineClosed = 0 " used to prevent redundant tests in the last part of the script
+       let b:PHP_CurrentIndentLevel = b:PHP_default_indenting
 
-       let terminated = '\%(;\%(\s*?>\)\=\|<<<\a\w*\|}\)'.endline
+       if cline =~ '^\s*\*/'
+           return indent(lnum) + 1
+       else
+           return indent(lnum)
+       endif
+    endif
 
-       let unstated   = '\%(^\s*'.s:blockstart.'.*)\|\%(//.*\)\@<!\<e'.'lse\>\)'.endline
+    let defaultORcase = '^\s*\%(default\|case\).*:'
 
-       if ind != b:PHP_default_indenting && cline =~# '^\s*else\%(if\)\=\>'
-               let b:PHP_CurrentIndentLevel = b:PHP_default_indenting " prevent optimized to work at next call
-               return indent(FindTheIfOfAnElse(v:lnum, 1))
-       elseif last_line =~# unstated && cline !~ '^\s*{\|^\s*);\='.endline
-               let ind = ind + &sw
-               return ind
+    if last_line =~ '[;}]'.endline && last_line !~# defaultORcase 
+       if ind==b:PHP_default_indenting
+           return b:PHP_default_indenting
+       elseif b:PHP_indentinghuge && ind==b:PHP_CurrentIndentLevel && cline !~# '^\s*\%(else\|\%(case\|default\).*:\|[})];\=\)' && last_line !~# '^\s*\%(\%(}\s*\)\=else\)' && getline(GetLastRealCodeLNum(lnum - 1))=~';'.endline
+           return b:PHP_CurrentIndentLevel
+       endif
+    endif
 
+    let LastLineClosed = 0
 
-       elseif ind != b:PHP_default_indenting && last_line =~ terminated
-               let previous_line = last_line
-               let last_line_num = lnum
-               let LastLineClosed = 1
+    let terminated = '\%(;\%(\s*?>\)\=\|<<<\a\w*\|}\)'.endline
 
+    let unstated   = '\%(^\s*'.s:blockstart.'.*)\|\%(//.*\)\@<!\<e'.'lse\>\)'.endline
 
-               while 1
-                       if previous_line =~ '^\s*}'
-                               let last_line_num = FindOpenBracket(last_line_num)
+    if ind != b:PHP_default_indenting && cline =~# '^\s*else\%(if\)\=\>'
+       let b:PHP_CurrentIndentLevel = b:PHP_default_indenting
+       return indent(FindTheIfOfAnElse(v:lnum, 1))
+    elseif cline =~ '^\s*{'
+       let previous_line = last_line
+       let last_line_num = lnum
 
-                               if getline(last_line_num) =~ '^\s*{'
-                                       let last_line_num = GetLastRealCodeLNum(last_line_num - 1)
-                               endif
+       while last_line_num > 1
 
-                               let previous_line = getline(last_line_num)
+           if previous_line =~ '^\s*\%(' . s:blockstart . '\|\%([a-zA-Z]\s*\)*function\)' && previous_line !~ '^\s*[|&]'
 
-                               continue
-                       else
-                               if getline(last_line_num) =~# '^\s*else\%(if\)\=\>'
-                                       let last_line_num = FindTheIfOfAnElse(last_line_num, 0)
-                                       continue " re-run the loop (we could find a '}' again)
-                               endif
+               let ind = indent(last_line_num)
 
+               if  b:PHP_BracesAtCodeLevel
+                   let ind = ind + &sw
+               endif
 
-                               let last_match = last_line_num " remember the 'topest' line we found so far
+               return ind 
+           endif
 
-                               let one_ahead_indent = indent(last_line_num)
-                               let last_line_num = GetLastRealCodeLNum(last_line_num - 1)
-                               let two_ahead_indent = indent(last_line_num)
-                               let after_previous_line = previous_line
-                               let previous_line = getline(last_line_num)
+           let last_line_num = last_line_num - 1
+           let previous_line = getline(last_line_num)
+       endwhile
 
+    elseif last_line =~# unstated && cline !~ '^\s*{\|^\s*);\='.endline
+       let ind = ind + &sw
+       return ind
 
-                               if previous_line =~# defaultORcase.'\|{'.endline
-                                       break
-                               endif
+    elseif ind != b:PHP_default_indenting && last_line =~ terminated
+       let previous_line = last_line
+       let last_line_num = lnum
+       let LastLineClosed = 1
 
-                               if after_previous_line=~# '^\s*'.s:blockstart.'.*)'.endline && previous_line =~# '[;}]'.endline
-                                       break
-                               endif
+       while 1
+           if previous_line =~ '^\s*}'
+               let last_line_num = FindOpenBracket(last_line_num)
 
-                               if one_ahead_indent == two_ahead_indent || last_line_num < 1 
-                                       if previous_line =~# '[;}]'.endline || last_line_num < 1
-                                               break
-                                       endif
-                               endif
-                       endif
-               endwhile
+               if getline(last_line_num) =~ '^\s*{'
+                   let last_line_num = GetLastRealCodeLNum(last_line_num - 1)
+               endif
 
-               if indent(last_match) != ind " if nothing was done lets the old script continue
-                       let ind = indent(last_match) " let's use the indent of the last line matched by the alhorithm above
-                       let b:PHP_CurrentIndentLevel = b:PHP_default_indenting " line added in version 1.02 to prevent optimized mode
-                       " from acting in some special cases
+               let previous_line = getline(last_line_num)
 
-                       if cline =~# defaultORcase
-                               let ind = ind - &sw
-                       endif
-                       return ind
+               continue
+           else
+
+               if getline(last_line_num) =~# '^\s*else\%(if\)\=\>'
+                   let last_line_num = FindTheIfOfAnElse(last_line_num, 0)
+                   continue
                endif
-       endif
 
-       let plinnum = GetLastRealCodeLNum(lnum - 1)
-       let pline = getline(plinnum) " previous to last line
 
-       let last_line = substitute(last_line,"\\(//\\|#\\)\\(\\(\\([^\"']*\\([\"']\\)[^\"']*\\5\\)\\+[^\"']*$\\)\\|\\([^\"']*$\\)\\)",'','')
+               let last_match = last_line_num
 
+               let one_ahead_indent = indent(last_line_num)
+               let last_line_num = GetLastRealCodeLNum(last_line_num - 1)
+               let two_ahead_indent = indent(last_line_num)
+               let after_previous_line = previous_line
+               let previous_line = getline(last_line_num)
 
-       if ind == b:PHP_default_indenting
-               if last_line =~ terminated
-                       let LastLineClosed = 1
+
+               if previous_line =~# defaultORcase.'\|{'.endline
+                   break
                endif
-       endif
-       
-       if !LastLineClosed " the last line isn't a .*; or a }$ line
-               if last_line =~# '[{(]'.endline || last_line =~? '\h\w*\s*(.*,$' && pline !~ '[,(]'.endline
-
-                       if !b:PHP_BracesAtCodeLevel || last_line !~# '^\s*{' " XXX mod {
-                               let ind = ind + &sw
-                       endif
-
-                       if b:PHP_BracesAtCodeLevel || cline !~# defaultORcase " XXX mod (2) {
-                               " case and default are not indented inside blocks
-                               let b:PHP_CurrentIndentLevel = ind
-                               return ind
-                       endif
-
-               elseif last_line =~ '\S\+\s*),'.endline
-                       call cursor(lnum, 1)
-                       call search('),'.endline, 'W')
-                       let openedparent = searchpair('(', '', ')', 'bW', 'Skippmatch()')
-                       if openedparent != lnum
-                               let ind = indent(openedparent)
-                       endif
-                       
-               elseif cline !~ '^\s*{' && pline =~ '\%(;\%(\s*?>\)\=\|<<<\a\w*\|{\|^\s*'.s:blockstart.'\s*(.*)\)'.endline.'\|^\s*}\|'.defaultORcase
-                       
-                       let ind = ind + &sw
 
+               if after_previous_line=~# '^\s*'.s:blockstart.'.*)'.endline && previous_line =~# '[;}]'.endline
+                   break
                endif
-               if  b:PHP_BracesAtCodeLevel && cline =~# '^\s*{' " XXX mod {
-                       let ind = ind + &sw
+
+               if one_ahead_indent == two_ahead_indent || last_line_num < 1 
+                   if previous_line =~# '[;}]'.endline || last_line_num < 1
+                       break
+                   endif
                endif
+           endif
+       endwhile
 
-       elseif last_line =~# defaultORcase
-               let ind = ind + &sw
-       endif
+       if indent(last_match) != ind
+           let ind = indent(last_match)
+           let b:PHP_CurrentIndentLevel = b:PHP_default_indenting
 
-       if cline =~  '^\s*);\='
+           if cline =~# defaultORcase
                let ind = ind - &sw
-       elseif cline =~# defaultORcase
-               let ind = ind - &sw
-       
+           endif
+           return ind
        endif
+    endif
 
-       let b:PHP_CurrentIndentLevel = ind
-       return ind
+    let plinnum = GetLastRealCodeLNum(lnum - 1)
+    let pline = getline(plinnum)
+
+    let last_line = substitute(last_line,"\\(//\\|#\\)\\(\\(\\([^\"']*\\([\"']\\)[^\"']*\\5\\)\\+[^\"']*$\\)\\|\\([^\"']*$\\)\\)",'','')
+
+
+    if ind == b:PHP_default_indenting
+       if last_line =~ terminated
+           let LastLineClosed = 1
+       endif
+    endif
+
+    if !LastLineClosed
+
+       if last_line =~# '[{(]'.endline || last_line =~? '\h\w*\s*(.*,$' && pline !~ '[,(]'.endline
+
+           if !b:PHP_BracesAtCodeLevel || last_line !~# '^\s*{'
+               let ind = ind + &sw
+           endif
+
+           if b:PHP_BracesAtCodeLevel || cline !~# defaultORcase
+               let b:PHP_CurrentIndentLevel = ind
+               return ind
+           endif
+
+       elseif last_line =~ '\S\+\s*),'.endline
+           call cursor(lnum, 1)
+           call search('),'.endline, 'W')
+           let openedparent = searchpair('(', '', ')', 'bW', 'Skippmatch()')
+           if openedparent != lnum
+               let ind = indent(openedparent)
+           endif
+
+
+       elseif cline !~ '^\s*{' && pline =~ '\%(;\%(\s*?>\)\=\|<<<\a\w*\|{\|^\s*'.s:blockstart.'\s*(.*)\)'.endline.'\|^\s*}\|'.defaultORcase
+
+           let ind = ind + &sw
+
+       endif
+
+    elseif last_line =~# defaultORcase
+       let ind = ind + &sw
+    endif
+
+    if cline =~  '^\s*);\='
+       let ind = ind - &sw
+    elseif cline =~# defaultORcase
+       let ind = ind - &sw
+
+    endif
+
+    let b:PHP_CurrentIndentLevel = ind
+    return ind
 endfunction
 
-" vim: set ts=4 sw=4:
-" vim: set ff=unix:
+" vim: set ts=8 sw=4 sts=4:
index ff22bbb41c9565b9ab023ed6e429b34ffed453b1..e5946ebc83d937db8b6a26fb8052dba9b30460d9 100644 (file)
@@ -82,7 +82,7 @@ let s:end_start_regex = '^\s*\zs\<\%(module\|class\|def\|if\|for' .
 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\>'
+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 .
@@ -244,17 +244,12 @@ function GetRubyIndent()
   " 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 line = getline('.')
+      if strpart(line, 0, col('.') - 1) =~ '=\s*$' &&
+       \ strpart(line, col('.') - 1, 2) !~ 'do'
         let ind = virtcol('.') - 1
       else
         let ind = indent('.')
@@ -380,5 +375,3 @@ endfunction
 
 let &cpo = s:cpo_save
 unlet s:cpo_save
-
-" vim: nowrap sw=2 sts=2 ts=8 ff=unix:
diff --git a/runtime/indent/sml.vim b/runtime/indent/sml.vim
new file mode 100644 (file)
index 0000000..30d3108
--- /dev/null
@@ -0,0 +1,215 @@
+" Vim indent file
+" Language:     SML
+" Maintainer:  Saikat Guha <sg266@cornell.edu>
+"                              Hubert Chao <hc85@cornell.edu>
+" Original OCaml Version:
+"                              Jean-Francois Yuen  <jfyuen@ifrance.com>
+"               Mike Leary          <leary@nwlink.com>
+"               Markus Mottl        <markus@oefai.at>
+" OCaml URL:    http://www.oefai.at/~markus/vim/indent/ocaml.vim
+" Last Change:  2003 Jan 04    - Adapted to SML
+"                              2002 Nov 06 - Some fixes (JY)
+"               2002 Oct 28 - Fixed bug with indentation of ']' (MM)
+"               2002 Oct 22 - Major rewrite (JY)
+
+" Only load this indent file when no other was loaded.
+if exists("b:did_indent")
+  finish
+endif
+let b:did_indent = 1
+
+setlocal expandtab
+setlocal indentexpr=GetSMLIndent()
+setlocal indentkeys+=0=and,0=else,0=end,0=handle,0=if,0=in,0=let,0=then,0=val,0=fun,0=\|,0=*),0)
+setlocal nolisp
+setlocal nosmartindent
+setlocal textwidth=80
+setlocal shiftwidth=2
+
+" Comment formatting
+if (has("comments"))
+  set comments=sr:(*,mb:*,ex:*)
+  set fo=cqort
+endif
+
+" Only define the function once.
+"if exists("*GetSMLIndent")
+"finish
+"endif
+
+" Define some patterns:
+let s:beflet = '^\s*\(initializer\|method\|try\)\|\(\<\(begin\|do\|else\|in\|then\|try\)\|->\|;\)\s*$'
+let s:letpat = '^\s*\(let\|type\|module\|class\|open\|exception\|val\|include\|external\)\>'
+let s:letlim = '\(\<\(sig\|struct\)\|;;\)\s*$'
+let s:lim = '^\s*\(exception\|external\|include\|let\|module\|open\|type\|val\)\>'
+let s:module = '\<\%(let\|sig\|struct\)\>'
+let s:obj = '^\s*\(constraint\|inherit\|initializer\|method\|val\)\>\|\<\(object\|object\s*(.*)\)\s*$'
+let s:type = '^\s*\%(let\|type\)\>.*='
+let s:val = '^\s*\(val\|external\)\>.*:'
+
+" Skipping pattern, for comments
+function! s:SkipPattern(lnum, pat)
+  let def = prevnonblank(a:lnum - 1)
+  while def > 0 && getline(def) =~ a:pat
+    let def = prevnonblank(def - 1)
+  endwhile
+  return def
+endfunction
+
+" Indent for ';;' to match multiple 'let'
+function! s:GetInd(lnum, pat, lim)
+  let llet = search(a:pat, 'bW')
+  let old = indent(a:lnum)
+  while llet > 0
+    let old = indent(llet)
+    let nb = s:SkipPattern(llet, '^\s*(\*.*\*)\s*$')
+    if getline(nb) =~ a:lim
+      return old
+    endif
+    let llet = search(a:pat, 'bW')
+  endwhile
+  return old
+endfunction
+
+" Indent pairs
+function! s:FindPair(pstart, pmid, pend)
+  call search(a:pend, 'bW')
+"  return indent(searchpair(a:pstart, a:pmid, a:pend, 'bWn', 'synIDattr(synID(line("."), col("."), 0), "name") =~? "string\\|comment"'))
+  let lno = searchpair(a:pstart, a:pmid, a:pend, 'bW', 'synIDattr(synID(line("."), col("."), 0), "name") =~? "string\\|comment"')
+  if lno == -1
+       return indent(lno)
+  else
+       return col(".") - 1
+  endif
+endfunction
+
+function! s:FindLet(pstart, pmid, pend)
+  call search(a:pend, 'bW')
+"  return indent(searchpair(a:pstart, a:pmid, a:pend, 'bWn', 'synIDattr(synID(line("."), col("."), 0), "name") =~? "string\\|comment"'))
+  let lno = searchpair(a:pstart, a:pmid, a:pend, 'bW', 'synIDattr(synID(line("."), col("."), 0), "name") =~? "string\\|comment"')
+  let moduleLine = getline(lno)
+  if lno == -1 || moduleLine =~ '^\s*\(fun\|structure\|signature\)\>'
+       return indent(lno)
+  else
+       return col(".") - 1
+  endif
+endfunction
+
+" Indent 'let'
+"function! s:FindLet(pstart, pmid, pend)
+"  call search(a:pend, 'bW')
+"  return indent(searchpair(a:pstart, a:pmid, a:pend, 'bWn', 'synIDattr(synID(line("."), col("."), 0), "name") =~? "string\\|comment" || getline(".") =~ "^\\s*let\\>.*=.*\\<in\\s*$" || getline(prevnonblank(".") - 1) =~ "^\\s*let\\>.*=\\s*$\\|" . s:beflet'))
+"endfunction
+
+function! GetSMLIndent()
+  " Find a non-blank line above the current line.
+  let lnum = prevnonblank(v:lnum - 1)
+
+  " At the start of the file use zero indent.
+  if lnum == 0
+    return 0
+  endif
+
+  let ind = indent(lnum)
+  let lline = getline(lnum)
+
+       " Return double 'shiftwidth' after lines matching:
+       if lline =~ '^\s*|.*=>\s*$'
+               return ind + &sw + &sw
+       elseif lline =~ '^\s*val\>.*=\s*$'
+               return ind + &sw
+       endif
+
+  let line = getline(v:lnum)
+
+       " Indent lines starting with 'end' to matching module
+       if line =~ '^\s*end\>'
+               return s:FindLet(s:module, '', '\<end\>')
+
+       " Match 'else' with 'if'
+       elseif line =~ '^\s*else\>'
+               if lline !~ '^\s*\(if\|else\|then\)\>'
+                               return s:FindPair('\<if\>', '', '\<then\>')
+               else return ind
+               endif
+
+       " Match 'then' with 'if'
+       elseif line =~ '^\s*then\>'
+       if lline !~ '^\s*\(if\|else\|then\)\>'
+                 return s:FindPair('\<if\>', '', '\<then\>')
+       else return ind
+       endif
+
+       " Indent if current line begins with ']'
+       elseif line =~ '^\s*\]'
+               return s:FindPair('\[','','\]')
+
+  " Indent current line starting with 'in' to last matching 'let'
+       elseif line =~ '^\s*in\>'
+               let ind = s:FindLet('\<let\>','','\<in\>')
+
+       " Indent from last matching module if line matches:
+       elseif line =~ '^\s*\(fun\|val\|open\|structure\|and\|datatype\|type\|exception\)\>'
+               cursor(lnum,1)
+               let lastModule = indent(searchpair(s:module, '', '\<end\>', 'bWn', 'synIDattr(synID(line("."), col("."), 0), "name") =~? "string\\|comment"'))
+               if lastModule == -1
+                       return 0
+               else
+                       return lastModule + &sw
+               endif
+
+       " Indent lines starting with '|' from matching 'case', 'handle'
+       elseif line =~ '^\s*|'
+               " cursor(lnum,1)
+               let lastSwitch = search('\<\(case\|handle\|fun\|datatype\)\>','bW')
+               let switchLine = getline(lastSwitch)
+               let switchLineIndent = indent(lastSwitch)
+               if lline =~ '^\s*|'
+                 return ind
+               endif
+               if switchLine =~ '\<case\>'
+                       return col(".") + 2
+               elseif switchLine =~ '\<handle\>'
+                       return switchLineIndent + &sw
+               elseif switchLine =~ '\<datatype\>'
+                       call search('=')
+                       return col(".") - 1
+               else
+                       return switchLineIndent + 2
+               endif
+
+
+  " Indent if last line ends with 'sig', 'struct', 'let', 'then', 'else',
+  " 'in'
+  elseif lline =~ '\<\(sig\|struct\|let\|in\|then\|else\)\s*$'
+               let ind = ind + &sw
+
+  " Indent if last line ends with 'of', align from 'case'
+  elseif lline =~ '\<\(of\)\s*$'
+               call search('\<case\>',"bW")
+               let ind = col(".")+4
+
+       " Indent if current line starts with 'of'
+  elseif line =~ '^\s*of\>'
+               call search('\<case\>',"bW")
+               let ind = col(".")+1
+
+
+       " Indent if last line starts with 'fun', 'case', 'fn'
+       elseif lline =~ '^\s*\(fun\|fn\|case\)\>'
+               let ind = ind + &sw
+
+       endif
+
+       " Don't indent 'let' if last line started with 'fun', 'fn'
+       if line =~ '^\s*let\>'
+               if lline =~ '^\s*\(fun\|fn\)'
+                       let ind = ind - &sw
+               endif
+  endif
+
+  return ind
+
+endfunction
+
+" vim:sw=2
index 42bdbd9b10281a6cc3f916b820bfea6e66a41132..8013c8fdc25d8010153d3e27cc10ed880318fc80 100644 (file)
@@ -1,7 +1,8 @@
 " netrw.vim: Handles file transfer and remote directory listing across a network
 "            PLUGIN PORTION
-" Date:                Sep 08, 2005
+" Last Change: Aug 29, 2005
 " Maintainer:  Charles E Campbell, Jr <drchipNOSPAM at campbellfamily dot biz>
+" Version:     66
 " License:     Vim License  (see vim's :help license)
 " GetLatestVimScripts: 1075 1 :AutoInstall: netrw.vim
 " Copyright:    Copyright (C) 1999-2005 Charles E. Campbell, Jr. {{{1
 
 " ---------------------------------------------------------------------
 " Load Once: {{{1
+if exists("g:loaded_netrw") || &cp
+  finish
+endif
+if v:version < 600
+ echoerr "***netrw*** doesn't support Vim version ".v:version
+ finish
+endif
+let g:loaded_netrw  = "v66"
+if v:version < 700
+ let loaded_explorer = 1
+endif
 let s:keepcpo= &cpo
 set cpo&vim
 
@@ -126,7 +138,7 @@ endfun
 "               example and as a fix for a Windows 95 problem: in my
 "               experience, win95's ftp always dumped four blank lines
 "               at the end of the transfer.
-if has("win95") && exists("g:netrw_win95ftp") && g:netrw_win95ftp
+if has("win95") && g:netrw_win95ftp
  fun! NetReadFixup(method, line1, line2)
 "   call Dfunc("NetReadFixup(method<".a:method."> line1=".a:line1." line2=".a:line2.")")
    if method == 3   " ftp (no <.netrc>)
index 7d8089cc4eefd12e91bdda13007dbf41e56b7b68..eecdcd2342c788bedc17c748a98e97a6462f56d6 100644 (file)
@@ -1,7 +1,7 @@
 " NetrwSettings.vim: makes netrw settings simpler
-" Date:                Aug 16, 2005
+" Last Change: Aug 16, 2005
 " Maintainer:  Charles E Campbell, Jr <drchipNOSPAM at campbellfamily dot biz>
-" Version:     3
+" Version:             3
 " Copyright:    Copyright (C) 1999-2005 Charles E. Campbell, Jr. {{{1
 "               Permission is hereby granted to use and distribute this code,
 "               with or without modifications, provided that this copyright
index c6ebea958c7823efbb90e22c0910ee0cd87731aa..0715e555bfbdb9dbd5eeff2181989beba851653c 100644 (file)
Binary files a/runtime/spell/en.ascii.spl and b/runtime/spell/en.ascii.spl differ
index fe6b90e7d87f5a7064da254412509e36822bda4f..6d4fe5f81f54fb1855f46d3421ab8a04d9622812 100644 (file)
Binary files a/runtime/spell/en.latin1.spl and b/runtime/spell/en.latin1.spl differ
index 46ef9a5c808e3f8dc387562b9d86316b2a72cfb9..d3cd823a1113cbcc38ab5dda641b22916809c095 100644 (file)
Binary files a/runtime/spell/en.utf-8.spl and b/runtime/spell/en.utf-8.spl differ
index 0a00dfc5b8a76194a7b3f1b495ada914a1fa6f84..aba8697636eada95570c0950a0c496e4a5ca90bf 100644 (file)
@@ -79,10 +79,10 @@ syn region rubySymbol                       start=":\@<!:\"" end="\"" skip="\\\\\|\\\""
 syn match  rubyBlockParameter          "\%(\%(\<do\>\|{\)\s*\)\@<=|\s*\zs[( ,a-zA-Z0-9_*)]\+\ze\s*|" display
 
 syn match rubyPredefinedVariable #$[!$&"'*+,./0:;<=>?@\`~1-9]#
-syn match rubyPredefinedVariable "$_\>"                                                                display
-syn match rubyPredefinedVariable "$-[0FIKadilpvw]\>"                                           display
-syn match rubyPredefinedVariable "$\%(deferr\|defout\|stderr\|stdin\|stdout\)\>"               display
-syn match rubyPredefinedVariable "$\%(DEBUG\|FILENAME\|KCODE\|LOAD_PATH\|SAFE\|VERBOSE\)\>"    display
+syn match rubyPredefinedVariable "$_\>"                                                                                           display
+syn match rubyPredefinedVariable "$-[0FIKadilpvw]\>"                                                                      display
+syn match rubyPredefinedVariable "$\%(deferr\|defout\|stderr\|stdin\|stdout\)\>"                                          display
+syn match rubyPredefinedVariable "$\%(DEBUG\|FILENAME\|KCODE\|LOADED_FEATURES\|LOAD_PATH\|PROGRAM_NAME\|SAFE\|VERBOSE\)\>" display
 syn match rubyPredefinedConstant "\%(\%(\.\@<!\.\)\@<!\|::\)\_s*\zs\%(MatchingData\|ARGF\|ARGV\|ENV\)\>\%(\s*(\)\@!"
 syn match rubyPredefinedConstant "\%(\%(\.\@<!\.\)\@<!\|::\)\_s*\zs\%(DATA\|FALSE\|NIL\|RUBY_PLATFORM\|RUBY_RELEASE_DATE\)\>\%(\s*(\)\@!"
 syn match rubyPredefinedConstant "\%(\%(\.\@<!\.\)\@<!\|::\)\_s*\zs\%(RUBY_VERSION\|STDERR\|STDIN\|STDOUT\|TOPLEVEL_BINDING\|TRUE\)\>\%(\s*(\)\@!"
@@ -166,8 +166,8 @@ if !exists("ruby_no_expensive")
   syn region rubyNoDoBlock matchgroup=rubyControl start="\<\%(case\|begin\)\>" start="\%(^\|\.\.\.\=\|[,;=([<>~\*/%!&^|+-]\)\s*\zs\%(if\|unless\)\>" end="\<end\>" contains=ALLBUT,@rubyExtendedStringSpecial,rubyTodo fold
 
   " statement with optional *do*
-  syn region rubyOptDoLine matchgroup=rubyControl start="\<for\>" start="\%(\%(^\|\.\.\.\=\|[,;=([<>~\*/%!&^|+-]\)\s*\)\@<=\<\%(until\|while\)\>" end="\%(\<do\>\|:\)" end="\ze\%(;\|$\)" oneline contains=ALLBUT,@rubyExtendedStringSpecial,rubyTodo
-  syn region rubyOptDoBlock start="\<for\>" start="\%(\%(^\|\.\.\.\=\|[,;=([<>~\*/%!&^|+-]\)\s*\)\@<=\<\%(until\|while\)\>" matchgroup=rubyControl end="\<end\>" contains=ALLBUT,@rubyExtendedStringSpecial,rubyTodo nextgroup=rubyOptDoLine fold
+  syn region rubyOptDoLine matchgroup=rubyControl start="\<for\>" start="\%(\%(^\|\.\.\.\=\|[?:,;=([<>~\*/%!&^|+-]\|\%(\<[_[:lower:]][_[:alnum:]]*\)\@<![!=?]\)\s*\)\@<=\<\%(until\|while\)\>" end="\%(\<do\>\|:\)" end="\ze\%(;\|$\)" oneline contains=ALLBUT,@rubyExtendedStringSpecial,rubyTodo
+  syn region rubyOptDoBlock start="\<for\>" start="\%(\%(^\|\.\.\.\=\|[:,;([<>~\*/%&^|+-]\|\%(\<[_[:lower:]][_[:alnum:]]*\)\@<![!=?]\)\s*\)\@<=\<\%(until\|while\)\>" matchgroup=rubyControl end="\<end\>" contains=ALLBUT,@rubyExtendedStringSpecial,rubyTodo nextgroup=rubyOptDoLine fold
 
   if !exists("ruby_minlines")
     let ruby_minlines = 50
@@ -196,7 +196,7 @@ syn keyword rubyBeginEnd    BEGIN END
 if !exists("ruby_no_special_methods")
   syn keyword rubyAccess    public protected private
   syn keyword rubyAttribute attr attr_accessor attr_reader attr_writer
-  syn keyword rubyControl   abort at_exit exit fork loop trap
+  syn match   rubyControl   "\<\%(exit!\|\%(abort\|at_exit\|exit\|fork\|loop\|trap\)\>\)"
   syn keyword rubyEval      eval class_eval instance_eval module_eval
   syn keyword rubyException raise fail catch throw
   syn keyword rubyInclude   autoload extend include load require
index b6f936e8f190cf724de1ae82aa7db625ca83f9cf..1a382e399a9e9dc76116497b8487e3f1214994f0 100644 (file)
@@ -1905,7 +1905,10 @@ ex_diffgetput(eap)
     {
        /* No argument: Find the other buffer in the list of diff buffers. */
        for (idx_other = 0; idx_other < DB_COUNT; ++idx_other)
-           if (diffbuf[idx_other] != curbuf && diffbuf[idx_other] != NULL)
+           if (diffbuf[idx_other] != curbuf
+                   && diffbuf[idx_other] != NULL
+                   && (eap->cmdidx != CMD_diffput
+                                              || diffbuf[idx_other]->b_p_ma))
                break;
        if (idx_other == DB_COUNT)
        {
@@ -1915,7 +1918,9 @@ ex_diffgetput(eap)
 
        /* Check that there isn't a third buffer in the list */
        for (i = idx_other + 1; i < DB_COUNT; ++i)
-           if (diffbuf[i] != curbuf && diffbuf[i] != NULL)
+           if (diffbuf[i] != curbuf
+                   && diffbuf[i] != NULL
+                   && (eap->cmdidx != CMD_diffput || diffbuf[i]->b_p_ma))
            {
                EMSG(_("E101: More than two buffers in diff mode, don't know which one to use"));
                return;
index 5b72461356f76d03a43f018f3f96357be40f49ab..d9bfb2fb0f6d19196622a5f3d0f5aba51e62243d 100644 (file)
@@ -295,6 +295,7 @@ edit(cmdchar, startln, count)
      */
     if (cmdchar != 'r' && cmdchar != 'v')
     {
+# ifdef FEAT_EVAL
        if (cmdchar == 'R')
            ptr = (char_u *)"r";
        else if (cmdchar == 'V')
@@ -302,6 +303,7 @@ edit(cmdchar, startln, count)
        else
            ptr = (char_u *)"i";
        set_vim_var_string(VV_INSERTMODE, ptr, 1);
+# endif
        apply_autocmds(EVENT_INSERTENTER, NULL, NULL, FALSE, curbuf);
     }
 #endif
@@ -6580,9 +6582,11 @@ ins_insert(replaceState)
 #endif
 
 #ifdef FEAT_AUTOCMD
+# ifdef FEAT_EVAL
     set_vim_var_string(VV_INSERTMODE,
                   (char_u *)((State & REPLACE_FLAG) ? "i" :
                            replaceState == VREPLACE ? "v" : "r"), 1);
+# endif
     apply_autocmds(EVENT_INSERTCHANGE, NULL, NULL, FALSE, curbuf);
 #endif
     if (State & REPLACE_FLAG)
index 72ffc18c47a8a03aceced7555ff0b1e213ddcba3..f88fbf815b2818db622fb314e265e5315638d1fe 100644 (file)
@@ -114,7 +114,6 @@ static int  getargopt __ARGS((exarg_T *eap));
 # define ex_cc                 ex_ni
 # define ex_cnext              ex_ni
 # define ex_cfile              ex_ni
-# define ex_cexpr              ex_ni
 # define qf_list               ex_ni
 # define qf_age                        ex_ni
 # define ex_helpgrep           ex_ni
@@ -125,6 +124,9 @@ static int  getargopt __ARGS((exarg_T *eap));
 # define ex_copen              ex_ni
 # define ex_cwindow            ex_ni
 #endif
+#if !defined(FEAT_QUICKFIX) || !defined(FEAT_EVAL)
+# define ex_cexpr              ex_ni
+#endif
 
 static int     check_more __ARGS((int, int));
 static linenr_T get_address __ARGS((char_u **, int skip, int to_other_file));
index b69076fcc6dbffe227591a9c97a466b1d9803978..a3fac10ac73fb7674a9f24257ddff164827a54af 100644 (file)
@@ -428,13 +428,10 @@ getcmdline(firstc, count, indent)
            if (p_wmnu && wild_menu_showing != 0)
            {
                int skt = KeyTyped;
-               int old_RedrawingDisabled;
+               int old_RedrawingDisabled = RedrawingDisabled;
 
                if (ccline.input_fn)
-               {
-                   old_RedrawingDisabled = RedrawingDisabled;
                    RedrawingDisabled = 0;
-               }
 
                if (wild_menu_showing == WM_SCROLLED)
                {
@@ -463,10 +460,10 @@ getcmdline(firstc, count, indent)
 # endif
                    redraw_statuslines();
                }
-               if (ccline.input_fn)
-                   RedrawingDisabled = old_RedrawingDisabled;
                KeyTyped = skt;
                wild_menu_showing = 0;
+               if (ccline.input_fn)
+                   RedrawingDisabled = old_RedrawingDisabled;
            }
 #endif
        }
@@ -4876,7 +4873,7 @@ set_cmdline_pos(pos)
 
 /*
  * Get the current command-line type.
- * Returns ':' or '/' or '?' or '@' or '>'
+ * Returns ':' or '/' or '?' or '@' or '>' or '-'
  * Only works when the command line is being edited.
  * Returns NUL when something is wrong.
  */
@@ -4887,6 +4884,8 @@ get_cmdline_type()
 
     if (p == NULL)
        return NUL;
+    if (p->cmdfirstc == NUL)
+       return (p->input_fn) ? '@' : '-';
     return p->cmdfirstc;
 }
 
index 0ab57e93a5abc25ee11f9b28136f0d6dc1abe2ae..e69fcd9f262293c3e37caad3c8c7bd8ceec304b1 100644 (file)
 # define VIM_BACKTICK          /* internal backtick expansion */
 #endif
 
-/*
- * +textobjects                Text objects: "vaw", "das", etc.
- */
-#ifdef FEAT_NORMAL
-# define FEAT_TEXTOBJ
-#endif
-
 /*
  * +visual             Visual mode.
  * +visualextra                Extra features for Visual mode (mostly block operators).
  * +profile            Profiling for functions and scripts.
  */
 #if defined(FEAT_HUGE) \
+       && defined(FEAT_EVAL) \
        && ((defined(HAVE_GETTIMEOFDAY) && defined(HAVE_SYS_TIME_H)) \
                || defined(WIN3264))
 # define FEAT_PROFILE
 #endif
 
+/*
+ * +textobjects                Text objects: "vaw", "das", etc.
+ */
+#if defined(FEAT_NORMAL) && defined(FEAT_EVAL)
+# define FEAT_TEXTOBJ
+#endif
+
 /*
  *                     Insert mode completion with 'completefunc'.
  */
index 916fdcb5d9397ffbbc5024d9028c7b0ad68ad86d..e74306196b4b468120287e060b7344ac3c51af03 100644 (file)
@@ -2796,14 +2796,22 @@ buf_write(buf, fname, sfname, start, end, eap, append, forceit,
        if (!buf_valid(buf))
            buf = NULL;
        if (buf == NULL || (buf->b_ml.ml_mfp == NULL && !empty_memline)
-                                      || did_cmd || nofile_err || aborting())
+                                      || did_cmd || nofile_err
+#ifdef FEAT_EVAL
+                                      || aborting()
+#endif
+                                      )
        {
            --no_wait_return;
            msg_scroll = msg_save;
            if (nofile_err)
                EMSG(_("E676: No matching autocommands for acwrite buffer"));
 
-           if (aborting() || nofile_err)
+           if (nofile_err
+#ifdef FEAT_EVAL
+                   || aborting()
+#endif
+                   )
                /* An aborting error, interrupt or exception in the
                 * autocommands. */
                return FAIL;
@@ -6021,8 +6029,10 @@ buf_check_timestamp(buf, focus)
             * Avoid being called recursively by setting "busy".
             */
            busy = TRUE;
+# ifdef FEAT_EVAL
            set_vim_var_string(VV_FCS_REASON, (char_u *)reason, -1);
            set_vim_var_string(VV_FCS_CHOICE, (char_u *)"", -1);
+# endif
            n = apply_autocmds(EVENT_FILECHANGEDSHELL,
                                      buf->b_fname, buf->b_fname, FALSE, buf);
            busy = FALSE;
@@ -6030,12 +6040,14 @@ buf_check_timestamp(buf, focus)
            {
                if (!buf_valid(buf))
                    EMSG(_("E246: FileChangedShell autocommand deleted buffer"));
+# ifdef FEAT_EVAL
                s = get_vim_var_str(VV_FCS_CHOICE);
                if (STRCMP(s, "reload") == 0 && *reason != 'd')
                    reload = TRUE;
                else if (STRCMP(s, "ask") == 0)
                    n = FALSE;
                else
+# endif
                    return 2;
            }
            if (!n)
@@ -7978,12 +7990,18 @@ apply_autocmds_retval(event, fname, fname_io, force, buf, retval)
 {
     int                did_cmd;
 
+#ifdef FEAT_EVAL
     if (should_abort(*retval))
        return FALSE;
+#endif
 
     did_cmd = apply_autocmds_group(event, fname, fname_io, force,
                                                      AUGROUP_ALL, buf, NULL);
-    if (did_cmd && aborting())
+    if (did_cmd
+#ifdef FEAT_EVAL
+           && aborting()
+#endif
+           )
        *retval = FAIL;
     return did_cmd;
 }
index 83a9cd8ed24557e3369bcb073beeb526da6d01be..f31f929ed6f77b90e445cb3dec52ed39327b2b49 100644 (file)
@@ -6,15 +6,15 @@
 # explanations.
 #
 # Optional arguments:
-#  PREFIX=dir          Overrules the install directory.
-#                      Can be specified when installing only.
-#                      Example: aap install PREFIX=$HOME
+#  PREFIX=dir           Overrules the install directory.
+#                       Can be specified when installing only.
+#                       Example: aap install PREFIX=$HOME
 #
 
 # Skip the configure stuff when "link.sh" is executing this recipe recursively
 # to build pathdef.c or not building something and auto/config.aap does exist.
 @if ((_no.TARGETARG != "pathdef" and has_build_target())
-@      or not os.path.exists("auto/config.aap")):
+@       or not os.path.exists("auto/config.aap")):
 
     #
     # A U T O C O N F
@@ -25,9 +25,9 @@
     # there is no autoconf program skip this (the signature is often the only
     # thing that's outdated)
     auto/configure {signfile = mysign} : configure.in
-       @if not program_path("autoconf"):
-           :print Can't find autoconf, using existing configure script.
-       @else:
+        @if not program_path("autoconf"):
+            :print Can't find autoconf, using existing configure script.
+        @else:
             # Move configure aside, autoconf would overwrite it
             :move {exist} configure configure.save
             :sys autoconf
 
     # Change the configure script to produce config.aap instead of config.mk.
     auto/configure.aap : auto/configure
-       :print Adjusting auto/configure for A-A-P.
-       :cat auto/configure | :eval re.sub("config.mk", "config.aap", stdin)
-                                                       >! auto/configure.aap
-       :chmod 755 auto/configure.aap
+        :print Adjusting auto/configure for A-A-P.
+        :cat auto/configure | :eval re.sub("config.mk", "config.aap", stdin)
+                                                        >! auto/configure.aap
+        :chmod 755 auto/configure.aap
 
     # The configure script uses the directory where it's located, use a link.
     configure.aap:  {buildcheck=}
-       :symlink {f} auto/configure.aap configure.aap
+        :symlink {f} auto/configure.aap configure.aap
 
     # Dependency: run configure.aap to update config.h and config.aap in the
     # "auto" directory.
     config {virtual} auto/config.h auto/config.aap :
-                        auto/configure.aap configure.aap
-                        config.arg config.h.in config.aap.in
-       :sys CONFIG_STATUS=auto/config.status
+                         auto/configure.aap configure.aap
+                         config.arg config.h.in config.aap.in
+        :sys CONFIG_STATUS=auto/config.status
                 ./configure.aap `file2string("config.arg")`
                     --cache-file=auto/config.cache
 
     # Configure arguments: create an empty "config.arg" file when its missing
     config.arg:
-       :touch {exist} config.arg
+        :touch {exist} config.arg
 
     # "auto/config.aap" contains a lot of settings, such as the name of the
     # executable "Target".
     # First update it, forcefully if the "reconfig" target was used.
     @if _no.TARGETARG != "comment" and _no.TARGETARG != "make":
-       @if "reconfig" in var2list(_no.TARGETARG):
-           :del {force} auto/config.cache auto/config.status
-           :update {force} auto/config.aap
-       @else:
-           :update auto/config.aap
+        @if "reconfig" in var2list(_no.TARGETARG):
+            :del {force} auto/config.cache auto/config.status
+            :update {force} auto/config.aap
+        @else:
+            :update auto/config.aap
 
 # Include the recipe that autoconf generated.
 :include auto/config.aap
@@ -87,93 +87,93 @@ prefix = `os.path.expanduser(prefix)`
 #
 :variant GUI
     GTK
-       GUI_SRC         = gui.c gui_gtk.c gui_gtk_x11.c pty.c gui_beval.c
-                           gui_gtk_f.c
-       GUI_OBJ         =
-       GUI_DEFS        = -DFEAT_GUI_GTK $NARROW_PROTO
-       GUI_IPATH       = $GUI_INC_LOC
-       GUI_LIBS_DIR    = $GUI_LIB_LOC
-       GUI_LIBS1       =
-       GUI_LIBS2       = $GTK_LIBNAME
-       GUI_TARGETS     = installglinks
-       GUI_MAN_TARGETS = installghelplinks
-       GUI_TESTTARGET  = gui
+        GUI_SRC         = gui.c gui_gtk.c gui_gtk_x11.c pty.c gui_beval.c
+                            gui_gtk_f.c
+        GUI_OBJ         =
+        GUI_DEFS        = -DFEAT_GUI_GTK $NARROW_PROTO
+        GUI_IPATH       = $GUI_INC_LOC
+        GUI_LIBS_DIR    = $GUI_LIB_LOC
+        GUI_LIBS1       =
+        GUI_LIBS2       = $GTK_LIBNAME
+        GUI_TARGETS     = installglinks
+        GUI_MAN_TARGETS = installghelplinks
+        GUI_TESTTARGET  = gui
     KDE
-        GUI_SRC                = gui.c pty.c gui_kde.cc gui_kde_x11.cc
+        GUI_SRC         = gui.c pty.c gui_kde.cc gui_kde_x11.cc
                             gui_kde_wid_moc.cc
                             kvim_iface_skel.cc
-        GUI_OBJ                = $BDIR/gui_kde_wid.o
-        GUI_DEFS       = -DFEAT_GUI_KDE $NARROW_PROTO
-        GUI_IPATH      = $GUI_INC_LOC
-        GUI_LIBS_DIR   = $GUI_LIB_LOC
-        GUI_LIBS1      =
-        GUI_LIBS2      =
-       GUI_TARGETS     = installglinks installkdeicons
-       GUI_MAN_TARGETS = installghelplinks
+        GUI_OBJ         = $BDIR/gui_kde_wid.o
+        GUI_DEFS        = -DFEAT_GUI_KDE $NARROW_PROTO
+        GUI_IPATH       = $GUI_INC_LOC
+        GUI_LIBS_DIR    = $GUI_LIB_LOC
+        GUI_LIBS1       =
+        GUI_LIBS2       =
+        GUI_TARGETS     = installglinks installkdeicons
+        GUI_MAN_TARGETS = installghelplinks
         GUI_TESTTARGET  = gui
 
     MOTIF
-       GUI_SRC         = gui.c gui_motif.c gui_x11.c pty.c gui_beval.c
-                         gui_xmdlg.c gui_xmebw.c
-       GUI_OBJ         =
-       GUI_DEFS        = -DFEAT_GUI_MOTIF $NARROW_PROTO
-       GUI_IPATH       = $GUI_INC_LOC
-       GUI_LIBS_DIR    = $GUI_LIB_LOC
-       GUI_LIBS1       =
-       GUI_LIBS2       = $MOTIF_LIBNAME -lXt
-       GUI_TARGETS     = installglinks
-       GUI_MAN_TARGETS = installghelplinks
-       GUI_TESTTARGET  = gui
+        GUI_SRC         = gui.c gui_motif.c gui_x11.c pty.c gui_beval.c
+                          gui_xmdlg.c gui_xmebw.c
+        GUI_OBJ         =
+        GUI_DEFS        = -DFEAT_GUI_MOTIF $NARROW_PROTO
+        GUI_IPATH       = $GUI_INC_LOC
+        GUI_LIBS_DIR    = $GUI_LIB_LOC
+        GUI_LIBS1       =
+        GUI_LIBS2       = $MOTIF_LIBNAME -lXt
+        GUI_TARGETS     = installglinks
+        GUI_MAN_TARGETS = installghelplinks
+        GUI_TESTTARGET  = gui
     ATHENA
-       # XAW_LIB et al. can be overruled to use Xaw3d widgets
-       XAW_LIB         ?= -lXaw
-       GUI_SRC         =  gui.c gui_athena.c gui_x11.c pty.c gui_beval.c \
-                           gui_at_sb.c gui_at_fs.c
-       GUI_OBJ         =
-       GUI_DEFS        = -DFEAT_GUI_ATHENA $NARROW_PROTO
-       GUI_IPATH       = $GUI_INC_LOC
-       GUI_LIBS_DIR    = $GUI_LIB_LOC
-       GUI_LIBS1       = $XAW_LIB
-       GUI_LIBS2       = -lXt
-       GUI_TARGETS     = installglinks
-       GUI_MAN_TARGETS = installghelplinks
-       GUI_TESTTARGET  = gui
+        # XAW_LIB et al. can be overruled to use Xaw3d widgets
+        XAW_LIB         ?= -lXaw
+        GUI_SRC         =  gui.c gui_athena.c gui_x11.c pty.c gui_beval.c \
+                            gui_at_sb.c gui_at_fs.c
+        GUI_OBJ         =
+        GUI_DEFS        = -DFEAT_GUI_ATHENA $NARROW_PROTO
+        GUI_IPATH       = $GUI_INC_LOC
+        GUI_LIBS_DIR    = $GUI_LIB_LOC
+        GUI_LIBS1       = $XAW_LIB
+        GUI_LIBS2       = -lXt
+        GUI_TARGETS     = installglinks
+        GUI_MAN_TARGETS = installghelplinks
+        GUI_TESTTARGET  = gui
     NEXTAW
-       # XAW_LIB et al. can be overruled to use Xaw3d widgets
-       XAW_LIB         ?= -lXaw
-       GUI_SRC         =  gui.c gui_athena.c gui_x11.c pty.c gui_beval.c
-                           gui_at_fs.c
-       GUI_OBJ         =
-       GUI_DEFS        = -DFEAT_GUI_ATHENA -DFEAT_GUI_NEXTAW $NARROW_PROTO
-       GUI_IPATH       = $GUI_INC_LOC
-       GUI_LIBS_DIR    = $GUI_LIB_LOC
-       GUI_LIBS1       = $NEXTAW_LIB
-       GUI_LIBS2       = -lXt
-       GUI_TARGETS     = installglinks
-       GUI_MAN_TARGETS = installghelplinks
-       GUI_TESTTARGET  = gui
+        # XAW_LIB et al. can be overruled to use Xaw3d widgets
+        XAW_LIB         ?= -lXaw
+        GUI_SRC         =  gui.c gui_athena.c gui_x11.c pty.c gui_beval.c
+                            gui_at_fs.c
+        GUI_OBJ         =
+        GUI_DEFS        = -DFEAT_GUI_ATHENA -DFEAT_GUI_NEXTAW $NARROW_PROTO
+        GUI_IPATH       = $GUI_INC_LOC
+        GUI_LIBS_DIR    = $GUI_LIB_LOC
+        GUI_LIBS1       = $NEXTAW_LIB
+        GUI_LIBS2       = -lXt
+        GUI_TARGETS     = installglinks
+        GUI_MAN_TARGETS = installghelplinks
+        GUI_TESTTARGET  = gui
     PHOTONGUI
-       GUI_SRC         = gui.c gui_photon.c pty.c
-       GUI_OBJ         =
-       GUI_DEFS        = -DFEAT_GUI_PHOTON
-       GUI_IPATH       =
-       GUI_LIBS_DIR    =
-       GUI_LIBS1       = -lph -lphexlib
-       GUI_LIBS2       =
-       GUI_TARGETS     = installglinks
-       GUI_MAN_TARGETS = installghelplinks
-       GUI_TESTTARGET  = gui
+        GUI_SRC         = gui.c gui_photon.c pty.c
+        GUI_OBJ         =
+        GUI_DEFS        = -DFEAT_GUI_PHOTON
+        GUI_IPATH       =
+        GUI_LIBS_DIR    =
+        GUI_LIBS1       = -lph -lphexlib
+        GUI_LIBS2       =
+        GUI_TARGETS     = installglinks
+        GUI_MAN_TARGETS = installghelplinks
+        GUI_TESTTARGET  = gui
     *
-       GUI_SRC         =
-       GUI_OBJ         =
-       GUI_DEFS        =
-       GUI_IPATH       =
-       GUI_LIBS_DIR    =
-       GUI_LIBS1       =
-       GUI_LIBS2       =
-       GUI_TARGETS     =
-       GUI_MAN_TARGETS =
-       GUI_TESTTARGET  =
+        GUI_SRC         =
+        GUI_OBJ         =
+        GUI_DEFS        =
+        GUI_IPATH       =
+        GUI_LIBS_DIR    =
+        GUI_LIBS1       =
+        GUI_LIBS2       =
+        GUI_TARGETS     =
+        GUI_MAN_TARGETS =
+        GUI_TESTTARGET  =
 
 
 PRE_DEFS = -Iproto -I. $DEFS $GUI_DEFS $GUI_IPATH $CPPFLAGS $?(EXTRA_IPATHS)
@@ -216,71 +216,71 @@ CLEANFILES += gui_kde_wid_moc.cc kvim_iface_skel.cc *.kidl
 #     update to a newer version of A-A-P.
 @if not has_target("fetch"):
     fetch:
-       :execute ../main.aap fetch
+        :execute ../main.aap fetch
 
 
 # All the source files that need to be compiled.
 # Some are optional and depend on configure.
 # "version.c" is missing, it's always compiled (see below).
 Source =
-       buffer.c
-       charset.c
-       diff.c
-       digraph.c
-       edit.c
-       eval.c
-       ex_cmds.c
-       ex_cmds2.c
-       ex_docmd.c
-       ex_eval.c
-       ex_getln.c
-       fileio.c
-       fold.c
-       getchar.c
+        buffer.c
+        charset.c
+        diff.c
+        digraph.c
+        edit.c
+        eval.c
+        ex_cmds.c
+        ex_cmds2.c
+        ex_docmd.c
+        ex_eval.c
+        ex_getln.c
+        fileio.c
+        fold.c
+        getchar.c
         hardcopy.c
-       hashtable.c
-       if_cscope.c
-       if_xcmdsrv.c
-       main.c
-       mark.c
-       memfile.c
-       memline.c
-       menu.c
-       message.c
-       misc1.c
-       misc2.c
-       move.c
-       mbyte.c
-       normal.c
-       ops.c
-       option.c
-       os_unix.c
-       auto/pathdef.c
-       quickfix.c
-       regexp.c
-       screen.c
-       search.c
-       spell.c
-       syntax.c
-       tag.c
-       term.c
-       ui.c
-       undo.c
-       window.c
-       $OS_EXTRA_SRC
-       $GUI_SRC
-       $HANGULIN_SRC
+        hashtable.c
+        if_cscope.c
+        if_xcmdsrv.c
+        main.c
+        mark.c
+        memfile.c
+        memline.c
+        menu.c
+        message.c
+        misc1.c
+        misc2.c
+        move.c
+        mbyte.c
+        normal.c
+        ops.c
+        option.c
+        os_unix.c
+        auto/pathdef.c
+        quickfix.c
+        regexp.c
+        screen.c
+        search.c
+        spell.c
+        syntax.c
+        tag.c
+        term.c
+        ui.c
+        undo.c
+        window.c
+        $OS_EXTRA_SRC
+        $GUI_SRC
+        $HANGULIN_SRC
         $MZSCHEME_SRC
-       $PERL_SRC
-       $NETBEANS_SRC
-       $PYTHON_SRC
-       $TCL_SRC
-       $RUBY_SRC
-       $SNIFF_SRC
-       $WORKSHOP_SRC
+        $PERL_SRC
+        $NETBEANS_SRC
+        $PYTHON_SRC
+        $TCL_SRC
+        $RUBY_SRC
+        $SNIFF_SRC
+        $WORKSHOP_SRC
 
 Objects =
-       $GUI_OBJ
+        $GUI_OBJ
 
 # TODO: make is still used for subdirectories, need to write a recipe.
 MAKE ?= make
@@ -306,48 +306,48 @@ SRCPATH += auto
 :program $Target : $Source $Objects
 
 :action build my_prog object
-       version_obj = `src2obj("version.c")`
-       :do compile {target = $version_obj} version.c
-       #:do build {target = $target {filetype = program}} $source $version_obj
-       link_sed = $BDIR/link.sed
-       @if os.path.exists(link_sed):
-           :move {force} $link_sed auto/link.sed
-       @else:
-           :del {force} auto/link.sed
-       :update link2.sh
-       :sys LINK="$?(PURIFY) $?(SHRPENV) $CC $LDFLAGS \
-               -o $target $source $version_obj $LIBS" \
-               MAKE="aap" sh ./link2.sh
-       :copy {force} auto/link.sed $BDIR/link.sed
+        version_obj = `src2obj("version.c")`
+        :do compile {target = $version_obj} version.c
+        #:do build {target = $target {filetype = program}} $source $version_obj
+        link_sed = $BDIR/link.sed
+        @if os.path.exists(link_sed):
+            :move {force} $link_sed auto/link.sed
+        @else:
+            :del {force} auto/link.sed
+        :update link2.sh
+        :sys LINK="$?(PURIFY) $?(SHRPENV) $CC $LDFLAGS \
+                -o $target $source $version_obj $LIBS" \
+                MAKE="aap" sh ./link2.sh
+        :copy {force} auto/link.sed $BDIR/link.sed
 
 # "link.sh" must be modified for A-A-P
 link2.sh : link.sh
     :print Adjusting $-source for A-A-P.
     :cat $source | :eval re.sub("objects/pathdef.o", "pathdef", stdin)
-                                                                     >! $target
+                                                                      >! $target
 
 xxd/xxd$EXESUF: xxd/xxd.c
     :sys cd xxd; CC="$CC" CFLAGS="$CPPFLAGS $CFLAGS" \
-           $MAKE -f Makefile
+            $MAKE -f Makefile
 
 # Build the language specific files if they were unpacked.
 # Generate the converted .mo files separately, it's no problem if this fails.
 languages {virtual}:
-       @if _no.MAKEMO:
-           :sys cd $PODIR; CC="$CC" $MAKE prefix=$DESTDIR$prefix
-           @try:
-               :sys cd $PODIR; CC="$CC" $MAKE prefix=$DESTDIR$prefix converted
-           @except:
-               :print Generated converted language files failed, continuing
+        @if _no.MAKEMO:
+            :sys cd $PODIR; CC="$CC" $MAKE prefix=$DESTDIR$prefix
+            @try:
+                :sys cd $PODIR; CC="$CC" $MAKE prefix=$DESTDIR$prefix converted
+            @except:
+                :print Generated converted language files failed, continuing
 
 # Update the *.po files for changes in the sources.  Only run manually.
 update-po {virtual}:
-       cd $PODIR; CC="$CC" $MAKE prefix=$DESTDIR$prefix update-po
+        cd $PODIR; CC="$CC" $MAKE prefix=$DESTDIR$prefix update-po
 
 auto/if_perl.c: if_perl.xs
-       :sys $PERL -e 'unless ( $$] >= 5.005 ) { for (qw(na defgv errgv)) { print "#define PL_$$_ $$_\n" }}' > $target
-       :sys $PERL $PERLLIB/ExtUtils/xsubpp -prototypes -typemap \
-           $PERLLIB/ExtUtils/typemap if_perl.xs >> $target
+        :sys $PERL -e 'unless ( $$] >= 5.005 ) { for (qw(na defgv errgv)) { print "#define PL_$$_ $$_\n" }}' > $target
+        :sys $PERL $PERLLIB/ExtUtils/xsubpp -prototypes -typemap \
+            $PERLLIB/ExtUtils/typemap if_perl.xs >> $target
 
 $BDIR/gui_kde_wid.o: gui_kde_wid.cc
         :sys $MOC -o gui_kde_wid_moc.cc gui_kde_wid.h
@@ -364,63 +364,63 @@ kvim_iface_skel.cc: $BDIR/gui_kde_wid.o
 
 
 auto/osdef.h: auto/config.h osdef.sh osdef1.h.in osdef2.h.in
-       :sys CC="$CC $CFLAGS" srcdir=$srcdir sh $srcdir/osdef.sh
+        :sys CC="$CC $CFLAGS" srcdir=$srcdir sh $srcdir/osdef.sh
 
 pathdef {virtual} : $BDIR/auto/pathdef$OBJSUF
 
 auto/pathdef.c: auto/config.aap
-       :print Creating $target
-       :print >! $target /* pathdef.c */
-       :print >> $target /* This file is automatically created by main.aap */
-       :print >> $target /* DO NOT EDIT!  Change main.aap only. */
-       :print >> $target $#include "vim.h"
-       :print >> $target char_u *default_vim_dir = (char_u *)"$VIMRCLOC";
-       :print >> $target char_u *default_vimruntime_dir = (char_u *)"$?VIMRUNTIMEDIR";
-       v = $CC -c -I$srcdir $CFLAGS
+        :print Creating $target
+        :print >! $target /* pathdef.c */
+        :print >> $target /* This file is automatically created by main.aap */
+        :print >> $target /* DO NOT EDIT!  Change main.aap only. */
+        :print >> $target $#include "vim.h"
+        :print >> $target char_u *default_vim_dir = (char_u *)"$VIMRCLOC";
+        :print >> $target char_u *default_vimruntime_dir = (char_u *)"$?VIMRUNTIMEDIR";
+        v = $CC -c -I$srcdir $CFLAGS
         @v = string.replace(v, '"', '\\"')
-       :print >> $target char_u *all_cflags = (char_u *)"$v";
-       linkcmd = $CC $LDFLAGS -o $VIMTARGET $LIBS
-       link_sed = $BDIR/link.sed
-       @if os.path.exists(link_sed):
-           # filter $linkcmd through $BDIR/link.sed
-           :print $linkcmd | :syseval sed -f $link_sed | :eval re.sub("\n", "", stdin) | :assign linkcmd
+        :print >> $target char_u *all_cflags = (char_u *)"$v";
+        linkcmd = $CC $LDFLAGS -o $VIMTARGET $LIBS
+        link_sed = $BDIR/link.sed
+        @if os.path.exists(link_sed):
+            # filter $linkcmd through $BDIR/link.sed
+            :print $linkcmd | :syseval sed -f $link_sed | :eval re.sub("\n", "", stdin) | :assign linkcmd
         @linkcmd = string.replace(linkcmd, '"', '\\"')
-       :print >> $target char_u *all_lflags = (char_u *)"$linkcmd";
-       @if _no.get("COMPILEDBY"):
-           who = $COMPILEDBY
-           where = ''
-       @else:
-           :syseval whoami | :eval re.sub("\n", "", stdin) | :assign who
+        :print >> $target char_u *all_lflags = (char_u *)"$linkcmd";
+        @if _no.get("COMPILEDBY"):
+            who = $COMPILEDBY
+            where = ''
+        @else:
+            :syseval whoami | :eval re.sub("\n", "", stdin) | :assign who
 
-           :syseval hostname | :eval re.sub("\n", "", stdin) | :assign where
-       :print >> $target char_u *compiled_user = (char_u *)"$who";
-       :print >> $target char_u *compiled_sys = (char_u *)"$where";
+            :syseval hostname | :eval re.sub("\n", "", stdin) | :assign where
+        :print >> $target char_u *compiled_user = (char_u *)"$who";
+        :print >> $target char_u *compiled_sys = (char_u *)"$where";
 
 
 ### Names of the programs and targets
-VIMTARGET      = $VIMNAME$EXESUF
-EXTARGET       = $EXNAME$LNKSUF
-VIEWTARGET     = $VIEWNAME$LNKSUF
-GVIMNAME       = g$VIMNAME
-GVIMTARGET     = $GVIMNAME$LNKSUF
-GVIEWNAME      = g$VIEWNAME
-GVIEWTARGET    = $GVIEWNAME$LNKSUF
-RVIMNAME       = r$VIMNAME
-RVIMTARGET     = $RVIMNAME$LNKSUF
-RVIEWNAME      = r$VIEWNAME
-RVIEWTARGET    = $RVIEWNAME$LNKSUF
-RGVIMNAME      = r$GVIMNAME
-RGVIMTARGET    = $RGVIMNAME$LNKSUF
-RGVIEWNAME     = r$GVIEWNAME
-RGVIEWTARGET   = $RGVIEWNAME$LNKSUF
-VIMDIFFNAME    = $(VIMNAME)diff
-GVIMDIFFNAME   = g$VIMDIFFNAME
-VIMDIFFTARGET  = $VIMDIFFNAME$LNKSUF
-GVIMDIFFTARGET = $GVIMDIFFNAME$LNKSUF
-EVIMNAME       = e$VIMNAME
-EVIMTARGET     = $EVIMNAME$LNKSUF
-EVIEWNAME      = e$VIEWNAME
-EVIEWTARGET    = $EVIEWNAME$LNKSUF
+VIMTARGET       = $VIMNAME$EXESUF
+EXTARGET        = $EXNAME$LNKSUF
+VIEWTARGET      = $VIEWNAME$LNKSUF
+GVIMNAME        = g$VIMNAME
+GVIMTARGET      = $GVIMNAME$LNKSUF
+GVIEWNAME       = g$VIEWNAME
+GVIEWTARGET     = $GVIEWNAME$LNKSUF
+RVIMNAME        = r$VIMNAME
+RVIMTARGET      = $RVIMNAME$LNKSUF
+RVIEWNAME       = r$VIEWNAME
+RVIEWTARGET     = $RVIEWNAME$LNKSUF
+RGVIMNAME       = r$GVIMNAME
+RGVIMTARGET     = $RGVIMNAME$LNKSUF
+RGVIEWNAME      = r$GVIEWNAME
+RGVIEWTARGET    = $RGVIEWNAME$LNKSUF
+VIMDIFFNAME     = $(VIMNAME)diff
+GVIMDIFFNAME    = g$VIMDIFFNAME
+VIMDIFFTARGET   = $VIMDIFFNAME$LNKSUF
+GVIMDIFFTARGET  = $GVIMDIFFNAME$LNKSUF
+EVIMNAME        = e$VIMNAME
+EVIMTARGET      = $EVIMNAME$LNKSUF
+EVIEWNAME       = e$VIEWNAME
+EVIEWTARGET     = $EVIEWNAME$LNKSUF
 
 ### Names of the tools that are also made
 TOOLS = xxd/xxd$EXESUF
@@ -453,67 +453,67 @@ TUTORSUBDIR = /tutor
 PRINTSUBDIR = /print
 PODIR = po
 
-### VIMLOC     common root of the Vim files (all versions)
-### VIMRTLOC   common root of the runtime Vim files (this version)
-### VIMRCLOC   compiled-in location for global [g]vimrc files (all versions)
+### VIMLOC      common root of the Vim files (all versions)
+### VIMRTLOC    common root of the runtime Vim files (this version)
+### VIMRCLOC    compiled-in location for global [g]vimrc files (all versions)
 ### VIMRUNTIMEDIR  compiled-in location for runtime files (optional)
-### HELPSUBLOC location for help files
-### COLSUBLOC  location for colorscheme files
-### SYNSUBLOC  location for syntax files
-### INDSUBLOC  location for indent files
-### AUTOSUBLOC location for standard autoload files
-### PLUGSUBLOC location for standard plugin files
+### HELPSUBLOC  location for help files
+### COLSUBLOC   location for colorscheme files
+### SYNSUBLOC   location for syntax files
+### INDSUBLOC   location for indent files
+### AUTOSUBLOC  location for standard autoload files
+### PLUGSUBLOC  location for standard plugin files
 ### FTPLUGSUBLOC  location for ftplugin files
-### LANGSUBLOC location for language files
-### COMPSUBLOC location for compiler files
-### KMAPSUBLOC location for keymap files
-### MACROSUBLOC        location for macro files
-### TOOLSSUBLOC        location for tools files
-### TUTORSUBLOC        location for tutor files
-### PRINTSUBLOC        location for print files
-### SCRIPTLOC  location for script files (menu.vim, bugreport.vim, ..)
+### LANGSUBLOC  location for language files
+### COMPSUBLOC  location for compiler files
+### KMAPSUBLOC  location for keymap files
+### MACROSUBLOC location for macro files
+### TOOLSSUBLOC location for tools files
+### TUTORSUBLOC location for tutor files
+### PRINTSUBLOC location for print files
+### SCRIPTLOC   location for script files (menu.vim, bugreport.vim, ..)
 ### You can override these if you want to install them somewhere else.
 ### Edit feature.h for compile-time settings.
-VIMLOC         = $DATADIR$VIMDIR
-VIMRTLOC       = $DATADIR$VIMDIR$VIMRTDIR
-VIMRCLOC       = $VIMLOC
-HELPSUBLOC     = $VIMRTLOC$HELPSUBDIR
-COLSUBLOC      = $VIMRTLOC$COLSUBDIR
-SYNSUBLOC      = $VIMRTLOC$SYNSUBDIR
-INDSUBLOC      = $VIMRTLOC$INDSUBDIR
-AUTOSUBLOC     = $VIMRTLOC$AUTOSUBDIR
-PLUGSUBLOC     = $VIMRTLOC$PLUGSUBDIR
-FTPLUGSUBLOC   = $VIMRTLOC$FTPLUGSUBDIR
-LANGSUBLOC     = $VIMRTLOC$LANGSUBDIR
-COMPSUBLOC     = $VIMRTLOC$COMPSUBDIR
-KMAPSUBLOC     = $VIMRTLOC$KMAPSUBDIR
-MACROSUBLOC    = $VIMRTLOC$MACROSUBDIR
-TOOLSSUBLOC    = $VIMRTLOC$TOOLSSUBDIR
-TUTORSUBLOC    = $VIMRTLOC$TUTORSUBDIR
-PRINTSUBLOC    = $VIMRTLOC$PRINTSUBDIR
-SCRIPTLOC      = $VIMRTLOC
+VIMLOC          = $DATADIR$VIMDIR
+VIMRTLOC        = $DATADIR$VIMDIR$VIMRTDIR
+VIMRCLOC        = $VIMLOC
+HELPSUBLOC      = $VIMRTLOC$HELPSUBDIR
+COLSUBLOC       = $VIMRTLOC$COLSUBDIR
+SYNSUBLOC       = $VIMRTLOC$SYNSUBDIR
+INDSUBLOC       = $VIMRTLOC$INDSUBDIR
+AUTOSUBLOC      = $VIMRTLOC$AUTOSUBDIR
+PLUGSUBLOC      = $VIMRTLOC$PLUGSUBDIR
+FTPLUGSUBLOC    = $VIMRTLOC$FTPLUGSUBDIR
+LANGSUBLOC      = $VIMRTLOC$LANGSUBDIR
+COMPSUBLOC      = $VIMRTLOC$COMPSUBDIR
+KMAPSUBLOC      = $VIMRTLOC$KMAPSUBDIR
+MACROSUBLOC     = $VIMRTLOC$MACROSUBDIR
+TOOLSSUBLOC     = $VIMRTLOC$TOOLSSUBDIR
+TUTORSUBLOC     = $VIMRTLOC$TUTORSUBDIR
+PRINTSUBLOC     = $VIMRTLOC$PRINTSUBDIR
+SCRIPTLOC       = $VIMRTLOC
 
 ### Only set VIMRUNTIMEDIR when VIMRTLOC is set to a different location and
 ### the runtime directory is not below it.
 #VIMRUNTIMEDIR = $VIMRTLOC
 
 ### Name of the evim file target.
-EVIM_FILE      = $DESTDIR$SCRIPTLOC/evim.vim
-MSWIN_FILE     = $DESTDIR$SCRIPTLOC/mswin.vim
+EVIM_FILE       = $DESTDIR$SCRIPTLOC/evim.vim
+MSWIN_FILE      = $DESTDIR$SCRIPTLOC/mswin.vim
 
 ### Name of the menu file target.
-SYS_MENU_FILE  = $DESTDIR$SCRIPTLOC/menu.vim
+SYS_MENU_FILE   = $DESTDIR$SCRIPTLOC/menu.vim
 SYS_SYNMENU_FILE = $DESTDIR$SCRIPTLOC/synmenu.vim
 SYS_DELMENU_FILE = $DESTDIR$SCRIPTLOC/delmenu.vim
 
 ### Name of the bugreport file target.
-SYS_BUGR_FILE  = $DESTDIR$SCRIPTLOC/bugreport.vim
+SYS_BUGR_FILE   = $DESTDIR$SCRIPTLOC/bugreport.vim
 
 ### Name of the file type detection file target.
 SYS_FILETYPE_FILE = $DESTDIR$SCRIPTLOC/filetype.vim
 
 ### Name of the file type detection file target.
-SYS_FTOFF_FILE = $DESTDIR$SCRIPTLOC/ftoff.vim
+SYS_FTOFF_FILE  = $DESTDIR$SCRIPTLOC/ftoff.vim
 
 ### Name of the file type detection script file target.
 SYS_SCRIPTS_FILE = $DESTDIR$SCRIPTLOC/scripts.vim
@@ -622,9 +622,9 @@ DEST_MAN = $DESTDIR$MANSUBDIR
 
 # These are directories, create them when needed.
 :attr {directory = $DIRMOD} $DEST_BIN $DEST_VIM $DEST_RT $DEST_HELP $DEST_COL
-               $DEST_SYN $DEST_IND $DEST_AUTO $DEST_PLUG $DEST_FTP $DEST_LANG
-               $DEST_COMP $DEST_KMAP $DEST_MACRO $DEST_TOOLS $DEST_TUTOR
-               $DEST_SCRIPT $DEST_PRINT $DEST_MAN
+                $DEST_SYN $DEST_IND $DEST_AUTO $DEST_PLUG $DEST_FTP $DEST_LANG
+                $DEST_COMP $DEST_KMAP $DEST_MACRO $DEST_TOOLS $DEST_TUTOR
+                $DEST_SCRIPT $DEST_PRINT $DEST_MAN
 
 #
 # I N S T A L L
@@ -640,235 +640,235 @@ install:
         :update installvim installtools install-languages install-icons
     @else:
         # Bin directory is not writable, need to become root.
-       :print The destination directory "$DEST_BIN" is not writable.
-       :print If this is the wrong directory, use PREFIX to specify another one.
+        :print The destination directory "$DEST_BIN" is not writable.
+        :print If this is the wrong directory, use PREFIX to specify another one.
         :print Otherwise, type the root password to continue installing.
         :asroot $AAP install
 
 installvim {virtual}: installvimbin installruntime installlinks \
-                       installhelplinks installmacros installtutor
+                        installhelplinks installmacros installtutor
 
 installvimbin {virtual}{force}: $Target $DEST_BIN
-       exe = $DEST_BIN/$VIMTARGET
-       @if os.path.exists(exe):
-           # Move the old executable aside and delete it.  Any other method
-           # may cause a crash if the executable is currently being used.
-           :move {force} $exe $(exe).rm
-           :del {force} $(exe).rm
-       :copy $VIMTARGET $DEST_BIN
-       :do strip $exe
-       :chmod $BINMOD $DEST_BIN/$VIMTARGET
+        exe = $DEST_BIN/$VIMTARGET
+        @if os.path.exists(exe):
+            # Move the old executable aside and delete it.  Any other method
+            # may cause a crash if the executable is currently being used.
+            :move {force} $exe $(exe).rm
+            :del {force} $(exe).rm
+        :copy $VIMTARGET $DEST_BIN
+        :do strip $exe
+        :chmod $BINMOD $DEST_BIN/$VIMTARGET
 # may create a link to the new executable from /usr/bin/vi
-       @if _no.get("LINKIT"):
-           :sys $LINKIT
+        @if _no.get("LINKIT"):
+            :sys $LINKIT
 
 # install the help files; first adjust the contents for the location
 installruntime {virtual}{force}: $HELPSOURCE/vim.1 $DEST_MAN $DEST_VIM
-               $DEST_RT $DEST_HELP $DEST_COL $DEST_SYN $DEST_IND
-               $DEST_FTP $DEST_AUTO $DEST_PLUG $DEST_TUTOR $DEST_COMP
+                $DEST_RT $DEST_HELP $DEST_COL $DEST_SYN $DEST_IND
+                $DEST_FTP $DEST_AUTO $DEST_PLUG $DEST_TUTOR $DEST_COMP
                 $DEST_PRINT
-       :print generating $DEST_MAN/$(VIMNAME).1
-       :cat $HELPSOURCE/vim.1 |
-               :eval re.sub("/usr/local/lib/vim", _no.VIMLOC, stdin) |
-               :eval re.sub(_no.VIMLOC + "/doc", _no.HELPSUBLOC, stdin) |
-               :eval re.sub(_no.VIMLOC + "/syntax", _no.SYNSUBLOC, stdin) |
-               :eval re.sub(_no.VIMLOC + "/tutor", _no.TUTORSUBLOC, stdin) |
-               :eval re.sub(_no.VIMLOC + "/vimrc",
-                                              _no.VIMRCLOC + "/vimrc", stdin) |
-               :eval re.sub(_no.VIMLOC + "/gvimrc",
-                                             _no.VIMRCLOC + "/gvimrc", stdin) |
-               :eval re.sub(_no.VIMLOC + "/menu.vim",
-                                          _no.SCRIPTLOC + "/menu.vim", stdin) |
-               :eval re.sub(_no.VIMLOC + "/bugreport.vim",
-                                     _no.SCRIPTLOC + "/bugreport.vim", stdin) |
-               :eval re.sub(_no.VIMLOC + "/filetype.vim",
-                                      _no.SCRIPTLOC + "/filetype.vim", stdin) |
-               :eval re.sub(_no.VIMLOC + "/ftoff.vim",
-                                         _no.SCRIPTLOC + "/ftoff.vim", stdin) |
-               :eval re.sub(_no.VIMLOC + "/scripts.vim",
-                                       _no.SCRIPTLOC + "/scripts.vim", stdin) |
-               :eval re.sub(_no.VIMLOC + "/optwin.vim",
-                                        _no.SCRIPTLOC + "/optwin.vim", stdin) |
-               :eval re.sub(_no.VIMLOC + "/\\*.ps",
-                                                _no.SCRIPTLOC + "/*.ps", stdin)
-               >! $DEST_MAN/$(VIMNAME).1
-       :chmod $MANMOD $DEST_MAN/$(VIMNAME).1
-
-       :print generating $DEST_MAN/$(VIMNAME)tutor.1
-       :cat $HELPSOURCE/vimtutor.1 |
-               :eval re.sub("/usr/local/lib/vim", _no.VIMLOC, stdin) |
-               :eval re.sub(_no.VIMLOC + "/tutor", _no.TUTORSUBLOC, stdin)
-               >! $DEST_MAN/$(VIMNAME)tutor.1
-       :chmod $MANMOD $DEST_MAN/$(VIMNAME)tutor.1
-
-       :copy $HELPSOURCE/vimdiff.1 $DEST_MAN/$(VIMDIFFNAME).1
-       :chmod $MANMOD $DEST_MAN/$(VIMDIFFNAME).1
-
-       :print generating $DEST_MAN/$(EVIMNAME).1
-       :cat $HELPSOURCE/evim.1 |
-               :eval re.sub("/usr/local/lib/vim", _no.SCRIPTLOC, stdin)
-               >! $DEST_MAN/$(EVIMNAME).1
-       :chmod $MANMOD $DEST_MAN/$(EVIMNAME).1
+        :print generating $DEST_MAN/$(VIMNAME).1
+        :cat $HELPSOURCE/vim.1 |
+                :eval re.sub("/usr/local/lib/vim", _no.VIMLOC, stdin) |
+                :eval re.sub(_no.VIMLOC + "/doc", _no.HELPSUBLOC, stdin) |
+                :eval re.sub(_no.VIMLOC + "/syntax", _no.SYNSUBLOC, stdin) |
+                :eval re.sub(_no.VIMLOC + "/tutor", _no.TUTORSUBLOC, stdin) |
+                :eval re.sub(_no.VIMLOC + "/vimrc",
+                                               _no.VIMRCLOC + "/vimrc", stdin) |
+                :eval re.sub(_no.VIMLOC + "/gvimrc",
+                                              _no.VIMRCLOC + "/gvimrc", stdin) |
+                :eval re.sub(_no.VIMLOC + "/menu.vim",
+                                           _no.SCRIPTLOC + "/menu.vim", stdin) |
+                :eval re.sub(_no.VIMLOC + "/bugreport.vim",
+                                      _no.SCRIPTLOC + "/bugreport.vim", stdin) |
+                :eval re.sub(_no.VIMLOC + "/filetype.vim",
+                                       _no.SCRIPTLOC + "/filetype.vim", stdin) |
+                :eval re.sub(_no.VIMLOC + "/ftoff.vim",
+                                          _no.SCRIPTLOC + "/ftoff.vim", stdin) |
+                :eval re.sub(_no.VIMLOC + "/scripts.vim",
+                                        _no.SCRIPTLOC + "/scripts.vim", stdin) |
+                :eval re.sub(_no.VIMLOC + "/optwin.vim",
+                                         _no.SCRIPTLOC + "/optwin.vim", stdin) |
+                :eval re.sub(_no.VIMLOC + "/\\*.ps",
+                                                 _no.SCRIPTLOC + "/*.ps", stdin)
+                >! $DEST_MAN/$(VIMNAME).1
+        :chmod $MANMOD $DEST_MAN/$(VIMNAME).1
+
+        :print generating $DEST_MAN/$(VIMNAME)tutor.1
+        :cat $HELPSOURCE/vimtutor.1 |
+                :eval re.sub("/usr/local/lib/vim", _no.VIMLOC, stdin) |
+                :eval re.sub(_no.VIMLOC + "/tutor", _no.TUTORSUBLOC, stdin)
+                >! $DEST_MAN/$(VIMNAME)tutor.1
+        :chmod $MANMOD $DEST_MAN/$(VIMNAME)tutor.1
+
+        :copy $HELPSOURCE/vimdiff.1 $DEST_MAN/$(VIMDIFFNAME).1
+        :chmod $MANMOD $DEST_MAN/$(VIMDIFFNAME).1
+
+        :print generating $DEST_MAN/$(EVIMNAME).1
+        :cat $HELPSOURCE/evim.1 |
+                :eval re.sub("/usr/local/lib/vim", _no.SCRIPTLOC, stdin)
+                >! $DEST_MAN/$(EVIMNAME).1
+        :chmod $MANMOD $DEST_MAN/$(EVIMNAME).1
 
         :cd $HELPSOURCE
         @try:
             XTRA = `glob.glob("*.??x")` `glob.glob("tags-??")`
         @except:
             XTRA =       # It's OK if there are no matches.
-       :copy *.txt tags $XTRA $DEST_HELP
+        :copy *.txt tags $XTRA $DEST_HELP
         :cd -
         :cd $DEST_HELP
-       :chmod $HELPMOD *.txt tags $XTRA
+        :chmod $HELPMOD *.txt tags $XTRA
         :cd -
-       :copy  $HELPSOURCE/*.pl $DEST_HELP
-       :chmod $SCRIPTMOD $DEST_HELP/*.pl
+        :copy  $HELPSOURCE/*.pl $DEST_HELP
+        :chmod $SCRIPTMOD $DEST_HELP/*.pl
 # install the menu files
-       :copy $SCRIPTSOURCE/menu.vim $SYS_MENU_FILE
-       :chmod $VIMSCRIPTMOD $SYS_MENU_FILE
-       :copy $SCRIPTSOURCE/synmenu.vim $SYS_SYNMENU_FILE
-       :chmod $VIMSCRIPTMOD $SYS_SYNMENU_FILE
-       :copy $SCRIPTSOURCE/delmenu.vim $SYS_DELMENU_FILE
-       :chmod $VIMSCRIPTMOD $SYS_DELMENU_FILE
+        :copy $SCRIPTSOURCE/menu.vim $SYS_MENU_FILE
+        :chmod $VIMSCRIPTMOD $SYS_MENU_FILE
+        :copy $SCRIPTSOURCE/synmenu.vim $SYS_SYNMENU_FILE
+        :chmod $VIMSCRIPTMOD $SYS_SYNMENU_FILE
+        :copy $SCRIPTSOURCE/delmenu.vim $SYS_DELMENU_FILE
+        :chmod $VIMSCRIPTMOD $SYS_DELMENU_FILE
 # install the evim file
-       :copy $SCRIPTSOURCE/mswin.vim $MSWIN_FILE
-       :chmod $VIMSCRIPTMOD $MSWIN_FILE
-       :copy $SCRIPTSOURCE/evim.vim $EVIM_FILE
-       :chmod $VIMSCRIPTMOD $EVIM_FILE
+        :copy $SCRIPTSOURCE/mswin.vim $MSWIN_FILE
+        :chmod $VIMSCRIPTMOD $MSWIN_FILE
+        :copy $SCRIPTSOURCE/evim.vim $EVIM_FILE
+        :chmod $VIMSCRIPTMOD $EVIM_FILE
 # install the bugreport file
-       :copy $SCRIPTSOURCE/bugreport.vim $SYS_BUGR_FILE
-       :chmod $VIMSCRIPTMOD $SYS_BUGR_FILE
+        :copy $SCRIPTSOURCE/bugreport.vim $SYS_BUGR_FILE
+        :chmod $VIMSCRIPTMOD $SYS_BUGR_FILE
 # install the example vimrc files
-       :copy $SCRIPTSOURCE/vimrc_example.vim $DEST_SCRIPT
-       :chmod $VIMSCRIPTMOD $DEST_SCRIPT/vimrc_example.vim
-       :copy $SCRIPTSOURCE/gvimrc_example.vim $DEST_SCRIPT
-       :chmod $VIMSCRIPTMOD $DEST_SCRIPT/gvimrc_example.vim
+        :copy $SCRIPTSOURCE/vimrc_example.vim $DEST_SCRIPT
+        :chmod $VIMSCRIPTMOD $DEST_SCRIPT/vimrc_example.vim
+        :copy $SCRIPTSOURCE/gvimrc_example.vim $DEST_SCRIPT
+        :chmod $VIMSCRIPTMOD $DEST_SCRIPT/gvimrc_example.vim
 # install the file type detection files
-       :copy $SCRIPTSOURCE/filetype.vim $SYS_FILETYPE_FILE
-       :chmod $VIMSCRIPTMOD $SYS_FILETYPE_FILE
-       :copy $SCRIPTSOURCE/ftoff.vim $SYS_FTOFF_FILE
-       :chmod $VIMSCRIPTMOD $SYS_FTOFF_FILE
-       :copy $SCRIPTSOURCE/scripts.vim $SYS_SCRIPTS_FILE
-       :chmod $VIMSCRIPTMOD $SYS_SCRIPTS_FILE
-       :copy $SCRIPTSOURCE/ftplugin.vim $SYS_FTPLUGIN_FILE
-       :chmod $VIMSCRIPTMOD $SYS_FTPLUGIN_FILE
-       :copy $SCRIPTSOURCE/ftplugof.vim $SYS_FTPLUGOF_FILE
-       :chmod $VIMSCRIPTMOD $SYS_FTPLUGOF_FILE
-       :copy $SCRIPTSOURCE/indent.vim $SYS_INDENT_FILE
-       :chmod $VIMSCRIPTMOD $SYS_INDENT_FILE
-       :copy $SCRIPTSOURCE/indoff.vim $SYS_INDOFF_FILE
-       :chmod $VIMSCRIPTMOD $SYS_INDOFF_FILE
-       :copy $SCRIPTSOURCE/optwin.vim $SYS_OPTWIN_FILE
-       :chmod $VIMSCRIPTMOD $SYS_OPTWIN_FILE
+        :copy $SCRIPTSOURCE/filetype.vim $SYS_FILETYPE_FILE
+        :chmod $VIMSCRIPTMOD $SYS_FILETYPE_FILE
+        :copy $SCRIPTSOURCE/ftoff.vim $SYS_FTOFF_FILE
+        :chmod $VIMSCRIPTMOD $SYS_FTOFF_FILE
+        :copy $SCRIPTSOURCE/scripts.vim $SYS_SCRIPTS_FILE
+        :chmod $VIMSCRIPTMOD $SYS_SCRIPTS_FILE
+        :copy $SCRIPTSOURCE/ftplugin.vim $SYS_FTPLUGIN_FILE
+        :chmod $VIMSCRIPTMOD $SYS_FTPLUGIN_FILE
+        :copy $SCRIPTSOURCE/ftplugof.vim $SYS_FTPLUGOF_FILE
+        :chmod $VIMSCRIPTMOD $SYS_FTPLUGOF_FILE
+        :copy $SCRIPTSOURCE/indent.vim $SYS_INDENT_FILE
+        :chmod $VIMSCRIPTMOD $SYS_INDENT_FILE
+        :copy $SCRIPTSOURCE/indoff.vim $SYS_INDOFF_FILE
+        :chmod $VIMSCRIPTMOD $SYS_INDOFF_FILE
+        :copy $SCRIPTSOURCE/optwin.vim $SYS_OPTWIN_FILE
+        :chmod $VIMSCRIPTMOD $SYS_OPTWIN_FILE
 # install the print resource files
-       :copy $PRINTSOURCE/*.ps $DEST_PRINT
-       :chmod $FILEMOD $DEST_PRINT/*.ps
+        :copy $PRINTSOURCE/*.ps $DEST_PRINT
+        :chmod $FILEMOD $DEST_PRINT/*.ps
 # install the colorscheme files
-       :copy $COLSOURCE/*.vim $COLSOURCE/README.txt $DEST_COL
-       :chmod $HELPMOD $DEST_COL/*.vim $DEST_COL/README.txt
+        :copy $COLSOURCE/*.vim $COLSOURCE/README.txt $DEST_COL
+        :chmod $HELPMOD $DEST_COL/*.vim $DEST_COL/README.txt
 # install the syntax files
-       :copy $SYNSOURCE/*.vim $SYNSOURCE/README.txt $DEST_SYN
-       :chmod $HELPMOD $DEST_SYN/*.vim $DEST_SYN/README.txt
+        :copy $SYNSOURCE/*.vim $SYNSOURCE/README.txt $DEST_SYN
+        :chmod $HELPMOD $DEST_SYN/*.vim $DEST_SYN/README.txt
 # install the indent files
-       :copy $INDSOURCE/*.vim $INDSOURCE/README.txt $DEST_IND
-       :chmod $HELPMOD $DEST_IND/*.vim
+        :copy $INDSOURCE/*.vim $INDSOURCE/README.txt $DEST_IND
+        :chmod $HELPMOD $DEST_IND/*.vim
 # install the standard autoload files
-       :copy $AUTOSOURCE/*.vim $AUTOSOURCE/README.txt $DEST_AUTO
-       :chmod $HELPMOD $DEST_AUTO/*.vim $DEST_AUTO/README.txt
+        :copy $AUTOSOURCE/*.vim $AUTOSOURCE/README.txt $DEST_AUTO
+        :chmod $HELPMOD $DEST_AUTO/*.vim $DEST_AUTO/README.txt
 # install the standard plugin files
-       :copy $PLUGSOURCE/*.vim $PLUGSOURCE/README.txt $DEST_PLUG
-       :chmod $HELPMOD $DEST_PLUG/*.vim $DEST_PLUG/README.txt
+        :copy $PLUGSOURCE/*.vim $PLUGSOURCE/README.txt $DEST_PLUG
+        :chmod $HELPMOD $DEST_PLUG/*.vim $DEST_PLUG/README.txt
 # install the ftplugin files
-       :copy $FTPLUGSOURCE/*.vim $FTPLUGSOURCE/README.txt $DEST_FTP
-       :chmod $HELPMOD $DEST_FTP/*.vim $DEST_FTP/README.txt
+        :copy $FTPLUGSOURCE/*.vim $FTPLUGSOURCE/README.txt $DEST_FTP
+        :chmod $HELPMOD $DEST_FTP/*.vim $DEST_FTP/README.txt
 # install the compiler files
-       :copy $COMPSOURCE/*.vim $COMPSOURCE/README.txt $DEST_COMP
-       :chmod $HELPMOD $DEST_COMP/*.vim $DEST_COMP/README.txt
+        :copy $COMPSOURCE/*.vim $COMPSOURCE/README.txt $DEST_COMP
+        :chmod $HELPMOD $DEST_COMP/*.vim $DEST_COMP/README.txt
 
 installmacros {virtual}{force}: $MACROSOURCE $DEST_VIM $DEST_RT $DEST_MACRO
-       :copy {recursive}{force} $MACROSOURCE/* $DEST_MACRO
-       # Delete any CVS and AAPDIR directories.
-       # Use the ":tree" command if possible.  It was added later, fall back
-       # to using "find" when it doesn't work.
-       @try:
-          :tree $DEST_MACRO {dirname = CVS}
-             :del {recursive} $name
-          :tree $DEST_MACRO {dirname = AAPDIR}
-             :del {recursive} $name
-          :tree $DEST_MACRO {dirname = .*}
-             :chmod $DIRMOD $name
-          :tree $DEST_MACRO {filename = .*}
-             :chmod $FILEMOD $name
-       @except:
-       @  ok, cvsdirs = redir_system('find %s -name CVS -print' % _no.DEST_MACRO)
-       @  if ok and cvsdirs:
-            :del {recursive} $cvsdirs
-          :sys chmod $DIRMOD ``find $DEST_MACRO -type d -print``
-          :sys chmod $FILEMOD ``find $DEST_MACRO -type f -print``
-       :chmod $SCRIPTMOD $DEST_MACRO/less.sh
+        :copy {recursive}{force} $MACROSOURCE/* $DEST_MACRO
+        # Delete any CVS and AAPDIR directories.
+        # Use the ":tree" command if possible.  It was added later, fall back
+        # to using "find" when it doesn't work.
+        @try:
+           :tree $DEST_MACRO {dirname = CVS}
+              :del {recursive} $name
+           :tree $DEST_MACRO {dirname = AAPDIR}
+              :del {recursive} $name
+           :tree $DEST_MACRO {dirname = .*}
+              :chmod $DIRMOD $name
+           :tree $DEST_MACRO {filename = .*}
+              :chmod $FILEMOD $name
+        @except:
+        @  ok, cvsdirs = redir_system('find %s -name CVS -print' % _no.DEST_MACRO)
+        @  if ok and cvsdirs:
+             :del {recursive} $cvsdirs
+           :sys chmod $DIRMOD ``find $DEST_MACRO -type d -print``
+           :sys chmod $FILEMOD ``find $DEST_MACRO -type f -print``
+        :chmod $SCRIPTMOD $DEST_MACRO/less.sh
 
 # install the tutor files
 installtutor {virtual}{force}: $TUTORSOURCE $DEST_VIM $DEST_RT $DEST_TUTOR
-       :copy vimtutor $DEST_BIN/$(VIMNAME)tutor
-       :chmod $SCRIPTMOD $DEST_BIN/$(VIMNAME)tutor
-       :copy $TUTORSOURCE/tutor* $TUTORSOURCE/README* $DEST_TUTOR
-       :chmod $HELPMOD $DEST_TUTOR/*
+        :copy vimtutor $DEST_BIN/$(VIMNAME)tutor
+        :chmod $SCRIPTMOD $DEST_BIN/$(VIMNAME)tutor
+        :copy $TUTORSOURCE/tutor* $TUTORSOURCE/README* $DEST_TUTOR
+        :chmod $HELPMOD $DEST_TUTOR/*
 
 # install helper program xxd
 installtools {virtual}{force}: $TOOLS $DEST_BIN $DEST_MAN \
-               $TOOLSSOURCE $DEST_VIM $DEST_RT $DEST_TOOLS
-       xxd = $DEST_BIN/xxd$EXESUF
-       @if os.path.exists(xxd):
-         :move {force} $xxd $(xxd).rm
-         :del $(xxd).rm
-       :copy xxd/xxd$EXESUF $DEST_BIN
-       :do strip $DEST_BIN/xxd$EXESUF
-       :chmod $BINMOD $DEST_BIN/xxd$EXESUF
-       :copy $HELPSOURCE/xxd.1 $DEST_MAN
-       :chmod $MANMOD $DEST_MAN/xxd.1
+                $TOOLSSOURCE $DEST_VIM $DEST_RT $DEST_TOOLS
+        xxd = $DEST_BIN/xxd$EXESUF
+        @if os.path.exists(xxd):
+          :move {force} $xxd $(xxd).rm
+          :del $(xxd).rm
+        :copy xxd/xxd$EXESUF $DEST_BIN
+        :do strip $DEST_BIN/xxd$EXESUF
+        :chmod $BINMOD $DEST_BIN/xxd$EXESUF
+        :copy $HELPSOURCE/xxd.1 $DEST_MAN
+        :chmod $MANMOD $DEST_MAN/xxd.1
 # install the runtime tools
-       @try:
-       @  if aap_has(":tree"):
-             # New method: copy everything and delete CVS and AAPDIR dirs
-             :copy {recursive} $TOOLSSOURCE/* $DEST_TOOLS
-             :tree $DEST_TOOLS {dirname = CVS}
-                :delete {recursive} $name
-             :tree $DEST_TOOLS {dirname = AAPDIR}
-                :delete {recursive} $name
-       @except:
-           # Old method: copy only specific files and directories.
-           :copy {recursive} $TOOLSSOURCE/README.txt $TOOLSSOURCE/[a-z]* $DEST_TOOLS
-       :chmod $FILEMOD $DEST_TOOLS/*
+        @try:
+        @  if aap_has(":tree"):
+              # New method: copy everything and delete CVS and AAPDIR dirs
+              :copy {recursive} $TOOLSSOURCE/* $DEST_TOOLS
+              :tree $DEST_TOOLS {dirname = CVS}
+                 :delete {recursive} $name
+              :tree $DEST_TOOLS {dirname = AAPDIR}
+                 :delete {recursive} $name
+        @except:
+            # Old method: copy only specific files and directories.
+            :copy {recursive} $TOOLSSOURCE/README.txt $TOOLSSOURCE/[a-z]* $DEST_TOOLS
+        :chmod $FILEMOD $DEST_TOOLS/*
 # replace the path in some tools
-       :progsearch perlpath perl
-       @if perlpath:
-           :cat $TOOLSSOURCE/efm_perl.pl |
-                   :eval re.sub("/usr/bin/perl", perlpath, stdin)
-                   >! $DEST_TOOLS/efm_perl.pl
-       @else:
-           :copy $TOOLSSOURCE/efm_perl.pl $DEST_TOOLS
-
-       :progsearch awkpath nawk gawk awk
-       @if awkpath:
-           :cat $TOOLSSOURCE/mve.awk |
-                   :eval re.sub("/usr/bin/nawk", awkpath, stdin)
-                   >! $DEST_TOOLS/mve.awk
-       @else:
-           :copy $TOOLSSOURCE/mve.awk $DEST_TOOLS
-
-       :sys chmod $SCRIPTMOD ``grep -l "^#!" $DEST_TOOLS/*``
+        :progsearch perlpath perl
+        @if perlpath:
+            :cat $TOOLSSOURCE/efm_perl.pl |
+                    :eval re.sub("/usr/bin/perl", perlpath, stdin)
+                    >! $DEST_TOOLS/efm_perl.pl
+        @else:
+            :copy $TOOLSSOURCE/efm_perl.pl $DEST_TOOLS
+
+        :progsearch awkpath nawk gawk awk
+        @if awkpath:
+            :cat $TOOLSSOURCE/mve.awk |
+                    :eval re.sub("/usr/bin/nawk", awkpath, stdin)
+                    >! $DEST_TOOLS/mve.awk
+        @else:
+            :copy $TOOLSSOURCE/mve.awk $DEST_TOOLS
+
+        :sys chmod $SCRIPTMOD ``grep -l "^#!" $DEST_TOOLS/*``
 
 # install the language specific files, if they were unpacked
 install-languages {virtual}{force}: languages $DEST_LANG $DEST_KMAP
-       @if _no.MAKEMO:
-          :sys cd $PODIR; $MAKE prefix=$DESTDIR$prefix \
-                   LOCALEDIR=$DEST_LANG INSTALL_DATA=cp FILEMOD=$FILEMOD install
-       @if os.path.exists(_no.LANGSOURCE):
-          :print installing language files
-          :copy $LANGSOURCE/README.txt $LANGSOURCE/*.vim $DEST_LANG
-          :chmod $FILEMOD $DEST_LANG/*.vim
-       @if os.path.exists(_no.KMAPSOURCE):
-          :copy $KMAPSOURCE/README.txt $KMAPSOURCE/*.vim $DEST_KMAP
-          :chmod $FILEMOD $DEST_KMAP/*.vim
+        @if _no.MAKEMO:
+           :sys cd $PODIR; $MAKE prefix=$DESTDIR$prefix \
+                    LOCALEDIR=$DEST_LANG INSTALL_DATA=cp FILEMOD=$FILEMOD install
+        @if os.path.exists(_no.LANGSOURCE):
+           :print installing language files
+           :copy $LANGSOURCE/README.txt $LANGSOURCE/*.vim $DEST_LANG
+           :chmod $FILEMOD $DEST_LANG/*.vim
+        @if os.path.exists(_no.KMAPSOURCE):
+           :copy $KMAPSOURCE/README.txt $KMAPSOURCE/*.vim $DEST_KMAP
+           :chmod $FILEMOD $DEST_KMAP/*.vim
 
 # Install the icons for the KDE GUI.  This differs from the KDE icons for
 # other GUIs.
@@ -890,38 +890,38 @@ ICON32PATH = $DESTDIR$DATADIR/icons/locolor/32x32/apps
 ICON16PATH = $DESTDIR$DATADIR/icons/locolor/16x16/apps
 KDEPATH = $HOME/.kde/share/icons
 install-icons {virtual}:
-       gp = $ICON48PATH/gvim.png
-       @if os.path.isdir(_no.ICON48PATH) and not os.path.exists(gp):
-          :copy $SCRIPTSOURCE/vim48x48.png $gp
-       gp = $ICON32PATH/gvim.png
-       @if os.path.isdir(_no.ICON32PATH) and not os.path.exists(gp):
-          :copy $SCRIPTSOURCE/vim32x32.png $gp
-       gp = $ICON16PATH/gvim.png
-       @if os.path.isdir(_no.ICON16PATH) and not os.path.exists(gp):
-          :copy $SCRIPTSOURCE/vim16x16.png $gp
+        gp = $ICON48PATH/gvim.png
+        @if os.path.isdir(_no.ICON48PATH) and not os.path.exists(gp):
+           :copy $SCRIPTSOURCE/vim48x48.png $gp
+        gp = $ICON32PATH/gvim.png
+        @if os.path.isdir(_no.ICON32PATH) and not os.path.exists(gp):
+           :copy $SCRIPTSOURCE/vim32x32.png $gp
+        gp = $ICON16PATH/gvim.png
+        @if os.path.isdir(_no.ICON16PATH) and not os.path.exists(gp):
+           :copy $SCRIPTSOURCE/vim16x16.png $gp
 
 
 $HELPSOURCE/vim.1 $MACROSOURCE $TOOLSSOURCE:
-       @if not os.path.exists(_no.TOOLSSOURCE):
-           :print Runtime files not found.
-           :error You need to unpack the runtime archive before running "make install".
+        @if not os.path.exists(_no.TOOLSSOURCE):
+            :print Runtime files not found.
+            :error You need to unpack the runtime archive before running "make install".
 
 # create links from various names to vim.  This is only done when the links
 # (or executables with the same name) don't exist yet.
 installlinks {virtual}: $GUI_TARGETS \
-                       $DEST_BIN/$EXTARGET \
-                       $DEST_BIN/$VIEWTARGET \
-                       $DEST_BIN/$RVIMTARGET \
-                       $DEST_BIN/$RVIEWTARGET \
-                       $INSTALLVIMDIFF
+                        $DEST_BIN/$EXTARGET \
+                        $DEST_BIN/$VIEWTARGET \
+                        $DEST_BIN/$RVIMTARGET \
+                        $DEST_BIN/$RVIEWTARGET \
+                        $INSTALLVIMDIFF
 
 installglinks {virtual}: $DEST_BIN/$GVIMTARGET \
-                       $DEST_BIN/$GVIEWTARGET \
-                       $DEST_BIN/$RGVIMTARGET \
-                       $DEST_BIN/$RGVIEWTARGET \
-                       $DEST_BIN/$EVIMTARGET \
-                       $DEST_BIN/$EVIEWTARGET \
-                       $INSTALLGVIMDIFF
+                        $DEST_BIN/$GVIEWTARGET \
+                        $DEST_BIN/$RGVIMTARGET \
+                        $DEST_BIN/$RGVIEWTARGET \
+                        $DEST_BIN/$EVIMTARGET \
+                        $DEST_BIN/$EVIEWTARGET \
+                        $INSTALLGVIMDIFF
 
 installvimdiff {virtual}: $DEST_BIN/$VIMDIFFTARGET
 installgvimdiff {virtual}: $DEST_BIN/$GVIMDIFFTARGET
@@ -964,20 +964,20 @@ $DEST_BIN/$EVIMTARGET: {buildcheck = }
 $DEST_BIN/$EVIEWTARGET: {buildcheck = }
     :sys cd $DEST_BIN; ln -s $VIMTARGET $EVIEWTARGET
 
-# create links for the manual pages with various names to vim. This is only
+# create links for the manual pages with various names to vim.  This is only
 # done when the links (or manpages with the same name) don't exist yet.
 installhelplinks {virtual}: $GUI_MAN_TARGETS \
-                       $DEST_MAN/$(EXNAME).1 \
-                       $DEST_MAN/$(VIEWNAME).1 \
-                       $DEST_MAN/$(RVIMNAME).1 \
-                       $DEST_MAN/$(RVIEWNAME).1
+                        $DEST_MAN/$(EXNAME).1 \
+                        $DEST_MAN/$(VIEWNAME).1 \
+                        $DEST_MAN/$(RVIMNAME).1 \
+                        $DEST_MAN/$(RVIEWNAME).1
 
 installghelplinks {virtual}: $DEST_MAN/$(GVIMNAME).1 \
-                       $DEST_MAN/$(GVIEWNAME).1 \
-                       $DEST_MAN/$(RGVIMNAME).1 \
-                       $DEST_MAN/$(RGVIEWNAME).1 \
-                       $DEST_MAN/$(GVIMDIFFNAME).1 \
-                       $DEST_MAN/$(EVIEWNAME).1
+                        $DEST_MAN/$(GVIEWNAME).1 \
+                        $DEST_MAN/$(RGVIMNAME).1 \
+                        $DEST_MAN/$(RGVIEWNAME).1 \
+                        $DEST_MAN/$(GVIMDIFFNAME).1 \
+                        $DEST_MAN/$(EVIEWNAME).1
 
 $DEST_MAN/$(EXNAME).1: {buildcheck = }
     :sys cd $DEST_MAN; ln -s $(VIMNAME).1 $(EXNAME).1
@@ -1056,11 +1056,11 @@ uninstall_runtime {virtual}{force}:
     :del {force} $DEST_AUTO/*.vim $DEST_AUTO/README.txt
     :del {force} $DEST_PLUG/*.vim $DEST_PLUG/README.txt
     :deldir {force} $DEST_FTP $DEST_AUTO $DEST_PLUG $DEST_PRINT $DEST_RT
-#      This will fail when other Vim versions are installed, no worries.
+#       This will fail when other Vim versions are installed, no worries.
     @try:
-       :deldir $DEST_VIM
+        :deldir $DEST_VIM
     @except:
-       :print Cannot delete $DEST_VIM
+        :print Cannot delete $DEST_VIM
 
 
 # vim: sts=4 sw=4 :
index 6daa365508b0f150ce7be586a6c2dc1fd07f7473..0a2fe995b855be8b0e1a6cbf57cc94fc9a8d149c 100644 (file)
@@ -3749,6 +3749,7 @@ tv_nr(tvs, idxp)
 
 /*
  * Get string argument from "idxp" entry in "tvs".  First entry is 1.
+ * Returns NULL for an error.
  */
     static char *
 tv_str(tvs, idxp)
index ac59320cfef5f1ef40aea7fe1dc52706fc8e4cca..c8a5a23216661f83a2ec1f90c1d3fd063eeaaf14 100644 (file)
@@ -20,6 +20,7 @@
 #include "vim.h"
 
 static void comp_botline __ARGS((win_T *wp));
+static int scrolljump_value __ARGS((void));
 static int check_top_offset __ARGS((void));
 static void curs_rows __ARGS((win_T *wp, int do_botline));
 static void validate_botline_win __ARGS((win_T *wp));
@@ -249,7 +250,7 @@ update_topline()
                scroll_cursor_halfway(FALSE);
            else
            {
-               scroll_cursor_top((int)p_sj, FALSE);
+               scroll_cursor_top(scrolljump_value(), FALSE);
                check_botline = TRUE;
            }
        }
@@ -341,7 +342,7 @@ update_topline()
                    line_count = curwin->w_cursor.lnum - curwin->w_botline
                                                                   + 1 + p_so;
                if (line_count <= curwin->w_height + 1)
-                   scroll_cursor_bot((int)p_sj, FALSE);
+                   scroll_cursor_bot(scrolljump_value(), FALSE);
                else
                    scroll_cursor_halfway(FALSE);
            }
@@ -376,6 +377,19 @@ update_topline()
 #endif
 }
 
+/*
+ * Return the scrolljump value to use for the current window.
+ * When 'scrolljump' is positive use it as-is.
+ * When 'scrolljump' is negative use it as a percentage of the window height.
+ */
+    static int
+scrolljump_value()
+{
+    if (p_sj >= 0)
+       return (int)p_sj;
+    return (curwin->w_height * -p_sj) / 100;
+}
+
 /*
  * Return TRUE when there are not 'scrolloff' lines above the cursor for the
  * current window.
index 96d9df2daf9521428d42268fa848337faa31fb61..d547edc1e59d8e0f3919cfbab8f6fd2cf158d06b 100644 (file)
@@ -7420,7 +7420,7 @@ set_num_option(opt_idx, varp, value, errbuf, errbuflen, opt_flags)
        errmsg = e_positive;
        p_report = 1;
     }
-    if ((p_sj < 0 || p_sj >= Rows) && full_screen)
+    if ((p_sj < -100 || p_sj >= Rows) && full_screen)
     {
        if (Rows != old_Rows)   /* Rows changed, just adjust p_sj */
            p_sj = Rows / 2;
index 113318782ef12b235218daadf3d7779c926755ff..e1e0d16e43911d31904fd770d59751c950e15d7f 100644 (file)
@@ -2215,8 +2215,10 @@ ex_make(eap)
     {
        apply_autocmds(EVENT_QUICKFIXCMDPRE, au_name,
                                               curbuf->b_fname, TRUE, curbuf);
+# ifdef FEAT_EVAL
        if (did_throw || force_abort)
            return;
+# endif
     }
 #endif
 
@@ -2974,6 +2976,7 @@ ex_cbuffer(eap)
     }
 }
 
+#if defined(FEAT_EVAL) || defined(PROTO)
 /*
  * ":cexpr {expr}" command.
  */
@@ -2994,6 +2997,7 @@ ex_cexpr(eap)
 
     clear_tv(tv);
 }
+#endif
 
 /*
  * ":helpgrep {pattern}"
index 2562e4b8bafeb831e86295c34030df4909c8c6ec..53447afb9bb1364ea8478a2cee52e0ab321924d3 100644 (file)
@@ -511,15 +511,15 @@ typedef struct suggest_S
 #define SCORE_RARE     180     /* rare word */
 #define SCORE_SWAP     90      /* swap two characters */
 #define SCORE_SWAP3    110     /* swap two characters in three */
-#define SCORE_REP      87      /* REP replacement */
+#define SCORE_REP      65      /* REP replacement */
 #define SCORE_SUBST    93      /* substitute a character */
 #define SCORE_SIMILAR  33      /* substitute a similar character */
 #define SCORE_SUBCOMP  33      /* substitute a composing character */
 #define SCORE_DEL      94      /* delete a character */
-#define SCORE_DELDUP   64      /* delete a duplicated character */
+#define SCORE_DELDUP   66      /* delete a duplicated character */
 #define SCORE_DELCOMP  28      /* delete a composing character */
 #define SCORE_INS      96      /* insert a character */
-#define SCORE_INSDUP   66      /* insert a duplicate character */
+#define SCORE_INSDUP   67      /* insert a duplicate character */
 #define SCORE_INSCOMP  30      /* insert a composing character */
 #define SCORE_NONWORD  103     /* change non-word to word char */
 
@@ -5049,7 +5049,17 @@ spell_read_aff(spin, fname)
                if (itemcnt > 3 && items[3][0] != '#')
                    smsg((char_u *)_(e_afftrailing), fname, lnum, items[3]);
                if (do_rep)
+               {
+                   /* Replace underscore with space (can't include a space
+                    * directly). */
+                   for (p = items[1]; *p != NUL; mb_ptr_adv(p))
+                       if (*p == '_')
+                           *p = ' ';
+                   for (p = items[2]; *p != NUL; mb_ptr_adv(p))
+                       if (*p == '_')
+                           *p = ' ';
                    add_fromto(spin, &spin->si_rep, items[1], items[2]);
+               }
            }
            else if (STRCMP(items[0], "MAP") == 0 && itemcnt == 2)
            {
@@ -11081,13 +11091,21 @@ add_suggestion(su, gap, goodword, badlen, score, altscore, had_bonus, slang)
     int                had_bonus;      /* value for st_had_bonus */
     slang_T    *slang;         /* language for sound folding */
 {
+    int                goodlen = STRLEN(goodword);
     suggest_T   *stp;
     int                i;
     char_u     *p = NULL;
     int                c = 0;
+    int                attr = 0;
+    char_u     longword[MAXWLEN + 1];
 
-    /* Check that the word wasn't banned. */
-    if (was_banned(su, goodword))
+    /* Check that the word really is valid.  Esp. for banned words and for
+     * split words, such as "the the".  Need to append what follows to check
+     * for that. */
+    STRCPY(longword, goodword);
+    vim_strncpy(longword + goodlen, su->su_badptr + badlen, MAXWLEN - goodlen);
+    (void)spell_check(curwin, longword, &attr, NULL);
+    if (attr != 0)
        return;
 
     /* If past "su_badlen" and the rest is identical stop at "su_badlen".
@@ -11097,7 +11115,7 @@ add_suggestion(su, gap, goodword, badlen, score, altscore, had_bonus, slang)
     {
        /* This assumes there was no case folding or it didn't change the
         * length... */
-       p = goodword + STRLEN(goodword) - i;
+       p = goodword + goodlen - i;
        if (p > goodword && STRNICMP(su->su_badptr + su->su_badlen, p, i) == 0)
        {
            badlen = su->su_badlen;
@@ -11112,7 +11130,7 @@ add_suggestion(su, gap, goodword, badlen, score, altscore, had_bonus, slang)
        /* When replacing part of the word check that we actually change
         * something.  For "the the" a suggestion can be replacing the first
         * "the" with itself, since "the" wasn't banned. */
-       if (badlen == (int)STRLEN(goodword)
+       if (badlen == (int)goodlen
                            && STRNCMP(su->su_badword, goodword, badlen) == 0)
            return;
     }
index a2dcc8951c2e744c5cd9330e246e9805eee4db9a..e3de1d63056a66712189b103b045f3acf2bb5d37 100644 (file)
@@ -33,7 +33,7 @@ STARTTEST
   normal 0f:]s
   let prevbad = ''
   while 1
-    let bad = spellbadword()
+    let [bad, a] = spellbadword()
     if bad == '' || bad == prevbad || bad == 'badend'
       break
     endif
@@ -64,31 +64,31 @@ gg:/^addstart/+1,/^addend/-1w! Xtest.utf-8.add
 :mkspell! Xtest.utf-8.add.spl Xtest.utf-8.add
 :set spellfile=Xtest.utf-8.add
 /^test2:
-]s:let str = spellbadword()
+]s:let [str, a] = spellbadword()
 :$put =str
 :set spl=Xtest_us.utf-8.spl
 /^test2:
-]smm:let str = spellbadword()
+]smm:let [str, a] = spellbadword()
 :$put =str
-`m]s:let str = spellbadword()
+`m]s:let [str, a] = spellbadword()
 :$put =str
 :set spl=Xtest_gb.utf-8.spl
 /^test2:
-]smm:let str = spellbadword()
+]smm:let [str, a] = spellbadword()
 :$put =str
-`m]s:let str = spellbadword()
+`m]s:let [str, a] = spellbadword()
 :$put =str
 :set spl=Xtest_nz.utf-8.spl
 /^test2:
-]smm:let str = spellbadword()
+]smm:let [str, a] = spellbadword()
 :$put =str
-`m]s:let str = spellbadword()
+`m]s:let [str, a] = spellbadword()
 :$put =str
 :set spl=Xtest_ca.utf-8.spl
 /^test2:
-]smm:let str = spellbadword()
+]smm:let [str, a] = spellbadword()
 :$put =str
-`m]s:let str = spellbadword()
+`m]s:let [str, a] = spellbadword()
 :$put =str
 :"
 :" Postponed prefixes
index 0cb24adaee5cb355ec867cada4dc6d2dbf2682a8..cf19c79ddbb8ac8f576dd6668d62d567824ca56e 100644 (file)
@@ -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 20)"
-#define VIM_VERSION_LONG_DATE  "VIM - Vi IMproved 7.0aa ALPHA (2005 Sep 20, compiled "
+#define VIM_VERSION_LONG       "VIM - Vi IMproved 7.0aa ALPHA (2005 Sep 25)"
+#define VIM_VERSION_LONG_DATE  "VIM - Vi IMproved 7.0aa ALPHA (2005 Sep 25, compiled "