X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/2111f57ad96adfcb96cb106b9d53f10a96dc074c..ad650e967740e885da3efdd1d7826a3607687ca5:/.vim/ftplugin/mediawiki.vim diff --git a/.vim/ftplugin/mediawiki.vim b/.vim/ftplugin/mediawiki.vim deleted file mode 100644 index c068d71e..00000000 --- a/.vim/ftplugin/mediawiki.vim +++ /dev/null @@ -1,51 +0,0 @@ -" 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-=tc formatoptions+=l -if v:version >= 602 | setlocal formatoptions-=a | endif - -" Make navigation more amenable to the long wrapping lines. -noremap k gk -noremap j gj -noremap gk -noremap gj -noremap 0 g0 -noremap ^ g^ -noremap $ g$ -noremap D dg$ -noremap C cg$ -noremap A g$a - -inoremap gk -inoremap gj - -" 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 -" 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 = =(getline('.')==''\|\|getline('.')=~'^=\+$')?"==\Left>":"=" - -" Enable folding based on ==sections== -setlocal foldexpr=getline(v:lnum)=~'^\\(=\\+\\)[^=]\\+\\1\\(\\s*\\)\\=\\s*$'?\">\".(len(matchstr(getline(v:lnum),'^=\\+'))-1):\"=\" -setlocal fdm=expr