Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
basic vim usage
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  12 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
vicky b  
View profile  
 More options Nov 8 2012, 6:23 am
From: vicky b <vickyb2...@gmail.com>
Date: Thu, 8 Nov 2012 16:53:20 +0530
Local: Thurs, Nov 8 2012 6:23 am
Subject: basic vim usage

I have started to learn vim in this modern enviroment where gui takes
prefers , one thing that still me back to other editors is the ease with
which we can  copy and paste , can anybody help me out with safe effect in
vim or any thing of that sort

--
*Thanks & Regards
 Vickyb

*


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Marco  
View profile  
 More options Nov 8 2012, 7:29 am
From: Marco <net...@lavabit.com>
Date: Thu, 8 Nov 2012 13:29:30 +0100
Local: Thurs, Nov 8 2012 7:29 am
Subject: Re: basic vim usage
2012-11-08 vicky b:

> one thing that still me back to other editors is the ease with
> which we can  copy and paste , can anybody help me out with safe
> effect in vim or any thing of that sort

You can

  set clipboard=unnamed

to use the system clipboard for yank and paste operations. With this
option you can easily copy and paste within vim and to/from other
applications. For further information see

  :h 'clipboard'

Marco


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Karthick Gururaj  
View profile  
 More options Nov 8 2012, 7:36 am
From: Karthick Gururaj <karthick.guru...@gmail.com>
Date: Thu, 8 Nov 2012 18:05:51 +0530
Local: Thurs, Nov 8 2012 7:35 am
Subject: Re: basic vim usage

On Thu, Nov 8, 2012 at 4:53 PM, vicky b <vickyb2...@gmail.com> wrote:
> I have started to learn vim in this modern enviroment where gui takes
> prefers , one thing that still me back to other editors is the ease with
> which we can  copy and paste , can anybody help me out with safe effect in
> vim or any thing of that sort

If you are using gvim, you have the option of clicking on "Edit" -> "Copy"
and "Edit" -> "Paste". You need to select some text first obviously, before
copy. Selection can be done with mouse. Using CTRL-C and CTRL-V might also
work for copy/paste - whether it does work or not depends on a few factors.

It that the answer you were looking for?

Also, if GUI is what you want to work with, vim may not be worth looking
at. Just my opinion.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
vicky b  
View profile   Translate to Translated (View Original)
 More options Nov 8 2012, 7:37 am
From: vicky b <vickyb2...@gmail.com>
Date: Thu, 8 Nov 2012 18:07:42 +0530
Local: Thurs, Nov 8 2012 7:37 am
Subject: Re: basic vim usage

no  i dont want to use GUI , i want to use vim not gvim  how can copy and
paste with ease in vim

On Thu, Nov 8, 2012 at 6:05 PM, Karthick Gururaj <karthick.guru...@gmail.com

--
*Thanks & Regards
 Vickyb

*


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Fredrik Andersson  
View profile  
 More options Nov 8 2012, 7:44 am
From: Fredrik Andersson <sed...@consbox.se>
Date: Thu, 8 Nov 2012 13:43:33 +0100
Local: Thurs, Nov 8 2012 7:43 am
Subject: Re: basic vim usage

On Thu, Nov 8, 2012 at 1:37 PM, vicky b <vickyb2...@gmail.com> wrote:
> no  i dont want to use GUI , i want to use vim not gvim  how can copy and
> paste with ease in vim

y for yank (copy)
p for paste

Use the * register to yank/paste to/from the system clipboard.

This should be covered in the vimtutorial, run vimtutor if you have not
done so yet.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Marcin Szamotulski  
View profile  
 More options Nov 8 2012, 8:04 am
From: Marcin Szamotulski <msza...@gmail.com>
Date: Thu, 8 Nov 2012 13:03:50 +0000
Local: Thurs, Nov 8 2012 8:03 am
Subject: Re: basic vim usage
On 13:43 Thu 08 Nov     , Fredrik Andersson wrote:

> On Thu, Nov 8, 2012 at 1:37 PM, vicky b <vickyb2...@gmail.com> wrote:

> > no  i dont want to use GUI , i want to use vim not gvim  how can copy and
> > paste with ease in vim

> y for yank (copy)
> p for paste

