add option: keep the md view when previewing #13

Keep the markdown view opened in the original window when when opening
the preview
This commit is contained in:
Mathieu PATUREL
2017-01-27 09:55:52 +11:00
parent 52e4b917e5
commit 30d75f159d
4 changed files with 12 additions and 6 deletions

View File

@ -15,7 +15,8 @@ class NewMarkdownLivePreviewCommand(sublime_plugin.ApplicationCommand):
current_view = sublime.active_window().active_view()
file_name = current_view.file_name()
current_view.close()
if get_settings().get('keep_open_when_opening_preview') is False:
current_view.close()
if file_name is None:
return sublime.error_message('MarkdownLivePreview: Not supporting '
'unsaved file for now')