Creating ~/.vimrc disables syntax highlighting

Your system default vimrc no longer gets loaded when you create your own (and that's as it should be).

You also won't get filetype based indenting and other things.

The solution is to add these lines to ~/.vimrc:

filetype indent plugin on
syntax on

Or you can move the content of your ~/.vimrc file to ~/.vim/plugin/CUSTOM_NAME.vim.

Vim will automatically load your configurations (without touching any other defaults)