search next or backward and goto line tips for vim

December 16th, 2006 mysurface Posted in Text Manipulation, vi, vim | Hits: 54665 | 3 Comments »

To search in vim is very simple, even a noob vim user know that,


To search for next?
simply follow by pressing n for next keyword match point and search backward with shift+n or N.

Wanna highlight the keyword and search for next keyword match point?
Place your cursor at the desire word, and press shift 8(8 not at number pad) or *.

To highlight the keyword search?

:set hlsearch

To toggle the high light for keyword search add in ! after hlsearch.

:set hlsearch!

Map this toggle to your fav key binding? check out this.

To goto desire line?
While opening the file, I wanna goto line 165, which originally mention at here before.

vi +165

While in vim, I am editing, now I wanna travel to line 1024, use arrow key or Page up/Page down ? Don’t do that, do this
type 1024 then press shift g or G.

Goto first line?

Goto Last line?
Without pressing number and press shift g or G

3 Responses to “search next or backward and goto line tips for vim”

  1. Cheerful Xmas. Let all of your desires might occur real for yourself and your family and let us wish your next yr end up being flourishing for many us. Merry Christmas

  2. Whoops!!, and deposit anything else into consideration #2.
    Nothing at all goes into Account 1 besides SS and VA benefits.
    Spend the money away from account 2 very first.
    By doing this if a garnishment does hit, all
    they’ll get is whatever is in Account 2 at that time. If you are
    similar to of my customers, the amount of money in Account 2

  3. hype desk com customer portal topics 34438 exporting questions?page=31

Leave a Reply