Patch 7.0.095

2006-09-10 Thread Bram Moolenaar

Patch 7.0.095
Problem:The Greek tutor is not available in utf-8.  el is used for the
language, only gr for the country is recognized.
Solution:   Add the utf-8 Greek tutor.  Use it for conversion to iso-8859-7
and cp737.  (Lefteris Dimitroulakis)
Files:  runtime/tutor/Makefile, runtime/tutor/tutor.gr.utf-8,
runtime/tutor/tutor.vim


*** ../vim-7.0.094/runtime/tutor/Makefile   Sat Sep  2 14:54:17 2006
--- runtime/tutor/Makefile  Sun Sep 10 11:56:54 2006
***
*** 7,13 
  
  all: tutor.ja.sjis tutor.ja.euc \
tutor.ko.euc \
!   tutor.ru tutor.ru.cp1251
  
  tutor.ja.sjis: tutor.ja.utf-8
nkf -WXs tutor.ja.utf-8  tutor.ja.sjis
--- 7,14 
  
  all: tutor.ja.sjis tutor.ja.euc \
tutor.ko.euc \
!   tutor.ru tutor.ru.cp1251 \
!   tutor.gr tutor.gr.cp737
  
  tutor.ja.sjis: tutor.ja.utf-8
nkf -WXs tutor.ja.utf-8  tutor.ja.sjis
***
*** 23,25 
--- 24,32 
  
  tutor.ru.cp1251: tutor.ru.utf-8
iconv -f UTF-8 -t cp1251 tutor.ru.utf-8  tutor.ru.cp1251
+ 
+ tutor.gr: tutor.gr.utf-8
+   iconv -f UTF-8 -t ISO-8859-7 tutor.gr.utf-8  tutor.gr
+ 
+ tutor.gr.cp737: tutor.gr.utf-8
+   iconv -f UTF-8 -t cp737 tutor.gr.utf-8  tutor.gr.cp737
*** ../vim-7.0.094/runtime/tutor/tutor.gr.utf-8 Sun Sep 10 13:20:58 2006
--- runtime/tutor/tutor.gr.utf-8Sun Sep 10 11:54:10 2006
***
*** 0 
--- 1,815 
+ 
===
+ =Κ αλ ω σ ή ρ θ α τ εσ τ ο   V I M   T u t o r-
Έκδοση 1.5 =
+ 
===
+ 
+  Ο Vim είναι ένας πανίσχυρος συντάκτης 
που έχει πολλές εντολές, πάρα
+  πολλές για να εξηγήσουμε σε μία 
περιήγηση όπως αυτή. Αυτή η περιήγηση
+  σχεδιάστηκε για να περιγράψει 
ικανοποιητικά τις εντολές που θα σας
+  κάνουν να χρησιμοποιείτε εύκολα τον Vim 
σαν έναν γενικής χρήσης συντάκτη.
+ 
+  Ο κατά προσέγγιση χρόνος που 
απαιτείται για να ολοκληρώσετε την 
περιήγηση
+  είναι 25-30 λεπτά, εξαρτώντας από το πόσο 
χρόνο θα ξοδέψετε για
+  πειραματισμούς.
+ 
+  Οι εντολές στα μαθήματα θα 
τροποποιήσουν το κείμενο. Δημιουργήστε ένα
+  αντίγραφο αυτού του αρχείου για να 
εξασκηθείτε (αν ξεκινήσατε το
+  Vimtutor αυτό είναι ήδη ένα αντίγραφο).
+ 
+  Είναι σημαντικό να θυμάστε ότι αυτή η 
περιήγηση είναι οργανωμένη έτσι
+  ώστε να διδάσκει μέσω της χρήσης. Αυτό 
σημαίνει ότι χρειάζεται να
+  εκτελείτε τις εντολές για να τις μάθετε 
σωστά. Αν διαβάζετε μόνο το
+  κείμενο, θα τις ξεχάσετε!
+ 
+  Τώρα, βεβαιωθείτε ότι το πλήκτρο Shift-Lock 
ΔΕΝ είναι πατημένο και
+  πατήστε το πλήκτρο j αρκετές φορές για 
να μετακινήσετε τον δρομέα έτσι
+  ώστε το Μάθημα 1.1 να γεμίσει πλήρως την 
οθόνη.
+ 
+ 
~~~
+ Μάθημα 1.1:  ΜΕΤΑΚΙΝΟΝΤΑΣ ΤΟΝ 
ΔΡΟΜΕΑ
+ 
+   ** Για να κινήσετε τον δρομέα, πατήστε τα 
πλήκτρα h,j,k,l όπως δείχνεται. **
+^
+kHint: Το πλήκτρο h είναι αριστερά 
και κινεί στ' αριστερά.
+ h l Το πλήκτρο l είναι δεξιά και 
κινεί στα δεξιά.
+j  Το πλήκτρο j μοιάζει με 
βελάκι προς τα κάτω.
+v
+ 
+   1. Μετακινείστε τον δρομέα τριγύρω στην 
οθόνη μέχρι να νοιώθετε άνετα.
+ 
+   2. Κρατήστε πατημένο το κάτω πλήκτρο (j) 
μέχρι να επαναληφθεί.
+ --- Τώρα ξέρετε πώς να μετακινηθείτε στο 
επόμενο μάθημα.
+ 
+   3. Χρησιμοποιώντας το κάτω πλήκτρο, 
μετακινηθείτε στο Μάθημα 1.2.
+ 
+ Σημείωση: Αν αμφιβάλλετε για κάτι που 
πατήσατε, πατήστε ESC για να 

