Tuesday, March 23, 2021

Re: How to specific the line to go to from the command line?

* Peng Yu <pengyu.ut@gmail.com> [2021-03-24 01:51]:
> I want to specify the line number to go to at the command line.
> Could anybody let me know how to do it with vim? Thanks.

how to go to line #23:

jump to line 23 on startup:
vim +23 filename

jump to line 23 in command mode:
23G
23gg

jump to line 23 in command mode:
:23

turn line numbering on:
:set nu

see also:
:help G
:help gg
:help range
:help 'nu'
:help +cmd

Sven

--
--
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/20210324010250.7f2354bqmwsbixhl%40guckes.net.

No comments:

Post a Comment