Linux - Find replace hidden characters vi editor, Search hidden characters in vi editor

Find replace hidden characters vi editor

How will find and and replace the hidden characters in vi editor
Vi editor is such an awesome editor for developers. while you do coding with other editors it may help you with auto syntax but the garbage values written by it while saving the file may make your entire code as a non functional one.
To Display all hidden characters in vi Editor
:set list 
Which will turn on the feature and will list all the hidden characters. Use this command in esc mode.
To turn off hidden characters list
:set nolist 
this will turn off the hidden character list in vi editor.
How to type ^M ?
Type using ctrl+v+m or just "^" + m
To remove control M characters in vi editor
:%s/^M//g
The %s option will do search, / is the separator used use in between. ^M the character to be searched it can be any search value, // replace it with the null value. g stands for globally, to replace the ^M character with null value in entire page

The topic on Linux - Find replace hidden characters vi editor is posted by - Vikram

Hope you have enjoyed, Linux - Find replace hidden characters vi editorThanks for your time

Tech Bluff