On Tuesday, April 9, 2013 5:48:25 PM UTC+2, Ben Fritz wrote:
> On Tuesday, April 9, 2013 6:26:58 AM UTC-5, glts wrote:
> >
> > But what if the line between abc and xyz is empty?
> >
> > abc
> >
> > xyz
> >
> > Now vjd will always result in:
> >
> > axyz
> >
> > But I don't like this, it goes against my intuition. Is there a way to
> > tell Vim not to include the newline character in the Visual selection,
> > so that I get the same result as with vjhd?
> >
>
> Why are you including the empty line in your visual selection at all? There is nothing there to delete except the line itself.
I'm sorry, I should have mentioned that this is just a simplified
example.
Sometimes I start a selection in the middle of a line and then extend it
downwards. Sometimes the selection ends on an empty line or on a stretch
of empty lines. I can see what I selected and then operate on it.
It is in these circumstances that I expect a result like:
a
xyz
I expect d to delete the highlighted line or lines so to speak. I don't
expect it to delete the newline character even though that may be the
correct behaviour strictly speaking.
The procedure I'm using now is k$ and then d, but unfortunately that
solution is not suitable for scripting. Also, I have to remember using
it.
--
--
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/groups/opt_out.
Tuesday, April 9, 2013
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment