Am Thursday, 21. February 2008 schrieb Nick Gravgaard: > I know it seems a bit strange, but in order that that both 2d- and 2dd > work, shouldn't it look like this instead? > > -3 aaaa > -2 bbbb <-- 2d- deletes from the current line to here > -1 cccc > 1 dddd <-- current line > 2 eeee <-- 2dd deletes from the current line to here > 3 ffff > 4 gggg
That's weird. Having zero as base has the advantage, that you can use the commands in both directions - up and down - the same way. Then use 2dj instead of 3dd and 2dk works similar in the opposite direction. Of course then the number doesn't represent the number of lines you want to delete. But that's not what you want, you just want to have the lines from 0 to the relative line number be deleted. As with movement commands 2j 2k 2+ 2-. And you cannot compare 2d- with 2dd, you have to compare it with 2d+. Then again it simply works well with zero-base. Markus --~--~---------~--~----~------------~-------~--~----~ You received this message from the "vim_dev" maillist. For more information, visit http://www.vim.org/maillist.php -~----------~----~----~----~------~----~------~--~---
