Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
10 lines (8 sloc) 329 Bytes
autocmd BufNewFile,BufRead *rb call s:CheckForSinatraApp()
function! s:CheckForSinatraApp()
if &filetype !~ '\(^sinatra$\|\.sinatra$\|^sinatra\.\|\.sinatra\.\)'
if search('Sinatra::Base\|require\s*[''"]sinatra[''"]', 'nwc') != 0
let &filetype = &filetype . ".sinatra"
endif
endif
endfunction