This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: vim display funny character under cygwin


Eric,

This is pretty cool -- I didn't think of that.  You might want to augment
it as follows, though, and put it in your ~/.vimrc:

:if &term =~ "cygwin" || &term =~ "rxvt"
  :set isprint=@,129-255
:endif

(chr(128) isn't really printable, and the other characters in the 129-160
range aren't printable on, say, an xterm).  One annoyance is that rxvt by
default sets TERM=xterm, even though it can display Unicode characters,
but you can change that by invoking rxvt as

rxvt -tn rxvt -e bash -i

HTH,
	Igor
P.S. Oh, and <http://cygwin.com/acronyms/#PCYMTNQREAIYR>.  Thanks.

On Sat, 9 Apr 2005, ERIC HO wrote:

> Hi there, I've got the suggestion to try:
>  setlocal isprint=@,128-255
> It works!! Thanks
>
> ----- Original Message -----
> From: ERIC HO <ericmho@XXXX.XX>
> Date: Friday, April 8, 2005 10:19 pm
> Subject: Re: vim display funny character under cygwin
>
> >
> > Hi Igor, thank you for the suggestion. But I failed to find the
> > proper setting for the tenc and fenc.
> > I ended up setting up a vim mapping to change it as follows:
> > map #8 :g/~S/s//"/g^M:g/~T/s//"/g^M:g/~Q/s//\'/g^M:g/~R/s//\'/g^M
> > The characters are 147, 148, 145, 146 in decimal.
> > Not an elegant solution. Please let me know if you have a encoding
> > setting for me to try. Thanks again.
> >
> > ----- Original Message -----
> > From: Igor Pechtchanski <pechtcha@XX.XXX.XXX>
> > Date: Friday, April 8, 2005 6:45 pm
> > Subject: Re: vim display funny character under cygwin
> >
> > > On Fri, 8 Apr 2005, ERIC HO wrote:
> > >
> > > > Hi there, not sure whether this is a cygwin or vim issue. I have a
> > > > file that contains "hello" (note it's really a upside down ,,).
> > > > When I cat the file, it displays correctly like when I use
> > > > notepad. But when I'm in vim editing the file, it shows up as
> > > > ~Shello~T.
> > >
> > > The above is expected behavior.  You're trying to get Vim to open a
> > > file in an encoding that it doesn't know how to display (UTF-8?), so
> > > it substitutes its own character combinations (and colors, if you're
> > > in a color terminal) for those characters that aren't defined in the
> > > currentterminal encoding.
> > >
> > > You can get Vim to convert the characters for you, provided you set
> > > the correct 'termencoding' and 'fileencoding' combination.  For more
> > > information, run ":help 'termencoding'" and ":help 'fileencoding'"
> > > from inside Vim.
> > >
> > > > Very likely it's not a cygwin issue. I'd appreciate if someone has
> > > > any suggestion for me. Thanks. Note: I'm running the latest cygwin
> > > > packages.
> > >
> > > One more point: as described in <" target="l">"
> > > target="l">http://cygwin.com/problems.html>, the best way of
> > > reporting the status of your installation is by attaching (as an
> > > uncompressed text *attachment*) the output of "cygcheck - svr".
> > > You probably don't need to do it in this particular case, though,
> > > unless you have other Cygwin-related problems or the answer above is
> > > not satisfactory.
> > > HTH,
> > > 	Igor

-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_		pechtcha@cs.nyu.edu
ZZZzz /,`.-'`'    -.  ;-;;,_		igor@watson.ibm.com
     |,4-  ) )-,_. ,\ (  `'-'		Igor Pechtchanski, Ph.D.
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

"The Sun will pass between the Earth and the Moon tonight for a total
Lunar eclipse..." -- WCBS Radio Newsbrief, Oct 27 2004, 12:01 pm EDT

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]