<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
	<channel>
		<title><![CDATA[ViEmu Forums - Un-Vim like behaviour with cut-paste]]></title>
		<link>http://www.viemu.com/forum/viewtopic.php?id=33</link>
		<description><![CDATA[The most recent posts in Un-Vim like behaviour with cut-paste.]]></description>
		<lastBuildDate>Wed, 15 Dec 2010 03:16:07 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: Un-Vim like behaviour with cut-paste]]></title>
			<link>http://www.viemu.com/forum/viewtopic.php?pid=7074#p7074</link>
			<description><![CDATA[<p>Any news on this ?<br />I quite like how I can paste on a visual block without changing the default register.. but I&#039;d rather lose that if it&#039;s to get better Vim compatibility.</p>]]></description>
			<author><![CDATA[dummy@example.com (TheCrib)]]></author>
			<pubDate>Wed, 15 Dec 2010 03:16:07 +0000</pubDate>
			<guid>http://www.viemu.com/forum/viewtopic.php?pid=7074#p7074</guid>
		</item>
		<item>
			<title><![CDATA[Re: Un-Vim like behaviour with cut-paste]]></title>
			<link>http://www.viemu.com/forum/viewtopic.php?pid=2622#p2622</link>
			<description><![CDATA[<p>Tomas, thanks for the very detailed description. I&#039;m sure I&#039;ll be able to implement it fine with this. I have taken note of the request and I hope I can start working on it after ViEmu/2010 and Codekana/2010 are ready, together with the other core-vi request (:s//c, multiple key-chord mapping, etc...)</p>]]></description>
			<author><![CDATA[dummy@example.com (Jon_Symnum)]]></author>
			<pubDate>Mon, 08 Jun 2009 16:46:47 +0000</pubDate>
			<guid>http://www.viemu.com/forum/viewtopic.php?pid=2622#p2622</guid>
		</item>
		<item>
			<title><![CDATA[Re: Un-Vim like behaviour with cut-paste]]></title>
			<link>http://www.viemu.com/forum/viewtopic.php?pid=2619#p2619</link>
			<description><![CDATA[<p>Jon you&#039;re right, I left out one `</p><p>This is the mapping: vnoremap &lt;C-x&gt; &lt;Esc&gt; `.``gvP``P</p><p>&lt;Esc&gt; leaves visual mode, `. moves to the last edit point (call it point A), `` moves back to where we started, gv goes back to visual mode, P pastes the last deleted text over the visual selection. So far it&#039;s pretty much the same as P, except we have a mark for point A in place.</p><p>`` will now move back to where we last jumped from, that is, to point A from above. Lastly, P will now put the contents that were overwritten by the first P, which completes the swap.</p><p>This only works if putting in visual mode does an exchange, which is the difference between Vim and ViEmu in this regard.</p><br /><p>The exchange behaviour is useful in a number of other ways too, so it would be great to get it implemented if it&#039;s not too hard.</p><p>If you&#039;re trying this out, there is one case where it won&#039;t work. If you try and swap a line for the next line, you&#039;ll delete the mark for point A and the command will fail. However, for that use case a plain ddp is of course easier.</p><p>Now, for your questions of visual mode put (or exchange, as might be a better name) implementation:</p><p>* The register specifies where you paste from.<br />* Regardless of which register you pasted from, the overwritten text is put into the default register, not into the specified register.<br />* In Vim, an undo after a visual mode paste restores the text, but not the registers.</p>]]></description>
			<author><![CDATA[dummy@example.com (tomlu)]]></author>
			<pubDate>Sat, 06 Jun 2009 01:06:11 +0000</pubDate>
			<guid>http://www.viemu.com/forum/viewtopic.php?pid=2619#p2619</guid>
		</item>
		<item>
			<title><![CDATA[Re: Un-Vim like behaviour with cut-paste]]></title>
			<link>http://www.viemu.com/forum/viewtopic.php?pid=2615#p2615</link>
			<description><![CDATA[<p>Tomas,</p><p>I don&#039;t really understand the mapping, mainly, the last `P. I think there&#039;s an error.</p><p>My understanding:</p><p>&lt;Esc&gt; leaves visual mode, `. moves to the last edit point, `` moves back to where we started, gv goes back to visual mode, P pastes the last deleted text over the visual selection.</p><p>Why isn&#039;t this just the same as P?</p><p>In thinking of this and looking at my code, I&#039;m thinking that the main confusion I have comes from two sources. One, when you type a reg modifier for paste in visual mode (say, &quot;ap), what does the &quot;a refer to? Where you paste from, or where you delete to? And second, when you paste in visual mode, the concept is a bit confusing, because it&#039;s an &quot;exchange&quot;, right? There&#039;s no &quot;correct&quot; order between the paste-from and the yank-to, you need to have a third intermediate register?</p><p>I&#039;ll be happy for any help visualizing this behavior properly... my vim-fu is limited!</p><p>Best regards,</p><p>&nbsp; -- Jon</p>]]></description>
			<author><![CDATA[dummy@example.com (Jon_Symnum)]]></author>
			<pubDate>Thu, 04 Jun 2009 17:29:39 +0000</pubDate>
			<guid>http://www.viemu.com/forum/viewtopic.php?pid=2615#p2615</guid>
		</item>
		<item>
			<title><![CDATA[Re: Un-Vim like behaviour with cut-paste]]></title>
			<link>http://www.viemu.com/forum/viewtopic.php?pid=2602#p2602</link>
			<description><![CDATA[<p>I stumbled across this the other day when I was trying to swap lines and words. Apart from being generally useful to easily overwrite stuff, its implementation allows some really cool stuff:</p><p>Delete some text somewhere.<br />Select some new text that you want to swap with in any visual mode.<br />vnoremap &lt;C-X&gt; &lt;Esc&gt;`.``gvP`P</p><p>In gvim, this swaps the selected text for the most recently deleted text, which is _very_ handy.</p><p>Any chance of implementing this?</p>]]></description>
			<author><![CDATA[dummy@example.com (tomlu)]]></author>
			<pubDate>Tue, 02 Jun 2009 09:26:05 +0000</pubDate>
			<guid>http://www.viemu.com/forum/viewtopic.php?pid=2602#p2602</guid>
		</item>
		<item>
			<title><![CDATA[Re: Un-Vim like behaviour with cut-paste]]></title>
			<link>http://www.viemu.com/forum/viewtopic.php?pid=121#p121</link>
			<description><![CDATA[<p>Johan,</p><p>You are right. I&#039;m afraid this is going to be the source of much bad publicity, but I implemented it like that because I didn&#039;t know how to paste over text *without* overwriting the register. I could emulate the other, vim-like, behavior by using different named registers.</p><p>I will fix it in the next release but, meanwhile, can anyone suggest how I could paste the contents of a register over some text *without* losing the contents of the register?</p><p>And I&#039;m a bit surprised it&#039;s taken this long for someone to rightly complain <img src="http://www.viemu.com/forum/img/smilies/smile.png" width="15" height="15" alt="smile" /></p>]]></description>
			<author><![CDATA[dummy@example.com (Jon_Symnum)]]></author>
			<pubDate>Mon, 08 May 2006 00:37:54 +0000</pubDate>
			<guid>http://www.viemu.com/forum/viewtopic.php?pid=121#p121</guid>
		</item>
		<item>
			<title><![CDATA[Re: Un-Vim like behaviour with cut-paste]]></title>
			<link>http://www.viemu.com/forum/viewtopic.php?pid=120#p120</link>
			<description><![CDATA[<p>Hi there,</p><p>Just noticed some behaviour with ViEmu which is not quite like Vim. For example:</p><p>&nbsp; &nbsp; &nbsp; 1. Given the text &quot;ALPHA, BETA&quot;, enter visual mode, highlight &quot;BETA&quot; and hit &#039;d&#039; to delete.<br />&nbsp; &nbsp; &nbsp; 2. Enter visual mode, highlight &quot;ALPHA&quot; and hit &#039;p&#039; to paste (Should replace &quot;ALPHA&quot; with &quot;BETA&quot;, and put &quot;ALPHA&quot; in the yank buffer).<br />&nbsp; &nbsp; &nbsp; 3. Move cursor somewhere and &#039;p&#039; for paste - should paste &quot;ALPHA&quot;, but instead pastes &quot;BETA&quot;.</p><p>Normally this behaviour is used for swapping bits of text around.</p><p>Regards,</p><p>Johan.</p><p>EDIT: This happens with &quot;Default yank/paste to/from Windows clipboard&quot; on or off.</p>]]></description>
			<author><![CDATA[dummy@example.com (jventer)]]></author>
			<pubDate>Sun, 07 May 2006 22:55:21 +0000</pubDate>
			<guid>http://www.viemu.com/forum/viewtopic.php?pid=120#p120</guid>
		</item>
	</channel>
</rss>
