Re: Change syntax color

2006-06-01 Thread A.J.Mechelynck

[EMAIL PROTECTED] wrote:

Hi all,

How can I change the color for the comments on a particular language
syntax highlight?


Regards,
xfedex.


I recommend to do it by writing your own colourscheme based (if you 
don't have a colourscheme yet) on the "default" colorscheme 
($VIMRUNTIME/colors/default.vim) and including a "highlight" line for 
the group in question (Comment for all languages, or else cComment, 
htmlComment, or similar). ":highlight" with no arguments will show you 
all the highlightgroups currently defined.


Give your "new" colorscheme a filename ending in .vim (let's say 
my_own_colors.vim) and place it in one of the following directories 
(directory names in "Vim" notation):


   for user-private use on Windows
  ~/vimfiles/colors


   for user-private use on Unix:
  ~/.vim/colors

   for system-wide use on any platform
  $VIM/vimfiles/colors

and invoke it by means of a ":colorscheme" statement in your vimrc, in 
the given example:


   colorscheme my_own_colors

See
   :help :colorscheme
   :help :highlight
   :view $VIMRUNTIME/colors/default.vim


It is possible to do it "more simply", e.g. by adding "highlight" lines 
to your vimrc, but IMHO the above is "safer", especially if you decide 
to use a different colorscheme someday.


Best regards,
Tony.


Goto file under cursor with line number

2006-06-01 Thread Srinivas Rao. M
Hello vimmers,
   I want to know if there is a way i can use 'gf' command to goto the
file under the cursor, which is having the 

I have a string under my cursor as :

somefile.c:1022

Where the field after ':' is the line number. Can i use the 'gf' command
to goto that line number of that file. Assume that somefile.c's folder
is added to "path" variable.


Thanks,
srini...



Change syntax color

2006-06-01 Thread xfedex

Hi all,

How can I change the color for the comments on a particular language
syntax highlight?


Regards,
xfedex.


Re: gvimrc vs vimrc

2006-06-01 Thread A.J.Mechelynck

Xiangjiang Ma wrote:



Tony,

You are right.

Now, one vimrc works on Windows and unix with mixture of version 6, 
version 7.


Based on your suggestion, I have replaced "for" loop with "while" 
loop, and it worked!



PS: script

   " for sug in s:suglist
   "   exe 'amenu 1.5.'.pri.' PopUp.'.s:changeitem.'.'.escape(sug, ' .')
   " \ . ' :call SpellReplace(' . pri . ')'
   "   let pri += 1
   " endfor

 while(j>0)
   let sug=s:suglist[j]
   exe 'amenu 1.5.'.pri.' PopUp.'.s:changeitem.'.'.escape(sug, ' .')
 \ . ' :call SpellReplace(' . pri . ')'
   let pri += 1
   let j -= 1
 endwhile

[...]

Note that Vim 6 doesn't know anything about datatypes other than Number 
(including Boolean) and String, so the above code will /parse/ OK in Vim 
6 but it won't /execute/ OK. The bracket operator has only one meaning 
in version 6:


   stringname[n]

means the (n+1)th byte of the String stringname (i.e., the result is one 
byte long). In version 7 you can also use


   listname[n]

for the (n+1)th item in the List listname (and the result can be a data 
item of any type and size).


So IIUC the whole code snippet above should be placed somewhere within 
"if version >= 700", or otherwise prevented from executing in version 6.



Best regards,
Tony.


Re: gvimrc vs vimrc

2006-06-01 Thread Xiangjiang Ma



Tony,

You are right.

Now, one vimrc works on Windows and unix with mixture of version 6, version 
7.


Based on your suggestion, I have replaced "for" loop with "while" loop, and 
it worked!



PS: script

   " for sug in s:suglist
   "   exe 'amenu 1.5.'.pri.' PopUp.'.s:changeitem.'.'.escape(sug, ' .')
   " \ . ' :call SpellReplace(' . pri . ')'
   "   let pri += 1
   " endfor

 while(j>0)
   let sug=s:suglist[j]
   exe 'amenu 1.5.'.pri.' PopUp.'.s:changeitem.'.'.escape(sug, ' .')
 \ . ' :call SpellReplace(' . pri . ')'
   let pri += 1
   let j -= 1
 endwhile





From: "A.J.Mechelynck" <[EMAIL PROTECTED]>
To: Xiangjiang Ma <[EMAIL PROTECTED]>
CC: [EMAIL PROTECTED], vim@vim.org
Subject: Re: gvimrc vs vimrc
Date: Tue, 30 May 2006 03:26:30 +0200

Xiangjiang Ma wrote:




   if has("gui_running")
  " any code here affects gvim but not console vim
   else
  " any code here affects console vim but not gvim
   endif



One problem I found is that console vim (using cygwin) will complain if I 
have "for" statement inside anywhere in vimrc, as (taken from sample spell 
script)


   for sug in s:suglist
 exe 'amenu 1.5.'.pri.' PopUp.'.s:changeitem.'.'.escape(sug, ' 
.')

   \ . ' :call SpellReplace(' . pri . ')'
 let pri += 1
   endfor




It's not because it's console Vim, it is (I think) because your console Vim 
is an earlier version (the :for construct is new in Vim 7). In some cases 
you can replace a ":for" loop by a ":while" loop; in others you have to 
bracket version-7-only code by means of ":if version >= 700" ... "endif". 
IIUC, version-6 Vim sometimes even mistakes "endfor" with "endfunction" 
which is IMHO a bug but unlikely to be fixed in version 6. In such cases it 
may take some fancy footwork to make sure that Vim executables of version 6 
(or earlier) will never even source the for...endfor construct. Unless of 
course you make sure to use only verson 7 (or later): for instance, by 
starting a script (or even your vimrc) with


   if version < 700
  echoerr "Please use Vim version 7 or higher"
  finish
   endif


Best regards,
Tony.





tabline-menu

2006-06-01 Thread Steve Hall

Is there a way to edit/turn off :tabline-menu?


-- 
Steve Hall  [ digitect mindspring com ]
:: Cream... something good to put in your Vim!
::   http://cream.sourceforge.net




Re: Reassigning F keys in eVim

2006-06-01 Thread Gerald Lai

On Thu, 1 Jun 2006, John R. Culleton wrote:

[snip]

functions, e.g., F3 activates an external program. The
equivalent map command would be

imap  :!pdftex book.texa

[snip]

When I try to import such a string it just gets added to the file
as text.

[snip]

Change "" to "":

  imap  :!pdftex book.texa

See

  :help ctrl

HTH.
--
Gerald


Re: Reassigning F keys in eVim

2006-06-01 Thread Eric Arnold

Try importing via a file sourced by -S

On 6/1/06, John R. Culleton <[EMAIL PROTECTED]> wrote:

I want to create a special application for MSWin machines that
works somewhat as follows:

 When clicked a .bat file calls evim with a script or whatever
that adds certain F key
functions, e.g., F3 activates an external program. The
equivalent map command would be

imap  :!pdftex book.texa

..or something like that. When F3 is pressed we drop out of
insert mode temporarily and then execute an external command,
returning to insert mode thereafter.

When I try to import such a string it just gets added to the file
as text.

A special _gvimrc file is not an attractive option because of difficulties
in placement on someone else's computer. Unfortunately Vim does
not look in the current directory for a _gvimrc file.

--
John Culleton





Reassigning F keys in eVim

2006-06-01 Thread John R. Culleton
I want to create a special application for MSWin machines that
works somewhat as follows:

 When clicked a .bat file calls evim with a script or whatever 
that adds certain F key
functions, e.g., F3 activates an external program. The
equivalent map command would be

imap  :!pdftex book.texa

..or something like that. When F3 is pressed we drop out of
insert mode temporarily and then execute an external command,
returning to insert mode thereafter.

When I try to import such a string it just gets added to the file
as text. 

A special _gvimrc file is not an attractive option because of difficulties
in placement on someone else's computer. Unfortunately Vim does
not look in the current directory for a _gvimrc file. 

-- 
John Culleton




Re: Support for the idutils in vim?

2006-06-01 Thread George Reilly
"Yegappan Lakshmanan" <[EMAIL PROTECTED]> wrote:
> On 6/1/06, Timothy Knox <[EMAIL PROTECTED]> wrote:
> > Is there any support for the GNU idutils
> >  in vim? For those not familiar
> > with the idutils, they are somewhat like ctags, only faster?
> 
> You can try using the lid.vim plugin:
> 
> http://vim.sourceforge.net/scripts/script.php?script_id=251

Win32 binaries for the Id-Utils can now be found at
http://gnuwin32.sourceforge.net/packages/id-utils.htm
These are better than the DJGPP binaries mentioned on the lid page.
-- 
/George V. Reilly  mailto:[EMAIL PROTECTED]
http://www.georgevreilly.com/blog/


Re: Support for the idutils in vim?

2006-06-01 Thread Yegappan Lakshmanan

Hi Timothy,

On 6/1/06, Timothy Knox <[EMAIL PROTECTED]> wrote:

Is there any support for the GNU idutils
 in vim? For those not familiar
with the idutils, they are somewhat like ctags, only faster?



You can try using the lid.vim plugin:

http://vim.sourceforge.net/scripts/script.php?script_id=251

- Yegappan


Support for the idutils in vim?

2006-06-01 Thread Timothy Knox

Is there any support for the GNU idutils
 in vim? For those not familiar
with the idutils, they are somewhat like ctags, only faster?

Thanks. And by the way, for all who worked on it, vim7 ROCKS! :-)

--
Timothy Knox 
"...[T]hings that aren't worth doing aren't worth doing well."
   -- Bob Lewis, _Advice Line Weblog_


RE: Inevitable VIM plug-in for eclipse?

2006-06-01 Thread Furash Gary
Oooo...  Coool.  Thanks! 

-Original Message-
From: Yegappan Lakshmanan [mailto:[EMAIL PROTECTED] 
Sent: Thursday, June 01, 2006 11:09 AM
To: Furash Gary
Cc: vim@vim.org
Subject: Re: Inevitable VIM plug-in for eclipse?

Hello,

On 6/1/06, Furash Gary <[EMAIL PROTECTED]> wrote:
> As much as I love vim (write school papers, do meeting notes, 
> program), in the software side of the world everything seems to be
going eclipse.
> Particularly as you have these complex software "frameworks," and 
> eclipse does stuff to modify them.
>
> Are there any plans as part of the main VIM project to integrate it 
> with Eclipse?
>
>

You can try using eclim:

http://eclim.sourceforge.net/

- Yegappan


Re: Inevitable VIM plug-in for eclipse?

2006-06-01 Thread Yegappan Lakshmanan

Hello,

On 6/1/06, Furash Gary <[EMAIL PROTECTED]> wrote:

As much as I love vim (write school papers, do meeting notes, program),
in the software side of the world everything seems to be going eclipse.
Particularly as you have these complex software "frameworks," and
eclipse does stuff to modify them.

Are there any plans as part of the main VIM project to integrate it with
Eclipse?




You can try using eclim:

http://eclim.sourceforge.net/

- Yegappan


Re: vim7: E788 is too restrictive

2006-06-01 Thread Hari Krishna Dara

On Wed, 31 May 2006 at 11:47pm, Christian J. Robinson wrote:

> Today (Wed, 31 May 2006), Hari Krishna Dara wrote:
>
> > The handling of FileChangedRO was never smooth for me. As a
> > workaround, I am thinking of avoiding a reload altogether and just
> > mark the buffer as 'noro'. I relied upon the reload for its side
> > effects before, but I should be able to force them directly, so all
> > I can think of that needs to be done after a successful checkout is
> > to mark the buffer as non-readonly. Any comments?
>
> My problem with that is that RCS's "co"/"ci" commands modify the file
> on disk if you have some of the special $...$ tags within the file, so
> a reload of the buffer is essentially mandatory.
>
> - Christian

Thanks for pointing this out... even perforce supports some keywords, so
reloading is essential for me as well.

-- 
Thanks,
Hari

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


Fw: [Ctags] Ctags-5.6 released

2006-06-01 Thread Yegappan Lakshmanan


- Forwarded Message 
From: Darren Hiebert <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Sent: Tuesday, May 30, 2006 4:26:23 PM
Subject: [Ctags] Ctags-5.6 released

Hello friends,

I know it has been an eternity since my previous release of ctags and I hope
you are patient with me. Don't expect a whole lot of change in this release.
I am sure that lots of you have submitted bug reports and patches which
haven't made it into this release. But it does fix a number of bugs and a few
minor enhancements. Hopefully, I might return to a more reasonable update
cycle.

ctags-5.6 (Mon May 29 2006)
* Reformatted code for independence of tab stop setting.
* Changed default configuration to disable installation of etags links.
* Changed --langmap to first unmap each supplied extension from other
languages.
* Added support for ASP constants [ASP, Patch #961842].
* Added support for GNU make extensions [Make].
* Added .mk as extension recognized as a make language file [Make].
* Added missing help for list-maps options [Bug #1201826].
* Added new extension field "typeref" [thanks to Bram Moolenaar].
* Extended functionality of Ruby parser with patch from Elliot Hughes [Ruby].
* Fixed creation of TAGS file with etags-include but no files [Bug #941233].
* Fixed problem reading last line of list file (-L) without final newline.
* Fixed infinite loop that could occur on files without final newline [C,
Java].
* Fixed incorrect tag for first field of table [SQL].
* Fixed missing tags for functions beginning with underscore [Sh].
* Fixed missing tags for functions with variable arg list [C, Bug #1201689].
* Fixed parsing problem with parentheses in argument list [C, Bug #1085585].
* Fixed problem in preprocessor directive handling [C, Bug #1086609].

--
Darren Hiebert
http://darrenhiebert.com
http://ctags.sourceforge.net


___
Ctags-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/ctags-users





Re: put (paste) from windows clipboard into vim

2006-06-01 Thread A.J.Mechelynck

Max Dyckhoff wrote:

Prefixing the yank and put commands with registers works, but I personally 
prefer the following, which just sets the default register to be the system 
clipboard. From :help clipboard,

When the "unnamed" string is included in the 'clipboard' option, the
Unnamed register is the same as the "* register.  Thus you can yank to
and paste the selection without prepending "* to commands.

So just put "set clipboard=unnamed" in your vimrc file, use y and p as normal, 
and watch them yank to and put from the system clipboard! Woo!

Max

  

[...]

I knew about that but I somehow forgot to mention it (though maybe I 
should have), because most of my puts and yanks are internal to Vim and 
I don't like clobbering the system clipboard in that case. "De gustibus 
et coloribus non est disputandum."



Best regards,
Tony.


Re: put (paste) from windows clipboard into vim

2006-06-01 Thread Georg Dahn

Hi!

There is another possibility:

Shift-Ins = paste
Ctrl-Ins = copy
Shift-Del = cut

These shortcuts work even without sourcing mswin.vim (BTW, I don't
recommend sourcing mswin.vim) and have the advantage that they work in
all Windows applications.

Best wishes,
Georg



Evan H. Carmi wrote:

hey all,

i am wondering how to copy through windows and than paste into vim with
a keyboard command.

for example: i am running FF and i copy some text, when i go into vim I
don't know how to put (paste) that text without right clicking and
selecting paste. the

:p

command doesn't work and seems to be put what is in the vim clipboard (i
don't think clipboard is the correct term for the place where vim has
yanked data. what is it?)

peace, Evan




___ 
Inbox full of spam? Get leading spam protection and 1GB storage with All New Yahoo! Mail. http://uk.docs.yahoo.com/nowyoucan.html


Re: gvim 7.0 does not display files in the same directory again

2006-06-01 Thread PoWah Wong
:pwd show "/home/powah"


Session are:

(select file)
:pwd
/home/powah
:e .

" 
" Netrw Directory Listing(netrw v98)
"   /home/powah
"   Sorted by  name
"   Sort sequence: [\/]$,*,\.bak$,\.o$,\.h$,\.info$,\.swp$,\.obj$
"   Quick Help: :help  -:go up dir  D:delete  R:rename  s:sort-by  x:exec
" 
../
./
.kde/
.mozilla/
.ssh/
.vnc/
.xauth/
Desktop/
awk/
expect/
perl/
unix/
.Xauthority
.bash_history
.bash_logout
.bash_profile
.bashrc
.emacs
.first_start_kde
.gtkrc
.gvimrc
.kderc
.screenrc
.viminfo
"." is a directory

:pwd
/home/powah

"unix/xxx.txt" [noeol][dos] 9L, 969C

- Original Message 
From: Charles E Campbell Jr <[EMAIL PROTECTED]>
To: PoWah Wong <[EMAIL PROTECTED]>
Cc: vim@vim.org
Sent: Thursday, June 1, 2006 10:56:43 AM
Subject: Re: gvim 7.0 does not display files in the same directory again

Charles E Campbell Jr wrote:

> PoWah Wong wrote:
>
>> When I use gvim to open files, the first time it will display all the 
>> files in the directory A.
>> After I open a file, when I try to open files in the same directory 
>> A,  it does not display any files, i.e. the directory A is 
>> displayed as empty.
>> I have to display the files in another directory B (e.g. parent 
>> directory), then it will display all the files in the directory A.
>> gvim version is 7.0.  I download source code and compiled it.
>> Linux is Red Hat 7.2 (2.4.7-10smp).
>>  
>>
> I generally use Fedora Core 4; I doubt that Red Hat 7.2 acts that much 
> differently.  So, please give the
> commands you actually use.
>
> For example:
>
>  gvim .
>  (select a file) 
>  :e .
>
> which, by the way, works for me.


I use Gnome version 2.14.1, and I happen to have a gvim icon on my 
toolbar.  With that, I don't see the problem you're having.
What does :pwd show?  ie.

gvim .
:pwd
(select file)
:pwd
:e .
:pwd

And again: are you doing the sequence above (excepting that you're using 
a icon instead of the initial gvim)?

Regards,
Chip Campbell






RE: put (paste) from windows clipboard into vim

2006-06-01 Thread Max Dyckhoff
That seems like a fair warning, although I will say that I have never
run into such a problem. I don't tend to keep things in the clipboard
for very long at all, normally just to move from one place to another.
If I do want them to be around for a while then I generally want them to
be around for A Long Time, and so I put them in a named buffer so that
nothing can stomp on them.

Choose whatever is better for your workflow, is the solution!

Max

> -Original Message-
> From: Tim Chase [mailto:[EMAIL PROTECTED]
> Sent: Thursday, June 01, 2006 8:47 AM
> To: Max Dyckhoff
> Cc: [EMAIL PROTECTED]; vim@vim.org
> Subject: Re: put (paste) from windows clipboard into vim
> 
> > So just put "set clipboard=unnamed" in your vimrc file, use y
> > and p as normal, and watch them yank to and put from the
> > system clipboard! Woo!
> 
> 
> This is nice when you want it, but I find it frequently annoying
> when I do anything that happens to delete in the process...like
> 
>   ciw
> 
> to change the current word under the cursor.  It tromps over my
> system clipboard, replacing it with the word I've removed.  I
> tend to like to keep things of importance in my system clipboard,
> and I'm all to prone to making edits in Vim that would tromp on
> my clipboard.
> 
> At least Vim offers the option, unlike most other editors. :)
> 
> So use it if you like, but be forewarned :)
> 
> -tim
> 
> 



Re: put (paste) from windows clipboard into vim

2006-06-01 Thread Tim Chase

So just put "set clipboard=unnamed" in your vimrc file, use y
and p as normal, and watch them yank to and put from the
system clipboard! Woo!



This is nice when you want it, but I find it frequently annoying 
when I do anything that happens to delete in the process...like


ciw

to change the current word under the cursor.  It tromps over my 
system clipboard, replacing it with the word I've removed.  I 
tend to like to keep things of importance in my system clipboard, 
and I'm all to prone to making edits in Vim that would tromp on 
my clipboard.


At least Vim offers the option, unlike most other editors. :)

So use it if you like, but be forewarned :)

-tim





RE: put (paste) from windows clipboard into vim

2006-06-01 Thread Max Dyckhoff
Prefixing the yank and put commands with registers works, but I personally 
prefer the following, which just sets the default register to be the system 
clipboard. From :help clipboard,

When the "unnamed" string is included in the 'clipboard' option, the
Unnamed register is the same as the "* register.  Thus you can yank to
and paste the selection without prepending "* to commands.

So just put "set clipboard=unnamed" in your vimrc file, use y and p as normal, 
and watch them yank to and put from the system clipboard! Woo!

Max




> -Original Message-
> From: A.J.Mechelynck [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, May 31, 2006 7:44 PM
> To: [EMAIL PROTECTED]
> Cc: vim@vim.org
> Subject: Re: put (paste) from windows clipboard into vim
> 
> Evan H. Carmi wrote:
> > hey all,
> >
> > i am wondering how to copy through windows and than paste into vim with
> > a keyboard command.
> >
> > for example: i am running FF and i copy some text, when i go into vim I
> > don't know how to put (paste) that text without right clicking and
> > selecting paste. the
> >
> > :p
> >
> > command doesn't work and seems to be put what is in the vim clipboard (i
> > don't think clipboard is the correct term for the place where vim has
> > yanked data. what is it?)
> >
> > peace, Evan
> >
> >
> >
> In Vim, the system clipboard is known as "register plus". On non-Unix
> versions, "register star" is synonymous with it. So, just prefix your P
> (put) command with "+ (double-quote plus) or, on non-Unix systems, by "*
> (double-quote star) and voilĂ ! The clipboard contents get patsed.
> Conversely, "+y or "+d do a yank (copy) or delete (cut) to the clipboard:
> 
> "+p   paste before cursor
> "+P   paste after cursor
> "+y   copy (visual area, or takes a postfix telling Vim
> "what" to copy)
> "+d   cut (visual area, or with a postfix)
> 
> :echo @+ show the contents of the system clipboard _without_
> pasting
> 
> etc.
> 
> And BTW, it's p (put after cursor) or P (put before cursor), _without_ a
> colon prefix; or you can youse the :pu[t] command, which takes the
> register-name after the command, and accepts a line number:
> 
> :put +
> 
> pastes the clipboard after the current line, and
> 
> :0put +
> 
> pastes it at the top of the file (or use ":$put +", without the quotes,
> to paste at the bottom).
> 
> And the correct name (in Vim lingo) for where Vim stores data between a
> yank and a put if you don't explicitly specify a register name, is --
> the unnamed register.
> 
> See ":help change.txt", and, in particular, ":help registers".
> 
> 
> HTH,
> Tony.


Re: Inevitable VIM plug-in for eclipse?

2006-06-01 Thread Russell Bateman
No, but it supports a very decent plug-in architecture. You can plug 
just about anything into it--cvs, ant, maven, electric dog polishers, 
fur-lined kitchen sinks and vi.




Eric Arnold wrote:

I don't know much about eclipse.  Does it allow you to embed your own
editor as the default editing window?


On 6/1/06, Furash Gary <[EMAIL PROTECTED]> wrote:

As much as I love vim (write school papers, do meeting notes, program),
in the software side of the world everything seems to be going eclipse.
Particularly as you have these complex software "frameworks," and
eclipse does stuff to modify them.

Are there any plans as part of the main VIM project to integrate it with
Eclipse?



Gary Furash, MBA, PMP, Applications Manager
Maricopa County Attorney's Office










Re: to get rid of postscript on windows

2006-06-01 Thread Mike Williams

Zbigniew Kowalski did utter on 01/06/2006 14:26:
I'm running Vim 70 on win XP, 
since the upgrade to 70 I can't print because Vim uses postscript mode 
to make a hardcopy (it says "sending to printer" and "print job sent")

and the result gets lost someplace.

The question is: 


1. How to make Vim print using standard windows mode
(with a dialog for selecting a printer and w/o postscript).

2. Why VIM 70 uses postscript rather than normal windows mode? 
Have I done something wrong while I was installing VIM?


3. Is it possible to use postscript mode successfully under win
with a postscript printer, but over the network?


By default VIM on Windows uses the Windows print APIs, it will only 
generate PostScript if it was compiled in.  Does the output from 
:version include +postscript?  If it does then whoever built your 
version of VIM included it, and you need to find another Windows 
distribution that does not include PostScript.


TTFN

Mike
--



Re: Inevitable VIM plug-in for eclipse?

2006-06-01 Thread Eric Arnold

I don't know much about eclipse.  Does it allow you to embed your own
editor as the default editing window?


On 6/1/06, Furash Gary <[EMAIL PROTECTED]> wrote:

As much as I love vim (write school papers, do meeting notes, program),
in the software side of the world everything seems to be going eclipse.
Particularly as you have these complex software "frameworks," and
eclipse does stuff to modify them.

Are there any plans as part of the main VIM project to integrate it with
Eclipse?



Gary Furash, MBA, PMP, Applications Manager
Maricopa County Attorney's Office





Re: Inevitable VIM plug-in for eclipse?

2006-06-01 Thread Russell Bateman

http://www.satokar.com/viplugin/index.php?&MMN_position=7:7

Not sure of the main page for this tool as I'm at work (where I don't 
use Java), but I have it at home. This will get you there, though.


I am using this and it work fine. It's worth the paltry sum I paid for 
it. It's not Vim, but it's such a step above the nambi-pambi editor 
Eclipse offers that it's like dying and going to heaven.




Furash Gary wrote:

As much as I love vim (write school papers, do meeting notes, program),
in the software side of the world everything seems to be going eclipse.
Particularly as you have these complex software "frameworks," and
eclipse does stuff to modify them.
 
Are there any plans as part of the main VIM project to integrate it with

Eclipse?



Gary Furash, MBA, PMP, Applications Manager
Maricopa County Attorney's Office




  




Inevitable VIM plug-in for eclipse?

2006-06-01 Thread Furash Gary
As much as I love vim (write school papers, do meeting notes, program),
in the software side of the world everything seems to be going eclipse.
Particularly as you have these complex software "frameworks," and
eclipse does stuff to modify them.
 
Are there any plans as part of the main VIM project to integrate it with
Eclipse?



Gary Furash, MBA, PMP, Applications Manager
Maricopa County Attorney's Office




Re: gvim 7.0 does not display files in the same directory again

2006-06-01 Thread Charles E Campbell Jr

Charles E Campbell Jr wrote:


PoWah Wong wrote:

When I use gvim to open files, the first time it will display all the 
files in the directory A.
After I open a file, when I try to open files in the same directory 
A,  it does not display any files, i.e. the directory A is 
displayed as empty.
I have to display the files in another directory B (e.g. parent 
directory), then it will display all the files in the directory A.

gvim version is 7.0.  I download source code and compiled it.
Linux is Red Hat 7.2 (2.4.7-10smp).
 

I generally use Fedora Core 4; I doubt that Red Hat 7.2 acts that much 
differently.  So, please give the

commands you actually use.

For example:

 gvim .
 (select a file) 
 :e .

which, by the way, works for me.



I use Gnome version 2.14.1, and I happen to have a gvim icon on my 
toolbar.  With that, I don't see the problem you're having.

What does :pwd show?  ie.

gvim .
:pwd
(select file)
:pwd
:e .
:pwd

And again: are you doing the sequence above (excepting that you're using 
a icon instead of the initial gvim)?


Regards,
Chip Campbell



Re: gvim 7.0 does not display files in the same directory again

2006-06-01 Thread PoWah Wong
This problem only occur when I click the gvim icon which I created on the KDE 
menu.
When I start gvim on the shell, then there is no problem.
Both icon and shell refer to the same /usr/local/bin/gvim program.
I copied the .gvimrc file to the ~ directory.
KDE version is 2.2-11.

- Original Message 
From: Charles E Campbell Jr <[EMAIL PROTECTED]>
To: PoWah Wong <[EMAIL PROTECTED]>
Cc: vim@vim.org
Sent: Wednesday, May 31, 2006 10:56:31 AM
Subject: Re: gvim 7.0 does not display files in the same directory again

PoWah Wong wrote:

>When I use gvim to open files, the first time it will display all the files in 
>the directory A.
> After I open a file, when I try to open files in the same directory A,  
> it does not display any files, i.e. the directory A is displayed as empty.
> I have to display the files in another directory B (e.g. parent directory), 
> then it will display all the files in the directory A.
> gvim version is 7.0.  I download source code and compiled it.
> Linux is Red Hat 7.2 (2.4.7-10smp).
>  
>
I generally use Fedora Core 4; I doubt that Red Hat 7.2 acts that much 
differently.  So, please give the
commands you actually use.

For example:

  gvim .
  (select a file) 
  :e .

which, by the way, works for me.  If that sequence isn't working for 
you, then you'll need to consider
the settings you're using.  Try commenting out all such settings (except 
set nocp) and determine which
one, if any, is causing problems.

Regards,
Chip Campbell






Re: Antw: Re: Loop through all lines in a file

2006-06-01 Thread Tim Chase

In the meantime I found a solution myself:

let s:lnr=line(".")
let s:image=getline(s:lnr)
	while (strlen(s:image) != 0) 
		let s:lnr=s:lnr+1

let s:image=getline(s:lnr)
endwhile

I'm not that familiar with the global commands yet, maybe I
have to read the documentation again.



I second Benji's suggestion of using a ":g" command if possible. 
 It's more idiomatic, making it easier to understand.


While you omit what you're doing with s:image once you have it, 
unless you're doing something with it within the body of your 
while statement, you're only getting the last one.  It also looks 
like you're getting the line number only to pass it to getline().


The idiomatic way would be something like

:g/^/let s:image=getline(".")


If you only want from the current line to the end of file, you 
can use


:.,$g/^/let s:image=getline(".")

(:g defaults to the whole file if you don't specify a range, such 
as ".,$")


If you want to call a function with each line, or run an external 
command, you can do something like


:g/^/exec "!somecommand ".getline(".")

Hope this gives you some additional ideas regarding how to use 
the :g command.


-tim





Re: Loop through all lines in a file

2006-06-01 Thread Eric Arnold

On 6/1/06, Benji Fisher <[EMAIL PROTECTED]> wrote:
...

> let line=getline(".")
> while (strlen(line)!=0)
>   "do sth. here -- construct the external command and so on
>   j
>   let line=getline(".")
> endwhile

 Remember that a vim script (including a plugin) is a list of
commands in Command-Line (Ex) mode, not Normal mode.  So that j means
:j[oin], not "move the cursor down one line."  If you change "j" to "+"
it will be a step in the right direction.


D'oh.  For some reason I though 'j' was a variable and jumped to a
wishful[wrong] conclusion that it was really:

exe j

which would set the line number to an incrementing index.  This is
useful if you are going to use   :ex   commands  in addition to
function calls.



let linenr = 0
while linenr < line("$")
 let linenr += 1   " The += construction requires vim 7.0 .
 let line = getline(linenr)
 " ...


 exe linenr


endwhile


Antw: Re: Loop through all lines in a file

2006-06-01 Thread Johannes Schwarz
First of all I want to thank everyone, who contributes to this list.
It's one of the best lists I know of.

The response time is so quick and the quality of the answer are really
great  ...  thank you really much. 

In the meantime I found a solution myself:

let s:lnr=line(".")
let s:image=getline(s:lnr)
while (strlen(s:image) != 0) 
let s:lnr=s:lnr+1
let s:image=getline(s:lnr)
endwhile

Compared to your suggested solutions it's not that good (but anyway I'm
poud of myself ;-)

