" Vim plugin to edit .cub files " Copy this file in ~/.vim/plugin/ function! CubSyntax() if expand('%:e') == 'cub' highlight cubDefault ctermfg=white ctermbg=red syntax match cubDefault /./ highlight cubEmpty ctermbg=darkblue syntax match cubEmpty / / highlight cub0 cterm=bold ctermfg=grey syntax match cub0 /0/ highlight cub1 cterm=bold ctermfg=white syntax match cub1 /1/ highlight cubP cterm=bold ctermfg=yellow syntax match cubP /[NSWE]/ highlight cubParameter cterm=NONE ctermfg=yellow ctermbg=black syntax match cubParameter /\v^(NO|SO|WE|EA|C|F).*$/ endif endfunction autocmd BufReadPost * call CubSyntax()