Skip to content

Commit f509c69

Browse files
committed
Remove support for % expansions in projections
1 parent 319e02f commit f509c69

File tree

2 files changed

+2
-12
lines changed

2 files changed

+2
-12
lines changed

autoload/rails.vim

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3168,9 +3168,7 @@ function! s:readable_open_command(cmd, argument, name, projections) dict abort
31683168
let ph = {
31693169
\ 'match': root,
31703170
\ 'file': file,
3171-
\ 'project': self.app().path(),
3172-
\ 'S': rails#camelize(root),
3173-
\ 'h': toupper(root[0]) . tr(rails#underscore(root), '_', ' ')[1:-1]}
3171+
\ 'project': self.app().path()}
31743172
call map(template, 's:expand_placeholders(v:val, ph)')
31753173
call map(template, 's:gsub(v:val, "\t", " ")')
31763174
let file = fnamemodify(simplify(file), ':.')
@@ -5005,15 +5003,7 @@ function! s:readable_projected_with_raw(key, ...) dict abort
50055003
\ 'match': root,
50065004
\ 'file': self.path(),
50075005
\ 'project': self.app().path(),
5008-
\ 's': root,
5009-
\ 'S': rails#camelize(root),
5010-
\ 'h': toupper(root[0]) . tr(rails#underscore(root), '_', ' ')[1:-1],
5011-
\ 'p': rails#pluralize(root),
5012-
\ 'i': rails#singularize(root),
50135006
\ '%': '%'}, a:0 ? a:1 : {})
5014-
if suffix =~# '\.js\>'
5015-
let ph.S = s:gsub(ph.S, '::', '.')
5016-
endif
50175007
let mine += map(s:getlist(all[pattern], a:key), '[s:expand_placeholders(v:val, ph), v:val]')
50185008
endif
50195009
endfor

doc/rails.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -693,7 +693,7 @@ transformation of the variable portion, based on those available in
693693
projectionist.vim. See projectionist.vim's documentation for a comprehensive
694694
explanation, but you can probably get the gist from the list below.
695695

696-
Older versions of rails.vim used the following deprecated % expansions, shown
696+
Older versions of rails.vim used the following unsupported % expansions, shown
697697
here with their {} equivalents:
698698

699699
`%s`: `{}` (Original)

0 commit comments

Comments
 (0)