-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
1. fix bug when the flowchart is not rendered. 2. simplify the configuration.
- Loading branch information
Showing
6 changed files
with
55 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
""""""""""""""""""""""" | ||
" markdown-preview.vim | ||
" version: v3.0.3 | ||
" version: v3.1.0 | ||
" author: Dongxin Tang | ||
" mail: [email protected] | ||
""""""""""""""""""""""" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,43 +1,45 @@ | ||
#!/usr/bin/env python | ||
# encoding: utf-8 | ||
|
||
import os | ||
import vim | ||
import platform | ||
import shutil | ||
import markdown_version | ||
# import os | ||
# import vim | ||
# import platform | ||
# import shutil | ||
# import markdown_version | ||
|
||
|
||
def init(): | ||
if vim.eval("exists('g:MarkDownResDir')") == '1': | ||
DisResDir = vim.eval('g:MarkDownResDir') | ||
else: | ||
if platform.system() == 'Windows': | ||
DisResDir = os.path.join(vim.eval('$HOME'), '.vim', 'MarkDownRes') | ||
elif vim.eval("has('nvim')") == '1': | ||
DisResDir = os.path.join(vim.eval('$HOME'), '.nvim', 'MarkDownRes') | ||
else: | ||
DisResDir = os.path.join(vim.eval('$HOME'), '.vim', 'MarkDownRes') | ||
|
||
if vim.eval("exists('g:SourceMarkDownResDir')") == '1': | ||
SourceResDir = vim.eval('g:SourceMarkDownResDir') | ||
else: | ||
if platform.system() == 'Windows': | ||
SourceResDir = os.path.join(vim.eval('$HOME'), '.vim', 'bundle/markdown-preview.vim/resources') | ||
elif vim.eval("has('nvim')") == '1': | ||
SourceResDir = os.path.join(vim.eval('$HOME'), '.nvim', 'bundle/markdown-preview.vim/resources') | ||
else: | ||
SourceResDir = os.path.join(vim.eval('$HOME'), '.vim', 'bundle/markdown-preview.vim/resources') | ||
|
||
if not os.path.isdir(DisResDir) or not os.path.isfile(os.path.join(DisResDir, markdown_version.__PLUGIN_VERSION__)): | ||
if os.path.isdir(DisResDir): | ||
shutil.rmtree(DisResDir) | ||
print('updating markdown-preview plugin...') | ||
|
||
shutil.copytree(SourceResDir, DisResDir) | ||
|
||
open(os.path.join(DisResDir, markdown_version.__PLUGIN_VERSION__), "w") | ||
|
||
print('markdown-preview plugin has been updated to the lastest version: ' + markdown_version.__PLUGIN_VERSION__) | ||
# if vim.eval("exists('g:PluginDir')") == '1': | ||
# DisResDir = vim.eval('g:PluginDir') | ||
# else: | ||
# print('No config path, use the default path instead.') | ||
|
||
# if platform.system() == 'Windows': | ||
# DisResDir = os.path.join(vim.eval('$HOME'), '.vim', 'MarkDownRes') | ||
# elif vim.eval("has('nvim')") == '1': | ||
# DisResDir = os.path.join(vim.eval('$HOME'), '.nvim', 'MarkDownRes') | ||
# else: | ||
# DisResDir = os.path.join(vim.eval('$HOME'), '.vim', 'MarkDownRes') | ||
|
||
# if vim.eval("exists('g:SourceMarkDownResDir')") == '1': | ||
# SourceResDir = vim.eval('g:SourceMarkDownResDir') | ||
# else: | ||
# if platform.system() == 'Windows': | ||
# SourceResDir = os.path.join(vim.eval('$HOME'), '.vim', 'bundle/markdown-preview.vim/resources') | ||
# elif vim.eval("has('nvim')") == '1': | ||
# SourceResDir = os.path.join(vim.eval('$HOME'), '.nvim', 'bundle/markdown-preview.vim/resources') | ||
# else: | ||
# SourceResDir = os.path.join(vim.eval('$HOME'), '.vim', 'bundle/markdown-preview.vim/resources') | ||
|
||
# if not os.path.isdir(DisResDir) or not os.path.isfile(os.path.join(DisResDir, markdown_version.__PLUGIN_VERSION__)): | ||
# if os.path.isdir(DisResDir): | ||
# shutil.rmtree(DisResDir) | ||
# print('updating markdown-preview plugin...') | ||
|
||
# shutil.copytree(SourceResDir, DisResDir) | ||
|
||
# open(os.path.join(DisResDir, markdown_version.__PLUGIN_VERSION__), "w") | ||
|
||
# print('markdown-preview plugin has been updated to the lastest version: ' + markdown_version.__PLUGIN_VERSION__) | ||
|
||
return False |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
#!/usr/bin/env python | ||
# encoding: utf-8 | ||
|
||
__PLUGIN_VERSION__ = '3.0.3' | ||
__PLUGIN_VERSION__ = '3.1.0' | ||
__AUTHOR__ = 'Tang Dongxin' | ||
__MAIL__ = '[email protected]' | ||
__DEBUG__ = False |