Patch 7.0.096

2006-09-10 Thread Bram Moolenaar

Patch 7.0.096
Problem:taglist() returns the filename relative to the tags file, while
the directory of the tags file is unknown. (Hari Krishna Dara)
Solution:   Expand the file name. (Yegappan Lakshmanan)
Files:  src/tag.c


*** ../vim-7.0.095/src/tag.cThu Apr 27 23:40:34 2006
--- src/tag.c   Sun Sep 10 13:42:41 2006
***
*** 3787,3792 
--- 3787,3793 
  {
  int   num_matches, i, ret;
  char_u**matches, *p;
+ char_u*full_fname;
  dict_T*dict;
  tagptrs_T tp;
  long  is_static;
***
*** 3809,3823 
if (list_append_dict(list, dict) == FAIL)
ret = FAIL;
  
if (add_tag_field(dict, name, tp.tagname, tp.tagname_end) == FAIL
!   || add_tag_field(dict, filename, tp.fname,
!tp.fname_end) == FAIL
|| add_tag_field(dict, cmd, tp.command,
   tp.command_end) == FAIL
|| add_tag_field(dict, kind, tp.tagkind,
  tp.tagkind_end) == FAIL
|| dict_add_nr_str(dict, static, is_static, NULL) == FAIL)
ret = FAIL;
  
if (tp.command_end != NULL)
{
--- 3810,3827 
if (list_append_dict(list, dict) == FAIL)
ret = FAIL;
  
+   full_fname = tag_full_fname(tp);
if (add_tag_field(dict, name, tp.tagname, tp.tagname_end) == FAIL
!   || add_tag_field(dict, filename, full_fname,
!NULL) == FAIL
|| add_tag_field(dict, cmd, tp.command,
   tp.command_end) == FAIL
|| add_tag_field(dict, kind, tp.tagkind,
  tp.tagkind_end) == FAIL
|| dict_add_nr_str(dict, static, is_static, NULL) == FAIL)
ret = FAIL;
+ 
+   vim_free(full_fname);
  
if (tp.command_end != NULL)
{
*** ../vim-7.0.095/src/version.cSun Sep 10 13:22:26 2006
--- src/version.c   Sun Sep 10 13:52:01 2006
***
*** 668,669 
--- 668,671 
  {   /* Add new patch number below this line */
+ /**/
+ 96,
  /**/

-- 
The early bird gets the worm. If you want something else for
breakfast, get up later.

 /// 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///


extraHuge build size (= huge + intepreters)

2006-09-10 Thread Yakov Lerner

This patch adds 'extrahuge' build size, which is
huge+interpreters (spelled as --with-features=extrahuge
or --with-features=allinterp).

Yakov

P.S. Maybe --with-features=max is better name.


patch-extrahuge
Description: Binary data


Patch 7.0.097

2006-09-10 Thread Bram Moolenaar

Patch 7.0.097
Problem::tabclose N that closes another tab page does not remove the tab
pages line.  Same problem when using the mouse.
Solution:   Adjust the tab pages line when needed in tabpage_close_other().
Files:  src/ex_docmd.c


*** ../vim-7.0.096/src/ex_docmd.c   Tue Aug 29 17:28:56 2006
--- src/ex_docmd.c  Sun Sep 10 15:47:33 2006
***
*** 6296,6302 
  exarg_T   *eap;
  {
  tabpage_T *tp;
- int   h = tabline_height();
  
  # ifdef FEAT_CMDWIN
  if (cmdwin_type != 0)
--- 6296,6301 
***
*** 6328,6336 
   )
tabpage_close(eap-forceit);
}
- 
- if (h != tabline_height())
-   shell_new_rows();
  }
  
  /*
--- 6327,6332 
***
*** 6342,6348 
  {
  tabpage_T *tp;
  int   done;
- int   h = tabline_height();
  
  # ifdef FEAT_CMDWIN
  if (cmdwin_type != 0)
--- 6338,6343 
***
*** 6371,6379 
break;
}
}
- 
- if (h != tabline_height())
-   shell_new_rows();
  }
  
  /*
--- 6366,6371 
***
*** 6397,6402 
--- 6389,6396 
  /*
   * Close tab page tp, which is not the current tab page.
   * Note that autocommands may make tp invalid.
+  * Also takes care of the tab pages line disappearing when closing the
+  * last-but-one tab page.
   */
  void
  tabpage_close_other(tp, forceit)
***
*** 6405,6410 
--- 6399,6405 
  {
  int   done = 0;
  win_T *wp;
+ int   h = tabline_height();
  
  /* Limit to 1000 windows, autocommands may add a window while we close
   * one.  OK, so I'm paranoid... */
***
*** 6418,6424 
--- 6413,6422 
if (!valid_tabpage(tp) || tp-tp_firstwin == wp)
break;
  }
+ 
  redraw_tabline = TRUE;
+ if (h != tabline_height())
+   shell_new_rows();
  }
  
  /*
*** ../vim-7.0.096/src/version.cSun Sep 10 13:56:06 2006
--- src/version.c   Sun Sep 10 15:44:24 2006
***
*** 668,669 
--- 668,671 
  {   /* Add new patch number below this line */
+ /**/
+ 97,
  /**/

-- 
Advice to worms:  Sleep late.

 /// 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///


Bug? -o doesn't open all its windows

2006-09-10 Thread A.J.Mechelynck

Bug? With

gvim -o3 file1.txt file2.txt file3.txt

only the first two are displayed in a window. (All 3 files exist.)

The arguments list is OK, since

:bot new
:last

opens the 3rd file in a 3rd window.

If the line

set noea wmh=0 wh=9 hh=9

(in my vimrc) is changed to

au VimEnter * set noea wmh=0 wh=9 hh=9

(with no other changes in the vimrc), Vim opens all three windows at 
startup. I suspect that the test for is there enough space? in the 
handling of the -o command-line argument erroneously tests winheight 
instead of winminheight.


This is vim 7.0.97 (Huge, for GTK2/Gnome).


Best regards,
Tony.


Re: Bug? -o doesn't open all its windows

2006-09-10 Thread A.J.Mechelynck

Bram Moolenaar wrote:

Tony Mechelynck wrote:


Bug? With

gvim -o3 file1.txt file2.txt file3.txt

only the first two are displayed in a window. (All 3 files exist.)

The arguments list is OK, since

:bot new
:last

opens the 3rd file in a 3rd window.

If the line

set noea wmh=0 wh=9 hh=9

(in my vimrc) is changed to

au VimEnter * set noea wmh=0 wh=9 hh=9

(with no other changes in the vimrc), Vim opens all three windows at 
startup. I suspect that the test for is there enough space? in the 
handling of the -o command-line argument erroneously tests winheight 
instead of winminheight.


This is vim 7.0.97 (Huge, for GTK2/Gnome).


'winheight' defines the minimal space for the current window.  This is
taken into account when computing the number of windows opened for the
-o argument.  Vim thinks you want one window with 'winheight' lines,
nothing else fits if it's a big number.  I think this is correct
behavior.  It's also documented in the help for 'winheight'.



'winminheight' defines the minimal space for any window; it is a hard 
minimum. 'winheight' defines the desired minimal space for the current 
window; it is not a hard minimum. Splitting a window will fail if it 
would make all windows smaller than wmh; it won't if it would only make 
the current window smaller than wh.


Setting 'wh' to a high value (and 'wmh' to zero) is documented as a way 
to always make the current window as big as possible (what I call 
Rolodex Vim). It is not meant to forbid splitting, and indeed it 
doesn't. With 'wh' set to 9 it is clear that I will never get a 
window that high; yet it is (IMHO) a useful setting.


That :all won't open more than two windows if 'wh' is very large is 
documented under 'winheight', and 'winheight' is referenced under 
|:all|. There is no mention of |-o| under either 'winheight' or |:all|, 
nor is there mention of 'winheight' or |:all| under |-o|. In retrospect, 
and after reading your reply above, it is understandable that |-o| has 
some of the properties of |:all|, though (unlike |:all| IIUC) it will 
open more windows than files if the numeric argument is large enough.


But even the fact that it is documented (for |:all|, not for |-o|) 
doesn't make this behaviour logical or desirable:
- Why will -o3 (and, I presume, :all 3) open a second window, but 
not a third one, if the first one is _already_ smaller than 'winheight'?
- The fact that |-o| and |:all| won't allow as many splits as (repeated 
invocations of) |:new| is IMHO a misfeature.


