Page 1 of 1

speed up vim "browsing"

Posted: Sat Oct 30, 2004 2:33 pm
by Red Squirrel
When viewing huge files in vim, is there a way to say, scroll by 100 lines at a time, or any specified number? When editing stuff like the apache configuration, I need to hold the down arrow key and wait and wait and wait until I get to the bottom. There has to be an easier way.

Archived topic from Anythingforums, old topic ID:1251, old post ID:15948

speed up vim "browsing"

Posted: Sun Oct 31, 2004 1:57 am
by megaspaz
Red Squirrel wrote: When viewing huge files in vim, is there a way to say, scroll by 100 lines at a time, or any specified number? When editing stuff like the apache configuration, I need to hold the down arrow key and wait and wait and wait until I get to the bottom. There has to be an easier way.
not sure on the scrolling bit, but you can traverse the document faster if you know what you're looking for. if you know what you're looking for in the document you can have vi search the document for what you're looking for. kinda like find in notepad (or any other text editor). in vi command mode use slash and the word/phrase you're looking for. ex.

:/KeepAlive<press enter key>

that will match anything in the document. if it's not the right section then type this in command mode repeatedly until you find what you need:

:/<press enter key>

the slash will match the next line (it will place the cursor at the beginning of the line) that has the search pattern in it; in this case it will keep matching anything that has KeepAlive in it until you change the search pattern (searching for a new word or something).

This works in both vim and gvim.

Archived topic from Anythingforums, old topic ID:1251, old post ID:15963

speed up vim "browsing"

Posted: Sun Oct 31, 2004 1:15 pm
by Red Squirrel
Oh I see, yeah that should do it since usually I know what I'm looking for, that will actually make things faster in most cases well when editing apache files anyway.

Archived topic from Anythingforums, old topic ID:1251, old post ID:15968

speed up vim "browsing"

Posted: Sun Oct 31, 2004 6:29 pm
by megaspaz
Red Squirrel wrote: Oh I see, yeah that should do it since usually I know what I'm looking for, that will actually make things faster in most cases well when editing apache files anyway.
yeah. usually most of the time if you open a file looking for something, you know what you're looking for, just not where. it's much easier to use a text editor's find function on large docs than it is to scroll through those large docs.

Archived topic from Anythingforums, old topic ID:1251, old post ID:15972