I am using vim to view Spyder's Python comman history. I set to
:e +=ff=dos to get rid of
^M at the end of each line. When I switch to another file, then switch back, the
unix again. Is there anyway to have vim remember the
fileformat for the buffer?
dos to your
fileformats option. If
dos and all lines of a file end with
fileformat option of that file is automatically set to
Addendum: @ChristianBrabandt's comment to try
:set hidden might be better if the file in question has mixed end-of-line styles.
set fileformats+=dos only works if all lines end with
:e ++ff=dos prints a hint
[CR missing], but loads the file without showing the