tpope / vim-rails

rails.vim: Ruby on Rails power tools

Home Page:http://www.vim.org/scripts/script.php?script_id=1567

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Feature Request]Expose the s:map_gf to customize gf

jiz4oh opened this issue · comments

commented

Hi @tpope, thank you for creating the awesome plugin, I have a bit feature request, could you please expose the s:map_gf function that let user can customize the gf map, so that I can try my personal gf function first else fallback to the vim-rails ones

commented

especial I want it's works with vim-gf-user

If you're looking to customize the map, then the last thing you want is s:map_gf, as all it does is define its own gf map. Instead, follow what the map points at: <Plug><cfile>. It in turn is defined to point at rails#ruby_cfile() or rails#sprockets_cfile(), depending on the file type.

commented

thanks your patiently explain, I have finished my plugin by rails#ruby_cfile() and rails#sprockets_cfile()