Skip to main content
deleted 3 characters in body; edited tags
Source Link
Rich
  • 32.6k
  • 4
  • 74
  • 141

I have a .cpp file in which I would like to change all greaterless-than symbols to double quotes but maintain any instances of double-greater-than symbols, i.e. change < to " while leaving all occurrences of << alone.

I am very new to vim and as such am still trying to figure out the best way to replace characters in situations like this.

I have a .cpp file in which I would like to change all greater-than symbols to double quotes but maintain any instances of double-greater-than symbols, i.e. change < to " while leaving all occurrences of << alone.

I am very new to vim and as such am still trying to figure out the best way to replace characters in situations like this.

I have a .cpp file in which I would like to change all less-than symbols to double quotes but maintain any instances of double-greater-than symbols, i.e. change < to " while leaving all occurrences of << alone.

I am very new to vim and as such am still trying to figure out the best way to replace characters in situations like this.

Source Link

Changing < to " but leave << alone in Vim

I have a .cpp file in which I would like to change all greater-than symbols to double quotes but maintain any instances of double-greater-than symbols, i.e. change < to " while leaving all occurrences of << alone.

I am very new to vim and as such am still trying to figure out the best way to replace characters in situations like this.