Content deleted Content added
→QuickWikiEditor: updated link |
Fortysix46 (talk | contribs) m Bluefish article is reinstated on Mediawiki, so re-adding it as editor |
||
(12 intermediate revisions by 10 users not shown) | |||
Line 1:
{{Wikipedia how-to|WP:TEXTES}}
This page contains pointers for adapting several external and in-browser text editors to editing Wikipedia articles.
Line 25:
If you are using the [[Mozilla]] web browser, it is possible to configure an external editor for editing text areas, including the Wikipedia edit area. This then avoids the need to copy and paste the article text between browser and editor. Several solutions exist:
* '''[https://addons.mozilla.org/en-US/firefox/addon/its-all-text/?src=ss It's All Text!]''', supports nonblocking editing and UTF-8 encoding. '''Note:''' If you ''also'' want ''syntax highlighting'' in your edit box, this addon may be incompatible with the highlighting in {{myprefs|Beta features}}, but works with the highlighting in {{myprefs|Gadgets}}. (See below for highlighting ''within Vim''.) '''Note: Stopped working
* '''[http://www.vimperator.org/vimperator Vimperator]''' and '''[http://dactyl.sourceforge.net/pentadactyl/ Pentadactyl]''' have a shortcut in Insert mode that allows external text editing (the default is '''[[Control key|Ctrl]]+i'''). '''Note: Stopped working
* '''[https://github.com/GhostText/GhostText GhostText]'''. An extension for both Chrome and Firefox (including Quantum) where everything that you type in your editor appears instantly in the web-browser. Requires
* '''[https://github.com/jlebon/textern textern]''' Another Firefox-Quantum-compatible replacement for ''It's all Text''. In addition to the [https://addons.mozilla.org/de/firefox/addon/textern/ addon], it requires
*'''MozEx.''' The [http://mozex.mozdev.org/ official package]{{dead}} does not support editing [[UTF-8]]-encoded documents and does not install properly
*'''[http://dafizilla.sourceforge.net/viewsourcewith/ ViewSourceWith]''' provides similar functionality vis-à-vis the text editing.
* '''[http://lib.custis.ru/index.php/TextArea_Sputnik/en TextArea Sputnik]''', supports nonblocking editing and different encodings in an external editor. (You may see question marks in an edit textbox unrelated to the
* '''[https://addons.mozilla.org/en-US/firefox/addon/withexeditor/ withExEditor]''' supports nonblocking editing in an external editor. As of this writing, it is common for other external editor plugins (It's All Text, ViewSourceWith) to not support multi-process (aka e10s) Firefox, whereas withExEditor does.
Line 52:
After editing, just save the file from your editor. The contents are automatically copied to the text area in Firefox. To indicate this, the text area turns yellow briefly.
A temporary file is created for editing and
=====Using Vim or another console editor=====
Some macros may work
<code>/home_dir/bin/wiki.edit.vim</code>
Put the above path in the Preferences box (instead of <code>/usr/bin/gvim</code>) of It's All Text. It should work. Note that <code>/home_dir/</code> is the complete path to your home directory from the root (<code>/</code>) directory; don't use <code>~/</code> (tilde) instead of <code>/home_dir/</code>; it won't work.
Line 66:
Don't forget to make the file executable with <code>$ chmod +x wiki.edit.vim</code>
=====Using Vim
To get It's All Text to work nicely with Vim
=== Lynx ===
Line 76:
After saving the file in an external editor, quitting it and returning to Lynx, answer "no" to the Lynx question "Wrap lines to fit displayed area? (n)" by pressing the {{key press|N}} key; answering "yes" will otherwise have Lynx wrap lines with normal carriage returns, which will break the document structure. Using article preview is strongly encouraged.
==== Line and paragraph
Lynx
: #define MAX_LINE 1024
This can be modified to a longer length (e.g. 8192) and recompiled. If you are unable to recompile Lynx, the following are workaround suggestions.
Line 129:
'''<CODE>lynx.cfg</CODE>''' is the config file for Lynx; the global config file in Windows is always located in the same folder as the Lynx executable, wherever it has been installed to. A typical location is <CODE>C:\Program Files\Lynx</CODE>. If Lynx is installed in that folder, then Windows Vista and newer usually require administrator access to edit the file (via User Account Control).
'''<CODE>lynx.rc</CODE>''' is a per-user Lynx User Defaults File saved from the Options page. Settings in it take priority over the global config file. In Windows Vista, the per-user User Defaults file can be in <CODE>C:\Users\''Username''\AppData\Local\temp\lynx.rc</CODE>. If the file is in the <CODE>temp</CODE> directory, care is advised when using automated cleanup tools
Lynx Option file syntax is different between global (lynx.cfg) and per-user (lynx.rc) configuration files.
Line 137:
The best way to find an option is by using the text editor's find feature.
When not in active use, an option is commented out with a hash <CODE>#</CODE> and its default setting is on; To use an option, delete the hash character before it.
===== Defaults to reconsider =====
The following options are often found as defaults in Lynx binaries compiled for Windows and might not meet formatting conventions used in Wikipedia. These options can be edited from <CODE>lynx.cfg</CODE> and are usually not specified in the Options page. Before
====== Collapsed <NOWIKI><BR></NOWIKI> tags ======
Line 181:
==== Luakit ====
[https://luakit.github.io/ Luakit] is able to edit text boxes using an external editor by pressing {{key press|Ctrl|e}} on the focused text box.
==== Nyxt ====
Line 196:
==== vimprobable ====
[https://sourceforge.net/p/vimprobable/wiki/Home/ vimprobable] can open text boxes in an external editor by typing {{key press|Ctrl|t}} while in Insert Mode. User configuration is done by
==== w3m ====
Line 208:
===Command-line tools===
* [http://search.cpan.org/~markj/WWW-Mediawiki-Client/bin/mvs mvs], a [[Perl]] program available from [[CPAN]].
* [[mw:Manual:Pywikibot]] is an extensive library and set of utilities for doing innumerable things with Wikipedia. It can also do something as simple as editing Wikipedia pages. It has some ways to avoid
<div style="height:auto; overflow:auto;"><pre>
{{-start-}}'''Демография''', или наука о народонаселении, изучает численность, состав, размещение и движение населения.
Line 235:
===Atom===
* language-mediawiki
* language-markdown
===Bluefish===
[[Bluefish_(software)|Bluefish]] supports Mediawiki syntax by default. If the auto-detection of the document language fails select the menu Document → Language → Mediawiki to enable syntax highlighting and auto completion. Specific Mediawiki syntax highlighting options can be configured in the Preferences panel under Language support → Mediawiki.
===GNU Emacs===
*
* wikitext-mode.el, see [https://www.emacswiki.org/emacs/WikitextMode WikitextMode on EmacsWiki]. Derived from WikipediaMode v.0.3.3. Source is [https://www.emacswiki.org/emacs/wikitext-mode.el available] but documentation has [[link rot|link rotted]].
* [[Wikipedia:wikipedia-mode.el|wikipedia-mode.el]] (obsolete) is a simple major mode that mostly provides [[syntax highlighting]] for MediaWiki [[mark-up]].
* [http://www.gna.org/projects/wikipedia-el/ wikipedia.el] (obsolete) is a much more advanced major mode.
====Line formatting====
Line 250 ⟶ 255:
Wikipedia articles [[Wikipedia:don't use line breaks|don't use line breaks]]. Because of this, you may want to install one of the following:
* [http://www.emacswiki.org/elisp/longlines.el longlines.el] — implements
* [http://homepage1.nifty.com/bmonkey/emacs/elisp/screen-lines.el screen-lines.el] — redefines movement commands to operate in terms of screen lines as opposed to logical lines
Line 276 ⟶ 281:
Highlighting can be configured in <code>Settings → Configure Kate → Fonts & Colors → Highlighting Text Styles</code> and select "Markup/MediaWiki" in the drop-down menu.
There is also a highlighting import tool
Kate dynamically wraps lines.
Line 282 ⟶ 287:
===gedit===
[[gedit]] is a cross-platform, free software text editor that comes bundled with [[Ubuntu (operating system)|Ubuntu]] Linux by default.
For older versions, you can download it at https://github.com/jpfleury/gedit-mediawiki/archive/master.zip, unzip, and copy the language file to the correct folder, or you can run the following in a GNU/Linux shell:
Line 311 ⟶ 316:
===TextMate===
A "MediaWiki" bundle is available in the [[TextMate]] for [[macOS]] bundle subversion repository. The bundle could ne enabled through the app preference pane GUI by checking a tickbox. To learn how to load this bundle manualy, see the [http://macromates.com/textmate/manual/bundles#getting_more_bundles TextMate manual page] about installing more bundles, or view this [[shell script]] that downloads and installs it
For [[Sublime Text]] 2 users, note that you may enable this bundle as well, since Sublime Text 2 supports TextMate bundles.
Line 344 ⟶ 349:
===Vim===
Please feel free to contribute improvements to the below scripts, or check the [
The below scripts are also posted in the [http://www.vim.org/scripts/script.php?script_id=1787 vim.org script collection], where they are occasionally updated (but not since 2011-11-17) with newer versions taken from community contributions on this site. Feel free to remind [[User:Mvc|mvc]] to upload a newer copy periodically if those become stale, since they were uploaded from his vim.org account.
Line 353 ⟶ 358:
A raw mediawiki.vim file for easy downloading exists on GitHub:<br/>https://raw.githubusercontent.com/chikamichi/mediawiki.vim/master/syntax/mediawiki.vim
When using Vim in Windows,
{{cot|title=File <samp>mediawiki.vim</samp>}}
Line 793 ⟶ 798:
[[Notepad++]] is a free text and [[Source code editor|source code editor]] for [[Microsoft Windows]]. It allows users to create their own syntax highlighting scheme; users can customize a new scheme using the mediawiki markup scheme, or [[User:MjolnirPants/mediawiki lang npp|install an existing version]] provided by the Wikipedia user [[User:MjolnirPants|MjolnirPants]].
Notepad++ supports plugins; there is a 2009 mediaWiki plugin for the 32-bit version that can be downloaded at [http://www.cab.i24.cc/projects/wikieditor/ http://www.cab.i24.cc/projects/wikieditor/] ([https://web.archive.org/web/20231001185805/http://www.cab.i24.cc/projects/wikieditor/ Internet Archive]).
===LibreOffice Writer===
The previous methods allow a Wikipedia Edit page to be processed more efficiently. [[LibreOffice Writer|LibreOffice (LO) Writer]] can be
==In-browser editors==
Line 810 ⟶ 815:
* Edit preview and show changes on the same page without reloading
* MS-Word and web page import (including tables)
*
wikEd can simply be enabled
=== QuickWikiEditor ===
Line 827 ⟶ 832:
==Dealing with special characters==
If your editor does not support UTF-8, then copy-paste from web browser may mangle the characters. For example, pasting from Windows Clipboard automatically converts characters to whatever character set
When
[http://www.babelstone.co.uk/Software/BabelPad.html BabelPad] is a free editor for Windows with special support for dealing with Unicode, and is ideal if you need to determine which of several similar-looking characters an article is using, or deal with hard-to-edit Unicode control codes (like for multidirectional text).
|