Hello. It is convenient to edit Wikipedia and other sites with wiki markup using the Mediawiker plugin using the Sublime Text 3 editor. The problem is the lack of preview edits. I found the OmniMarkupPreviewer plugin that seems to solve the problem, but I can't start it. When I press Ctrl + Alt + O , a page with the following error opens in the browser:

Error 404 OmniMarkupPreviewer

Made changes to PreferencesPackage SettingsOmniMarkupPreviewerSettingsUserSettings - User , as indicated here :

{ "server_host": "0.0.0.0", "server_port": 9998 } 

Yes, but instead of the old error, a new one appeared:

 Error: 404 Not Found Sorry, the requested URL 'http://127.0.0.1:9998/view/52' caused an error: 'buffer_id(52) is not valid (closed or unsupported file format)' **NOTE:** If you run multiple instances of Sublime Text, you may want to adjust the `server_port` option in order to get this plugin work again. 

The console ( Ctrl + ` ) displays:

 OmniMarkupPreviewer: [INFO] Launching web browser for http://127.0.0.1:51004/view/96 OmniMarkupPreviewer: [ERROR] Exception occured while rendering using MediaWikiRenderer Traceback (most recent call last): File "./subprocess.py", line 1112, in _execute_child FileNotFoundError: [WinError 2] Не удается найти указанный файл During handling of the above exception, another exception occurred: Traceback (most recent call last): File "C:\Documents and Settings\Admin.USER-AC59577756\Application Data\Sublime Text 3\Packages\OmniMarkupPreviewer\OmniMarkupLib\RendererManager.py", line 266, in render_text rendered_text = renderer.render(text, filename=filename) File "C:\Documents and Settings\Admin.USER-AC59577756\Application Data\Sublime Text 3\Packages\OmniMarkupPreviewer\OmniMarkupLib\Renderers\base_renderer.py", line 77, in render text = self.executable_check(text, kwargs['filename']) File "C:\Documents and Settings\Admin.USER-AC59577756\Application Data\Sublime Text 3\Packages\OmniMarkupPreviewer\OmniMarkupLib\Renderers\base_renderer.py", line 106, in executable_check startupinfo=self.get_startupinfo()) File "./subprocess.py", line 824, in __init__ File "./subprocess.py", line 1118, in _execute_child FileNotFoundError: [WinError 2] Не удается найти указанный файл 

Although using the same plug-in, you can directly preview Markdown texts without reloading and saving the page and extensions to auto-refresh the page - like Reload Every - in the browser.

Markdown example in OmniMarkupPreviewer

What should I do to preview the changes I made without saving the edits on the wiki every time? Thank.

Closed due to the fact that off-topic party Nick Volynkin 4 May '16 at 6:39 .

  • Most likely, this question does not correspond to the subject of Stack Overflow in Russian, according to the rules described in the certificate .
If the question can be reformulated according to the rules set out in the certificate , edit it .

  • Stack Overflow in Russian is not a buggy program Sublime Text. The described use case also does not apply to programming. Use the mail or support forum Sublime Text. - Nick Volynkin

1 answer 1

Yesterday, April 20, 2016, it was possible to preview pages directly through Mediawiker by querying the site's API on the MediaWiki engine and transforming the wiki page into html.

  1. Install the Mediawiker plugin via Package Control . This manual does not understand all its functions, we read the description , instructions and settings on GitHub.

  2. By default, editing is available for the English, Russian Wikipedia, and engine site . If we work with other sites, then PreferencesPaskage SettingsMediawikerSettings - User → between {} enter them in the following format:

     "mediawiki_site": { "Циклопедия": { "host": "cyclowiki.org", "path": "/w/", "pagepath": "/wiki/", "username": "Саша_Черных", "password": "MyPassword", "domain": "" }, "Традиция": { "host": "traditio.wiki", "path": "/w/", "pagepath": "/wiki/", "username": "Саша_Черных", "password": "MyPassword", "domain": "" }, }, 
  3. Binding hotkeys, when clicked, opens an editable page in the browser: PreferencesPaskage SettingsMediawikerKey Bindings - User → between [] enter the code:

     // Предпросмотр вики-страницы в Медиавикере { "keys": ["Ctrl+7", "Ctrl+p"], "command": "mediawiker_preview" }, 

    As can be seen from the code, the preview corresponds to the command "mediawiker_preview" . To configure hotkeys to other commands that you are going to use by installing the PackageResourceViewer plugin, we find out that the commands correspond to Mediawiker's functions: Ctrl + Shift + PPackageResourseViewer: Open Resourse (thanks to fuzzy search, just type prvor ) → MediawikerMediawiker.sublime -commands .

    In order for the combination to be sure not to be occupied with nothing, I choose two-stage hot keys - that is, I enter Ctrl + 7 , then Ctrl + p , and only after two clicks the necessary command is executed. You can assign a one-step, only better make sure that the shortcut is free: PreferencesKey Bindings - Default → in the opened file Ctrl + F → temporarily disable the Regular expression button, otherwise you will not be able to find the + character → enter in the search form the key combination that you want to use , → if it is involved, choose another, which, however, may also be occupied by some of the plug-ins that you have installed.

  4. Select the site, articles and other pages of which we are going to edit: Alt + F1Select wiki (do not forget about the fuzzy search):

    Site selection in the top Sublime Text console

  5. Alt + F3 → enter the name of the page that we intend to edit, → it opens in a new tab → edit the page.

  6. We press the hotkey, which we set at the third stage, when we want to see what the changes look like, → a new tab will open in the browser. Shortcuts will have to click for each case previews, this will always open a new tab (if that, in Windows, the active tab is closed with the Ctrl + W combination). According to the developer, a synchronous preview, like in Markdown (see the gif in question), will not be implemented because of the resulting wiki DDOS.

    Result:

    At the sight of your brain

  7. Ctrl + S → enter the description of the edit → Enter . Changes made to wiki site.

The function is still (as of April 21, 2016) in the beta stage, we report the bugs to the developer .

  • Are you sure that each new one of the engines wiki is available separately on ruSO? - PashaPash
  • @PashaPash, [ 1 ] - “new” what? // [ 2 ] - the solution for the MediaWiki engine, which stands on the overwhelming number of wikis, including Wikipedia, would not say “one of” // [ 3 ] - take a look at the issue date. I wrote it not to tell about the new function, but in the hope of getting an answer. // Thank. - Sasha Chernykh
  • 2
    @PashaPash, I can also get an explanation, what, in fact, is bad for the SO knowledge base questions like “How to make X in IDE Y?” If the solution is in the new function Y? On the admissibility of such questions in general, see the comment by Nick Volynkin , neither here nor on EnSO questions on setting up Sublime Text are closed. - Sasha Chernykh
  • @PashaPash, if any of my answers do not comply with the rules of Stack Overflow, let me know, and I will delete them. Only source code, please allow me to save so that I can post deleted messages on my blog. Thank. - Sasha Chernykh
  • one
    @ SashaBlack meta.ru.stackoverflow.com/a/512 - Athari