Commits

Vinícius Figueiredo  committed 6565191

All dot files renamed to start with underline.
Created a simple bash script to install files on $HOME directory.

  • Participants
  • Parent commits 07768ab

Comments (0)

Files changed (23)

+[ui]
+editor = vim
+username = Vinicius Figueiredo <viniciusfs@gmail.com>
+
+[extensions]
+hgext.bookmarks =
+hggit =

File _vim/autoload/pythoncomplete.vim

+"pythoncomplete.vim - Omni Completion for python
+" Maintainer: Aaron Griffin <aaronmgriffin@gmail.com>
+" Version: 0.7
+" Last Updated: 19 Oct 2006
+"
+" Changes
+" TODO:
+" User defined docstrings aren't handled right...
+" 'info' item output can use some formatting work
+" Add an "unsafe eval" mode, to allow for return type evaluation
+" Complete basic syntax along with import statements
+"   i.e. "import url<c-x,c-o>"
+" Continue parsing on invalid line??
+"
+" v 0.7
+"   * Fixed function list sorting (_ and __ at the bottom)
+"   * Removed newline removal from docs.  It appears vim handles these better in
+"   recent patches
+"
+" v 0.6:
+"   * Fixed argument completion
+"   * Removed the 'kind' completions, as they are better indicated
+"   with real syntax
+"   * Added tuple assignment parsing (whoops, that was forgotten)
+"   * Fixed import handling when flattening scope
+"
+" v 0.5:
+" Yeah, I skipped a version number - 0.4 was never public.
+"  It was a bugfix version on top of 0.3.  This is a complete
+"  rewrite.
+"
+
+if !has('python')
+    echo "Error: Required vim compiled with +python"
+    finish
+endif
+
+function! pythoncomplete#Complete(findstart, base)
+    "findstart = 1 when we need to get the text length
+    if a:findstart == 1
+        let line = getline('.')
+        let idx = col('.')
+        while idx > 0
+            let idx -= 1
+            let c = line[idx]
+            if c =~ '\w'
+                continue
+            elseif ! c =~ '\.'
+                let idx = -1
+                break
+            else
+                break
+            endif
+        endwhile
+
+        return idx
+    "findstart = 0 when we need to return the list of completions
+    else
+        "vim no longer moves the cursor upon completion... fix that
+        let line = getline('.')
+        let idx = col('.')
+        let cword = ''
+        while idx > 0
+            let idx -= 1
+            let c = line[idx]
+            if c =~ '\w' || c =~ '\.' || c == '('
+                let cword = c . cword
+                continue
+            elseif strlen(cword) > 0 || idx == 0
+                break
+            endif
+        endwhile
+        execute "python vimcomplete('" . cword . "', '" . a:base . "')"
+        return g:pythoncomplete_completions
+    endif
+endfunction
+
+function! s:DefPython()
+python << PYTHONEOF
+import sys, tokenize, cStringIO, types
+from token import NAME, DEDENT, NEWLINE, STRING
+
+debugstmts=[]
+def dbg(s): debugstmts.append(s)
+def showdbg():
+    for d in debugstmts: print "DBG: %s " % d
+
+def vimcomplete(context,match):
+    global debugstmts
+    debugstmts = []
+    try:
+        import vim
+        def complsort(x,y):
+            try:
+                xa = x['abbr']
+                ya = y['abbr']
+                if xa[0] == '_':
+                    if xa[1] == '_' and ya[0:2] == '__':
+                        return xa > ya
+                    elif ya[0:2] == '__':
+                        return -1
+                    elif y[0] == '_':
+                        return xa > ya
+                    else:
+                        return 1
+                elif ya[0] == '_':
+                    return -1
+                else:
+                   return xa > ya
+            except:
+                return 0
+        cmpl = Completer()
+        cmpl.evalsource('\n'.join(vim.current.buffer),vim.eval("line('.')"))
+        all = cmpl.get_completions(context,match)
+        all.sort(complsort)
+        dictstr = '['
+        # have to do this for double quoting
+        for cmpl in all:
+            dictstr += '{'
+            for x in cmpl: dictstr += '"%s":"%s",' % (x,cmpl[x])
+            dictstr += '"icase":0},'
+        if dictstr[-1] == ',': dictstr = dictstr[:-1]
+        dictstr += ']'
+        #dbg("dict: %s" % dictstr)
+        vim.command("silent let g:pythoncomplete_completions = %s" % dictstr)
+        #dbg("Completion dict:\n%s" % all)
+    except vim.error:
+        dbg("VIM Error: %s" % vim.error)
+
+class Completer(object):
+    def __init__(self):
+       self.compldict = {}
+       self.parser = PyParser()
+
+    def evalsource(self,text,line=0):
+        sc = self.parser.parse(text,line)
+        src = sc.get_code()
+        dbg("source: %s" % src)
+        try: exec(src) in self.compldict
+        except: dbg("parser: %s, %s" % (sys.exc_info()[0],sys.exc_info()[1]))
+        for l in sc.locals:
+            try: exec(l) in self.compldict
+            except: dbg("locals: %s, %s [%s]" % (sys.exc_info()[0],sys.exc_info()[1],l))
+
+    def _cleanstr(self,doc):
+        return doc.replace('"',' ').replace("'",' ')
+
+    def get_arguments(self,func_obj):
+        def _ctor(obj):
+            try: return class_ob.__init__.im_func
+            except AttributeError:
+                for base in class_ob.__bases__:
+                    rc = _find_constructor(base)
+                    if rc is not None: return rc
+            return None
+
+        arg_offset = 1
+        if type(func_obj) == types.ClassType: func_obj = _ctor(func_obj)
+        elif type(func_obj) == types.MethodType: func_obj = func_obj.im_func
+        else: arg_offset = 0
+        
+        arg_text=''
+        if type(func_obj) in [types.FunctionType, types.LambdaType]:
+            try:
+                cd = func_obj.func_code
+                real_args = cd.co_varnames[arg_offset:cd.co_argcount]
+                defaults = func_obj.func_defaults or ''
+                defaults = map(lambda name: "=%s" % name, defaults)
+                defaults = [""] * (len(real_args)-len(defaults)) + defaults
+                items = map(lambda a,d: a+d, real_args, defaults)
+                if func_obj.func_code.co_flags & 0x4:
+                    items.append("...")
+                if func_obj.func_code.co_flags & 0x8:
+                    items.append("***")
+                arg_text = (','.join(items)) + ')'
+
+            except:
+                dbg("arg completion: %s: %s" % (sys.exc_info()[0],sys.exc_info()[1]))
+                pass
+        if len(arg_text) == 0:
+            # The doc string sometimes contains the function signature
+            #  this works for alot of C modules that are part of the
+            #  standard library
+            doc = func_obj.__doc__
+            if doc:
+                doc = doc.lstrip()
+                pos = doc.find('\n')
+                if pos > 0:
+                    sigline = doc[:pos]
+                    lidx = sigline.find('(')
+                    ridx = sigline.find(')')
+                    if lidx > 0 and ridx > 0:
+                        arg_text = sigline[lidx+1:ridx] + ')'
+        if len(arg_text) == 0: arg_text = ')'
+        return arg_text
+
+    def get_completions(self,context,match):
+        dbg("get_completions('%s','%s')" % (context,match))
+        stmt = ''
+        if context: stmt += str(context)
+        if match: stmt += str(match)
+        try:
+            result = None
+            all = {}
+            ridx = stmt.rfind('.')
+            if len(stmt) > 0 and stmt[-1] == '(':
+                result = eval(_sanitize(stmt[:-1]), self.compldict)
+                doc = result.__doc__
+                if doc == None: doc = ''
+                args = self.get_arguments(result)
+                return [{'word':self._cleanstr(args),'info':self._cleanstr(doc)}]
+            elif ridx == -1:
+                match = stmt
+                all = self.compldict
+            else:
+                match = stmt[ridx+1:]
+                stmt = _sanitize(stmt[:ridx])
+                result = eval(stmt, self.compldict)
+                all = dir(result)
+
+            dbg("completing: stmt:%s" % stmt)
+            completions = []
+
+            try: maindoc = result.__doc__
+            except: maindoc = ' '
+            if maindoc == None: maindoc = ' '
+            for m in all:
+                if m == "_PyCmplNoType": continue #this is internal
+                try:
+                    dbg('possible completion: %s' % m)
+                    if m.find(match) == 0:
+                        if result == None: inst = all[m]
+                        else: inst = getattr(result,m)
+                        try: doc = inst.__doc__
+                        except: doc = maindoc
+                        typestr = str(inst)
+                        if doc == None or doc == '': doc = maindoc
+
+                        wrd = m[len(match):]
+                        c = {'word':wrd, 'abbr':m,  'info':self._cleanstr(doc)}
+                        if "function" in typestr:
+                            c['word'] += '('
+                            c['abbr'] += '(' + self._cleanstr(self.get_arguments(inst))
+                        elif "method" in typestr:
+                            c['word'] += '('
+                            c['abbr'] += '(' + self._cleanstr(self.get_arguments(inst))
+                        elif "module" in typestr:
+                            c['word'] += '.'
+                        elif "class" in typestr:
+                            c['word'] += '('
+                            c['abbr'] += '('
+                        completions.append(c)
+                except:
+                    i = sys.exc_info()
+                    dbg("inner completion: %s,%s [stmt='%s']" % (i[0],i[1],stmt))
+            return completions
+        except:
+            i = sys.exc_info()
+            dbg("completion: %s,%s [stmt='%s']" % (i[0],i[1],stmt))
+            return []
+
+class Scope(object):
+    def __init__(self,name,indent):
+        self.subscopes = []
+        self.docstr = ''
+        self.locals = []
+        self.parent = None
+        self.name = name
+        self.indent = indent
+
+    def add(self,sub):
+        #print 'push scope: [%s@%s]' % (sub.name,sub.indent)
+        sub.parent = self
+        self.subscopes.append(sub)
+        return sub
+
+    def doc(self,str):
+        """ Clean up a docstring """
+        d = str.replace('\n',' ')
+        d = d.replace('\t',' ')
+        while d.find('  ') > -1: d = d.replace('  ',' ')
+        while d[0] in '"\'\t ': d = d[1:]
+        while d[-1] in '"\'\t ': d = d[:-1]
+        self.docstr = d
+
+    def local(self,loc):
+        if not self._hasvaralready(loc):
+            self.locals.append(loc)
+
+    def copy_decl(self,indent=0):
+        """ Copy a scope's declaration only, at the specified indent level - not local variables """
+        return Scope(self.name,indent)
+
+    def _hasvaralready(self,test):
+        "Convienance function... keep out duplicates"
+        if test.find('=') > -1:
+            var = test.split('=')[0].strip()
+            for l in self.locals:
+                if l.find('=') > -1 and var == l.split('=')[0].strip():
+                    return True
+        return False
+
+    def get_code(self):
+        # we need to start with this, to fix up broken completions
+        # hopefully this name is unique enough...
+        str = '"""'+self.docstr+'"""\n'
+        for l in self.locals:
+            if l.startswith('import'): str += l+'\n'
+        str += 'class _PyCmplNoType:\n    def __getattr__(self,name):\n        return None\n'
+        for sub in self.subscopes:
+            str += sub.get_code()
+        for l in self.locals:
+            if not l.startswith('import'): str += l+'\n'
+
+        return str
+
+    def pop(self,indent):
+        #print 'pop scope: [%s] to [%s]' % (self.indent,indent)
+        outer = self
+        while outer.parent != None and outer.indent >= indent:
+            outer = outer.parent
+        return outer
+
+    def currentindent(self):
+        #print 'parse current indent: %s' % self.indent
+        return '    '*self.indent
+
+    def childindent(self):
+        #print 'parse child indent: [%s]' % (self.indent+1)
+        return '    '*(self.indent+1)
+
+class Class(Scope):
+    def __init__(self, name, supers, indent):
+        Scope.__init__(self,name,indent)
+        self.supers = supers
+    def copy_decl(self,indent=0):
+        c = Class(self.name,self.supers,indent)
+        for s in self.subscopes:
+            c.add(s.copy_decl(indent+1))
+        return c
+    def get_code(self):
+        str = '%sclass %s' % (self.currentindent(),self.name)
+        if len(self.supers) > 0: str += '(%s)' % ','.join(self.supers)
+        str += ':\n'
+        if len(self.docstr) > 0: str += self.childindent()+'"""'+self.docstr+'"""\n'
+        if len(self.subscopes) > 0:
+            for s in self.subscopes: str += s.get_code()
+        else:
+            str += '%spass\n' % self.childindent()
+        return str
+
+
+class Function(Scope):
+    def __init__(self, name, params, indent):
+        Scope.__init__(self,name,indent)
+        self.params = params
+    def copy_decl(self,indent=0):
+        return Function(self.name,self.params,indent)
+    def get_code(self):
+        str = "%sdef %s(%s):\n" % \
+            (self.currentindent(),self.name,','.join(self.params))
+        if len(self.docstr) > 0: str += self.childindent()+'"""'+self.docstr+'"""\n'
+        str += "%spass\n" % self.childindent()
+        return str
+
+class PyParser:
+    def __init__(self):
+        self.top = Scope('global',0)
+        self.scope = self.top
+
+    def _parsedotname(self,pre=None):
+        #returns (dottedname, nexttoken)
+        name = []
+        if pre == None:
+            tokentype, token, indent = self.next()
+            if tokentype != NAME and token != '*':
+                return ('', token)
+        else: token = pre
+        name.append(token)
+        while True:
+            tokentype, token, indent = self.next()
+            if token != '.': break
+            tokentype, token, indent = self.next()
+            if tokentype != NAME: break
+            name.append(token)
+        return (".".join(name), token)
+
+    def _parseimportlist(self):
+        imports = []
+        while True:
+            name, token = self._parsedotname()
+            if not name: break
+            name2 = ''
+            if token == 'as': name2, token = self._parsedotname()
+            imports.append((name, name2))
+            while token != "," and "\n" not in token:
+                tokentype, token, indent = self.next()
+            if token != ",": break
+        return imports
+
+    def _parenparse(self):
+        name = ''
+        names = []
+        level = 1
+        while True:
+            tokentype, token, indent = self.next()
+            if token in (')', ',') and level == 1:
+                names.append(name)
+                name = ''
+            if token == '(':
+                level += 1
+            elif token == ')':
+                level -= 1
+                if level == 0: break
+            elif token == ',' and level == 1:
+                pass
+            else:
+                name += str(token)
+        return names
+
+    def _parsefunction(self,indent):
+        self.scope=self.scope.pop(indent)
+        tokentype, fname, ind = self.next()
+        if tokentype != NAME: return None
+
+        tokentype, open, ind = self.next()
+        if open != '(': return None
+        params=self._parenparse()
+
+        tokentype, colon, ind = self.next()
+        if colon != ':': return None
+
+        return Function(fname,params,indent)
+
+    def _parseclass(self,indent):
+        self.scope=self.scope.pop(indent)
+        tokentype, cname, ind = self.next()
+        if tokentype != NAME: return None
+
+        super = []
+        tokentype, next, ind = self.next()
+        if next == '(':
+            super=self._parenparse()
+        elif next != ':': return None
+
+        return Class(cname,super,indent)
+
+    def _parseassignment(self):
+        assign=''
+        tokentype, token, indent = self.next()
+        if tokentype == tokenize.STRING or token == 'str':  
+            return '""'
+        elif token == '(' or token == 'tuple':
+            return '()'
+        elif token == '[' or token == 'list':
+            return '[]'
+        elif token == '{' or token == 'dict':
+            return '{}'
+        elif tokentype == tokenize.NUMBER:
+            return '0'
+        elif token == 'open' or token == 'file':
+            return 'file'
+        elif token == 'None':
+            return '_PyCmplNoType()'
+        elif token == 'type':
+            return 'type(_PyCmplNoType)' #only for method resolution
+        else:
+            assign += token
+            level = 0
+            while True:
+                tokentype, token, indent = self.next()
+                if token in ('(','{','['):
+                    level += 1
+                elif token in (']','}',')'):
+                    level -= 1
+                    if level == 0: break
+                elif level == 0:
+                    if token in (';','\n'): break
+                    assign += token
+        return "%s" % assign
+
+    def next(self):
+        type, token, (lineno, indent), end, self.parserline = self.gen.next()
+        if lineno == self.curline:
+            #print 'line found [%s] scope=%s' % (line.replace('\n',''),self.scope.name)
+            self.currentscope = self.scope
+        return (type, token, indent)
+
+    def _adjustvisibility(self):
+        newscope = Scope('result',0)
+        scp = self.currentscope
+        while scp != None:
+            if type(scp) == Function:
+                slice = 0
+                #Handle 'self' params
+                if scp.parent != None and type(scp.parent) == Class:
+                    slice = 1
+                    p = scp.params[0]
+                    i = p.find('=')
+                    if i != -1: p = p[:i]
+                    newscope.local('%s = %s' % (scp.params[0],scp.parent.name))
+                for p in scp.params[slice:]:
+                    i = p.find('=')
+                    if i == -1:
+                        newscope.local('%s = _PyCmplNoType()' % p)
+                    else:
+                        newscope.local('%s = %s' % (p[:i],_sanitize(p[i+1])))
+
+            for s in scp.subscopes:
+                ns = s.copy_decl(0)
+                newscope.add(ns)
+            for l in scp.locals: newscope.local(l)
+            scp = scp.parent
+
+        self.currentscope = newscope
+        return self.currentscope
+
+    #p.parse(vim.current.buffer[:],vim.eval("line('.')"))
+    def parse(self,text,curline=0):
+        self.curline = int(curline)
+        buf = cStringIO.StringIO(''.join(text) + '\n')
+        self.gen = tokenize.generate_tokens(buf.readline)
+        self.currentscope = self.scope
+
+        try:
+            freshscope=True
+            while True:
+                tokentype, token, indent = self.next()
+                #dbg( 'main: token=[%s] indent=[%s]' % (token,indent))
+
+                if tokentype == DEDENT or token == "pass":
+                    self.scope = self.scope.pop(indent)
+                elif token == 'def':
+                    func = self._parsefunction(indent)
+                    if func == None:
+                        print "function: syntax error..."
+                        continue
+                    freshscope = True
+                    self.scope = self.scope.add(func)
+                elif token == 'class':
+                    cls = self._parseclass(indent)
+                    if cls == None:
+                        print "class: syntax error..."
+                        continue
+                    freshscope = True
+                    self.scope = self.scope.add(cls)
+                    
+                elif token == 'import':
+                    imports = self._parseimportlist()
+                    for mod, alias in imports:
+                        loc = "import %s" % mod
+                        if len(alias) > 0: loc += " as %s" % alias
+                        self.scope.local(loc)
+                    freshscope = False
+                elif token == 'from':
+                    mod, token = self._parsedotname()
+                    if not mod or token != "import":
+                        print "from: syntax error..."
+                        continue
+                    names = self._parseimportlist()
+                    for name, alias in names:
+                        loc = "from %s import %s" % (mod,name)
+                        if len(alias) > 0: loc += " as %s" % alias
+                        self.scope.local(loc)
+                    freshscope = False
+                elif tokentype == STRING:
+                    if freshscope: self.scope.doc(token)
+                elif tokentype == NAME:
+                    name,token = self._parsedotname(token) 
+                    if token == '=':
+                        stmt = self._parseassignment()
+                        if stmt != None:
+                            self.scope.local("%s = %s" % (name,stmt))
+                    freshscope = False
+        except StopIteration: #thrown on EOF
+            pass
+        except:
+            dbg("parse error: %s, %s @ %s" %
+                (sys.exc_info()[0], sys.exc_info()[1], self.parserline))
+        return self._adjustvisibility()
+
+def _sanitize(str):
+    val = ''
+    level = 0
+    for c in str:
+        if c in ('(','{','['):
+            level += 1
+        elif c in (']','}',')'):
+            level -= 1
+        elif level == 0:
+            val += c
+    return val
+
+sys.path.extend(['.','..'])
+PYTHONEOF
+endfunction
+
+call s:DefPython()
+" vim: set et ts=4:

