Re: utf-8, strlen(), and virtcol()
Charles E Campbell Jr wrote: > Hello! > > I've received a couple of requests about getting Align.vim to work with > utf-8 characters. As an example, consider: > > let x='grün' > echo "strlen(x)=".strlen(x) > > Thus, strlen() returns 5, not 4 as one might (sometimes) expect. So, I > tried a workaround: > > fun! Strlen(x) > 1split > enew > call setline(1,a:x) > let ret= virtcol("$") - 1 > bwipe! > return ret > endfun > > echo Strlen(x) > > now returns 4 (at the price of using interpreted code over built-in > strlen()). So, is this the best that can be done? > I'd prefer to have a built-in compiled function for this. > > Regards, > Chip Campbell It all depends on what exactly you want to do. (I haven't read the Align.vim docs.) The length of a UTF-8 string can be counted in several nonequivalent ways: - number of bytes (Latin a + combining circumflex is three bytes): strlen(string) - number of codepoints (Latin a + combining circumflex is two codepoints): strlen(substitute(string, '.', 'x', 'g')) - number of spacing codepoints (Latin a + combining circumflex is one spacing codepoint; a hard tab is one; wide and narrow CJK are one each; etc.): (untested) strlen(substitute(string, '.\Z', 'x', 'g')) - virtual length (counting, for instance, tabs as anything between 1 and 'tabstop', wide CJK as 2 rather than 1, Arabic alif as zero when immediately preceded by lam, one otherwise, etc.): I guess something like what you're doing above will be necessary because of the wide range of things that can happen. The first two above are documented at ":help strlen()", the third (in addition) at ":help patterns-composing". Best regards, Tony. --~--~-~--~~~---~--~~ You received this message from the "vim_dev" maillist. For more information, visit http://www.vim.org/maillist.php -~--~~~~--~~--~--~---
Re: --remote-expr useless on Windows.
krischik wrote: [...] > For a sec I though "which console version?" but then I checked and > indeed there is one in ""C:\Program Files\vim\vim71\" and it works. > You earned yourself 5 stars for this answer. > > Martin It is possible not to install it -- if you remove it, the rest will still work. If you hadn't found it, I would have told you where to get it. Best regards, Tony. -- Birth, n.: The first and direst of all disasters. -- Ambrose Bierce, "The Devil's Dictionary" --~--~-~--~~~---~--~~ You received this message from the "vim_dev" maillist. For more information, visit http://www.vim.org/maillist.php -~--~~~~--~~--~--~---
Re: Sourceforge et. al.
krischik <[EMAIL PROTECTED]> wrote: > On 19 Sep., 12:09, [EMAIL PROTECTED] wrote: > > Some authors have their scripts on a svn repository or another, for > > instance I'm planning to maintain my scripts on google code (since > > my main hard drive, where I was having my svn repository, has died). > > Why google code? What makes it more attractive? A few things: a- I'm curious to see what it offers b- I expect a better QoS than sourceforge ; I may be wrong though. -- Luc Hermitte http://hermitte.free.fr/vim/ --~--~-~--~~~---~--~~ You received this message from the "vim_dev" maillist. For more information, visit http://www.vim.org/maillist.php -~--~~~~--~~--~--~---
Re: Sourceforge et. al.
On 19/09/2007, krischik <[EMAIL PROTECTED]> wrote: > 1) vim-scripts.sourceforge.net > 2) vim-scripts.googlecode.net 3) developer.berlios.de/projects/vim-scripts ;) 1) has become a large corporate monolith 2) has increasing troubles with the whole 'do no evil' thing 3) is a relatively new player and as we all know, underdogs are cool ;) I would go for 3) or 1) As for GIT, Bazaar or some such, I suspect most people do not actually need or even want a distributed source code management system. Also, one would hope that there wouldn't be too much forking. Of course, a trac on vim.org itself would be a nice place, as well. Richard --~--~-~--~~~---~--~~ You received this message from the "vim_dev" maillist. For more information, visit http://www.vim.org/maillist.php -~--~~~~--~~--~--~---
Re: Sourceforge et. al.
krischik wrote: > On Sep 19, 5:49 pm, Ingo Karkat <[EMAIL PROTECTED]> wrote: >> That's exactly my point. Forking on vim.sourceforge.net is painful and >> confusing to all the users ("what, three versions of >> MyFavoriteScript.vim?!"). >> If the original author finally decides to merge in someone's changes, more >> email >> exchange and redirection of VIM script pages is needed (as IMHO scripts still >> cannot be deleted). >> These things would be handled much better by a version control system, where >> users could list all available branches and see the contributing authors and >> fork history in one place. > > Indeed. So one question is left: > > 1) vim-scripts.sourceforge.net > 2) vim-scripts.googlecode.net > If your goal is to improve the collaboration aspect of script development, you should also consider using distributed version control systems such as Git, Mercurial, Bazaar or Darcs. They were created especially to facilitate collaboration and provide many additional benefits over centralized systems, especially in projects forking and merging. I know of 2 sites which offer hosting for distributed projects: https://launchpad.net/ (for Bazaar) http://repo.or.cz/ (for Git) but perhaps it would feasible to install such service at vim.org? Regards, Santhalus --~--~-~--~~~---~--~~ You received this message from the "vim_dev" maillist. For more information, visit http://www.vim.org/maillist.php -~--~~~~--~~--~--~---
RE: Intro page disappears
I'm afraid that I can only set the foreground color. :( Sorry. Damn, I hate outlook. From: vim_dev@googlegroups.com on behalf of Nikolai Weibull Sent: Wed 9/19/2007 10:46 AM To: vim_dev@googlegroups.com Subject: Re: Intro page disappears On 9/19/07, Larson, David <[EMAIL PROTECTED]> wrote: > > > > I'm terribly sorry, but I have no control of how emails are formatted, > because my employer is forcing me to use Outlook Web. Outlook Web will not > even allow me to specify that the emails are to be in plain text (and > believe me, I have tried hard to do this, I know you guys hate HTML email). > On my screen, the background is white, so I don't know why it shows up dark > on your machine, Chip. He means that he's set a black background in his browser and that your text is set to a dark gray, but no background is set. Thus, he's seeing dark on dark. nikolai --~--~-~--~~~---~--~~ You received this message from the "vim_dev" maillist. For more information, visit http://www.vim.org/maillist.php -~--~~~~--~~--~--~---
Re: Sourceforge et. al.
On Sep 19, 5:49 pm, Ingo Karkat <[EMAIL PROTECTED]> wrote: > That's exactly my point. Forking on vim.sourceforge.net is painful and > confusing to all the users ("what, three versions of MyFavoriteScript.vim?!"). > If the original author finally decides to merge in someone's changes, more > email > exchange and redirection of VIM script pages is needed (as IMHO scripts still > cannot be deleted). > These things would be handled much better by a version control system, where > users could list all available branches and see the contributing authors and > fork history in one place. Indeed. So one question is left: 1) vim-scripts.sourceforge.net 2) vim-scripts.googlecode.net Anybody who used both can enlighten us? Martin --~--~-~--~~~---~--~~ You received this message from the "vim_dev" maillist. For more information, visit http://www.vim.org/maillist.php -~--~~~~--~~--~--~---
Re: Intro page disappears
On 9/19/07, Larson, David <[EMAIL PROTECTED]> wrote: > > > > I'm terribly sorry, but I have no control of how emails are formatted, > because my employer is forcing me to use Outlook Web. Outlook Web will not > even allow me to specify that the emails are to be in plain text (and > believe me, I have tried hard to do this, I know you guys hate HTML email). > On my screen, the background is white, so I don't know why it shows up dark > on your machine, Chip. He means that he's set a black background in his browser and that your text is set to a dark gray, but no background is set. Thus, he's seeing dark on dark. nikolai --~--~-~--~~~---~--~~ You received this message from the "vim_dev" maillist. For more information, visit http://www.vim.org/maillist.php -~--~~~~--~~--~--~---
Re: Enabling CASE_INSENSITIVE_FILENAME in UN*X and get away with it?
On Sep 19, 5:17 pm, Mikael Jansson <[EMAIL PROTECTED]> wrote: > Heya, > > I enabled CASE_INSENSITIVE_FILENAME on my Linux box, which works in > almost all cases, except when you try to save a file and there already > exists a file differing only in case. > > An example: > >$ vim Foo >iThe file Foo:w foo > > ... at which point Vim responds with ["Foo" 1L, 13C written]. > > Esentially, I just want it to be enabled when I do filesystem completion > -- just like readline's completion-ignore-case. However, I can't make > much sense of os_unix.c / misc1.c. Could anyone help me by pointing me > in the right direction? > > Thanks in advance, > Mikael Maybe this is worth a try : misc1.c / unix_expandpath() 8962 /* compile the regexp into a program */ 8963 #if 1 //def CASE_INSENSITIVE_FILENAME 8964 regmatch.rm_ic = TRUE; /* Behave like Terminal.app */ 8965 #else 8966 regmatch.rm_ic = FALSE; /* Don't ever ignore case */ 8967 #endif -ap --~--~-~--~~~---~--~~ You received this message from the "vim_dev" maillist. For more information, visit http://www.vim.org/maillist.php -~--~~~~--~~--~--~---
RE: Intro page disappears
I'm terribly sorry, but I have no control of how emails are formatted, because my employer is forcing me to use Outlook Web. Outlook Web will not even allow me to specify that the emails are to be in plain text (and believe me, I have tried hard to do this, I know you guys hate HTML email). On my screen, the background is white, so I don't know why it shows up dark on your machine, Chip. From: vim_dev@googlegroups.com on behalf of Nikolai Weibull Sent: Wed 9/19/2007 10:16 AM To: vim_dev@googlegroups.com Subject: Re: Intro page disappears On 9/19/07, Charles E Campbell Jr <[EMAIL PROTECTED]> wrote: > Larson, David wrote: > > Believe me, I have isolated the problem down to that one line. You > > probably can't reproduce the problem because you are using a different > > build than I am (GTK2). > You know, black lettering on a dark blue background is difficult to > read. My browser's background is dark blue, but your email specifies a > dark (ie. black) foreground color (and doesn't specify any background). > > So, in order to promote legibility, please either specify both > foreground _and_ background colors or don't specify them at all. Better yet, don't send HTML mails to this list. Thanks! nikolai --~--~-~--~~~---~--~~ You received this message from the "vim_dev" maillist. For more information, visit http://www.vim.org/maillist.php -~--~~~~--~~--~--~---
Re: Intro page disappears
On 9/19/07, Charles E Campbell Jr <[EMAIL PROTECTED]> wrote: > Larson, David wrote: > > Believe me, I have isolated the problem down to that one line. You > > probably can't reproduce the problem because you are using a different > > build than I am (GTK2). > You know, black lettering on a dark blue background is difficult to > read. My browser's background is dark blue, but your email specifies a > dark (ie. black) foreground color (and doesn't specify any background). > > So, in order to promote legibility, please either specify both > foreground _and_ background colors or don't specify them at all. Better yet, don't send HTML mails to this list. Thanks! nikolai --~--~-~--~~~---~--~~ You received this message from the "vim_dev" maillist. For more information, visit http://www.vim.org/maillist.php -~--~~~~--~~--~--~---
Re: Intro page disappears
Larson, David wrote: > Believe me, I have isolated the problem down to that one line. You > probably can't reproduce the problem because you are using a different > build than I am (GTK2). Hello! You know, black lettering on a dark blue background is difficult to read. My browser's background is dark blue, but your email specifies a dark (ie. black) foreground color (and doesn't specify any background). So, in order to promote legibility, please either specify both foreground _and_ background colors or don't specify them at all. Thank you, Chip Campbell --~--~-~--~~~---~--~~ You received this message from the "vim_dev" maillist. For more information, visit http://www.vim.org/maillist.php -~--~~~~--~~--~--~---
Re: utf-8, strlen(), and virtcol()
Charles E Campbell Jr schrieb: > Nikolai Weibull wrote: > >> On 9/19/07, Charles E Campbell Jr <[EMAIL PROTECTED]> wrote: >> >>> let x='grün' >>> echo "strlen(x)=".strlen(x) >>> >>> Thus, strlen() returns 5, not 4 as one might (sometimes) expect. >>> >>> >> Here's what I have in one my base library: >> >> function now#mbc#len(str) >> return strlen(substitute(a:str, '.', 'c', 'g')) >> endfunction >> >> Which is incredibly much better than your solution ;-). >> >> > Well, I came up with another solution, but it still isn't as good as > yours! Shouldn't strlen() just handle this on its own? With C or C++, > one may be wanting to use the output of strlen() to help with allocating > memory to hold a string; I don't see any of that application with Vim. > > Regards, > Chip Campbell The multibyte strlen() is even suggested/documented here: :h strlen() -- Andy --~--~-~--~~~---~--~~ You received this message from the "vim_dev" maillist. For more information, visit http://www.vim.org/maillist.php -~--~~~~--~~--~--~---
RE: Intro page disappears
Believe me, I have isolated the problem down to that one line. You probably can't reproduce the problem because you are using a different build than I am (GTK2). From: vim_dev@googlegroups.com on behalf of Santhalus Sent: Wed 9/19/2007 1:23 AM To: vim_dev@googlegroups.com Subject: Re: Intro page disappears Larson, David wrote: > If I set showtabline=2 in my .gvimrc, the nice intro page that shows up > when vim is started disappears. Is this expected? > It does not seem to be connected, at least in my setup (vim 7.1 on Win2000). Did you try to exclude all your other custom settings? This one: "set shortmess+=I" controls the intro message when starting Vim. Regards, Santhalus --~--~-~--~~~---~--~~ You received this message from the "vim_dev" maillist. For more information, visit http://www.vim.org/maillist.php -~--~~~~--~~--~--~---
Re: Sourceforge et. al.
That's exactly my point. Forking on vim.sourceforge.net is painful and confusing to all the users ("what, three versions of MyFavoriteScript.vim?!"). If the original author finally decides to merge in someone's changes, more email exchange and redirection of VIM script pages is needed (as IMHO scripts still cannot be deleted). These things would be handled much better by a version control system, where users could list all available branches and see the contributing authors and fork history in one place. -- ingo On 19-Sep-07 16:31, thomas wrote: >> A couple of times, I have sent small patches or enhancements to authors of >> VIM plugins listed on vim.sourceforge.net, only to receive no answer; >> probably, those authors have moved on or changed email addresses. > > Spam filters are another option. Anyway, if the authors don't respond even > after sending queries to the vim list and if people are willing to "maintain" > the plugin for some time, people could create a fork version (assuming the > plugin is licensed under gpl or similar). It would be nice of course to have > a note on the original script/plugin page pointing to related/derivative > plugins. --~--~-~--~~~---~--~~ You received this message from the "vim_dev" maillist. For more information, visit http://www.vim.org/maillist.php -~--~~~~--~~--~--~---
Re: utf-8, strlen(), and virtcol()
Nikolai Weibull wrote: >On 9/19/07, Charles E Campbell Jr <[EMAIL PROTECTED]> wrote: > > > >>let x='grün' >>echo "strlen(x)=".strlen(x) >> >>Thus, strlen() returns 5, not 4 as one might (sometimes) expect. >> >> > >Here's what I have in one my base library: > >function now#mbc#len(str) > return strlen(substitute(a:str, '.', 'c', 'g')) >endfunction > >Which is incredibly much better than your solution ;-). > > Well, I came up with another solution, but it still isn't as good as yours! Shouldn't strlen() just handle this on its own? With C or C++, one may be wanting to use the output of strlen() to help with allocating memory to hold a string; I don't see any of that application with Vim. Regards, Chip Campbell --~--~-~--~~~---~--~~ You received this message from the "vim_dev" maillist. For more information, visit http://www.vim.org/maillist.php -~--~~~~--~~--~--~---
Re: utf-8, strlen(), and virtcol()
On 9/19/07, Charles E Campbell Jr <[EMAIL PROTECTED]> wrote: > let x='grün' > echo "strlen(x)=".strlen(x) > > Thus, strlen() returns 5, not 4 as one might (sometimes) expect. Here's what I have in one my base library: function now#mbc#len(str) return strlen(substitute(a:str, '.', 'c', 'g')) endfunction Which is incredibly much better than your solution ;-). nikolai --~--~-~--~~~---~--~~ You received this message from the "vim_dev" maillist. For more information, visit http://www.vim.org/maillist.php -~--~~~~--~~--~--~---
Enabling CASE_INSENSITIVE_FILENAME in UN*X and get away with it?
Heya, I enabled CASE_INSENSITIVE_FILENAME on my Linux box, which works in almost all cases, except when you try to save a file and there already exists a file differing only in case. An example: $ vim Foo iThe file Foo:w foo ... at which point Vim responds with ["Foo" 1L, 13C written]. Esentially, I just want it to be enabled when I do filesystem completion -- just like readline's completion-ignore-case. However, I can't make much sense of os_unix.c / misc1.c. Could anyone help me by pointing me in the right direction? Thanks in advance, Mikael --~--~-~--~~~---~--~~ You received this message from the "vim_dev" maillist. For more information, visit http://www.vim.org/maillist.php -~--~~~~--~~--~--~---
utf-8, strlen(), and virtcol()
Hello! I've received a couple of requests about getting Align.vim to work with utf-8 characters. As an example, consider: let x='grün' echo "strlen(x)=".strlen(x) Thus, strlen() returns 5, not 4 as one might (sometimes) expect. So, I tried a workaround: fun! Strlen(x) 1split enew call setline(1,a:x) let ret= virtcol("$") - 1 bwipe! return ret endfun echo Strlen(x) now returns 4 (at the price of using interpreted code over built-in strlen()). So, is this the best that can be done? I'd prefer to have a built-in compiled function for this. Regards, Chip Campbell --~--~-~--~~~---~--~~ You received this message from the "vim_dev" maillist. For more information, visit http://www.vim.org/maillist.php -~--~~~~--~~--~--~---
Re: --remote-expr useless on Windows.
Martin Krischik wrote: > the following command won't write the result of "&modified" to the > file "X" but display it inside a pop-up window: > > > gvim --nofork --servername 'Eclipse' --remote-expr "&modified" >x > > > Am I mistaken or does this does make "--remote-expr" rather useless on > Windows? Gvim on MS-Windows is a Windows application, which means there is no stdout. Vim works around that by presenting the output in a message box. Try using vim.exe, the console Vim. -- TALL KNIGHT: Firstly. You must get us another shrubbery! OTHER KNIGHTS: More shrubberies! More shrubberies for the ex-Knights of Ni! ARTHUR:Not another shrubbery - "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD /// Bram Moolenaar -- [EMAIL PROTECTED] -- http://www.Moolenaar.net \\\ ///sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\download, build and distribute -- http://www.A-A-P.org/// \\\help me help AIDS victims -- http://ICCF-Holland.org/// --~--~-~--~~~---~--~~ You received this message from the "vim_dev" maillist. For more information, visit http://www.vim.org/maillist.php -~--~~~~--~~--~--~---
Re: --remote-expr useless on Windows.
On 19 Sep., 16:25, Tony Mechelynck <[EMAIL PROTECTED]> wrote: > krischik wrote: > > Hello, > > > the following command won't write the result of "&modified" to the > > file "X" but display it inside a pop-up window: > > > > > gvim --nofork --servername 'Eclipse' --remote-expr "&modified" >x > > > > > Am I mistaken or does this does make "--remote-expr" rather useless on > > Windows? > > > Martin > > Use a console version (with +clientserver) instead: > > vim --servername 'Eclipse' --remote-expr "&modified" >x For a sec I though "which console version?" but then I checked and indeed there is one in ""C:\Program Files\vim\vim71\" and it works. You earned yourself 5 stars for this answer. Martin --~--~-~--~~~---~--~~ You received this message from the "vim_dev" maillist. For more information, visit http://www.vim.org/maillist.php -~--~~~~--~~--~--~---
Re: Sourceforge et. al.
> A couple of times, I have sent small patches or enhancements to authors of VIM > plugins listed on vim.sourceforge.net, only to receive no answer; probably, > those authors have moved on or changed email addresses. Spam filters are another option. Anyway, if the authors don't respond even after sending queries to the vim list and if people are willing to "maintain" the plugin for some time, people could create a fork version (assuming the plugin is licensed under gpl or similar). It would be nice of course to have a note on the original script/plugin page pointing to related/derivative plugins. --~--~-~--~~~---~--~~ You received this message from the "vim_dev" maillist. For more information, visit http://www.vim.org/maillist.php -~--~~~~--~~--~--~---
Re: --remote-expr useless on Windows.
krischik wrote: > Hello, > > the following command won't write the result of "&modified" to the > file "X" but display it inside a pop-up window: > > > gvim --nofork --servername 'Eclipse' --remote-expr "&modified" >x > > > Am I mistaken or does this does make "--remote-expr" rather useless on > Windows? > > Martin Use a console version (with +clientserver) instead: vim --servername 'Eclipse' --remote-expr "&modified" >x Best regards, Tony. -- Virgin, n.: An ugly third grader. --~--~-~--~~~---~--~~ You received this message from the "vim_dev" maillist. For more information, visit http://www.vim.org/maillist.php -~--~~~~--~~--~--~---
--remote-expr useless on Windows.
Hello, the following command won't write the result of "&modified" to the file "X" but display it inside a pop-up window: gvim --nofork --servername 'Eclipse' --remote-expr "&modified" >x Am I mistaken or does this does make "--remote-expr" rather useless on Windows? Martin --~--~-~--~~~---~--~~ You received this message from the "vim_dev" maillist. For more information, visit http://www.vim.org/maillist.php -~--~~~~--~~--~--~---
Re: [OT] Lambda
Matthew Winn wrote: > On Wed, 19 Sep 2007 03:18:01 +0200, Tony Mechelynck > <[EMAIL PROTECTED]> wrote: [...] >> As I once heard say: it's easy to speak English at the level a Japanese uses >> it to ask directions in Moscow, but to speak /good/ English is extremely >> difficult for a non-native (and even for some natives, apparently, but this >> is >> a different question). > > It depends what languages you already know. A few years ago I was in > Antwerp and several native speakers of Flemish/Dutch said they found > English a laughably easy language to learn, and they certainly spoke > excellent English to me. On the other hand I imagine someone whose > native language was Latin would have terrible trouble with English, > Latin depending on inflection to determine meaning where English uses > word order. That may be why there are so very few Romans in Britain > these days. > The British didn't speak English at the time anyway (neither the Anglo-Saxons nor the Normans had yet landed), but something akin to Welsh. About those Flemish: English is very "idiomatic", and in addition (unlike Dutch) there's no obvious correspondence between spelling and pronunciation. Also, English has a lot of sounds unknown to Dutch. Best regards, Tony. -- When I was a kid I said to my father one afternoon, "Daddy, will you take me to the zoo?" He answered, "If the zoo wants you let them come and get you." -- Jerry Lewis --~--~-~--~~~---~--~~ You received this message from the "vim_dev" maillist. For more information, visit http://www.vim.org/maillist.php -~--~~~~--~~--~--~---
Re: Sourceforge et. al.
A couple of times, I have sent small patches or enhancements to authors of VIM plugins listed on vim.sourceforge.net, only to receive no answer; probably, those authors have moved on or changed email addresses. That left me without a good option to contribute, as it's not possible to upload a new version to another author's script, or to be set up as a contributing author. So, from that perspective, having a more collaborative solution would be really beneficial. On the other hand, I assume moving all script development to a new solution isn't practical, so only a couple of scripts will move, but for those actively maintained scripts collaboration via email will probably work well, too. I would wish for some enhancements to the 'scripts' section of vim.sourceforge.net, e.g. a possibility to submit and browse feature requests, feedback and unapproved patches for scripts via the existing web interface (basically an extension of the existing "rate this script" functionality). -- regards, ingo /^-- Ingo Karkat -- /^-- /^-- /^-- /^-- /^-- /^-- http://ingo-karkat.de/ -- If a nation expects to be ignorant and free, it expects what never was and never will be. -- Thomas Jefferson, 1816 On 19-Sep-07 8:35, krischik wrote: > Hello, > > Sometimes I have the wish to collaborate on a Vim Script - or just backup it > off site. I my experience SourceForge works quite well for these task. > > Only: creating a SourceForge Project just for a 3 file Plugin seems wasteful. > So my question: Is there a general SourceForge (or similar) project for Vim > Scripts somewhere? > > And if not:Should I apply/create for one? Is there interest? > > Regards > > Martin > > > > --~--~-~--~~~---~--~~ You received this message from the "vim_dev" maillist. For more information, visit http://www.vim.org/maillist.php -~--~~~~--~~--~--~---
[PATCH] Enable cross-compiling
Hi folks, I've attached a patch against VIM 7.1 that enables cross-compiling support in configure. So far I've tested it with cross-compiling to two i586 targets (one with glibc 2.5 and another one with uClibc 0.9.29, both using GCC 4.1.2 and ncurses 5.6). Since we're cross-compiling VIM 6.4 also for PowerPC and XScale and that works like a charm for years now I assume that cross-compiling VIM 7.1 to those platforms will works as well (I'm cross-compiling a lot and there's no reason why it should fail). Anyway, the trick is to allow the user to provide the answers for all the tests configure can't do because it would need to run a test program. So I've enhanced all these tests with a wrapper (AC_CACHE_CHECK) that checks whether a corresponding cache-variable has been set. If the cache-variable is set then that values is used, if not the test is performed. If the test notices that cross-compiling is wanted then the error message now tells which cache-variable to override. If you want the patch to be edited so it can be included in VIM please tell me. Bye, Marc Here's an example of how configure would be called (yes, this is typical for cross-compiling for autoconf): vim_cv_toupper_broken=no \ vim_cv_terminfo=yes \ vim_cv_tty_group=world \ vim_cv_getcwd_broken=no \ vim_cv_stat_ignores_slash=yes \ vim_cv_memmove_handles_overlap=yes \ ac_cv_sizeof_int=4 \ ./configure --with-tlib=ncurses ... -- Marc Haisenko Comdasys AG Rüdesheimer Straße 7 D-80686 München Tel: +49 (0)89 - 548 433 321 e-mail: [EMAIL PROTECTED] http://www.comdasys.com --~--~-~--~~~---~--~~ You received this message from the "vim_dev" maillist. For more information, visit http://www.vim.org/maillist.php -~--~~~~--~~--~--~--- diff -ur vim71.orig/src/configure.in vim71/src/configure.in --- vim71.orig/src/configure.in 2007-05-12 11:19:27.0 +0200 +++ vim71/src/configure.in 2007-09-19 11:18:45.0 +0200 @@ -47,13 +47,6 @@ fi fi -dnl If configure thinks we are cross compiling, there is probably something -dnl wrong with the CC or CFLAGS settings, give an understandable error message -if test "$cross_compiling" = yes; then - AC_MSG_ERROR([cannot compile a simple program, check CC and CFLAGS - (cross compiling doesn't work)]) -fi - dnl gcc-cpp has the wonderful -MM option to produce nicer dependencies. dnl But gcc 3.1 changed the meaning! See near the end. test "$GCC" = yes && CPP_MM=M; AC_SUBST(CPP_MM) @@ -1986,11 +1979,24 @@ dnl Checks for libraries and include files. -AC_MSG_CHECKING(quality of toupper) -AC_TRY_RUN([#include -main() { exit(toupper('A') == 'A' && tolower('z') == 'z'); }], - AC_DEFINE(BROKEN_TOUPPER) AC_MSG_RESULT(bad), - AC_MSG_RESULT(good), AC_MSG_ERROR(failed to compile test program)) +AC_CACHE_CHECK([toupper is broken],[vim_cv_toupper_broken], + [ +AC_RUN_IFELSE([ +#include +main() { exit(toupper('A') == 'A' && tolower('z') == 'z'); } + ],[ +vim_cv_toupper_broken=yes +AC_MSG_RESULT(yes) + ],[ +vim_cv_toupper_broken=no +AC_MSG_RESULT(no) + ],[ +AC_MSG_ERROR(cross-compiling: please set 'vim_cv_toupper_broken') + ])]) + +if test "x$vim_cv_toupper_broken" = "xyes" ; then + AC_DEFINE(BROKEN_TOUPPER) +fi AC_MSG_CHECKING(whether __DATE__ and __TIME__ work) AC_TRY_COMPILE(, [printf("(" __DATE__ " " __TIME__ ")");], @@ -2202,28 +2208,52 @@ Or specify the name of the library with --with-tlib.])) fi -AC_MSG_CHECKING(whether we talk terminfo) -AC_TRY_RUN([ +AC_CACHE_CHECK([whether we talk terminfo], [vim_cv_terminfo], + [ +AC_RUN_IFELSE([ #ifdef HAVE_TERMCAP_H # include #endif main() -{char *s; s=(char *)tgoto("%p1%d", 0, 1); exit(!strcmp(s==0 ? "" : s, "1")); }], - AC_MSG_RESULT([no -- we are in termcap land]), - AC_MSG_RESULT([yes -- terminfo spoken here]); AC_DEFINE(TERMINFO), - AC_MSG_ERROR(failed to compile test program.)) +{char *s; s=(char *)tgoto("%p1%d", 0, 1); exit(!strcmp(s==0 ? "" : s, "1")); } +],[ + vim_cv_terminfo=no + AC_MSG_RESULT([no -- we are in termcap land]) +],[ + vim_cv_terminfo=yes + AC_MSG_RESULT([yes -- terminfo spoken here]) +],[ + AC_MSG_ERROR(cross-compiling: please set 'vim_cv_terminfo') +]) + ]) + +if test "x$vim_cv_terminfo" = "xyes" ; then + AC_DEFINE(TERMINFO) +fi if test "x$olibs" != "x$LIBS"; then - AC_MSG_CHECKING(what tgetent() returns for an unknown terminal) - AC_TRY_RUN([ + AC_CACHE_CHECK([what tgetent() returns for an unknown terminal], [vim_cv_tgent], +[ + AC_RUN_IFELSE([ #ifdef HAVE_TERMCAP_H # include #endif main() -{char s[1]; int res = tgetent(s, "thisterminaldoesnotexist"); exit(res != 0); }], - AC_MSG_RESULT(zero); AC_DEFINE(TGETENT_ZERO_ERR, 0), - AC_MSG_RESULT(non-zero), - AC_MSG_ERROR(failed to compile test program.)) +{char s[1]; int res = tgetent(s, "thisterminaldoesnotexist"); exit(res != 0); } + ],[ + vim_cv_tgent=zer
Re: Sourceforge et. al.
On 19 Sep., 12:09, [EMAIL PROTECTED] wrote: > krischik <[EMAIL PROTECTED]>: > > > Sometimes I have the wish to collaborate on a Vim Script - or just > > backup it off site. I my experience SourceForge works quite well for > > these task. > > > Only: creating a SourceForge Project just for a 3 file Plugin seems > > wasteful. So my question: Is there a general SourceForge (or similar) > > project for Vim Scripts somewhere? > > > And if not:Should I apply/create for one? Is there interest? > > There are a few big plugin suites on SF. I noticed. Let me flesh out the Idea. I thinking about starting new Project "vim-scripts" of Sourceforge which is organised to for sub- projects. Something like: + trunk | +- Modelines | +- Rainbow Parenthsis | +- Tail + branches | +- Modelines 1.0 | +- Rainbow Parenthsis 1.0 | +- Tail 1.0 + tags That way smaller Script project would have a home as well. > Some authors have their scripts on a svn repository or another, for instance > I'm > planning to maintain my scripts on google code (since my main hard drive, > where > I was having my svn repository, has died). Why google code? What makes it more attractive? > I found the idea quite attractive, but in the end, it would be at the > discretion > of each script maintainer. Sure. Martin --~--~-~--~~~---~--~~ You received this message from the "vim_dev" maillist. For more information, visit http://www.vim.org/maillist.php -~--~~~~--~~--~--~---
Re: Sourceforge et. al.
krischik <[EMAIL PROTECTED]>: > Sometimes I have the wish to collaborate on a Vim Script - or just > backup it off site. I my experience SourceForge works quite well for > these task. > > Only: creating a SourceForge Project just for a 3 file Plugin seems > wasteful. So my question: Is there a general SourceForge (or similar) > project for Vim Scripts somewhere? > > And if not:Should I apply/create for one? Is there interest? There are a few big plugin suites on SF. Some authors have their scripts on a svn repository or another, for instance I'm planning to maintain my scripts on google code (since my main hard drive, where I was having my svn repository, has died). I found the idea quite attractive, but in the end, it would be at the discretion of each script maintainer. -- Luc Hermitte http://hermitte.free.fr/vim/ --~--~-~--~~~---~--~~ You received this message from the "vim_dev" maillist. For more information, visit http://www.vim.org/maillist.php -~--~~~~--~~--~--~---
Re: [OT] Lambda
On Wed, 19 Sep 2007 03:18:01 +0200, Tony Mechelynck <[EMAIL PROTECTED]> wrote: > Hm, yes, sorry. With its dual Germanic and Romance vocabulary heritage, > English often has two (or more) non-exactly-synonymous equivalents for one > French word, and it isn't always easy to choose the right one. For instance I > don't quite grasp the difference between 'freedom' and 'liberty'. But then many native speakers of English don't grasp the difference between "its" and "it's" or "there", "their" and "they're". It is possible to be fluent in no languages at all. > >> * A lambda user is a person who uses a system in the same way as the > >> majority > >> of the users, not trying to use advanced functionalities. > > > > I think 'ordinary' would suit as a translation of 'lambda' in this context, > > as > > well as in the context you originally used it: When I see lambda I think of LISP. A lambda person is someone who has bits that can be substituted as required when you call them. > As I once heard say: it's easy to speak English at the level a Japanese uses > it to ask directions in Moscow, but to speak /good/ English is extremely > difficult for a non-native (and even for some natives, apparently, but this > is > a different question). It depends what languages you already know. A few years ago I was in Antwerp and several native speakers of Flemish/Dutch said they found English a laughably easy language to learn, and they certainly spoke excellent English to me. On the other hand I imagine someone whose native language was Latin would have terrible trouble with English, Latin depending on inflection to determine meaning where English uses word order. That may be why there are so very few Romans in Britain these days. -- Matthew Winn --~--~-~--~~~---~--~~ You received this message from the "vim_dev" maillist. For more information, visit http://www.vim.org/maillist.php -~--~~~~--~~--~--~---
Re: problem with MacVim
Today I tried to open a file which I was editing before my OS crashed. There was a .swp file hanging around, and whenever I tried to open that file in GUI Vim, it crashed. After removing the .swp, everything was normal again. On 13 Sep 2007, at 21:52 , Tony Mechelynck wrote: > - Does it work if you open the file read-only at least one of both > times? For > instance, Both instances are running without crash. > - When not readonly either time (your original case), are you sure > that the > first Vim creates its swap file someplace where the second Vim can > find it? > I'm not sure, since I don't know how to check... > - Does the crash happen if the file is not being edited in another > Vim but if > you create a dummy, zero-length "swapfile" next to it? For instance, > Yes, the crash happens in this case. I'm running unpatched version of vim 7.1.104, and Carbon as gui. > If you mean that you are trying to edit the same file in different > versions of > Vim, but not at the same time, please say so, because then I have > misunderstood you. I was trying to edit the same file at the same time with different version of Vim. So yes, you've understood me correctly :) --~--~-~--~~~---~--~~ You received this message from the "vim_dev" maillist. For more information, visit http://www.vim.org/maillist.php -~--~~~~--~~--~--~---
Re: Intro page disappears
Larson, David wrote: > If I set showtabline=2 in my .gvimrc, the nice intro page that shows up > when vim is started disappears. Is this expected? > It does not seem to be connected, at least in my setup (vim 7.1 on Win2000). Did you try to exclude all your other custom settings? This one: "set shortmess+=I" controls the intro message when starting Vim. Regards, Santhalus --~--~-~--~~~---~--~~ You received this message from the "vim_dev" maillist. For more information, visit http://www.vim.org/maillist.php -~--~~~~--~~--~--~---
Re: Sourceforge et. al.
On 19 Sep., 08:41, Tony Mechelynck <[EMAIL PROTECTED]> wrote: > What about the "Scripts" section of vim.sourceforge.net ? You can upload > single-file plugins there as *.vim, or multi-file packages as *.vba, *.tar.gz > or *.zip I don't want to replace http://vim.sourceforge.net/scripts/index.php. I am looking for a collaboration help.With Collaboration == Subversion ;-) . Regards Martin --~--~-~--~~~---~--~~ You received this message from the "vim_dev" maillist. For more information, visit http://www.vim.org/maillist.php -~--~~~~--~~--~--~---