I'm not that familiar with the global commands yet, maybe I have to
read the documentation again.


 >>> Benji Fisher <[EMAIL PROTECTED]> 01.06.2006 14:41:38 >>>
> On Thu, Jun 01, 2006 at 01:43:48PM +0200, Johannes Schwarz wrote:
> > Hello,
> > 
> > I'm trying to write my first vim-plugin, but I got stucked.
> > 
> > I managed to execute an external command, which gives me back a
list of
> > filenames.
> > One filename per line.
> > 
> > For each of the filenames I want to execute another command. 
> > I tried it with code:
> > 
> > let line=getline(".")
> > while (strlen(line)!=0)
> > "do sth. here -- construct the external command and so on
> > j
> > let line=getline(".")
> > endwhile
> 
> Remember that a vim script (including a plugin) is a list of
> commands in Command-Line (Ex) mode, not Normal mode. So that j means
> :j[oin], not "move the cursor down one line." If you change "j" to
"+"
> it will be a step in the right direction.
> 
> > When I execute the code, it runns into an infinite loop, because
the
> > lines are joined together with each loop
> > 
> > file:
> > text1.txt
> > text2.txt
> > text3.txt
> > 
> > after interrupting the loop the looks like
> > text1.txt text2.txt text3.txt
> 
> That's right.
> 
> > it seems j is interpreted as a J (join line) here.
> > And by the way, I think this is a bad solution anyway. 
> > Can someone give me a hint how to do it in a clean way?
> 
> Either
> 
> :g/./
> 
> or
> 
> let linenr = 0
> while linenr < line("$")
> let linenr += 1" The += construction requires vim 7.0 .
> let line = getline(linenr)
> " ...
> endwhile
> 
> HTH--Benji Fisher
> 



