I have a file which countains characters that appear as ~W in vim (and
as <97> in less) and I want to replace them all by a -. But I don't
know how to type this character into a substitute command.
Any help is appreciated.
thanks,
David
In command line <c-v>97 (or <c-q> on windows).
More in
:h i_CTRL-V_digit
m.
--
LaTeX + Vim = http://vim-latex.sourceforge.net/
Learn Touch Typing with Vim? Oui. Ja. Yes. Tak:
http://vim.sourceforge.net/script.php?script_id=461
vim.pl - http://skawina.eu.org/mikolaj
> David de Kloet scripsit:
> > Hi,
> > I have a file which countains characters that appear as ~W in vim (and
> > as <97> in less) and I want to replace them all by a -. But I don't
> > know how to type this character into a substitute command.
>
> In command line <c-v>97 (or <c-q> on windows).
It should be <c-v>x97 because less shows it in hex (and 97 would be an
'a'). But thanks a lot.
Could I have found out this number 97 in vim (without less)?
thanks,
David
>:h i_CTRL-V_digit
Hmmm. I grabbed a chart with extended ASCII[1] and randomly entered...
<c-v>xba
...and got the character shown for ba on the *Windows* assignments chart.
I'm running Linux.
Whuh?
[1]http://www.jimprice.com/jim-asc.htm
--
Thomas Winston Ping
Currently extended ASCII is understood as iso-8859-1, which is equal to
cp1252.
> [1]http://www.jimprice.com/jim-asc.htm
You are probably wondering about IBM PC Extended ASCII? AFAIK this is
known as IBM852 (aka cp852?) and rather dropped.
Not 100%.
> > [1]http://www.jimprice.com/jim-asc.htm
>
> You are probably wondering about IBM PC Extended ASCII? AFAIK this is
> known as IBM852 (aka cp852?) and rather dropped.
More likely CP437?
--
Giuseppe "Oblomov" Bilotta
Can't you see
It all makes perfect sense
Expressed in dollar and cents
Pounds shillings and pence
(Roger Waters)
There is ASCII, which defines 128 characters and no more. Then there are
many, many, many different character sets designed such that ASCII is a subset
of them. These may logically be regarded as extensions to ASCII, but you
can't point to any one of them and say "that's Extended ASCII".
In countries that speak a Western European language (which includes English
and therefore the US), the most popular 8-bit character sets are ISO-8859-1
(a.k.a. "Latin-1") and Windows-1252 (which is largely compatible with
Latin-1 but is not the same thing). Other countries use different character
sets.
Fortunately, all of these character sets may be viewed as windows (not
necessarily contiguous windows) onto the Unicode character set, and it usually
makes the most sense to speak of characters in terms of their Unicode code
points. I use VIM exclusively in UTF-8 mode (it converts files as needed
to and from other character sets) and it simplifies things greatly.
-Mark
Probably. I am trying to forget times of 10 competiting ways of encoding
Polish diacritics :)