> Use the * register to yank/paste to/from the system clipboard.

> This should be covered in the vimtutorial, run vimtutor if you have not
> done so yet.

Hi,

You can also paste from a register in the insert mode, see ":help i^r".
For example CTRL-R0 in insert mode will paste the recent yank.  There is
also ":help i^r^r" (e.g. CTRL-R_CTRL-R) which puts the content of the
register literally. This will differ from ^r if there is a backspace in
the register: using ^r will delete like backspace does, ^r^r will put
the backspace literally into the buffer.

Best regards,
Marcin


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Phil Dobbin  
View profile  
 More options Nov 8 2012, 8:14 am
From: Phil Dobbin <phildob...@gmail.com>
Date: Thu, 08 Nov 2012 13:13:39 +0000
Local: Thurs, Nov 8 2012 8:13 am
Subject: Re: basic vim usage

Also, depending on which term you are using (this works in
gnome-terminal & konsole), you can select the text & then use
ctrl-shift-c to copy & ctrl-shift-p to paste if you get really stuck
and/or confused initially. And that works across all consoles you have
open, local & remote.

Cheers,

  Phil...

--
But masters, remember that I am an ass.
Though it be not written down,
yet forget not that I am an ass.

    Wm. Shakespeare - Much Ado About Nothing

  signature.asc
< 1K Download

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
stosss  
View profile  
 More options Nov 8 2012, 8:23 am
From: stosss <sto...@gmail.com>
Date: Thu, 8 Nov 2012 08:22:38 -0500
Local: Thurs, Nov 8 2012 8:22 am
Subject: Re: basic vim usage

On Thu, Nov 8, 2012 at 6:23 AM, vicky b <vickyb2...@gmail.com> wrote:
> I have started to learn vim in this modern enviroment where gui takes
> prefers , one thing that still me back to other editors is the ease with
> which we can  copy and paste , can anybody help me out with safe effect in
> vim or any thing of that sort

Here is a cool feature that some Linux users don't know about.

Linux has the ability to copy without using a copy command. Simply
high lite the text you want and then place the curse where you want to
paste that text and just click the middle mouse button. This is
available system wide on Linux maybe Mac too but no at all on windows.

In gVim you have to be in insert mode for it to work coming from
another app to gVim. Inside gVim from one place to another you can be
in command mode and do it. This will work in Vim in the terminal too.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Shlomi Fish  
View profile  
 More options Nov 8 2012, 8:30 am
From: Shlomi Fish <shlo...@shlomifish.org>
Date: Thu, 8 Nov 2012 15:30:13 +0200
Local: Thurs, Nov 8 2012 8:30 am
Subject: Re: basic vim usage
Hi Vicky,

On Thu, 8 Nov 2012 18:07:42 +0530

vicky b <vickyb2...@gmail.com> wrote:
> no  i dont want to use GUI , i want to use vim not gvim  how can copy and
> paste with ease in vim

if you're interested in copying and pasting within Vim itself, you can use the
register yanking/deleting/pasting commands, like y, d, c, p and P. If you're
interested in copying to the system buffer, you can prefix these commands with
"+ (double-quotes-plus) or "* (double-quotes-asterisk). For more information,
read ":help change.txt" in Vim (without the quotes).

Regards,

        Shlomi Fish

--
-----------------------------------------------------------------
Shlomi Fish       http://www.shlomifish.org/
Chuck Norris/etc. Facts - http://www.shlomifish.org/humour/bits/facts/

The English Wikipedia: now you don't see it — now you do.

Please reply to list if it's a mailing list post - http://shlom.in/reply .


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Suresh Govindachar  
View profile  
 More options Nov 8 2012, 8:40 am
From: Suresh Govindachar <sgovindac...@yahoo.com>
Date: Thu, 08 Nov 2012 05:40:29 -0800
Local: Thurs, Nov 8 2012 8:40 am
Subject: Re: basic vim usage
On 11/8/2012 5:22 AM, stosss wrote:

 > Linux has the ability to copy without using a copy command. Simply
 > high lite the text you want and then place the curse where you want to
 > paste that text and just click the middle mouse button. This is
 > available system wide on Linux maybe Mac too but no at all on windows.

