Yanking after $ motion copies carriage return

10 views
Skip to first unread message

Brian Sullivan

unread,
Sep 19, 2010, 10:51:22 PM9/19/10
to vim_mac
I've used the Linux and Windows versions of Vim in the past, but am
new to MacVim. In MacVim, when I switch to visual mode, use the $
motion (highlighting from my cursor to the end of the line), and yank,
when I paste the copied content, it includes the carriage return,
bumping everything after the paste point down to a new line.

This behavior seemed unfamiliar (not to mention annoying) to me, and I
verified that the other versions of Vim that I use don't behave this
way. Is there any way to change this behavior to match the other
versions?

Kyle Lippincott

unread,
Sep 20, 2010, 3:46:30 PM9/20/10
to vim...@googlegroups.com
I see this same behavior on my vim7.3 install on linux and my vim7.2 install on command line snow leopard.  This seems like there's something in your vimrc in the other environments that's changing this from the default.  Curiously, y$ doesn't do this, just v$y   and v$y behaves strangely here, because v$hy grabs up to but not including the last character, v$y grabs everything and the newline.  I don't have virtualedit on..  no idea on this one. :P


--
You received this message from the "vim_mac" 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

Brian Sullivan

unread,
Sep 20, 2010, 5:16:13 PM9/20/10
to vim_mac
Kyle,

Thanks for the response!

In truth, I only verified the other behavior in Windows GVim (don't
have a Linux install up at the moment). But that was with a fresh
install of vim7.3 and an empty vimrc, and I saw the behavior I was
accustomed to seeing. Since this behavior seems to not be isolated to
the Mac version, where is the best place for me to ask my question to
the larger Vim community?

Brian

On Sep 20, 2:46 pm, Kyle Lippincott <spect...@gmail.com> wrote:
> I see this same behavior on my vim7.3 install on linux and my vim7.2 install
> on command line snow leopard.  This seems like there's something in your
> vimrc in the other environments that's changing this from the default.
>  Curiously, y$ doesn't do this, just v$y   and v$y behaves strangely here,
> because v$hy grabs up to but not including the last character, v$y grabs
> everything and the newline.  I don't have virtualedit on..  no idea on this
> one. :P
>

Kyle Lippincott

unread,
Sep 20, 2010, 6:05:33 PM9/20/10
to vim...@googlegroups.com
http://www.vim.org/community.php should provide a link to the v...@vim.org mailing list.  If you run vim on windows with "vim -u NUL:" (or create an empty file and use that instead of the NUL: device), I wonder if the behavior persists?  If not, there may be something in the default vimrc for windows vim to try to make it more "windows-like" that is providing the behavior you want.  The default system vimrc I believe is normally in C:\Program Files\Vim\vim7.3\vimrc, but I haven't used windows in about 2 years now so don't quote me on that ;)
Reply all
Reply to author
Forward
0 new messages