Background about ~/vimrc file
In order to apply color schemes to VIM you would need to update the .vimrc file which is a configuration file that is read when Vim starts up. Using this file you can customize Vim's behavior and settings to suit your preferences. The file is a plain text file that you will find under the home directory.
Steps: Setting Custom Color Schema (Syntax Highlighting)
- Open Terminal/Bash Console.
- Type the below command to open the .vimrc file.
vim ~/.vimrc
- Now add the following line at the end of the file (if the file is blank at the beginning)
syntax on
colorscheme <color-scheme-name>Some of the colorschemes available by default to choose from:
- Make sure to save and quit the file using :wq
- Now when you will open VIM again you will see the color scheme has been applied.

As you would see in the below example, we created a file Hello.java and as we type the code and syntax get highlighted in colors based on the keyword and string.

Have Questions? Post them here!
- How to Undo-Revert Sent Email in Google Gmail - Google
- How to add Business Users using Microsoft 365 Admin Center - Microsoft
- How to Increase Mac Terminal Buffer Size - MacOS
- How to create SharePoint Document Library - SharePoint
- Python: Fix command not found pip or pip3 on zsh shell - Python
- Tutorial Java SOAP WebServices JAS-WS with Eclipse J2EE IDE and Tomcat Server Part 1 - Java
- Maven : java.lang.ClassNotFoundException: Xmx512m - Android
- How to run CMD console commands in Notepad++ - NotepadPlusPlus