X-Git-Url: https://git.phdru.name/?p=dotfiles.git;a=blobdiff_plain;f=.vim%2Fftplugin%2Fxml.vim;h=a98560716dfd3f37ea480743a0abf0ba0357cc62;hp=02d8ac61080ffa282b65cfd493b9681c642c5cde;hb=HEAD;hpb=f46bd4d41cc7f243bc8a321effee5200aa69e709 diff --git a/.vim/ftplugin/xml.vim b/.vim/ftplugin/xml.vim index 02d8ac6..a985607 100644 --- a/.vim/ftplugin/xml.vim +++ b/.vim/ftplugin/xml.vim @@ -6,12 +6,12 @@ if version >= 702 && has("iconv") && !exists('b:encoding_set') " 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