On Friday, February 21, 2014 10:15:42 AM UTC-6, junior fruithuibje wrote:
> Hello,
>
> When I start gvim from the command line via this command:
>
> gvim "C:\\temp\\mytest.txt" "+set wrapscan" "+set ignorecase" "+44" "-c/RM_NULL"
>
> (so I want to have the cursor on line 44 and search for keyword "RM_NULL")
>
> It shows up with a blank screen and a text in the bottom "Press key to continue", after I press a key it shows me the content, the cursor is at the correct line and the keyword is in the search buffer (all as I expect)
>
> Why is the keypress needed? Can I do something to avoid it and opens up right away?
> It is to my opinion because it does a wrap around from bottom to top since the keyword is exactly at line 44 (if I turn on line numbers then it is line 44)
>
> Since if I open it with "+43" I don't need the keypress. So counting it starts at zero for search but when displaying at 1?
>
> Maybe someone can explain why it is like this.. I use this in a IDE to open up a file from a search results window, from there I get the line number and the keyword.
>
> thanks!
Vim displays a message when you open a file. Vim displays another message when a search wraps around from the end to the beginning of the file. Thus when you launch Vim in this way, you get two messages.
If you only have space for one message, Vim will make you press enter to continue, so that you can see both messages.
Try setting your 'cmdheight' option to 2 or higher. This gets rid of the press enter prompt in many cases such as this.
--
--
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.
For more options, visit https://groups.google.com/groups/opt_out.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment