On 10/11/11 20:06, Marcio Gil wrote:
When I edit a DOS batch (for example), I always need to put ':e +
+enc=cp850'.
Can I add in my _vimrc file a auto command for this? Example:
autocmd FileType dosbatch setlocal fileencoding=cp850
(don't works!)
Thanks,
Marcio.
The FileType autocommand event is too late for setting the
'fileencoding', because at that point the file has already been read.
For the same reason it isn't useful to set that option by means of a
modeline.
Try (untested)
au BufReadPre,BufNewFile *.bat,*.btm,*.sys setlocal fenc=cp850
Best regards,
Tony.
--
The notion of a "record" is an obsolete remnant of the days of the
80-column card.
-- Dennis M. Ritchie
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php