File _vim/colors/fruity.vim

+"
+" Fruity Color Scheme
+" ===================
+"
+" Author:   Armin Ronacher <armin.ronacher@active-4.com>
+" Version:  0.2
+"
+set background=dark
+
+hi clear
+if exists("syntax_on")
+    syntax reset
+endif
+
+let colors_name = "fruity"
+
+" Default Colors
+hi Normal       guifg=#ffffff   guibg=#001217
+hi NonText      guifg=#444444   guibg=#000000
+hi Cursor       guibg=#aaaaaa
+hi lCursor      guibg=#aaaaaa
+
+" Search
+hi Search       guifg=#800000   guibg=#ffae00
+hi IncSearch    guifg=#800000   guibg=#ffae00
+
+" Window Elements
+hi StatusLine   guifg=#ffffff   guibg=#8090a0   gui=bold
+hi StatusLineNC guifg=#506070   guibg=#a0b0c0
+hi VertSplit    guifg=#a0b0c0   guibg=#a0b0c0
+hi Folded       guifg=#111111   guibg=#8090a0
+hi IncSearch    guifg=#708090   guibg=#f0e68c
+hi Pmenu        guifg=#ffffff   guibg=#cb2f27
+hi SignColumn   guibg=#111111
+hi CursorLine   guibg=#181818
+hi LineNr       guifg=#aaaaaa   guibg=#00252e
+hi MatchParen   guifg=#b1b711   guibg=NONE      gui=bold
+
+" Specials
+hi Todo         guifg=#e50808   guibg=#520000   gui=bold
+hi Title        guifg=#ffffff                   gui=bold
+hi Special      guifg=#fd8900
+
+" Syntax Elements
+hi String       guifg=#0086d2
+hi Constant     guifg=#0086d2
+hi Number       guifg=#0086f7                   gui=bold
+hi Statement    guifg=#fb660a                   gui=bold
+hi Function     guifg=#ff0086                   gui=bold
+hi PreProc      guifg=#ff0007                   gui=bold
+hi Comment      guifg=#00d2ff   guibg=#0a1323   gui=italic
+hi Type         guifg=#cdcaa9                   gui=bold
+hi Error        guifg=#ffffff   guibg=#ab0000
+hi Identifier   guifg=#ff0086                   gui=bold
+hi Label        guifg=#ff0086
+
+" Minibuf Explorer
+hi MBENormal          guifg=#00d2ff
+hi MBEVisibleNormal   guifg=#fd8900 gui=bold
+hi MBEChanged         guifg=#00d2ff gui=underline
+hi MBEVisibleChanged  guifg=#fd8900 gui=bold,underline
+
+" Python Highlighting for python.vim
+hi pythonCoding guifg=#ff0086
+hi pythonRun    guifg=#ff0086
+hi pythonBuiltinObj     guifg=#2b6ba2           gui=bold
+hi pythonBuiltinFunc    guifg=#2b6ba2           gui=bold
+hi pythonException      guifg=#ee0000           gui=bold
+hi pythonExClass        guifg=#66cd66           gui=bold
+hi pythonSpaceError     guibg=#270000
+hi pythonDocTest    guifg=#3c8e68   guibg=#02101d
+hi pythonDocTest2   guifg=#3c8e68   guibg=#02101d
+hi pythonFunction   guifg=#ee0000               gui=bold
+hi pythonClass      guifg=#ff0086               gui=bold
+hi pythonString     guifg=#0086d2   guibg=#02101d
+hi pythonEscape     guifg=#fd8900   guibg=#02101d
+hi pythonStrFormat  guifg=#fd8900   guibg=#02101d
+
+" JavaScript Highlighting
+hi javaScript                   guifg=#ffffff
+hi javaScriptRegexpString       guifg=#aa6600
+hi javaScriptDocComment         guifg=#aaaaaa
+hi javaScriptCssStyles          guifg=#dd7700
+hi javaScriptDomElemFuncs       guifg=#66cd66
+hi javaScriptHtmlElemFuncs      guifg=#dd7700
+hi javaScriptLabel              guifg=#00bdec   gui=italic
+hi javaScriptPrototype          guifg=#00bdec
+hi javaScriptConditional        guifg=#ff0007   gui=bold
+hi javaScriptRepeat             guifg=#ff0007   gui=bold
+hi javaScriptFunction           guifg=#ff0086   gui=bold
+
+" CSS Highlighting
+hi cssIdentifier            guifg=#66cd66       gui=bold
+hi cssBraces                guifg=#00bdec       gui=bold
+
+" Ruby Highlighting
+hi rubySharpBang    guifg=#00d2ff   guibg=#0a1323   gui=bold,italic
+hi rubyFunction     guifg=#0066bb               gui=bold
+hi rubyDefine       guifg=#dd0000               gui=bold
+hi rubyClassName    guifg=#2996a0               gui=bold
+hi rubyKeyword      guifg=#dd0000               gui=bold
+hi rubyConditional  guifg=#dd0000               gui=bold
+hi rubyControl      guifg=#ff0000               gui=bold
+hi rubyRepeat       guifg=#ff0000               gui=bold
+hi rubySymbol       guifg=#ff0086
+hi rubyASCIICode    guifg=#bb0066               gui=bold
+hi rubyIdentifier               guifg=#008aff
+hi rubyGlobalVariable           guifg=#dd7700
+hi rubyConstant                 guifg=#dd7700   gui=bold
+hi rubyBlockParameter           guifg=#66cd66
+hi rubyPredefinedIdentifier     guifg=#49c9b5
+hi rubyInterpolationDelimiter   guifg=#00bdec   gui=bold
+hi rubyString           guifg=#0086d2 guibg=#071320
+hi rubyStringDelimiter  guifg=#dd7700 guibg=#071320
+hi rubyRegexp           guifg=#92cd35 guibg=#200000
+hi rubyRegexpDelimiter  guifg=#ff0007
+hi rubySpaceError       guibg=#270000
+hi rubyDocumentation    guifg=#aaaaaa
+hi rubyData             guifg=#777777
+
+" XML Highlighting
+hi xmlTag           guifg=#00bdec
+hi xmlTagName       guifg=#00bdec
+hi xmlEndTag        guifg=#00bdec
+hi xmlNamespace     guifg=#00bdec                   gui=underline
+hi xmlAttribPunct   guifg=#cccaa9                   gui=bold
+hi xmlEqual         guifg=#cccaa9                   gui=bold
+hi xmlCdata         guifg=#bf0945                   gui=bold
+hi xmlCdataCdata	guifg=#ac1446   guibg=#23010c   gui=none
+hi xmlCdataStart	guifg=#bf0945                   gui=bold
+hi xmlCdataEnd		guifg=#bf0945                   gui=bold
+
+" HTML Highlighting
+hi htmlTag          guifg=#00bdec               gui=bold
+hi htmlEndTag       guifg=#00bdec               gui=bold
+hi htmlSpecialTagName   guifg=#66cd66
+hi htmlTagName      guifg=#66cd66
+hi htmlTagN         guifg=#66cd66
+hi htmlEvent        guifg=#ffffff
+
+" Django Highlighting
+hi djangoTagBlock   guifg=#ff0007   guibg=#200000   gui=bold
+hi djangoVarBlock   guifg=#ff0007   guibg=#200000
+hi djangoArgument   guifg=#0086d2   guibg=#200000
+hi djangoStatement  guifg=#fb660a   guibg=#200000   gui=bold
+hi djangoComment    guifg=#008800   guibg=#002300   gui=italic
+hi djangoFilter     guifg=#ff0086   guibg=#200000   gui=italic
+
+" Jinja Highlighting
+hi jinjaTagBlock    guifg=#ff0007   guibg=#200000   gui=bold
+hi jinjaVarBlock    guifg=#ff0007   guibg=#200000
+hi jinjaString      guifg=#0086d2   guibg=#200000
+hi jinjaNumber      guifg=#bf0945   guibg=#200000   gui=bold
+hi jinjaStatement   guifg=#fb660a   guibg=#200000   gui=bold
+hi jinjaComment     guifg=#008800   guibg=#002300   gui=italic
+hi jinjaCommentDelim guifg=#008800  guibg=#002300   gui=bold
+hi jinjaFilter      guifg=#ff0086   guibg=#200000
+hi jinjaFunction    guifg=#ff0086   guibg=#200000   gui=bold
+hi jinjaRaw         guifg=#ffffff   guibg=#200000
+hi jinjaRawDelim    guifg=#aaaaaa   guibg=#200000   gui=bold
+hi jinjaOperator    guifg=#ffffff   guibg=#200000
+hi jinjaVariable    guifg=#92cd35   guibg=#200000
+hi jinjaAttribute   guifg=#dd7700   guibg=#200000
+hi jinjaSpecial     guifg=#008ffd   guibg=#200000
+
+" C Highlighting
+hi cString          guifg=#0086d2   guibg=#071320
+hi cFormat          guifg=#fd8900   guibg=#02101d
+hi cSpecial         guifg=#92cd35   guibg=#02101d
+hi cType            guifg=#92cd35   gui=bold
+hi cError           guifg=#ff0007   guibg=#200000   gui=bold
+hi cCppOut          guifg=#777777
+
+" ERuby Highlighting
+hi erubyDelimiter   guifg=#2c8a16                   gui=bold
+hi erubyComment     guifg=#4d9b3a                   gui=italic

