From: Georg Dahn <[EMAIL PROTECTED]>
Subject: Re: Copy a line of text without the LF
Date: Tue, 8 Aug 2006 10:05:45 +0100 (BST)
Hi Georg,
thanks a lot for your reply! :)
Good to know, that there are special commands to just copy a line
completly without the LF.
But why I do need a specialised command ?
Why does
y/$
(despite the settings of the "selection" option)
not work ? Why do I have to leave "/" off and have to use
y$
instead, as Jürgen said ???
And why does
y<any other character>
does not work?
Is this inconsistency needed?
Keep hacking!
mcc
>
> Hi!
>
> I would position the cursor on the line you want to copy and do
>
> 0v$y
>
> 0: move the cursor to the beginning of the line
> v: start visual mode
> $: move the cursor to the end of the line
> y: yank the selection
>
> Best wishes,
> Georg
>
>
> --- Meino Christian Cramer <[EMAIL PROTECTED]> wrote:
>
> > Hi,
> >
> > I am using vim 7.0.42 on a Linux system.
> >
> > I want copy a complete line of text *without+ the final LF at the
> > end, so it is possible to insert it elsewhere in the midth of text.
> >
> > With
> >
> > Shift-V
> >
> > I get the line *with* the LF at the end -- so I can not use that.
> >
> > With
> >
> > y/<last character of the line><RET>
> >
> > I get the line without the LF but the last character is also missing.
> >
> > With
> >
> > y/$<RET>
> >
> > I get the line without the LF but the last character is missing again.
> >
> >
> > :set selection<RET>
> >
> >
> > gives me the default ("inclusive").
> >
> >
> > What did I wrong ?
> >
> > Kind regards,
> > mcc
> >
> >
>
>
>
>
>
>
> ___________________________________________________________
> All new Yahoo! Mail "The new Interface is stunning in its simplicity and ease
> of use." - PC Magazine
> http://uk.docs.yahoo.com/nowyoucan.html
>