1
0
mirror of https://github.com/amix/vimrc synced 2025-06-16 01:25:00 +08:00

Updated plugins, also experimenting with a new font

The font is IBM Plex Mono: https://ibm.github.io/type/
This commit is contained in:
amix
2017-11-24 14:54:40 +01:00
parent 7fc202ec88
commit e9aac9794b
255 changed files with 2898 additions and 3752 deletions

View File

@ -41,6 +41,8 @@ INCLUDABLE_DIRECTIVES = ['image', 'figure', 'include']
# http://stackoverflow.com/questions/2718196/find-all-chinese-text-in-a-string-using-python-and-regex
CJK_RE = re.compile(u'[⺀-⺙⺛-⻳⼀-⿕々〇〡-〩〸-〺〻㐀-䶵一-鿃豈-鶴侮-頻並-龎]', re.UNICODE)
#http://www.pygal.org/en/stable/documentation/types/index.html
CHART_TYPES = ["Line", "StackedLine", "HorizontalLine", "Bar", "StackedBar", "HorizontalBar", "Histogram", "XY", "DateLine", "TimeLine", "TimeDeltaLine", "DateTimeLine", "Pie", "Radar", "Box", "Dot", "Funnel", "Gauge", "SolidGauge", "Pyramid", "Treemap"]
def has_cjk(s):
"""Detect if s contains CJK characters."""
@ -299,6 +301,19 @@ snippet fnt "Footnote or Citation" i
.. [$1] ${2:Reference}
endsnippet
# Only for Nikola — Static Site Generator
snippet chart "Pygal chart for Nikola" b
.. chart:: $1`!p snip.rv=complete(t[1], CHART_TYPES)`
:title: '${2:Browser usage evolution (in %)}'
:x_labels: [${3:"2002", "2003", "2004", "2005", "2006", "2007"}]
'Firefox', [None, None, 0, 16.6, 25, 31]
'Chrome', [None, None, None, None, None, None]
'IE', [85.8, 84.6, 84.7, 74.5, 66, 58.6]
'Others', [14.2, 15.4, 15.3, 8.9, 9, 10.4]
$0
endsnippet
############
# Sphinx #
############