Monday, March 2, 2015

Re: Visual yank

Hi, I am sorry, I am not able to reproduce it anymore :( :-/.

I was just regularly editing a bash script on a Kubuntu system, nothing special.

It seemed as if the cursor was /ahead/ of the selection, but when I try again now, it is within the selection.

I have done it at least 3 times. I wanted to make sure, and also to learn how to do it best next time, with the least amount of work. For that reason I went back several times to see what I was doing wrong.

I can't reproduce it. Very odd. The 'selection' option actually indeed caused the final character (that is now simply within the visual selection) to not be copied, which is not what I want ;-).

In any case, perhaps it will happen again some time, I will be sure to be more attentive that time. Regards,

D.



On Mon, Mar 2, 2015 at 3:51 PM, Ben Fritz <fritzophrenic@gmail.com> wrote:

Wow, I think I *finally* understand the purpose of the 'selection' option.

It sounds like you're expecting that after you select some text, the selected text doesn't include the cursor. I.e. you're expecting that the selection only includes the text the cursor moved over. For that to be the case, you need to ":set selection=exclusive". The default value of the selection option is "inclusive", meaning that the visual selection also includes the cursor location.

I've had a hard time figuring out why anyone would ever *want* the selection not to include the "last character" as mentioned in ":help 'selection'". Thinking of it as the cursor instead means the option actually makes some sense...

--
--
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

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
--
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

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment