This is a sort-of follow-up to my last post. It might help if you're reading this to take a look at my rant about vim colours. I've added this function to my ~/.vim/plugin/ folder: everything in the plugin folder is loaded into vim at startup.
I've also edited most of the files in ~/.vim/ftplugin/ to terminate with this:
" set my preferred colour scheme if this is the only buffer: call IsSingleBuffer("call MyColour()")
See my last post for an explanation of IsSingleBuffer().
And I added a line to my ~/.vimrc file:
let mapleader = "-" nnoremap <leader>c :call MyColour()<cr>
So typing "-c" in Normal mode will immediately switch the buffer (actually all buffers, vim colours are a PITA that way) to the preferred colour scheme for the current file type.