Re: Patch: virtcol([123,'$'])
On 6-May-2007 14:11, Bram Moolenaar wrote: Michael Schaap wrote: On 26-Mar-2007 18:25, Bram Moolenaar wrote: Michael Schaap wrote: Here's a patch to make virtcol([123, '$']) do the right thing. If it looks good to you, can you include it? Looks good, I'll include it. Thanks! It appears that this didn't make it into 7.1a. Probably slipped through the cracks? :-) It's in the todo list. I simply don't enough have time to work away all todo items. Otherwise the release would have to wait another year... No problem. :-) Thanks for the heads-up, - Michael
Re: Patch: virtcol([123,'$'])
Hi Bram, On 26-Mar-2007 18:25, Bram Moolenaar wrote: Michael Schaap wrote: Here's a patch to make virtcol([123, '$']) do the right thing. If it looks good to you, can you include it? Looks good, I'll include it. Thanks! It appears that this didn't make it into 7.1a. Probably slipped through the cracks? :-) Thanks, - Michael
Re: gVim and Cygwin
On 30-Mar-2007 21:23, A.J.Mechelynck wrote: OTOH, since (IIRC) builds of Vim available on the Cygwin site are usually console builds, to get a Cygwin/X11 build of gvim you would have to compile it yourself. Actually, an X11 gvim *is* available using Cygwin's setup.exe. It's not installed by default, but it is listed, under the 'Editors' category. - Michael
Patch: virtcol([123,'$'])
Hi Bram, Here's a patch to make virtcol([123, '$']) do the right thing. If it looks good to you, can you include it? Alvast bedankt, – Michael Index: eval.c === --- eval.c (revision 238) +++ eval.c (working copy) @@ -16485,6 +16485,7 @@ list_T *l; int len; int error = FALSE; + listitem_T *li; l = varp-vval.v_list; if (l == NULL) @@ -16500,6 +16501,13 @@ if (error) return NULL; len = (long)STRLEN(ml_get(pos.lnum)); + /* Check for column number '$' */ + if (pos.col == 0) + { + li = list_find(l, 1L); + if ((li != NULL) (get_tv_string(li-li_tv)[0] == '$')) + pos.col = len + 1; + } /* Accept a position up to the NUL after the line. */ if (pos.col == 0 || (int)pos.col len + 1) return NULL;/* invalid column number */
Re: Fw: Case-sensitive :e globbing under cygwin?
On 16-Mar-2007 20:59, A.J.Mechelynck wrote: As far as I can tell everything is set up to give case-sensitive globbing. Bash does case-sensitive globbing at the command line and in a simple script #!/bin/bash echo file* Do you believe vim is shelling out to do globbing under cygwin, rather than doing globbing internally? I tried to verify that vim is calling /bin/sh by replacing /bin/sh.exe with a script /bin/sh which leaves a debugging trail. But it appears that /bin/sh is not being called for :e file* (it is called for :sh, however). I had the impression it did; but I guess I was wrong. Indeed, vim does its own globbing; it looks like the main function for this is ExpandOne() in ex_getln.c. It determines whether to do based on whether CASE_INSENSITIVE_FILENAME is #define'd. For Cygwin, this is done in os_unix.h: #if defined(__CYGWIN__) || defined(__CYGWIN32__) # define WIN32UNIX /* Compiling for Win32 using Unix files. */ # define BINARY_FILE_IO # define CASE_INSENSITIVE_FILENAME # define USE_FNAME_CASE /* Fix filename case differences. */ #endif Like it or not, this is the proper thing to do on Cygwin, since any normal Windows file systems are case insensitive. Arguably, this should be a file system property, not an operating system property – after all, you can mount a case-insensitive Windows file system under Linux. But I doubt that there is a good way to determine this on a file system by file system basis... It would perhaps be an improvement if this was an option, instead of a compile-time decision. But there's an awful lot of #ifdef CASE_INSENSITIVE_FILENAME's in the code, so that's probably a rather non-trivial change... – Michael
Re: Fw: Case-sensitive :e globbing under cygwin?
On 16-Mar-2007 23:13, John Wiersba wrote: Thanks for your reply. You're right -- disabling the CASE_INSENSITIVE_FILENAME compile-time option changes this behavior. However, I disagree that case insensitivity is the correct behavior. Cygwin is perfectly capable of supporting case-sensitive globbing behavior and unix tools, by default, do just that when run under cygwin. For example, bash is, by default, case-sensitive under cygwin. So, I submitted a bug report. Well, one man's bug is another man's feature... The case-preserving behaviour was changed for Cygwin in response to specific bug reports (http://marc.theaimsgroup.com/?l=vim-devm=113241809109203w=2), so it'd better not be changed back... – Michael
Re: Convert2HTML Again
A.J.Mechelynck wrote: I second the motion; and since the font actually used is the first one found from the font-family item, I suggest (all on one line): +execute normal! A\npre { font-family: 'Courier New', monospace; color: . s:fgc . ; background-color: . s:bgc . ; }\e which will pick Courier New if found, and some generic monospace font otherwise. (Note: I don't know how it got here, but I have Courier New installed not only on my Windoze box but also on this SuSE-Linux box where I am now.) I beg you, please don't hardcode Courier New! Not only is it the worst possible monospaced screen font, it is also Microsoft specific (in spite of it finding its way onto Tony's Linux box). (Even Microsoft has seen the light, and changed the default monospaced font to Consolas in Windows Vista.) The proper thing to do is to only list font-family: monospace. That will use the default monospaced font on any platform, which is Courier New by default in any case on current Windows browsers. Only people who have consciously chosen to change their monospaced font (and people on non-Windows platforms) will not see Courier New. - Michael