I was using Fedora for about six months, and recently switched to Ubuntu.
Here in Ubuntu, there is no code/syntax highlighting for groovy in Vi editor, which was actually there in Fedora Vi. How to enable that?
I was using Fedora for about six months, and recently switched to Ubuntu.
Here in Ubuntu, there is no code/syntax highlighting for groovy in Vi editor, which was actually there in Fedora Vi. How to enable that?
Vim usually comes with syntax highlighting default to on.
Vim decides the syntax highlighting to enable, according to the file type (according to the file extension)
If you wish to enable syntax highlighting for a file which does not have a groovy extension you can manually set the syntax highlighting like so:
If you want to make a certain file name always open with the matching syntax highlighting, add something like this to your .vimrc:
To enable syntax highlighting in vim you have to enable it through
.vimrc
.Add:
to your
.vimrc
.Here is the typical script for groovy. I do not know if it is compatible with vi or not because I am also novice to vi/vim. You can install the full vim with:
https://ls3.io/post/jenkinsfile_vim_highlighting/
Solution in this link works for me.
executing below code. It also works in VI
Or in vim editor type: