Skip to search.

Breaking News Visit Yahoo! News for the latest.

×Close this window

vim · Vim (Vi IMproved) text editor users list

The Yahoo! Groups Product Blog

Check it out!

Group Information

? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Message search is now enhanced, find messages faster. Take it for a spin.

Messages

Advanced
Messages Help
Messages 69821 - 69850 of 138223   Oldest  |  < Older  |  Newer >  |  Newest
Messages: Show Message Summaries Sort by Date ^  
#69821 From: "Eric Arnold" <eric.p.arnold@...>
Date: Thu Jun 1, 2006 9:13 am
Subject: Re: Filter :map output
eric.p.arnold@...
Send Email Send Email
 
On 6/1/06, Eric Leenman <eric.leenman@...> wrote:
> Hi,
>
> Is it possible to filter the :map output?
> For example to only show the mappings that have CTRL or <C- in it?
>

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.

#69822 From: "Eric Arnold" <eric.p.arnold@...>
Date: Thu Jun 1, 2006 11:05 am
Subject: regex question
eric.p.arnold@...
Send Email Send Email
 
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.

#69823 From: "Johannes Schwarz" <J.Schwarz@...>
Date: Thu Jun 1, 2006 11:43 am
Subject: Loop through all lines in a file
J.Schwarz@...
Send Email Send Email
 
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?

#69824 From: "Eric Arnold" <eric.p.arnold@...>
Date: Thu Jun 1, 2006 12:22 pm
Subject: Re: Loop through all lines in a file
eric.p.arnold@...
Send Email Send Email
 
On 6/1/06, Johannes Schwarz <J.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.

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

#69825 From: "Cory Echols" <ctechols@...>
Date: Thu Jun 1, 2006 12:32 pm
Subject: Re: regex question
ctechols@...
Send Email Send Email
 
On 6/1/06, Eric Arnold <eric.p.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.
>

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

#69826 From: Benji Fisher <benji@...>
Date: Thu Jun 1, 2006 12:41 pm
Subject: Re: Loop through all lines in a file
benji@...
Send Email Send Email
 
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/./<any Command-Line mode command here>

or

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

HTH 			 --Benji Fisher

#69827 From: Benji Fisher <benji@...>
Date: Thu Jun 1, 2006 12:33 pm
Subject: Re: regex question
benji@...
Send Email Send Email
 
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 /\<dir\%[ectory]/ ?

:help /\%[]

HTH 			 --Benji Fisher

#69828 From: "Zbigniew Kowalski" <zbikow1@...>
Date: Thu Jun 1, 2006 1:26 pm
Subject: to get rid of postscript on windows
zbikow1@...
Send Email Send Email
 
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/

#69829 From: "Eric Arnold" <eric.p.arnold@...>
Date: Thu Jun 1, 2006 1:54 pm
Subject: Re: regex question
eric.p.arnold@...
Send Email Send Email
 
On 6/1/06, Benji Fisher <benji@...> 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 /\<dir\%[ectory]/ ?
>
> :help /\%[]
>
> HTH                                     --Benji Fisher
>

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
<TAB> 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.vim                WinWalker.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.....

#69830 From: "Johannes Schwarz" <J.Schwarz@...>
Date: Thu Jun 1, 2006 1:59 pm
Subject: Antw: Re: Loop through all lines in a file
J.Schwarz@...
Send Email Send Email
 
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 <benji@...> 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/./<any Command-Line mode command here>
>
> or
>
> let linenr = 0
> while linenr < line("$")
> let linenr += 1" The += construction requires vim 7.0 .
> let line = getline(linenr)
> " ...
> endwhile
>
> HTH--Benji Fisher
>

#69831 From: "Eric Arnold" <eric.p.arnold@...>
Date: Thu Jun 1, 2006 2:03 pm
Subject: Re: Loop through all lines in a file
eric.p.arnold@...
Send Email Send Email
 
On 6/1/06, Benji Fisher <benji@...> 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

#69832 From: "Eric Arnold" <eric.p.arnold@...>
Date: Thu Jun 1, 2006 1:56 pm
Subject: Re: regex question
eric.p.arnold@...
Send Email Send Email
 
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 <ctechols@...> wrote:
> On 6/1/06, Eric Arnold <eric.p.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.
> >
>
> 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)?)
>

#69833 From: Tim Chase <vim@...>
Date: Thu Jun 1, 2006 2:12 pm
Subject: Re: Antw: Re: Loop through all lines in a file
vim@...
Send Email Send Email
 
> 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

#69834 From: PoWah Wong <wong_powah@...>
Date: Thu Jun 1, 2006 2:38 pm
Subject: Re: gvim 7.0 does not display files in the same directory again
wong_powah@...
Send Email Send Email
 
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 <drchip@...>
To: PoWah Wong <wong_powah@...>
Cc: vim@...
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) <cr>
   :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

#69835 From: "Furash Gary" <furashg@...>
Date: Thu Jun 1, 2006 3:00 pm
Subject: Inevitable VIM plug-in for eclipse?
furashg@...
Send Email Send Email
 
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

