Hi,

Jerin Joy wrote:
> 
> The replace all option 'g' doesn't seem to be working in my case. It
> replaces only the first occurrence on a line.
> 
> for eg. in the following line I wanted to remove the extra whitespaces
> between input [] and the name of the variable:
> task init (input [1:0]   u, input [3:0]    hash, input [3:0]    hash_index1)
> 
> Using:
> :%s/\][\ ]\+/\]\ /g
> 
> replaces only for the first variable - input [1:0] u

was this really the command you typed inside VIM? I tested it and it
worked. But you can simplify it to

  :%s/] \+/] /g

which is a bit easier to read.

Regards,
Jürgen

-- 
Jürgen Krämer                              Softwareentwicklung
HABEL GmbH & Co. KG                        mailto:[EMAIL PROTECTED]
Hinteres Öschle 2                          Tel: +49 / 74 61 / 93 53 - 15
78604 Rietheim-Weilheim                    Fax: +49 / 74 61 / 93 53 - 99

Reply via email to