Copy Paste Issues

classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|

Copy Paste Issues

Ajay Jain
Hi,

I am facing quite some issues with copy paste on vim. I expected
things to work nicely in the default state, but I am wrong as I
believe we need to do some key mappings. My .vimrc is simple:  It only
has the following line:
source $VIMRUNTIME/vimrc_example.vim
However, the issue is that copy paste from Vim to Xterm does not work
fine. I looked over the Internet to find that I need to add set
mouse=r so that the copy paste with mouse works properly. Now I see
that copy paste Using Ctrl-Insert, Shift-Insert, Ctrl-Delete does not
work properly.
Could somebody please help me with the basic settings? What all is
required to be put in addition to the default so that copy paste using
Ctrl/Shift/Insert & Mouse works seamlessly?

Regards,
Ajay.

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
Reply | Threaded
Open this post in threaded view
|

Re: Copy Paste Issues

Ajay Jain
> I am facing quite some issues with copy paste on vim. I expected
> things to work nicely in the default state, but I am wrong as I
> believe we need to do some key mappings. My .vimrc is simple:  It only
> has the following line:
> source $VIMRUNTIME/vimrc_example.vim
> However, the issue is that copy paste from Vim to Xterm does not work
> fine. I looked over the Internet to find that I need to add set
> mouse=r so that the copy paste with mouse works properly. Now I see
> that copy paste Using Ctrl-Insert, Shift-Insert, Ctrl-Delete does not
> work properly.
> Could somebody please help me with the basic settings? What all is
> required to be put in addition to the default so that copy paste using
> Ctrl/Shift/Insert & Mouse works seamlessly?

I am unable to copy anything from vim to xterm now. Copy /Paste using
mouse OR keyboard shortcuts is not working. I urge for any pointers ..
I have gone through much information over the Internet, but nothing
seems to work. Please provide some pointers.

Sorry for my ignorance in this.

Regards,
Ajay.

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
Reply | Threaded
Open this post in threaded view
|

Re: Copy Paste Issues

Ven Tadipatri
In reply to this post by Ajay Jain
On Tue, Oct 12, 2010 at 8:42 AM, Ajay Jain <[hidden email]> wrote:
> Hi,
>
> I am facing quite some issues with copy paste on vim. I expected

It looks like a lot of people are having issues with copy and paste on vim.
I think that this is definitely an issue that needs to be addressed
with the next version of vim.
Or, what would perhaps be easier, the wiki should be updated with some
different approaches on how to get copy and paste working.

> things to work nicely in the default state, but I am wrong as I
> believe we need to do some key mappings. My .vimrc is simple:  It only

Key mappings is one approach If you are able to install xclip, you
could call that whenever the desired key combo is pressed, but I had
to play around a bit with the syntax to get it to work.  You could
copy in visual mode, by selecting the text you want, and running
whatever key combo you have a vmap for in your vimrc. On Windows
Cygwin, the /dev/clipboard gives you access to the clipboard, so you
can copy and paste to it.
  Another option someone suggested is running gvim -v instead of vi. I
had other issues with this, but it seemed that at least on Linux, the
+ buffer was working correctly to copy and paste from the system
clipboard.

> has the following line:
> source $VIMRUNTIME/vimrc_example.vim


> However, the issue is that copy paste from Vim to Xterm does not work
> fine. I looked over the Internet to find that I need to add set
> mouse=r so that the copy paste with mouse works properly. Now I see
> that copy paste Using Ctrl-Insert, Shift-Insert, Ctrl-Delete does not
> work properly.

> Could somebody please help me with the basic settings? What all is
> required to be put in addition to the default so that copy paste using
> Ctrl/Shift/Insert & Mouse works seamlessly?