File _vim/ftplugin/python.vim

+" VIM filetype plugin
+" Language: Python source files
+" Maintainer: Sergei Matusevich <motus@motus.kiev.ua>
+" ICQ: 31114346 Yahoo: motus2
+" http://motus.kiev.ua/motus2/Files/py_jump.vim
+" Last Change: 2 November 2005
+" Licence: Public Domain
+
+" WHAT'S COOL: Use % command when editing python sources
+" to jump to the end of the indented block and then back.
+" If cursor is at the bracket character, % will take
+" you to the matching bracket.
+
+" INSTALLATION: rename this file to python.vim
+" and copy it to your ~/.vim/ftplugin/ directory
+
+if exists("g:did_python_ftplugin")
+  finish
+endif
+
+" Don't load another plugin (this is global)
+let g:did_python_ftplugin = 1
+
+" This is the only tunable parameter of this script.
+" It specifies timeout (in seconds) for the backward jump.
+" That is, if you used % twice within this time frame,
+" it will jump back, not forward, thus trying to guess
+" correct indentation level. Try to use % several times
+" to check it out.
+let g:py_jump_timeout = 1
+
+let s:py_jump_ts = 0
+
+if !exists("*PyJump")
+
+  function s:PySeekForward()
+    let line    = line(".") + 1
+    let lnEnd   = line("$")
+    let iStart  = indent(".")
+    while line <= lnEnd
+      let iCurr = indent(line)
+      if iCurr <= iStart && getline(line) !~ "^\\s\*$"
+        let line = prevnonblank(line - 1)
+        call cursor(line, indent(line) + 1)
+        return
+      endif
+      let line = line + 1
+    endwhile
+    let line = prevnonblank("$")
+    call cursor(line, indent(line) + 1)
+  endfunction
+
+  function s:PySeekBackward()
+    let line    = prevnonblank(".")
+    let iStart  = indent(line)
+    while line > 0
+      let iCurr = indent(line)
+      if iCurr < iStart && getline(line) !~ "^\\s\*$"
+        call cursor(line, indent(line) + 1)
+        return 0
+      endif
+      let line = line - 1
+    endwhile
+    return 1
+  endfunction
+
+  function PyJump(vis_mode)
+    let ch = getline(".")[col(".")-1]
+    if ch != "," && ch != ":" && stridx(&matchpairs, ch) >= 0
+      let s:py_jump_ts = 0
+      unmap <buffer> %
+      normal %
+      nnoremap <buffer> % :call PyJump("")<Enter>
+      vnoremap <buffer> % omao<Esc>:call PyJump(visualmode())<Enter>
+    else
+      let ts = localtime()
+      let ts_fwd = ts - s:py_jump_ts >= g:py_jump_timeout
+      let line = prevnonblank(".")
+      let next = nextnonblank(line+1)
+      if indent(line) < indent(next) && ts_fwd
+        call s:PySeekForward()
+      else
+        if s:PySeekBackward()
+          call s:PySeekForward()
+        endif
+      endif
+      let s:py_jump_ts = ts
+    endif
+    if strlen(a:vis_mode)
+      exec "normal " . a:vis_mode . "`ao"
+    endif
+  endfunction
+
+endif
+
+nnoremap <buffer> % :call PyJump("")<Enter>
+vnoremap <buffer> % omao<Esc>:call PyJump(visualmode())<Enter>
+

File _vim/indent/html.vim

