You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
SpaceVim includes a `nnoremap gf gf`, in order to clobber a mapping it installs
for the `g` prefix, which displays a "guide" for the commands starting with `g`.
(They do the same for the mappings with the `z` prefix.)
https://github.com/SpaceVim/SpaceVim/blob/v1.4.0/autoload/SpaceVim/mapping/g.vim#L98
This ends up preventing vim-rails from installing a `gf` mapping of itself,
since it uses a mapcheck() to only install a mapping when either none exists or
a mapping it knowingly wants to override is present. But the mapping to itself
from SpaceVim prevents that check from succeeding, which in turn prevents
vim-rails from installing its own `gf` mapping.
This affects `gf`, but not `<C-W>f` or `<C-W>gf` which work as expected.
In order to work around this problem, update the pattern used by the mapcheck()
checking for the `gf` mapping to also succeed when the mapped expression matches
`gf` exactly.
Tested on `Pos*t.first`, confirmed that it works same as `<C-W>f` would work.
Also checked output of `:map gf` on SpaceVim with vim-rails, which matches
the expected:
n gf @<SNR>183_:find <Plug><cfile><CR>
n gf * gf
n g [G]
0 commit comments