Actually it's even bigger than that. yt$ does not include the newline, yy does. So p after a yt$ will not change lines, it will insert the content directly on this one after your cursor, while p after a yy will reproduce the entire line as a new line below the current one.
y$ will yank till the end of line (characterwise). Y is actually the same as yy, unless you n(no)remap Y to be the same as y$, which most people do. This makes make more sense, because C is the same as c$ (change till end of line).
':h change.txt' explains all of this and more a lot better than I could.
thanks guys, I wrote the post at 3am and that was a bad time to be writing about vim as it turns out :) I've removed the bad examples for now and will go back to the post and add more as I think of them. The general idea was to explain that vim is not voodoo, but is very mnemonic and conversational.
Comments
Actually it's even bigger than that. yt$ does not include the newline, yy does. So p after a yt$ will not change lines, it will insert the content directly on this one after your cursor, while p after a yy will reproduce the entire line as a new line below the current one.
Are you sure that yt$ will do anything if there is not a dollar-sign character on the line? Neither that or ct$ seem to do what the post advertises.
The commands the OP was looking for was c$ and y$. They are equivalent to say cw, where the object is "end of line" instead of "current word"
y$ will yank till the end of line (characterwise). Y is actually the same as yy, unless you n(no)remap Y to be the same as y$, which most people do. This makes make more sense, because C is the same as c$ (change till end of line). ':h change.txt' explains all of this and more a lot better than I could.
thanks guys, I wrote the post at 3am and that was a bad time to be writing about vim as it turns out :) I've removed the bad examples for now and will go back to the post and add more as I think of them. The general idea was to explain that vim is not voodoo, but is very mnemonic and conversational.