Monday, January 23, 2012

Re: Open file and position cursor at column number?

On 01/23/12 06:45, Trevor Bača wrote:
> How can I open a file and have the cursor automatically
> positioned at column number n?
>
> Something like ...
>
> vim +024l foo.txt
>
> ... but where "024l" would be interpreted as a normal command
> instead of an ex command.

You can use the "-c" command combined with the "norm" ex command
to do things like

vim +42 -c'norm 15|' file.txt

which will go to column 15 on line 42

-tim

--
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

No comments: