Liang --
You have the problem with every TeX file you open?
From your message, it sounds like the major problem is that "+p and "*p
are not functioning the same in TeX files as they do elsewhere. Correct?
That is, middle-click activates "*p as designed, but "*p isn't grabbing
your primary selection (which is what you would prefer). Correct?
I don't have this problem on my machine. My :version reports:
VIM - Vi IMproved 7.3 (2010 Aug 15, compiled Jul 13 2012 05:24:27)
Included patches: 1-600
Compiled by ArchLinux
along with several features included and excluded, including
+X11
-xfontset
+xim
+xterm_clipboard
-xterm_save
I don't recall what all of those features are, but I believe that some
(most definitely +xterm_clipboard) affect the handling of "*p and "+p.
I did a git grep through the vim-latex repo for things that I thought
might be related, but I didn't see anything that caught my eye.
Are you sure there's no other tex-specific settings you have? Say in
your ftplugin/tex? (I don't even know what sort of setting you would
look for; as far as I know (??), the semantics of "*p and "+p are
hard-coded at compile time)
--Ted
On 07/23/2012 02:21 AM, Liang Guo wrote:
> Hi Ted,
>
> Thanks for the reply. I figured that you tried tell me that i confused the two copy-paste methods. You think that I highlight some text, and then ctrl+C (copy text in clipboard selection), then used middle-click in gvim. The random text is because the middle-click pass the text from primary selection (as I highlight other text somewhere else) rather than from clipboard selection.
>
> However, this is not the case. I tried both "*p and "+p. "*p pasted the text from ctrl+C. But, "+p did not pasted anything which I highlighted, instead it shown some text like a latex template.
>
> This situation occurs only when I edit a latex file. The middle-click or "+p/"*p works fine when I edit files with other suffixes.
>
> Any idea?
>
> Liang
>
> On 23 Jul 2012, at 08:38, Ted Pavlic <te...@te...> wrote:
>
>> Liang --
>>
>> Before continuing, are you sure there's no confusion about "primary"
>> and "clipboard" selections in X11? Your trouble may come from being
>> accustomed to using vim in a terminal (not an X virtual terminal) and
>> then moving to using gvim alone (or, perhaps, vim in a virtual
>> terminal in X11). What is getting pasted when you hit your middle
>> button is not random; it is likely text you have highlighted (perhaps
>> inadvertently) in another window.
>>
>> Here's a decent reference on primary and clipboard selections in X11
>> (in this case, they refer to EMacs and XEmacs, but the general
>> description of these different types of selections applies for Vim and
>> Gvim as well):
>>
>> http://www.jwz.org/doc/x-cut-and-paste.html
>>
>> Your middle mouse button in an X11 application (like GVim) will access
>> the "primary" (as opposed to "clipboard") selection. So if you've
>> highlighted some text in one window and middle-click in GVim, you
>> should expect that highlighted text to get pasted even if you didn't
>> explicitly "copy" it anywhere.
>>
>> It sounds like you would prefer your middle mouse button to do the same thing as
>>
>> "+p
>>
>> but instead you're getting the result of
>>
>> "*p
>>
>> Is that correct? Can you try those two combinations and compare them
>> to your mouse click?
>>
>> You may be interested in:
>>
>> :help clipboard
>>
>> and
>>
>> :help x11-selection
>>
>> Best --
>> Ted
>>
>> On Fri, Jul 20, 2012 at 10:46 AM, Liang Guo (Gmail)
>> <lia...@gm...> wrote:
>>> Hi,
>>>
>>> I used to use vim-latex in vim-7.3, and I do not have any problem to use mouse middle button to paste text from elsewhere.
>>>
>>> And, now I try to edit my latex file in gvim-7.3, things getting bizarre. Every time I press middle button, random text is pasted. And this only occurred when I'm editing latex file, files with .tex as suffix. Therefore, I'm sure it is something related to vim-latex in gvim.
>>>
>>> Does anyone encounter the similar problem?
>>>
>>> Thank you,
>>> Liang
>>>
>>>
>>> ------------------------------------------------------------------------------
>>> Live Security Virtual Conference
>>> Exclusive live event will cover all the ways today's security and
>>> threat landscape has changed and how IT managers can respond. Discussions
>>> will include endpoint security, mobile security and the latest in malware
>>> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
>>> _______________________________________________
>>> Vim-latex-devel mailing list
>>> Vim...@li...
>>> https://lists.sourceforge.net/lists/listinfo/vim-latex-devel
>>
>>
>>
>> --
>> Ted Pavlic <te...@te...>
--
Ted Pavlic <te...@te...>
|