tpope / vim-rails

rails.vim: Ruby on Rails power tools
http://www.vim.org/scripts/script.php?script_id=1567
4.1k stars 383 forks source link

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

Closed jiz4oh closed 12 months ago

jiz4oh commented 1 year ago

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

jiz4oh commented 1 year ago

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

tpope commented 12 months ago

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.

jiz4oh commented 12 months ago

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