Hi Ted,
I'm getting more and more confused by the copy/paste to and from gvim.
In genenral (not in TeX files), hightlight then middle-click works
Xwindow-->Gvim; but highlight then middle-click doesnot work the other
way (Gvim-->Xwindow).
This is beause text is copy to different selections. In short, can I
make highlight and middle-click works at both directions
(Xwindow<-->GVIM)?
Thank you,
Liang
my OS is:
Linux titania 2.6.34.10-0.4-desktop #1 SMP PREEMPT 2011-10-19 22:16:41
+0200 x86_64 x86_64 x86_64 GNU/Linux
And my Gvim version is:
titania$ gvim --version
VIM - Vi IMproved 7.3 (2010 Aug 15, compiled Jul 20 2012 17:49:19)
Compiled by dh023729@chestnut
Normal version with X11-Athena GUI. Features included (+) or not (-):
-arabic +autocmd +balloon_eval +browse +builtin_terms +byte_offset +cindent
+clientserver +clipboard +cmdline_compl +cmdline_hist +cmdline_info +comments
-conceal +cryptv -cscope +cursorbind +cursorshape +dialog_con_gui +diff
+digraphs -dnd -ebcdic -emacs_tags +eval +ex_extra +extra_search -farsi
+file_in_path +find_in_path +float +folding -footer +fork() +gettext
-hangul_input -iconv +insert_expand +jumplist -keymap -langmap +libcall
+linebreak +lispindent +listcmds +localmap -lua +menu +mksession +modify_fname
+mouse +mouseshape -mouse_dec +mouse_gpm -mouse_jsbterm -mouse_netterm
-mouse_sysmouse +mouse_xterm -multi_byte +multi_lang -mzscheme +netbeans_intg
-osfiletype +path_extra -perl +persistent_undo +postscript +printer -profile
-python -python3 +quickfix +reltime -rightleft -ruby +scrollbind +signs
+smartindent -sniff +startuptime +statusline -sun_workshop +syntax +tag_binary
+tag_old_static -tag_any_white -tcl +terminfo +termresponse +textobjects +title
+toolbar +user_commands +vertsplit +virtualedit +visual +visualextra +viminfo
+vreplace +wildignore +wildmenu +windows +writebackup +X11 +xfontset +xim
+xsmp_interact +xterm_clipboard -xterm_save
system vimrc file: "$VIM/vimrc"
user vimrc file: "$HOME/.vimrc"
user exrc file: "$HOME/.exrc"
system gvimrc file: "$VIM/gvimrc"
user gvimrc file: "$HOME/.gvimrc"
system menu file: "$VIMRUNTIME/menu.vim"
fall-back for $VIM: "/home/dh023729/share/vim"
Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_ATHENA
-DFUNCPROTO=15 -DNARROWPROTO -O2 -fno-strength-reduce -Wall
-D_FORTIFY_SOURCE=1
Linking: gcc -o vim -lXaw -lXext -lm -lncurses -lgpm
On 23 July 2012 18:12, Ted Pavlic <te...@te...> wrote:
> 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...>
|