I want to be able to find or replace a character in vi by using the decimal or hex number for a character. Like character 92 for example.
Is this possible?
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.
To just search for the ASCII character with a hex value of 0x5c (which is 92 in decimal),
use the search pattern:
If you want to search for all occurrences of that character in a file and replace them with another character (or characters), you can enter this command:
You can, of course, replace 5c with the ASCII hex value of whatever character you wish to replace.
I found this information here via a google search for “vim replace ascii character”