diff options
author | NerdyPepper <[email protected]> | 2018-02-13 11:49:15 +0000 |
---|---|---|
committer | NerdyPepper <[email protected]> | 2018-02-13 11:49:15 +0000 |
commit | 1920eb19f0efd0477c171b4eeda6b979fdefbe18 (patch) | |
tree | 44b9604cd6590129cef9baacc3b3354a0cee808f /ligature_plugins/python.vim | |
parent | 1492427be5317478f040aff795439eb092173e6b (diff) |
Add ligature plugins, installation instructions
Diffstat (limited to 'ligature_plugins/python.vim')
-rw-r--r-- | ligature_plugins/python.vim | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/ligature_plugins/python.vim b/ligature_plugins/python.vim new file mode 100644 index 0000000..3542ae3 --- /dev/null +++ b/ligature_plugins/python.vim | |||
@@ -0,0 +1,37 @@ | |||
1 | " This is a fork of vim-cute-python | ||
2 | " with a few character replacements to | ||
3 | " play well with scientifica | ||
4 | |||
5 | " we need the conceal feature (vim ≥ 7.3) | ||
6 | if !has('conceal') | ||
7 | finish | ||
8 | endif | ||
9 | |||
10 | " remove the keywords. we'll re-add them below | ||
11 | syntax clear pythonOperator | ||
12 | |||
13 | syntax match pythonOperator "\<is\>" | ||
14 | |||
15 | syntax match pyNiceOperator "\<in\>" conceal cchar=∈ | ||
16 | syntax match pyNiceOperator "\<or\>" conceal cchar=∨ | ||
17 | syntax match pyNiceOperator "\<and\>" conceal cchar=∧ | ||
18 | " include the space after “not” – if present – so that “not a” becomes “¬a”. | ||
19 | " also, don't hide “not” behind ‘¬’ if it is after “is ”. | ||
20 | syntax match pyNiceOperator "<=" conceal cchar=≤ | ||
21 | syntax match pyNiceOperator ">=" conceal cchar=≥ | ||
22 | " only conceal “==” if alone, to avoid concealing SCM conflict markers | ||
23 | syntax match pyNiceOperator "=\@<!===\@!" conceal cchar=≡ | ||
24 | syntax match pyNiceOperator "!=" conceal cchar=≠ | ||
25 | |||
26 | syntax keyword pyNiceOperator sum conceal cchar=∑ | ||
27 | syntax match pyNiceOperator "\<\%(math\.\)\?sqrt\>" conceal cchar=√ | ||
28 | syntax match pyNiceKeyword "\<\%(math\.\)\?pi\>" conceal cchar=π | ||
29 | |||
30 | syntax keyword pyNiceStatement lambda conceal cchar=λ | ||
31 | |||
32 | hi link pyNiceOperator Operator | ||
33 | hi link pyNiceStatement Statement | ||
34 | hi link pyNiceKeyword Keyword | ||
35 | hi! link Conceal Operator | ||
36 | |||
37 | setlocal conceallevel=1 | ||