evil-delete-line in visual state

Vegard Øye vegard_oye at hotmail.com
Mon Sep 5 14:55:46 CEST 2011


On 2011-09-05 09:53 +0200, Frank Fischer wrote:

> This seems to be a non-trivial issue. While the behavior for character
> visual mode is easy, the visual-block mode causes more trouble. The
> reason is that currently (unless Vegard tells something else ;)) it is
> not possible to have a block selection that extends to the end of each
> line unless the last (or the first) line is the longest and point is
> placed there. ... We need to introduce a new "type", say `block-end',
> which describes block regions that extend to the end of each line.

The current implementation of "D" finds the end of each line itself,
so the standard `block' type suffices.

However, the limitation that block selections are restricted by the
length of the line can be cumbersome (even if Vim exhibits the same
behavior). It would be handy if "l" could extend the selection
indefinitely into the right margin.

One way to achieve this would be to use the `before-string' and
`after-string' overlay properties to insert virtual spaces into the
buffer, and then use the `cursor' text property to place point on one
of these spaces. IIRC, this would not change the value of (point), but
it would change the value of (current-column). From the point of view
of the yank and delete operators, therefore, it should seem as if
point is placed on a multi-column character like a tab.

-- 
Vegard



More information about the implementations-list mailing list