Closed habamax closed 14 years ago
To make selection linewise just change normal! v
to normal! V
at line 135:
" Apply the range we have found.
call cursor(l0, c0)
normal! v
call cursor(l1, c1)
Looks like I was wrong about dii
-- it deletes empty trailing lines too.
Is it possible to prevent it?
I've made some small tweaks so that the behaviour is more consistent. However I haven't addressed the main issue you raised.
I deliberately made it behave this way, because it seems to me to be nicer... I guess there are arguments either way. I personally find it odd if you delete a whole function with blank lines after it, if the blank lines stay - then you just have the lines from above the block and the lines from below the block - it's too many lines! On the other hand, if instead of deleting the block you are replacing it, then you might want those lines there.
Let me know what you think. And thankyou for your interest!
the point was:
All standard textobjects works in a similar manner -- paragraphs with dip
and dap
, words with diw
and daw
(trailing spaces instead of lines here) etc
Ok I've updated the ii mapping so that it ignores the whitespace. It also sets the start of the region to respect the indentation. This means for instance that if you press cii in a block, the cursor will be properly indented.
Thanks! Looks good!
Cool, closing issue.
First of all -- this plugin is great! Thanks!
Now for the issue. I am not sure but it looks like trailing empty lines should not be selected with
vii
.For example if I want to change init method I would press
dii
and trailing line is not deleted. But if I do the same withviid
then it would be deleted.PS If you think it should be selected then make linewise selection --> after
vii
if you pressk
the previous line is not fully selected.