If you won't agree, well, you're the boss I guess. At least I have found 
a workaround (for versions with +autocmd).



Best regards,
Tony.


Q: I'm working on the basic.vim file

2006-09-10 Thread Mark Manning
I started using FreeBasic which uses the *.bas ending and was 
wondering if:


1. Anyone is interested in me sending in the updated basic.vim file.
2. If this is the right mailing group to send it to.

Thanks!

Mark



Re: Q: I'm working on the basic.vim file

2006-09-10 Thread A.J.Mechelynck

Mark Manning wrote:
I started using FreeBasic which uses the *.bas ending and was 
wondering if:


1. Anyone is interested in me sending in the updated basic.vim file.
2. If this is the right mailing group to send it to.

Thanks!

Mark




Normal procedure would be to first try contacting the maintainer: i.e., 
Allan Kelly [EMAIL PROTECTED] . If he doesn't answer (neither to 
direct mail nor to list posting), you might do one of the following:


- post here a context diff between the existing file and yours;
- upload your script somewhere and post the URI here; or
- send it to Bram [EMAIL PROTECTED], mentioning that you tried 
contacting the current maintainer without success.


If Bram accepts your version for distribution as the official Basic 
plugin, I suppose you would then become the maintainer of that script, 
which means that you would be expected to answer queries about it on the 
vim list and/or fix bugs brought to your attention either directly or 
via these lists.



Best regards,
Tony.


The c.vim file

2006-09-10 Thread Mark Manning

In the syntax stuff, the c.vim file should be changed to have the following:

Old:

syn regioncStringstart=++ skip=+\|\\+ end=++ 
contains=cSpecial



New

syn regioncStringstart=++ skip=+\||'+ end=++ 
contains=cSpecial
syn regioncStringstart=+'+ skip=+\|\\\'\|+ end=+'+ 
contains=cSpecial


This would take care of the ..'. problem and the '' problem 
where strings run off the end of the line because of the embedded single 
quote and double quote.


