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