Adjusted list of features to vote on

2007-03-15 Thread Bram Moolenaar

Greetings, Vim users!

Vim sponsors and registered Vim users can vote for features.  The result
can be seen here: http://www.vim.org/sponsor/vote_results.php

Vim 7.0 has added a number of features that still appeared in the voting
list.  I have now updated the list to reflect the Vim 7.0 features.

Removed features:
- add tabbed windows
- add undo tree (be able to go back to any previous situation)
- add a :grep command that does not use an external command
- add option to highlight the screen line (and column) of the cursor

Changed features:
- add intelligent completion
  - add more and better omni completion plugins
- add more features to Vim scripting (arrays, lists, sorting, etc.)
  - add more features to Vim scripting
- add more autocommand events (for :cd, start Insert mode, etc.)
  - add more autocommand events (for :cd, jump to tag, etc.)
- add on-the-fly spell checking
  - improve on-the-fly spell checking


If you voted for one of these, please go to the voting pages and adjust
your votes: http://www.vim.org/sponsor/vote.php  You need to login.

Happy Vimming!

-- 
Have you heard about the new Barbie doll?  It's called Divorce
Barbie.  It comes with all of Ken's stuff.

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


Google Summer of Code 2007 : Improve regexp performance

2007-03-15 Thread Asiri Rathnayake
Hi all,

