We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 30522e2 commit 9cdbecfCopy full SHA for 9cdbecf
ftdetect/sinatra.vim
@@ -0,0 +1,9 @@
1
+autocmd BufNewFile,BufRead * call s:CheckForSinatraApp()
2
+
3
+function! s:CheckForSinatraApp()
4
+ if &filetype !~ '\(^sinatra$\|\.sinatra$\|^sinatra\.\|\.sinatra\.\)'
5
+ if search(' < Sinatra::Base', 'nwc')
6
+ set filetype+=.sinatra
7
+ endif
8
9
+endfunction
0 commit comments