Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I was working with a file using vi and accidentally hit something that keeps telling me "wrapped" when doing a search. I can't figure out what I hit and how to undo this.
wrap in a search just tells you it didn't find what you were looking for from the point in the file you were at to the bottom so it started at the top to search from there down to the point you were in the file. (Assuming you did "/pattern" - if "?pattern" it means it searched from your start point to the top of the file and then went to the bottom and searched up to your starting point there.)
This is standard for vi and is not a problem. If you really want to turn it off though you can type:
":set nows" which tells it to turn off wrap scan.
It will then only search from the point in the file you were at to the bottom ("/") or the top ("?").
To turn ON the wrap scan just do:
":set ws"
You can also make these settings your defaults by putting them in .exrc in your home directory. That file is read whenever you start vi/vim. Just leave out the colon (":").
Originally posted by jlightner wrap in a search just tells you it didn't find what you were looking for from the point in the file you were at to the bottom so it started at the top to search from there down to the point you were in the file. (Assuming you did "/pattern" - if "?pattern" it means it searched from your start point to the top of the file and then went to the bottom and searched up to your starting point there.)
This is standard for vi and is not a problem. If you really want to turn it off though you can type:
":set nows" which tells it to turn off wrap scan.
It will then only search from the point in the file you were at to the bottom ("/") or the top ("?").
To turn ON the wrap scan just do:
":set ws"
You can also make these settings your defaults by putting them in .exrc in your home directory. That file is read whenever you start vi/vim. Just leave out the colon (":").
Thanks, I guess I must have accidentally cut out a bunch of lines then somehow.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.