Is modal editing possible in command-line mode?
Some examples:
!ls ~/foo/bar
I want to db
to delete barls
to mv
and jump back to $By default you can press Control + f
(or otherwise see set cedit
) when on the Vim command-line, which opens the command-line window where you can edit the command using normal-mode Vim editing keys.
Enter
will run the command or Control + c
will return you to the standard command-line.
So in your specific example, you could press Control + f
on the Vim command-line then db
and it would do what you want.
When I have to do more sophisticated editing commands I use the above approach because I'm more familiar with Vim editing keys than I am with the alternatives. I also find the normal-mode vim keys more powerful.
See :help c_ctrl-f
for more information.