(Hopefully this goes through as text, Mozilla still has the HTML stuff 
at the top of the message.)


Re: The c.vim file

2006-09-10 Thread Yakov Lerner

On 9/10/06, Mark Manning [EMAIL PROTECTED] wrote:

In the syntax stuff, the c.vim file should be changed to have the following:

Old:

syn regioncStringstart=++ skip=+\|\\+ end=++
contains=cSpecial


New

syn regioncStringstart=++ skip=+\||'+ end=++
contains=cSpecial
syn regioncStringstart=+'+ skip=+\|\\\'\|+ end=+'+
contains=cSpecial

This would take care of the ..'. problem and the '' problem


Hmmm both  ..'. and  '' are handled
correctly for me with existing C syntax. Which
$VIMRUNTIME/syntax/c.vim version
is yours ?

Yakov


Hmmmmmm....

2006-09-10 Thread Mark Manning

I get:

A message that you sent could not be delivered to one or more of its
recipients. This is a permanent error. The following address(es) failed:

 [EMAIL PROTECTED]
   SMTP error from remote mail server after RCPT TO:[EMAIL PROTECTED]:
   host uk2mxarray3.uk2.net [83.170.64.215]: 550 address [EMAIL PROTECTED] 
disabled by user or upstream

So I take it that Mr. Kelly is no longer reachable.  Let me contact Bram 
and talk to him.  :-)




Patch 7.0.098

2006-09-10 Thread Bram Moolenaar

Patch 7.0.098
Problem:Redirecting command output in a cmdline completion function
doesn't work. (Hari Krishna Dara)
Solution:   Enable redirection when redirection is started.
Files:  src/ex_docmd.c, src/ex_getln.c


*** ../vim-7.0.097/src/ex_docmd.c   Sun Sep 10 15:50:32 2006
--- src/ex_docmd.c  Sun Sep 10 20:59:46 2006
***
*** 8422,8427 
--- 8422,8436 
else
EMSG2(_(e_invarg2), eap-arg);
  }
+ 
+ /* Make sure redirection is not off.  Can happen for cmdline completion
+  * that indirectly invokes a command to catch its output. */
+ if (redir_fd != NULL
+ #ifdef FEAT_EVAL
+ || redir_reg || redir_vname
+ #endif
+   )
+   redir_off = FALSE;
  }
  
  /*
*** ../vim-7.0.097/src/ex_getln.c   Sat Sep  2 17:58:36 2006
--- src/ex_getln.c  Sun Sep 10 21:04:57 2006
***
*** 324,329 
--- 324,332 
   */
  for (;;)
  {
+   redir_off = TRUE;   /* Don't redirect the typed command.
+  Repeated, because a :redir inside
+  completion may switch it on. */
  #ifdef USE_ON_FLY_SCROLL
dont_scroll = FALSE;/* allow scrolling here */
  #endif
*** ../vim-7.0.097/src/version.cSun Sep 10 15:50:32 2006
--- src/version.c   Sun Sep 10 20:58:17 2006
***
*** 668,669 
--- 668,671 
  {   /* Add new patch number below this line */
+ /**/
+ 98,
  /**/

-- 
GUEST:He's killed the best man!
SECOND GUEST: (holding a limp WOMAN) He's killed my auntie.
FATHER:   No, please!  This is supposed to be a happy occasion!  Let's
  not bicker and argue about who killed who ...
 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///


Sorry

2006-09-10 Thread Mark Manning
I'm working in FreeBasic and some C and some Perl.  This is one of the 
fixes in the basic.vim thing I'm doing and I saw the same thing in the 
c.vim file and thought they would give the same incorrect highlighting.  
I ran into this (for C) while working at NASA and thought I'd fix it, 
but as you say - it already works in version 7.0.17.  :-/


However, it does not work in the basic.vim or the perl.vim.  If you try:

test.pl

   print This's a test;
   exit( 0 );

The single quote makes the perl.vim rules think it is still in the 
single quoted area.  The same if you do it the other way as well.  Sorry 
for not checking the c.vim stuff before.  It didn't work in the other 
two and I was going I'll fix it in all three!  When I should have been 
going Let me check this out first!  :-/


Oh well, what can I say but DOH!  :-P

Mark



Patch 7.0.099

2006-09-10 Thread Bram Moolenaar

Patch 7.0.099
Problem:GUI: When the popup menu is visible using the scrollbar messes up
the display.
Solution:   Disallow scrolling the current window.  Redraw the popup menu
after scrolling another window.
Files:  src/gui.c


*** ../vim-7.0.098/src/gui.cTue Aug 29 18:16:37 2006
--- src/gui.c   Sun Sep 10 21:28:57 2006
***
*** 3734,3739 
--- 3734,3745 
  if (dont_scroll || input_available())
return;
  #endif
+ #ifdef FEAT_INS_EXPAND
+ /* Disallow scrolling the current window when the completion popup menu is
+  * visible. */
+ if ((sb-wp == NULL || sb-wp == curwin)  pum_visible())
+   return;
+ #endif
  
  #ifdef FEAT_RIGHTLEFT
  if (sb-wp == NULL  curwin-w_p_rl)
***
*** 4207,4212 
--- 4213,4224 
redraw_win_later(wp, VALID);
updateWindow(wp);   /* update window, status line, and cmdline */
  }
+ 
+ #ifdef FEAT_INS_EXPAND
+ /* May need to redraw the popup menu. */
+ if (pum_visible())
+   pum_redraw();
+ #endif
  
  return (wp == curwin  !equalpos(curwin-w_cursor, old_cursor));
  }
