I have gvim 7.2, it recognizes .d files and highlights it correctly according to the syntax of the D programming language. However, .di files are not recognized as D files, and no highlighting is present.
How do I let vim highlight .di files according to D language?
After opening login.sh file in vim editor, press ESC key and type ':syntax on' to enable syntax highlighting. The file will look like the following image if syntax highlighting is on. Press ESC key and type, “syntax off” to disable syntax highlighting.
Vim is written in C language. The source code of Vim is available here, on Github. /src : 26.321M , mostly written in C. Most of the files are . c and .
vim (Unix-based systems) $HOME\vimfiles\filetype.
This ought to do it in .vimrc:
au BufNewFile,BufRead *.di setlocal ft=d
There are probably other ways, too.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With