3
votes
2answers
78 views

How to format a string substitute, or a text line, in Vim?

Is it possible to format the replacement string when substituting a match with Vim? Say I have a file with a 2-column table, where the entries in each row are separated with a space. The entries (and ...
1
vote
3answers
36 views

How to Copy words highlighted after search directly into command line with shortcut?

Here is the situation, for example, I have several lines like this: foo test foo I searched "foo" with "/" and all the two "foo"s above are highlighted. And now I want to replace "foo" with ...
0
votes
1answer
72 views

How to convert part of file to lowercase?

Using gVIM on XP How can I convert the left side of this file to lowercase while keeping right side unchanged? %s/**what goes here?**/g CONVERTTOLOWERCASE###Keep CaSe AAAA###AeiOu BBBB###qWerTy ...
19
votes
7answers
13k views

How to remove this symbol “^@” with vim?

I have some files that are corrupted with this symbol: ^@ It's not part of the string; it's not searchable. How do I substitute this symbol with nothing, or how do I delete this symbol? Here ...