add demo;remove sublimetools

This commit is contained in:
math2001
2016-11-25 08:15:51 +11:00
parent a28785937b
commit 349d5e314a
5 changed files with 19 additions and 11 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
Thumbs.db

View File

@ -34,6 +34,10 @@ Sometimes, you just want to open a markdown file to edit it quickly, you don't c
This plugin is not finished, there's still some things to fix (custom css, focus, etc). So, don't run away if you have any trouble, just submit an issue [here](http://github.com/math2001/MarkdownLivePreview/issues). This plugin is not finished, there's still some things to fix (custom css, focus, etc). So, don't run away if you have any trouble, just submit an issue [here](http://github.com/math2001/MarkdownLivePreview/issues).
### Demo
![demo](demo.gif)
### How to open the [README](http://github.com/math2001/MarkdownLivePreview/README.md) ### How to open the [README](http://github.com/math2001/MarkdownLivePreview/README.md)
Some of the package add a command in the menus, others in the command palette, or other nowhere. None of those options are really good, especially the last one on ST3 because the packages are compressed. But, fortunately, there is plugin that exists and **will solve this problem** for us (and he has a really cute name, don't you think?): [ReadmePlease](https://packagecontrol.io/packages/ReadmePlease). Some of the package add a command in the menus, others in the command palette, or other nowhere. None of those options are really good, especially the last one on ST3 because the packages are compressed. But, fortunately, there is plugin that exists and **will solve this problem** for us (and he has a really cute name, don't you think?): [ReadmePlease](https://packagecontrol.io/packages/ReadmePlease).

BIN
demo.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 127 KiB

View File

@ -1,9 +1,19 @@
import sublime import sublime
import sublime_plugin import sublime_plugin
from sublimetools import *
import html import html
from . import markdown2 from . import markdown2
# Main sublime tools function
def md(*t, **kwargs):
sublime.message_dialog(kwargs.get('sep', '\n').join([str(el) for el in t]))
def sm(*t, **kwargs):
sublime.status_message(kwargs.get('sep', ' ').join([str(el) for el in t]))
def em(*t, **kwargs):
sublime.error_message(kwargs.get('sep', ' ').join([str(el) for el in t]))
class MarkdownInPopupCommand(sublime_plugin.EventListener): class MarkdownInPopupCommand(sublime_plugin.EventListener):
def run(self, view): def run(self, view):
view.show_popup('<h1> hello </h1>', sublime.HIDE_ON_MOUSE_MOVE_AWAY, 1) view.show_popup('<h1> hello </h1>', sublime.HIDE_ON_MOUSE_MOVE_AWAY, 1)
@ -32,7 +42,7 @@ class MarkdownInPopupCommand(sublime_plugin.EventListener):
blockquote { blockquote {
font-style: italic; font-style: italic;
display: block; display: block;
margin-left: 20px; margin-left: 30px;
border: 1px solid red; border: 1px solid red;
} }
</style>""" </style>"""

View File

@ -1,14 +1,7 @@
# hello world # Hello world!
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
> Explicit is better than implicit > Explicit is better than implicit
hello Hi!
hi
This is *awsome*, yes!
I love it so much