*** ../vim-7.0.098/src/version.cSun Sep 10 21:05:39 2006
--- src/version.c   Sun Sep 10 21:35:27 2006
***
*** 668,669 
--- 668,671 
  {   /* Add new patch number below this line */
+ /**/
+ 99,
  /**/

-- 
FATHER: We are here today to witness the union of two young people in the
joyful bond of the holy wedlock.  Unfortunately, one of them, my son
Herbert, has just fallen to his death.
   [Murmurs from CROWD;  the BRIDE smiles with relief, coughs.]
 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///


Well....

2006-09-10 Thread Mark Manning
That is very strange.  In 7.0.17 the exit command is still highlighted 
as a string.  If I put in an additional single quote then it 
re-highlights as a function.


test.pl
   print This's a test';
   exit( 0 );

Look correct but the

test.pl
   print This's a test;
   exit( 0 );

Does not.  Also the:

test.pl

   a =END_TEXT;
This's a test
END_TEXT
   exit( 0 );

Also makes the exit command show up as a string versus function call.  
Which version do you have?


Mark



Re: Well....

2006-09-10 Thread A.J.Mechelynck

Mark Manning wrote:
That is very strange.  In 7.0.17 the exit command is still highlighted 
as a string.  If I put in an additional single quote then it 
re-highlights as a function.


test.pl
   print This's a test';
   exit( 0 );

Look correct but the

test.pl
   print This's a test;
   exit( 0 );

Does not.  Also the:

test.pl

   a =END_TEXT;
This's a test
END_TEXT
   exit( 0 );

Also makes the exit command show up as a string versus function call.  
Which version do you have?


Mark




I have syntax/perl.vim by Nick Hibma, dated 2006 Aug 9, and it 
highlights your example correctly (with exit in perlStatementFlow 
highlight, which links to Statement, and is by default in bold brown in 
the GUI, while strings are in pink).



Best regards,
Tony.


Re: Ok - stop the presses!

2006-09-10 Thread A.J.Mechelynck

Mark Manning wrote:
Ok, with so many people going What do you mean?  I'm going to do the 
right thing and download the latest and greatest version.  Obviously 
there is something wrong going on here with me and my system.  Otherwise 
so many people wouldn't be saying their stuff is working properly.  Give 
me a few to download and install it so I can see if everything is 
working correctly.  Thanks!  :-)


Mark




Note that upgrades to runtime files only rarely make it to the official 
patches. If you use the published *.tar.bz2 and *.tar.gz archives plus 
the 7.0.* patches, you may need to rsync your runtime directory against 
ftp://ftp.vim.org/pub/vim/runtime/ except the latter's dos directory 
subtree. OTOH if you use CVS or SVN you should get the full tree, 
up-to-date or maybe only a few days behind.



Best regards,
Tony.


Re: Update on the update

2006-09-10 Thread Yakov Lerner

On 9/11/06, Mark Manning [EMAIL PROTECTED] wrote:

 (If I
put in echo version it comes back as 700.  Even the 7.0.17 version
comes back as 700


Output of ':echo version' does not reflect patchlevel. (the .17 in
7.0.17 is patchlevel).
You can see the patchlevel on the initial splashscreen, or
in the output of :version (look at 'Included patches' line, 2nd line). (The
latter is same as 'vim --version).

Yakov


New question

2006-09-10 Thread Mark Manning
Hey, I hate to keep barging in here asking questions and such but here 
is a new one.  :-)


In the new basic.vim file I am having a problem.  In FreeBasic you can 
use both single as well as double quotes to enclose a string.  
Unfortunately, you can also have comments which start with a single 
quote.  So far I can capture and highlight correctly these three conditions:


1. REM Comment
2. Spaces'Comment
3. :SpacesComment

What I can not get is the:

1. 'Comment

Like so:

test.bas
rem This is a comment
   '   This is a comment
   :   '   This is a comment
'   This is a comment too but it doesn't properly highlight.  Instead, 
it thinks it is a string.

   end

Here are my commands:

Comments
syn matchbSpecialcontained \\.
syn region  bCommentstart=^rem end=$ contains=bSpecial,bTodo
syn regionbCommentstart=:\s*' end=$ contains=bSpecial,bTodo
syn regionbCommentstart=^\s*' end=$ contains=bSpecial,bTodo

 String and Character contstants
syn regionbStringstart='' end='' contains=bSpecial,bTodo
syn regionbStringstart=' end=' contains=bSpecial,bTodo

Suggestions?



Re: New question

2006-09-10 Thread Yakov Lerner

On 9/11/06, Mark Manning [EMAIL PROTECTED] wrote:

Hey, I hate to keep barging in here asking questions and such but here
is a new one.  :-)

In the new basic.vim file I am having a problem.  In FreeBasic you can
use both single as well as double quotes to enclose a string.
Unfortunately, you can also have comments which start with a single
quote.  So far I can capture and highlight correctly these three conditions:

1. REM Comment
2. Spaces'Comment
3. :SpacesComment

What I can not get is the:

1. 'Comment

Like so:

test.bas
rem This is a comment
'   This is a comment
:   '   This is a comment
'   This is a comment too but it doesn't properly highlight.  Instead,
it thinks it is a string.
end