+" Description:	html indenter
+" Author:	Johannes Zellner <johannes@zellner.org>
+" Last Change:	Tue, 27 Apr 2004 10:28:39 CEST
+" 		Restoring 'cpo' and 'ic' added by Bram 2006 May 5
+" Globals:	g:html_indent_tags	   -- indenting tags
+"		g:html_indent_strict       -- inhibit 'O O' elements
+"		g:html_indent_strict_table -- inhibit 'O -' elements
+
+" Only load this indent file when no other was loaded.
+if exists("b:did_indent")
+    finish
+endif
+let b:did_indent = 1
+
+
+" [-- local settings (must come before aborting the script) --]
+setlocal indentexpr=HtmlIndentGet(v:lnum)
+setlocal indentkeys=o,O,*<Return>,<>>,{,}
+
+
+if exists('g:html_indent_tags')
+    unlet g:html_indent_tags
+endif
+
+" [-- helper function to assemble tag list --]
+fun! <SID>HtmlIndentPush(tag)
+    if exists('g:html_indent_tags')
+	let g:html_indent_tags = g:html_indent_tags.'\|'.a:tag
+    else
+	let g:html_indent_tags = a:tag
+    endif
+endfun
+
+
+" [-- <ELEMENT ? - - ...> --]
+call <SID>HtmlIndentPush('a')
+call <SID>HtmlIndentPush('abbr')
+call <SID>HtmlIndentPush('acronym')
+call <SID>HtmlIndentPush('address')
+call <SID>HtmlIndentPush('b')
+call <SID>HtmlIndentPush('bdo')
+call <SID>HtmlIndentPush('big')
+call <SID>HtmlIndentPush('blockquote')
+call <SID>HtmlIndentPush('button')
+call <SID>HtmlIndentPush('caption')
+call <SID>HtmlIndentPush('center')
+call <SID>HtmlIndentPush('cite')
+call <SID>HtmlIndentPush('code')
+call <SID>HtmlIndentPush('colgroup')
+call <SID>HtmlIndentPush('del')
+call <SID>HtmlIndentPush('dfn')
+call <SID>HtmlIndentPush('dir')
+call <SID>HtmlIndentPush('div')
+call <SID>HtmlIndentPush('dl')
+call <SID>HtmlIndentPush('em')
+call <SID>HtmlIndentPush('fieldset')
+call <SID>HtmlIndentPush('font')
+call <SID>HtmlIndentPush('form')
+call <SID>HtmlIndentPush('frameset')
+call <SID>HtmlIndentPush('h1')
+call <SID>HtmlIndentPush('h2')
+call <SID>HtmlIndentPush('h3')
+call <SID>HtmlIndentPush('h4')
+call <SID>HtmlIndentPush('h5')
+call <SID>HtmlIndentPush('h6')
+call <SID>HtmlIndentPush('i')
+call <SID>HtmlIndentPush('iframe')
+call <SID>HtmlIndentPush('ins')
+call <SID>HtmlIndentPush('kbd')
+call <SID>HtmlIndentPush('label')
+call <SID>HtmlIndentPush('legend')
+call <SID>HtmlIndentPush('map')
+call <SID>HtmlIndentPush('menu')
+call <SID>HtmlIndentPush('noframes')
+call <SID>HtmlIndentPush('noscript')
+call <SID>HtmlIndentPush('object')
+call <SID>HtmlIndentPush('ol')
+call <SID>HtmlIndentPush('optgroup')
+" call <SID>HtmlIndentPush('pre')
+call <SID>HtmlIndentPush('q')
+call <SID>HtmlIndentPush('s')
+call <SID>HtmlIndentPush('samp')
+call <SID>HtmlIndentPush('script')
+call <SID>HtmlIndentPush('select')
+call <SID>HtmlIndentPush('small')
+call <SID>HtmlIndentPush('span')
+call <SID>HtmlIndentPush('strong')
+call <SID>HtmlIndentPush('style')
+call <SID>HtmlIndentPush('sub')
+call <SID>HtmlIndentPush('sup')
+call <SID>HtmlIndentPush('table')
+call <SID>HtmlIndentPush('textarea')
+call <SID>HtmlIndentPush('title')
+call <SID>HtmlIndentPush('tt')
+call <SID>HtmlIndentPush('u')
+call <SID>HtmlIndentPush('ul')
+call <SID>HtmlIndentPush('var')
+
+
+" [-- <ELEMENT ? O O ...> --]
+if !exists('g:html_indent_strict')
+    call <SID>HtmlIndentPush('body')
+    call <SID>HtmlIndentPush('head')
+    call <SID>HtmlIndentPush('html')
+    call <SID>HtmlIndentPush('tbody')
+endif
+
+
+" [-- <ELEMENT ? O - ...> --]
+if !exists('g:html_indent_strict_table')
+    call <SID>HtmlIndentPush('th')
+    call <SID>HtmlIndentPush('td')
+    call <SID>HtmlIndentPush('tr')
+    call <SID>HtmlIndentPush('tfoot')
+    call <SID>HtmlIndentPush('thead')
+endif
+
+delfun <SID>HtmlIndentPush
+
+let s:cpo_save = &cpo
+set cpo-=C
+
+" [-- count indent-increasing tags of line a:lnum --]
+fun! <SID>HtmlIndentOpen(lnum, pattern)
+    let s = substitute('x'.getline(a:lnum),
+    \ '.\{-}\(\(<\)\('.a:pattern.'\)\>\)', "\1", 'g')
+    let s = substitute(s, "[^\1].*$", '', '')
+    return strlen(s)
+endfun
+
+" [-- count indent-decreasing tags of line a:lnum --]
+fun! <SID>HtmlIndentClose(lnum, pattern)
+    let s = substitute('x'.getline(a:lnum),
+    \ '.\{-}\(\(<\)/\('.a:pattern.'\)\>>\)', "\1", 'g')
+    let s = substitute(s, "[^\1].*$", '', '')
+    return strlen(s)
+endfun
+
+" [-- count indent-increasing '{' of (java|css) line a:lnum --]
+fun! <SID>HtmlIndentOpenAlt(lnum)
+    return strlen(substitute(getline(a:lnum), '[^{]\+', '', 'g'))
+endfun
+
+" [-- count indent-decreasing '}' of (java|css) line a:lnum --]
+fun! <SID>HtmlIndentCloseAlt(lnum)
+    return strlen(substitute(getline(a:lnum), '[^}]\+', '', 'g'))
+endfun
+
+" [-- return the sum of indents respecting the syntax of a:lnum --]
+fun! <SID>HtmlIndentSum(lnum, style)
+    if a:style == match(getline(a:lnum), '^\s*</')
+	if a:style == match(getline(a:lnum), '^\s*</\<\('.g:html_indent_tags.'\)\>')
+	    let open = <SID>HtmlIndentOpen(a:lnum, g:html_indent_tags)
+	    let close = <SID>HtmlIndentClose(a:lnum, g:html_indent_tags)
+	    if 0 != open || 0 != close
+		return open - close
+	    endif
+	endif
+    endif
+    if '' != &syntax &&
+	\ synIDattr(synID(a:lnum, 1, 1), 'name') =~ '\(css\|java\).*' &&
+	\ synIDattr(synID(a:lnum, strlen(getline(a:lnum)), 1), 'name')
+	\ =~ '\(css\|java\).*'
+	if a:style == match(getline(a:lnum), '^\s*}')
+	    return <SID>HtmlIndentOpenAlt(a:lnum) - <SID>HtmlIndentCloseAlt(a:lnum)
+	endif
+    endif
+    return 0
+endfun
+
+fun! s:getSyntaxName(lnum, re)
+	return synIDattr(synID(a:lnum, match(getline(a:lnum), a:re) + 1, 0), "name")
+endfun
+
+fun! s:isSyntaxElem(lnum, re, elem)
+	if getline(a:lnum) =~ a:re && s:getSyntaxName(a:lnum, a:re) == a:elem
+		return 1
+	endif
+	return 0
+endfun
+
+fun! HtmlIndentGet(lnum)
+    " Find a non-empty line above the current line.
+    let lnum = prevnonblank(a:lnum - 1)
+
+    " Hit the start of the file, use zero indent.
+    if lnum == 0
+	return 0
+    endif
+
+    let restore_ic = &ic
+    setlocal ic " ignore case
+
+    " [-- special handling for <pre>: no indenting --]
+    if getline(a:lnum) =~ '\c</pre>'
+		\ || 0 < searchpair('\c<pre>', '', '\c</pre>', 'nWb')
+		\ || 0 < searchpair('\c<pre>', '', '\c</pre>', 'nW')
+	" we're in a line with </pre> or inside <pre> ... </pre>
+	if restore_ic == 0
+	  setlocal noic
+	endif
+	return -1
+    endif
+
+    " [-- special handling for <javascript>: use cindent --]
+    let js = '<script.*type\s*=\s*.*java'
+    if   0 < searchpair(js, '', '</script>', 'nWb')
+    \ || 0 < searchpair(js, '', '</script>', 'nW')
+	" we're inside javascript
+	if getline(lnum) !~ js && getline(a:lnum) !~ js
+	    if restore_ic == 0
+	      setlocal noic
+	    endif
+		" Open and close bracket:
+		if s:isSyntaxElem(lnum, '{', "javaScriptBraces") && s:isSyntaxElem(a:lnum, '}', "javaScriptBraces")
+			return indent(lnum)
+		elseif s:isSyntaxElem(lnum, '{', "javaScriptBraces")
+			return indent(lnum) + &sw
+		elseif s:isSyntaxElem(a:lnum, '}', "javaScriptBraces")
+			if s:isSyntaxElem(lnum, 'break', 'javaScriptBranch') && ! s:isSyntaxElem(lnum, '\(case\|default\)', "javaScriptLabel")
+				return indent(lnum) - 2 * &sw
+			endif
+			return indent(lnum) - &sw
+		endif
+
+		" cases:
+		if s:isSyntaxElem(lnum, '\(case\|default\)', "javaScriptLabel") && s:isSyntaxElem(a:lnum, '\(case\|default\)', "javaScriptLabel")
+			return indent(lnum)
+		elseif s:isSyntaxElem(lnum, '\(case\|default\)', "javaScriptLabel")
+			return indent(lnum) + &sw
+		elseif s:isSyntaxElem(a:lnum, '\(case\|default\)', "javaScriptLabel")
+			return indent(lnum) - &sw
+		endif
+
+		if getline(a:lnum) =~ '\c</script>'
+			let scriptline = prevnonblank(search(js, 'bW'))
+			if scriptline > 0
+				return indent(scriptline)
+			endif
+		endif
+		return indent(lnum)
+	endif
+    endif
+
+    if getline(a:lnum) =~ '\c</\?body' || getline(a:lnum) =~ '\c</\?html' || getline(a:lnum) =~ '\c</\?head'
+		return 0
+	endif
+    if getline(lnum) =~ '\c</\?body' || getline(lnum) =~ '\c</\?html' || getline(lnum) =~ '\c</\?head'
+		return 0
+	endif
+
+    if getline(lnum) =~ '\c</pre>'
+	" line before the current line a:lnum contains
+	" a closing </pre>. --> search for line before
+	" starting <pre> to restore the indent.
+	let preline = prevnonblank(search('\c<pre>', 'bW') - 1)
+	if preline > 0
+	    if restore_ic == 0
+	      setlocal noic
+	    endif
+	    return indent(preline)
+	endif
+    endif
+
+    let ind = <SID>HtmlIndentSum(lnum, -1)
+    let ind = ind + <SID>HtmlIndentSum(a:lnum, 0)
+
+    if restore_ic == 0
+	setlocal noic
+    endif
+
+    return indent(lnum) + (&sw * ind)
+endfun
+
+let &cpo = s:cpo_save
+unlet s:cpo_save
+
+" [-- EOF <runtime>/indent/html.vim --]

