RE: updated strtrans() patch for special keys

2006-05-15 Thread Zdenek Sekera
> -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > Sent: 12 May 2006 21:45 > To: Eric Arnold > Cc: vim-dev@vim.org > Subject: Re: updated strtrans() patch for special keys > > > Eric Arnold wrote: > > > The doc page really on

Re: updated strtrans() patch for special keys

2006-05-12 Thread Bram Moolenaar
Eric Arnold wrote: > The doc page really only talks about regular control chars, leaving > the problem of special keys to the imagination. Are they to be > considered a string of characters which are to be evaluated > individually against 'isprint', or are they a meta-character which is > to be

Re: updated strtrans() patch for special keys

2006-05-12 Thread Eric Arnold
How about this idea: have an option to strtrans() to convert *all* keys to their <> format. This way the output can be easily and portably stored, and later translated back using the "\<>" evaluation. " 'l' option = long format " 'e' option = 'eval'able format " let s = "\\\,\,\,\,\\" echomsg

Re: updated strtrans() patch for special keys

2006-05-12 Thread Eric Arnold
The doc page really only talks about regular control chars, leaving the problem of special keys to the imagination. Are they to be considered a string of characters which are to be evaluated individually against 'isprint', or are they a meta-character which is to be evaluated against 'isprint'?

Re: updated strtrans() patch for special keys

2006-05-12 Thread Bram Moolenaar
Eric Arnold wrote: > It wasn't handling certain keys. This works now: > > echo strtrans("\,\,\,\,\\ -notakey>") That already worked. You apparently have wrong expectations of what strtrans() does. The docs say: "like they are shown in a window". Thus special keys must not be translated back