I went through the above idea presented for google summer of code 2007
and found it interesting. In my opinion, incorporating Thompson NFA into
regexp from the ground up is pretty cool. I also went through the
alternate TRE (http://laurikari.net/tre/index.html) but couldn't verify
whether its an implementation of Thompson NFA ( I will have to dig into
it's source and find it out ). I would like to know further details (if
any) regarding this project and the possible mentor(s).

- Asiri



Re: Google Summer of Code 2007 : Improve regexp performance

2007-03-15 Thread Bram Moolenaar

Asiri Rathnayake wrote:

 I went through the above idea presented for google summer of code 2007
 and found it interesting. In my opinion, incorporating Thompson NFA into
 regexp from the ground up is pretty cool. I also went through the
 alternate TRE (http://laurikari.net/tre/index.html) but couldn't verify
 whether its an implementation of Thompson NFA ( I will have to dig into
 it's source and find it out ). I would like to know further details (if
 any) regarding this project and the possible mentor(s).

I'll be the mentor.  Russ Cox may provide background info for the regexp
theories.

There are no more details to be mentioned.  You can also look at the
current regexp code in Vim, of course.

I'll do an announcement soon.  The shell server is down again, can't
change the web page right now :-(.

-- 
ARTHUR:  Well, I can't just call you `Man'.
DENNIS:  Well, you could say `Dennis'.
ARTHUR:  Well, I didn't know you were called `Dennis.'
DENNIS:  Well, you didn't bother to find out, did you?
  The Quest for the Holy Grail (Monty Python)

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


Re: google summer of code

2007-03-15 Thread Bram Moolenaar

Josh wrote:

 I am interested in creating a kde or other window manager interface
 for vim, adding debugger support or fixing bugs for google summer of
 code.  Are there any details that I need to know before I submit my
 applications?

Read the FAQ and the page on accepting student applications.  Links
are on http://code.google.com/soc/

I don't know how Google decides what applications to accept, thus I
can't give hints for how to write an application.

-- 
A computer programmer is a device for turning requirements into
undocumented features.  It runs on cola, pizza and Dilbert cartoons.
Bram Moolenaar

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


patch 7.0.218

2007-03-15 Thread Bram Moolenaar

Patch 7.0.218
Problem:%B in 'statusline' always shows zero in Insert mode. (DervishD)
Solution:   Remove the exception for Insert mode, check the column for being
valid instead.
Files:  src/buffer.c


*** ../vim-7.0.217/src/buffer.c Tue Mar  6 20:27:03 2007
--- src/buffer.cThu Mar 15 22:50:54 2007
***
*** 3710,3716 
case STL_BYTEVAL_X:
base = 'X';
case STL_BYTEVAL:
!   if (((State  INSERT)  wp == curwin) || empty_line)
num = 0;
else
{
--- 3710,3716 
case STL_BYTEVAL_X:
base = 'X';
case STL_BYTEVAL:
!   if (wp-w_cursor.col  STRLEN(linecont))
num = 0;
else
{
*** ../vim-7.0.217/src/version.cThu Mar 15 21:38:30 2007
--- src/version.c   Thu Mar 15 22:54:05 2007
***
*** 668,669 
--- 668,671 
  {   /* Add new patch number below this line */
+ /**/
+ 218,
  /**/

-- 
Vim is like Emacs without all the typing.  (John Johann Spetz)

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


Case-sensitive :e globbing under cygwin?

2007-03-15 Thread John Wiersba
This appears to be a bug to me, but I want to check before filing a bug report. 
 I was unable to get any clarification on the vim mailing list.

Under cygwin, :e file* will match in a case-insensitive manner.  I believe this 
is wrong, since cygwin is emulating unix which is case-sensitive.  Other tools, 
like bash, default to case-sensitive globbing.  There is a bash option 
nocaseglob which allows bash to behave in a case-insensitive manner, but the 
default is unix-like.

I believe vim under cygwin used to do case-sensitve filename globbing, but
now it's doing it case-insensitively and I'd like to get it to revert
to the old behavior.

So, if there is a way to turn on/off case-sensitivity for :e file* globbing, 
then I would be happy to use it.  If this is a build-time bug in the way vim is 
being built under cygwin, I can correspond with the cygwin maintainers to get 
it fixed.  But, if neither of these apply, I will file a bug report/enhancement 
request for 1) adding an option to toggle case-sensitivity (a feature 
enhancement) and 2) making the default on cygwin be case-sensitive (a bug fix).

Thanks much!
-- John Wiersba




 

Sucker-punch spam with award-winning protection. 
Try the free Yahoo! Mail Beta.
http://advision.webevents.yahoo.com/mailbeta/features_spam.html


Re: Case-sensitive :e globbing under cygwin?

2007-03-15 Thread A.J.Mechelynck

John Wiersba wrote:

This appears to be a bug to me, but I want to check before filing a bug report. 
 I was unable to get any clarification on the vim mailing list.

Under cygwin, :e file* will match in a case-insensitive manner.  I believe this is wrong, 
since cygwin is emulating unix which is case-sensitive.  Other tools, like bash, default 
to case-sensitive globbing.  There is a bash option nocaseglob which allows 
bash to behave in a case-insensitive manner, but the default is unix-like.

I believe vim under cygwin used to do case-sensitve filename globbing, but
now it's doing it case-insensitively and I'd like to get it to revert
to the old behavior.

So, if there is a way to turn on/off case-sensitivity for :e file* globbing, 
then I would be happy to use it.  If this is a build-time bug in the way vim is 
being built under cygwin, I can correspond with the cygwin maintainers to get 
it fixed.  But, if neither of these apply, I will file a bug report/enhancement 
request for 1) adding an option to toggle case-sensitivity (a feature 
enhancement) and 2) making the default on cygwin be case-sensitive (a bug fix).

Thanks much!
-- John Wiersba


Is your cygwin bash set to case-sensitive globbing? If it isn't, set it in 
your bash startup scripts (including whatever is sourced when starting 
non-interactive shells), then check if the Vim problem is still there.


Best regards,
Tony.
--
If all the world's a stage, I want to operate the trap door.
-- Paul Beatty



Re: google summer of code

2007-03-15 Thread Mikolaj Machowski
Dnia czwartek 15 marzec 2007, Josh napisał:
 I am interested in creating a kde or other window manager interface
 for vim, 

While I'd like to see kvim resurrection with complete KDE integration 
it is pointless at the moment: KDE3 is near its end, KDE4 isn't ready
yet for serious coding.

However: Qt4 GUI interface with the same GUI code for all major platforms
(Linux, Windows, MOX, and several others), would be great thing.

m.




Re: Google Summer of Code 2007 : Improve regexp performance

2007-03-15 Thread Nikolai Weibull

On 3/15/07, Asiri Rathnayake [EMAIL PROTECTED] wrote:

Hi all,

I went through the above idea presented for google summer of code 2007
and found it interesting. In my opinion, incorporating Thompson NFA into
regexp from the ground up is pretty cool. I also went through the
alternate TRE (http://laurikari.net/tre/index.html) but couldn't verify
whether its an implementation of Thompson NFA ( I will have to dig into
it's source and find it out ). I would like to know further details (if
any) regarding this project and the possible mentor(s).


It has its own finite automata, which is based on a Thompson NFA,
adding so called /tags/ in the mix for doing subgroup matching and
fuzzy matching.

It comes with three matchers/drivers: A backtracking one for when the
pattern requires it (backrefences), a multithreaded/parallel one, that
is, the standard two tables of active states one, and one for fuzzy
matching (approximate matching).

There's a nice paper about it as well (too actually, if you count the
first one he wrote about his first implementation for .

I actually wrote a simplification of his library, removing the
approximate matching stuff, as part of my master's, which is well
documented.  I still haven't had time to put up the PDF, though.

Sadly, both his and my implementation suffer from a bug in the
subgroup matching of opposing repetitions, which would have to be
fixed.  Neither of us have been able to do so yet.

Anyway, it would take an immense amount of work to turn Vim onto a new
regex implementation.  Vim has a whole range of its own stuff, like
matching cursor positions and so on, and is tightly bound to the
buffer implementation with its memlines and whatnot.  Not to
dishearten you, but I don't think this is a project that can be
completed over a summer (not that it has to be, but you may want to
keep that in mind).

Also, there's a TDFA (tagged, deterministic finite automaton)
implementation written in Haskell

http://www.mail-archive.com/glasgow-haskell-users@haskell.org/msg11442.html

Quite cool.

 nikolai


Re: google summer of code

2007-03-15 Thread A.J.Mechelynck

Josh wrote:

I am interested in creating a kde or other window manager interface
for vim, adding debugger support or fixing bugs for google summer of
code.  Are there any details that I need to know before I submit my
applications?



It may be obvious, but obvious things have a way of getting overlooked:

- When compiled with GNOME support, Vim already does some interfacing with the 
window manager, including the kde window manager. For instance, if Vim is 
running when you close the kde wm, it will be reopened with the same settings 
and editfiles when you restart kde.


- There used to be a specific version of Vim with kde GUI (called kvim) but 
the kde guys dropped support for it at some point between releases 6.2 and 6.3 
of Vim. It is now completely obsolete.


See
:help GNOME
:help gnome-session


Best regards,
Tony.
--
The conservation movement is a breeding ground of Communists and other
subversives.  We intend to clean them out, even if it means rounding up
every bird watcher in the country.
-- John Mitchell, Atty. General 1969-1972


Re: Case-sensitive :e globbing under cygwin?

2007-03-15 Thread John Wiersba
Thanks, Tony, for your reply.

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).

Is there an easy way to debug this from within vim?  I see what appear to be 
various debugging commands in the source code.  Is it easy to enable them and 
see their output somewhere?  

Is there anything else you can think of to solve this?

-- John

- Original Message 
From: A.J.Mechelynck [EMAIL PROTECTED]

Is your cygwin bash set to case-sensitive globbing? If it isn't, set it in 
your bash startup scripts (including whatever is sourced when starting 
non-interactive shells), then check if the Vim problem is still there.

Best regards,
Tony.







 

Bored stiff? Loosen up... 
Download and play hundreds of games for free on Yahoo! Games.
http://games.yahoo.com/games/front


Re: Google Summer of Code 2007 : Improve regexp performance

2007-03-15 Thread Mikolaj Machowski
Dnia piątek 16 marzec 2007, Asiri Rathnayake napisał:

 A multithreaded matcher might be useful to vim but do we have a need for
 fuzzy matching ?

For main regexp engine I think not. But it could be useful for command
line completions (think zsh).

m.



Search and replace

2007-03-15 Thread Tien Pham

Hi all

I have a pattern for search and replace but I couldn't figure out how to 
do it correctly. I suppose my problem is so simple for many people, but 
it's not to me. Thus, help is very much appreciated.



Existing pattern:
!(All,r,ROW=gas)!(All,c,COL)
!(All,r,ROW=water)!(All,c,COL)
!(All,r,ROW=building)!(All,c,COL)


What I need now is:
(All,r,ROW)!(All,c,COL=gas)!
(All,r,ROW)!(All,c,COL=water)!
(All,r,ROW)!(All,c,COL=building)!

Again, your help is greatly appreciated.
tien



create a fill-in macro.

2007-03-15 Thread Eric Leenman

Hi,

Is it possible to create a fill-in macro in VIM?
For example:
Can you create and activate a macro that goes like this:
[Activate macro]
First-Name: [first fill-in place] Last-Name: [second fill in place] CR
Country: [third fill-in place]
[Macro ended]
So that when you fill this in you get in insert-mode this as plain text:

First-Name: Eric Last-Name: Leenman
Country: Holland

Rgds,

Eric

_
The average US Credit Score is 675. The cost to see yours: $0 by Experian. 
http://www.freecreditreport.com/pm/default.aspx?sc=660600bcd=EMAILFOOTERAVERAGE




Get date and filename as plain text

2007-03-15 Thread Eric Leenman

Hi,

Is it possible to make an inoremap that inserts the date as text and the 
filename as text?


For example:

inoremap @date   {insert_date_as_text()}
inoremap @filename   {insert_filename_as_text()}


Rgds,
Eric

_
Get a FREE Web site, company branded e-mail and more from Microsoft Office 
Live! http://clk.atdmt.com/MRT/go/mcrssaub0050001411mrt/direct/01/




Re: Search and replace

2007-03-15 Thread François Ingelrest

I'm not an expert with this, but this should work with your example:

%s/!(\(.*\)=\(.*\))!(\(.*\))/(\1)!(\3=\2)!

On 3/15/07, Tien Pham [EMAIL PROTECTED] wrote:

Hi all

I have a pattern for search and replace but I couldn't figure out how to
do it correctly. I suppose my problem is so simple for many people, but
it's not to me. Thus, help is very much appreciated.


Existing pattern:
!(All,r,ROW=gas)!(All,c,COL)
!(All,r,ROW=water)!(All,c,COL)
!(All,r,ROW=building)!(All,c,COL)


What I need now is:
(All,r,ROW)!(All,c,COL=gas)!
(All,r,ROW)!(All,c,COL=water)!
(All,r,ROW)!(All,c,COL=building)!

Again, your help is greatly appreciated.
tien


Re: create a fill-in macro.

2007-03-15 Thread Thomas

Can you create and activate a macro that goes like this:
[Activate macro]
First-Name: [first fill-in place] Last-Name: [second fill in place] CR
Country: [third fill-in place]
[Macro ended]
So that when you fill this in you get in insert-mode this as plain text:

First-Name: Eric Last-Name: Leenman
Country: Holland


There are some plugins that do this:

http://www.vim.org/scripts/script_search_results.php?keywords=skeleton
http://www.vim.org/scripts/script_search_results.php?keywords=template

Regards,
Thomas.



problem of ftplugin lua.vim

2007-03-15 Thread Xi Juanjie
Perhaps it's a bug of lua.vim. In line 19, it says 'setlocal 
cms=--%s', but cms option couldn't be lead with a '' or it will be 
null. I simply remove the two '' in this line. Is it OK?


Thanks.

Xi Juanjie


Re: Get date and filename as plain text

2007-03-15 Thread Wolfgang Schmidt

   Hi,

I don't know about the filename part, but you could insert a date with 
the following mapping:


inoremap @date C-R=strftime(%d.%m.%Y)CR

Cheers,

   Wolfgang

Eric Leenman wrote:

Hi,

Is it possible to make an inoremap that inserts the date as text and 
the filename as text?


For example:

inoremap @date   {insert_date_as_text()}
inoremap @filename   {insert_filename_as_text()}


Rgds,
Eric

_
Get a FREE Web site, company branded e-mail and more from Microsoft 
Office Live! http://clk.atdmt.com/MRT/go/mcrssaub0050001411mrt/direct/01/




Re: Get date and filename as plain text

2007-03-15 Thread Andy Wokula

Wolfgang Schmidt schrieb:

   Hi,

I don't know about the filename part, but you could insert a date with 
the following mapping:


inoremap @date C-R=strftime(%d.%m.%Y)CR

Cheers,

   Wolfgang

Eric Leenman wrote:

Hi,

Is it possible to make an inoremap that inserts the date as text and 
the filename as text?


For example:

inoremap @date   {insert_date_as_text()}
inoremap @filename   {insert_filename_as_text()}


Rgds,
Eric


 including path
:inoremap @filename C-R=expand(%:p)CR
 without path:
:inoremap @filename C-R=expand(%:t)CR

:h i_CTRL-R
:h filename-modifiers
:h expand()

If there is still no filename, nothing is inserted.

Andy

--
EOM





___ 
Der frühe Vogel fängt den Wurm. Hier gelangen Sie zum neuen Yahoo! Mail: http://mail.yahoo.de


Re: complete=custom for path including spaces

2007-03-15 Thread Raphael Bauduin

On 3/15/07, Bram Moolenaar [EMAIL PROTECTED] wrote:


Raphael Bauduin wrote:

 I'm writing a command with a custom completion, and it works fine,
 except when there's a space in the path to complete.

 For example, without spaces everything works:
:Radiant edit pages/hotab
 will complete to
:Radiant edit pages/home/
 which I can further complete:
:Radiant edit pages/home/fitab
 to
:Radiant edit pages/home/first-post/

 If there's a space, it doesn't work:
:Radiant edit pages/Ho
 is completed to
:Radiant edit pages/Home\ Page/
 But now, this
:Radiant edit pages/Home\ Page/Atab
 doesn't complete it, although my completion function returns what is
 expected as completion:
pages/Home\ Page/About
pages/Home\ Page/Articles

 What am I missing here?

Did you try returning the matches without the backslash?


I'm 99% sure I tried it, but your question is seeding doubts :-)



You can also try using customlist, then Vim will not filter the
results.  The backslash may confuse the filtering.


I did that indeed (but from further tests, the following approach
should also work when using custom in place of customlist), and only
return the part after the last space.  Eg, when completing
:Radiant pages/Home Page/Atab

the returned list is

[Page/About,Page/Articles]


I'll post a notice  when I get a satisfying result.

Cheers

Raph

--
Web database: http://www.myowndb.com
Free Software Developers Meeting: http://www.fosdem.org


Find non - ASCII characters

2007-03-15 Thread Lionel Flandin

Hi everyone,

I'm using vim to edit (La)TeX files.
Some non-ASCII characters from wild copy/paste give problems at the 
compilation (like the character   - ' - ) and it takes for ever to 
identify them.

I'm sure there is a vim command to smoke them out ?

Thx in advance,

Regards,

Lionel



Re: Find non - ASCII characters

2007-03-15 Thread Tim Chase
 I'm using vim to edit (La)TeX files.
 Some non-ASCII characters from wild copy/paste give problems at the 
 compilation (like the character   - ' - ) and it takes for ever to 
 identify them.
 I'm sure there is a vim command to smoke them out ?

I'm not sure you've clearly defined non-ASCII characters (as it
looks like the character you point out is ASCII 0x27, but I might
be missing something), but if you mean things over 0x7f then you
can do something like

:%s/[^ -\x7f]//g

to remove them.  I don't know if you want to replace them with
something smarter, as that may be more desired.

Or, if you just want to find them, you can use

/[\x80-\xff]

This just uses the standard set-of-characters notation described at

:help /[

though it does require that the 'l' flag is included in
'cpoptions' (text from the above help) to get the \xNN notation.

Instead of the ranges given above (or in addition), there are
some posix character classes, so you can do things like

/[^[:print:]]

or

/[[:cntrl:]]

to find classes of offenders.

Hope this helps,

-tim






Re: gvim hangs when _vimrc loaded and with syntax on

2007-03-15 Thread marc
Greg Dunn said...
  The symptoms are that when I load _vimrc into a buffer, and _vimrc
  contains
 
syntax on
 
 Does this thread help:
 
 http://tech.groups.yahoo.com/group/vim/message/76286
 
 Essentially, vim is finding an incompatible tcl84.dll in your path
 (probably from cygwin, if you have that installed).  Assuming you
 don't need tcl support, putting an empty file named tcl84.dll earlier
 in the path should fix things up.

Remarkable! Thanks a lot.

So, do you know why there is a check for tcl? And why does it only bomb 
on _vimrc?

Btw, I upgraded to the latest, 7.0.215, and the problem persists.

Thanks again.

-- 
Cheers,
Marc



Re: gvim hangs when _vimrc loaded and with syntax on

2007-03-15 Thread marc
A.J.Mechelynck said...
 marc wrote:

 Here are a few ideas. Nothing precise yet, just a few hints.

Thanks for the assist, Tony, but Greg hit the nail on the head.
 
-- 
Cheers,
Marc



How to display a omni-comletion menu from a vim script function?

2007-03-15 Thread Thomas

Hi,

I would like to use the new vim7 drop-down menu that is used with the 
new omni-completion from a vim script in order to let the user select an 
item from a list.


I figured I could temporarily set omnifunc and use this to build the 
list. But I wasn't able to find a way to trigger the display of the menu 
from within a vim script.


Does somebody have an idea of how to display the menu?

Say, we have:

fun! MyComplete(findstart, base)
...
endf

fun! DoSomething()
let omnifunc = omnifunc
let omnifunc = 'MyComplete'
try
+++DISPLAY MENU+++
return 0
finally
let omnifunc = omnifunc
endtry
endf

How would the DISPLAY MENU part look like?

Regards,
Thomas.



Re: gvim hangs when _vimrc loaded and with syntax on

2007-03-15 Thread A.J.Mechelynck

zzapper wrote:

marc [EMAIL PROTECTED] wrote in news:MPG.20633b8518c74016989a91
@news.gmane.org:



Thanks for the assist, Tony, but Greg hit the nail on the head.
 


Hi
problem you cannot edit any file *.vim
I originated the thread that Greg responded to, but had since forgotten the 
solution (one of them anyway)


In the directory containing gvim.exe create a dummy file tcl84.dll

touch tcl84.dll

or 

gvim tcl84.dll 



This will completely disable the TCL interface, won't it?


Best regards,
Tony.
--
Conscience is what hurts when everything else feels so good.


Re: register quoteplus - addition

2007-03-15 Thread A.J.Mechelynck

[EMAIL PROTECTED] wrote:

In addition to my posting yesterday, i want to add:
- I`m working under kde and gnome (the actually
versions in the distribution opensuse 10.2; I`m now
not at home, therefore can`t say the number).
- If I do a selection in vim with the mouse, I can
past it, i. e., in an web browser. But I activate
linenumbers in vim an the selection via mouse includes
the numbers - and the pasting too. That`s awful.
- If I do a selection via the keybord (my normal way)
with shift-v and cursor up/down, I get the really
text without the linenumbers; but I cannot put the
selection in the quoteplus-register with
shift-+y.
Under SuSE 10.1 all works. But I not remember, how I
compiled vom that time.
Anynoe knows, where`s the reason?
Thanks,
 
Dada


I'm using openSUSE 10.2 too, with kde 3.3.5 release 45.2 and I don't have 
any problems with +. I compile Vim according to what is described at 
http://users.skynet.be/antoine.mechelynck/vim/compunix.htm.


My options are set so, that when selecting with the mouse (which I don't 
usually do) I end up in Select mode. Esc gv brings me back to (standard) 
Visual mode, and +y yanks the text without the linenumbers from the 'number' 
option, as can be seen (e.g.) by Ctrl-V or Edit = Paste in Thunderbird (my 
mail client).


Normally I too use the keyboard to select. After V (uppercase, i.e., shift-v) 
followed by cursor up/down movements I'm in linewise visual mode; again, +y 
allows me to paste (full lines without line numbers) in Thunderbird.


Do you have the flags a and/or A in 'guioptions', what is your 'clipboard' 
option set to? Mine is empty, and I have guioptions=gimrLTt -- my vimrc includes


if exists(+clipboard)
set clipboard=
endif
if exists(+guioptions)
set go-=a go-=e go+=t
endif


See
:help modeless-selection
:help modeless-and-clipboard


Best regards,
Tony.
--
RULES OF EATING -- THE BRONX DIETER'S CREED
(1)  Never eat on an empty stomach.
(2)  Never leave the table hungry.
(3)  When traveling, never leave a country hungry.
(4)  Enjoy your food.
(5)  Enjoy your companion's food.
(6)  Really taste your food.  It may take several portions to
 accomplish this, especially if subtly seasoned.
(7)  Really feel your food.  Texture is important.  Compare,
 for example, the texture of a turnip to that of a
 brownie.  Which feels better against your cheeks?
(8)  Never eat between snacks, unless it's a meal.
(9)  Don't feel you must finish everything on your plate.  You
 can always eat it later.
(10) Avoid any wine with a childproof cap.
(11) Avoid blue food.
-- Richard Smit, The Bronx Diet


Netrw go up dir command

2007-03-15 Thread Brian Neal

Hi -

I just downloaded the non-Cream pre-built Vim for Windows (version
7.0.215). The go up command (-) in the Netrw plugin no longer seems
to work. Neither the - command or putting the cursor over the ../ and
hitting return does anything anymore. Any ideas? Thanks.


Re: How to display a omni-comletion menu from a vim script function?

2007-03-15 Thread Karl Guertin

On 3/15/07, Thomas [EMAIL PROTECTED] wrote:

Does somebody have an idea of how to display the menu?


I've been meaning to get around to doing this myself but haven't done
it. There's an example under :help complete-functions


Re: How to display a omni-comletion menu from a vim script function?

2007-03-15 Thread Karl Guertin

On 3/15/07, Thomas [EMAIL PROTECTED] wrote:

Does somebody have an idea of how to display the menu?


I've been meaning to get around to doing this myself but haven't done
it. There's an example under :help complete-functions


Re: gvim hangs when _vimrc loaded and with syntax on

2007-03-15 Thread marc
zzapper said...
 A.J.Mechelynck [EMAIL PROTECTED] wrote in
 news:[EMAIL PROTECTED]: 
 
  zzapper wrote:
  the solution (one of them anyway)
  
  In the directory containing gvim.exe create a dummy file tcl84.dll
  
  touch tcl84.dll
  
  
  This will completely disable the TCL interface, won't it?
  
  Tony.
 spose so (sorry dont use it)
 
 or
 emergency solution disable syntax/vim.vim
 
 mv vim.vim vim.dis
 
 I used to have a patch for vim.vim
 
 before line if trytcl in vim.vim
 let trytcl= 0

Looking at the code, it seems like an attempt has been made to fix it, 
but it doesn't work here.

   [-- tcl --] {{{3
  if has(win32) || has(win95) || has(win64) || has(win16)
apparently has(tcl) has been hanging vim on some windows systems
with cygwin
  let trytcl= (shell !~ '\%(\bash\\|\zsh\\)\%(\.exe\)\=$') ||   
g:vimembedscript
  else
let trytcl= 1
  endif
  if trytcl

-- 
Cheers,
Marc



Removing tilde characters in front of non-existing lines?

2007-03-15 Thread François Ingelrest

Hello all,

I'm displaying the line number in front of each line, so the tilde
characters in front of non-existing lines are useless for me. Is there
a way to not display them?


Re: Removing tilde characters in front of non-existing lines?

2007-03-15 Thread Tim Chase

I'm displaying the line number in front of each line, so the
tilde characters in front of non-existing lines are useless
for me. Is there a way to not display them?



While I don't think there's a way to turn them off completely, 
you can set them to be the same color as the background color 
with something like


:hi NonText ctermfg=black guifg=black

(assuming your default background color is black)

It does have side-effects, as it changes all nontext, so that 
includes the tildes, but also includes the 'showbreak' characters 
and the continuation @ characters, as detailed at


:help hl-NonText

Hope this helps,

-tim







Re: Removing tilde characters in front of non-existing lines?

2007-03-15 Thread Richard van der Leeden


François Ingelrest-2 wrote:
 
 Hello all,
 
 I'm displaying the line number in front of each line, so the tilde
 characters in front of non-existing lines are useless for me. Is there
 a way to not display them?
 
 

You can change the colour of 'nontext' items (see :help nontext) to be the
same as the background colour - e.g if your background is black do:

:hi NonText cterm=NONE ctermbg=black ctermfg=black gui=NONE guibg=black
guifg=black

-- 
View this message in context: 
http://www.nabble.com/Removing-tilde-characters-in-front-of-non-existing-lines--tf3409626.html#a9499387
Sent from the Vim - General mailing list archive at Nabble.com.



Re: Removing tilde characters in front of non-existing lines?

2007-03-15 Thread Michael Brailsford
Or the more general solution which will work for any bg/fg combination:

:hi nontext ctermfg=bg guifg=bg cterm=NONE gui=NONE

- Original Message 
From: Richard van der Leeden [EMAIL PROTECTED]
To: vim@vim.org
Sent: Thursday, March 15, 2007 12:27:41 PM
Subject: Re: Removing tilde characters in front of non-existing lines?



François Ingelrest-2 wrote:
 
 Hello all,
 
 I'm displaying the line number in front of each line, so the tilde
 characters in front of non-existing lines are useless for me. Is there
 a way to not display them?
 
 

You can change the colour of 'nontext' items (see :help nontext) to be the
same as the background colour - e.g if your background is black do:

:hi NonText cterm=NONE ctermbg=black ctermfg=black gui=NONE guibg=black
guifg=black

-- 
View this message in context: 
http://www.nabble.com/Removing-tilde-characters-in-front-of-non-existing-lines--tf3409626.html#a9499387
Sent from the Vim - General mailing list archive at Nabble.com.






Re: Removing tilde characters in front of non-existing lines?

2007-03-15 Thread François Ingelrest

Though it was obvious, I did not think about playing with the colors.
Thank you everyone!

On 3/15/07, Michael Brailsford [EMAIL PROTECTED] wrote:

Or the more general solution which will work for any bg/fg combination:

:hi nontext ctermfg=bg guifg=bg cterm=NONE gui=NONE

- Original Message 
From: Richard van der Leeden [EMAIL PROTECTED]
To: vim@vim.org
Sent: Thursday, March 15, 2007 12:27:41 PM
Subject: Re: Removing tilde characters in front of non-existing lines?



François Ingelrest-2 wrote:

 Hello all,

 I'm displaying the line number in front of each line, so the tilde
 characters in front of non-existing lines are useless for me. Is there
 a way to not display them?



You can change the colour of 'nontext' items (see :help nontext) to be the
same as the background colour - e.g if your background is black do:

:hi NonText cterm=NONE ctermbg=black ctermfg=black gui=NONE guibg=black
guifg=black

--
View this message in context: 
http://www.nabble.com/Removing-tilde-characters-in-front-of-non-existing-lines--tf3409626.html#a9499387
Sent from the Vim - General mailing list archive at Nabble.com.


Re: How to convert all the buffers into tab

2007-03-15 Thread Dimitar
* lin q [EMAIL PROTECTED] [070315 19:50]:
 Hi,
  I usually have such problem: in VIM7 i have many files opened in old way, 
 meaning they are in buffers, now I want 
 to have them opened in TAB, each tab has one buffer.
 
 Is there a simple way to do this?

Take a look at thisi, it may help:

http://www.vim.org/scripts/script.php?script_id=1639

http://www.vim.org/tips/tip.php?tip_id=1317



 
 Thanks.
 
 _
 Rates near 39yr lows!  $430K Loan for $1,399/mo - Paying Too Much? Calculate 
 new payment 
 http://www.lowermybills.com/lre/index.jsp?sourceid=lmb-9632-18226moid=7581


ctrl-P is slow when set path for ctrl-W + ctrl F

2007-03-15 Thread Peng Yu

Hi,

I'm trying to use ctrl-W + ctrl F to enter header file. To do this I
have to set path.

However, after I set path to the directory of the header files, ctrl-P
(auto-completion) getting very slow (it could take 1 sec to search for
one header file). I'm wondering if there is anything wrong with my
system. Is there any walk around?

Thanks,
Peng


Re: How to convert all the buffers into tab

2007-03-15 Thread Rick Dooling
- Original Message 
Subject: Re: How to convert all the buffers into tab

  I usually have such problem: in VIM7 
 i have many files opened in old way, meaning they are in buffers, now I want 
 to have them opened in TAB, each tab has one buffer.

I think you want:

:tab ball

rd





 

Now that's room service!  Choose from over 150,000 hotels
in 45,000 destinations on Yahoo! Travel to find your fit.
http://farechase.yahoo.com/promo-generic-14795097


Re: Removing tilde characters in front of non-existing lines?

2007-03-15 Thread A.J.Mechelynck

Richard van der Leeden wrote:


François Ingelrest-2 wrote:

Hello all,

I'm displaying the line number in front of each line, so the tilde
characters in front of non-existing lines are useless for me. Is there
a way to not display them?




You can change the colour of 'nontext' items (see :help nontext) to be the
same as the background colour - e.g if your background is black do:

:hi NonText cterm=NONE ctermbg=black ctermfg=black gui=NONE guibg=black
guifg=black



...or, to be independent of colorscheme settings:

hi clear NonText
hi link NonText Ignore
au ColorScheme * hi clear NonText | hi link NonText Ignore

This, of course, would also hide other instances of NonText highlight, such as 
some of what is displayed because of 'list' / 'listchars' settings.


Another possibility is gg^O (i.e., hit g twice, then Ctrl-O, all of them in 
Normal mode) which will adjust the display so that none (or, if the file is 
shorter than the window, as few as possible) of the tilde lines are showing.



Best regards,
Tony.
--
I have the world's largest collection of seashells.  I keep it
scattered around the beaches of the world ... Perhaps you've seen it.
-- Steven Wright


weird path string on TAB line

2007-03-15 Thread lin q

Hi,
 I am using VIM7 on cygwin on WinXP. If I use vim -p file1 file2 to open my 
files, each tab has the file name, file1 and file2. This is right.


 If I use vim --remote-tab-silent file3 to open file3, then the tab of 
file3 has some path crumpled before file3 something like, \p\E\e\J\file3, it 
looks abbreviated path, it looks ugly.


 Any way I can get rid of the path, only file name on the tab?

_
Rates near 39yr lows!  $430K Loan for $1,399/mo - Paying Too Much? Calculate 
new payment 
http://www.lowermybills.com/lre/index.jsp?sourceid=lmb-9632-18226moid=7581




Java syntax folding question

2007-03-15 Thread vr . sundar

Hi,

I using vim 7.0 on Windows XP and have just started trying to use vim
with java source files. I want to have folding enabled based on
syntax. From reading the help document, syntax highlighting is enabled
and I set the foldmethod to syntax. But when I try to close a fold
(from inside a method), I get a No fold found error message.  I
verified the syntax with set syntax and vim reported syntax=java. I
tried the same for foldmethod and got foldmethod=syntax. I also
verified that there is a java.vim under the $VIMRUNTIME\syntax.
(though when I searched in this file for fold I didn't find
anything).

Am I missing some step? If anyone can help me with this to get folding
working, that be greatly appreciated.

thanks
sundar


Re: weird path string on TAB line

2007-03-15 Thread A.J.Mechelynck

lin q wrote:

Hi,
 I am using VIM7 on cygwin on WinXP. If I use vim -p file1 file2 to open 
my files, each tab has the file name, file1 and file2. This is right.


 If I use vim --remote-tab-silent file3 to open file3, then the tab of 
file3 has some path crumpled before file3 something like, 
\p\E\e\J\file3, it looks abbreviated path, it looks ugly.


 Any way I can get rid of the path, only file name on the tab?


Yes, with a custom tabline. The following (from my vimrc) might inspire you to 
write your own:


if exists(+guioptions)
set go-=e
endif
if exists(+showtabline)
function MyTabLine()
let s = ''
let t = tabpagenr()
let i = 1
while i = tabpagenr('$')
let buflist = tabpagebuflist(i)
let winnr = tabpagewinnr(i)
let s .= '%' . i . 'T'
let s .= (i == t ? '%1*' : '%2*')
let s .= ' '
let s .= i . ':'
let s .= winnr . '/' . tabpagewinnr(i,'$')
let s .= ' %*'
let s .= (i == t ? '%#TabLineSel#' : '%#TabLine#')
let file = bufname(buflist[winnr - 1])
let file = fnamemodify(file, ':p:t')
if file == ''
let file = '[No Name]'
endif
let s .= file
let i = i + 1
endwhile
let s .= '%T%#TabLineFill#%='
let s .= (tabpagenr('$')  1 ? '%999XX' : 'X')
return s
endfunction
set stal=2
set tabline=%!MyTabLine()
map F12 :tabnextCR
map!F12 C-O:tabnextCR
map S-F12   :tabprevCR
map!S-F12   C-O:tabprevCR
endif



Best regards,
Tony.
--
Fortune's Real-Life Courtroom Quote #18:

Q:  Are you married?
A:  No, I'm divorced.
Q:  And what did your husband do before you divorced him?
A:  A lot of things I didn't know about.


Re: Java syntax folding question

2007-03-15 Thread A.J.Mechelynck

vr.sundar wrote:

Hi,

I using vim 7.0 on Windows XP and have just started trying to use vim
with java source files. I want to have folding enabled based on
syntax. From reading the help document, syntax highlighting is enabled
and I set the foldmethod to syntax. But when I try to close a fold
(from inside a method), I get a No fold found error message.  I
verified the syntax with set syntax and vim reported syntax=java. I
tried the same for foldmethod and got foldmethod=syntax. I also
verified that there is a java.vim under the $VIMRUNTIME\syntax.
(though when I searched in this file for fold I didn't find
anything).

Am I missing some step? If anyone can help me with this to get folding
working, that be greatly appreciated.

thanks
sundar



You didn't miss any step. It is just that $VIMRUNTIME/syntax/java.vim doesn't 
define any folding syntax items.



Best regards,
Tony.
--
What the large print giveth, the small print taketh away.


Re: Java syntax folding question

2007-03-15 Thread vr . sundar

Hi,

On 3/15/07, A.J.Mechelynck [EMAIL PROTECTED] wrote:

You didn't miss any step. It is just that $VIMRUNTIME/syntax/java.vim doesn't
define any folding syntax items.


Thanks for your response. Do you know if there is a newer version (or
another version) of java.vim available somewhere that does define the
folding syntax items?


Tony.


Sundar


Re: Java syntax folding question

2007-03-15 Thread A.J.Mechelynck

vr.sundar wrote:

Hi,

On 3/15/07, A.J.Mechelynck [EMAIL PROTECTED] wrote:
You didn't miss any step. It is just that $VIMRUNTIME/syntax/java.vim 
doesn't

define any folding syntax items.


Thanks for your response. Do you know if there is a newer version (or
another version) of java.vim available somewhere that does define the
folding syntax items?


Tony.


Sundar



The version in my Vim distribution is dated 2006 Apr 30. You might want to 
check the maintainer's site or contact the maintainer (see the first few lines 
of the script).


Best regards,
Tony.
--
hundred-and-one symptoms of being an internet addict:
115. You are late picking up your kid from school and try to explain
 to the teacher you were stuck in Web traffic.


Re: Java syntax folding question

2007-03-15 Thread vr . sundar

Ian,


On 3/15/07, Ian Tegebo [EMAIL PROTECTED] wrote:
snip

You might try searching vim scripts at:
http://www.vim.org/search.php

A cursory search yields a couple possibilities:
http://www.vim.org/scripts/script.php?script_id=588
http://www.vim.org/scripts/script.php?script_id=1205


Thanks for the pointer. The 1205 script looks like what I need. I
actually searched there for java syntax folding but this didn't show
up in the first few pages (cos of the rating I think). Now I tried
just searching for java.vim and it showed. I'll keep that in mind
for the next time.


Ian Tegebo


Sundar