From owner-freebsd-questions Tue May 25 14: 8:34 1999 Delivered-To: freebsd-questions@freebsd.org Received: from Gina.esfm.ipn.mx (Gina.esfm.ipn.mx [148.204.102.61]) by hub.freebsd.org (Postfix) with ESMTP id 1C2BB157AA for ; Tue, 25 May 1999 14:07:55 -0700 (PDT) (envelope-from mrspock@esfm.ipn.mx) Received: from localhost (localhost [[UNIX: localhost]]) by Gina.esfm.ipn.mx (8.9.3/) with SMTP id QAA03840; Tue, 25 May 1999 16:07:21 -0600 (CST) Date: Tue, 25 May 1999 16:07:20 -0600 (CST) From: Eduardo Viruena Silva To: Kent Stewart Cc: freebsd-questions@freebsd.org, Mark Ovens Subject: Re: replace in vi... In-Reply-To: <374B0143.BA408940@3-cities.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Tue, 25 May 1999, Kent Stewart wrote: > > > Kent Stewart wrote: > > > > Eduardo Viruena Silva wrote: > > > > > > ehem... > > > > > > I'm using "vi" and I would like to know how to replace > > > character '\0xb4' by character '\'' in all my text. > > > [I mean, character which has code: 0xb4 = 0264 = 148 > > > by apostrophe] > > I forgot to tell you that a 148 is a 0x94 and not a 0xb4. > ooops! sorry... > > What I did was the following > > > > .,$s/^V+180/'/ > > > > The control V allows you to enter a special character and holding the > > key down and pressing 180, enters your 0xb4. If you have more > > than one occurance on a line, you will need to add a "g" at the end > > after then last "/". I'm not on my FreeBSD system and it matters which > > key you use. > > it works! thank you! Mark Ovens also answered me and he suggested: ^Xcc where cc is the hex code of the character. It is more suitable because my X terminal is pretty weird and cannot understand what a "alt-xxx" code is. Nevertheless it worked in the FreeBSD console. Thank you Kent! Thank you Mark! ______ _ * / /###\ / \ __ /\ /\ * / ./#### \ * \__|_/ | | / \/ \ | b#####| * _ | __ | | __ = .. \____ \ \_\#####/ / \| / \ | | /\_\/ = \_| * \___\###/ * \_/\_/\__/\__\/_/\__/ = \______/ _ | | To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message