English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

I want to search a file and wherever I see the characters "char" I want those to be replaced with nothing. For example

"Character" would end up being "acter" I do not want spaces in place of the char.. simply deleted. How do I do this with xvi?

2007-03-12 07:12:04 · 2 answers · asked by Ryan300x 2 in Computers & Internet Programming & Design

%/s/char//g does not work

2007-03-12 09:34:45 · update #1

s/char//g

Does not work.

2007-03-12 18:53:58 · update #2

2 answers

you can use a regex, like so:

s/char//g (as a vi command)

This regex will replace *all* occurrences of 'char' with '', which is what you want.

2007-03-12 07:58:11 · answer #1 · answered by fixedinseattle 4 · 0 0

%s/char//g

There is no / after the %

The actual sequence needs to be preceded by a colon
to get to the command line in vi.

:%s/char//g

2007-03-12 16:19:54 · answer #2 · answered by Dan M 1 · 0 0

fedest.com, questions and answers