Skip to content

Commit

Permalink
Allow appending to path in editor.json
Browse files Browse the repository at this point in the history
Example:

    {"path": ["app/services", "app/uploaders"]}
  • Loading branch information
tpope committed Jan 22, 2013
1 parent 5a04bac commit 45aa313
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion autoload/rails.vim
Original file line number Diff line number Diff line change
Expand Up @@ -4301,7 +4301,7 @@ function! s:app_config(...) dict abort
endif
endif
if a:0
return get(self.cache.get('config'), a:1, {})
return get(self.cache.get('config'), a:1, a:0 > 1 ? a:2 : {})
else
return self.cache.get('config')
endif
Expand Down Expand Up @@ -4569,6 +4569,7 @@ function! s:SetBasePath()
call filter(old_path,'!s:startswith(v:val,transformed_path)')

let path = ['lib', 'vendor']
let path += self.app().config('path', [])
let path += ['app/controllers', 'app/helpers', 'app/mailers', 'app/models', 'app/*', 'app/models/concerns', 'app/controllers/concerns']
let path += ['app/views']
if self.controller_name() != ''
Expand Down

0 comments on commit 45aa313

Please sign in to comment.