File _vim/indent/python.vim

+" Python indent file
+" Language:	    Python
+" Maintainer:	    Eric Mc Sween <em@tomcom.de>
+" Original Author:  David Bustos <bustos@caltech.edu> 
+" Last Change:      2004 Jun 07
+
+" 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 nolisp
+setlocal autoindent
+setlocal indentexpr=GetPythonIndent(v:lnum)
+setlocal indentkeys=!^F,o,O,<:>,0),0],0},=elif,=except
+
+let s:maxoff = 50
+
+" Find backwards the closest open parenthesis/bracket/brace.
+function! s:SearchParensPair()
+    let line = line('.')
+    let col = col('.')
+    
+    " Skip strings and comments and don't look too far
+    let skip = "line('.') < " . (line - s:maxoff) . " ? dummy :" .
+                \ 'synIDattr(synID(line("."), col("."), 0), "name") =~? ' .
+                \ '"string\\|comment"'
+
+    " Search for parentheses
+    call cursor(line, col)
+    let parlnum = searchpair('(', '', ')', 'bW', skip)
+    let parcol = col('.')
+
+    " Search for brackets
+    call cursor(line, col)
+    let par2lnum = searchpair('\[', '', '\]', 'bW', skip)
+    let par2col = col('.')
+
+    " Search for braces
+    call cursor(line, col)
+    let par3lnum = searchpair('{', '', '}', 'bW', skip)
+    let par3col = col('.')
+
+    " Get the closest match
+    if par2lnum > parlnum || (par2lnum == parlnum && par2col > parcol)
+        let parlnum = par2lnum
+        let parcol = par2col
+    endif
+    if par3lnum > parlnum || (par3lnum == parlnum && par3col > parcol)
+        let parlnum = par3lnum
+        let parcol = par3col
+    endif 
+
+    " Put the cursor on the match
+    if parlnum > 0
+        call cursor(parlnum, parcol)
+    endif
+    return parlnum
+endfunction
+
+" Find the start of a multi-line statement
+function! s:StatementStart(lnum)
+    let lnum = a:lnum
+    while 1
+        if getline(lnum - 1) =~ '\\$'
+            let lnum = lnum - 1
+        else
+            call cursor(lnum, 1)
+            let maybe_lnum = s:SearchParensPair()
+            if maybe_lnum < 1
+                return lnum
+            else
+                let lnum = maybe_lnum
+            endif
+        endif
+    endwhile
+endfunction
+
+" Find the block starter that matches the current line
+function! s:BlockStarter(lnum, block_start_re)
+    let lnum = a:lnum
+    let maxindent = 10000       " whatever
+    while lnum > 1
+        let lnum = prevnonblank(lnum - 1)
+        if indent(lnum) < maxindent
+            if getline(lnum) =~ a:block_start_re
+                return lnum
+            else 
+                let maxindent = indent(lnum)
+                " It's not worth going further if we reached the top level
+                if maxindent == 0
+                    return -1
+                endif
+            endif
+        endif
+    endwhile
+    return -1
+endfunction
+                
+function! GetPythonIndent(lnum)
+
+    " First line has indent 0
+    if a:lnum == 1
+        return 0
+    endif
+    
+    " If we can find an open parenthesis/bracket/brace, line up with it.
+    call cursor(a:lnum, 1)
+    let parlnum = s:SearchParensPair()
+    if parlnum > 0
+        let parcol = col('.')
+        let closing_paren = match(getline(a:lnum), '^\s*[])}]') != -1
+        if match(getline(parlnum), '[([{]\s*$', parcol - 1) != -1
+            if closing_paren
+                return indent(parlnum)
+            else
+                return indent(parlnum) + &shiftwidth
+            endif
+        else
+            if closing_paren
+                return parcol - 1
+            else
+                return parcol
+            endif
+        endif
+    endif
+    
+    " Examine this line
+    let thisline = getline(a:lnum)
+    let thisindent = indent(a:lnum)
+
+    " If the line starts with 'elif' or 'else', line up with 'if' or 'elif'
+    if thisline =~ '^\s*\(elif\|else\)\>'
+        let bslnum = s:BlockStarter(a:lnum, '^\s*\(if\|elif\)\>')
+        if bslnum > 0
+            return indent(bslnum)
+        else
+            return -1
+        endif
+    endif
+        
+    " If the line starts with 'except' or 'finally', line up with 'try'
+    " or 'except'
+    if thisline =~ '^\s*\(except\|finally\)\>'
+        let bslnum = s:BlockStarter(a:lnum, '^\s*\(try\|except\)\>')
+        if bslnum > 0
+            return indent(bslnum)
+        else
+            return -1
+        endif
+    endif
+    
+    " Examine previous line
+    let plnum = a:lnum - 1
+    let pline = getline(plnum)
+    let sslnum = s:StatementStart(plnum)
+    
+    " If the previous line is blank, keep the same indentation
+    if pline =~ '^\s*$'
+        return -1
+    endif
+    
+    " If this line is explicitly joined, try to find an indentation that looks
+    " good. 
+    if pline =~ '\\$'
+        let compound_statement = '^\s*\(if\|while\|for\s.*\sin\|except\)\s*'
+        let maybe_indent = matchend(getline(sslnum), compound_statement)
+        if maybe_indent != -1
+            return maybe_indent
+        else
+            return indent(sslnum) + &sw * 2
+        endif
+    endif
+    
+    " If the previous line ended with a colon, indent relative to
+    " statement start.
+    if pline =~ ':\s*$'
+        return indent(sslnum) + &sw
+    endif
+
+    " If the previous line was a stop-execution statement or a pass
+    if getline(sslnum) =~ '^\s*\(break\|continue\|raise\|return\|pass\)\>'
+        " See if the user has already dedented
+        if indent(a:lnum) > indent(sslnum) - &sw
+            " If not, recommend one dedent
+            return indent(sslnum) - &sw
+        endif
+        " Otherwise, trust the user
+        return -1
+    endif
+
+    " In all other cases, line up with the start of the previous statement.
+    return indent(sslnum)
+endfunction

File _vim/indent/xhtml.vim

+if exists('b:did_indent')
+  finish
+endif
+
+let b:did_indent = 1
+
+" [-- local settings (must come before aborting the script) --]
+setlocal indentexpr=XmlIndentGet(v:lnum,0)
+setlocal indentkeys=o,O,*<Return>,<>>,<<>,/,{,}
+
+set cpo-=C
+
+if !exists('b:xml_indent_open')
+  let b:xml_indent_open = '.\{-}<\a'
+  " pre tag, e.g. <address>
+  " let b:xml_indent_open = '.\{-}<[/]\@!\(address\)\@!'
+endif
+
+if !exists('b:xml_indent_close')
+  let b:xml_indent_close = '.\{-}</'
+  " end pre tag, e.g. </address>
+  " let b:xml_indent_close = '.\{-}</\(address\)\@!'
+endif
+
+" [-- finish, if the function already exists --]
+if exists('*XmlIndentGet') | finish | endif
+
+fun! <SID>XmlIndentWithPattern(line, pat)
+  let s = substitute('x'.a:line, a:pat, "\1", 'g')
+  return strlen(substitute(s, "[^\1].*$", '', ''))
+endfun
+
+" [-- check if it's xml --]
+fun! <SID>XmlIndentSynCheck(lnum)
+  if '' != &syntax
+    let syn1 = synIDattr(synID(a:lnum, 1, 1), 'name')
+    let syn2 = synIDattr(synID(a:lnum, strlen(getline(a:lnum)) - 1, 1), 'name')
+    if '' != syn1 && syn1 !~ 'xml' && '' != syn2 && syn2 !~ 'xml'
+      " don't indent pure non-xml code
+      return 0
+    endif
+  endif
+  return 1
+endfun
+
+fun! XmlIndentGet(cur_lnum, use_syntax_check)
+  " Find a non-empty line above the current line.
+  let cur_lnum = a:cur_lnum
+  let cur_line = getline(cur_lnum)
+  let prev_lnum = prevnonblank(cur_lnum - 1)
+  let prev_line = getline(prev_lnum)
+
+  " Hit the start of the file, use zero indent.
+  if prev_lnum == 0
+    return 0
+  endif
+
+"  if a:use_syntax_check
+"    if 0 == <SID>XmlIndentSynCheck(prev_lnum) || 0 == <SID>XmlIndentSynCheck(a:lnum)
+"      return indent(a:lnum)
+"    endif
+"  endif
+
+  let ind = indent(prev_lnum)
+
+  if match(prev_line, '^\s*</') == -1 " prev_line is not </end>, increase ind
+    let xx = match(prev_line, '^\s*<[^ >]\+\s\+\zs\w.*[^>]$')
+    if xx >= 0
+      let ind =  xx
+    elseif match(prev_line, '^\s*<%--') == 0
+          \ && match(prev_line, '--%>$') == -1
+      let ind = ind + 5
+    elseif match(prev_line, '^\s*<!--') == 0
+          \ && match(prev_line, '-->$') == -1
+      let ind = ind + 5
+    elseif match(prev_line, '-->$') >= 0
+      " if prev_line is the end of comment, align to the beginning of comment
+      let slnum = prev_lnum
+      while match(getline(slnum), '^\s*<!--') < 0
+        let slnum = slnum - 1
+      endwhile
+      let ind = indent(slnum)
+    elseif match(prev_line, '--%>$') >= 0
+      " if prev_line is the end of comment, align to the beginning of comment
+      let slnum = prev_lnum
+      while match(getline(slnum), '^\s*<%--') < 0
+        let slnum = slnum - 1
+      endwhile
+      let ind = indent(slnum)
+    elseif match(prev_line, '^\s*[a-zA-Z]\S\+=.*>$') == 0
+          \ || match(prev_line, '^\s*".*">$') == 0
+      " if prev_line is end of multi-line tag,
+      let slnum = prev_lnum
+      while indent(slnum) >= ind
+        let slnum = slnum - 1
+      endwhile
+      if match(prev_line, '/>$') >= 0
+        " align to beginning of tag if it's closed.
+        let ind = indent(slnum)
+      elseif match(getline(slnum), '^\s*<!DOCTYPE') == 0
+        " align to beginning of DOCTYPE tag
+        let ind = indent(slnum)
+      else
+        " align to beginning of tag + sw
+        let ind = indent(slnum) + &sw
+      endif
+    else
+      let ind = (&sw *
+            \  (<SID>XmlIndentWithPattern(prev_line, b:xml_indent_open)
+            \ - <SID>XmlIndentWithPattern(prev_line, b:xml_indent_close)
+            \ - <SID>XmlIndentWithPattern(prev_line, '.\{-}/>'))) + ind
+    endif
+  else
+    let ind = ind " prev_line is </end>, keep indent
+  endif
+
+  if match(cur_line, '^\s*</') == 0
+    " cur_line is </end>, decrease ind
+    let ind = (&sw *
+          \  (<SID>XmlIndentWithPattern(cur_line, b:xml_indent_open)
+          \ - <SID>XmlIndentWithPattern(cur_line, b:xml_indent_close)
+          \ - <SID>XmlIndentWithPattern(cur_line, '.\{-}/>'))) + ind
+  endif
+
+  return ind
+endfun
+
+" vim:ts=8

