gf normal command to jump to specific line in file?

23 views
Skip to first unread message

Renato Fabbri

unread,
May 17, 2018, 1:08:39 PM5/17/18
to vim_use
is there a notation such as
./dir/file&L44
that makes gf or <c-w>f etc normal commands
jump to line 44?

tx++

Gary Johnson

unread,
May 17, 2018, 1:40:10 PM5/17/18
to vim_use
:help gF
:help CTRL-W_gF

Regards,
Gary

Renato Fabbri

unread,
May 17, 2018, 10:36:08 PM5/17/18
to vim...@googlegroups.com
thanks!

i remembered to have seen it in the manual.

how would you find it?

i performed searches on Vim help and Google.

tx++
r.


--
--
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 a topic in the Google Groups "vim_use" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/vim_use/9JWNJIT4c64/unsubscribe.
To unsubscribe from this group and all its topics, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Renato Fabbri
GNU/Linux User #479299

Tony Mechelynck

unread,
May 17, 2018, 11:37:11 PM5/17/18
to vim...@googlegroups.com
On Fri, May 18, 2018 at 4:35 AM, Renato Fabbri <renato...@gmail.com> wrote:
> thanks!
>
> i remembered to have seen it in the manual.
>
> how would you find it?

For hard cases, the :helpgrep commands works wonders. See ":help
:helpgrep" without the quotes. In fact, the whole helphelp.txt
helpfile is a well-written cheatsheet about using the help.

>
> i performed searches on Vim help and Google.
>
> tx++
> r.
>
> On Thu, May 17, 2018 at 2:39 PM, Gary Johnson <gary...@spocom.com> wrote:
>>
>> On 2018-05-17, Renato Fabbri wrote:
>> > is there a notation such as
>> > ./dir/file&L44
>> > that makes gf or <c-w>f etc normal commands
>> > jump to line 44?
>>
>> :help gF
>> :help CTRL-W_gF
>>
>> Regards,
>> Gary

Or if you are willing to type the filename (or "put" it onto the
command-line from a register, maybe but not mandatorily the
alternate-file register, see ":help c_CTRL-R") rather than find it
under the cursor, you could also use ":e +44 path/to/filename.ext"
(see ":help +cmd") (With a plus sign but no number it goes to the last
line.)

Best regards,
Tony.

Christian Brabandt

unread,
May 18, 2018, 2:53:35 AM5/18/18
to vim...@googlegroups.com

On Do, 17 Mai 2018, Renato Fabbri wrote:

> i remembered to have seen it in the manual.
>
> how would you find it?

If you know about gf I would start looking there and indeed gF is
mentioned a couple of paragraphs below.

Best,
Christian
--
Freiwillige Abhängigkeit ist der schönste Zustand, und wie wäre der
möglich ohne Liebe?
-- Johann Wolfgang von Goethe (Wahlverwandtschaften II)
Reply all
Reply to author
Forward
0 new messages