Wednesday, March 24, 2021

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

Tony Mechelynck <antoine.mechelynck@gmail.com> wrote:
> Yes, and as icing on the cake, a variation on this one: how to go to a
> specific line and column:
>
> " Go to line and column
> function GoTo(line, column)
> exe min([line("$"), a:line]) "| normal" a:column . "|"
> endfunction

You don't need a vim function to do that. You can run normal from the
command line. Go to line 23 column 45:

vim -c ':normal 23G45|' filename

Elijah

--
--
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/4F5PrD4vNjzfYm%40panix5.panix.com.

No comments: