diff --git a/after/syntax/python.vim b/after/syntax/python.vim index 7f5c6a1..3e305b2 100644 --- a/after/syntax/python.vim +++ b/after/syntax/python.vim @@ -22,14 +22,34 @@ syntax match pyNiceOperator "=\@" conceal cchar=√ -syntax match pyNiceKeyword "\<\%(math\.\)\?pi\>" conceal cchar=π +syntax keyword pyNiceBuiltin all conceal cchar=∀ +syntax keyword pyNiceBuiltin any conceal cchar=∃ +syntax match pyNiceOperator "\<\%(\%(math\|np\|numpy\)\.\)\?sqrt\>" conceal cchar=√ +syntax match pyNiceKeyword "\<\%(\%(math\|np\|numpy\)\.\)\?pi\>" conceal cchar=π +syntax match pyNiceOperator "\<\%(\%(math\|np\|numpy\)\.\)\?ceil\>" conceal cchar=⌈ +syntax match pyNiceOperator "\<\%(\%(math\|np\|numpy\)\.\)\?floor\>" conceal cchar=⌊ + +syntax keyword pyNiceStatement int conceal cchar=ℤ +syntax keyword pyNiceStatement float conceal cchar=ℝ +syntax keyword pyNiceStatement complex conceal cchar=ℂ + +syntax match pyNiceOperator " \* " conceal cchar=∙ +syntax match pyNiceOperator " / " conceal cchar=÷ +" The following are special cases where it /may/ be okay to ignore PEP8 +syntax match pyNiceOperator "\( \|\)\*\*\( \|\)2\>" conceal cchar=² +syntax match pyNiceOperator "\( \|\)\*\*\( \|\)3\>" conceal cchar=³ +syntax match pyNiceOperator "\( \|\)\*\*\( \|\)n\>" conceal cchar=ⁿ + +" Your background, and taste, may affect whether you like # for cardinality ;) +syntax keyword pyNiceBuiltin len conceal cchar=# syntax keyword pyNiceStatement lambda conceal cchar=λ +syntax keyword pyNiceStatement None conceal cchar=∅ hi link pyNiceOperator Operator hi link pyNiceStatement Statement hi link pyNiceKeyword Keyword +hi link pyNiceBuiltin Builtin hi! link Conceal Operator setlocal conceallevel=1 diff --git a/conceal-test.py b/conceal-test.py index 1d9c744..1f9c644 100644 --- a/conceal-test.py +++ b/conceal-test.py @@ -1,11 +1,11 @@ # conceal test -- lines should match """ -if a is not None: pass """ +if a is not ∅: pass """ if a is not None: pass """ -if b is None: pass """ +if b is ∅: pass """ if b is None: pass """