#69836 From: "Eric Arnold" <eric.p.arnold@...>
Date: Thu Jun 1, 2006 3:07 pm
Subject: Re: Inevitable VIM plug-in for eclipse?
eric.p.arnold@...
Send Email Send Email
 
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 <furashg@...> 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
>
>
>

#69837 From: Russell Bateman <russ@...>
Date: Thu Jun 1, 2006 3:08 pm
Subject: Re: Inevitable VIM plug-in for eclipse?
russ@...
Send Email Send Email
 
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
>
>
>
>
>

#69838 From: Mike Williams <mike.williams@...>
Date: Thu Jun 1, 2006 3:09 pm
Subject: Re: to get rid of postscript on windows
mike.williams@...
Send Email Send Email
 
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
--

#69839 From: Charles E Campbell Jr <drchip@...>
Date: Thu Jun 1, 2006 2:56 pm
Subject: Re: gvim 7.0 does not display files in the same directory again
drchip@...
Send Email Send Email
 
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) <cr>
>  :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)<cr>
: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

#69840 From: Russell Bateman <russ@...>
Date: Thu Jun 1, 2006 3:13 pm
Subject: Re: Inevitable VIM plug-in for eclipse?
russ@...
Send Email Send Email
 
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 <furashg@...> 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
>>
>>
>>
>
>

#69841 From: "Max Dyckhoff" <maxd@...>
Date: Thu Jun 1, 2006 3:33 pm
Subject: RE: put (paste) from windows clipboard into vim
maxd@...
Send Email Send Email
 
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:antoine.mechelynck@...]
> Sent: Wednesday, May 31, 2006 7:44 PM
> To: evan@...
> Cc: vim@...
> 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.

#69842 From: Georg Dahn <gorgyd@...>
Date: Thu Jun 1, 2006 4:14 pm
Subject: Re: put (paste) from windows clipboard into vim
gorgyd@...
Send Email Send Email
 
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

#69843 From: "A.J.Mechelynck" <antoine.mechelynck@...>
Date: Thu Jun 1, 2006 4:28 pm
Subject: Re: put (paste) from windows clipboard into vim
antoine.mechelynck@...
Send Email Send Email
 
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.

#69844 From: Yegappan Lakshmanan <yegappan@...>
Date: Thu Jun 1, 2006 4:31 pm
Subject: Fw: [Ctags] Ctags-5.6 released
yegappan@...
Send Email Send Email
 
----- Forwarded Message ----
From: Darren Hiebert <dhiebert@...>
To: ctags-users@...
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
Ctags-users@...
https://lists.sourceforge.net/lists/listinfo/ctags-users

#69845 From: Hari Krishna Dara <hari_vim@...>
Date: Thu Jun 1, 2006 5:19 pm
Subject: Re: vim7: E788 is too restrictive
hari_vim@...
Send Email Send Email
 
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

#69846 From: "Max Dyckhoff" <maxd@...>
Date: Thu Jun 1, 2006 3:54 pm
Subject: RE: put (paste) from windows clipboard into vim
maxd@...
Send Email Send Email
 
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:vim@...]
> Sent: Thursday, June 01, 2006 8:47 AM
> To: Max Dyckhoff
> Cc: evan@...; vim@...
> 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
>
>

#69847 From: PoWah Wong <wong_powah@...>
Date: Thu Jun 1, 2006 4:05 pm
Subject: Re: gvim 7.0 does not display files in the same directory again
wong_powah@...
Send Email Send Email
 
:pwd show "/home/powah"


Session are:

(select file)<cr>
:pwd
/home/powah
:e .

" ============================================================================
" Netrw Directory Listing                                        (netrw v98)
"   /home/powah
"   Sorted by      name
"   Sort sequence: [\/]$,*,\.bak$,\.o$,\.h$,\.info$,\.swp$,\.obj$
"   Quick Help: <F1>: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 <drchip@...>
To: PoWah Wong <wong_powah@...>
Cc: vim@...
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) <cr>
>  :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)<cr>
: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

#69848 From: "Yegappan Lakshmanan" <yegappanl@...>
Date: Thu Jun 1, 2006 6:09 pm
Subject: Re: Inevitable VIM plug-in for eclipse?
yegappanl@...
Send Email Send Email
 
Hello,

On 6/1/06, Furash Gary <furashg@...> 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

#69849 From: Tim Chase <vim@...>
Date: Thu Jun 1, 2006 3:46 pm
Subject: Re: put (paste) from windows clipboard into vim
vim@...
Send Email Send Email
 
> 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

#69850 From: "Furash Gary" <furashg@...>
Date: Thu Jun 1, 2006 8:50 pm
Subject: RE: Inevitable VIM plug-in for eclipse?
furashg@...
Send Email Send Email
 
Oooo...  Coool.  Thanks!

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

Hello,

On 6/1/06, Furash Gary <furashg@...> 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

Messages 69821 - 69850 of 138223   Oldest  |  < Older  |  Newer >  |  Newest
Add to My Yahoo!      XML What's This?

Copyright © 2010 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines NEW - Help