How to get "gf" functionality w/o gf?

0 views
Skip to first unread message

Nate

unread,
Jan 11, 2008, 9:06:55 PM1/11/08
to vim_use
Hello,

I'm using rails.vim and grep.vim, and when I run :Rgrep, I get a list
of files in a new window.

I would like to put my cursor on a file, and type "gf", but rails.vim
has gf mapped to a custom function that doesn't open the file
correctly.

How can I get the original "gf" functionality mapped to another key?

Thanks,

--Nate

Yongwei Wu

unread,
Jan 11, 2008, 9:19:55 PM1/11/08
to vim...@googlegroups.com

If you tried ":help gf", you should have seen alternatives like ]f,
[f, and CTRL-W_CTRL-F.

You may also consider mapping. Something like:

nnoremap <F5> gf

Best regards,

Yongwei

--
Wu Yongwei
URL: http://wyw.dcweb.cn/

Nate

unread,
Jan 11, 2008, 11:01:16 PM1/11/08
to vim_use
> You may also consider mapping. Something like:
> nnoremap <F5> gf

Thank you! This makes F5 perform a normal "gf", and the "gf" command
still works like rails.vim intends it to.

Thanks,
--Nate


On Jan 11, 8:19 pm, "Yongwei Wu" <wuyong...@gmail.com> wrote:
Reply all
Reply to author
Forward
0 new messages