Re: regex question

2006-06-01 Thread Eric Arnold

Sorry I wasn't clear, I wanted it to match any substring of
'directory'.  I think   \%[]  does this (courtesy of Benji).


On 6/1/06, Cory Echols <[EMAIL PROTECTED]> wrote:

On 6/1/06, Eric Arnold <[EMAIL PROTECTED]> wrote:
> Sorry if I've got brain lock on this, but is it possible to match a
> substring like
>
> match wildmenu ;\(directory\)\{3,};
>
> such that it will match three or more substring chars of the pattern
> to match "dir" as well as "directory"?  (I know the above format isn't
> this.)  I know I could do it if I could use an expression, but syntax
> highlighting doesn't allow that, so I'm wondering if I can do it with
> regex alone.
>

Enclose "ectory" in another group that matches zero or one times.  The
"\v" enables "very magic" mode, and the "%()"  construct causes the
group to not be counted as a sub-expression:

\v(dir%(ectory)?)



Re: regex question

2006-06-01 Thread Eric Arnold

On 6/1/06, Benji Fisher <[EMAIL PROTECTED]> wrote:

On Thu, Jun 01, 2006 at 05:05:00AM -0600, Eric Arnold wrote:
> Sorry if I've got brain lock on this, but is it possible to match a
> substring like
>
> match wildmenu ;\(directory\)\{3,};
>
> such that it will match three or more substring chars of the pattern
> to match "dir" as well as "directory"?  (I know the above format isn't
> this.)  I know I could do it if I could use an expression, but syntax
> highlighting doesn't allow that, so I'm wondering if I can do it with
> regex alone.

 Do you mean like /\