Here are my commands:

Comments
syn matchbSpecialcontained \\.
syn region  bCommentstart=^rem end=$ contains=bSpecial,bTodo
syn regionbCommentstart=:\s*' end=$ contains=bSpecial,bTodo
syn regionbCommentstart=^\s*' end=$ contains=bSpecial,bTodo

 String and Character contstants
syn regionbStringstart='' end='' contains=bSpecial,bTodo
syn regionbStringstart=' end=' contains=bSpecial,bTodo

Suggestions?


Try to reverse order of statements, putting Comment after String. The
last one takes precedence, and you want Comment to take precedence
over string. Like this:

 String must go before Comments
 String and Character contstants
syn regionbStringstart='' end='' contains=bSpecial,bTodo
syn regionbStringstart=' end=' contains=bSpecial,bTodo

Comments
syn matchbSpecialcontained \\.
syn region  bCommentstart=^rem end=$ contains=bSpecial,bTodo
syn regionbCommentstart=:\s*' end=$ contains=bSpecial,bTodo
syn regionbCommentstart=^\s*' end=$ contains=bSpecial,bTodo

Yakov


Re: New question

2006-09-10 Thread Yakov Lerner

-- Forwarded message --
From: Mark Manning [EMAIL PROTECTED]
Date: Sep 11, 2006 1:43 AM
Subject: Re: New question
To: Yakov Lerner [EMAIL PROTECTED]


Ok, tried it and it works!  :-)

Thanks!  :-)

Mark


Possible addition to the c.vim and perl.vim syntax files

2006-09-10 Thread Mark Manning
I saw in the c.vim that there was an error statement for octal numbers.  
There isn't one for hex numbers so I made one really quickly.  If you 
want, just put it into the c.vim file.  :-)


The test:

syn regioncHexErrorstart=0x\x*[g-zG-Z] end=\W

The highlight command:

   hi link   cHexError   cError

Of course, this needs to be approved by Bram first though.  :-)

Mark



Re: Possible addition to the c.vim and perl.vim syntax files

2006-09-10 Thread Yakov Lerner

On 9/11/06, Mark Manning [EMAIL PROTECTED] wrote:

I saw in the c.vim that there was an error statement for octal numbers.
There isn't one for hex numbers so I made one really quickly.  If you
want, just put it into the c.vim file.  :-)

The test:

syn regioncHexErrorstart=0x\x*[g-zG-Z] end=\W

The highlight command:

hi link   cHexError   cError

Of course, this needs to be approved by Bram first though.  :-)


Good idea. But then, why not to add error syntax for decimal numbers ?
I think it is also not present.

Yakov


Thanks!

2006-09-10 Thread Mark Manning

Thanks for the info!  :-)
(Hit the reply button rather than Compose Mail To.)

Mark



Binary, Octal, Decimal, Hex!

2006-09-10 Thread Mark Manning
It is fairly easy to check for inconsistencies in Binary, Octal, and Hex 
because they have a fixed format.  Decimal is not as easy due to there 
being integers, reals, and general format numbers (ie: #e+/-#) which are 
all grouped into the Decimal category.  I'll think about it though.  
Maybe I can come up with something.  :-)


Actually, as I was sitting here typing this it popped into my head that 
such a test would actually fall under the Variable category rather than 
the Decimal category since variables can start with any character or an 
underscore; the opposite would be to start with something like a decimal 
number.  A possibility maybe.  :-)


Mark



netrw make some error in the buffer.

2006-09-10 Thread mattn

Hi.

I tried ftp access with netrw.vim.
ex: :e ftp://machine/path/

I get --No lines in buffer--.
and I get following message in vim buffer in japanese.

ftp: is not internal command.

I guess that the first problem cause by :file  command.
and the second cause by following code.

-
if has(win32) || has(win95) || has(win64) || has(win16)
 silent! keepjumps! %s/\r$//e
endif
-

keepjumps don't have ! mode. It's typo?

I wrote a patch for this problems.
Please check and include.

--
- Yasuhiro Matsumoto


netrw.vim.diff
Description: Binary data


Re: Update on the update

2006-09-10 Thread A.J.Mechelynck

Mark Manning wrote:
Ok, after downloading the current items on the web page at vim.org both 
C and Perl are working ok (in both Windows and Cygwin/Linux).  Basic 
still has the problems from before.  Thanks to everyone for speaking 
up.  :-)


To Tony:  Thanks for the diff command.  I'll see about posting it but 
not until after Bram has said it is ok.  :-)


I also see that the web page version of 7.0 is very out-of-date (If I 
put in echo version it comes back as 700.  Even the 7.0.17 version 
comes back as 700 (which turns out to have been installed into /usr/bin 
instead of /usr/local/bin)).  Ok.  Now all I have to do is to rsync the 
Cygwin version and CVS the Windows one so they are both up-to-date.  A 
few more minutes work.  :-)





1. Next time, please use a more explicit Subject: line, and, if you 
continue a single conversation, use Reply to all rather than Write 
new mail. It makes a difference on mail clients which, like mine, can 
group posts by thread.


2. version will be 700 on all patchlevels of 7.0. To see the highest 
patch number included, see :intro, and to see them all, look at the 
first four lines of the output of :version. If the latter doesn't say 
Included patches: then you have an unpatched version. The latest 
patchlevel of 7.0 is currently 99; any new patches will be published by 
Bram in the vim-dev list. To test (in a script) whether such-and-such a 
patch was included, see :help has-patch.


