Skip to content

Instantly share code, notes, and snippets.

@uarun
Created August 3, 2011 19:32
Show Gist options
  • Star 25 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save uarun/1123563 to your computer and use it in GitHub Desktop.
Save uarun/1123563 to your computer and use it in GitHub Desktop.
Gradle syntax highlighting in vim
# ~/.vim/filetype.vim
au BufNewFile,BufRead *.gradle setf groovy
@georgik
Copy link

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
Copy link

worked a charm, thank you.

@johnykov
Copy link

cool

@ayubmalik
Copy link

Simple yet effective. Thanks.

@friederbluemle
Copy link

Thanks!

@helio-frota
Copy link

Thanks!

@sccu
Copy link

sccu commented Mar 4, 2015

Thanks!!

@bristy
Copy link

bristy commented Jul 16, 2015

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

@dcbljack
Copy link

the gift that keeps on giving for vim novices!

@searover
Copy link

searover commented Apr 2, 2016

nice!

@mhewedy
Copy link

mhewedy commented Sep 23, 2016

worked in .vimrc

@jaytaylor
Copy link

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