On 18/01/10 05:29, AndyHancock wrote:
On Jan 17, 11:04 pm, AndyHancock<[email protected]>  wrote:
On Jan 17, 9:49 pm, Tony Mechelynck<[email protected]>
wrote:

IMHO it's easier to keep native-Windows (with gvim GUI for Windows,
and/or Vim for Windows running in cmd.exe) and Cygwin (with Vim for
Cygwin running in bash) apart from each other. If you need to copy-paste
between Vim and other Windows applications, I recommend using gvim for
Windows (which can be built in Cygwin as a kind of "cross-compile", but
doesn't need Cygwin to run), which natively "understands" the Windows
clipboard as "* or "+. Now YMMV.

When you say keep them separate, do you mean not have them no the same
machine?   I have kept them together on the same machine before,
though it was in a previous laptop.  However, they were completely
different apps.  On was installed under the cygwin tree while the
other used the Windows installer.  I was able to use the same vimrc.
Unfortunately, the "!" command in the Windows version didn't shell out
to bash.  I might have been able to force it to shell out to bash at
some point through some through some abomination of vimrc scripting,
but it was far from robust so I didn't bother keeping bother keeping
track of how it was done.

Anyway, I was trying avoid doing a Windows installation of gvim
because it seemed excessive to have two gvim's on the same system.
However, I may yet go back on that decision simply because of the
inconvenience of having to transfer text to Notepad and write it to a
file before sic'ing gvim onto it.  I will likely not do the cygwin
cross-compile route simply for lack of time to become technically
competent enough (and because the windows installer is readily
available).

BTW, the reason I'd forgoe the Windows gvim is because the shelling
that managed to force wasn't robust.  I meant not just shelling out to
a bash command line, but really convenient mixing and matching with
bash like

    'a,. w !SomeBashCommand
    'a,.!someBashFilterCommand

It's simple, but oh so convenient to cobble together bash snippets in
vim.

To shell out to bash, use Cygwin console Vim. You can shell out from Windows gvim too, but preferably to cmd.exe. The language is less powerful than bash's but it is possible to do quite interesting things with it (not always without GOTO statements, at least in the "oldest" Dos flavours of the language).


However, I will miss the ability to simply do a Windows cut of a swath
of text (say, from a Palm Desktop's Memo app, or a Firefox window
submitting a post through Google Groups), dumping it into gvim with
with middle mouse button (works with both Windows&  cygwin/X-windows
gvim), editing the text, then cutting and pasting back to the windows
app.  I do that all the time (vim-less editing is so....neutered?)
Well, actually, I can still do it, but only if there are no bullet
symbols -- bullets would require the more round-about way of dumping
it into Notepad, writing to a file, then opening that with gvim.  And
you can bet that the default path for Notepad is far different from
the one for my Notepad; that would be too easy.  Fortunately, this
wrinkle can be likely smoothened with a few soft links in Cygwin.


On Windows, you would use Edit=>Cut (or Ctrl-X on non-Vim, or "+d on Vim), Edit=>Copy (or Ctrl-C on non-Vim or "+y on Vim), Edit=>Paste (or Ctrl-V on non-Vim, or "+p or "+P on Vim). Or, linewise on Vim, :[range]d+ :[range]y+ and :[range]put+

see
        :help quoteplus
        :help :y
        :help :d
        :help :put

Remember, X11 has the "selection" (for middle-mouse-pasting anything selected) and the "clipboard" (for Edit=>Cut, Edit=>Copy, Edit=>Paste); the Windows GUI has only the latter.


Best regards,
Tony.
--
You have prepared a proposal for your supervisor.  The success of this
proposal will mean increasing your salary 20%.  In the middle of your
proposal your supervisor leans over to look at your report and spits
into your coffee.  You:

(a) Tell him you take your coffee black.

(b) Ask him if he has any communicable diseases.

(c) Show him who's in command; promptly take a leak in his "In"
    basket.
-- 
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

Reply via email to