Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

:Rstylesheet edits sass if present

  • Loading branch information...
commit 9e275815602ea9f5edd5570aaeef419b6ca0469a 1 parent a44e944
@tpope authored
Showing with 6 additions and 1 deletion.
  1. +6 −1 autoload/rails.vim
View
7 autoload/rails.vim
@@ -2409,7 +2409,12 @@ function! s:apiEdit(bang,cmd,...)
endfunction
function! s:stylesheetEdit(bang,cmd,...)
- return s:EditSimpleRb(a:bang,a:cmd,"stylesheet",a:0? a:1 : s:controller(1),"public/stylesheets/",".css",1)
+ let name = a:0 ? a:1 : s:controller(1)
+ if rails#app().has('sass') && rails#app().has_file('public/stylesheets/sass/'.name.'.sass')
+ return s:EditSimpleRb(a:bang,a:cmd,"stylesheet",name,"public/stylesheets/sass/",".sass",1)
+ else
+ return s:EditSimpleRb(a:bang,a:cmd,"stylesheet",name,"public/stylesheets/",".css",1)
+ endif
endfunction
function! s:javascriptEdit(bang,cmd,...)
Please sign in to comment.
Something went wrong with that request. Please try again.