trojan81
asked on
Vi editor
Hello Linux/Unix experts,
I have an application based off FREEBSD.
Using the VI editor, I open up a text document.
how do i
1) Page all the way to the top of the document and page all the way to the bottom of the document
2) search for keyword TEST
I have an application based off FREEBSD.
Using the VI editor, I open up a text document.
how do i
1) Page all the way to the top of the document and page all the way to the bottom of the document
2) search for keyword TEST
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
What? No one added anything to my answer which was accurate and a day earlier. One expert answer was not even addressing the question. Second one repeated pretty much what I said earlier, just gave fewer options.
@trojan81 - I agree with farzanj - you could have split a bit differently in this case, I added the search direction options though that are useful.
Thank you Gerwinjansen. I had the direction included too. You see you can simply do it with /SEARCH and then you want to go forward you press 'n' and for backwards you press 'N'.
/SEARCH and ?SEARCH is just another way to do the same.
/SEARCH and ?SEARCH is just another way to do the same.
I didn't bother addressing the direct question, because you had already addressed it. I decided to add additional value by providing additional navigation instructions as well as include a link with more vi commands.
Are you getting paid based on points? I've lost out on many points this same way. It's just points, it happens, not a big deal.
Are you getting paid based on points? I've lost out on many points this same way. It's just points, it happens, not a big deal.
:1
To go to line number 1
Or you can give any line number
And for last line you can use $
:$
In search some people use :/TEST
But : is really not needed.
To go to next TEST forward, use n
To go to next TEST backward, use N