I have text files which have extensions *.sc. So to make syntax highlighting for some of the keywords in that type of text files I created ~/.vim/syntax/sc.cim. Below is the file content.user $ cd ~/.vim/syntax/user $ cat sc.vim  Syntax highlightor file for files ending in *.scsyn keyword basicLanguageKeywords interface channel behavioruser $Also I added following line to ~/.vimrcau BufRead,BufNewFile *.sc set filetype=scNow I was hoping that when I do :set syntax=sc in vim, the syntax highlighting would be in effect for *.sc files. But it is not working. What is wrong here ?
syntax highlghting in vim
vim;editors;syntax highlighting
If you create your own syntax group names, like basicLanguageKeywords, then you'll have to create highlight settings for them. Stick to commonly used names so that your syntax settings work with most colour schemes. Checkout :h group-name:To be able to allow each user to pick his favorite set of colors, there mustbe preferred names for highlight groups that are common for many languages.These are the suggested group names (if syntax highlighting works properlyyou can see the actual color, except for Ignore):    *Comment        any comment    *Constant       any constant     String         a string constant: this is a string     Character      a character constant: 'c', '\n'     Number         a number constant: 234, 0xff     Boolean        a boolean constant: TRUE, false     Float          a floating point constant: 2.3e10    *Identifier     any variable name     Function       function name (also: methods for classes)    *Statement      any statement     Conditional    if, then, else, endif, switch, etc.     Repeat         for, do, while, etc.     Label          case, default, etc.     Operator       sizeof, +, *, etc.     Keyword        any other keyword     Exception      try, catch, throwIn this case, that would be Keyword.