if has("iconv") " Try to recognize the file encoding and convert the file let encoding = system("get_xml_encoding.py " . QuoteFilename(expand("%"))) if !v:shell_error if strlen(encoding) == 0 " By default XML files are in UTF-8 let encoding = "UTF-8" endif endif call SetupEncoding(encoding) endif setlocal matchpairs+=<:> " Add brokets to the list of pairs that match for the '%' command