Hi all,

the syntax rules for python incorrectly consider, say, both `filter` and 
`obj.filter` as instances of the builtin `filter`. I've added a rule to 
explicitly set the group of attributes (defined as an identifier following a 
dot) to none. Maybe it's better to create a new group for attributes, I'm not 
sure. I will update the patch with any improving suggestion.

Cheers
--
Carlos

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.
>From cc25cc6ee83f1c0e1ca9349bb2cf1f9858bd28bb Mon Sep 17 00:00:00 2001
From: memeplex <[email protected]>
Date: Fri, 31 Jul 2015 13:40:51 -0300
Subject: [PATCH] Python syntax: don't highlight attrs as builtins.

---
 runtime/syntax/python.vim | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/runtime/syntax/python.vim b/runtime/syntax/python.vim
index f99153f..d944e76 100644
--- a/runtime/syntax/python.vim
+++ b/runtime/syntax/python.vim
@@ -197,6 +197,8 @@ if !exists("python_no_builtin_highlight")
   syn keyword pythonBuiltin	ascii bytes exec
   " non-essential built-in functions; Python 2 only
   syn keyword pythonBuiltin	apply buffer coerce intern
+  " Avoid highlighting attributes as builtins
+  syn match none /\.\i\+/hs=s+1
 endif
 
 " From the 'Python Library Reference' class hierarchy at the bottom.
-- 
2.4.5

Raspunde prin e-mail lui