Like, all program files are syntax highled by this plugin for vim. But my I/O files are standard text files.
So, how to apply colour scheme for text files?
There is no such thing as a "standard text file". foo.c
and bar.json
are both "text files" but:
C
files, or JSON
files, or whatever,If your text editor can't figure out the filetype of a given file baz
, then it will have a hard time highlighting its syntax.
So you have four scenarios…
It is possible to detect the type of the file and its content follows a specific syntax.
You need to tell Vim how to detect the filetype, see :help new-filetype
, and either assign it an existing syntax, see :help 'syntax'
, or create your own, see :help syntax.txt
.
It is not possible to detect the type of the file but its content follows a specific syntax.
You need to assign a filetype manually, see :help 'filetype'
, and either assign it an existing syntax, see :help 'syntax'
, or create your own, see :help syntax.txt
.
It is possible to detect the type of the file but its content doesn't follow a specific syntax.
Well, there is no syntax to highlight so it's GAME OVER.
It is not possible to detect the type of the file and its content doesn't follow a specific syntax.
GAME OVER again.