Open Rybadour opened 10 years ago
As I wrote in the document, the purpose of this text object is to select a line characterwise. I will never accept your suggestion because it is completely against the purpose.
And built-in operators can target a line linewise with dd
, yy
, etc. Why not use these standard key mappings?
I agree with Rybadour. My reason is consistency. I want to be able to express it just as I think (delete a line). I'm already used to dd, yy, etc. But the concept of "a line" is more general and easier to teach. My solution to this is to define 3 different modifiers:
i: The text in the line, same as in here I: The text in the line plus trailing whitespaces a: the complete line, I should end in the next line.
Another reason that I have is to be able to repeat non standard operators:
I can do 6dd to delete 6 lines, I cannot do 6(custom operator a line) because it does 6 times the same thing over the same line. With a proper "a line" object we could do for example "6gUal" to capitalize 6 lines and it should work.
I'm trying to add this functionality, what are your thoughts?
@blasco Supporting count like 6dal
is a completely different problem, so it’s not a valid reason to change the definition of al
as I mentioned above.
In my opinion this plugin's
al
text object is only really useful when it selects the entire line and new line character. That waydal
removes the line entirely.