Saturday, July 16, 2016

Re: how to map the n to nzz just in the jump in search result ?

On 2016-07-15 21:30, 李哲 wrote:
> as you know when you search `abc` in the text, you press `n` to go
> to the next match,
>
> now I want to map n here to nzz, what should I do?
>
> nmap n nzz obvious wrong here.

By using "nmap" rather than "nnoremap", you end up with a recursive
macro that does an "n" that does an "n" that does an "n", to infinity.

Should be able to just change it to

:nnoremap n nzz

and you're good to go.

-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

---
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/d/optout.

No comments: