From 58f52dbe789ccdf4666e5bd6f5b89c4763f0ebc0 Mon Sep 17 00:00:00 2001 From: Mike Tang Date: Wed, 28 Dec 2016 22:56:14 +0800 Subject: [PATCH] upgrade to version v2.2.2 --- README.md | 32 ++++------------ TEST.md | 74 +++++++++++++++++++++++++++++++++++++ plugin/markdown-preview.vim | 11 +++--- pythonx/markdown_init.py | 1 + pythonx/markdown_preview.py | 1 + pythonx/markdown_version.py | 8 ++-- resources/1.1.0 | 0 resources/2.0.0 | 0 resources/2.1.0 | 0 resources/2.1.1 | 0 resources/2.2.0 | 0 11 files changed, 92 insertions(+), 35 deletions(-) delete mode 100644 resources/1.1.0 delete mode 100644 resources/2.0.0 delete mode 100644 resources/2.1.0 delete mode 100644 resources/2.1.1 delete mode 100644 resources/2.2.0 diff --git a/README.md b/README.md index 0684cea..10c3ac7 100644 --- a/README.md +++ b/README.md @@ -45,13 +45,13 @@ Yet another vim markdown preview plugin. Not suitable for Windows. 6. then you can open your vim and type **:MarkdownPreview Github** to check whether it is ok ###Usage - +You can see exmaple document here [TEST.md](./TEST.md) ####Common Usage 1. edit your markdown doc normally 2. when you want to preview it in html you just use **:MarkdownPreview default** to show your doc in your browser 3. if you want to change your style. you just use **:MarkdownPreview GitHub** in github style markdown view -4. you can also use the following code to have more fun +4. you can also use the following code to bind key maps. ``` map m :MarkdownPreview GitHub ``` @@ -85,7 +85,7 @@ Then when you use `MarkdownPreview github`, you can see the result as below: > ![code-result](./images/charts-result.png) ####Customize -this theme is in the css folder, if you want to change it to your favorite theme. follow the steps: +This theme is in the css folder, if you want to change it to your favorite theme. follow the steps: - go into your .vim folder - find **MarkDownRes** folder and you will find default.css and GitHub.css here - add your custom css file here, such as **example.css** @@ -98,28 +98,10 @@ this theme is in the css folder, if you want to change it to your favorite theme 3. mermaid ####TODO -see [@TODO.md](https://github.com/MikeCoder/markdown-preview.vim/blob/master/TODO.md) +See [@TODO.md](https://github.com/MikeCoder/markdown-preview.vim/blob/master/TODO.md) ####LAST -wish you have a nice day - -####LECENSE -The MIT License (MIT) - -Copyright © 2015 TangDongxin - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software -and associated documentation files (the “Software”), to deal in the Software without restriction, -including without limitation the rights to use, copy, modify, merge, publish, distribute, -sublicense, and/or sell copies of the Software, and to permit persons to whom the Software -is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or -substantial portions of the Software. - -THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING -BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +Wish you have a nice day +####LICENSE +See [@LICENSE](./LICENSE) diff --git a/TEST.md b/TEST.md index b96dd3c..5e549f0 100644 --- a/TEST.md +++ b/TEST.md @@ -1,3 +1,77 @@ +###Flowchart +```chart +sequenceDiagram + participant Alice + participant Bob + Alice->>John: Hello John, how are you? + loop Healthcheck + John->>John: Fight against hypochondria + end + Note right of John: Rational thoughts
prevail... + John-->>Alice: Great! + John->>Bob: How about you? + Bob-->>John: Jolly good! +``` + +```chart +graph LR + A[Square Rect] -- Link text --> B((Circle)) + A --> C(Round Rect) + B --> D{Rhombus} + C --> D +``` + +```chart +graph TB + sq[Square shape] --> ci((Circle shape)) + + subgraph A subgraph + od>Odd shape]-- Two line
edge comment --> ro + di{Diamond with
line break} -.-> ro(Rounded
square
shape) + di==>ro2(Rounded square shape) + end + + %% Notice that no text in shape are added here instead that is appended further down + e --> od3>Really long text with linebreak
in an Odd shape] + + %% Comments after double percent signs + e((Inner / circle
and some odd
special characters)) --> f(,.?!+-*ز) + + cyr[Cyrillic]-->cyr2((Circle shape Начало)); + + classDef green fill:#9f6,stroke:#333,stroke-width:2px; + classDef orange fill:#f96,stroke:#333,stroke-width:4px; + class sq,e green + class di orange +``` + +```chart +sequenceDiagram + loop Daily query + Alice->>Bob: Hello Bob, how are you? + alt is sick + Bob->>Alice: Not so good :( + else is well + Bob->>Alice: Feeling fresh like a daisy + end + + opt Extra response + Bob->>Alice: Thanks for asking + end + end +``` + +###HTML BLOCK + +
In god we trust.
+ +###Table +| Tables | Are | Cool | +| ------------- |:-------------:| -----:| +| col 3 is | right-aligned | $1600 | +| col 2 is | centered | $12 | +| zebra stripes | are neat | $1 | + ###PYTHON ``` #!/usr/bin/env python diff --git a/plugin/markdown-preview.vim b/plugin/markdown-preview.vim index ac4188d..886882e 100644 --- a/plugin/markdown-preview.vim +++ b/plugin/markdown-preview.vim @@ -1,8 +1,7 @@ -"""""""""""""""""""""""""""""""""""""""""""" -" let VERSION = '2.2.1' -" let AUTHOR = 'Mike Tang' -" let EMAIL = 'mike@mikecoder.cn' -"""""""""""""""""""""""""""""""""""""""""""" +" markdown-preview.vim +" +""""""""""""""""""""""" + if !(has('python') || has('python3')) echo 'Error: Required vim compile with +python or +python3' finish @@ -159,5 +158,5 @@ if !exists(':MarkdownPreviewWithCustomCodeStyle') command -nargs=* MarkdownPreviewWithCustomCodeStyleCodeStyle call PreviewWithCustomCodeStyle() endif -map m :MarkdownPreviewWithCustomCodeStyleCodeStyle GitHub zenburn +map m :MarkdownPreviewWithCustomCodeStyleCodeStyle GitHub solarized_light diff --git a/pythonx/markdown_init.py b/pythonx/markdown_init.py index dcb9ccd..32fb756 100644 --- a/pythonx/markdown_init.py +++ b/pythonx/markdown_init.py @@ -1,5 +1,6 @@ #!/usr/bin/env python # encoding: utf-8 + import os import vim import platform diff --git a/pythonx/markdown_preview.py b/pythonx/markdown_preview.py index da4ac3a..1aaea98 100644 --- a/pythonx/markdown_preview.py +++ b/pythonx/markdown_preview.py @@ -1,5 +1,6 @@ #!/usr/bin/env python # encoding: utf-8 + import vim import markdown_parser import webbrowser diff --git a/pythonx/markdown_version.py b/pythonx/markdown_version.py index 9578326..ed0411a 100644 --- a/pythonx/markdown_version.py +++ b/pythonx/markdown_version.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # encoding: utf-8 -__PLUGIN_VERSION__ = '2.2.1' -__AUTHOR__ = 'Tang Dongxin' -__MAIL__ = 'mike@mikecoder.cn' -__DEBUG__ = False +__PLUGIN_VERSION__ = '2.2.2' +__AUTHOR__ = 'Tang Dongxin' +__MAIL__ = 'mike@mikecoder.cn' +__DEBUG__ = False diff --git a/resources/1.1.0 b/resources/1.1.0 deleted file mode 100644 index e69de29..0000000 diff --git a/resources/2.0.0 b/resources/2.0.0 deleted file mode 100644 index e69de29..0000000 diff --git a/resources/2.1.0 b/resources/2.1.0 deleted file mode 100644 index e69de29..0000000 diff --git a/resources/2.1.1 b/resources/2.1.1 deleted file mode 100644 index e69de29..0000000 diff --git a/resources/2.2.0 b/resources/2.2.0 deleted file mode 100644 index e69de29..0000000