That actually works on my Windows gvim:  In normal mode:  highlight some
text, move mouse to some place and press middle button:  stuff that was
highlighted gets pasted.

Also, highlight some text in normal mode, hit "<esc>", go to some other
place (perhaps using ijkl keys), hit "p" (to put the highlighted text at
current location).

--Suresh


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Tim Chase  
View profile  
 More options Nov 8 2012, 9:05 am
From: Tim Chase <v...@tim.thechases.com>
Date: Thu, 08 Nov 2012 08:05:33 -0600
Local: Thurs, Nov 8 2012 9:05 am
Subject: Re: basic vim usage
On 11/08/12 05:23, vicky b wrote:

> I have started to learn vim in this modern enviroment where gui
> takes prefers , one thing that still me back to other editors is
> the ease with which we can  copy and paste , can anybody help me
> out with safe effect in vim or any thing of that sort

As others have mentioned, you might want to go through the vimtutor
that is available when vim is installed.

However, it's helpful to know that the "y"ank, "d"elete, "c"hange,
and "s"ubstitute commands all alter the contents of "registers".
The p/P commands are used to paste contents of those registers in
Normal mode, and (as mentioned elsewhere, control+R can be used to
insert register contents in Insert mode).  These are lots of
registers in vim, unlike Windows and Mac, where you usually only
have one system clipboard.  By default Vim operates on the unnamed
register, so when you yank/delete/change/substitute, it puts the
thing in this scratch register.  By default when you paste, it uses
this register.  However, you can prefix the
yank/delete/change/substitute/paste commands by naming the register
you want to operate on, such as

  "by3w

will yank 3 words into the "b" register, then

  "bp

will paste the contents of the "b" register at some other location.
 You can list the contents of registers with the

  :reg

command.  There are registers for filenames, expression evaluation,
most recent deletions, most recent yank, etc.  If you want to
interchange with other applications, you may be interested in the
"system clipboard" register (or the "selection" register, if you're
running on X/Linux/BSD) which is effectively what other applications
will refer to as *the* clipboard.  You *can* set 'clipboard' to
include "unnamed" as one of its options, but after trying it for an
afternoon, I found it drove me absolutely bonkers and I turned it
right back off.

Reading up at

  :help registers

to learn LOTS more on them.

-tim


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Gary Johnson  
View profile  
 More options Nov 8 2012, 3:42 pm
From: Gary Johnson <garyj...@spocom.com>
Date: Thu, 8 Nov 2012 12:43:14 -0800
Local: Thurs, Nov 8 2012 3:43 pm
Subject: Re: basic vim usage
On 2012-11-08, Suresh Govindachar wrote:

> On 11/8/2012 5:22 AM, stosss wrote:

> > Linux has the ability to copy without using a copy command. Simply
> > high lite the text you want and then place the curse where you want to
> > paste that text and just click the middle mouse button. This is
> > available system wide on Linux maybe Mac too but no at all on windows.

> That actually works on my Windows gvim:  In normal mode:  highlight
> some text, move mouse to some place and press middle button:  stuff
> that was highlighted gets pasted.

> Also, highlight some text in normal mode, hit "<esc>", go to some
> other place (perhaps using ijkl keys), hit "p" (to put the
> highlighted text at current location).

Yes, this does work very well.

With a version of vim that has +clipboard, +X11 and +xterm_clipboard
features and a ~/.vimrc that has

    set mouse=a
    set clipboard^=unnamed

you can copy and paste between different instances of vim, gvim and
other applications running in Windows or in X11 on Linux using any
of the techniques discussed here, including the traditional X11
left-click-to-copy, middle-click-to-paste, in normal and insert
modes.

One thing to be careful of:  some Linux distributions build separate
binaries for vim and gvim and their vim build does not include
support for X11 or the clipboard.  So make sure you are using a vim
with that support.  A workaround for this is to use "gvim -v".  This
will execute the gvim binary, giving you X11 support, but as a
terminal application, i.e. just like "vim".

Having said all that, I will agree with Tim that including "unnamed"
in 'clipboard' may not be what you want.  The advantage is that
everything you select goes to the clipboard.  The disadvantage is
that everything you select goes to the clipboard.  The result is
that it either "just works" or drives you nuts, depending on your
expectations.

HTH,
Gary


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »