After I installed the 'artesanal' theme for vim and turned syntax highlighting on, every vim window has syntax highlighting including brand new empty windows [No Name], without a name or file type. I'm wondering if any of you know how to keep syntax highlighting on for every file with an extension but have it disabled for any file without a name or file extension.
This should not happen. I don't know artesanal (and "theme" is an undefined term inside Vim; it has colorschemes, filetype plugins, and syntax scripts; I hope it's not a full Vim "distribution" like spf-13 and Janus, which lure you with a quick install and out-of-the-box settings, but you pay the price with increased complexity (you need to understand both Vim's runtime loading scheme and the arbitrary conventions of the distribution) and inflexibility (the distribution may make some things easier, but other things very difficult)).
It looks like a syntax is active even for plain files. Usually, the syntax is determined by the filetype, so check :verbose setlocal filetype?
first. If this returns a value, you need to look into the detection of :help filetypes
.
If this is empty, it could also be that something sets 'syntax'
directly. You can check in the same way: :verbose setlocal syntax?
.
Now, if that also is empty, and :syntax list
doesn't show something, the highlighting could also come from :match
or :call matchadd()
commands; :call clearmatches()
would remove this then. (And you still would need to find the source that defines those matches.)