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!
=====Additional gimmicks===== Additional to that you may want to save the following lines to "<kbd>~/.vim/ftplugin/mediawiki.vim</kbd>" or "<kbd>vimfiles\ftplugin\mediawiki.vim</kbd>" for some more gimmicks (you may need to put "<kbd>filetype plugin on</kbd>" in your <code>vimrc</code>): <div style="height:auto; overflow:auto;"> {{File title| $HOME/.vim/ftplugin/mediawiki.vim}} <syntaxhighlight lang="vim"> " utf-8 should be set if not already done globally setlocal fileencoding=utf-8 setlocal matchpairs+=<:> " Treat lists, indented text and tables as comment lines and continue with the " same formatting in the next line (i.e. insert the comment leader) when hitting " <CR> or using "o". setlocal comments=n:#,n:*,n:\:,s:{\|,m:\|,ex:\|} setlocal formatoptions+=roq " match HTML tags (taken directly from $VIM/ftplugin/html.vim) if exists("loaded_matchit") let b:match_ignorecase=0 let b:match_skip = 's:Comment' let b:match_words = '<:>,' . \ '<\@<=[ou]l\>[^>]*\%(>\|$\):<\@<=li\>:<\@<=/[ou]l>,' . \ '<\@<=dl\>[^>]*\%(>\|$\):<\@<=d[td]\>:<\@<=/dl>,' . \ '<\@<=\([^/][^ \t>]*\)[^>]*\%(>\|$\):<\@<=/\1>' endif " Other useful mappings " Insert a matching = automatically while starting a new header. inoremap <buffer> <silent> = <C-R>=(getline('.')==''\|\|getline('.')=~'^=\+$')?"==\<Lt>Left>":"="<CR> " Enable folding based on ==sections== setlocal foldexpr=getline(v:lnum)=~'^\\(=\\+\\)[^=]\\+\\1\\(\\s*<!--.*-->\\)\\=\\s*$'?\">\".(len(matchstr(getline(v:lnum),'^=\\+'))-1):\"=\" setlocal fdm=expr </syntaxhighlight></div>
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)