Portál AbcLinuxu, 8. prosince 2025 22:30
function GetEncoding(f)
let e = system('enca -Pe "' . a:f . '"')
let e = substitute(e, '/.*', '', '')
if e =~ 'unknown'
return 'iso-8859-2'
endif
return e
endfunc
au BufReadPre * exec "set fencs=" . GetEncoding(expand('<afile>'))
set fileencodings=iso-8859-2,cp1250,utf-8,latin1
Tiskni
Sdílej:
ISSN 1214-1267, (c) 1999-2007 Stickfish s.r.o.