FANDOM


(merge 1 comment, respond to question, mark resolution of question as "todo")
Line 18: Line 18:
 
<pre>
 
<pre>
 
" Method 1 (for Xwindows and mswindows), this map is different from the one shown in vim documentation:
 
" Method 1 (for Xwindows and mswindows), this map is different from the one shown in vim documentation:
:noremap &lt;LeftRelease&gt; "+y&lt;LeftRelease&gt;
+
:noremap <LeftRelease> "+y<LeftRelease>
   
 
" Method 2 (works only on ms-windows vim63):
 
" Method 2 (works only on ms-windows vim63):
:set guioptions=a
+
:set guioptions+=a
 
</pre>
 
</pre>
   
Line 28: Line 28:
   
 
----
 
----
Also you want to use this (to just append the "a" to your options):
+
{{todo}}
<pre>
+
Can someone tell me how to disable this autocopy function. I often want to replace some selected text
:set guioptions+=a
+
with some other text i have copied before. The autocopy function always owerwrites my buffer.
</pre>
 
   
----
+
:This is an important question about the tip that needs to be addressed. For method 1, try selecting the text you wish to replace with visual mode instead of selection mode (i.e. use v, V, or CTRL-V instead of the mouse). Method 2 will not allow this, because it copies the visual selection. Perhaps using A instead of a in the guioptions would allow it to work?
   
Can someone tell me how to disable this autocopy function. I often want to replace some selected text
+
:Of course, you could alway just dispense with the automatic copying, and copy manually instead. See [[Accessing the system clipboard]].
with some other text i have copied before. The autocopy function always owerwrites my buffer.
+
  +
:--[[User:Fritzophrenic|Fritzophrenic]] 13:23, 5 September 2008 (UTC)

Revision as of 13:23, September 5, 2008

Tip 1154 Printable Monobook Previous Next

created February 27, 2006 · complexity basic · author Anon · version 6.0


With this tip, just selecting text with mouse in gvim, will copy that text to the clipboard for pasting into other applications (on Windows and on Xwindows, ala Xterms).

Put these commands in ~/.gvimrc

" Method 1 (for Xwindows and mswindows), this map is different from the one shown in vim documentation:
:noremap <LeftRelease> "+y<LeftRelease>

" Method 2 (works only on ms-windows vim63):
:set guioptions+=a

Comments

I suppose you meant vnoremap.


 TO DO 
Can someone tell me how to disable this autocopy function. I often want to replace some selected text with some other text i have copied before. The autocopy function always owerwrites my buffer.

This is an important question about the tip that needs to be addressed. For method 1, try selecting the text you wish to replace with visual mode instead of selection mode (i.e. use v, V, or CTRL-V instead of the mouse). Method 2 will not allow this, because it copies the visual selection. Perhaps using A instead of a in the guioptions would allow it to work?
Of course, you could alway just dispense with the automatic copying, and copy manually instead. See Accessing the system clipboard.
--Fritzophrenic 13:23, 5 September 2008 (UTC)
Community content is available under CC-BY-SA unless otherwise noted.