On Sat, Jun 10, 2006 at 03:50:52PM +0200, A.J.Mechelynck wrote: > Marc Weber wrote: > >>Yakov > >> > >How would you implement bash Ctrl-k behaviour ? Delete from cursor till > >the end of line? > > > >noremap : q:i > > > >? ;-) > > > In Normal mode, D (shift-d) deletes from cursor to end-of-line (with a > count: on <count> lines including the current one). > > See > :help D
If you want to do the same thing in Insert mode, try :imap <C-k> <Esc>lC It is not perfect, since it dumps you into Normal mode if you use it when you are already at the end of the line. If you set 'insertmode', then use CTRL-\ CTRL-N instead of ESC: :imap <C-k> <C-\><C\N>lC (This will work whether or not 'insertmode' is set.) HTH --Benji Fisher