" This detects the presence of the preseed file magic string on the first line " of a file whenever vim opens it. " " I found the vim `:help` a bit thin on how to do it, and thus had to consult " the following two stackoverflow threads to get it working: " " https://stackoverflow.com/q/54207515/using-a-file-type-plugin-file " https://stackoverflow.com/q/5774824/set-filetype-for-none-extension if did_filetype() " filetype already set.. finish " ..don't do these checks endif if getline(1) =~? '^#_preseed_V1' setfiletype preseed set filetype=preseed endif