On Sun, Nov 30, 2008 at 05:52:18PM -0700, Mike Hoy wrote: > In my .vimrc file I have: > set ff=dos > and it doesn't format my files for dos. I have to type it out before
Hi Mike. The problem is that it's set explicitely when opening a file per buffer. And per buffer settings override the default one. However I strongly discourage this way to do it *for all* files. Because you'll happen to edit you ~/.bashrc file as well and then: oh dear, bash won't read it :-) The way to go is using autocommands after creating, reading or before writing them. But I'd either use a localvimrc http://www.vim.org/scripts/script.php?script_id=441 to setup this autocommand or use a confirmation to remember you that you should use dos format for files. For example something like this should do it (untested): autocmd BufWritePre * if &ff != 'dos' && input('set ff to dos [y]') == 'y' | setlocal ff=dos | endif Then you'll continue to edit other files with vim as well.. Enjoy Marc Weber --~--~---------~--~----~------------~-------~--~----~ You received this message from the "vim_use" maillist. For more information, visit http://www.vim.org/maillist.php -~----------~----~----~----~------~----~------~--~---