File _vim/indent/xml.vim

+if exists('b:did_indent')
+  finish
+endif
+
+let b:did_indent = 1
+
+" [-- local settings (must come before aborting the script) --]
+setlocal indentexpr=XmlIndentGet(v:lnum,0)
+setlocal indentkeys=o,O,*<Return>,<>>,<<>,/,{,}
+
+set cpo-=C
+
+if !exists('b:xml_indent_open')
+  let b:xml_indent_open = '.\{-}<\a'
+  " pre tag, e.g. <address>
+  " let b:xml_indent_open = '.\{-}<[/]\@!\(address\)\@!'
+endif
+
+if !exists('b:xml_indent_close')
+  let b:xml_indent_close = '.\{-}</'
+  " end pre tag, e.g. </address>
+  " let b:xml_indent_close = '.\{-}</\(address\)\@!'
+endif
+
+" [-- finish, if the function already exists --]
+if exists('*XmlIndentGet') | finish | endif
+
+fun! <SID>XmlIndentWithPattern(line, pat)
+  let s = substitute('x'.a:line, a:pat, "\1", 'g')
+  return strlen(substitute(s, "[^\1].*$", '', ''))
+endfun
+
+" [-- check if it's xml --]
+fun! <SID>XmlIndentSynCheck(lnum)
+  if '' != &syntax
+    let syn1 = synIDattr(synID(a:lnum, 1, 1), 'name')
+    let syn2 = synIDattr(synID(a:lnum, strlen(getline(a:lnum)) - 1, 1), 'name')
+    if '' != syn1 && syn1 !~ 'xml' && '' != syn2 && syn2 !~ 'xml'
+      " don't indent pure non-xml code
+      return 0
+    endif
+  endif
+  return 1
+endfun
+
+fun! XmlIndentGet(cur_lnum, use_syntax_check)
+  " Find a non-empty line above the current line.
+  let cur_lnum = a:cur_lnum
+  let cur_line = getline(cur_lnum)
+  let prev_lnum = prevnonblank(cur_lnum - 1)
+  let prev_line = getline(prev_lnum)
+
+  " Hit the start of the file, use zero indent.
+  if prev_lnum == 0
+    return 0
+  endif
+
+"  if a:use_syntax_check
+"    if 0 == <SID>XmlIndentSynCheck(prev_lnum) || 0 == <SID>XmlIndentSynCheck(a:lnum)
+"      return indent(a:lnum)
+"    endif
+"  endif
+
+  let ind = indent(prev_lnum)
+
+  if match(prev_line, '^\s*</') == -1 " prev_line is not </end>, increase ind
+    let xx = match(prev_line, '^\s*<[^ >]\+\s\+\zs\w.*[^>]$')
+    if xx >= 0
+      let ind =  xx
+    elseif match(prev_line, '^\s*<%--') == 0
+          \ && match(prev_line, '--%>$') == -1
+      let ind = ind + 5
+    elseif match(prev_line, '^\s*<!--') == 0
+          \ && match(prev_line, '-->$') == -1
+      let ind = ind + 5
+    elseif match(prev_line, '-->$') >= 0
+      " if prev_line is the end of comment, align to the beginning of comment
+      let slnum = prev_lnum
+      while match(getline(slnum), '^\s*<!--') < 0
+        let slnum = slnum - 1
+      endwhile
+      let ind = indent(slnum)
+    elseif match(prev_line, '--%>$') >= 0
+      " if prev_line is the end of comment, align to the beginning of comment
+      let slnum = prev_lnum
+      while match(getline(slnum), '^\s*<%--') < 0
+        let slnum = slnum - 1
+      endwhile
+      let ind = indent(slnum)
+    elseif match(prev_line, '^\s*[a-zA-Z]\S\+=.*>$') == 0
+          \ || match(prev_line, '^\s*".*">$') == 0
+      " if prev_line is end of multi-line tag,
+      let slnum = prev_lnum
+      while indent(slnum) >= ind
+        let slnum = slnum - 1
+      endwhile
+      if match(prev_line, '/>$') >= 0
+        " align to beginning of tag if it's closed.
+        let ind = indent(slnum)
+      elseif match(getline(slnum), '^\s*<!DOCTYPE') == 0
+        " align to beginning of DOCTYPE tag
+        let ind = indent(slnum)
+      else
+        " align to beginning of tag + sw
+        let ind = indent(slnum) + &sw
+      endif
+    else
+      let ind = (&sw *
+            \  (<SID>XmlIndentWithPattern(prev_line, b:xml_indent_open)
+            \ - <SID>XmlIndentWithPattern(prev_line, b:xml_indent_close)
+            \ - <SID>XmlIndentWithPattern(prev_line, '.\{-}/>'))) + ind
+    endif
+  else
+    let ind = ind " prev_line is </end>, keep indent
+  endif
+
+  if match(cur_line, '^\s*</') == 0
+    " cur_line is </end>, decrease ind
+    let ind = (&sw *
+          \  (<SID>XmlIndentWithPattern(cur_line, b:xml_indent_open)
+          \ - <SID>XmlIndentWithPattern(cur_line, b:xml_indent_close)
+          \ - <SID>XmlIndentWithPattern(cur_line, '.\{-}/>'))) + ind
+  endif
+
+  return ind
+endfun
+
+" vim:ts=8

File _vim/syntax/html.vim

