Setting up a file-specific (not filetype-specific) colorscheme in vim is a two step process.

First, you need a ‘modeline’[^1] in the file like this: [^1] a ‘modeline’ is a comment with vim instructions in it. My actual modeline for this file is ‘# vim: ft=readme syntax=markdown tabstop=2 shiftwidth=2 softtabstop=2 expandtab’. There’s some explanation of modelines here: https://vim.fandom.com/wiki/Modeline_magic

# vim: ft=readme

‘ft’ here is, somewhat confusingly given my post’s title, short for filetype. The name of the filetype is kind-of arbitrary. It’s probably best to be descriptive, and better if it doesn’t correspond to an actual filetype like .md or ‘markdown’ or ‘txt’

Second, you need like this in your vimrc

autocmd FileType readme colorscheme peachpuff

Why would I do such a thing

I have a couple of ‘big old text files’ open most of the time.

One is for general notes, and a record of what’s happened during the week. The other is when I’m doing a chunky-ish bit of coding which records decisions, todo’s, worries and web-clippings which are specific to that code

Having a separate colour scheme just makes it handier to find either of the files I want when I’m alt-tabbing through my 103 open windows