]> git.phdru.name Git - dotfiles.git/blob - po.vim
2c798d954e4f52f21acc1a223db06b447705360a
[dotfiles.git] / po.vim
1 if exists("b:did_ftplugin")
2    finish
3 endif
4
5 if has("iconv") && !exists('b:encoding_set')
6    " Try to recognize the file encoding and convert the file
7    if search("^\"Content-Type: text/plain; charset=") > 0
8       let line = getline(".")
9       let encoding = matchlist(line, 'charset=\(\(\w\|-\)\+\)')[1]
10       call SetupEncoding(encoding)
11    endif
12 endif