+" Vim syntax file
+" Language:	HTML
+" Maintainer:	Claudio Fleiner <claudio@fleiner.com>
+" URL:		http://www.fleiner.com/vim/syntax/html.vim
+" Last Change:  2006 April 13
+
+" Please check :help html.vim for some comments and a description of the options
+
+" For version 5.x: Clear all syntax items
+" For version 6.x: Quit when a syntax file was already loaded
+if !exists("main_syntax")
+  if version < 600
+    syntax clear
+  elseif exists("b:current_syntax")
+    finish
+  endif
+  let main_syntax = 'html'
+endif
+
+" don't use standard HiLink, it will not work with included syntax files
+if version < 508
+  command! -nargs=+ HtmlHiLink hi link <args>
+else
+  command! -nargs=+ HtmlHiLink hi def link <args>
+endif
+
+
+syn case ignore
+
+" mark illegal characters
+syn match htmlError "[<>&]"
+
+
+" tags
+syn region  htmlString   contained start=+"+ end=+"+ contains=htmlSpecialChar,javaScriptExpression,@htmlPreproc
+syn region  htmlString   contained start=+'+ end=+'+ contains=htmlSpecialChar,javaScriptExpression,@htmlPreproc
+syn match   htmlValue    contained "=[\t ]*[^'" \t>][^ \t>]*"hs=s+1   contains=javaScriptExpression,@htmlPreproc
+syn region  htmlEndTag             start=+</+      end=+>+ contains=htmlTagN,htmlTagError
+syn region  htmlTag                start=+<[^/]+   end=+>+ contains=htmlTagN,htmlString,htmlArg,htmlValue,htmlTagError,htmlEvent,htmlCssDefinition,@htmlPreproc,@htmlArgCluster
+syn match   htmlTagN     contained +<\s*[-a-zA-Z0-9]\++hs=s+1 contains=htmlTagName,htmlSpecialTagName,@htmlTagNameCluster
+syn match   htmlTagN     contained +</\s*[-a-zA-Z0-9]\++hs=s+2 contains=htmlTagName,htmlSpecialTagName,@htmlTagNameCluster
+syn match   htmlTagError contained "[^>]<"ms=s+1
+
+
+" tag names
+syn keyword htmlTagName contained address applet area a base basefont
+syn keyword htmlTagName contained big blockquote br caption center
+syn keyword htmlTagName contained cite code dd dfn dir div dl dt font
+syn keyword htmlTagName contained form hr html img
+syn keyword htmlTagName contained input isindex kbd li link map menu
+syn keyword htmlTagName contained meta ol option param pre p samp span
+syn keyword htmlTagName contained select small strike sub sup
+syn keyword htmlTagName contained table td textarea th tr tt ul var xmp
+syn match htmlTagName contained "\<\(b\|i\|u\|h[1-6]\|em\|strong\|head\|body\|title\)\>"
+
+" new html 4.0 tags
+syn keyword htmlTagName contained abbr acronym bdo button col label
+syn keyword htmlTagName contained colgroup del fieldset iframe ins legend
+syn keyword htmlTagName contained object optgroup q s tbody tfoot thead
+
+" legal arg names
+syn keyword htmlArg contained action
+syn keyword htmlArg contained align alink alt archive background bgcolor
+syn keyword htmlArg contained border bordercolor cellpadding
+syn keyword htmlArg contained cellspacing checked class clear code codebase color
+syn keyword htmlArg contained cols colspan content coords enctype face
+syn keyword htmlArg contained gutter height hspace id
+syn keyword htmlArg contained link lowsrc marginheight
+syn keyword htmlArg contained marginwidth maxlength method name prompt
+syn keyword htmlArg contained rel rev rows rowspan scrolling selected shape
+syn keyword htmlArg contained size src start target text type url
+syn keyword htmlArg contained usemap ismap valign value vlink vspace width wrap
+syn match   htmlArg contained "\<\(http-equiv\|href\|title\)="me=e-1
+
+" Netscape extensions
+syn keyword htmlTagName contained frame noframes frameset nobr blink
+syn keyword htmlTagName contained layer ilayer nolayer spacer
+syn keyword htmlArg     contained frameborder noresize pagex pagey above below
+syn keyword htmlArg     contained left top visibility clip id noshade
+syn match   htmlArg     contained "\<z-index\>"
+
+" Microsoft extensions
+syn keyword htmlTagName contained marquee
+
+" html 4.0 arg names
+syn match   htmlArg contained "\<\(accept-charset\|label\)\>"
+syn keyword htmlArg contained abbr accept accesskey axis char charoff charset
+syn keyword htmlArg contained cite classid codetype compact data datetime
+syn keyword htmlArg contained declare defer dir disabled for frame
+syn keyword htmlArg contained headers hreflang lang language longdesc
+syn keyword htmlArg contained multiple nohref nowrap object profile readonly
+syn keyword htmlArg contained rules scheme scope span standby style
+syn keyword htmlArg contained summary tabindex valuetype version
+
+" special characters
+syn match htmlSpecialChar "&#\=[0-9A-Za-z]\{1,8};"
+
+" Comments (the real ones or the old netscape ones)
+if exists("html_wrong_comments")
+  syn region htmlComment                start=+<!--+    end=+--\s*>+
+else
+  syn region htmlComment                start=+<!+      end=+>+   contains=htmlCommentPart,htmlCommentError
+  syn match  htmlCommentError contained "[^><!]"
+  syn region htmlCommentPart  contained start=+--+      end=+--\s*+  contains=@htmlPreProc
+endif
+syn region htmlComment                  start=+<!DOCTYPE+ keepend end=+>+
+
+" server-parsed commands
+syn region htmlPreProc start=+<!--#+ end=+-->+ contains=htmlPreStmt,htmlPreError,htmlPreAttr
+syn match htmlPreStmt contained "<!--#\(config\|echo\|exec\|fsize\|flastmod\|include\|printenv\|set\|if\|elif\|else\|endif\|geoguide\)\>"
+syn match htmlPreError contained "<!--#\S*"ms=s+4
+syn match htmlPreAttr contained "\w\+=[^"]\S\+" contains=htmlPreProcAttrError,htmlPreProcAttrName
+syn region htmlPreAttr contained start=+\w\+="+ skip=+\\\\\|\\"+ end=+"+ contains=htmlPreProcAttrName keepend
+syn match htmlPreProcAttrError contained "\w\+="he=e-1
+syn match htmlPreProcAttrName contained "\(expr\|errmsg\|sizefmt\|timefmt\|var\|cgi\|cmd\|file\|virtual\|value\)="he=e-1
+
+if !exists("html_no_rendering")
+  " rendering
+  syn cluster htmlTop contains=@Spell,htmlTag,htmlEndTag,htmlSpecialChar,htmlPreProc,htmlComment,htmlLink,javaScript,@htmlPreproc
+
+  syn region htmlBold start="<b\>" end="</b>"me=e-4 contains=@htmlTop,htmlBoldUnderline,htmlBoldItalic
+  syn region htmlBold start="<strong\>" end="</strong>"me=e-9 contains=@htmlTop,htmlBoldUnderline,htmlBoldItalic
+  syn region htmlBoldUnderline contained start="<u\>" end="</u>"me=e-4 contains=@htmlTop,htmlBoldUnderlineItalic
+  syn region htmlBoldItalic contained start="<i\>" end="</i>"me=e-4 contains=@htmlTop,htmlBoldItalicUnderline
+  syn region htmlBoldItalic contained start="<em\>" end="</em>"me=e-5 contains=@htmlTop,htmlBoldItalicUnderline
+  syn region htmlBoldUnderlineItalic contained start="<i\>" end="</i>"me=e-4 contains=@htmlTop
+  syn region htmlBoldUnderlineItalic contained start="<em\>" end="</em>"me=e-5 contains=@htmlTop
+  syn region htmlBoldItalicUnderline contained start="<u\>" end="</u>"me=e-4 contains=@htmlTop,htmlBoldUnderlineItalic
+
+  syn region htmlUnderline start="<u\>" end="</u>"me=e-4 contains=@htmlTop,htmlUnderlineBold,htmlUnderlineItalic
+  syn region htmlUnderlineBold contained start="<b\>" end="</b>"me=e-4 contains=@htmlTop,htmlUnderlineBoldItalic
+  syn region htmlUnderlineBold contained start="<strong\>" end="</strong>"me=e-9 contains=@htmlTop,htmlUnderlineBoldItalic
+  syn region htmlUnderlineItalic contained start="<i\>" end="</i>"me=e-4 contains=@htmlTop,htmlUnderlineItalicBold
+  syn region htmlUnderlineItalic contained start="<em\>" end="</em>"me=e-5 contains=@htmlTop,htmlUnderlineItalicBold
+  syn region htmlUnderlineItalicBold contained start="<b\>" end="</b>"me=e-4 contains=@htmlTop
+  syn region htmlUnderlineItalicBold contained start="<strong\>" end="</strong>"me=e-9 contains=@htmlTop
+  syn region htmlUnderlineBoldItalic contained start="<i\>" end="</i>"me=e-4 contains=@htmlTop
+  syn region htmlUnderlineBoldItalic contained start="<em\>" end="</em>"me=e-5 contains=@htmlTop
+
+  syn region htmlItalic start="<i\>" end="</i>"me=e-4 contains=@htmlTop,htmlItalicBold,htmlItalicUnderline
+  syn region htmlItalic start="<em\>" end="</em>"me=e-5 contains=@htmlTop
+  syn region htmlItalicBold contained start="<b\>" end="</b>"me=e-4 contains=@htmlTop,htmlItalicBoldUnderline
+  syn region htmlItalicBold contained start="<strong\>" end="</strong>"me=e-9 contains=@htmlTop,htmlItalicBoldUnderline
+  syn region htmlItalicBoldUnderline contained start="<u\>" end="</u>"me=e-4 contains=@htmlTop
+  syn region htmlItalicUnderline contained start="<u\>" end="</u>"me=e-4 contains=@htmlTop,htmlItalicUnderlineBold
+  syn region htmlItalicUnderlineBold contained start="<b\>" end="</b>"me=e-4 contains=@htmlTop
+  syn region htmlItalicUnderlineBold contained start="<strong\>" end="</strong>"me=e-9 contains=@htmlTop
+
+  syn region htmlLink start="<a\>\_[^>]*\<href\>" end="</a>"me=e-4 contains=@Spell,htmlTag,htmlEndTag,htmlSpecialChar,htmlPreProc,htmlComment,javaScript,@htmlPreproc
+  syn region htmlH1 start="<h1\>" end="</h1>"me=e-5 contains=@htmlTop
+  syn region htmlH2 start="<h2\>" end="</h2>"me=e-5 contains=@htmlTop
+  syn region htmlH3 start="<h3\>" end="</h3>"me=e-5 contains=@htmlTop
+  syn region htmlH4 start="<h4\>" end="</h4>"me=e-5 contains=@htmlTop
+  syn region htmlH5 start="<h5\>" end="</h5>"me=e-5 contains=@htmlTop
+  syn region htmlH6 start="<h6\>" end="</h6>"me=e-5 contains=@htmlTop
+  syn region htmlHead start="<head\>" end="</head>"me=e-7 end="<body\>"me=e-5 end="<h[1-6]\>"me=e-3 contains=htmlTag,htmlEndTag,htmlSpecialChar,htmlPreProc,htmlComment,htmlLink,htmlTitle,javaScript,cssStyle,@htmlPreproc
+  syn region htmlTitle start="<title\>" end="</title>"me=e-8 contains=htmlTag,htmlEndTag,htmlSpecialChar,htmlPreProc,htmlComment,javaScript,@htmlPreproc
+endif
+
+syn keyword htmlTagName         contained noscript
+syn keyword htmlSpecialTagName  contained script style
+if main_syntax != 'java' || exists("java_javascript")
+  " JAVA SCRIPT
+  syn include @htmlJavaScript syntax/javascript.vim
+  unlet b:current_syntax
+  syn region  javaScript start=+<script[^>]*>+ keepend end=+</script>+me=s-1 contains=@htmlJavaScript,htmlCssStyleComment,htmlScriptTag,@htmlPreproc
+  syn region  htmlScriptTag     contained start=+<script+ end=+>+       contains=htmlTagN,htmlString,htmlArg,htmlValue,htmlTagError,htmlEvent
+  HtmlHiLink htmlScriptTag htmlTag
+endif
+
+syn cluster htmlJavaScript      add=@htmlPreproc
+
+if main_syntax != 'java' || exists("java_css")
+  " embedded style sheets
+  syn keyword htmlArg           contained media
+  syn include @htmlCss syntax/css.vim
+  unlet b:current_syntax
+  syn region cssStyle start=+<style+ keepend end=+</style>+ contains=@htmlCss,htmlTag,htmlEndTag,htmlCssStyleComment,@htmlPreproc
+  syn match htmlCssStyleComment contained "\(<!--\|-->\)"
+  syn region htmlCssDefinition matchgroup=htmlArg start='style="' keepend matchgroup=htmlString end='"' contains=css.*Attr,css.*Prop,cssComment,cssLength,cssColor,cssURL,cssImportant,cssError,cssString,@htmlPreproc
+  HtmlHiLink htmlStyleArg htmlString
+endif
+
+if main_syntax == "html"
+  " synchronizing (does not always work if a comment includes legal
+  " html tags, but doing it right would mean to always start
+  " at the first line, which is too slow)
+  syn sync match htmlHighlight groupthere NONE "<[/a-zA-Z]"
+  syn sync match htmlHighlight groupthere javaScript "<script"
+  syn sync match htmlHighlightSkip "^.*['\"].*$"
+  syn sync minlines=10
+endif
+
+" The default highlighting.
+if version >= 508 || !exists("did_html_syn_inits")
+  if version < 508
+    let did_html_syn_inits = 1
+  endif
+  HtmlHiLink htmlTag                     Function
+  HtmlHiLink htmlEndTag                  Identifier
+  HtmlHiLink htmlArg                     Type
+  HtmlHiLink htmlTagName                 htmlStatement
+  HtmlHiLink htmlSpecialTagName          Exception
+  HtmlHiLink htmlValue                     String
+  HtmlHiLink htmlSpecialChar             Special
+  
+  HtmlHiLink htmlPreStmt            PreProc
+  HtmlHiLink htmlPreError           Error
+  HtmlHiLink htmlPreProc            PreProc
+  HtmlHiLink htmlPreAttr            String
+  HtmlHiLink htmlPreProcAttrName    PreProc
+  HtmlHiLink htmlPreProcAttrError   Error
+  HtmlHiLink htmlSpecial            Special
+  HtmlHiLink htmlSpecialChar        Special
+  HtmlHiLink htmlString             String
+  HtmlHiLink htmlStatement          Statement
+  HtmlHiLink htmlComment            Comment
+  HtmlHiLink htmlCommentPart        Comment
+  HtmlHiLink htmlValue              String
+  HtmlHiLink htmlCommentError       htmlError
+  HtmlHiLink htmlTagError           htmlError
+  HtmlHiLink htmlEvent              javaScript
+  HtmlHiLink htmlError              Error
+  
+  HtmlHiLink javaScript             Special
+  HtmlHiLink javaScriptExpression   javaScript
+  HtmlHiLink htmlCssStyleComment    Comment
+  HtmlHiLink htmlCssDefinition      Special
+endif
+
+delcommand HtmlHiLink
+
+let b:current_syntax = "html"
+
+if main_syntax == 'html'
+  unlet main_syntax
+endif
+
+" vim: ts=8

File _vim/syntax/python.vim

