Mediawiker is an addon for SublimeText that allows you to edit pages directly within SublimeText. River from Gamepedia has a great blog about it here where she shares more about it and her setup. I am similarly putting my setup here for my own and possibly others' reference.

Pros and Cons

Overall, I find SublimeText/Mediawiker pretty helpful because I often copy and paste page/template source into a text editor anyway so that I can do find/replace (although this will be built into the editor in UCP!), see if curly braces match up, etc. I think it's definitely better for templates or code pages than content pages though.

  • (Pro) Syntax highlighting is quite nice overall but has some quirks (ex. when calling templates: param_name= param_value has proper highlighting but param_name = param_value does not.) I've fixed a few issues locally and will probably submit a pull request if I can fix the others.
  • (Con for content page edits) Page preview exists but doesn't load Fandom/site-specific JS and CSS, so the preview looks quite a lot different. There may be a workaround...
  • (Personal con) Show changes also exists but by default has no line wrap, so you need to scroll sometimes to check changes. I don't do well with horizontal scrolling. Workaround is below.
  • (Con) No template-suggest.
  • (Pro) If you hover over a link to an image, it shows a preview of the image.
  • (Pro) If you hover over a link to another page it has options to open the page source in SublimeText or view the page in browser. If you hover over a link to a non-existing page it tells you that that page does not exist.
  • (Con) Due to the above two factors, the editor is a little laggy.
  • (Pro) Automatic saving, so if SublimeText crashes you do not lose your work.
  • (Pro) Dark mode!
  • (Pro) Larger editing area.

My Plugin List

Just a few basic plugins right now...

  • BracketHighlighter
  • Jinja2
  • Language - Spanish
  • LocalizedMenu
  • Mediawiker
  • Package Control
  • WordCount

Configs

Mediawiker

I am currently using browser cookies to log in ("authorization_type": "cookies"), but another way is to use "authorization_type": "login" and supply one's username and password within the config file, as shown in the Gamepedia reference article here. Bot passwords rather than regular login will be needed upon migration to UCP. A "site" setting must be put in the file for each wiki.

{
    "site":
    {
        "English LOTRMinecraftMod Wiki":
        {
            "authorization_type": "cookies",
            "cookies_browser": "firefox",
            "domain": "",
            "host": "lotrminecraftmod.fandom.com",
            "http_auth_login": "",
            "http_auth_password": "",
            "https": true,
            "is_ssl_cert_verify": true,
            "is_wikia": true,
            "oauth_access_secret": "",
            "oauth_access_token": "",
            "oauth_consumer_secret": "",
            "oauth_consumer_token": "",
            "pagepath": "/wiki/",
            "password": "",
            "path": "/",
            "preview_custom_head":
            [
            ],
            "preview_sandbox": "",
            "proxy_host": "",
            "retry_timeout": 30,
            "show_red_links": false,
            "use_http_auth": false,
            "username": ""
        }
    },
    "site_active": "English LOTRMinecraftMod Wiki",
    "summary_postfix": "",
    "summary_prefix": "[ST] "
}

Bracket Highlighter

These settings allow angular brackets in MediaWiki syntax to be highlighted and resolve bracket matching issues from MediaWiki links.

{
    "search_threshold": 30000,
    "debug_enable": true,
    "user_brackets": [
        {
            "name": "curly",
            "scope_exclude_exceptions": [
                "text.tex string.other.math",
                "string.other.title.link.internal.mediawiki"
            ],
        },
        {
            "name": "angle",
            "language_list": [
                "HTML",
                "HTML 5",
                "XML",
                "PHP",
                "HTML (Rails)",
                "HTML (Jinja Templates)",
                "HTML (Jinja2)",
                "HTML (Twig)",
                "HTML (Django)",
                "CFML",
                "HTML+CFML",
                "ColdFusion",
                "ColdFusionCFC",
                "laravel-blade",
                "blade",
                "Handlebars",
                "AngularJS",
                "Java Server Pages (JSP)",
                "MediaWikiNG"
            ],
            "scope_exclude_exceptions": [
                "string.other.title.link.internal.mediawiki"
            ],
        }
    ]
}

General Preferences

These settings disable the default bracket matching settings, so as not to interfere with BracketHighlighter.

{
    "auto_match_enabled": false,
    "fold_buttons": false,
    "match_brackets": false,
    "match_brackets_angle": false,
    "match_brackets_braces": false,
    "match_brackets_content": false,
    "match_brackets_square": false,
    "match_tags": false
}

Diff.sublime-settings

This is an extra file created to enable word wrap within the SublimeText diff. It is stored (on Windows) at %AppData%\Roaming\Sublime Text 3\Packages\User.

{
    "word_wrap": true
}
Community content is available under CC-BY-SA unless otherwise noted.