]> git.phdru.name Git - dotfiles.git/blob - .vim/ftplugin/xml.vim
9069c202b2d173bca11e80f367588e9713c34d50
[dotfiles.git] / .vim / ftplugin / xml.vim
1 if exists("b:did_ftplugin")
2    finish
3 endif
4
5 if version >= 702 && has("iconv") && !exists('b:encoding_set')
6    " Try to recognize the file encoding and convert the file
7    let encoding = system("get_xml_encoding.py " . shellescape(expand("%")))
8    if !v:shell_error
9       if strlen(encoding) == 0
10          " By default XML files are in UTF-8
11          let encoding = "UTF-8"
12       endif
13       call SetupEncoding(encoding)
14    endif
15 endif
16
17 setlocal matchpairs+=<:> " Add brokets to the list of pairs that match for the '%' command
18 set shiftwidth=2 softtabstop=2