-1

So I'm practicing Ruby on Codeacademy and to save the work that I'm doing I copied and pasted my code onto my cmd prompt using VIM. However, I noticed that each line of code was commented with the '#' symbol and I wanted to remove them.

To be productive, I searched online how to use regex to search for all the hashtags and remove them with this command:

:%s/#//gc

Then this popped up:

replace with  (y/n/a/q/l/^E/^Y)?

I pressed y every time until the message disappeared and now I'm stuck with all hashtags characters being replaced with a yellow rectangle. So instead of having this:

#

I have this:

[] but shaded in yellow for every time I use a hastag.

Any help would be much appreciated!

Wiktor Stribiżew
  • 607,720
  • 39
  • 448
  • 563
FredTony
  • 13
  • 4

1 Answers1

0

The yellow rectangle represents the characters that matched your expression. To clear the last search highlighting, use:

:noh

To uncomment the lines of code, I would just do this:

  1. Use V to select each line, then
  2. :norm x
Bill
  • 1,247
  • 8
  • 12