Jerin Joy wrote:
I use gvim as my default editor. My source files are in a non standard
language whose syntax is similar to Verilog. When I open files from
command line in independent gvim windows the syntax highlighting uses
the verilog syntax which is what I want. The only thing is when I use
the split command to split an existing gvim window between 2 files,
the new file opened does not have the syntax highlighting or colour.
Read :help new-filetype
As an example:
" ---------------------------------------------------------------------
" filetype.vim:
if exists("did_load_myfiletypes")
finish
endif
let did_load_myfiletypes= 1
augroup filetypedetect
au BufNewFile,BufReadPost *.ExampleSuffix setf Example
augroup END
" ---------------------------------------------------------------------
where you put any suffix that is associated with your non-standard
language files
instead of "ExampleSuffix" and, in your case, change "setf Example" to
"setf verilog".
The file is .vim/filetype.vim (or, under windows,
...\vimfiles\filetype.vim).
Now, if you don't have a suffix associated with your NSL (non-standard
language),
then read :help new-filetype-scripts .
Regards,
Chip Campbell