Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Help:Text editor support
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=====Adapt to MediaWiki lines without line breaks===== Wikipedia articles often only have line-breaks at the end of each paragraph, a situation Vim by default doesn't handle as other text editors. Save the following lines to "<kbd>~/.vim/ftplugin/mediawiki.vim</kbd>" or "<kbd>vimfiles\ftplugin\mediawiki.vim</kbd>" to make it as you may be used to from Notepad: {{File title| $HOME/.vim/ftplugin/mediawiki.vim}} <syntaxhighlight lang="vim"> " Many MediaWiki wikis prefer line breaks only at the end of paragraphs " (like in a text processor), which results in long, wrapping lines. setlocal wrap linebreak setlocal textwidth=0 " No auto-wrap at all. setlocal formatoptions-=t formatoptions-=c formatoptions-=a formatoptions+=l " Make navigation more amenable to the long wrapping lines. noremap <buffer> k gk noremap <buffer> j gj noremap <buffer> <Up> gk noremap <buffer> <Down> gj noremap <buffer> 0 g0 noremap <buffer> ^ g^ noremap <buffer> $ g$ noremap <buffer> D dg$ noremap <buffer> C cg$ noremap <buffer> A g$a inoremap <buffer> <Up> <C-O>gk inoremap <buffer> <Down> <C-O>gj </syntaxhighlight>
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)