I've been struggling with this for a while, and so far there doesn't
really seem to be a good, clean (as in not some elaborate clunky key
mapping in the vimrc), platform independent (works without relying on
xclip or Cygwin's clipboard) solution to get copy and paste working.

>
> Regards,
> Ajay.
>

Regards,
Ven

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
Reply | Threaded
Open this post in threaded view
|

Re: Copy Paste Issues

Yegappan Lakshmanan
In reply to this post by Ajay Jain
Hi,

On Tue, Oct 12, 2010 at 10:16 AM, Ajay Jain <[hidden email]> wrote:

>> I am facing quite some issues with copy paste on vim. I expected
>> things to work nicely in the default state, but I am wrong as I
>> believe we need to do some key mappings. My .vimrc is simple:  It only
>> has the following line:
>> source $VIMRUNTIME/vimrc_example.vim
>> However, the issue is that copy paste from Vim to Xterm does not work
>> fine. I looked over the Internet to find that I need to add set
>> mouse=r so that the copy paste with mouse works properly. Now I see
>> that copy paste Using Ctrl-Insert, Shift-Insert, Ctrl-Delete does not
>> work properly.
>> Could somebody please help me with the basic settings? What all is
>> required to be put in addition to the default so that copy paste using
>> Ctrl/Shift/Insert & Mouse works seamlessly?
>
> I am unable to copy anything from vim to xterm now. Copy /Paste using
> mouse OR keyboard shortcuts is not working. I urge for any pointers ..
> I have gone through much information over the Internet, but nothing
> seems to work. Please provide some pointers.
>

What is the output of the following Vim command?

   :version

You should see +xterm_clipboard in the above output to access the
clipboard from Vim.

To copy/paste from Vim using the clipboard, you don't need any special
settings or external utilities.

You can read the following help topics for more information:

   :help 'clipboard'
   :help x11-selection
   :help clipboard
   :help 'go-a'
   :help 'mouse'
   :help xterm-copy-paste
   :help 9.3

- Yegappan

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
Reply | Threaded
Open this post in threaded view
|

Re: Copy Paste Issues

Benjamin Fritz
In reply to this post by Ven Tadipatri


On Oct 13, 10:36 am, Ven Tadipatri <[hidden email]> wrote:
>
> I've been struggling with this for a while, and so far there doesn't
> really seem to be a good, clean (as in not some elaborate clunky key
> mapping in the vimrc), platform independent (works without relying on
> xclip or Cygwin's clipboard) solution to get copy and paste working.
>

Using gvim, there is almost never any additional setup for seamless
clipboard integration, with the possible exception of 'mouse' options
based on your own preferences on how you'll be using the mouse.

It is very difficult to do ANYTHING platform-independent if you're
working in a terminal.

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
Reply | Threaded
Open this post in threaded view
|

Re: Copy Paste Issues

François Ingelrest
> It is very difficult to do ANYTHING platform-independent if you're
> working in a terminal.

I'm also having issues with copy-pasting since I installed the latest
Ubuntu a few days ago. I've been compiling my own Vim without GUI for
a few years, and I was previously able to copy-paste using the mouse
without any problem. Now for some reasons I must use the <shift> key
to get it working... I can't tell what has changed exactly that's
altering the copy-paste feature.

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
Reply | Threaded
Open this post in threaded view
|

Re: Copy Paste Issues

Yegappan Lakshmanan
Hi,

2010/10/13 François Ingelrest <[hidden email]>:

>> It is very difficult to do ANYTHING platform-independent if you're
>> working in a terminal.
>
> I'm also having issues with copy-pasting since I installed the latest
> Ubuntu a few days ago. I've been compiling my own Vim without GUI for
> a few years, and I was previously able to copy-paste using the mouse
> without any problem. Now for some reasons I must use the <shift> key
> to get it working... I can't tell what has changed exactly that's
> altering the copy-paste feature.
>

You should first check the output of the ":version" command and make
sure that +xterm-clipboard is present.

When running Vim in an xterm, you can either let Vim control the mouse
or let xterm control the mouse. This is configured by the 'mouse' option.

If the 'mouse' option is not set (or set to the default value), then Vim will
not control the mouse. You cannot move the Vim text cursor using the
mouse. When you select some text using the mouse, xterm will copy
it to the X11 cut buffer. When you press both the mouse buttons,
xterm will paste the text from the cut buffer.

If the 'mouse' option is set to 'a' or some other value, then Vim controls
the mouse. The mode (normal or insert or visual, etc) in which Vim
controls the mouse is configured by the 'mouse' option. You can move
the Vim text cursor using the mouse. When you select some text,
the 'clipboard' option setting is used to determine whether to transfer
the selected text to the clipboard or not. The default setting is to
transfer the selected text to the clipboard. If you want to use the
xterm selection mechanism in this mode, then you can press the
<Shift> key. If you press <Shift> key when selecting text using the
mouse, then Vim doesn't control the mouse and xterm controls the
mouse.

- Yegappan

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
Reply | Threaded
Open this post in threaded view
|

Re: Copy Paste Issues

Christian Brabandt
Hi Yegappan!

On Mi, 13 Okt 2010, Yegappan Lakshmanan wrote:

> Hi,
>
> 2010/10/13 François Ingelrest <[hidden email]>:
> >> It is very difficult to do ANYTHING platform-independent if you're
> >> working in a terminal.
> >
> > I'm also having issues with copy-pasting since I installed the latest
> > Ubuntu a few days ago. I've been compiling my own Vim without GUI for
> > a few years, and I was previously able to copy-paste using the mouse
> > without any problem. Now for some reasons I must use the <shift> key
> > to get it working... I can't tell what has changed exactly that's
> > altering the copy-paste feature.
> >
>
> You should first check the output of the ":version" command and make
> sure that +xterm-clipboard is present.
>
> When running Vim in an xterm, you can either let Vim control the mouse
> or let xterm control the mouse. This is configured by the 'mouse' option.
>
> If the 'mouse' option is not set (or set to the default value), then Vim will
> not control the mouse. You cannot move the Vim text cursor using the
> mouse. When you select some text using the mouse, xterm will copy
> it to the X11 cut buffer. When you press both the mouse buttons,
> xterm will paste the text from the cut buffer.
>
> If the 'mouse' option is set to 'a' or some other value, then Vim controls
> the mouse. The mode (normal or insert or visual, etc) in which Vim
> controls the mouse is configured by the 'mouse' option. You can move
> the Vim text cursor using the mouse. When you select some text,
> the 'clipboard' option setting is used to determine whether to transfer
> the selected text to the clipboard or not. The default setting is to
> transfer the selected text to the clipboard. If you want to use the
> xterm selection mechanism in this mode, then you can press the
> <Shift> key. If you press <Shift> key when selecting text using the
> mouse, then Vim doesn't control the mouse and xterm controls the
> mouse.

Thanks for the info. I put it in the faq, if you don't mind.

regards,
Christian

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
Reply | Threaded
Open this post in threaded view
|

Re: Copy Paste Issues

rameo
In reply to this post by Ven Tadipatri
On Oct 13, 5:36 pm, Ven Tadipatri <[hidden email]> wrote:

> On Tue, Oct 12, 2010 at 8:42 AM, Ajay Jain <[hidden email]> wrote:
> > Hi,
>
> > I am facing quite some issues with copypasteon vim. I expected
>
> It looks like a lot of people are having issues with copy andpasteon vim.
> I think that this is definitely an issue that needs to be addressed
> with the next version of vim.
> Or, what would perhaps be easier, the wiki should be updated with some
> different approaches on how to get copy andpasteworking.
>
> > things to work nicely in the default state, but I am wrong as I
> > believe we need to do some key mappings. My .vimrc is simple:  It only
>
> Key mappings is one approach If you are able to install xclip, you
> could call that whenever the desired key combo is pressed, but I had
> to play around a bit with the syntax to get it to work.  You could
> copy in visual mode, by selecting the text you want, and running
> whatever key combo you have a vmap for in your vimrc. On Windows
> Cygwin, the /dev/clipboard gives you access to the clipboard, so you
> can copy andpasteto it.
>   Another option someone suggested is running gvim -v instead of vi. I
> had other issues with this, but it seemed that at least on Linux, the
> + buffer was working correctly to copy andpastefrom the system
> clipboard.
>
> > has the following line:
> > source $VIMRUNTIME/vimrc_example.vim
> > However, the issue is that copypastefrom Vim to Xterm does not work
> > fine. I looked over the Internet to find that I need to add set
> > mouse=r so that the copypastewith mouse works properly. Now I see
> > that copypasteUsing Ctrl-Insert, Shift-Insert, Ctrl-Delete does not
> > work properly.
> > Could somebody please help me with the basic settings? What all is
> > required to be put in addition to the default so that copypasteusing
> > Ctrl/Shift/Insert & Mouse works seamlessly?
>
> I've been struggling with this for a while, and so far there doesn't
> really seem to be a good, clean (as in not some elaborate clunky key
> mapping in the vimrc), platform independent (works without relying on
> xclip or Cygwin's clipboard) solution to get copy andpasteworking.
>
>
>
> > Regards,
> > Ajay.
>
> Regards,
> Ven

I have paste issues also in vim.
It makes me crazy.
I dedicated so much time to make it as my editors as notepad, notepad+
+ crimson, psp,
which I used before.
I tried all possible combinations but haven't found the solution.

mswin.vim doesn't resolve things.

Does anyone have the configuration to copy/cut/paste/undo as in
windows?

I would like to know also how to map the p to P and P to p or gives
that problems
in other plugins?

Thanks in advance.

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
Reply | Threaded
Open this post in threaded view
|

Fwd: Copy Paste Issues

Cesar Rodriguez


---------- Forwarded message ----------
From: rameo <[hidden email]>
Date: 21 October 2010 10:46
Subject: Re: Copy Paste Issues
To: vim_use <[hidden email]>


On Oct 13, 5:36 pm, Ven Tadipatri <[hidden email]> wrote:
> On Tue, Oct 12, 2010 at 8:42 AM, Ajay Jain <[hidden email]> wrote:
> > Hi,
>
> > I am facing quite some issues with copypasteon vim. I expected
>
> It looks like a lot of people are having issues with copy andpasteon vim.
> I think that this is definitely an issue that needs to be addressed
> with the next version of vim.
> Or, what would perhaps be easier, the wiki should be updated with some
> different approaches on how to get copy andpasteworking.
>
> > things to work nicely in the default state, but I am wrong as I
> > believe we need to do some key mappings. My .vimrc is simple:  It only
>
> Key mappings is one approach If you are able to install xclip, you
> could call that whenever the desired key combo is pressed, but I had
> to play around a bit with the syntax to get it to work.  You could
> copy in visual mode, by selecting the text you want, and running
> whatever key combo you have a vmap for in your vimrc. On Windows
> Cygwin, the /dev/clipboard gives you access to the clipboard, so you
> can copy andpasteto it.
>   Another option someone suggested is running gvim -v instead of vi. I
> had other issues with this, but it seemed that at least on Linux, the
> + buffer was working correctly to copy andpastefrom the system
> clipboard.
>
> > has the following line:
> > source $VIMRUNTIME/vimrc_example.vim
> > However, the issue is that copypastefrom Vim to Xterm does not work
> > fine. I looked over the Internet to find that I need to add set
> > mouse=r so that the copypastewith mouse works properly. Now I see
> > that copypasteUsing Ctrl-Insert, Shift-Insert, Ctrl-Delete does not
> > work properly.
> > Could somebody please help me with the basic settings? What all is
> > required to be put in addition to the default so that copypasteusing
> > Ctrl/Shift/Insert & Mouse works seamlessly?
>
> I've been struggling with this for a while, and so far there doesn't
> really seem to be a good, clean (as in not some elaborate clunky key
> mapping in the vimrc), platform independent (works without relying on
> xclip or Cygwin's clipboard) solution to get copy andpasteworking.
>
>
>
> > Regards,
> > Ajay.
>
> Regards,
> Ven

I have paste issues also in vim.
It makes me crazy.
I dedicated so much time to make it as my editors as notepad, notepad+
+ crimson, psp,
which I used before.
I tried all possible combinations but haven't found the solution.

mswin.vim doesn't resolve things.

Does anyone have the configuration to copy/cut/paste/undo as
windows?

I would like to know also how to map the p to P and P to p or gives
that problems
in other plugins?

Thanks in advance.

hello
 I found this
"http://www.ukuug.org/events/linux2004/programme/paper-SMyers/Linux_2004_slides/vim_tips/"
a few weeks ago:

nnoremap <F5> :set invpaste paste?<Enter>
imap <F5> <C-O><F5>
set pastetoggle=<F5>
set pastetoggle=<F5>

 F5 before and after pasting

maybe could help, I don't try yet, but who knows.


--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php



--
Cesar Rodriguez

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
Reply | Threaded
Open this post in threaded view
|

Re: Copy Paste Issues

Benjamin Fritz
In reply to this post by rameo


On Oct 21, 10:46 am, rameo <[hidden email]> wrote:
>
> I have paste issues also in vim.

What are these issues? We can't solve them if we don't know what they
are.

> It makes me crazy.
> I dedicated so much time to make it as my editors as notepad, notepad+
> + crimson, psp,
> which I used before.
> I tried all possible combinations but haven't found the solution.

It drives me crazy when people post questions like "my paste is
broken, fix it for me" with no details.

>
> mswin.vim doesn't resolve things.
>
> Does anyone have the configuration to copy/cut/paste/undo as in
> windows?

Yes, sourcing mswin.vim will map keys to make paste act like other
editors. I wouldn't recommend it though. What doesn't mswin.vim do
that you expect it to do?

>
> I would like to know also how to map the p to P and P to p or gives
> that problems
> in other plugins?
>

You want p to paste before, and P to paste after?

:noremap p P
:noremap P p

Map other modes as well if needed.

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php