Had to correct around 2700+ lines of text in linux with the following changes :
- Search for <ctrl>M character inside the file
- Remove the <ctrl>M
- Join the next line to this line and complete the line.
Can’t do with single command and repeat with the “.” to replay the operation. Had learnt the macro recording of actions and playback sometime back in vi editor and wasn’t able to recollect the steps, refreshed it again today. Thought will blog it for others and for me to recollect when required later!.
- character q followed by one of a to z key to remember the recording
- character / followed by <ctrl>v and M
- character x to remove the <ctrl>M character
- character J to bring the next line and join to this line
- character q to stop recording
- type number 2800 and character @ followed by the key that held the recording
All replaced!. Save and come out..