3. Programs which come bundled with a Linux distribution will usually be 
installed in /usr/bin unless there's a reason to put them some other 
place (such as /usr/X11R6/bin or /opt/kde3/bin). /usr/local/bin 
intentionally comes ahead of all those places in the $PATH, so 
additional software added by the user will take precedence if the 
program name is the same. To see all the places in your $PATH where an 
executable named (e.g.) vim has been installed, and also all aliases (if 
any) for vim, use (in bash or similar shell)


type -a vim

If there is more than one, the first one listed is the one which will be 
invoked when you type just vim at the shell prompt.



Best regards,
Tony.


Re: Patch 7.0.096

2006-09-10 Thread Hari Krishna Dara

On Sun, 10 Sep 2006 at 1:56pm, Bram Moolenaar wrote:


 Patch 7.0.096
 Problem:taglist() returns the filename relative to the tags file, while
   the directory of the tags file is unknown. (Hari Krishna Dara)
 Solution:   Expand the file name. (Yegappan Lakshmanan)
 Files:src/tag.c

I applied the patch and tested that it works in my scenario, thank you.
However, I see that the name is expanded only when the tags file is not
in the current directory, which means the results can have a mixture of
both absolute and relative names (if they are coming from different tag
files in different directories). this could create some weird issues
with looking up tags in one window and opening the file in another
window and if they have differe lcd. This also means, the results can't
be cached and used later on, as the current directory could change. Is
this intentional?

One observation I made is that (on windows) the expanded path doesn't
include the drive letter unless the current directory and the directory
of the tags files are on different drives. I don't know if this is how
Vim normally behaves, but this means, they are not really absolute
paths, but relative to the current drive.

I could always explicitly do a fnamemodify() on each of the files, so it
is not a big deal, but I am wondering how efficient fnamemodify() is, if
it involves simple string manipulation or OS calls.

There was also a request from me some time back to allow a limit
argument to the taglist() function such that its response can be
improved in scenarios involving large number of matches. Is there a plan
to provide a 7.0 patch for this feature?

