Monday, November 25, 2013

Re: Search and stay

"Paolo Bolzoni" <paolo.bolzoni.brown@gmail.com>:
> I often search text in the latex documents to move around.
> So I press /<some known sentence> and Vim shows me the
> place because I have incsearch active.
>
> Can I just stay in the place without pressing enter?
> I am asking because I also have hlsearch on and while
> it is normally useful in this particular case is not.

I've been wishing that could be done for some time now, but you can't;
however, you can use a mapping like:

cnoremap <C-Enter> <Enter>:nohls<CR>

which does what you want with <Ctrl-Enter>; note that when used in the
command-line while not searching it will remove the previously highlighted
search, if any.

Best,
Paul

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

No comments:

Post a Comment