Monday, January 28, 2013

How to determine the start of a visual block (C-V) when it starts in the void?

Vim 7.3.785@Win7-64

Please, consider the following content of a buffer:

$
...<p>$

Then start a visual block (C-V) at the left angle of p. Extend the block to the row above. Then use :<C-U>echo col("'<") (or virtcol("'<"), or getpos("'<"), or "v", or ".") to determine the start column of the visual block. All functions mentioned will return "1" instead of "4". How do I retrieve the "correct" starting value (i.e. "4") of the block?

Please note, that this is a visual block, not a char or line block.



--
--
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, send email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

No comments: