Hi,
On 4/26/07, zzapper <[EMAIL PROTECTED]> wrote:
zzapper <[EMAIL PROTECTED]> wrote in
news:[EMAIL PROTECTED]:
> alebo <[EMAIL PROTECTED]> wrote in
> news:[EMAIL PROTECTED]:
>
>>
> In fact VIM has many features that appear redundant but then one day
> (perhaps after many years) you realise their utility.
>
In fact I've found that there is usually (always?) a subtle advantage in
using one or other of a command which apparently does the same thing, and
that in different circumstances one or the other will be superior.
eg
When the cursor is in the middle of a word you wish to delete
diw has a distinct advantage over bdw
But what is it?
The bdw command can be used to delete the current word only when
the cursor is in the middle of the word. Also, this command cannot be
used to delete single letter words. You have to then use 'x' to delete
single letter words, 'dw' when the cursor is at the start of a word
and 'bdw' when the cursor is not at the start of the word.
The diw command can be used to delete the current word irrespective
of the cursor position in the word and also to delete single letter
words. This is particularly useful from a map command.
- Yegappan