Sunday, December 14, 2014

vim: search and jump

there is one feature that I had previously, but got lost after I
reinstall everything in a new machine from scratch - I couldn't
remember from which plugin this was provided...
anyway...the feature is this:

I search with /abc, if some matches found within current screen, the
cursor will move to the matched texts, but the text in current screen
won't move at all - it only move when the next match is beyond the
current screen.

see what I expected is this behavior:

this is my current screen texts:

----screen1 top-----------
1 abc
2 sldfsjsf alsjfdsl
3 12213 sdfjdksd abc
4 sfsdfsfdlfj
5 lsjfsfsaljf
6 lsjfdsfslfj
-----screen1 bottom-----

-----screen 2 top--------
7 sfsl abc lsjflsdflas
8
9
10
11
12
-----screen 2 bottom-----

when I search /abc, the cursor just move downward to line1 abc, line 3
abc, all texts remains.
only when I type "n" one more time, cursor will be put in line 7,
whole text will be refreshed to screen 2.

but currently it's not working like this, whenever I hit 'n', the
whole screen texts will be refreshed and the matched line is always
put in the 1st line of the screen. which is annoying.

b.t.w "screen" means the block of texts displayed in current screen,
not the "GNU screen" things...

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