Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Gradle syntax highlighting in vim
# ~/.vim/filetype.vim
au BufNewFile,BufRead *.gradle setf groovy
@georgik

This comment has been minimized.

Copy link

@georgik georgik commented Nov 22, 2013

I was testing it with Windows + Vim 7.4. ~/.vim/filetype.vim was not working.
Correct location was ~/.vimrc file

Thank you a lot for useful hint.

@arcseldon

This comment has been minimized.

Copy link

@arcseldon arcseldon commented Feb 23, 2014

worked a charm, thank you.

@johnykov

This comment has been minimized.

Copy link

@johnykov johnykov commented May 23, 2014

cool

@ayubmalik

This comment has been minimized.

Copy link

@ayubmalik ayubmalik commented Jun 6, 2014

Simple yet effective. Thanks.

@friederbluemle

This comment has been minimized.

Copy link

@friederbluemle friederbluemle commented Jul 29, 2014

Thanks!

@helio-frota

This comment has been minimized.

Copy link

@helio-frota helio-frota commented Feb 14, 2015

Thanks!

@sccu

This comment has been minimized.

Copy link

@sccu sccu commented Mar 4, 2015

Thanks!!

@bristy

This comment has been minimized.

Copy link

@bristy bristy commented Jul 16, 2015

worked for me . Put it in .vimrc in mac. thanks :)

@dcbljack

This comment has been minimized.

Copy link

@dcbljack dcbljack commented Mar 29, 2016

the gift that keeps on giving for vim novices!

@searover

This comment has been minimized.

Copy link

@searover searover commented Apr 2, 2016

nice!

@mhewedy

This comment has been minimized.

Copy link

@mhewedy mhewedy commented Sep 23, 2016

worked in .vimrc

@jaytaylor

This comment has been minimized.

Copy link

@jaytaylor jaytaylor commented Mar 13, 2018

If the above doesn't work for you (it didn't for me), it may be worth trying one of the originals from vimscripts.org: https://bitbucket.org/sw-samuraj/vim-gradle.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment