Let’s say we have a text, and I enter visual mode and select some text. How do I quickly do a search for the highlighted text and replace it with something else?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Try execute the following or put in into your
.vimrcBy pressing ctrl+r in visual mode, you will be prompted to enter text to replace with. Press enter and then confirm each change you agree with y or decline with n.
This command will override your register
hso you can choose other one (by changinghin the command above to another lower case letter) that you don’t use.