-- 
Thank you,
Hari



 *** ../vim-7.0.095/src/tag.c  Thu Apr 27 23:40:34 2006
 --- src/tag.c Sun Sep 10 13:42:41 2006
 ***
 *** 3787,3792 
 --- 3787,3793 
   {
   int num_matches, i, ret;
   char_u  **matches, *p;
 + char_u  *full_fname;
   dict_T  *dict;
   tagptrs_T   tp;
   longis_static;
 ***
 *** 3809,3823 
   if (list_append_dict(list, dict) == FAIL)
   ret = FAIL;

   if (add_tag_field(dict, name, tp.tagname, tp.tagname_end) == FAIL
 ! || add_tag_field(dict, filename, tp.fname,
 !  tp.fname_end) == FAIL
   || add_tag_field(dict, cmd, tp.command,
  tp.command_end) == FAIL
   || add_tag_field(dict, kind, tp.tagkind,
 tp.tagkind_end) == FAIL
   || dict_add_nr_str(dict, static, is_static, NULL) == FAIL)
   ret = FAIL;

   if (tp.command_end != NULL)
   {
 --- 3810,3827 
   if (list_append_dict(list, dict) == FAIL)
   ret = FAIL;

 + full_fname = tag_full_fname(tp);
   if (add_tag_field(dict, name, tp.tagname, tp.tagname_end) == FAIL
 ! || add_tag_field(dict, filename, full_fname,
 !  NULL) == FAIL
   || add_tag_field(dict, cmd, tp.command,
  tp.command_end) == FAIL
   || add_tag_field(dict, kind, tp.tagkind,
 tp.tagkind_end) == FAIL
   || dict_add_nr_str(dict, static, is_static, NULL) == FAIL)
   ret = FAIL;
 +
 + vim_free(full_fname);

   if (tp.command_end != NULL)
   {
 *** ../vim-7.0.095/src/version.c  Sun Sep 10 13:22:26 2006
 --- src/version.c Sun Sep 10 13:52:01 2006
 ***
 *** 668,669 
 --- 668,671 
   {   /* Add new patch number below this line */
 + /**/
 + 96,
   /**/



__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 


Re: Patch 7.0.098

2006-09-10 Thread Hari Krishna Dara

On Sun, 10 Sep 2006 at 9:07pm, Bram Moolenaar wrote:


 Patch 7.0.098
 Problem:Redirecting command output in a cmdline completion function
   doesn't work. (Hari Krishna Dara)
 Solution:   Enable redirection when redirection is started.
 Files:src/ex_docmd.c, src/ex_getln.c


The patch works great, thank you.

-- 
Thanks,
Hari


 *** ../vim-7.0.097/src/ex_docmd.c Sun Sep 10 15:50:32 2006
 --- src/ex_docmd.cSun Sep 10 20:59:46 2006
 ***
 *** 8422,8427 
 --- 8422,8436 
   else
   EMSG2(_(e_invarg2), eap-arg);
   }
 +
 + /* Make sure redirection is not off.  Can happen for cmdline completion
 +  * that indirectly invokes a command to catch its output. */
 + if (redir_fd != NULL
 + #ifdef FEAT_EVAL
 +   || redir_reg || redir_vname
 + #endif
 + )
 + redir_off = FALSE;
   }

   /*
 *** ../vim-7.0.097/src/ex_getln.c Sat Sep  2 17:58:36 2006
 --- src/ex_getln.cSun Sep 10 21:04:57 2006
 ***
 *** 324,329 
 --- 324,332 
*/
   for (;;)
   {
 + redir_off = TRUE;   /* Don't redirect the typed command.
 +Repeated, because a :redir inside
 +completion may switch it on. */
   #ifdef USE_ON_FLY_SCROLL
   dont_scroll = FALSE;/* allow scrolling here */
   #endif
 *** ../vim-7.0.097/src/version.c  Sun Sep 10 15:50:32 2006
 --- src/version.c Sun Sep 10 20:58:17 2006
 ***
 *** 668,669 
 --- 668,671 
   {   /* Add new patch number below this line */
 + /**/
 + 98,
   /**/



__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 


Re: Update on the update

2006-09-10 Thread Mark Manning

A.J.Mechelynck wrote:


Mark Manning wrote:

Ok, after downloading the current items on the web page at vim.org 
both C and Perl are working ok (in both Windows and Cygwin/Linux).  
Basic still has the problems from before.  Thanks to everyone for 
speaking up.  :-)


To Tony:  Thanks for the diff command.  I'll see about posting it but 
not until after Bram has said it is ok.  :-)


I also see that the web page version of 7.0 is very out-of-date (If I 
put in echo version it comes back as 700.  Even the 7.0.17 version 
comes back as 700 (which turns out to have been installed into 
/usr/bin instead of /usr/local/bin)).  Ok.  Now all I have to do is 
to rsync the Cygwin version and CVS the Windows one so they are both 
up-to-date.  A few more minutes work.  :-)





1. Next time, please use a more explicit Subject: line, and, if you 
continue a single conversation, use Reply to all rather than Write 
new mail. It makes a difference on mail clients which, like mine, can 
group posts by thread.


2. version will be 700 on all patchlevels of 7.0. To see the highest 
patch number included, see :intro, and to see them all, look at the 
first four lines of the output of :version. If the latter doesn't 
say Included patches: then you have an unpatched version. The latest 
patchlevel of 7.0 is currently 99; any new patches will be published 
by Bram in the vim-dev list. To test (in a script) whether 
such-and-such a patch was included, see :help has-patch.


3. Programs which come bundled with a Linux distribution will usually 
be installed in /usr/bin unless there's a reason to put them some 
other place (such as /usr/X11R6/bin or /opt/kde3/bin). /usr/local/bin 
intentionally comes ahead of all those places in the $PATH, so 
additional software added by the user will take precedence if the 
program name is the same. To see all the places in your $PATH where an 
executable named (e.g.) vim has been installed, and also all aliases 
(if any) for vim, use (in bash or similar shell)


type -a vim

If there is more than one, the first one listed is the one which will 
be invoked when you type just vim at the shell prompt.



Best regards,
Tony.

1. Well, I didn't want to get an additional reply like you pointed out 
in the previous message that might have been the reason for the 
duplicate messages from everyone.  So I guess you get one or the other.  
(ie: Duplicate messages or different subject line.)


2. Already knew this because someone else had already posted it.  Sorry 
if #1 caused you to reply to an already replied to message.


3. Yeah, I know.  :-)

Thanks though for replying.  Not trying to be rude or anything like 
that.  I really DO like to get a reply and there is always a chance that 
something I had no idea about would be said.  Like the rsync'ing.  I 
usually just ftp everything down when I'm updating.  Never thought about 
using rsync before.  :-)  So thanks for that again.  :-)


Mark



Re: Vimdiff Oddity

2006-09-10 Thread Bill McCarthy
On Fri 8-Sep-06 4:11pm -0600, Bram Moolenaar wrote:

 Bill McCarthy wrote:

 To better understand what vimdiff is doing (and why it is so
 slow), I had my shell (4NT under WinXP) keep a log showing
 me just what was requested. [Note: I use '!' instead of ''
 for redirection because my 4NT is set to not overwrite
 existing files unless explicitly told to do so.]
 
 Invoking vimdiff with:  gvim -d file1 file2
 
 I can see that the following 3 shell requests are made:
 
 diff -a VIo2A3F.tmp VIn2A40.tmp !VId2A41.tmp
 diff -a --binary VIo2A3F.tmp VIn2A40.tmp !VId2A41.tmp
 diff -a --binary VIo2A3F.tmp VIn2A40.tmp !VId2A41.tmp
 
 The log shows about 4 seconds between commands.
 
 I would have thought that the first diff would provide
 enough information.  What is the purpose of the other two?

 Vim first tests to see if executing diff works, with the -a and --binary
 arguments.  Finally it does the actual diff.

 This should take a fraction of a second.  4 seconds indicates that there
 is something wrong in your setup.  Perhaps caused by 4NT. Try using
 another shell.

Thank you for your comments.  I had added using Windows
volatile environment variables supported by 4nt.  The
author (Rex Conn of JPSoft) simply uses an API call to
implement these.  They are deadly slow and account for
nearly all of the time delay.

4nt, without that baggage, is still a fraction of a second
slower that cmd (which itself is about the same startup
speed of sh or zsh).

I am curious about the necessity of those 3 shell calls to
do a diff - maybe I'll spend a little time with diff.c next
weekend :-)

-- 
Best regards,
Bill