]> git.phdru.name Git - dotfiles.git/blobdiff - .vim/ftplugin/xml.vim
.vimrc: Use `empty()` instead of `len`/`strlen`
[dotfiles.git] / .vim / ftplugin / xml.vim
index 9069c202b2d173bca11e80f367588e9713c34d50..a98560716dfd3f37ea480743a0abf0ba0357cc62 100644 (file)
@@ -6,7 +6,7 @@ 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