+" Vim syntax file
+" Language:	Python
+" Maintainer:	Dmitry Vasiliev <dima@hlabs.spb.ru>
+" URL:		http://www.hlabs.spb.ru/vim/python.vim
+" Last Change:	$Date: 2007-02-04 16:43:14 +0300 (Вс, 04 фев 2007) $
+" Filenames:	*.py
+" Version:	2.5.6
+" $Rev: 632 $
+"
+" Based on python.vim (from Vim 6.1 distribution)
+" by Neil Schemenauer <nas@python.ca>
+"
+" Thanks:
+"
+"    Jeroen Ruigrok van der Werven
+"        for the idea of highlighting for erroneous operators
+"    Pedro Algarvio
+"        for the patch to enable spell checking only for the right spots
+"        (strings and comments)
+
+"
+" Options:
+"
+"    For set option do: let OPTION_NAME = 1
+"    For clear option do: let OPTION_NAME = 0
+"
+" Option names:
+"
+"    For highlight builtin functions:
+"       python_highlight_builtins
+"
+"    For highlight standard exceptions:
+"       python_highlight_exceptions
+"
+"    For highlight string formatting:
+"       python_highlight_string_formatting
+"
+"    For highlight indentation errors:
+"       python_highlight_indent_errors
+"
+"    For highlight trailing spaces:
+"       python_highlight_space_errors
+"
+"    For highlight doc-tests:
+"       python_highlight_doctests
+"
+"    If you want all possible Python highlighting:
+"    (This option not override previously set options)
+"       python_highlight_all
+"
+"    For fast machines:
+"       python_slow_sync
+"
+
+" For version 5.x: Clear all syntax items
+" For version 6.x: Quit when a syntax file was already loaded
+if version < 600
+  syntax clear
+elseif exists("b:current_syntax")
+  finish
+endif
+
+if exists("python_highlight_all") && python_highlight_all != 0
+  " Not override previously set options
+  if !exists("python_highlight_builtins")
+    let python_highlight_builtins = 1
+  endif
+  if !exists("python_highlight_exceptions")
+    let python_highlight_exceptions = 1
+  endif
+  if !exists("python_highlight_string_formatting")
+    let python_highlight_string_formatting = 1
+  endif
+  if !exists("python_highlight_indent_errors")
+    let python_highlight_indent_errors = 1
+  endif
+  if !exists("python_highlight_space_errors")
+    let python_highlight_space_errors = 1
+  endif
+  if !exists("python_highlight_doctests")
+    let python_highlight_doctests = 1
+  endif
+endif
+
+" Keywords
+syn keyword pythonStatement	break continue del
+syn keyword pythonStatement	exec return
+syn keyword pythonStatement	pass print raise
+syn keyword pythonStatement	global assert
+syn keyword pythonStatement	lambda yield
+syn keyword pythonStatement	with
+syn keyword pythonStatement	def class nextgroup=pythonFunction skipwhite
+syn match   pythonFunction	"[a-zA-Z_][a-zA-Z0-9_]*" display contained
+syn keyword pythonRepeat	for while
+syn keyword pythonConditional	if elif else
+syn keyword pythonImport	import from as
+syn keyword pythonException	try except finally
+syn keyword pythonOperator	and in is not or
+
+" Decorators (new in Python 2.4)
+syn match   pythonDecorator	"@" display nextgroup=pythonFunction skipwhite
+
+" Comments
+syn match   pythonComment	"#.*$" display contains=pythonTodo,@Spell
+syn match   pythonRun		"\%^#!.*$"
+syn match   pythonCoding	"\%^.*\(\n.*\)\?#.*coding[:=]\s*[0-9A-Za-z-_.]\+.*$"
+syn keyword pythonTodo		TODO FIXME XXX contained
+
+" Errors
+syn match pythonError		"\<\d\+\D\+\>" display
+syn match pythonError		"[$?]" display
+syn match pythonError		"[-+&|]\{2,}" display
+syn match pythonError		"[=]\{3,}" display
+
+" TODO: Mixing spaces and tabs also may be used for pretty formatting multiline
+" statements. For now I don't know how to work around this.
+if exists("python_highlight_indent_errors") && python_highlight_indent_errors != 0
+  syn match pythonIndentError	"^\s*\( \t\|\t \)\s*\S"me=e-1 display
+endif
+
+" Trailing space errors
+if exists("python_highlight_space_errors") && python_highlight_space_errors != 0
+  syn match pythonSpaceError	"\s\+$" display
+endif
+
+" Strings
+syn region pythonString		start=+'+ skip=+\\\\\|\\'\|\\$+ excludenl end=+'+ end=+$+ keepend contains=pythonEscape,pythonEscapeError,@Spell
+syn region pythonString		start=+"+ skip=+\\\\\|\\"\|\\$+ excludenl end=+"+ end=+$+ keepend contains=pythonEscape,pythonEscapeError,@Spell
+syn region pythonString		start=+"""+ end=+"""+ keepend contains=pythonEscape,pythonEscapeError,pythonDocTest2,pythonSpaceError,@Spell
+syn region pythonString		start=+'''+ end=+'''+ keepend contains=pythonEscape,pythonEscapeError,pythonDocTest,pythonSpaceError,@Spell
+
+syn match  pythonEscape		+\\[abfnrtv'"\\]+ display contained
+syn match  pythonEscape		"\\\o\o\=\o\=" display contained
+syn match  pythonEscapeError	"\\\o\{,2}[89]" display contained
+syn match  pythonEscape		"\\x\x\{2}" display contained
+syn match  pythonEscapeError	"\\x\x\=\X" display contained
+syn match  pythonEscape		"\\$"
+
+" Unicode strings
+syn region pythonUniString	start=+[uU]'+ skip=+\\\\\|\\'\|\\$+ excludenl end=+'+ end=+$+ keepend contains=pythonEscape,pythonUniEscape,pythonEscapeError,pythonUniEscapeError,@Spell
+syn region pythonUniString	start=+[uU]"+ skip=+\\\\\|\\"\|\\$+ excludenl end=+"+ end=+$+ keepend contains=pythonEscape,pythonUniEscape,pythonEscapeError,pythonUniEscapeError,@Spell
+syn region pythonUniString	start=+[uU]"""+ end=+"""+ keepend contains=pythonEscape,pythonUniEscape,pythonEscapeError,pythonUniEscapeError,pythonDocTest2,pythonSpaceError,@Spell
+syn region pythonUniString	start=+[uU]'''+ end=+'''+ keepend contains=pythonEscape,pythonUniEscape,pythonEscapeError,pythonUniEscapeError,pythonDocTest,pythonSpaceError,@Spell
+
+syn match  pythonUniEscape	"\\u\x\{4}" display contained
+syn match  pythonUniEscapeError	"\\u\x\{,3}\X" display contained
+syn match  pythonUniEscape	"\\U\x\{8}" display contained
+syn match  pythonUniEscapeError	"\\U\x\{,7}\X" display contained
+syn match  pythonUniEscape	"\\N{[A-Z ]\+}" display contained
+syn match  pythonUniEscapeError	"\\N{[^A-Z ]\+}" display contained
+
+" Raw strings
+syn region pythonRawString	start=+[rR]'+ skip=+\\\\\|\\'\|\\$+ excludenl end=+'+ end=+$+ keepend contains=pythonRawEscape,@Spell
+syn region pythonRawString	start=+[rR]"+ skip=+\\\\\|\\"\|\\$+ excludenl end=+"+ end=+$+ keepend contains=pythonRawEscape,@Spell
+syn region pythonRawString	start=+[rR]"""+ end=+"""+ keepend contains=pythonDocTest2,pythonSpaceError,@Spell
+syn region pythonRawString	start=+[rR]'''+ end=+'''+ keepend contains=pythonDocTest,pythonSpaceError,@Spell
+
+syn match pythonRawEscape	+\\['"]+ display transparent contained
+
+" Unicode raw strings
+syn region pythonUniRawString	start=+[uU][rR]'+ skip=+\\\\\|\\'\|\\$+ excludenl end=+'+ end=+$+ keepend contains=pythonRawEscape,pythonUniRawEscape,pythonUniRawEscapeError,@Spell
+syn region pythonUniRawString	start=+[uU][rR]"+ skip=+\\\\\|\\"\|\\$+ excludenl end=+"+ end=+$+ keepend contains=pythonRawEscape,pythonUniRawEscape,pythonUniRawEscapeError,@Spell
+syn region pythonUniRawString	start=+[uU][rR]"""+ end=+"""+ keepend contains=pythonUniRawEscape,pythonUniRawEscapeError,pythonDocTest2,pythonSpaceError,@Spell
+syn region pythonUniRawString	start=+[uU][rR]'''+ end=+'''+ keepend contains=pythonUniRawEscape,pythonUniRawEscapeError,pythonDocTest,pythonSpaceError,@Spell
+
+syn match  pythonUniRawEscape		"\([^\\]\(\\\\\)*\)\@<=\\u\x\{4}" display contained
+syn match  pythonUniRawEscapeError	"\([^\\]\(\\\\\)*\)\@<=\\u\x\{,3}\X" display contained
+
+if exists("python_highlight_string_formatting") && python_highlight_string_formatting != 0
+  " String formatting
+  syn match pythonStrFormat	"%\(([^)]\+)\)\=[-#0 +]*\d*\(\.\d\+\)\=[hlL]\=[diouxXeEfFgGcrs%]" contained containedin=pythonString,pythonUniString,pythonRawString,pythonUniRawString
+  syn match pythonStrFormat	"%[-#0 +]*\(\*\|\d\+\)\=\(\.\(\*\|\d\+\)\)\=[hlL]\=[diouxXeEfFgGcrs%]" contained containedin=pythonString,pythonUniString,pythonRawString,pythonUniRawString
+endif
+
+if exists("python_highlight_doctests") && python_highlight_doctests != 0
+  " DocTests
+  syn region pythonDocTest	start="^\s*>>>" end=+'''+he=s-1 end="^\s*$" contained
+  syn region pythonDocTest2	start="^\s*>>>" end=+"""+he=s-1 end="^\s*$" contained
+endif
+
+" Numbers (ints, longs, floats, complex)
+syn match   pythonHexNumber	"\<0[xX]\x\+[lL]\=\>" display
+syn match   pythonHexNumber	"\<0[xX]\>" display
+syn match   pythonNumber	"\<\d\+[lLjJ]\=\>" display
+syn match   pythonFloat		"\.\d\+\([eE][+-]\=\d\+\)\=[jJ]\=\>" display
+syn match   pythonFloat		"\<\d\+[eE][+-]\=\d\+[jJ]\=\>" display
+syn match   pythonFloat		"\<\d\+\.\d*\([eE][+-]\=\d\+\)\=[jJ]\=" display
+
+syn match   pythonOctalError	"\<0\o*[89]\d*[lL]\=\>" display
+syn match   pythonHexError	"\<0[xX]\X\+[lL]\=\>" display
+
+if exists("python_highlight_builtins") && python_highlight_builtins != 0