Wednesday, May 12, 2021

Re: See the contents of an included file

On 2021-05-12 10:51, Stan Brown wrote:
> I have this mapping in my _vimrc, as suggested by the help:
> :map gf :sp<cfile><CR>
> Then when I type gf Vim splits the window, opens the file in the new
> window, and jumps to it. (The cursor can be anywhere on the file
> name; see ":h gf" for more.)

In case you don't already know it, this sounds like the behavior that

ctrl+w f

gives you, so you can keep "gf" around to open the file under the
cursor in the *same* window and use ^Wf to open the file under the
cursor in a *new* window :-)

(that said, I think the OP was asking for a visual inclusion of the
other file which is a lot more challenging to do. I'm of this
open-in-a-new-window school, too)

-tim

:help CTRL-W_f




--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/20210512152845.75928648%40bigbox.attlocal.net.

No comments:

Post a Comment