Real close.  Turns out I think I want:

/\<\%[directory]\{1,}\>/

but it doesn't seem to recognize \{1,} and without the \< it seems to
be matching white space.  The problem with   \<   is that it doesn't
seem to allow   \<\%[.directory]

What I'm actually trying to do is walk through a list of displayed
files, highlighting each file individually (full length) (I.e via
 key).  The regex is because the file names are truncated to a
given length, and the remainder is wrapped down onto the next column


./   >8.3   >oaded
../TabLineSet.vim.2.0 WinWalker.zip.upl>
TabLineSet.vim.1.>   WinWalker.1.2.1.zip   >oaded2
  >7.1.vimWinWalker.1.2.zip  doc/
TabLineSet.vim.1.8   WinWalker.2.0.zip   plugin/
TabLineSet.vim.1.>   WinWalker.2.1.zip
  >8.1 WinWalker.2.2.zip
TabLineSet.vim.1.>   WinWalker.zip.upl>

After I solve the \%[   problem, I then have to see if I can deal with
the continuation segments.


to get rid of postscript on windows

2006-06-01 Thread Zbigniew Kowalski
Hi,

I'm running Vim 70 on win XP, 
since the upgrade to 70 I can't print because Vim uses postscript mode 
to make a hardcopy (it says "sending to printer" and "print job sent")
and the result gets lost someplace.

The question is: 

1. How to make Vim print using standard windows mode
(with a dialog for selecting a printer and w/o postscript).

2. Why VIM 70 uses postscript rather than normal windows mode? 
Have I done something wrong while I was installing VIM?

3. Is it possible to use postscript mode successfully under win
with a postscript printer, but over the network?

Best regards

Zbigniew Kowalski
http://zbikow1.webpark.pl/




Re: Loop through all lines in a file

2006-06-01 Thread Benji Fisher
On Thu, Jun 01, 2006 at 01:43:48PM +0200, Johannes Schwarz wrote:
> Hello,
> 
> I'm trying to write my first vim-plugin, but I got stucked.
> 
> I managed to execute an external command, which gives me back a list of
> filenames.
> One filename per line.
> 
> For each of the filenames I want to execute another command. 
> I tried it with code:
> 
> let line=getline(".")
> while (strlen(line)!=0)
>   "do sth. here -- construct the external command and so on
>   j
>   let line=getline(".")
> endwhile

 Remember that a vim script (including a plugin) is a list of
commands in Command-Line (Ex) mode, not Normal mode.  So that j means
:j[oin], not "move the cursor down one line."  If you change "j" to "+"
it will be a step in the right direction.

> When I execute the code, it runns into an infinite loop, because the
> lines are joined together with each loop
> 
> file:
> text1.txt
> text2.txt
> text3.txt
> 
> after interrupting the loop the looks like
> text1.txt text2.txt text3.txt

 That's right.

> it seems j is interpreted as a J (join line) here.
> And by the way, I think this is a bad solution anyway. 
> Can someone give me a hint how to do it in a clean way?

 Either

:g/./

or

let linenr = 0
while linenr < line("$")
  let linenr += 1   " The += construction requires vim 7.0 .
  let line = getline(linenr)
  " ...
endwhile

HTH --Benji Fisher


Re: regex question

2006-06-01 Thread Benji Fisher
On Thu, Jun 01, 2006 at 05:05:00AM -0600, Eric Arnold wrote:
> Sorry if I've got brain lock on this, but is it possible to match a
> substring like
> 
> match wildmenu ;\(directory\)\{3,};
> 
> such that it will match three or more substring chars of the pattern
> to match "dir" as well as "directory"?  (I know the above format isn't
> this.)  I know I could do it if I could use an expression, but syntax
> highlighting doesn't allow that, so I'm wondering if I can do it with
> regex alone.

 Do you mean like /\

Re: regex question

2006-06-01 Thread Cory Echols

On 6/1/06, Eric Arnold <[EMAIL PROTECTED]> wrote:

Sorry if I've got brain lock on this, but is it possible to match a
substring like

match wildmenu ;\(directory\)\{3,};

such that it will match three or more substring chars of the pattern
to match "dir" as well as "directory"?  (I know the above format isn't
this.)  I know I could do it if I could use an expression, but syntax
highlighting doesn't allow that, so I'm wondering if I can do it with
regex alone.



Enclose "ectory" in another group that matches zero or one times.  The
"\v" enables "very magic" mode, and the "%()"  construct causes the
group to not be counted as a sub-expression:

\v(dir%(ectory)?)


Re: Loop through all lines in a file

2006-06-01 Thread Eric Arnold

On 6/1/06, Johannes Schwarz <[EMAIL PROTECTED]> wrote:

Hello,

I'm trying to write my first vim-plugin, but I got stucked.

I managed to execute an external command, which gives me back a list of
filenames.


You need to say exactly how you executed the command, since that will
define how the lines were acquired, whether they went from the file
into a buffer correctly, etc.


One filename per line.

For each of the filenames I want to execute another command.
I tried it with code:



let j = 1
1


let line=getline(".")
while (strlen(line)!=0)


This loop is best done comparing line(".") <= line("$")


  "do sth. here -- construct the external command and so on
  j


'j' is incrementing, right?


  let line=getline(".")
endwhile

When I execute the code, it runns into an infinite loop, because the
lines are joined together with each loop


The infinite loop is probably due to other reasons, ie. above.


file:
text1.txt
text2.txt
text3.txt


Is the file (disk) or file loaded into a Vim buffer window?



after interrupting the loop the looks like
text1.txt text2.txt text3.txt


Not enough code examples to understand why it would be like this.


it seems j is interpreted as a J (join line) here.
And by the way, I think this is a bad solution anyway.
Can someone give me a hint how to do it in a clean way?


If it's simple enough, you can use global commands

:g/.*/commands


Loop through all lines in a file

2006-06-01 Thread Johannes Schwarz
Hello,

I'm trying to write my first vim-plugin, but I got stucked.

I managed to execute an external command, which gives me back a list of
filenames.
One filename per line.

For each of the filenames I want to execute another command. 
I tried it with code:

let line=getline(".")
while (strlen(line)!=0)
  "do sth. here -- construct the external command and so on
  j
  let line=getline(".")
endwhile

When I execute the code, it runns into an infinite loop, because the
lines are joined together with each loop

file:
text1.txt
text2.txt
text3.txt

after interrupting the loop the looks like
text1.txt text2.txt text3.txt

it seems j is interpreted as a J (join line) here.
And by the way, I think this is a bad solution anyway. 
Can someone give me a hint how to do it in a clean way?


regex question

2006-06-01 Thread Eric Arnold

Sorry if I've got brain lock on this, but is it possible to match a
substring like

match wildmenu ;\(directory\)\{3,};

such that it will match three or more substring chars of the pattern
to match "dir" as well as "directory"?  (I know the above format isn't
this.)  I know I could do it if I could use an expression, but syntax
highlighting doesn't allow that, so I'm wondering if I can do it with
regex alone.


Re: Filter :map output

2006-06-01 Thread Eric Arnold

On 6/1/06, Eric Leenman <[EMAIL PROTECTED]> wrote:

Hi,

Is it possible to filter the :map output?
For example to only show the mappings that have CTRL or 

I don't think so, but  you can :redir into a register, put into a
buffer, or use split(), filter(), etc.  I don't see a way to loop
through the mappings list directly from script.